openwrt/target/linux/mediatek/dts/mt7981b-zyxel-nwa50ax-pro.dts

225 lines
3.7 KiB
Plaintext
Raw Normal View History

mediatek: add support for ZyXEL NWA50AX Pro Hardware -------- CPU: Mediatek MT7981 RAM: 512M DDR4 FLASH: 256M NAND ETH: MaxLinear GPY211 (2.5GbE N Base-T) WiFi: Mediatek MT7981 (2.4GHz 2T2R:2 5GHz 3T3R:2 802.11ax) BTN: 1x Reset LED: 1x Multi-Color UART Console ------------ Available below the rubber cover next to the ethernet port. Settings: 115200 8N1 Layout: <12V> <LAN> GND-RX-TX-VCC Logic-Level is 3V3. Don't connect VCC to your UART adapter! Installation Web-UI ------------------- Upload the Factory image using the devices Web-Interface. As the device uses a dual-image partition layout, OpenWrt can only installed on Slot A. This requires the current active image prior flashing the device to be on Slot B. In case this is not the case, OpenWrt will boot only one time, returning to the ZyXEL firmware the second boot. If this happens, first install a ZyXEL firmware upgrade of any version and install OpenWrt after that. Installation TFTP / Recovery ---------------------------- This installation routine is especially useful in case of a bricked device. Attach to the UART console header of the device. Interrupt the boot procedure by pressing Enter. The bootloader has a reduced command-set available from CLI, but more commands can be executed by abusing the atns command. Boot a OpenWrt initramfs image available on a TFTP server at 192.168.1.66. Rename the image to nwa50axpro-openwrt-initramfs.bin. $ atnf nwa50axpro-openwrt-initramfs.bin $ atna 192.168.1.88 $ atns "192.168.1.66; tftpboot; setenv fdt_high 0xffffffffffffffff; bootm" Upon booting, set the booted image to the correct slot: $ zyxel-bootconfig /dev/mtd9 get-status $ zyxel-bootconfig /dev/mtd9 set-image-status 0 valid $ zyxel-bootconfig /dev/mtd9 set-active-image 0 Copy the OpenWrt sysupgrade image to the device using scp. Write the sysupgrade image to NAND using sysupgrade. $ sysupgrade -n image.bin Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit f0445746f6fd96fc7c5394b238153bd2ff22bc5b)
2023-07-15 16:10:31 +00:00
/dts-v1/;
#include "mt7981.dtsi"
/ {
model = "ZyXEL NWA50AX Pro";
compatible = "zyxel,nwa50ax-pro", "mediatek,mt7981";
aliases {
led-boot = &led_green;
led-failsafe = &led_red;
led-running = &led_green;
led-upgrade = &led_red;
serial0 = &uart0;
label-mac-device = &gmac1;
};
chosen {
stdout-path = "serial0:115200n8";
};
gpio-keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
led_green: led@0 {
label = "green:system";
gpios = <&pio 4 GPIO_ACTIVE_HIGH>;
};
led@1 {
label = "blue:system";
gpios = <&pio 6 GPIO_ACTIVE_HIGH>;
};
led_red: led@2 {
label = "red:system";
gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
};
};
};
&uart0 {
status = "okay";
};
&watchdog {
status = "okay";
};
&eth {
pinctrl-names = "default";
pinctrl-0 = <&mdio_pins>;
status = "okay";
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
phy-mode = "2500base-x";
phy-handle = <&phy0>;
nvmem-cells = <&macaddr_mrd_1fff8>;
nvmem-cell-names = "mac-address";
};
};
&mdio_bus {
reset-gpios = <&pio 12 GPIO_ACTIVE_LOW>;
reset-delay-us = <1500000>;
reset-post-delay-us = <1000000>;
phy0: ethernet-phy@5 {
reg = <5>;
compatible = "ethernet-phy-ieee802.3-c45";
/* LED0: Amber ; LED1: nc ; LED2: nc ; LED3: Green */
mxl,led-config = <0x3b0 0x0 0x0 0x3c0>;
mediatek: add support for ZyXEL NWA50AX Pro Hardware -------- CPU: Mediatek MT7981 RAM: 512M DDR4 FLASH: 256M NAND ETH: MaxLinear GPY211 (2.5GbE N Base-T) WiFi: Mediatek MT7981 (2.4GHz 2T2R:2 5GHz 3T3R:2 802.11ax) BTN: 1x Reset LED: 1x Multi-Color UART Console ------------ Available below the rubber cover next to the ethernet port. Settings: 115200 8N1 Layout: <12V> <LAN> GND-RX-TX-VCC Logic-Level is 3V3. Don't connect VCC to your UART adapter! Installation Web-UI ------------------- Upload the Factory image using the devices Web-Interface. As the device uses a dual-image partition layout, OpenWrt can only installed on Slot A. This requires the current active image prior flashing the device to be on Slot B. In case this is not the case, OpenWrt will boot only one time, returning to the ZyXEL firmware the second boot. If this happens, first install a ZyXEL firmware upgrade of any version and install OpenWrt after that. Installation TFTP / Recovery ---------------------------- This installation routine is especially useful in case of a bricked device. Attach to the UART console header of the device. Interrupt the boot procedure by pressing Enter. The bootloader has a reduced command-set available from CLI, but more commands can be executed by abusing the atns command. Boot a OpenWrt initramfs image available on a TFTP server at 192.168.1.66. Rename the image to nwa50axpro-openwrt-initramfs.bin. $ atnf nwa50axpro-openwrt-initramfs.bin $ atna 192.168.1.88 $ atns "192.168.1.66; tftpboot; setenv fdt_high 0xffffffffffffffff; bootm" Upon booting, set the booted image to the correct slot: $ zyxel-bootconfig /dev/mtd9 get-status $ zyxel-bootconfig /dev/mtd9 set-image-status 0 valid $ zyxel-bootconfig /dev/mtd9 set-active-image 0 Copy the OpenWrt sysupgrade image to the device using scp. Write the sysupgrade image to NAND using sysupgrade. $ sysupgrade -n image.bin Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit f0445746f6fd96fc7c5394b238153bd2ff22bc5b)
2023-07-15 16:10:31 +00:00
};
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
status = "okay";
spi_nand: flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <52000000>;
spi-cal-enable;
spi-cal-mode = "read-data";
spi-cal-datalen = <7>;
spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
spi-cal-addrlen = <5>;
spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
mediatek: add support for ZyXEL NWA50AX Pro Hardware -------- CPU: Mediatek MT7981 RAM: 512M DDR4 FLASH: 256M NAND ETH: MaxLinear GPY211 (2.5GbE N Base-T) WiFi: Mediatek MT7981 (2.4GHz 2T2R:2 5GHz 3T3R:2 802.11ax) BTN: 1x Reset LED: 1x Multi-Color UART Console ------------ Available below the rubber cover next to the ethernet port. Settings: 115200 8N1 Layout: <12V> <LAN> GND-RX-TX-VCC Logic-Level is 3V3. Don't connect VCC to your UART adapter! Installation Web-UI ------------------- Upload the Factory image using the devices Web-Interface. As the device uses a dual-image partition layout, OpenWrt can only installed on Slot A. This requires the current active image prior flashing the device to be on Slot B. In case this is not the case, OpenWrt will boot only one time, returning to the ZyXEL firmware the second boot. If this happens, first install a ZyXEL firmware upgrade of any version and install OpenWrt after that. Installation TFTP / Recovery ---------------------------- This installation routine is especially useful in case of a bricked device. Attach to the UART console header of the device. Interrupt the boot procedure by pressing Enter. The bootloader has a reduced command-set available from CLI, but more commands can be executed by abusing the atns command. Boot a OpenWrt initramfs image available on a TFTP server at 192.168.1.66. Rename the image to nwa50axpro-openwrt-initramfs.bin. $ atnf nwa50axpro-openwrt-initramfs.bin $ atna 192.168.1.88 $ atns "192.168.1.66; tftpboot; setenv fdt_high 0xffffffffffffffff; bootm" Upon booting, set the booted image to the correct slot: $ zyxel-bootconfig /dev/mtd9 get-status $ zyxel-bootconfig /dev/mtd9 set-image-status 0 valid $ zyxel-bootconfig /dev/mtd9 set-active-image 0 Copy the OpenWrt sysupgrade image to the device using scp. Write the sysupgrade image to NAND using sysupgrade. $ sysupgrade -n image.bin Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit f0445746f6fd96fc7c5394b238153bd2ff22bc5b)
2023-07-15 16:10:31 +00:00
mediatek,nmbm;
mediatek,bmt-max-ratio = <1>;
mediatek,bmt-max-reserved-blocks = <64>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "BL2";
reg = <0x00000 0x0100000>;
read-only;
};
partition@100000 {
label = "u-boot-env";
reg = <0x0100000 0x0080000>;
};
factory: partition@180000 {
label = "Factory";
reg = <0x180000 0x0200000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr: macaddr@a {
reg = <0xa 0x6>;
};
};
partition@380000 {
label = "FIP";
reg = <0x380000 0x0200000>;
read-only;
};
partition@580000 {
label = "ubi";
reg = <0x580000 0x3200000>;
};
partition@3780000 {
label = "ubi_1";
reg = <0x3780000 0x3200000>;
read-only;
};
partition@6980000 {
label = "rootfs-data";
reg = <0x6980000 0x3c00000>;
read-only;
};
partition@a580000 {
label = "logs";
reg = <0xa580000 0x3a80000>;
read-only;
};
partition@e000000 {
label = "myzyxel";
reg = <0xe000000 0xf00000>;
read-only;
};
partition@ef00000 {
label = "bootconfig";
reg = <0xef00000 0x80000>;
};
partition@ef80000 {
label = "mrd";
reg = <0xef80000 0x80000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_mrd_1fff8: macaddr@1fff8 {
reg = <0x1fff8 0x6>;
};
};
};
};
};
&pio {
spi0_flash_pins: spi0-pins {
mux {
function = "spi";
groups = "spi0", "spi0_wp_hold";
};
};
pwm_pins: pwm0-pins {
mux {
function = "pwm";
groups = "pwm0_1";
};
};
};
&wifi {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};