Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
dcae03720d
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-6.6 = .56
|
||||
LINUX_KERNEL_HASH-6.6.56 = f74812f78e88992c416434cb107639e13a551dbaff36bb90d6346ab16ab71a95
|
||||
LINUX_VERSION-6.6 = .57
|
||||
LINUX_KERNEL_HASH-6.6.57 = 66ce426ef96f99b8e1ef7ac72e780c730ef8b970f7aa5708501c4274d7abb7b3
|
||||
|
@ -314,7 +314,7 @@ generate_static_system() {
|
||||
set system.@system[-1].hostname='ImmortalWrt'
|
||||
set system.@system[-1].timezone='UTC'
|
||||
set system.@system[-1].ttylogin='0'
|
||||
set system.@system[-1].log_size='64'
|
||||
set system.@system[-1].log_size='128'
|
||||
set system.@system[-1].urandom_seed='0'
|
||||
|
||||
delete system.ntp
|
||||
|
@ -122,6 +122,11 @@ ucidef_set_network_device_path() {
|
||||
_ucidef_set_network_device_common $1 path $2
|
||||
}
|
||||
|
||||
ucidef_set_network_device_path_port() {
|
||||
_ucidef_set_network_device_common $1 path $2
|
||||
_ucidef_set_network_device_common $1 port $3
|
||||
}
|
||||
|
||||
ucidef_set_network_device_gro() {
|
||||
_ucidef_set_network_device_common $1 gro $2
|
||||
}
|
||||
|
@ -65,12 +65,27 @@ preinit_config_switch() {
|
||||
|
||||
preinit_config_port() {
|
||||
local original
|
||||
local dev_port
|
||||
|
||||
local netdev="$1"
|
||||
local path="$2"
|
||||
local port="$3"
|
||||
|
||||
[ -d "/sys/devices/$path/net" ] || return
|
||||
original="$(ls "/sys/devices/$path/net" | head -1)"
|
||||
|
||||
if [ -z "$port" ]; then
|
||||
original="$(ls "/sys/devices/$path/net" | head -1)"
|
||||
else
|
||||
for device in /sys/devices/$path/net/*; do
|
||||
dev_port="$(cat "$device/dev_port")"
|
||||
if [ "$dev_port" = "$port" ]; then
|
||||
original="${device##*/}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
[ -z "$original" ] && return
|
||||
fi
|
||||
|
||||
[ "$netdev" = "$original" ] && return
|
||||
|
||||
@ -109,7 +124,8 @@ preinit_config_board() {
|
||||
json_select "network_device"
|
||||
json_select "$netdev"
|
||||
json_get_vars path path
|
||||
[ -n "$path" ] && preinit_config_port "$netdev" "$path"
|
||||
json_get_vars port port
|
||||
[ -n "$path" ] && preinit_config_port "$netdev" "$path" "$port"
|
||||
json_select ..
|
||||
json_select ..
|
||||
done
|
||||
|
@ -25,7 +25,14 @@ define U-Boot/ar9344_nec_aterm
|
||||
UBOOT_CONFIG:=nec_ar9344_aterm
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := ar9344_nec_aterm
|
||||
define U-Boot/qca9558_nec_aterm
|
||||
NAME:=NEC Aterm series (QCA9558)
|
||||
BUILD_SUBTARGET:= generic
|
||||
BUILD_DEVICES:=nec_wg1400hp nec_wg1800hp nec_wg1800hp2
|
||||
UBOOT_CONFIG:=nec_qca9558_aterm
|
||||
endef
|
||||
|
||||
UBOOT_TARGETS := ar9344_nec_aterm qca9558_nec_aterm
|
||||
|
||||
# don't stage files to bindir, let target/linux/ath79/image/*.mk do that
|
||||
define Package/u-boot/install
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -70,7 +70,7 @@ Subject: [PATCH] ath79: add support for NEC AR9344 Aterm series
|
||||
+/delete-node/ &spi0;
|
||||
--- a/arch/mips/mach-ath79/Kconfig
|
||||
+++ b/arch/mips/mach-ath79/Kconfig
|
||||
@@ -58,6 +58,10 @@ config TARGET_AP152
|
||||
@@ -67,6 +67,10 @@ config TARGET_AP152
|
||||
bool "AP152 Reference Board"
|
||||
select SOC_QCA956X
|
||||
|
||||
@ -81,7 +81,7 @@ Subject: [PATCH] ath79: add support for NEC AR9344 Aterm series
|
||||
config BOARD_TPLINK_WDR4300
|
||||
bool "TP-Link WDR4300 Board"
|
||||
select SOC_AR934X
|
||||
@@ -67,6 +71,7 @@ endchoice
|
||||
@@ -76,6 +80,7 @@ endchoice
|
||||
source "board/qca/ap121/Kconfig"
|
||||
source "board/qca/ap143/Kconfig"
|
||||
source "board/qca/ap152/Kconfig"
|
||||
|
@ -0,0 +1,284 @@
|
||||
From 3e01c3042fdc638f6edc57a6e64a111a785589fd Mon Sep 17 00:00:00 2001
|
||||
From: INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
Date: Sun, 23 Jun 2024 04:09:14 +0900
|
||||
Subject: [PATCH 2/2] mips: ath79: add support for NEC QCA9558 Aterm series
|
||||
|
||||
mips: ath79: cleanup defconfig for NEC QCA9558 Aterm series
|
||||
---
|
||||
arch/mips/dts/Makefile | 1 +
|
||||
arch/mips/dts/nec,qca9558-aterm.dts | 32 +++++++++++++
|
||||
arch/mips/mach-ath79/Kconfig | 5 ++
|
||||
board/nec/qca9558_aterm/Kconfig | 30 ++++++++++++
|
||||
board/nec/qca9558_aterm/Makefile | 3 ++
|
||||
board/nec/qca9558_aterm/qca9558_aterm.c | 58 +++++++++++++++++++++++
|
||||
configs/nec_qca9558_aterm_defconfig | 61 +++++++++++++++++++++++++
|
||||
include/configs/nec_qca9558_aterm.h | 28 ++++++++++++
|
||||
8 files changed, 218 insertions(+)
|
||||
create mode 100644 arch/mips/dts/nec,qca9558-aterm.dts
|
||||
create mode 100644 board/nec/qca9558_aterm/Kconfig
|
||||
create mode 100644 board/nec/qca9558_aterm/Makefile
|
||||
create mode 100644 board/nec/qca9558_aterm/qca9558_aterm.c
|
||||
create mode 100644 configs/nec_qca9558_aterm_defconfig
|
||||
create mode 100644 include/configs/nec_qca9558_aterm.h
|
||||
|
||||
--- a/arch/mips/dts/Makefile
|
||||
+++ b/arch/mips/dts/Makefile
|
||||
@@ -25,6 +25,7 @@ dtb-$(CONFIG_BOARD_LINKIT_SMART_7688) +=
|
||||
dtb-$(CONFIG_TARGET_OCTEON_EBB7304) += mrvl,octeon-ebb7304.dtb
|
||||
dtb-$(CONFIG_TARGET_OCTEON_NIC23) += mrvl,octeon-nic23.dtb
|
||||
dtb-$(CONFIG_BOARD_NEC_AR9344_ATERM) += nec,ar9344-aterm.dtb
|
||||
+dtb-$(CONFIG_BOARD_NEC_QCA9558_ATERM) += nec,qca9558-aterm.dtb
|
||||
dtb-$(CONFIG_BOARD_NETGEAR_CG3100D) += netgear,cg3100d.dtb
|
||||
dtb-$(CONFIG_BOARD_NETGEAR_DGND3700V2) += netgear,dgnd3700v2.dtb
|
||||
dtb-$(CONFIG_BOARD_SAGEM_FAST1704) += sagem,f@st1704.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/dts/nec,qca9558-aterm.dts
|
||||
@@ -0,0 +1,32 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Copyright (C) 2024 INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "qca955x.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "NEC Aterm series (QCA9558)";
|
||||
+ compatible = "nec,qca9558-aterm", "qca,qca955x";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:9600n8";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ clock-frequency = <40000000>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&xtal {
|
||||
+ clock-frequency = <40000000>;
|
||||
+};
|
||||
+
|
||||
+/* delete unused node to reduce dtb size */
|
||||
+/delete-node/ &spi0;
|
||||
--- a/arch/mips/mach-ath79/Kconfig
|
||||
+++ b/arch/mips/mach-ath79/Kconfig
|
||||
@@ -71,6 +71,10 @@ config BOARD_NEC_AR9344_ATERM
|
||||
bool "NEC Aterm series Boards (AR9344)"
|
||||
select SOC_AR934X
|
||||
|
||||
+config BOARD_NEC_QCA9558_ATERM
|
||||
+ bool "NEC Aterm series Boards (QCA9558)"
|
||||
+ select SOC_QCA955X
|
||||
+
|
||||
config BOARD_TPLINK_WDR4300
|
||||
bool "TP-Link WDR4300 Board"
|
||||
select SOC_AR934X
|
||||
@@ -81,6 +85,7 @@ source "board/qca/ap121/Kconfig"
|
||||
source "board/qca/ap143/Kconfig"
|
||||
source "board/qca/ap152/Kconfig"
|
||||
source "board/nec/ar9344_aterm/Kconfig"
|
||||
+source "board/nec/qca9558_aterm/Kconfig"
|
||||
source "board/tplink/wdr4300/Kconfig"
|
||||
|
||||
endmenu
|
||||
--- /dev/null
|
||||
+++ b/board/nec/qca9558_aterm/Kconfig
|
||||
@@ -0,0 +1,30 @@
|
||||
+if BOARD_NEC_QCA9558_ATERM
|
||||
+
|
||||
+config SYS_VENDOR
|
||||
+ default "nec"
|
||||
+
|
||||
+config SYS_SOC
|
||||
+ default "ath79"
|
||||
+
|
||||
+config SYS_BOARD
|
||||
+ default "qca9558_aterm"
|
||||
+
|
||||
+config SYS_CONFIG_NAME
|
||||
+ default "nec_qca9558_aterm"
|
||||
+
|
||||
+config TEXT_BASE
|
||||
+ default 0x9f000000
|
||||
+
|
||||
+config SYS_DCACHE_SIZE
|
||||
+ default 32768
|
||||
+
|
||||
+config SYS_DCACHE_LINE_SIZE
|
||||
+ default 32
|
||||
+
|
||||
+config SYS_ICACHE_SIZE
|
||||
+ default 65536
|
||||
+
|
||||
+config SYS_ICACHE_LINE_SIZE
|
||||
+ default 32
|
||||
+
|
||||
+endif
|
||||
--- /dev/null
|
||||
+++ b/board/nec/qca9558_aterm/Makefile
|
||||
@@ -0,0 +1,3 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0+
|
||||
+
|
||||
+obj-y = qca9558_aterm.o
|
||||
--- /dev/null
|
||||
+++ b/board/nec/qca9558_aterm/qca9558_aterm.c
|
||||
@@ -0,0 +1,58 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Copyright (C) INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+#include <init.h>
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/addrspace.h>
|
||||
+#include <asm/types.h>
|
||||
+#include <mach/ath79.h>
|
||||
+#include <mach/ar71xx_regs.h>
|
||||
+#include <mach/ddr.h>
|
||||
+#include <debug_uart.h>
|
||||
+
|
||||
+static void aterm_pinmux_config(void)
|
||||
+{
|
||||
+ void __iomem *regs = map_physmem(AR71XX_GPIO_BASE,
|
||||
+ AR71XX_GPIO_SIZE, MAP_NOCACHE);
|
||||
+
|
||||
+ /* Disable JTAG */
|
||||
+ writel(0x2, regs + QCA955X_GPIO_REG_FUNC);
|
||||
+
|
||||
+ /* Configure default GPIO OE/SET regs */
|
||||
+ writel(0xa6031f, regs + AR71XX_GPIO_REG_OE);
|
||||
+ writel(0x402800, regs + AR71XX_GPIO_REG_SET);
|
||||
+
|
||||
+ /* Configure pin multiplexing */
|
||||
+ writel(0x00000000, regs + QCA955X_GPIO_REG_OUT_FUNC0);
|
||||
+ writel(0x0c080900, regs + QCA955X_GPIO_REG_OUT_FUNC1);
|
||||
+ writel(0x00160000, regs + QCA955X_GPIO_REG_OUT_FUNC2);
|
||||
+ writel(0x00000000, regs + QCA955X_GPIO_REG_OUT_FUNC3);
|
||||
+ writel(0x00000000, regs + QCA955X_GPIO_REG_OUT_FUNC4);
|
||||
+ writel(0x00000000, regs + QCA955X_GPIO_REG_OUT_FUNC5);
|
||||
+ writel(0x00000908, regs + QCA955X_GPIO_REG_IN_ENABLE0);
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
|
||||
+void board_debug_uart_init(void)
|
||||
+{
|
||||
+ aterm_pinmux_config();
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CONFIG_BOARD_EARLY_INIT_F
|
||||
+int board_early_init_f(void)
|
||||
+{
|
||||
+#ifndef CONFIG_DEBUG_UART_BOARD_INIT
|
||||
+ aterm_pinmux_config();
|
||||
+#endif
|
||||
+
|
||||
+#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
|
||||
+ qca955x_pll_init();
|
||||
+ qca955x_ddr_init();
|
||||
+#endif
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
--- /dev/null
|
||||
+++ b/configs/nec_qca9558_aterm_defconfig
|
||||
@@ -0,0 +1,61 @@
|
||||
+CONFIG_MIPS=y
|
||||
+CONFIG_SYS_MALLOC_LEN=0x40000
|
||||
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xbd007fff
|
||||
+CONFIG_ENV_SIZE=0x1000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="nec,qca9558-aterm"
|
||||
+CONFIG_SYS_LOAD_ADDR=0x83000000
|
||||
+CONFIG_ARCH_ATH79=y
|
||||
+CONFIG_BOARD_NEC_QCA9558_ATERM=y
|
||||
+CONFIG_SYS_MIPS_TIMER_FREQ=280000000
|
||||
+CONFIG_MIPS_RELOCATION_TABLE_SIZE=0x4000
|
||||
+# CONFIG_LOCALVERSION_AUTO is not set
|
||||
+CONFIG_TIMESTAMP=y
|
||||
+CONFIG_BOOTDELAY=3
|
||||
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
|
||||
+CONFIG_USE_BOOTARGS=y
|
||||
+CONFIG_BOOTARGS="console=ttyS0,115200"
|
||||
+CONFIG_USE_BOOTCOMMAND=y
|
||||
+CONFIG_BOOTCOMMAND="bootm 0x9f040000"
|
||||
+# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_BOARD_EARLY_INIT_F=y
|
||||
+CONFIG_SYS_MALLOC_BOOTPARAMS=y
|
||||
+# CONFIG_CMDLINE_EDITING is not set
|
||||
+# CONFIG_AUTO_COMPLETE is not set
|
||||
+# CONFIG_SYS_LONGHELP is not set
|
||||
+CONFIG_SYS_MAXARGS=32
|
||||
+# CONFIG_SYS_XTRACE is not set
|
||||
+# CONFIG_CMD_BDI is not set
|
||||
+# CONFIG_CMD_CONSOLE is not set
|
||||
+# CONFIG_BOOTM_PLAN9 is not set
|
||||
+# CONFIG_BOOTM_RTEMS is not set
|
||||
+# CONFIG_BOOTM_VXWORKS is not set
|
||||
+# CONFIG_CMD_ELF is not set
|
||||
+# CONFIG_CMD_FDT is not set
|
||||
+# CONFIG_CMD_RUN is not set
|
||||
+# CONFIG_CMD_XIMG is not set
|
||||
+# CONFIG_CMD_EXPORTENV is not set
|
||||
+# CONFIG_CMD_IMPORTENV is not set
|
||||
+# CONFIG_CMD_EDITENV is not set
|
||||
+# CONFIG_CMD_SAVEENV is not set
|
||||
+# CONFIG_CMD_ENV_EXISTS is not set
|
||||
+# CONFIG_CMD_CRC32 is not set
|
||||
+# CONFIG_CMD_DM is not set
|
||||
+# CONFIG_CMD_LOADS is not set
|
||||
+# CONFIG_CMD_ECHO is not set
|
||||
+# CONFIG_CMD_ITEST is not set
|
||||
+# CONFIG_CMD_SOURCE is not set
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+# CONFIG_CMD_SLEEP is not set
|
||||
+# CONFIG_ISO_PARTITION is not set
|
||||
+# CONFIG_OF_TAG_MIGRATE is not set
|
||||
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
+# CONFIG_NET is not set
|
||||
+CONFIG_CLK=y
|
||||
+# CONFIG_GPIO is not set
|
||||
+# CONFIG_I2C is not set
|
||||
+# CONFIG_INPUT is not set
|
||||
+# CONFIG_POWER is not set
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_SYS_NS16550=y
|
||||
+# CONFIG_GZIP is not set
|
||||
--- /dev/null
|
||||
+++ b/include/configs/nec_qca9558_aterm.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (C) 2024 INAGAKI Hiroshi <musashino.open@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+#ifndef __NEC_QCA9558_ATERM_H
|
||||
+#define __NEC_QCA9558_ATERM_H
|
||||
+
|
||||
+#define CFG_SYS_SDRAM_BASE 0x80000000
|
||||
+
|
||||
+#define CFG_SYS_INIT_RAM_ADDR 0xbd000000
|
||||
+#define CFG_SYS_INIT_RAM_SIZE 0x8000
|
||||
+
|
||||
+/*
|
||||
+ * Serial Port
|
||||
+ */
|
||||
+#define CFG_SYS_NS16550_CLK 40000000
|
||||
+
|
||||
+/*
|
||||
+ * Command
|
||||
+ */
|
||||
+/* Miscellaneous configurable options */
|
||||
+
|
||||
+/*
|
||||
+ * Diagnostics
|
||||
+ */
|
||||
+
|
||||
+#endif /* __NEC_QCA9558_ATERM_H */
|
@ -8,10 +8,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_VERSION:=2024.04
|
||||
PKG_VERSION:=2024.10
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a
|
||||
PKG_HASH:=b28daf4ac17e43156363078bf510297584137f6df50fced9b12df34f61a92fb0
|
||||
|
||||
include $(INCLUDE_DIR)/u-boot.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -77,6 +77,9 @@ UBOOT_TARGETS:= \
|
||||
eDPU \
|
||||
rb5009
|
||||
|
||||
UBOOT_CUSTOMIZE_CONFIG := \
|
||||
--disable TOOLS_MKEFICAPSULE
|
||||
|
||||
define Package/u-boot/install
|
||||
$(if $(findstring cortexa53,$(BUILD_SUBTARGET)),,$(Package/u-boot/install/default))
|
||||
endef
|
||||
|
@ -1,30 +0,0 @@
|
||||
From ca4ecdce4cdcfab7df101b5df6ddad43d2f549e1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@kernel.org>
|
||||
Date: Thu, 4 Apr 2024 09:50:50 +0200
|
||||
Subject: [PATCH] arm: mvebu: turris_omnia: Enable LTO by default on Turris
|
||||
Omnia
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
U-Boot builds for Turris Omnia are approaching the limit of 0xf0000
|
||||
bytes, which is the size of the U-Boot partition on Omnia.
|
||||
|
||||
Enable LTO to get more size optimized binaries.
|
||||
|
||||
Signed-off-by: Marek Behún <kabel@kernel.org>
|
||||
Reviewed-by: Stefan Roese <sr@denx.de>
|
||||
---
|
||||
configs/turris_omnia_defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/configs/turris_omnia_defconfig
|
||||
+++ b/configs/turris_omnia_defconfig
|
||||
@@ -31,6 +31,7 @@ CONFIG_AHCI=y
|
||||
CONFIG_OF_BOARD_FIXUP=y
|
||||
CONFIG_SYS_MEMTEST_START=0x00800000
|
||||
CONFIG_SYS_MEMTEST_END=0x00ffffff
|
||||
+CONFIG_LTO=y
|
||||
CONFIG_HAS_BOARD_SIZE_LIMIT=y
|
||||
CONFIG_BOARD_SIZE_LIMIT=983040
|
||||
CONFIG_FIT=y
|
@ -1,38 +0,0 @@
|
||||
From a322b1cbb3f3e606d33a11fd18df20811e5c16f2 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Fri, 21 Jun 2024 11:41:30 +0200
|
||||
Subject: [PATCH 1/3] mvebu: armada-8k: respect CONFIG_DISTRO_DEFAULTS
|
||||
|
||||
Currently, Armada 8k config header is setting boot devices and including
|
||||
<config_distro_bootcmd.h> regardless of the CONFIG_DISTRO_DEFAULTS being
|
||||
enabled or not, thus populating the environment for distro boot even on
|
||||
devices that have no need for it.
|
||||
|
||||
So, lets simply respect the value of CONFIG_DISTRO_DEFAULTS.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
include/configs/mvebu_armada-8k.h | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/include/configs/mvebu_armada-8k.h
|
||||
+++ b/include/configs/mvebu_armada-8k.h
|
||||
@@ -30,7 +30,7 @@
|
||||
/*
|
||||
* PCI configuration
|
||||
*/
|
||||
-
|
||||
+#ifdef CONFIG_DISTRO_DEFAULTS
|
||||
#define BOOT_TARGET_DEVICES(func) \
|
||||
func(MMC, mmc, 1) \
|
||||
func(MMC, mmc, 0) \
|
||||
@@ -40,6 +40,9 @@
|
||||
func(DHCP, dhcp, na)
|
||||
|
||||
#include <config_distro_bootcmd.h>
|
||||
+#else
|
||||
+#define BOOTENV
|
||||
+#endif
|
||||
|
||||
#define CFG_EXTRA_ENV_SETTINGS \
|
||||
"scriptaddr=0x6d00000\0" \
|
@ -18,7 +18,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/drivers/net/mvpp2.c
|
||||
+++ b/drivers/net/mvpp2.c
|
||||
@@ -3255,6 +3255,76 @@ static int gop_gpcs_reset(struct mvpp2_p
|
||||
@@ -3254,6 +3254,76 @@ static int gop_gpcs_reset(struct mvpp2_p
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
static int gop_mpcs_mode(struct mvpp2_port *port)
|
||||
{
|
||||
u32 val;
|
||||
@@ -3397,7 +3467,10 @@ static int gop_port_init(struct mvpp2_po
|
||||
@@ -3396,7 +3466,10 @@ static int gop_port_init(struct mvpp2_po
|
||||
num_of_act_lanes = 2;
|
||||
mac_num = 0;
|
||||
/* configure PCS */
|
||||
|
@ -31,7 +31,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -333,6 +333,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \
|
||||
@@ -177,6 +177,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \
|
||||
armada-3720-uDPU.dtb \
|
||||
armada-7040-db-nand.dtb \
|
||||
armada-7040-db.dtb \
|
||||
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=linux-firmware
|
||||
PKG_VERSION:=20240909
|
||||
PKG_VERSION:=20241017
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=943fbd19883cf8eadf89e0b22422549db056557b1ecd30a56400615971369671
|
||||
PKG_HASH:=a26c38ef5a83272f2b98ce8bf8ca1865a852a3deea49ce5a8dd804b914351273
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
|
@ -64,6 +64,13 @@ define Package/rtl8192de-firmware/install
|
||||
endef
|
||||
$(eval $(call BuildPackage,rtl8192de-firmware))
|
||||
|
||||
Package/rtl8192du-firmware = $(call Package/firmware-default,RealTek RTL8192DU firmware,,LICENCE.rtlwifi_firmware.txt)
|
||||
define Package/rtl8192du-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8192dufw.bin $(1)/lib/firmware/rtlwifi
|
||||
endef
|
||||
$(eval $(call BuildPackage,rtl8192du-firmware))
|
||||
|
||||
Package/rtl8192eu-firmware = $(call Package/firmware-default,RealTek RTL8192EU firmware,,LICENCE.rtlwifi_firmware.txt)
|
||||
define Package/rtl8192eu-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
|
||||
|
@ -538,6 +538,44 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,dsa))
|
||||
|
||||
|
||||
define KernelPackage/dsa-b53
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Broadcom BCM53xx managed switch DSA support
|
||||
DEPENDS:=+kmod-dsa
|
||||
KCONFIG:=CONFIG_B53 \
|
||||
CONFIG_NET_DSA_TAG_BRCM \
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY \
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/dsa/b53/b53_common.ko \
|
||||
$(LINUX_DIR)/net/dsa/tag_brcm.ko
|
||||
AUTOLOAD:=$(call AutoProbe,b53_common)
|
||||
endef
|
||||
|
||||
define KernelPackage/dsa-b53/description
|
||||
Broadcom BCM53xx managed switch support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,dsa-b53))
|
||||
|
||||
|
||||
define KernelPackage/dsa-b53-mdio
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=B53 MDIO connected switch DSA driver
|
||||
DEPENDS:=+kmod-dsa-b53
|
||||
KCONFIG:=CONFIG_B53_MDIO_DRIVER
|
||||
FILES:=$(LINUX_DIR)/drivers/net/dsa/b53/b53_mdio.ko
|
||||
AUTOLOAD:=$(call AutoProbe,b53_mdio)
|
||||
endef
|
||||
|
||||
define KernelPackage/dsa-b53-mdio/description
|
||||
B53 MDIO connected switch driver
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,dsa-b53-mdio))
|
||||
|
||||
|
||||
define KernelPackage/dsa-tag-dsa
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Marvell DSA type DSA and EDSA taggers
|
||||
@ -608,36 +646,6 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,swconfig))
|
||||
|
||||
define KernelPackage/switch-bcm53xx
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Broadcom bcm53xx switch support
|
||||
DEPENDS:=+kmod-swconfig
|
||||
KCONFIG:=CONFIG_SWCONFIG_B53
|
||||
FILES:=$(LINUX_DIR)/drivers/net/phy/b53/b53_common.ko
|
||||
AUTOLOAD:=$(call AutoLoad,42,b53_common)
|
||||
endef
|
||||
|
||||
define KernelPackage/switch-bcm53xx/description
|
||||
Broadcom bcm53xx switch support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,switch-bcm53xx))
|
||||
|
||||
define KernelPackage/switch-bcm53xx-mdio
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Broadcom bcm53xx switch MDIO support
|
||||
DEPENDS:=+kmod-switch-bcm53xx
|
||||
KCONFIG:=CONFIG_SWCONFIG_B53_PHY_DRIVER
|
||||
FILES:=$(LINUX_DIR)/drivers/net/phy/b53/b53_mdio.ko
|
||||
AUTOLOAD:=$(call AutoLoad,42,b53_mdio)
|
||||
endef
|
||||
|
||||
define KernelPackage/switch-bcm53xx-mdio/description
|
||||
Broadcom bcm53xx switch MDIO support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,switch-bcm53xx-mdio))
|
||||
|
||||
|
||||
define KernelPackage/switch-ip17xx
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
@ -1589,7 +1597,7 @@ define KernelPackage/mlx4-core
|
||||
CONFIG_MLX4_CORE=y \
|
||||
CONFIG_MLX4_CORE_GEN2=y \
|
||||
CONFIG_MLX4_DEBUG=n
|
||||
AUTOLOAD:=$(call AutoProbe,mlx4_core mlx4_en)
|
||||
AUTOLOAD:=$(call AutoLoad,36,mlx4_core mlx4_en,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/mlx4-core/description
|
||||
@ -1621,7 +1629,7 @@ define KernelPackage/mlx5-core
|
||||
CONFIG_MLX5_TC_CT=n \
|
||||
CONFIG_MLX5_TLS=n \
|
||||
CONFIG_MLX5_VFIO_PCI=n
|
||||
AUTOLOAD:=$(call AutoProbe,mlx5_core)
|
||||
AUTOLOAD:=$(call AutoLoad,36,mlx5_core,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/mlx5-core/description
|
||||
@ -1854,7 +1862,7 @@ define KernelPackage/igc
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-ptp
|
||||
KCONFIG:=CONFIG_IGC
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/igc/igc.ko
|
||||
AUTOLOAD:=$(call AutoProbe,igc)
|
||||
AUTOLOAD:=$(call AutoLoad,34,igc,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/igc/description
|
||||
|
@ -1,10 +1,10 @@
|
||||
PKG_DRIVERS += \
|
||||
rtlwifi rtlwifi-pci rtlwifi-btcoexist rtlwifi-usb rtl8192c-common rtl8192d-common \
|
||||
rtl8192ce rtl8192se rtl8192de rtl8192cu rtl8723-common rtl8723be rtl8723bs rtl8821ae \
|
||||
rtl8xxxu rtw88 rtw88-pci rtw88-usb rtw88-sdio rtw88-8821c rtw88-8822b rtw88-8822c \
|
||||
rtw88-8723x rtw88-8723d rtw88-8821ce rtw88-8821cu rtw88-8822be rtw88-8822bu \
|
||||
rtw88-8822ce rtw88-8822cu rtw88-8723de rtw88-8723ds rtw88-8723du \
|
||||
rtw89 rtw89-pci rtw89-8851be rtw89-8852ae rtw89-8852b-common \
|
||||
rtl8192ce rtl8192se rtl8192de rtl8192cu rtl8192du rtl8723-common rtl8723be \
|
||||
rtl8723bs rtl8821ae rtl8xxxu rtw88 rtw88-pci rtw88-usb rtw88-sdio rtw88-8821c \
|
||||
rtw88-8822b rtw88-8822c rtw88-8723x rtw88-8723d rtw88-8821ce rtw88-8821cu \
|
||||
rtw88-8822be rtw88-8822bu rtw88-8822ce rtw88-8822cu rtw88-8723de rtw88-8723ds \
|
||||
rtw88-8723du rtw89 rtw89-pci rtw89-8851be rtw89-8852ae rtw89-8852b-common \
|
||||
rtw89-8852be rtw89-8852ce rtw89-8922ae
|
||||
|
||||
config-$(call config_package,rtlwifi) += RTL_CARDS RTLWIFI
|
||||
@ -16,6 +16,7 @@ config-$(call config_package,rtl8192ce) += RTL8192CE
|
||||
config-$(call config_package,rtl8192se) += RTL8192SE
|
||||
config-$(call config_package,rtl8192d-common) += RTL8192D_COMMON
|
||||
config-$(call config_package,rtl8192de) += RTL8192DE
|
||||
config-$(call config_package,rtl8192du) += RTL8192DU
|
||||
config-$(call config_package,rtl8192cu) += RTL8192CU
|
||||
config-$(call config_package,rtl8821ae) += RTL8821AE
|
||||
config-$(CONFIG_PACKAGE_RTLWIFI_DEBUG) += RTLWIFI_DEBUG
|
||||
@ -146,6 +147,14 @@ define KernelPackage/rtl8192de
|
||||
AUTOLOAD:=$(call AutoProbe,rtl8192de)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8192du
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Realtek RTL8192DU support
|
||||
DEPENDS+= +kmod-rtlwifi-usb +kmod-rtl8192d-common +rtl8192du-firmware
|
||||
FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtlwifi/rtl8192du/rtl8192du.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtl8192du)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8192cu
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Realtek RTL8192CU/RTL8188CU support
|
||||
|
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mwlwifi
|
||||
PKG_RELEASE=1
|
||||
PKG_RELEASE=2
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
PKG_LICENSE_FILES:=
|
||||
|
@ -1,165 +0,0 @@
|
||||
From ed4422e98ababf956674da3438ac42b3aa32c66e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Wed, 10 May 2023 00:41:06 +0200
|
||||
Subject: [PATCH] Fix compilation warning with 64 bit system
|
||||
|
||||
Use %zu and %zd where possible for ssize_t and size_t.
|
||||
Use PTR_ERR to correctly convert to negative error.
|
||||
Use universal pointer to support both 32 and 64bit systems.
|
||||
|
||||
Fix compilation warning:
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/fwcmd.c: In function 'mwl_fwcmd_get_fw_core_dump':
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/fwcmd.c:3608:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
|
||||
3608 | (const void *)((u32)pcmd +
|
||||
| ^
|
||||
In file included from ./include/linux/device.h:15,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/device.h:3,
|
||||
from ./include/linux/dma-mapping.h:7,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/dma-mapping.h:3,
|
||||
from ./include/linux/skbuff.h:31,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/skbuff.h:3,
|
||||
from ./include/linux/if_ether.h:19,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/if_ether.h:3,
|
||||
from ./include/linux/etherdevice.h:20,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/etherdevice.h:3,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:20:
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c: In function 'pcie_tx_init_ndp':
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:38: error: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Werror=format=]
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
./include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
|
||||
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
|
||||
| ^~~
|
||||
./include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
|
||||
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211/net/cfg80211.h:8828:9: note: in expansion of macro 'dev_err'
|
||||
8828 | dev_err(&(wiphy)->dev, format, ##args)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:17: note: in expansion of macro 'wiphy_err'
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ^~~~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:67: note: format string is defined here
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ~^
|
||||
| |
|
||||
| int
|
||||
| %ld
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:38: error: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
./include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
|
||||
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
|
||||
| ^~~
|
||||
./include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
|
||||
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211/net/cfg80211.h:8828:9: note: in expansion of macro 'dev_err'
|
||||
8828 | dev_err(&(wiphy)->dev, format, ##args)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:17: note: in expansion of macro 'wiphy_err'
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ^~~~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.c:338:71: note: format string is defined here
|
||||
338 | wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
| ~^
|
||||
| |
|
||||
| int
|
||||
| %ld
|
||||
CC [M] /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/debugfs.o
|
||||
In file included from ./include/linux/device.h:15,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/device.h:3,
|
||||
from ./include/linux/dma-mapping.h:7,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/dma-mapping.h:3,
|
||||
from ./include/linux/skbuff.h:31,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/skbuff.h:3,
|
||||
from ./include/linux/if_ether.h:19,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/if_ether.h:3,
|
||||
from ./include/linux/etherdevice.h:20,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211-backport/linux/etherdevice.h:3,
|
||||
from /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:19:
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c: In function 'pcie_bf_mimo_ctrl_decode':
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:1325:37: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
|
||||
1325 | filename, (unsigned int)fp_data);
|
||||
| ^
|
||||
./include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
|
||||
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
|
||||
| ^~~~~~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/staging_dir/target-aarch64_cortex-a53_musl/usr/include/mac80211/net/cfg80211.h:8828:9: note: in expansion of macro 'dev_err'
|
||||
8828 | dev_err(&(wiphy)->dev, format, ##args)
|
||||
| ^~~~~~~
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:1324:17: note: in expansion of macro 'wiphy_err'
|
||||
1324 | wiphy_err(priv->hw->wiphy, "Error opening %s! %x\n",
|
||||
| ^~~~~~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
make[4]: *** [scripts/Makefile.build:289: /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/tx_ndp.o] Error 1
|
||||
make[4]: *** Waiting for unfinished jobs....
|
||||
cc1: all warnings being treated as errors
|
||||
make[4]: *** [scripts/Makefile.build:289: /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.o] Error 1
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/debugfs.c: In function 'mwl_debugfs_regrdwr_read':
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/debugfs.c:1335:43: error: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Werror=format=]
|
||||
1335 | "error: %d(%u 0x%08x 0x%08x)\n",
|
||||
| ~^
|
||||
| |
|
||||
| int
|
||||
| %ld
|
||||
1336 | ret, priv->reg_type, priv->reg_offset,
|
||||
| ~~~
|
||||
| |
|
||||
| ssize_t {aka long int}
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
debugfs.c | 2 +-
|
||||
hif/fwcmd.c | 2 +-
|
||||
hif/pcie/8964/tx_ndp.c | 2 +-
|
||||
hif/pcie/pcie.c | 4 ++--
|
||||
4 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/debugfs.c
|
||||
+++ b/debugfs.c
|
||||
@@ -1342,7 +1342,7 @@ done:
|
||||
priv->reg_value);
|
||||
else
|
||||
len += scnprintf(p + len, size - len,
|
||||
- "error: %d(%u 0x%08x 0x%08x)\n",
|
||||
+ "error: %zd(%u 0x%08x 0x%08x)\n",
|
||||
ret, priv->reg_type, priv->reg_offset,
|
||||
priv->reg_value);
|
||||
|
||||
--- a/hif/fwcmd.c
|
||||
+++ b/hif/fwcmd.c
|
||||
@@ -3623,7 +3623,7 @@ int mwl_fwcmd_get_fw_core_dump(struct ie
|
||||
core_dump->size_kb = pcmd->cmd_data.coredump.size_kb;
|
||||
core_dump->flags = pcmd->cmd_data.coredump.flags;
|
||||
memcpy(buff,
|
||||
- (const void *)((u32)pcmd +
|
||||
+ (const void *)((uintptr_t)pcmd +
|
||||
sizeof(struct hostcmd_cmd_get_fw_core_dump) -
|
||||
sizeof(struct hostcmd_cmd_get_fw_core_dump_)),
|
||||
MAX_CORE_DUMP_BUFFER);
|
||||
--- a/hif/pcie/8964/tx_ndp.c
|
||||
+++ b/hif/pcie/8964/tx_ndp.c
|
||||
@@ -336,7 +336,7 @@ int pcie_tx_init_ndp(struct ieee80211_hw
|
||||
|
||||
if (sizeof(struct pcie_tx_ctrl_ndp) >
|
||||
sizeof(tx_info->driver_data)) {
|
||||
- wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
+ wiphy_err(hw->wiphy, "driver data is not enough: %zu (%zu)\n",
|
||||
sizeof(struct pcie_tx_ctrl_ndp),
|
||||
sizeof(tx_info->driver_data));
|
||||
return -ENOMEM;
|
||||
--- a/hif/pcie/pcie.c
|
||||
+++ b/hif/pcie/pcie.c
|
||||
@@ -1466,8 +1466,8 @@ static void pcie_bf_mimo_ctrl_decode(struct mwl_priv *priv,
|
||||
&fp_data->f_pos);
|
||||
filp_close(fp_data, current->files);
|
||||
} else {
|
||||
- wiphy_err(priv->hw->wiphy, "Error opening %s! %x\n",
|
||||
- filename, (unsigned int)fp_data);
|
||||
+ wiphy_err(priv->hw->wiphy, "Error opening %s! %ld\n",
|
||||
+ filename, PTR_ERR(fp_data));
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
@ -0,0 +1,35 @@
|
||||
From 8daab38dfc1fe4d3df9fb5fc18610b942d5cc3b2 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sun, 12 May 2024 14:28:19 +0200
|
||||
Subject: [PATCH] Simplify coredump memcpy in mwl_fwcmd_get_fw_core_dump
|
||||
|
||||
Simplify coredump memcpy in mwl_fwcmd_get_fw_core_dump. Instead of doing
|
||||
fragile address additions, just access the buffer member in pcmd and
|
||||
reference the pointer.
|
||||
|
||||
This fix a compilation warning in 64Bit system:
|
||||
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/fwcmd.c: In function 'mwl_fwcmd_get_fw_core_dump': /home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/fwcmd.c:3608:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
|
||||
3608 | (const void *)((u32)pcmd +
|
||||
| ^
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
hif/fwcmd.c | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
--- a/hif/fwcmd.c
|
||||
+++ b/hif/fwcmd.c
|
||||
@@ -3622,11 +3622,7 @@ int mwl_fwcmd_get_fw_core_dump(struct ie
|
||||
core_dump->context = pcmd->cmd_data.coredump.context;
|
||||
core_dump->size_kb = pcmd->cmd_data.coredump.size_kb;
|
||||
core_dump->flags = pcmd->cmd_data.coredump.flags;
|
||||
- memcpy(buff,
|
||||
- (const void *)((u32)pcmd +
|
||||
- sizeof(struct hostcmd_cmd_get_fw_core_dump) -
|
||||
- sizeof(struct hostcmd_cmd_get_fw_core_dump_)),
|
||||
- MAX_CORE_DUMP_BUFFER);
|
||||
+ memcpy(buff, pcmd->buffer, MAX_CORE_DUMP_BUFFER);
|
||||
|
||||
mutex_unlock(&priv->fwcmd_mutex);
|
||||
|
@ -0,0 +1,32 @@
|
||||
From 37c7a798719f1d04326d36c35711c4249bc7492e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sun, 12 May 2024 14:32:20 +0200
|
||||
Subject: [PATCH] Correctly use PTR_ERR in pcie_bf_mimo_ctrl_decode
|
||||
|
||||
Correctly use PTR_ERR instead of cast to unsigned int in
|
||||
pcie_bf_mimo_ctrl_decode if fp_data pointer contains errors.
|
||||
|
||||
This fix a compilation warning on 64Bit:
|
||||
|
||||
/home/ansuel/openwrt-ansuel/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/mwlwifi-2023-04-29-6a436714/hif/pcie/pcie.c:1325:37: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
|
||||
1325 | filename, (unsigned int)fp_data);
|
||||
| ^
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
hif/pcie/pcie.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/hif/pcie/pcie.c
|
||||
+++ b/hif/pcie/pcie.c
|
||||
@@ -1466,8 +1466,8 @@ static void pcie_bf_mimo_ctrl_decode(str
|
||||
&fp_data->f_pos);
|
||||
filp_close(fp_data, current->files);
|
||||
} else {
|
||||
- wiphy_err(priv->hw->wiphy, "Error opening %s! %x\n",
|
||||
- filename, (unsigned int)fp_data);
|
||||
+ wiphy_err(priv->hw->wiphy, "Error opening %s! %ld\n",
|
||||
+ filename, PTR_ERR(fp_data));
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
@ -0,0 +1,36 @@
|
||||
From 5fe83bd36c035099a6d721a8e42cf3d04a1ce2b6 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sun, 12 May 2024 14:36:32 +0200
|
||||
Subject: [PATCH] Use %zu and %zd for ssize_t and size_t
|
||||
|
||||
Use %zu and %zu for ssize_t and size_t to fix compilation warning on
|
||||
64Bit.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
debugfs.c | 2 +-
|
||||
hif/pcie/8964/tx_ndp.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/debugfs.c
|
||||
+++ b/debugfs.c
|
||||
@@ -1342,7 +1342,7 @@ done:
|
||||
priv->reg_value);
|
||||
else
|
||||
len += scnprintf(p + len, size - len,
|
||||
- "error: %d(%u 0x%08x 0x%08x)\n",
|
||||
+ "error: %zd(%u 0x%08x 0x%08x)\n",
|
||||
ret, priv->reg_type, priv->reg_offset,
|
||||
priv->reg_value);
|
||||
|
||||
--- a/hif/pcie/8964/tx_ndp.c
|
||||
+++ b/hif/pcie/8964/tx_ndp.c
|
||||
@@ -336,7 +336,7 @@ int pcie_tx_init_ndp(struct ieee80211_hw
|
||||
|
||||
if (sizeof(struct pcie_tx_ctrl_ndp) >
|
||||
sizeof(tx_info->driver_data)) {
|
||||
- wiphy_err(hw->wiphy, "driver data is not enough: %d (%d)\n",
|
||||
+ wiphy_err(hw->wiphy, "driver data is not enough: %zu (%zu)\n",
|
||||
sizeof(struct pcie_tx_ctrl_ndp),
|
||||
sizeof(tx_info->driver_data));
|
||||
return -ENOMEM;
|
@ -0,0 +1,28 @@
|
||||
From 44419b1feae3eedda21cdc71da9acb611ca1a6fd Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sun, 12 May 2024 14:42:01 +0200
|
||||
Subject: [PATCH] Fix debugfs compilation warning in mwl_debugfs_info_read
|
||||
|
||||
Fix debugfs compilation warning on 64Bit mwl_debugfs_info_read by
|
||||
casing for uintptr_t and use %zx.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
debugfs.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/debugfs.c
|
||||
+++ b/debugfs.c
|
||||
@@ -364,10 +364,10 @@ static ssize_t mwl_debugfs_info_read(str
|
||||
"-----------------------=> address| address|qlen|fw_desc_cnt\n");
|
||||
spin_lock_irqsave(&pcie_priv->tx_desc_lock, flags);
|
||||
len += scnprintf(p + len, size - len,
|
||||
- "wcb_base0 : %x => %8x|%8p|%4d|%d\n", get_hw_spec->wcb_base0, *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base0)),skb_queue_len(&pcie_priv->txq[0]),pcie_priv->fw_desc_cnt[0]);
|
||||
+ "wcb_base0 : %x => %8px|%8p|%4d|%d\n", get_hw_spec->wcb_base0, (void *)(uintptr_t)le32_to_cpu(get_hw_spec->wcb_base0),(void *)(uintptr_t)le32_to_cpu(get_hw_spec->wcb_base0),skb_queue_len(&pcie_priv->txq[0]),pcie_priv->fw_desc_cnt[0]);
|
||||
for(i = 0; i < SYSADPT_TOTAL_TX_QUEUES - 1; i++)
|
||||
len += scnprintf(p + len, size - len,
|
||||
- "wcb_base[%2d]: %x => %8x|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], *((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),(void *)*((unsigned int *)le32_to_cpu(get_hw_spec->wcb_base[i])),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
|
||||
+ "wcb_base[%2d]: %x => %8px|%8p|%4d|%d\n", i, get_hw_spec->wcb_base[i], (void *)(uintptr_t)le32_to_cpu(get_hw_spec->wcb_base[i]),(void *)(uintptr_t)le32_to_cpu(get_hw_spec->wcb_base[i]),skb_queue_len(&pcie_priv->txq[i + 1]),pcie_priv->fw_desc_cnt[i + 1]);
|
||||
spin_unlock_irqrestore(&pcie_priv->tx_desc_lock, flags);
|
||||
}
|
||||
|
32
package/kernel/mwlwifi/patches/005-Use-BUILD_BUG_ON.patch
Normal file
32
package/kernel/mwlwifi/patches/005-Use-BUILD_BUG_ON.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From dba74289f74095944b39fc96b069c512b5321b7a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sun, 12 May 2024 14:53:45 +0200
|
||||
Subject: [PATCH] Use BUILD_BUG_ON instead of checking size at runtime for
|
||||
pcie_tx_init_ndp
|
||||
|
||||
Use BUILD_BUG_ON instead of checking size at runtime for
|
||||
pcie_tx_init_ndp.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
hif/pcie/8964/tx_ndp.c | 9 ++-------
|
||||
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/hif/pcie/8964/tx_ndp.c
|
||||
+++ b/hif/pcie/8964/tx_ndp.c
|
||||
@@ -334,13 +334,8 @@ int pcie_tx_init_ndp(struct ieee80211_hw
|
||||
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(&skb);
|
||||
int rc;
|
||||
|
||||
- if (sizeof(struct pcie_tx_ctrl_ndp) >
|
||||
- sizeof(tx_info->driver_data)) {
|
||||
- wiphy_err(hw->wiphy, "driver data is not enough: %zu (%zu)\n",
|
||||
- sizeof(struct pcie_tx_ctrl_ndp),
|
||||
- sizeof(tx_info->driver_data));
|
||||
- return -ENOMEM;
|
||||
- }
|
||||
+ BUILD_BUG_ON(sizeof(struct pcie_tx_ctrl_ndp) >
|
||||
+ sizeof(tx_info->driver_data));
|
||||
|
||||
rc = pcie_tx_ring_alloc_ndp(priv);
|
||||
if (rc) {
|
@ -304,7 +304,7 @@
|
||||
}
|
||||
|
||||
if (++tx_send_head_new >= MAX_NUM_TX_DESC)
|
||||
@@ -488,7 +488,7 @@ void pcie_tx_done_ndp(struct ieee80211_h
|
||||
@@ -483,7 +483,7 @@ void pcie_tx_done_ndp(struct ieee80211_h
|
||||
}
|
||||
|
||||
pcie_tx_prepare_info(priv, 0, tx_info);
|
||||
@ -313,7 +313,7 @@
|
||||
|
||||
bypass_ack:
|
||||
if (++tx_done_tail >= MAX_TX_RING_DONE_SIZE)
|
||||
@@ -601,13 +601,13 @@ void pcie_tx_xmit_ndp(struct ieee80211_h
|
||||
@@ -596,13 +596,13 @@ void pcie_tx_xmit_ndp(struct ieee80211_h
|
||||
ack_skb = skb_copy(skb, GFP_ATOMIC);
|
||||
ack_info = IEEE80211_SKB_CB(ack_skb);
|
||||
pcie_tx_prepare_info(priv, 0, ack_info);
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=iptables
|
||||
PKG_VERSION:=1.8.8
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/iptables/files
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,9 +7,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
|
||||
PKG_SOURCE_DATE:=2024-06-20
|
||||
PKG_SOURCE_VERSION:=6ac44974185a3e7dc7848e97b964339948e817a7
|
||||
PKG_MIRROR_HASH:=ee5b29f45593750a6806cfa7cad3fd766b321b44107a6b481b890efe82a7dbf5
|
||||
PKG_SOURCE_DATE:=2024-10-16
|
||||
PKG_SOURCE_VERSION:=88fbd52666e3b3f83ebab40f95b84f265824a729
|
||||
PKG_MIRROR_HASH:=4809421286257a91b2f29e79b7bbd0852a72c6e82169b340036cca5703881232
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
PKG_BUILD_DEPENDS:=openssl zlib
|
||||
|
@ -79,6 +79,7 @@
|
||||
qca,no-eeprom;
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
qca,tx-gain-buffalo;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -98,10 +98,9 @@
|
||||
ath9k: wifi@0,0 {
|
||||
compatible = "pci168c,0033";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
|
||||
nvmem-cells = <&macaddr_oemdata_1d 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
nvmem-cells = <&macaddr_oemdata_1d 1>, <&cal_oemdata_5000>;
|
||||
nvmem-cell-names = "mac-address", "calibration";
|
||||
};
|
||||
};
|
||||
|
||||
@ -161,7 +160,7 @@
|
||||
reg = <0x100000 0xe00000>;
|
||||
};
|
||||
|
||||
oemdata: partition@fe0000 {
|
||||
partition@fe0000 {
|
||||
label = "oemdata";
|
||||
reg = <0xfe0000 0x010000>;
|
||||
read-only;
|
||||
@ -176,6 +175,14 @@
|
||||
reg = <0x1d 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
cal_oemdata_1000: calibration@1000 {
|
||||
reg = <0x1000 0x440>;
|
||||
};
|
||||
|
||||
cal_oemdata_5000: calibration@5000 {
|
||||
reg = <0x5000 0x440>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -190,9 +197,8 @@
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
qca,no-eeprom;
|
||||
nvmem-cells = <&macaddr_oemdata_1d 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
nvmem-cells = <&macaddr_oemdata_1d 0>, <&cal_oemdata_1000>;
|
||||
nvmem-cell-names = "mac-address", "calibration";
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
|
371
target/linux/ath79/dts/qca9558_nec_aterm.dtsi
Normal file
371
target/linux/ath79/dts/qca9558_nec_aterm.dtsi
Normal file
@ -0,0 +1,371 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
#include "qca955x.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
/*
|
||||
* don't specify bootargs property in DeviceTree to
|
||||
* enable a console with a default baudrate (9600)
|
||||
* or passed console= parameter from the bootloader
|
||||
*/
|
||||
/delete-property/ bootargs;
|
||||
stdout-path = &uart0;
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
label-mac-device = ð0;
|
||||
};
|
||||
|
||||
i2c {
|
||||
compatible = "i2c-gpio";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmx_gpio_i2c_pins>;
|
||||
sda-gpios = <&gpio 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
||||
scl-gpios = <&gpio 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
gpio1: gpio@20 {
|
||||
compatible = "ti,tca6416";
|
||||
reg = <0x20>;
|
||||
reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
usb-hub-reset {
|
||||
gpio-hog;
|
||||
gpios = <0 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&jtag_disable_pins>;
|
||||
|
||||
button-wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
button-eco {
|
||||
label = "eco";
|
||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_0>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
switch-bridge {
|
||||
label = "br";
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
button-reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
switch-converter {
|
||||
label = "cnv";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_2>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led-0 {
|
||||
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = "converter";
|
||||
};
|
||||
|
||||
led-1 {
|
||||
label = "green:converter";
|
||||
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = "converter";
|
||||
};
|
||||
|
||||
led-2 {
|
||||
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = "tv";
|
||||
};
|
||||
|
||||
led-3 {
|
||||
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = "tv";
|
||||
};
|
||||
|
||||
led-4 {
|
||||
gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_WLAN_5GHZ;
|
||||
};
|
||||
|
||||
led-5 {
|
||||
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_WLAN_5GHZ;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
led-6 {
|
||||
gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_WLAN_2GHZ;
|
||||
};
|
||||
|
||||
led-7 {
|
||||
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_WLAN_2GHZ;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
led-8 {
|
||||
gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_WAN_ONLINE;
|
||||
};
|
||||
|
||||
led-9 {
|
||||
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_WAN_ONLINE;
|
||||
};
|
||||
|
||||
led_power_red: led-10 {
|
||||
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
};
|
||||
|
||||
led_power_green: led-11 {
|
||||
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
default-state = "on";
|
||||
};
|
||||
};
|
||||
|
||||
regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb-vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/*
|
||||
* since the OEM bootloader requires unknown
|
||||
* filesystem on firmware area, needs to be
|
||||
* replaced to u-boot before OpenWrt installation
|
||||
*/
|
||||
partition@0 {
|
||||
label = "bootloader";
|
||||
reg = <0x000000 0x020000>;
|
||||
};
|
||||
|
||||
/* not compatible with u-boot */
|
||||
partition@20000 {
|
||||
label = "config";
|
||||
reg = <0x020000 0x010000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_config_0: macaddr@0 {
|
||||
reg = <0x0 0x6>;
|
||||
};
|
||||
|
||||
macaddr_config_6: macaddr@6 {
|
||||
reg = <0x6 0x6>;
|
||||
};
|
||||
|
||||
macaddr_config_c: macaddr@c {
|
||||
reg = <0xc 0x6>;
|
||||
};
|
||||
|
||||
macaddr_config_12: macaddr@12 {
|
||||
reg = <0x12 0x6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "art";
|
||||
reg = <0x030000 0x010000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cal_art_1000: calibration@1000 {
|
||||
reg = <0x1000 0x440>;
|
||||
};
|
||||
|
||||
cal_art_5000: calibration@5000 {
|
||||
reg = <0x5000 0x844>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x040000 0xfc0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
|
||||
qca,ar8327-initvals = <
|
||||
0x04 0x00080080 /* PORT0_PAD_MODE_CTRL */
|
||||
0x08 0x00000000 /* PORT5_PAD_MODE_CTRL */
|
||||
0x0c 0x07600000 /* PORT6_PAD_MODE_CTRL */
|
||||
0x10 0xa12613a0 /* POWER_ON_STRAP */
|
||||
0x50 0xcc36cc36 /* LED_CTRL0 */
|
||||
0x54 0xca36ca36 /* LED_CTRL1 */
|
||||
0x58 0xc936c936 /* LED_CTRL2 */
|
||||
0x5c 0x03ffff00 /* LED_CTRL3 */
|
||||
0x7c 0x0000007e /* PORT0_STATUS */
|
||||
0x94 0x0000007e /* PORT6_STATUS */
|
||||
0xe0 0xc74164d0 /* SGMII_CONTROL */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&macaddr_config_c>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
phy-handle = <&phy0>;
|
||||
qca955x-sgmii-fixup;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
|
||||
rgmii-enabled = <1>;
|
||||
rxdv-delay = <2>;
|
||||
rxd-delay = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&macaddr_config_6>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
pll-data = <0x03000000 0x00000101 0x00001616>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&gpio {
|
||||
switch-reset {
|
||||
gpio-hog;
|
||||
gpios = <11 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,003c";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&cal_art_5000>, <&macaddr_config_12>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
&pinmux {
|
||||
/* mux GPIO19/20 as GPIO instead of native I2C on QCA9558 */
|
||||
pmx_gpio_i2c_pins: gpio-i2c-pins {
|
||||
pinctrl-single,bits = <0x10 0x0 0xff000000>,
|
||||
<0x14 0x0 0xff>;
|
||||
};
|
||||
};
|
||||
|
||||
&usb_phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb0 {
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
dr_mode = "host";
|
||||
|
||||
/delete-node/ port@1;
|
||||
|
||||
/* NEC uPD720114 */
|
||||
hub@1 {
|
||||
compatible = "usb0409,005a";
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&cal_art_1000>, <&macaddr_config_0>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
};
|
12
target/linux/ath79/dts/qca9558_nec_wg1400hp.dts
Normal file
12
target/linux/ath79/dts/qca9558_nec_wg1400hp.dts
Normal file
@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca9558_nec_aterm.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "nec,wg1400hp", "qca,qca9558";
|
||||
model = "NEC Aterm WG1400HP";
|
||||
};
|
||||
|
||||
ð0 {
|
||||
pll-data = <0x5a000000 0x00000101 0x00001616>;
|
||||
};
|
12
target/linux/ath79/dts/qca9558_nec_wg1800hp.dts
Normal file
12
target/linux/ath79/dts/qca9558_nec_wg1800hp.dts
Normal file
@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca9558_nec_aterm.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "nec,wg1800hp", "qca,qca9558";
|
||||
model = "NEC Aterm WG1800HP";
|
||||
};
|
||||
|
||||
ð0 {
|
||||
pll-data = <0x5a000000 0x00000101 0x00001616>;
|
||||
};
|
12
target/linux/ath79/dts/qca9558_nec_wg1800hp2.dts
Normal file
12
target/linux/ath79/dts/qca9558_nec_wg1800hp2.dts
Normal file
@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca9558_nec_aterm.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "nec,wg1800hp2", "qca,qca9558";
|
||||
model = "NEC Aterm WG1800HP2";
|
||||
};
|
||||
|
||||
ð0 {
|
||||
pll-data = <0x96000000 0x00000101 0x00001616>;
|
||||
};
|
@ -64,8 +64,8 @@
|
||||
compatible ="qca,qca9550-usb-phy", "qca,ar7200-usb-phy";
|
||||
reg = <0x18030000 4>, <0x18030004 4>;
|
||||
|
||||
reset-names = "usb-phy", "usb-suspend-override";
|
||||
resets = <&rst 4>, <&rst 3>;
|
||||
reset-names = "usb-phy-analog", "usb-phy", "usb-suspend-override";
|
||||
resets = <&rst 11>, <&rst 4>, <&rst 3>;
|
||||
|
||||
#phy-cells = <0>;
|
||||
|
||||
@ -76,8 +76,8 @@
|
||||
compatible = "qca,qca9550-usb-phy", "qca,ar7200-usb-phy";
|
||||
reg = <0x18030010 4>, <0x18030014 4>;
|
||||
|
||||
reset-names = "usb-phy", "usb-suspend-override";
|
||||
resets = <&rst2 4>, <&rst2 3>;
|
||||
reset-names = "usb-phy-analog", "usb-phy", "usb-suspend-override";
|
||||
resets = <&rst2 11>, <&rst2 4>, <&rst2 3>;
|
||||
|
||||
#phy-cells = <0>;
|
||||
|
||||
|
@ -189,6 +189,9 @@ ath79_setup_interfaces()
|
||||
;;
|
||||
belkin,f9j1108-v2|\
|
||||
belkin,f9k1115-v2|\
|
||||
nec,wg1400hp|\
|
||||
nec,wg1800hp|\
|
||||
nec,wg1800hp2|\
|
||||
tplink,archer-c5-v1|\
|
||||
tplink,archer-c7-v1|\
|
||||
tplink,archer-c7-v2|\
|
||||
@ -569,9 +572,7 @@ ath79_setup_interfaces()
|
||||
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan"
|
||||
;;
|
||||
ubnt,edgeswitch-8xp)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4:lan:5" "5:lan:6" "6:lan:7" "7:lan:8" "8@eth0"
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8" "eth1"
|
||||
;;
|
||||
ubnt,routerstation-pro)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
|
@ -9,9 +9,6 @@ board=$(board_name)
|
||||
case "$FIRMWARE" in
|
||||
"ath9k-eeprom-ahb-18100000.wmac.bin")
|
||||
case $board in
|
||||
aruba,ap-115)
|
||||
caldata_extract "oemdata" 0x1000 0x440
|
||||
;;
|
||||
asus,pl-ac56|\
|
||||
asus,rp-ac51|\
|
||||
asus,rp-ac66)
|
||||
@ -73,9 +70,6 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
"ath9k-eeprom-pci-0000:00:00.0.bin")
|
||||
case $board in
|
||||
aruba,ap-115)
|
||||
caldata_extract "oemdata" 0x5000 0x440
|
||||
;;
|
||||
avm,fritz300e)
|
||||
caldata_extract_reverse "urloader" 0x1541 0x440
|
||||
;;
|
||||
|
@ -17,6 +17,17 @@ platform_check_image() {
|
||||
ubnt,routerstation-pro)
|
||||
platform_check_image_redboot_fis "$1"
|
||||
;;
|
||||
nec,wg1400hp|\
|
||||
nec,wg1800hp|\
|
||||
nec,wg1800hp2)
|
||||
local uboot_mtd=$(find_mtd_part "bootloader")
|
||||
|
||||
# check "U-Boot <year>.<month>" string in the "bootloader" partition
|
||||
if ! grep -q "U-Boot [0-9]\{4\}\.[0-9]\{2\}" $uboot_mtd; then
|
||||
v "The bootloader doesn't seem to be replaced to U-Boot!"
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
return 0
|
||||
;;
|
||||
|
@ -58,8 +58,9 @@ TARGET_DEVICES += ubnt_edgeswitch-5xp
|
||||
define Device/ubnt_edgeswitch-8xp
|
||||
$(Device/ubnt-sw)
|
||||
DEVICE_MODEL := EdgeSwitch 8XP
|
||||
DEVICE_PACKAGES += kmod-switch-bcm53xx-mdio
|
||||
DEFAULT := n
|
||||
DEVICE_PACKAGES += kmod-dsa-b53-mdio
|
||||
DEVICE_COMPAT_VERSION := 1.1
|
||||
DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_edgeswitch-8xp
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
include ./common-buffalo.mk
|
||||
include ./common-nec.mk
|
||||
include ./common-netgear.mk
|
||||
include ./common-senao.mk
|
||||
include ./common-tp-link.mk
|
||||
@ -2062,6 +2063,36 @@ define Device/nec_wg1200cr
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg1200cr
|
||||
|
||||
define Device/nec_wg1400hp
|
||||
SOC := qca9558
|
||||
DEVICE_MODEL := Aterm WG1400HP
|
||||
IMAGE_SIZE := 16128k
|
||||
NEC_FW_TYPE := H040b
|
||||
$(Device/nec-netbsd-aterm)
|
||||
DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg1400hp
|
||||
|
||||
define Device/nec_wg1800hp
|
||||
SOC := qca9558
|
||||
DEVICE_MODEL := Aterm WG1800HP
|
||||
IMAGE_SIZE := 16128k
|
||||
NEC_FW_TYPE := H040a
|
||||
$(Device/nec-netbsd-aterm)
|
||||
DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg1800hp
|
||||
|
||||
define Device/nec_wg1800hp2
|
||||
SOC := qca9558
|
||||
DEVICE_MODEL := Aterm WG1800HP2
|
||||
IMAGE_SIZE := 16128k
|
||||
NEC_FW_TYPE := H049
|
||||
$(Device/nec-netbsd-aterm)
|
||||
DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg1800hp2
|
||||
|
||||
define Device/nec_wg800hp
|
||||
SOC := qca9563
|
||||
DEVICE_VENDOR := NEC
|
||||
|
@ -741,5 +741,7 @@
|
||||
#define QCA955X_ETH_CFG_SGMII_GMAC0 BIT(6)
|
||||
|
||||
#define QCA955X_GMAC_REG_SGMII_SERDES 0x0018
|
||||
#define QCA955X_GMAC_REG_MR_AN_CONTROL 0x1c
|
||||
#define QCA955X_GMAC_REG_SGMII_CONFIG 0x34
|
||||
|
||||
#endif /* __ASM_MACH_AR71XX_REGS_H */
|
||||
|
@ -51,9 +51,12 @@ static void tlwr1043nd_init(void)
|
||||
static inline void tlwr1043nd_init(void) {}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOARD_MERAKI_MR18
|
||||
#if defined(CONFIG_BOARD_MERAKI_MR18) || \
|
||||
defined(CONFIG_BOARD_NEC_WG1400HP) || \
|
||||
defined(CONFIG_BOARD_NEC_WG1800HP) || \
|
||||
defined(CONFIG_BOARD_NEC_WG1800HP2)
|
||||
|
||||
static int mr18_extract_sgmii_res_cal(void)
|
||||
static int extract_qca955x_sgmii_res_cal(void)
|
||||
{
|
||||
unsigned int base;
|
||||
unsigned int reversed_sgmii_value;
|
||||
@ -138,7 +141,7 @@ static void qca955x_device_reset_clear(unsigned int mask)
|
||||
WRITEREG(reg, t & ~mask);
|
||||
}
|
||||
|
||||
static void mr18_setup_qca955x_eth_serdes_cal(unsigned int sgmii_value)
|
||||
static void setup_qca955x_eth_serdes_cal(unsigned int sgmii_value)
|
||||
{
|
||||
unsigned int ethbase, pllbase, t;
|
||||
|
||||
@ -166,16 +169,18 @@ static void mr18_setup_qca955x_eth_serdes_cal(unsigned int sgmii_value)
|
||||
QCA955X_SGMII_SERDES_LOCK_DETECT_STATUS))
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOARD_MERAKI_MR18
|
||||
static inline void mr18_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
printf("Meraki MR18\n");
|
||||
|
||||
res = mr18_extract_sgmii_res_cal();
|
||||
res = extract_qca955x_sgmii_res_cal();
|
||||
if (res >= 0)
|
||||
mr18_setup_qca955x_eth_serdes_cal(res);
|
||||
setup_qca955x_eth_serdes_cal(res);
|
||||
|
||||
}
|
||||
#else
|
||||
@ -213,26 +218,16 @@ static inline void huawei_ap_init(void)
|
||||
static inline void huawei_ap_init(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BOARD_NEC_WG600HP) || \
|
||||
#if defined(CONFIG_BOARD_NEC_WG1400HP) || \
|
||||
defined(CONFIG_BOARD_NEC_WG1800HP) || \
|
||||
defined(CONFIG_BOARD_NEC_WG1800HP2) || \
|
||||
defined(CONFIG_BOARD_NEC_WG600HP) || \
|
||||
defined(CONFIG_BOARD_NEC_WR8750N) || \
|
||||
defined(CONFIG_BOARD_NEC_WR9500N)
|
||||
|
||||
#define AR934X_PLL_SWITCH_CLK_CTRL_REG 0x24
|
||||
#define AR934X_PLL_SWITCH_CLK_CTRL_SWITCHCLK_SEL BIT(0)
|
||||
|
||||
static inline void nec_aterm_init(void)
|
||||
static inline void nec_aterm_reset_common(void)
|
||||
{
|
||||
unsigned int reg, val;
|
||||
unsigned int reg = KSEG1ADDR(AR71XX_RESET_BASE);
|
||||
|
||||
printf("NEC Aterm series (AR9344)\n");
|
||||
|
||||
/* set REFCLK=40MHz to switch PLL */
|
||||
reg = KSEG1ADDR(AR71XX_PLL_BASE);
|
||||
val = READREG(reg + AR934X_PLL_SWITCH_CLK_CTRL_REG);
|
||||
val &= ~AR934X_PLL_SWITCH_CLK_CTRL_SWITCHCLK_SEL;
|
||||
WRITEREG(reg + AR934X_PLL_SWITCH_CLK_CTRL_REG, val);
|
||||
|
||||
reg = KSEG1ADDR(AR71XX_RESET_BASE);
|
||||
#ifndef LOADADDR
|
||||
/*
|
||||
* This is for initramfs-factory image.
|
||||
@ -262,6 +257,29 @@ static inline void nec_aterm_init(void)
|
||||
* booting from stock bootloader
|
||||
*/
|
||||
WRITEREG(reg + AR71XX_RESET_REG_WDOG, 0xffffffff);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BOARD_NEC_WG600HP) || \
|
||||
defined(CONFIG_BOARD_NEC_WR8750N) || \
|
||||
defined(CONFIG_BOARD_NEC_WR9500N)
|
||||
|
||||
#define AR934X_PLL_SWITCH_CLK_CTRL_REG 0x24
|
||||
#define AR934X_PLL_SWITCH_CLK_CTRL_SWITCHCLK_SEL BIT(0)
|
||||
|
||||
static inline void nec_aterm_init(void)
|
||||
{
|
||||
unsigned int reg, val;
|
||||
|
||||
printf("NEC Aterm series (AR9344)\n");
|
||||
|
||||
/* set REFCLK=40MHz to switch PLL */
|
||||
reg = KSEG1ADDR(AR71XX_PLL_BASE);
|
||||
val = READREG(reg + AR934X_PLL_SWITCH_CLK_CTRL_REG);
|
||||
val &= ~AR934X_PLL_SWITCH_CLK_CTRL_SWITCHCLK_SEL;
|
||||
WRITEREG(reg + AR934X_PLL_SWITCH_CLK_CTRL_REG, val);
|
||||
|
||||
nec_aterm_reset_common();
|
||||
|
||||
/*
|
||||
* deassert some RESET bits not handled by drivers
|
||||
@ -270,11 +288,61 @@ static inline void nec_aterm_init(void)
|
||||
* - ETH_SWITCH(_ANALOG): eth0
|
||||
* - RTC : wmac
|
||||
*/
|
||||
reg = KSEG1ADDR(AR71XX_RESET_BASE);
|
||||
val = READREG(reg + AR934X_RESET_REG_RESET_MODULE);
|
||||
val &= ~(AR934X_RESET_ETH_SWITCH | AR934X_RESET_ETH_SWITCH_ANALOG |
|
||||
AR934X_RESET_RTC);
|
||||
WRITEREG(reg + AR934X_RESET_REG_RESET_MODULE, val);
|
||||
}
|
||||
#elif defined(CONFIG_BOARD_NEC_WG1400HP) || \
|
||||
defined(CONFIG_BOARD_NEC_WG1800HP) || \
|
||||
defined(CONFIG_BOARD_NEC_WG1800HP2)
|
||||
|
||||
#define QCA955X_GMAC_MR_AN_CONTROL_PHY_RESET_MASK BIT(15)
|
||||
#define QCA955X_GMAC_MR_AN_CONTROL_FULL_DUPLEX_MASK BIT(8)
|
||||
#define QCA955X_GMAC_MR_AN_CONTROL_SPEED_SEL1_MASK BIT(6)
|
||||
|
||||
#define QCA955X_GMAC_SGMII_CONFIG_SPEED_SHIFT 6
|
||||
#define QCA955X_GMAC_SGMII_CONFIG_SPEED_1000M 0x2
|
||||
#define QCA955X_GMAC_SGMII_CONFIG_FORCE_SPEED_MASK BIT(5)
|
||||
#define QCA955X_GMAC_SGMII_CONFIG_MODE_CTRL_SHIFT 0
|
||||
#define QCA955X_GMAC_SGMII_CONFIG_MODE_SGMII 0x2
|
||||
|
||||
static inline void nec_aterm_init(void)
|
||||
{
|
||||
unsigned int reg, val;
|
||||
int ret;
|
||||
|
||||
printf("NEC Aterm series (QCA9558)\n");
|
||||
|
||||
nec_aterm_reset_common();
|
||||
|
||||
printf("\nCalibrating SGMII\n");
|
||||
ret = extract_qca955x_sgmii_res_cal();
|
||||
if (ret >= 0)
|
||||
setup_qca955x_eth_serdes_cal(ret);
|
||||
|
||||
/* set SGMII force mode to make eth1 working */
|
||||
printf("\nConfiguring SGMII force mode\n");
|
||||
reg = KSEG1ADDR(QCA955X_GMAC_BASE);
|
||||
WRITEREG(reg + QCA955X_GMAC_REG_SGMII_CONFIG,
|
||||
QCA955X_GMAC_SGMII_CONFIG_SPEED_1000M
|
||||
<< QCA955X_GMAC_SGMII_CONFIG_SPEED_SHIFT |
|
||||
QCA955X_GMAC_SGMII_CONFIG_FORCE_SPEED_MASK |
|
||||
QCA955X_GMAC_SGMII_CONFIG_MODE_SGMII
|
||||
<< QCA955X_GMAC_SGMII_CONFIG_MODE_CTRL_SHIFT);
|
||||
printf(" SGMII_CONFIG : 0x%08x\n",
|
||||
READREG(reg + QCA955X_GMAC_REG_SGMII_CONFIG));
|
||||
val = QCA955X_GMAC_MR_AN_CONTROL_FULL_DUPLEX_MASK |
|
||||
QCA955X_GMAC_MR_AN_CONTROL_SPEED_SEL1_MASK;
|
||||
WRITEREG(reg + QCA955X_GMAC_REG_MR_AN_CONTROL,
|
||||
val | QCA955X_GMAC_MR_AN_CONTROL_PHY_RESET_MASK);
|
||||
printf(" MR_AN_CONTROL: 0x%08x\n",
|
||||
READREG(reg + QCA955X_GMAC_REG_MR_AN_CONTROL));
|
||||
WRITEREG(reg + QCA955X_GMAC_REG_MR_AN_CONTROL, val);
|
||||
printf(" MR_AN_CONTROL: 0x%08x\n",
|
||||
READREG(reg + QCA955X_GMAC_REG_MR_AN_CONTROL));
|
||||
}
|
||||
#else
|
||||
static inline void nec_aterm_init(void) {}
|
||||
#endif
|
||||
|
@ -751,7 +751,7 @@ SVN-Revision: 35130
|
||||
EXPORT_SYMBOL(xfrm_parse_spi);
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -4221,14 +4221,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||
@@ -4262,14 +4262,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||
{
|
||||
const __be32 *ptr = (const __be32 *)(th + 1);
|
||||
|
||||
|
@ -14,7 +14,7 @@ We don't agree with upstream revert so undo it.
|
||||
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -489,8 +489,10 @@ static void xhci_pci_quirks(struct devic
|
||||
@@ -490,8 +490,10 @@ static void xhci_pci_quirks(struct devic
|
||||
pdev->device == 0x3432)
|
||||
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
||||
|
||||
|
@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -239,6 +239,9 @@
|
||||
@@ -242,6 +242,9 @@
|
||||
#define USB_VENDOR_ID_BAANTO 0x2453
|
||||
#define USB_DEVICE_ID_BAANTO_MT_190W2 0x0100
|
||||
|
||||
@ -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
|
||||
|
||||
@@ -1394,6 +1397,9 @@
|
||||
@@ -1404,6 +1407,9 @@
|
||||
#define USB_VENDOR_ID_XIAOMI 0x2717
|
||||
#define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014
|
||||
|
||||
|
@ -24,7 +24,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -492,6 +492,7 @@ static void xhci_pci_quirks(struct devic
|
||||
@@ -493,6 +493,7 @@ static void xhci_pci_quirks(struct devic
|
||||
if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
|
||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
||||
xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
|
||||
|
@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -493,6 +493,7 @@ static void xhci_pci_quirks(struct devic
|
||||
@@ -494,6 +494,7 @@ static void xhci_pci_quirks(struct devic
|
||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
||||
xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
|
||||
xhci->quirks |= XHCI_AVOID_DQ_ON_LINK;
|
||||
|
@ -90,7 +90,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
/* Allow 3 retries for everything but isoc, set CErr = 3 */
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -494,6 +494,7 @@ static void xhci_pci_quirks(struct devic
|
||||
@@ -495,6 +495,7 @@ static void xhci_pci_quirks(struct devic
|
||||
xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
|
||||
xhci->quirks |= XHCI_AVOID_DQ_ON_LINK;
|
||||
xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH;
|
||||
|
@ -47,7 +47,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
/* Device for a quirk */
|
||||
#define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
|
||||
#define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000
|
||||
@@ -294,6 +296,16 @@ static int xhci_pci_reinit(struct xhci_h
|
||||
@@ -295,6 +297,16 @@ static int xhci_pci_reinit(struct xhci_h
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
@@ -495,6 +507,8 @@ static void xhci_pci_quirks(struct devic
|
||||
@@ -496,6 +508,8 @@ static void xhci_pci_quirks(struct devic
|
||||
xhci->quirks |= XHCI_AVOID_DQ_ON_LINK;
|
||||
xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH;
|
||||
xhci->quirks |= XHCI_VLI_SS_BULK_OUT_BUG;
|
||||
|
@ -212,7 +212,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
},
|
||||
--- a/drivers/usb/dwc3/core.c
|
||||
+++ b/drivers/usb/dwc3/core.c
|
||||
@@ -1202,6 +1202,24 @@ static void dwc3_config_threshold(struct
|
||||
@@ -1208,6 +1208,24 @@ static void dwc3_config_threshold(struct
|
||||
}
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
/**
|
||||
* dwc3_core_init - Low-level initialization of DWC3 Core
|
||||
* @dwc: Pointer to our controller context structure
|
||||
@@ -1267,6 +1285,8 @@ static int dwc3_core_init(struct dwc3 *d
|
||||
@@ -1273,6 +1291,8 @@ static int dwc3_core_init(struct dwc3 *d
|
||||
|
||||
dwc3_set_incr_burst_type(dwc);
|
||||
|
||||
@ -246,7 +246,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
ret = dwc3_phy_power_on(dwc);
|
||||
if (ret)
|
||||
goto err_exit_phy;
|
||||
@@ -1356,6 +1376,24 @@ static int dwc3_core_init(struct dwc3 *d
|
||||
@@ -1362,6 +1382,24 @@ static int dwc3_core_init(struct dwc3 *d
|
||||
|
||||
dwc3_config_threshold(dwc);
|
||||
|
||||
@ -271,7 +271,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
return 0;
|
||||
|
||||
err_power_off_phy:
|
||||
@@ -1499,6 +1537,7 @@ static void dwc3_get_properties(struct d
|
||||
@@ -1505,6 +1543,7 @@ static void dwc3_get_properties(struct d
|
||||
u8 tx_thr_num_pkt_prd = 0;
|
||||
u8 tx_max_burst_prd = 0;
|
||||
u8 tx_fifo_resize_max_num;
|
||||
@ -279,7 +279,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
const char *usb_psy_name;
|
||||
int ret;
|
||||
|
||||
@@ -1521,6 +1560,9 @@ static void dwc3_get_properties(struct d
|
||||
@@ -1527,6 +1566,9 @@ static void dwc3_get_properties(struct d
|
||||
*/
|
||||
tx_fifo_resize_max_num = 6;
|
||||
|
||||
@ -289,7 +289,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
dwc->maximum_speed = usb_get_maximum_speed(dev);
|
||||
dwc->max_ssp_rate = usb_get_maximum_ssp_rate(dev);
|
||||
dwc->dr_mode = usb_get_dr_mode(dev);
|
||||
@@ -1642,6 +1684,9 @@ static void dwc3_get_properties(struct d
|
||||
@@ -1648,6 +1690,9 @@ static void dwc3_get_properties(struct d
|
||||
dwc->dis_split_quirk = device_property_read_bool(dev,
|
||||
"snps,dis-split-quirk");
|
||||
|
||||
@ -299,7 +299,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
dwc->lpm_nyet_threshold = lpm_nyet_threshold;
|
||||
dwc->tx_de_emphasis = tx_de_emphasis;
|
||||
|
||||
@@ -1659,6 +1704,8 @@ static void dwc3_get_properties(struct d
|
||||
@@ -1665,6 +1710,8 @@ static void dwc3_get_properties(struct d
|
||||
dwc->tx_thr_num_pkt_prd = tx_thr_num_pkt_prd;
|
||||
dwc->tx_max_burst_prd = tx_max_burst_prd;
|
||||
|
||||
@ -308,7 +308,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
dwc->imod_interval = 0;
|
||||
|
||||
dwc->tx_fifo_resize_max_num = tx_fifo_resize_max_num;
|
||||
@@ -1934,6 +1981,12 @@ static int dwc3_probe(struct platform_de
|
||||
@@ -1940,6 +1987,12 @@ static int dwc3_probe(struct platform_de
|
||||
|
||||
dwc3_get_properties(dwc);
|
||||
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
|
||||
--- a/drivers/hwmon/Kconfig
|
||||
+++ b/drivers/hwmon/Kconfig
|
||||
@@ -2367,6 +2367,13 @@ config SENSORS_INTEL_M10_BMC_HWMON
|
||||
@@ -2371,6 +2371,13 @@ config SENSORS_INTEL_M10_BMC_HWMON
|
||||
sensors monitor various telemetry data of different components on the
|
||||
card, e.g. board temperature, FPGA core temperature/voltage/current.
|
||||
|
||||
|
@ -832,7 +832,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
return;
|
||||
|
||||
mutex_init(&vc4file->perfmon.lock);
|
||||
@@ -126,7 +126,7 @@ void vc4_perfmon_close_file(struct vc4_f
|
||||
@@ -131,7 +131,7 @@ void vc4_perfmon_close_file(struct vc4_f
|
||||
{
|
||||
struct vc4_dev *vc4 = vc4file->dev;
|
||||
|
||||
@ -841,7 +841,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
return;
|
||||
|
||||
mutex_lock(&vc4file->perfmon.lock);
|
||||
@@ -146,7 +146,7 @@ int vc4_perfmon_create_ioctl(struct drm_
|
||||
@@ -151,7 +151,7 @@ int vc4_perfmon_create_ioctl(struct drm_
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
@ -850,7 +850,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
return -ENODEV;
|
||||
|
||||
if (!vc4->v3d) {
|
||||
@@ -200,7 +200,7 @@ int vc4_perfmon_destroy_ioctl(struct drm
|
||||
@@ -205,7 +205,7 @@ int vc4_perfmon_destroy_ioctl(struct drm
|
||||
struct drm_vc4_perfmon_destroy *req = data;
|
||||
struct vc4_perfmon *perfmon;
|
||||
|
||||
@ -859,7 +859,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
return -ENODEV;
|
||||
|
||||
if (!vc4->v3d) {
|
||||
@@ -228,7 +228,7 @@ int vc4_perfmon_get_values_ioctl(struct
|
||||
@@ -233,7 +233,7 @@ int vc4_perfmon_get_values_ioctl(struct
|
||||
struct vc4_perfmon *perfmon;
|
||||
int ret;
|
||||
|
||||
|
@ -432,7 +432,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
return;
|
||||
|
||||
mutex_init(&vc4file->perfmon.lock);
|
||||
@@ -126,7 +126,7 @@ void vc4_perfmon_close_file(struct vc4_f
|
||||
@@ -131,7 +131,7 @@ void vc4_perfmon_close_file(struct vc4_f
|
||||
{
|
||||
struct vc4_dev *vc4 = vc4file->dev;
|
||||
|
||||
@ -441,7 +441,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
return;
|
||||
|
||||
mutex_lock(&vc4file->perfmon.lock);
|
||||
@@ -146,7 +146,7 @@ int vc4_perfmon_create_ioctl(struct drm_
|
||||
@@ -151,7 +151,7 @@ int vc4_perfmon_create_ioctl(struct drm_
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
@ -450,7 +450,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
return -ENODEV;
|
||||
|
||||
if (!vc4->v3d) {
|
||||
@@ -200,7 +200,7 @@ int vc4_perfmon_destroy_ioctl(struct drm
|
||||
@@ -205,7 +205,7 @@ int vc4_perfmon_destroy_ioctl(struct drm
|
||||
struct drm_vc4_perfmon_destroy *req = data;
|
||||
struct vc4_perfmon *perfmon;
|
||||
|
||||
@ -459,7 +459,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
||||
return -ENODEV;
|
||||
|
||||
if (!vc4->v3d) {
|
||||
@@ -228,7 +228,7 @@ int vc4_perfmon_get_values_ioctl(struct
|
||||
@@ -233,7 +233,7 @@ int vc4_perfmon_get_values_ioctl(struct
|
||||
struct vc4_perfmon *perfmon;
|
||||
int ret;
|
||||
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/drivers/usb/dwc3/core.c
|
||||
+++ b/drivers/usb/dwc3/core.c
|
||||
@@ -1366,6 +1366,9 @@ static int dwc3_core_init(struct dwc3 *d
|
||||
@@ -1372,6 +1372,9 @@ static int dwc3_core_init(struct dwc3 *d
|
||||
if (dwc->parkmode_disable_hs_quirk)
|
||||
reg |= DWC3_GUCTL1_PARKMODE_DISABLE_HS;
|
||||
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
if (DWC3_VER_IS_WITHIN(DWC3, 290A, ANY) &&
|
||||
(dwc->maximum_speed == USB_SPEED_HIGH ||
|
||||
dwc->maximum_speed == USB_SPEED_FULL))
|
||||
@@ -1664,6 +1667,8 @@ static void dwc3_get_properties(struct d
|
||||
@@ -1670,6 +1673,8 @@ static void dwc3_get_properties(struct d
|
||||
"snps,parkmode-disable-ss-quirk");
|
||||
dwc->parkmode_disable_hs_quirk = device_property_read_bool(dev,
|
||||
"snps,parkmode-disable-hs-quirk");
|
||||
|
@ -25,7 +25,7 @@ Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||||
|
||||
--- a/fs/ntfs3/fslog.c
|
||||
+++ b/fs/ntfs3/fslog.c
|
||||
@@ -3914,6 +3914,8 @@ check_restart_area:
|
||||
@@ -3929,6 +3929,8 @@ check_restart_area:
|
||||
log->l_size = log->orig_file_size;
|
||||
log->page_size = norm_file_page(t32, &log->l_size,
|
||||
t32 == DefaultLogPageSize);
|
||||
|
@ -1,78 +0,0 @@
|
||||
From f8001196455311eb128fcafd98cb2050a70218df Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sat, 6 Jan 2024 01:12:22 +0100
|
||||
Subject: [PATCH 4/4] net: ethernet: cortina: Drop TSO support
|
||||
|
||||
The recent change to allow large frames without hardware checksumming
|
||||
slotted in software checksumming in the driver if hardware could not
|
||||
do it.
|
||||
|
||||
This will however upset TSO (TCP Segment Offloading). Typical
|
||||
error dumps includes this:
|
||||
|
||||
skb len=2961 headroom=222 headlen=66 tailroom=0
|
||||
(...)
|
||||
WARNING: CPU: 0 PID: 956 at net/core/dev.c:3259 skb_warn_bad_offload+0x7c/0x108
|
||||
gemini-ethernet-port: caps=(0x0000010000154813, 0x00002007ffdd7889)
|
||||
|
||||
And the packets do not go through.
|
||||
|
||||
The TSO implementation is bogus: a TSO enabled driver must propagate
|
||||
the skb_shinfo(skb)->gso_size value to the TSO engine on the NIC.
|
||||
|
||||
Drop the size check and TSO offloading features for now: this
|
||||
needs to be fixed up properly.
|
||||
|
||||
After this ethernet works fine on Gemini devices with a direct connected
|
||||
PHY such as D-Link DNS-313.
|
||||
|
||||
Also tested to still be working with a DSA switch using the Gemini
|
||||
ethernet as conduit interface.
|
||||
|
||||
Link: https://lore.kernel.org/netdev/CANn89iJLfxng1sYL5Zk0mknXpyYQPCp83m3KgD2KJ2_hKCpEUg@mail.gmail.com/
|
||||
Suggested-by: Eric Dumazet <edumazet@google.com>
|
||||
Fixes: d4d0c5b4d279 ("net: ethernet: cortina: Handle large frames")
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Reviewed-by: Eric Dumazet <edumazet@google.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/cortina/gemini.c | 15 ++-------------
|
||||
1 file changed, 2 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cortina/gemini.c
|
||||
+++ b/drivers/net/ethernet/cortina/gemini.c
|
||||
@@ -79,8 +79,7 @@ MODULE_PARM_DESC(debug, "Debug level (0=
|
||||
#define GMAC0_IRQ4_8 (GMAC0_MIB_INT_BIT | GMAC0_RX_OVERRUN_INT_BIT)
|
||||
|
||||
#define GMAC_OFFLOAD_FEATURES (NETIF_F_SG | NETIF_F_IP_CSUM | \
|
||||
- NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM | \
|
||||
- NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
|
||||
+ NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM)
|
||||
|
||||
/**
|
||||
* struct gmac_queue_page - page buffer per-page info
|
||||
@@ -1148,23 +1147,13 @@ static int gmac_map_tx_bufs(struct net_d
|
||||
struct gmac_txdesc *txd;
|
||||
skb_frag_t *skb_frag;
|
||||
dma_addr_t mapping;
|
||||
- unsigned short mtu;
|
||||
void *buffer;
|
||||
int ret;
|
||||
|
||||
- mtu = ETH_HLEN;
|
||||
- mtu += netdev->mtu;
|
||||
- if (skb->protocol == htons(ETH_P_8021Q))
|
||||
- mtu += VLAN_HLEN;
|
||||
-
|
||||
+ /* TODO: implement proper TSO using MTU in word3 */
|
||||
word1 = skb->len;
|
||||
word3 = SOF_BIT;
|
||||
|
||||
- if (word1 > mtu) {
|
||||
- word1 |= TSS_MTU_ENABLE_BIT;
|
||||
- word3 |= mtu;
|
||||
- }
|
||||
-
|
||||
if (skb->len >= ETH_FRAME_LEN) {
|
||||
/* Hardware offloaded checksumming isn't working on frames
|
||||
* bigger than 1514 bytes. A hypothesis about this is that the
|
@ -1,124 +0,0 @@
|
||||
From 30fcba19ed88997a2909e4a68b4d39ff371357c3 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 1 May 2024 21:46:31 +0200
|
||||
Subject: [PATCH 1/5] net: ethernet: cortina: Restore TSO support
|
||||
|
||||
An earlier commit deleted the TSO support in the Cortina Gemini
|
||||
driver because the driver was confusing gso_size and MTU,
|
||||
probably because what the Linux kernel calls "gso_size" was
|
||||
called "MTU" in the datasheet.
|
||||
|
||||
Restore the functionality properly reading the gso_size from
|
||||
the skbuff.
|
||||
|
||||
Tested with iperf3, running a server on a different machine
|
||||
and client on the device with the cortina gemini ethernet:
|
||||
|
||||
Connecting to host 192.168.1.2, port 5201
|
||||
60008000.ethernet-port eth0: segment offloading mss = 05ea len=1c8a
|
||||
60008000.ethernet-port eth0: segment offloading mss = 05ea len=1c8a
|
||||
60008000.ethernet-port eth0: segment offloading mss = 05ea len=27da
|
||||
60008000.ethernet-port eth0: segment offloading mss = 05ea len=0b92
|
||||
60008000.ethernet-port eth0: segment offloading mss = 05ea len=2bda
|
||||
(...)
|
||||
|
||||
(The hardware MSS 0x05ea here includes the ethernet headers.)
|
||||
|
||||
If I disable all segment offloading on the receiving host and
|
||||
dump packets using tcpdump -xx like this:
|
||||
|
||||
ethtool -K enp2s0 gro off gso off tso off
|
||||
tcpdump -xx -i enp2s0 host 192.168.1.136
|
||||
|
||||
I get segmented packages such as this when running iperf3:
|
||||
|
||||
23:16:54.024139 IP OpenWrt.lan.59168 > Fecusia.targus-getdata1:
|
||||
Flags [.], seq 1486:2934, ack 1, win 4198,
|
||||
options [nop,nop,TS val 3886192908 ecr 3601341877], length 1448
|
||||
0x0000: fc34 9701 a0c6 14d6 4da8 3c4f 0800 4500
|
||||
0x0010: 05dc 16a0 4000 4006 9aa1 c0a8 0188 c0a8
|
||||
0x0020: 0102 e720 1451 ff25 9822 4c52 29cf 8010
|
||||
0x0030: 1066 ac8c 0000 0101 080a e7a2 990c d6a8
|
||||
(...)
|
||||
0x05c0: 5e49 e109 fe8c 4617 5e18 7a82 7eae d647
|
||||
0x05d0: e8ee ae64 dc88 c897 3f8a 07a4 3a33 6b1b
|
||||
0x05e0: 3501 a30f 2758 cc44 4b4a
|
||||
|
||||
Several such packets often follow after each other verifying
|
||||
the segmentation into 0x05a8 (1448) byte packages also on the
|
||||
reveiving end. As can be seen, the ethernet frames are
|
||||
0x05ea (1514) in size.
|
||||
|
||||
Performance with iperf3 before this patch: ~15.5 Mbit/s
|
||||
Performance with iperf3 after this patch: ~175 Mbit/s
|
||||
|
||||
This was running a 60 second test (twice) the best measurement
|
||||
was 179 Mbit/s.
|
||||
|
||||
For comparison if I run iperf3 with UDP I get around 1.05 Mbit/s
|
||||
both before and after this patch.
|
||||
|
||||
While this is a gigabit ethernet interface, the CPU is a cheap
|
||||
D-Link DIR-685 router (based on the ARMv5 Faraday FA526 at
|
||||
~50 MHz), and the software is not supposed to drive traffic,
|
||||
as the device has a DSA chip, so this kind of numbers can be
|
||||
expected.
|
||||
|
||||
Fixes: ac631873c9e7 ("net: ethernet: cortina: Drop TSO support")
|
||||
Reviewed-by: Eric Dumazet <edumazet@google.com>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/net/ethernet/cortina/gemini.c | 23 +++++++++++++++++++----
|
||||
1 file changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cortina/gemini.c
|
||||
+++ b/drivers/net/ethernet/cortina/gemini.c
|
||||
@@ -79,7 +79,8 @@ MODULE_PARM_DESC(debug, "Debug level (0=
|
||||
#define GMAC0_IRQ4_8 (GMAC0_MIB_INT_BIT | GMAC0_RX_OVERRUN_INT_BIT)
|
||||
|
||||
#define GMAC_OFFLOAD_FEATURES (NETIF_F_SG | NETIF_F_IP_CSUM | \
|
||||
- NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM)
|
||||
+ NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM | \
|
||||
+ NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
|
||||
|
||||
/**
|
||||
* struct gmac_queue_page - page buffer per-page info
|
||||
@@ -1148,13 +1149,25 @@ static int gmac_map_tx_bufs(struct net_d
|
||||
skb_frag_t *skb_frag;
|
||||
dma_addr_t mapping;
|
||||
void *buffer;
|
||||
+ u16 mss;
|
||||
int ret;
|
||||
|
||||
- /* TODO: implement proper TSO using MTU in word3 */
|
||||
word1 = skb->len;
|
||||
word3 = SOF_BIT;
|
||||
|
||||
- if (skb->len >= ETH_FRAME_LEN) {
|
||||
+ mss = skb_shinfo(skb)->gso_size;
|
||||
+ if (mss) {
|
||||
+ /* This means we are dealing with TCP and skb->len is the
|
||||
+ * sum total of all the segments. The TSO will deal with
|
||||
+ * chopping this up for us.
|
||||
+ */
|
||||
+ /* The accelerator needs the full frame size here */
|
||||
+ mss += skb_tcp_all_headers(skb);
|
||||
+ netdev_dbg(netdev, "segment offloading mss = %04x len=%04x\n",
|
||||
+ mss, skb->len);
|
||||
+ word1 |= TSS_MTU_ENABLE_BIT;
|
||||
+ word3 |= mss;
|
||||
+ } else if (skb->len >= ETH_FRAME_LEN) {
|
||||
/* Hardware offloaded checksumming isn't working on frames
|
||||
* bigger than 1514 bytes. A hypothesis about this is that the
|
||||
* checksum buffer is only 1518 bytes, so when the frames get
|
||||
@@ -1169,7 +1182,9 @@ static int gmac_map_tx_bufs(struct net_d
|
||||
return ret;
|
||||
}
|
||||
word1 |= TSS_BYPASS_BIT;
|
||||
- } else if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
+ }
|
||||
+
|
||||
+ if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
int tcp = 0;
|
||||
|
||||
/* We do not switch off the checksumming on non TCP/UDP
|
@ -0,0 +1,43 @@
|
||||
Subject: [PATCH v2] netfilter: xtables: fix typo causing some targets to not load on IPv6
|
||||
Date: Sat, 19 Oct 2024 08:05:07 +0300 [thread overview]
|
||||
Message-ID: <20241019-xtables-typos-v2-1-6b8b1735dc8e@0upti.me> (raw)
|
||||
|
||||
These were added with the wrong family in 4cdc55e, which seems
|
||||
to just have been a typo, but now ip6tables rules with --set-mark
|
||||
don't work anymore, which is pretty bad.
|
||||
|
||||
Fixes: 0bfcb7b71e73 ("netfilter: xtables: avoid NFPROTO_UNSPEC where needed")
|
||||
Reviewed-by: Phil Sutter <phil@nwl.cc>
|
||||
Signed-off-by: Ilya Katsnelson <me@0upti.me>
|
||||
---
|
||||
Changes in v2:
|
||||
- Fixed a typo in the commit message (that's karma).
|
||||
- Replaced a reference to backport commit.
|
||||
- Link to v1: https://lore.kernel.org/r/20241018-xtables-typos-v1-1-02a51789c0ec@0upti.me
|
||||
---
|
||||
net/netfilter/xt_NFLOG.c | 2 +-
|
||||
net/netfilter/xt_mark.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/net/netfilter/xt_NFLOG.c
|
||||
+++ b/net/netfilter/xt_NFLOG.c
|
||||
@@ -79,7 +79,7 @@ static struct xt_target nflog_tg_reg[] _
|
||||
{
|
||||
.name = "NFLOG",
|
||||
.revision = 0,
|
||||
- .family = NFPROTO_IPV4,
|
||||
+ .family = NFPROTO_IPV6,
|
||||
.checkentry = nflog_tg_check,
|
||||
.destroy = nflog_tg_destroy,
|
||||
.target = nflog_tg,
|
||||
--- a/net/netfilter/xt_mark.c
|
||||
+++ b/net/netfilter/xt_mark.c
|
||||
@@ -62,7 +62,7 @@ static struct xt_target mark_tg_reg[] __
|
||||
{
|
||||
.name = "MARK",
|
||||
.revision = 2,
|
||||
- .family = NFPROTO_IPV4,
|
||||
+ .family = NFPROTO_IPV6,
|
||||
.target = mark_tg,
|
||||
.targetsize = sizeof(struct xt_mark_tginfo2),
|
||||
.me = THIS_MODULE,
|
@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/phy/phy_device.c
|
||||
+++ b/drivers/net/phy/phy_device.c
|
||||
@@ -3201,6 +3201,7 @@ static int of_phy_led(struct phy_device
|
||||
@@ -3202,6 +3202,7 @@ static int of_phy_led(struct phy_device
|
||||
struct device *dev = &phydev->mdio.dev;
|
||||
struct led_init_data init_data = {};
|
||||
struct led_classdev *cdev;
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct phy_led *phyled;
|
||||
u32 index;
|
||||
int err;
|
||||
@@ -3218,6 +3219,21 @@ static int of_phy_led(struct phy_device
|
||||
@@ -3219,6 +3220,21 @@ static int of_phy_led(struct phy_device
|
||||
if (index > U8_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/phy/phy_device.c
|
||||
+++ b/drivers/net/phy/phy_device.c
|
||||
@@ -3219,11 +3219,17 @@ static int of_phy_led(struct phy_device
|
||||
@@ -3220,11 +3220,17 @@ static int of_phy_led(struct phy_device
|
||||
if (index > U8_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -2291,6 +2291,7 @@ CONFIG_HARDEN_BRANCH_HISTORY=y
|
||||
# CONFIG_HID_MAGICMOUSE is not set
|
||||
# CONFIG_HID_MALTRON is not set
|
||||
# CONFIG_HID_MAYFLASH is not set
|
||||
# CONFIG_HID_MCP2200 is not set
|
||||
# CONFIG_HID_MCP2221 is not set
|
||||
# CONFIG_HID_MEGAWORLD_FF is not set
|
||||
# CONFIG_HID_MICROSOFT is not set
|
||||
|
@ -195,20 +195,37 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||
|
||||
return connmark_tg_shift(skb, info);
|
||||
}
|
||||
@@ -167,6 +194,16 @@ static struct xt_target connmark_tg_reg[
|
||||
.targetsize = sizeof(struct xt_connmark_tginfo2),
|
||||
@@ -168,6 +195,16 @@ static struct xt_target connmark_tg_reg[
|
||||
.destroy = connmark_tg_destroy,
|
||||
.me = THIS_MODULE,
|
||||
+ },
|
||||
},
|
||||
+ {
|
||||
+ .name = "CONNMARK",
|
||||
+ .revision = 3,
|
||||
+ .family = NFPROTO_UNSPEC,
|
||||
+ .family = NFPROTO_IPV4,
|
||||
+ .checkentry = connmark_tg_check,
|
||||
+ .target = connmark_tg_v3,
|
||||
+ .targetsize = sizeof(struct xt_connmark_tginfo3),
|
||||
+ .destroy = connmark_tg_destroy,
|
||||
+ .me = THIS_MODULE,
|
||||
}
|
||||
+ },
|
||||
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
|
||||
{
|
||||
.name = "CONNMARK",
|
||||
@@ -189,6 +226,16 @@ static struct xt_target connmark_tg_reg[
|
||||
.destroy = connmark_tg_destroy,
|
||||
.me = THIS_MODULE,
|
||||
},
|
||||
+ {
|
||||
+ .name = "CONNMARK",
|
||||
+ .revision = 3,
|
||||
+ .family = NFPROTO_IPV6,
|
||||
+ .checkentry = connmark_tg_check,
|
||||
+ .target = connmark_tg_v3,
|
||||
+ .targetsize = sizeof(struct xt_connmark_tginfo3),
|
||||
+ .destroy = connmark_tg_destroy,
|
||||
+ .me = THIS_MODULE,
|
||||
+ },
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -161,7 +161,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
struct rtnl_link {
|
||||
rtnl_doit_func doit;
|
||||
@@ -4949,7 +4949,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu
|
||||
@@ -4978,7 +4978,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu
|
||||
brport_nla_put_flag(skb, flags, mask,
|
||||
IFLA_BRPORT_MCAST_FLOOD, BR_MCAST_FLOOD) ||
|
||||
brport_nla_put_flag(skb, flags, mask,
|
||||
|
@ -159,10 +159,6 @@
|
||||
label = "lan4";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2_hs_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -149,10 +149,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_1 {
|
||||
|
@ -114,6 +114,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
nand_pins: nand-pins {
|
||||
|
||||
|
@ -116,10 +116,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
i2c_0_pins: i2c-0-pinmux {
|
||||
mux {
|
||||
|
@ -227,10 +227,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&serial_pins>;
|
||||
|
@ -339,10 +339,6 @@
|
||||
label = "lan";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
i2c_0_pins: i2c_0_pinmux {
|
||||
mux {
|
||||
|
@ -132,10 +132,6 @@
|
||||
vqmmc-supply = <&vqmmc>;
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_1 {
|
||||
|
@ -90,10 +90,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_1 {
|
||||
|
@ -249,10 +249,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -202,6 +202,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&swport4 {
|
||||
nvmem-cell-names = "mac-address";
|
||||
nvmem-cells = <&macaddr_gmac1>;
|
||||
|
@ -312,10 +312,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&switch {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -91,10 +91,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
mdio_pins: mdio_pinmux {
|
||||
mux_1 {
|
||||
|
@ -132,10 +132,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
/*
|
||||
* In addition to the Pins listed below,
|
||||
|
@ -114,10 +114,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
|
@ -171,10 +171,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -5535,7 +5535,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
unsigned long type);
|
||||
--- a/include/linux/pci_ids.h
|
||||
+++ b/include/linux/pci_ids.h
|
||||
@@ -1108,6 +1108,12 @@
|
||||
@@ -1110,6 +1110,12 @@
|
||||
#define PCI_DEVICE_ID_SGI_IOC3 0x0003
|
||||
#define PCI_DEVICE_ID_SGI_LITHIUM 0x1002
|
||||
|
||||
|
@ -163,6 +163,7 @@ srg_led_probe(struct i2c_client *client)
|
||||
{
|
||||
struct device_node *np = client->dev.of_node, *child;
|
||||
struct srg_led_ctrl *sysled_ctrl;
|
||||
int err;
|
||||
|
||||
sysled_ctrl = devm_kzalloc(&client->dev, sizeof(*sysled_ctrl), GFP_KERNEL);
|
||||
if (!sysled_ctrl)
|
||||
@ -170,11 +171,13 @@ srg_led_probe(struct i2c_client *client)
|
||||
|
||||
sysled_ctrl->client = client;
|
||||
|
||||
mutex_init(&sysled_ctrl->lock);
|
||||
err = devm_mutex_init(&client->dev, &sysled_ctrl->lock);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
i2c_set_clientdata(client, sysled_ctrl);
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_available_child_of_node(np, child) {
|
||||
if (srg_led_init_led(sysled_ctrl, child))
|
||||
continue;
|
||||
|
||||
@ -193,15 +196,6 @@ static void srg_led_disable(struct i2c_client *client)
|
||||
srg_led_i2c_write(sysled_ctrl, i, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
srg_led_remove(struct i2c_client *client)
|
||||
{
|
||||
struct srg_led_ctrl *sysled_ctrl = i2c_get_clientdata(client);
|
||||
|
||||
srg_led_disable(client);
|
||||
mutex_destroy(&sysled_ctrl->lock);
|
||||
}
|
||||
|
||||
static const struct i2c_device_id srg_led_id[] = {
|
||||
{ "srg-sysled", 0 },
|
||||
{ }
|
||||
@ -220,7 +214,7 @@ static struct i2c_driver srg_sysled_driver = {
|
||||
.of_match_table = of_srg_led_match,
|
||||
},
|
||||
.probe = srg_led_probe,
|
||||
.remove = srg_led_remove,
|
||||
.remove = srg_led_disable,
|
||||
.id_table = srg_led_id,
|
||||
};
|
||||
module_i2c_driver(srg_sysled_driver);
|
||||
|
@ -26,7 +26,7 @@ Cc: Robert Marko <robert.marko@sartura.hr>
|
||||
|
||||
--- a/drivers/hwmon/Kconfig
|
||||
+++ b/drivers/hwmon/Kconfig
|
||||
@@ -783,6 +783,14 @@ config SENSORS_IBMPOWERNV
|
||||
@@ -785,6 +785,14 @@ config SENSORS_IBMPOWERNV
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called ibmpowernv.
|
||||
|
||||
|
56
target/linux/ramips/dts/mt7621_gemtek_wvrtm-127acn.dts
Normal file
56
target/linux/ramips/dts/mt7621_gemtek_wvrtm-127acn.dts
Normal file
@ -0,0 +1,56 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621_gemtek_wvrtm-1xxacn.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "gemtek,wvrtm-127acn", "mediatek,mt7621-soc";
|
||||
model = "Gemtek WVRTM-127ACN";
|
||||
};
|
||||
|
||||
&nvmem_layout {
|
||||
eeprom_factory_8000: eeprom@8000 {
|
||||
reg = <0x8000 0x200>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_8000>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
|
||||
led {
|
||||
led-sources = <2>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
|
||||
nvmem-cell-names = "eeprom", "mac-address";
|
||||
ieee80211-freq-limit = <2400000 2500000>;
|
||||
|
||||
led {
|
||||
led-sources = <0>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ports {
|
||||
port@2 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
};
|
87
target/linux/ramips/dts/mt7621_gemtek_wvrtm-130acn.dts
Normal file
87
target/linux/ramips/dts/mt7621_gemtek_wvrtm-130acn.dts
Normal file
@ -0,0 +1,87 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621_gemtek_wvrtm-1xxacn.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "gemtek,wvrtm-130acn", "mediatek,mt7621-soc";
|
||||
model = "Gemtek WVRTM-130ACN";
|
||||
};
|
||||
|
||||
&eeprom_factory_0 {
|
||||
reg = <0x0 0x4da8>;
|
||||
};
|
||||
|
||||
&macaddr_factory_4 {
|
||||
compatible = "mac-base";
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
&keys {
|
||||
button-2 {
|
||||
label = "power";
|
||||
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_POWER>;
|
||||
};
|
||||
};
|
||||
|
||||
&leds {
|
||||
led-7 {
|
||||
gpios = <&gpio_hc595 7 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_WPS;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
|
||||
band@0 {
|
||||
/* 2.4 GHz */
|
||||
reg = <0>;
|
||||
nvmem-cells = <&macaddr_factory_4 (-1)>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
/* led_pin 0 */
|
||||
};
|
||||
|
||||
band@1 {
|
||||
/* 5 GHz */
|
||||
reg = <1>;
|
||||
nvmem-cells = <&macaddr_factory_4 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
/* led_pin 2 */
|
||||
};
|
||||
|
||||
led {
|
||||
led-sources = <2>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ports {
|
||||
port@0 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "okay";
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
status = "okay";
|
||||
label = "lan4";
|
||||
};
|
||||
};
|
287
target/linux/ramips/dts/mt7621_gemtek_wvrtm-1xxacn.dtsi
Normal file
287
target/linux/ramips/dts/mt7621_gemtek_wvrtm-1xxacn.dtsi
Normal file
@ -0,0 +1,287 @@
|
||||
// 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>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs-override = "console=ttyS0,115200n1";
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
poe_24v_port4 {
|
||||
gpio-export,name = "24v-poe:port4";
|
||||
gpio-export,output = <0>;
|
||||
gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
keys: keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button-0 {
|
||||
label = "wps";
|
||||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
|
||||
button-1 {
|
||||
label = "reset";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
led_spi {
|
||||
compatible = "spi-gpio";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
sck-gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
|
||||
mosi-gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||
num-chipselects = <0>;
|
||||
|
||||
gpio_hc595: gpio_hc595@0 {
|
||||
compatible = "fairchild,74hc595";
|
||||
reg = <0>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
registers-number = <1>;
|
||||
spi-max-frequency = <1000000>;
|
||||
};
|
||||
};
|
||||
|
||||
leds: leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led-0 {
|
||||
gpios = <&gpio_hc595 0 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_INDICATOR;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function-enumerator = <0>;
|
||||
};
|
||||
|
||||
led-1 {
|
||||
gpios = <&gpio_hc595 1 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_INDICATOR;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function-enumerator = <1>;
|
||||
};
|
||||
|
||||
led-2 {
|
||||
gpios = <&gpio_hc595 2 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_INDICATOR;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function-enumerator = <2>;
|
||||
};
|
||||
|
||||
led-3 {
|
||||
gpios = <&gpio_hc595 3 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_INDICATOR;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function-enumerator = <3>;
|
||||
};
|
||||
|
||||
led-4 {
|
||||
gpios = <&gpio_hc595 4 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_INDICATOR;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function-enumerator = <4>;
|
||||
};
|
||||
|
||||
led_power: led-5 {
|
||||
gpios = <&gpio_hc595 5 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
};
|
||||
|
||||
led-6 {
|
||||
gpios = <&gpio_hc595 6 GPIO_ACTIVE_HIGH>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
};
|
||||
};
|
||||
|
||||
memory@0 {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x8000000>;
|
||||
};
|
||||
|
||||
reg_usb_vbus: regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb_vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
reg_3p3v: regulator-3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "fixed-3.3V";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ubi-concat {
|
||||
compatible = "mtd-concat";
|
||||
devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 &ubiconcat3>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "ubi";
|
||||
reg = <0x0 0x7380000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_e000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "u-boot2";
|
||||
reg = <0x100000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@200000 {
|
||||
label = "factory";
|
||||
reg = <0x200000 0x100000>;
|
||||
read-only;
|
||||
|
||||
nvmem_layout: nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x200>;
|
||||
};
|
||||
|
||||
macaddr_factory_4: eeprom@4 {
|
||||
reg = <0x4 0x6>;
|
||||
};
|
||||
|
||||
macaddr_factory_e000: macaddr@e000 {
|
||||
reg = <0xe000 0x6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@300000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x300000 0x280000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@580000 {
|
||||
label = "u-boot-env2";
|
||||
reg = <0x580000 0x280000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@800000 {
|
||||
label = "firmware";
|
||||
reg = <0x800000 0x2000000>;
|
||||
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "kernel";
|
||||
reg = <0x0 0x400000>;
|
||||
};
|
||||
|
||||
ubiconcat0: partition@400000 {
|
||||
label = "ubiconcat0";
|
||||
reg = <0x400000 0x1c00000>;
|
||||
};
|
||||
};
|
||||
|
||||
ubiconcat1: partition@2800000 {
|
||||
label = "Kernel2";
|
||||
reg = <0x2800000 0x2000000>;
|
||||
};
|
||||
|
||||
ubiconcat2: partition@4800000 {
|
||||
label = "Storage1";
|
||||
reg = <0x4800000 0x1c00000>;
|
||||
};
|
||||
|
||||
ubiconcat3: partition@6400000 {
|
||||
label = "Storage2";
|
||||
reg = <0x6400000 0x1b80000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "rgmii2", "uart3";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports: ports {
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
nvmem-cells = <&macaddr_factory_e000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&xhci {
|
||||
vbus-supply = <®_usb_vbus>;
|
||||
vusb33-supply = <®_3p3v>;
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
|
||||
/ {
|
||||
compatible = "mikrotik,routerboard-760igs", "mediatek,mt7621-soc";
|
||||
model = "MikroTik RouterBOARD 760iGS";
|
||||
model = "MikroTik RouterBOARD 760iGS (hEX S)";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_pwr;
|
||||
|
@ -1384,6 +1384,29 @@ define Device/gehua_ghl-r-001
|
||||
endef
|
||||
TARGET_DEVICES += gehua_ghl-r-001
|
||||
|
||||
define Device/gemtek_wvrtm-1xxacn
|
||||
$(Device/nand)
|
||||
$(Device/uimage-lzma-loader)
|
||||
IMAGE_SIZE := 122368k
|
||||
DEVICE_VENDOR := Gemtek
|
||||
DEVICE_PACKAGES := kmod-gpio-nxp-74hc164 kmod-spi-gpio \
|
||||
kmod-usb3 -uboot-envtools
|
||||
endef
|
||||
|
||||
define Device/gemtek_wvrtm-127acn
|
||||
$(Device/gemtek_wvrtm-1xxacn)
|
||||
DEVICE_MODEL := WVRTM-127ACN
|
||||
DEVICE_PACKAGES += kmod-mt7603 kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += gemtek_wvrtm-127acn
|
||||
|
||||
define Device/gemtek_wvrtm-130acn
|
||||
$(Device/gemtek_wvrtm-1xxacn)
|
||||
DEVICE_MODEL := WVRTM-130ACN
|
||||
DEVICE_PACKAGES += kmod-mt7615-firmware
|
||||
endef
|
||||
TARGET_DEVICES += gemtek_wvrtm-130acn
|
||||
|
||||
define Device/glinet_gl-mt1300
|
||||
$(Device/dsa-migration)
|
||||
IMAGE_SIZE := 32448k
|
||||
|
@ -81,6 +81,7 @@ ramips_setup_interfaces()
|
||||
beeline,smartbox-giga|\
|
||||
elecom,wmc-x1800gst|\
|
||||
elecom,wrc-x1800gs|\
|
||||
gemtek,wvrtm-127acn|\
|
||||
glinet,gl-mt1300|\
|
||||
iodata,wn-deax1800gr|\
|
||||
iptime,a3002mesh|\
|
||||
|
@ -99,6 +99,8 @@ platform_do_upgrade() {
|
||||
h3c,tx1806|\
|
||||
haier,har-20s2u1|\
|
||||
hiwifi,hc5962|\
|
||||
gemtek,wvrtm-127acn|\
|
||||
gemtek,wvrtm-130acn|\
|
||||
iptime,a3004t|\
|
||||
iptime,ax2004m|\
|
||||
iptime,t5004|\
|
||||
|
@ -41,7 +41,7 @@ Acked-by: John Crispin <blogic@openwrt.org>
|
||||
obj-$(CONFIG_SPI_SC18IS602) += spi-sc18is602.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/spi/spi-rt2880.c
|
||||
@@ -0,0 +1,519 @@
|
||||
@@ -0,0 +1,473 @@
|
||||
+/*
|
||||
+ * spi-rt2880.c -- Ralink RT288x/RT305x SPI controller driver
|
||||
+ *
|
||||
@ -167,8 +167,6 @@ Acked-by: John Crispin <blogic@openwrt.org>
|
||||
+#define RT2880_SPI_MODE_BITS (SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST | \
|
||||
+ SPI_CS_HIGH)
|
||||
+
|
||||
+static atomic_t hw_reset_count = ATOMIC_INIT(0);
|
||||
+
|
||||
+struct rt2880_spi {
|
||||
+ struct spi_master *master;
|
||||
+ void __iomem *base;
|
||||
@ -451,33 +449,25 @@ Acked-by: John Crispin <blogic@openwrt.org>
|
||||
+
|
||||
+static int rt2880_spi_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct spi_master *master;
|
||||
+ struct rt2880_spi *rs;
|
||||
+ void __iomem *base;
|
||||
+ struct resource *r;
|
||||
+ struct clk *clk;
|
||||
+ int ret;
|
||||
+
|
||||
+ r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ base = devm_ioremap_resource(&pdev->dev, r);
|
||||
+ base = devm_platform_ioremap_resource(pdev, 0);
|
||||
+ if (IS_ERR(base))
|
||||
+ return PTR_ERR(base);
|
||||
+
|
||||
+ clk = devm_clk_get(&pdev->dev, NULL);
|
||||
+ if (IS_ERR(clk)) {
|
||||
+ dev_err(&pdev->dev, "unable to get SYS clock\n");
|
||||
+ return PTR_ERR(clk);
|
||||
+ }
|
||||
+ clk = devm_clk_get_enabled(dev, NULL);
|
||||
+ if (IS_ERR(clk))
|
||||
+ return dev_err_probe(dev, PTR_ERR(clk), "unable to get SYS clock");
|
||||
+
|
||||
+ ret = clk_prepare_enable(clk);
|
||||
+ if (ret)
|
||||
+ goto err_clk;
|
||||
+
|
||||
+ master = spi_alloc_master(&pdev->dev, sizeof(*rs));
|
||||
+ if (master == NULL) {
|
||||
+ dev_dbg(&pdev->dev, "master allocation failed\n");
|
||||
+ ret = -ENOMEM;
|
||||
+ goto err_clk;
|
||||
+ master = devm_spi_alloc_master(dev, sizeof(*rs));
|
||||
+ if (!master) {
|
||||
+ dev_err(dev, "master allocation failed\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ master->dev.of_node = pdev->dev.of_node;
|
||||
@ -491,50 +481,16 @@ Acked-by: John Crispin <blogic@openwrt.org>
|
||||
+ master->set_cs = rt2880_spi_set_cs;
|
||||
+ master->transfer_one = rt2880_spi_transfer_one,
|
||||
+
|
||||
+ dev_set_drvdata(&pdev->dev, master);
|
||||
+
|
||||
+ rs = spi_master_get_devdata(master);
|
||||
+ rs->master = master;
|
||||
+ rs->base = base;
|
||||
+ rs->clk = clk;
|
||||
+
|
||||
+ if (atomic_inc_return(&hw_reset_count) == 1) {
|
||||
+ ret = device_reset(&pdev->dev);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "device_reset error.\n");
|
||||
+ goto err_master;
|
||||
+ }
|
||||
+ }
|
||||
+ ret = device_reset(&pdev->dev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = devm_spi_register_master(&pdev->dev, master);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(&pdev->dev, "devm_spi_register_master error.\n");
|
||||
+ goto err_master;
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+
|
||||
+err_master:
|
||||
+ spi_master_put(master);
|
||||
+ kfree(master);
|
||||
+err_clk:
|
||||
+ clk_disable_unprepare(clk);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int rt2880_spi_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct spi_master *master;
|
||||
+ struct rt2880_spi *rs;
|
||||
+
|
||||
+ master = dev_get_drvdata(&pdev->dev);
|
||||
+ rs = spi_master_get_devdata(master);
|
||||
+
|
||||
+ clk_disable_unprepare(rs->clk);
|
||||
+ atomic_dec(&hw_reset_count);
|
||||
+
|
||||
+ return 0;
|
||||
+ return devm_spi_register_master(dev, master);
|
||||
+}
|
||||
+
|
||||
+MODULE_ALIAS("platform:" DRIVER_NAME);
|
||||
@ -548,11 +504,9 @@ Acked-by: John Crispin <blogic@openwrt.org>
|
||||
+static struct platform_driver rt2880_spi_driver = {
|
||||
+ .driver = {
|
||||
+ .name = DRIVER_NAME,
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = rt2880_spi_match,
|
||||
+ },
|
||||
+ .probe = rt2880_spi_probe,
|
||||
+ .remove = rt2880_spi_remove,
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(rt2880_spi_driver);
|
||||
|
@ -5,7 +5,6 @@ Subject: [PATCH 48/53] asoc: add mt7620 support
|
||||
|
||||
Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
---
|
||||
arch/mips/ralink/of.c | 2 +
|
||||
sound/soc/Kconfig | 1 +
|
||||
sound/soc/Makefile | 1 +
|
||||
sound/soc/ralink/Kconfig | 15 ++
|
||||
@ -60,7 +59,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+obj-$(CONFIG_SND_RALINK_SOC_I2S) += snd-soc-ralink-i2s.o
|
||||
--- /dev/null
|
||||
+++ b/sound/soc/ralink/ralink-i2s.c
|
||||
@@ -0,0 +1,968 @@
|
||||
@@ -0,0 +1,941 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
|
||||
+ * Copyright (C) 2016 Michael Lee <igvtee@gmail.com>
|
||||
@ -869,20 +868,20 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+{
|
||||
+ const struct of_device_id *match;
|
||||
+ struct device_node *np = pdev->dev.of_node;
|
||||
+ struct ralink_i2s *i2s;
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ struct resource *res;
|
||||
+ struct ralink_i2s *i2s;
|
||||
+ int irq, ret;
|
||||
+ u32 dma_req;
|
||||
+ struct rt_i2s_data *data;
|
||||
+
|
||||
+ i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL);
|
||||
+ i2s = devm_kzalloc(dev, sizeof(*i2s), GFP_KERNEL);
|
||||
+ if (!i2s)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ platform_set_drvdata(pdev, i2s);
|
||||
+ i2s->dev = &pdev->dev;
|
||||
+ i2s->dev = dev;
|
||||
+
|
||||
+ match = of_match_device(ralink_i2s_match_table, &pdev->dev);
|
||||
+ match = of_match_device(ralink_i2s_match_table, dev);
|
||||
+ if (!match)
|
||||
+ return -EINVAL;
|
||||
+ data = (struct rt_i2s_data *)match->data;
|
||||
@ -892,68 +891,49 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+ data->refclk_setup();
|
||||
+
|
||||
+ if (of_property_read_u32(np, "txdma-req", &dma_req)) {
|
||||
+ dev_err(&pdev->dev, "no txdma-req define\n");
|
||||
+ dev_err(dev, "no txdma-req define\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ i2s->txdma_req = (u16)dma_req;
|
||||
+ if (!(i2s->flags & RALINK_FLAGS_TXONLY)) {
|
||||
+ if (of_property_read_u32(np, "rxdma-req", &dma_req)) {
|
||||
+ dev_err(&pdev->dev, "no rxdma-req define\n");
|
||||
+ dev_err(dev, "no rxdma-req define\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ i2s->rxdma_req = (u16)dma_req;
|
||||
+ }
|
||||
+
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ i2s->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
+ i2s->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
||||
+ if (IS_ERR(i2s->regs))
|
||||
+ return PTR_ERR(i2s->regs);
|
||||
+
|
||||
+ i2s->regmap = devm_regmap_init_mmio(&pdev->dev, i2s->regs,
|
||||
+ i2s->regmap = devm_regmap_init_mmio(dev, i2s->regs,
|
||||
+ &ralink_i2s_regmap_config);
|
||||
+ if (IS_ERR(i2s->regmap)) {
|
||||
+ dev_err(&pdev->dev, "regmap init failed\n");
|
||||
+ return PTR_ERR(i2s->regmap);
|
||||
+ }
|
||||
+ if (IS_ERR(i2s->regmap))
|
||||
+ return dev_err_probe(dev, PTR_ERR(i2s->regmap), "regmap init failed");
|
||||
+
|
||||
+ irq = platform_get_irq(pdev, 0);
|
||||
+ if (irq < 0) {
|
||||
+ dev_err(&pdev->dev, "failed to get irq\n");
|
||||
+ dev_err(dev, "failed to get irq\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+#if (RALINK_I2S_INT_EN)
|
||||
+ ret = devm_request_irq(&pdev->dev, irq, ralink_i2s_irq,
|
||||
+ 0, dev_name(&pdev->dev), i2s);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to request irq\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ ret = devm_request_irq(dev, irq, ralink_i2s_irq,
|
||||
+ 0, dev_name(dev), i2s);
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(dev, ret, "failed to request irq");
|
||||
+#endif
|
||||
+
|
||||
+ i2s->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
+ if (IS_ERR(i2s->clk)) {
|
||||
+ dev_err(&pdev->dev, "no clock defined\n");
|
||||
+ return PTR_ERR(i2s->clk);
|
||||
+ }
|
||||
+
|
||||
+ ret = clk_prepare_enable(i2s->clk);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ i2s->clk = devm_clk_get_enabled(dev, NULL);
|
||||
+ if (IS_ERR(i2s->clk))
|
||||
+ return dev_err_probe(dev, PTR_ERR(i2s->clk), "no clock defined");
|
||||
+
|
||||
+ ralink_i2s_init_dma_data(i2s, res);
|
||||
+
|
||||
+ ret = device_reset(&pdev->dev);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "failed to reset device\n");
|
||||
+ goto err_clk_disable;
|
||||
+ }
|
||||
+
|
||||
+ ret = ralink_i2s_debugfs_create(i2s);
|
||||
+ if (ret) {
|
||||
+ dev_err(&pdev->dev, "create debugfs failed\n");
|
||||
+ goto err_clk_disable;
|
||||
+ }
|
||||
+ ret = device_reset(dev);
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(dev, ret, "failed to reset device\n");
|
||||
+
|
||||
+ /* enable 24bits support */
|
||||
+ if (i2s->flags & RALINK_FLAGS_24BIT) {
|
||||
@ -981,28 +961,21 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+ memset(&ralink_i2s_dai.capture, sizeof(ralink_i2s_dai.capture),
|
||||
+ 0);
|
||||
+
|
||||
+ ret = devm_snd_soc_register_component(&pdev->dev, &ralink_i2s_component,
|
||||
+ ret = devm_snd_soc_register_component(dev, &ralink_i2s_component,
|
||||
+ &ralink_i2s_dai, 1);
|
||||
+ if (ret)
|
||||
+ goto err_debugfs;
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = devm_snd_dmaengine_pcm_register(&pdev->dev,
|
||||
+ ret = devm_snd_dmaengine_pcm_register(dev,
|
||||
+ &ralink_dmaengine_pcm_config,
|
||||
+ SND_DMAENGINE_PCM_FLAG_COMPAT);
|
||||
+ if (ret)
|
||||
+ goto err_debugfs;
|
||||
+ return ret;
|
||||
+
|
||||
+ dev_info(i2s->dev, "mclk %luMHz\n", clk_get_rate(i2s->clk) / 1000000);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_debugfs:
|
||||
+ ralink_i2s_debugfs_remove(i2s);
|
||||
+
|
||||
+err_clk_disable:
|
||||
+ clk_disable_unprepare(i2s->clk);
|
||||
+
|
||||
+ return ret;
|
||||
+ platform_set_drvdata(pdev, i2s);
|
||||
+ return ralink_i2s_debugfs_create(i2s);
|
||||
+}
|
||||
+
|
||||
+static int ralink_i2s_remove(struct platform_device *pdev)
|
||||
@ -1010,7 +983,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+ struct ralink_i2s *i2s = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ ralink_i2s_debugfs_remove(i2s);
|
||||
+ clk_disable_unprepare(i2s->clk);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
|
||||
--- a/drivers/tty/serial/serial_core.c
|
||||
+++ b/drivers/tty/serial/serial_core.c
|
||||
@@ -480,6 +480,9 @@ uart_get_baud_rate(struct uart_port *por
|
||||
@@ -482,6 +482,9 @@ uart_get_baud_rate(struct uart_port *por
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/usb/dwc2/platform.c
|
||||
+++ b/drivers/usb/dwc2/platform.c
|
||||
@@ -493,6 +493,12 @@ static int dwc2_driver_probe(struct plat
|
||||
@@ -481,6 +481,12 @@ static int dwc2_driver_probe(struct plat
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
|
@ -2326,7 +2326,7 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv)
|
||||
}
|
||||
|
||||
snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
|
||||
ret = of_mdiobus_register(priv->mii_bus, mii_np);
|
||||
ret = devm_of_mdiobus_register(&priv->pdev->dev, priv->mii_bus, mii_np);
|
||||
|
||||
err_put_node:
|
||||
of_node_put(mii_np);
|
||||
@ -2334,18 +2334,6 @@ err_put_node:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rtl838x_mdio_remove(struct rtl838x_eth_priv *priv)
|
||||
{
|
||||
pr_debug("%s called\n", __func__);
|
||||
if (!priv->mii_bus)
|
||||
return 0;
|
||||
|
||||
mdiobus_unregister(priv->mii_bus);
|
||||
mdiobus_free(priv->mii_bus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static netdev_features_t rtl838x_fix_features(struct net_device *dev,
|
||||
netdev_features_t features)
|
||||
{
|
||||
@ -2489,11 +2477,9 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
|
||||
rxringlen = MAX_ENTRIES / rxrings;
|
||||
rxringlen = rxringlen > MAX_RXLEN ? MAX_RXLEN : rxringlen;
|
||||
|
||||
dev = alloc_etherdev_mqs(sizeof(struct rtl838x_eth_priv), TXRINGS, rxrings);
|
||||
if (!dev) {
|
||||
err = -ENOMEM;
|
||||
goto err_free;
|
||||
}
|
||||
dev = devm_alloc_etherdev_mqs(&pdev->dev, sizeof(struct rtl838x_eth_priv), TXRINGS, rxrings);
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||
priv = netdev_priv(dev);
|
||||
|
||||
@ -2504,16 +2490,14 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
|
||||
resource_size(res), res->name);
|
||||
if (!mem) {
|
||||
dev_err(&pdev->dev, "cannot request memory space\n");
|
||||
err = -ENXIO;
|
||||
goto err_free;
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
dev->mem_start = mem->start;
|
||||
dev->mem_end = mem->end;
|
||||
} else {
|
||||
dev_err(&pdev->dev, "cannot request IO resource\n");
|
||||
err = -ENXIO;
|
||||
goto err_free;
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
/* Allocate buffer memory */
|
||||
@ -2522,8 +2506,7 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
|
||||
(void *)&dev->mem_start, GFP_KERNEL);
|
||||
if (!priv->membase) {
|
||||
dev_err(&pdev->dev, "cannot allocate DMA buffer\n");
|
||||
err = -ENOMEM;
|
||||
goto err_free;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Allocate ring-buffer space at the end of the allocated memory */
|
||||
@ -2581,7 +2564,7 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
|
||||
dev->irq = platform_get_irq(pdev, 0);
|
||||
if (dev->irq < 0) {
|
||||
dev_err(&pdev->dev, "cannot obtain network-device IRQ\n");
|
||||
goto err_free;
|
||||
return err;
|
||||
}
|
||||
|
||||
err = devm_request_irq(&pdev->dev, dev->irq, priv->r->net_irq,
|
||||
@ -2589,7 +2572,7 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "%s: could not acquire interrupt: %d\n",
|
||||
__func__, err);
|
||||
goto err_free;
|
||||
return err;
|
||||
}
|
||||
|
||||
rtl8380_init_mac(priv);
|
||||
@ -2628,11 +2611,11 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
|
||||
|
||||
err = rtl838x_mdio_init(priv);
|
||||
if (err)
|
||||
goto err_free;
|
||||
return err;
|
||||
|
||||
err = register_netdev(dev);
|
||||
err = devm_register_netdev(&pdev->dev, dev);
|
||||
if (err)
|
||||
goto err_free;
|
||||
return err;
|
||||
|
||||
for (int i = 0; i < priv->rxrings; i++) {
|
||||
priv->rx_qs[i].id = i;
|
||||
@ -2646,8 +2629,7 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
|
||||
err = of_get_phy_mode(dn, &phy_mode);
|
||||
if (err < 0) {
|
||||
dev_err(&pdev->dev, "incorrect phy-mode\n");
|
||||
err = -EINVAL;
|
||||
goto err_free;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
priv->pcs.ops = &rtl838x_pcs_ops;
|
||||
@ -2658,19 +2640,11 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
|
||||
phylink = phylink_create(&priv->phylink_config, pdev->dev.fwnode,
|
||||
phy_mode, &rtl838x_phylink_ops);
|
||||
|
||||
if (IS_ERR(phylink)) {
|
||||
err = PTR_ERR(phylink);
|
||||
goto err_free;
|
||||
}
|
||||
if (IS_ERR(phylink))
|
||||
return PTR_ERR(phylink);
|
||||
priv->phylink = phylink;
|
||||
|
||||
return 0;
|
||||
|
||||
err_free:
|
||||
pr_err("Error setting up netdev, freeing it again.\n");
|
||||
free_netdev(dev);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int rtl838x_eth_remove(struct platform_device *pdev)
|
||||
@ -2680,16 +2654,12 @@ static int rtl838x_eth_remove(struct platform_device *pdev)
|
||||
|
||||
if (dev) {
|
||||
pr_info("Removing platform driver for rtl838x-eth\n");
|
||||
rtl838x_mdio_remove(priv);
|
||||
rtl838x_hw_stop(priv);
|
||||
|
||||
netif_tx_stop_all_queues(dev);
|
||||
|
||||
for (int i = 0; i < priv->rxrings; i++)
|
||||
netif_napi_del(&priv->rx_qs[i].napi);
|
||||
|
||||
unregister_netdev(dev);
|
||||
free_netdev(dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/usb/dwc3/core.c
|
||||
+++ b/drivers/usb/dwc3/core.c
|
||||
@@ -839,8 +839,20 @@ static int dwc3_clk_enable(struct dwc3 *
|
||||
@@ -845,8 +845,20 @@ static int dwc3_clk_enable(struct dwc3 *
|
||||
if (ret)
|
||||
goto disable_ref_clk;
|
||||
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
disable_ref_clk:
|
||||
clk_disable_unprepare(dwc->ref_clk);
|
||||
disable_bus_clk:
|
||||
@@ -850,6 +862,8 @@ disable_bus_clk:
|
||||
@@ -856,6 +868,8 @@ disable_bus_clk:
|
||||
|
||||
static void dwc3_clk_disable(struct dwc3 *dwc)
|
||||
{
|
||||
@ -48,7 +48,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
clk_disable_unprepare(dwc->susp_clk);
|
||||
clk_disable_unprepare(dwc->ref_clk);
|
||||
clk_disable_unprepare(dwc->bus_clk);
|
||||
@@ -1878,6 +1892,20 @@ static int dwc3_get_clocks(struct dwc3 *
|
||||
@@ -1884,6 +1898,20 @@ static int dwc3_get_clocks(struct dwc3 *
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,32 @@ cisco-mx100-hw)
|
||||
dell-emc-edge620)
|
||||
ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth7" "eth6"
|
||||
;;
|
||||
gowin-solution-co-ltd-gw-mb-u01)
|
||||
ucidef_set_network_device_path "eth1" "pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:02.0/0000:04:00.0"
|
||||
ucidef_set_network_device_path "eth2" "pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:00.0/0000:03:00.0"
|
||||
ucidef_set_network_device_path "eth3" "pci0000:00/0000:00:1c.2/0000:07:00.0/0000:08:02.0/0000:0a:00.0"
|
||||
ucidef_set_network_device_path "eth4" "pci0000:00/0000:00:1c.2/0000:07:00.0/0000:08:00.0/0000:09:00.0"
|
||||
ucidef_set_network_device_path "poe" "pci0000:00/0000:00:1c.2/0000:07:00.0/0000:08:06.0/0000:0b:00.0"
|
||||
|
||||
sfp_device="pci0000:00/0000:00:1d.0"
|
||||
sfp_device_path="/sys/devices/$sfp_device"
|
||||
|
||||
pci_count="$(ls -d $sfp_device_path/0000:*:00.* 2>/dev/null | wc -l)"
|
||||
if [ "$pci_count" -eq 2 ]; then
|
||||
sfp_port1="$(basename $sfp_device_path/0000:*:00.1)"
|
||||
sfp_port2="$(basename $sfp_device_path/0000:*:00.0)"
|
||||
|
||||
ucidef_set_network_device_path "sfp1" "$sfp_device/$sfp_port1"
|
||||
ucidef_set_network_device_path "sfp2" "$sfp_device/$sfp_port2"
|
||||
elif [ "$pci_count" -eq 1 ]; then
|
||||
sfp_port="$(basename $sfp_device_path/0000:*:00.0)"
|
||||
|
||||
ucidef_set_network_device_path_port "sfp1" "$sfp_device/$sfp_port" "1"
|
||||
ucidef_set_network_device_path_port "sfp2" "$sfp_device/$sfp_port" "0"
|
||||
fi
|
||||
|
||||
ucidef_set_interface_lan "eth1 eth2 eth3 eth4"
|
||||
;;
|
||||
pc-engines-apu1|pc-engines-apu2|pc-engines-apu3)
|
||||
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
|
||||
;;
|
||||
|
@ -11,9 +11,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
|
||||
PKG_SOURCE_DATE:=2024-09-22
|
||||
PKG_SOURCE_VERSION:=ed9c97fa3305c70cf08f9b11869cafdae5ea5068
|
||||
PKG_MIRROR_HASH:=be743cfa5c5de736ed28e1b62f17b5fe2c7f04509432d4b0f951bc5745b6befe
|
||||
PKG_SOURCE_DATE:=2024-10-16
|
||||
PKG_SOURCE_VERSION:=88fbd52666e3b3f83ebab40f95b84f265824a729
|
||||
PKG_MIRROR_HASH:=4809421286257a91b2f29e79b7bbd0852a72c6e82169b340036cca5703881232
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
Loading…
x
Reference in New Issue
Block a user