From patchwork Mon Dec 10 22:46:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1010762 X-Patchwork-Delegate: openwrt@kresin.me Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OSw2BmFb"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43DJBM5hffz9s0t for ; Tue, 11 Dec 2018 09:47:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FgwBQXbWKyT/9HFQ83HUs2ID3GSHUX7QdViy0DT8NkI=; b=OSw2BmFbaFMw4o TBm8E2MNyJZX6uT7kaSlH6dQyKNvBBhdVBI70+q0/KGBXfhl2gDuIV2oP4rAgtoQa1/ejZWIDAMbL n8FryAVzDHQAKeq8ignwKM4cxmQBvVBYrSBwIR7QbsTEJ6UODfbe1D8+5B4lj9vTuzKalgUfMZ9e6 ZXiOFjrehxAdYyaVobD/dxl2XI76kgTLJSB1fTDGTSUB5298vdIA5wCz9nZMlXbBl4MBmDmchT54g a/XO7P1dntCzOJ55H25f2OBjx2IkrjCxEnyZUQdpT+8yNkD/ZLzgCDZtYJSfF4wU2MChJ2703iAfD /sQ5XX1DDCLKSbW4/lsA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWUL7-0000aw-3U; Mon, 10 Dec 2018 22:47:49 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWUKJ-0007t0-Gp for openwrt-devel@lists.openwrt.org; Mon, 10 Dec 2018 22:47:03 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 13DE14B61; Mon, 10 Dec 2018 23:46:45 +0100 (CET) Received: from localhost.localdomain (localhost [127.0.0.1]) by meh.true.cz (OpenSMTPD) with ESMTP id 5c3bd799; Mon, 10 Dec 2018 23:46:43 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Mon, 10 Dec 2018 23:46:28 +0100 Message-Id: <1544481988-30032-6-git-send-email-ynezz@true.cz> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1544481988-30032-1-git-send-email-ynezz@true.cz> References: <1544481988-30032-1-git-send-email-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181210_144700_603178_2A5E1319 X-CRM114-Status: GOOD ( 13.05 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] Subject: [OpenWrt-Devel] [PATCH 5/5] ath79: Add support for Ubiquiti Nanostation M (XW) X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org CPU: AR9342 SoC RAM: 64 MB DDR2 Flash: 8 MB NOR SPI Ports: 2x100 MBit (24V PoE in, 24V PoE out), AR8236 switch WLAN: 2.4/5 GHz UART: 1 UART LEDs: Power, 2x Ethernet, 4x RSSI LEDs (orange, red, 2x green) Buttons: Reset Flashing instructions using recovery method over TFTP 1. Unplug the ethernet cable from the router. 2. Using paper clip press and hold the router's reset button. Make sure you can feel it depressed by the paper clip. Do not release the button until step 4. 3. While keeping the reset button pressed in, plug the ethernet cable back into the AP. Keep the reset button depressed until you see the device's LEDs flashing in upgrade mode (alternating LED1/LED3 and LED2/LED4), this may take up to 25 seconds. 4. You may release the reset button, now the device should be in TFTP transfer mode. 5. Set a static IP on your Computer's NIC. A static IP of 192.168.1.25/24 should work. 6. Plug the PoE injector's LAN cable directly to your computer. 7. Start tftp client and issue following commands: tftp> binary tftp> connect 192.168.1.20 tftp> put openwrt-ath79-generic-ubnt-nano-m-xw-squashfs-factory.bin Tested-by: Joe Ayers Signed-off-by: Petr Štetiar --- target/linux/ath79/base-files/etc/board.d/01_leds | 1 + .../linux/ath79/base-files/etc/board.d/02_network | 4 +++ target/linux/ath79/dts/ar9342_ubnt_nano-m-xw.dts | 38 ++++++++++++++++++++++ target/linux/ath79/image/generic-ubnt.mk | 7 ++++ 4 files changed, 50 insertions(+) create mode 100644 target/linux/ath79/dts/ar9342_ubnt_nano-m-xw.dts diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 06fb8f4..0f725c0 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -104,6 +104,7 @@ tplink,tl-wr841-v11) ubnt,bullet-m|\ ubnt,bullet-m-xw|\ ubnt,nano-m|\ +ubnt,nano-m-xw|\ ubnt,rocket-m) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100" diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index fa7a618..7e1ec4c 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -188,6 +188,10 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "2:lan:3" "3:lan:2" "4:lan:1" ;; + ubnt,nano-m-xw) + ucidef_add_switch "switch0" \ + "0@eth0" "5:lan" "1:wan" + ;; ubnt,nanostation-ac|\ ubnt,unifiac-mesh-pro|\ ubnt,unifiac-pro) diff --git a/target/linux/ath79/dts/ar9342_ubnt_nano-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_nano-m-xw.dts new file mode 100644 index 0000000..eb5f0b4 --- /dev/null +++ b/target/linux/ath79/dts/ar9342_ubnt_nano-m-xw.dts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9342_ubnt_xw.dtsi" + +/ { + compatible = "ubnt,nano-m-xw", "ubnt,xw"; + model = "Ubiquiti Nanostation M (XW)"; +}; + +&mdio0 { + status = "okay"; + + phy4-mii-enable; + phy-mask = <0x23>; + + phy4: ethernet-phy@4 { + reg = <0>; + phy-mode = "mii"; + }; +}; + +ð0 { + status = "okay"; + + phy-mode = "mii"; + phy-handle = <&phy4>; + mtd-mac-address = <&eeprom 0x0>; + + gmac-config { + device = <&gmac>; + mii-gmac0 = <1>; + mii-gmac0-slave = <1>; + }; +}; diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index cb65aed..e1ba72c 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -113,6 +113,13 @@ define Device/ubnt_nano-m endef TARGET_DEVICES += ubnt_nano-m +define Device/ubnt_nano-m-xw + $(Device/ubnt-xw) + DEVICE_TITLE := Ubiquiti Nanostation M (XW) + SUPPORTED_DEVICES += nano-m-xw nanostation-m-xw +endef +TARGET_DEVICES += ubnt_nano-m-xw + define Device/ubnt_lap-120 $(Device/ubnt-wa) DEVICE_TITLE := Ubiquiti LiteAP ac (LAP-120)