Merge remote-tracking branch 'upstream/master' into owrt

This commit is contained in:
VIKING 2025-03-10 17:16:58 +08:00
commit 121da6f408
19 changed files with 793 additions and 20 deletions

View File

@ -1229,6 +1229,28 @@ config KERNEL_NET_L3_MASTER_DEV
drivers to support L3 master devices like VRF.
Increases the compressed kernel size by ~4kB (as of Linux 6.6).
config KERNEL_DCB
bool "Data Center Bridging support"
default y if TARGET_armsr_armv8
default y if TARGET_x86_64
help
This enables support for configuring Data Center Bridging (DCB)
features on DCB capable Ethernet adapters via rtnetlink. Say 'Y'
if you have a DCB capable Ethernet adapter which supports this
interface and you are connected to a DCB capable switch.
DCB is a collection of Ethernet enhancements which allow DCB capable
NICs and switches to support network traffic with differing
requirements (highly reliable, no drops vs. best effort vs. low
latency) to co-exist on Ethernet.
DCB features include:
Enhanced Transmission Selection (aka Priority Grouping) - provides a
framework for assigning bandwidth guarantees to traffic classes.
Priority-based Flow Control (PFC) - a MAC control pause frame which
works at the granularity of the 802.1p priority instead of the
link (802.3x).
config KERNEL_XDP_SOCKETS
bool "XDP sockets support"
default y if KERNEL_DEBUG_INFO_BTF

View File

@ -19,6 +19,7 @@ alfa-network,r36m-e4g|\
alfa-network,tube-e4g|\
engenius,epg600|\
engenius,esr600h|\
hongdian,h8922-v30|\
linksys,re7000|\
meig,slt866|\
sitecom,wlr-4100-v1-002|\

View File

@ -1148,7 +1148,8 @@ define KernelPackage/ixgbe
KCONFIG:=CONFIG_IXGBE \
CONFIG_IXGBE_VXLAN=n \
CONFIG_IXGBE_HWMON=y \
CONFIG_IXGBE_DCA=n
CONFIG_IXGBE_DCA=n \
CONFIG_IXGBE_DCB=y
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
AUTOLOAD:=$(call AutoLoad,35,ixgbe)
endef
@ -1186,7 +1187,8 @@ define KernelPackage/i40e
KCONFIG:=CONFIG_I40E \
CONFIG_I40E_VXLAN=n \
CONFIG_I40E_HWMON=y \
CONFIG_I40E_DCA=n
CONFIG_I40E_DCA=n \
CONFIG_I40E_DCB=y
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/i40e/i40e.ko
AUTOLOAD:=$(call AutoProbe,i40e)
endef
@ -1619,7 +1621,7 @@ define KernelPackage/bnxt-en
CONFIG_BNXT \
CONFIG_BNXT_SRIOV=y \
CONFIG_BNXT_FLOWER_OFFLOAD=y \
CONFIG_BNXT_DCB=n \
CONFIG_BNXT_DCB=y \
CONFIG_BNXT_HWMON=y
AUTOLOAD:=$(call AutoProbe,bnxt_en)
endef
@ -1661,7 +1663,7 @@ define KernelPackage/mlx4-core
$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx4/mlx4_core.ko \
$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko
KCONFIG:= CONFIG_MLX4_EN \
CONFIG_MLX4_EN_DCB=n \
CONFIG_MLX4_EN_DCB=y \
CONFIG_MLX4_CORE=y \
CONFIG_MLX4_CORE_GEN2=y \
CONFIG_MLX4_DEBUG=n
@ -1681,7 +1683,7 @@ define KernelPackage/mlx5-core
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
KCONFIG:= CONFIG_MLX5_CORE \
CONFIG_MLX5_CORE_EN=y \
CONFIG_MLX5_CORE_EN_DCB=n \
CONFIG_MLX5_CORE_EN_DCB=y \
CONFIG_MLX5_CORE_IPOIB=n \
CONFIG_MLX5_EN_ARFS=n \
CONFIG_MLX5_EN_IPSEC=n \
@ -1801,8 +1803,7 @@ define KernelPackage/mlxsw-spectrum
KCONFIG:= \
CONFIG_MLXSW_SPECTRUM \
CONFIG_MLXSW_SPECTRUM_DCB=y \
CONFIG_NET_SWITCHDEV=y \
CONFIG_DCB=y
CONFIG_NET_SWITCHDEV=y
AUTOLOAD:=$(call AutoProbe,mlxsw_spectrum)
endef
@ -1837,7 +1838,8 @@ define KernelPackage/qlcnic
KCONFIG:= \
CONFIG_QLCNIC \
CONFIG_QLCNIC_HWMON=y \
CONFIG_QLCNIC_SRIOV=y
CONFIG_QLCNIC_SRIOV=y \
CONFIG_QLCNIC_DCB=y
FILES:=$(LINUX_DIR)/drivers/net/ethernet/qlogic/qlcnic/qlcnic.ko
AUTOLOAD:=$(call AutoProbe,qlcnic)
endef

View File

@ -0,0 +1,76 @@
From adf957124a115bdf3e4728e1ea8c70a632648cf0 Mon Sep 17 00:00:00 2001
From: Coia Prant <coiaprant@gmail.com>
Date: Fri, 14 Feb 2025 15:49:55 +0800
Subject: [PATCH] wifi: rt2x00: Add support for loading EEPROM from devicetree
embedded data
This patch allows rt2x00 to load eeprom from devicetree embedded data.
Example:
/* load eeprom from embedded data 'eeprom-data' */
&wmac {
ralink,eeprom-data = <0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff>;
};
Signed-off-by: Coia Prant <coiaprant@gmail.com>
---
.../net/wireless/ralink/rt2x00/rt2x00eeprom.c | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
@@ -33,6 +33,27 @@ static void rt2800lib_eeprom_swap(struct
rt2x00dev->eeprom[i] = swab16(rt2x00dev->eeprom[i]);
}
+static int rt2800lib_read_eeprom_data(struct rt2x00_dev *rt2x00dev)
+{
+ struct device_node *np = rt2x00dev->dev->of_node;
+ unsigned int len = rt2x00dev->ops->eeprom_size;
+ const void *data;
+ int size;
+
+ data = of_get_property(np, "ralink,eeprom-data", &size);
+ if (!data)
+ return -ENOENT;
+
+ if (size != len) {
+ dev_err(rt2x00dev->dev, "invalid eeprom size, required: 0x%04x\n", len);
+ return -EINVAL;
+ }
+
+ memcpy(rt2x00dev->eeprom, data, size);
+
+ return 0;
+}
+
#if IS_ENABLED(CONFIG_MTD)
static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
{
@@ -193,6 +214,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
{
int ret;
+ ret = rt2800lib_read_eeprom_data(rt2x00dev);
+ if (!ret)
+ return 0;
+
#if IS_ENABLED(CONFIG_MTD)
ret = rt2800lib_read_eeprom_mtd(rt2x00dev);
if (!ret)

View File

@ -226,6 +226,14 @@ append_interface_name() {
xappend "--interface-name=$1,$2"
}
append_filter_rr() {
xappend "--filter-rr=$1"
}
append_cache_rr() {
xappend "--cache-rr=$1"
}
filter_dnsmasq() {
local cfg="$1" func="$2" match_cfg="$3" found_cfg
@ -1000,8 +1008,8 @@ dnsmasq_start()
# deprecate or remove filter-X in favor of filter-rr?
append_bool "$cfg" filter_aaaa "--filter-AAAA"
append_bool "$cfg" filter_a "--filter-A"
append_parm "$cfg" filter_rr "--filter-rr"
append_parm "$cfg" cache_rr "--cache-rr"
config_list_foreach "$cfg" filter_rr append_filter_rr
config_list_foreach "$cfg" cache_rr append_cache_rr
append_parm "$cfg" logfacility "--log-facility"
config_get logfacility "$cfg" "logfacility"

View File

@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unetd
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/unetd.git
PKG_SOURCE_DATE:=2025-02-28
PKG_SOURCE_VERSION:=edc8fdae463ad7ce9bfb876af0c653ab1da197df
PKG_MIRROR_HASH:=2f0ce439b9e4815b3f20b9aaf4378e3aac114f429bb8bfd06739df118b3da9c8
PKG_SOURCE_DATE:=2025-03-09
PKG_SOURCE_VERSION:=6c9c8fbd81285a2cba7dd1c2c1ac2bf25ca99e27
PKG_MIRROR_HASH:=9dc06c945713a6a289ed0838ebe59e65b4fbb333e02d5159a8e87d29754808a6
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>

View File

@ -0,0 +1,231 @@
// 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>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "fortinet,fap-221-c", "qca,qca9557";
model = "Fortinet FAP-221-C";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,9600";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&enable_gpio_2_3 &jtag_disable_pins>;
led_power: power_green {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wifi1_green {
function = LED_FUNCTION_WLAN_2GHZ;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wifi1_amber {
function = LED_FUNCTION_WLAN_2GHZ;
color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
wifi2_green {
function = LED_FUNCTION_WLAN_5GHZ;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wifi2_amber {
function = LED_FUNCTION_WLAN_5GHZ;
color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
warning_green {
function = "warning";
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
warning_amber {
function = "warning";
color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
};
lan_green {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
};
virtual_flash {
compatible = "mtd-concat";
devices = <&fwconcat0 &fwconcat1 &fwconcat2>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,ih-magic = <0x73714f4b>;
label = "firmware";
reg = <0x0 0x0>;
};
};
};
};
&pinmux {
enable_gpio_2_3: pinmux_enable_gpio_2_3 {
pinctrl-single,bits = <0x00 0x0 0xffff0000>;
};
};
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
uboot: partition@0 {
label = "u-boot";
reg = <0x000000 0x040000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_uboot_3ff80: mac-address@3ff80 {
compatible = "mac-base";
reg = <0x3ff80 0xc>;
#nvmem-cell-cells = <1>;
};
};
};
fwconcat0: partition@40000 {
label = "fwconcat0";
reg = <0x0040000 0x1400000>;
};
partition@1440000 {
label = "loader";
reg = <0x1440000 0x0010000>;
};
fwconcat1: partition@145000 {
label = "fwconcat1";
reg = <0x1450000 0x03f0000>;
};
fwconcat2: partition@1840000 {
label = "reserved";
reg = <0x1840000 0x07b0000>;
};
art: partition@1ff0000 {
label = "art";
reg = <0x1ff0000 0x0010000>;
read-only;
};
};
};
};
&mdio0 {
status = "okay";
phy5: ethernet-phy@5 {
reg = <5>;
};
};
&eth0 {
status = "okay";
nvmem-cells = <&macaddr_uboot_3ff80 0>;
nvmem-cell-names = "mac-address";
phy-handle = <&phy5>;
phy-mode = "rgmii-id";
pll-data = <0x82000000 0x80000101 0x80001313>;
};
&wmac {
status = "okay";
nvmem-cells = <&calibration_wmac>, <&macaddr_uboot_3ff80 1>;
nvmem-cell-names = "calibration", "mac-address";
};
&pcie0 {
status = "okay";
wifi@0,0,0 {
compatible = "qcom,ath10k";
reg = <0x0 0 0 0 0>;
nvmem-cells = <&calibration_pcie>, <&macaddr_uboot_3ff80 2>;
nvmem-cell-names = "calibration", "mac-address";
};
};
&art {
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
calibration_wmac: calibration@1000 {
reg = <0x1000 0x440>;
};
calibration_pcie: calibration@5000 {
reg = <0x5000 0x844>;
};
};
};

View File

@ -50,6 +50,7 @@ ath79_setup_interfaces()
extreme-networks,ws-ap3805i|\
fortinet,fap-220-b|\
fortinet,fap-221-b|\
fortinet,fap-221-c|\
glinet,gl-ar300m-lite|\
glinet,gl-usb150|\
hak5,wifi-pineapple-nano|\

View File

@ -68,7 +68,8 @@ platform_do_upgrade() {
platform_do_upgrade_failsafe_datachk "$1"
;;
fortinet,fap-220-b|\
fortinet,fap-221-b)
fortinet,fap-221-b|\
fortinet,fap-221-c)
SKIP_HASH="1"
ENV_SCRIPT="/dev/null"
IMAGE_LIST="tar tzf $1"

View File

@ -1671,6 +1671,23 @@ define Device/fortinet_fap-221-b
endef
TARGET_DEVICES += fortinet_fap-221-b
define Device/fortinet_fap-221-c
$(Device/senao_loader_okli)
SOC := qca9557
DEVICE_VENDOR := Fortinet
DEVICE_MODEL := FAP-221-C
FACTORY_IMG_NAME := FP221C-9.99-AP-build999-999999-patch99
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct
IMAGE_SIZE := 20480k
LOADER_FLASH_OFFS := 0x040000
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | \
check-size | pad-to $$$$(IMAGE_SIZE) | \
append-loader-okli-uimage $(1) | pad-to 11520k | \
gzip-filename $$$$(FACTORY_IMG_NAME)
endef
TARGET_DEVICES += fortinet_fap-221-c
define Device/glinet_6408
$(Device/tplink-8mlzma)
SOC := ar9331

View File

@ -179,7 +179,6 @@ CONFIG_ALLOW_DEV_COREDUMP=y
# CONFIG_AMD_MEM_ENCRYPT is not set
# CONFIG_AMD_PHY is not set
# CONFIG_AMD_XGBE is not set
# CONFIG_AMD_XGBE_DCB is not set
# CONFIG_AMD_XGBE_HAVE_ECC is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_AMILO_RFKILL is not set
@ -2534,7 +2533,6 @@ CONFIG_HZ_100=y
# CONFIG_I3C is not set
# CONFIG_I40E is not set
# CONFIG_I40EVF is not set
# CONFIG_I40E_DCB is not set
# CONFIG_I6300ESB_WDT is not set
# CONFIG_I82092 is not set
# CONFIG_I82365 is not set
@ -2901,7 +2899,6 @@ CONFIG_ISDN=y
# CONFIG_IWLWIFI is not set
# CONFIG_IXGBE is not set
# CONFIG_IXGBEVF is not set
# CONFIG_IXGBE_DCB is not set
# CONFIG_JAILHOUSE_GUEST is not set
# CONFIG_JBD2_DEBUG is not set
# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
@ -4844,7 +4841,6 @@ CONFIG_PWRSEQ_SIMPLE=y
# CONFIG_QFMT_V1 is not set
# CONFIG_QLA3XXX is not set
# CONFIG_QLCNIC is not set
# CONFIG_QLCNIC_DCB is not set
# CONFIG_QLGE is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX6FS_FS is not set

View File

@ -169,7 +169,6 @@ CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_RSA=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
CONFIG_DCB=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y

View File

@ -0,0 +1,189 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "hongdian,h8922-v30", "ralink,mt7620a-soc";
model = "Hongdian H8922 v30";
aliases {
led-boot = &led_sys;
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
};
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
led-wps {
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WPS;
};
led-rf-2 {
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = "rf";
function-enumerator = <2>;
};
led_sys: led-sys {
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_POWER;
default-state = "on";
};
led-net-1 {
gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_MOBILE;
function-enumerator = <1>;
};
led-rf-1 {
gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = "rf";
function-enumerator = <1>;
};
led-net-2 {
gpios = <&gpio2 31 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_MOBILE;
function-enumerator = <2>;
};
led-wlan {
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WLAN;
linux,default-trigger = "phy0tpt";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;
hw_algo = "toggle";
hw_margin_ms = <600>;
always-running;
};
};
&watchdog {
status = "disabled";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x2f000>;
read-only;
};
partition@2f000 {
label = "u-boot-env";
reg = <0x2f000 0x1000>;
read-only;
};
partition@30000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x30000 0xffd000>;
};
};
};
};
&state_default {
gpio {
groups = "wled", "rgmii1", "rgmii2";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mediatek,portmap = "llllw";
};
&pcie {
status = "okay";
};
&wmac {
ralink,eeprom-data = <0x20760501 0x000c4376 0x2058ffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0x000c4376 0x2077000c 0x43762066 0x220c0000 0xffffb701 0x5577a8aa
0x8c88ffff 0x0a000000 0x00000000 0x0000ffff 0xffff0a0a 0x0a0a0808 0x08080808 0x08080808
0x0e0e0e0e 0x0e0e0e0e 0x0e0e0e0e 0x0e0e80ff 0xffff80ff 0xffff0000 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x20ffffff 0xffffffff 0xffffffff 0xffff0606
0x06060402 0x06060400 0x06060400 0x07070400 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff>;
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@ -0,0 +1,201 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7621.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
/ {
compatible = "cudy,m1300-v2", "mediatek,mt7621-soc";
model = "Cudy M1300 v2";
};
/ {
aliases {
led-boot = &led_status_white;
led-failsafe = &led_status_red;
led-running = &led_status_white;
led-upgrade = &led_status_red;
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,115200";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_status_red: led-status-red {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_STATUS;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
led_status_white: led-status-white {
color = <LED_COLOR_ID_WHITE>;
function = LED_FUNCTION_STATUS;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x400>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x4da8>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xf80000>;
};
partition@fd0000 {
label = "debug";
reg = <0xfd0000 0x10000>;
read-only;
};
partition@fe0000 {
label = "backup";
reg = <0xfe0000 0x10000>;
read-only;
};
partition@ff0000 {
label = "bdinfo";
reg = <0xff0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_bdinfo_de00: macaddr@de00 {
compatible = "mac-base";
reg = <0xde00 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>, <&macaddr_bdinfo_de00 0>;
nvmem-cell-names = "eeprom", "mac-address";
ieee80211-freq-limit = <2400000 2500000>;
};
};
&pcie1 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_de00 2>;
nvmem-cell-names = "eeprom", "mac-address";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&gmac0 {
nvmem-cells = <&macaddr_bdinfo_de00 0>;
nvmem-cell-names = "mac-address";
};
&gmac1 {
status = "okay";
label = "wan";
phy-handle = <&ethphy4>;
nvmem-cells = <&macaddr_bdinfo_de00 2>;
nvmem-cell-names = "mac-address";
};
&ethphy4 {
/delete-property/ interrupts;
};
&switch0 {
ports {
port@3 {
status = "okay";
label = "lan";
};
};
};
&state_default {
gpio {
groups = "wdt", "jtag";
function = "gpio";
};
};

View File

@ -615,6 +615,18 @@ define Device/hnet_c108
endef
TARGET_DEVICES += hnet_c108
define Device/hongdian_h8922-v30
SOC := mt7620a
IMAGE_SIZE := 15808k
DEVICE_VENDOR := Hongdian
DEVICE_MODEL := H8922
DEVICE_VARIANT := v30
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi uboot-envtools
IMAGES += rootfs.bin
IMAGE/rootfs.bin := append-rootfs | check-size 10560k
endef
TARGET_DEVICES += hongdian_h8922-v30
define Device/humax_e2
SOC := mt7620a
IMAGE_SIZE := 7744k

View File

@ -700,6 +700,19 @@ define Device/confiabits_mt7621-v1
endef
TARGET_DEVICES += confiabits_mt7621-v1
define Device/cudy_m1300-v2
$(Device/dsa-migration)
IMAGE_SIZE := 15872k
DEVICE_VENDOR := Cudy
DEVICE_MODEL := M1300
DEVICE_VARIANT := v2
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \
-uboot-envtools
UIMAGE_NAME := R15
SUPPORTED_DEVICES += R15
endef
TARGET_DEVICES += cudy_m1300-v2
define Device/cudy_m1800
$(Device/dsa-migration)
DEVICE_VENDOR := Cudy

View File

@ -15,6 +15,7 @@ ramips_setup_interfaces()
dlink,dwr-921-c1|\
dlink,dwr-922-e2|\
dovado,tiny-ac|\
hongdian,h8922-v30|\
ohyeah,oy-0001|\
phicomm,psg1208|\
planex,db-wrt01|\

View File

@ -71,6 +71,7 @@ ramips_setup_interfaces()
asiarf,ap7621-001|\
comfast,cf-e390ax|\
comfast,cf-ew72-v2|\
cudy,m1300-v2|\
cudy,m1800|\
dna,valokuitu-plus-ex400|\
humax,e10|\

View File

@ -6,7 +6,9 @@ define KernelPackage/amd-xgbe
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=AMD Ethernet on SoC support
DEPENDS:=@PCI_SUPPORT @TARGET_x86_64 +kmod-lib-crc32c +kmod-ptp +kmod-libphy +kmod-mdio-devres
KCONFIG:=CONFIG_AMD_XGBE
KCONFIG:= \
CONFIG_AMD_XGBE \
CONFIG_AMD_XGBE_DCB=y
FILES:=$(LINUX_DIR)/drivers/net/ethernet/amd/xgbe/amd-xgbe.ko
AUTOLOAD:=$(call AutoLoad,35,amd-xgbe)
endef