diff --git a/target/linux/ath79/dts/qca9558_nec_wg2200hp.dts b/target/linux/ath79/dts/qca9558_nec_wg2200hp.dts new file mode 100644 index 00000000000..91ffe6d84c5 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_nec_wg2200hp.dts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9558_nec_aterm.dtsi" + +/ { + compatible = "nec,wg2200hp", "qca,qca9558"; + model = "NEC Aterm WG2200HP"; +}; + +&i2c { + /delete-node/ gpio@20; + + /* Diodes PI4IOE5V9539LE */ + gpio1: gpio@76 { + compatible = "nxp,pca9539"; + reg = <0x76>; + reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + gpio-controller; + #gpio-cells = <2>; + }; +}; + +&keys { + /delete-node/ button-eco; +}; + +&nvmem_art { + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; +}; + +&phy0 { + qca,ar8327-initvals = < + 0x04 0x80000080 /* PORT0_PAD_MODE_CTRL */ + 0x08 0x00000000 /* PORT5_PAD_MODE_CTRL */ + 0x0c 0x07600000 /* PORT6_PAD_MODE_CTRL */ + 0x10 0x812613a0 /* POWER_ON_STRAP */ + 0x50 0xcc36cc36 /* LED_CTRL0 */ + 0x54 0xca36ca36 /* LED_CTRL1 */ + 0x58 0xc936c936 /* LED_CTRL2 */ + 0x5c 0x03ffff00 /* LED_CTRL3 */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x0000007e /* PORT6_STATUS */ + 0xe0 0xc74164de /* SGMII_CONTROL */ + >; +}; + +ð0 { + pll-data = <0x76000000 0x00000101 0x00001616>; +}; + +&wifi { + compatible = "pci168c,0046"; + nvmem-cells = <&precal_art_5000>, <&macaddr_config_12>; + nvmem-cell-names = "pre-calibration", "mac-address"; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 4da8d36d509..d999784d6a2 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -193,6 +193,7 @@ ath79_setup_interfaces() nec,wg1400hp|\ nec,wg1800hp|\ nec,wg1800hp2|\ + nec,wg2200hp|\ tplink,archer-c5-v1|\ tplink,archer-c7-v1|\ tplink,archer-c7-v2|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 9c749360533..b74a22ba4d6 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -2170,6 +2170,16 @@ define Device/nec_wg1800hp2 endef TARGET_DEVICES += nec_wg1800hp2 +define Device/nec_wg2200hp + SOC := qca9558 + DEVICE_MODEL := Aterm WG2200HP + IMAGE_SIZE := 16128k + NEC_FW_TYPE := H055 + $(Device/nec-netbsd-aterm) + DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca9984-ct +endef +TARGET_DEVICES += nec_wg2200hp + define Device/nec_wg800hp SOC := qca9563 DEVICE_VENDOR := NEC diff --git a/target/linux/ath79/image/lzma-loader/src/board.c b/target/linux/ath79/image/lzma-loader/src/board.c index 294ca307d5d..7ed414aa902 100644 --- a/target/linux/ath79/image/lzma-loader/src/board.c +++ b/target/linux/ath79/image/lzma-loader/src/board.c @@ -54,7 +54,8 @@ static inline void tlwr1043nd_init(void) {} #if defined(CONFIG_BOARD_MERAKI_MR18) || \ defined(CONFIG_BOARD_NEC_WG1400HP) || \ defined(CONFIG_BOARD_NEC_WG1800HP) || \ - defined(CONFIG_BOARD_NEC_WG1800HP2) + defined(CONFIG_BOARD_NEC_WG1800HP2) || \ + defined(CONFIG_BOARD_NEC_WG2200HP) static int extract_qca955x_sgmii_res_cal(void) { @@ -221,6 +222,7 @@ static inline void huawei_ap_init(void) {} #if defined(CONFIG_BOARD_NEC_WG1400HP) || \ defined(CONFIG_BOARD_NEC_WG1800HP) || \ defined(CONFIG_BOARD_NEC_WG1800HP2) || \ + defined(CONFIG_BOARD_NEC_WG2200HP) || \ defined(CONFIG_BOARD_NEC_WG600HP) || \ defined(CONFIG_BOARD_NEC_WR8750N) || \ defined(CONFIG_BOARD_NEC_WR9500N) @@ -296,7 +298,8 @@ static inline void nec_aterm_init(void) } #elif defined(CONFIG_BOARD_NEC_WG1400HP) || \ defined(CONFIG_BOARD_NEC_WG1800HP) || \ - defined(CONFIG_BOARD_NEC_WG1800HP2) + defined(CONFIG_BOARD_NEC_WG1800HP2) || \ + defined(CONFIG_BOARD_NEC_WG2200HP) #define QCA955X_GMAC_MR_AN_CONTROL_PHY_RESET_MASK BIT(15) #define QCA955X_GMAC_MR_AN_CONTROL_FULL_DUPLEX_MASK BIT(8)