ARM: dts: Configure interconnect target module for dm814x cpsw

We can now probe devices with device tree only configuration using
ti-sysc interconnect target module driver. Let's configure the
module and drop the legacy "ti,hwmods" property.

As this module is very similar to what we already have configured
and working for am33xx, let's just update the whole cpsw with a
single patch to avoid some extra churn on the dts files.

Cc: Graeme Smecher <gsmecher@threespeedlogic.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
Tony Lindgren 2020-03-17 09:45:58 -07:00
parent a7cbd5cb41
commit 6398f3478e
2 changed files with 67 additions and 49 deletions

View File

@ -4,6 +4,8 @@
* kind, whether express or implied. * kind, whether express or implied.
*/ */
#include <dt-bindings/bus/ti-sysc.h>
#include <dt-bindings/clock/dm814.h>
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/dm814x.h> #include <dt-bindings/pinctrl/dm814x.h>
@ -574,57 +576,73 @@
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
ranges = <0 0x4a000000 0x1b4040>; ranges = <0 0x4a000000 0x1b4040>;
};
/* REVISIT: Move to live under l4hs once driver is fixed */ target-module@100000 {
mac: ethernet@4a100000 { compatible = "ti,sysc-omap4-simple", "ti,sysc";
compatible = "ti,cpsw"; reg = <0x100900 0x4>,
ti,hwmods = "cpgmac0"; <0x100908 0x4>,
clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>; <0x100904 0x4>;
clock-names = "fck", "cpts"; reg-names = "rev", "sysc", "syss";
cpdma_channels = <8>; ti,sysc-mask = <0>;
ale_entries = <1024>; ti,sysc-midle = <SYSC_IDLE_FORCE>,
bd_ram_size = <0x2000>; <SYSC_IDLE_NO>;
mac_control = <0x20>; ti,sysc-sidle = <SYSC_IDLE_FORCE>,
slaves = <2>; <SYSC_IDLE_NO>;
active_slave = <0>; ti,syss-mask = <1>;
cpts_clock_mult = <0x80000000>; clocks = <&alwon_ethernet_clkctrl DM814_ETHERNET_CPGMAC0_CLKCTRL 0>;
cpts_clock_shift = <29>; clock-names = "fck";
reg = <0x4a100000 0x800
0x4a100900 0x100>;
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&intc>;
/*
* c0_rx_thresh_pend
* c0_rx_pend
* c0_tx_pend
* c0_misc_pend
*/
interrupts = <40 41 42 43>;
ranges;
syscon = <&scm_conf>;
davinci_mdio: mdio@4a100800 {
compatible = "ti,davinci_mdio";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <1>;
ti,hwmods = "davinci_mdio"; ranges = <0 0x100000 0x8000>;
bus_freq = <1000000>;
reg = <0x4a100800 0x100>;
};
cpsw_emac0: slave@4a100200 { mac: ethernet@0 {
/* Filled in by U-Boot */ compatible = "ti,cpsw";
mac-address = [ 00 00 00 00 00 00 ]; clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
phys = <&phy_gmii_sel 1>; clock-names = "fck", "cpts";
cpdma_channels = <8>;
ale_entries = <1024>;
bd_ram_size = <0x2000>;
mac_control = <0x20>;
slaves = <2>;
active_slave = <0>;
cpts_clock_mult = <0x80000000>;
cpts_clock_shift = <29>;
reg = <0 0x800>,
<0x900 0x100>;
#address-cells = <1>;
#size-cells = <1>;
/*
* c0_rx_thresh_pend
* c0_rx_pend
* c0_tx_pend
* c0_misc_pend
*/
interrupts = <40 41 42 43>;
ranges = <0 0 0x8000>;
syscon = <&scm_conf>;
}; davinci_mdio: mdio@800 {
compatible = "ti,cpsw-mdio", "ti,davinci_mdio";
clocks = <&alwon_ethernet_clkctrl DM814_ETHERNET_CPGMAC0_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <0>;
bus_freq = <1000000>;
reg = <0x800 0x100>;
};
cpsw_emac1: slave@4a100300 { cpsw_emac0: slave@200 {
/* Filled in by U-Boot */ /* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ]; mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 2>; phys = <&phy_gmii_sel 1>;
};
cpsw_emac1: slave@300 {
/* Filled in by U-Boot */
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 2>;
};
};
}; };
}; };

View File

@ -12,12 +12,12 @@
/* Compared to dm814x, dra62x has different offsets for Ethernet */ /* Compared to dm814x, dra62x has different offsets for Ethernet */
&mac { &mac {
reg = <0x4a100000 0x800 reg = <0 0x800>,
0x4a101200 0x100>; <0x1200 0x100>;
}; };
&davinci_mdio { &davinci_mdio {
reg = <0x4a101000 0x100>; reg = <0x1000 0x100>;
}; };
#include "dra62x-clocks.dtsi" #include "dra62x-clocks.dtsi"