From patchwork Fri May 28 00:05:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Senior X-Patchwork-Id: 1484955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: 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=aVutoi6J; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=personaltelco-net.20150623.gappssmtp.com header.i=@personaltelco-net.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=hfXxBIiN; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Frm2p6c70z9s24 for ; Fri, 28 May 2021 10:36:34 +1000 (AEST) 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:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=db8dD0ohjQix1JLGXl8ZKZ5LG+Zma11O0yxz8bBrJ3Y=; b=aVutoi6JvsusWc 7B9FqXyzMKqJhE4olvb5TwlvfkhDfH4mW/MQJIcjQ9MFKwZJVLFKSqrbB5W7dTP09g8SUNeoq6Ls5 A6rThIaQWxD4AhzgWRvKbLVej+LW/nUAyZlY3sTaEO5lQp5MtTvHZkOt8PaX9LvrQ2COEpqMmMVD/ WRO8Fupy3rCRl7MEg8Dy/PJJE2EsGdnWVvmUOPfR7jSBCnPZxxupEiYA78c+bTuMABpO5v6cxWsH9 gYXcuGk7i5bVEMgLpmQBE66ImUp80UdUha3e93nkeQD8Y1wBiYHSS7sLzjAc+tcfqOsDT43ahQ9iB oc98Hvxavq1UD8ZnCKLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmQPc-00AatX-Qv; Fri, 28 May 2021 00:31:42 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmQ1H-00ASYW-4g for openwrt-devel@lists.openwrt.org; Fri, 28 May 2021 00:06:33 +0000 Received: by mail-pl1-x630.google.com with SMTP id d20so759198pls.13 for ; Thu, 27 May 2021 17:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=personaltelco-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WWFTJkHzcUf4KoDtXhQ81//WgxBzyG7DGCi3E4ikIuc=; b=hfXxBIiNhSyUlmZAM904C6/00Jtce8kExUbCCy4cGuX8xDT5oKJ+CO3zOxlB92J32b KVTOM2SndOb3V3E7IIaRK6wSLveUeaAuYgaYkFqJJVGZCiZNi59nUVBWH4HBvk9MDDTR JSFgWNaTdhX1ve6PYla17yySLBLUSjZJfBWHfVvl9xts7O8rLsz3SEkCLwBD/8wGJLdp XoILrNk6Cdw5nYjsD3ecB7f0P83pjZtPZWVzMhQnA78j7b7O0PNQyWPcIdfdkVc3xEq3 ujJse2YcPaeObcr0jnni41V4k3nsadCiMK2fYN6NNgt6IunZaitC19ujR0aYZbkxWtA5 zlcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WWFTJkHzcUf4KoDtXhQ81//WgxBzyG7DGCi3E4ikIuc=; b=TiP+OdMjFijZbj16k7RHty1vX2Qre/HRzVZ/RWnmtr/PfOI2nSh9UHbaGY8rsqHts2 f2NJoHjTW6D+gpzEeGvlLgt1zexxg8IogytGa5kkglbIuPUloUDllvpCY21Gjj+vSspI v82JhOWU7eTmAB4xjEjX4xLuovhrMI9xgF5I+iw8McosdI4AtNRtIg1fkMrm0lQpGozx bH3iKKs8DwxTbF0f+odvZk7lmDZHbVNJdaGhZUhZjyFnxLnWMrE5KoMAmxydRRbBHme5 S2UwN20QD4lONzDbAYLfHwCs29ioMMLCen5RtbfLh4kZR4HtC31EVF2K130ak4xBZnUi 6oKg== X-Gm-Message-State: AOAM530nyjHwq0Rf0PsytZKHHiY2Hjq2asb5EC7AGnMVdWySo51tZaI4 ES7mY5LMp4pXerk5FHzExD9TNZOnojkX5KjV X-Google-Smtp-Source: ABdhPJwxCwMa1LfLfLX3U3wKRK9Ng+e4+vUCZknFwj4ZWY9Pcp9yHrbWax8oXLbWtxQl8zhgLyXtkQ== X-Received: by 2002:a17:90a:4b8d:: with SMTP id i13mr1309904pjh.34.1622160389318; Thu, 27 May 2021 17:06:29 -0700 (PDT) Received: from hawg.ptp ([2602:3f:e4ac:bf00:a71c:5666:ae4:529d]) by smtp.gmail.com with ESMTPSA id j2sm2856574pji.34.2021.05.27.17.06.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 17:06:28 -0700 (PDT) From: Russell Senior To: openwrt-devel@lists.openwrt.org Cc: Russell Senior Subject: [PATCH v3] ath79: add support for Ubiquiti PowerBeam M (XW) Date: Thu, 27 May 2021 17:05:39 -0700 Message-Id: <20210528000539.2514693-1-russell@personaltelco.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210523115946.711907-1-russell@personaltelco.net> References: <20210523115946.711907-1-russell@personaltelco.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_170631_239074_8CDB3E87 X-CRM114-Status: GOOD ( 17.54 ) X-Spam-Score: 0.1 (/) 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: This patch adds support for the Ubiquiti PowerBeam M (XW), e.g. PBE-M5-400, a 802.11n wireless with a feed+dish form factor. This device was previously supported by the ar71xx loco-m-xw firmware. Specifications: - Atheros AR9342 SoC - 64 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in - Power and LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1 [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:630 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -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 URIBL_SBL_A Contains URL's A record listed in the Spamhaus SBL blocklist [URIs: fcc.io] 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 This patch adds support for the Ubiquiti PowerBeam M (XW), e.g. PBE-M5-400, a 802.11n wireless with a feed+dish form factor. This device was previously supported by the ar71xx loco-m-xw firmware. Specifications: - Atheros AR9342 SoC - 64 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in - Power and LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) Flashing via stock GUI: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first. - Upload the factory image via AirOS web GUI. Flashing via TFTP: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first. - Use a pointy tool (e.g., unbent paperclip) to keep the reset button pressed. - Power on the device (keep reset button pressed). - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button. - The device starts a TFTP server at 192.168.1.20. - Set a static IP on the computer (e.g., 192.168.1.21/24). - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_powerbeam-m-xw-squashfs-factory.bin WARNING: so far, no non-destructive method has been discovered for opening the enclosure to reach the serial console. Internal photos are available here: https://fcc.io/SWX-NBM5HP since v1: * renamed from ubnt,powerbeam-m to ubnt,powerbeam-m-xw since v2: * removed redundant mtd-mac-address from dts Signed-off-by: Russell Senior --- .../ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts | 34 +++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 1 + .../generic/base-files/etc/board.d/02_network | 1 + target/linux/ath79/image/generic-ubnt.mk | 8 +++++ 4 files changed, 44 insertions(+) create mode 100644 target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts diff --git a/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts new file mode 100644 index 0000000000..6db058f887 --- /dev/null +++ b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9342_ubnt_xw.dtsi" + +/ { + compatible = "ubnt,powerbeam-m-xw", "ubnt,xw", "qca,ar9342"; + model = "Ubiquiti PowerBeam M (XW)"; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <4>; + + phy4: ethernet-phy@4 { + reg = <4>; + }; +}; + +ð0 { + status = "okay"; + + /* default for ar934x, except for 1000M and 10M */ + pll-data = <0x02000000 0x00000101 0x00001313>; + + phy-mode = "rgmii-id"; + phy-handle = <&phy4>; + + gmac-config { + device = <&gmac>; + rxd-delay = <3>; + rxdv-delay = <3>; + }; +}; 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 1990353394..35ce90aeb4 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 @@ -383,6 +383,7 @@ ubnt,nanostation-loco-m-xw|\ ubnt,nanostation-m|\ ubnt,nanostation-m-xw|\ ubnt,picostation-m|\ +ubnt,powerbeam-m-xw|\ ubnt,powerbridge-m|\ ubnt,rocket-m) 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 4133b9d7d3..6e31cdac69 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 @@ -85,6 +85,7 @@ ath79_setup_interfaces() ubnt,picostation-m|\ ubnt,powerbeam-5ac-500|\ ubnt,powerbeam-5ac-gen2|\ + ubnt,powerbeam-m-xw|\ ubnt,powerbridge-m|\ ubnt,rocket-m|\ ubnt,unifiac-lite|\ diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 733d803d7a..5948e059e8 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -328,6 +328,14 @@ define Device/ubnt_powerbeam-5ac-gen2 endef TARGET_DEVICES += ubnt_powerbeam-5ac-gen2 +define Device/ubnt_powerbeam-m-xw + $(Device/ubnt-xw) + DEVICE_MODEL := PowerBeam M + DEVICE_PACKAGES += rssileds + SUPPORTED_DEVICES += loco-m-xw +endef +TARGET_DEVICES += ubnt_powerbeam-m-xw + define Device/ubnt_powerbridge-m $(Device/ubnt-xm) SOC := ar7241