From 5dee5965012e788f06e4d095e8cfb73200d818cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Valentin?= Date: Tue, 3 Jan 2023 19:23:41 +0100 Subject: [PATCH] ipq807x: Add ZyXEL NBG7815 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ZyXEL NBG7815 is a premium 802.11ax "tri"-band router/AP. Specifications: * CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz * RAM: 1 GB 2x Nanya NT5CC256M16ER-EK * Storage: * 8MB serial flash Winbond W25Q64DW * 4GB eMMC flash Kingston EMMC04G-M627 * Ethernet: * 4x1G RJ45 ports (QCA8074A) with 1x status LED per port * 1x2.5G RJ45 port (QCA8081) with 1x status LED * 1x10G RJ45 port (AQR113C) with 1x status LED * Switch: Qualcomm Atheros QCA8075 * WLAN: * 2.4GHz: Qualcomm QCN5024 4x4@40MHz 802.11b/g/n/ax 1147 Mbps PHY rate * 2x 5GHz: Qualcomm QCN5054 4x4 802.11a/b/g/n/ac/ax 2402 PHY rate * Bluetooth CSR8811 using HSUART, currently unsupported * USB: 1x USB3.0 Type-A port * LED-s currently not supported: * White * Dark Blu * Amber * Purple * Purple and dark blue * Red * Buttons: * 1x Soft reset * Power: 12V DC Jack Installation instructions: * Disconnect WAN * Reset device to factory defaults by pushing reset button 15 sec, LEDs should lit orange color. * After 5-10 minutes, when the LEDs turn constant dark blue, put your LAN cable and connect at address 192.168.123.1 by telnet on port 23 * Login with NBG7815 login: root password: nbg7815@2019 * cd /tmp/ApplicationData * wget -O openwrt-ipq807x-generic-zyxel_nbg7815-squashfs-sysupgrade.bin http://... * wget https://github.com/itorK/nbg7815_tools/blob/main/flash_to_openwrt.sh * run flash_to_openwrt.sh If you can't use wget, you can transfer the files via nc. See https://openwrt.org/inbox/toh/zyxel/nbg7815_armor_g5 for installation details. Bluetooth usage: * you need at least package bluez-utils, recommended bluez-daemon * run following commands to enable and start hciattach /dev/ttyMSM1 bcsp hciconfig hci0 up Many thanks to itorK for his work on this device: https://github.com/itorK/openwrt/tree/nbg7815 Reviewed-by: Robert Marko Signed-off-by: André Valentin --- package/boot/uboot-envtools/files/ipq807x | 3 +- package/firmware/ipq-wifi/Makefile | 4 +- .../ipq-wifi/board-zyxel_nbg7815.ipq8074 | Bin 0 -> 131176 bytes .../ipq807x/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/firmware/11-ath11k-caldata | 3 +- .../base-files/lib/upgrade/platform.sh | 16 +- .../arm64/boot/dts/qcom/ipq8074-nbg7815.dts | 445 ++++++++++++++++++ target/linux/ipq807x/image/generic.mk | 15 + 8 files changed, 485 insertions(+), 4 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-zyxel_nbg7815.ipq8074 create mode 100644 target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x index 63fd04ec5b..6e4fadbdf5 100644 --- a/package/boot/uboot-envtools/files/ipq807x +++ b/package/boot/uboot-envtools/files/ipq807x @@ -13,7 +13,8 @@ dynalink,dl-wrx36) [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2" ;; -edgecore,eap102) +edgecore,eap102|\ +zyxel,nbg7815) idx="$(find_mtd_index 0:appsblenv)" [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1" diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 32988910c0..861eec13dc 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -49,7 +49,8 @@ ALLWIFIBOARDS:= \ xiaomi_ax3600 \ xiaomi_ax9000 \ zte_mf18a \ - zte_mf289f + zte_mf289f \ + zyxel_nbg7815 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) @@ -148,5 +149,6 @@ $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600)) $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000)) $(eval $(call generate-ipq-wifi-package,zte_mf18a,ZTE MF18A)) $(eval $(call generate-ipq-wifi-package,zte_mf289f,ZTE MF289F)) +$(eval $(call generate-ipq-wifi-package,zyxel_nbg7815,Zyxel NBG7815)) $(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE)))) diff --git a/package/firmware/ipq-wifi/board-zyxel_nbg7815.ipq8074 b/package/firmware/ipq-wifi/board-zyxel_nbg7815.ipq8074 new file mode 100644 index 0000000000000000000000000000000000000000..3a1c88b76eabfe3ed262811cf8a674ccb737cee2 GIT binary patch literal 131176 zcmeHw33OCfdgiSKA+TB&qEy<+HJdid=j6WJ~K9McRQ2G(&_G`C+T*!Njgb8+e~JLNoVF{a&p3a->rI8uf(D& zBxDfx>3>!4fA{`(`R@P!_rJGZmDVgQpI%-3GCb7x4dzWqT&MFJHKuc`>~w@2KZyB2UKJcrZP zv1+GH#6(ne*A9I}3EjUt|M$B8)7^LdwM zE8Vt>v_M>-lzWIw7R$e28VR36WFObbcHnTY^AYL%$(v}XbJHWzTHVaiMqq;YJUm}; zLJM&Bz8dXD=<+lIBS0WZ{3xu$BPd6UY6Knz1SX24z{=fXnQ`dWty_n(OvjUdZ?#w~ z=5qzx{3H(M!X{31l?WKA;6J`5U!sH zk$yvns~4UDdewXN2~|(*dL22hI|U-|7K`;_a6$8 z@jW3@zJ>aa2{EM=@&%Ajfc#$#E${j-X#aOj^*0CW$L^fCQ zKgYnRUttW0feUR&`*;wJC1^t`+MrMdZlByoi z7N`f`yiYwa#t`xe<}qOV|4t19_ZKEx=mm}qramb612@JY{gdE0QobJYhApYcV+=Ad z1}X3-PV`|)6Xa(C!+7-JFNW@eF$O8$hWucErl7~vgOE=$>~WYr$&GQi&7SGgXwM2h z%>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9s z?m?^&gKi9BN1i^mz16iniU_2M%7u?&yLFp20vZ90fJQ(gpb^jrXaqC@8Uc-fMnEH= z5zq)|1T+E~0gZr0KqH_L& + * Copyright (c) 2023, Andre Valentin + */ + +/dts-v1/; + +#include "ipq8074.dtsi" +#include "ipq8074-hk-cpu.dtsi" +#include "ipq8074-ess.dtsi" +#include +#include +#include + + +/ { + model = "Zyxel NBG7815"; + compatible = "zyxel,nbg7815", "qcom,ipq8074"; + + aliases { + serial0 = &blsp1_uart5; + serial1 = &blsp1_uart3; + /* Alias as required by u-boot to patch MAC addresses */ + ethernet0 = &dp1; + label-mac-device = &dp1; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&tlmm 54 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&tlmm { + mdio_pins: mdio-pins { + mdc { + pins = "gpio68"; + function = "mdc"; + drive-strength = <8>; + bias-pull-up; + }; + + mdio { + pins = "gpio69"; + function = "mdio"; + drive-strength = <8>; + bias-pull-up; + }; + }; +}; + + +&blsp1_uart3 { + status = "okay"; +}; + +&blsp1_uart5 { + status = "okay"; +}; + +&prng { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + + +&blsp1_spi1 { + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + cs-gpios = <0>; + status = "okay"; + + /* + * Bootloader will find the NAND DT node by the compatible and + * then "fixup" it by adding the partitions from the SMEM table + * using the legacy bindings thus making it impossible for us + * to change the partition table or utilize NVMEM for calibration. + * So add a dummy partitions node that bootloader will populate + * and set it as disabled so the kernel ignores it instead of + * printing warnings due to the broken way bootloader adds the + * partitions. + */ + partitions { + status = "disabled"; + }; + + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "0:sbl1"; + reg = <0x0 0x50000>; + read-only; + }; + + partition@50000 { + label = "0:mibib"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + label = "0:bootconfig"; + reg = <0x60000 0x20000>; + read-only; + }; + + partition@80000 { + label = "0:bootconfig1"; + reg = <0x80000 0x20000>; + read-only; + }; + + partition@a0000 { + label = "0:qsee"; + reg = <0xa0000 0x180000>; + read-only; + }; + + partition@220000 { + label = "0:qsee_1"; + reg = <0x220000 0x180000>; + read-only; + }; + + partition@3a0000 { + label = "0:devcfg"; + reg = <0x3a0000 0x10000>; + read-only; + }; + + partition@3b0000 { + label = "0:devcfg_1"; + reg = <0x3b0000 0x10000>; + read-only; + }; + + partition@3c0000 { + label = "0:apdp"; + reg = <0x3c0000 0x10000>; + read-only; + }; + + partition@3d0000 { + label = "0:apdp_1"; + reg = <0x3d0000 0x10000>; + read-only; + }; + + partition@3e0000 { + label = "0:rpm"; + reg = <0x3e0000 0x40000>; + read-only; + }; + + partition@420000 { + label = "0:rpm_1"; + reg = <0x420000 0x40000>; + read-only; + }; + + partition@460000 { + label = "0:cdt"; + reg = <0x460000 0x10000>; + read-only; + }; + + partition@470000 { + label = "0:cdt_1"; + reg = <0x470000 0x10000>; + read-only; + }; + + partition@480000 { + label = "0:appsbl"; + reg = <0x480000 0xc0000>; + read-only; + }; + + partition@540000 { + label = "0:appsbl_1"; + reg = <0x540000 0xc0000>; + read-only; + }; + + partition@600000 { + compatible = "u-boot,env"; + label = "0:appsblenv"; + reg = <0x600000 0x10000>; + + macaddr_lan: ethaddr { + }; + }; + + partition@610000 { + label = "0:art"; + reg = <0x610000 0x40000>; + read-only; + }; + + partition@650000 { + label = "0:ethphyfw"; + reg = <0x650000 0x80000>; + read-only; + }; + + partition@6d0000 { + label = "0:crt"; + reg = <0x6d0000 0x10000>; + read-only; + }; + + partition@6e0000 { + label = "dual_flag"; + reg = <0x6e0000 0x10000>; + }; + + partition@6f0000 { + label = "reserved"; + reg = <0x6f0000 0x110000>; + read-only; + }; + }; + }; +}; + +&mdio { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; + + qca8075_1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; + + qca8075_2: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; + + qca8075_3: ethernet-phy@2 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <2>; + }; + + qca8075_4: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + }; + + qca8081: ethernet-phy@4{ + compatible = "ethernet-phy-id004d.d101"; + reg = <28>; + reset-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>; + }; + + aqr113c: ethernet-phy@5 { + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <8>; + reset-gpios = <&tlmm 63 GPIO_ACTIVE_LOW>; + }; +}; + +&switch { + status = "okay"; + + switch_cpu_bmp = <0x1>; + switch_lan_bmp = <0x3e>; + switch_wan_bmp = <0x40>; + switch_mac_mode = <0x0>; + switch_mac_mode1 = <0xf>; + switch_mac_mode2 = <0xd>; + bm_tick_mode = <0>; + tm_tick_mode = <0>; + + qcom,port_phyinfo { + port@0 { + port_id = <1>; + phy_address = <0>; + }; + + port@1 { + port_id = <2>; + phy_address = <1>; + }; + + port@2 { + port_id = <3>; + phy_address = <2>; + }; + + port@3 { + port_id = <4>; + phy_address = <3>; + }; + + port@4 { + port_id = <5>; + phy_address = <28>; + port_mac_sel = "QGMAC_PORT"; + }; + + port@5 { + port_id = <6>; + ethernet-phy-ieee802.3-c45; + phy_address = <8>; + }; + }; +}; + +&edma { + status = "okay"; +}; + +&dp1 { + status = "okay"; + phy-handle = <&qca8075_1>; + label = "lan1"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&dp2 { + status = "okay"; + phy-handle = <&qca8075_2>; + label = "lan2"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&dp3 { + status = "okay"; + phy-handle = <&qca8075_3>; + label = "lan3"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&dp4 { + status = "okay"; + phy-handle = <&qca8075_4>; + label = "lan4"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&dp5 { + status = "okay"; + phy-handle = <&qca8081>; + label = "wan"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; + mac-address-increment = <1>; +}; + +&dp6_syn { + status = "okay"; + phy-handle = <&aqr113c>; + label = "10g"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&blsp1_i2c2 { + pinctrl-0 = <&i2c_0_pins>; + pinctrl-names = "default"; + status = "okay"; + + tmp103@70 { + compatible = "ti,tmp103"; + reg = <0x70>; + }; +}; + +&sdhc_1 { + status = "okay"; + /* unstable, problem with the hs400 > h200 speed switch */ + /delete-property/ mmc-hs400-1_8v; + mmc-hs200-1_8v; + mmc-ddr-1_8v; + vqmmc-supply = <&l11>; +}; + +&ssphy_0 { + status = "okay"; +}; + +&qusb_phy_0 { + status = "okay"; +}; + +&ssphy_1 { + status = "okay"; +}; + +&qusb_phy_1 { + status = "okay"; +}; + +&usb_0 { + status = "okay"; +}; + +&usb_1 { + status = "okay"; +}; + +&wifi { + status = "okay"; + + qcom,ath11k-calibration-variant = "Zyxel-NBG7815"; +}; diff --git a/target/linux/ipq807x/image/generic.mk b/target/linux/ipq807x/image/generic.mk index 811a32e942..3145e1b53f 100644 --- a/target/linux/ipq807x/image/generic.mk +++ b/target/linux/ipq807x/image/generic.mk @@ -116,3 +116,18 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) endif endef TARGET_DEVICES += xiaomi_ax9000 + +define Device/zyxel_nbg7815 + $(call Device/FitImage) + DEVICE_VENDOR := ZYXEL + DEVICE_MODEL := NBG7815 + DEVICE_DTS_CONFIG := config@nbg7815 + BLOCKSIZE := 128k + PAGESIZE := 2048 + SOC := ipq8074 + IMAGES += factory.bin sysupgrade.bin + IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k + IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | sysupgrade-tar rootfs=$$$$@ | append-metadata + DEVICE_PACKAGES := ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci e2fsprogs kmod-fs-ext4 losetup kmod-hwmon-tmp103 +endef +TARGET_DEVICES += zyxel_nbg7815 -- 2.30.2