OSDN Git Service

Merge Official Source
authorZiMing Mo <msylgj@immortalwrt.org>
Mon, 25 Apr 2022 14:09:00 +0000 (22:09 +0800)
committerZiMing Mo <msylgj@immortalwrt.org>
Mon, 25 Apr 2022 14:13:01 +0000 (22:13 +0800)
Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
29 files changed:
include/kernel-5.10
include/kernel-5.15
package/boot/uboot-envtools/files/ramips
package/kernel/mt76/Makefile
package/network/config/firewall4/Makefile
package/network/config/firewall4/patches/001-firewall4-add-support-for-fullcone-nat.patch
package/network/utils/iwinfo/Makefile
package/utils/ucode/Makefile
target/linux/ath79/image/generic-ubnt.mk
target/linux/ath79/image/nand.mk
target/linux/ath79/patches-5.10/600-of_net-add-mac-address-ascii-support.patch
target/linux/ath79/patches-5.10/901-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
target/linux/ath79/patches-5.15/600-of_net-add-mac-address-ascii-support.patch
target/linux/bcm27xx/patches-5.10/950-0409-drm-atomic-Pass-the-full-state-to-CRTC-atomic_check.patch
target/linux/bcm27xx/patches-5.10/950-0527-drm-connector-Create-a-helper-to-attach-the-hdr_outp.patch
target/linux/bcm27xx/patches-5.10/950-0528-drm-connector-Add-helper-to-compare-HDR-metadata.patch
target/linux/bcm27xx/patches-5.10/950-0689-drm-automatic-legacy-gamma-support.patch
target/linux/bcm63xx/profiles/default.mk
target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
target/linux/generic/pending-5.10/834-ledtrig-libata.patch
target/linux/generic/pending-5.15/834-ledtrig-libata.patch
target/linux/oxnas/patches-5.10/999-libata-hacks.patch
target/linux/ramips/dts/mt7621_tplink_re650-v2.dts [new file with mode: 0644]
target/linux/ramips/dts/mt7621_yuncore_ax820.dts [new file with mode: 0644]
target/linux/ramips/image/mt7621.mk
target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
target/linux/ramips/mt7621/base-files/etc/board.d/02_network
target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
tools/firmware-utils/Makefile

index 76c5ff4..6a0cb0c 100644 (file)
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.10 = .111
-LINUX_KERNEL_HASH-5.10.111 = 1831b3d8765592ce91e51441bb179d908f6bcfe8c78d03c2bec8c675c4a0ab1a
+LINUX_VERSION-5.10 = .112
+LINUX_KERNEL_HASH-5.10.112 = 8c6c1dc361ebb1ef63a7666b2069c9d7cdcec8ebb706b03780af1c8bb03b4aa5
index 31ee311..1d8ca84 100644 (file)
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .34
-LINUX_KERNEL_HASH-5.15.34 = a7514685392f0f89b337fa252a10a004c6a97d23e8d1126059c8e373398fdb69
+LINUX_VERSION-5.15 = .35
+LINUX_KERNEL_HASH-5.15.35 = 0a1a5ae2f30eb2b38215e59077f045aabd7f4e2857a881482f02ea48186105d8
index 92118a6..d97c812 100644 (file)
@@ -23,7 +23,8 @@ sitecom,wlr-4100-v1-002)
        ;;
 allnet,all0256n-4m|\
 allnet,all0256n-8m|\
-allnet,all5002)
+allnet,all5002|\
+yuncore,ax820)
        ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
        ;;
 ampedwireless,ally-00x19k|\
index 58e3bdf..cc66193 100644 (file)
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2022-04-20
-PKG_SOURCE_VERSION:=eecbb49920732b9b364f15c1ef0066342544b22b
-PKG_MIRROR_HASH:=1a5c171d1713baadd5ba7da3c036a129a0ac318e5b3f4e98f719e9a92a510c44
+PKG_SOURCE_DATE:=2022-04-23
+PKG_SOURCE_VERSION:=a666d5637bc3afd3e310be09fac048906560097b
+PKG_MIRROR_HASH:=1a7f7a36e5e376d1b18da98c7939f980855f1981be0c3ad7024360dee702c9f8
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_USE_NINJA:=0
index 2cc51bd..cb9a442 100644 (file)
@@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git
-PKG_SOURCE_DATE:=2022-04-02
-PKG_SOURCE_VERSION:=a3788839d61742799b6c62f2d8790c464b7374fc
-PKG_MIRROR_HASH:=9b1c5d27d7d0022388693db679f9518216932ed1f39c096e1242c4d9e3fd897a
+PKG_SOURCE_DATE:=2022-04-21
+PKG_SOURCE_VERSION:=fc83d462621476be3b2861a93ac3a641e3f717c8
+PKG_MIRROR_HASH:=ca0438e04951d2c2ed58ccfca4f4a5b74f7ae96fa5560e98f8d8c5e9d083f451
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=ISC
 
index 2f2452e..78a2079 100644 (file)
@@ -34,7 +34,7 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
  {% let flowtable_devices = fw4.resolve_offload_devices(); -%}
  
  table inet fw4
-@@ -237,6 +238,10 @@ table inet fw4 {
+@@ -238,6 +239,10 @@ table inet fw4 {
  {%   for (let redirect in fw4.redirects("dstnat_"+zone.name)): %}
                {%+ include("redirect.uc", { fw4, redirect }) %}
  {%   endfor %}
@@ -45,7 +45,7 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
        }
  
  {%  endif %}
-@@ -245,20 +250,24 @@ table inet fw4 {
+@@ -246,20 +251,24 @@ table inet fw4 {
  {%   for (let redirect in fw4.redirects("srcnat_"+zone.name)): %}
                {%+ include("redirect.uc", { fw4, redirect }) %}
  {%   endfor %}
index 7eea89a..b01a1a3 100644 (file)
@@ -11,9 +11,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
-PKG_SOURCE_DATE:=2022-03-01
-PKG_SOURCE_VERSION:=90bfbb9a3ac39e41c59a9802d0730560eb7d0f83
-PKG_MIRROR_HASH:=31cae75dbe1cf347a8c768769bb7a772eeff4970c9b1ba3ab5d260ac056a1161
+PKG_SOURCE_DATE:=2022-04-24
+PKG_SOURCE_VERSION:=a479b9b08aeac82fd45cc7a306937c9447157f5e
+PKG_MIRROR_HASH:=ed3e8d0b665f2ee95117fe86fc5619d90f9e4849d518111c2f62ebd58ea99f35
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=GPL-2.0
 
index 6df5d2a..bd31c6f 100644 (file)
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/jow-/ucode.git
-PKG_SOURCE_DATE:=2022-04-07
-PKG_SOURCE_VERSION:=33f1e0b0926e973fb5ae445e9a995848762143bb
-PKG_MIRROR_HASH:=e419678244c5402c739e3a200d6d1d7cd6989a711c73744bc68b2d5b76bae33a
+PKG_SOURCE_DATE:=2022-04-13
+PKG_SOURCE_VERSION:=e14b0993b101839d2d40b5c4f184e6b0c2083b65
+PKG_MIRROR_HASH:=50771ea70be071626cfb682627713f818d740bc91ccadad0ba0aad5bef08a865
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=ISC
 
index 0b613df..153b73a 100644 (file)
@@ -434,6 +434,7 @@ endef
 define Device/ubnt_unifiac-lite
   $(Device/ubnt_unifiac)
   DEVICE_MODEL := UniFi AC Lite
+  DEVICE_PACKAGES += -swconfig
   SUPPORTED_DEVICES += unifiac-lite
 endef
 TARGET_DEVICES += ubnt_unifiac-lite
@@ -441,6 +442,7 @@ TARGET_DEVICES += ubnt_unifiac-lite
 define Device/ubnt_unifiac-lr
   $(Device/ubnt_unifiac)
   DEVICE_MODEL := UniFi AC LR
+  DEVICE_PACKAGES += -swconfig
   SUPPORTED_DEVICES += unifiac-lite ubnt,unifiac-lite
 endef
 TARGET_DEVICES += ubnt_unifiac-lr
@@ -448,6 +450,7 @@ TARGET_DEVICES += ubnt_unifiac-lr
 define Device/ubnt_unifiac-mesh
   $(Device/ubnt_unifiac)
   DEVICE_MODEL := UniFi AC Mesh
+  DEVICE_PACKAGES += -swconfig
   SUPPORTED_DEVICES += unifiac-lite
 endef
 TARGET_DEVICES += ubnt_unifiac-mesh
index 0cf8f33..726fab0 100644 (file)
@@ -334,7 +334,8 @@ TARGET_DEVICES += zte_mf286a
 define Device/zte_mf286r
   $(Device/zte_mf286_common)
   DEVICE_MODEL := MF286R
-  DEVICE_PACKAGES += ath10k-firmware-qca9888-ct kmod-usb-net-rndis kmod-usb-acm
+  DEVICE_PACKAGES += ath10k-firmware-qca9888-ct kmod-usb-net-rndis kmod-usb-acm \
+       comgt-ncm
 endef
 TARGET_DEVICES += zte_mf286r
 
index 8849afb..1788419 100644 (file)
@@ -1,8 +1,6 @@
-Index: linux-5.15.31/net/ethernet/eth.c
-===================================================================
---- linux-5.15.31.orig/net/ethernet/eth.c
-+++ linux-5.15.31/net/ethernet/eth.c
-@@ -544,6 +544,63 @@ int eth_platform_get_mac_address(struct
+--- a/net/ethernet/eth.c
++++ b/net/ethernet/eth.c
+@@ -545,6 +545,63 @@ int eth_platform_get_mac_address(struct
  }
  EXPORT_SYMBOL(eth_platform_get_mac_address);
  
@@ -64,9 +62,9 @@ Index: linux-5.15.31/net/ethernet/eth.c
 +};
 +
  /**
-  * nvmem_get_mac_address - Obtain the MAC address from an nvmem cell named
-  * 'mac-address' associated with given device.
-@@ -557,19 +614,23 @@ int nvmem_get_mac_address(struct device
+  * Obtain the MAC address from an nvmem cell named 'mac-address' associated
+  * with given device.
+@@ -558,19 +615,23 @@ int nvmem_get_mac_address(struct device
  {
        struct nvmem_cell *cell;
        const void *mac;
index 5b3260e..e6fae33 100644 (file)
@@ -14,13 +14,13 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
 
 --- a/drivers/net/mdio/mdio-bitbang.c
 +++ b/drivers/net/mdio/mdio-bitbang.c
-@@ -14,6 +14,7 @@
-  * Vitaly Bordug <vbordug@ru.mvista.com>
+@@ -15,6 +15,7 @@
   */
  
+ #include <linux/delay.h>
 +#include <linux/irqflags.h>
- #include <linux/module.h>
  #include <linux/mdio-bitbang.h>
+ #include <linux/module.h>
  #include <linux/types.h>
 @@ -153,7 +154,9 @@ static int mdiobb_read(struct mii_bus *b
  {
index 8849afb..2e1e729 100644 (file)
@@ -1,7 +1,5 @@
-Index: linux-5.15.31/net/ethernet/eth.c
-===================================================================
---- linux-5.15.31.orig/net/ethernet/eth.c
-+++ linux-5.15.31/net/ethernet/eth.c
+--- a/net/ethernet/eth.c
++++ b/net/ethernet/eth.c
 @@ -544,6 +544,63 @@ int eth_platform_get_mac_address(struct
  }
  EXPORT_SYMBOL(eth_platform_get_mac_address);
index 27e44d9..a110b7a 100644 (file)
@@ -201,7 +201,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20201028123222.1732139-1-max
 
 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
 +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
-@@ -5605,17 +5605,19 @@ static void dm_update_crtc_active_planes
+@@ -5606,17 +5606,19 @@ static void dm_update_crtc_active_planes
  }
  
  static int dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
@@ -225,7 +225,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20201028123222.1732139-1-max
                WARN_ON(1);
                return ret;
        }
-@@ -5626,8 +5628,8 @@ static int dm_crtc_helper_atomic_check(s
+@@ -5627,8 +5629,8 @@ static int dm_crtc_helper_atomic_check(s
         * planes are disabled, which is not supported by the hardware. And there is legacy
         * userspace which stops using the HW cursor altogether in response to the resulting EINVAL.
         */
index 64b7f2c..5ccff18 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
 +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
-@@ -6531,9 +6531,7 @@ void amdgpu_dm_connector_init_helper(str
+@@ -6532,9 +6532,7 @@ void amdgpu_dm_connector_init_helper(str
        if (connector_type == DRM_MODE_CONNECTOR_HDMIA ||
            connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
            connector_type == DRM_MODE_CONNECTOR_eDP) {
index 3e61bb4..4cc8aa6 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
 
 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
 +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
-@@ -5476,25 +5476,6 @@ static int fill_hdr_info_packet(const st
+@@ -5477,25 +5477,6 @@ static int fill_hdr_info_packet(const st
        return 0;
  }
  
@@ -47,7 +47,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
  static int
  amdgpu_dm_connector_atomic_check(struct drm_connector *conn,
                                 struct drm_atomic_state *state)
-@@ -5510,7 +5491,7 @@ amdgpu_dm_connector_atomic_check(struct
+@@ -5511,7 +5492,7 @@ amdgpu_dm_connector_atomic_check(struct
        if (!crtc)
                return 0;
  
index d536e67..8cf7f99 100644 (file)
@@ -42,7 +42,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20201211114237.213288-2-tomi
 
 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
 +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
-@@ -4992,7 +4992,6 @@ static void dm_disable_vblank(struct drm
+@@ -4993,7 +4993,6 @@ static void dm_disable_vblank(struct drm
  static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = {
        .reset = dm_crtc_reset_state,
        .destroy = amdgpu_dm_crtc_destroy,
index 6928cdb..3e8b07d 100644 (file)
@@ -8,7 +8,7 @@ define Profile/Default
   PRIORITY:=1
 endef
 
-define Profile/Default/description
+define Profile/Default/Description
   Package set compatible with most boards.
 endef
 
index 3b7f618..fe12ffd 100644 (file)
@@ -1294,7 +1294,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
-@@ -398,7 +398,7 @@ static int socfpga_dwmac_probe(struct pl
+@@ -395,7 +395,7 @@ static int socfpga_dwmac_probe(struct pl
        if (ret)
                return ret;
  
index 25cffb1..5b10f12 100644 (file)
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  /**
   *    ata_build_rw_tf - Build ATA taskfile for given read/write request
   *    @tf: Target ATA taskfile
-@@ -4548,6 +4561,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -4551,6 +4564,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
                if (tag < 0)
                        return NULL;
        }
@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
        qc = __ata_qc_from_tag(ap, tag);
        qc->tag = qc->hw_tag = tag;
-@@ -5326,6 +5342,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5329,6 +5345,9 @@ struct ata_port *ata_port_alloc(struct a
        ap->stats.unhandled_irq = 1;
        ap->stats.idle_irq = 1;
  #endif
@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        ata_sff_port_init(ap);
  
        return ap;
-@@ -5361,6 +5380,12 @@ static void ata_host_release(struct kref
+@@ -5364,6 +5383,12 @@ static void ata_host_release(struct kref
  
                kfree(ap->pmp_link);
                kfree(ap->slave_link);
@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
                kfree(ap);
                host->ports[i] = NULL;
        }
-@@ -5767,7 +5792,23 @@ int ata_host_register(struct ata_host *h
+@@ -5770,7 +5795,23 @@ int ata_host_register(struct ata_host *h
                host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
                host->ports[i]->local_port_no = i + 1;
        }
index dca9f33..3977b57 100644 (file)
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  /**
   *    ata_build_rw_tf - Build ATA taskfile for given read/write request
   *    @tf: Target ATA taskfile
-@@ -4573,6 +4586,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -4576,6 +4589,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
                if (tag < 0)
                        return NULL;
        }
@@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  
        qc = __ata_qc_from_tag(ap, tag);
        qc->tag = qc->hw_tag = tag;
-@@ -5351,6 +5367,9 @@ struct ata_port *ata_port_alloc(struct a
+@@ -5354,6 +5370,9 @@ struct ata_port *ata_port_alloc(struct a
        ap->stats.unhandled_irq = 1;
        ap->stats.idle_irq = 1;
  #endif
@@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        ata_sff_port_init(ap);
  
        return ap;
-@@ -5386,6 +5405,12 @@ static void ata_host_release(struct kref
+@@ -5389,6 +5408,12 @@ static void ata_host_release(struct kref
  
                kfree(ap->pmp_link);
                kfree(ap->slave_link);
@@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
                kfree(ap);
                host->ports[i] = NULL;
        }
-@@ -5792,7 +5817,23 @@ int ata_host_register(struct ata_host *h
+@@ -5795,7 +5820,23 @@ int ata_host_register(struct ata_host *h
                host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
                host->ports[i]->local_port_no = i + 1;
        }
index 84d4188..5af87b4 100644 (file)
@@ -15,7 +15,7 @@
        /* initialize internal qc */
        qc = __ata_qc_from_tag(ap, ATA_TAG_INTERNAL);
  
-@@ -4555,6 +4563,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
+@@ -4558,6 +4566,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
        if (unlikely(ap->pflags & ATA_PFLAG_FROZEN))
                return NULL;
  
@@ -25,7 +25,7 @@
        /* libsas case */
        if (ap->flags & ATA_FLAG_SAS_HOST) {
                tag = ata_sas_allocate_tag(ap);
-@@ -4600,6 +4611,8 @@ void ata_qc_free(struct ata_queued_cmd *
+@@ -4603,6 +4614,8 @@ void ata_qc_free(struct ata_queued_cmd *
                qc->tag = ATA_TAG_POISON;
                if (ap->flags & ATA_FLAG_SAS_HOST)
                        ata_sas_free_tag(tag, ap);
diff --git a/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts b/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts
new file mode 100644 (file)
index 0000000..aa65b68
--- /dev/null
@@ -0,0 +1,195 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "tplink,re650-v2", "mediatek,mt7621-soc";
+       model = "TP-Link RE650 v2";
+
+       aliases {
+               label-mac-device = &gmac0;
+               led-boot = &led_power;
+               led-failsafe = &led_power;
+               led-running = &led_power;
+               led-upgrade = &led_power;
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               wps {
+                       label = "wps";
+                       gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+                       linux,code = <KEY_WPS_BUTTON>;
+               };
+
+               power {
+                       label = "power";
+                       gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+                       linux,code = <KEY_POWER>;
+               };
+
+               led {
+                       label = "led";
+                       gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+                       linux,code = <KEY_LIGHTS_TOGGLE>;
+               };
+
+               reset {
+                       label = "reset";
+                       gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+                       linux,code = <KEY_RESTART>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_power: power {
+                       label = "blue:power";
+                       gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+               };
+
+               wifi2g {
+                       label = "blue:wifi2g";
+                       gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy0tpt";
+               };
+
+               wifi5g {
+                       label = "blue:wifi5g";
+                       gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy1tpt";
+               };
+
+               wps_red {
+                       label = "red:wps";
+                       gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
+               };
+
+               wps_blue {
+                       label = "blue:wps";
+                       gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
+               };
+
+               eth_act {
+                       label = "green:eth_act";
+                       gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
+               };
+
+               eth_link {
+                       label = "green:eth_link";
+                       gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&spi0 {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <40000000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x20000>;
+                               read-only;
+                       };
+
+                       partition@20000 {
+                               compatible = "tplink,firmware";
+                               label = "firmware";
+                               reg = <0x20000 0x7a0000>;
+                       };
+
+                       config: partition@7c0000 {
+                               label = "config";
+                               reg = <0x7c0000 0x2d440>;
+                               read-only;
+                       };
+
+                       radio: partition@7f0000 {
+                               label = "radio";
+                               reg = <0x7f0000 0x10000>;
+                               read-only;
+                       };
+               };
+       };
+};
+
+&state_default {
+       gpio {
+               groups = "rgmii2", "wdt";
+               function = "gpio";
+       };
+};
+
+&pcie {
+       status = "okay";
+};
+
+&pcie1 {
+       wifi@0,0 {
+               compatible = "mediatek,mt76";
+               reg = <0x0000 0 0 0 0>;
+               mediatek,mtd-eeprom = <&radio 0x0>;
+               nvmem-cells = <&macaddr_config_10008>;
+               nvmem-cell-names = "mac-address";
+               mac-address-increment = <1>;
+               ieee80211-freq-limit = <2400000 2500000>;
+       };
+};
+
+&pcie0 {
+       wifi@0,0 {
+               compatible = "mediatek,mt76";
+               reg = <0x0000 0 0 0 0>;
+               mediatek,mtd-eeprom = <&radio 0x8000>;
+               nvmem-cells = <&macaddr_config_10008>;
+               nvmem-cell-names = "mac-address";
+               mac-address-increment = <2>;
+               ieee80211-freq-limit = <5000000 6000000>;
+       };
+};
+
+&ethernet {
+       pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
+};
+
+&gmac0 {
+       nvmem-cells = <&macaddr_config_10008>;
+       nvmem-cell-names = "mac-address";
+};
+
+&switch0 {
+       ports {
+               port@0 {
+                       status = "okay";
+                       label = "lan";
+               };
+       };
+};
+
+&config {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_config_10008: macaddr@10008 {
+               reg = <0x10008 0x6>;
+       };
+};
diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
new file mode 100644 (file)
index 0000000..fe0e9da
--- /dev/null
@@ -0,0 +1,145 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "yuncore,ax820", "mediatek,mt7621-soc";
+       model = "YunCore AX820";
+
+       aliases {
+               led-boot = &led_status_green;
+               led-failsafe = &led_status_green;
+               led-running = &led_status_green;
+               led-upgrade = &led_status_green;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led_status_green: status_green {
+                       label = "green:status";
+                       gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       watchdog {
+               compatible = "linux,wdt-gpio";
+               gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+               hw_algo = "toggle";
+               hw_margin_ms = <200>;
+               always-running;
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               reset {
+                       label = "reset";
+                       gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
+               };
+       };
+};
+
+&spi0 {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <80000000>;
+               m25p,fast-read;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "Bootloader";
+                               reg = <0x0 0x30000>;
+                               read-only;
+                       };
+
+                       partition@30000 {
+                               label = "Config";
+                               reg = <0x30000 0x10000>;
+                               read-only;
+                       };
+
+                       /* range 0x40000 to 0x50000 is empty in vendor
+                        * firmware, so we do not use it either
+                        */
+
+                       factory: partition@50000 {
+                               label = "Factory";
+                               reg = <0x50000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@90000 {
+                               compatible = "denx,uimage";
+                               label = "firmware";
+                               reg = <0x90000 0xf70000>;
+                       };
+               };
+       };
+};
+
+&pcie {
+       status = "okay";
+};
+
+&pcie1 {
+       wifi@0,0 {
+               compatible = "mediatek,mt76";
+               reg = <0x0000 0 0 0 0>;
+               mediatek,mtd-eeprom = <&factory 0x0>;
+       };
+};
+
+&gmac0 {
+       nvmem-cells = <&macaddr_factory_e000>;
+       nvmem-cell-names = "mac-address";
+};
+
+&switch0 {
+       ports {
+               port@0 {
+                       status = "okay";
+                       label = "wan";
+                       nvmem-cells = <&macaddr_factory_e000>;
+                       nvmem-cell-names = "mac-address";
+                       mac-address-increment = <1>;
+               };
+
+               port@1 {
+                       status = "okay";
+                       label = "lan";
+               };
+       };
+};
+
+&state_default {
+       gpio {
+               groups = "jtag", "wdt";
+               function = "gpio";
+       };
+};
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_e000: macaddr@e000 {
+               reg = <0xe000 0x6>;
+       };
+};
index 78f012d..cdae5a9 100644 (file)
@@ -1637,6 +1637,17 @@ define Device/tplink_re650-v1
 endef
 TARGET_DEVICES += tplink_re650-v1
 
+define Device/tplink_re650-v2
+  $(Device/dsa-migration)
+  $(Device/tplink-safeloader)
+  DEVICE_MODEL := RE650
+  DEVICE_VARIANT := v2
+  DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware
+  TPLINK_BOARD_ID := RE650-V2
+  IMAGE_SIZE := 7994k
+endef
+TARGET_DEVICES += tplink_re650-v2
+
 define Device/tplink_tl-wpa8631p-v3
   $(Device/dsa-migration)
   $(Device/tplink-safeloader)
@@ -1957,6 +1968,15 @@ define Device/youku_yk-l2
 endef
 TARGET_DEVICES += youku_yk-l2
 
+define Device/yuncore_ax820
+  $(Device/dsa-migration)
+  IMAGE_SIZE := 15808k
+  DEVICE_VENDOR := YunCore
+  DEVICE_MODEL := AX820
+  DEVICE_PACKAGES := kmod-mt7915e
+endef
+TARGET_DEVICES += yuncore_ax820
+
 define Device/zbtlink_zbt-we1326
   $(Device/dsa-migration)
   $(Device/uimage-lzma-loader)
index fc6e7ed..2cb8fdb 100644 (file)
@@ -120,7 +120,8 @@ tplink,re350-v1)
        ucidef_set_led_netdev "eth_link" "LAN link" "green:eth_link" "lan" "link"
        ;;
 tplink,re500-v1|\
-tplink,re650-v1)
+tplink,re650-v1|\
+tplink,re650-v2)
        ucidef_set_led_netdev "eth_act" "LAN act" "green:eth_act" "lan" "tx rx"
        ucidef_set_led_netdev "eth_link" "LAN link" "green:eth_link" "lan" "link"
        ;;
index 1a914d8..75842f4 100644 (file)
@@ -17,6 +17,7 @@ ramips_setup_interfaces()
        tplink,re350-v1|\
        tplink,re500-v1|\
        tplink,re650-v1|\
+       tplink,re650-v2|\
        ubnt,unifi-6-lite|\
        ubnt,unifi-nanohd)
                ucidef_set_interface_lan "lan"
@@ -89,6 +90,7 @@ ramips_setup_interfaces()
        ubnt,usw-flex)
                ucidef_set_interface_lan "lan1 lan2 lan3 lan4 lan5"
                ;;
+       yuncore,ax820|\
        zyxel,nr7101)
                ucidef_set_interfaces_lan_wan "lan" "wan"
                ;;
@@ -194,6 +196,9 @@ ramips_setup_macs()
                wan_mac=$(mtd_get_mac_ascii Config protest_wan_mac)
                label_mac=$lan_mac
                ;;
+       yuncore,ax820)
+               label_mac=$(mtd_get_mac_binary Factory 0x4)
+               ;;
        esac
 
        [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
index 625d6a6..6128518 100644 (file)
@@ -86,4 +86,8 @@ case "$board" in
                hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
                [ "$PHYNBR" = "1" ] &&  macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress
                ;;
+       yuncore,ax820)
+               [ "$PHYNBR" = "1" ] && \
+                       macaddr_setbit_la "$(mtd_get_mac_binary Factory 0xe000)" > /sys${DEVPATH}/macaddress
+               ;;
 esac
index fb51eb1..5cca587 100644 (file)
@@ -11,9 +11,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
-PKG_SOURCE_DATE:=2022-02-28
-PKG_SOURCE_VERSION:=002cfaf0204ef48fdced6f43c99d59394860e2cb
-PKG_MIRROR_HASH:=aa2ab50ab24474cd8b8342d8c6d88309a13117e2f1a34b7bfc61b15e0510bce6
+PKG_SOURCE_DATE:=2022-04-23
+PKG_SOURCE_VERSION:=05fd7007b0c842cb560b83f07b50282733ccf2ca
+PKG_MIRROR_HASH:=58a0578cd1a8bf934dc683fc3cced6208b17f528fe2f0329f169ea50eb83bc76
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk