Skip to content
Snippets Groups Projects
  • David Bauer's avatar
    70ed8ea1
    modules: update openwrt · 70ed8ea1
    David Bauer authored
    5b7d01b427 iwinfo: update to latest HEAD
    39aaec62ca hostapd: refresh patches
    e2030fcfa7 hostapd: add ubus link-measurements notifications
    1a2940f68e hostapd: add ubus method for requesting link measurements
    b4a9597154 hostapd: add support for enabling link measurements
    5a18028c69 iwinfo: update to latest HEAD
    b519d76276 iwinfo: update to latest Git head
    01cc5e195d iwinfo: update to latest Git HEAD
    44781b265c iwinfo: update to the latest version
    f7c445aa7d iwinfo: update to the latest version
    75cbd8de00 wolfssl: fix compilation with /dev/crypto
    1418439da9 kernel: add missing config symbols
    39f1815b3e mac80211: fix QCA9561 PA bias
    1769e3162e ramips: mt7620: disable SOC VLANs for external switches
    30e47fb1e4 ramips: mt7620: ethernet: use more macros and bump version
    3f976d0225 ramips: mt7620: fix RGMII TXID PHY mode
    6685eb29e5 ramips: mt7620: add ephy-disable option to switch driver
    47db830b82 ramips: mt7620: move mt7620_mdio_mode() to ethernet driver
    6876465875 ramips: mt7620: use DTS to set PHY base address for external PHYs
    5d7805c78b ramips: mt7620: allow both internal and external PHYs
    01bbed7444 ramips: mt7620: fix ethernet driver GMAC port init
    6491212ea7 ramips: mt7620: remove useless GMAC nodes
    a14c2d409c ramips: mt7620: simplify DTS properties for GMAC
    c652a06eef ramips: mt7620: enable autonegotiation for all ports
    08ec622c46 ramips: make PHY initialization more descriptive
    4123f177f9 ramips: add support for the Wavlink WL-WN579X3
    92af15077f ramips: split Youku YK1 to YK-L1 and YK-L1c
    55f8eb84d2 ramips: improve pinctrl for Youku YK-L1
    92489b4f82 ramips: speed up spi frequency for Youku YK-L1
    bea1891182 ramips: remove obsolete mx25l25635f compatible hack
    6c44b157e5 mvebu: kernel: enable CONFIG_BLK_DEV_NVME
    f0f9b7ac5c OpenWrt v21.02.3: revert to branch defaults
    42a15ca378 OpenWrt v21.02.3: adjust config defaults
    1d4dea6d4f ath79: Move TPLink WPA8630Pv2 to ath79-tiny target
    41a97c2074 bcm27xx: add AMP2 to HifiBerry DAC+ / DAC+ Pro package
    9a765554f4 ath79: add support for MikroTik RouterBOARD mAP lite
    2cc9ee8000 ath79: add support for Yuncore A930
    06874171d1 ath79: add support for Yuncore XD3200
    c5ef62a218 wolfssl: bump to 5.2.0
    99b00edf35 mac80211: Update to version 5.10.110-1
    9132344444 bpftools: fix feature override for masking clang
    169c9e3a88 ramips: fix reboot for remaining 32 MB boards
    39bf2aee0e kernel: bump 5.4 to 5.4.188
    3008f1f441 imagebuilder: fix broken image generation with external targets
    70ed8ea1
    History
    modules: update openwrt
    David Bauer authored
    5b7d01b427 iwinfo: update to latest HEAD
    39aaec62ca hostapd: refresh patches
    e2030fcfa7 hostapd: add ubus link-measurements notifications
    1a2940f68e hostapd: add ubus method for requesting link measurements
    b4a9597154 hostapd: add support for enabling link measurements
    5a18028c69 iwinfo: update to latest HEAD
    b519d76276 iwinfo: update to latest Git head
    01cc5e195d iwinfo: update to latest Git HEAD
    44781b265c iwinfo: update to the latest version
    f7c445aa7d iwinfo: update to the latest version
    75cbd8de00 wolfssl: fix compilation with /dev/crypto
    1418439da9 kernel: add missing config symbols
    39f1815b3e mac80211: fix QCA9561 PA bias
    1769e3162e ramips: mt7620: disable SOC VLANs for external switches
    30e47fb1e4 ramips: mt7620: ethernet: use more macros and bump version
    3f976d0225 ramips: mt7620: fix RGMII TXID PHY mode
    6685eb29e5 ramips: mt7620: add ephy-disable option to switch driver
    47db830b82 ramips: mt7620: move mt7620_mdio_mode() to ethernet driver
    6876465875 ramips: mt7620: use DTS to set PHY base address for external PHYs
    5d7805c78b ramips: mt7620: allow both internal and external PHYs
    01bbed7444 ramips: mt7620: fix ethernet driver GMAC port init
    6491212ea7 ramips: mt7620: remove useless GMAC nodes
    a14c2d409c ramips: mt7620: simplify DTS properties for GMAC
    c652a06eef ramips: mt7620: enable autonegotiation for all ports
    08ec622c46 ramips: make PHY initialization more descriptive
    4123f177f9 ramips: add support for the Wavlink WL-WN579X3
    92af15077f ramips: split Youku YK1 to YK-L1 and YK-L1c
    55f8eb84d2 ramips: improve pinctrl for Youku YK-L1
    92489b4f82 ramips: speed up spi frequency for Youku YK-L1
    bea1891182 ramips: remove obsolete mx25l25635f compatible hack
    6c44b157e5 mvebu: kernel: enable CONFIG_BLK_DEV_NVME
    f0f9b7ac5c OpenWrt v21.02.3: revert to branch defaults
    42a15ca378 OpenWrt v21.02.3: adjust config defaults
    1d4dea6d4f ath79: Move TPLink WPA8630Pv2 to ath79-tiny target
    41a97c2074 bcm27xx: add AMP2 to HifiBerry DAC+ / DAC+ Pro package
    9a765554f4 ath79: add support for MikroTik RouterBOARD mAP lite
    2cc9ee8000 ath79: add support for Yuncore A930
    06874171d1 ath79: add support for Yuncore XD3200
    c5ef62a218 wolfssl: bump to 5.2.0
    99b00edf35 mac80211: Update to version 5.10.110-1
    9132344444 bpftools: fix feature override for masking clang
    169c9e3a88 ramips: fix reboot for remaining 32 MB boards
    39bf2aee0e kernel: bump 5.4 to 5.4.188
    3008f1f441 imagebuilder: fix broken image generation with external targets
0005-ath79-Add-support-for-OpenMesh-A60.patch 8.58 KiB
From: Sven Eckelmann <sven@narfation.org>
Date: Mon, 23 Nov 2020 13:41:34 +0100
Subject: ath79: Add support for OpenMesh A60

Device specifications:
======================

* Qualcomm/Atheros QCA9558 ver 1 rev 0
* 720/600/240 MHz (CPU/DDR/AHB)
* 128 MB of RAM
* 16 MB of SPI NOR flash
  - 2x 7 MB available; but one of the 7 MB regions is the recovery image
* 3T3R 2.4 GHz Wi-Fi (11n)
* 3T3R 5 GHz Wi-Fi (11ac)
* multi-color LED (controlled via red/green/blue GPIOs)
* 1x GPIO-button (reset)
* external h/w watchdog (enabled by default))
* TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX)
* 2x ethernet
  - eth0
    + Label: Ethernet 1
    + AR8035 ethernet PHY (RGMII)
    + 10/100/1000 Mbps Ethernet
    + 802.3af POE
    + used as WAN interface
  - eth1
    + Label: Ethernet 2
    + AR8031 ethernet PHY (SGMII)
    + 10/100/1000 Mbps Ethernet
    + used as LAN interface
* 1x USB
* internal antennas

Flashing instructions:
======================

Various methods can be used to install the actual image on the flash.
Two easy ones are:

ap51-flash
----------

The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be
used to transfer the image to the u-boot when the device boots up.

initramfs from TFTP
-------------------

The serial console must be used to access the u-boot shell during bootup.
It can then be used to first boot up the initramfs image from a TFTP server
(here with the IP 192.168.1.21):

   setenv serverip 192.168.1.21
   setenv ipaddr 192.168.1.1
   tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr

The actual sysupgrade image can then be transferred (on the LAN port) to the
device via

  scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/

On the device, the sysupgrade must then be started using

  sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin

Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit eaf2e32c12655d7fb58e158086a784393dc6f69a)

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index 8bc7dc5ebfd8b6042336144b000d7ab2237add89..363a0f9a581d16dff4673019b7706b505f74d11c 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -49,6 +49,7 @@ netgear,wnr2200-16m|\
 netgear,wnr612-v2|\
 ocedo,koala|\
 ocedo,raccoon|\
+openmesh,a60|\
 openmesh,mr600-v1|\
 openmesh,mr600-v2|\
 openmesh,mr900-v1|\
diff --git a/target/linux/ath79/dts/qca9558_openmesh_a60.dts b/target/linux/ath79/dts/qca9558_openmesh_a60.dts
new file mode 100644
index 0000000000000000000000000000000000000000..473f055b492f6dffb0c460fd13e7ad9b604373c6
--- /dev/null
+++ b/target/linux/ath79/dts/qca9558_openmesh_a60.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9558_openmesh_a60.dtsi"
+
+/ {
+	compatible = "openmesh,a60", "qca,qca9558";
+	model = "OpenMesh A60";
+};
diff --git a/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..9938e5f4c013575c686edce5699f3541942133d3
--- /dev/null
+++ b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi
@@ -0,0 +1,180 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca955x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	chosen {
+		/delete-property/ bootargs;
+	};
+
+	aliases {
+		serial0 = &uart;
+		led-boot = &led_status_green;
+		led-failsafe = &led_status_green;
+		led-running = &led_status_green;
+		led-upgrade = &led_status_green;
+		label-mac-device = &eth0;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		status_blue {
+			label = "blue:status";
+			gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+		};
+
+		status_red {
+			label = "red:status";
+			gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+		};
+
+		led_status_green: status_green {
+			label = "green:status";
+			gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	watchdog {
+		compatible = "linux,wdt-gpio";
+		gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+		hw_algo = "toggle";
+		/* hw_margin_ms is actually 300s but driver limits it to 60s */
+		hw_margin_ms = <60000>;
+		always-running;
+	};
+};
+
+&usb_phy1 {
+	status = "okay";
+};
+
+&usb1 {
+	status = "okay";
+};
+
+&spi {
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+
+		/* partitions are passed via bootloader */
+		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 {
+				label = "custom";
+				reg = <0x050000 0x060000>;
+				read-only;
+			};
+
+			partition@b0000 {
+				label = "inactive";
+				reg = <0x0b0000 0x7a0000>;
+			};
+
+			partition@850000 {
+				label = "inactive2";
+				reg = <0x850000 0x7a0000>;
+			};
+
+			art: partition@ff0000 {
+				label = "ART";
+				reg = <0xff0000 0x010000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy-mask = <0x6>;
+
+	phy1: ethernet-phy@1 {
+		reg = <1>;
+		eee-broken-100tx;
+		eee-broken-1000t;
+	};
+
+	phy2: ethernet-phy@2 {
+		reg = <2>;
+		eee-broken-100tx;
+		eee-broken-1000t;
+		at803x-override-sgmii-link-check;
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	pll-data = <0x82000101 0x80000101 0x80001313>;
+
+	mtd-mac-address = <&art 0x0>;
+
+	phy-mode = "rgmii-id";
+	phy-handle = <&phy1>;
+
+	gmac-config {
+		device = <&gmac>;
+		rgmii-enabled = <1>;
+		rxd-delay = <3>;
+		rxdv-delay = <3>;
+		txd-delay = <0>;
+		txen-delay = <0>;
+	};
+};
+
+&eth1 {
+	status = "okay";
+
+	pll-data = <0x03000101 0x80000101 0x80001313>;
+
+	mtd-mac-address = <&art 0x6>;
+
+	qca955x-sgmii-fixup;
+
+	phy-handle = <&phy2>;
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-cal-data = <&art 0x1000>;
+	mtd-mac-address = <&art 0x0>;
+	mtd-mac-address-increment = <2>;
+};
+
+&pcie0 {
+	status = "okay";
+};
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 b01dfa41d1d43e55abfb92ac84ffad01766460e2..eb6068180cb2dd3aac8a455fdbfb29a91d475699 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -172,6 +172,7 @@ ath79_setup_interfaces()
 	comfast,cf-e120a-v3|\
 	comfast,cf-e314n-v2|\
 	compex,wpj531-16m|\
+	openmesh,a60|\
 	openmesh,om2p-v4|\
 	openmesh,om2p-hs-v4|\
 	plasmacloud,pa300|\
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 c7dbaafac1056916db79322555c1d3bd63ee20b0..9e1f660cbcf47b1e6194fd10be051daba59b5fe3 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
@@ -100,6 +100,7 @@ case "$FIRMWARE" in
 		caldata_extract "art" 0x5000 0x844
 		ath10k_patch_mac $(mtd_get_mac_binary art 0xc)
 		;;
+	openmesh,a60|\
 	openmesh,mr1750-v1|\
 	openmesh,mr1750-v2|\
 	openmesh,om5p-ac-v2)
diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
index 1240ef51e88ed2e5d24088746596da085c01ab5c..f7862bb032fbce56be77e9db8ae2e37bf5da30ea 100644
--- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
@@ -65,6 +65,7 @@ platform_do_upgrade() {
 	jjplus,ja76pf2)
 		redboot_fis_do_upgrade "$1" linux
 		;;
+	openmesh,a60|\
 	openmesh,mr600-v1|\
 	openmesh,mr600-v2|\
 	openmesh,mr900-v1|\
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index f6e6f98db9090405c2119f58c97f9e8d3e063b31..ed13ad231736d5da1a412162892139193a9523ab 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1640,6 +1640,16 @@ define Device/openmesh_common_256k
 	openmesh-image ce_type=$$$$(OPENMESH_CE_TYPE) | append-metadata
 endef
 
+define Device/openmesh_a60
+  $(Device/openmesh_common_64k)
+  SOC := qca9558
+  DEVICE_MODEL := A60
+  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct kmod-usb2
+  OPENMESH_CE_TYPE := A60
+  SUPPORTED_DEVICES += a60
+endef
+TARGET_DEVICES += openmesh_a60
+
 define Device/openmesh_mr600-v1
   $(Device/openmesh_common_64k)
   SOC := ar9344