aredn/patches/747-mikrotik-extra-support....

801 lines
17 KiB
Diff
Raw Normal View History

Update AREDN to OpenWRT 22.3.2 (Major Upgrade) (#574) * Update to Openwrt 21.02 and add support for the CPE710 v1 Update scripts to change references to ifname to device due to a change in Openwrt naming reverse-wpad-basic-wolfssl and disable SSL on Curl NOTE: The compile host must have python3-distutils installed for gpsd to build * aredn: initial working upgrade to openwrt 21.02.1 * aredn: update 1 to working upgrade to openwrt 21.02.1 * aredn: add cpe710v1 to build config * Andrew's patches * Remove duplicates + display perl * Temp disable wifi extension patch * ifname/ports support * Add spectrum patch back in * Generic function to extra interfaces * New api to get wifi ifname * Disables jails * Style link * aredn: partial upgrade to openwrt 22.0.3.0 added AC device images and partial migration to 22.0.3.0 firewall upgrade pending * aredn: update mesh-release and revert config.mk * Unused * NFT firewall rewrite * Common-isze configs * Fix network layout for hap2 * Use local packages dev (new firewall rules) * Add HAP2 * Add pause after network restart to let bridge reinitialize * Various lua fixes for new lua version * Tweak config * Re-fix networking (lost patch change) * Add new radio names * Tolerate missing wifi * Fix hap-lite switch setup * More devices * New radio id * Build Rocket 5AC lite * Remove need for luci.sys * Remove need for luci.sys * Explicitly name wlan interfaces * Handle different compatibility verisoning * Update networking for switches * ipref version bump * Extra flag for curl * Better compat_version fix * Remove wolfssl * Fix dns server * Fix device name * Unused * Remove things we dont need * Remove unused packages * Generic macaddr overrides * Fix uci commit * Fix luci.template.parser to avoid luci.http loading the real thing * Rocket-M build * Add search-domain dhcp option * Turn of ipv6 * No IPV6 in dnsmasq * Override mac addresses if devices all the same * Working from master (for now) * Put back hostap * Disable old ethmac fixup * Tweak configs * Move back to v22.03.2 Leave ipq4019 builds to master * Need IPV6 to compile nft firewall * Rocket-M fixes * Before we start * WIP * Working snapshot * Cleaned patches * Merged patch * Single patch to support HAP2 * Fix typo * Add nanostation-m * 5/10Mhz patch * 5+10MHz patch for ath10k-ct driver * Extend 2Ghz channel check to include -4 to -1 * Add chanbw setup for ath10k (like ath9k) * Added TP-Link CPE710 v1 * Override firmwares * Missing patch * Dropbear config like 3.22.8.0 * Add Ubiquiti Rocket 5AC Lite * Fix c6 * Update * Need more scan channels * Remove IPV6 * Improve mac fixups * Put back missing nft app * IPv6 removed so dont have to disable it * Fix rocket-m flash bug * Fix nanostation-m * Nanobridge is tiny * Fix wifi order for ar750 * Rocket M5 XW support * New rates * Fix firewall4 so we don't need IPv6 * Allow channel width to be restricted * Move channel list into library * Fix naming * Mechanism to block specific channels on specific radios * Refresh buttons * routerboard-sxt-5nd * CPE605 v1.0 * Improve rocket m xw * tpink * Update patch * Update to remove disable * Remove BW restrictions on cpe710 * Restrict to what has been tested * Remove test BW restrictions * sxtsq-5-ac * Update * Update * powerbeam-m5-300 support * Fix * Fix hap2 * Tidy unused patches * Remove limit * Add ubnt_bullet-m-ar7241 * Added ubnt_nanobeam-ac-gen2 * Fix typo * Tolerate missing dtd ip * Explicitly gix hap2 mac addresses * Fix some broken patches * Hap2 wont work at 5MHz * Ubiquiti LiteBeam 5AC Gen2 * Fix compat_version for sxt 5ac * Update patch * Unused * Fix lan configuration for some devices * Rolling average of noise level * Unused * Split out the ath10k rssi monitor (its very simple at the moment) * Ignore .DS_Store * Reboot if ethernet doesnt come up (but only once!) * reboot returns - add exit * Add some logging info * Fix ] * Check all possibly ethernet bridges * Improve mac fixing * Remove HostAP on small memory devices * Reduce dropbear footprint * Add setsid * Kill hostap when upgrading to save memory * Different way to detect hostapd unavailable * New build steps * Improve manager logging * Fix name conflict for the two monitors * Try to improve test mesh name resolve problem * Migrate tiny to generic (tiny doesnt work properly) * Typo * Another attempt to fix macs for Mikrotik * Protect against missing trackers * Fix wpad for ipq40xx * Remove old tunnel check code * Enable ZRAM swap to aid low memory devices * ath10k noise can something be out of range - protect against that * Updated with current devices and status * Update firmware which has been tested * Updated with more builds * More binary/README * Fix css error * Start noise at sensible base level * Unfix the css so it looks how it use to. * Save as much memory as we can on lowmem nodes * Hide some options on low memory devices * Add "eol" to 32MB devices * Restart network rather than reboot node if it seems to be broken * Fixes * Revert network reset * Fix ar750 networking * Continue to trim tiny configs * More devices * Dump IW output messages * Fix Rocket 5AC intermittent ethernet issue * Ethernet fix for PowerBeam 5AC 500 * More tiny size reduction * More support data * Fixed POE and USB power features * Add Ubiquiti NanoBeam AC (gen1) * NanoStation (not NanoBeam) * Add mii-tool package * Device updates * Bump update time to 5 minutes * Fix ethernet negotiation for rocker-5ac and nanobeam * Fix iplookup * Config changes based on call feedback * Radio listing fixes * Update with more untested builds * Fallback TxMbps extracted from iw station dump * Fix tunnel detection for low memory nodes * Remove unused feed packages * snapshot build * Update stability info * Add powerbeam-5ac-500 * Typo * Add missing 3.22.1.0 * Add MikroTik LHG 5 AC * Fix permissions * Fix permissions * AirGrid's take Bullet builds * Mikrotik AC3 * Improve supportdata structure a little to make it easier to find things * Restore WAN VLAN overrides * Fix vlan regex for hap2 and hap3 * Support old and new style poe controls * hap-ac3 is version 1.1 * Handle typo in some openwrt config files * Fix HAP AC3 install * Update hap ac3 status * Support user overrides for network ports (non-swconfig devices) * LHG 5AC support * Remove -nand * Remove non-working platform.sh change * tunnel weight override * Omit LinkQualityMult when value is 1 * Add mANTBox 19s and 15s * Support ath79 mikrotik devices which require ath10k in the initramfs Co-authored-by: apcameron <apcameron@softhome.net> Co-authored-by: Joe AE6XE <ae6xe@arrl.net> Co-authored-by: Joe Ayers <joe@arrl.net>
2022-12-22 13:22:49 -07:00
--- a/target/linux/ath79/image/mikrotik.mk
+++ a/target/linux/ath79/image/mikrotik.mk
@@ -102,6 +102,15 @@
endef
TARGET_DEVICES += mikrotik_routerboard-mapl-2nd
+define Device/mikrotik_routerboard-sxt-5nd
+ $(Device/mikrotik_nor)
+ SOC := ar9344
+ DEVICE_MODEL := RouterBOARD SXT 5nD (SXT Lite5)
+ DEVICE_PACKAGES += rssileds
+ IMAGE_SIZE := 16256k
+endef
+TARGET_DEVICES += mikrotik_routerboard-sxt-5nd
+
define Device/mikrotik_routerboard-sxt-5nd-r2
$(Device/mikrotik_nand)
SOC := ar9344
--- /dev/null 2022-10-26
+++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd.dts
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9344_mikrotik_routerboard-16m-nor.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mikrotik,routerboard-sxt-5nd", "qca,ar9344";
+ model = "MikroTik RouterBOARD SXT 5nD (SXT Lite5)";
+
+ aliases {
+ led-boot = &led_user;
+ led-failsafe = &led_user;
+ led-running = &led_user;
+ led-upgrade = &led_user;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "blue:power";
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ rssilow {
+ label = "green:rssilow";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ rssimediumlow {
+ label = "green:rssimediumlow";
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ };
+
+ rssimedium {
+ label = "green:rssimedium";
+ gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+ };
+
+ rssimediumhigh {
+ label = "green:rssimediumhigh";
+ gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
+ };
+
+ rssihigh {
+ label = "green:rssihigh";
+ gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+ };
+
+ led_user: user {
+ label = "white:user";
+ gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
+ };
+
+ lan {
+ label = "green:lan";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&eth0 {
+ status = "okay";
+
+ phy-handle = <&swphy0>;
+
+ gmac-config {
2023-01-10 00:02:17 -07:00
+ device = <&gmac0>;
Update AREDN to OpenWRT 22.3.2 (Major Upgrade) (#574) * Update to Openwrt 21.02 and add support for the CPE710 v1 Update scripts to change references to ifname to device due to a change in Openwrt naming reverse-wpad-basic-wolfssl and disable SSL on Curl NOTE: The compile host must have python3-distutils installed for gpsd to build * aredn: initial working upgrade to openwrt 21.02.1 * aredn: update 1 to working upgrade to openwrt 21.02.1 * aredn: add cpe710v1 to build config * Andrew's patches * Remove duplicates + display perl * Temp disable wifi extension patch * ifname/ports support * Add spectrum patch back in * Generic function to extra interfaces * New api to get wifi ifname * Disables jails * Style link * aredn: partial upgrade to openwrt 22.0.3.0 added AC device images and partial migration to 22.0.3.0 firewall upgrade pending * aredn: update mesh-release and revert config.mk * Unused * NFT firewall rewrite * Common-isze configs * Fix network layout for hap2 * Use local packages dev (new firewall rules) * Add HAP2 * Add pause after network restart to let bridge reinitialize * Various lua fixes for new lua version * Tweak config * Re-fix networking (lost patch change) * Add new radio names * Tolerate missing wifi * Fix hap-lite switch setup * More devices * New radio id * Build Rocket 5AC lite * Remove need for luci.sys * Remove need for luci.sys * Explicitly name wlan interfaces * Handle different compatibility verisoning * Update networking for switches * ipref version bump * Extra flag for curl * Better compat_version fix * Remove wolfssl * Fix dns server * Fix device name * Unused * Remove things we dont need * Remove unused packages * Generic macaddr overrides * Fix uci commit * Fix luci.template.parser to avoid luci.http loading the real thing * Rocket-M build * Add search-domain dhcp option * Turn of ipv6 * No IPV6 in dnsmasq * Override mac addresses if devices all the same * Working from master (for now) * Put back hostap * Disable old ethmac fixup * Tweak configs * Move back to v22.03.2 Leave ipq4019 builds to master * Need IPV6 to compile nft firewall * Rocket-M fixes * Before we start * WIP * Working snapshot * Cleaned patches * Merged patch * Single patch to support HAP2 * Fix typo * Add nanostation-m * 5/10Mhz patch * 5+10MHz patch for ath10k-ct driver * Extend 2Ghz channel check to include -4 to -1 * Add chanbw setup for ath10k (like ath9k) * Added TP-Link CPE710 v1 * Override firmwares * Missing patch * Dropbear config like 3.22.8.0 * Add Ubiquiti Rocket 5AC Lite * Fix c6 * Update * Need more scan channels * Remove IPV6 * Improve mac fixups * Put back missing nft app * IPv6 removed so dont have to disable it * Fix rocket-m flash bug * Fix nanostation-m * Nanobridge is tiny * Fix wifi order for ar750 * Rocket M5 XW support * New rates * Fix firewall4 so we don't need IPv6 * Allow channel width to be restricted * Move channel list into library * Fix naming * Mechanism to block specific channels on specific radios * Refresh buttons * routerboard-sxt-5nd * CPE605 v1.0 * Improve rocket m xw * tpink * Update patch * Update to remove disable * Remove BW restrictions on cpe710 * Restrict to what has been tested * Remove test BW restrictions * sxtsq-5-ac * Update * Update * powerbeam-m5-300 support * Fix * Fix hap2 * Tidy unused patches * Remove limit * Add ubnt_bullet-m-ar7241 * Added ubnt_nanobeam-ac-gen2 * Fix typo * Tolerate missing dtd ip * Explicitly gix hap2 mac addresses * Fix some broken patches * Hap2 wont work at 5MHz * Ubiquiti LiteBeam 5AC Gen2 * Fix compat_version for sxt 5ac * Update patch * Unused * Fix lan configuration for some devices * Rolling average of noise level * Unused * Split out the ath10k rssi monitor (its very simple at the moment) * Ignore .DS_Store * Reboot if ethernet doesnt come up (but only once!) * reboot returns - add exit * Add some logging info * Fix ] * Check all possibly ethernet bridges * Improve mac fixing * Remove HostAP on small memory devices * Reduce dropbear footprint * Add setsid * Kill hostap when upgrading to save memory * Different way to detect hostapd unavailable * New build steps * Improve manager logging * Fix name conflict for the two monitors * Try to improve test mesh name resolve problem * Migrate tiny to generic (tiny doesnt work properly) * Typo * Another attempt to fix macs for Mikrotik * Protect against missing trackers * Fix wpad for ipq40xx * Remove old tunnel check code * Enable ZRAM swap to aid low memory devices * ath10k noise can something be out of range - protect against that * Updated with current devices and status * Update firmware which has been tested * Updated with more builds * More binary/README * Fix css error * Start noise at sensible base level * Unfix the css so it looks how it use to. * Save as much memory as we can on lowmem nodes * Hide some options on low memory devices * Add "eol" to 32MB devices * Restart network rather than reboot node if it seems to be broken * Fixes * Revert network reset * Fix ar750 networking * Continue to trim tiny configs * More devices * Dump IW output messages * Fix Rocket 5AC intermittent ethernet issue * Ethernet fix for PowerBeam 5AC 500 * More tiny size reduction * More support data * Fixed POE and USB power features * Add Ubiquiti NanoBeam AC (gen1) * NanoStation (not NanoBeam) * Add mii-tool package * Device updates * Bump update time to 5 minutes * Fix ethernet negotiation for rocker-5ac and nanobeam * Fix iplookup * Config changes based on call feedback * Radio listing fixes * Update with more untested builds * Fallback TxMbps extracted from iw station dump * Fix tunnel detection for low memory nodes * Remove unused feed packages * snapshot build * Update stability info * Add powerbeam-5ac-500 * Typo * Add missing 3.22.1.0 * Add MikroTik LHG 5 AC * Fix permissions * Fix permissions * AirGrid's take Bullet builds * Mikrotik AC3 * Improve supportdata structure a little to make it easier to find things * Restore WAN VLAN overrides * Fix vlan regex for hap2 and hap3 * Support old and new style poe controls * hap-ac3 is version 1.1 * Handle typo in some openwrt config files * Fix HAP AC3 install * Update hap ac3 status * Support user overrides for network ports (non-swconfig devices) * LHG 5AC support * Remove -nand * Remove non-working platform.sh change * tunnel weight override * Omit LinkQualityMult when value is 1 * Add mANTBox 19s and 15s * Support ath79 mikrotik devices which require ath10k in the initramfs Co-authored-by: apcameron <apcameron@softhome.net> Co-authored-by: Joe AE6XE <ae6xe@arrl.net> Co-authored-by: Joe Ayers <joe@arrl.net>
2022-12-22 13:22:49 -07:00
+ switch-phy-swap = <1>;
+ };
+};
+
+&eth1 {
+ status = "okay";
+
+ compatible = "syscon", "simple-mfd";
+};
--- a/target/linux/ipq40xx/image/mikrotik.mk
+++ b/target/linux/ipq40xx/image/mikrotik.mk
@@ -62,3 +62,11 @@
DEVICE_PACKAGES := rssileds
endef
TARGET_DEVICES += mikrotik_sxtsq-5-ac
+
+define Device/mikrotik_lhgg-5acd
+ $(call Device/mikrotik_nor)
+ DEVICE_MODEL := RouterBOARD LHG 5 AC
+ SOC := qcom-ipq4018
+ DEVICE_PACKAGES := rssileds
+endef
+TARGET_DEVICES += mikrotik_lhgg-5acd
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -35,6 +35,7 @@
zyxel,wre6606)
ucidef_set_interface_lan "eth0"
;;
+ mikrotik,lhgg-5acd|\
mikrotik,sxtsq-5-ac)
ucidef_set_interfaces_lan_wan "lan" "lan.1"
ucidef_set_interface "wifi" device "wlan0" protocol "static"
@@ -216,6 +217,7 @@
label_mac="$wan_mac"
;;
mikrotik,lhgg-60ad|\
+ mikrotik,lhgg-5acd|\
mikrotik,sxtsq-5-ac)
lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base)
label_mac="$lan_mac"
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-lhgg-5acd.dts
@@ -0,0 +1,239 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/* Copyright (c) 2020, Robert Marko <robimarko@gmail.com> */
+
+#include "qcom-ipq4019.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+/ {
+ model = "MikroTik LHG 5 ac (RBLHGG-5acD)";
+ compatible = "mikrotik,lhgg-5acd";
+
+ memory {
+ device_type = "memory";
+ reg = <0x80000000 0x10000000>;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ aliases {
+ led-boot = &led_user;
+ led-failsafe = &led_user;
+ led-running = &led_user;
+ led-upgrade = &led_user;
+ };
+
+ soc {
+ rng@22000 {
+ status = "okay";
+ };
+
+ mdio@90000 {
+ status = "okay";
+ };
+
+ counter@4a1000 {
+ compatible = "qcom,qca-gcnt";
+ reg = <0x4a1000 0x4>;
+ };
+
+ tcsr@1949000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1949000 0x100>;
+ qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
+ };
+
+ ess_tcsr@1953000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1953000 0x1000>;
+ qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII4>;
+ };
+
+ tcsr@1957000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1957000 0x100>;
+ qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
+ };
+
+ crypto@8e3a000 {
+ status = "okay";
+ };
+
+ watchdog@b017000 {
+ status = "okay";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ power {
+ label = "blue:power";
+ gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
+ default-state = "keep";
+ panic-indicator;
+ };
+
+ led_user: user {
+ label = "green:user";
+ gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ rssilow {
+ label = "green:rssilow";
+ gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
+ };
+
+ rssimediumlow {
+ label = "green:rssimediumlow";
+ gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ rssimedium {
+ label = "green:rssimedium";
+ gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ rssimediumhigh {
+ label = "green:rssimediumhigh";
+ gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ rssihigh {
+ label = "green:rssihigh";
+ gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&tlmm {
+ serial_pins: serial_pinmux {
+ mux {
+ pins = "gpio60", "gpio61";
+ function = "blsp_uart0";
+ bias-disable;
+ };
+ };
+
+ spi_0_pins: spi_0_pinmux {
+ pin {
+ function = "blsp_spi0";
+ pins = "gpio55", "gpio56", "gpio57";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ pin_cs {
+ function = "gpio";
+ pins = "gpio54";
+ drive-strength = <2>;
+ bias-disable;
+ output-high;
+ };
+ };
+};
+
+&blsp_dma {
+ status = "okay";
+};
+
+&blsp1_spi1 {
+ status = "okay";
+
+ pinctrl-0 = <&spi_0_pins>;
+ pinctrl-names = "default";
+ cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
+
+ flash@0 {
+ reg = <0>;
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "Qualcomm";
+ reg = <0x0 0x80000>;
+ read-only;
+ };
+
+ partition@80000 {
+ compatible = "mikrotik,routerboot-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ label = "RouterBoot";
+ reg = <0x80000 0x80000>;
+
+ hard_config {
+ read-only;
+ };
+
+ dtb_config {
+ read-only;
+ };
+
+ soft_config {
+ };
+ };
+
+ partition@100000 {
+ compatible = "mikrotik,minor";
+ label = "firmware";
+ reg = <0x100000 0xf00000>;
+ };
+ };
+ };
+};
+
+&blsp1_uart1 {
+ status = "okay";
+
+ pinctrl-0 = <&serial_pins>;
+ pinctrl-names = "default";
+};
+
+&cryptobam {
+ status = "okay";
+};
+
+&wifi1 {
+ status = "okay";
+
+ qcom,ath10k-calibration-variant = "MikroTik-LHGG-5acD";
+};
+
+&mdio {
+ status = "okay";
+};
+
2023-01-10 00:02:17 -07:00
+&gmac0 {
Update AREDN to OpenWRT 22.3.2 (Major Upgrade) (#574) * Update to Openwrt 21.02 and add support for the CPE710 v1 Update scripts to change references to ifname to device due to a change in Openwrt naming reverse-wpad-basic-wolfssl and disable SSL on Curl NOTE: The compile host must have python3-distutils installed for gpsd to build * aredn: initial working upgrade to openwrt 21.02.1 * aredn: update 1 to working upgrade to openwrt 21.02.1 * aredn: add cpe710v1 to build config * Andrew's patches * Remove duplicates + display perl * Temp disable wifi extension patch * ifname/ports support * Add spectrum patch back in * Generic function to extra interfaces * New api to get wifi ifname * Disables jails * Style link * aredn: partial upgrade to openwrt 22.0.3.0 added AC device images and partial migration to 22.0.3.0 firewall upgrade pending * aredn: update mesh-release and revert config.mk * Unused * NFT firewall rewrite * Common-isze configs * Fix network layout for hap2 * Use local packages dev (new firewall rules) * Add HAP2 * Add pause after network restart to let bridge reinitialize * Various lua fixes for new lua version * Tweak config * Re-fix networking (lost patch change) * Add new radio names * Tolerate missing wifi * Fix hap-lite switch setup * More devices * New radio id * Build Rocket 5AC lite * Remove need for luci.sys * Remove need for luci.sys * Explicitly name wlan interfaces * Handle different compatibility verisoning * Update networking for switches * ipref version bump * Extra flag for curl * Better compat_version fix * Remove wolfssl * Fix dns server * Fix device name * Unused * Remove things we dont need * Remove unused packages * Generic macaddr overrides * Fix uci commit * Fix luci.template.parser to avoid luci.http loading the real thing * Rocket-M build * Add search-domain dhcp option * Turn of ipv6 * No IPV6 in dnsmasq * Override mac addresses if devices all the same * Working from master (for now) * Put back hostap * Disable old ethmac fixup * Tweak configs * Move back to v22.03.2 Leave ipq4019 builds to master * Need IPV6 to compile nft firewall * Rocket-M fixes * Before we start * WIP * Working snapshot * Cleaned patches * Merged patch * Single patch to support HAP2 * Fix typo * Add nanostation-m * 5/10Mhz patch * 5+10MHz patch for ath10k-ct driver * Extend 2Ghz channel check to include -4 to -1 * Add chanbw setup for ath10k (like ath9k) * Added TP-Link CPE710 v1 * Override firmwares * Missing patch * Dropbear config like 3.22.8.0 * Add Ubiquiti Rocket 5AC Lite * Fix c6 * Update * Need more scan channels * Remove IPV6 * Improve mac fixups * Put back missing nft app * IPv6 removed so dont have to disable it * Fix rocket-m flash bug * Fix nanostation-m * Nanobridge is tiny * Fix wifi order for ar750 * Rocket M5 XW support * New rates * Fix firewall4 so we don't need IPv6 * Allow channel width to be restricted * Move channel list into library * Fix naming * Mechanism to block specific channels on specific radios * Refresh buttons * routerboard-sxt-5nd * CPE605 v1.0 * Improve rocket m xw * tpink * Update patch * Update to remove disable * Remove BW restrictions on cpe710 * Restrict to what has been tested * Remove test BW restrictions * sxtsq-5-ac * Update * Update * powerbeam-m5-300 support * Fix * Fix hap2 * Tidy unused patches * Remove limit * Add ubnt_bullet-m-ar7241 * Added ubnt_nanobeam-ac-gen2 * Fix typo * Tolerate missing dtd ip * Explicitly gix hap2 mac addresses * Fix some broken patches * Hap2 wont work at 5MHz * Ubiquiti LiteBeam 5AC Gen2 * Fix compat_version for sxt 5ac * Update patch * Unused * Fix lan configuration for some devices * Rolling average of noise level * Unused * Split out the ath10k rssi monitor (its very simple at the moment) * Ignore .DS_Store * Reboot if ethernet doesnt come up (but only once!) * reboot returns - add exit * Add some logging info * Fix ] * Check all possibly ethernet bridges * Improve mac fixing * Remove HostAP on small memory devices * Reduce dropbear footprint * Add setsid * Kill hostap when upgrading to save memory * Different way to detect hostapd unavailable * New build steps * Improve manager logging * Fix name conflict for the two monitors * Try to improve test mesh name resolve problem * Migrate tiny to generic (tiny doesnt work properly) * Typo * Another attempt to fix macs for Mikrotik * Protect against missing trackers * Fix wpad for ipq40xx * Remove old tunnel check code * Enable ZRAM swap to aid low memory devices * ath10k noise can something be out of range - protect against that * Updated with current devices and status * Update firmware which has been tested * Updated with more builds * More binary/README * Fix css error * Start noise at sensible base level * Unfix the css so it looks how it use to. * Save as much memory as we can on lowmem nodes * Hide some options on low memory devices * Add "eol" to 32MB devices * Restart network rather than reboot node if it seems to be broken * Fixes * Revert network reset * Fix ar750 networking * Continue to trim tiny configs * More devices * Dump IW output messages * Fix Rocket 5AC intermittent ethernet issue * Ethernet fix for PowerBeam 5AC 500 * More tiny size reduction * More support data * Fixed POE and USB power features * Add Ubiquiti NanoBeam AC (gen1) * NanoStation (not NanoBeam) * Add mii-tool package * Device updates * Bump update time to 5 minutes * Fix ethernet negotiation for rocker-5ac and nanobeam * Fix iplookup * Config changes based on call feedback * Radio listing fixes * Update with more untested builds * Fallback TxMbps extracted from iw station dump * Fix tunnel detection for low memory nodes * Remove unused feed packages * snapshot build * Update stability info * Add powerbeam-5ac-500 * Typo * Add missing 3.22.1.0 * Add MikroTik LHG 5 AC * Fix permissions * Fix permissions * AirGrid's take Bullet builds * Mikrotik AC3 * Improve supportdata structure a little to make it easier to find things * Restore WAN VLAN overrides * Fix vlan regex for hap2 and hap3 * Support old and new style poe controls * hap-ac3 is version 1.1 * Handle typo in some openwrt config files * Fix HAP AC3 install * Update hap ac3 status * Support user overrides for network ports (non-swconfig devices) * LHG 5AC support * Remove -nand * Remove non-working platform.sh change * tunnel weight override * Omit LinkQualityMult when value is 1 * Add mANTBox 19s and 15s * Support ath79 mikrotik devices which require ath10k in the initramfs Co-authored-by: apcameron <apcameron@softhome.net> Co-authored-by: Joe AE6XE <ae6xe@arrl.net> Co-authored-by: Joe Ayers <joe@arrl.net>
2022-12-22 13:22:49 -07:00
+ status = "okay";
+};
+
+&switch {
+ status = "okay";
+
+ /delete-property/ psgmii-ethphy;
+};
+
+&swport5 {
+ status = "okay";
+
+ label = "lan";
+ phy-mode = "rgmii";
+};
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -197,6 +197,7 @@
mikrotik,cap-ac |\
mikrotik,hap-ac2 |\
mikrotik,hap-ac3 |\
+ mikrotik,lhgg-5acd |\
mikrotik,sxtsq-5-ac)
wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0x8000 0x2f20 ) || \
@@ -236,6 +237,7 @@
mikrotik,cap-ac |\
mikrotik,hap-ac2 |\
mikrotik,hap-ac3 |\
+ mikrotik,lhgg-5acd |\
mikrotik,sxtsq-5-ac)
wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
( [ -f "$wlan_data" ] && caldata_sysfsload_from_file "$wlan_data" 0xaf20 0x2f20 ) || \
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -163,12 +163,13 @@
;;
mikrotik,cap-ac|\
mikrotik,hap-ac2|\
+ mikrotik,lhgg-5acd|\
mikrotik,lhgg-60ad|\
mikrotik,sxtsq-5-ac)
[ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware
default_do_upgrade "$1"
;;
mikrotik,hap-ac3)
platform_do_upgrade_mikrotik_nand "$1"
;;
netgear,rbr50 |\
--- a/target/linux/ath79/image/common-mikrotik.mk
+++ b/target/linux/ath79/image/common-mikrotik.mk
@@ -17,5 +17,4 @@
IMAGE/sysupgrade.bin = append-kernel | kernel2minor -s 2048 -e -c | \
sysupgrade-tar kernel=$$$$@ | append-metadata
DEVICE_PACKAGES := nand-utils
- DEFAULT := n
endef
--- a/target/linux/ath79/image/mikrotik.mk
+++ b/target/linux/ath79/image/mikrotik.mk
@@ -28,6 +28,16 @@
endef
TARGET_DEVICES += mikrotik_routerboard-921gs-5hpacd-15s
+define Device/mikrotik_routerboard-921gs-5hpacd-19s
+ $(Device/mikrotik_nand)
+ SOC := qca9558
+ DEVICE_MODEL := RouterBOARD 921GS-5HPacD-19s (mANTBox 19s)
+ DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct kmod-i2c-gpio \
+ kmod-sfp
+ SUPPORTED_DEVICES += rb-921gs-5hpacd-r2
+endef
+TARGET_DEVICES += mikrotik_routerboard-921gs-5hpacd-19s
+
define Device/mikrotik_routerboard-922uags-5hpacd
$(Device/mikrotik_nand)
SOC := qca9558
--- /dev/null
+++ b/target/linux/ath79/dts/qca9558_mikrotik_routerboard-921gs-5hpacd-19s.dts
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9558_mikrotik_routerboard-92x.dtsi"
+
+/ {
+ compatible = "mikrotik,routerboard-921gs-5hpacd-19s", "qca,qca9558";
+ model = "MikroTik RouterBOARD 921GS-5HPacD-19s";
+
+ ath10k-leds {
+ compatible = "gpio-leds";
+
+ wlan5g {
+ label = "green:wlan5g";
+ gpios = <&ath10k 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+};
+
+&pcie1 {
+ status = "okay";
+
+ ath10k: wifi@0,0 {
+ compatible = "qcom,ath10k";
+ reg = <0 0 0 0 0>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ };
+};
--- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -12,6 +12,7 @@
"ath10k/cal-pci-0000:00:00.0.bin")
case $board in
mikrotik,routerboard-921gs-5hpacd-15s|\
+ mikrotik,routerboard-921gs-5hpacd-19s|\
mikrotik,routerboard-951ui-2nd|\
mikrotik,routerboard-952ui-5ac2nd|\
mikrotik,routerboard-962uigs-5hact2hnt|\
--- a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
@@ -34,6 +34,7 @@
mikrotik,routerboard-493g|\
mikrotik,routerboard-912uag-2hpnd|\
mikrotik,routerboard-921gs-5hpacd-15s|\
+ mikrotik,routerboard-921gs-5hpacd-19s|\
mikrotik,routerboard-922uags-5hpacd|\
mikrotik,routerboard-sxt-5nd-r2)
platform_do_upgrade_mikrotik_nand "$1"
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-5hpnd.dts
@@ -0,0 +1,240 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "ar9344.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "mikrotik,routerboard-912uag-5hpnd", "qca,ar9342";
+ model = "MikroTik RouterBOARD 912UAG-5HPnD";
+
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
+ gpio_key: gpio_key {
+ compatible = "mikrotik,gpio-rb91x-key";
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio = <&gpio 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio_latch: gpio_latch {
+ compatible = "gpio-latch";
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>,
+ <&gpio 1 GPIO_ACTIVE_HIGH>,
+ <&gpio 2 GPIO_ACTIVE_HIGH>,
+ <&gpio 3 GPIO_ACTIVE_HIGH>,
+ <0>, /* Not connected */
+ <&gpio 13 GPIO_ACTIVE_HIGH>,
+ <&gpio 14 GPIO_ACTIVE_HIGH>,
+ <&gpio_key 0 GPIO_ACTIVE_HIGH>,
+ <&gpio 11 GPIO_ACTIVE_LOW>; /* Latch Enable */
+ };
+
+ nand_gpio {
+ compatible = "mikrotik,rb91x-nand";
+
+ gpios = <&gpio_latch 3 GPIO_ACTIVE_HIGH>, /* Read */
+ <&gpio 4 GPIO_ACTIVE_HIGH>, /* Ready (RDY) */
+ <&gpio_latch 5 GPIO_ACTIVE_LOW>, /* Chip Enable (nCE) */
+ <&gpio_latch 6 GPIO_ACTIVE_HIGH>, /* Command Latch Enable (CLE) */
+ <&gpio_latch 7 GPIO_ACTIVE_HIGH>, /* Address Latch Enable (ALE) */
+ <&gpio 12 GPIO_ACTIVE_LOW>, /* Read/Write Enable (nRW) */
+ <&gpio_latch 8 GPIO_ACTIVE_LOW>, /* Latch Enable (nLE) */
+ <&gpio_key 2 GPIO_ACTIVE_HIGH>; /* Key poll disable */
+
+ partitions {
+ compatible = "fixed-partitions";
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "booter";
+ reg = <0x0 0x0040000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "kernel";
+ reg = <0x0040000 0x03c0000>;
+ };
+
+ partition@400000 {
+ label = "ubi";
+ reg = <0x0400000 0x7c00000>;
+ };
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <20>;
+
+ button@0 {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio_key 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpio_latch 1 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };
+
+ user {
+ label = "green:user";
+ gpios = <&gpio_latch 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ led1 {
+ label = "green:led1";
+ gpios = <&ssr 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ led2 {
+ label = "green:led2";
+ gpios = <&ssr 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ led3 {
+ label = "green:led3";
+ gpios = <&ssr 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ led4 {
+ label = "green:led4";
+ gpios = <&ssr 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ led5 {
+ label = "green:led5";
+ gpios = <&ssr 4 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+
+ beeper {
+ gpio-export,name = "beeper";
+ gpio-export,output = <1>; /* Must be 1 to avoid EMI induced clicking noise */
+ gpios = <&ssr 5 GPIO_ACTIVE_HIGH>;
+ };
+
+ usb_power {
+ gpio-export,name = "power-usb";
+ gpio-export,output = <1>;
+ gpios = <&ssr 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ pcie_power {
+ gpio-export,name = "power-pcie";
+ gpio-export,output = <0>;
+ gpios = <&ssr 7 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&ref {
2023-01-09 19:05:55 -07:00
+ clock-frequency = <40000000>;
+};
+
+&spi {
+ status = "okay";
+
+ compatible = "qca,ar7100-spi";
+
+ cs-gpios = <0>, <&gpio_latch 0 GPIO_ACTIVE_LOW>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "mikrotik,routerboot-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "routerboot";
+ reg = <0x0 0x0>;
+ read-only;
+ };
+
+ hard_config: hard_config {
+ read-only;
+ };
+
+ bios {
+ size = <0x1000>;
+ read-only;
+ };
+
+ soft_config {
+ };
+ };
+ };
+
+ ssr: ssr@1 {
+ compatible = "fairchild,74hc595";
+ gpio-controller;
+ #gpio-cells = <2>;
+ registers-number = <1>;
+ reg = <1>;
+ spi-max-frequency = <50000000>;
+ };
+};
+
+&mdio0 {
+ status = "okay";
+
+ phy-mask = <0>;
+
+ phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+};
+
+&eth0 {
+ status = "okay";
+
+ phy-mode = "rgmii-id";
+ phy-handle = <&phy0>;
+ pll-data = <0x02000000 0x00000101 0x00001313>;
+
+ gmac-config {
2023-01-10 00:02:17 -07:00
+ device = <&gmac0>;
+ rgmii-gmac0 = <1>;
+ rxd-delay = <1>;
+ txd-delay = <1>;
+ };
+};
+
+&wmac {
+ status = "okay";
+ qca,no-eeprom;
+};
+
+&pcie {
+ status = "okay";
+};
+
+&usb {
+ status = "okay";
+};
+
+&usb_phy {
+ status = "okay";
+};
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -15,6 +15,7 @@
"0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
;;
mikrotik,routerboard-912uag-2hpnd|\
+ mikrotik,routerboard-912uag-5hpnd|\
mikrotik,routerboard-lhg-2nd|\
mikrotik,routerboard-lhg-5nd|\
mikrotik,routerboard-mapl-2nd|\
@@ -69,6 +70,7 @@
case "$board" in
mikrotik,routerboard-912uag-2hpnd|\
+ mikrotik,routerboard-912uag-5hpnd|\
mikrotik,routerboard-lhg-2nd|\
mikrotik,routerboard-lhg-5nd|\
mikrotik,routerboard-map-2nd|\
--- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -24,6 +24,7 @@
"ath9k-eeprom-ahb-18100000.wmac.bin")
case $board in
mikrotik,routerboard-912uag-2hpnd|\
+ mikrotik,routerboard-912uag-5hpnd|\
mikrotik,routerboard-lhg-2nd|\
mikrotik,routerboard-lhg-5nd|\
mikrotik,routerboard-sxt-5nd|\
--- a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
@@ -33,6 +33,7 @@
case "$board" in
mikrotik,routerboard-493g|\
mikrotik,routerboard-912uag-2hpnd|\
+ mikrotik,routerboard-912uag-5hpnd|\
mikrotik,routerboard-921gs-5hpacd-15s|\
mikrotik,routerboard-921gs-5hpacd-19s|\
mikrotik,routerboard-922uags-5hpacd|\
--- a/target/linux/ath79/image/mikrotik.mk
+++ b/target/linux/ath79/image/mikrotik.mk
@@ -18,6 +18,15 @@
endef
TARGET_DEVICES += mikrotik_routerboard-912uag-2hpnd
+define Device/mikrotik_routerboard-912uag-5hpnd
+ $(Device/mikrotik_nand)
+ SOC := ar9342
+ DEVICE_MODEL := RouterBOARD 912UAG-5HPnD
+ DEVICE_PACKAGES += kmod-usb-ehci kmod-usb2
+ SUPPORTED_DEVICES += rb-912uag-5hpnd
+endef
+TARGET_DEVICES += mikrotik_routerboard-912uag-5hpnd
+
define Device/mikrotik_routerboard-921gs-5hpacd-15s
$(Device/mikrotik_nand)
SOC := qca9558