Hi blogic this is a patch is add WRTnode2P and WRTnode2R support by OpenWrt
commit d0f7a56ed622a488926bb1705686b950dea34cce Author: xzmu <x...@wrtnode.com> Date: Thu Dec 24 15:30:07 2015 +0800 add support for WRTnode2P and WRTnode2R add led indicator support for WRTnode platform 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 d7d016b..816a1a7 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -175,6 +175,8 @@ ramips_setup_interfaces() hg255d | \ rt-n14u | \ wrtnode | \ + wrtnode2p | \ + wrtnode2r | \ wt3020 | \ ur-326n4g | \ zbt-wa05) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index a7e2501..d596b8a 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -253,6 +253,11 @@ get_status_led() { zte-q7) status_led="zte:red:status" ;; + wrtnode2r | \ + wrtnode2p | \ + wrtnode) + status_led="wrtnode:blue:indicator" + ;; esac } diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 4141ddd..6c74412 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -391,6 +391,12 @@ ramips_board_detect() { *"WRTNODE") name="wrtnode" ;; + *"WRTnode2R") + name="wrtnode2r" + ;; + *"WRTnode2P") + name="wrtnode2p" + ;; *"Wansview NCS601W") name="ncs601w" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 2f64d8c..0fc5c26 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -119,6 +119,8 @@ platform_check_image() { wr6202 |\ wr8305rt |\ wrtnode |\ + wrtnode2r |\ + wrtnode2p |\ wt1520 |\ wt3020 |\ x5 |\ diff --git a/target/linux/ramips/dts/WRTNODE2P.dts b/target/linux/ramips/dts/WRTNODE2P.dts new file mode 100644 index 0000000..59866dd --- /dev/null +++ b/target/linux/ramips/dts/WRTNODE2P.dts @@ -0,0 +1,99 @@ +/dts-v1/; + +/include/ "mt7628an.dtsi" + +/ { + compatible = "mediatek,wrtnode2p", "mediatek,mt7628an-soc"; + model = "WRTnode2P"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "gpio", "jtag"; + ralink,function = "gpio"; + }; + }; + }; + + palmbus@10000000 { + spi@b00 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q256"; + reg = <0 0>; + linux,modalias = "m25p80", "w25q256"; + 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>; + }; + }; + }; + + uart1@d00 { + status = "okay"; + }; + + }; + + ethernet@10100000 { + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "llllw"; + }; + + sdhci@10130000 { + status = "okay"; + }; + + pcie@10140000 { + status = "okay"; + }; + + gpio-leds { + compatible = "gpio-leds"; + indicator { + label = "wrtnode:blue:indicator"; + gpios = <&gpio1 9 1>; + }; + }; + + 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>; + }; + }; +}; + diff --git a/target/linux/ramips/dts/WRTNODE2R.dts b/target/linux/ramips/dts/WRTNODE2R.dts new file mode 100644 index 0000000..7f383ad --- /dev/null +++ b/target/linux/ramips/dts/WRTNODE2R.dts @@ -0,0 +1,114 @@ +/dts-v1/; + +/include/ "mt7628an.dtsi" + +/ { + compatible = "mediatek,wrtnode2r", "mediatek,mt7628an-soc"; + model = "WRTnode2R"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "gpio", "wled_an"; + ralink,function = "gpio"; + }; + }; + }; + + palmbus@10000000 { + spi@b00 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q256"; + reg = <0 0>; + linux,modalias = "m25p80", "w25q256"; + 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>; + }; + }; + + uart1@d00 { + status = "okay"; + }; + + i2c@900 { + status = "okay"; + }; + + }; + + ethernet@10100000 { + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "llllw"; + }; + + sdhci@10130000 { + status = "okay"; + }; + + pcie@10140000 { + status = "okay"; + }; + + gpio-leds { + compatible = "gpio-leds"; + indicator { + label = "wrtnode:blue:indicator"; + gpios = <&gpio1 12 1>; + }; + }; + + 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>; + }; + }; + +}; + Signed-off-by: xzmu <x...@wrtnode.com> _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel