From patchwork Sun Jan 16 18:00:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_Gonz=C3=A1lez_Cabanelas?= X-Patchwork-Id: 1580500 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=JXZ7NMsG; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=YYrh/PtR; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JcNKy5YjZz9sRR for ; Mon, 17 Jan 2022 05:07:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MQ2rmr4apORGLrcgblwP4Il1uIWGuGMgQJzb+soKkMU=; b=JXZ7NMsGkgw2bq HOOrIyt6Ij4zzQPPhMcND6p1Lq9RkI7Q7Jv8UGhjmtR/MIDhekDV+jLcxz9NZrCa7xNNaX8dTEnvj Lwdred1L5HVPANdUvKzhC4IYpqz/4LqtQmWxb3ypvdDwkJrAzKA196hEZMJwe2XMo39+A65mA0vSP Z7sq/r+OGGiSNjmHTaFSkBYVgYlWyW7VXQ06AoEproTZXX0qjPPjzj7h7Psj44WCgFfRpT/a4GG08 X0OutLOBVbTj+mrsLQO7wfNfv8rlQk+dYdD5xK1bQ/AyQUuUZbY2pHaOuQ4Jkgi5gFa376xLHhBib WqiuFlrU1tcMibH5lTmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n99tq-00CnO2-2u; Sun, 16 Jan 2022 18:05:06 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n99tm-00CnNI-6J for openwrt-devel@lists.openwrt.org; Sun, 16 Jan 2022 18:05:04 +0000 Received: by mail-wm1-x332.google.com with SMTP id 25-20020a05600c231900b003497473a9c4so19056062wmo.5 for ; Sun, 16 Jan 2022 10:05:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DHdCyMb35aOziqSjCECbJEFhVSvd3tIRVrcuNIQaUTU=; b=YYrh/PtRrZjJ6idFIz1xWrbCkScRhxvW5iYwibzE3Ku8AlR9u3bTP3X1IOg/LWABTb n3zL36FzcanMsmDDiKhAHKikJtcSEjizkGYMRjV8VOVDL8n43IY8mYSbIxyrDwiRwNYu OxUr4trasAqkwKCOEgNQ7f76IjFmnfrA83nVlhDDy0MzclUQ4k8jIGY0ALmR+QtZWMkf b24yfUaghO3OoPEq0yyJ3+f5s5qpihkCpCYOoZQegGhnDohcs332uEzDAgW3E/lP4rdi 45RarUY6N1qhUMBYx4SqS4cPuJSwBjBoEuYzsEwltHKb01JTP0sjjkMv+PXJiR8ZkgEs APcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DHdCyMb35aOziqSjCECbJEFhVSvd3tIRVrcuNIQaUTU=; b=XcYqtDgP3INT10NUT49s9m5DH+557r6G/gERrI2MIExCLv/nKrw7Jo2DWVcMC8iXam JfnqGV8c/Oufcsg+8L686bj8cwf+RU3Ykh6C9PlNwHaZw+QydVQwFPBKEfmW3cvlnpT9 RcpIhJNA+0aIKqUKojwztptBaFBfvJVu3dub3lP7JGASipVwtZL+FW261BwAiCOAZ1pO nHkxhYP5zMW7GhOa+bN/C6bZ/xQ68nG9x4VOl+7ESblJhp18Aa2yMWBoDpphl51VbxQ/ E/aHlbU7RwGmjTWxIFnAk+R9l8RhKC0xJXpapOgHdNYH07ffqt49E+T8V1j/d+dQ37wk 0ylg== X-Gm-Message-State: AOAM533xWKxgUob+byQYdfqLs96avmYH7OI53k3QX4sY62zHT9u8UCo7 lV6wlP7VgAH6fRPMACVZfSx8SrHAOLgUKA== X-Google-Smtp-Source: ABdhPJxdpYko3y1vP3p4UaPh6zTjUvPRtzBnMjbCBym+8gjfO0vIXGPdqB5pd4Bw8Gtku2io1W9NOg== X-Received: by 2002:a05:6000:15c9:: with SMTP id y9mr16632875wry.88.1642356299721; Sun, 16 Jan 2022 10:04:59 -0800 (PST) Received: from tool.localnet (static-47-138-86-188.ipcom.comunitel.net. [188.86.138.47]) by smtp.gmail.com with ESMTPSA id 4sm6478772wrb.13.2022.01.16.10.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jan 2022 10:04:59 -0800 (PST) From: Daniel =?iso-8859-1?q?Gonz=E1lez?= Cabanelas To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2] ath79: Add support for Ubiquiti NanoBeam AC Gen1 XC Date: Sun, 16 Jan 2022 19:00:19 +0100 Message-ID: <4708874.31r3eYUQgx@tool> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220116_100502_279045_3773BAFB X-CRM114-Status: GOOD ( 12.28 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The Ubiquiti NanoBeam AC Gen1 XC (NBE-5AC-19) is an outdoor 802.11ac CPE with a waterproof casing (ultrasonically welded) and bulb shaped. Hardware: - SoC: Qualcomm Atheros QCA9558 - RAM: 128 MB DDR2 - Flash: 16 MB SPI NOR - Ethernet: 1x GbE, AR8033 phy connected via SGMII - PSU: 24 Vdc passive PoE - WiFi 5 GHz: Qualcomm Atheros QCA988X [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:332 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [dgcbueu[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The Ubiquiti NanoBeam AC Gen1 XC (NBE-5AC-19) is an outdoor 802.11ac CPE with a waterproof casing (ultrasonically welded) and bulb shaped. Hardware: - SoC: Qualcomm Atheros QCA9558 - RAM: 128 MB DDR2 - Flash: 16 MB SPI NOR - Ethernet: 1x GbE, AR8033 phy connected via SGMII - PSU: 24 Vdc passive PoE - WiFi 5 GHz: Qualcomm Atheros QCA988X - Buttons: 1x reset - LEDs: 1x power, 1x Ethernet, 4x RSSI, all blue - Internal antenna: 19 dBi planar Installation from stock airOS firmware: - Follow instructions for XC-type Ubiquiti devices on OpenWrt wiki at https://openwrt.org/toh/ubiquiti/common Signed-off-by: Daniel González Cabanelas --- Change in v2: - Added pll regs to dts to fix the fast ethernet issue. .../ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts | 111 ++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 1 + .../generic/base-files/etc/board.d/02_network | 2 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 + target/linux/ath79/image/generic-ubnt.mk | 9 ++ 5 files changed, 124 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts diff --git a/target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts b/target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts new file mode 100644 index 0000000000..14388079b6 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Device Tree file for Ubiquiti Nanobeam NBE-5AC-19 (XC) + * + * Copyright (C) 2022 Daniel González Cabanelas + * based on device tree from qca9558_ubnt_powerbeam-5ac-500.dts + */ + +#include "qca955x_ubnt_xc.dtsi" + +/ { + compatible = "ubnt,nanobeam-ac-xc", "ubnt,xc", "qca,qca9558"; + model = "Ubiquiti NanoBeam AC Gen1 (XC)"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + led_spi { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + sck-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; + num-chipselects = <1>; + + led_gpio: led_gpio@0 { + compatible = "fairchild,74hc595"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + registers-number = <1>; + spi-max-frequency = <10000000>; + enable-gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + rssi0 { + label = "blue:rssi0"; + gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>; + }; + rssi1 { + label = "blue:rssi1"; + gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>; + }; + rssi2 { + label = "blue:rssi2"; + gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>; + }; + rssi3 { + label = "blue:rssi3"; + gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>; + }; + led_power: power { + label = "blue:power"; + gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <4>; + phy4: ethernet-phy@4 { + phy-mode = "sgmii"; + reg = <4>; + at803x-override-sgmii-link-check; + }; +}; + +ð0 { + status = "okay"; + + pll-reg = <0 0x48 0>; + pll-data = <0x03000000 0x00000101 0x00001313>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; + phy-mode = "sgmii"; + phy-handle = <&phy4>; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 652b54092e..9a9837abbb 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -409,6 +409,7 @@ trendnet,tew-823dru) ubnt,bullet-ac|\ ubnt,nanobeam-ac|\ ubnt,nanobeam-ac-gen2|\ +ubnt,nanobeam-ac-xc|\ ubnt,nanostation-ac|\ ubnt,powerbeam-5ac-gen2) ucidef_set_rssimon "wlan0" "200000" "1" 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 e49e9bd3a1..43269d5102 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 @@ -84,6 +84,7 @@ ath79_setup_interfaces() ubnt,lap-120|\ ubnt,litebeam-ac-gen2|\ ubnt,nanobeam-ac|\ + ubnt,nanobeam-ac-xc|\ ubnt,nanobridge-m|\ ubnt,nanostation-ac-loco|\ ubnt,nanostation-loco-m|\ @@ -715,6 +716,7 @@ ath79_setup_macs() ;; ubnt,litebeam-ac-gen2|\ ubnt,nanobeam-ac-gen2|\ + ubnt,nanobeam-ac-xc|\ ubnt,powerbeam-5ac-500|\ ubnt,powerbeam-5ac-gen2) label_mac=$(mtd_get_mac_binary art 0x5006) diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index c0e5078bdb..1ba56045c1 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -41,6 +41,7 @@ case "$FIRMWARE" in ubnt,litebeam-ac-gen2|\ ubnt,nanobeam-ac|\ ubnt,nanobeam-ac-gen2|\ + ubnt,nanobeam-ac-xc|\ ubnt,nanostation-ac|\ ubnt,nanostation-ac-loco|\ ubnt,powerbeam-5ac-500|\ diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index bb5eaa5458..9470adf48b 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -246,6 +246,15 @@ define Device/ubnt_nanobeam-ac-gen2 endef TARGET_DEVICES += ubnt_nanobeam-ac-gen2 +define Device/ubnt_nanobeam-ac-xc + $(Device/ubnt-xc) + SOC := qca9558 + DEVICE_MODEL := NanoBeam AC + DEVICE_VARIANT := Gen1 (XC) + DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds +endef +TARGET_DEVICES += ubnt_nanobeam-ac-xc + define Device/ubnt_nanobridge-m $(Device/ubnt-xm) SOC := ar7241