Commit 2a4117df authored by dillon min's avatar dillon min Committed by Tony Lindgren
Browse files

ARM: dts: Fix dcan driver probe failed on am437x platform

Got following d_can probe errors with kernel 5.8-rc1 on am437x

[   10.730822] CAN device driver interface
Starting Wait for Network to be Configured...
[  OK  ] Reached target Network.
[   10.787363] c_can_platform 481cc000.can: probe failed
[   10.792484] c_can_platform: probe of 481cc000.can failed with error -2
[   10.799457] c_can_platform 481d0000.can: probe failed
[   10.804617] c_can_platform: probe of 481d0000.can failed with error -2

actually, Tony has fixed this issue on am335x with the patch [3]

Since am437x has the same clock structure with am335x
[1][2], so reuse the code from Tony Lindgren's patch [3] to fix it.

[1]: https://www.ti.com/lit/pdf/spruh73 Chapter-23, Figure 23-1. DCAN
     Integration
[2]: https://www.ti.com/lit/pdf/spruhl7

 Chapter-25, Figure 25-1. DCAN
     Integration
[3]: commit 516f1117 ("ARM: dts: Configure osc clock for d_can on
     am335x")

Fixes: 1a5cd7c2 ("bus: ti-sysc: Enable all clocks directly during init to read revision")
Signed-off-by: default avatardillon min <dillon.minfei@gmail.com>
[tony@atomide.com: aligned commit message a bit for readability]
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent a18fb076
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1541,8 +1541,9 @@
			reg = <0xcc020 0x4>;
			reg-names = "rev";
			/* Domains (P, C): per_pwrdm, l4ls_clkdm */
			clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN0_CLKCTRL 0>;
			clock-names = "fck";
			clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN0_CLKCTRL 0>,
			<&dcan0_fck>;
			clock-names = "fck", "osc";
			#address-cells = <1>;
			#size-cells = <1>;
			ranges = <0x0 0xcc000 0x2000>;
@@ -1550,6 +1551,8 @@
			dcan0: can@0 {
				compatible = "ti,am4372-d_can", "ti,am3352-d_can";
				reg = <0x0 0x2000>;
				clocks = <&dcan0_fck>;
				clock-names = "fck";
				syscon-raminit = <&scm_conf 0x644 0>;
				interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
				status = "disabled";
@@ -1561,8 +1564,9 @@
			reg = <0xd0020 0x4>;
			reg-names = "rev";
			/* Domains (P, C): per_pwrdm, l4ls_clkdm */
			clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN1_CLKCTRL 0>;
			clock-names = "fck";
			clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN1_CLKCTRL 0>,
			<&dcan1_fck>;
			clock-names = "fck", "osc";
			#address-cells = <1>;
			#size-cells = <1>;
			ranges = <0x0 0xd0000 0x2000>;
@@ -1570,6 +1574,8 @@
			dcan1: can@0 {
				compatible = "ti,am4372-d_can", "ti,am3352-d_can";
				reg = <0x0 0x2000>;
				clocks = <&dcan1_fck>;
				clock-name = "fck";
				syscon-raminit = <&scm_conf 0x644 1>;
				interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
				status = "disabled";