From patchwork Thu Apr 14 10:39:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1617146 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=a/dzDT8V; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=GF2DScnH; 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 4KfGHq2Rx0z9sG3 for ; Thu, 14 Apr 2022 20:42:31 +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=h0mcEQT5M2rGY9sx3TNYpzvjYO+HAbiQa2tywv3+Og8=; b=a/dzDT8V8pr1sl xj4dzkH8QOnVlCazSDIaGtUn8u2mFZYugmlE/nYnBo79sRFUggvwVzd6AoGtEIyJC0856Q+fvtNrw V1BOZr5YrrYelPEKcjyDyWSC3GTW4VlAxghsdENNMlwZI3nEdn4qSUeogKyy8puMzTAqpGcPjpBRf OZWMwtoEqeGd6Ulw1hpGy5MaOloPsMGCdDiI+ZR8gkF7nINj49uUxuYuQBHRrDYSN/8yJ2uLflM42 M9Hk9yHBWgU+yqlmRjAz9PELWYLeMl8zqvqxGM5aCAkIed0mFw6Fvq91qypcgsIKVSN5UL2GOG77R vTD0jRnfijS6EAfDrKpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1newta-0059xd-JM; Thu, 14 Apr 2022 10:40:14 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1newtL-0059v1-16 for openwrt-devel@lists.openwrt.org; Thu, 14 Apr 2022 10:40:01 +0000 Received: from Chuck.tardis.lan (tardis.herebedragons.eu [171.22.3.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id 8F4FF602B5; Thu, 14 Apr 2022 12:39:46 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.4.0 vps.slashdirt.org 8F4FF602B5 Authentication-Results: vps.slashdirt.org; dmarc=fail (p=quarantine dis=none) header.from=slashdirt.org DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org 8F4FF602B5 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1649932786; bh=6G7ILR+rJ5+XQf5XMGuH4Yw8JLER5mGDH/3HCiwLXfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GF2DScnHOSyjasB3aLNtlbK/WTXoXgVa/Hc7ha4YnSw9Hf+zHuKvOgD9EOGpIMQ5F UlgzjqZM95tGV9cGsfeihFrudauq9VKnE5SJooUXCpldHoHR6I4MyeYnTLSMcqVWZh nPpa+wh9rUFU8KhNJgqGqqjuciUHeFaX7m1UQ0ic= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Thibaut_VAR=C3=88NE?= , Clemens Hopfer Subject: [PATCH 3/3] ath79: add support for Yuncore A930 Date: Thu, 14 Apr 2022 12:39:05 +0200 Message-Id: <20220414103905.6929-3-hacks@slashdirt.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20220414103905.6929-1-hacks@slashdirt.org> References: <20220414103905.6929-1-hacks@slashdirt.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_033959_522870_97313688 X-CRM114-Status: GOOD ( 14.95 ) 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: Specification: - QCA9533 (650 MHz), 64 or 128MB RAM, 16MB SPI NOR - 2x 10/100 Mbps Ethernet, with 802.3at PoE support (WAN) - 2T2R 802.11b/g/n 2.4GHz Flash instructions: Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 Specification: - QCA9533 (650 MHz), 64 or 128MB RAM, 16MB SPI NOR - 2x 10/100 Mbps Ethernet, with 802.3at PoE support (WAN) - 2T2R 802.11b/g/n 2.4GHz Flash instructions: If your device comes with generic QSDK based firmware, you can login over telnet (login: root, empty password, default IP: 192.168.188.253), issue first (important!) 'fw_setenv' command and then perform regular upgrade, using 'sysupgrade -n -F ...' (you can use 'wget' to download image to the device, SSH server is not available): fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000" sysupgrade -n -F openwrt-...-yuncore_...-squashfs-sysupgrade.bin In case your device runs firmware with YunCore custom GUI, you can use U-Boot recovery mode: 1. Set a static IP 192.168.0.141/24 on PC and start TFTP server with 'tftp' image renamed to 'upgrade.bin' 2. Power the device with reset button pressed and release it after 5-7 seconds, recovery mode should start downloading image from server (unfortunately, there is no visible indication that recovery got enabled - in case of problems check TFTP server logs) Signed-off-by: Clemens Hopfer Signed-off-by: Thibaut VARĂˆNE --- package/boot/uboot-envtools/files/ath79 | 1 + .../linux/ath79/dts/qca9533_yuncore_a930.dts | 118 ++++++++++++++++++ target/linux/ath79/image/generic.mk | 10 ++ 3 files changed, 129 insertions(+) create mode 100644 target/linux/ath79/dts/qca9533_yuncore_a930.dts diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index ace5cab30f..c69a7c292c 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -69,6 +69,7 @@ samsung,wam250|\ ubnt,nanostation-m|\ yuncore,a770|\ yuncore,a782|\ +yuncore,a930|\ yuncore,xd3200|\ yuncore,xd4200|\ ziking,cpe46b|\ diff --git a/target/linux/ath79/dts/qca9533_yuncore_a930.dts b/target/linux/ath79/dts/qca9533_yuncore_a930.dts new file mode 100644 index 0000000000..089eebaa9c --- /dev/null +++ b/target/linux/ath79/dts/qca9533_yuncore_a930.dts @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca953x.dtsi" + +#include +#include + +/ { + compatible = "yuncore,a930", "qca,qca9533"; + model = "YunCore A930"; + + aliases { + label-mac-device = ð1; + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_system: system { + label = "green:system"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x050000 0xfa0000>; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy4>; + + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +ð1 { + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 33a72358b3..dc85fb60bf 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -2528,6 +2528,16 @@ define Device/yuncore_a782 endef TARGET_DEVICES += yuncore_a782 +define Device/yuncore_a930 + SOC := qca9533 + DEVICE_VENDOR := YunCore + DEVICE_MODEL := A930 + IMAGE_SIZE := 16000k + IMAGES += tftp.bin + IMAGE/tftp.bin := $$(IMAGE/sysupgrade.bin) | yuncore-tftp-header-16m +endef +TARGET_DEVICES += yuncore_a930 + define Device/yuncore_xd3200 SOC := qca9563 DEVICE_VENDOR := YunCore