Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+67 -49
+64 -46
arch/arm/boot/dts/dm814x.dtsi
··· 4 4 * kind, whether express or implied. 5 5 */ 6 6 7 + #include <dt-bindings/bus/ti-sysc.h> 8 + #include <dt-bindings/clock/dm814.h> 7 9 #include <dt-bindings/gpio/gpio.h> 8 10 #include <dt-bindings/pinctrl/dm814x.h> 9 11 ··· 576 574 #address-cells = <1>; 577 575 #size-cells = <1>; 578 576 ranges = <0 0x4a000000 0x1b4040>; 579 - }; 580 577 581 - /* REVISIT: Move to live under l4hs once driver is fixed */ 582 - mac: ethernet@4a100000 { 583 - compatible = "ti,cpsw"; 584 - ti,hwmods = "cpgmac0"; 585 - clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>; 586 - clock-names = "fck", "cpts"; 587 - cpdma_channels = <8>; 588 - ale_entries = <1024>; 589 - bd_ram_size = <0x2000>; 590 - mac_control = <0x20>; 591 - slaves = <2>; 592 - active_slave = <0>; 593 - cpts_clock_mult = <0x80000000>; 594 - cpts_clock_shift = <29>; 595 - reg = <0x4a100000 0x800 596 - 0x4a100900 0x100>; 597 - #address-cells = <1>; 598 - #size-cells = <1>; 599 - interrupt-parent = <&intc>; 600 - /* 601 - * c0_rx_thresh_pend 602 - * c0_rx_pend 603 - * c0_tx_pend 604 - * c0_misc_pend 605 - */ 606 - interrupts = <40 41 42 43>; 607 - ranges; 608 - syscon = <&scm_conf>; 609 - 610 - davinci_mdio: mdio@4a100800 { 611 - compatible = "ti,davinci_mdio"; 578 + target-module@100000 { 579 + compatible = "ti,sysc-omap4-simple", "ti,sysc"; 580 + reg = <0x100900 0x4>, 581 + <0x100908 0x4>, 582 + <0x100904 0x4>; 583 + reg-names = "rev", "sysc", "syss"; 584 + ti,sysc-mask = <0>; 585 + ti,sysc-midle = <SYSC_IDLE_FORCE>, 586 + <SYSC_IDLE_NO>; 587 + ti,sysc-sidle = <SYSC_IDLE_FORCE>, 588 + <SYSC_IDLE_NO>; 589 + ti,syss-mask = <1>; 590 + clocks = <&alwon_ethernet_clkctrl DM814_ETHERNET_CPGMAC0_CLKCTRL 0>; 591 + clock-names = "fck"; 612 592 #address-cells = <1>; 613 - #size-cells = <0>; 614 - ti,hwmods = "davinci_mdio"; 615 - bus_freq = <1000000>; 616 - reg = <0x4a100800 0x100>; 617 - }; 593 + #size-cells = <1>; 594 + ranges = <0 0x100000 0x8000>; 618 595 619 - cpsw_emac0: slave@4a100200 { 620 - /* Filled in by U-Boot */ 621 - mac-address = [ 00 00 00 00 00 00 ]; 622 - phys = <&phy_gmii_sel 1>; 596 + mac: ethernet@0 { 597 + compatible = "ti,cpsw"; 598 + clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>; 599 + clock-names = "fck", "cpts"; 600 + cpdma_channels = <8>; 601 + ale_entries = <1024>; 602 + bd_ram_size = <0x2000>; 603 + mac_control = <0x20>; 604 + slaves = <2>; 605 + active_slave = <0>; 606 + cpts_clock_mult = <0x80000000>; 607 + cpts_clock_shift = <29>; 608 + reg = <0 0x800>, 609 + <0x900 0x100>; 610 + #address-cells = <1>; 611 + #size-cells = <1>; 612 + /* 613 + * c0_rx_thresh_pend 614 + * c0_rx_pend 615 + * c0_tx_pend 616 + * c0_misc_pend 617 + */ 618 + interrupts = <40 41 42 43>; 619 + ranges = <0 0 0x8000>; 620 + syscon = <&scm_conf>; 623 621 624 - }; 622 + davinci_mdio: mdio@800 { 623 + compatible = "ti,cpsw-mdio", "ti,davinci_mdio"; 624 + clocks = <&alwon_ethernet_clkctrl DM814_ETHERNET_CPGMAC0_CLKCTRL 0>; 625 + clock-names = "fck"; 626 + #address-cells = <1>; 627 + #size-cells = <0>; 628 + bus_freq = <1000000>; 629 + reg = <0x800 0x100>; 630 + }; 625 631 626 - cpsw_emac1: slave@4a100300 { 627 - /* Filled in by U-Boot */ 628 - mac-address = [ 00 00 00 00 00 00 ]; 629 - phys = <&phy_gmii_sel 2>; 632 + cpsw_emac0: slave@200 { 633 + /* Filled in by U-Boot */ 634 + mac-address = [ 00 00 00 00 00 00 ]; 635 + phys = <&phy_gmii_sel 1>; 636 + }; 637 + 638 + cpsw_emac1: slave@300 { 639 + /* Filled in by U-Boot */ 640 + mac-address = [ 00 00 00 00 00 00 ]; 641 + phys = <&phy_gmii_sel 2>; 642 + }; 643 + }; 630 644 }; 631 645 }; 632 646
+3 -3
arch/arm/boot/dts/dra62x.dtsi
··· 12 12 13 13 /* Compared to dm814x, dra62x has different offsets for Ethernet */ 14 14 &mac { 15 - reg = <0x4a100000 0x800 16 - 0x4a101200 0x100>; 15 + reg = <0 0x800>, 16 + <0x1200 0x100>; 17 17 }; 18 18 19 19 &davinci_mdio { 20 - reg = <0x4a101000 0x100>; 20 + reg = <0x1000 0x100>; 21 21 }; 22 22 23 23 #include "dra62x-clocks.dtsi"