diff options
Diffstat (limited to 'target/linux')
4 files changed, 210 insertions, 0 deletions
diff --git a/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts new file mode 100644 index 0000000000..6b4dde5432 --- /dev/null +++ b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620n.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> + +/ { + compatible = "netgear,pr2000", "ralink,mt7620n-soc"; + model = "Netgear PR2000"; + + aliases { + label-mac-device = ðernet; + }; + + leds { + compatible = "gpio-leds"; + + internet { + label = "green:internet"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + }; + + wifi { + label = "green:wifi"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + usb { + label = "green:usb"; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + trigger-sources = <&ohci_port1>, <&ehci_port1>; + linux,default-trigger = "usbport"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + }; + + wireless { + label = "wireless"; + gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; + linux,code = <BTN_0>; + linux,input-type = <EV_SW>; + }; + + wired { + label = "wired"; + gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; + linux,code = <BTN_0>; + linux,input-type = <EV_SW>; + }; + }; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + /* sercomm header for kernel starts at 0x3ffba + * can be safely ignored since not used by OpenWRT + */ + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x40000 0xf20000>; + }; + + factory: partition@f60000 { + label = "factory"; + reg = <0xf60000 0x10000>; + read-only; + }; + + board_data: partition@f70000 { + label = "board_data"; + reg = <0xf70000 0x10000>; + read-only; + }; + + partition@f80000 { + label = "POT"; + reg = <0xf80000 0x10000>; + read-only; + }; + + partition@f90000 { + label = "Traffic Meter"; + reg = <0xf90000 0x10000>; + read-only; + }; + + partition@fa0000 { + label = "Traffic Meter2"; + reg = <0xfa0000 0x10000>; + read-only; + }; + + partition@fb0000 { + label = "nvram"; + reg = <0xfb0000 0x10000>; + }; + + partition@fc0000 { + label = "DPF"; + reg = <0xfc0000 0x10000>; + read-only; + }; + + partition@fd0000 { + label = "ralink_nvram"; + reg = <0xfd0000 0x10000>; + read-only; + }; + + partition@fe0000 { + label = "reserved1"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + partition@ff0000 { + label = "reserved2"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +ðernet { + mtd-mac-address = <&board_data 0xb0>; + mediatek,portmap = "wllll"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0x0>; + mtd-mac-address = <&board_data 0xb0>; +}; + +&state_default { + default { + groups = "ephy", "wled", "pa", "i2c"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index d2a2c90460..b3551fa6cb 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -802,6 +802,21 @@ define Device/netgear_jwnr2010-v5 endef TARGET_DEVICES += netgear_jwnr2010-v5 +define Device/netgear_pr2000 + $(Device/netgear_sercomm_nor) + SOC := mt7620n + BLOCKSIZE := 4k + IMAGE_SIZE := 15488k + DEVICE_MODEL := PR2000 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci + SERCOMM_HWNAME := PR2000 + SERCOMM_HWID := AQ7 + SERCOMM_HWVER := A001 + SERCOMM_SWVER := 0x0000 + SERCOMM_PAD := 640k +endef +TARGET_DEVICES += netgear_pr2000 + define Device/netgear_wn3000rp-v3 SOC := mt7620a IMAGE_SIZE := 7872k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 1293c34cbf..889818c631 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -177,6 +177,9 @@ netgear,jwnr2010-v5) ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x01" ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10" ;; +netgear,pr2000) + ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x01" + ;; phicomm,psg1208) ucidef_set_led_netdev "wifi_led" "wifi" "white:wlan2g" "wlan0" ;; diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index f7bc41669f..7b1766766b 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -202,6 +202,7 @@ ramips_setup_interfaces() ucidef_add_switch "switch1" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;; + netgear,pr2000|\ nexx,wt3020-4m|\ nexx,wt3020-8m) ucidef_add_switch "switch0" \ |