ARM: dts: Add fck for cpsw mdio for omap variants
authorTony Lindgren <tony@atomide.com>
Mon, 26 Aug 2019 15:41:14 +0000 (08:41 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 26 Aug 2019 15:41:14 +0000 (08:41 -0700)
In preparation for dropping legacy platform data and custom ti,hwmods
property, we need to make functional clock available for mdio for the
SoCs so the the mdio driver can find it.

The mdio hardware currently relies on a mdio_hwmod to manage the clock
for omap variants. This is wrong though as there are no separate
sysconfig registers for mdio. All the cpsw related components are just
children of the gmac module.

Note that since mdio is a child of cpsw, just doing pm_runtime_get()
in the mdio driver enables the clock. However, since mdio is also used
by davinci that does not implement runtime PM, let's just add the fck
for now.

Also note that am437x mdio already has a clock, let's update it to
not use the legacy clock naming to unify things further.

Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Keerthy <j-keerthy@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/am33xx-l4.dtsi
arch/arm/boot/dts/am437x-l4.dtsi
arch/arm/boot/dts/dra7-l4.dtsi

index 4bd22c1edf9631251ad00ae3c5e7fc65620f5bf2..b3f58d4325706b10acfc32c0d2febf3a5b1f3f86 100644 (file)
 
                                davinci_mdio: mdio@1000 {
                                        compatible = "ti,cpsw-mdio","ti,davinci_mdio";
+                                       clocks = <&cpsw_125mhz_clkctrl AM3_CPSW_125MHZ_CPGMAC0_CLKCTRL 0>;
+                                       clock-names = "fck";
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        ti,hwmods = "davinci_mdio";
index 04bee4ff9dcb86e6ea435834d5826c9eca98ab00..cc7102c9b34d5d779302a89aea531b7d3a02c34a 100644 (file)
                                davinci_mdio: mdio@1000 {
                                        compatible = "ti,am4372-mdio","ti,cpsw-mdio","ti,davinci_mdio";
                                        reg = <0x1000 0x100>;
+                                       clocks = <&cpsw_125mhz_clkctrl AM4_CPSW_125MHZ_CPGMAC0_CLKCTRL 0>;
+                                       clock-names = "fck";
                                        #address-cells = <1>;
                                        #size-cells = <0>;
-                                       clocks = <&cpsw_125mhz_gclk>;
-                                       clock-names = "fck";
                                        ti,hwmods = "davinci_mdio";
                                        bus_freq = <1000000>;
                                        status = "disabled";
index 21e5914fdd6209157b7149710b4cec249056c9dc..8b31f49d24f103c78fdbeb750bf511e09c566d51 100644 (file)
 
                                davinci_mdio: mdio@1000 {
                                        compatible = "ti,cpsw-mdio","ti,davinci_mdio";
+                                       clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 0>;
+                                       clock-names = "fck";
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        ti,hwmods = "davinci_mdio";