Merge Official Source

This commit is contained in:
CN_SZTL 2020-09-12 17:49:31 +08:00
commit 7053ae7f08
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
31 changed files with 167 additions and 271 deletions

View File

@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
endif
LINUX_VERSION-4.19 = .138
LINUX_VERSION-5.4 = .63
LINUX_VERSION-5.4 = .64
LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02
LINUX_KERNEL_HASH-5.4.63 = e0260dae0da01163b1a3289ad9c5cc6ee4226720e199e8a1d982e24efda7ffc0
LINUX_KERNEL_HASH-5.4.64 = b9d3c2938466f388a70fd190fd6691baa8b757393b267e9f7b06c4730d85d5ef
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=uboot-envtools
PKG_DISTNAME:=u-boot
PKG_VERSION:=2020.04
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \

View File

@ -33,7 +33,8 @@ xiaomi,miwifi-nano|\
zbtlink,zbt-wg2626)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
;;
hootoo,ht-tm05)
hootoo,ht-tm05|\
ravpower,rp-wd03)
idx="$(find_mtd_index u-boot-env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"

View File

@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
#define USB_VENDOR_ID_BELKIN 0x050d
#define USB_DEVICE_ID_FLIP_KVM 0x3201
@@ -1238,6 +1241,9 @@
@@ -1241,6 +1244,9 @@
#define USB_VENDOR_ID_XAT 0x2505
#define USB_DEVICE_ID_XAT_CSR 0x0220
@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
@@ -179,6 +180,7 @@ static const struct hid_device_id hid_qu
@@ -182,6 +183,7 @@ static const struct hid_device_id hid_qu
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },

View File

@ -388,7 +388,7 @@
if (dc_lsize == 0)
r4k_blast_dcache = (void *)cache_noop;
else if (dc_lsize == 16)
@@ -1775,6 +1787,17 @@ static void coherency_setup(void)
@@ -1779,6 +1791,17 @@ static void coherency_setup(void)
* silly idea of putting something else there ...
*/
switch (current_cpu_type()) {
@ -406,7 +406,7 @@
case CPU_R4000PC:
case CPU_R4000SC:
case CPU_R4000MC:
@@ -1821,6 +1844,15 @@ void r4k_cache_init(void)
@@ -1825,6 +1848,15 @@ void r4k_cache_init(void)
extern void build_copy_page(void);
struct cpuinfo_mips *c = &current_cpu_data;
@ -422,7 +422,7 @@
probe_pcache();
probe_vcache();
setup_scache();
@@ -1897,7 +1929,15 @@ void r4k_cache_init(void)
@@ -1901,7 +1933,15 @@ void r4k_cache_init(void)
*/
local_r4k___flush_cache_all(NULL);

View File

@ -1,51 +0,0 @@
From: Alexander Lobakin <alobakin@dlink.ru>
Date: Mon, 14 Oct 2019 11:00:33 +0300
Subject: [PATCH] net: core: use listified Rx for GRO_NORMAL in
napi_gro_receive()
Commit 323ebb61e32b4 ("net: use listified RX for handling GRO_NORMAL
skbs") made use of listified skb processing for the users of
napi_gro_frags().
The same technique can be used in a way more common napi_gro_receive()
to speed up non-merged (GRO_NORMAL) skbs for a wide range of drivers
including gro_cells and mac80211 users.
This slightly changes the return value in cases where skb is being
dropped by the core stack, but it seems to have no impact on related
drivers' functionality.
gro_normal_batch is left untouched as it's very individual for every
single system configuration and might be tuned in manual order to
achieve an optimal performance.
Signed-off-by: Alexander Lobakin <alobakin@dlink.ru>
Acked-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5601,12 +5601,13 @@ static void napi_skb_free_stolen_head(st
kmem_cache_free(skbuff_head_cache, skb);
}
-static gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb)
+static gro_result_t napi_skb_finish(struct napi_struct *napi,
+ struct sk_buff *skb,
+ gro_result_t ret)
{
switch (ret) {
case GRO_NORMAL:
- if (netif_receive_skb_internal(skb))
- ret = GRO_DROP;
+ gro_normal_one(napi, skb);
break;
case GRO_DROP:
@@ -5638,7 +5639,7 @@ gro_result_t napi_gro_receive(struct nap
skb_gro_reset_offset(skb);
- ret = napi_skb_finish(dev_gro_receive(napi, skb), skb);
+ ret = napi_skb_finish(napi, skb, dev_gro_receive(napi, skb));
trace_napi_gro_receive_exit(ret);
return ret;

View File

@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -2184,12 +2186,12 @@ static int tpacket_rcv(struct sk_buff *s
@@ -2185,12 +2187,12 @@ static int tpacket_rcv(struct sk_buff *s
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -3284,6 +3286,7 @@ static int packet_create(struct net *net
@@ -3289,6 +3291,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock);
po->rollover = NULL;
po->prot_hook.func = packet_rcv;
@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
@@ -3917,6 +3920,16 @@ packet_setsockopt(struct socket *sock, i
@@ -3922,6 +3925,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
default:
return -ENOPROTOOPT;
}
@@ -3973,6 +3986,13 @@ static int packet_getsockopt(struct sock
@@ -3978,6 +3991,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;

View File

@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+MODULE_ALIAS("nf-flow-table-hw");
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -5745,6 +5745,13 @@ static int nf_tables_flowtable_parse_hoo
@@ -5741,6 +5741,13 @@ static int nf_tables_flowtable_parse_hoo
if (err < 0)
return err;
@ -520,7 +520,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL);
if (!ops)
return -ENOMEM;
@@ -5875,10 +5882,19 @@ static int nf_tables_newflowtable(struct
@@ -5871,10 +5878,19 @@ static int nf_tables_newflowtable(struct
}
flowtable->data.type = type;
@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK],
flowtable);
if (err < 0)
@@ -6004,7 +6020,8 @@ static int nf_tables_fill_flowtable_info
@@ -6000,7 +6016,8 @@ static int nf_tables_fill_flowtable_info
nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||
nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) ||
nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle),

View File

@ -41,7 +41,7 @@ ChangeLog v1->v2:
#include "libata.h"
#include "libata-transport.h"
@@ -4573,6 +4574,34 @@ int ata_scsi_add_hosts(struct ata_host *
@@ -4579,6 +4580,34 @@ int ata_scsi_add_hosts(struct ata_host *
return rc;
}
@ -76,7 +76,7 @@ ChangeLog v1->v2:
void ata_scsi_scan_host(struct ata_port *ap, int sync)
{
int tries = 5;
@@ -4598,6 +4627,7 @@ void ata_scsi_scan_host(struct ata_port
@@ -4604,6 +4633,7 @@ void ata_scsi_scan_host(struct ata_port
NULL);
if (!IS_ERR(sdev)) {
dev->sdev = sdev;

View 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
@@ -5115,6 +5128,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
@@ -5114,6 +5127,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;
@@ -6049,6 +6065,9 @@ struct ata_port *ata_port_alloc(struct a
@@ -6048,6 +6064,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;
@@ -6084,6 +6103,12 @@ static void ata_host_release(struct kref
@@ -6083,6 +6102,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;
}
@@ -6547,7 +6572,23 @@ int ata_host_register(struct ata_host *h
@@ -6546,7 +6571,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;
}
@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
/*
* Define if arch has non-standard setup. This is a _PCI_ standard
@@ -879,6 +882,12 @@ struct ata_port {
@@ -880,6 +883,12 @@ struct ata_port {
#ifdef CONFIG_ATA_ACPI
struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */
#endif

View File

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -712,6 +712,17 @@
@@ -714,6 +714,17 @@
status = "disabled";
};

View File

@ -199,10 +199,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+ * @duplex: link duplex
+ * @tx_pause: link transmit pause enablement status
+ * @rx_pause: link receive pause enablement status
*
- * If @mode is not an in-band negotiation mode (as defined by
- * phylink_autoneg_inband()), allow the link to come up. If @phy
- * is non-%NULL, configure Energy Efficient Ethernet by calling
+ *
+ * Configure the MAC for an established link.
+ *
+ * @speed, @duplex, @tx_pause and @rx_pause indicate the finalised link
@ -214,7 +211,10 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+ * Note that when 802.3z in-band negotiation is in use, it is possible
+ * that the user wishes to override the pause settings, and this should
+ * be allowed when considering the implementation of this method.
+ *
*
- * If @mode is not an in-band negotiation mode (as defined by
- * phylink_autoneg_inband()), allow the link to come up. If @phy
- * is non-%NULL, configure Energy Efficient Ethernet by calling
+ * If in-band negotiation mode is disabled, allow the link to come up. If
+ * @phy is non-%NULL, configure Energy Efficient Ethernet by calling
* phy_init_eee() and perform appropriate MAC configuration for EEE.

View File

@ -102,8 +102,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{
struct mt7530_priv *priv = ds->priv;
+ u32 mcr;
- mt7530_port_set_status(priv, port, 1);
+
+ mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
+
+ switch (speed) {
@ -125,7 +124,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+ if (rx_pause)
+ mcr |= PMCR_RX_FC_EN;
+ }
+
- mt7530_port_set_status(priv, port, 1);
+ mt7530_set(priv, MT7530_PMCR_P(port), mcr);
}

View File

@ -257,7 +257,7 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
phylink_set(mask, 100baseT_Full);
-
- if (state->interface != PHY_INTERFACE_MODE_MII) {
- phylink_set(mask, 1000baseT_Half);
- /* This switch only supports 1G full-duplex. */
- phylink_set(mask, 1000baseT_Full);
- if (port == 5)
- phylink_set(mask, 1000baseX_Full);

View File

@ -281,7 +281,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
&pio {
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -790,45 +790,41 @@
@@ -792,45 +792,41 @@
#reset-cells = <1>;
};
@ -344,7 +344,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0 0 0 1 &pcie_intc0 0>,
<0 0 0 2 &pcie_intc0 1>,
@@ -840,15 +836,39 @@
@@ -842,15 +838,39 @@
#interrupt-cells = <1>;
};
};

View File

@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
interface-type = "ace";
reg = <0x5000 0x1000>;
};
@@ -965,6 +965,8 @@
@@ -967,6 +967,8 @@
power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>;
mediatek,ethsys = <&ethsys>;
mediatek,sgmiisys = <&sgmiisys>;

View File

@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -801,6 +801,8 @@
@@ -803,6 +803,8 @@
reg = <0 0x1a143000 0 0x1000>;
reg-names = "port0";
mediatek,pcie-cfg = <&pciecfg>;
@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#address-cells = <3>;
#size-cells = <2>;
interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>;
@@ -818,6 +820,7 @@
@@ -820,6 +822,7 @@
bus-range = <0x00 0xff>;
ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>;
status = "disabled";
@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
slot0: pcie@0,0 {
reg = <0x0000 0 0 0 0>;
@@ -844,6 +847,8 @@
@@ -846,6 +849,8 @@
reg = <0 0x1a145000 0 0x1000>;
reg-names = "port1";
mediatek,pcie-cfg = <&pciecfg>;
@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#address-cells = <3>;
#size-cells = <2>;
interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
@@ -862,6 +867,7 @@
@@ -864,6 +869,7 @@
bus-range = <0x00 0xff>;
ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>;
status = "disabled";
@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
slot1: pcie@1,0 {
reg = <0x0800 0 0 0 0>;
@@ -921,6 +927,11 @@
@@ -923,6 +929,11 @@
};
};

View File

@ -15,7 +15,7 @@
/* initialize internal qc */
qc = __ata_qc_from_tag(ap, ATA_TAG_INTERNAL);
@@ -5122,6 +5130,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
@@ -5121,6 +5129,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);
@@ -5167,6 +5178,8 @@ void ata_qc_free(struct ata_queued_cmd *
@@ -5166,6 +5177,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);
@ -36,7 +36,7 @@
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -908,6 +908,8 @@ struct ata_port_operations {
@@ -909,6 +909,8 @@ struct ata_port_operations {
void (*qc_prep)(struct ata_queued_cmd *qc);
unsigned int (*qc_issue)(struct ata_queued_cmd *qc);
bool (*qc_fill_rtf)(struct ata_queued_cmd *qc);
@ -45,7 +45,7 @@
/*
* Configuration and exception handling
@@ -998,6 +1000,9 @@ struct ata_port_operations {
@@ -999,6 +1001,9 @@ struct ata_port_operations {
void (*phy_reset)(struct ata_port *ap);
void (*eng_timeout)(struct ata_port *ap);

View File

@ -1,10 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7620n.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "mt7620n_sunvalley_filehub.dtsi"
/ {
compatible = "hootoo,ht-tm05", "ralink,mt7620n-soc";
@ -15,7 +12,6 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
leds {
@ -33,128 +29,4 @@
linux,default-trigger = "phy0tpt";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
virtual_flash {
compatible = "mtd-concat";
devices = <&firmware1 &firmware2 &firmware3>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
compatible = "openwrt,okli";
label = "firmware";
reg = <0x0 0x0>;
};
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&i2c {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
label = "loader";
reg = <0x50000 0x10000>;
read-only;
};
firmware2: partition@60000 {
label = "firmware2";
reg = <0x60000 0x170000>;
};
partition@1d0000 {
label = "u-boot-env";
reg = <0x1d0000 0x10000>;
};
firmware3: partition@1e0000 {
label = "firmware3";
reg = <0x1e0000 0x20000>;
};
firmware1: partition@200000 {
label = "firmware1";
reg = <0x200000 0x600000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
mtd-mac-address = <&factory 0x28>;
};
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
};
&state_default {
gpio {
groups = "wled", "ephy";
function = "gpio";
};
};

View File

@ -0,0 +1,29 @@
/dts-v1/;
#include "mt7620n_sunvalley_filehub.dtsi"
/ {
compatible = "ravpower,rp-wd03", "ralink,mt7620n-soc";
model = "RAVPower RP-WD03";
aliases {
led-boot = &led_wifi_blue;
led-failsafe = &led_wifi_blue;
led-running = &led_wifi_blue;
led-upgrade = &led_wifi_blue;
};
leds {
compatible = "gpio-leds";
wifi_green {
label = "rp-wd03:green:wifi";
gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
};
led_wifi_blue: wifi_blue {
label = "rp-wd03:blue:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
};
};
};

View File

@ -1,4 +1,4 @@
/dts-v1/;
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620n.dtsi"
@ -6,25 +6,8 @@
#include <dt-bindings/input/input.h>
/ {
compatible = "ravpower,wd03", "ralink,mt7620n-soc";
model = "Ravpower WD03";
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
green-wifi {
label = "wd03:green:wifi";
gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
};
blue-wifi {
label = "wd03:blue:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
};
aliases {
label-mac-device = &ethernet;
};
keys {
@ -36,6 +19,24 @@
linux,code = <KEY_RESTART>;
};
};
virtual_flash {
compatible = "mtd-concat";
devices = <&firmware1 &firmware2 &firmware3>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
compatible = "openwrt,okli";
label = "firmware";
reg = <0x0 0x0>;
};
};
};
};
&gpio2 {
@ -56,7 +57,8 @@
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
@ -70,7 +72,7 @@
};
partition@30000 {
label = "u-boot-env";
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
@ -82,9 +84,29 @@
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
label = "loader";
reg = <0x50000 0x10000>;
read-only;
};
firmware2: partition@60000 {
label = "firmware2";
reg = <0x60000 0x170000>;
};
partition@1d0000 {
label = "u-boot-env";
reg = <0x1d0000 0x10000>;
};
firmware3: partition@1e0000 {
label = "firmware3";
reg = <0x1e0000 0x20000>;
};
firmware1: partition@200000 {
label = "firmware1";
reg = <0x200000 0x600000>;
};
};
};
@ -99,7 +121,7 @@
};
&ethernet {
mtd-mac-address = <&factory 0x4000>;
mtd-mac-address = <&factory 0x28>;
};
&wmac {

View File

@ -122,12 +122,6 @@ define Build/poray-header
mv $@.new $@
endef
define Build/ravpower-wd009-factory
mkimage -A mips -T standalone -C none -a 0x80010000 -e 0x80010000 -n "OpenWrt Bootloader" -d $(UBOOT_PATH) $@.new
cat $@ >> $@.new
@mv $@.new $@
endef
define Build/relocate-kernel
rm -rf $@.relocate
$(CP) ../../generic/image/relocate $@.relocate

View File

@ -488,11 +488,9 @@ define Device/hnet_c108
endef
TARGET_DEVICES += hnet_c108
define Device/hootoo_ht-tm05
define Device/sunvalley_filehub_common
SOC := mt7620n
IMAGE_SIZE := 6144k
DEVICE_VENDOR := HooToo
DEVICE_MODEL := HT-TM05
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-i2c-ralink
LOADER_TYPE := bin
LOADER_FLASH_OFFS := 0x200000
@ -505,6 +503,12 @@ define Device/hootoo_ht-tm05
IMAGE/kernel.bin := append-loader-okli $(1) | check-size 64k
IMAGE/rootfs.bin := $$(sysupgrade_bin) | check-size
endef
define Device/hootoo_ht-tm05
$(Device/sunvalley_filehub_common)
DEVICE_VENDOR := HooToo
DEVICE_MODEL := HT-TM05
endef
TARGET_DEVICES += hootoo_ht-tm05
define Device/iodata_wn-ac1167gr
@ -924,15 +928,16 @@ define Device/ralink_mt7620a-v22sg-evb
endef
TARGET_DEVICES += ralink_mt7620a-v22sg-evb
define Device/ravpower_wd03
SOC := mt7620n
IMAGE_SIZE := 7872k
DEVICE_VENDOR := Ravpower
DEVICE_MODEL := WD03
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
DEFAULT := n
define Device/ravpower_rp-wd03
$(Device/sunvalley_filehub_common)
DEVICE_VENDOR := RAVPower
DEVICE_MODEL := RP-WD03
SUPPORTED_DEVICES += ravpower,wd03
DEVICE_COMPAT_VERSION := 2.0
DEVICE_COMPAT_MESSAGE := Partition design has changed compared to older versions (up to 19.07) due to kernel size restrictions. \
Upgrade via sysupgrade mechanism is not possible, so new installation via TFTP is required.
endef
TARGET_DEVICES += ravpower_wd03
TARGET_DEVICES += ravpower_rp-wd03
define Device/sanlinking_d240
SOC := mt7620a

View File

@ -6,6 +6,14 @@ include ./common-tp-link.mk
DEFAULT_SOC := mt7628an
define Build/ravpower-wd009-factory
mkimage -A mips -T standalone -C none -a 0x80010000 -e 0x80010000 \
-n "OpenWrt Bootloader" -d $(UBOOT_PATH) $@.new
cat $@ >> $@.new
@mv $@.new $@
endef
define Device/alfa-network_awusfree1
IMAGE_SIZE := 7872k
DEVICE_VENDOR := ALFA Network

View File

@ -179,6 +179,9 @@ planex,mzk-ex750np|\
zbtlink,zbt-we826-e)
set_wifi_led "$boardname:red:wifi"
;;
ravpower,rp-wd03)
ucidef_set_led_netdev "internet" "internet" "$boardname:green:wifi" "eth0"
;;
tplink,archer-c2-v1)
ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch1" "0x1e"
ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch1" "0x01"

View File

@ -60,7 +60,7 @@ ramips_setup_interfaces()
planex,cs-qr10|\
planex,mzk-ex300np|\
planex,mzk-ex750np|\
ravpower,wd03|\
ravpower,rp-wd03|\
sercomm,na930|\
tplink,re200-v1|\
tplink,re210-v1|\

View File

@ -13,6 +13,9 @@ lenovo,newifi-y1s)
netgear,wn3000rp-v3)
migrate_leds "^wn3000rpv3:=wn3000rp-v3:"
;;
ravpower,rp-wd03)
migrate_leds "^wd03:=rp-wd03:"
;;
tplink,archer-c2-v1)
migrate_leds "^c2-v1:=archer-c2-v1:"
;;

View File

@ -0,0 +1,10 @@
. /lib/functions.sh
case "$(board_name)" in
ravpower,rp-wd03)
uci set system.@system[0].compat_version="2.0"
uci commit system
;;
esac
exit 0

View File

@ -14,7 +14,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2860,6 +2860,7 @@ static const struct net_device_ops mtk_n
@@ -2863,6 +2863,7 @@ static const struct net_device_ops mtk_n
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
{
@ -22,7 +22,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
const __be32 *_id = of_get_property(np, "reg", NULL);
struct phylink *phylink;
int phy_mode, id, err;
@@ -2952,6 +2953,9 @@ static int mtk_add_mac(struct mtk_eth *e
@@ -2955,6 +2956,9 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;