Skip to content

Commit f05af44

Browse files
Jookiawens
authored andcommitted
riscv: dts: allwinner: d1: Add CAN controller nodes
The Allwinner D1, T113 provide two CAN controllers that are variants of the R40 controller. I have tested support for these controllers on two boards: - A Lichee Panel RV 86 Panel running a D1 chip - A Mango Pi MQ Dual running a T113-s3 chip Both of these fully support both CAN controllers. Signed-off-by: John Watts <contact@jookia.org> Link: https://lore.kernel.org/r/20230807191952.2019208-1-contact@jookia.org Signed-off-by: Chen-Yu Tsai <wens@csie.org>
1 parent 0801a3a commit f05af44

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@
5252
#gpio-cells = <3>;
5353
#interrupt-cells = <3>;
5454

55+
/omit-if-no-ref/
56+
can0_pins: can0-pins {
57+
pins = "PB2", "PB3";
58+
function = "can0";
59+
};
60+
61+
/omit-if-no-ref/
62+
can1_pins: can1-pins {
63+
pins = "PB4", "PB5";
64+
function = "can1";
65+
};
66+
5567
/omit-if-no-ref/
5668
clk_pg11_pin: clk-pg11-pin {
5769
pins = "PG11";
@@ -356,6 +368,28 @@
356368
#size-cells = <0>;
357369
};
358370

371+
can0: can@2504000 {
372+
compatible = "allwinner,sun20i-d1-can";
373+
reg = <0x02504000 0x400>;
374+
interrupts = <SOC_PERIPHERAL_IRQ(21) IRQ_TYPE_LEVEL_HIGH>;
375+
clocks = <&ccu CLK_BUS_CAN0>;
376+
resets = <&ccu RST_BUS_CAN0>;
377+
pinctrl-names = "default";
378+
pinctrl-0 = <&can0_pins>;
379+
status = "disabled";
380+
};
381+
382+
can1: can@2504400 {
383+
compatible = "allwinner,sun20i-d1-can";
384+
reg = <0x02504400 0x400>;
385+
interrupts = <SOC_PERIPHERAL_IRQ(22) IRQ_TYPE_LEVEL_HIGH>;
386+
clocks = <&ccu CLK_BUS_CAN1>;
387+
resets = <&ccu RST_BUS_CAN1>;
388+
pinctrl-names = "default";
389+
pinctrl-0 = <&can1_pins>;
390+
status = "disabled";
391+
};
392+
359393
syscon: syscon@3000000 {
360394
compatible = "allwinner,sun20i-d1-system-control";
361395
reg = <0x3000000 0x1000>;

0 commit comments

Comments
 (0)