diff mbox

[OpenWrt-Devel] add support for WRTnode2P and WRTnode2R add led support for wrtnode platform

Message ID 1450947363-24793-1-git-send-email-xzmu@wrtnode.com
State Changes Requested
Headers show

Commit Message

xzmu@wrtnode.com Dec. 24, 2015, 8:56 a.m. UTC
Signed-off-by: xzmu <xzmu@wrtnode.com>
---
 .../linux/ramips/base-files/etc/board.d/02_network |   2 +
 target/linux/ramips/base-files/etc/diag.sh         |   5 +
 target/linux/ramips/base-files/lib/ramips.sh       |   6 ++
 .../ramips/base-files/lib/upgrade/platform.sh      |   2 +
 target/linux/ramips/dts/WRTNODE2P.dts              |  99 ++++++++++++++++++
 target/linux/ramips/dts/WRTNODE2R.dts              | 114 +++++++++++++++++++++
 6 files changed, 228 insertions(+)
 create mode 100644 target/linux/ramips/dts/WRTNODE2P.dts
 create mode 100644 target/linux/ramips/dts/WRTNODE2R.dts

Comments

Piotr Dymacz Dec. 24, 2015, 9:16 a.m. UTC | #1
Hello,

Small comment inline, below.

Plus:
1. This patch is not for trunk, so you should add "CC" prefix in the subject.
2. Both models are very similar, my suggestion is to use common dtsi
(ex. Lenovo Y1).

Cheers,
Piotr

2015-12-24 9:56 GMT+01:00 xzmu <xzmu@wrtnode.com>:
> Signed-off-by: xzmu <xzmu@wrtnode.com>
> ---
>  .../linux/ramips/base-files/etc/board.d/02_network |   2 +
>  target/linux/ramips/base-files/etc/diag.sh         |   5 +
>  target/linux/ramips/base-files/lib/ramips.sh       |   6 ++
>  .../ramips/base-files/lib/upgrade/platform.sh      |   2 +
>  target/linux/ramips/dts/WRTNODE2P.dts              |  99 ++++++++++++++++++
>  target/linux/ramips/dts/WRTNODE2R.dts              | 114 +++++++++++++++++++++
>  6 files changed, 228 insertions(+)
>  create mode 100644 target/linux/ramips/dts/WRTNODE2P.dts
>  create mode 100644 target/linux/ramips/dts/WRTNODE2R.dts
>
> 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"
> +               ;;

Why you didn't follow previous model version naming convention (WRTNODE...)?

>         *"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>;
> +               };
> +       };
> +
> +};
> +
> --
> 2.1.4
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
John Crispin Dec. 24, 2015, 1:19 p.m. UTC | #2
On 24/12/2015 10:16, Piotr Dymacz wrote:
> Hello,
> 
> Small comment inline, below.
> 
> Plus:
> 1. This patch is not for trunk, so you should add "CC" prefix in the subject.

small addition. for us to merge board support into CC it needs to first
be merged into trunk. i cannot accept a patch for CC without the
corresponding patch to trunk

> 2. Both models are very similar, my suggestion is to use common dtsi
> (ex. Lenovo Y1).
> 
> Cheers,
> Piotr
> 
> 2015-12-24 9:56 GMT+01:00 xzmu <xzmu@wrtnode.com>:
>> Signed-off-by: xzmu <xzmu@wrtnode.com>
>> ---
>>  .../linux/ramips/base-files/etc/board.d/02_network |   2 +
>>  target/linux/ramips/base-files/etc/diag.sh         |   5 +
>>  target/linux/ramips/base-files/lib/ramips.sh       |   6 ++
>>  .../ramips/base-files/lib/upgrade/platform.sh      |   2 +
>>  target/linux/ramips/dts/WRTNODE2P.dts              |  99 ++++++++++++++++++
>>  target/linux/ramips/dts/WRTNODE2R.dts              | 114 +++++++++++++++++++++
>>  6 files changed, 228 insertions(+)
>>  create mode 100644 target/linux/ramips/dts/WRTNODE2P.dts
>>  create mode 100644 target/linux/ramips/dts/WRTNODE2R.dts
>>
>> 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"
>> +               ;;
> 
> Why you didn't follow previous model version naming convention (WRTNODE...)?
> 
>>         *"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>;
>> +               };
>> +       };
>> +
>> +};
>> +
>> --
>> 2.1.4
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
diff mbox

Patch

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>;
+		};
+	};
+
+};
+