ath79: add support for ELECOM WAB-I1750-PS
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Thu, 22 Feb 2024 10:00:57 +0000 (19:00 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 2 Mar 2024 13:08:08 +0000 (14:08 +0100)
ELECOM WAB-I1750-PS is a 2.4/5 GHz band 11ac (Wi-Fi 5) access point,
based on QCA9558.

Specification:

- SoC              : Qualcomm Atheros QCA9558
- RAM              : DDR2 128 MiB (2x Winbond W9751G6KB251)
- Flash            : SPI-NOR 16 MiB (Macronix MX25L12835FMI-10G)
- WLAN             : 2.4/5 GHz 3T3R
  - 2.4 GHz        : Qualcomm Atheros QCA9558 (SoC)
  - 5 GHz          : Qualcomm Atheros QCA9880
- Ethernet         : 2x 10/100/1000 Mbps
  - phy ("PD")     : Atheros AR8035
  - phy ("PSE")    : Atheros AR8033
- LEDs/keys (GPIO) : 3x/3x
- UART             : 2x RJ-45 port
  - "SERVICE"      : TTL (3.3V)
    - port         : ttyS0
    - assignment   : 1:3.3V, 2:GND, 3:TX, 4:RX
    - settings     : 115200n8
    - note         : no compatibility with "Cisco console cable"
  - "SERIAL"       : RS232C (+-12V)
    - port         : ?
    - assignment   : 1:NC , 2:NC , 3:TXD, 4:GND,
                     5:GND, 6:RXD, 7:NC , 8:NC
    - settings     : 115200n8
    - note         : compatible with "Cisco console cable"
- Buzzer           : 1x GPIO-controlled
- USB              : 1x USB 2.0 Type-A
- Power            : DC jack or PoE
  - DC jack        : 12 VDC, 1.04 A (device only, rating)
  - PoE            : 802.3af/at, 48 VDC, 0.26 A (device only, rating)
  - note           : supports 802.3af supply on PSE (downstream) port
                     when powered by DC adapter or 802.3at PoE

Flash instruction using factory.bin image:

1. Boot WAB-I1750-PS without no upstream connection (or PoE connection
   without DHCP)
2. Access to the WebUI ("http://192.168.3.1") on the device and open
   firmware update page
   ("ツールボックス" -> "ファームウェア更新")
3. Select the OpenWrt factory.bin image and click update
   ("アップデート") button
4. Wait ~120 seconds to complete flashing

Revert to OEM firmware:

1. Download the latest OEM firmware
2. Remove 128 bytes(0x80) header from firmware image
3. Decode by xor with a pattern "8844a2d168b45a2d" (hex val)
4. Upload the decoded firmware to the device
5. Flash to "firmware" partition by mtd command
6. Reboot

Notes:

- To use the "SERVICE" port, the connection of 3.3V line is also
  required to enable console output.
  The uart line of "SERVICE" is branched out from the internal pin
  header with 74HC126D and 3.3V line is connected to OE pin on it.

- "SERIAL" port is provided by HS UART on QCA9558 SoC that has
  compatibility with qca,ar9330-uart, but QCA955x SoC's is not supported
  on Linux Kernel and OpenWrt.

- To supply 802.3af PoE on "PSE" port when powered by DC adapter, 12 VDC
  3.5 A adapter is recommended. (official: WAB-EX-ADP1)

MAC addresses:

Ethernet (PD, PSE): 00:90:FE:xx:xx:0A (Config, ethaddr (text))
2.4GHz            : 00:90:FE:xx:xx:0A (Config, ethaddr (text))
5GHz              : 00:90:FE:xx:xx:0B

[original work]
Signed-off-by: Yanase Yuki <dev@zpc.st>
[update for NVMEM and others]
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
target/linux/ath79/dts/qca9558_elecom_wab-i1750-ps.dts [new file with mode: 0644]
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
target/linux/ath79/image/generic.mk

diff --git a/target/linux/ath79/dts/qca9558_elecom_wab-i1750-ps.dts b/target/linux/ath79/dts/qca9558_elecom_wab-i1750-ps.dts
new file mode 100644 (file)
index 0000000..6f157cf
--- /dev/null
@@ -0,0 +1,69 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca955x_elecom_wab.dtsi"
+
+/ {
+       compatible = "elecom,wab-i1750-ps", "qca,qca9558";
+       model = "ELECOM WAB-I1750-PS";
+
+       ahb {
+               apb {
+                       /* "SERIAL" port (RJ-45) on the case */
+                       uart1: uart@18500000 {
+                               compatible = "qca,ar9330-uart";
+                               reg = <0x18500000 0x14>;
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pmx_uart1_in_pins &pmx_uart1_out_pins
+                                            &jtag_disable_pins>;
+
+                               interrupts = <6>;
+                               interrupt-parent = <&miscintc>;
+
+                               clocks = <&pll ATH79_CLK_UART1>;
+                               clock-names = "uart";
+
+                               /* QCA955x HS UART is not supported */
+                               status = "disabled";
+                       };
+               };
+       };
+};
+
+&gpio {
+       uart1-out {
+               gpio-hog;
+               gpios = <0 GPIO_ACTIVE_HIGH>,   /* UART1_TD */
+                       <2 GPIO_ACTIVE_HIGH>;   /* UART1_RTS */
+               output-low;
+       };
+
+       uart1-in {
+               gpio-hog;
+               gpios = <1 GPIO_ACTIVE_HIGH>,   /* UART1_RD */
+                       <3 GPIO_ACTIVE_HIGH>;   /* UART1_CTS */
+               input;
+       };
+};
+
+&pinmux {
+       pmx_uart1_out_pins: uart1-out-pins {
+               /*
+                * mux as uart1 output
+                *
+                * GPIO0: UART1_TD (sel:18)
+                * GPIO2: UART1_RTS (sel:19)
+                */
+               pinctrl-single,bits = <0x0 0x130012 0xff00ff>;
+       };
+
+       pmx_uart1_in_pins: uart1-in-pins {
+               /*
+                * mux as uart1 input
+                *
+                * GPIO1: UART1_RD
+                * GPIO3: UART1_CTS
+                */
+               pinctrl-single,bits = <0x3c 0x3010000 0xffff0000>;
+       };
+};
index fd7feb1ae57e9dd21c17769eaf041d6f136a9ba0..4e08860cfadcaffcf1c85136fa81fd090d035581 100644 (file)
@@ -144,6 +144,7 @@ ath79_setup_interfaces()
        alfa-network,n5q|\
        devolo,dvl1200e|\
        devolo,dvl1750e|\
+       elecom,wab-i1750-ps|\
        elecom,wab-s1167-ps|\
        elecom,wab-s600-ps|\
        engenius,enstationac-v1|\
@@ -704,6 +705,7 @@ ath79_setup_macs()
                lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
                wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
                ;;
+       elecom,wab-i1750-ps|\
        elecom,wab-s1167-ps|\
        elecom,wab-s600-ps|\
        engenius,ecb1200|\
index b238fc081e38377d0eb4ef2b89cd58a613356eb9..9574d8a17d90b5240f51f0879aff8c19ce18a93b 100644 (file)
@@ -41,6 +41,7 @@ case "$board" in
                [ "$PHYNBR" -eq 1 ] && \
                        mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
                ;;
+       elecom,wab-i1750-ps|\
        elecom,wab-s1167-ps|\
        elecom,wab-s600-ps)
                # set the 5G MAC address (= ethaddr + 1)
index 7a2b54ddfb6f024461d8b5883207c4ca823853c9..3bdc04373890415642ad707ef99fe399be846185 100644 (file)
@@ -1327,6 +1327,14 @@ define Device/elecom_wab
        kmod-usb2 kmod-usb-ledtrig-usbport
 endef
 
+define Device/elecom_wab-i1750-ps
+  $(Device/elecom_wab)
+  SOC := qca9558
+  DEVICE_MODEL := WAB-I1750-PS
+  ELECOM_HWID := 0107000d
+endef
+TARGET_DEVICES += elecom_wab-i1750-ps
+
 define Device/elecom_wab-s1167-ps
   $(Device/elecom_wab)
   SOC := qca9557