From 2d3542e1c9d3267285fbf8048ab35ad6c3f95155 Mon Sep 17 00:00:00 2001 From: Stanislav Galabov Date: Fri, 24 Jun 2016 11:43:17 +0200 Subject: ramips: DTS rework Add node aliases to dtsi files. Reword dts files so they're more in-line with upstream. Fix some more warnings and errors reported by dtc Signed-off-by: Stanislav Galabov --- target/linux/ramips/dts/mt7628an.dtsi | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'target/linux/ramips/dts/mt7628an.dtsi') diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi index 98496e325d..b242e48d21 100644 --- a/target/linux/ramips/dts/mt7628an.dtsi +++ b/target/linux/ramips/dts/mt7628an.dtsi @@ -24,7 +24,7 @@ compatible = "mti,cpu-interrupt-controller"; }; - palmbus@10000000 { + palmbus: palmbus@10000000 { compatible = "palmbus"; reg = <0x10000000 0x200000>; ranges = <0x0 0x10000000 0x1FFFFF>; @@ -32,12 +32,12 @@ #address-cells = <1>; #size-cells = <1>; - sysc@0 { + sysc: sysc@0 { compatible = "ralink,mt7620a-sysc"; reg = <0x0 0x100>; }; - watchdog@120 { + watchdog: watchdog@120 { compatible = "ralink,mt7628an-wdt", "mtk,mt7621-wdt"; reg = <0x120 0x10>; @@ -66,7 +66,7 @@ 0x80 0x78>; }; - memc@300 { + memc: memc@300 { compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc"; reg = <0x300 0x100>; @@ -109,7 +109,7 @@ }; }; - i2c@900 { + i2c: i2c@900 { compatible = "mediatek,mt7628-i2c"; reg = <0x900 0x100>; @@ -125,7 +125,7 @@ pinctrl-0 = <&i2c_pins>; }; - i2s@a00 { + i2s: i2s@a00 { compatible = "ralink,mt7620a-i2s"; reg = <0xa00 0x100>; @@ -142,7 +142,7 @@ status = "disabled"; }; - spi@b00 { + spi0: spi@b00 { compatible = "ralink,mt7621-spi"; reg = <0xb00 0x100>; @@ -176,7 +176,7 @@ pinctrl-0 = <&uart0_pins>; }; - uart1@d00 { + uart1: uart1@d00 { compatible = "ns16550a"; reg = <0xd00 0x100>; @@ -216,7 +216,7 @@ status = "disabled"; }; - pwm@5000 { + pwm: pwm@5000 { compatible = "mediatek,mt7628-pwm"; reg = <0x5000 0x1000>; @@ -229,7 +229,7 @@ status = "disabled"; }; - pcm@2000 { + pcm: pcm@2000 { compatible = "ralink,mt7620a-pcm"; reg = <0x2000 0x800>; @@ -260,7 +260,7 @@ }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; pinctrl-0 = <&state_default>; @@ -353,7 +353,7 @@ reset-names = "host", "device"; }; - sdhci@10130000 { + sdhci: sdhci@10130000 { compatible = "ralink,mt7620-sdhci"; reg = <0x10130000 0x4000>; @@ -366,7 +366,7 @@ status = "disabled"; }; - ehci@101c0000 { + ehci: ehci@101c0000 { compatible = "generic-ehci"; reg = <0x101c0000 0x1000>; @@ -377,7 +377,7 @@ interrupts = <18>; }; - ohci@101c1000 { + ohci: ohci@101c1000 { compatible = "generic-ohci"; reg = <0x101c1000 0x1000>; @@ -388,7 +388,7 @@ interrupts = <18>; }; - ethernet@10100000 { + ethernet: ethernet@10100000 { compatible = "ralink,rt5350-eth"; reg = <0x10100000 0x10000>; @@ -412,7 +412,7 @@ interrupts = <17>; }; - pcie@10140000 { + pcie: pcie@10140000 { compatible = "mediatek,mt7620-pci"; reg = <0x10140000 0x100 0x10142000 0x100>; -- cgit v1.2.3 From 2bf6b1e78aefa796e73928d5072c356f1b74c290 Mon Sep 17 00:00:00 2001 From: Stanislav Galabov Date: Fri, 24 Jun 2016 11:44:26 +0200 Subject: ramips: DTS modifications This commit makes the following modifications to ramips dts files: 1. Add clkctrl node to all dtsi files (although not used for now) 2. Add clocks and clock-names properties to some nodes (usbphy, pci) 3. Add usbphy node for rt3050 (although not used for now) 4. Add clock-frequency to uart nodes in mt7621.dtsi and mt7628an.dtsi These modifications, although not fully used at the moment, will make it easier for FreeBSD to adopt and use LEDE ramips dts files with minimal changes for easier maintenance. Signed-off-by: Stanislav Galabov --- target/linux/ramips/dts/mt7628an.dtsi | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'target/linux/ramips/dts/mt7628an.dtsi') diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi index b242e48d21..6b8b1b73d0 100644 --- a/target/linux/ramips/dts/mt7628an.dtsi +++ b/target/linux/ramips/dts/mt7628an.dtsi @@ -166,6 +166,8 @@ reg-io-width = <4>; no-loopback-test; + clock-frequency = <40000000>; + resets = <&rstctrl 12>; reset-names = "uartl"; @@ -184,6 +186,8 @@ reg-io-width = <4>; no-loopback-test; + clock-frequency = <40000000>; + resets = <&rstctrl 19>; reset-names = "uart1"; @@ -204,6 +208,8 @@ reg-io-width = <4>; no-loopback-test; + clock-frequency = <40000000>; + resets = <&rstctrl 20>; reset-names = "uart2"; @@ -344,6 +350,11 @@ #reset-cells = <1>; }; + clkctrl: clkctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + usbphy: usbphy@10120000 { compatible = "ralink,mt7628an-usbphy", "mediatek,mt7620-usbphy"; reg = <0x10120000 0x4000>; @@ -351,6 +362,8 @@ resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; + clocks = <&clkctrl 22 &clkctrl 25>; + clock-names = "host", "device"; }; sdhci: sdhci@10130000 { @@ -420,12 +433,14 @@ #address-cells = <3>; #size-cells = <2>; - resets = <&rstctrl 26>; - reset-names = "pcie0"; - interrupt-parent = <&cpuintc>; interrupts = <4>; + resets = <&rstctrl 26 &rstctrl 27>; + reset-names = "pcie0", "pcie1"; + clocks = <&clkctrl 26 &clkctrl 27>; + clock-names = "pcie0", "pcie1"; + status = "disabled"; device_type = "pci"; -- cgit v1.2.3 From fa132c2a36cc267a4b3681729ddeb04aaa7d0cc1 Mon Sep 17 00:00:00 2001 From: Stanislav Galabov Date: Fri, 24 Jun 2016 12:59:10 +0200 Subject: ramips: Add specific compatible properties for esw Currently, for RT5350 and MT7628, esw is marked as compatible with "ralink,rt3050-esw". While this is true, the switches within RT5350 and MT7628 actually support more functionality than the RT3050 switch. One such example is per-VLAN untagging, which is an important feature. RT3352 is another example of this, but it already has an additional compatible property, which allows to differentiate it from RT3050. This commit adds such more specific properties for RT5350 and MT7628 as well. Signed-off-by: Stanislav Galabov --- target/linux/ramips/dts/mt7628an.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/linux/ramips/dts/mt7628an.dtsi') diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi index 6b8b1b73d0..0b16a9f60d 100644 --- a/target/linux/ramips/dts/mt7628an.dtsi +++ b/target/linux/ramips/dts/mt7628an.dtsi @@ -415,7 +415,7 @@ }; esw: esw@10110000 { - compatible = "ralink,rt3050-esw"; + compatible = "mediatek,mt7628-esw", "ralink,rt3050-esw"; reg = <0x10110000 0x8000>; resets = <&rstctrl 23>; -- cgit v1.2.3 From 963cf40f88f8a9af542549dbab1e11249225a0cf Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Fri, 24 Jun 2016 13:07:05 +0200 Subject: ramips: add gdma hsdma dts info Signed-off-by: Michael Lee --- target/linux/ramips/dts/mt7628an.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/linux/ramips/dts/mt7628an.dtsi') diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi index 0b16a9f60d..6d5ed95e49 100644 --- a/target/linux/ramips/dts/mt7628an.dtsi +++ b/target/linux/ramips/dts/mt7628an.dtsi @@ -249,7 +249,7 @@ }; gdma: gdma@2800 { - compatible = "ralink,mt7620a-gdma", "ralink,rt2880-gdma"; + compatible = "ralink,rt3883-gdma"; reg = <0x2800 0x800>; resets = <&rstctrl 14>; -- cgit v1.2.3