arm64: dts: nuvoton: ma35d1: add CAN nodes
PATCH v4 1/1 arm64: dts: nuvoton: ma35d1: add CAN nodes
Add controller nodes for the four Bosch M_CAN blocks found on the Nuvoton MA35D1 SoC.
Additionally, configure pinctrl and enable CAN1 and CAN3 on the MA35D1 SOM board. Also, update the APLL frequency to 160MHz to ensure the CAN controllers receive the required input clock for 80MHz operation.
---
v4:
- Add hardware reset properties for CANFD0 through CANFD3.
v3:
- Change CAN clock to 80MHz and APLL to 160MHz to use a higher multiple of 40MHz, as suggested by Marc.
v2:
- Move assigned-clocks and assigned-clock-rates configurations of CAN_DIV from SoC-level ma35d1.dtsi to board-level ma35d1-som-256m.dts
- Update APLL frequency to 200MHz to ensure the CAN controllers receive the required 50MHz input clock.
.../boot/dts/nuvoton/ma35d1-som-256m.dts | 32 ++++++++++- arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 56 +++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts +31 -1
@@ -39,6 +39,22 @@ clk_hxt: clock-hxt { }; }; +&can1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_can1>; + assigned-clocks = <&clk CAN1_DIV>; + assigned-clock-rates = <80000000>; + status = "okay"; +}; + +&can3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_can3>; + assigned-clocks = <&clk CAN3_DIV>; + assigned-clock-rates = <80000000>; + status = "okay"; +}; + &clk { assigned-clocks = <&clk CAPLL>, <&clk DDRPLL>,
@@ -47,7 +63,7 @@ &clk { <&clk VPLL>; assigned-clock-rates = <800000000>, <266000000>, - <180000000>, + <160000000>, <500000000>, <102000000>; nuvoton,pll-mode = "integer",
@@ -58,6 +74,20 @@ &clk { }; &pinctrl { + can-grp { + pinctrl_can1: can1-pins { + nuvoton,pins = <11 14 4>, + <11 15 4>; + bias-disable; + }; + + pinctrl_can3: can3-pins { + nuvoton,pins = <11 10 3>, + <11 11 3>; + bias-disable; + }; + }; + uart-grp { pinctrl_uart0: uart0-pins { nuvoton,pins = <4 14 1>,
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi +56 -0
62 lines not on this page · raw message
Signature · 1 line
2.34.1
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi gpion: gpio@340 { · line 259
Quoted 13 lines
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi +13
-0+ can0: can@403c0000 { + compatible = "bosch,m_can"; + reg = <0x0 0x403c0000 0x0 0x200>, <0x0 0x403c0200 0x0 0x2000>; + reg-names = "m_can", "message_ram"; + interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "int0", "int1"; + resets = <&sys MA35D1_RESET_CANFD0>; + clocks = <&clk HCLK3>, <&clk CAN0_GATE>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 4 4 32 32 32 8 8>; + status = "disabled"; + };
Hi Zi-Yu,
The CANFD0 through CANFD3 reset properties added in v4 address Marc's comment, and the reset assignments look correct.
Best regards,
Jacky Huang