diff options
author | Zoltan Herpai <wigyori@uid0.hu> | 2016-06-24 20:17:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-24 20:17:26 +0200 |
commit | 6eb05f9f38210bfd7cb667fab1b00e5ebd737556 (patch) | |
tree | 8adb7f0946f1c0f2fba4cc28999d915b167af464 /target/linux/ramips | |
parent | 282b917e47d9ae5017e1e426face9b75cb7aabd0 (diff) | |
parent | 64de7165e5bce0d6f811795bc5a0a81165eb58ca (diff) | |
download | master-187ad058-6eb05f9f38210bfd7cb667fab1b00e5ebd737556.tar.gz master-187ad058-6eb05f9f38210bfd7cb667fab1b00e5ebd737556.tar.bz2 master-187ad058-6eb05f9f38210bfd7cb667fab1b00e5ebd737556.zip |
Merge pull request #12 from wigyori/master
update oxnas target, update ipq806x target, create trunk tag and update revisioning accordingly
Diffstat (limited to 'target/linux/ramips')
268 files changed, 13385 insertions, 11318 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 47e1e6a6a3..460253c9ff 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -46,6 +46,7 @@ all0239-3g|\ hw550-3g|\ mofi3500-3gn|\ sap-g3200u3|\ +sk-wb8|\ wf-2881) set_usb_led "$board:green:usb" ;; @@ -77,6 +78,13 @@ broadway) set_usb_led "$board:red:diskmounted" set_wifi_led "$board:red:wps_active" ;; +c50) + ucidef_set_led_default "power" "power" "tp-link:blue:power" "0" + ucidef_set_led_netdev "lan" "lan" "tp-link:blue:lan" "eth0.2" + set_usb_led "tp-link:blue:usb" + ucidef_set_led_wlan "wlan2g" "wlan2g" "tp-link:blue:wlan2g" "phy1radio" + ucidef_set_led_wlan "wlan5g" "wlan5g" "tp-link:blue:wlan5g" "phy0radio" + ;; cf-wr800n) ucidef_set_led_netdev "lan" "lan" "$board:white:ethernet" eth0.1 set_wifi_led "$board:white:wifi" @@ -185,7 +193,8 @@ miniembplug) set_wifi_led "$board:red:wlan" set_usb_led "$board:green:mobile" ;; -miwifi-mini) +miwifi-mini|\ +miwifi-nano) ucidef_set_led_default "power" "power" "$board:red:status" "1" ;; miwifi-nano) @@ -287,6 +296,11 @@ y1s) set_usb_led "$board:blue:usb" set_wifi_led "$board:blue:wifi" ;; +zbt-ape522ii) + ucidef_set_led_netdev "wlan2g4" "wlan1-link" "$board:green:wlan2g4" "wlan1" + ucidef_set_led_netdev "sys1" "wlan1" "$board:green:sys1" "wlan1" "tx rx" + ucidef_set_led_netdev "sys2" "wlan0" "$board:green:sys2" "wlan0" "tx rx" + ;; zbt-wa05) ucidef_set_led_default "power" "power" "$board:blue:power" "1" set_wifi_led "$board:blue:air" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index e7826d48b0..dbb5fb43e0 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -47,8 +47,10 @@ ramips_setup_interfaces() linkits7688d | \ m2m|\ microwrt|\ + mpr-a2|\ ncs601w|\ w150m|\ + widora-neo|\ wnce2001|\ zte-q7) ucidef_add_switch "switch0" @@ -79,6 +81,7 @@ ramips_setup_interfaces() pbr-m1|\ psg1208|\ sap-g3200u3|\ + sk-wb8|\ wf-2881|\ whr-300hp2|\ whr-600d|\ @@ -110,6 +113,7 @@ ramips_setup_interfaces() atp-52b|\ awm002-evb|\ awm003-evb|\ + c50|\ dir-645|\ dir-860l-b1|\ f5d8235-v1|\ @@ -169,6 +173,10 @@ ramips_setup_interfaces() wrh-300cr) ucidef_set_interface_lan "eth0" ;; + duzun-dm06) + ucidef_add_switch "switch0" \ + "1:lan" "0:wan" "6@eth0" + ;; e1700|\ mt7620a_mt7530) ucidef_add_switch "switch1" \ @@ -216,6 +224,7 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "0:wan" "6@eth0" ;; + zbt-ape522ii|\ zbt-we826|\ zbt-wr8305rt) ucidef_add_switch "switch0" \ @@ -260,7 +269,6 @@ ramips_setup_macs() freestation5|\ hlk-rm04|\ mpr-a1|\ - mpr-a2|\ psr-680w|\ sl-r7205|\ y1|\ @@ -307,6 +315,9 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(mtd_get_mac_binary factory 32772) ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; tew-691gr) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index c638d16a81..0c5abb2861 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -79,9 +79,13 @@ get_status_led() { ;; awapn2403|\ dir-645|\ + sk-wb8|\ wrh-300cr) status_led="$board:green:wps" ;; + c50) + status_led="tp-link:blue:power" + ;; cf-wr800n|\ psg1208) status_led="$board:white:wps" @@ -144,7 +148,8 @@ get_status_led() { status_led="$board:amber:cpu" ;; oy-0001|\ - sl-r7205) + sl-r7205|\ + zbt-we826) status_led="$board:green:wifi" ;; psr-680w) @@ -154,7 +159,8 @@ get_status_led() { re6500|\ whr-1166d|\ whr-300hp2|\ - whr-600d) + whr-600d|\ + widora-neo) status_led="$board:orange:wifi" ;; mzk-ex300np|\ @@ -191,7 +197,7 @@ get_status_led() { ;; wsr-1166|\ wsr-600) - status_led="$board:orange:diag" + status_led="$board:green:power" ;; wrtnode2r | \ wrtnode2p | \ diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount new file mode 100755 index 0000000000..b93e3c96f1 --- /dev/null +++ b/target/linux/ramips/base-files/etc/init.d/bootcount @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +. /lib/ramips.sh + +START=99 + +start() { + local board=$(ramips_board_name) + if [ $board = "sk-wb8" ]; then + fw_setenv bootcount 0 + fi +} diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 0ac0f68bb5..10139d7fc6 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -82,6 +82,9 @@ ramips_board_detect() { *"C20i") name="c20i" ;; + *"C50") + name="c50" + ;; *"Carambola") name="carambola" ;; @@ -151,6 +154,9 @@ ramips_board_detect() { *"Dovado Tiny AC") name="tiny-ac" ;; + *"DuZun DM06") + name="duzun-dm06" + ;; *"E1700") name="e1700" ;; @@ -376,6 +382,9 @@ ramips_board_detect() { *"RUT5XX") name="rut5xx" ;; + *"SamKnows Whitebox 8") + name="sk-wb8" + ;; *"SAP-G3200U3") name="sap-g3200u3" ;; @@ -433,6 +442,9 @@ ramips_board_detect() { *"WHR-G300N") name="whr-g300n" ;; + *"Widora-NEO") + name="widora-neo" + ;; *"WiTi") name="witi" ;; @@ -511,6 +523,9 @@ ramips_board_detect() { *"Y1S") name="y1s" ;; + *"ZBT-APE522II") + name="zbt-ape522ii" + ;; *"ZBT-WA05") name="zbt-wa05" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 86ea4a33bd..e3bea004fa 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -50,6 +50,7 @@ platform_check_image() { dir-620-a1|\ dir-620-d1|\ dir-810l|\ + duzun-dm06|\ e1700|\ esr-9753|\ ex2700|\ @@ -112,6 +113,7 @@ platform_check_image() { rt-n56u|\ rut5xx|\ sap-g3200u3|\ + sk-wb8|\ sl-r7205|\ tew-691gr|\ tew-692gr|\ @@ -128,6 +130,7 @@ platform_check_image() { whr-300hp2|\ whr-600d|\ whr-g300n|\ + widora-neo|\ witi|\ wizfi630a|\ wl-330n|\ @@ -152,6 +155,7 @@ platform_check_image() { x8|\ y1|\ y1s|\ + zbt-ape522ii|\ zbt-wa05|\ zbt-we826|\ zbt-wg2626|\ @@ -179,7 +183,8 @@ platform_check_image() { } return 0 ;; - c20i) + c20i|\ + c50) [ "$magic" != "03000000" ] && { echo "Invalid image type." return 1 diff --git a/target/linux/ramips/dts/3G-6200N.dts b/target/linux/ramips/dts/3G-6200N.dts index e5fa901330..cd2ba51d1a 100644 --- a/target/linux/ramips/dts/3G-6200N.dts +++ b/target/linux/ramips/dts/3G-6200N.dts @@ -6,15 +6,6 @@ compatible = "3G-6200N", "ralink,rt3050-soc"; model = "Edimax 3g-6200n"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -53,18 +44,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -102,8 +81,29 @@ linux,code = <0x100>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/3G-6200NL.dts b/target/linux/ramips/dts/3G-6200NL.dts index 39f7f5d338..5ae43b81cb 100644 --- a/target/linux/ramips/dts/3G-6200NL.dts +++ b/target/linux/ramips/dts/3G-6200NL.dts @@ -6,15 +6,6 @@ compatible = "3G-6200NL", "ralink,rt3050-soc"; model = "Edimax 3g-6200nl"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -53,18 +44,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -86,8 +65,29 @@ linux,code = <0x211>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/3G150B.dts b/target/linux/ramips/dts/3G150B.dts index 66f3e0d100..3d348ff0f3 100644 --- a/target/linux/ramips/dts/3G150B.dts +++ b/target/linux/ramips/dts/3G150B.dts @@ -6,78 +6,6 @@ compatible = "3G150B", "ralink,rt5350-soc"; model = "Tenda 3G150B"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - - gpio1: gpio@660 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf", "led"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - ralink,led-polarity = <1>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -116,3 +44,73 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf", "led"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; + ralink,led-polarity = <1>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/3G300M.dts b/target/linux/ramips/dts/3G300M.dts index 87badf82a3..df770d83d5 100644 --- a/target/linux/ramips/dts/3G300M.dts +++ b/target/linux/ramips/dts/3G300M.dts @@ -6,53 +6,6 @@ compatible = "3G300M", "ralink,rt3052-soc"; model = "Tenda 3G300M"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -105,20 +58,65 @@ linux,code = <0x100>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; +&spi0 { + status = "okay"; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/A5-V11.dts b/target/linux/ramips/dts/A5-V11.dts index 198acbaaa2..51eb005874 100644 --- a/target/linux/ramips/dts/A5-V11.dts +++ b/target/linux/ramips/dts/A5-V11.dts @@ -6,78 +6,6 @@ compatible = "A5-V11", "ralink,rt5350-soc"; model = "A5-V11"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "pm25lq032"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - - gpio1: gpio@660 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf", "led"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x1>; - mediatek,portdisable = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -122,3 +50,73 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "pm25lq032"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf", "led"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x1>; + mediatek,portdisable = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/AI-BR100.dts b/target/linux/ramips/dts/AI-BR100.dts index d53c8d2277..2c3293331a 100644 --- a/target/linux/ramips/dts/AI-BR100.dts +++ b/target/linux/ramips/dts/AI-BR100.dts @@ -6,80 +6,6 @@ compatible = "AI-BR100", "ralink,mt7620a-soc"; model = "Aigale Ai-BR100"; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x20000>; - read-only; - }; - - partition@20000 { - label = "u-boot-env"; - reg = <0x20000 0x10000>; - read-only; - }; - - factory: partition@30000 { - label = "factory"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "firmware"; - reg = <0x40000 0x7c0000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -107,3 +33,75 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label = "u-boot-env"; + reg = <0x20000 0x10000>; + read-only; + }; + + factory: partition@30000 { + label = "factory"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "firmware"; + reg = <0x40000 0x7c0000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/AIR3GII.dts b/target/linux/ramips/dts/AIR3GII.dts index e89909ee2d..2b08895b49 100644 --- a/target/linux/ramips/dts/AIR3GII.dts +++ b/target/linux/ramips/dts/AIR3GII.dts @@ -6,69 +6,6 @@ compatible = "AIR3GII", "ralink,rt5350-soc"; model = "AirLive Air3GII"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q32b"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -96,3 +33,64 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q32b"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/ALL0239-3G.dts b/target/linux/ramips/dts/ALL0239-3G.dts index 8a4ccc8ca5..d1d92e168c 100644 --- a/target/linux/ramips/dts/ALL0239-3G.dts +++ b/target/linux/ramips/dts/ALL0239-3G.dts @@ -6,14 +6,6 @@ compatible = "ALL0239-3G", "ralink,rt3052-soc"; model = "Allnet ALL0239-3G"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; cfi@1f000000 { compatible = "cfi-flash"; @@ -47,19 +39,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - status = "okay"; - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -108,8 +87,30 @@ linux,code = <0x211>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + status = "okay"; + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/ALL0256N-4M.dts b/target/linux/ramips/dts/ALL0256N-4M.dts index fe677a9d6d..1cfaed67bb 100644 --- a/target/linux/ramips/dts/ALL0256N-4M.dts +++ b/target/linux/ramips/dts/ALL0256N-4M.dts @@ -6,69 +6,6 @@ compatible = "ALL0256N", "ralink,rt3050-soc"; model = "Allnet ALL0256N"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3c8000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -101,3 +38,64 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3c8000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/ALL0256N-8M.dts b/target/linux/ramips/dts/ALL0256N-8M.dts index 0d75abd725..074273d608 100644 --- a/target/linux/ramips/dts/ALL0256N-8M.dts +++ b/target/linux/ramips/dts/ALL0256N-8M.dts @@ -6,69 +6,6 @@ compatible = "ALL0256N", "ralink,rt3050-soc"; model = "Allnet ALL0256N"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -101,3 +38,64 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/ALL5002.dts b/target/linux/ramips/dts/ALL5002.dts index 72aa789eca..14bbdcdf12 100644 --- a/target/linux/ramips/dts/ALL5002.dts +++ b/target/linux/ramips/dts/ALL5002.dts @@ -6,77 +6,6 @@ compatible = "ALL5002", "ralink,rt3352-soc"; model = "Allnet ALL5002"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l25635e"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x1fb0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - i2c-gpio { compatible = "i2c-gpio"; gpios = <&gpio0 1 0 &gpio0 2 0>; @@ -109,3 +38,72 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l25635e"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/ALL5003.dts b/target/linux/ramips/dts/ALL5003.dts index 806eb26805..432dd516ff 100644 --- a/target/linux/ramips/dts/ALL5003.dts +++ b/target/linux/ramips/dts/ALL5003.dts @@ -6,77 +6,6 @@ compatible = "ALL5003", "ralink,rt5350-soc"; model = "Allnet ALL5003"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l25635e"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x1fb0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - i2c-gpio { compatible = "i2c-gpio"; gpios = <&gpio0 1 0 &gpio0 2 0>; @@ -109,3 +38,72 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l25635e"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/AR670W.dts b/target/linux/ramips/dts/AR670W.dts index 5fefc81aff..c1eac43881 100644 --- a/target/linux/ramips/dts/AR670W.dts +++ b/target/linux/ramips/dts/AR670W.dts @@ -6,45 +6,6 @@ compatible = "AR670W", "ralink,rt2880-soc"; model = "Airlink101 AR670W"; - palmbus@300000 { - gpio0: gpio@600 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi", "uartlite"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@400000 { - status = "okay"; - mtd-mac-address = <&factory 0x2004>; - - port@0 { - phy-handle = <&phy0>; - phy-mode = "mii"; - }; - - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@0 { - phy-mode = "mii"; - reg = <0>; - }; - }; - }; - - wmac@480000 { - status = "okay"; - ralink,mtd-eeprom = <&factory 0x2000>; - }; - cfi@bdc00000 { compatible = "cfi-flash"; reg = <0xbc400000 0x800000>; @@ -103,3 +64,40 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi", "uartlite"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x2004>; + + port@0 { + phy-handle = <&phy0>; + phy-mode = "mii"; + }; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@0 { + phy-mode = "mii"; + reg = <0>; + }; + }; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0x2000>; +}; diff --git a/target/linux/ramips/dts/AR725W.dts b/target/linux/ramips/dts/AR725W.dts index 3c5e0f573d..3b8cfb3be7 100644 --- a/target/linux/ramips/dts/AR725W.dts +++ b/target/linux/ramips/dts/AR725W.dts @@ -6,45 +6,6 @@ compatible = "AR725W", "ralink,rt2880-soc"; model = "Airlink101 AR725W"; - palmbus@300000 { - gpio0: gpio@600 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi", "uartlite"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@400000 { - status = "okay"; - mtd-mac-address = <&factory 0x4>; - - port@0 { - phy-handle = <&phy0>; - phy-mode = "mii"; - }; - - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@0 { - phy-mode = "mii"; - reg = <0>; - }; - }; - }; - - wmac@480000 { - status = "okay"; - ralink,mtd-eeprom = <&factory 0>; - }; - cfi@bdc00000 { compatible = "cfi-flash"; reg = <0xbc400000 0x800000>; @@ -113,3 +74,40 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi", "uartlite"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x4>; + + port@0 { + phy-handle = <&phy0>; + phy-mode = "mii"; + }; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@0 { + phy-mode = "mii"; + reg = <0>; + }; + }; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/ASL26555-16M.dts b/target/linux/ramips/dts/ASL26555-16M.dts index 3c6c667b52..56f3c9d99c 100644 --- a/target/linux/ramips/dts/ASL26555-16M.dts +++ b/target/linux/ramips/dts/ASL26555-16M.dts @@ -6,91 +6,6 @@ compatible = "ASL26555", "ralink,rt3050-soc"; model = "Alpha ASL26555"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25sl12801"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "uboot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "uboot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xf80000>; - }; - - partition@fd0000 { - label = "cert"; - reg = <0xfd0000 0x10000>; - read-only; - }; - - partition@fe0000 { - label = "langpack"; - reg = <0xfe0000 0x10000>; - read-only; - }; - - devdata: partition@ff0000 { - label = "devdata"; - reg = <0xff0000 0x10000>; - read-only; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&devdata 0x4004>; - }; - - esw@10110000 { - mediatek,portmap = <0x1e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&devdata 0x4000>; - }; - - otg@101c0000 { - status = "okay"; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -154,3 +69,86 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25sl12801"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "uboot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "uboot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@fd0000 { + label = "cert"; + reg = <0xfd0000 0x10000>; + read-only; + }; + + partition@fe0000 { + label = "langpack"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + devdata: partition@ff0000 { + label = "devdata"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&devdata 0x4004>; +}; + +&esw { + mediatek,portmap = <0x1e>; +}; + +&wmac { + ralink,mtd-eeprom = <&devdata 0x4000>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/ASL26555-8M.dts b/target/linux/ramips/dts/ASL26555-8M.dts index 0860c5ed77..0dbc1dd337 100644 --- a/target/linux/ramips/dts/ASL26555-8M.dts +++ b/target/linux/ramips/dts/ASL26555-8M.dts @@ -6,85 +6,6 @@ compatible = "ASL26555", "ralink,rt3050-soc"; model = "Alpha ASL26555"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25sl064p"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "uboot"; - reg = <0x0 0x30000>; - read-only; - }; - - ubootenv: partition@30000 { - label = "uboot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "rgdb"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x790000>; - }; - - partition@7e0000 { - label = "cert"; - reg = <0x7e0000 0x10000>; - read-only; - }; - - partition@7f0000 { - label = "langpack"; - reg = <0x7f0000 0x10000>; - read-only; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&ubootenv 0x4004>; - }; - - esw@10110000 { - mediatek,portmap = <0x1e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&ubootenv 0x4000>; - }; - - otg@101c0000 { - status = "okay"; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -148,3 +69,80 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25sl064p"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "uboot"; + reg = <0x0 0x30000>; + read-only; + }; + + ubootenv: partition@30000 { + label = "uboot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "rgdb"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x790000>; + }; + + partition@7e0000 { + label = "cert"; + reg = <0x7e0000 0x10000>; + read-only; + }; + + partition@7f0000 { + label = "langpack"; + reg = <0x7f0000 0x10000>; + read-only; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&ubootenv 0x4004>; +}; + +&esw { + mediatek,portmap = <0x1e>; +}; + +&wmac { + ralink,mtd-eeprom = <&ubootenv 0x4000>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/ATP-52B.dts b/target/linux/ramips/dts/ATP-52B.dts index f0a53a11a9..c15d3a4645 100644 --- a/target/linux/ramips/dts/ATP-52B.dts +++ b/target/linux/ramips/dts/ATP-52B.dts @@ -6,15 +6,6 @@ compatible = "ATP-52B", "ralink,rt3052-soc"; model = "Argus ATP-52B"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -77,20 +68,30 @@ linux,code = <0x198>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - otg@101c0000 { - status = "okay"; - }; +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/AWAPN2403.dts b/target/linux/ramips/dts/AWAPN2403.dts index 7a5f73392a..7babe42d56 100644 --- a/target/linux/ramips/dts/AWAPN2403.dts +++ b/target/linux/ramips/dts/AWAPN2403.dts @@ -6,61 +6,6 @@ compatible = "AWAPN2403", "ralink,rt3052-soc"; model = "AsiaRF AWAPN2403"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -83,3 +28,56 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/AWM002-4M.dtsi b/target/linux/ramips/dts/AWM002-4M.dtsi index 4c9f57cf3d..69d25bb5d4 100644 --- a/target/linux/ramips/dts/AWM002-4M.dtsi +++ b/target/linux/ramips/dts/AWM002-4M.dtsi @@ -3,13 +3,9 @@ / { compatible = "AWM002", "ralink,rt5350-soc"; model = "AsiaRF AWM002"; +}; - palmbus@10000000 { - spi@b00 { - m25p80@0 { - compatible = "jedec,spi-nor"; - linux,modalias = "m25p80", "mx25l3205d"; - }; - }; - }; +&m25p80 { + compatible = "jedec,spi-nor"; + linux,modalias = "m25p80", "mx25l3205d"; }; diff --git a/target/linux/ramips/dts/AWM002-8M.dtsi b/target/linux/ramips/dts/AWM002-8M.dtsi index 9fb35c105a..1e6970ddec 100644 --- a/target/linux/ramips/dts/AWM002-8M.dtsi +++ b/target/linux/ramips/dts/AWM002-8M.dtsi @@ -3,13 +3,9 @@ / { compatible = "AWM002", "ralink,rt5350-soc"; model = "AsiaRF AWM002"; +}; - palmbus@10000000 { - spi@b00 { - m25p80@0 { - compatible = "jedec,spi-nor"; - linux,modalias = "m25p80", "mx25l6405d"; - }; - }; - }; +&m25p80 { + compatible = "jedec,spi-nor"; + linux,modalias = "m25p80", "mx25l6405d"; }; diff --git a/target/linux/ramips/dts/AWM002-EVB-4M.dts b/target/linux/ramips/dts/AWM002-EVB-4M.dts index ef2f83c778..e125232557 100644 --- a/target/linux/ramips/dts/AWM002-EVB-4M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-4M.dts @@ -5,14 +5,6 @@ / { model = "AsiaRF AWM002 EVB"; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -51,3 +43,11 @@ }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/AWM002-EVB-8M.dts b/target/linux/ramips/dts/AWM002-EVB-8M.dts index 563090ec0e..f2f91bb3d9 100644 --- a/target/linux/ramips/dts/AWM002-EVB-8M.dts +++ b/target/linux/ramips/dts/AWM002-EVB-8M.dts @@ -5,14 +5,6 @@ / { model = "AsiaRF AWM002 EVB"; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -51,3 +43,11 @@ }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/AWM002.dtsi b/target/linux/ramips/dts/AWM002.dtsi index 3e57b724a1..9ff64917ea 100644 --- a/target/linux/ramips/dts/AWM002.dtsi +++ b/target/linux/ramips/dts/AWM002.dtsi @@ -4,75 +4,73 @@ compatible = "AWM002", "ralink,rt5350-soc"; model = "AsiaRF AWM002"; - palmbus@10000000 { - spi@b00 { - status = "okay"; + gpio-leds { + compatible = "gpio-leds"; - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - reg = <0 0>; - compatible = "jedec,spi-nor"; - spi-max-frequency = <10000000>; + ld1 { + label = "awm002:green:ld1"; + gpios = <&gpio0 0 1>; + }; - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; + ld2 { + label = "awm002:green:ld2"; + gpios = <&gpio0 1 1>; + }; + }; +}; - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; +&spi0 { + status = "okay"; - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; + m25p80: m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <10000000>; - partition@50000 { - label = "firmware"; - reg = <0x50000 0x1fb0000>; - }; - }; + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; }; - }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag"; - ralink,function = "gpio"; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; }; - }; - esw@10110000 { - mediatek,portmap = <0x3f>; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - ehci@101c0000 { - status = "okay"; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; }; +}; - ohci@101c1000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag"; + ralink,function = "gpio"; + }; }; +}; - gpio-leds { - compatible = "gpio-leds"; +&esw { + mediatek,portmap = <0x3f>; +}; - ld1 { - label = "awm002:green:ld1"; - gpios = <&gpio0 0 1>; - }; +&ehci { + status = "okay"; +}; - ld2 { - label = "awm002:green:ld2"; - gpios = <&gpio0 1 1>; - }; - }; +&ohci { + status = "okay"; }; diff --git a/target/linux/ramips/dts/AWM003-EVB.dts b/target/linux/ramips/dts/AWM003-EVB.dts index 02fa97255c..13e6964ccc 100644 --- a/target/linux/ramips/dts/AWM003-EVB.dts +++ b/target/linux/ramips/dts/AWM003-EVB.dts @@ -11,23 +11,6 @@ reg = <0x0 0x4000000>; }; - palmbus@10000000 { - spi@b00 { - m25p80@0 { - compatible = "jedec,spi-nor"; - linux,modalias = "m25p80", "mx25l6405d"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -66,3 +49,16 @@ }; }; }; + +&m25p80 { + compatible = "jedec,spi-nor"; + linux,modalias = "m25p80", "mx25l6405d"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/ArcherC20i.dts b/target/linux/ramips/dts/ArcherC20i.dts index 7d830b3182..e7a7b07346 100644 --- a/target/linux/ramips/dts/ArcherC20i.dts +++ b/target/linux/ramips/dts/ArcherC20i.dts @@ -10,109 +10,107 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; + gpio-leds { + compatible = "gpio-leds"; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + }; +}; + +&gpio2 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label = "firmware"; + reg = <0x20000 0x7a0000>; }; - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x20000>; - read-only; - }; - - partition@20000 { - label = "firmware"; - reg = <0x20000 0x7a0000>; - }; - - partition@7c0000 { - label = "config"; - reg = <0x7c0000 0x10000>; - }; - - rom: partition@7d0000 { - label = "rom"; - reg = <0x7d0000 0x10000>; - }; - - partition@7e0000 { - label = "romfile"; - reg = <0x7e0000 0x10000>; - }; - - radio: partition@7f0000 { - label = "radio"; - reg = <0x7f0000 0x10000>; - }; - }; + partition@7c0000 { + label = "config"; + reg = <0x7c0000 0x10000>; + }; + + rom: partition@7d0000 { + label = "rom"; + reg = <0x7d0000 0x10000>; + }; + + partition@7e0000 { + label = "romfile"; + reg = <0x7e0000 0x10000>; + }; + + radio: partition@7f0000 { + label = "radio"; + reg = <0x7f0000 0x10000>; }; }; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd"; + ralink,function = "gpio"; }; }; +}; - ethernet@10100000 { +ðernet { pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; mtd-mac-address = <&rom 0xf100>; mediatek,portmap = "wllll"; }; - ehci@101c0000 { - status = "okay"; - }; +&ehci { + status = "okay"; +}; - ohci@101c1000 { - status = "okay"; - }; +&ohci { + status = "okay"; +}; - gsw@10110000 { - mediatek,port4 = "ephy"; - }; +&gsw { + mediatek,port4 = "ephy"; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&radio 0>; - }; +&wmac { + ralink,mtd-eeprom = <&radio 0>; +}; - pcie@10140000 { - status = "okay"; +&pcie { + status = "okay"; - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&radio 32768>; - mediatek,2ghz = <0>; - }; + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&radio 32768>; + mediatek,2ghz = <0>; }; }; - - gpio-leds { - compatible = "gpio-leds"; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - }; }; diff --git a/target/linux/ramips/dts/ArcherC50.dts b/target/linux/ramips/dts/ArcherC50.dts new file mode 100644 index 0000000000..4fc8ff481d --- /dev/null +++ b/target/linux/ramips/dts/ArcherC50.dts @@ -0,0 +1,156 @@ +/dts-v1/; + +#include "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "TP-Link Archer C50"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + gpio-leds { + compatible = "gpio-leds"; + + lan { + label = "tp-link:blue:lan"; + gpios = <&gpio0 1 1>; + }; + + power { + label = "tp-link:blue:power"; + gpios = <&gpio0 7 0>; + }; + + usb { + label = "tp-link:blue:usb"; + gpios = <&gpio0 9 1>; + }; + + wlan5g { + label = "tp-link:blue:wlan5g"; + gpios = <&gpio0 11 1>; + }; + + wlan2g { + label = "tp-link:blue:wlan2g"; + gpios = <&gpio3 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 13 1>; + linux,code = <0x198>; + }; + + rfkill { + label = "rfkill"; + gpios = <&gpio0 2 1>; + linux,code = <0xf7>; + }; }; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label = "firmware"; + reg = <0x20000 0x7a0000>; + }; + + partition@7c0000 { + label = "config"; + reg = <0x7c0000 0x10000>; + }; + + rom: partition@7d0000 { + label = "rom"; + reg = <0x7d0000 0x10000>; + }; + + partition@7e0000 { + label = "romfile"; + reg = <0x7e0000 0x10000>; + }; + + radio: partition@7f0000 { + label = "radio"; + reg = <0x7f0000 0x10000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&rom 0xf100>; + mediatek,portmap = "wllll"; + }; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&wmac { + ralink,mtd-eeprom = <&radio 0>; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&radio 32768>; + mediatek,2ghz = <0>; + }; + }; +}; diff --git a/target/linux/ramips/dts/BC2.dts b/target/linux/ramips/dts/BC2.dts index 9161a55323..5ae10a31a0 100644 --- a/target/linux/ramips/dts/BC2.dts +++ b/target/linux/ramips/dts/BC2.dts @@ -6,15 +6,6 @@ compatible = "BC2", "ralink,rt3052-soc"; model = "NexAira BC2"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -68,20 +59,29 @@ linux,code = <0x198>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; - otg@101c0000 { - status = "okay"; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/BR-6425.dts b/target/linux/ramips/dts/BR-6425.dts index ec66667f88..b871ead992 100644 --- a/target/linux/ramips/dts/BR-6425.dts +++ b/target/linux/ramips/dts/BR-6425.dts @@ -6,15 +6,6 @@ compatible = "BR-6425", "ralink,rt3052-soc"; model = "Edimax BR-6425"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -24,18 +15,6 @@ #size-cells = <1>; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -69,3 +48,24 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { +/* mtd-mac-address = <&factory 0x4>; */ +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { +/* ralink,mtd-eeprom = <&factory 0>; */ +}; diff --git a/target/linux/ramips/dts/BR-6475ND.dts b/target/linux/ramips/dts/BR-6475ND.dts index 6211e4319e..f437ac165c 100644 --- a/target/linux/ramips/dts/BR-6475ND.dts +++ b/target/linux/ramips/dts/BR-6475ND.dts @@ -6,77 +6,45 @@ compatible = "BR-6475ND", "ralink,rt3883-soc"; model = "Edimax BR-6475nD"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - palmbus@10000000 { - timer@100 { - status = "okay"; - }; + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; - gpio1: gpio@638 { - status = "okay"; + reset { + label = "reset"; + gpios = <&gpio0 7 1>; + linux,code = <0x198>; }; - uartlite@c00 { - status = "okay"; + rfkill { + label = "rfkill"; + gpios = <&gpio0 9 1>; + linux,input-type = <5>; + linux,code = <0xf7>; }; }; - ethernet@10100000 { - status = "okay"; - mtd-mac-address = <&devdata 0x0d>; + gpio-leds { + compatible = "gpio-leds"; - port@0 { - mediatek,fixed-link = <1000 1 1 1>; + power { + label = "br-6475nd:green:power"; + gpios = <&gpio0 10 1>; }; - }; - wmac@10180000 { - status = "okay"; - ralink,mtd-eeprom = <&factory 0>; - }; - - pci@10140000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pci_pins>; - - pci_pins: pci { - pci { - ralink,group = "pci"; - ralink,function = "pci-fnc"; - }; + wlan { + label = "br-6475nd:amber:wlan"; + gpios = <&gpio0 11 1>; }; - host-bridge { - pci-bridge@1 { - status = "okay"; - - wmac@0,0 { - ralink,5ghz = <0>; - compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604"; - reg = < 0x10000 0 0 0 0 >; - ralink,eeprom = "rt2x00pci_1_0.eeprom"; - }; - }; + wlan_5ghz { + label = "br-6475nd:amber:wlan_5ghz"; + gpios = <&gpio0 14 1>; }; }; - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - nor-flash@1c000000 { compatible = "cfi-flash"; reg = <0x1c000000 0x800000>; @@ -126,58 +94,88 @@ realtek,extif0 = <1 0 1 1 1 1 1 1 2>; }; - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; + /* Unclear if this is the correct gpio setup; the USB ports are + unpopulated on a stock BR-6475nD, even though the hardware exists + and the headers are there. */ + /* + gpio_export { + compatible = "gpio-export"; #size-cells = <0>; - poll-interval = <100>; - reset { - label = "reset"; - gpios = <&gpio0 7 1>; - linux,code = <0x198>; + usb { + gpio-export,name="usb"; + gpio-export,output=<0>; + gpios = <&gpio0 19 0>; }; + }; + */ +}; - rfkill { - label = "rfkill"; - gpios = <&gpio0 9 1>; - linux,input-type = <5>; - linux,code = <0xf7>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "jtag", "uartf"; + ralink,function = "gpio"; }; }; +}; - gpio-leds { - compatible = "gpio-leds"; +&timer { + status = "okay"; +}; - power { - label = "br-6475nd:green:power"; - gpios = <&gpio0 10 1>; - }; +&gpio1 { + status = "okay"; +}; - wlan { - label = "br-6475nd:amber:wlan"; - gpios = <&gpio0 11 1>; - }; +&uartlite { + status = "okay"; +}; - wlan_5ghz { - label = "br-6475nd:amber:wlan_5ghz"; - gpios = <&gpio0 14 1>; +ðernet { + status = "okay"; + mtd-mac-address = <&devdata 0x0d>; + + port@0 { + mediatek,fixed-link = <1000 1 1 1>; + }; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0>; +}; + +&pci { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pci_pins>; + + pci_pins: pci { + pci { + ralink,group = "pci"; + ralink,function = "pci-fnc"; }; }; - /* Unclear if this is the correct gpio setup; the USB ports are - unpopulated on a stock BR-6475nD, even though the hardware exists - and the headers are there. */ - /* - gpio_export { - compatible = "gpio-export"; - #size-cells = <0>; + host-bridge { + pci-bridge@1 { + status = "okay"; - usb { - gpio-export,name="usb"; - gpio-export,output=<0>; - gpios = <&gpio0 19 0>; + wmac@0,0 { + ralink,5ghz = <0>; + compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604"; + reg = < 0x10000 0 0 0 0 >; + ralink,eeprom = "rt2x00pci_1_0.eeprom"; + }; }; }; - */ +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; }; diff --git a/target/linux/ramips/dts/BROADWAY.dts b/target/linux/ramips/dts/BROADWAY.dts index 40cb985e25..790dcc0467 100644 --- a/target/linux/ramips/dts/BROADWAY.dts +++ b/target/linux/ramips/dts/BROADWAY.dts @@ -6,15 +6,6 @@ compatible = "BROADWAY", "ralink,rt3052-soc"; model = "Hauppauge Broadway"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -85,8 +64,29 @@ linux,code = <0x198>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/CARAMBOLA.dts b/target/linux/ramips/dts/CARAMBOLA.dts index 5ff60c3af6..e38c49f957 100644 --- a/target/linux/ramips/dts/CARAMBOLA.dts +++ b/target/linux/ramips/dts/CARAMBOLA.dts @@ -10,15 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -51,25 +42,34 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; + i2c-gpio { + compatible = "i2c-gpio"; + gpios = <&gpio0 1 0 &gpio0 2 0>; + i2c-gpio,delay-us = <10>; }; +}; - esw@10110000 { - mediatek,portmap = <0x3f>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +ðernet { + mtd-mac-address = <&factory 0x28>; +}; - otg@101c0000 { - status = "okay"; - }; +&esw { + mediatek,portmap = <0x3f>; +}; - i2c-gpio { - compatible = "i2c-gpio"; - gpios = <&gpio0 1 0 &gpio0 2 0>; - i2c-gpio,delay-us = <10>; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/CF-WR800N.dts b/target/linux/ramips/dts/CF-WR800N.dts index 9d9e0df056..913f142f35 100644 --- a/target/linux/ramips/dts/CF-WR800N.dts +++ b/target/linux/ramips/dts/CF-WR800N.dts @@ -10,77 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "ephy", "wled", "spi refclk", "i2c"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -113,3 +42,72 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "ephy", "wled", "spi refclk", "i2c"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/CS-QR10.dts b/target/linux/ramips/dts/CS-QR10.dts index ddd480ff85..c3cb711a05 100644 --- a/target/linux/ramips/dts/CS-QR10.dts +++ b/target/linux/ramips/dts/CS-QR10.dts @@ -6,131 +6,15 @@ compatible = "ralink,mt7620a-soc"; model = "Planex CS-QR10"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - i2c@900 { - status = "okay"; - }; - - i2s: i2s@a00 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pcm_i2s_pins>; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - - pcm@2000 { - status = "okay"; - }; - - gdma@2800 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi refclk", "rgmii1"; - ralink,function = "gpio"; - }; - wdt { - ralink,group = "wdt"; - ralink,function = "wdt refclk"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - gsw@10110000 { - ralink,port4 = "ephy"; - }; - - sdhci@10130000 { - status = "okay"; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - }; - sound { compatible = "mediatek,mt7620-audio-wm8960"; model = "mt7620-wm8960"; i2s-controller = <&i2s>; audio-routing = - "Ext Spk", "SPK_LP", - "Ext Spk", "SPK_LN", - "Ext Spk", "SPK_RP", - "Ext Spk", "SPK_RN"; + "Ext Spk", "SPK_LP", + "Ext Spk", "SPK_LN", + "Ext Spk", "SPK_RP", + "Ext Spk", "SPK_RN"; }; gpio-leds { @@ -161,3 +45,117 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&i2c { + status = "okay"; +}; + +&i2s { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pcm_i2s_pins>; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pcm { + status = "okay"; +}; + +&gdma { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi refclk", "rgmii1"; + ralink,function = "gpio"; + }; + wdt { + ralink,group = "wdt"; + ralink,function = "wdt refclk"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&gsw { + ralink,port4 = "ephy"; +}; + +&sdhci { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/CY-SWR1100.dts b/target/linux/ramips/dts/CY-SWR1100.dts index 2120dc7dcd..031d8f0052 100644 --- a/target/linux/ramips/dts/CY-SWR1100.dts +++ b/target/linux/ramips/dts/CY-SWR1100.dts @@ -6,68 +6,6 @@ compatible = "CY-SWR1100", "ralink,rt3883-soc"; model = "Samsung CY-SWR1100"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - port@0 { - mediatek,fixed-link = <1000 1 1 1>; - phy-mode = "rgmii"; - }; - }; - - pci@10140000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pci_pins>; - - pci_pins: pci { - pci { - ralink,group = "pci"; - ralink,function = "pci-fnc"; - }; - }; - - host-bridge { - pci-bridge@1 { - status = "okay"; - - wmac@0,0 { - ralink,5ghz = <0>; - compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604"; - reg = < 0x10000 0 0 0 0 >; - ralink,eeprom = "rt2x00pci_1_0.eeprom"; - }; - }; - }; - }; - - wmac@10180000 { - status = "okay"; - ralink,2ghz = <0>; - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - nor-flash@1c000000 { compatible = "cfi-flash"; reg = <0x1c000000 0x800000>; @@ -150,3 +88,63 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + port@0 { + mediatek,fixed-link = <1000 1 1 1>; + phy-mode = "rgmii"; + }; +}; + +&pci { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pci_pins>; + + pci_pins: pci { + pci { + ralink,group = "pci"; + ralink,function = "pci-fnc"; + }; + }; + + host-bridge { + pci-bridge@1 { + status = "okay"; + + wmac@0,0 { + ralink,5ghz = <0>; + compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604"; + reg = < 0x10000 0 0 0 0 >; + ralink,eeprom = "rt2x00pci_1_0.eeprom"; + }; + }; + }; +}; + +&wmac { + status = "okay"; + ralink,2ghz = <0>; + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/D105.dts b/target/linux/ramips/dts/D105.dts index cf631ea7ba..2e86d1edac 100644 --- a/target/linux/ramips/dts/D105.dts +++ b/target/linux/ramips/dts/D105.dts @@ -6,15 +6,6 @@ compatible = "D105", "ralink,rt3050-soc"; model = "Huawei D105"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -73,20 +64,29 @@ linux,code = <0x198>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; - otg@101c0000 { - status = "okay"; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/DAP-1350.dts b/target/linux/ramips/dts/DAP-1350.dts index e983372dab..4628544fb6 100644 --- a/target/linux/ramips/dts/DAP-1350.dts +++ b/target/linux/ramips/dts/DAP-1350.dts @@ -10,15 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -57,18 +48,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&devdata 0x2e>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&devdata 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -118,8 +97,29 @@ linux,code = <0x101>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&devdata 0x2e>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&devdata 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/DB-WRT01.dts b/target/linux/ramips/dts/DB-WRT01.dts index 14c48e215c..4560dc5ca8 100644 --- a/target/linux/ramips/dts/DB-WRT01.dts +++ b/target/linux/ramips/dts/DB-WRT01.dts @@ -6,76 +6,6 @@ compatible = "ralink,mt7620a-soc"; model = "Planex DB-WRT01"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi refclk", "rgmii1"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - gsw@10110000 { - mediatek,port4 = "ephy"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -98,3 +28,71 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi refclk", "rgmii1"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/DCS-930.dts b/target/linux/ramips/dts/DCS-930.dts index 98779f0647..373973c3df 100644 --- a/target/linux/ramips/dts/DCS-930.dts +++ b/target/linux/ramips/dts/DCS-930.dts @@ -6,15 +6,6 @@ compatible = "DCS-930", "ralink,rt3050-soc"; model = "D-Link DCS-930"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x400000>; @@ -94,20 +85,29 @@ linux,code = <0x198>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; - otg@101c0000 { - status = "okay"; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/DCS-930L-B1.dts b/target/linux/ramips/dts/DCS-930L-B1.dts index ad715c1313..133245cb74 100644 --- a/target/linux/ramips/dts/DCS-930L-B1.dts +++ b/target/linux/ramips/dts/DCS-930L-B1.dts @@ -6,73 +6,6 @@ compatible = "DCS-930L-B1", "ralink,rt5350-soc"; model = "D-Link DCS-930L B1"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf", "led"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -106,3 +39,68 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf", "led"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/DIR-300-B1.dts b/target/linux/ramips/dts/DIR-300-B1.dts index 8772ed4576..4f0a7ffde7 100644 --- a/target/linux/ramips/dts/DIR-300-B1.dts +++ b/target/linux/ramips/dts/DIR-300-B1.dts @@ -6,15 +6,6 @@ compatible = "DIR-300-B1", "ralink,rt3050-soc"; model = "D-Link DIR-300 B1"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&devdata 0x4004>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&devdata 0x4000>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -107,3 +86,24 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&devdata 0x4004>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&devdata 0x4000>; +}; diff --git a/target/linux/ramips/dts/DIR-300-B7.dts b/target/linux/ramips/dts/DIR-300-B7.dts index ff6378a7cd..9b9a6a4592 100644 --- a/target/linux/ramips/dts/DIR-300-B7.dts +++ b/target/linux/ramips/dts/DIR-300-B7.dts @@ -6,62 +6,6 @@ compatible = "DIR-300-B7", "ralink,rt5350-soc"; model = "D-Link DIR-300 B7"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <0x17>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -94,10 +38,64 @@ linux,code = <0x211>; }; }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; - wmac@10180000 { - status = "okay"; - ralink,led-polarity = <1>; - ralink,mtd-eeprom = <&factory 0>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <0x17>; +}; + +&wmac { + status = "okay"; + ralink,led-polarity = <1>; + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/DIR-320-B1.dts b/target/linux/ramips/dts/DIR-320-B1.dts index 5d29d14959..102e06abf9 100644 --- a/target/linux/ramips/dts/DIR-320-B1.dts +++ b/target/linux/ramips/dts/DIR-320-B1.dts @@ -6,66 +6,6 @@ compatible = "DIR-320-B1", "ralink,rt5350-soc"; model = "D-Link DIR-320 B1"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <0x17>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -104,14 +44,6 @@ }; }; - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c0000 { - status = "okay"; - }; - gpio_export { compatible = "gpio-export"; #size-cells = <0>; @@ -129,3 +61,69 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <0x17>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/DIR-600-B1.dts b/target/linux/ramips/dts/DIR-600-B1.dts index 9d65bb1a6d..d45d3c5ccd 100644 --- a/target/linux/ramips/dts/DIR-600-B1.dts +++ b/target/linux/ramips/dts/DIR-600-B1.dts @@ -6,15 +6,6 @@ compatible = "DIR-600-B1", "ralink,rt3050-soc"; model = "D-Link DIR-600 B1"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&devdata 0x4004>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&devdata 0x4000>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -107,3 +86,24 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&devdata 0x4004>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&devdata 0x4000>; +}; diff --git a/target/linux/ramips/dts/DIR-600-B2.dts b/target/linux/ramips/dts/DIR-600-B2.dts index 4215e5b2ef..f0269cfa2e 100644 --- a/target/linux/ramips/dts/DIR-600-B2.dts +++ b/target/linux/ramips/dts/DIR-600-B2.dts @@ -6,15 +6,6 @@ compatible = "DIR-600-B2", "ralink,rt3050-soc"; model = "D-Link DIR-600 B2"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,14 +38,6 @@ }; }; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&devdata 0x4000>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -103,3 +86,20 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&devdata 0x4000>; +}; diff --git a/target/linux/ramips/dts/DIR-610-A1.dts b/target/linux/ramips/dts/DIR-610-A1.dts index a0f41d3b82..9ec66b4b00 100644 --- a/target/linux/ramips/dts/DIR-610-A1.dts +++ b/target/linux/ramips/dts/DIR-610-A1.dts @@ -6,69 +6,6 @@ compatible = "DIR-610-A1", "ralink,rt5350-soc"; model = "D-Link DIR-610 A1"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - devdata: partition@30000 { - label = "devdata"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&devdata 0x4004>; - }; - - esw@10110000 { - status = "okay"; - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <0x17>; - }; - - wmac@10180000 { - status = "okay"; - ralink,led-polarity = <1>; - ralink,mtd-eeprom = <&devdata 0x4000>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -102,3 +39,64 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + devdata: partition@30000 { + label = "devdata"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&devdata 0x4004>; +}; + +&esw { + status = "okay"; + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <0x17>; +}; + +&wmac { + status = "okay"; + ralink,led-polarity = <1>; + ralink,mtd-eeprom = <&devdata 0x4000>; +}; diff --git a/target/linux/ramips/dts/DIR-615-D.dts b/target/linux/ramips/dts/DIR-615-D.dts index 531f317def..cac9d2602c 100644 --- a/target/linux/ramips/dts/DIR-615-D.dts +++ b/target/linux/ramips/dts/DIR-615-D.dts @@ -6,15 +6,6 @@ compatible = "DIR-615-D", "ralink,rt3050-soc"; model = "D-Link DIR-615 D"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,14 +38,6 @@ }; }; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&devdata 0x4000>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -103,3 +86,22 @@ }; }; }; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&devdata 0x4000>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + + diff --git a/target/linux/ramips/dts/DIR-615-H1.dts b/target/linux/ramips/dts/DIR-615-H1.dts index 6f3d94f0c9..d53c82609f 100644 --- a/target/linux/ramips/dts/DIR-615-H1.dts +++ b/target/linux/ramips/dts/DIR-615-H1.dts @@ -6,75 +6,6 @@ compatible = "DIR-615-H1", "ralink,rt3352-soc"; model = "D-Link DIR-615 H1"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - - rgmii { - ralink,group = "rgmii"; - ralink,function = "rgmii"; - }; - - mdio { - ralink,group = "mdio"; - ralink,function = "mdio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -123,3 +54,70 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + + rgmii { + ralink,group = "rgmii"; + ralink,function = "rgmii"; + }; + + mdio { + ralink,group = "mdio"; + ralink,function = "mdio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/DIR-620-A1.dts b/target/linux/ramips/dts/DIR-620-A1.dts index df38f02c44..68a23465a6 100644 --- a/target/linux/ramips/dts/DIR-620-A1.dts +++ b/target/linux/ramips/dts/DIR-620-A1.dts @@ -6,15 +6,6 @@ compatible = "DIR-620-A1", "ralink,rt3050-soc"; model = "D-Link DIR-620 A1"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -111,8 +90,29 @@ gpios = <&gpio0 11 0>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/DIR-620-D1.dts b/target/linux/ramips/dts/DIR-620-D1.dts index 783870180b..5cf330e66b 100644 --- a/target/linux/ramips/dts/DIR-620-D1.dts +++ b/target/linux/ramips/dts/DIR-620-D1.dts @@ -6,75 +6,6 @@ compatible = "DIR-620-D1", "ralink,rt3352-soc"; model = "D-Link DIR-620 D1"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - - rgmii { - ralink,group = "rgmii"; - ralink,function = "rgmii"; - }; - - mdio { - ralink,group = "mdio"; - ralink,function = "mdio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -101,12 +32,79 @@ linux,code = <0x198>; }; }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; - ehci@101c0000 { - status = "okay"; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + + rgmii { + ralink,group = "rgmii"; + ralink,function = "rgmii"; + }; - ohci@101c1000 { - status = "okay"; + mdio { + ralink,group = "mdio"; + ralink,function = "mdio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/DIR-645.dts b/target/linux/ramips/dts/DIR-645.dts index 9843b1fee5..d508297ac1 100644 --- a/target/linux/ramips/dts/DIR-645.dts +++ b/target/linux/ramips/dts/DIR-645.dts @@ -6,89 +6,6 @@ compatible = "DIR-645", "ralink,rt3883-soc"; model = "D-Link DIR-645"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <25000000>; - - partition@0 { - label = "uboot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "uboot-env"; - reg = <0x30000 0x4000>; - read-only; - }; - - factory: partition@34000 { - label = "factory"; - reg = <0x34000 0x4000>; - read-only; - }; - - partition@38000 { - label = "nvram"; - reg = <0x38000 0x8000>; - read-only; - }; - - partition@40000 { - label = "devdata"; - reg = <0x40000 0x10000>; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - - port@0 { - mediatek,fixed-link = <1000 1 1 0>; - }; - }; - - wmac@10180000 { - ralink,5ghz = <0>; - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - rtl8367b { compatible = "realtek,rtl8367b"; gpio-sda = <&gpio0 1 0>; @@ -140,3 +57,84 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <25000000>; + + partition@0 { + label = "uboot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "uboot-env"; + reg = <0x30000 0x4000>; + read-only; + }; + + factory: partition@34000 { + label = "factory"; + reg = <0x34000 0x4000>; + read-only; + }; + + partition@38000 { + label = "nvram"; + reg = <0x38000 0x8000>; + read-only; + }; + + partition@40000 { + label = "devdata"; + reg = <0x40000 0x10000>; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + + port@0 { + mediatek,fixed-link = <1000 1 1 0>; + }; +}; + +&wmac { + ralink,5ghz = <0>; + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/DIR-810L.dts b/target/linux/ramips/dts/DIR-810L.dts index cebef080c1..1f9ad8a5d2 100644 --- a/target/linux/ramips/dts/DIR-810L.dts +++ b/target/linux/ramips/dts/DIR-810L.dts @@ -6,96 +6,6 @@ compatible = "dlink,dir-810l", "ralink,mt7620a-soc"; model = "D-Link DIR-810L"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - factory5g: partition@50000 { - label = "factory5g"; - reg = <0x50000 0x10000>; - read-only; - }; - - partition@60000 { - label = "Wolf_Config"; - reg = <0x60000 0x10000>; - read-only; - }; - - partition@70000 { - label = "MyDlink"; - reg = <0x70000 0x80000>; - read-only; - }; - - partition@e0000 { - label = "Jffs2"; - reg = <0xe0000 0x80000>; - read-only; - }; - - partition@170000 { - label = "firmware"; - reg = <0x170000 0x690000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - mediatek,portmap = "llllw"; - }; - - gsw@10110000 { - mediatek,port4 = "ephy"; - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - }; - - pcie@10140000 { - status = "okay"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -134,3 +44,91 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + factory5g: partition@50000 { + label = "factory5g"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + label = "Wolf_Config"; + reg = <0x60000 0x10000>; + read-only; + }; + + partition@70000 { + label = "MyDlink"; + reg = <0x70000 0x80000>; + read-only; + }; + + partition@e0000 { + label = "Jffs2"; + reg = <0xe0000 0x80000>; + read-only; + }; + + partition@170000 { + label = "firmware"; + reg = <0x170000 0x690000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; + mediatek,portmap = "llllw"; +}; + +&gsw { + mediatek,port4 = "ephy"; + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; +}; + +&pcie { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/DIR-860L-B1.dts b/target/linux/ramips/dts/DIR-860L-B1.dts index a6add705ba..b6336d87d3 100644 --- a/target/linux/ramips/dts/DIR-860L-B1.dts +++ b/target/linux/ramips/dts/DIR-860L-B1.dts @@ -15,87 +15,6 @@ bootargs = "console=ttyS0,57600"; }; - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x4000>; - read-only; - }; - - radio: partition@34000 { - label = "radio"; - reg = <0x34000 0x4000>; - read-only; - }; - - factory: partition@38000 { - label = "factory"; - reg = <0x38000 0x8000>; - read-only; - }; - - partition@40000 { - label = "defaults"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - }; - - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&radio 0x2000>; - mediatek,2ghz = <0>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&radio 0>; - mediatek,5ghz = <0>; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -127,3 +46,82 @@ poll-interval = <20>; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x4000>; + read-only; + }; + + radio: partition@34000 { + label = "radio"; + reg = <0x34000 0x4000>; + read-only; + }; + + factory: partition@38000 { + label = "factory"; + reg = <0x38000 0x8000>; + read-only; + }; + + partition@40000 { + label = "defaults"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&radio 0x2000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&radio 0>; + mediatek,5ghz = <0>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/DUZUN-DM06.dts b/target/linux/ramips/dts/DUZUN-DM06.dts new file mode 100644 index 0000000000..946a421c3a --- /dev/null +++ b/target/linux/ramips/dts/DUZUN-DM06.dts @@ -0,0 +1,155 @@ +/dts-v1/; + +/include/ "mt7628an.dtsi" + +/ { + compatible = "duzun,dm06-mt7628an", "mediatek,mt7628an-soc"; + model = "DuZun DM06"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + reset { + label = "reset"; + gpios = <&gpio1 14 1>; + linux,code = <0x198>; + }; + + wps { + label = "wps"; + gpios = <&gpio1 6 1>; + linux,code = <0x211>; + }; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "Audio-I2S"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&dailink0_master>; + simple-audio-card,frame-master = <&dailink0_master>; + simple-audio-card,widgets = + "Headphone", "Headphones"; + simple-audio-card,routing = + "Headphones", "HP_L", + "Headphones", "HP_R"; + simple-audio-card,mclk-fs = <256>; + + simple-audio-card,cpu { + sound-dai = <&i2s>; + }; + + dailink0_master: simple-audio-card,codec { + sound-dai = <&codec>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "uart1"; + ralink,function = "gpio"; + }; + }; + + i2s_pins: i2s { + i2s { + ralink,group = "i2s"; + ralink,function = "i2s"; + }; + }; + + wm8960_mclk_pins: wm8960_mclk { + wm8960_mclk { + ralink,group = "refclk"; + ralink,function = "reclk"; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&i2c { + status = "okay"; + + codec: wm8960@1a { + #sound-dai-cells = <0>; + compatible = "wlf,wm8960"; + reg = <0x1a>; + + wlf,shared-lrclk; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x3>; + mediatek,portdisable = <0x3c>; +}; + +&i2s { + #sound-dai-cells = <0>; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2s_pins>, <&wm8960_mclk_pins>; +}; + +&sdhci { + status = "okay"; +}; + +&gdma { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <60000000>; + m25p,chunked-io = <32>; + m25p,fast-read; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; diff --git a/target/linux/ramips/dts/E1700.dts b/target/linux/ramips/dts/E1700.dts index fafe25d0a7..36126ab42b 100644 --- a/target/linux/ramips/dts/E1700.dts +++ b/target/linux/ramips/dts/E1700.dts @@ -16,109 +16,6 @@ compatible = "linksys,e1700", "ralink,mt7620a-soc"; model = "Linksys E1700"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "config"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - status = "okay"; - mtd-mac-address = <&factory 0x28>; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - - port@5 { - status = "okay"; - mediatek,fixed-link = <1000 1 1 1>; - phy-mode = "rgmii"; - }; - - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@0 { - reg = <0>; - phy-mode = "rgmii"; - }; - - phy1: ethernet-phy@1 { - reg = <1>; - phy-mode = "rgmii"; - }; - - phy2: ethernet-phy@2 { - reg = <2>; - phy-mode = "rgmii"; - }; - - phy3: ethernet-phy@3 { - reg = <3>; - phy-mode = "rgmii"; - }; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; - - phy1f: ethernet-phy@1f { - reg = <0x1f>; - phy-mode = "rgmii"; - }; - }; - }; - - gsw@10110000 { - mediatek,port4 = "gmac"; - mediatek,mt7530 = <1>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -152,3 +49,104 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x28>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + + port@5 { + status = "okay"; + mediatek,fixed-link = <1000 1 1 1>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "rgmii"; + }; + + phy1: ethernet-phy@1 { + reg = <1>; + phy-mode = "rgmii"; + }; + + phy2: ethernet-phy@2 { + reg = <2>; + phy-mode = "rgmii"; + }; + + phy3: ethernet-phy@3 { + reg = <3>; + phy-mode = "rgmii"; + }; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + phy1f: ethernet-phy@1f { + reg = <0x1f>; + phy-mode = "rgmii"; + }; + }; +}; + +&gsw { + mediatek,port4 = "gmac"; + mediatek,mt7530 = <1>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/ESR-9753.dts b/target/linux/ramips/dts/ESR-9753.dts index 2e9999280f..6869166787 100644 --- a/target/linux/ramips/dts/ESR-9753.dts +++ b/target/linux/ramips/dts/ESR-9753.dts @@ -6,15 +6,6 @@ compatible = "ESR-9753", "ralink,rt3052-soc"; model = "Senao / EnGenius ESR-9753"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -79,16 +70,25 @@ linux,code = <0x211>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x3e>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; }; diff --git a/target/linux/ramips/dts/EX2700.dts b/target/linux/ramips/dts/EX2700.dts index 099700c364..c711adc6b4 100644 --- a/target/linux/ramips/dts/EX2700.dts +++ b/target/linux/ramips/dts/EX2700.dts @@ -20,73 +20,6 @@ bootargs = "console=ttyS0,57600"; }; - palmbus@10000000 { - - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "firmware"; - reg = <0x40000 0x3b0000>; - }; - - art: partition@3f0000 { - label = "art"; - reg = <0x3f0000 0x10000>; - read-only; - }; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&art 0x0>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&art 0x1000>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - // spi refclk: pins 37, 38, 39 - // uartf: pins 8, 9, 10, 11, 12, 13, 14 - // i2c: pins 1, 2 - ralink,group = "i2c", "uartf", "spi refclk"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -146,3 +79,67 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "firmware"; + reg = <0x40000 0x3b0000>; + }; + + art: partition@3f0000 { + label = "art"; + reg = <0x3f0000 0x10000>; + read-only; + }; + }; +}; + +ðernet { + mtd-mac-address = <&art 0x0>; +}; + +&wmac { + ralink,mtd-eeprom = <&art 0x1000>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + // spi refclk: pins 37, 38, 39 + // uartf: pins 8, 9, 10, 11, 12, 13, 14 + // i2c: pins 1, 2 + ralink,group = "i2c", "uartf", "spi refclk"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/F5D8235_V1.dts b/target/linux/ramips/dts/F5D8235_V1.dts index 85e64f11d0..dacdea6ca4 100644 --- a/target/linux/ramips/dts/F5D8235_V1.dts +++ b/target/linux/ramips/dts/F5D8235_V1.dts @@ -8,21 +8,6 @@ compatible = "F5D8235_V1", "ralink,rt2880-soc"; model = "Belkin F5D8235 v1"; - palmbus@300000 { - gpio0: gpio@600 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -55,21 +40,6 @@ }; }; - ethernet@400000 { - status = "okay"; - mtd-mac-address = <&factory 0x4>; - - port@0 { - mediatek,fixed-link = <1000 1 1 1>; - }; - }; - - /* FIXME: no u-boot partition and 0x40000@uboot is out of boundaries */ -/* wmac@480000 { - status = "okay"; - ralink,mtd-eeprom = <&u-boot 0x40000>; - }; -*/ rtl8366s { compatible = "realtek,rtl8366s"; gpio-sda = <&gpio0 1 0>; @@ -109,3 +79,33 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x4>; + + port@0 { + mediatek,fixed-link = <1000 1 1 1>; + }; +}; + +/* FIXME: no u-boot partition and 0x40000@uboot is out of boundaries */ +/*&wmac { + status = "okay"; + ralink,mtd-eeprom = <&u-boot 0x40000>; +}; +*/ + diff --git a/target/linux/ramips/dts/F5D8235_V2.dts b/target/linux/ramips/dts/F5D8235_V2.dts index d1e2143b40..084ca0f25a 100644 --- a/target/linux/ramips/dts/F5D8235_V2.dts +++ b/target/linux/ramips/dts/F5D8235_V2.dts @@ -6,15 +6,6 @@ compatible = "F5D8235_V2", "ralink,rt3052-soc"; model = "Belkin F5D8235 v2"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -45,22 +36,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&uboot 0x40004>; - }; - - esw@10110000 { - mediatek,portmap = <0x3f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&uboot 0x40000>; - }; - - otg@101c0000 { - status = "okay"; - }; - rtl8366rb { compatible = "rtl8366rb"; gpio-sda = <&gpio0 1 0>; @@ -116,3 +91,28 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&uboot 0x40004>; +}; + +&esw { + mediatek,portmap = <0x3f>; +}; + +&wmac { + ralink,mtd-eeprom = <&uboot 0x40000>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/F7C027.dts b/target/linux/ramips/dts/F7C027.dts index 98b3d5a0a9..6214c85d03 100644 --- a/target/linux/ramips/dts/F7C027.dts +++ b/target/linux/ramips/dts/F7C027.dts @@ -6,82 +6,6 @@ compatible = "F7C027", "ralink,rt5350-soc"; model = "Belkin F7C027"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l12805d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x770000>; - }; - - partition@7c0000 { - label = "firmware2"; - reg = <0x7c0000 0x770000>; - }; - - partition@f30000 { - label = "belkin_settings"; - reg = <0xf30000 0xa0000>; - }; - - partition@fd0000 { - label = "unknown"; - reg = <0xfd0000 0x10000>; - }; - - partition@fe0000 { - label = "nvram"; - reg = <0xfe0000 0x10000>; - }; - - partition@ff0000 { - label = "user_factory"; - reg = <0xff0000 0x10000>; - }; - }; - }; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -131,3 +55,77 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l12805d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x770000>; + }; + + partition@7c0000 { + label = "firmware2"; + reg = <0x7c0000 0x770000>; + }; + + partition@f30000 { + label = "belkin_settings"; + reg = <0xf30000 0xa0000>; + }; + + partition@fd0000 { + label = "unknown"; + reg = <0xfd0000 0x10000>; + }; + + partition@fe0000 { + label = "nvram"; + reg = <0xfe0000 0x10000>; + }; + + partition@ff0000 { + label = "user_factory"; + reg = <0xff0000 0x10000>; + }; + }; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index e7cfb11744..4299b68a34 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -15,74 +15,6 @@ bootargs = "console=ttyS0,57600"; }; - sdhci@10130000 { - status = "okay"; - }; - - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - }; - - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,5ghz = <0>; - }; - }; - }; - - ethernet@1e100000 { - mtd-mac-address = <&factory 0xe000>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -110,13 +42,79 @@ linux,code = <116>; }; }; +}; + +&sdhci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wdt", "rgmii2"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "rgmii2"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/dts/FONERA20N.dts b/target/linux/ramips/dts/FONERA20N.dts index f5578eef4d..b7eb91ea7b 100644 --- a/target/linux/ramips/dts/FONERA20N.dts +++ b/target/linux/ramips/dts/FONERA20N.dts @@ -6,15 +6,6 @@ compatible = "FONERA20N", "ralink,rt3052-soc"; model = "La Fonera 2.0N"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -85,50 +76,59 @@ linux,input-type = <5>; /* EV_SW */ }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - - port@0 { - compatible = "swconfig,port"; - swconfig,segment = "lan"; - swconfig,portmap = <0 4>; - }; +ðernet { + mtd-mac-address = <&factory 0x28>; +}; - port@1 { - compatible = "swconfig,port"; - swconfig,segment = "lan"; - swconfig,portmap = <1 3>; - }; +&esw { + mediatek,portmap = <0x2f>; - port@2 { - compatible = "swconfig,port"; - swconfig,segment = "lan"; - swconfig,portmap = <2 2>; - }; + port@0 { + compatible = "swconfig,port"; + swconfig,segment = "lan"; + swconfig,portmap = <0 4>; + }; - port@3 { - compatible = "swconfig,port"; - swconfig,segment = "lan"; - swconfig,portmap = <3 1>; - }; + port@1 { + compatible = "swconfig,port"; + swconfig,segment = "lan"; + swconfig,portmap = <1 3>; + }; - port@4 { - compatible = "swconfig,port"; - swconfig,segment = "wan"; - swconfig,portmap = <4 0>; - }; + port@2 { + compatible = "swconfig,port"; + swconfig,segment = "lan"; + swconfig,portmap = <2 2>; }; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; + port@3 { + compatible = "swconfig,port"; + swconfig,segment = "lan"; + swconfig,portmap = <3 1>; }; - otg@101c0000 { - status = "okay"; + port@4 { + compatible = "swconfig,port"; + swconfig,segment = "wan"; + swconfig,portmap = <4 0>; }; }; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/FREESTATION5.dts b/target/linux/ramips/dts/FREESTATION5.dts index 28e4aff629..425eb2adbe 100644 --- a/target/linux/ramips/dts/FREESTATION5.dts +++ b/target/linux/ramips/dts/FREESTATION5.dts @@ -10,15 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -51,22 +42,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x01>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - otg@101c0000 { - status = "okay"; - }; - gpio-export { compatible = "gpio-export"; @@ -100,3 +75,28 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x01>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/GL-MT300A.dts b/target/linux/ramips/dts/GL-MT300A.dts index b7c346cc4e..5edb7ca487 100644 --- a/target/linux/ramips/dts/GL-MT300A.dts +++ b/target/linux/ramips/dts/GL-MT300A.dts @@ -10,109 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "w25q128"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xf80000>; - }; - - partition@ff0000 { - label = "art"; - reg = <0xff0000 0x10000>; - }; - }; - }; - }; - - sdhci@10130000 { - status = "okay"; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4000>; - ralink,port-map = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wled","ephy","uartf","i2c"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -162,3 +59,104 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q128"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@ff0000 { + label = "art"; + reg = <0xff0000 0x10000>; + }; + }; +}; + +&sdhci { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4000>; + ralink,port-map = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wled","ephy","uartf","i2c"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/GL-MT300N.dts b/target/linux/ramips/dts/GL-MT300N.dts index d24415774f..341a8f6462 100644 --- a/target/linux/ramips/dts/GL-MT300N.dts +++ b/target/linux/ramips/dts/GL-MT300N.dts @@ -1,112 +1,15 @@ /dts-v1/; -#include "mt7620n.dtsi" +#include "mt7620a.dtsi" / { - compatible = "GL-MT300N", "ralink,mt7620n-soc"; + compatible = "GL-MT300N", "ralink,mt7620a-soc"; model = "GL-MT300N"; chosen { bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "w25q128"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xf80000>; - }; - - partition@ff0000 { - label = "art"; - reg = <0xff0000 0x10000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4000>; - ralink,port-map = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wled","ephy","i2c"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -151,3 +54,98 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q128"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@ff0000 { + label = "art"; + reg = <0xff0000 0x10000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4000>; + ralink,port-map = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wled","ephy","i2c"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/GL-MT750.dts b/target/linux/ramips/dts/GL-MT750.dts index 93c38079c2..c59ffb3756 100644 --- a/target/linux/ramips/dts/GL-MT750.dts +++ b/target/linux/ramips/dts/GL-MT750.dts @@ -10,109 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "w25q128"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xf80000>; - }; - - partition@ff0000 { - label = "art"; - reg = <0xff0000 0x10000>; - }; - }; - }; - }; - - sdhci@10130000 { - status = "okay"; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4000>; - ralink,port-map = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wled","ephy","uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -157,3 +54,104 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q128"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@ff0000 { + label = "art"; + reg = <0xff0000 0x10000>; + }; + }; +}; + +&sdhci { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4000>; + ralink,port-map = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wled","ephy","uartf"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/HC5861.dts b/target/linux/ramips/dts/HC5861.dts index fbf0e90ea5..3e812f691d 100644 --- a/target/linux/ramips/dts/HC5861.dts +++ b/target/linux/ramips/dts/HC5861.dts @@ -6,44 +6,6 @@ compatible = "HC5861", "ralink,mt7620a-soc"; model = "HiWiFi HC5861"; - ethernet@10100000 { - status = "okay"; - mtd-mac-address = <&factory 0x4>; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mediatek,portmap = "wllll"; - - port@4 { - status = "okay"; - phy-handle = <&phy4>; - phy-mode = "rgmii"; - }; - - port@5 { - status = "okay"; - phy-handle = <&phy5>; - phy-mode = "rgmii"; - }; - - mdio-bus { - status = "okay"; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; - - phy5: ethernet-phy@5 { - reg = <5>; - phy-mode = "rgmii"; - }; - }; - }; - - gsw@10110000 { - mediatek,port4 = "gmac"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -90,3 +52,41 @@ }; }; }; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x4>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + mediatek,portmap = "wllll"; + + port@4 { + status = "okay"; + phy-handle = <&phy4>; + phy-mode = "rgmii"; + }; + + port@5 { + status = "okay"; + phy-handle = <&phy5>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; + }; + }; +}; + +&gsw { + mediatek,port4 = "gmac"; +}; diff --git a/target/linux/ramips/dts/HC5XXX.dtsi b/target/linux/ramips/dts/HC5XXX.dtsi index 5b38326032..d55d5b65cd 100644 --- a/target/linux/ramips/dts/HC5XXX.dtsi +++ b/target/linux/ramips/dts/HC5XXX.dtsi @@ -5,116 +5,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - sysc@0 { - ralink,gpiomux = "i2c", "jtag"; - ralink,uartmux = "gpio"; - ralink,wdtmux = <1>; - }; - - gpio0: gpio@600 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xf80000>; - }; - - partition@fd0000 { - label = "hwf_config"; - reg = <0xfd0000 0x10000>; - }; - - bdinfo: partition@fe0000 { - label = "bdinfo"; - reg = <0xfe0000 0x10000>; - }; - - partition@ff0000 { - label = "backup"; - reg = <0xff0000 0x10000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; - - sdhci@10130000 { - status = "okay"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "uartf", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - - pa { - ralink,group = "pa"; - ralink,function = "pa"; - }; - }; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -139,3 +29,111 @@ }; }; }; + +&sysc { + ralink,gpiomux = "i2c", "jtag"; + ralink,uartmux = "gpio"; + ralink,wdtmux = <1>; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@fd0000 { + label = "hwf_config"; + reg = <0xfd0000 0x10000>; + }; + + bdinfo: partition@fe0000 { + label = "bdinfo"; + reg = <0xfe0000 0x10000>; + }; + + partition@ff0000 { + label = "backup"; + reg = <0xff0000 0x10000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&sdhci { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "uartf", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + + pa { + ralink,group = "pa"; + ralink,function = "pa"; + }; + }; +}; diff --git a/target/linux/ramips/dts/HG255D.dts b/target/linux/ramips/dts/HG255D.dts index 392464f4bd..ee385097b2 100644 --- a/target/linux/ramips/dts/HG255D.dts +++ b/target/linux/ramips/dts/HG255D.dts @@ -6,15 +6,6 @@ compatible = "HG255D", "ralink,rt3052-soc"; model = "HuaWei HG255D"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x1000000>; @@ -111,20 +102,29 @@ linux,code = <0xf7>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +ðernet { + mtd-mac-address = <&factory 0x28>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; - otg@101c0000 { - status = "okay"; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/HLKRM04.dts b/target/linux/ramips/dts/HLKRM04.dts index 0352546bf0..2f4e43548f 100644 --- a/target/linux/ramips/dts/HLKRM04.dts +++ b/target/linux/ramips/dts/HLKRM04.dts @@ -15,78 +15,6 @@ bootargs = "console=ttyS1,57600"; }; - palmbus@10000000 { - uart@500 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag"; - ralink,function = "gpio"; - }; - - uartf_gpio { - ralink,group = "uartf"; - ralink,function = "gpio uartf"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-export { compatible = "gpio-export"; #size-cells = <0>; @@ -123,3 +51,73 @@ }; }; }; + +&uart { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag"; + ralink,function = "gpio"; + }; + + uartf_gpio { + ralink,group = "uartf"; + ralink,function = "gpio uartf"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/HPM.dts b/target/linux/ramips/dts/HPM.dts index d0ff882db2..000750fa12 100644 --- a/target/linux/ramips/dts/HPM.dts +++ b/target/linux/ramips/dts/HPM.dts @@ -10,78 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - compatible = "jedec,spi-nor"; - spi-max-frequency = <25000000>; - reg = <0>; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - reg = <0x0 0x0030000>; - label = "u-boot"; - read-only; - }; - - partition@30000 { - reg = <0x00030000 0x00010000>; - label = "config"; - read-only; - }; - - factory: partition@40000 { - reg = <0x00040000 0x00010000>; - label = "factory"; - read-only; - }; - - partition@50000 { - reg = <0x00050000 0x00fb0000>; - label = "firmware"; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - phy-handle = <&phy0>; - phy-mode = "rgmii"; - mtd-mac-address = <&factory 0x28>; - - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@4 { - reg = <4>; - }; - }; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -147,3 +75,73 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + compatible = "jedec,spi-nor"; + spi-max-frequency = <25000000>; + reg = <0>; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x0030000>; + label = "u-boot"; + read-only; + }; + + partition@30000 { + reg = <0x00030000 0x00010000>; + label = "config"; + read-only; + }; + + factory: partition@40000 { + reg = <0x00040000 0x00010000>; + label = "factory"; + read-only; + }; + + partition@50000 { + reg = <0x00050000 0x00fb0000>; + label = "firmware"; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + phy-handle = <&phy0>; + phy-mode = "rgmii"; + mtd-mac-address = <&factory 0x28>; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@4 { + reg = <4>; + }; + }; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/HT-TM02.dts b/target/linux/ramips/dts/HT-TM02.dts index 52bcf860ea..bfa3536a29 100644 --- a/target/linux/ramips/dts/HT-TM02.dts +++ b/target/linux/ramips/dts/HT-TM02.dts @@ -6,78 +6,6 @@ compatible = "HT-TM02", "ralink,rt5350-soc"; model = "HooToo HT-TM02"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x10>; - mediatek,portdisable = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -112,3 +40,73 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x10>; + mediatek,portdisable = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/HW550-3G.dts b/target/linux/ramips/dts/HW550-3G.dts index 5d5f864ddb..0efa8d0f54 100644 --- a/target/linux/ramips/dts/HW550-3G.dts +++ b/target/linux/ramips/dts/HW550-3G.dts @@ -6,15 +6,6 @@ compatible = "HW550-3G", "ralink,rt3052-soc"; model = "Aztech HW550-3G"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -107,8 +86,29 @@ linux,code = <0x211>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/IP2202.dts b/target/linux/ramips/dts/IP2202.dts index d4ac50b01f..50d5532a2d 100644 --- a/target/linux/ramips/dts/IP2202.dts +++ b/target/linux/ramips/dts/IP2202.dts @@ -6,15 +6,6 @@ compatible = "IP2202", "ralink,rt3052-soc"; model = "Poray IP2202"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,14 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -81,8 +64,25 @@ linux,code = <0x198>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/JHR-N805R.dts b/target/linux/ramips/dts/JHR-N805R.dts index 2c9dde78bc..0688c3ab02 100644 --- a/target/linux/ramips/dts/JHR-N805R.dts +++ b/target/linux/ramips/dts/JHR-N805R.dts @@ -6,65 +6,6 @@ compatible = "JHR-N805R", "ralink,rt3050-soc"; model = "JCG JHR-N805R"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x2e>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -87,3 +28,60 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x2e>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/JHR-N825R.dts b/target/linux/ramips/dts/JHR-N825R.dts index 3bcb9e9ef4..1e9acdf113 100644 --- a/target/linux/ramips/dts/JHR-N825R.dts +++ b/target/linux/ramips/dts/JHR-N825R.dts @@ -6,15 +6,6 @@ compatible = "JHR-N825R", "ralink,rt3052-soc"; model = "JCG JHR-N825R"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x2e>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; system { @@ -79,3 +58,24 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x2e>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/JHR-N926R.dts b/target/linux/ramips/dts/JHR-N926R.dts index f637ab2570..1a63656ed9 100644 --- a/target/linux/ramips/dts/JHR-N926R.dts +++ b/target/linux/ramips/dts/JHR-N926R.dts @@ -6,15 +6,6 @@ compatible = "JHR-N926R", "ralink,rt3052-soc"; model = "JCG JHR-N926R"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x2e>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -125,3 +104,24 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x2e>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/LINKIT7688.dts b/target/linux/ramips/dts/LINKIT7688.dts index 43ff78bc73..09a8c987f7 100644 --- a/target/linux/ramips/dts/LINKIT7688.dts +++ b/target/linux/ramips/dts/LINKIT7688.dts @@ -19,128 +19,6 @@ reg = <0x0 0x8000000>; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "gpio"; - ralink,function = "gpio"; - }; - - perst { - ralink,group = "perst"; - ralink,function = "gpio"; - }; - - refclk { - ralink,group = "refclk"; - ralink,function = "gpio"; - }; - - i2s { - ralink,group = "i2s"; - ralink,function = "gpio"; - }; - - spis { - ralink,group = "spis"; - ralink,function = "gpio"; - }; - - wled_kn { - ralink,group = "wled_kn"; - ralink,function = "gpio"; - }; - - wled_an { - ralink,group = "wled_an"; - ralink,function = "wled_an"; - }; - - wdt { - ralink,group = "wdt"; - ralink,function = "gpio"; - }; - }; - }; - - wmac@10300000 { - status = "okay"; - }; - - palmbus@10000000 { - spi@b00 { - status = "okay"; - - pinctrl-names = "default"; - pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l25635e"; - spi-max-frequency = <40000000>; - m25p,chunked-io = <31>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x1fb0000>; - }; - }; - - spidev@1 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "spidev"; - reg = <1 0>; - spi-max-frequency = <40000000>; - }; - }; - - i2c@900 { - status = "okay"; - }; - - uart1@d00 { - status = "okay"; - }; - - uart2@e00 { - status = "okay"; - }; - - pwm@5000 { - status = "okay"; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - sdhci@10130000 { - status = "okay"; - mediatek,cd-high; - }; - bootstrap { compatible = "mediatek,linkit"; @@ -149,7 +27,7 @@ gpio-leds { compatible = "gpio-leds"; - + wifi { label = "mediatek:orange:wifi"; gpios = <&wgpio 0 0>; @@ -162,7 +40,7 @@ #address-cells = <1>; #size-cells = <0>; poll-interval = <20>; - + wps { label = "reset"; gpios = <&gpio1 6 1>; @@ -177,5 +55,128 @@ gpio-controller; #gpio-cells = <2>; }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "gpio"; + ralink,function = "gpio"; + }; + + perst { + ralink,group = "perst"; + ralink,function = "gpio"; + }; + + refclk { + ralink,group = "refclk"; + ralink,function = "gpio"; + }; + + i2s { + ralink,group = "i2s"; + ralink,function = "gpio"; + }; + + spis { + ralink,group = "spis"; + ralink,function = "gpio"; + }; + + wled_kn { + ralink,group = "wled_kn"; + ralink,function = "gpio"; + }; + + wled_an { + ralink,group = "wled_an"; + ralink,function = "wled_an"; + }; + + wdt { + ralink,group = "wdt"; + ralink,function = "gpio"; + }; + }; +}; + +&wmac { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l25635e"; + spi-max-frequency = <40000000>; + m25p,chunked-io = <31>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; + }; + + spidev@1 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "linux,spidev"; + reg = <1>; + spi-max-frequency = <40000000>; + }; +}; + +&i2c { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&pwm { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&sdhci { + status = "okay"; + mediatek,cd-high; +}; +&wmac { + status = "okay"; }; diff --git a/target/linux/ramips/dts/M2M.dts b/target/linux/ramips/dts/M2M.dts index fcc8c04de8..22ec534a2a 100644 --- a/target/linux/ramips/dts/M2M.dts +++ b/target/linux/ramips/dts/M2M.dts @@ -10,53 +10,6 @@ bootargs = "console=ttyS0,57600n8 root=/dev/mtdblock5"; }; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "Bootloader"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "Config"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "Factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -89,24 +42,69 @@ linux,code = <0x198>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; +&spi0 { + status = "okay"; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "Bootloader"; + reg = <0x0 0x30000>; + read-only; + }; - ehci@101c0000 { - status = "okay"; - }; + partition@30000 { + label = "Config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "Factory"; + reg = <0x40000 0x10000>; + read-only; + }; - ohci@101c1000 { - status = "okay"; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; }; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0x0>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0x0>; +}; diff --git a/target/linux/ramips/dts/M3.dts b/target/linux/ramips/dts/M3.dts index 11eb9b59f5..9b6ed89142 100644 --- a/target/linux/ramips/dts/M3.dts +++ b/target/linux/ramips/dts/M3.dts @@ -6,62 +6,6 @@ compatible = "M3", "ralink,rt5350-soc"; model = "Poray M3"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q32"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <1>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -90,17 +34,71 @@ linux,input-type = <5>; }; }; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - ralink,led-polarity = <1>; - }; +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q32"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - ehci@101c0000 { - status = "okay"; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; }; +}; - ohci@101c1000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <1>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; + ralink,led-polarity = <1>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/M4-4M.dts b/target/linux/ramips/dts/M4-4M.dts index 329148ed44..0502714c3b 100644 --- a/target/linux/ramips/dts/M4-4M.dts +++ b/target/linux/ramips/dts/M4-4M.dts @@ -6,62 +6,6 @@ compatible = "M4", "ralink,rt5350-soc"; model = "Poray M4"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "pm25lq032"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <1>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -83,12 +27,66 @@ linux,code = <0x198>; }; }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "pm25lq032"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; - ehci@101c0000 { - status = "okay"; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; }; +}; - ohci@101c1000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <1>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/M4-8M.dts b/target/linux/ramips/dts/M4-8M.dts index ec7d3849f7..16ee184ed2 100644 --- a/target/linux/ramips/dts/M4-8M.dts +++ b/target/linux/ramips/dts/M4-8M.dts @@ -6,62 +6,6 @@ compatible = "M4", "ralink,rt5350-soc"; model = "Poray M4"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "gd25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <1>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -83,17 +27,71 @@ linux,code = <0x198>; }; }; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - ralink,led-polarity = <1>; - }; +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "gd25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - ehci@101c0000 { - status = "okay"; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; }; +}; - ohci@101c1000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <1>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; + ralink,led-polarity = <1>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/MINIEMBPLUG.dts b/target/linux/ramips/dts/MINIEMBPLUG.dts index eb980d59ac..eefac574c1 100644 --- a/target/linux/ramips/dts/MINIEMBPLUG.dts +++ b/target/linux/ramips/dts/MINIEMBPLUG.dts @@ -6,15 +6,6 @@ compatible = "MINIEMBPLUG", "ralink,rt5350-soc"; model = "Omnima MiniEMBPlug"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -59,62 +50,73 @@ linux,code = <0x211>; }; }; +}; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; }; + }; +}; - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; }; - }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; }; +}; - otg@101c0000 { - status = "okay"; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; }; diff --git a/target/linux/ramips/dts/MINIEMBWIFI.dts b/target/linux/ramips/dts/MINIEMBWIFI.dts index aa621c807d..1240adede0 100644 --- a/target/linux/ramips/dts/MINIEMBWIFI.dts +++ b/target/linux/ramips/dts/MINIEMBWIFI.dts @@ -6,15 +6,6 @@ compatible = "MINIEMBWIFI", "ralink,rt3052-soc"; model = "Omnima MiniEMBWiFi"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -73,20 +64,29 @@ reg = <0x50000 0x7b0000>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +ðernet { + mtd-mac-address = <&factory 0x28>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; - otg@101c0000 { - status = "okay"; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/MIWIFI-MINI.dts b/target/linux/ramips/dts/MIWIFI-MINI.dts index e499f4e2a4..e9ad3750b7 100644 --- a/target/linux/ramips/dts/MIWIFI-MINI.dts +++ b/target/linux/ramips/dts/MIWIFI-MINI.dts @@ -10,117 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xf80000>; - }; - - partition@fd0000 { - label = "crash"; - reg = <0xfd0000 0x10000>; - }; - - partition@fe0000 { - label = "reserved"; - reg = <0xfe0000 0x10000>; - read-only; - }; - - partition@ff0000 { - label = "Bdata"; - reg = <0xff0000 0x10000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "rgmii1"; - ralink,function = "gpio"; - }; - - pa { - ralink,group = "pa"; - ralink,function = "pa"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -153,3 +42,112 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + + partition@fd0000 { + label = "crash"; + reg = <0xfd0000 0x10000>; + }; + + partition@fe0000 { + label = "reserved"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + partition@ff0000 { + label = "Bdata"; + reg = <0xff0000 0x10000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "rgmii1"; + ralink,function = "gpio"; + }; + + pa { + ralink,group = "pa"; + ralink,function = "pa"; + }; + }; +}; diff --git a/target/linux/ramips/dts/MIWIFI-NANO.dts b/target/linux/ramips/dts/MIWIFI-NANO.dts index d305ee49be..6906ef30ad 100644 --- a/target/linux/ramips/dts/MIWIFI-NANO.dts +++ b/target/linux/ramips/dts/MIWIFI-NANO.dts @@ -15,15 +15,6 @@ reg = <0x0 0x4000000>; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "refclk", "wled", "gpio"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -41,51 +32,56 @@ label = "miwifi-nano:amber:radio"; gpios = <&gpio1 12 1>; default-state = "1"; - }; }; +}; - - wmac@10300000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "refclk", "wled_an", "gpio"; + ralink,function = "gpio"; + }; }; +}; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; +&wmac { + status = "okay"; +}; - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; }; }; }; diff --git a/target/linux/ramips/dts/MLW221.dts b/target/linux/ramips/dts/MLW221.dts index 2238113739..670a36aadb 100644 --- a/target/linux/ramips/dts/MLW221.dts +++ b/target/linux/ramips/dts/MLW221.dts @@ -6,87 +6,6 @@ compatible = "mlw221", "ralink,mt7620n-soc"; model = "Kingston MLW221"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl129p1"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xf60000>; - }; - - partition@fb0000 { - label = "user-config"; - reg = <0xfb0000 0x50000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "i2c", "ephy", "wled"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -120,3 +39,82 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl129p1"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf60000>; + }; + + partition@fb0000 { + label = "user-config"; + reg = <0xfb0000 0x50000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "ephy", "wled"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/MLWG2.dts b/target/linux/ramips/dts/MLWG2.dts index 4535446577..c9f61c735f 100644 --- a/target/linux/ramips/dts/MLWG2.dts +++ b/target/linux/ramips/dts/MLWG2.dts @@ -6,87 +6,6 @@ compatible = "mlwg2", "ralink,mt7620n-soc"; model = "Kingston MLWG2"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xf60000>; - }; - - partition@fb0000 { - label = "user-config"; - reg = <0xfb0000 0x50000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "i2c", "ephy", "wled"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -120,3 +39,82 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf60000>; + }; + + partition@fb0000 { + label = "user-config"; + reg = <0xfb0000 0x50000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "ephy", "wled"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/MOFI3500-3GN.dts b/target/linux/ramips/dts/MOFI3500-3GN.dts index b500da44d1..633f20a750 100644 --- a/target/linux/ramips/dts/MOFI3500-3GN.dts +++ b/target/linux/ramips/dts/MOFI3500-3GN.dts @@ -6,15 +6,6 @@ compatible = "MOFI3500-3GN", "ralink,rt3052-soc"; model = "MoFi Network MOFI3500-3GN"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,10 +38,6 @@ }; }; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -99,13 +86,26 @@ linux,code = <0x211>; }; }; +}; - wmac@10180000 { - status = "okay"; - ralink,mtd-eeprom = <&factory 0>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - otg@101c0000 { - status = "okay"; - }; +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/MPRA1.dts b/target/linux/ramips/dts/MPRA1.dts index 181c7ec0e3..d9baed732a 100644 --- a/target/linux/ramips/dts/MPRA1.dts +++ b/target/linux/ramips/dts/MPRA1.dts @@ -6,77 +6,6 @@ compatible = "MPRA1", "ralink,rt5350-soc"; model = "HAME MPR-A1"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - - gpio1: gpio@660 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf", "led"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -121,3 +50,72 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf", "led"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/MPRA2.dts b/target/linux/ramips/dts/MPRA2.dts index 5f3e3a4264..84f5dda3a6 100644 --- a/target/linux/ramips/dts/MPRA2.dts +++ b/target/linux/ramips/dts/MPRA2.dts @@ -6,73 +6,6 @@ compatible = "MPRA2", "ralink,rt5350-soc"; model = "HAME MPR-A2"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -117,3 +50,69 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x1>; + mediatek,portdisable = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/MR-102N.dts b/target/linux/ramips/dts/MR-102N.dts index 286282a6e5..6546601f15 100644 --- a/target/linux/ramips/dts/MR-102N.dts +++ b/target/linux/ramips/dts/MR-102N.dts @@ -6,15 +6,6 @@ compatible = "MR-102N", "ralink,rt3052-soc"; model = "AXIMCom MR-102N"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -57,20 +48,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - status = "okay"; - #mediatek,portmap = <0x3e>; - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -108,8 +85,32 @@ linux,code = <0x211>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + status = "okay"; + #mediatek,portmap = <0x3e>; + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/MT7620a.dts b/target/linux/ramips/dts/MT7620a.dts index d3553349fc..7bf38976f6 100644 --- a/target/linux/ramips/dts/MT7620a.dts +++ b/target/linux/ramips/dts/MT7620a.dts @@ -6,122 +6,120 @@ compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc"; model = "Ralink MT7620a + MT7610e evaluation board"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; + gpio-keys-polled { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + s2 { + label = "S2"; + gpios = <&gpio0 1 1>; + linux,code = <0x100>; }; - }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf"; - ralink,function = "gpio"; - }; + s3 { + label = "S3"; + gpios = <&gpio0 2 1>; + linux,code = <0x101>; }; }; +}; - ethernet@10100000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mediatek,portmap = "llllw"; +&spi0 { + status = "okay"; - port@4 { - status = "okay"; - phy-mode = "rgmii"; - phy-handle = <&phy4>; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; }; - port@5 { - status = "okay"; - phy-mode = "rgmii"; - phy-handle = <&phy5>; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; }; - mdio-bus { - status = "okay"; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - phy5: ethernet-phy@5 { - reg = <5>; - phy-mode = "rgmii"; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; }; }; +}; - gsw@10110000 { - mediatek,port4 = "gmac"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf"; + ralink,function = "gpio"; + }; }; +}; + +ðernet { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + mediatek,portmap = "llllw"; - sdhci@10130000 { + port@4 { status = "okay"; + phy-mode = "rgmii"; + phy-handle = <&phy4>; }; - pcie@10140000 { + port@5 { status = "okay"; + phy-mode = "rgmii"; + phy-handle = <&phy5>; }; - gpio-keys-polled { - compatible = "gpio-keys"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; + mdio-bus { + status = "okay"; - s2 { - label = "S2"; - gpios = <&gpio0 1 1>; - linux,code = <0x100>; + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; }; - s3 { - label = "S3"; - gpios = <&gpio0 2 1>; - linux,code = <0x101>; + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; }; }; +}; - ehci@101c0000 { - status = "okay"; - }; +&gsw { + mediatek,port4 = "gmac"; +}; - ohci@101c1000 { - status = "okay"; - }; +&sdhci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; }; diff --git a/target/linux/ramips/dts/MT7620a_MT7530.dts b/target/linux/ramips/dts/MT7620a_MT7530.dts index d5d5d77401..5885ed045d 100644 --- a/target/linux/ramips/dts/MT7620a_MT7530.dts +++ b/target/linux/ramips/dts/MT7620a_MT7530.dts @@ -5,115 +5,113 @@ / { compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc"; model = "Ralink MT7620a + MT7530 evaluation board"; +}; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; }; - }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf"; - ralink,function = "gpio"; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; }; - }; - - ethernet@10100000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mediatek,portmap = "llllw"; - port@5 { - status = "okay"; - mediatek,fixed-link = <1000 1 1 1>; - phy-mode = "rgmii"; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; }; - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@0 { - reg = <0>; - phy-mode = "rgmii"; - }; - - phy1: ethernet-phy@1 { - reg = <1>; - phy-mode = "rgmii"; - }; - - phy2: ethernet-phy@2 { - reg = <2>; - phy-mode = "rgmii"; - }; - - phy3: ethernet-phy@3 { - reg = <3>; - phy-mode = "rgmii"; - }; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; - - phy1f: ethernet-phy@1f { - reg = <0x1f>; - phy-mode = "rgmii"; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; }; }; +}; - gsw@10110000 { - mediatek,port4 = "gmac"; - mediatek,mt7530 = <1>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf"; + ralink,function = "gpio"; + }; }; +}; - pcie@10140000 { - status = "okay"; - }; +ðernet { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + mediatek,portmap = "llllw"; - ehci@101c0000 { + port@5 { status = "okay"; + mediatek,fixed-link = <1000 1 1 1>; + phy-mode = "rgmii"; }; - ohci@101c1000 { + mdio-bus { status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "rgmii"; + }; + + phy1: ethernet-phy@1 { + reg = <1>; + phy-mode = "rgmii"; + }; + + phy2: ethernet-phy@2 { + reg = <2>; + phy-mode = "rgmii"; + }; + + phy3: ethernet-phy@3 { + reg = <3>; + phy-mode = "rgmii"; + }; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + phy1f: ethernet-phy@1f { + reg = <0x1f>; + phy-mode = "rgmii"; + }; }; }; + +&gsw { + mediatek,port4 = "gmac"; + mediatek,mt7530 = <1>; +}; + +&pcie { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/MT7620a_MT7610e.dts b/target/linux/ramips/dts/MT7620a_MT7610e.dts index 696d4d05ca..52ceddcbc8 100644 --- a/target/linux/ramips/dts/MT7620a_MT7610e.dts +++ b/target/linux/ramips/dts/MT7620a_MT7610e.dts @@ -6,67 +6,6 @@ compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc"; model = "Ralink MT7620A evaluation board"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <1000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - ethernet@10100000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mediatek,portmap = "llllw"; - }; - - gsw@10110000 { - mediatek,port4 = "ephy"; - }; - - sdhci@10130000 { - status = "okay"; - }; - - pcie@10140000 { - status = "okay"; - }; - gpio-keys-polled { compatible = "gpio-keys"; #address-cells = <1>; @@ -86,3 +25,62 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <1000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +ðernet { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mediatek,portmap = "llllw"; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&sdhci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/MT7620a_V22SG.dts b/target/linux/ramips/dts/MT7620a_V22SG.dts index 8dff80d40a..a3e206e5dd 100644 --- a/target/linux/ramips/dts/MT7620a_V22SG.dts +++ b/target/linux/ramips/dts/MT7620a_V22SG.dts @@ -6,64 +6,6 @@ compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc"; model = "Ralink MT7620a V22SG High Power evaluation board"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf", "spi"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mediatek,portmap = "llllw"; - - port@4 { - status = "okay"; - phy-handle = <&phy4>; - phy-mode = "rgmii"; - }; - - port@5 { - status = "okay"; - phy-handle = <&phy5>; - phy-mode = "rgmii"; - }; - - mdio-bus { - status = "okay"; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; - - phy5: ethernet-phy@5 { - reg = <5>; - phy-mode = "rgmii"; - }; - }; - }; - - gsw@10110000 { - mediatek,port4 = "gmac"; - }; - - pcie@10140000 { - status = "okay"; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -112,3 +54,61 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "spi"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + mediatek,portmap = "llllw"; + + port@4 { + status = "okay"; + phy-handle = <&phy4>; + phy-mode = "rgmii"; + }; + + port@5 { + status = "okay"; + phy-handle = <&phy5>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; + }; + }; +}; + +&gsw { + mediatek,port4 = "gmac"; +}; + +&pcie { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/MT7621.dts b/target/linux/ramips/dts/MT7621.dts index 341d8f2a70..4013f3c7b5 100644 --- a/target/linux/ramips/dts/MT7621.dts +++ b/target/linux/ramips/dts/MT7621.dts @@ -15,23 +15,6 @@ bootargs = "console=ttyS0,57600"; }; - sdhci@10130000 { - status = "okay"; - }; - - xhci@1E1C0000 { - status = "okay"; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; - ralink,function = "gpio"; - }; - }; - }; - nand@1e003000 { partition@0 { label = "uboot"; @@ -54,3 +37,20 @@ }; }; }; + +&sdhci { + status = "okay"; +}; + +&xhci { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/MT7628.dts b/target/linux/ramips/dts/MT7628.dts index 25359f7e7c..a4b066cfd5 100644 --- a/target/linux/ramips/dts/MT7628.dts +++ b/target/linux/ramips/dts/MT7628.dts @@ -10,56 +10,58 @@ device_type = "memory"; reg = <0x0 0x2000000>; }; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag"; + ralink,function = "gpio"; }; }; +}; - wmac@10300000 { - status = "okay"; - }; +&wmac { + status = "okay"; +}; - palmbus@10000000 { - spi@b00 { - status = "okay"; +&spi0 { + status = "okay"; - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; }; }; }; + +&wmac { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/MZK-750DHP.dts b/target/linux/ramips/dts/MZK-750DHP.dts index 40439ba7a0..01fe2a1e24 100644 --- a/target/linux/ramips/dts/MZK-750DHP.dts +++ b/target/linux/ramips/dts/MZK-750DHP.dts @@ -6,89 +6,6 @@ compatible = "ralink,mt7620a-soc"; model = "Planex MZK-750DHP"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi refclk", "rgmii1", "nd_sd"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - gsw@10110000 { - mediatek,port4 = "ephy"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -127,3 +44,84 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi refclk", "rgmii1", "nd_sd"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; +}; diff --git a/target/linux/ramips/dts/MZK-DP150N.dts b/target/linux/ramips/dts/MZK-DP150N.dts index 10afc065ce..86f82ba59a 100644 --- a/target/linux/ramips/dts/MZK-DP150N.dts +++ b/target/linux/ramips/dts/MZK-DP150N.dts @@ -6,76 +6,6 @@ compatible = "MZK-DP150N", "ralink,rt5350-soc"; model = "Planex MZK-DP150N"; - palmbus@10000000 { - gpio1: gpio@660 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "uboot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "uboot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - - spidev@1 { - compatible = "linux,spidev"; - spi-max-frequency = <10000000>; - reg = <1>; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "jtag", "uartf", "led"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x17>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - ralink,led-polarity = <1>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -98,3 +28,73 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "uboot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "uboot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&spi1 { + spidev@0 { + compatible = "linux,spidev"; + spi-max-frequency = <10000000>; + reg = <0>; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "jtag", "uartf", "led"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x17>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; + ralink,led-polarity = <1>; +}; diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts b/target/linux/ramips/dts/MZK-EX300NP.dts index 1386f5f606..05c79d3faf 100644 --- a/target/linux/ramips/dts/MZK-EX300NP.dts +++ b/target/linux/ramips/dts/MZK-EX300NP.dts @@ -6,77 +6,6 @@ compatible = "ralink,mt7620a-soc"; model = "Planex MZK-EX300NP"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x730000>; - }; - - partition@780000 { - label = "Udata"; - reg = <0x780000 0x80000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "spi refclk", "rgmii1", "wled"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -130,3 +59,72 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x730000>; + }; + + partition@780000 { + label = "Udata"; + reg = <0x780000 0x80000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi refclk", "rgmii1", "wled"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/MZK-EX750NP.dts b/target/linux/ramips/dts/MZK-EX750NP.dts index 64fe3aa2f3..565b4356f0 100644 --- a/target/linux/ramips/dts/MZK-EX750NP.dts +++ b/target/linux/ramips/dts/MZK-EX750NP.dts @@ -6,90 +6,6 @@ compatible = "ralink,mt7620a-soc"; model = "Planex MZK-EX750NP"; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x730000>; - }; - - partition@780000 { - label = "Udata"; - reg = <0x780000 0x80000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "uartf", "nd_sd", "rgmii2", "wled"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -148,3 +64,85 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x730000>; + }; + + partition@780000 { + label = "Udata"; + reg = <0x780000 0x80000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "uartf", "nd_sd", "rgmii2", "wled"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; +}; diff --git a/target/linux/ramips/dts/MZK-W300NH2.dts b/target/linux/ramips/dts/MZK-W300NH2.dts index c953805f3f..987d6a7c0d 100644 --- a/target/linux/ramips/dts/MZK-W300NH2.dts +++ b/target/linux/ramips/dts/MZK-W300NH2.dts @@ -6,15 +6,6 @@ compatible = "MZK-W300NH2", "ralink,rt3052-soc"; model = "Planex MZK-W300NH2"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -53,18 +44,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -109,3 +88,24 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/MZK-WDPR.dts b/target/linux/ramips/dts/MZK-WDPR.dts index ae77fa3b51..ff26b153b6 100644 --- a/target/linux/ramips/dts/MZK-WDPR.dts +++ b/target/linux/ramips/dts/MZK-WDPR.dts @@ -10,15 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -58,22 +49,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - otg@101c0000 { - status = "okay"; - }; - gpio-export { compatible = "gpio-export"; @@ -84,3 +59,28 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts index 40fcadbd1c..07e01550a7 100644 --- a/target/linux/ramips/dts/MicroWRT.dts +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -10,84 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x20000>; - read-only; - }; - - partition@20000 { - label = "u-boot-env"; - reg = <0x20000 0x10000>; - read-only; - }; - - factory: partition@30000 { - label = "factory"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "firmware"; - reg = <0x40000 0xfc0000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - pcie@10140000 { - status = "okay"; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "wled", "i2c", "wdt", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -107,3 +29,79 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label = "u-boot-env"; + reg = <0x20000 0x10000>; + read-only; + }; + + factory: partition@30000 { + label = "factory"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "firmware"; + reg = <0x40000 0xfc0000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "wled", "i2c", "wdt", "uartf"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/NA930.dts b/target/linux/ramips/dts/NA930.dts index 9b54d72d53..4093932a50 100644 --- a/target/linux/ramips/dts/NA930.dts +++ b/target/linux/ramips/dts/NA930.dts @@ -10,34 +10,6 @@ bootargs = "console=ttyS1,57600"; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "rgmii2", "spi", "ephy"; - ralink,function = "gpio"; - }; - - uartf_gpio { - ralink,group = "uartf"; - ralink,function = "gpio uartf"; - }; - }; - }; - - palmbus@10000000 { - uart@500 { - status = "okay"; - }; - - gpio@638 { - status = "okay"; - }; - - gpio@660 { - status = "okay"; - }; - }; - nand { #address-cells = <1>; #size-cells = <1>; @@ -67,39 +39,6 @@ }; }; - ethernet@10100000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mediatek,portmap = "llllw"; - - port@4 { - status = "okay"; - phy-handle = <&phy4>; - phy-mode = "rgmii"; - }; - - port@5 { - status = "okay"; - phy-handle = <&phy5>; - phy-mode = "rgmii"; - }; - - mdio-bus { - status = "okay"; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; - - phy5: ethernet-phy@5 { - reg = <5>; - phy-mode = "rgmii"; - }; - }; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -159,16 +98,75 @@ gpios = <&gpio0 13 0>; }; }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "rgmii2", "spi", "ephy"; + ralink,function = "gpio"; + }; + + uartf_gpio { + ralink,group = "uartf"; + ralink,function = "gpio uartf"; + }; + }; +}; + +&uart { + status = "okay"; +}; - gsw@10110000 { - mediatek,port4 = "gmac"; +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +ðernet { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &mdio_pins>; + mediatek,portmap = "llllw"; + + port@4 { + status = "okay"; + phy-handle = <&phy4>; + phy-mode = "rgmii"; }; - ehci@101c0000 { + port@5 { status = "okay"; + phy-handle = <&phy5>; + phy-mode = "rgmii"; }; - ohci@101c1000 { + mdio-bus { status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; + }; }; }; + +&gsw { + mediatek,port4 = "gmac"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/NBG-419N.dts b/target/linux/ramips/dts/NBG-419N.dts index d1ad8189ca..59ab665da7 100644 --- a/target/linux/ramips/dts/NBG-419N.dts +++ b/target/linux/ramips/dts/NBG-419N.dts @@ -6,15 +6,6 @@ compatible = "NBG-419N", "ralink,rt3052-soc"; model = "ZyXEL NBG-419N"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -92,3 +71,24 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/NCS601W.dts b/target/linux/ramips/dts/NCS601W.dts index 65ef3c5a91..1942b0f908 100644 --- a/target/linux/ramips/dts/NCS601W.dts +++ b/target/linux/ramips/dts/NCS601W.dts @@ -5,71 +5,69 @@ / { compatible = "NCS601W", "ralink,rt5350-soc"; model = "Wansview NCS601W"; +}; - palmbus@10000000 { - spi@b00 { - status = "okay"; +&spi0 { + status = "okay"; - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; }; }; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; - ehci@101c0000 { - status = "okay"; - }; +&ehci { + status = "okay"; +}; - ohci@101c1000 { - status = "okay"; - }; +&ohci { + status = "okay"; }; diff --git a/target/linux/ramips/dts/NW718.dts b/target/linux/ramips/dts/NW718.dts index ec8c017edb..06c6b0d62d 100644 --- a/target/linux/ramips/dts/NW718.dts +++ b/target/linux/ramips/dts/NW718.dts @@ -6,65 +6,6 @@ compatible = "NW718", "ralink,rt3050-soc"; model = "Netcore NW718"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <25000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "config"; - reg = <0x30000 0x20000>; - read-only; - }; - - factory: partition@50000 { - label = "factory"; - reg = <0x50000 0x10000>; - read-only; - }; - - partition@60000 { - label = "firmware"; - reg = <0x60000 0x3a0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -102,8 +43,65 @@ linux,code = <0x211>; }; }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <25000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x20000>; + read-only; + }; + + factory: partition@50000 { + label = "factory"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + label = "firmware"; + reg = <0x60000 0x3a0000>; + }; + }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/OY-0001.dts b/target/linux/ramips/dts/OY-0001.dts index facd8d02af..6bf1ad6be7 100644 --- a/target/linux/ramips/dts/OY-0001.dts +++ b/target/linux/ramips/dts/OY-0001.dts @@ -10,76 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mediatek,portmap = "llllw"; - }; - - gsw@10110000 { - mediatek,port4 = "ephy"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -94,22 +24,6 @@ }; }; - sdhci@10130000 { - status = "okay"; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - pcie@10140000 { - status = "okay"; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -123,3 +37,86 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mediatek,portmap = "llllw"; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&sdhci { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/PBR-M1.dts b/target/linux/ramips/dts/PBR-M1.dts index 9703a1bcb3..ac77cd5c6a 100644 --- a/target/linux/ramips/dts/PBR-M1.dts +++ b/target/linux/ramips/dts/PBR-M1.dts @@ -15,61 +15,8 @@ bootargs = "console=ttyS0,115200"; }; - sdhci@10130000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&sdhci_pins>; - }; - - xhci@1E1C0000 { - status = "okay"; - }; - - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - - }; - }; - - i2c@900 { - compatible = "ralink,i2c-mt7621"; - reg = <0x900 0x100>; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&i2c_pins>; + palmbus: palmbus@1E000000 { + i2c: i2c@900 { status = "okay"; pcf8563: rtc@51 { @@ -80,32 +27,6 @@ }; }; - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,5ghz = <0>; - }; - }; - }; - - ethernet@1e100000 { - mtd-mac-address = <&factory 0xe000>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -175,13 +96,87 @@ compatible = "gpio-beeper"; gpios = <&gpio0 26 1>; }; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wdt", "rgmii2", "jtag", "mdio"; - ralink,function = "gpio"; - }; +&sdhci { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&sdhci_pins>; +}; + +&xhci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; + + + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "rgmii2", "jtag", "mdio"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/dts/PSG1208.dts b/target/linux/ramips/dts/PSG1208.dts index 915aa10024..dc1adc4c73 100644 --- a/target/linux/ramips/dts/PSG1208.dts +++ b/target/linux/ramips/dts/PSG1208.dts @@ -6,85 +6,6 @@ compatible = "PSG1208", "ralink,mt7620a-soc"; model = "Phicomm PSG1208"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@20000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@30000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@40000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - pcie@10140000 { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -112,3 +33,80 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@20000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@30000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@40000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/PSR-680W.dts b/target/linux/ramips/dts/PSR-680W.dts index f8531e99b5..c4c4522afc 100644 --- a/target/linux/ramips/dts/PSR-680W.dts +++ b/target/linux/ramips/dts/PSR-680W.dts @@ -10,15 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -51,18 +42,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -84,8 +63,29 @@ linux,code = <0x198>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/PWH2004.dts b/target/linux/ramips/dts/PWH2004.dts index 26cf58e770..51f43928f4 100644 --- a/target/linux/ramips/dts/PWH2004.dts +++ b/target/linux/ramips/dts/PWH2004.dts @@ -6,15 +6,6 @@ compatible = "PWH2004", "ralink,rt3052-soc"; model = "Prolink PWH2004"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -73,12 +64,21 @@ linux,code = <0x198>; }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; }; diff --git a/target/linux/ramips/dts/PX-4885-4M.dts b/target/linux/ramips/dts/PX-4885-4M.dts index ddf7d7df1b..fb2b14cdc1 100644 --- a/target/linux/ramips/dts/PX-4885-4M.dts +++ b/target/linux/ramips/dts/PX-4885-4M.dts @@ -2,42 +2,38 @@ #include "PX-4885.dtsi" -/ { - palmbus@10000000 { - spi@b00 { - status = "okay"; +&spi0 { + status = "okay"; - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; - partition@0 { - label = "u-boot"; - reg = <0x0 0x20000>; - read-only; - }; + partition@0 { + label = "u-boot"; + reg = <0x0 0x20000>; + read-only; + }; - partition@20000 { - label = "devdata"; - reg = <0x20000 0x20000>; - read-only; - }; + partition@20000 { + label = "devdata"; + reg = <0x20000 0x20000>; + read-only; + }; - factory: partition@40000 { - label = "devconf"; - reg = <0x40000 0x10000>; - read-only; - }; + factory: partition@40000 { + label = "devconf"; + reg = <0x40000 0x10000>; + read-only; + }; - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; }; }; }; diff --git a/target/linux/ramips/dts/PX-4885-8M.dts b/target/linux/ramips/dts/PX-4885-8M.dts index 062e1b3258..6367a5eb2d 100644 --- a/target/linux/ramips/dts/PX-4885-8M.dts +++ b/target/linux/ramips/dts/PX-4885-8M.dts @@ -2,42 +2,38 @@ #include "PX-4885.dtsi" -/ { - palmbus@10000000 { - spi@b00 { - status = "okay"; +&spi0 { + status = "okay"; - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; - partition@0 { - label = "u-boot"; - reg = <0x0 0x20000>; - read-only; - }; + partition@0 { + label = "u-boot"; + reg = <0x0 0x20000>; + read-only; + }; - partition@20000 { - label = "devdata"; - reg = <0x20000 0x20000>; - read-only; - }; + partition@20000 { + label = "devdata"; + reg = <0x20000 0x20000>; + read-only; + }; - factory: partition@40000 { - label = "devconf"; - reg = <0x40000 0x10000>; - read-only; - }; + factory: partition@40000 { + label = "devconf"; + reg = <0x40000 0x10000>; + read-only; + }; - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; }; }; }; diff --git a/target/linux/ramips/dts/PX-4885.dtsi b/target/linux/ramips/dts/PX-4885.dtsi index 7d846afdb5..b135b5747b 100644 --- a/target/linux/ramips/dts/PX-4885.dtsi +++ b/target/linux/ramips/dts/PX-4885.dtsi @@ -4,27 +4,6 @@ compatible = "PX-4885", "ralink,rt5350-soc"; model = "7Links PX-4885"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -52,3 +31,24 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/RE6500.dts b/target/linux/ramips/dts/RE6500.dts index 9887c2868b..39205c41ac 100644 --- a/target/linux/ramips/dts/RE6500.dts +++ b/target/linux/ramips/dts/RE6500.dts @@ -15,79 +15,6 @@ bootargs = "console=ttyS0,57600"; }; - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uart2", "uart3", "rgmii2"; - ralink,function = "gpio"; - }; - }; - }; - - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,2ghz = <0>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,5ghz = <0>; - }; - }; - }; - - ethernet@1e100000 { - mtd-mac-address = <&factory 0x2e>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -121,3 +48,74 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,5ghz = <0>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x2e>; +}; diff --git a/target/linux/ramips/dts/RP-N53.dts b/target/linux/ramips/dts/RP-N53.dts index cb0f28a533..c661be3a28 100644 --- a/target/linux/ramips/dts/RP-N53.dts +++ b/target/linux/ramips/dts/RP-N53.dts @@ -6,89 +6,6 @@ compatible = "asus,rp-n53", "ralink,mt7620a-soc"; model = "Asus RP-N53"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - - i2c@900 { - status = "okay"; - }; - - i2s@a00 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pcm_i2s_pins>; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - - pcm@2000 { - status = "okay"; - }; - - gdma@2800 { - status = "okay"; - }; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "mdio", "rgmii1"; - ralink,function = "gpio"; - }; - }; - }; - - gsw@10110000 { - mediatek,port4 = "ephy"; - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - }; - - pcie@10140000 { - status = "okay"; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -164,3 +81,84 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&i2c { + status = "okay"; +}; + +&i2s { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pcm_i2s_pins>; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pcm { + status = "okay"; +}; + +&gdma { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "mdio", "rgmii1"; + ralink,function = "gpio"; + }; + }; +}; + +&gsw { + mediatek,port4 = "ephy"; + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; +}; + +&pcie { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/RT-G32-B1.dts b/target/linux/ramips/dts/RT-G32-B1.dts index 3f5c0c1135..ab8e3fdad3 100644 --- a/target/linux/ramips/dts/RT-G32-B1.dts +++ b/target/linux/ramips/dts/RT-G32-B1.dts @@ -6,65 +6,6 @@ compatible = "RT-G32-B1", "ralink,rt3050-soc"; model = "Asus RT-G32 B1"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "devdata"; - reg = <0x30000 0x10000>; - read-only; - }; - - devconf: partition@40000 { - label = "devconf"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&devconf 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&devconf 0>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -84,3 +25,60 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "devdata"; + reg = <0x30000 0x10000>; + read-only; + }; + + devconf: partition@40000 { + label = "devconf"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&devconf 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&devconf 0>; +}; diff --git a/target/linux/ramips/dts/RT-N10-PLUS.dts b/target/linux/ramips/dts/RT-N10-PLUS.dts index 2ce6b598a7..43535d417b 100644 --- a/target/linux/ramips/dts/RT-N10-PLUS.dts +++ b/target/linux/ramips/dts/RT-N10-PLUS.dts @@ -38,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&devconf 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&devconf 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -78,3 +66,15 @@ }; }; }; + +ðernet { + mtd-mac-address = <&devconf 0x4>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&devconf 0>; +}; diff --git a/target/linux/ramips/dts/RT-N13U.dts b/target/linux/ramips/dts/RT-N13U.dts index 49a83149b6..14cff67855 100644 --- a/target/linux/ramips/dts/RT-N13U.dts +++ b/target/linux/ramips/dts/RT-N13U.dts @@ -6,15 +6,6 @@ compatible = "RT-N13U", "ralink,rt3052-soc"; model = "Asus RT-N13U"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -79,20 +70,29 @@ linux,code = <0x211>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +ðernet { + mtd-mac-address = <&factory 0x28>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; - otg@101c0000 { - status = "okay"; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/RT-N14U.dts b/target/linux/ramips/dts/RT-N14U.dts index 38ab1b13e0..05263e165d 100644 --- a/target/linux/ramips/dts/RT-N14U.dts +++ b/target/linux/ramips/dts/RT-N14U.dts @@ -6,78 +6,6 @@ compatible = "asus,rt-n14u", "ralink,mt7620n-soc"; model = "Asus RT-N14U"; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "ephy", "wled", "i2c"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -126,3 +54,73 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "ephy", "wled", "i2c"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/RT-N15.dts b/target/linux/ramips/dts/RT-N15.dts index 638aba7413..d5bcbe3409 100644 --- a/target/linux/ramips/dts/RT-N15.dts +++ b/target/linux/ramips/dts/RT-N15.dts @@ -8,21 +8,6 @@ compatible = "RT-N15", "ralink,rt2880-soc"; model = "Asus RT-N15"; - palmbus@300000 { - gpio0: gpio@600 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartlite", "mdio"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -55,34 +40,12 @@ }; }; - ethernet@400000 { - status = "okay"; - mtd-mac-address = <&factory 0x4>; - - port@0 { - mediatek,fixed-link = <1000 1 1 1>; - }; - - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@0 { - phy-mode = "mii"; - reg = <0>; - }; - }; - }; - rtl8366s { compatible = "realtek,rtl8366s"; gpio-sda = <&gpio0 1 0>; gpio-sck = <&gpio0 2 0>; }; - wmac@480000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -111,3 +74,38 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartlite", "mdio"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x4>; + + port@0 { + mediatek,fixed-link = <1000 1 1 1>; + }; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@0 { + phy-mode = "mii"; + reg = <0>; + }; + }; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/RT-N56U.dts b/target/linux/ramips/dts/RT-N56U.dts index ce4ed70c69..d3a1f1bbfb 100644 --- a/target/linux/ramips/dts/RT-N56U.dts +++ b/target/linux/ramips/dts/RT-N56U.dts @@ -6,68 +6,6 @@ compatible = "RT-N56U", "ralink,rt3883-soc"; model = "Asus RT-N56U"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - - port@0 { - mediatek,fixed-link = <1000 1 1 1>; - }; - }; - - pci@10140000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pci_pins>; - - pci_pins: pci { - pci { - ralink,group = "pci"; - ralink,function = "pci-fnc"; - }; - }; - - host-bridge { - pci-bridge@1 { - status = "okay"; - - wmac@0,0 { - compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604"; - reg = < 0x10000 0 0 0 0 >; - ralink,eeprom = "rt2x00pci_1_0.eeprom"; - }; - }; - }; - }; - - wmac@10180000 { - status = "okay"; - ralink,2ghz = <0>; - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - nor-flash@1c000000 { compatible = "cfi-flash"; reg = <0x1c000000 0x800000>; @@ -149,3 +87,63 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + + port@0 { + mediatek,fixed-link = <1000 1 1 1>; + }; +}; + +&pci { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pci_pins>; + + pci_pins: pci { + pci { + ralink,group = "pci"; + ralink,function = "pci-fnc"; + }; + }; + + host-bridge { + pci-bridge@1 { + status = "okay"; + + wmac@0,0 { + compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604"; + reg = < 0x10000 0 0 0 0 >; + ralink,eeprom = "rt2x00pci_1_0.eeprom"; + }; + }; + }; +}; + +&wmac { + status = "okay"; + ralink,2ghz = <0>; + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/RT5350F-OLINUXINO-EVB.dts b/target/linux/ramips/dts/RT5350F-OLINUXINO-EVB.dts index f33451f659..6c45d7a56e 100644 --- a/target/linux/ramips/dts/RT5350F-OLINUXINO-EVB.dts +++ b/target/linux/ramips/dts/RT5350F-OLINUXINO-EVB.dts @@ -6,78 +6,6 @@ compatible = "RT5350F-OLINUXINO-EVB", "ralink,rt5350-soc"; model = "Olimex RT5350F-OLinuXino-EVB"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - - gpio1: gpio@660 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <0x17>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio_export { compatible = "gpio-export"; #size-cells = <0>; @@ -100,3 +28,73 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <0x17>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/RT5350F-OLINUXINO.dts b/target/linux/ramips/dts/RT5350F-OLINUXINO.dts index 8c2ea5bc4f..e59b418121 100644 --- a/target/linux/ramips/dts/RT5350F-OLINUXINO.dts +++ b/target/linux/ramips/dts/RT5350F-OLINUXINO.dts @@ -5,76 +5,74 @@ / { compatible = "RT5350F-OLINUXINO", "ralink,rt5350-soc"; model = "Olimex RT5350F-OLinuXino"; +}; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; +&spi0 { + status = "okay"; - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; }; - gpio1: gpio@660 { - status = "okay"; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; }; }; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; +&gpio1 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <0x17>; - }; +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <0x17>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; - ehci@101c0000 { - status = "okay"; - }; +&ehci { + status = "okay"; +}; - ohci@101c1000 { - status = "okay"; - }; +&ohci { + status = "okay"; }; diff --git a/target/linux/ramips/dts/RUT5XX.dts b/target/linux/ramips/dts/RUT5XX.dts index f70a04d04a..85c26d96be 100644 --- a/target/linux/ramips/dts/RUT5XX.dts +++ b/target/linux/ramips/dts/RUT5XX.dts @@ -6,65 +6,6 @@ compatible = "RUT5XX", "ralink,rt3050-soc"; model = "Teltonika RUT5XX"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "n25q128a13"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -86,8 +27,65 @@ linux,code = <0x198>; }; }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "n25q128a13"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/SAP-G3200U3.dts b/target/linux/ramips/dts/SAP-G3200U3.dts index 343742b5dd..d6f2f30576 100644 --- a/target/linux/ramips/dts/SAP-G3200U3.dts +++ b/target/linux/ramips/dts/SAP-G3200U3.dts @@ -15,76 +15,6 @@ bootargs = "console=ttyS0,57600"; }; - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x1000>; - read-only; - }; - - partition@31000 { - label = "config"; - reg = <0x31000 0xf000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,5ghz = <0>; - }; - }; - }; - - ethernet@1e100000 { - mtd-mac-address = <&factory 0xe006>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -112,13 +42,81 @@ linux,code = <0xf7>; }; }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x1000>; + read-only; + }; + + partition@31000 { + label = "config"; + reg = <0x31000 0xf000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe006>; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "uart3", "jtag"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "uart3", "jtag"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000000..1fed89e11e --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,124 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows Whitebox 8"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 14 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 15 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 11 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio1 9 1>; + linux,code = <0x198>; + }; + }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + partition@e30000 { + label = "recovery"; + reg = <0xe30000 0x1d0000>; + }; + + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/SL-R7205.dts b/target/linux/ramips/dts/SL-R7205.dts index 0b09665495..f5884fbecd 100644 --- a/target/linux/ramips/dts/SL-R7205.dts +++ b/target/linux/ramips/dts/SL-R7205.dts @@ -6,15 +6,6 @@ compatible = "SL-R7205", "ralink,rt3052-soc"; model = "Skyline SL-R7205 Wireless 3G Router"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -86,8 +65,29 @@ linux,code = <0x211>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/TEW-691GR.dts b/target/linux/ramips/dts/TEW-691GR.dts index 73e342278d..750c24fbe9 100644 --- a/target/linux/ramips/dts/TEW-691GR.dts +++ b/target/linux/ramips/dts/TEW-691GR.dts @@ -6,42 +6,6 @@ compatible = "TEW-691GR", "ralink,rt3883-soc"; model = "TRENDnet TEW-691GR"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - - port@0 { - phy-handle = <&phy0>; - phy-mode = "rgmii"; - }; - - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@0 { - reg = <0>; - }; - }; - }; - - wmac@10180000 { - ralink,5ghz = <0>; - }; - nor-flash@1c000000 { compatible = "cfi-flash"; reg = <0x1c000000 0x800000>; @@ -107,3 +71,37 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; + + port@0 { + phy-handle = <&phy0>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; +}; + +&wmac { + ralink,5ghz = <0>; +}; diff --git a/target/linux/ramips/dts/TEW-692GR.dts b/target/linux/ramips/dts/TEW-692GR.dts index 760ea83125..5bba8a50b8 100644 --- a/target/linux/ramips/dts/TEW-692GR.dts +++ b/target/linux/ramips/dts/TEW-692GR.dts @@ -6,62 +6,6 @@ compatible = "TEW-692GR", "ralink,rt3883-soc"; model = "TRENDnet TEW-692GR"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - status = "okay"; - mtd-mac-address = <&factory 0x28>; - - port@0 { - phy-handle = <&phy0>; - phy-mode = "rgmii"; - }; - - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@0 { - reg = <0>; - }; - }; - }; - - pci@10140000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pci_pins>; - - pci_pins: pci { - pci { - ralink,group = "pci"; - ralink,function = "pci-fnc"; - }; - }; - - host-bridge { - pci-bridge@1 { - status = "okay"; - }; - }; - }; - - wmac@10180000 { - ralink,5ghz = <0>; - }; - nor-flash@1c000000 { compatible = "cfi-flash"; reg = <0x1c000000 0x800000>; @@ -126,3 +70,57 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x28>; + + port@0 { + phy-handle = <&phy0>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; +}; + +&pci { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pci_pins>; + + pci_pins: pci { + pci { + ralink,group = "pci"; + ralink,function = "pci-fnc"; + }; + }; + + host-bridge { + pci-bridge@1 { + status = "okay"; + }; + }; +}; + +&wmac { + ralink,5ghz = <0>; +}; diff --git a/target/linux/ramips/dts/TINY-AC.dts b/target/linux/ramips/dts/TINY-AC.dts index c1ad65a728..6a21247767 100644 --- a/target/linux/ramips/dts/TINY-AC.dts +++ b/target/linux/ramips/dts/TINY-AC.dts @@ -10,120 +10,6 @@ bootargs = "console=ttyS0,57600"; }; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mediatek,portmap = "llllw"; - - port@4 { - status = "okay"; - phy-mode = "rgmii"; - phy-handle = <&phy4>; - }; - - port@5 { - status = "okay"; - phy-mode = "rgmii"; - phy-handle = <&phy5>; - }; - - mdio-bus { - status = "okay"; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; - - phy5: ethernet-phy@5 { - reg = <5>; - phy-mode = "rgmii"; - }; - }; - }; - - gsw@10110000 { - mediatek,port4 = "gmac"; - mediatek,mt7530 = <1>; - - }; - - wmac@10180000 { - ralink,eeprom = "rt2x00pci_1_0.eeprom"; - }; - - pcie@10140000 { - status = "okay"; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "uartf", "nd_sd", "wled"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -164,3 +50,114 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + mediatek,portmap = "llllw"; + + port@4 { + status = "okay"; + phy-mode = "rgmii"; + phy-handle = <&phy4>; + }; + + port@5 { + status = "okay"; + phy-mode = "rgmii"; + phy-handle = <&phy5>; + }; + + mdio-bus { + status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; + }; + }; +}; + +&gsw { + mediatek,port4 = "gmac"; + mediatek,mt7530 = <1>; +}; + +&wmac { + ralink,eeprom = "rt2x00pci_1_0.eeprom"; +}; + +&pcie { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "uartf", "nd_sd", "wled"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/UBNT-ERX.dts b/target/linux/ramips/dts/UBNT-ERX.dts index ec31a37f0b..713519d5d9 100644 --- a/target/linux/ramips/dts/UBNT-ERX.dts +++ b/target/linux/ramips/dts/UBNT-ERX.dts @@ -17,30 +17,6 @@ bootargs = "console=ttyS0,57600"; }; - palmbus@1E000000 { - spi@b00 { - /* This board has 2Mb spi flash soldered in and visible - from manufacturer's firmware. - But this SoC shares spi and nand pins, - and current driver does't handle this sharing well */ - status = "disabled"; - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <1>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "spi"; - reg = <0x0 0x200000>; - read-only; - }; - }; - }; - }; - nand@1e003000 { status = "okay"; @@ -78,27 +54,6 @@ }; - ethernet@1e100000 { - mtd-mac-address = <&factory 0x22>; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "uart2", "uart3", "i2c", "pcie", "rgmii2", "jtag"; - ralink,function = "gpio"; - }; - }; - }; - - sdhci@1E130000 { - status = "disabled"; - }; - - pcie@1e140000 { - status = "disabled"; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -112,3 +67,46 @@ }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x22>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "uart2", "uart3", "i2c", "pcie", "rgmii2", "jtag"; + ralink,function = "gpio"; + }; + }; +}; + +&sdhci { + status = "disabled"; +}; + +&pcie { + status = "disabled"; +}; + +&spi0 { + /* This board has 2Mb spi flash soldered in and visible + from manufacturer's firmware. + But this SoC shares spi and nand pins, + and current driver does't handle this sharing well */ + status = "disabled"; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <1>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "spi"; + reg = <0x0 0x200000>; + read-only; + }; + }; +}; diff --git a/target/linux/ramips/dts/UR-326N4G.dts b/target/linux/ramips/dts/UR-326N4G.dts index 4e64783005..d90d77c061 100644 --- a/target/linux/ramips/dts/UR-326N4G.dts +++ b/target/linux/ramips/dts/UR-326N4G.dts @@ -6,15 +6,6 @@ compatible = "UR-326N4G", "ralink,rt3052-soc"; model = "UPVEL UR-326N4G"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4004>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -106,8 +85,29 @@ linux,code = <0x32>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4004>; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/UR-336UN.dts b/target/linux/ramips/dts/UR-336UN.dts index 869e4311d6..e0325a7c56 100644 --- a/target/linux/ramips/dts/UR-336UN.dts +++ b/target/linux/ramips/dts/UR-336UN.dts @@ -6,15 +6,6 @@ compatible = "UR-336UN", "ralink,rt3052-soc"; model = "UPVEL UR-336UN"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -24,20 +15,6 @@ #size-cells = <1>; }; - /* FIXME: no partitions defined */ -/* ethernet@10100000 { - mtd-mac-address = <&factory 0x4004>; - }; -*/ - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - /* FIXME: no partitions defined */ -/* wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; -*/ gpio-leds { compatible = "gpio-leds"; @@ -85,8 +62,31 @@ linux,code = <0x32>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +/* FIXME: no partitions defined */ +/*ðernet { + mtd-mac-address = <&factory 0x4004>; +}; +*/ +&esw { + mediatek,portmap = <0x2f>; +}; + +/* FIXME: no partitions defined */ +/*&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; +*/ +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/V11STFE.dts b/target/linux/ramips/dts/V11STFE.dts index 9cf3300ba0..6f7a5cbdfd 100644 --- a/target/linux/ramips/dts/V11STFE.dts +++ b/target/linux/ramips/dts/V11STFE.dts @@ -6,21 +6,7 @@ compatible = "V11ST-FE", "ralink,rt2880-soc"; model = "Ralink V11ST-FE"; - palmbus@300000 { - gpio0: gpio@600 { - status = "okay"; - }; - }; - - ethernet@400000 { - status = "okay"; - }; - - wmac@480000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pci@10140000 { + pci@440000 { status = "okay"; host-bridge { @@ -83,3 +69,15 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +ðernet { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/V22RW-2X2.dts b/target/linux/ramips/dts/V22RW-2X2.dts index 8b4325a09a..602e170e60 100644 --- a/target/linux/ramips/dts/V22RW-2X2.dts +++ b/target/linux/ramips/dts/V22RW-2X2.dts @@ -6,15 +6,6 @@ compatible = "V22RW-2X2", "ralink,rt3052-soc"; model = "Ralink AP-RT3052-V22RW-2X2"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,14 +38,6 @@ }; }; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -87,8 +70,25 @@ linux,code = <0x211>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/VOCORE.dtsi b/target/linux/ramips/dts/VOCORE.dtsi index df4461a56f..bb8a458831 100644 --- a/target/linux/ramips/dts/VOCORE.dtsi +++ b/target/linux/ramips/dts/VOCORE.dtsi @@ -4,45 +4,6 @@ compatible = "VoCore", "ralink,rt5350-soc"; model = "VoCore"; - palmbus@10000000 { - gpio1: gpio@660 { - status = "okay"; - }; - - i2c@900 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "jtag", "uartf", "led"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x17>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-export { compatible = "gpio-export"; #size-cells = <0>; @@ -186,6 +147,44 @@ }; }; +&gpio1 { + status = "okay"; +}; + +&i2c { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "jtag", "uartf", "led"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x11>; + mediatek,portdisable = <0x2e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + &spi1 { status = "okay"; diff --git a/target/linux/ramips/dts/W150M.dts b/target/linux/ramips/dts/W150M.dts index e336f70245..679db60af4 100644 --- a/target/linux/ramips/dts/W150M.dts +++ b/target/linux/ramips/dts/W150M.dts @@ -6,15 +6,6 @@ compatible = "W150M", "ralink,rt3050-soc"; model = "Tenda W150M"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -99,16 +90,25 @@ linux,code = <0x100>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; }; diff --git a/target/linux/ramips/dts/W306R_V20.dts b/target/linux/ramips/dts/W306R_V20.dts index 421dea046c..79ae23dd63 100644 --- a/target/linux/ramips/dts/W306R_V20.dts +++ b/target/linux/ramips/dts/W306R_V20.dts @@ -38,27 +38,6 @@ }; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -86,3 +65,24 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/W502U.dts b/target/linux/ramips/dts/W502U.dts index e95cf53d32..739817022b 100644 --- a/target/linux/ramips/dts/W502U.dts +++ b/target/linux/ramips/dts/W502U.dts @@ -10,15 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -51,18 +42,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -95,8 +74,29 @@ linux,code = <0x211>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WCR150GN.dts b/target/linux/ramips/dts/WCR150GN.dts index 71134a3b20..541836b218 100644 --- a/target/linux/ramips/dts/WCR150GN.dts +++ b/target/linux/ramips/dts/WCR150GN.dts @@ -6,15 +6,6 @@ compatible = "WCR150GN", "ralink,rt3050-soc"; model = "Sparklan WCR-150GN"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -79,20 +70,29 @@ linux,code = <0x198>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&esw { + mediatek,portmap = <0x2f>; +}; - otg@101c0000 { - status = "okay"; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; }; diff --git a/target/linux/ramips/dts/WF-2881.dts b/target/linux/ramips/dts/WF-2881.dts index d33436c64a..050bc2e7cc 100644 --- a/target/linux/ramips/dts/WF-2881.dts +++ b/target/linux/ramips/dts/WF-2881.dts @@ -11,12 +11,6 @@ reg = <0x0 0x8000000>; }; - palmbus@1E000000 { - spi@b00 { - status="disabled"; - }; - }; - chosen { bootargs = "console=ttyS0,57600"; }; @@ -54,32 +48,6 @@ }; }; - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,5ghz = <0>; - }; - }; - }; - - ethernet@1e100000 { - mtd-mac-address = <&factory 0xe006>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -106,13 +74,43 @@ linux,code = <0x198>; }; }; +}; + +&spi0 { + status="disabled"; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe006>; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "uart3", "jtag"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "uart3", "jtag"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/dts/WHR-1166D.dts b/target/linux/ramips/dts/WHR-1166D.dts index 5a523b7d73..0c0f62728c 100644 --- a/target/linux/ramips/dts/WHR-1166D.dts +++ b/target/linux/ramips/dts/WHR-1166D.dts @@ -6,98 +6,6 @@ compatible = "ralink,mt7620a-soc"; model = "Buffalo WHR-1166D"; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &mdio_pins>; - - port@5 { - status = "okay"; - phy-handle = <&phy5>; - phy-mode = "rgmii"; - }; - - mdio-bus { - status = "okay"; - - phy5: ethernet-phy@5 { - reg = <5>; - phy-mode = "rgmii"; - }; - }; - }; - - gsw@10110000 { - mediatek,port4 = "ephy"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 32768>; - mediatek,2ghz = <0>; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -170,3 +78,93 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &mdio_pins>; + + port@5 { + status = "okay"; + phy-handle = <&phy5>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; + }; + }; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 32768>; + mediatek,2ghz = <0>; + }; + }; +}; diff --git a/target/linux/ramips/dts/WHR-300HP2.dts b/target/linux/ramips/dts/WHR-300HP2.dts index 89ae89e343..acd4ce47e5 100644 --- a/target/linux/ramips/dts/WHR-300HP2.dts +++ b/target/linux/ramips/dts/WHR-300HP2.dts @@ -6,76 +6,6 @@ compatible = "ralink,mt7620a-soc"; model = "Buffalo WHR-300HP2"; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - - pa { - ralink,group = "pa"; - ralink,function = "pa"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mediatek,portmap = "llllw"; - }; - - gsw@10110000 { - mediatek,port4 = "ephy"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -148,3 +78,71 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + + pa { + ralink,group = "pa"; + ralink,function = "pa"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mediatek,portmap = "llllw"; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/WHR-600D.dts b/target/linux/ramips/dts/WHR-600D.dts index e3d94c0aab..7d26f32b97 100644 --- a/target/linux/ramips/dts/WHR-600D.dts +++ b/target/linux/ramips/dts/WHR-600D.dts @@ -6,76 +6,6 @@ compatible = "ralink,mt7620a-soc"; model = "Buffalo WHR-600D"; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l6405d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - gsw@10110000 { - mediatek,port4 = "ephy"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pcie@10140000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -148,3 +78,71 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WHR-G300N.dts b/target/linux/ramips/dts/WHR-G300N.dts index e3eee41ceb..4f80f2db1a 100644 --- a/target/linux/ramips/dts/WHR-G300N.dts +++ b/target/linux/ramips/dts/WHR-G300N.dts @@ -6,15 +6,6 @@ compatible = "WHR-G300N", "ralink,rt3052-soc"; model = "Buffalo WHR-G300N"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -24,15 +15,6 @@ #size-cells = <1>; }; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - /* FIXME: no partitions defined */ -/* wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; -*/ gpio-leds { compatible = "gpio-leds"; @@ -83,3 +65,22 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +&esw { + mediatek,portmap = <0x2f>; +}; + +/* FIXME: no partitions defined */ +/*&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; +*/ diff --git a/target/linux/ramips/dts/WIDORA-NEO.dts b/target/linux/ramips/dts/WIDORA-NEO.dts new file mode 100644 index 0000000000..406b5ca099 --- /dev/null +++ b/target/linux/ramips/dts/WIDORA-NEO.dts @@ -0,0 +1,169 @@ +/dts-v1/; + +#include "mt7628an.dtsi" + +/ { + compatible = "mediatek,widora-neo", "mediatek,mt7628an-soc"; + model = "Widora-NEO"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wifi { + label = "widora:orange:wifi"; + gpios = <&wgpio 0 0>; + default-state = "on"; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + wps { + label = "reset"; + gpios = <&gpio1 6 1>; + linux,code = <0x211>; + }; + }; + + wgpio: gpio-wifi { + compatible = "mediatek,gpio-wifi"; + #address-cells = <1>; + #size-cells = <0>; + gpio-controller; + #gpio-cells = <2>; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "gpio"; + ralink,function = "gpio"; + }; + + perst { + ralink,group = "perst"; + ralink,function = "gpio"; + }; + + refclk { + ralink,group = "refclk"; + ralink,function = "gpio"; + }; + + i2s { + ralink,group = "i2s"; + ralink,function = "gpio"; + }; + + spis { + ralink,group = "spis"; + ralink,function = "gpio"; + }; + + wled_kn { + ralink,group = "wled_kn"; + ralink,function = "gpio"; + }; + + wled_an { + ralink,group = "wled_an"; + ralink,function = "wled_an"; + }; + + wdt { + ralink,group = "wdt"; + ralink,function = "gpio"; + }; + }; +}; + + +&spi0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <40000000>; + m25p,chunked-io = <31>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x0fb0000>; + }; + }; + + spidev@1 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "linux,spidev"; + reg = <1>; + spi-max-frequency = <40000000>; + }; +}; + +&i2c { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&pwm { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&sdhci { + status = "okay"; + mediatek,cd-low; +}; + +&wmac { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WITI.dts b/target/linux/ramips/dts/WITI.dts index 78e2bc9602..bffd4ff7a9 100644 --- a/target/linux/ramips/dts/WITI.dts +++ b/target/linux/ramips/dts/WITI.dts @@ -15,57 +15,8 @@ bootargs = "console=ttyS0,57600"; }; - sdhci@10130000 { - status = "okay"; - }; - - xhci@1E1C0000 { - status = "okay"; - }; - - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - + palmbus: palmbus@1E000000 { i2c@900 { - compatible = "ralink,i2c-mt7621"; - reg = <0x900 0x100>; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&i2c_pins>; status = "okay"; pcf8563: rtc@51 { @@ -76,34 +27,6 @@ }; }; - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - mtd-mac-address = <&factory 0xe000>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,5ghz = <0>; - mtd-mac-address = <&factory 0xe000>; - }; - }; - }; - - ethernet@1e100000 { - mtd-mac-address = <&factory 0xe000>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -116,13 +39,85 @@ linux,code = <0x198>; }; }; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wdt", "rgmii2", "jtag", "mdio"; - ralink,function = "gpio"; - }; + +&sdhci { + status = "okay"; +}; + +&xhci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + mtd-mac-address = <&factory 0xe000>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + mtd-mac-address = <&factory 0xe000>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "rgmii2", "jtag", "mdio"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/dts/WIZARD8800.dts b/target/linux/ramips/dts/WIZARD8800.dts index 7e9efe1f6e..bbfa61085d 100644 --- a/target/linux/ramips/dts/WIZARD8800.dts +++ b/target/linux/ramips/dts/WIZARD8800.dts @@ -5,79 +5,77 @@ / { compatible = "WIZARD8800", "ralink,rt5350-soc"; model = "EASYACC WI-STOR WIZARD 8800"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; - palmbus@10000000 { - gpio1@638 { - status = "okay"; +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q32"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; }; - gpio2@660 { - status = "okay"; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; }; - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q32"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; }; - }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; +}; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - ehci@101c0000 { - status = "okay"; - }; +&esw { + mediatek,portmap = <0x2f>; +}; - ohci@101c1000 { - status = "okay"; - }; +&ehci { + status = "okay"; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&ohci { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; }; diff --git a/target/linux/ramips/dts/WIZFI630A.dts b/target/linux/ramips/dts/WIZFI630A.dts index 11b44b4f72..0f7ede54df 100644 --- a/target/linux/ramips/dts/WIZFI630A.dts +++ b/target/linux/ramips/dts/WIZFI630A.dts @@ -10,116 +10,6 @@ bootargs = "console=ttyS1,115200"; }; - palmbus@10000000 { - gpio1: gpio@660 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "uboot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "uboot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - - uart@500 { - compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a"; - reg = <0x500 0x100>; - resets = <&rstctrl 12>; - reset-names = "uart"; - interrupt-parent = <&intc>; - interrupts = <5>; - reg-shift = <2>; - pinctrl-names = "default"; - pinctrl-0 = <&uartf_pins>; - status = "okay"; - }; - - uartlite@c00 { - compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a"; - reg = <0xc00 0x100>; - resets = <&rstctrl 19>; - reset-names = "uartl"; - interrupt-parent = <&intc>; - interrupts = <12>; - reg-shift = <2>; - pinctrl-names = "default"; - pinctrl-0 = <&uartlite_pins>; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag" ; - ralink,function = "gpio"; - }; - }; - - uartf_gpio_pins: uartf_gpio { - uartf_gpio { - ralink,group = "uartf"; - ralink,function = "uartf"; - }; - }; - - uartlite_pins: uartlite { - uart { - ralink,group = "uartlite"; - ralink,function = "uartlite"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x17>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-export { compatible = "gpio-export"; #size-cells = <0>; @@ -180,3 +70,115 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + #size-cells = <1>; + label = "uboot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + #size-cells = <1>; + label = "uboot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + #size-cells = <1>; + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + #size-cells = <1>; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&uart { + compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a"; + reg = <0x500 0x100>; + resets = <&rstctrl 12>; + reset-names = "uart"; + interrupt-parent = <&intc>; + interrupts = <5>; + reg-shift = <2>; + pinctrl-names = "default"; + pinctrl-0 = <&uartf_pins>; + status = "okay"; +}; + +&uartlite { + compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a"; + reg = <0xc00 0x100>; + resets = <&rstctrl 19>; + reset-names = "uartl"; + interrupt-parent = <&intc>; + interrupts = <12>; + reg-shift = <2>; + pinctrl-names = "default"; + pinctrl-0 = <&uartlite_pins>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag" ; + ralink,function = "gpio"; + }; + }; + + uartf_gpio_pins: uartf_gpio { + uartf_gpio { + ralink,group = "uartf"; + ralink,function = "uartf"; + }; + }; + + uartlite_pins: uartlite { + uart { + ralink,group = "uartlite"; + ralink,function = "uartlite"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x17>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WL-330N.dts b/target/linux/ramips/dts/WL-330N.dts index 00563d46c2..d3cd74b2ab 100644 --- a/target/linux/ramips/dts/WL-330N.dts +++ b/target/linux/ramips/dts/WL-330N.dts @@ -6,65 +6,6 @@ compatible = "WL-330N", "ralink,rt3050-soc"; model = "Asus WL-330N"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -98,3 +39,60 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/WL-330N3G.dts b/target/linux/ramips/dts/WL-330N3G.dts index f38496ecb8..9290673419 100644 --- a/target/linux/ramips/dts/WL-330N3G.dts +++ b/target/linux/ramips/dts/WL-330N3G.dts @@ -6,65 +6,6 @@ compatible = "WL-330N3G", "ralink,rt3050-soc"; model = "Asus WL-330N3G"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -102,8 +43,65 @@ linux,code = <0x198>; }; }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WL-341V3.dts b/target/linux/ramips/dts/WL-341V3.dts index 47226b47d9..5f9e1dd924 100644 --- a/target/linux/ramips/dts/WL-341V3.dts +++ b/target/linux/ramips/dts/WL-341V3.dts @@ -38,27 +38,6 @@ }; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&boardnvram 0xffa0>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&boardnvram 0xfd70>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -116,8 +95,29 @@ linux,code = <0x211>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&boardnvram 0xffa0>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&boardnvram 0xfd70>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WL-351.dts b/target/linux/ramips/dts/WL-351.dts index 605c73b460..ecda696732 100644 --- a/target/linux/ramips/dts/WL-351.dts +++ b/target/linux/ramips/dts/WL-351.dts @@ -6,15 +6,6 @@ compatible = "WL-351", "ralink,rt3052-soc"; model = "Sitecom WL-351 v1 002"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,30 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x3f>; - ralink,fct2 = <0x0002500c>; - /* - * ext phy base addr 31, rx/tx clock skew 0, - * turbo mii off, rgmi 3.3v off, port 5 polling off - * port5: enabled, gige, full-duplex, rx/tx-flow-control - * port6: enabled, gige, full-duplex, rx/tx-flow-control - */ - ralink,fpa2 = <0x1f003fff>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - otg@101c0000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -115,3 +82,36 @@ gpio-sck = <&gpio0 2 0>; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x3f>; + ralink,fct2 = <0x0002500c>; + /* + * ext phy base addr 31, rx/tx clock skew 0, + * turbo mii off, rgmi 3.3v off, port 5 polling off + * port5: enabled, gige, full-duplex, rx/tx-flow-control + * port6: enabled, gige, full-duplex, rx/tx-flow-control + */ + ralink,fpa2 = <0x1f003fff>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WLI-TX4-AG300N.dts b/target/linux/ramips/dts/WLI-TX4-AG300N.dts index ca0e125d73..70521a71ed 100644 --- a/target/linux/ramips/dts/WLI-TX4-AG300N.dts +++ b/target/linux/ramips/dts/WLI-TX4-AG300N.dts @@ -8,12 +8,6 @@ compatible = "WLI-TX4-AG300N", "ralink,rt2880-soc"; model = "Buffalo WLI-TX4-AG300N"; - palmbus@300000 { - gpio0: gpio@600 { - status = "okay"; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -46,19 +40,6 @@ }; }; - ethernet@400000 { - status = "okay"; - mtd-mac-address = <&factory 0x4>; - - port@0 { - mediatek,fixed-link = <1000 1 1 1>; - }; - }; - - wmac@480000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -103,3 +84,20 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x4>; + + port@0 { + mediatek,fixed-link = <1000 1 1 1>; + }; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/WMR-300.dts b/target/linux/ramips/dts/WMR-300.dts index 8ea16d27da..02fbdc598a 100644 --- a/target/linux/ramips/dts/WMR-300.dts +++ b/target/linux/ramips/dts/WMR-300.dts @@ -6,66 +6,6 @@ compatible = "buffalo,wmr-300", "ralink,mt7620n-soc"; model = "Buffalo WMR-300"; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "i2c", "ephy"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -104,3 +44,61 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "ephy"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/WNCE2001.dts b/target/linux/ramips/dts/WNCE2001.dts index 02acba5771..2dc39ce142 100644 --- a/target/linux/ramips/dts/WNCE2001.dts +++ b/target/linux/ramips/dts/WNCE2001.dts @@ -10,78 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l3205d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - factory: partition@30000 { - label = "factory"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "config"; - reg = <0x40000 0x20000>; - read-only; - }; - - partition@60000 { - label = "language"; - reg = <0x60000 0x30000>; - read-only; - }; - - partition@90000 { - label = "pot"; - reg = <0x90000 0x10000>; - read-only; - }; - - partition@a0000 { - label = "checksum"; - reg = <0xa0000 0x10000>; - }; - - partition@b0000 { - label = "firmware"; - reg = <0xb0000 0x350000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -137,3 +65,73 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + factory: partition@30000 { + label = "factory"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "config"; + reg = <0x40000 0x20000>; + read-only; + }; + + partition@60000 { + label = "language"; + reg = <0x60000 0x30000>; + read-only; + }; + + partition@90000 { + label = "pot"; + reg = <0x90000 0x10000>; + read-only; + }; + + partition@a0000 { + label = "checksum"; + reg = <0xa0000 0x10000>; + }; + + partition@b0000 { + label = "firmware"; + reg = <0xb0000 0x350000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/WNDR3700V5.dts b/target/linux/ramips/dts/WNDR3700V5.dts index 7b208490f5..9d3d0d5396 100644 --- a/target/linux/ramips/dts/WNDR3700V5.dts +++ b/target/linux/ramips/dts/WNDR3700V5.dts @@ -15,78 +15,6 @@ bootargs = "console=ttyS0,57600 maxcpus=2"; }; - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "mx25l12805d"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@f30000 { - label = "factory"; - reg = <0xf30000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - }; - - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0004>; - mediatek,2ghz = <0>; - }; - }; - - pcie2 { - mt76@2,0 { - reg = <0x1000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8004>; - mediatek,5ghz = <0>; - }; - }; - }; - - ethernet@1e100000 { - mtd-mac-address = <&factory 0x0000000c>; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "rgmii2", "mdio", "wdt"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -137,3 +65,73 @@ }; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l12805d"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@f30000 { + label = "factory"; + reg = <0xf30000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0004>; + mediatek,2ghz = <0>; + }; + }; + + pcie2 { + mt76@2,0 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8004>; + mediatek,5ghz = <0>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x0000000c>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "rgmii2", "mdio", "wdt"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/WR512-3GN-4M.dts b/target/linux/ramips/dts/WR512-3GN-4M.dts index 884ffa781b..45e1463bf0 100644 --- a/target/linux/ramips/dts/WR512-3GN-4M.dts +++ b/target/linux/ramips/dts/WR512-3GN-4M.dts @@ -6,15 +6,6 @@ compatible = "WR512-3GN", "ralink,rt3052-soc"; model = "WR512-3GN-like router"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,14 +38,6 @@ }; }; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -102,8 +85,25 @@ linux,code = <0x32>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WR512-3GN-8M.dts b/target/linux/ramips/dts/WR512-3GN-8M.dts index 15cb018c44..7e9a0c25ed 100644 --- a/target/linux/ramips/dts/WR512-3GN-8M.dts +++ b/target/linux/ramips/dts/WR512-3GN-8M.dts @@ -6,15 +6,6 @@ compatible = "WR512-3GN", "ralink,rt3052-soc"; model = "WR512-3GN-like router"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,14 +38,6 @@ }; }; - esw@10110000 { - mediatek,portmap = <0x2f>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -102,8 +85,25 @@ linux,code = <0x32>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +&esw { + mediatek,portmap = <0x2f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WR6202.dts b/target/linux/ramips/dts/WR6202.dts index 49f934d40c..534d78d3fa 100644 --- a/target/linux/ramips/dts/WR6202.dts +++ b/target/linux/ramips/dts/WR6202.dts @@ -10,15 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -84,22 +75,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - otg@101c0000 { - status = "okay"; - }; - gpio_export { compatible = "gpio-export"; #size-cells = <0>; @@ -111,3 +86,28 @@ }; }; }; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WRH-300CR.dts b/target/linux/ramips/dts/WRH-300CR.dts index 6e8de7fdba..aece2e6884 100644 --- a/target/linux/ramips/dts/WRH-300CR.dts +++ b/target/linux/ramips/dts/WRH-300CR.dts @@ -6,88 +6,7 @@ compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc"; model = "ELECOM WRH-300CR"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "mx25l12805d"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "recover"; - reg = <0x50000 0x1c0000>; - read-only; - }; - - partition@210000 { - label = "firmware"; - reg = <0x210000 0xdf0000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x2e>; - mediatek,portmap = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "i2c", "ephy", "wled"; - ralink,function = "gpio"; - }; - }; - }; - - gpio-leds { + gpio-leds { compatible = "gpio-leds"; wps { @@ -125,3 +44,82 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l12805d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "recover"; + reg = <0x50000 0x1c0000>; + read-only; + }; + + partition@210000 { + label = "firmware"; + reg = <0x210000 0xdf0000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x2e>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "ephy", "wled"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/WRTNODE.dts b/target/linux/ramips/dts/WRTNODE.dts index 15ff019718..04f5836d0a 100644 --- a/target/linux/ramips/dts/WRTNODE.dts +++ b/target/linux/ramips/dts/WRTNODE.dts @@ -6,88 +6,86 @@ compatible = "wrtnode", "ralink,mt7620n-soc"; model = "WRTNODE"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; + gpio-leds { + compatible = "gpio-leds"; - gpio2: gpio@660 { - status = "okay"; + indicator { + label = "wrtnode:blue:indicator"; + gpios = <&gpio1 14 1>; }; + }; +}; - gpio3: gpio@688 { - status = "okay"; +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; }; - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; }; - }; - ehci@101c0000 { - status = "okay"; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - ohci@101c1000 { - status = "okay"; + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; +&ehci { + status = "okay"; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&ohci { + status = "okay"; +}; - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf", "spi refclk"; - ralink,function = "gpio"; - }; - }; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; - gpio-leds { - compatible = "gpio-leds"; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; - indicator { - label = "wrtnode:blue:indicator"; - gpios = <&gpio1 14 1>; +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf", "spi refclk"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/dts/WRTNODE2.dtsi b/target/linux/ramips/dts/WRTNODE2.dtsi index 118cfe9671..0242314dfb 100644 --- a/target/linux/ramips/dts/WRTNODE2.dtsi +++ b/target/linux/ramips/dts/WRTNODE2.dtsi @@ -5,89 +5,85 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x1fb0000>; - }; - }; - - - spidev@1 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "spidev"; - reg = <1 0>; - linux,modalias = "spidev", "spidev"; - spi-max-frequency = <10000000>; - }; + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 5 1>; + linux,code = <0x198>; }; + }; +}; - uart1@d00 { - status = "okay"; +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; }; - i2c@900 { - status = "okay"; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; }; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - ralink,port-map = "llllw"; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; }; - sdhci@10130000 { - status = "okay"; + spidev@1 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "linux,spidev"; + reg = <1>; + spi-max-frequency = <10000000>; }; +}; - pcie@10140000 { - status = "okay"; - }; +&uart1 { + status = "okay"; +}; +&i2c { + status = "okay"; +}; - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; +ðernet { + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "llllw"; +}; - reset { - label = "reset"; - gpios = <&gpio0 5 1>; - linux,code = <0x198>; - }; - }; +&sdhci { + status = "okay"; +}; +&pcie { + status = "okay"; }; +&wmac { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WRTNODE2P.dts b/target/linux/ramips/dts/WRTNODE2P.dts index 26c2d29bbb..94c21a4249 100644 --- a/target/linux/ramips/dts/WRTNODE2P.dts +++ b/target/linux/ramips/dts/WRTNODE2P.dts @@ -6,15 +6,6 @@ compatible = "mediatek,wrtnode2p", "mediatek,mt7628an-soc"; model = "WRTnode2P"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "gpio", "jtag"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -25,3 +16,11 @@ }; }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "gpio", "jtag"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/WRTNODE2R.dts b/target/linux/ramips/dts/WRTNODE2R.dts index d88fadfa4a..1c25770e76 100644 --- a/target/linux/ramips/dts/WRTNODE2R.dts +++ b/target/linux/ramips/dts/WRTNODE2R.dts @@ -6,15 +6,6 @@ compatible = "mediatek,wrtnode2r", "mediatek,mt7628an-soc"; model = "WRTnode2R"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "gpio", "wled_an"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -25,3 +16,11 @@ }; }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "gpio", "wled_an"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/WSR-1166.dts b/target/linux/ramips/dts/WSR-1166.dts index 9743cee652..8f9991f4a7 100644 --- a/target/linux/ramips/dts/WSR-1166.dts +++ b/target/linux/ramips/dts/WSR-1166.dts @@ -15,58 +15,6 @@ bootargs = "console=ttyS0,57600"; }; - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xf90000>; - }; - - partition@fe0000 { - label = "board_data"; - reg = <0xfe0000 0x20000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -161,26 +109,76 @@ compatible = "gpio-poweroff"; gpios = <&gpio0 0 1>; }; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf90000>; + }; + + partition@fe0000 { + label = "board_data"; + reg = <0xfe0000 0x20000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,5ghz = <0>; - }; + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; }; }; }; diff --git a/target/linux/ramips/dts/WSR-600.dts b/target/linux/ramips/dts/WSR-600.dts index 949572c263..2d08b9369b 100644 --- a/target/linux/ramips/dts/WSR-600.dts +++ b/target/linux/ramips/dts/WSR-600.dts @@ -15,53 +15,6 @@ bootargs = "console=ttyS0,57600"; }; - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -157,3 +110,48 @@ gpios = <&gpio1 11 1>; }; }; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/WT1520-4M.dts b/target/linux/ramips/dts/WT1520-4M.dts index d7cbe666d7..9f3d6a7448 100644 --- a/target/linux/ramips/dts/WT1520-4M.dts +++ b/target/linux/ramips/dts/WT1520-4M.dts @@ -2,42 +2,38 @@ #include "WT1520.dtsi" -/ { - palmbus@10000000 { - spi@b00 { - status = "okay"; +&spi0 { + status = "okay"; - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; }; }; }; diff --git a/target/linux/ramips/dts/WT1520-8M.dts b/target/linux/ramips/dts/WT1520-8M.dts index 3b10991c1a..48b62bef4f 100644 --- a/target/linux/ramips/dts/WT1520-8M.dts +++ b/target/linux/ramips/dts/WT1520-8M.dts @@ -2,42 +2,38 @@ #include "WT1520.dtsi" -/ { - palmbus@10000000 { - spi@b00 { - status = "okay"; +&spi0 { + status = "okay"; - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "s25fl064k"; - spi-max-frequency = <10000000>; + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "s25fl064k"; + spi-max-frequency = <10000000>; - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; }; }; }; diff --git a/target/linux/ramips/dts/WT1520.dtsi b/target/linux/ramips/dts/WT1520.dtsi index b2ce18dad6..8cbf99fde2 100644 --- a/target/linux/ramips/dts/WT1520.dtsi +++ b/target/linux/ramips/dts/WT1520.dtsi @@ -12,37 +12,35 @@ chosen { bootargs = "console=ttyS1,57600"; }; +}; - palmbus@10000000 { - uart@500 { - pinctrl-names = "default"; - pinctrl-0 = <&uartf_pins>; - status = "okay"; - }; - }; +&uart { + pinctrl-names = "default"; + pinctrl-0 = <&uartf_pins>; + status = "okay"; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "jtag"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "jtag"; + ralink,function = "gpio"; }; }; +}; - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; +ðernet { + mtd-mac-address = <&factory 0x4>; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; - ehci@101c0000 { - status = "okay"; - }; +&ehci { + status = "okay"; +}; - ohci@101c1000 { - status = "okay"; - }; +&ohci { + status = "okay"; }; diff --git a/target/linux/ramips/dts/WT3020-4M.dts b/target/linux/ramips/dts/WT3020-4M.dts index 9014e0c002..f611cdfce9 100644 --- a/target/linux/ramips/dts/WT3020-4M.dts +++ b/target/linux/ramips/dts/WT3020-4M.dts @@ -6,78 +6,6 @@ compatible = "wt3020", "ralink,mt7620n-soc"; model = "Nexx WT3020"; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q32"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x3b0000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -100,3 +28,73 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q32"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/WT3020-8M.dts b/target/linux/ramips/dts/WT3020-8M.dts index b329883f21..3c6230726c 100644 --- a/target/linux/ramips/dts/WT3020-8M.dts +++ b/target/linux/ramips/dts/WT3020-8M.dts @@ -6,78 +6,6 @@ compatible = "wt3020", "ralink,mt7620n-soc"; model = "Nexx WT3020"; - palmbus@10000000 { - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -100,3 +28,73 @@ }; }; }; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/WZR-AGL300NH.dts b/target/linux/ramips/dts/WZR-AGL300NH.dts index 3d52efd2bb..23fba7cb8f 100644 --- a/target/linux/ramips/dts/WZR-AGL300NH.dts +++ b/target/linux/ramips/dts/WZR-AGL300NH.dts @@ -8,19 +8,12 @@ compatible = "WZR-AGL300NH", "ralink,rt2880-soc"; model = "Buffalo WZR-AGL300NH"; - palmbus@300000 { - gpio0: gpio@600 { - status = "okay"; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartlite", "mdio"; - ralink,function = "gpio"; - }; - }; + pci@440000 { + compatible = "ralink,rt288x-pci"; + reg = <0x00440000 0x20000>; + #address-cells = <1>; + #size-cells = <1>; + status = "ok"; }; cfi@1f000000 { @@ -55,34 +48,12 @@ }; }; - ethernet@400000 { - status = "okay"; - mtd-mac-address = <&factory 0x4>; - - port@0 { - mediatek,fixed-link = <1000 1 1 1>; - }; - - mdio-bus { - status = "okay"; - - phy0: ethernet-phy@0 { - phy-mode = "mii"; - reg = <0>; - }; - }; - }; - rtl8366s { compatible = "realtek,rtl8366s"; gpio-sda = <&gpio0 1 0>; gpio-sck = <&gpio0 2 0>; }; - wmac@480000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -131,13 +102,39 @@ gpios = <&gpio0 13 1>; }; }; +}; +&gpio0 { + status = "okay"; +}; - pcibus0: pci@00440000 { - compatible = "ralink,rt288x-pci"; - reg = <0x00440000 0x20000>; - #address-cells = <1>; - #size-cells = <1>; - status = "ok"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartlite", "mdio"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x4>; + + port@0 { + mediatek,fixed-link = <1000 1 1 1>; + }; + + mdio-bus { + status = "okay"; + + phy0: ethernet-phy@0 { + phy-mode = "mii"; + reg = <0>; + }; + }; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/X5.dts b/target/linux/ramips/dts/X5.dts index 314c7c6435..86f5c635f1 100644 --- a/target/linux/ramips/dts/X5.dts +++ b/target/linux/ramips/dts/X5.dts @@ -6,62 +6,6 @@ compatible = "X5", "ralink,rt5350-soc"; model = "Poray X5"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "gd25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <1>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -122,17 +66,71 @@ gpios = <&gpio0 18 0>; }; }; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - ralink,led-polarity = <1>; - }; +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "gd25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - ehci@101c0000 { - status = "okay"; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; }; +}; - ohci@101c1000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <1>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; + ralink,led-polarity = <1>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/X8.dts b/target/linux/ramips/dts/X8.dts index 42a34c5d4d..733bbb55d4 100644 --- a/target/linux/ramips/dts/X8.dts +++ b/target/linux/ramips/dts/X8.dts @@ -6,62 +6,6 @@ compatible = "X8", "ralink,rt5350-soc"; model = "Poray X8"; - palmbus@10000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "gd25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "jtag", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - }; - - esw@10110000 { - mediatek,portmap = <0x2f>; - mediatek,led_polarity = <1>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -83,17 +27,71 @@ linux,code = <0x198>; }; }; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - ralink,led-polarity = <1>; - }; +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "gd25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; - ehci@101c0000 { - status = "okay"; + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; }; +}; - ohci@101c1000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <1>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; + ralink,led-polarity = <1>; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/XDXRN502J.dts b/target/linux/ramips/dts/XDXRN502J.dts index c941d7801b..34a29cc74b 100644 --- a/target/linux/ramips/dts/XDXRN502J.dts +++ b/target/linux/ramips/dts/XDXRN502J.dts @@ -6,15 +6,6 @@ compatible = "XDXRN502J", "ralink,rt3052-soc"; model = "XDX RN502J"; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; - ralink,function = "gpio"; - }; - }; - }; - cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; @@ -47,18 +38,6 @@ }; }; - ethernet@10100000 { - mtd-mac-address = <&factory 0x28>; - }; - - esw@10110000 { - mediatek,portmap = <0x3e>; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - gpio-leds { compatible = "gpio-leds"; @@ -85,8 +64,29 @@ linux,code = <0x198>; }; }; +}; - otg@101c0000 { - status = "okay"; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; }; }; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&otg { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/Y1.dts b/target/linux/ramips/dts/Y1.dts index 3248c7683e..ac9b7d56c0 100644 --- a/target/linux/ramips/dts/Y1.dts +++ b/target/linux/ramips/dts/Y1.dts @@ -6,13 +6,6 @@ compatible = "lenovo,Y1", "ralink,mt7620a-soc"; model = "Lenovo Y1"; - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -47,3 +40,10 @@ }; }; }; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; diff --git a/target/linux/ramips/dts/Y1.dtsi b/target/linux/ramips/dts/Y1.dtsi index ff9600d64d..201f48b626 100644 --- a/target/linux/ramips/dts/Y1.dtsi +++ b/target/linux/ramips/dts/Y1.dtsi @@ -4,106 +4,104 @@ chosen { bootargs = "console=ttyS0,115200"; }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 11 1>; + linux,code = <0x198>; + }; + }; +}; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; +&gpio0 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q128"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; }; - gpio2: gpio@660 { - status = "okay"; + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; }; - gpio3: gpio@688 { - status = "okay"; + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; }; - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q128"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; }; }; +}; - ehci@101c0000 { - status = "okay"; - }; +&ehci { + status = "okay"; +}; - ohci@101c1000 { - status = "okay"; - }; +&ohci { + status = "okay"; +}; - pcie@10140000 { - status = "okay"; +&pcie { + status = "okay"; - pcie-bridge { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; }; }; +}; - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "uartf", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - - pa { - ralink,group = "pa"; - ralink,function = "pa"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "uartf", "wled", "nd_sd"; + ralink,function = "gpio"; }; - }; - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - reset { - label = "reset"; - gpios = <&gpio0 11 1>; - linux,code = <0x198>; + pa { + ralink,group = "pa"; + ralink,function = "pa"; }; }; }; diff --git a/target/linux/ramips/dts/Y1S.dts b/target/linux/ramips/dts/Y1S.dts index 7679e0a721..cfa5e2123a 100644 --- a/target/linux/ramips/dts/Y1S.dts +++ b/target/linux/ramips/dts/Y1S.dts @@ -6,40 +6,6 @@ compatible = "lenovo,Y1S", "ralink,mt7620a-soc"; model = "Lenovo Y1S"; - ethernet@10100000 { - status = "okay"; - mtd-mac-address = <&factory 0x4>; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mediatek,portmap = "wllll"; - - port@4 { - status = "okay"; - phy-handle = <&phy4>; - phy-mode = "rgmii"; - }; - - port@5 { - status = "okay"; - phy-handle = <&phy5>; - phy-mode = "rgmii"; - }; - - mdio-bus { - status = "okay"; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; - - phy5: ethernet-phy@5 { - reg = <5>; - phy-mode = "rgmii"; - }; - }; - }; - gpio_export { compatible = "gpio-export"; #size-cells = <0>; @@ -61,10 +27,6 @@ }; }; - gsw@10110000 { - mediatek,port4 = "gmac"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -104,3 +66,41 @@ }; }; }; + +ðernet { + status = "okay"; + mtd-mac-address = <&factory 0x4>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + mediatek,portmap = "wllll"; + + port@4 { + status = "okay"; + phy-handle = <&phy4>; + phy-mode = "rgmii"; + }; + + port@5 { + status = "okay"; + phy-handle = <&phy5>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; + }; + }; +}; + +&gsw { + mediatek,port4 = "gmac"; +}; diff --git a/target/linux/ramips/dts/YOUKU-YK1.dts b/target/linux/ramips/dts/YOUKU-YK1.dts index fa2610e8a2..a9c13e50b6 100644 --- a/target/linux/ramips/dts/YOUKU-YK1.dts +++ b/target/linux/ramips/dts/YOUKU-YK1.dts @@ -6,93 +6,6 @@ compatible = "YOUKU-YK1", "ralink,mt7620a-soc"; model = "YOUKU YK1"; - palmbus@10000000 { - - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "w25q256"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x1fb0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - sdhci@b0130000 { - status = "okay"; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; wan { @@ -125,3 +38,87 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q256"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&sdhci { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/ZBT-APE522II.dts b/target/linux/ramips/dts/ZBT-APE522II.dts new file mode 100644 index 0000000000..eff27c2a15 --- /dev/null +++ b/target/linux/ramips/dts/ZBT-APE522II.dts @@ -0,0 +1,143 @@ +/dts-v1/; + +#include "mt7620a.dtsi" + +/ { + compatible = "zbtlink,zbt-ape522ii", "ralink,mt7620a-soc"; + model = "ZBT-APE522II"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + gpio-leds { + compatible = "gpio-leds"; + + sys1 { + label = "zbt-ape522ii:green:sys1"; + gpios = <&gpio0 11 1>; + }; + + sys2 { + label = "zbt-ape522ii:green:sys2"; + gpios = <&gpio0 12 1>; + }; + + sys3 { + label = "zbt-ape522ii:green:sys3"; + gpios = <&gpio0 9 1>; + }; + + sys4 { + label = "zbt-ape522ii:green:sys4"; + gpios = <&gpio0 14 1>; + }; + + wlan2g4 { + label = "zbt-ape522ii:green:wlan2g4"; + gpios = <&gpio3 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 2 0>; + linux,code = <0x198>; + }; + }; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf80000>; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pcie { + status = "okay"; + + pcie-bridge { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wled", "i2c", "uartf", "wdt"; + ralink,function = "gpio"; + }; + + pa { + ralink,group = "pa"; + ralink,function = "pa"; + }; + }; +}; diff --git a/target/linux/ramips/dts/ZBT-WA05.dts b/target/linux/ramips/dts/ZBT-WA05.dts index 82b0c8e64f..c2d51c300a 100644 --- a/target/linux/ramips/dts/ZBT-WA05.dts +++ b/target/linux/ramips/dts/ZBT-WA05.dts @@ -10,82 +10,6 @@ bootargs = "console=ttyS0,115200"; }; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - - gpio2: gpio@660 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - en25q64@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x760000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "i2c", "spi refclk", "wled"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -118,3 +42,77 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + en25q64@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x760000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "spi refclk", "wled"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/ZBT-WE826.dts b/target/linux/ramips/dts/ZBT-WE826.dts index b0e4d75c67..75c99a7fdc 100644 --- a/target/linux/ramips/dts/ZBT-WE826.dts +++ b/target/linux/ramips/dts/ZBT-WE826.dts @@ -3,122 +3,120 @@ #include "mt7620a.dtsi" / { - compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc"; - model = "ZBT-WE826"; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - en25q128@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "w25q128"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; - }; - - sdhci@10130000 { - status = "okay"; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - ralink,port-map = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "i2c", "uartf", "wled", "spi refclk", "pa"; - ralink,function = "gpio"; - }; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - power { - label = "zbt-we826:green:power"; - gpios = <&gpio1 14 0>; - }; - usb { - label = "zbt-we826:green:usb"; - gpios = <&gpio1 15 0>; - }; - air { - label = "zbt-we826:green:wifi"; - gpios = <&gpio3 0 1>; - }; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - reset { - label = "reset"; - gpios = <&gpio0 1 1>; - linux,code = <0x198>; - }; - }; - - pcie@10140000 { - status = "okay"; - }; + compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc"; + model = "ZBT-WE826"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + gpio-leds { + compatible = "gpio-leds"; + power { + label = "zbt-we826:green:power"; + gpios = <&gpio1 14 0>; + }; + usb { + label = "zbt-we826:green:usb"; + gpios = <&gpio1 15 0>; + }; + air { + label = "zbt-we826:green:wifi"; + gpios = <&gpio3 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + reset { + label = "reset"; + gpios = <&gpio0 1 1>; + linux,code = <0x198>; + }; + }; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + en25q128@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q128"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&sdhci { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "uartf", "wled", "spi refclk", "pa"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; }; diff --git a/target/linux/ramips/dts/ZBT-WG2626.dts b/target/linux/ramips/dts/ZBT-WG2626.dts index b18f4c1db8..b599d7b49b 100644 --- a/target/linux/ramips/dts/ZBT-WG2626.dts +++ b/target/linux/ramips/dts/ZBT-WG2626.dts @@ -15,85 +15,12 @@ bootargs = "console=ttyS0,115200"; }; - sdhci@10130000 { - status = "okay"; - }; - - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - - }; - }; - + palmbus: palmbus@1E000000 { i2c@900 { - compatible = "ralink,i2c-mt7621"; - reg = <0x900 0x100>; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&i2c_pins>; status = "okay"; }; }; - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,5ghz = <0>; - }; - }; - }; - - ethernet@1e100000 { - mtd-mac-address = <&factory 0xe000>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -115,13 +42,79 @@ gpios = <&gpio0 24 1>; }; }; +}; + +&sdhci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wdt", "rgmii2", "wdt rst", "jtag", "mdio"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "rgmii2", "wdt rst", "jtag", "mdio"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/dts/ZBT-WG3526.dts b/target/linux/ramips/dts/ZBT-WG3526.dts index 30b508c533..538a7d8632 100644 --- a/target/linux/ramips/dts/ZBT-WG3526.dts +++ b/target/linux/ramips/dts/ZBT-WG3526.dts @@ -15,85 +15,12 @@ bootargs = "console=ttyS0,115200"; }; - sdhci@10130000 { - status = "okay"; - }; - - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - - }; - }; - + palmbus: palmbus@1E000000 { i2c@900 { - compatible = "ralink,i2c-mt7621"; - reg = <0x900 0x100>; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&i2c_pins>; status = "okay"; }; }; - pcie@1e140000 { - status = "okay"; - - pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,5ghz = <0>; - }; - }; - - pcie1 { - mt76@1,0 { - reg = <0x0000 0 0 0 0>; - device_type = "pci"; - mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; - }; - }; - }; - - ethernet@1e100000 { - mtd-mac-address = <&factory 0xe000>; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -115,13 +42,79 @@ gpios = <&gpio0 24 1>; }; }; +}; + +&sdhci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + + pcie1 { + mt76@1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wdt", "rgmii2", "wdt rst", "jtag", "mdio"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "rgmii2", "wdt rst", "jtag", "mdio"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/dts/ZBT-WR8305RT.dts b/target/linux/ramips/dts/ZBT-WR8305RT.dts index afbde2a67b..694b7cfa96 100644 --- a/target/linux/ramips/dts/ZBT-WR8305RT.dts +++ b/target/linux/ramips/dts/ZBT-WR8305RT.dts @@ -6,83 +6,6 @@ compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc"; model = "Zbtlink ZBT-WR8305RT"; - palmbus@10000000 { - gpio1: gpio@638 { - status = "okay"; - }; - - gpio3: gpio@688 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - - ethernet@10100000 { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - pinctrl { - state_default: pinctrl0 { - ephy { - ralink,group = "ephy"; - ralink,function = "ephy"; - }; - - default { - ralink,group = "i2c", "uartf", "spi refclk", "wled"; - ralink,function = "gpio"; - }; - }; - }; - gpio-leds { compatible = "gpio-leds"; @@ -115,3 +38,78 @@ }; }; }; + +&gpio1 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + ephy { + ralink,group = "ephy"; + ralink,function = "ephy"; + }; + + default { + ralink,group = "i2c", "uartf", "spi refclk", "wled"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/ZTE-Q7.dts b/target/linux/ramips/dts/ZTE-Q7.dts index 78a948c2e9..2c4c2e5712 100644 --- a/target/linux/ramips/dts/ZTE-Q7.dts +++ b/target/linux/ramips/dts/ZTE-Q7.dts @@ -6,84 +6,6 @@ compatible = "ZTE-Q7", "ralink,mt7620a-soc"; model = "ZTE Q7"; - palmbus@10000000 { - gpio0: gpio@600 { - status = "okay"; - }; - - gpio1: gpio@638 { - status = "okay"; - }; - - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80", "en25q64"; - spi-max-frequency = <10000000>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "firmware"; - reg = <0x50000 0x7b0000>; - }; - }; - }; - }; - - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; - ralink,function = "gpio"; - }; - }; - }; - - ethernet@10100000 { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; - }; - - wmac@10180000 { - ralink,mtd-eeprom = <&factory 0>; - }; - - sdhci@10130000 { - status = "okay"; - }; - - ehci@101c0000 { - status = "okay"; - }; - - ohci@101c1000 { - status = "okay"; - }; - gpio-leds { compatible = "gpio-leds"; @@ -111,3 +33,79 @@ }; }; }; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "en25q64"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "wllll"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&sdhci { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/mt7620a.dtsi b/target/linux/ramips/dts/mt7620a.dtsi index 0310bd4d2e..ccadbe40db 100644 --- a/target/linux/ramips/dts/mt7620a.dtsi +++ b/target/linux/ramips/dts/mt7620a.dtsi @@ -26,7 +26,7 @@ serial0 = &uartlite; }; - palmbus@10000000 { + palmbus: palmbus@10000000 { compatible = "palmbus"; reg = <0x10000000 0x200000>; ranges = <0x0 0x10000000 0x1FFFFF>; @@ -34,12 +34,12 @@ #address-cells = <1>; #size-cells = <1>; - sysc@0 { + sysc: sysc@0 { compatible = "ralink,mt7620a-sysc", "ralink,rt3050-sysc"; reg = <0x0 0x100>; }; - timer@100 { + timer: timer@100 { compatible = "ralink,mt7620a-timer", "ralink,rt2880-timer"; reg = <0x100 0x20>; @@ -47,7 +47,7 @@ interrupts = <1>; }; - watchdog@120 { + watchdog: watchdog@120 { compatible = "ralink,mt7620a-wdt", "ralink,rt2880-wdt"; reg = <0x120 0x10>; @@ -72,7 +72,7 @@ interrupts = <2>; }; - memc@300 { + memc: memc@300 { compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc"; reg = <0x300 0x100>; @@ -83,7 +83,7 @@ interrupts = <3>; }; - uart@500 { + uart: uart@500 { compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a"; reg = <0x500 0x100>; @@ -175,7 +175,7 @@ status = "disabled"; }; - i2c@900 { + i2c: i2c@900 { compatible = "link,mt7620a-i2c", "ralink,rt2880-i2c"; reg = <0x900 0x100>; @@ -191,7 +191,7 @@ pinctrl-0 = <&i2c_pins>; }; - i2s@a00 { + i2s: i2s@a00 { compatible = "ralink,mt7620a-i2s"; reg = <0xa00 0x100>; @@ -232,7 +232,7 @@ reset-names = "spi"; #address-cells = <1>; - #size-cells = <1>; + #size-cells = <0>; status = "disabled"; @@ -256,7 +256,7 @@ pinctrl-0 = <&uartlite_pins>; }; - systick@d00 { + systick: systick@d00 { compatible = "ralink,mt7620a-systick", "ralink,cevt-systick"; reg = <0xd00 0x10>; @@ -267,7 +267,7 @@ interrupts = <7>; }; - pcm@2000 { + pcm: pcm@2000 { compatible = "ralink,mt7620a-pcm"; reg = <0x2000 0x800>; @@ -281,7 +281,7 @@ }; gdma: gdma@2800 { - compatible = "ralink,mt7620a-gdma", "ralink,rt2880-gdma"; + compatible = "ralink,mt7620a-gdma", "ralink,rt3883-gdma"; reg = <0x2800 0x800>; resets = <&rstctrl 14>; @@ -298,7 +298,7 @@ }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; pinctrl-0 = <&state_default>; @@ -396,15 +396,23 @@ #reset-cells = <1>; }; + clkctrl: clkctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + usbphy: usbphy { compatible = "mediatek,mt7620-usbphy"; #phy-cells = <1>; resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; + + clocks = <&clkctrl 22 &clkctrl 25>; + clock-names = "host", "device"; }; - ethernet@10100000 { + ethernet: ethernet@10100000 { compatible = "mediatek,mt7620-eth"; reg = <0x10100000 0x10000>; @@ -452,7 +460,7 @@ interrupts = <17>; }; - sdhci@10130000 { + sdhci: sdhci@10130000 { compatible = "ralink,mt7620-sdhci"; reg = <0x10130000 0x4000>; @@ -462,7 +470,7 @@ status = "disabled"; }; - ehci@101c0000 { + ehci: ehci@101c0000 { compatible = "generic-ehci"; reg = <0x101c0000 0x1000>; @@ -475,7 +483,7 @@ status = "disabled"; }; - ohci@101c1000 { + ohci: ohci@101c1000 { compatible = "generic-ohci"; reg = <0x101c1000 0x1000>; @@ -488,7 +496,7 @@ status = "disabled"; }; - pcie@10140000 { + pcie: pcie@10140000 { compatible = "mediatek,mt7620-pci"; reg = <0x10140000 0x100 0x10142000 0x100>; @@ -499,6 +507,9 @@ resets = <&rstctrl 26>; reset-names = "pcie0"; + clocks = <&clkctrl 26>; + clock-names = "pcie0"; + interrupt-parent = <&cpuintc>; interrupts = <4>; @@ -525,7 +536,7 @@ }; }; - wmac@10180000 { + wmac: wmac@10180000 { compatible = "ralink,rt7620-wmac", "ralink,rt2880-wmac"; reg = <0x10180000 0x40000>; diff --git a/target/linux/ramips/dts/mt7620n.dtsi b/target/linux/ramips/dts/mt7620n.dtsi index 6c5d66eaa8..f1593acd93 100644 --- a/target/linux/ramips/dts/mt7620n.dtsi +++ b/target/linux/ramips/dts/mt7620n.dtsi @@ -26,7 +26,7 @@ serial0 = &uartlite; }; - palmbus@10000000 { + palmbus: palmbus@10000000 { compatible = "palmbus"; reg = <0x10000000 0x200000>; ranges = <0x0 0x10000000 0x1FFFFF>; @@ -34,12 +34,12 @@ #address-cells = <1>; #size-cells = <1>; - sysc@0 { + sysc: sysc@0 { compatible = "ralink,mt7620a-sysc", "ralink,rt3050-sysc"; reg = <0x0 0x100>; }; - timer@100 { + timer: timer@100 { compatible = "ralink,mt7620a-timer", "ralink,rt2880-timer"; reg = <0x100 0x20>; @@ -47,7 +47,7 @@ interrupts = <1>; }; - watchdog@120 { + watchdog: watchdog@120 { compatible = "ralink,mt7620a-wdt", "ralink,rt2880-wdt"; reg = <0x120 0x10>; @@ -72,7 +72,7 @@ interrupts = <2>; }; - memc@300 { + memc: memc@300 { compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc"; reg = <0x300 0x100>; @@ -184,7 +184,7 @@ reset-names = "spi"; #address-cells = <1>; - #size-cells = <1>; + #size-cells = <0>; status = "disabled"; @@ -208,7 +208,7 @@ pinctrl-0 = <&uartlite_pins>; }; - systick@d00 { + systick: systick@d00 { compatible = "ralink,mt7620a-systick", "ralink,cevt-systick"; reg = <0xd00 0x10>; @@ -220,7 +220,7 @@ }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; pinctrl-0 = <&state_default>; @@ -255,15 +255,23 @@ #reset-cells = <1>; }; + clkctrl: clkctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + usbphy: usbphy { compatible = "mediatek,mt7620-usbphy"; #phy-cells = <1>; resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; + + clocks = <&clkctrl 22 &clkctrl 25>; + clock-names = "host", "device"; }; - ethernet@10100000 { + ethernet: ethernet@10100000 { compatible = "mediatek,mt7620-eth"; reg = <0x10100000 0x10000>; @@ -298,7 +306,7 @@ mediatek,port4 = "gmac"; }; - ehci@101c0000 { + ehci: ehci@101c0000 { compatible = "generic-ehci"; reg = <0x101c0000 0x1000>; @@ -311,7 +319,7 @@ status = "disabled"; }; - ohci@101c1000 { + ohci: ohci@101c1000 { compatible = "generic-ohci"; reg = <0x101c1000 0x1000>; @@ -324,7 +332,7 @@ status = "disabled"; }; - wmac@10180000 { + wmac: wmac@10180000 { compatible = "ralink,rt7620-wmac", "ralink,rt2880-wmac"; reg = <0x10180000 0x40000>; diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 71d833d69e..7a9d79a88b 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -42,7 +42,7 @@ clock-frequency = <50000000>; }; - palmbus@1E000000 { + palmbus: palmbus@1E000000 { compatible = "palmbus"; reg = <0x1E000000 0x100000>; ranges = <0x0 0x1E000000 0x0FFFFF>; @@ -50,12 +50,12 @@ #address-cells = <1>; #size-cells = <1>; - sysc@0 { + sysc: sysc@0 { compatible = "mtk,mt7621-sysc"; reg = <0x0 0x100>; }; - wdt@100 { + wdt: wdt@100 { compatible = "mtk,mt7621-wdt"; reg = <0x100 0x100>; }; @@ -89,17 +89,17 @@ }; }; - memc@5000 { + memc: memc@5000 { compatible = "mtk,mt7621-memc"; reg = <0x300 0x100>; }; - cpc@1fbf0000 { + cpc: cpc@1fbf0000 { compatible = "mtk,mt7621-cpc"; reg = <0x1fbf0000 0x8000>; }; - mc@1fbf8000 { + mc: mc@1fbf8000 { compatible = "mtk,mt7621-mc"; reg = <0x1fbf8000 0x8000>; }; @@ -109,6 +109,7 @@ reg = <0xc00 0x100>; clocks = <&sysclock>; + clock-frequency = <50000000>; interrupt-parent = <&gic>; interrupts = <GIC_SHARED 26 IRQ_TYPE_LEVEL_HIGH>; @@ -118,7 +119,7 @@ no-loopback-test; }; - spi@b00 { + spi0: spi@b00 { status = "okay"; compatible = "ralink,mt7621-spi"; @@ -138,14 +139,48 @@ m25p80@0 { #address-cells = <1>; #size-cells = <1>; - reg = <0 0>; + reg = <0>; spi-max-frequency = <10000000>; m25p,chunked-io = <32>; }; }; + + gdma: gdma@2800 { + compatible = "ralink,rt3883-gdma"; + reg = <0x2800 0x800>; + + resets = <&rstctrl 14>; + reset-names = "dma"; + + interrupt-parent = <&gic>; + interrupts = <0 13 4>; + + #dma-cells = <1>; + #dma-channels = <16>; + #dma-requests = <16>; + + status = "disabled"; + }; + + hsdma: hsdma@7000 { + compatible = "mediatek,mt7621-hsdma"; + reg = <0x7000 0x1000>; + + resets = <&rstctrl 5>; + reset-names = "hsdma"; + + interrupt-parent = <&gic>; + interrupts = <0 11 4>; + + #dma-cells = <1>; + #dma-channels = <1>; + #dma-requests = <1>; + + status = "disabled"; + }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; pinctrl-0 = <&state_default>; @@ -241,7 +276,12 @@ #reset-cells = <1>; }; - sdhci@1E130000 { + clkctrl: clkctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + + sdhci: sdhci@1E130000 { compatible = "ralink,mt7620-sdhci"; reg = <0x1E130000 0x4000>; @@ -249,7 +289,7 @@ interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>; }; - xhci@1E1C0000 { + xhci: xhci@1E1C0000 { status = "okay"; compatible = "mediatek,mt8173-xhci"; @@ -279,7 +319,7 @@ }; }; - nand@1e003000 { + nand: nand@1e003000 { status = "disabled"; compatible = "mtk,mt7621-nand"; @@ -290,7 +330,7 @@ #size-cells = <1>; }; - ethernet@1e100000 { + ethernet: ethernet@1e100000 { compatible = "mediatek,mt7621-eth"; reg = <0x1e100000 0x10000>; @@ -323,7 +363,7 @@ interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>; }; - pcie@1e140000 { + pcie: pcie@1e140000 { compatible = "mediatek,mt7621-pci"; reg = <0x1e140000 0x100 0x1e142000 0x100>; @@ -349,6 +389,11 @@ status = "okay"; + resets = <&rstctrl 24 &rstctrl 25 &rstctrl 26>; + reset-names = "pcie0", "pcie1", "pcie2"; + clocks = <&clkctrl 24 &clkctrl 25 &clkctrl 26>; + clock-names = "pcie0", "pcie1", "pcie2"; + pcie0 { reg = <0x0000 0 0 0 0>; diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi index 98496e325d..6d5ed95e49 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>; @@ -166,6 +166,8 @@ reg-io-width = <4>; no-loopback-test; + clock-frequency = <40000000>; + resets = <&rstctrl 12>; reset-names = "uartl"; @@ -176,7 +178,7 @@ pinctrl-0 = <&uart0_pins>; }; - uart1@d00 { + uart1: uart1@d00 { compatible = "ns16550a"; reg = <0xd00 0x100>; @@ -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"; @@ -216,7 +222,7 @@ status = "disabled"; }; - pwm@5000 { + pwm: pwm@5000 { compatible = "mediatek,mt7628-pwm"; reg = <0x5000 0x1000>; @@ -229,7 +235,7 @@ status = "disabled"; }; - pcm@2000 { + pcm: pcm@2000 { compatible = "ralink,mt7620a-pcm"; reg = <0x2000 0x800>; @@ -243,7 +249,7 @@ }; gdma: gdma@2800 { - compatible = "ralink,mt7620a-gdma", "ralink,rt2880-gdma"; + compatible = "ralink,rt3883-gdma"; reg = <0x2800 0x800>; resets = <&rstctrl 14>; @@ -260,7 +266,7 @@ }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; pinctrl-0 = <&state_default>; @@ -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,9 +362,11 @@ resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; + clocks = <&clkctrl 22 &clkctrl 25>; + clock-names = "host", "device"; }; - sdhci@10130000 { + sdhci: sdhci@10130000 { compatible = "ralink,mt7620-sdhci"; reg = <0x10130000 0x4000>; @@ -366,7 +379,7 @@ status = "disabled"; }; - ehci@101c0000 { + ehci: ehci@101c0000 { compatible = "generic-ehci"; reg = <0x101c0000 0x1000>; @@ -377,7 +390,7 @@ interrupts = <18>; }; - ohci@101c1000 { + ohci: ohci@101c1000 { compatible = "generic-ohci"; reg = <0x101c1000 0x1000>; @@ -388,7 +401,7 @@ interrupts = <18>; }; - ethernet@10100000 { + ethernet: ethernet@10100000 { compatible = "ralink,rt5350-eth"; reg = <0x10100000 0x10000>; @@ -402,7 +415,7 @@ }; esw: esw@10110000 { - compatible = "ralink,rt3050-esw"; + compatible = "mediatek,mt7628-esw", "ralink,rt3050-esw"; reg = <0x10110000 0x8000>; resets = <&rstctrl 23>; @@ -412,7 +425,7 @@ interrupts = <17>; }; - pcie@10140000 { + pcie: pcie@10140000 { compatible = "mediatek,mt7620-pci"; reg = <0x10140000 0x100 0x10142000 0x100>; @@ -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"; diff --git a/target/linux/ramips/dts/rt2880.dtsi b/target/linux/ramips/dts/rt2880.dtsi index 603eed871b..ad882547f7 100644 --- a/target/linux/ramips/dts/rt2880.dtsi +++ b/target/linux/ramips/dts/rt2880.dtsi @@ -24,7 +24,7 @@ compatible = "mti,cpu-interrupt-controller"; }; - palmbus@300000 { + palmbus: palmbus@300000 { compatible = "palmbus"; reg = <0x300000 0x200000>; ranges = <0x0 0x300000 0x1FFFFF>; @@ -32,12 +32,12 @@ #address-cells = <1>; #size-cells = <1>; - sysc@0 { + sysc: sysc@0 { compatible = "ralink,rt2880-sysc"; reg = <0x000 0x100>; }; - timer@100 { + timer: timer@100 { compatible = "ralink,rt2880-timer"; reg = <0x100 0x20>; @@ -47,7 +47,7 @@ status = "disabled"; }; - watchdog@120 { + watchdog: watchdog@120 { compatible = "ralink,rt2880-wdt"; reg = <0x120 0x10>; }; @@ -63,7 +63,7 @@ interrupts = <2>; }; - memc@300 { + memc: memc@300 { compatible = "ralink,rt2880-memc"; reg = <0x300 0x100>; }; @@ -125,7 +125,7 @@ }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; @@ -158,7 +158,12 @@ #reset-cells = <1>; }; - ethernet@400000 { + clkctrl: clkctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + + ethernet: ethernet@400000 { compatible = "ralink,rt2880-eth"; reg = <0x00400000 0x10000>; @@ -186,7 +191,7 @@ }; }; - wmac@480000 { + wmac: wmac@480000 { compatible = "ralink,rt2880-wmac"; reg = <0x480000 0x40000>; diff --git a/target/linux/ramips/dts/rt3050.dtsi b/target/linux/ramips/dts/rt3050.dtsi index 3aecba6345..ed88ac12ec 100644 --- a/target/linux/ramips/dts/rt3050.dtsi +++ b/target/linux/ramips/dts/rt3050.dtsi @@ -25,7 +25,7 @@ compatible = "mti,cpu-interrupt-controller"; }; - palmbus@10000000 { + palmbus: palmbus@10000000 { compatible = "palmbus"; reg = <0x10000000 0x200000>; ranges = <0x0 0x10000000 0x1FFFFF>; @@ -33,12 +33,12 @@ #address-cells = <1>; #size-cells = <1>; - sysc@0 { + sysc: sysc@0 { compatible = "ralink,rt3050-sysc"; reg = <0x0 0x100>; }; - timer@100 { + timer: timer@100 { compatible = "ralink,rt3050-timer", "ralink,rt2880-timer"; reg = <0x100 0x20>; @@ -46,7 +46,7 @@ interrupts = <1>; }; - watchdog@120 { + watchdog: watchdog@120 { compatible = "ralink,rt3050-wdt", "ralink,rt2880-wdt"; reg = <0x120 0x10>; @@ -71,7 +71,7 @@ interrupts = <2>; }; - memc@300 { + memc: memc@300 { compatible = "ralink,rt3050-memc"; reg = <0x300 0x100>; @@ -82,7 +82,7 @@ interrupts = <3>; }; - uart@500 { + uart: uart@500 { compatible = "ralink,rt3050-uart", "ralink,rt2880-uart", "ns16550a"; reg = <0x500 0x100>; @@ -149,6 +149,23 @@ status = "disabled"; }; + gdma: gdma@700 { + compatible = "ralink,rt305x-gdma"; + reg = <0x700 0x100>; + + resets = <&rstctrl 14>; + reset-names = "dma"; + + interrupt-parent = <&intc>; + interrupts = <7>; + + #dma-cells = <1>; + #dma-channels = <8>; + #dma-requests = <8>; + + status = "disabled"; + }; + spi0: spi@b00 { compatible = "ralink,rt3050-spi", "ralink,rt2880-spi"; reg = <0xb00 0x100>; @@ -182,7 +199,7 @@ }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; @@ -215,7 +232,20 @@ #reset-cells = <1>; }; - ethernet@10100000 { + clkctrl: clkctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + + usbphy: usbphy { + compatible = "ralink,rt3050-usbphy"; + resets = <&rstctrl 22>; + reset-names = "host"; + clocks = <&clkctrl 18>; + clock-names = "host"; + }; + + ethernet: ethernet@10100000 { compatible = "ralink,rt3050-eth"; reg = <0x10100000 0x10000>; @@ -239,7 +269,7 @@ interrupts = <17>; }; - wmac@10180000 { + wmac: wmac@10180000 { compatible = "ralink,rt3050-wmac", "ralink,rt2880-wmac"; reg = <0x10180000 0x40000>; @@ -249,7 +279,7 @@ ralink,eeprom = "soc_wmac.eeprom"; }; - otg@101c0000 { + otg: otg@101c0000 { compatible = "ralink,rt3050-otg", "snps,dwc2"; reg = <0x101c0000 0x40000>; diff --git a/target/linux/ramips/dts/rt3352.dtsi b/target/linux/ramips/dts/rt3352.dtsi index a22af42112..0bb28ec833 100644 --- a/target/linux/ramips/dts/rt3352.dtsi +++ b/target/linux/ramips/dts/rt3352.dtsi @@ -26,7 +26,7 @@ serial0 = &uartlite; }; - palmbus@10000000 { + palmbus: palmbus@10000000 { compatible = "palmbus"; reg = <0x10000000 0x200000>; ranges = <0x0 0x10000000 0x1FFFFF>; @@ -34,12 +34,12 @@ #address-cells = <1>; #size-cells = <1>; - sysc@0 { + sysc: sysc@0 { compatible = "ralink,rt3352-sysc", "ralink,rt3050-sysc"; reg = <0x0 0x100>; }; - timer@100 { + timer: timer@100 { compatible = "ralink,rt3352-timer", "ralink,rt2880-timer"; reg = <0x100 0x20>; @@ -47,7 +47,7 @@ interrupts = <1>; }; - watchdog@120 { + watchdog: watchdog@120 { compatible = "ralink,rt3352-wdt", "ralink,rt2880-wdt"; reg = <0x120 0x10>; @@ -69,7 +69,7 @@ interrupts = <2>; }; - memc@300 { + memc: memc@300 { compatible = "ralink,rt3352-memc", "ralink,rt3050-memc"; reg = <0x300 0x100>; @@ -80,7 +80,7 @@ interrupts = <3>; }; - uart@500 { + uart: uart@500 { compatible = "ralink,rt3352-uart", "ralink,rt2880-uart", "ns16550a"; reg = <0x500 0x100>; @@ -165,7 +165,7 @@ compatible = "ralink,rt3352-spi", "ralink,rt2880-spi"; reg = <0xb40 0x60>; #address-cells = <1>; - #size-cells = <1>; + #size-cells = <0>; resets = <&rstctrl 18>; reset-names = "spi"; @@ -191,9 +191,26 @@ pinctrl-names = "default"; pinctrl-0 = <&uartlite_pins>; }; + + gdma: gdma@2800 { + compatible = "ralink,rt3883-gdma"; + reg = <0x2800 0x800>; + + resets = <&rstctrl 14>; + reset-names = "dma"; + + interrupt-parent = <&intc>; + interrupts = <7>; + + #dma-cells = <1>; + #dma-channels = <16>; + #dma-requests = <16>; + + status = "disabled"; + }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; @@ -229,7 +246,12 @@ #reset-cells = <1>; }; - ethernet@10100000 { + clkctrl: clkctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + + ethernet: ethernet@10100000 { compatible = "ralink,rt3352-eth", "ralink,rt3050-eth"; reg = <0x10100000 0x10000>; @@ -259,9 +281,11 @@ resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; + clocks = <&clkctrl 18 &clkctrl 20>; + clock-names = "host", "device"; }; - wmac@10180000 { + wmac: wmac@10180000 { compatible = "ralink,rt3352-wmac", "ralink,rt2880-wmac"; reg = <0x10180000 0x40000>; @@ -271,7 +295,7 @@ ralink,eeprom = "soc_wmac.eeprom"; }; - ehci@101c0000 { + ehci: ehci@101c0000 { compatible = "generic-ehci"; reg = <0x101c0000 0x1000>; @@ -284,7 +308,7 @@ status = "disabled"; }; - ohci@101c1000 { + ohci: ohci@101c1000 { compatible = "generic-ohci"; reg = <0x101c1000 0x1000>; diff --git a/target/linux/ramips/dts/rt3883.dtsi b/target/linux/ramips/dts/rt3883.dtsi index 9f0c96f15f..041b0633d3 100644 --- a/target/linux/ramips/dts/rt3883.dtsi +++ b/target/linux/ramips/dts/rt3883.dtsi @@ -26,7 +26,7 @@ compatible = "mti,cpu-interrupt-controller"; }; - palmbus@10000000 { + palmbus: palmbus@10000000 { compatible = "palmbus"; reg = <0x10000000 0x200000>; ranges = <0x0 0x10000000 0x1FFFFF>; @@ -34,12 +34,12 @@ #address-cells = <1>; #size-cells = <1>; - sysc@0 { + sysc: sysc@0 { compatible = "ralink,rt3883-sysc", "ralink,rt3050-sysc"; reg = <0x0 0x100>; }; - timer@100 { + timer: timer@100 { compatible = "ralink,rt3883-timer", "ralink,rt2880-timer"; reg = <0x100 0x20>; @@ -47,7 +47,7 @@ interrupts = <1>; }; - watchdog@120 { + watchdog: watchdog@120 { compatible = "ralink,rt3883-wdt", "ralink,rt2880-wdt"; reg = <0x120 0x10>; @@ -72,7 +72,7 @@ interrupts = <2>; }; - memc@300 { + memc: memc@300 { compatible = "ralink,rt3883-memc", "ralink,rt3050-memc"; reg = <0x300 0x100>; @@ -83,7 +83,7 @@ interrupts = <3>; }; - uart@500 { + uart: uart@500 { compatible = "ralink,rt3883-uart", "ralink,rt2880-uart", "ns16550a"; reg = <0x500 0x100>; @@ -211,9 +211,26 @@ pinctrl-names = "default"; pinctrl-0 = <&uartlite_pins>; }; + + gdma: gdma@2800 { + compatible = "ralink,rt3883-gdma"; + reg = <0x2800 0x800>; + + resets = <&rstctrl 14>; + reset-names = "dma"; + + interrupt-parent = <&intc>; + interrupts = <7>; + + #dma-cells = <1>; + #dma-channels = <16>; + #dma-requests = <16>; + + status = "disabled"; + }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; @@ -244,7 +261,7 @@ }; }; - ethernet@10100000 { + ethernet: ethernet@10100000 { compatible = "ralink,rt3883-eth"; reg = <0x10100000 0x10000>; @@ -272,7 +289,12 @@ #reset-cells = <1>; }; - pci@10140000 { + clkctrl: clkctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + + pci: pci@10140000 { compatible = "ralink,rt3883-pci"; reg = <0x10140000 0x20000>; #address-cells = <1>; @@ -364,9 +386,11 @@ resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; + clocks = <&clkctrl 22 &clkctrl 25>; + clock-names = "host", "device"; }; - wmac@10180000 { + wmac: wmac@10180000 { compatible = "ralink,rt3883-wmac", "ralink,rt2880-wmac"; reg = <0x10180000 0x40000>; @@ -376,7 +400,7 @@ ralink,eeprom = "soc_wmac.eeprom"; }; - ehci@101c0000 { + ehci: ehci@101c0000 { compatible = "generic-ehci"; reg = <0x101c0000 0x1000>; @@ -389,7 +413,7 @@ status = "disabled"; }; - ohci@101c1000 { + ohci: ohci@101c1000 { compatible = "generic-ohci"; reg = <0x101c1000 0x1000>; diff --git a/target/linux/ramips/dts/rt5350.dtsi b/target/linux/ramips/dts/rt5350.dtsi index 93c95c8605..1027519c98 100644 --- a/target/linux/ramips/dts/rt5350.dtsi +++ b/target/linux/ramips/dts/rt5350.dtsi @@ -26,7 +26,7 @@ serial0 = &uartlite; }; - palmbus@10000000 { + palmbus: palmbus@10000000 { compatible = "palmbus"; reg = <0x10000000 0x200000>; ranges = <0x0 0x10000000 0x1FFFFF>; @@ -34,12 +34,12 @@ #address-cells = <1>; #size-cells = <1>; - sysc@0 { + sysc: sysc@0 { compatible = "ralink,rt5350-sysc", "ralink,rt3050-sysc"; reg = <0x0 0x100>; }; - timer@100 { + timer: timer@100 { compatible = "ralink,rt5350-timer", "ralink,rt2880-timer"; reg = <0x100 0x20>; @@ -47,7 +47,7 @@ interrupts = <1>; }; - watchdog@120 { + watchdog: watchdog@120 { compatible = "ralink,rt5350-wdt", "ralink,rt2880-wdt"; reg = <0x120 0x10>; @@ -72,7 +72,7 @@ interrupts = <2>; }; - memc@300 { + memc: memc@300 { compatible = "ralink,rt5350-memc", "ralink,rt3050-memc"; reg = <0x300 0x100>; @@ -83,7 +83,7 @@ interrupts = <3>; }; - uart@500 { + uart: uart@500 { compatible = "ralink,rt5350-uart", "ralink,rt2880-uart", "ns16550a"; reg = <0x500 0x100>; @@ -137,7 +137,7 @@ status = "disabled"; }; - i2c@900 { + i2c: i2c@900 { compatible = "link,rt5350-i2c", "ralink,rt2880-i2c"; reg = <0x900 0x100>; @@ -161,7 +161,7 @@ reset-names = "spi"; #address-cells = <1>; - #size-cells = <1>; + #size-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&spi_pins>; @@ -201,16 +201,33 @@ reg-shift = <2>; }; - systick@d00 { + systick: systick@d00 { compatible = "ralink,rt5350-systick", "ralink,cevt-systick"; reg = <0xd00 0x10>; interrupt-parent = <&cpuintc>; interrupts = <7>; }; + + gdma: gdma@2800 { + compatible = "ralink,rt3883-gdma"; + reg = <0x2800 0x800>; + + resets = <&rstctrl 14>; + reset-names = "dma"; + + interrupt-parent = <&intc>; + interrupts = <7>; + + #dma-cells = <1>; + #dma-channels = <16>; + #dma-requests = <16>; + + status = "disabled"; + }; }; - pinctrl { + pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; pinctrl-names = "default"; @@ -267,15 +284,22 @@ #reset-cells = <1>; }; + clkctrl: clkctrl { + compatible = "ralink,rt2880-clock"; + #clock-cells = <1>; + }; + usbphy: usbphy { compatible = "ralink,rt3352-usbphy"; #phy-cells = <1>; resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; + clocks = <&clkctrl 18>; + clock-names = "host"; }; - ethernet@10100000 { + ethernet: ethernet@10100000 { compatible = "ralink,rt5350-eth"; reg = <0x10100000 0x10000>; @@ -289,7 +313,7 @@ }; esw: esw@10110000 { - compatible = "ralink,rt3050-esw"; + compatible = "ralink,rt5350-esw", "ralink,rt3050-esw"; reg = <0x10110000 0x8000>; resets = <&rstctrl 23>; @@ -299,7 +323,7 @@ interrupts = <17>; }; - wmac@10180000 { + wmac: wmac@10180000 { compatible = "ralink,rt5350-wmac", "ralink,rt2880-wmac"; reg = <0x10180000 0x40000>; @@ -309,7 +333,7 @@ ralink,eeprom = "soc_wmac.eeprom"; }; - ehci@101c0000 { + ehci: ehci@101c0000 { compatible = "generic-ehci"; reg = <0x101c0000 0x1000>; @@ -320,7 +344,7 @@ interrupts = <18>; }; - ohci@101c1000 { + ohci: ohci@101c1000 { compatible = "generic-ohci"; reg = <0x101c1000 0x1000>; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 09c0ec27a0..b1afb82c00 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -2,180 +2,414 @@ # MT7620A Profiles # -# sign trednet / UMedia images -define BuildFirmware/UMedia/squashfs - $(call BuildFirmware/Default8M/$(1),$(1),$(2),$(3)) - if [ -e "$(call sysupname,$(1),$(2))" ]; then \ - fix-u-media-header -T 0x46 -B $(4) \ - -i $(call sysupname,$(1),$(2)) \ - -o $(call imgname,$(1),$(2))-factory.bin; \ - fi -endef -BuildFirmware/UMedia/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3)) - -# $(1): (ignored) -# $(2): lowercase board name -# $(3): uppercase board name (must match DTS filename w/o extension) -# $(4): erase block size -# $(5): hardware id for mkdniimg -# $(6): maximum image size -define BuildFirmware/Netgear/squashfs - $(call PatchKernelLzmaDtb,$(2),$(3)) - # Pad kernel to eraseblock boundary, minus 2 uImage headers (=128 bytes): - # bs = (eraseblock * (1 + (128 + kernelsize)/eraseblock)) - 128 - dd if=$(KDIR)/vmlinux-$(2).bin.lzma \ - of=$(KDIR)/vmlinux-$(2).bin.lzma.tmp \ - bs=`expr \( $(4) \* \( 1 + \( 128 + \`wc -c < $(KDIR)/vmlinux-$(2).bin.lzma\` \) / $(4) \) \) - 128` \ - count=1 conv=sync - - $(call MkImage,lzma,$(KDIR)/vmlinux-$(2).bin.lzma.tmp,$(KDIR)/vmlinux-$(2).uImage) - cat ex2700-fakeroot.uImage >> $(KDIR)/vmlinux-$(2).uImage - $(call MkImageSysupgrade/squashfs,squashfs,$(2),$(6)) +define Build/tplink-header + $(STAGING_DIR_HOST)/bin/mktplinkfw2 -a 0x4 -V "ver. 2.0" -B $(1) \ + -o $@.new -k $@ && mv $@.new $@ +endef + +define Build/pad-kernel-ex2700 + cp $@ $@.tmp && dd if=/dev/zero bs=64 count=1 >> $@.tmp \ + && dd if=$@.tmp of=$@.new bs=64k conv=sync && truncate -s -64 $@.new \ + && cat ex2700-fakeroot.uImage >> $@.new && rm $@.tmp && mv $@.new $@ +endef +define Build/netgear-header $(STAGING_DIR_HOST)/bin/mkdniimg \ - -B $(3) -H $(5) -v OpenWrt \ - -i $(call imgname,squashfs,$(2))-sysupgrade.bin \ - -o $(call imgname,squashfs,$(2))-factory.bin -endef - -define MkImageTpl/squashfs - $(eval output_name=$(IMG_PREFIX)-$(2)-$(1)-$(if $(4),$(4),sysupgrade).bin) - -$(STAGING_DIR_HOST)/bin/mktplinkfw2 -V "ver. 2.0" -B "$(2)" -j \ - -o $(KDIR)/$(output_name) \ - -k $(KDIR)/vmlinux-$(1)$(4).bin.lzma \ - -r $(KDIR)/root.$(1) && \ - $(CP) $(KDIR)/$(output_name) $(BIN_DIR)/$(output_name) -endef -define MkImageTpl/initramfs - $(eval output_name=$(IMG_PREFIX)-$(2)-$(1).bin) - -$(STAGING_DIR_HOST)/bin/mktplinkfw2 -V "ver. 2.0" -B "$(2)" -c \ - -o $(KDIR)/$(output_name) \ - -k $(KDIR)/vmlinux-$(1).bin.lzma && \ - $(CP) $(KDIR)/$(output_name) $(BIN_DIR)/$(output_name) -endef -define BuildFirmware/OF/tplink - $(call PatchKernelLzmaDtb,$(1),$(2),$(4)) - $(call MkImageTpl/$(1),$(1),$(2),$(4),$(5)) -endef -define BuildFirmware/OF/tplink/initramfs - $(call PatchKernelLzmaDtb,$(2),$(3),-initramfs) - $(call MkImageTpl/$(1),$(1),$(2),$(4),$(5)) -endef -BuildFirmware/Tplink/squashfs=$(call BuildFirmware/OF/tplink,$(1),$(2),$(3),$(4)) -BuildFirmware/Tplink/initramfs=$(call BuildFirmware/OF/tplink/initramfs,$(1),$(2),$(3),$(4)) - -define BuildFirmware/WRH-300CR/squashfs - $(call BuildFirmware/Default16M/squashfs,$(1),$(2),$(3)) - cp $(call sysupname,$(1),$(2)) $(KDIR)/v_0.0.0.bin + $(1) -v OpenWrt -i $@ \ + -o $@.new && mv $@.new $@ +endef + +define Build/poray-header + mkporayfw $(1) \ + -f $@ \ + -o $@.new; \ + mv $@.new $@ +endef + +define Build/umedia-header + fix-u-media-header -T 0x46 -B $(1) -i $@ -o $@.new && mv $@.new $@ +endef + +define Build/elecom-header + cp $@ $(KDIR)/v_0.0.0.bin ( \ $(STAGING_DIR_HOST)/bin/md5sum $(KDIR)/v_0.0.0.bin | \ sed 's/ .*//' && \ echo 458 \ ) | $(STAGING_DIR_HOST)/bin/md5sum | \ sed 's/ .*//' > $(KDIR)/v_0.0.0.md5 - $(STAGING_DIR_HOST)/bin/tar -cf $(call imgname,$(1),$(2))-factory.bin -C $(KDIR) v_0.0.0.bin v_0.0.0.md5 + $(STAGING_DIR_HOST)/bin/tar -cf $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5 +endef + +define Device/ArcherC20i + DTS := ArcherC20i + KERNEL := $(KERNEL_DTB) + KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20i -c + IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20i -j -r $(KDIR)/root.squashfs + DEVICE_TITLE := TP-Link ArcherC20i endef -BuildFirmware/WRH-300CR/initramfs=$(call BuildFirmware/Default16M/initramfs,$(1),$(2),$(3)) +TARGET_DEVICES += ArcherC20i +define Device/ArcherC50 + DTS := ArcherC50 + KERNEL := $(KERNEL_DTB) + KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC50 -c + IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC50 -j -r $(KDIR)/root.squashfs + DEVICE_TITLE := TP-Link ArcherC50 +endef +TARGET_DEVICES += ArcherC50 -Image/Build/Profile/E1700=$(call BuildFirmware/UMedia/$(1),$(1),e1700,E1700,0x013326) ex2700_mtd_size=3866624 -Image/Build/Profile/EX2700=$(call BuildFirmware/Netgear/$(1),$(1),ex2700,EX2700,65536,29764623+4+0+32+2x2+0,$(ex2700_mtd_size)) -Image/Build/Profile/MT7620a=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a,MT7620a) -Image/Build/Profile/MT7620a_MT7610e=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_mt7610e,MT7620a_MT7610e) -Image/Build/Profile/MT7620a_MT7530=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_mt7530,MT7620a_MT7530) -Image/Build/Profile/MT7620a_V22SG=$(call BuildFirmware/Default8M/$(1),$(1),mt7620a_v22sg,MT7620a_V22SG) +define Device/ex2700 + DTS := EX2700 + IMAGE_SIZE := $(ex2700_mtd_size) + IMAGES += factory.bin + KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700 + IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | netgear-header -B EX2700 -H 29764623+4+0+32+2x2+0 + DEVICE_TITLE := Netgear EX2700 +endef +TARGET_DEVICES += ex2700 + +define Device/wt3020-4M + DTS := WT3020-4M + IMAGE_SIZE := $(ralink_default_fw_size_4M) + IMAGES += factory.bin + IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 4M + DEVICE_TITLE := Nexx WT3020 (4MB) +endef +TARGET_DEVICES += wt3020-4M + +define Device/wt3020-8M + DTS := WT3020-8M + IMAGE_SIZE := $(ralink_default_fw_size_8M) + IMAGES += factory.bin + IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 8M + DEVICE_TITLE := Nexx WT3020 (8MB) +endef +TARGET_DEVICES += wt3020-8M + +define Device/wrh-300cr + DTS := WRH-300CR + IMAGE_SIZE := $(ralink_default_fw_size_16M) + IMAGES += factory.bin + IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | elecom-header + DEVICE_TITLE := Elecom WRH-300CR + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci +endef +TARGET_DEVICES += wrh-300cr + +define Device/e1700 + DTS := E1700 + IMAGES += factory.bin + IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | umedia-header 0x013326 + DEVICE_TITLE := Linksys E1700 +endef +TARGET_DEVICES += e1700 + br100_mtd_size=8126464 -Image/Build/Profile/AI-BR100=$(call BuildFirmware/CustomFlash/$(1),$(1),ai-br100,AI-BR100,$(br100_mtd_size),Ai-BR) -Image/Build/Profile/RP-N53=$(call BuildFirmware/Default8M/$(1),$(1),rp-n53,RP-N53) +define Device/ai-br100 + DTS := AI-BR100 + IMAGE_SIZE := $(br100_mtd_size) + DEVICE_TITLE := Aigale Ai-BR100 + DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci +endef +TARGET_DEVICES += ai-br100 + whr_300hp2_mtd_size=7012352 -Image/Build/Profile/WHR300HP2=$(call BuildFirmware/CustomFlash/$(1),$(1),whr-300hp2,WHR-300HP2,$(whr_300hp2_mtd_size)) -Image/Build/Profile/WHR600D=$(call BuildFirmware/CustomFlash/$(1),$(1),whr-600d,WHR-600D,$(whr_300hp2_mtd_size)) +define Device/whr-300hp2 + DTS := WHR-300HP2 + IMAGE_SIZE := $(whr_300hp2_mtd_size) + DEVICE_TITLE := Buffalo WHR-300HP2 +endef +TARGET_DEVICES += whr-300hp2 + +define Device/whr-600d + DTS := WHR-600D + IMAGE_SIZE := $(whr_300hp2_mtd_size) + DEVICE_TITLE := Buffalo WHR-600D +endef +TARGET_DEVICES += whr-600d + whr_1166d_mtd_size=15400960 -Image/Build/Profile/WHR1166D=$(call BuildFirmware/CustomFlash/$(1),$(1),whr-1166d,WHR-1166D,$(whr_1166d_mtd_size)) +define Device/whr-1166d + DTS := WHR-1166D + IMAGE_SIZE := $(whr_1166d_mtd_size) + DEVICE_TITLE := Buffalo WHR-1166D +endef +TARGET_DEVICES += whr-1166d + dlink810l_mtd_size=6881280 -Image/Build/Profile/CF-WR800N=$(call BuildFirmware/Default8M/$(1),$(1),cf-wr800n,CF-WR800N) -Image/Build/Profile/CS-QR10=$(call BuildFirmware/Default8M/$(1),$(1),cs-qr10,CS-QR10) -Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l,DIR-810L,$(dlink810l_mtd_size)) +define Device/dir-810l + DTS := DIR-810L + IMAGE_SIZE := $(dlink810l_mtd_size) + DEVICE_TITLE := D-Link DIR-810L +endef +TARGET_DEVICES += dir-810l + na930_mtd_size=20971520 -Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) -Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) -Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) -Image/Build/Profile/MZK-EX300NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) -Image/Build/Profile/MZK-EX750NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex750np,MZK-EX750NP) -Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) -Image/Build/Profile/HC5761=$(call BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) -Image/Build/Profile/HC5861=$(call BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) -Image/Build/Profile/OY-0001=$(call BuildFirmware/Default16M/$(1),$(1),oy-0001,OY-0001) -Image/Build/Profile/PSG1208=$(call BuildFirmware/Default8M/$(1),$(1),psg1208,PSG1208) -Image/Build/Profile/Y1=$(call BuildFirmware/Default16M/$(1),$(1),y1,Y1) -Image/Build/Profile/Y1S=$(call BuildFirmware/Default16M/$(1),$(1),y1s,Y1S) -Image/Build/Profile/MLW221=$(call BuildFirmware/Default16M/$(1),$(1),mlw221,MLW221) -Image/Build/Profile/MLWG2=$(call BuildFirmware/Default16M/$(1),$(1),mlwg2,MLWG2) -Image/Build/Profile/WMR-300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR-300) -Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U) -Image/Build/Profile/WRH-300CR=$(call BuildFirmware/WRH-300CR/$(1),$(1),wrh-300cr,WRH-300CR) -Image/Build/Profile/WRTNODE=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode,WRTNODE) -Image/Build/Profile/WT3020=$(call BuildFirmware/PorayDualSize/$(1),$(1),wt3020,WT3020) -Image/Build/Profile/MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1),miwifi-mini,MIWIFI-MINI) -Image/Build/Profile/GL-MT300A=$(call BuildFirmware/Default16M/$(1),$(1),gl-mt300a,GL-MT300A) -Image/Build/Profile/GL-MT300N=$(call BuildFirmware/Default16M/$(1),$(1),gl-mt300n,GL-MT300N) -Image/Build/Profile/GL-MT750=$(call BuildFirmware/Default16M/$(1),$(1),gl-mt750,GL-MT750) -Image/Build/Profile/ZTE-Q7=$(call BuildFirmware/Default8M/$(1),$(1),zte-q7,ZTE-Q7) -Image/Build/Profile/YOUKU-YK1=$(call BuildFirmware/Default16M/$(1),$(1),youku-yk1,YOUKU-YK1) -Image/Build/Profile/ZBT-WA05=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wa05,ZBT-WA05) -Image/Build/Profile/ZBT-WE826=$(call BuildFirmware/Default16M/$(1),$(1),zbt-we826,ZBT-WE826) -Image/Build/Profile/ZBT-WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wr8305rt,ZBT-WR8305RT) -Image/Build/Profile/ArcherC20i=$(call BuildFirmware/Tplink/$(1),$(1),ArcherC20i,ArcherC20i) +define Device/na930 + DTS := NA930 + IMAGE_SIZE := $(na930_mtd_size) + DEVICE_TITLE := Sercomm NA930 +endef +TARGET_DEVICES += na930 + microwrt_mtd_size=16515072 -Image/Build/Profile/MicroWRT=$(call BuildFirmware/CustomFlash/$(1),$(1),microwrt,MicroWRT,$(microwrt_mtd_size)) -Image/Build/Profile/TINY-AC=$(call BuildFirmware/Default8M/$(1),$(1),tiny-ac,TINY-AC) - - -define Image/Build/Profile/Default - $(call Image/Build/Profile/E1700,$(1)) - $(call Image/Build/Profile/EX2700,$(1)) - $(call Image/Build/Profile/MT7620a,$(1)) - $(call Image/Build/Profile/MT7620a_MT7610e,$(1)) - $(call Image/Build/Profile/MT7620a_MT7530,$(1)) - $(call Image/Build/Profile/MT7620a_V22SG,$(1)) - $(call Image/Build/Profile/AI-BR100,$(1)) - $(call Image/Build/Profile/CF-WR800N,$(1)) - $(call Image/Build/Profile/CS-QR10,$(1)) - $(call Image/Build/Profile/RP-N53,$(1)) - $(call Image/Build/Profile/DIR-810L,$(1)) - $(call Image/Build/Profile/WHR300HP2,$(1)) - $(call Image/Build/Profile/WHR600D,$(1)) - $(call Image/Build/Profile/WHR1166D,$(1)) - $(call Image/Build/Profile/DB-WRT01,$(1)) - $(call Image/Build/Profile/MZK-750DHP,$(1)) - $(call Image/Build/Profile/MZK-EX300NP,$(1)) - $(call Image/Build/Profile/MZK-EX750NP,$(1)) - $(call Image/Build/Profile/NA930,$(1)) - $(call Image/Build/Profile/HC5661,$(1)) - $(call Image/Build/Profile/HC5761,$(1)) - $(call Image/Build/Profile/HC5861,$(1)) - $(call Image/Build/Profile/OY-0001,$(1)) - $(call Image/Build/Profile/PSG1208,$(1)) - $(call Image/Build/Profile/Y1,$(1)) - $(call Image/Build/Profile/Y1S,$(1)) - $(call Image/Build/Profile/MLW221,$(1)) - $(call Image/Build/Profile/MLWG2,$(1)) - $(call Image/Build/Profile/WMR-300,$(1)) - $(call Image/Build/Profile/RT-N14U,$(1)) - $(call Image/Build/Profile/WRH-300CR,$(1)) - $(call Image/Build/Profile/WRTNODE,$(1)) - $(call Image/Build/Profile/WT3020,$(1)) - $(call Image/Build/Profile/MIWIFI-MINI,$(1)) - $(call Image/Build/Profile/GL-MT300A,$(1)) - $(call Image/Build/Profile/GL-MT300N,$(1)) - $(call Image/Build/Profile/GL-MT750,$(1)) - $(call Image/Build/Profile/ZTE-Q7,$(1)) - $(call Image/Build/Profile/YOUKU-YK1,$(1)) - $(call Image/Build/Profile/ZBT-WA05,$(1)) - $(call Image/Build/Profile/ZBT-WE826,$(1)) - $(call Image/Build/Profile/ZBT-WR8305RT,$(1)) - $(call Image/Build/Profile/ArcherC20i,$(1)) - $(call Image/Build/Profile/MicroWRT,$(1)) - $(call Image/Build/Profile/TINY-AC,$(1)) +define Device/microwrt + DTS := MicroWRT + IMAGE_SIZE := $(microwrt_mtd_size) + DEVICE_TITLE := Microduino MicroWRT +endef +TARGET_DEVICES += microwrt + +define Device/mt7620a + DTS := MT7620a + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := MediaTek MT7620a EVB +endef +TARGET_DEVICES += mt7620a + +define Device/mt7620a_mt7610e + DTS := MT7620a_MT7610e + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := MediaTek MT7620a + MT7610e EVB +endef +TARGET_DEVICES += mt7620a_mt7610e + +define Device/mt7620a_mt7530 + DTS := MT7620a_MT7530 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := MediaTek MT7620a + MT7530 EVB +endef +TARGET_DEVICES += mt7620a_mt7530 + +define Device/mt7620a_v22sg + DTS := MT7620a_V22SG + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := MediaTek MT7620a V22SG +endef +TARGET_DEVICES += mt7620a_v22sg + +define Device/rp-n53 + DTS := RP-N53 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Asus RP-N53 +endef +TARGET_DEVICES += rp-n53 + +define Device/cf-wr800n + DTS := CF-WR800N + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Comfast CF-WR800N +endef +TARGET_DEVICES += cf-wr800n + +define Device/cs-qr10 + DTS := CS-QR10 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Planex CS-QR10 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk kmod-sdhci-mt7620 +endef +TARGET_DEVICES += cs-qr10 + +define Device/db-wrt01 + DTS := DB-WRT01 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Planex DB-WRT01 +endef +TARGET_DEVICES += db-wrt01 + +define Device/mzk-750dhp + DTS := MZK-750DHP + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Planex MZK-750DHP + DEVICE_PACKAGES := kmod-mt76 +endef +TARGET_DEVICES += mzk-750dhp + +define Device/mzk-ex300np + DTS := MZK-EX300NP + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Planex MZK-EX300NP +endef +TARGET_DEVICES += mzk-ex300np + +define Device/mzk-ex750np + DTS := MZK-EX750NP + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Planex MZK-EX750NP + DEVICE_PACKAGES := kmod-mt76 +endef +TARGET_DEVICES += mzk-ex750np + +define Device/hc5661 + DTS := HC5661 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := HiWiFi HC5661 + DEVICE_PACKAGES := kmod-usb2 kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev +endef +TARGET_DEVICES += hc5661 + +define Device/hc5761 + DTS := HC5761 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := HiWiFi HC5761 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev +endef +TARGET_DEVICES += hc5761 + +define Device/hc5861 + DTS := HC5861 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := HiWiFi HC5861 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci kmod-sdhci-mt7620 kmod-ledtrig-usbdev +endef +TARGET_DEVICES += hc5861 + +define Device/oy-0001 + DTS := OY-0001 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Oh Yeah OY-0001 +endef +TARGET_DEVICES += oy-0001 + +define Device/psg1208 + DTS := PSG1208 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Phicomm PSG1208 + DEVICE_PACKAGES := kmod-mt76 +endef +TARGET_DEVICES += psg1208 + +define Device/y1 + DTS := Y1 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Lenovo Y1 +endef +TARGET_DEVICES += y1 + +define Device/y1s + DTS := Y1S + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Lenovo Y1S +endef +TARGET_DEVICES += y1s + +define Device/mlw221 + DTS := MLW221 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Kingston MLW221 +endef +TARGET_DEVICES += mlw221 + +define Device/mlwg2 + DTS := MLWG2 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Kingston MLWG2 +endef +TARGET_DEVICES += mlwg2 + +define Device/wmr-300 + DTS := WMR-300 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Buffalo WMR-300 +endef +TARGET_DEVICES += wmr-300 + +define Device/rt-n14u + DTS := RT-N14U + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Asus RT-N14u +endef +TARGET_DEVICES += rt-n14u + +define Device/wrtnode + DTS := WRTNODE + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := WRTNode +endef +TARGET_DEVICES += wrtnode + +define Device/miwifi-mini + DTS := MIWIFI-MINI + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Xiaomi MiWiFi Mini + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci +endef +TARGET_DEVICES += miwifi-mini + +define Device/gl-mt300a + DTS := GL-MT300A + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := GL-Inet GL-MT300A + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 +endef +TARGET_DEVICES += gl-mt300a + +define Device/gl-mt300n + DTS := GL-MT300N + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := GL-Inet GL-MT300N + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 +endef +TARGET_DEVICES += gl-mt300n + +define Device/gl-mt750 + DTS := GL-MT750 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := GL-Inet GL-MT750 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 +endef +TARGET_DEVICES += gl-mt750 + +define Device/zte-q7 + DTS := ZTE-Q7 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := ZTE Q7 +endef +TARGET_DEVICES += zte-q7 + +define Device/youku-yk1 + DTS := YOUKU-YK1 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := YOUKU YK1 +endef +TARGET_DEVICES += youku-yk1 + +define Device/zbt-ape522ii + DTS := ZBT-APE522II + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Zbtlink ZBT-APE522II + DEVICE_PACKAGES := kmod-mt76 +endef +TARGET_DEVICES += zbt-ape522ii + +define Device/zbt-wa05 + DTS := ZBT-WA05 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Zbtlink ZBT-WA05 +endef +TARGET_DEVICES += zbt-wa05 + +define Device/zbt-we826 + DTS := ZBT-WE826 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Zbtlink ZBT-WE826 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620 +endef +TARGET_DEVICES += zbt-we826 + +define Device/zbt-wr8305rt + DTS := ZBT-WR8305RT + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Zbtlink ZBT-WR8305RT +endef +TARGET_DEVICES += zbt-wr8305rt + +define Device/tiny-ac + DTS := TINY-AC + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Dovado Tiny AC + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci endef +TARGET_DEVICES += tiny-ac diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 1b8d3dae87..31752446ac 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -36,17 +36,20 @@ endef define Device/mt7621 DTS := MT7621 IMAGE_SIZE := $(ralink_default_fw_size_4M) + DEVICE_TITLE := MediaTek MT7621 EVB endef TARGET_DEVICES += mt7621 define Device/wsr-600 DTS := WSR-600 IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Buffalo WSR-600 endef TARGET_DEVICES += wsr-600 define Device/re6500 DTS := RE6500 + DEVICE_TITLE := Linksys RE6500 endef TARGET_DEVICES += re6500 @@ -54,6 +57,7 @@ define Device/wsr-1166 DTS := WSR-1166 IMAGE/sysupgrade.bin := trx | pad-rootfs IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Buffalo WSR-1166 endef TARGET_DEVICES += wsr-1166 @@ -71,47 +75,64 @@ define Device/dir-860l-b1 seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb" | \ check-size $$$$(IMAGE_SIZE) + DEVICE_TITLE := D-Link DIR-860L B1 endef TARGET_DEVICES += dir-860l-b1 define Device/firewrt DTS := FIREWRT IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Firefly FireWRT + DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev endef TARGET_DEVICES += firewrt define Device/pbr-m1 DTS := PBR-M1 IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := PBR-M1 + DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci \ + kmod-rtc-pcf8563 kmod-i2c-mt7621 endef TARGET_DEVICES += pbr-m1 define Device/sap-g3200u3 DTS := SAP-G3200U3 + DEVICE_TITLE := STORYLiNK SAP-G3200U3 + DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev endef TARGET_DEVICES += sap-g3200u3 define Device/witi DTS := WITI IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := MQmaker WiTi + DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci \ + kmod-rtc-pcf8563 kmod-i2c-mt7621 endef TARGET_DEVICES += witi define Device/wndr3700v5 DTS := WNDR3700V5 IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Netgear WNDR3700v5 + DEVICE_PACKAGES := kmod-usb3 endef TARGET_DEVICES += wndr3700v5 define Device/zbt-wg2626 DTS := ZBT-WG2626 IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := ZBT WG2626 + DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci endef TARGET_DEVICES += zbt-wg2626 define Device/zbt-wg3526 DTS := ZBT-WG3526 IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := ZBT WG3526 + DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci endef TARGET_DEVICES += zbt-wg3526 @@ -123,6 +144,8 @@ define Device/wf-2881 IMAGE_SIZE := 132382720 KERNEL := $(KERNEL_DTB) | pad-offset 131072 64 | uImage lzma IMAGE/sysupgrade.bin := append-kernel | append-ubi | check-size $$$$(IMAGE_SIZE) + DEVICE_TITLE := NETIS WF-2881 + DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev endef TARGET_DEVICES += wf-2881 @@ -135,9 +158,19 @@ define Device/ubnt-erx KERNEL_INITRAMFS := $$(KERNEL) | check-size $$(KERNEL_SIZE) | \ ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.tar := sysupgrade-nand + DEVICE_TITLE := Ubiquiti EdgeRouter X + DEVICE_PACKAGES := -kmod-mt76 -kmod-rt2800-pci -kmod-cfg80211 -wpad-mini -iwinfo endef TARGET_DEVICES += ubnt-erx +define Device/sk-wb8 + DTS := SK-WB8 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := SamKnows Whitebox 8 + DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev uboot-envtools +endef +TARGET_DEVICES += sk-wb8 + # FIXME: is this still needed? define Image/Prepare #define Build/Compile diff --git a/target/linux/ramips/image/mt7628.mk b/target/linux/ramips/image/mt7628.mk index 1e6b06c82c..fa7d1e77f2 100644 --- a/target/linux/ramips/image/mt7628.mk +++ b/target/linux/ramips/image/mt7628.mk @@ -2,16 +2,34 @@ # MT7628 Profiles # -Image/Build/Profile/MIWIFI-NANO=$(call BuildFirmware/Default16M/$(1),$(1),miwifi-nano,MIWIFI-NANO) -Image/Build/Profile/MT7628=$(call BuildFirmware/Default4M/$(1),$(1),mt7628,MT7628) -Image/Build/Profile/WRTNODE2P=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode2p,WRTNODE2P) +define Device/mt7628 + DTS := MT7628 + IMAGE_SIZE := $(ralink_default_fw_size_4M) + DEVICE_TITLE := MediaTek MT7628 EVB + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev +endef +TARGET_DEVICES += mt7628 + +define Device/miwifi-nano + DTS := MIWIFI-NANO + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Xiaomi MiWiFi Nano + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev +endef +TARGET_DEVICES += miwifi-nano -define Image/Build/Profile/Default - $(call Image/Build/Profile/MIWIFI-NANO,$(1)) - $(call Image/Build/Profile/MT7628,$(1)) - $(call Image/Build/Profile/WRTNODE2P,$(1)) +define Device/wrtnode2p + DTS := WRTNODE2P + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := WRTnode 2P + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev endef +TARGET_DEVICES += wrtnode2p -define Image/Build/Profile/MiwifiNano - $(call Image/Build/Profile/MIWIFI-NANO,$(1)) +define Device/duzun-dm06 + DTS := DUZUN-DM06 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := DuZun DM06 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev endef +TARGET_DEVICES += duzun-dm06 diff --git a/target/linux/ramips/image/mt7688.mk b/target/linux/ramips/image/mt7688.mk index 45991d0874..ffd92d21c6 100644 --- a/target/linux/ramips/image/mt7688.mk +++ b/target/linux/ramips/image/mt7688.mk @@ -2,10 +2,26 @@ # MT7688 Profiles # -Image/Build/Profile/LinkIt7688=$(call BuildFirmware/Default32M/$(1),$(1),LinkIt7688,LINKIT7688) -Image/Build/Profile/WRTNODE2R=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode2r,WRTNODE2R) +define Device/LinkIt7688 + DTS := LINKIT7688 + IMAGE_SIZE := $(ralink_default_fw_size_32M) + DEVICE_TITLE := MediaTek LinkIt Smart 7688 + DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools +endef +TARGET_DEVICES += LinkIt7688 + +define Device/wrtnode2r + DTS := WRTNODE2R + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := WRTnode 2R + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci +endef +TARGET_DEVICES += wrtnode2r -define Image/Build/Profile/Default - $(call Image/Build/Profile/LinkIt7688,$(1)) - $(call Image/Build/Profile/WRTNODE2R,$(1)) +define Device/widora-neo + DTS := WIDORA-NEO + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Widora-NEO + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci endef +TARGET_DEVICES += widora-neo diff --git a/target/linux/ramips/image/rt288x.mk b/target/linux/ramips/image/rt288x.mk index 475e634a63..8fb5595671 100644 --- a/target/linux/ramips/image/rt288x.mk +++ b/target/linux/ramips/image/rt288x.mk @@ -2,58 +2,70 @@ # RT288X Profiles # -# Airlink101 AR670W -- LZMA without uImage header -define BuildFirmware/AR670W/squashfs - $(call PatchKernelLzmaDtb,$(2),$(3),$(5)) +define Build/gemtek-header + mkheader_gemtek $@ $@.new $(1) && mv $@.new $@ +endef - $(eval output_name=$(IMG_PREFIX)-$(2)-$(1)-$(if $(4),$(4),sysupgrade).bin) - $(eval factory_name=$(IMG_PREFIX)-$(2)-$(1)-factory.bin) +define Build/airlink-header + mkwrgimg -i $@ \ + -d "/dev/mtdblock/2" \ + -s "wrgn16a_airlink_ar670w" \ + -o $@.new && mv $@.new $@ +endef - ( dd if=$(KDIR)/vmlinux-$(2).bin.lzma bs=65536 \ - conv=sync; dd if=$(KDIR)/root.$(1) ) > $(KDIR)/$(output_name) +define Device/ar670w + DTS := AR670W + DEVICE_TITLE := Airlink AR670W + IMAGE_SIZE := $(ralink_default_fw_size_4M) + KERNEL := $(KERNEL_DTB) + IMAGES += factory.bin + IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | gemtek-header ar725w +endef +TARGET_DEVICES += ar725w - $(call prepare_generic_squashfs,$(KDIR)/$(output_name)) +define Device/ar725w + DTS := AR725W + DEVICE_TITLE := Gemtek AR725W + IMAGES += factory.bin + IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | gemtek-header ar725w +endef +TARGET_DEVICES += ar725w - if [ `stat -c%s "$(KDIR)/$(output_name)"` \ - -gt $(ralink_default_fw_size_4M) ]; then \ - echo "Warning: $(KDIR)/$(output_name) is too big" >&2; \ - else \ - mkwrgimg -i $(KDIR)/$(output_name) \ - -d "/dev/mtdblock/2" \ - -s "wrgn16a_airlink_ar670w" \ - -o $(BIN_DIR)/$(factory_name); \ - $(CP) $(KDIR)/$(output_name) $(BIN_DIR)/$(output_name); \ - fi +belkin_f5d8235v1_mtd_size=7929856 +define Device/f5d8235v1 + DTS := F5D8235_V1 + IMAGE_SIZE := $(belkin_f5d8235v1_mtd_size) + DEVICE_TITLE := Belkin F5D8235 V1 + DEVICE_PACKAGES := kmod-switch-rtl8366s endef +TARGET_DEVICES += f5d8235v1 -define BuildFirmware/Gemtek/squashfs - $(call BuildFirmware/Default4M/$(1),$(1),$(2),$(3)) - if [ -e "$(call sysupname,$(1),$(2))" ]; then \ - mkheader_gemtek "$(call sysupname,$(1),$(2))" \ - "$(call imgname,$(1),$(2))-factory.bin" $(2) || \ - rm -f "$(call imgname,$(1),$(2))-factory.bin"; \ - fi +define Device/rt-n15 + DTS := RT-N15 + IMAGE_SIZE := $(ralink_default_fw_size_4M) + DEVICE_TITLE := Asus RT-N15 + DEVICE_PACKAGES := kmod-switch-rtl8366s endef -BuildFirmware/Gemtek/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3)) +TARGET_DEVICES += rt-n15 +define Device/v11st-fe + DTS := V11STFE + IMAGE_SIZE := $(ralink_default_fw_size_4M) + DEVICE_TITLE := Ralink V11ST-FE +endef +TARGET_DEVICES += v11st-fe -Image/Build/Profile/AR670W=$(call BuildFirmware/AR670W/$(1),$(1),ar670w,AR670W) -Image/Build/Profile/AR725W=$(call BuildFirmware/Gemtek/$(1),$(1),ar725w,AR725W) -# 0x790000 -belkin_f5d8235v1_mtd_size=7929856 -Image/Build/Profile/F5D8235V1=$(call BuildFirmware/CustomFlash/$(1),$(1),f5d8235v1,F5D8235_V1,$(belkin_f5d8235v1_mtd_size)) -Image/Build/Profile/RTN15=$(call BuildFirmware/Default4M/$(1),$(1),rt-n15,RT-N15) -Image/Build/Profile/V11STFE=$(call BuildFirmware/Default4M/$(1),$(1),v11st-fe,V11STFE) -Image/Build/Profile/WLITX4AG300N=$(call BuildFirmware/Default4M/$(1),$(1),wli-tx4-ag300n,WLI-TX4-AG300N) -Image/Build/Profile/WZRAGL300NH=$(call BuildFirmware/Default4M/$(1),$(1),wzr-agl300nh,WZR-AGL300NH) - - -define Image/Build/Profile/Default - $(call Image/Build/Profile/AR670W,$(1)) - $(call Image/Build/Profile/AR725W,$(1)) - $(call Image/Build/Profile/F5D8235V1,$(1)) - $(call Image/Build/Profile/RTN15,$(1)) - $(call Image/Build/Profile/V11STFE,$(1)) - $(call Image/Build/Profile/WLITX4AG300N,$(1)) - $(call Image/Build/Profile/WZRAGL300NH,$(1)) +define Device/wli-tx4-ag300n + DTS := WLI-TX4-AG300N + IMAGE_SIZE := $(ralink_default_fw_size_4M) + DEVICE_TITLE := Buffalo WLI-TX4-AG300N +endef +TARGET_DEVICES += wli-tx4-ag300n + +define Device/wzr-agl300nh + DTS := WZR-AGL300NH + IMAGE_SIZE := $(ralink_default_fw_size_4M) + DEVICE_TITLE := Buffalo WZR-AGL300NH + DEVICE_PACKAGES := kmod-switch-rtl8366s endef +TARGET_DEVICES += wzr-agl300nh diff --git a/target/linux/ramips/modules.mk b/target/linux/ramips/modules.mk index 665dc41ae8..370d0ccfdc 100644 --- a/target/linux/ramips/modules.mk +++ b/target/linux/ramips/modules.mk @@ -1,11 +1,31 @@ # -# Copyright (C) 2006-2012 OpenWrt.org +# Copyright (C) 2006-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # OTHER_MENU:=Other modules + +define KernelPackage/pwm-mediatek + SUBMENU:=Other modules + TITLE:=MT7628 PWM + DEPENDS:=@(TARGET_ramips_mt7628||TARGET_ramips_mt7688) + KCONFIG:= \ + CONFIG_PWM=y \ + CONFIG_PWM_MEDIATEK \ + CONFIG_PWM_SYSFS=y + FILES:= \ + $(LINUX_DIR)/drivers/pwm/pwm-mediatek.ko + AUTOLOAD:=$(call AutoProbe,pwm-mediatek) +endef + +define KernelPackage/pwm-mediatek/description + Kernel modules for MediaTek Pulse Width Modulator +endef + +$(eval $(call KernelPackage,pwm-mediatek)) + define KernelPackage/sdhci-mt7620 SUBMENU:=Other modules TITLE:=MT7620 SDCI @@ -56,15 +76,14 @@ $(eval $(call KernelPackage,i2c-mt7621)) define KernelPackage/sound-mt7620 TITLE:=MT7620 PCM/I2S Alsa Driver - DEPENDS:=@TARGET_ramips_mt7620 +kmod-sound-soc-core +kmod-regmap @BROKEN + DEPENDS:=@TARGET_ramips_mt7620 +kmod-sound-soc-core +kmod-regmap @!TARGET_ramips_rt288x KCONFIG:= \ - CONFIG_SND_MT7620_SOC_I2S \ - CONFIG_SND_MT7620_SOC_WM8960 + CONFIG_SND_RALINK_SOC_I2S \ + CONFIG_SND_SOC_WM8960 FILES:= \ - $(LINUX_DIR)/sound/soc/ralink/snd-soc-mt7620-i2s.ko \ - $(LINUX_DIR)/sound/soc/ralink/snd-soc-mt7620-wm8960.ko \ + $(LINUX_DIR)/sound/soc/ralink/snd-soc-ralink-i2s.ko \ $(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8960.ko - AUTOLOAD:=$(call AutoLoad,90,snd-soc-wm8960 snd-soc-mt7620-i2s snd-soc-mt7620-wm8960) + AUTOLOAD:=$(call AutoLoad,90,snd-soc-wm8960 snd-soc-ralink-i2s) $(call AddDepends/sound) endef diff --git a/target/linux/ramips/mt7620/config-4.4 b/target/linux/ramips/mt7620/config-4.4 index 4bc890ca84..cd90484e1e 100644 --- a/target/linux/ramips/mt7620/config-4.4 +++ b/target/linux/ramips/mt7620/config-4.4 @@ -180,7 +180,6 @@ CONFIG_SCHED_HRTICK=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set # CONFIG_SERIAL_8250_FSL is not set -CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RT288X=y CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SOC_MT7620=y diff --git a/target/linux/ramips/mt7620/profiles/00-default.mk b/target/linux/ramips/mt7620/profiles/00-default.mk index 6c7d721444..a498e2bd22 100644 --- a/target/linux/ramips/mt7620/profiles/00-default.mk +++ b/target/linux/ramips/mt7620/profiles/00-default.mk @@ -7,9 +7,8 @@ define Profile/Default NAME:=Default Profile - PACKAGES:=\ - kmod-usb-core kmod-usb2 kmod-usb-ohci \ - kmod-ledtrig-usbdev + PACKAGES:= kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev + PRIORITY:=1 endef define Profile/Default/Description diff --git a/target/linux/ramips/mt7620/profiles/aigale.mk b/target/linux/ramips/mt7620/profiles/aigale.mk deleted file mode 100644 index 629a378cae..0000000000 --- a/target/linux/ramips/mt7620/profiles/aigale.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/AI-BR100 - NAME:=Aigale Ai-BR100 - PACKAGES:=kmod-usb-ohci kmod-usb2 -endef - -define Profile/AI-BR100/Description - Default package set for Aigale Ai-BR100. -endef -$(eval $(call Profile,AI-BR100)) diff --git a/target/linux/ramips/mt7620/profiles/dovado.mk b/target/linux/ramips/mt7620/profiles/dovado.mk deleted file mode 100644 index 34bc74a2df..0000000000 --- a/target/linux/ramips/mt7620/profiles/dovado.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/TINY-AC - NAME:=Dovado Tiny AC - PACKAGES:=\ - kmod-usb-core kmod-usb2 kmod-usb-ohci -endef - -define Profile/TINY-AC/Description - Support for Dovado Tiny AC router -endef -$(eval $(call Profile,TINY-AC)) diff --git a/target/linux/ramips/mt7620/profiles/elecom.mk b/target/linux/ramips/mt7620/profiles/elecom.mk deleted file mode 100644 index 5c84c92715..0000000000 --- a/target/linux/ramips/mt7620/profiles/elecom.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/WRH-300CR - NAME:=ELECOM WRH-300CR - PACKAGES:=\ - kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-usb-storage \ - kmod-scsi-core kmod-fs-ext4 block-mount -endef - -define Profile/WRH-300CR/Description - Package set optimized for the ELECOM WRH-300CR. -endef -$(eval $(call Profile,WRH-300CR)) diff --git a/target/linux/ramips/mt7620/profiles/gli.mk b/target/linux/ramips/mt7620/profiles/gli.mk deleted file mode 100644 index ae220d5adf..0000000000 --- a/target/linux/ramips/mt7620/profiles/gli.mk +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/GL-MT300A - NAME:=GL-MT300A - PACKAGES:=kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci kmod-mt76 -endef - -define Profile/GL-MT300A/Description - Support for gl-mt300a Router -endef -$(eval $(call Profile,GL-MT300A)) - -define Profile/GL-MT300N - NAME:=GL-MT300N - PACKAGES:=kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci kmod-mt76 -endef - -define Profile/GL-MT300N/Description - Support for gl-mt300n Router -endef -$(eval $(call Profile,GL-MT300N)) - -define Profile/GL-MT750 - NAME:=GL-MT750 - PACKAGES:=kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-mt7610e -endef - -define Profile/GL-MT750/Description - Support for gl-mt750 Router -endef -$(eval $(call Profile,GL-MT750)) diff --git a/target/linux/ramips/mt7620/profiles/hiwifi.mk b/target/linux/ramips/mt7620/profiles/hiwifi.mk deleted file mode 100644 index 5baa85ae88..0000000000 --- a/target/linux/ramips/mt7620/profiles/hiwifi.mk +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/HC5661 - NAME:=HiWiFi HC5661 - PACKAGES:=\ - kmod-usb-core kmod-usb-dwc2 kmod-usb2 \ - kmod-mmc-spi kmod-sdhci kmod-sdhci-mt7620 \ - kmod-ledtrig-usbdev -endef - -define Profile/HC5661/Description - Support HiWiFi HC5661 model(J1S) -endef -$(eval $(call Profile,HC5661)) - - -define Profile/HC5761 - NAME:=HiWiFi HC5761 - PACKAGES:=\ - kmod-usb-core kmod-usb-dwc2 kmod-usb2 \ - kmod-mmc-spi kmod-sdhci kmod-sdhci-mt7620 \ - kmod-ledtrig-usbdev -endef - -define Profile/HC5761/Description - Support HiWiFi HC5761 model(J2) -endef -$(eval $(call Profile,HC5761)) - - -define Profile/HC5861 - NAME:=HiWiFi HC5861 - PACKAGES:=\ - kmod-usb-core kmod-usb-dwc2 kmod-usb2 \ - kmod-mmc-spi kmod-sdhci kmod-sdhci-mt7620 \ - kmod-ledtrig-usbdev -endef - -define Profile/HC5861/Description - Support HiWiFi HC5861 model(J3) -endef -$(eval $(call Profile,HC5861)) diff --git a/target/linux/ramips/mt7620/profiles/linksys.mk b/target/linux/ramips/mt7620/profiles/linksys.mk deleted file mode 100644 index d8a2df4593..0000000000 --- a/target/linux/ramips/mt7620/profiles/linksys.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/E1700 - NAME:=Linksys E1700 - PACKAGES:=swconfig -endef - -define Profile/E1700/Description - Package set compatible with the Linksys E1700. -endef -$(eval $(call Profile,E1700)) diff --git a/target/linux/ramips/mt7620/profiles/mediatek.mk b/target/linux/ramips/mt7620/profiles/mediatek.mk deleted file mode 100644 index 4f6703ebf5..0000000000 --- a/target/linux/ramips/mt7620/profiles/mediatek.mk +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/MT7620a - NAME:=MT7620a EVB -endef - -define Profile/MT7620a/Description - Default package set compatible with MT7620a eval board -endef -$(eval $(call Profile,MT7620a)) diff --git a/target/linux/ramips/mt7620/profiles/microduino.mk b/target/linux/ramips/mt7620/profiles/microduino.mk deleted file mode 100644 index b68a269841..0000000000 --- a/target/linux/ramips/mt7620/profiles/microduino.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/MicroWRT - NAME:=Microduino MicroWRT - PACKAGES:= kmod-usb-core kmod-usb2 kmod-usb-ohci -endef - -define Profile/MicroWRT/Description - Package set compatible with MicroWRT -endef -$(eval $(call Profile,MicroWRT)) diff --git a/target/linux/ramips/mt7620/profiles/netgear.mk b/target/linux/ramips/mt7620/profiles/netgear.mk deleted file mode 100644 index d1b073abc2..0000000000 --- a/target/linux/ramips/mt7620/profiles/netgear.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/EX2700 - NAME:=Netgear EX2700 - PACKAGES:=-kmod-usb-core -kmod-usb2 -kmod-usb-ohci -kmod-ledtrig-usbdev -endef - -define Profile/EX2700/Description - Support for Netgear EX2700 -endef -$(eval $(call Profile,EX2700)) diff --git a/target/linux/ramips/mt7620/profiles/phicomm.mk b/target/linux/ramips/mt7620/profiles/phicomm.mk deleted file mode 100644 index e083a4c975..0000000000 --- a/target/linux/ramips/mt7620/profiles/phicomm.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/PSG1208 - NAME:=Phicomm PSG1208 - PACKAGES:=kmod-mt76 -endef - -define Profile/PSG1208/Description - Default package set for Phicomm PSG1208. -endef -$(eval $(call Profile,PSG1208)) diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk deleted file mode 100644 index f461aeb211..0000000000 --- a/target/linux/ramips/mt7620/profiles/planex.mk +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/CS-QR10 - NAME:=Planex CS-QR10 - PACKAGES:=\ - kmod-usb-core kmod-usb2 kmod-usb-ohci \ - i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk \ - kmod-sdhci-mt7620 -endef - -define Profile/CS-QR10/Description - Package set optimized for the Planex CS-QR10. -endef -$(eval $(call Profile,CS-QR10)) - - -define Profile/MZK-750DHP - NAME:=Planex MZK-750DHP - PACKAGES:= kmod-mt76 kmod-mt7610e -endef - -define Profile/MZK-750DHP/Description - Package set optimized for the Planex MZK-750DHP. -endef -$(eval $(call Profile,MZK-750DHP)) - - -define Profile/MZK-EX300NP - NAME:=Planex MZK-EX300NP - PACKAGES:= -endef - -define Profile/MZK-EX300NP/Description - Package set optimized for the Planex MZK-EX300NP. -endef -$(eval $(call Profile,MZK-EX300NP)) - - -define Profile/MZK-EX750NP - NAME:=Planex MZK-EX750NP - PACKAGES:= kmod-mt76 kmod-mt7610e -endef - -define Profile/MZK-EX750NP/Description - Package set optimized for the Planex MZK-EX750NP. -endef -$(eval $(call Profile,MZK-EX750NP)) diff --git a/target/linux/ramips/mt7620/profiles/xiaomi.mk b/target/linux/ramips/mt7620/profiles/xiaomi.mk deleted file mode 100644 index 84835784e1..0000000000 --- a/target/linux/ramips/mt7620/profiles/xiaomi.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/MIWIFI-MINI - NAME:=Xiaomi MiWiFi Mini - PACKAGES:=\ - kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci -endef - -define Profile/MIWIFI-MINI/Description - Support for Xiaomi MiWiFi Mini routers -endef -$(eval $(call Profile,MIWIFI-MINI)) diff --git a/target/linux/ramips/mt7620/profiles/zbt.mk b/target/linux/ramips/mt7620/profiles/zbt.mk deleted file mode 100644 index c33048f4ab..0000000000 --- a/target/linux/ramips/mt7620/profiles/zbt.mk +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/ZBT-WE826 - NAME:=ZBT-WE826 Device - PACKAGES:=\ - kmod-scsi-core kmod-scsi-generic kmod-mmc kmod-sdhci \ - block-mount kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci \ - kmod-mt76 -endef - -define Profile/ZBT-WE826/Description - Support for ZBT WE-826-(B,T) routers -endef -$(eval $(call Profile,ZBT-WE826)) diff --git a/target/linux/ramips/mt7620/target.mk b/target/linux/ramips/mt7620/target.mk index 99763b046a..08c775c97b 100644 --- a/target/linux/ramips/mt7620/target.mk +++ b/target/linux/ramips/mt7620/target.mk @@ -4,7 +4,6 @@ SUBTARGET:=mt7620 BOARDNAME:=MT7620 based boards -ARCH_PACKAGES:=ramips_24kec FEATURES+=usb CPU_TYPE:=24kec CPU_SUBTYPE:=dsp diff --git a/target/linux/ramips/mt7621/config-4.4 b/target/linux/ramips/mt7621/config-4.4 index 862c8e977e..58568c8114 100644 --- a/target/linux/ramips/mt7621/config-4.4 +++ b/target/linux/ramips/mt7621/config-4.4 @@ -218,7 +218,8 @@ CONFIG_SCHED_HRTICK=y CONFIG_SCHED_SMT=y # CONFIG_SCSI_DMA is not set # CONFIG_SERIAL_8250_FSL is not set -CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_NR_UARTS=3 +CONFIG_SERIAL_8250_RUNTIME_UARTS=3 CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SMP=y CONFIG_SMP_UP=y diff --git a/target/linux/ramips/mt7621/profiles/00-default.mk b/target/linux/ramips/mt7621/profiles/00-default.mk index fb04ba788c..24e51f4ef5 100644 --- a/target/linux/ramips/mt7621/profiles/00-default.mk +++ b/target/linux/ramips/mt7621/profiles/00-default.mk @@ -7,6 +7,7 @@ define Profile/Default NAME:=Default Profile + PRIORITY:=1 PACKAGES:=\ kmod-usb-core kmod-usb3 \ kmod-ledtrig-usbdev diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk b/target/linux/ramips/mt7621/profiles/firefly.mk deleted file mode 100644 index 979752780b..0000000000 --- a/target/linux/ramips/mt7621/profiles/firefly.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/FIREWRT - NAME:=Firefly FireWRT - PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid \ - kmod-ledtrig-usbdev -endef - -define Profile/FIREWRT/Description - Package set compatible with the Firefly FireWRT board. -endef -$(eval $(call Profile,FIREWRT)) diff --git a/target/linux/ramips/mt7621/profiles/linksys.mk b/target/linux/ramips/mt7621/profiles/linksys.mk deleted file mode 100644 index fb447c9e05..0000000000 --- a/target/linux/ramips/mt7621/profiles/linksys.mk +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/RE6500 - NAME:=Linksys RE6500 -endef - -define Profile/RE6500/Description - Package set compatible with the Linksys RE6500 board. -endef -$(eval $(call Profile,RE6500)) diff --git a/target/linux/ramips/mt7621/profiles/misc.mk b/target/linux/ramips/mt7621/profiles/misc.mk deleted file mode 100644 index 06a9d44c88..0000000000 --- a/target/linux/ramips/mt7621/profiles/misc.mk +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/PBR-M1 - NAME:=PBR-M1 Device - FEATURES+=rtc - PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid \ - kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci \ - kmod-rtc-pcf8563 -endef - -define Profile/PBR-M1/Description - Default package set compatible with most boards. -endef -$(eval $(call Profile,PBR-M1)) diff --git a/target/linux/ramips/mt7621/profiles/mqmaker.mk b/target/linux/ramips/mt7621/profiles/mqmaker.mk deleted file mode 100644 index 0b01ab9122..0000000000 --- a/target/linux/ramips/mt7621/profiles/mqmaker.mk +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/WITI - NAME:=MQmaker WiTi - FEATURES+=rtc - PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid \ - kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci \ - kmod-rtc-pcf8563 kmod-i2c-mt7621 -endef - -define Profile/WITI/Description - Package set compatible with MQmaker WiTi board. -endef -$(eval $(call Profile,WITI)) diff --git a/target/linux/ramips/mt7621/profiles/netgear.mk b/target/linux/ramips/mt7621/profiles/netgear.mk deleted file mode 100644 index 05802a252f..0000000000 --- a/target/linux/ramips/mt7621/profiles/netgear.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/WNDR3700V5 - NAME:=Netgear WNDR3700v5 - PACKAGES:=\ - kmod-usb-core kmod-usb3 -endef - -define Profile/WNDR3700V5/Description - Package set compatible with the Netgear WNDR3700v5. -endef -$(eval $(call Profile,WNDR3700V5)) diff --git a/target/linux/ramips/mt7621/profiles/netis.mk b/target/linux/ramips/mt7621/profiles/netis.mk deleted file mode 100644 index 39b524f534..0000000000 --- a/target/linux/ramips/mt7621/profiles/netis.mk +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/WF-2881 - NAME:=NETIS WF-2881 - PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid \ - kmod-ledtrig-usbdev -endef - -define Profile/WF-2881/Description - Package set compatible with the NETIS WF-2881 board. -endef - -#-m <min io size> -e <LEB size> -c <Eraseblocks count> -WF-2881_UBIFS_OPTS:="-m 2048 -e 129024 -c 1024" -WF-2881_UBI_OPTS:="-m 2048 -p 128KiB -s 512" - -$(eval $(call Profile,WF-2881)) diff --git a/target/linux/ramips/mt7621/profiles/storylink.mk b/target/linux/ramips/mt7621/profiles/storylink.mk deleted file mode 100644 index 9ca4a2f743..0000000000 --- a/target/linux/ramips/mt7621/profiles/storylink.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/SAP-G3200U3 - NAME:=STORYLiNK SAP-G3200U3 - PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid \ - kmod-ledtrig-usbdev -endef - -define Profile/SAP-G3200U3/Description - Package set compatible with the STORYLiNK SAP-G3200U3 board. -endef -$(eval $(call Profile,SAP-G3200U3)) diff --git a/target/linux/ramips/mt7621/profiles/ubnt.mk b/target/linux/ramips/mt7621/profiles/ubnt.mk deleted file mode 100644 index 3f1af02c57..0000000000 --- a/target/linux/ramips/mt7621/profiles/ubnt.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/UBNT-ERX - NAME:=Ubiquiti EdgeRouter X - FEATURES+=nand -usb - PACKAGES:=-kmod-mt76 -kmod-rt2800-pci -kmod-cfg80211 \ - -wpad-mini -iwinfo -endef - -define Profile/UBNT-ERX/Description - Package set compatible with the Ubiquiti EdgeRouter X -endef -$(eval $(call Profile,UBNT-ERX)) diff --git a/target/linux/ramips/mt7621/profiles/zbt.mk b/target/linux/ramips/mt7621/profiles/zbt.mk deleted file mode 100644 index 453687d4c5..0000000000 --- a/target/linux/ramips/mt7621/profiles/zbt.mk +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/ZBT-WG2626 - NAME:=ZBT-WG2626 Device - PACKAGES:=\ - kmod-usb-core kmod-usb3 \ - kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci -endef - -define Profile/ZBT-WG2626/Description - Package set for ZBT-WG2626 device -endef -$(eval $(call Profile,ZBT-WG2626)) - - -define Profile/ZBT-WG3526 - NAME:=ZBT-WG3526 Device - PACKAGES:=\ - kmod-usb-core kmod-usb3 \ - kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci -endef - -define Profile/ZBT-WG3526/Description - Package set for ZBT-WG3526 device -endef -$(eval $(call Profile,ZBT-WG3526)) diff --git a/target/linux/ramips/mt7621/target.mk b/target/linux/ramips/mt7621/target.mk index a0a7afc969..7e175435b3 100644 --- a/target/linux/ramips/mt7621/target.mk +++ b/target/linux/ramips/mt7621/target.mk @@ -4,11 +4,9 @@ SUBTARGET:=mt7621 BOARDNAME:=MT7621 based boards -ARCH_PACKAGES:=ramips_1004kc -FEATURES+=usb +FEATURES+=usb rtc CPU_TYPE:=1004kc CPU_SUBTYPE:=dsp -CFLAGS:=-Os -pipe -mmt -mips32r2 -mtune=1004kc DEFAULT_PACKAGES += kmod-mt76 diff --git a/target/linux/ramips/mt7628/config-4.4 b/target/linux/ramips/mt7628/config-4.4 index ef282b5f00..6b04457f17 100644 --- a/target/linux/ramips/mt7628/config-4.4 +++ b/target/linux/ramips/mt7628/config-4.4 @@ -177,8 +177,8 @@ CONFIG_SCHED_HRTICK=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set # CONFIG_SERIAL_8250_FSL is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RT288X=y +CONFIG_SERIAL_8250_NR_UARTS=3 +CONFIG_SERIAL_8250_RUNTIME_UARTS=3 CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SOC_MT7620=y # CONFIG_SOC_MT7621 is not set diff --git a/target/linux/ramips/mt7628/profiles/00-default.mk b/target/linux/ramips/mt7628/profiles/00-default.mk index 6c7d721444..d0472a9f36 100644 --- a/target/linux/ramips/mt7628/profiles/00-default.mk +++ b/target/linux/ramips/mt7628/profiles/00-default.mk @@ -7,9 +7,8 @@ define Profile/Default NAME:=Default Profile - PACKAGES:=\ - kmod-usb-core kmod-usb2 kmod-usb-ohci \ - kmod-ledtrig-usbdev + PRIORITY:=1 + PACKAGES:= kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev endef define Profile/Default/Description diff --git a/target/linux/ramips/mt7628/profiles/xiaomi.mk b/target/linux/ramips/mt7628/profiles/xiaomi.mk deleted file mode 100644 index 18e53c44b7..0000000000 --- a/target/linux/ramips/mt7628/profiles/xiaomi.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/MiwifiNano - NAME:=Xiaomi MiWiFi Nano - PACKAGES:=\ - kmod-usb-core kmod-usb2 kmod-usb-ohci \ - kmod-ledtrig-usbdev -endef - -define Profile/Default/Description - Image for Xiaomi MiWiFi Nano -endef -$(eval $(call Profile,MiwifiNano)) diff --git a/target/linux/ramips/mt7628/target.mk b/target/linux/ramips/mt7628/target.mk index 8263a1bed8..61d7f0707c 100644 --- a/target/linux/ramips/mt7628/target.mk +++ b/target/linux/ramips/mt7628/target.mk @@ -4,7 +4,6 @@ SUBTARGET:=mt7628 BOARDNAME:=MT7628 based boards -ARCH_PACKAGES:=ramips_24kec FEATURES+=usb CPU_TYPE:=24kec CPU_SUBTYPE:=dsp diff --git a/target/linux/ramips/mt7688/profiles/00-default.mk b/target/linux/ramips/mt7688/profiles/00-default.mk index 6c7d721444..d0472a9f36 100644 --- a/target/linux/ramips/mt7688/profiles/00-default.mk +++ b/target/linux/ramips/mt7688/profiles/00-default.mk @@ -7,9 +7,8 @@ define Profile/Default NAME:=Default Profile - PACKAGES:=\ - kmod-usb-core kmod-usb2 kmod-usb-ohci \ - kmod-ledtrig-usbdev + PRIORITY:=1 + PACKAGES:= kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev endef define Profile/Default/Description diff --git a/target/linux/ramips/mt7688/profiles/01-mediatek.mk b/target/linux/ramips/mt7688/profiles/01-mediatek.mk deleted file mode 100644 index 1ef824dba6..0000000000 --- a/target/linux/ramips/mt7688/profiles/01-mediatek.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/LinkIt7688 - NAME:=LinkIt7688 - PACKAGES:=\ - kmod-usb-core kmod-usb2 kmod-usb-ohci \ - uboot-envtools kmod-ledtrig-netdev -endef - -define Profile/LinkIt7688/Description - Default package set compatible with LinkIt Smart7688 dev board. -endef -$(eval $(call Profile,LinkIt7688)) diff --git a/target/linux/ramips/mt7688/target.mk b/target/linux/ramips/mt7688/target.mk index 2713d5260c..a501a64136 100644 --- a/target/linux/ramips/mt7688/target.mk +++ b/target/linux/ramips/mt7688/target.mk @@ -4,7 +4,6 @@ SUBTARGET:=mt7688 BOARDNAME:=MT7688 based boards -ARCH_PACKAGES:=ramips_24kec FEATURES+=usb CPU_TYPE:=24kec CPU_SUBTYPE:=dsp diff --git a/target/linux/ramips/patches-4.4/0043-spi-add-mt7621-support.patch b/target/linux/ramips/patches-4.4/0043-spi-add-mt7621-support.patch index 73fe51c841..8a78bda840 100644 --- a/target/linux/ramips/patches-4.4/0043-spi-add-mt7621-support.patch +++ b/target/linux/ramips/patches-4.4/0043-spi-add-mt7621-support.patch @@ -38,7 +38,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> obj-$(CONFIG_SPI_OC_TINY) += spi-oc-tiny.o --- /dev/null +++ b/drivers/spi/spi-mt7621.c -@@ -0,0 +1,480 @@ +@@ -0,0 +1,483 @@ +/* + * spi-mt7621.c -- MediaTek MT7621 SPI controller driver + * @@ -240,6 +240,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + if (!buf) + continue; + ++ if (t->speed_hz < speed) ++ speed = t->speed_hz; ++ + if (WARN_ON(len + t->len > 36)) { + status = -EIO; + goto msg_done; diff --git a/target/linux/ramips/patches-4.4/0044-i2c-MIPS-adds-ralink-I2C-driver.patch b/target/linux/ramips/patches-4.4/0044-i2c-MIPS-adds-ralink-I2C-driver.patch index 31854eff4b..21872082dd 100644 --- a/target/linux/ramips/patches-4.4/0044-i2c-MIPS-adds-ralink-I2C-driver.patch +++ b/target/linux/ramips/patches-4.4/0044-i2c-MIPS-adds-ralink-I2C-driver.patch @@ -45,12 +45,13 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +}; --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -806,6 +806,10 @@ config I2C_RK3X +@@ -806,6 +806,11 @@ config I2C_RK3X This driver can also be built as a module. If so, the module will be called i2c-rk3x. +config I2C_RALINK + tristate "Ralink I2C Controller" ++ depends on RALINK && !SOC_MT7621 + select OF_I2C + config HAVE_S3C2410_I2C @@ -68,11 +69,12 @@ Signed-off-by: John Crispin <blogic@openwrt.org> obj-$(CONFIG_I2C_RK3X) += i2c-rk3x.o --- /dev/null +++ b/drivers/i2c/busses/i2c-ralink.c -@@ -0,0 +1,327 @@ +@@ -0,0 +1,435 @@ +/* + * drivers/i2c/busses/i2c-ralink.c + * + * Copyright (C) 2013 Steven Liu <steven_liu@mediatek.com> ++ * Copyright (C) 2016 Michael Lee <igvtee@gmail.com> + * + * Improve driver for i2cdetect from i2c-tools to detect i2c devices on the bus. + * (C) 2014 Sittisak <sittisaks@hotmail.com> @@ -101,8 +103,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +#include <linux/i2c.h> +#include <linux/io.h> +#include <linux/err.h> -+ -+#include <asm/mach-ralink/ralink_regs.h> ++#include <linux/clk.h> + +#define REG_CONFIG_REG 0x00 +#define REG_CLKDIV_REG 0x04 @@ -113,191 +114,250 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +#define REG_STATUS_REG 0x18 +#define REG_STARTXFR_REG 0x1C +#define REG_BYTECNT_REG 0x20 -+#define REG_SM0CFG2 0x28 -+#define REG_SM0CTL0 0x40 + ++/* REG_CONFIG_REG */ ++#define I2C_ADDRLEN_OFFSET 5 ++#define I2C_DEVADLEN_OFFSET 2 ++#define I2C_ADDRLEN_MASK 0x3 ++#define I2C_ADDR_DIS BIT(1) ++#define I2C_DEVADDR_DIS BIT(0) ++#define I2C_ADDRLEN_8 (7 << I2C_ADDRLEN_OFFSET) ++#define I2C_DEVADLEN_7 (6 << I2C_DEVADLEN_OFFSET) ++#define I2C_CONF_DEFAULT (I2C_ADDRLEN_8 | I2C_DEVADLEN_7) ++ ++/* REG_CLKDIV_REG */ ++#define I2C_CLKDIV_MASK 0xffff ++ ++/* REG_DEVADDR_REG */ ++#define I2C_DEVADDR_MASK 0x7f ++ ++/* REG_ADDR_REG */ ++#define I2C_ADDR_MASK 0xff ++ ++/* REG_STATUS_REG */ +#define I2C_STARTERR BIT(4) +#define I2C_ACKERR BIT(3) +#define I2C_DATARDY BIT(2) +#define I2C_SDOEMPTY BIT(1) +#define I2C_BUSY BIT(0) + -+#define I2C_DEVADLEN_7 (6 << 2) -+#define I2C_ADDRDIS BIT(1) ++/* REG_STARTXFR_REG */ ++#define NOSTOP_CMD BIT(2) ++#define NODATA_CMD BIT(1) ++#define READ_CMD BIT(0) + -+#define CLKDIV_VALUE 200 // clock rate is 40M, 40M / (200*2) = 100k (standard i2c bus rate). -+//#define CLKDIV_VALUE 50 // clock rate is 40M, 40M / (50*2) = 400k (fast i2c bus rate). -+ -+#define READ_CMD 0x01 -+#define WRITE_CMD 0x00 -+#define READ_BLOCK 64 -+ -+#define SM0CTL0_OD BIT(31) -+#define SM0CTL0_VTRIG BIT(28) -+#define SM0CTL0_OUTHI BIT(6) -+#define SM0CTL0_STRETCH BIT(1) -+#define SM0CTL0_DEFAULT (SM0CTL0_OD | SM0CTL0_VTRIG | SM0CTL0_OUTHI | SM0CTL0_STRETCH) ++/* REG_BYTECNT_REG */ ++#define BYTECNT_MAX 64 ++#define SET_BYTECNT(x) (x - 1) + +/* timeout waiting for I2C devices to respond (clock streching) */ -+#define RT_I2C_TIMEOUT (msecs_to_jiffies(1000)) -+ -+enum { -+ I2C_TYPE_RALINK, -+ I2C_TYPE_MEDIATEK, ++#define TIMEOUT_MS 1000 ++#define DELAY_INTERVAL_US 100 ++ ++struct rt_i2c { ++ void __iomem *base; ++ struct clk *clk; ++ struct device *dev; ++ struct i2c_adapter adap; ++ u32 cur_clk; ++ u32 clk_div; ++ u32 flags; +}; + -+static void __iomem *membase; -+static struct i2c_adapter *adapter; -+static int hw_type; -+ -+static void rt_i2c_w32(u32 val, unsigned reg) ++static void rt_i2c_w32(struct rt_i2c *i2c, u32 val, unsigned reg) +{ -+ iowrite32(val, membase + reg); ++ iowrite32(val, i2c->base + reg); +} + -+static u32 rt_i2c_r32(unsigned reg) ++static u32 rt_i2c_r32(struct rt_i2c *i2c, unsigned reg) +{ -+ return ioread32(membase + reg); ++ return ioread32(i2c->base + reg); +} + -+static inline int rt_i2c_get_ack(void) ++static int poll_down_timeout(void __iomem *addr, u32 mask) +{ -+ return (rt_i2c_r32(REG_STATUS_REG) & I2C_ACKERR) ? -EIO : 0; -+} -+ -+static inline int rt_i2c_wait_rx_done(void) -+{ -+ unsigned long timeout; -+ -+ timeout = jiffies + RT_I2C_TIMEOUT; ++ unsigned long timeout = jiffies + msecs_to_jiffies(TIMEOUT_MS); + + do { -+ if (time_after(jiffies, timeout)) -+ return (-ETIMEDOUT); ++ if (!(readl_relaxed(addr) & mask)) ++ return 0; + -+ } while (!(rt_i2c_r32(REG_STATUS_REG) & I2C_DATARDY)); ++ usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50); ++ } while (time_before(jiffies, timeout)); + -+ return 0; ++ return (readl_relaxed(addr) & mask) ? -EAGAIN : 0; +} + -+static inline int rt_i2c_wait_idle(void) ++static int rt_i2c_wait_idle(struct rt_i2c *i2c) +{ -+ unsigned long timeout; ++ int ret; + -+ timeout = jiffies + RT_I2C_TIMEOUT; ++ ret = poll_down_timeout(i2c->base + REG_STATUS_REG, I2C_BUSY); ++ if (ret < 0) ++ dev_dbg(i2c->dev, "idle err(%d)\n", ret); + -+ do { -+ if (time_after(jiffies, timeout)) { -+ printk("i2c-read line busy\n"); -+ return 1; -+ } -+ } while (rt_i2c_r32(REG_STATUS_REG) & I2C_BUSY); -+ -+ return 0; ++ return ret; +} + -+static inline int rt_i2c_wait_tx_done(void) ++static int poll_up_timeout(void __iomem *addr, u32 mask) +{ -+ unsigned long timeout; -+ -+ timeout = jiffies + RT_I2C_TIMEOUT; ++ unsigned long timeout = jiffies + msecs_to_jiffies(TIMEOUT_MS); ++ u32 status; + + do { -+ if (time_after(jiffies, timeout)) -+ return (-ETIMEDOUT); ++ status = readl_relaxed(addr); + -+ } while (!(rt_i2c_r32(REG_STATUS_REG) & I2C_SDOEMPTY)); ++ /* check error status */ ++ if (status & I2C_STARTERR) ++ return -EAGAIN; ++ else if (status & I2C_ACKERR) ++ return -ENXIO; ++ else if (status & mask) ++ return 0; + -+ return 0; ++ usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50); ++ } while (time_before(jiffies, timeout)); ++ ++ return -ETIMEDOUT; +} + -+static int rt_i2c_handle_msg(struct i2c_adapter *a, struct i2c_msg* msg) ++static int rt_i2c_wait_rx_done(struct rt_i2c *i2c) +{ -+ int i = 0, j = 0, pos = 0; -+ int nblock = msg->len / READ_BLOCK; -+ int rem = msg->len % READ_BLOCK; -+ int ret = 0; -+ -+ if (msg->flags & I2C_M_TEN) { -+ printk("10 bits addr not supported\n"); -+ return -EINVAL; -+ } -+ -+ if (msg->flags & I2C_M_RD) { -+ for (i = 0; i < nblock; i++) { -+ if (rt_i2c_wait_idle()) -+ return -ETIMEDOUT; -+ rt_i2c_w32(READ_BLOCK - 1, REG_BYTECNT_REG); -+ rt_i2c_w32(READ_CMD, REG_STARTXFR_REG); -+ for (j = 0; j < READ_BLOCK; j++) { -+ if (rt_i2c_wait_rx_done() < 0) -+ ret = rt_i2c_wait_rx_done(); -+ if (rt_i2c_get_ack() < 0) -+ ret = rt_i2c_get_ack(); -+ msg->buf[pos++] = rt_i2c_r32(REG_DATAIN_REG); -+ } -+ } -+ -+ if (rt_i2c_wait_idle()) -+ return -ETIMEDOUT; -+ if (rem) { -+ rt_i2c_w32(rem - 1, REG_BYTECNT_REG); -+ rt_i2c_w32(READ_CMD, REG_STARTXFR_REG); -+ } -+ for (i = 0; i < rem; i++) { -+ if (rt_i2c_wait_rx_done() < 0) -+ ret = rt_i2c_wait_rx_done(); -+ if (rt_i2c_get_ack() < 0) -+ ret = rt_i2c_get_ack(); ++ int ret; + -+ msg->buf[pos++] = rt_i2c_r32(REG_DATAIN_REG); -+ } -+ } else { -+ if (rt_i2c_wait_idle()) -+ return -ETIMEDOUT; -+ rt_i2c_w32(msg->len - 1, REG_BYTECNT_REG); -+ for (i = 0; i < msg->len; i++) { -+ rt_i2c_w32(msg->buf[i], REG_DATAOUT_REG); -+ rt_i2c_w32(WRITE_CMD, REG_STARTXFR_REG); -+ -+ if (rt_i2c_wait_tx_done() < 0) -+ ret = rt_i2c_wait_tx_done(); -+ if (rt_i2c_get_ack() < 0) -+ ret = rt_i2c_get_ack(); -+ } -+ } ++ ret = poll_up_timeout(i2c->base + REG_STATUS_REG, I2C_DATARDY); ++ if (ret < 0) ++ dev_dbg(i2c->dev, "rx err(%d)\n", ret); + + return ret; +} + -+static int rt_i2c_master_xfer(struct i2c_adapter *a, struct i2c_msg *m, int n) ++static int rt_i2c_wait_tx_done(struct rt_i2c *i2c) +{ -+ int i = 0; -+ int ret = 0; ++ int ret; + -+ if (rt_i2c_wait_idle()) -+ return -ETIMEDOUT; ++ ret = poll_up_timeout(i2c->base + REG_STATUS_REG, I2C_SDOEMPTY); ++ if (ret < 0) ++ dev_dbg(i2c->dev, "tx err(%d)\n", ret); + -+ device_reset(a->dev.parent); ++ return ret; ++} + -+ rt_i2c_w32(m->addr, REG_DEVADDR_REG); -+ rt_i2c_w32(I2C_DEVADLEN_7 | I2C_ADDRDIS, REG_CONFIG_REG); -+ if (hw_type == I2C_TYPE_RALINK) { -+ rt_i2c_w32(CLKDIV_VALUE, REG_CLKDIV_REG); -+ } else { -+ rt_i2c_w32((CLKDIV_VALUE << 16) | SM0CTL0_DEFAULT, REG_SM0CTL0); -+ rt_i2c_w32(1, REG_SM0CFG2); -+ } ++static void rt_i2c_reset(struct rt_i2c *i2c) ++{ ++ device_reset(i2c->adap.dev.parent); ++ barrier(); ++ rt_i2c_w32(i2c, i2c->clk_div, REG_CLKDIV_REG); ++} ++ ++static void rt_i2c_dump_reg(struct rt_i2c *i2c) ++{ ++ dev_dbg(i2c->dev, "conf %08x, clkdiv %08x, devaddr %08x, " \ ++ "addr %08x, dataout %08x, datain %08x, " \ ++ "status %08x, startxfr %08x, bytecnt %08x\n", ++ rt_i2c_r32(i2c, REG_CONFIG_REG), ++ rt_i2c_r32(i2c, REG_CLKDIV_REG), ++ rt_i2c_r32(i2c, REG_DEVADDR_REG), ++ rt_i2c_r32(i2c, REG_ADDR_REG), ++ rt_i2c_r32(i2c, REG_DATAOUT_REG), ++ rt_i2c_r32(i2c, REG_DATAIN_REG), ++ rt_i2c_r32(i2c, REG_STATUS_REG), ++ rt_i2c_r32(i2c, REG_STARTXFR_REG), ++ rt_i2c_r32(i2c, REG_BYTECNT_REG)); ++} + -+ for (i = 0; i < n && !ret; i++) { -+ ret = rt_i2c_handle_msg(a, &m[i]); ++static int rt_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, ++ int num) ++{ ++ struct rt_i2c *i2c; ++ struct i2c_msg *pmsg; ++ unsigned char addr; ++ int i, j, ret; ++ u32 cmd; ++ ++ i2c = i2c_get_adapdata(adap); ++ ++ for (i = 0; i < num; i++) { ++ pmsg = &msgs[i]; ++ if (i == (num - 1)) ++ cmd = 0; ++ else ++ cmd = NOSTOP_CMD; ++ ++ dev_dbg(i2c->dev, "addr: 0x%x, len: %d, flags: 0x%x, stop: %d\n", ++ pmsg->addr, pmsg->len, pmsg->flags, ++ (cmd == 0)? 1 : 0); ++ ++ /* wait hardware idle */ ++ if ((ret = rt_i2c_wait_idle(i2c))) ++ goto err_timeout; ++ ++ if (pmsg->flags & I2C_M_TEN) { ++ rt_i2c_w32(i2c, I2C_CONF_DEFAULT, REG_CONFIG_REG); ++ /* 10 bits address */ ++ addr = 0x78 | ((pmsg->addr >> 8) & 0x03); ++ rt_i2c_w32(i2c, addr & I2C_DEVADDR_MASK, ++ REG_DEVADDR_REG); ++ rt_i2c_w32(i2c, pmsg->addr & I2C_ADDR_MASK, ++ REG_ADDR_REG); ++ } else { ++ rt_i2c_w32(i2c, I2C_CONF_DEFAULT | I2C_ADDR_DIS, ++ REG_CONFIG_REG); ++ /* 7 bits address */ ++ rt_i2c_w32(i2c, pmsg->addr & I2C_DEVADDR_MASK, ++ REG_DEVADDR_REG); ++ } + -+ if (ret < 0) { -+ return ret; ++ /* buffer length */ ++ if (pmsg->len == 0) ++ cmd |= NODATA_CMD; ++ else ++ rt_i2c_w32(i2c, SET_BYTECNT(pmsg->len), ++ REG_BYTECNT_REG); ++ ++ j = 0; ++ if (pmsg->flags & I2C_M_RD) { ++ cmd |= READ_CMD; ++ /* start transfer */ ++ barrier(); ++ rt_i2c_w32(i2c, cmd, REG_STARTXFR_REG); ++ do { ++ /* wait */ ++ if ((ret = rt_i2c_wait_rx_done(i2c))) ++ goto err_timeout; ++ /* read data */ ++ if (pmsg->len) ++ pmsg->buf[j] = rt_i2c_r32(i2c, ++ REG_DATAIN_REG); ++ j++; ++ } while (j < pmsg->len); ++ } else { ++ do { ++ /* write data */ ++ if (pmsg->len) ++ rt_i2c_w32(i2c, pmsg->buf[j], ++ REG_DATAOUT_REG); ++ /* start transfer */ ++ if (j == 0) { ++ barrier(); ++ rt_i2c_w32(i2c, cmd, REG_STARTXFR_REG); ++ } ++ /* wait */ ++ if ((ret = rt_i2c_wait_tx_done(i2c))) ++ goto err_timeout; ++ j++; ++ } while (j < pmsg->len); + } + } ++ /* the return value is number of executed messages */ ++ ret = i; ++ ++ return ret; + -+ return n; ++err_timeout: ++ rt_i2c_dump_reg(i2c); ++ rt_i2c_reset(i2c); ++ return ret; +} + +static u32 rt_i2c_func(struct i2c_adapter *a) @@ -311,60 +371,110 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +}; + +static const struct of_device_id i2c_rt_dt_ids[] = { -+ { .compatible = "ralink,rt2880-i2c", .data = (void *) I2C_TYPE_RALINK }, -+ { .compatible = "mediatek,mt7628-i2c", .data = (void *) I2C_TYPE_MEDIATEK }, ++ { .compatible = "ralink,rt2880-i2c" }, + { /* sentinel */ } +}; + +MODULE_DEVICE_TABLE(of, i2c_rt_dt_ids); + ++static struct i2c_adapter_quirks rt_i2c_quirks = { ++ .max_write_len = BYTECNT_MAX, ++ .max_read_len = BYTECNT_MAX, ++}; ++ ++static int rt_i2c_init(struct rt_i2c *i2c) ++{ ++ u32 reg; ++ ++ /* i2c_sclk = periph_clk / ((2 * clk_div) + 5) */ ++ i2c->clk_div = (clk_get_rate(i2c->clk) - (5 * i2c->cur_clk)) / ++ (2 * i2c->cur_clk); ++ if (i2c->clk_div < 8) ++ i2c->clk_div = 8; ++ if (i2c->clk_div > I2C_CLKDIV_MASK) ++ i2c->clk_div = I2C_CLKDIV_MASK; ++ ++ /* check support combinde/repeated start message */ ++ rt_i2c_w32(i2c, NOSTOP_CMD, REG_STARTXFR_REG); ++ reg = rt_i2c_r32(i2c, REG_STARTXFR_REG) & NOSTOP_CMD; ++ ++ rt_i2c_reset(i2c); ++ ++ return reg; ++} ++ +static int rt_i2c_probe(struct platform_device *pdev) +{ -+ struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ struct resource *res; ++ struct rt_i2c *i2c; ++ struct i2c_adapter *adap; + const struct of_device_id *match; -+ int ret; ++ int ret, restart; + + match = of_match_device(i2c_rt_dt_ids, &pdev->dev); -+ hw_type = (int) match->data; + ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(&pdev->dev, "no memory resource found\n"); + return -ENODEV; + } + -+ adapter = devm_kzalloc(&pdev->dev, sizeof(struct i2c_adapter), GFP_KERNEL); -+ if (!adapter) { ++ i2c = devm_kzalloc(&pdev->dev, sizeof(struct rt_i2c), GFP_KERNEL); ++ if (!i2c) { + dev_err(&pdev->dev, "failed to allocate i2c_adapter\n"); + return -ENOMEM; + } + -+ membase = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(membase)) -+ return PTR_ERR(membase); -+ -+ strlcpy(adapter->name, dev_name(&pdev->dev), sizeof(adapter->name)); -+ adapter->owner = THIS_MODULE; -+ adapter->nr = pdev->id; -+ adapter->timeout = HZ; -+ adapter->algo = &rt_i2c_algo; -+ adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; -+ adapter->dev.parent = &pdev->dev; -+ adapter->dev.of_node = pdev->dev.of_node; -+ -+ ret = i2c_add_numbered_adapter(adapter); -+ if (ret) -+ return ret; ++ i2c->base = devm_ioremap_resource(&pdev->dev, res); ++ if (IS_ERR(i2c->base)) ++ return PTR_ERR(i2c->base); + -+ platform_set_drvdata(pdev, adapter); ++ i2c->clk = devm_clk_get(&pdev->dev, NULL); ++ if (IS_ERR(i2c->clk)) { ++ dev_err(&pdev->dev, "no clock defined\n"); ++ return -ENODEV; ++ } ++ clk_prepare_enable(i2c->clk); ++ i2c->dev = &pdev->dev; ++ ++ if (of_property_read_u32(pdev->dev.of_node, ++ "clock-frequency", &i2c->cur_clk)) ++ i2c->cur_clk = 100000; ++ ++ adap = &i2c->adap; ++ adap->owner = THIS_MODULE; ++ adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; ++ adap->algo = &rt_i2c_algo; ++ adap->retries = 3; ++ adap->dev.parent = &pdev->dev; ++ i2c_set_adapdata(adap, i2c); ++ adap->dev.of_node = pdev->dev.of_node; ++ strlcpy(adap->name, dev_name(&pdev->dev), sizeof(adap->name)); ++ adap->quirks = &rt_i2c_quirks; ++ ++ platform_set_drvdata(pdev, i2c); ++ ++ restart = rt_i2c_init(i2c); ++ ++ ret = i2c_add_adapter(adap); ++ if (ret < 0) { ++ dev_err(&pdev->dev, "failed to add adapter\n"); ++ clk_disable_unprepare(i2c->clk); ++ return ret; ++ } + -+ dev_info(&pdev->dev, "loaded\n"); ++ dev_info(&pdev->dev, "clock %uKHz, re-start %ssupport\n", ++ i2c->cur_clk/1000, restart ? "" : "not "); + -+ return 0; ++ return ret; +} + +static int rt_i2c_remove(struct platform_device *pdev) +{ -+ platform_set_drvdata(pdev, NULL); ++ struct rt_i2c *i2c = platform_get_drvdata(pdev); ++ ++ i2c_del_adapter(&i2c->adap); ++ clk_disable_unprepare(i2c->clk); + + return 0; +} @@ -389,8 +499,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +{ + platform_driver_unregister(&rt_i2c_driver); +} -+ -+module_exit (i2c_rt_exit); ++module_exit(i2c_rt_exit); + +MODULE_AUTHOR("Steven Liu <steven_liu@mediatek.com>"); +MODULE_DESCRIPTION("Ralink I2c host driver"); diff --git a/target/linux/ramips/patches-4.4/0045-i2c-add-mt7621-driver.patch b/target/linux/ramips/patches-4.4/0045-i2c-add-mt7621-driver.patch index 044991594b..df8b3a4431 100644 --- a/target/linux/ramips/patches-4.4/0045-i2c-add-mt7621-driver.patch +++ b/target/linux/ramips/patches-4.4/0045-i2c-add-mt7621-driver.patch @@ -13,12 +13,13 @@ Signed-off-by: John Crispin <blogic@openwrt.org> --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -810,6 +810,10 @@ config I2C_RALINK - tristate "Ralink I2C Controller" +@@ -811,6 +811,11 @@ config I2C_RALINK + depends on RALINK && !SOC_MT7621 select OF_I2C +config I2C_MT7621 -+ tristate "MT7621 I2C Controller" ++ tristate "MT7621/MT7628 I2C Controller" ++ depends on RALINK && (SOC_MT7620 || SOC_MT7621) + select OF_I2C + config HAVE_S3C2410_I2C @@ -36,11 +37,12 @@ Signed-off-by: John Crispin <blogic@openwrt.org> obj-$(CONFIG_I2C_RK3X) += i2c-rk3x.o --- /dev/null +++ b/drivers/i2c/busses/i2c-mt7621.c -@@ -0,0 +1,303 @@ +@@ -0,0 +1,433 @@ +/* + * drivers/i2c/busses/i2c-mt7621.c + * + * Copyright (C) 2013 Steven Liu <steven_liu@mediatek.com> ++ * Copyright (C) 2016 Michael Lee <igvtee@gmail.com> + * + * Improve driver for i2cdetect from i2c-tools to detect i2c devices on the bus. + * (C) 2014 Sittisak <sittisaks@hotmail.com> @@ -65,276 +67,405 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +#include <linux/init.h> +#include <linux/errno.h> +#include <linux/platform_device.h> ++#include <linux/of_platform.h> +#include <linux/i2c.h> +#include <linux/io.h> +#include <linux/err.h> ++#include <linux/clk.h> ++ ++#define REG_SM0CFG0 0x08 ++#define REG_SM0DOUT 0x10 ++#define REG_SM0DIN 0x14 ++#define REG_SM0ST 0x18 ++#define REG_SM0AUTO 0x1C ++#define REG_SM0CFG1 0x20 ++#define REG_SM0CFG2 0x28 ++#define REG_SM0CTL0 0x40 ++#define REG_SM0CTL1 0x44 ++#define REG_SM0D0 0x50 ++#define REG_SM0D1 0x54 ++#define REG_PINTEN 0x5C ++#define REG_PINTST 0x60 ++#define REG_PINTCL 0x64 ++ ++/* REG_SM0CFG0 */ ++#define I2C_DEVADDR_MASK 0x7f ++ ++/* REG_SM0ST */ ++#define I2C_DATARDY BIT(2) ++#define I2C_SDOEMPTY BIT(1) ++#define I2C_BUSY BIT(0) ++ ++/* REG_SM0AUTO */ ++#define READ_CMD BIT(0) ++ ++/* REG_SM0CFG1 */ ++#define BYTECNT_MAX 64 ++#define SET_BYTECNT(x) (x - 1) ++ ++/* REG_SM0CFG2 */ ++#define AUTOMODE_EN BIT(0) ++ ++/* REG_SM0CTL0 */ ++#define ODRAIN_HIGH_SM0 BIT(31) ++#define VSYNC_SHIFT 28 ++#define VSYNC_MASK 0x3 ++#define VSYNC_PULSE (0x1 << VSYNC_SHIFT) ++#define VSYNC_RISING (0x2 << VSYNC_SHIFT) ++#define CLK_DIV_SHIFT 16 ++#define CLK_DIV_MASK 0xfff ++#define DEG_CNT_SHIFT 8 ++#define DEG_CNT_MASK 0xff ++#define WAIT_HIGH BIT(6) ++#define DEG_EN BIT(5) ++#define CS_STATUA BIT(4) ++#define SCL_STATUS BIT(3) ++#define SDA_STATUS BIT(2) ++#define SM0_EN BIT(1) ++#define SCL_STRECH BIT(0) ++ ++/* REG_SM0CTL1 */ ++#define ACK_SHIFT 16 ++#define ACK_MASK 0xff ++#define PGLEN_SHIFT 8 ++#define PGLEN_MASK 0x7 ++#define SM0_MODE_SHIFT 4 ++#define SM0_MODE_MASK 0x7 ++#define SM0_MODE_START 0x1 ++#define SM0_MODE_WRITE 0x2 ++#define SM0_MODE_STOP 0x3 ++#define SM0_MODE_READ_NACK 0x4 ++#define SM0_MODE_READ_ACK 0x5 ++#define SM0_TRI_BUSY BIT(0) ++ ++/* timeout waiting for I2C devices to respond (clock streching) */ ++#define TIMEOUT_MS 1000 ++#define DELAY_INTERVAL_US 100 ++ ++struct mtk_i2c { ++ void __iomem *base; ++ struct clk *clk; ++ struct device *dev; ++ struct i2c_adapter adap; ++ u32 cur_clk; ++ u32 clk_div; ++ u32 flags; ++}; + -+#include <asm/mach-ralink/ralink_regs.h> -+ -+#define REG_CONFIG_REG 0x00 -+#define REG_CLKDIV_REG 0x04 -+#define REG_DEVADDR_REG 0x08 -+#define REG_ADDR_REG 0x0C -+#define REG_DATAOUT_REG 0x10 -+#define REG_DATAIN_REG 0x14 -+#define REG_STATUS_REG 0x18 -+#define REG_STARTXFR_REG 0x1C -+#define REG_BYTECNT_REG 0x20 -+#define REG_SM0_IS_AUTOMODE 0x28 -+#define REG_SM0CTL0 0x40 -+ -+ -+#define I2C_STARTERR 0x10 -+#define I2C_ACKERR 0x08 -+#define I2C_DATARDY 0x04 -+#define I2C_SDOEMPTY 0x02 -+#define I2C_BUSY 0x01 -+ -+/* I2C_CFG register bit field */ -+#define I2C_CFG_ADDRLEN_8 (7<<5) /* 8 bits */ -+#define I2C_CFG_DEVADLEN_7 (6<<2) -+#define I2C_CFG_ADDRDIS BIT(1) -+#define I2C_CFG_DEVADDIS BIT(0) -+ -+#define I2C_CFG_DEFAULT (I2C_CFG_ADDRLEN_8 | \ -+ I2C_CFG_DEVADLEN_7 | \ -+ I2C_CFG_ADDRDIS) -+ -+#define I2C_RETRY 0x1000 -+ -+#define CLKDIV_VALUE 333 -+#define i2c_busy_loop (CLKDIV_VALUE*30) -+ -+#define READ_CMD 0x01 -+#define WRITE_CMD 0x00 -+#define READ_BLOCK 16 -+ -+#define SM0_ODRAIN BIT(31) -+#define SM0_VSYNC_MODE BIT(28) -+#define SM0_CLK_DIV (CLKDIV_VALUE << 16) -+#define SM0_WAIT_LEVEL BIT(6) -+#define SM0_EN BIT(1) -+ -+#define SM0_CFG_DEFUALT (SM0_ODRAIN | SM0_VSYNC_MODE | \ -+ SM0_CLK_DIV | SM0_WAIT_LEVEL | \ -+ SM0_EN) -+/***********************************************************/ -+ -+static void __iomem *membase; -+static struct i2c_adapter *adapter; -+ -+static void rt_i2c_w32(u32 val, unsigned reg) ++static void mtk_i2c_w32(struct mtk_i2c *i2c, u32 val, unsigned reg) +{ -+ iowrite32(val, membase + reg); ++ iowrite32(val, i2c->base + reg); +} + -+static u32 rt_i2c_r32(unsigned reg) ++static u32 mtk_i2c_r32(struct mtk_i2c *i2c, unsigned reg) +{ -+ return ioread32(membase + reg); ++ return ioread32(i2c->base + reg); +} + -+static void mt7621_i2c_reset(struct i2c_adapter *a) ++static int poll_down_timeout(void __iomem *addr, u32 mask) +{ -+ device_reset(a->dev.parent); ++ unsigned long timeout = jiffies + msecs_to_jiffies(TIMEOUT_MS); ++ ++ do { ++ if (!(readl_relaxed(addr) & mask)) ++ return 0; ++ ++ usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50); ++ } while (time_before(jiffies, timeout)); ++ ++ return (readl_relaxed(addr) & mask) ? -EAGAIN : 0; +} -+static void mt7621_i2c_enable(struct i2c_msg *msg) ++ ++static int mtk_i2c_wait_idle(struct mtk_i2c *i2c) +{ -+ rt_i2c_w32(msg->addr,REG_DEVADDR_REG); -+ rt_i2c_w32(0,REG_ADDR_REG); ++ int ret; ++ ++ ret = poll_down_timeout(i2c->base + REG_SM0ST, I2C_BUSY); ++ if (ret < 0) ++ dev_dbg(i2c->dev, "idle err(%d)\n", ret); ++ ++ return ret; +} + -+static void i2c_master_init(struct i2c_adapter *a) ++static int poll_up_timeout(void __iomem *addr, u32 mask) +{ -+ mt7621_i2c_reset(a); -+ rt_i2c_w32(I2C_CFG_DEFAULT,REG_CONFIG_REG); -+ rt_i2c_w32(SM0_CFG_DEFUALT,REG_SM0CTL0); -+ rt_i2c_w32(1,REG_SM0_IS_AUTOMODE);//auto mode -+} ++ unsigned long timeout = jiffies + msecs_to_jiffies(TIMEOUT_MS); ++ u32 status; + ++ do { ++ status = readl_relaxed(addr); ++ if (status & mask) ++ return 0; ++ usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50); ++ } while (time_before(jiffies, timeout)); + -+static inline int rt_i2c_wait_rx_done(void) -+{ -+ int i=0; -+ while((!(rt_i2c_r32(REG_STATUS_REG) & I2C_DATARDY)) && (i<i2c_busy_loop)) -+ i++; -+ if(i>=i2c_busy_loop){ -+ pr_err("err,wait for idle timeout"); -+ return -ETIMEDOUT; -+ } -+ return 0; ++ return -ETIMEDOUT; +} + -+static inline int rt_i2c_wait_idle(void) ++static int mtk_i2c_wait_rx_done(struct mtk_i2c *i2c) +{ -+ int i=0; -+ while((rt_i2c_r32(REG_STATUS_REG) & I2C_BUSY) && (i<i2c_busy_loop)) -+ i++; -+ if(i>=i2c_busy_loop){ -+ pr_err("err,wait for idle timeout"); -+ return -ETIMEDOUT; -+ } -+ return 0; ++ int ret; ++ ++ ret = poll_up_timeout(i2c->base + REG_SM0ST, I2C_DATARDY); ++ if (ret < 0) ++ dev_dbg(i2c->dev, "rx err(%d)\n", ret); ++ ++ return ret; +} + -+static inline int rt_i2c_wait_tx_done(void) ++static int mtk_i2c_wait_tx_done(struct mtk_i2c *i2c) +{ -+ int i=0; -+ while((!(rt_i2c_r32(REG_STATUS_REG) & I2C_SDOEMPTY)) && (i<i2c_busy_loop)) -+ i++; -+ if(i>=i2c_busy_loop){ -+ pr_err("err,wait for idle timeout"); -+ return -ETIMEDOUT; -+ } -+ return 0; ++ int ret; ++ ++ ret = poll_up_timeout(i2c->base + REG_SM0ST, I2C_SDOEMPTY); ++ if (ret < 0) ++ dev_dbg(i2c->dev, "tx err(%d)\n", ret); ++ ++ return ret; +} + -+static int rt_i2c_handle_msg(struct i2c_adapter *a, struct i2c_msg* msg) ++static void mtk_i2c_reset(struct mtk_i2c *i2c) +{ -+ int i = 0, j = 0, pos = 0; -+ int nblock = msg->len / READ_BLOCK; -+ int rem = msg->len % READ_BLOCK; ++ u32 reg; ++ device_reset(i2c->adap.dev.parent); ++ barrier(); + -+ if (msg->flags & I2C_M_TEN) { -+ printk("10 bits addr not supported\n"); -+ return -EINVAL; -+ } ++ /* ctrl0 */ ++ reg = ODRAIN_HIGH_SM0 | VSYNC_PULSE | (i2c->clk_div << CLK_DIV_SHIFT) | ++ WAIT_HIGH | SM0_EN; ++ mtk_i2c_w32(i2c, reg, REG_SM0CTL0); + -+ if (msg->flags & I2C_M_RD) { -+ for (i = 0; i < nblock; i++) { -+ if (rt_i2c_wait_idle()) -+ goto err_timeout; -+ rt_i2c_w32(READ_BLOCK - 1, REG_BYTECNT_REG); -+ rt_i2c_w32(READ_CMD, REG_STARTXFR_REG); -+ for (j = 0; j < READ_BLOCK; j++) { -+ if (rt_i2c_wait_rx_done()) -+ goto err_timeout; -+ msg->buf[pos++] = rt_i2c_r32(REG_DATAIN_REG); -+ } -+ } ++ /* auto mode */ ++ mtk_i2c_w32(i2c, AUTOMODE_EN, REG_SM0CFG2); ++} ++ ++static void mtk_i2c_dump_reg(struct mtk_i2c *i2c) ++{ ++ dev_dbg(i2c->dev, "cfg0 %08x, dout %08x, din %08x, " \ ++ "status %08x, auto %08x, cfg1 %08x, " \ ++ "cfg2 %08x, ctl0 %08x, ctl1 %08x\n", ++ mtk_i2c_r32(i2c, REG_SM0CFG0), ++ mtk_i2c_r32(i2c, REG_SM0DOUT), ++ mtk_i2c_r32(i2c, REG_SM0DIN), ++ mtk_i2c_r32(i2c, REG_SM0ST), ++ mtk_i2c_r32(i2c, REG_SM0AUTO), ++ mtk_i2c_r32(i2c, REG_SM0CFG1), ++ mtk_i2c_r32(i2c, REG_SM0CFG2), ++ mtk_i2c_r32(i2c, REG_SM0CTL0), ++ mtk_i2c_r32(i2c, REG_SM0CTL1)); ++} + -+ if (rt_i2c_wait_idle()) -+ goto err_timeout; -+ rt_i2c_w32(rem - 1, REG_BYTECNT_REG); -+ rt_i2c_w32(READ_CMD, REG_STARTXFR_REG); -+ -+ for (i = 0; i < rem; i++) { -+ if (rt_i2c_wait_rx_done()) -+ goto err_timeout; -+ msg->buf[pos++] = rt_i2c_r32(REG_DATAIN_REG); ++static int mtk_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, ++ int num) ++{ ++ struct mtk_i2c *i2c; ++ struct i2c_msg *pmsg; ++ int i, j, ret; ++ u32 cmd; ++ ++ i2c = i2c_get_adapdata(adap); ++ ++ for (i = 0; i < num; i++) { ++ pmsg = &msgs[i]; ++ cmd = 0; ++ ++ dev_dbg(i2c->dev, "addr: 0x%x, len: %d, flags: 0x%x\n", ++ pmsg->addr, pmsg->len, pmsg->flags); ++ ++ /* wait hardware idle */ ++ if ((ret = mtk_i2c_wait_idle(i2c))) ++ goto err_timeout; ++ ++ if (pmsg->flags & I2C_M_TEN) { ++ dev_dbg(i2c->dev, "10 bits addr not supported\n"); ++ return -EINVAL; ++ } else { ++ /* 7 bits address */ ++ mtk_i2c_w32(i2c, pmsg->addr & I2C_DEVADDR_MASK, ++ REG_SM0CFG0); + } -+ } else { -+ if (rt_i2c_wait_idle()) -+ goto err_timeout; -+ rt_i2c_w32(msg->len - 1, REG_BYTECNT_REG); -+ for (i = 0; i < msg->len; i++) { -+ rt_i2c_w32(msg->buf[i], REG_DATAOUT_REG); -+ if(i == 0) -+ rt_i2c_w32(WRITE_CMD, REG_STARTXFR_REG); -+ -+ if (rt_i2c_wait_tx_done()) -+ goto err_timeout; ++ ++ /* buffer length */ ++ if (pmsg->len == 0) { ++ dev_dbg(i2c->dev, "length is 0\n"); ++ return -EINVAL; ++ } else ++ mtk_i2c_w32(i2c, SET_BYTECNT(pmsg->len), ++ REG_SM0CFG1); ++ ++ j = 0; ++ if (pmsg->flags & I2C_M_RD) { ++ cmd |= READ_CMD; ++ /* start transfer */ ++ barrier(); ++ mtk_i2c_w32(i2c, cmd, REG_SM0AUTO); ++ do { ++ /* wait */ ++ if ((ret = mtk_i2c_wait_rx_done(i2c))) ++ goto err_timeout; ++ /* read data */ ++ if (pmsg->len) ++ pmsg->buf[j] = mtk_i2c_r32(i2c, ++ REG_SM0DIN); ++ j++; ++ } while (j < pmsg->len); ++ } else { ++ do { ++ /* write data */ ++ if (pmsg->len) ++ mtk_i2c_w32(i2c, pmsg->buf[j], ++ REG_SM0DOUT); ++ /* start transfer */ ++ if (j == 0) { ++ barrier(); ++ mtk_i2c_w32(i2c, cmd, REG_SM0AUTO); ++ } ++ /* wait */ ++ if ((ret = mtk_i2c_wait_tx_done(i2c))) ++ goto err_timeout; ++ j++; ++ } while (j < pmsg->len); + } + } ++ /* the return value is number of executed messages */ ++ ret = i; + -+ return 0; -+err_timeout: -+ return -ETIMEDOUT; -+} ++ return ret; + -+static int rt_i2c_master_xfer(struct i2c_adapter *a, struct i2c_msg *m, int n) -+{ -+ int i = 0; -+ int ret = 0; -+ i2c_master_init(a); -+ mt7621_i2c_enable(m); -+ -+ for (i = 0; i != n && ret==0; i++) { -+ ret = rt_i2c_handle_msg(a, &m[i]); -+ if (ret) -+ return ret; -+ } -+ return i; ++err_timeout: ++ mtk_i2c_dump_reg(i2c); ++ mtk_i2c_reset(i2c); ++ return ret; +} + -+static u32 rt_i2c_func(struct i2c_adapter *a) ++static u32 mtk_i2c_func(struct i2c_adapter *a) +{ + return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; +} + -+static const struct i2c_algorithm rt_i2c_algo = { -+ .master_xfer = rt_i2c_master_xfer, -+ .functionality = rt_i2c_func, ++static const struct i2c_algorithm mtk_i2c_algo = { ++ .master_xfer = mtk_i2c_master_xfer, ++ .functionality = mtk_i2c_func, +}; + -+static int rt_i2c_probe(struct platform_device *pdev) ++static const struct of_device_id i2c_mtk_dt_ids[] = { ++ { .compatible = "mediatek,mt7621-i2c" }, ++ { /* sentinel */ } ++}; ++ ++MODULE_DEVICE_TABLE(of, i2c_mtk_dt_ids); ++ ++static struct i2c_adapter_quirks mtk_i2c_quirks = { ++ .max_write_len = BYTECNT_MAX, ++ .max_read_len = BYTECNT_MAX, ++}; ++ ++static void mtk_i2c_init(struct mtk_i2c *i2c) ++{ ++ i2c->clk_div = clk_get_rate(i2c->clk) / i2c->cur_clk; ++ if (i2c->clk_div > CLK_DIV_MASK) ++ i2c->clk_div = CLK_DIV_MASK; ++ ++ mtk_i2c_reset(i2c); ++} ++ ++static int mtk_i2c_probe(struct platform_device *pdev) +{ -+ struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ struct resource *res; ++ struct mtk_i2c *i2c; ++ struct i2c_adapter *adap; ++ const struct of_device_id *match; + int ret; + -+ adapter = devm_kzalloc(&pdev->dev,sizeof(struct i2c_adapter), GFP_KERNEL); -+ if (!adapter) { ++ match = of_match_device(i2c_mtk_dt_ids, &pdev->dev); ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!res) { ++ dev_err(&pdev->dev, "no memory resource found\n"); ++ return -ENODEV; ++ } ++ ++ i2c = devm_kzalloc(&pdev->dev, sizeof(struct mtk_i2c), GFP_KERNEL); ++ if (!i2c) { + dev_err(&pdev->dev, "failed to allocate i2c_adapter\n"); + return -ENOMEM; + } -+ membase = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(membase)) -+ return PTR_ERR(membase); -+ -+ strlcpy(adapter->name, dev_name(&pdev->dev), sizeof(adapter->name)); -+ -+ adapter->owner = THIS_MODULE; -+ adapter->nr = pdev->id; -+ adapter->timeout = HZ; -+ adapter->algo = &rt_i2c_algo; -+ adapter->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; -+ adapter->dev.parent = &pdev->dev; -+ adapter->dev.of_node = pdev->dev.of_node; -+ -+ platform_set_drvdata(pdev, adapter); -+ -+ ret = i2c_add_numbered_adapter(adapter); -+ if (ret) ++ ++ i2c->base = devm_ioremap_resource(&pdev->dev, res); ++ if (IS_ERR(i2c->base)) ++ return PTR_ERR(i2c->base); ++ ++ i2c->clk = devm_clk_get(&pdev->dev, NULL); ++ if (IS_ERR(i2c->clk)) { ++ dev_err(&pdev->dev, "no clock defined\n"); ++ return -ENODEV; ++ } ++ clk_prepare_enable(i2c->clk); ++ i2c->dev = &pdev->dev; ++ ++ if (of_property_read_u32(pdev->dev.of_node, ++ "clock-frequency", &i2c->cur_clk)) ++ i2c->cur_clk = 100000; ++ ++ adap = &i2c->adap; ++ adap->owner = THIS_MODULE; ++ adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; ++ adap->algo = &mtk_i2c_algo; ++ adap->retries = 3; ++ adap->dev.parent = &pdev->dev; ++ i2c_set_adapdata(adap, i2c); ++ adap->dev.of_node = pdev->dev.of_node; ++ strlcpy(adap->name, dev_name(&pdev->dev), sizeof(adap->name)); ++ adap->quirks = &mtk_i2c_quirks; ++ ++ platform_set_drvdata(pdev, i2c); ++ ++ mtk_i2c_init(i2c); ++ ++ ret = i2c_add_adapter(adap); ++ if (ret < 0) { ++ dev_err(&pdev->dev, "failed to add adapter\n"); ++ clk_disable_unprepare(i2c->clk); + return ret; ++ } + -+ dev_info(&pdev->dev,"loaded"); ++ dev_info(&pdev->dev, "clock %uKHz, re-start not support\n", ++ i2c->cur_clk/1000); + -+ return 0; ++ return ret; +} + -+static int rt_i2c_remove(struct platform_device *pdev) ++static int mtk_i2c_remove(struct platform_device *pdev) +{ -+ platform_set_drvdata(pdev, NULL); -+ return 0; -+} ++ struct mtk_i2c *i2c = platform_get_drvdata(pdev); + -+static const struct of_device_id i2c_rt_dt_ids[] = { -+ { .compatible = "ralink,i2c-mt7621", }, -+ { /* sentinel */ } -+}; ++ i2c_del_adapter(&i2c->adap); ++ clk_disable_unprepare(i2c->clk); + -+MODULE_DEVICE_TABLE(of, i2c_rt_dt_ids); ++ return 0; ++} + -+static struct platform_driver rt_i2c_driver = { -+ .probe = rt_i2c_probe, -+ .remove = rt_i2c_remove, ++static struct platform_driver mtk_i2c_driver = { ++ .probe = mtk_i2c_probe, ++ .remove = mtk_i2c_remove, + .driver = { + .owner = THIS_MODULE, + .name = "i2c-mt7621", -+ .of_match_table = i2c_rt_dt_ids, ++ .of_match_table = i2c_mtk_dt_ids, + }, +}; + -+static int __init i2c_rt_init (void) ++static int __init i2c_mtk_init (void) +{ -+ return platform_driver_register(&rt_i2c_driver); ++ return platform_driver_register(&mtk_i2c_driver); +} ++subsys_initcall(i2c_mtk_init); + -+static void __exit i2c_rt_exit (void) ++static void __exit i2c_mtk_exit (void) +{ -+ platform_driver_unregister(&rt_i2c_driver); ++ platform_driver_unregister(&mtk_i2c_driver); +} -+module_init (i2c_rt_init); -+module_exit (i2c_rt_exit); ++module_exit(i2c_mtk_exit); + +MODULE_AUTHOR("Steven Liu <steven_liu@mediatek.com>"); +MODULE_DESCRIPTION("MT7621 I2c host driver"); diff --git a/target/linux/ramips/patches-4.4/0047-DMA-ralink-add-rt2880-dma-engine.patch b/target/linux/ramips/patches-4.4/0047-DMA-ralink-add-rt2880-dma-engine.patch index 3362d4b5fc..d100a082e7 100644 --- a/target/linux/ramips/patches-4.4/0047-DMA-ralink-add-rt2880-dma-engine.patch +++ b/target/linux/ramips/patches-4.4/0047-DMA-ralink-add-rt2880-dma-engine.patch @@ -14,13 +14,19 @@ Signed-off-by: John Crispin <blogic@openwrt.org> --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig -@@ -40,6 +40,12 @@ config ASYNC_TX_ENABLE_CHANNEL_SWITCH +@@ -40,6 +40,18 @@ config ASYNC_TX_ENABLE_CHANNEL_SWITCH config ARCH_HAS_ASYNC_TX_FIND_CHANNEL bool +config DMA_RALINK + tristate "RALINK DMA support" -+ depends on RALINK && SOC_MT7620 ++ depends on RALINK && !SOC_RT288X ++ select DMA_ENGINE ++ select DMA_VIRTUAL_CHANNELS ++ ++config MTK_HSDMA ++ tristate "MTK HSDMA support" ++ depends on RALINK && SOC_MT7621 + select DMA_ENGINE + select DMA_VIRTUAL_CHANNELS + @@ -29,16 +35,17 @@ Signed-off-by: John Crispin <blogic@openwrt.org> --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile -@@ -65,5 +65,6 @@ obj-$(CONFIG_TI_DMA_CROSSBAR) += ti-dma- +@@ -65,5 +65,7 @@ obj-$(CONFIG_TI_DMA_CROSSBAR) += ti-dma- obj-$(CONFIG_TI_EDMA) += edma.o obj-$(CONFIG_XGENE_DMA) += xgene-dma.o obj-$(CONFIG_ZX_DMA) += zx296702_dma.o +obj-$(CONFIG_DMA_RALINK) += ralink-gdma.o ++obj-$(CONFIG_MTK_HSDMA) += mtk-hsdma.o obj-y += xilinx/ --- /dev/null +++ b/drivers/dma/ralink-gdma.c -@@ -0,0 +1,577 @@ +@@ -0,0 +1,928 @@ +/* + * Copyright (C) 2013, Lars-Peter Clausen <lars@metafoo.de> + * GDMA4740 DMAC support @@ -48,10 +55,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 675 Mass Ave, Cambridge, MA 02139, USA. -+ * + */ + +#include <linux/dmaengine.h> @@ -65,11 +68,11 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +#include <linux/spinlock.h> +#include <linux/irq.h> +#include <linux/of_dma.h> ++#include <linux/reset.h> ++#include <linux/of_device.h> + +#include "virt-dma.h" + -+#define GDMA_NR_CHANS 16 -+ +#define GDMA_REG_SRC_ADDR(x) (0x00 + (x) * 0x10) +#define GDMA_REG_DST_ADDR(x) (0x04 + (x) * 0x10) + @@ -84,7 +87,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +#define GDMA_REG_CTRL0_BURST_SHIFT 3 +#define GDMA_REG_CTRL0_DONE_INT BIT(2) +#define GDMA_REG_CTRL0_ENABLE BIT(1) -+#define GDMA_REG_CTRL0_HW_MODE 0 ++#define GDMA_REG_CTRL0_SW_MODE BIT(0) + +#define GDMA_REG_CTRL1(x) (0x0c + (x) * 0x10) +#define GDMA_REG_CTRL1_SEG_MASK 0xf @@ -109,16 +112,39 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +#define GDMA_REG_GCT_VER_SHIFT 1 +#define GDMA_REG_GCT_ARBIT_RR BIT(0) + ++#define GDMA_REG_REQSTS 0x2a0 ++#define GDMA_REG_ACKSTS 0x2a4 ++#define GDMA_REG_FINSTS 0x2a8 ++ ++/* for RT305X gdma registers */ ++#define GDMA_RT305X_CTRL0_REQ_MASK 0xf ++#define GDMA_RT305X_CTRL0_SRC_REQ_SHIFT 12 ++#define GDMA_RT305X_CTRL0_DST_REQ_SHIFT 8 ++ ++#define GDMA_RT305X_CTRL1_FAIL BIT(4) ++#define GDMA_RT305X_CTRL1_NEXT_MASK 0x7 ++#define GDMA_RT305X_CTRL1_NEXT_SHIFT 1 ++ ++#define GDMA_RT305X_STATUS_INT 0x80 ++#define GDMA_RT305X_STATUS_SIGNAL 0x84 ++#define GDMA_RT305X_GCT 0x88 ++ ++/* for MT7621 gdma registers */ ++#define GDMA_REG_PERF_START(x) (0x230 + (x) * 0x8) ++#define GDMA_REG_PERF_END(x) (0x234 + (x) * 0x8) ++ +enum gdma_dma_transfer_size { + GDMA_TRANSFER_SIZE_4BYTE = 0, + GDMA_TRANSFER_SIZE_8BYTE = 1, + GDMA_TRANSFER_SIZE_16BYTE = 2, + GDMA_TRANSFER_SIZE_32BYTE = 3, ++ GDMA_TRANSFER_SIZE_64BYTE = 4, +}; + +struct gdma_dma_sg { -+ dma_addr_t addr; -+ unsigned int len; ++ dma_addr_t src_addr; ++ dma_addr_t dst_addr; ++ u32 len; +}; + +struct gdma_dma_desc { @@ -127,6 +153,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + enum dma_transfer_direction direction; + bool cyclic; + ++ u32 residue; + unsigned int num_sgs; + struct gdma_dma_sg sg[]; +}; @@ -134,9 +161,10 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +struct gdma_dmaengine_chan { + struct virt_dma_chan vchan; + unsigned int id; ++ unsigned int slave_id; + + dma_addr_t fifo_addr; -+ unsigned int transfer_shift; ++ enum gdma_dma_transfer_size burst_size; + + struct gdma_dma_desc *desc; + unsigned int next_sg; @@ -144,10 +172,22 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + +struct gdma_dma_dev { + struct dma_device ddev; ++ struct device_dma_parameters dma_parms; ++ struct gdma_data *data; + void __iomem *base; -+ struct clk *clk; ++ struct tasklet_struct task; ++ volatile unsigned long chan_issued; ++ atomic_t cnt; ++ ++ struct gdma_dmaengine_chan chan[]; ++}; + -+ struct gdma_dmaengine_chan chan[GDMA_NR_CHANS]; ++struct gdma_data ++{ ++ int chancnt; ++ u32 done_int_reg; ++ void (*init)(struct gdma_dma_dev *dma_dev); ++ int (*start_transfer)(struct gdma_dmaengine_chan *chan); +}; + +static struct gdma_dma_dev *gdma_dma_chan_get_dev( @@ -176,21 +216,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +static inline void gdma_dma_write(struct gdma_dma_dev *dma_dev, + unsigned reg, uint32_t val) +{ -+ //printk("gdma --> %p = 0x%08X\n", dma_dev->base + reg, val); + writel(val, dma_dev->base + reg); +} + -+static inline void gdma_dma_write_mask(struct gdma_dma_dev *dma_dev, -+ unsigned int reg, uint32_t val, uint32_t mask) -+{ -+ uint32_t tmp; -+ -+ tmp = gdma_dma_read(dma_dev, reg); -+ tmp &= ~mask; -+ tmp |= val; -+ gdma_dma_write(dma_dev, reg, tmp); -+} -+ +static struct gdma_dma_desc *gdma_dma_alloc_desc(unsigned int num_sgs) +{ + return kzalloc(sizeof(struct gdma_dma_desc) + @@ -199,58 +227,54 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + +static enum gdma_dma_transfer_size gdma_dma_maxburst(u32 maxburst) +{ -+ if (maxburst <= 7) ++ if (maxburst < 2) + return GDMA_TRANSFER_SIZE_4BYTE; -+ else if (maxburst <= 15) ++ else if (maxburst < 4) + return GDMA_TRANSFER_SIZE_8BYTE; -+ else if (maxburst <= 31) ++ else if (maxburst < 8) + return GDMA_TRANSFER_SIZE_16BYTE; -+ -+ return GDMA_TRANSFER_SIZE_32BYTE; ++ else if (maxburst < 16) ++ return GDMA_TRANSFER_SIZE_32BYTE; ++ else ++ return GDMA_TRANSFER_SIZE_64BYTE; +} + -+static int gdma_dma_slave_config(struct dma_chan *c, -+ const struct dma_slave_config *config) ++static int gdma_dma_config(struct dma_chan *c, ++ struct dma_slave_config *config) +{ + struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c); + struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan); -+ enum gdma_dma_transfer_size transfer_size; -+ uint32_t flags; -+ uint32_t ctrl0, ctrl1; ++ ++ if (config->device_fc) { ++ dev_err(dma_dev->ddev.dev, "not support flow controller\n"); ++ return -EINVAL; ++ } + + switch (config->direction) { + case DMA_MEM_TO_DEV: -+ ctrl1 = 32 << GDMA_REG_CTRL1_SRC_REQ_SHIFT; -+ ctrl1 |= config->slave_id << GDMA_REG_CTRL1_DST_REQ_SHIFT; -+ flags = GDMA_REG_CTRL0_DST_ADDR_FIXED; -+ transfer_size = gdma_dma_maxburst(config->dst_maxburst); ++ if (config->dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) { ++ dev_err(dma_dev->ddev.dev, "only support 4 byte buswidth\n"); ++ return -EINVAL; ++ } ++ chan->slave_id = config->slave_id; + chan->fifo_addr = config->dst_addr; ++ chan->burst_size = gdma_dma_maxburst(config->dst_maxburst); + break; -+ + case DMA_DEV_TO_MEM: -+ ctrl1 = config->slave_id << GDMA_REG_CTRL1_SRC_REQ_SHIFT; -+ ctrl1 |= 32 << GDMA_REG_CTRL1_DST_REQ_SHIFT; -+ flags = GDMA_REG_CTRL0_SRC_ADDR_FIXED; -+ transfer_size = gdma_dma_maxburst(config->src_maxburst); ++ if (config->src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) { ++ dev_err(dma_dev->ddev.dev, "only support 4 byte buswidth\n"); ++ return -EINVAL; ++ } ++ chan->slave_id = config->slave_id; + chan->fifo_addr = config->src_addr; ++ chan->burst_size = gdma_dma_maxburst(config->src_maxburst); + break; -+ + default: ++ dev_err(dma_dev->ddev.dev, "direction type %d error\n", ++ config->direction); + return -EINVAL; + } + -+ chan->transfer_shift = 1 + transfer_size; -+ -+ ctrl0 = flags | GDMA_REG_CTRL0_HW_MODE; -+ ctrl0 |= GDMA_REG_CTRL0_DONE_INT; -+ -+ ctrl1 &= ~(GDMA_REG_CTRL1_NEXT_MASK << GDMA_REG_CTRL1_NEXT_SHIFT); -+ ctrl1 |= chan->id << GDMA_REG_CTRL1_NEXT_SHIFT; -+ ctrl1 |= GDMA_REG_CTRL1_FAIL; -+ ctrl1 &= ~GDMA_REG_CTRL1_CONTINOUS; -+ gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), ctrl0); -+ gdma_dma_write(dma_dev, GDMA_REG_CTRL1(chan->id), ctrl1); -+ + return 0; +} + @@ -258,108 +282,271 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +{ + struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c); + struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan); -+ unsigned long flags; ++ unsigned long flags, timeout; + LIST_HEAD(head); ++ int i = 0; + + spin_lock_irqsave(&chan->vchan.lock, flags); -+ gdma_dma_write_mask(dma_dev, GDMA_REG_CTRL0(chan->id), 0, -+ GDMA_REG_CTRL0_ENABLE); + chan->desc = NULL; ++ clear_bit(chan->id, &dma_dev->chan_issued); + vchan_get_all_descriptors(&chan->vchan, &head); + spin_unlock_irqrestore(&chan->vchan.lock, flags); + + vchan_dma_desc_free_list(&chan->vchan, &head); + ++ /* wait dma transfer complete */ ++ timeout = jiffies + msecs_to_jiffies(5000); ++ while (gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id)) & ++ GDMA_REG_CTRL0_ENABLE) { ++ if (time_after_eq(jiffies, timeout)) { ++ dev_err(dma_dev->ddev.dev, "chan %d wait timeout\n", ++ chan->id); ++ /* restore to init value */ ++ gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), 0); ++ break; ++ } ++ cpu_relax(); ++ i++; ++ } ++ ++ if (i) ++ dev_dbg(dma_dev->ddev.dev, "terminate chan %d loops %d\n", ++ chan->id, i); ++ + return 0; +} + -+static int gdma_dma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, -+ unsigned long arg) ++static void rt305x_dump_reg(struct gdma_dma_dev *dma_dev, int id) +{ -+ struct dma_slave_config *config = (struct dma_slave_config *)arg; -+ -+ switch (cmd) { -+ case DMA_SLAVE_CONFIG: -+ return gdma_dma_slave_config(chan, config); -+ case DMA_TERMINATE_ALL: -+ return gdma_dma_terminate_all(chan); -+ default: -+ return -ENOSYS; -+ } ++ dev_dbg(dma_dev->ddev.dev, "chan %d, src %08x, dst %08x, ctr0 %08x, " \ ++ "ctr1 %08x, intr %08x, signal %08x\n", id, ++ gdma_dma_read(dma_dev, GDMA_REG_SRC_ADDR(id)), ++ gdma_dma_read(dma_dev, GDMA_REG_DST_ADDR(id)), ++ gdma_dma_read(dma_dev, GDMA_REG_CTRL0(id)), ++ gdma_dma_read(dma_dev, GDMA_REG_CTRL1(id)), ++ gdma_dma_read(dma_dev, GDMA_RT305X_STATUS_INT), ++ gdma_dma_read(dma_dev, GDMA_RT305X_STATUS_SIGNAL)); +} + -+static int gdma_dma_start_transfer(struct gdma_dmaengine_chan *chan) ++static int rt305x_gdma_start_transfer(struct gdma_dmaengine_chan *chan) +{ + struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan); + dma_addr_t src_addr, dst_addr; -+ struct virt_dma_desc *vdesc; + struct gdma_dma_sg *sg; ++ uint32_t ctrl0, ctrl1; + -+ gdma_dma_write_mask(dma_dev, GDMA_REG_CTRL0(chan->id), 0, -+ GDMA_REG_CTRL0_ENABLE); ++ /* verify chan is already stopped */ ++ ctrl0 = gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id)); ++ if (unlikely(ctrl0 & GDMA_REG_CTRL0_ENABLE)) { ++ dev_err(dma_dev->ddev.dev, "chan %d is start(%08x).\n", ++ chan->id, ctrl0); ++ rt305x_dump_reg(dma_dev, chan->id); ++ return -EINVAL; ++ } + -+ if (!chan->desc) { -+ vdesc = vchan_next_desc(&chan->vchan); -+ if (!vdesc) -+ return 0; -+ chan->desc = to_gdma_dma_desc(vdesc); -+ chan->next_sg = 0; ++ sg = &chan->desc->sg[chan->next_sg]; ++ if (chan->desc->direction == DMA_MEM_TO_DEV) { ++ src_addr = sg->src_addr; ++ dst_addr = chan->fifo_addr; ++ ctrl0 = GDMA_REG_CTRL0_DST_ADDR_FIXED | \ ++ (8 << GDMA_RT305X_CTRL0_SRC_REQ_SHIFT) | \ ++ (chan->slave_id << GDMA_RT305X_CTRL0_DST_REQ_SHIFT); ++ } else if (chan->desc->direction == DMA_DEV_TO_MEM) { ++ src_addr = chan->fifo_addr; ++ dst_addr = sg->dst_addr; ++ ctrl0 = GDMA_REG_CTRL0_SRC_ADDR_FIXED | \ ++ (chan->slave_id << GDMA_RT305X_CTRL0_SRC_REQ_SHIFT) | \ ++ (8 << GDMA_RT305X_CTRL0_DST_REQ_SHIFT); ++ } else if (chan->desc->direction == DMA_MEM_TO_MEM) { ++ /* ++ * TODO: memcpy function have bugs. sometime it will copy ++ * more 8 bytes data when using dmatest verify. ++ */ ++ src_addr = sg->src_addr; ++ dst_addr = sg->dst_addr; ++ ctrl0 = GDMA_REG_CTRL0_SW_MODE | \ ++ (8 << GDMA_REG_CTRL1_SRC_REQ_SHIFT) | \ ++ (8 << GDMA_REG_CTRL1_DST_REQ_SHIFT); ++ } else { ++ dev_err(dma_dev->ddev.dev, "direction type %d error\n", ++ chan->desc->direction); ++ return -EINVAL; + } + -+ if (chan->next_sg == chan->desc->num_sgs) -+ chan->next_sg = 0; ++ ctrl0 |= (sg->len << GDMA_REG_CTRL0_TX_SHIFT) | \ ++ (chan->burst_size << GDMA_REG_CTRL0_BURST_SHIFT) | \ ++ GDMA_REG_CTRL0_DONE_INT | GDMA_REG_CTRL0_ENABLE; ++ ctrl1 = chan->id << GDMA_REG_CTRL1_NEXT_SHIFT; + -+ sg = &chan->desc->sg[chan->next_sg]; ++ chan->next_sg++; ++ gdma_dma_write(dma_dev, GDMA_REG_SRC_ADDR(chan->id), src_addr); ++ gdma_dma_write(dma_dev, GDMA_REG_DST_ADDR(chan->id), dst_addr); ++ gdma_dma_write(dma_dev, GDMA_REG_CTRL1(chan->id), ctrl1); ++ ++ /* make sure next_sg is update */ ++ wmb(); ++ gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), ctrl0); + ++ return 0; ++} ++ ++static void rt3883_dump_reg(struct gdma_dma_dev *dma_dev, int id) ++{ ++ dev_dbg(dma_dev->ddev.dev, "chan %d, src %08x, dst %08x, ctr0 %08x, " \ ++ "ctr1 %08x, unmask %08x, done %08x, " \ ++ "req %08x, ack %08x, fin %08x\n", id, ++ gdma_dma_read(dma_dev, GDMA_REG_SRC_ADDR(id)), ++ gdma_dma_read(dma_dev, GDMA_REG_DST_ADDR(id)), ++ gdma_dma_read(dma_dev, GDMA_REG_CTRL0(id)), ++ gdma_dma_read(dma_dev, GDMA_REG_CTRL1(id)), ++ gdma_dma_read(dma_dev, GDMA_REG_UNMASK_INT), ++ gdma_dma_read(dma_dev, GDMA_REG_DONE_INT), ++ gdma_dma_read(dma_dev, GDMA_REG_REQSTS), ++ gdma_dma_read(dma_dev, GDMA_REG_ACKSTS), ++ gdma_dma_read(dma_dev, GDMA_REG_FINSTS)); ++} ++ ++static int rt3883_gdma_start_transfer(struct gdma_dmaengine_chan *chan) ++{ ++ struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan); ++ dma_addr_t src_addr, dst_addr; ++ struct gdma_dma_sg *sg; ++ uint32_t ctrl0, ctrl1; ++ ++ /* verify chan is already stopped */ ++ ctrl0 = gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id)); ++ if (unlikely(ctrl0 & GDMA_REG_CTRL0_ENABLE)) { ++ dev_err(dma_dev->ddev.dev, "chan %d is start(%08x).\n", ++ chan->id, ctrl0); ++ rt3883_dump_reg(dma_dev, chan->id); ++ return -EINVAL; ++ } ++ ++ sg = &chan->desc->sg[chan->next_sg]; + if (chan->desc->direction == DMA_MEM_TO_DEV) { -+ src_addr = sg->addr; ++ src_addr = sg->src_addr; + dst_addr = chan->fifo_addr; -+ } else { ++ ctrl0 = GDMA_REG_CTRL0_DST_ADDR_FIXED; ++ ctrl1 = (32 << GDMA_REG_CTRL1_SRC_REQ_SHIFT) | \ ++ (chan->slave_id << GDMA_REG_CTRL1_DST_REQ_SHIFT); ++ } else if (chan->desc->direction == DMA_DEV_TO_MEM) { + src_addr = chan->fifo_addr; -+ dst_addr = sg->addr; ++ dst_addr = sg->dst_addr; ++ ctrl0 = GDMA_REG_CTRL0_SRC_ADDR_FIXED; ++ ctrl1 = (chan->slave_id << GDMA_REG_CTRL1_SRC_REQ_SHIFT) | \ ++ (32 << GDMA_REG_CTRL1_DST_REQ_SHIFT) | \ ++ GDMA_REG_CTRL1_COHERENT; ++ } else if (chan->desc->direction == DMA_MEM_TO_MEM) { ++ src_addr = sg->src_addr; ++ dst_addr = sg->dst_addr; ++ ctrl0 = GDMA_REG_CTRL0_SW_MODE; ++ ctrl1 = (32 << GDMA_REG_CTRL1_SRC_REQ_SHIFT) | \ ++ (32 << GDMA_REG_CTRL1_DST_REQ_SHIFT) | \ ++ GDMA_REG_CTRL1_COHERENT; ++ } else { ++ dev_err(dma_dev->ddev.dev, "direction type %d error\n", ++ chan->desc->direction); ++ return -EINVAL; + } ++ ++ ctrl0 |= (sg->len << GDMA_REG_CTRL0_TX_SHIFT) | \ ++ (chan->burst_size << GDMA_REG_CTRL0_BURST_SHIFT) | \ ++ GDMA_REG_CTRL0_DONE_INT | GDMA_REG_CTRL0_ENABLE; ++ ctrl1 |= chan->id << GDMA_REG_CTRL1_NEXT_SHIFT; ++ ++ chan->next_sg++; + gdma_dma_write(dma_dev, GDMA_REG_SRC_ADDR(chan->id), src_addr); + gdma_dma_write(dma_dev, GDMA_REG_DST_ADDR(chan->id), dst_addr); -+ gdma_dma_write_mask(dma_dev, GDMA_REG_CTRL0(chan->id), -+ (sg->len << GDMA_REG_CTRL0_TX_SHIFT) | GDMA_REG_CTRL0_ENABLE, -+ GDMA_REG_CTRL0_TX_MASK << GDMA_REG_CTRL0_TX_SHIFT); -+ chan->next_sg++; -+ gdma_dma_write_mask(dma_dev, GDMA_REG_CTRL1(chan->id), 0, GDMA_REG_CTRL1_MASK); ++ gdma_dma_write(dma_dev, GDMA_REG_CTRL1(chan->id), ctrl1); ++ ++ /* make sure next_sg is update */ ++ wmb(); ++ gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), ctrl0); + + return 0; +} + -+static void gdma_dma_chan_irq(struct gdma_dmaengine_chan *chan) ++static inline int gdma_start_transfer(struct gdma_dma_dev *dma_dev, ++ struct gdma_dmaengine_chan *chan) ++{ ++ return dma_dev->data->start_transfer(chan); ++} ++ ++static int gdma_next_desc(struct gdma_dmaengine_chan *chan) ++{ ++ struct virt_dma_desc *vdesc; ++ ++ vdesc = vchan_next_desc(&chan->vchan); ++ if (!vdesc) { ++ chan->desc = NULL; ++ return 0; ++ } ++ chan->desc = to_gdma_dma_desc(vdesc); ++ chan->next_sg = 0; ++ ++ return 1; ++} ++ ++static void gdma_dma_chan_irq(struct gdma_dma_dev *dma_dev, ++ struct gdma_dmaengine_chan *chan) +{ -+ spin_lock(&chan->vchan.lock); -+ if (chan->desc) { -+ if (chan->desc && chan->desc->cyclic) { -+ vchan_cyclic_callback(&chan->desc->vdesc); ++ struct gdma_dma_desc *desc; ++ unsigned long flags; ++ int chan_issued; ++ ++ chan_issued = 0; ++ spin_lock_irqsave(&chan->vchan.lock, flags); ++ desc = chan->desc; ++ if (desc) { ++ if (desc->cyclic) { ++ vchan_cyclic_callback(&desc->vdesc); ++ if (chan->next_sg == desc->num_sgs) ++ chan->next_sg = 0; ++ chan_issued = 1; + } else { -+ if (chan->next_sg == chan->desc->num_sgs) { -+ chan->desc = NULL; -+ vchan_cookie_complete(&chan->desc->vdesc); -+ } ++ desc->residue -= desc->sg[chan->next_sg - 1].len; ++ if (chan->next_sg == desc->num_sgs) { ++ list_del(&desc->vdesc.node); ++ vchan_cookie_complete(&desc->vdesc); ++ chan_issued = gdma_next_desc(chan); ++ } else ++ chan_issued = 1; + } -+ } -+ gdma_dma_start_transfer(chan); -+ spin_unlock(&chan->vchan.lock); ++ } else ++ dev_dbg(dma_dev->ddev.dev, "chan %d no desc to complete\n", ++ chan->id); ++ if (chan_issued) ++ set_bit(chan->id, &dma_dev->chan_issued); ++ spin_unlock_irqrestore(&chan->vchan.lock, flags); +} + +static irqreturn_t gdma_dma_irq(int irq, void *devid) +{ + struct gdma_dma_dev *dma_dev = devid; -+ uint32_t unmask, done; ++ u32 done, done_reg; + unsigned int i; + -+ unmask = gdma_dma_read(dma_dev, GDMA_REG_UNMASK_INT); -+ gdma_dma_write(dma_dev, GDMA_REG_UNMASK_INT, unmask); -+ done = gdma_dma_read(dma_dev, GDMA_REG_DONE_INT); ++ done_reg = dma_dev->data->done_int_reg; ++ done = gdma_dma_read(dma_dev, done_reg); ++ if (unlikely(!done)) ++ return IRQ_NONE; ++ ++ /* clean done bits */ ++ gdma_dma_write(dma_dev, done_reg, done); + -+ for (i = 0; i < GDMA_NR_CHANS; ++i) -+ if (done & BIT(i)) -+ gdma_dma_chan_irq(&dma_dev->chan[i]); -+ gdma_dma_write(dma_dev, GDMA_REG_DONE_INT, done); ++ i = 0; ++ while (done) { ++ if (done & 0x1) { ++ gdma_dma_chan_irq(dma_dev, &dma_dev->chan[i]); ++ atomic_dec(&dma_dev->cnt); ++ } ++ done >>= 1; ++ i++; ++ } ++ ++ /* start only have work to do */ ++ if (dma_dev->chan_issued) ++ tasklet_schedule(&dma_dev->task); + + return IRQ_HANDLED; +} @@ -367,18 +554,25 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +static void gdma_dma_issue_pending(struct dma_chan *c) +{ + struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c); ++ struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan); + unsigned long flags; + + spin_lock_irqsave(&chan->vchan.lock, flags); -+ if (vchan_issue_pending(&chan->vchan) && !chan->desc) -+ gdma_dma_start_transfer(chan); ++ if (vchan_issue_pending(&chan->vchan) && !chan->desc) { ++ if (gdma_next_desc(chan)) { ++ set_bit(chan->id, &dma_dev->chan_issued); ++ tasklet_schedule(&dma_dev->task); ++ } else ++ dev_dbg(dma_dev->ddev.dev, "chan %d no desc to issue\n", ++ chan->id); ++ } + spin_unlock_irqrestore(&chan->vchan.lock, flags); +} + +static struct dma_async_tx_descriptor *gdma_dma_prep_slave_sg( -+ struct dma_chan *c, struct scatterlist *sgl, -+ unsigned int sg_len, enum dma_transfer_direction direction, -+ unsigned long flags, void *context) ++ struct dma_chan *c, struct scatterlist *sgl, ++ unsigned int sg_len, enum dma_transfer_direction direction, ++ unsigned long flags, void *context) +{ + struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c); + struct gdma_dma_desc *desc; @@ -386,12 +580,30 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + unsigned int i; + + desc = gdma_dma_alloc_desc(sg_len); -+ if (!desc) ++ if (!desc) { ++ dev_err(c->device->dev, "alloc sg decs error\n"); + return NULL; ++ } ++ desc->residue = 0; + + for_each_sg(sgl, sg, sg_len, i) { -+ desc->sg[i].addr = sg_dma_address(sg); ++ if (direction == DMA_MEM_TO_DEV) ++ desc->sg[i].src_addr = sg_dma_address(sg); ++ else if (direction == DMA_DEV_TO_MEM) ++ desc->sg[i].dst_addr = sg_dma_address(sg); ++ else { ++ dev_err(c->device->dev, "direction type %d error\n", ++ direction); ++ goto free_desc; ++ } ++ ++ if (unlikely(sg_dma_len(sg) > GDMA_REG_CTRL0_TX_MASK)) { ++ dev_err(c->device->dev, "sg len too large %d\n", ++ sg_dma_len(sg)); ++ goto free_desc; ++ } + desc->sg[i].len = sg_dma_len(sg); ++ desc->residue += sg_dma_len(sg); + } + + desc->num_sgs = sg_len; @@ -399,12 +611,60 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + desc->cyclic = false; + + return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); ++ ++free_desc: ++ kfree(desc); ++ return NULL; ++} ++ ++static struct dma_async_tx_descriptor * gdma_dma_prep_dma_memcpy( ++ struct dma_chan *c, dma_addr_t dest, dma_addr_t src, ++ size_t len, unsigned long flags) ++{ ++ struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c); ++ struct gdma_dma_desc *desc; ++ unsigned int num_periods, i; ++ size_t xfer_count; ++ ++ if (len <= 0) ++ return NULL; ++ ++ chan->burst_size = gdma_dma_maxburst(len >> 2); ++ ++ xfer_count = GDMA_REG_CTRL0_TX_MASK; ++ num_periods = DIV_ROUND_UP(len, xfer_count); ++ ++ desc = gdma_dma_alloc_desc(num_periods); ++ if (!desc) { ++ dev_err(c->device->dev, "alloc memcpy decs error\n"); ++ return NULL; ++ } ++ desc->residue = len; ++ ++ for (i = 0; i < num_periods; i++) { ++ desc->sg[i].src_addr = src; ++ desc->sg[i].dst_addr = dest; ++ if (len > xfer_count) { ++ desc->sg[i].len = xfer_count; ++ } else { ++ desc->sg[i].len = len; ++ } ++ src += desc->sg[i].len; ++ dest += desc->sg[i].len; ++ len -= desc->sg[i].len; ++ } ++ ++ desc->num_sgs = num_periods; ++ desc->direction = DMA_MEM_TO_MEM; ++ desc->cyclic = false; ++ ++ return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); +} + +static struct dma_async_tx_descriptor *gdma_dma_prep_dma_cyclic( + struct dma_chan *c, dma_addr_t buf_addr, size_t buf_len, + size_t period_len, enum dma_transfer_direction direction, -+ unsigned long flags, void *context) ++ unsigned long flags) +{ + struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c); + struct gdma_dma_desc *desc; @@ -413,14 +673,30 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + if (buf_len % period_len) + return NULL; + -+ num_periods = buf_len / period_len; ++ if (period_len > GDMA_REG_CTRL0_TX_MASK) { ++ dev_err(c->device->dev, "cyclic len too large %d\n", ++ period_len); ++ return NULL; ++ } + ++ num_periods = buf_len / period_len; + desc = gdma_dma_alloc_desc(num_periods); -+ if (!desc) ++ if (!desc) { ++ dev_err(c->device->dev, "alloc cyclic decs error\n"); + return NULL; ++ } ++ desc->residue = buf_len; + + for (i = 0; i < num_periods; i++) { -+ desc->sg[i].addr = buf_addr; ++ if (direction == DMA_MEM_TO_DEV) ++ desc->sg[i].src_addr = buf_addr; ++ else if (direction == DMA_DEV_TO_MEM) ++ desc->sg[i].dst_addr = buf_addr; ++ else { ++ dev_err(c->device->dev, "direction type %d error\n", ++ direction); ++ goto free_desc; ++ } + desc->sg[i].len = period_len; + buf_addr += period_len; + } @@ -430,28 +706,10 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + desc->cyclic = true; + + return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); -+} + -+static size_t gdma_dma_desc_residue(struct gdma_dmaengine_chan *chan, -+ struct gdma_dma_desc *desc, unsigned int next_sg) -+{ -+ struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan); -+ unsigned int residue, count; -+ unsigned int i; -+ -+ residue = 0; -+ -+ for (i = next_sg; i < desc->num_sgs; i++) -+ residue += desc->sg[i].len; -+ -+ if (next_sg != 0) { -+ count = gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id)); -+ count >>= GDMA_REG_CTRL0_CURR_SHIFT; -+ count &= GDMA_REG_CTRL0_CURR_MASK; -+ residue += count << chan->transfer_shift; -+ } -+ -+ return residue; ++free_desc: ++ kfree(desc); ++ return NULL; +} + +static enum dma_status gdma_dma_tx_status(struct dma_chan *c, @@ -461,30 +719,32 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + struct virt_dma_desc *vdesc; + enum dma_status status; + unsigned long flags; ++ struct gdma_dma_desc *desc; + + status = dma_cookie_status(c, cookie, state); -+ if (status == DMA_SUCCESS || !state) ++ if (status == DMA_COMPLETE || !state) + return status; + + spin_lock_irqsave(&chan->vchan.lock, flags); -+ vdesc = vchan_find_desc(&chan->vchan, cookie); -+ if (cookie == chan->desc->vdesc.tx.cookie) { -+ state->residue = gdma_dma_desc_residue(chan, chan->desc, -+ chan->next_sg); -+ } else if (vdesc) { -+ state->residue = gdma_dma_desc_residue(chan, -+ to_gdma_dma_desc(vdesc), 0); -+ } else { -+ state->residue = 0; -+ } ++ desc = chan->desc; ++ if (desc && (cookie == desc->vdesc.tx.cookie)) { ++ /* ++ * We never update edesc->residue in the cyclic case, so we ++ * can tell the remaining room to the end of the circular ++ * buffer. ++ */ ++ if (desc->cyclic) ++ state->residue = desc->residue - ++ ((chan->next_sg - 1) * desc->sg[0].len); ++ else ++ state->residue = desc->residue; ++ } else if ((vdesc = vchan_find_desc(&chan->vchan, cookie))) ++ state->residue = to_gdma_dma_desc(vdesc)->residue; + spin_unlock_irqrestore(&chan->vchan.lock, flags); + -+ return status; -+} ++ dev_dbg(c->device->dev, "tx residue %d bytes\n", state->residue); + -+static int gdma_dma_alloc_chan_resources(struct dma_chan *c) -+{ -+ return 0; ++ return status; +} + +static void gdma_dma_free_chan_resources(struct dma_chan *c) @@ -497,87 +757,192 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + kfree(container_of(vdesc, struct gdma_dma_desc, vdesc)); +} + -+static struct dma_chan * -+of_dma_xlate_by_chan_id(struct of_phandle_args *dma_spec, -+ struct of_dma *ofdma) ++static void gdma_dma_tasklet(unsigned long arg) +{ -+ struct gdma_dma_dev *dma_dev = ofdma->of_dma_data; -+ unsigned int request = dma_spec->args[0]; ++ struct gdma_dma_dev *dma_dev = (struct gdma_dma_dev *)arg; ++ struct gdma_dmaengine_chan *chan; ++ static unsigned int last_chan; ++ unsigned int i, chan_mask; ++ ++ /* record last chan to round robin all chans */ ++ i = last_chan; ++ chan_mask = dma_dev->data->chancnt - 1; ++ do { ++ /* ++ * on mt7621. when verify with dmatest with all ++ * channel is enable. we need to limit only two ++ * channel is working at the same time. otherwise the ++ * data will have problem. ++ */ ++ if (atomic_read(&dma_dev->cnt) >= 2) { ++ last_chan = i; ++ break; ++ } + -+ if (request >= GDMA_NR_CHANS) -+ return NULL; ++ if (test_and_clear_bit(i, &dma_dev->chan_issued)) { ++ chan = &dma_dev->chan[i]; ++ if (chan->desc) { ++ atomic_inc(&dma_dev->cnt); ++ gdma_start_transfer(dma_dev, chan); ++ } else ++ dev_dbg(dma_dev->ddev.dev, "chan %d no desc to issue\n", chan->id); ++ ++ if (!dma_dev->chan_issued) ++ break; ++ } ++ ++ i = (i + 1) & chan_mask; ++ } while (i != last_chan); ++} ++ ++static void rt305x_gdma_init(struct gdma_dma_dev *dma_dev) ++{ ++ uint32_t gct; ++ ++ /* all chans round robin */ ++ gdma_dma_write(dma_dev, GDMA_RT305X_GCT, GDMA_REG_GCT_ARBIT_RR); + -+ return dma_get_slave_channel(&(dma_dev->chan[request].vchan.chan)); ++ gct = gdma_dma_read(dma_dev, GDMA_RT305X_GCT); ++ dev_info(dma_dev->ddev.dev, "revision: %d, channels: %d\n", ++ (gct >> GDMA_REG_GCT_VER_SHIFT) & GDMA_REG_GCT_VER_MASK, ++ 8 << ((gct >> GDMA_REG_GCT_CHAN_SHIFT) & ++ GDMA_REG_GCT_CHAN_MASK)); +} + ++static void rt3883_gdma_init(struct gdma_dma_dev *dma_dev) ++{ ++ uint32_t gct; ++ ++ /* all chans round robin */ ++ gdma_dma_write(dma_dev, GDMA_REG_GCT, GDMA_REG_GCT_ARBIT_RR); ++ ++ gct = gdma_dma_read(dma_dev, GDMA_REG_GCT); ++ dev_info(dma_dev->ddev.dev, "revision: %d, channels: %d\n", ++ (gct >> GDMA_REG_GCT_VER_SHIFT) & GDMA_REG_GCT_VER_MASK, ++ 8 << ((gct >> GDMA_REG_GCT_CHAN_SHIFT) & ++ GDMA_REG_GCT_CHAN_MASK)); ++} ++ ++static struct gdma_data rt305x_gdma_data = { ++ .chancnt = 8, ++ .done_int_reg = GDMA_RT305X_STATUS_INT, ++ .init = rt305x_gdma_init, ++ .start_transfer = rt305x_gdma_start_transfer, ++}; ++ ++static struct gdma_data rt3883_gdma_data = { ++ .chancnt = 16, ++ .done_int_reg = GDMA_REG_DONE_INT, ++ .init = rt3883_gdma_init, ++ .start_transfer = rt3883_gdma_start_transfer, ++}; ++ ++static const struct of_device_id gdma_of_match_table[] = { ++ { .compatible = "ralink,rt305x-gdma", .data = &rt305x_gdma_data }, ++ { .compatible = "ralink,rt3883-gdma", .data = &rt3883_gdma_data }, ++ { }, ++}; ++ +static int gdma_dma_probe(struct platform_device *pdev) +{ ++ const struct of_device_id *match; + struct gdma_dmaengine_chan *chan; + struct gdma_dma_dev *dma_dev; + struct dma_device *dd; + unsigned int i; + struct resource *res; -+ uint32_t gct; + int ret; + int irq; ++ void __iomem *base; ++ struct gdma_data *data; + ++ ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); ++ if (ret) ++ return ret; + -+ dma_dev = devm_kzalloc(&pdev->dev, sizeof(*dma_dev), GFP_KERNEL); -+ if (!dma_dev) ++ match = of_match_device(gdma_of_match_table, &pdev->dev); ++ if (!match) + return -EINVAL; ++ data = (struct gdma_data *) match->data; + -+ dd = &dma_dev->ddev; ++ dma_dev = devm_kzalloc(&pdev->dev, sizeof(*dma_dev) + ++ (sizeof(struct gdma_dmaengine_chan) * data->chancnt), ++ GFP_KERNEL); ++ if (!dma_dev) { ++ dev_err(&pdev->dev, "alloc dma device failed\n"); ++ return -EINVAL; ++ } ++ dma_dev->data = data; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ dma_dev->base = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(dma_dev->base)) -+ return PTR_ERR(dma_dev->base); ++ base = devm_ioremap_resource(&pdev->dev, res); ++ if (IS_ERR(base)) ++ return PTR_ERR(base); ++ dma_dev->base = base; ++ tasklet_init(&dma_dev->task, gdma_dma_tasklet, (unsigned long)dma_dev); ++ ++ irq = platform_get_irq(pdev, 0); ++ if (irq < 0) { ++ dev_err(&pdev->dev, "failed to get irq\n"); ++ return -EINVAL; ++ } ++ ret = devm_request_irq(&pdev->dev, irq, gdma_dma_irq, ++ 0, dev_name(&pdev->dev), dma_dev); ++ if (ret) { ++ dev_err(&pdev->dev, "failed to request irq\n"); ++ return ret; ++ } ++ ++ device_reset(&pdev->dev); + ++ dd = &dma_dev->ddev; ++ dma_cap_set(DMA_MEMCPY, dd->cap_mask); + dma_cap_set(DMA_SLAVE, dd->cap_mask); + dma_cap_set(DMA_CYCLIC, dd->cap_mask); -+ dd->device_alloc_chan_resources = gdma_dma_alloc_chan_resources; + dd->device_free_chan_resources = gdma_dma_free_chan_resources; -+ dd->device_tx_status = gdma_dma_tx_status; -+ dd->device_issue_pending = gdma_dma_issue_pending; ++ dd->device_prep_dma_memcpy = gdma_dma_prep_dma_memcpy; + dd->device_prep_slave_sg = gdma_dma_prep_slave_sg; + dd->device_prep_dma_cyclic = gdma_dma_prep_dma_cyclic; -+ dd->device_control = gdma_dma_control; ++ dd->device_config = gdma_dma_config; ++ dd->device_terminate_all = gdma_dma_terminate_all; ++ dd->device_tx_status = gdma_dma_tx_status; ++ dd->device_issue_pending = gdma_dma_issue_pending; ++ ++ dd->src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); ++ dd->dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); ++ dd->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); ++ dd->residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; ++ + dd->dev = &pdev->dev; -+ dd->chancnt = GDMA_NR_CHANS; ++ dd->dev->dma_parms = &dma_dev->dma_parms; ++ dma_set_max_seg_size(dd->dev, GDMA_REG_CTRL0_TX_MASK); + INIT_LIST_HEAD(&dd->channels); + -+ for (i = 0; i < dd->chancnt; i++) { ++ for (i = 0; i < data->chancnt; i++) { + chan = &dma_dev->chan[i]; + chan->id = i; + chan->vchan.desc_free = gdma_dma_desc_free; + vchan_init(&chan->vchan, dd); + } + ++ /* init hardware */ ++ data->init(dma_dev); ++ + ret = dma_async_device_register(dd); -+ if (ret) ++ if (ret) { ++ dev_err(&pdev->dev, "failed to register dma device\n"); + return ret; ++ } + + ret = of_dma_controller_register(pdev->dev.of_node, + of_dma_xlate_by_chan_id, dma_dev); -+ if (ret) -+ goto err_unregister; -+ -+ irq = platform_get_irq(pdev, 0); -+ ret = request_irq(irq, gdma_dma_irq, 0, dev_name(&pdev->dev), dma_dev); -+ if (ret) ++ if (ret) { ++ dev_err(&pdev->dev, "failed to register of dma controller\n"); + goto err_unregister; ++ } + -+ gdma_dma_write(dma_dev, GDMA_REG_UNMASK_INT, 0); -+ gdma_dma_write(dma_dev, GDMA_REG_DONE_INT, BIT(dd->chancnt) - 1); -+ -+ gct = gdma_dma_read(dma_dev, GDMA_REG_GCT); -+ dev_info(&pdev->dev, "revision: %d, channels: %d\n", -+ (gct >> GDMA_REG_GCT_VER_SHIFT) & GDMA_REG_GCT_VER_MASK, -+ 8 << ((gct >> GDMA_REG_GCT_CHAN_SHIFT) & GDMA_REG_GCT_CHAN_MASK)); + platform_set_drvdata(pdev, dma_dev); + -+ gdma_dma_write(dma_dev, GDMA_REG_GCT, GDMA_REG_GCT_ARBIT_RR); -+ + return 0; + +err_unregister: @@ -588,34 +953,27 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +static int gdma_dma_remove(struct platform_device *pdev) +{ + struct gdma_dma_dev *dma_dev = platform_get_drvdata(pdev); -+ int irq = platform_get_irq(pdev, 0); + -+ free_irq(irq, dma_dev); ++ tasklet_kill(&dma_dev->task); + of_dma_controller_free(pdev->dev.of_node); + dma_async_device_unregister(&dma_dev->ddev); + + return 0; +} + -+static const struct of_device_id gdma_of_match_table[] = { -+ { .compatible = "ralink,rt2880-gdma" }, -+ { }, -+}; -+ +static struct platform_driver gdma_dma_driver = { + .probe = gdma_dma_probe, + .remove = gdma_dma_remove, + .driver = { + .name = "gdma-rt2880", -+ .owner = THIS_MODULE, + .of_match_table = gdma_of_match_table, + }, +}; +module_platform_driver(gdma_dma_driver); + +MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); -+MODULE_DESCRIPTION("GDMA4740 DMA driver"); -+MODULE_LICENSE("GPLv2"); ++MODULE_DESCRIPTION("Ralink/MTK DMA driver"); ++MODULE_LICENSE("GPL v2"); --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -496,6 +496,7 @@ static inline void dma_set_unmap(struct @@ -626,3 +984,773 @@ Signed-off-by: John Crispin <blogic@openwrt.org> #else static inline void dma_set_unmap(struct dma_async_tx_descriptor *tx, struct dmaengine_unmap_data *unmap) +--- /dev/null ++++ b/drivers/dma/mtk-hsdma.c +@@ -0,0 +1,767 @@ ++/* ++ * Copyright (C) 2015, Michael Lee <igvtee@gmail.com> ++ * MTK HSDMA support ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ */ ++ ++#include <linux/dmaengine.h> ++#include <linux/dma-mapping.h> ++#include <linux/err.h> ++#include <linux/init.h> ++#include <linux/list.h> ++#include <linux/module.h> ++#include <linux/platform_device.h> ++#include <linux/slab.h> ++#include <linux/spinlock.h> ++#include <linux/irq.h> ++#include <linux/of_dma.h> ++#include <linux/reset.h> ++#include <linux/of_device.h> ++ ++#include "virt-dma.h" ++ ++#define HSDMA_BASE_OFFSET 0x800 ++ ++#define HSDMA_REG_TX_BASE 0x00 ++#define HSDMA_REG_TX_CNT 0x04 ++#define HSDMA_REG_TX_CTX 0x08 ++#define HSDMA_REG_TX_DTX 0x0c ++#define HSDMA_REG_RX_BASE 0x100 ++#define HSDMA_REG_RX_CNT 0x104 ++#define HSDMA_REG_RX_CRX 0x108 ++#define HSDMA_REG_RX_DRX 0x10c ++#define HSDMA_REG_INFO 0x200 ++#define HSDMA_REG_GLO_CFG 0x204 ++#define HSDMA_REG_RST_CFG 0x208 ++#define HSDMA_REG_DELAY_INT 0x20c ++#define HSDMA_REG_FREEQ_THRES 0x210 ++#define HSDMA_REG_INT_STATUS 0x220 ++#define HSDMA_REG_INT_MASK 0x228 ++#define HSDMA_REG_SCH_Q01 0x280 ++#define HSDMA_REG_SCH_Q23 0x284 ++ ++#define HSDMA_DESCS_MAX 0xfff ++#define HSDMA_DESCS_NUM 8 ++#define HSDMA_DESCS_MASK (HSDMA_DESCS_NUM - 1) ++#define HSDMA_NEXT_DESC(x) (((x) + 1) & HSDMA_DESCS_MASK) ++ ++/* HSDMA_REG_INFO */ ++#define HSDMA_INFO_INDEX_MASK 0xf ++#define HSDMA_INFO_INDEX_SHIFT 24 ++#define HSDMA_INFO_BASE_MASK 0xff ++#define HSDMA_INFO_BASE_SHIFT 16 ++#define HSDMA_INFO_RX_MASK 0xff ++#define HSDMA_INFO_RX_SHIFT 8 ++#define HSDMA_INFO_TX_MASK 0xff ++#define HSDMA_INFO_TX_SHIFT 0 ++ ++/* HSDMA_REG_GLO_CFG */ ++#define HSDMA_GLO_TX_2B_OFFSET BIT(31) ++#define HSDMA_GLO_CLK_GATE BIT(30) ++#define HSDMA_GLO_BYTE_SWAP BIT(29) ++#define HSDMA_GLO_MULTI_DMA BIT(10) ++#define HSDMA_GLO_TWO_BUF BIT(9) ++#define HSDMA_GLO_32B_DESC BIT(8) ++#define HSDMA_GLO_BIG_ENDIAN BIT(7) ++#define HSDMA_GLO_TX_DONE BIT(6) ++#define HSDMA_GLO_BT_MASK 0x3 ++#define HSDMA_GLO_BT_SHIFT 4 ++#define HSDMA_GLO_RX_BUSY BIT(3) ++#define HSDMA_GLO_RX_DMA BIT(2) ++#define HSDMA_GLO_TX_BUSY BIT(1) ++#define HSDMA_GLO_TX_DMA BIT(0) ++ ++#define HSDMA_BT_SIZE_16BYTES (0 << HSDMA_GLO_BT_SHIFT) ++#define HSDMA_BT_SIZE_32BYTES (1 << HSDMA_GLO_BT_SHIFT) ++#define HSDMA_BT_SIZE_64BYTES (2 << HSDMA_GLO_BT_SHIFT) ++#define HSDMA_BT_SIZE_128BYTES (3 << HSDMA_GLO_BT_SHIFT) ++ ++#define HSDMA_GLO_DEFAULT (HSDMA_GLO_MULTI_DMA | \ ++ HSDMA_GLO_RX_DMA | HSDMA_GLO_TX_DMA | HSDMA_BT_SIZE_32BYTES) ++ ++/* HSDMA_REG_RST_CFG */ ++#define HSDMA_RST_RX_SHIFT 16 ++#define HSDMA_RST_TX_SHIFT 0 ++ ++/* HSDMA_REG_DELAY_INT */ ++#define HSDMA_DELAY_INT_EN BIT(15) ++#define HSDMA_DELAY_PEND_OFFSET 8 ++#define HSDMA_DELAY_TIME_OFFSET 0 ++#define HSDMA_DELAY_TX_OFFSET 16 ++#define HSDMA_DELAY_RX_OFFSET 0 ++ ++#define HSDMA_DELAY_INIT(x) (HSDMA_DELAY_INT_EN | \ ++ ((x) << HSDMA_DELAY_PEND_OFFSET)) ++#define HSDMA_DELAY(x) ((HSDMA_DELAY_INIT(x) << \ ++ HSDMA_DELAY_TX_OFFSET) | HSDMA_DELAY_INIT(x)) ++ ++/* HSDMA_REG_INT_STATUS */ ++#define HSDMA_INT_DELAY_RX_COH BIT(31) ++#define HSDMA_INT_DELAY_RX_INT BIT(30) ++#define HSDMA_INT_DELAY_TX_COH BIT(29) ++#define HSDMA_INT_DELAY_TX_INT BIT(28) ++#define HSDMA_INT_RX_MASK 0x3 ++#define HSDMA_INT_RX_SHIFT 16 ++#define HSDMA_INT_RX_Q0 BIT(16) ++#define HSDMA_INT_TX_MASK 0xf ++#define HSDMA_INT_TX_SHIFT 0 ++#define HSDMA_INT_TX_Q0 BIT(0) ++ ++/* tx/rx dma desc flags */ ++#define HSDMA_PLEN_MASK 0x3fff ++#define HSDMA_DESC_DONE BIT(31) ++#define HSDMA_DESC_LS0 BIT(30) ++#define HSDMA_DESC_PLEN0(_x) (((_x) & HSDMA_PLEN_MASK) << 16) ++#define HSDMA_DESC_TAG BIT(15) ++#define HSDMA_DESC_LS1 BIT(14) ++#define HSDMA_DESC_PLEN1(_x) ((_x) & HSDMA_PLEN_MASK) ++ ++/* align 4 bytes */ ++#define HSDMA_ALIGN_SIZE 3 ++/* align size 128bytes */ ++#define HSDMA_MAX_PLEN 0x3f80 ++ ++struct hsdma_desc { ++ u32 addr0; ++ u32 flags; ++ u32 addr1; ++ u32 unused; ++}; ++ ++struct mtk_hsdma_sg { ++ dma_addr_t src_addr; ++ dma_addr_t dst_addr; ++ u32 len; ++}; ++ ++struct mtk_hsdma_desc { ++ struct virt_dma_desc vdesc; ++ unsigned int num_sgs; ++ struct mtk_hsdma_sg sg[1]; ++}; ++ ++struct mtk_hsdma_chan { ++ struct virt_dma_chan vchan; ++ unsigned int id; ++ dma_addr_t desc_addr; ++ int tx_idx; ++ int rx_idx; ++ struct hsdma_desc *tx_ring; ++ struct hsdma_desc *rx_ring; ++ struct mtk_hsdma_desc *desc; ++ unsigned int next_sg; ++}; ++ ++struct mtk_hsdam_engine { ++ struct dma_device ddev; ++ struct device_dma_parameters dma_parms; ++ void __iomem *base; ++ struct tasklet_struct task; ++ volatile unsigned long chan_issued; ++ ++ struct mtk_hsdma_chan chan[1]; ++}; ++ ++static inline struct mtk_hsdam_engine *mtk_hsdma_chan_get_dev( ++ struct mtk_hsdma_chan *chan) ++{ ++ return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine, ++ ddev); ++} ++ ++static inline struct mtk_hsdma_chan *to_mtk_hsdma_chan(struct dma_chan *c) ++{ ++ return container_of(c, struct mtk_hsdma_chan, vchan.chan); ++} ++ ++static inline struct mtk_hsdma_desc *to_mtk_hsdma_desc( ++ struct virt_dma_desc *vdesc) ++{ ++ return container_of(vdesc, struct mtk_hsdma_desc, vdesc); ++} ++ ++static inline u32 mtk_hsdma_read(struct mtk_hsdam_engine *hsdma, u32 reg) ++{ ++ return readl(hsdma->base + reg); ++} ++ ++static inline void mtk_hsdma_write(struct mtk_hsdam_engine *hsdma, ++ unsigned reg, u32 val) ++{ ++ writel(val, hsdma->base + reg); ++} ++ ++static void mtk_hsdma_reset_chan(struct mtk_hsdam_engine *hsdma, ++ struct mtk_hsdma_chan *chan) ++{ ++ chan->tx_idx = 0; ++ chan->rx_idx = HSDMA_DESCS_NUM - 1; ++ ++ mtk_hsdma_write(hsdma, HSDMA_REG_TX_CTX, chan->tx_idx); ++ mtk_hsdma_write(hsdma, HSDMA_REG_RX_CRX, chan->rx_idx); ++ ++ mtk_hsdma_write(hsdma, HSDMA_REG_RST_CFG, ++ 0x1 << (chan->id + HSDMA_RST_TX_SHIFT)); ++ mtk_hsdma_write(hsdma, HSDMA_REG_RST_CFG, ++ 0x1 << (chan->id + HSDMA_RST_RX_SHIFT)); ++} ++ ++static void hsdma_dump_reg(struct mtk_hsdam_engine *hsdma) ++{ ++ dev_dbg(hsdma->ddev.dev, "tbase %08x, tcnt %08x, " \ ++ "tctx %08x, tdtx: %08x, rbase %08x, " \ ++ "rcnt %08x, rctx %08x, rdtx %08x\n", ++ mtk_hsdma_read(hsdma, HSDMA_REG_TX_BASE), ++ mtk_hsdma_read(hsdma, HSDMA_REG_TX_CNT), ++ mtk_hsdma_read(hsdma, HSDMA_REG_TX_CTX), ++ mtk_hsdma_read(hsdma, HSDMA_REG_TX_DTX), ++ mtk_hsdma_read(hsdma, HSDMA_REG_RX_BASE), ++ mtk_hsdma_read(hsdma, HSDMA_REG_RX_CNT), ++ mtk_hsdma_read(hsdma, HSDMA_REG_RX_CRX), ++ mtk_hsdma_read(hsdma, HSDMA_REG_RX_DRX)); ++ ++ dev_dbg(hsdma->ddev.dev, "info %08x, glo %08x, delay %08x, " \ ++ "intr_stat %08x, intr_mask %08x\n", ++ mtk_hsdma_read(hsdma, HSDMA_REG_INFO), ++ mtk_hsdma_read(hsdma, HSDMA_REG_GLO_CFG), ++ mtk_hsdma_read(hsdma, HSDMA_REG_DELAY_INT), ++ mtk_hsdma_read(hsdma, HSDMA_REG_INT_STATUS), ++ mtk_hsdma_read(hsdma, HSDMA_REG_INT_MASK)); ++} ++ ++static void hsdma_dump_desc(struct mtk_hsdam_engine *hsdma, ++ struct mtk_hsdma_chan *chan) ++{ ++ struct hsdma_desc *tx_desc; ++ struct hsdma_desc *rx_desc; ++ int i; ++ ++ dev_dbg(hsdma->ddev.dev, "tx idx: %d, rx idx: %d\n", ++ chan->tx_idx, chan->rx_idx); ++ ++ for (i = 0; i < HSDMA_DESCS_NUM; i++) { ++ tx_desc = &chan->tx_ring[i]; ++ rx_desc = &chan->rx_ring[i]; ++ ++ dev_dbg(hsdma->ddev.dev, "%d tx addr0: %08x, flags %08x, " \ ++ "tx addr1: %08x, rx addr0 %08x, flags %08x\n", ++ i, tx_desc->addr0, tx_desc->flags, \ ++ tx_desc->addr1, rx_desc->addr0, rx_desc->flags); ++ } ++} ++ ++static void mtk_hsdma_reset(struct mtk_hsdam_engine *hsdma, ++ struct mtk_hsdma_chan *chan) ++{ ++ int i; ++ ++ /* disable dma */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_GLO_CFG, 0); ++ ++ /* disable intr */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_INT_MASK, 0); ++ ++ /* init desc value */ ++ for (i = 0; i < HSDMA_DESCS_NUM; i++) { ++ chan->tx_ring[i].addr0 = 0; ++ chan->tx_ring[i].flags = HSDMA_DESC_LS0 | ++ HSDMA_DESC_DONE; ++ } ++ for (i = 0; i < HSDMA_DESCS_NUM; i++) { ++ chan->rx_ring[i].addr0 = 0; ++ chan->rx_ring[i].flags = 0; ++ } ++ ++ /* reset */ ++ mtk_hsdma_reset_chan(hsdma, chan); ++ ++ /* enable intr */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_INT_MASK, HSDMA_INT_RX_Q0); ++ ++ /* enable dma */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_GLO_CFG, HSDMA_GLO_DEFAULT); ++} ++ ++static int mtk_hsdma_terminate_all(struct dma_chan *c) ++{ ++ struct mtk_hsdma_chan *chan = to_mtk_hsdma_chan(c); ++ struct mtk_hsdam_engine *hsdma = mtk_hsdma_chan_get_dev(chan); ++ unsigned long timeout; ++ LIST_HEAD(head); ++ ++ spin_lock_bh(&chan->vchan.lock); ++ chan->desc = NULL; ++ clear_bit(chan->id, &hsdma->chan_issued); ++ vchan_get_all_descriptors(&chan->vchan, &head); ++ spin_unlock_bh(&chan->vchan.lock); ++ ++ vchan_dma_desc_free_list(&chan->vchan, &head); ++ ++ /* wait dma transfer complete */ ++ timeout = jiffies + msecs_to_jiffies(2000); ++ while (mtk_hsdma_read(hsdma, HSDMA_REG_GLO_CFG) & ++ (HSDMA_GLO_RX_BUSY | HSDMA_GLO_TX_BUSY)) { ++ if (time_after_eq(jiffies, timeout)) { ++ hsdma_dump_desc(hsdma, chan); ++ mtk_hsdma_reset(hsdma, chan); ++ dev_err(hsdma->ddev.dev, "timeout, reset it\n"); ++ break; ++ } ++ cpu_relax(); ++ } ++ ++ return 0; ++} ++ ++static int mtk_hsdma_start_transfer(struct mtk_hsdam_engine *hsdma, ++ struct mtk_hsdma_chan *chan) ++{ ++ dma_addr_t src, dst; ++ size_t len, tlen; ++ struct hsdma_desc *tx_desc, *rx_desc; ++ struct mtk_hsdma_sg *sg; ++ unsigned int i; ++ int rx_idx; ++ ++ sg = &chan->desc->sg[0]; ++ len = sg->len; ++ chan->desc->num_sgs = DIV_ROUND_UP(len, HSDMA_MAX_PLEN); ++ ++ /* tx desc */ ++ src = sg->src_addr; ++ for (i = 0; i < chan->desc->num_sgs; i++) { ++ if (len > HSDMA_MAX_PLEN) ++ tlen = HSDMA_MAX_PLEN; ++ else ++ tlen = len; ++ ++ if (i & 0x1) { ++ tx_desc->addr1 = src; ++ tx_desc->flags |= HSDMA_DESC_PLEN1(tlen); ++ } else { ++ tx_desc = &chan->tx_ring[chan->tx_idx]; ++ tx_desc->addr0 = src; ++ tx_desc->flags = HSDMA_DESC_PLEN0(tlen); ++ ++ /* update index */ ++ chan->tx_idx = HSDMA_NEXT_DESC(chan->tx_idx); ++ } ++ ++ src += tlen; ++ len -= tlen; ++ } ++ if (i & 0x1) ++ tx_desc->flags |= HSDMA_DESC_LS0; ++ else ++ tx_desc->flags |= HSDMA_DESC_LS1; ++ ++ /* rx desc */ ++ rx_idx = HSDMA_NEXT_DESC(chan->rx_idx); ++ len = sg->len; ++ dst = sg->dst_addr; ++ for (i = 0; i < chan->desc->num_sgs; i++) { ++ rx_desc = &chan->rx_ring[rx_idx]; ++ if (len > HSDMA_MAX_PLEN) ++ tlen = HSDMA_MAX_PLEN; ++ else ++ tlen = len; ++ ++ rx_desc->addr0 = dst; ++ rx_desc->flags = HSDMA_DESC_PLEN0(tlen); ++ ++ dst += tlen; ++ len -= tlen; ++ ++ /* update index */ ++ rx_idx = HSDMA_NEXT_DESC(rx_idx); ++ } ++ ++ /* make sure desc and index all up to date */ ++ wmb(); ++ mtk_hsdma_write(hsdma, HSDMA_REG_TX_CTX, chan->tx_idx); ++ ++ return 0; ++} ++ ++static int gdma_next_desc(struct mtk_hsdma_chan *chan) ++{ ++ struct virt_dma_desc *vdesc; ++ ++ vdesc = vchan_next_desc(&chan->vchan); ++ if (!vdesc) { ++ chan->desc = NULL; ++ return 0; ++ } ++ chan->desc = to_mtk_hsdma_desc(vdesc); ++ chan->next_sg = 0; ++ ++ return 1; ++} ++ ++static void mtk_hsdma_chan_done(struct mtk_hsdam_engine *hsdma, ++ struct mtk_hsdma_chan *chan) ++{ ++ struct mtk_hsdma_desc *desc; ++ int chan_issued; ++ ++ chan_issued = 0; ++ spin_lock_bh(&chan->vchan.lock); ++ desc = chan->desc; ++ if (likely(desc)) { ++ if (chan->next_sg == desc->num_sgs) { ++ list_del(&desc->vdesc.node); ++ vchan_cookie_complete(&desc->vdesc); ++ chan_issued = gdma_next_desc(chan); ++ } ++ } else ++ dev_dbg(hsdma->ddev.dev, "no desc to complete\n"); ++ ++ if (chan_issued) ++ set_bit(chan->id, &hsdma->chan_issued); ++ spin_unlock_bh(&chan->vchan.lock); ++} ++ ++static irqreturn_t mtk_hsdma_irq(int irq, void *devid) ++{ ++ struct mtk_hsdam_engine *hsdma = devid; ++ u32 status; ++ ++ status = mtk_hsdma_read(hsdma, HSDMA_REG_INT_STATUS); ++ if (unlikely(!status)) ++ return IRQ_NONE; ++ ++ if (likely(status & HSDMA_INT_RX_Q0)) ++ tasklet_schedule(&hsdma->task); ++ else ++ dev_dbg(hsdma->ddev.dev, "unhandle irq status %08x\n", ++ status); ++ /* clean intr bits */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_INT_STATUS, status); ++ ++ return IRQ_HANDLED; ++} ++ ++static void mtk_hsdma_issue_pending(struct dma_chan *c) ++{ ++ struct mtk_hsdma_chan *chan = to_mtk_hsdma_chan(c); ++ struct mtk_hsdam_engine *hsdma = mtk_hsdma_chan_get_dev(chan); ++ ++ spin_lock_bh(&chan->vchan.lock); ++ if (vchan_issue_pending(&chan->vchan) && !chan->desc) { ++ if (gdma_next_desc(chan)) { ++ set_bit(chan->id, &hsdma->chan_issued); ++ tasklet_schedule(&hsdma->task); ++ } else ++ dev_dbg(hsdma->ddev.dev, "no desc to issue\n"); ++ } ++ spin_unlock_bh(&chan->vchan.lock); ++} ++ ++static struct dma_async_tx_descriptor * mtk_hsdma_prep_dma_memcpy( ++ struct dma_chan *c, dma_addr_t dest, dma_addr_t src, ++ size_t len, unsigned long flags) ++{ ++ struct mtk_hsdma_chan *chan = to_mtk_hsdma_chan(c); ++ struct mtk_hsdma_desc *desc; ++ ++ if (len <= 0) ++ return NULL; ++ ++ desc = kzalloc(sizeof(struct mtk_hsdma_desc), GFP_ATOMIC); ++ if (!desc) { ++ dev_err(c->device->dev, "alloc memcpy decs error\n"); ++ return NULL; ++ } ++ ++ desc->sg[0].src_addr = src; ++ desc->sg[0].dst_addr = dest; ++ desc->sg[0].len = len; ++ ++ return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); ++} ++ ++static enum dma_status mtk_hsdma_tx_status(struct dma_chan *c, ++ dma_cookie_t cookie, struct dma_tx_state *state) ++{ ++ return dma_cookie_status(c, cookie, state); ++} ++ ++static void mtk_hsdma_free_chan_resources(struct dma_chan *c) ++{ ++ vchan_free_chan_resources(to_virt_chan(c)); ++} ++ ++static void mtk_hsdma_desc_free(struct virt_dma_desc *vdesc) ++{ ++ kfree(container_of(vdesc, struct mtk_hsdma_desc, vdesc)); ++} ++ ++static void mtk_hsdma_tx(struct mtk_hsdam_engine *hsdma) ++{ ++ struct mtk_hsdma_chan *chan; ++ ++ if (test_and_clear_bit(0, &hsdma->chan_issued)) { ++ chan = &hsdma->chan[0]; ++ if (chan->desc) { ++ mtk_hsdma_start_transfer(hsdma, chan); ++ } else ++ dev_dbg(hsdma->ddev.dev,"chan 0 no desc to issue\n"); ++ } ++} ++ ++static void mtk_hsdma_rx(struct mtk_hsdam_engine *hsdma) ++{ ++ struct mtk_hsdma_chan *chan; ++ int next_idx, drx_idx, cnt; ++ ++ chan = &hsdma->chan[0]; ++ next_idx = HSDMA_NEXT_DESC(chan->rx_idx); ++ drx_idx = mtk_hsdma_read(hsdma, HSDMA_REG_RX_DRX); ++ ++ cnt = (drx_idx - next_idx) & HSDMA_DESCS_MASK; ++ if (!cnt) ++ return; ++ ++ chan->next_sg += cnt; ++ chan->rx_idx = (chan->rx_idx + cnt) & HSDMA_DESCS_MASK; ++ ++ /* update rx crx */ ++ wmb(); ++ mtk_hsdma_write(hsdma, HSDMA_REG_RX_CRX, chan->rx_idx); ++ ++ mtk_hsdma_chan_done(hsdma, chan); ++} ++ ++static void mtk_hsdma_tasklet(unsigned long arg) ++{ ++ struct mtk_hsdam_engine *hsdma = (struct mtk_hsdam_engine *)arg; ++ ++ mtk_hsdma_rx(hsdma); ++ mtk_hsdma_tx(hsdma); ++} ++ ++static int mtk_hsdam_alloc_desc(struct mtk_hsdam_engine *hsdma, ++ struct mtk_hsdma_chan *chan) ++{ ++ int i; ++ ++ chan->tx_ring = dma_alloc_coherent(hsdma->ddev.dev, ++ 2 * HSDMA_DESCS_NUM * sizeof(*chan->tx_ring), ++ &chan->desc_addr, GFP_ATOMIC | __GFP_ZERO); ++ if (!chan->tx_ring) ++ goto no_mem; ++ ++ chan->rx_ring = &chan->tx_ring[HSDMA_DESCS_NUM]; ++ ++ /* init tx ring value */ ++ for (i = 0; i < HSDMA_DESCS_NUM; i++) ++ chan->tx_ring[i].flags = HSDMA_DESC_LS0 | HSDMA_DESC_DONE; ++ ++ return 0; ++no_mem: ++ return -ENOMEM; ++} ++ ++static void mtk_hsdam_free_desc(struct mtk_hsdam_engine *hsdma, ++ struct mtk_hsdma_chan *chan) ++{ ++ if (chan->tx_ring) { ++ dma_free_coherent(hsdma->ddev.dev, ++ 2 * HSDMA_DESCS_NUM * sizeof(*chan->tx_ring), ++ chan->tx_ring, chan->desc_addr); ++ chan->tx_ring = NULL; ++ chan->rx_ring = NULL; ++ } ++} ++ ++static int mtk_hsdma_init(struct mtk_hsdam_engine *hsdma) ++{ ++ struct mtk_hsdma_chan *chan; ++ int ret; ++ u32 reg; ++ ++ /* init desc */ ++ chan = &hsdma->chan[0]; ++ ret = mtk_hsdam_alloc_desc(hsdma, chan); ++ if (ret) ++ return ret; ++ ++ /* tx */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_TX_BASE, chan->desc_addr); ++ mtk_hsdma_write(hsdma, HSDMA_REG_TX_CNT, HSDMA_DESCS_NUM); ++ /* rx */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_RX_BASE, chan->desc_addr + ++ (sizeof(struct hsdma_desc) * HSDMA_DESCS_NUM)); ++ mtk_hsdma_write(hsdma, HSDMA_REG_RX_CNT, HSDMA_DESCS_NUM); ++ /* reset */ ++ mtk_hsdma_reset_chan(hsdma, chan); ++ ++ /* enable rx intr */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_INT_MASK, HSDMA_INT_RX_Q0); ++ ++ /* enable dma */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_GLO_CFG, HSDMA_GLO_DEFAULT); ++ ++ /* hardware info */ ++ reg = mtk_hsdma_read(hsdma, HSDMA_REG_INFO); ++ dev_info(hsdma->ddev.dev, "rx: %d, tx: %d\n", ++ (reg >> HSDMA_INFO_RX_SHIFT) & HSDMA_INFO_RX_MASK, ++ (reg >> HSDMA_INFO_TX_SHIFT) & HSDMA_INFO_TX_MASK); ++ ++ hsdma_dump_reg(hsdma); ++ ++ return ret; ++} ++ ++static void mtk_hsdma_uninit(struct mtk_hsdam_engine *hsdma) ++{ ++ struct mtk_hsdma_chan *chan; ++ ++ /* disable dma */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_GLO_CFG, 0); ++ ++ /* disable intr */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_INT_MASK, 0); ++ ++ /* free desc */ ++ chan = &hsdma->chan[0]; ++ mtk_hsdam_free_desc(hsdma, chan); ++ ++ /* tx */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_TX_BASE, 0); ++ mtk_hsdma_write(hsdma, HSDMA_REG_TX_CNT, 0); ++ /* rx */ ++ mtk_hsdma_write(hsdma, HSDMA_REG_RX_BASE, 0); ++ mtk_hsdma_write(hsdma, HSDMA_REG_RX_CNT, 0); ++ /* reset */ ++ mtk_hsdma_reset_chan(hsdma, chan); ++} ++ ++static const struct of_device_id mtk_hsdma_of_match[] = { ++ { .compatible = "mediatek,mt7621-hsdma" }, ++ { }, ++}; ++ ++static int mtk_hsdma_probe(struct platform_device *pdev) ++{ ++ const struct of_device_id *match; ++ struct mtk_hsdma_chan *chan; ++ struct mtk_hsdam_engine *hsdma; ++ struct dma_device *dd; ++ struct resource *res; ++ int ret; ++ int irq; ++ void __iomem *base; ++ ++ ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); ++ if (ret) ++ return ret; ++ ++ match = of_match_device(mtk_hsdma_of_match, &pdev->dev); ++ if (!match) ++ return -EINVAL; ++ ++ hsdma = devm_kzalloc(&pdev->dev, sizeof(*hsdma), GFP_KERNEL); ++ if (!hsdma) { ++ dev_err(&pdev->dev, "alloc dma device failed\n"); ++ return -EINVAL; ++ } ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ base = devm_ioremap_resource(&pdev->dev, res); ++ if (IS_ERR(base)) ++ return PTR_ERR(base); ++ hsdma->base = base + HSDMA_BASE_OFFSET; ++ tasklet_init(&hsdma->task, mtk_hsdma_tasklet, (unsigned long)hsdma); ++ ++ irq = platform_get_irq(pdev, 0); ++ if (irq < 0) { ++ dev_err(&pdev->dev, "failed to get irq\n"); ++ return -EINVAL; ++ } ++ ret = devm_request_irq(&pdev->dev, irq, mtk_hsdma_irq, ++ 0, dev_name(&pdev->dev), hsdma); ++ if (ret) { ++ dev_err(&pdev->dev, "failed to request irq\n"); ++ return ret; ++ } ++ ++ device_reset(&pdev->dev); ++ ++ dd = &hsdma->ddev; ++ dma_cap_set(DMA_MEMCPY, dd->cap_mask); ++ dd->copy_align = HSDMA_ALIGN_SIZE; ++ dd->device_free_chan_resources = mtk_hsdma_free_chan_resources; ++ dd->device_prep_dma_memcpy = mtk_hsdma_prep_dma_memcpy; ++ dd->device_terminate_all = mtk_hsdma_terminate_all; ++ dd->device_tx_status = mtk_hsdma_tx_status; ++ dd->device_issue_pending = mtk_hsdma_issue_pending; ++ dd->dev = &pdev->dev; ++ dd->dev->dma_parms = &hsdma->dma_parms; ++ dma_set_max_seg_size(dd->dev, HSDMA_MAX_PLEN); ++ INIT_LIST_HEAD(&dd->channels); ++ ++ chan = &hsdma->chan[0]; ++ chan->id = 0; ++ chan->vchan.desc_free = mtk_hsdma_desc_free; ++ vchan_init(&chan->vchan, dd); ++ ++ /* init hardware */ ++ ret = mtk_hsdma_init(hsdma); ++ if (ret) { ++ dev_err(&pdev->dev, "failed to alloc ring descs\n"); ++ return ret; ++ } ++ ++ ret = dma_async_device_register(dd); ++ if (ret) { ++ dev_err(&pdev->dev, "failed to register dma device\n"); ++ return ret; ++ } ++ ++ ret = of_dma_controller_register(pdev->dev.of_node, ++ of_dma_xlate_by_chan_id, hsdma); ++ if (ret) { ++ dev_err(&pdev->dev, "failed to register of dma controller\n"); ++ goto err_unregister; ++ } ++ ++ platform_set_drvdata(pdev, hsdma); ++ ++ return 0; ++ ++err_unregister: ++ dma_async_device_unregister(dd); ++ return ret; ++} ++ ++static int mtk_hsdma_remove(struct platform_device *pdev) ++{ ++ struct mtk_hsdam_engine *hsdma = platform_get_drvdata(pdev); ++ ++ mtk_hsdma_uninit(hsdma); ++ ++ of_dma_controller_free(pdev->dev.of_node); ++ dma_async_device_unregister(&hsdma->ddev); ++ ++ return 0; ++} ++ ++static struct platform_driver mtk_hsdma_driver = { ++ .probe = mtk_hsdma_probe, ++ .remove = mtk_hsdma_remove, ++ .driver = { ++ .name = "hsdma-mt7621", ++ .of_match_table = mtk_hsdma_of_match, ++ }, ++}; ++module_platform_driver(mtk_hsdma_driver); ++ ++MODULE_AUTHOR("Michael Lee <igvtee@gmail.com>"); ++MODULE_DESCRIPTION("MTK HSDMA driver"); ++MODULE_LICENSE("GPL v2"); diff --git a/target/linux/ramips/patches-4.4/0082-MIPS-ralink-fix-MT7628-pinmux-typos.patch b/target/linux/ramips/patches-4.4/0082-MIPS-ralink-fix-MT7628-pinmux-typos.patch new file mode 100644 index 0000000000..d57630ecd5 --- /dev/null +++ b/target/linux/ramips/patches-4.4/0082-MIPS-ralink-fix-MT7628-pinmux-typos.patch @@ -0,0 +1,32 @@ +From d7146829c9da24e285cb1b1f2156b5b3e2d40c07 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com> +Date: Thu, 19 May 2016 22:07:34 +0200 +Subject: [PATCH] MIPS: ralink: fix MT7628 pinmux typos +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Ãlvaro Fernández Rojas <noltari@gmail.com> +Cc: john@phrozen.org +Cc: linux-mips@linux-mips.org +Cc: linux-kernel@vger.kernel.org +Patchwork: https://patchwork.linux-mips.org/patch/13306/ +Signed-off-by: Ralf Baechle <ralf@linux-mips.org> +--- + arch/mips/ralink/mt7620.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/mips/ralink/mt7620.c ++++ b/arch/mips/ralink/mt7620.c +@@ -223,9 +223,9 @@ static struct rt2880_pmx_func wled_an_gr + #define MT7628_GPIO_MODE_GPIO 0 + + static struct rt2880_pmx_group mt7628an_pinmux_data[] = { +- GRP_G("pmw1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ GRP_G("pwm1", pwm1_grp_mt7628, MT7628_GPIO_MODE_MASK, + 1, MT7628_GPIO_MODE_PWM1), +- GRP_G("pmw0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ GRP_G("pwm0", pwm0_grp_mt7628, MT7628_GPIO_MODE_MASK, + 1, MT7628_GPIO_MODE_PWM0), + GRP_G("uart2", uart2_grp_mt7628, MT7628_GPIO_MODE_MASK, + 1, MT7628_GPIO_MODE_UART2), diff --git a/target/linux/ramips/patches-4.4/0083-MIPS-ralink-fix-MT7628-wled_an-pinmux-gpio.patch b/target/linux/ramips/patches-4.4/0083-MIPS-ralink-fix-MT7628-wled_an-pinmux-gpio.patch new file mode 100644 index 0000000000..2e3c231322 --- /dev/null +++ b/target/linux/ramips/patches-4.4/0083-MIPS-ralink-fix-MT7628-wled_an-pinmux-gpio.patch @@ -0,0 +1,35 @@ +From 07b50db6e685172a41b9978aebffb2438166d9b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com> +Date: Thu, 19 May 2016 22:07:35 +0200 +Subject: [PATCH] MIPS: ralink: fix MT7628 wled_an pinmux gpio +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Ãlvaro Fernández Rojas <noltari@gmail.com> +Cc: john@phrozen.org +Cc: linux-mips@linux-mips.org +Cc: linux-kernel@vger.kernel.org +Patchwork: https://patchwork.linux-mips.org/patch/13307/ +Signed-off-by: Ralf Baechle <ralf@linux-mips.org> +--- + arch/mips/ralink/mt7620.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/mips/ralink/mt7620.c ++++ b/arch/mips/ralink/mt7620.c +@@ -196,10 +196,10 @@ static struct rt2880_pmx_func wled_kn_gr + }; + + static struct rt2880_pmx_func wled_an_grp_mt7628[] = { +- FUNC("rsvd", 3, 35, 1), +- FUNC("rsvd", 2, 35, 1), +- FUNC("gpio", 1, 35, 1), +- FUNC("wled_an", 0, 35, 1), ++ FUNC("rsvd", 3, 44, 1), ++ FUNC("rsvd", 2, 44, 1), ++ FUNC("gpio", 1, 44, 1), ++ FUNC("wled_an", 0, 44, 1), + }; + + #define MT7628_GPIO_MODE_MASK 0x3 diff --git a/target/linux/ramips/patches-4.4/0084-MIPS-ralink-add-MT7628-EPHY-LEDs-pinmux-support.patch b/target/linux/ramips/patches-4.4/0084-MIPS-ralink-add-MT7628-EPHY-LEDs-pinmux-support.patch new file mode 100644 index 0000000000..b22f99ddd1 --- /dev/null +++ b/target/linux/ramips/patches-4.4/0084-MIPS-ralink-add-MT7628-EPHY-LEDs-pinmux-support.patch @@ -0,0 +1,151 @@ +From 2b436a351803f38d0c8ca9c26103472c8aaeb599 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com> +Date: Thu, 19 May 2016 22:07:36 +0200 +Subject: [PATCH] MIPS: ralink: add MT7628 EPHY LEDs pinmux support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Ãlvaro Fernández Rojas <noltari@gmail.com> +Cc: john@phrozen.org +Cc: linux-mips@linux-mips.org +Cc: linux-kernel@vger.kernel.org +Patchwork: https://patchwork.linux-mips.org/patch/13308/ +Signed-off-by: Ralf Baechle <ralf@linux-mips.org> +--- + arch/mips/ralink/mt7620.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 100 insertions(+) + +--- a/arch/mips/ralink/mt7620.c ++++ b/arch/mips/ralink/mt7620.c +@@ -188,6 +188,41 @@ static struct rt2880_pmx_func gpio_grp_m + FUNC("gpio", 0, 11, 1), + }; + ++static struct rt2880_pmx_func p4led_kn_grp_mt7628[] = { ++ FUNC("jtag", 3, 30, 1), ++ FUNC("util", 2, 30, 1), ++ FUNC("gpio", 1, 30, 1), ++ FUNC("p4led_kn", 0, 30, 1), ++}; ++ ++static struct rt2880_pmx_func p3led_kn_grp_mt7628[] = { ++ FUNC("jtag", 3, 31, 1), ++ FUNC("util", 2, 31, 1), ++ FUNC("gpio", 1, 31, 1), ++ FUNC("p3led_kn", 0, 31, 1), ++}; ++ ++static struct rt2880_pmx_func p2led_kn_grp_mt7628[] = { ++ FUNC("jtag", 3, 32, 1), ++ FUNC("util", 2, 32, 1), ++ FUNC("gpio", 1, 32, 1), ++ FUNC("p2led_kn", 0, 32, 1), ++}; ++ ++static struct rt2880_pmx_func p1led_kn_grp_mt7628[] = { ++ FUNC("jtag", 3, 33, 1), ++ FUNC("util", 2, 33, 1), ++ FUNC("gpio", 1, 33, 1), ++ FUNC("p1led_kn", 0, 33, 1), ++}; ++ ++static struct rt2880_pmx_func p0led_kn_grp_mt7628[] = { ++ FUNC("jtag", 3, 34, 1), ++ FUNC("rsvd", 2, 34, 1), ++ FUNC("gpio", 1, 34, 1), ++ FUNC("p0led_kn", 0, 34, 1), ++}; ++ + static struct rt2880_pmx_func wled_kn_grp_mt7628[] = { + FUNC("rsvd", 3, 35, 1), + FUNC("rsvd", 2, 35, 1), +@@ -195,6 +230,41 @@ static struct rt2880_pmx_func wled_kn_gr + FUNC("wled_kn", 0, 35, 1), + }; + ++static struct rt2880_pmx_func p4led_an_grp_mt7628[] = { ++ FUNC("jtag", 3, 39, 1), ++ FUNC("util", 2, 39, 1), ++ FUNC("gpio", 1, 39, 1), ++ FUNC("p4led_an", 0, 39, 1), ++}; ++ ++static struct rt2880_pmx_func p3led_an_grp_mt7628[] = { ++ FUNC("jtag", 3, 40, 1), ++ FUNC("util", 2, 40, 1), ++ FUNC("gpio", 1, 40, 1), ++ FUNC("p3led_an", 0, 40, 1), ++}; ++ ++static struct rt2880_pmx_func p2led_an_grp_mt7628[] = { ++ FUNC("jtag", 3, 41, 1), ++ FUNC("util", 2, 41, 1), ++ FUNC("gpio", 1, 41, 1), ++ FUNC("p2led_an", 0, 41, 1), ++}; ++ ++static struct rt2880_pmx_func p1led_an_grp_mt7628[] = { ++ FUNC("jtag", 3, 42, 1), ++ FUNC("util", 2, 42, 1), ++ FUNC("gpio", 1, 42, 1), ++ FUNC("p1led_an", 0, 42, 1), ++}; ++ ++static struct rt2880_pmx_func p0led_an_grp_mt7628[] = { ++ FUNC("jtag", 3, 43, 1), ++ FUNC("rsvd", 2, 43, 1), ++ FUNC("gpio", 1, 43, 1), ++ FUNC("p0led_an", 0, 43, 1), ++}; ++ + static struct rt2880_pmx_func wled_an_grp_mt7628[] = { + FUNC("rsvd", 3, 44, 1), + FUNC("rsvd", 2, 44, 1), +@@ -204,7 +274,17 @@ static struct rt2880_pmx_func wled_an_gr + + #define MT7628_GPIO_MODE_MASK 0x3 + ++#define MT7628_GPIO_MODE_P4LED_KN 58 ++#define MT7628_GPIO_MODE_P3LED_KN 56 ++#define MT7628_GPIO_MODE_P2LED_KN 54 ++#define MT7628_GPIO_MODE_P1LED_KN 52 ++#define MT7628_GPIO_MODE_P0LED_KN 50 + #define MT7628_GPIO_MODE_WLED_KN 48 ++#define MT7628_GPIO_MODE_P4LED_AN 42 ++#define MT7628_GPIO_MODE_P3LED_AN 40 ++#define MT7628_GPIO_MODE_P2LED_AN 38 ++#define MT7628_GPIO_MODE_P1LED_AN 36 ++#define MT7628_GPIO_MODE_P0LED_AN 34 + #define MT7628_GPIO_MODE_WLED_AN 32 + #define MT7628_GPIO_MODE_PWM1 30 + #define MT7628_GPIO_MODE_PWM0 28 +@@ -251,8 +331,28 @@ static struct rt2880_pmx_group mt7628an_ + 1, MT7628_GPIO_MODE_GPIO), + GRP_G("wled_an", wled_an_grp_mt7628, MT7628_GPIO_MODE_MASK, + 1, MT7628_GPIO_MODE_WLED_AN), ++ GRP_G("p0led_an", p0led_an_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P0LED_AN), ++ GRP_G("p1led_an", p1led_an_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P1LED_AN), ++ GRP_G("p2led_an", p2led_an_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P2LED_AN), ++ GRP_G("p3led_an", p3led_an_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P3LED_AN), ++ GRP_G("p4led_an", p4led_an_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P4LED_AN), + GRP_G("wled_kn", wled_kn_grp_mt7628, MT7628_GPIO_MODE_MASK, + 1, MT7628_GPIO_MODE_WLED_KN), ++ GRP_G("p0led_kn", p0led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P0LED_KN), ++ GRP_G("p1led_kn", p1led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P1LED_KN), ++ GRP_G("p2led_kn", p2led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P2LED_KN), ++ GRP_G("p3led_kn", p3led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P3LED_KN), ++ GRP_G("p4led_kn", p4led_kn_grp_mt7628, MT7628_GPIO_MODE_MASK, ++ 1, MT7628_GPIO_MODE_P4LED_KN), + { 0 } + }; + diff --git a/target/linux/ramips/patches-4.4/0501-net-next-mediatek-add-the-drivers-core-files.patch b/target/linux/ramips/patches-4.4/0501-net-next-mediatek-add-the-drivers-core-files.patch index abefb4566d..cc4c2a152d 100644 --- a/target/linux/ramips/patches-4.4/0501-net-next-mediatek-add-the-drivers-core-files.patch +++ b/target/linux/ramips/patches-4.4/0501-net-next-mediatek-add-the-drivers-core-files.patch @@ -600,7 +600,7 @@ Signed-off-by: Michael Lee <igvtee@gmail.com> +#endif --- /dev/null +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -0,0 +1,1607 @@ +@@ -0,0 +1,1587 @@ +/* This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License @@ -1400,20 +1400,6 @@ Signed-off-by: Michael Lee <igvtee@gmail.com> + return NETDEV_TX_OK; +} + -+static inline void fe_rx_vlan(struct sk_buff *skb) -+{ -+ struct ethhdr *ehdr; -+ u16 vlanid; -+ -+ if (!__vlan_get_tag(skb, &vlanid)) { -+ /* pop the vlan tag */ -+ ehdr = (struct ethhdr *)skb->data; -+ memmove(skb->data + VLAN_HLEN, ehdr, ETH_ALEN * 2); -+ skb_pull(skb, VLAN_HLEN); -+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlanid); -+ } -+} -+ +static int fe_poll_rx(struct napi_struct *napi, int budget, + struct fe_priv *priv, u32 rx_intr) +{ @@ -1427,7 +1413,6 @@ Signed-off-by: Michael Lee <igvtee@gmail.com> + u8 *data, *new_data; + struct fe_rx_dma *rxd, trxd; + int done = 0, pad; -+ bool rx_vlan = netdev->features & NETIF_F_HW_VLAN_CTAG_RX; + + if (netdev->features & NETIF_F_RXCSUM) + checksum_bit = soc->checksum_bit; @@ -1483,8 +1468,6 @@ Signed-off-by: Michael Lee <igvtee@gmail.com> + skb->ip_summed = CHECKSUM_UNNECESSARY; + else + skb_checksum_none_assert(skb); -+ if (rx_vlan) -+ fe_rx_vlan(skb); + skb->protocol = eth_type_trans(skb, netdev); + + stats->rx_packets++; @@ -2098,10 +2081,7 @@ Signed-off-by: Michael Lee <igvtee@gmail.com> + + if (soc->init_data) + soc->init_data(soc, netdev); -+ /* fake NETIF_F_HW_VLAN_CTAG_RX for good GRO performance */ -+ netdev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX; -+ netdev->vlan_features = netdev->hw_features & -+ ~(NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX); ++ netdev->vlan_features = netdev->hw_features & ~NETIF_F_HW_VLAN_CTAG_TX; + netdev->features |= netdev->hw_features; + + /* fake rx vlan filter func. to support tx vlan offload func */ diff --git a/target/linux/ramips/patches-4.4/0509-net-next-mediatek-add-support-for-mt7621.patch b/target/linux/ramips/patches-4.4/0509-net-next-mediatek-add-support-for-mt7621.patch index 9f32d00b44..6920545f0c 100644 --- a/target/linux/ramips/patches-4.4/0509-net-next-mediatek-add-support-for-mt7621.patch +++ b/target/linux/ramips/patches-4.4/0509-net-next-mediatek-add-support-for-mt7621.patch @@ -21,7 +21,7 @@ Signed-off-by: Michael Lee <igvtee@gmail.com> --- /dev/null +++ b/drivers/net/ethernet/mediatek/soc_mt7621.c -@@ -0,0 +1,186 @@ +@@ -0,0 +1,185 @@ +/* This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License @@ -146,8 +146,7 @@ Signed-off-by: Michael Lee <igvtee@gmail.com> + + /* mt7621 doesn't have txcsum config */ + mt7621_rxcsum_config((dev->features & NETIF_F_RXCSUM)); -+ mt7621_rxvlan_config((dev->features & NETIF_F_HW_VLAN_CTAG_RX) && -+ (priv->flags & FE_FLAG_RX_VLAN_CTAG)); ++ mt7621_rxvlan_config(priv->flags & FE_FLAG_RX_VLAN_CTAG); + + return 0; +} diff --git a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch index bbad8cc523..3076e16400 100644 --- a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch +++ b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch @@ -858,7 +858,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> +#endif --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1308,8 +1308,13 @@ static int __init fe_init(struct net_dev +@@ -1291,8 +1291,13 @@ static int __init fe_init(struct net_dev } err = fe_hw_init(dev); diff --git a/target/linux/ramips/patches-4.4/0601-net-mediatke-add-phy_ethtool_ioctl-support.patch b/target/linux/ramips/patches-4.4/0601-net-mediatke-add-phy_ethtool_ioctl-support.patch index 369afa97de..11cf7ee588 100644 --- a/target/linux/ramips/patches-4.4/0601-net-mediatke-add-phy_ethtool_ioctl-support.patch +++ b/target/linux/ramips/patches-4.4/0601-net-mediatke-add-phy_ethtool_ioctl-support.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1344,6 +1344,9 @@ static int fe_do_ioctl(struct net_device +@@ -1327,6 +1327,9 @@ static int fe_do_ioctl(struct net_device return -ENODEV; switch (cmd) { diff --git a/target/linux/ramips/patches-4.4/0721-asoc-enable-wm8960-kconfig.patch b/target/linux/ramips/patches-4.4/0721-asoc-enable-wm8960-kconfig.patch new file mode 100644 index 0000000000..6272b71607 --- /dev/null +++ b/target/linux/ramips/patches-4.4/0721-asoc-enable-wm8960-kconfig.patch @@ -0,0 +1,11 @@ +--- a/sound/soc/codecs/Kconfig ++++ b/sound/soc/codecs/Kconfig +@@ -825,7 +825,7 @@ config SND_SOC_WM8955 + tristate + + config SND_SOC_WM8960 +- tristate ++ tristate "Wolfson Microelectronics WM8960 CODEC" + + config SND_SOC_WM8961 + tristate diff --git a/target/linux/ramips/rt288x/config-4.4 b/target/linux/ramips/rt288x/config-4.4 index 9c86e80da5..94e4cdde53 100644 --- a/target/linux/ramips/rt288x/config-4.4 +++ b/target/linux/ramips/rt288x/config-4.4 @@ -164,7 +164,6 @@ CONFIG_SCHED_HRTICK=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set # CONFIG_SERIAL_8250_FSL is not set -CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RT288X=y CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_SOC_MT7620 is not set diff --git a/target/linux/ramips/rt288x/profiles/00-default.mk b/target/linux/ramips/rt288x/profiles/00-default.mk deleted file mode 100644 index 583610a65a..0000000000 --- a/target/linux/ramips/rt288x/profiles/00-default.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/Default - NAME:=Default Profile - PACKAGES:=kmod-switch-rtl8366s kmod-swconfig swconfig -endef - -define Profile/Default/Description - Default package set compatible with most boards. -endef -$(eval $(call Profile,Default)) diff --git a/target/linux/ramips/rt288x/profiles/asus.mk b/target/linux/ramips/rt288x/profiles/asus.mk deleted file mode 100644 index aa6fb4d6be..0000000000 --- a/target/linux/ramips/rt288x/profiles/asus.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/RTN15 - NAME:=Asus RT-N15 - PACKAGES:=kmod-switch-rtl8366s kmod-swconfig swconfig -endef - -define Profile/RTN15/Description - Package set for Asus RT-N15 board -endef -$(eval $(call Profile,RTN15)) diff --git a/target/linux/ramips/rt288x/profiles/belkin.mk b/target/linux/ramips/rt288x/profiles/belkin.mk deleted file mode 100644 index 4a0c62dd5e..0000000000 --- a/target/linux/ramips/rt288x/profiles/belkin.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/F5D8235V1 - NAME:=Belkin F5D8235 V1 - PACKAGES:=kmod-switch-rtl8366s kmod-swconfig swconfig -endef - -define Profile/F5D8235V1/Description - Package set for Belkin F5D8235 V1 -endef -$(eval $(call Profile,F5D8235V1)) diff --git a/target/linux/ramips/rt305x/config-4.4 b/target/linux/ramips/rt305x/config-4.4 index 4c14e3724c..9911d9249e 100644 --- a/target/linux/ramips/rt305x/config-4.4 +++ b/target/linux/ramips/rt305x/config-4.4 @@ -166,7 +166,6 @@ CONFIG_SCHED_HRTICK=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set # CONFIG_SERIAL_8250_FSL is not set -CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RT288X=y CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_SOC_MT7620 is not set diff --git a/target/linux/ramips/rt305x/profiles/00-default.mk b/target/linux/ramips/rt305x/profiles/00-default.mk index a905d1ed80..f2d1a52052 100644 --- a/target/linux/ramips/rt305x/profiles/00-default.mk +++ b/target/linux/ramips/rt305x/profiles/00-default.mk @@ -7,6 +7,7 @@ define Profile/Default NAME:=Default Profile + PRIORITY:=1 PACKAGES:=\ kmod-usb-core kmod-usb-dwc2 \ kmod-ledtrig-usbdev diff --git a/target/linux/ramips/rt305x/target.mk b/target/linux/ramips/rt305x/target.mk index b97554fc7c..633925999e 100644 --- a/target/linux/ramips/rt305x/target.mk +++ b/target/linux/ramips/rt305x/target.mk @@ -4,7 +4,6 @@ SUBTARGET:=rt305x BOARDNAME:=RT3x5x/RT5350 based boards -ARCH_PACKAGES:=ramips_24kec FEATURES+=usb ramdisk CPU_TYPE:=24kec CPU_SUBTYPE:=dsp diff --git a/target/linux/ramips/rt3883/config-4.4 b/target/linux/ramips/rt3883/config-4.4 index b25face30c..26f0fd9cdb 100644 --- a/target/linux/ramips/rt3883/config-4.4 +++ b/target/linux/ramips/rt3883/config-4.4 @@ -174,7 +174,6 @@ CONFIG_SCHED_HRTICK=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set # CONFIG_SERIAL_8250_FSL is not set -CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RT288X=y CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_SOC_MT7620 is not set diff --git a/target/linux/ramips/rt3883/profiles/00-default.mk b/target/linux/ramips/rt3883/profiles/00-default.mk index 7007c5d920..c99029d7b1 100644 --- a/target/linux/ramips/rt3883/profiles/00-default.mk +++ b/target/linux/ramips/rt3883/profiles/00-default.mk @@ -7,6 +7,7 @@ define Profile/Default NAME:=Default Profile + PRIORITY:=1 PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig endef diff --git a/target/linux/ramips/rt3883/target.mk b/target/linux/ramips/rt3883/target.mk index 96c9e93a71..7a2cec99a1 100644 --- a/target/linux/ramips/rt3883/target.mk +++ b/target/linux/ramips/rt3883/target.mk @@ -4,7 +4,6 @@ SUBTARGET:=rt3883 BOARDNAME:=RT3662/RT3883 based boards -ARCH_PACKAGES:=ramips_24kec FEATURES+=usb pci CPU_TYPE:=74kc CPU_SUBTYPE:=dsp2 |