Commit 516f1117 authored by Tony Lindgren's avatar Tony Lindgren

ARM: dts: Configure osc clock for d_can on am335x

Reading the module revision register can cause an external abort on
non-linefetch depending of osc clock is not already enabled. This
started happening with commit 1a5cd7c2 ("bus: ti-sysc: Enable all
clocks directly during init to read revision") as reported by
Sebastian Andrzej Siewior <bigeasy@linutronix.de>.

The reason why the issue happens is because we now attempt to read the
interconnect target module revision register by first manually enabling
all the device clocks in sysc_probe(). And looks like d_can also needs
the osc clock in addition to the module clock, and it may or may not be
enabled depending on the bootloader version and if other devices have
already requested osc clock.

Let's fix the issue by adding osc clock as an optional clock for the
module for am335x. Note that am437x does not seem to list the osc clock
at all, so presumably it is not needed for am437x.

I also noticed that we're incorrectly assuming the revision register for
d_can exists. But the module does not seem to have any revision, sysconfig
or sysstatus registers. But that's mostly a cosmetic issues, so I'll send
a patch separately for that.

Fixes: 1a5cd7c2 ("bus: ti-sysc: Enable all clocks directly during init to read revision")
Reported-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: default avatarKeerthy <j-keerthy@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent d59b6056
...@@ -1762,8 +1762,9 @@ target-module@cc000 { /* 0x481cc000, ap 60 46.0 */ ...@@ -1762,8 +1762,9 @@ target-module@cc000 { /* 0x481cc000, ap 60 46.0 */
reg = <0xcc000 0x4>; reg = <0xcc000 0x4>;
reg-names = "rev"; reg-names = "rev";
/* Domains (P, C): per_pwrdm, l4ls_clkdm */ /* Domains (P, C): per_pwrdm, l4ls_clkdm */
clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN0_CLKCTRL 0>; clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN0_CLKCTRL 0>,
clock-names = "fck"; <&dcan0_fck>;
clock-names = "fck", "osc";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
ranges = <0x0 0xcc000 0x2000>; ranges = <0x0 0xcc000 0x2000>;
...@@ -1785,8 +1786,9 @@ target-module@d0000 { /* 0x481d0000, ap 62 42.0 */ ...@@ -1785,8 +1786,9 @@ target-module@d0000 { /* 0x481d0000, ap 62 42.0 */
reg = <0xd0000 0x4>; reg = <0xd0000 0x4>;
reg-names = "rev"; reg-names = "rev";
/* Domains (P, C): per_pwrdm, l4ls_clkdm */ /* Domains (P, C): per_pwrdm, l4ls_clkdm */
clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN1_CLKCTRL 0>; clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN1_CLKCTRL 0>,
clock-names = "fck"; <&dcan1_fck>;
clock-names = "fck", "osc";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
ranges = <0x0 0xd0000 0x2000>; ranges = <0x0 0xd0000 0x2000>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment