mirror of
https://github.com/LiBwrt-op/openwrt-6.x.git
synced 2025-12-16 08:44:50 +00:00
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
d38a97e73a
35
package/kernel/econet-eth/Makefile
Normal file
35
package/kernel/econet-eth/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=econet-eth
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/cjdelisle/econet_eth.git
|
||||
PKG_MIRROR_HASH:=764e18fe2f87cb0c742711c18ed995a2270b02f0072e7a0938906d0246287111
|
||||
PKG_SOURCE_DATE:=2025-11-07
|
||||
PKG_SOURCE_VERSION:=40aac736a46fec0d96beadd7513c53d1f0459737
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/econet-eth
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=EcoNet EN751221 Ethernet Driver
|
||||
DEPENDS:=@TARGET_econet
|
||||
FILES:=$(PKG_BUILD_DIR)/econet-eth.ko
|
||||
AUTOLOAD:=$(call AutoLoad,90,econet-eth)
|
||||
endef
|
||||
|
||||
define KernelPackage/econet-eth/description
|
||||
Out-of-tree ethernet driver for EcoNet EN751221 devices.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(KERNEL_MAKE) M=$(PKG_BUILD_DIR) modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,econet-eth))
|
||||
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/qca-nss-dp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2025-05-12
|
||||
PKG_SOURCE_VERSION:=07b87bf513ffe58ce8dd00eb2edf68b5b9bde518
|
||||
PKG_MIRROR_HASH:=795ffccf1f4d61b6a5e0a6964ce21efa7b7b3c73b31b93140c56af7d970293b9
|
||||
PKG_SOURCE_DATE:=2025-11-24
|
||||
PKG_SOURCE_VERSION:=19c51af0c5be0afcbd57a9e0e50928759d7d08da
|
||||
PKG_MIRROR_HASH:=96aafb7c8f09ecde036ed706535111368874b06cd412a7b9df950415e5b4b334
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
||||
PKG_MIRROR_HASH:=1b9d5324c377f99e2cec3a92a71e9e979a1e4cf16023fea59b5799bcbdbb36d5
|
||||
PKG_SOURCE_DATE:=2025-11-27
|
||||
PKG_SOURCE_VERSION:=d21e504b38ab4c880c43b7f1649104bb2f0d2d8b
|
||||
PKG_MIRROR_HASH:=cddf1a82865e1a064ff7aaf7b86e6ba076387f8717c95a0a0f0e49cebdd60dfd
|
||||
PKG_SOURCE_DATE:=2025-12-01
|
||||
PKG_SOURCE_VERSION:=6fbd70c0834279f5836585a90d7c957fbb23a7e5
|
||||
|
||||
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
|
||||
PKG_MIRROR_HASH:=b7b813e0b76f586bfe3432ef94883bd1b079c48003666a2128fbf028109a1a65
|
||||
PKG_SOURCE_DATE:=2025-11-10
|
||||
PKG_SOURCE_VERSION:=483263c7b0cd3922b93be2cf9dad5eeccbb9fedb
|
||||
PKG_MIRROR_HASH:=1a701b15746f34eb19532f195d738611364a18acaf45c0197626c31ab59976ce
|
||||
PKG_SOURCE_DATE:=2025-12-03
|
||||
PKG_SOURCE_VERSION:=ffb9961c1f8bc50830fdd4e144570f11062c2601
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=busybox
|
||||
PKG_VERSION:=1.37.0
|
||||
PKG_RELEASE:=5
|
||||
PKG_RELEASE:=6
|
||||
PKG_FLAGS:=essential
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
From: Sven Wegener <sven.wegener@stealer.net>
|
||||
Subject: [PATCH] libbb/dump: fix dumping of signed values without explicit
|
||||
size specifier
|
||||
|
||||
Message-ID: <05d87e73-d0e0-d9ef-561a-8a9180888627@stealer.net>
|
||||
|
||||
Commit e2287f99fe6f21fd6435ad04340170ad4ba5f6b3 added support for the 64
|
||||
bit signed format %lld, accidentally changing the default size of the %d
|
||||
format to eight bytes and producing the following:
|
||||
|
||||
root at openwrt:~# for i in $(seq 0 7); do hexdump -s $i -n 1 -e '"%d\n"' /dev/mtdblock0; done
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
root at openwrt:~# for i in $(seq 0 7); do hexdump -s $i -n 1 -e '/4 "%d\n"' /dev/mtdblock0; done
|
||||
255
|
||||
0
|
||||
0
|
||||
16
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
|
||||
With -n 1 the input is zero-padded. On big-endian, when the input is copied
|
||||
into the 64 bit variable, the input byte ends up in the highest byte. As the %d
|
||||
format only interprets the lower 32 bits, the input byte is lost during
|
||||
printing.
|
||||
|
||||
Depending on how the architecture passes 64 bit parameters, the same
|
||||
happens on little-endian as well. x86 (little-endian) works correctly,
|
||||
but MIPS experiences the same behavior on big-endian and little-endian.
|
||||
|
||||
Fixes: e2287f99fe6f21fd6435ad04340170ad4ba5f6b3
|
||||
See: https://github.com/openwrt/openwrt/issues/18808
|
||||
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
|
||||
---
|
||||
libbb/dump.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/libbb/dump.c
|
||||
+++ b/libbb/dump.c
|
||||
@@ -192,16 +192,17 @@ static NOINLINE void rewrite(priv_dumper
|
||||
if (*p1 == 'l') { /* %lld etc */
|
||||
++p2;
|
||||
++p1;
|
||||
- }
|
||||
+ byte_count_str = "\010\004\002\001";
|
||||
+ } else {
|
||||
DO_INT_CONV:
|
||||
+ byte_count_str = "\004\002\001";
|
||||
+ }
|
||||
e = strchr(int_convs, *p1); /* "diouxX"? */
|
||||
if (!e)
|
||||
goto DO_BAD_CONV_CHAR;
|
||||
pr->flags = F_INT;
|
||||
- byte_count_str = "\010\004\002\001";
|
||||
if (e > int_convs + 1) { /* not d or i? */
|
||||
pr->flags = F_UINT;
|
||||
- byte_count_str++;
|
||||
}
|
||||
goto DO_BYTE_COUNT;
|
||||
} else
|
||||
@ -357,9 +357,14 @@ CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SKB_EXTENSIONS=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_SOC_AN7581=y
|
||||
CONFIG_SND_SOC_AN7581_WM8960=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOC_BUS=y
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SPARSEMEM=y
|
||||
CONFIG_SPARSEMEM_EXTREME=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
|
||||
@ -28,6 +28,19 @@
|
||||
};
|
||||
};
|
||||
|
||||
&sound {
|
||||
audio-routing = "Headphone", "HP_L",
|
||||
"Headphone", "HP_R",
|
||||
"LINPUT1", "AMIC",
|
||||
"RINPUT1", "AMIC";
|
||||
|
||||
status = "okay";
|
||||
|
||||
codec {
|
||||
sound-dai = <&wm8960>;
|
||||
};
|
||||
};
|
||||
|
||||
&en7581_pinctrl {
|
||||
gpio-ranges = <&en7581_pinctrl 0 13 47>;
|
||||
|
||||
@ -160,6 +173,11 @@
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
wm8960: codec@1a {
|
||||
compatible = "wlf,wm8960";
|
||||
reg = <0x1a>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
|
||||
@ -360,6 +360,16 @@
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
sound: sound {
|
||||
compatible = "airoha,an7581-wm8960-sound";
|
||||
|
||||
status = "disabled";
|
||||
|
||||
platform {
|
||||
sound-dai = <&afe>;
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <2>;
|
||||
@ -419,6 +429,13 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
afe: afe@1fbe2200 {
|
||||
compatible = "airoha,an7581-afe";
|
||||
reg = <0x0 0x1fbe2200 0x0 0x9000>;
|
||||
|
||||
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
uart4: serial@1fbf0600 {
|
||||
compatible = "airoha,en7523-uart";
|
||||
reg = <0x0 0x1fbf0600 0x0 0x30>;
|
||||
|
||||
@ -1,410 +0,0 @@
|
||||
From 527123b53739a2f73ca924b9c6e2f63dc66739a5 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 1 Aug 2025 11:06:56 +0200
|
||||
Subject: [PATCH 1/3] ASoC: mediatek: move some header to global include
|
||||
|
||||
In preparation for support of Airoha SoC sound system based on Mediatek
|
||||
AFE, move some header to global include to prevent having to use complex
|
||||
redirection for inclusion.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
.../common => include/sound/mediatek}/mtk-afe-fe-dai.h | 0
|
||||
.../sound/mediatek}/mtk-afe-platform-driver.h | 0
|
||||
sound/soc/mediatek/common/mtk-afe-fe-dai.c | 4 ++--
|
||||
sound/soc/mediatek/common/mtk-afe-platform-driver.c | 2 +-
|
||||
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 4 ++--
|
||||
sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 4 ++--
|
||||
sound/soc/mediatek/mt7986/mt7986-afe-pcm.c | 4 ++--
|
||||
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 4 ++--
|
||||
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 4 ++--
|
||||
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 2 +-
|
||||
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 2 +-
|
||||
sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 4 ++--
|
||||
sound/soc/mediatek/mt8186/mt8186-misc-control.c | 4 ++--
|
||||
sound/soc/mediatek/mt8186/mt8186-mt6366-common.c | 2 +-
|
||||
sound/soc/mediatek/mt8186/mt8186-mt6366.c | 2 +-
|
||||
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 4 ++--
|
||||
sound/soc/mediatek/mt8188/mt8188-mt6359.c | 2 +-
|
||||
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 4 ++--
|
||||
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 2 +-
|
||||
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 4 ++--
|
||||
sound/soc/mediatek/mt8195/mt8195-mt6359.c | 2 +-
|
||||
sound/soc/mediatek/mt8365/mt8365-afe-pcm.c | 4 ++--
|
||||
22 files changed, 32 insertions(+), 32 deletions(-)
|
||||
rename {sound/soc/mediatek/common => include/sound/mediatek}/mtk-afe-fe-dai.h (100%)
|
||||
rename {sound/soc/mediatek/common => include/sound/mediatek}/mtk-afe-platform-driver.h (100%)
|
||||
|
||||
--- a/sound/soc/mediatek/common/mtk-afe-fe-dai.c
|
||||
+++ b/sound/soc/mediatek/common/mtk-afe-fe-dai.c
|
||||
@@ -11,9 +11,9 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <sound/soc.h>
|
||||
-#include "mtk-afe-platform-driver.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
#include <sound/pcm_params.h>
|
||||
-#include "mtk-afe-fe-dai.h"
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
#include "mtk-base-afe.h"
|
||||
|
||||
#define AFE_BASE_END_OFFSET 8
|
||||
--- a/sound/soc/mediatek/common/mtk-afe-platform-driver.c
|
||||
+++ b/sound/soc/mediatek/common/mtk-afe-platform-driver.c
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
-#include "mtk-afe-platform-driver.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
#include "mtk-base-afe.h"
|
||||
|
||||
int mtk_afe_combine_sub_dai(struct mtk_base_afe *afe)
|
||||
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
|
||||
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
#include "mt2701-afe-common.h"
|
||||
#include "mt2701-afe-clock-ctrl.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
|
||||
static const struct snd_pcm_hardware mt2701_afe_hardware = {
|
||||
.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED
|
||||
--- a/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
|
||||
+++ b/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
|
||||
@@ -16,8 +16,8 @@
|
||||
#include "mt6797-afe-clk.h"
|
||||
#include "mt6797-interconnection.h"
|
||||
#include "mt6797-reg.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
|
||||
enum {
|
||||
MTK_AFE_RATE_8K = 0,
|
||||
--- a/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c
|
||||
+++ b/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
#include "mt7986-afe-common.h"
|
||||
#include "mt7986-reg.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
|
||||
enum {
|
||||
MTK_AFE_RATE_8K = 0,
|
||||
--- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
|
||||
+++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
|
||||
@@ -19,8 +19,8 @@
|
||||
#include <sound/soc.h>
|
||||
#include "mt8173-afe-common.h"
|
||||
#include "../common/mtk-base-afe.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
|
||||
/*****************************************************************************
|
||||
* R E G I S T E R D E F I N I T I O N
|
||||
--- a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
|
||||
+++ b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
|
||||
@@ -18,8 +18,8 @@
|
||||
#include "mt8183-afe-clk.h"
|
||||
#include "mt8183-interconnection.h"
|
||||
#include "mt8183-reg.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
|
||||
enum {
|
||||
MTK_AFE_RATE_8K = 0,
|
||||
--- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
|
||||
+++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "../../codecs/da7219.h"
|
||||
#include "../../codecs/rt1015.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
#include "mt8183-afe-common.h"
|
||||
|
||||
#define DA7219_CODEC_DAI "da7219-hifi"
|
||||
--- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
|
||||
+++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "../../codecs/rt1015.h"
|
||||
#include "../../codecs/ts3a227e.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
#include "mt8183-afe-common.h"
|
||||
|
||||
#define RT1015_CODEC_DAI "rt1015-aif"
|
||||
--- a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
|
||||
+++ b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
|
||||
@@ -15,8 +15,8 @@
|
||||
#include <linux/reset.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
|
||||
#include "mt8186-afe-common.h"
|
||||
#include "mt8186-afe-clk.h"
|
||||
--- a/sound/soc/mediatek/mt8186/mt8186-misc-control.c
|
||||
+++ b/sound/soc/mediatek/mt8186/mt8186-misc-control.c
|
||||
@@ -11,8 +11,8 @@
|
||||
#include <linux/regmap.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
#include "mt8186-afe-common.h"
|
||||
|
||||
static const char * const mt8186_sgen_mode_str[] = {
|
||||
--- a/sound/soc/mediatek/mt8186/mt8186-mt6366-common.c
|
||||
+++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-common.c
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <sound/soc.h>
|
||||
|
||||
#include "../../codecs/mt6358.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
#include "mt8186-afe-common.h"
|
||||
#include "mt8186-mt6366-common.h"
|
||||
|
||||
--- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
|
||||
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
|
||||
@@ -24,8 +24,8 @@
|
||||
#include "mt8188-afe-common.h"
|
||||
#include "mt8188-afe-clk.h"
|
||||
#include "mt8188-reg.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
|
||||
#define MT8188_MEMIF_BUFFER_BYTES_ALIGN (0x40)
|
||||
#define MT8188_MEMIF_DL7_MAX_PERIOD_SIZE (0x3fff)
|
||||
--- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
|
||||
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <linux/reset.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
|
||||
#include "mt8192-afe-common.h"
|
||||
#include "mt8192-afe-clk.h"
|
||||
--- a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
|
||||
+++ b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
|
||||
@@ -20,8 +20,8 @@
|
||||
#include "mt8195-afe-common.h"
|
||||
#include "mt8195-afe-clk.h"
|
||||
#include "mt8195-reg.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
-#include "../common/mtk-afe-fe-dai.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
+#include <sound/mediatek/mtk-afe-fe-dai.h>
|
||||
|
||||
#define MT8195_MEMIF_BUFFER_BYTES_ALIGN (0x40)
|
||||
#define MT8195_MEMIF_DL7_MAX_PERIOD_SIZE (0x3fff)
|
||||
--- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c
|
||||
+++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "../../codecs/mt6359.h"
|
||||
#include "../../codecs/rt1011.h"
|
||||
#include "../../codecs/rt5682.h"
|
||||
-#include "../common/mtk-afe-platform-driver.h"
|
||||
+#include <sound/mediatek/mtk-afe-platform-driver.h>
|
||||
#include "../common/mtk-dsp-sof-common.h"
|
||||
#include "../common/mtk-soc-card.h"
|
||||
#include "../common/mtk-soundcard-driver.h"
|
||||
--- /dev/null
|
||||
+++ b/include/sound/mediatek/mtk-afe-fe-dai.h
|
||||
@@ -0,0 +1,53 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+/*
|
||||
+ * mtk-afe-fe-dais.h -- Mediatek afe fe dai operator definition
|
||||
+ *
|
||||
+ * Copyright (c) 2016 MediaTek Inc.
|
||||
+ * Author: Garlic Tseng <garlic.tseng@mediatek.com>
|
||||
+ */
|
||||
+
|
||||
+#ifndef _MTK_AFE_FE_DAI_H_
|
||||
+#define _MTK_AFE_FE_DAI_H_
|
||||
+
|
||||
+struct snd_soc_dai_ops;
|
||||
+struct mtk_base_afe;
|
||||
+struct mtk_base_afe_memif;
|
||||
+
|
||||
+int mtk_afe_fe_startup(struct snd_pcm_substream *substream,
|
||||
+ struct snd_soc_dai *dai);
|
||||
+void mtk_afe_fe_shutdown(struct snd_pcm_substream *substream,
|
||||
+ struct snd_soc_dai *dai);
|
||||
+int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream,
|
||||
+ struct snd_pcm_hw_params *params,
|
||||
+ struct snd_soc_dai *dai);
|
||||
+int mtk_afe_fe_hw_free(struct snd_pcm_substream *substream,
|
||||
+ struct snd_soc_dai *dai);
|
||||
+int mtk_afe_fe_prepare(struct snd_pcm_substream *substream,
|
||||
+ struct snd_soc_dai *dai);
|
||||
+int mtk_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
+ struct snd_soc_dai *dai);
|
||||
+
|
||||
+extern const struct snd_soc_dai_ops mtk_afe_fe_ops;
|
||||
+
|
||||
+int mtk_dynamic_irq_acquire(struct mtk_base_afe *afe);
|
||||
+int mtk_dynamic_irq_release(struct mtk_base_afe *afe, int irq_id);
|
||||
+int mtk_afe_suspend(struct snd_soc_component *component);
|
||||
+int mtk_afe_resume(struct snd_soc_component *component);
|
||||
+
|
||||
+int mtk_memif_set_enable(struct mtk_base_afe *afe, int id);
|
||||
+int mtk_memif_set_disable(struct mtk_base_afe *afe, int id);
|
||||
+int mtk_memif_set_addr(struct mtk_base_afe *afe, int id,
|
||||
+ unsigned char *dma_area,
|
||||
+ dma_addr_t dma_addr,
|
||||
+ size_t dma_bytes);
|
||||
+int mtk_memif_set_channel(struct mtk_base_afe *afe,
|
||||
+ int id, unsigned int channel);
|
||||
+int mtk_memif_set_rate(struct mtk_base_afe *afe,
|
||||
+ int id, unsigned int rate);
|
||||
+int mtk_memif_set_rate_substream(struct snd_pcm_substream *substream,
|
||||
+ int id, unsigned int rate);
|
||||
+int mtk_memif_set_format(struct mtk_base_afe *afe,
|
||||
+ int id, snd_pcm_format_t format);
|
||||
+int mtk_memif_set_pbuf_size(struct mtk_base_afe *afe,
|
||||
+ int id, int pbuf_size);
|
||||
+#endif
|
||||
--- /dev/null
|
||||
+++ b/include/sound/mediatek/mtk-afe-platform-driver.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+/*
|
||||
+ * mtk-afe-platform-driver.h -- Mediatek afe platform driver definition
|
||||
+ *
|
||||
+ * Copyright (c) 2016 MediaTek Inc.
|
||||
+ * Author: Garlic Tseng <garlic.tseng@mediatek.com>
|
||||
+ */
|
||||
+
|
||||
+#ifndef _MTK_AFE_PLATFORM_DRIVER_H_
|
||||
+#define _MTK_AFE_PLATFORM_DRIVER_H_
|
||||
+
|
||||
+#define AFE_PCM_NAME "mtk-afe-pcm"
|
||||
+extern const struct snd_soc_component_driver mtk_afe_pcm_platform;
|
||||
+
|
||||
+struct mtk_base_afe;
|
||||
+struct snd_pcm;
|
||||
+struct snd_soc_component;
|
||||
+struct snd_soc_pcm_runtime;
|
||||
+
|
||||
+snd_pcm_uframes_t mtk_afe_pcm_pointer(struct snd_soc_component *component,
|
||||
+ struct snd_pcm_substream *substream);
|
||||
+int mtk_afe_pcm_new(struct snd_soc_component *component,
|
||||
+ struct snd_soc_pcm_runtime *rtd);
|
||||
+
|
||||
+int mtk_afe_combine_sub_dai(struct mtk_base_afe *afe);
|
||||
+int mtk_afe_add_sub_dai_control(struct snd_soc_component *component);
|
||||
+#endif
|
||||
+
|
||||
--- a/sound/soc/mediatek/common/mtk-afe-fe-dai.h
|
||||
+++ /dev/null
|
||||
@@ -1,53 +0,0 @@
|
||||
-/* SPDX-License-Identifier: GPL-2.0 */
|
||||
-/*
|
||||
- * mtk-afe-fe-dais.h -- Mediatek afe fe dai operator definition
|
||||
- *
|
||||
- * Copyright (c) 2016 MediaTek Inc.
|
||||
- * Author: Garlic Tseng <garlic.tseng@mediatek.com>
|
||||
- */
|
||||
-
|
||||
-#ifndef _MTK_AFE_FE_DAI_H_
|
||||
-#define _MTK_AFE_FE_DAI_H_
|
||||
-
|
||||
-struct snd_soc_dai_ops;
|
||||
-struct mtk_base_afe;
|
||||
-struct mtk_base_afe_memif;
|
||||
-
|
||||
-int mtk_afe_fe_startup(struct snd_pcm_substream *substream,
|
||||
- struct snd_soc_dai *dai);
|
||||
-void mtk_afe_fe_shutdown(struct snd_pcm_substream *substream,
|
||||
- struct snd_soc_dai *dai);
|
||||
-int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream,
|
||||
- struct snd_pcm_hw_params *params,
|
||||
- struct snd_soc_dai *dai);
|
||||
-int mtk_afe_fe_hw_free(struct snd_pcm_substream *substream,
|
||||
- struct snd_soc_dai *dai);
|
||||
-int mtk_afe_fe_prepare(struct snd_pcm_substream *substream,
|
||||
- struct snd_soc_dai *dai);
|
||||
-int mtk_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
- struct snd_soc_dai *dai);
|
||||
-
|
||||
-extern const struct snd_soc_dai_ops mtk_afe_fe_ops;
|
||||
-
|
||||
-int mtk_dynamic_irq_acquire(struct mtk_base_afe *afe);
|
||||
-int mtk_dynamic_irq_release(struct mtk_base_afe *afe, int irq_id);
|
||||
-int mtk_afe_suspend(struct snd_soc_component *component);
|
||||
-int mtk_afe_resume(struct snd_soc_component *component);
|
||||
-
|
||||
-int mtk_memif_set_enable(struct mtk_base_afe *afe, int id);
|
||||
-int mtk_memif_set_disable(struct mtk_base_afe *afe, int id);
|
||||
-int mtk_memif_set_addr(struct mtk_base_afe *afe, int id,
|
||||
- unsigned char *dma_area,
|
||||
- dma_addr_t dma_addr,
|
||||
- size_t dma_bytes);
|
||||
-int mtk_memif_set_channel(struct mtk_base_afe *afe,
|
||||
- int id, unsigned int channel);
|
||||
-int mtk_memif_set_rate(struct mtk_base_afe *afe,
|
||||
- int id, unsigned int rate);
|
||||
-int mtk_memif_set_rate_substream(struct snd_pcm_substream *substream,
|
||||
- int id, unsigned int rate);
|
||||
-int mtk_memif_set_format(struct mtk_base_afe *afe,
|
||||
- int id, snd_pcm_format_t format);
|
||||
-int mtk_memif_set_pbuf_size(struct mtk_base_afe *afe,
|
||||
- int id, int pbuf_size);
|
||||
-#endif
|
||||
--- a/sound/soc/mediatek/common/mtk-afe-platform-driver.h
|
||||
+++ /dev/null
|
||||
@@ -1,28 +0,0 @@
|
||||
-/* SPDX-License-Identifier: GPL-2.0 */
|
||||
-/*
|
||||
- * mtk-afe-platform-driver.h -- Mediatek afe platform driver definition
|
||||
- *
|
||||
- * Copyright (c) 2016 MediaTek Inc.
|
||||
- * Author: Garlic Tseng <garlic.tseng@mediatek.com>
|
||||
- */
|
||||
-
|
||||
-#ifndef _MTK_AFE_PLATFORM_DRIVER_H_
|
||||
-#define _MTK_AFE_PLATFORM_DRIVER_H_
|
||||
-
|
||||
-#define AFE_PCM_NAME "mtk-afe-pcm"
|
||||
-extern const struct snd_soc_component_driver mtk_afe_pcm_platform;
|
||||
-
|
||||
-struct mtk_base_afe;
|
||||
-struct snd_pcm;
|
||||
-struct snd_soc_component;
|
||||
-struct snd_soc_pcm_runtime;
|
||||
-
|
||||
-snd_pcm_uframes_t mtk_afe_pcm_pointer(struct snd_soc_component *component,
|
||||
- struct snd_pcm_substream *substream);
|
||||
-int mtk_afe_pcm_new(struct snd_soc_component *component,
|
||||
- struct snd_soc_pcm_runtime *rtd);
|
||||
-
|
||||
-int mtk_afe_combine_sub_dai(struct mtk_base_afe *afe);
|
||||
-int mtk_afe_add_sub_dai_control(struct snd_soc_component *component);
|
||||
-#endif
|
||||
-
|
||||
File diff suppressed because it is too large
Load Diff
@ -185,6 +185,7 @@ int RangeDecoderReverseBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder
|
||||
{
|
||||
int mi = 1;
|
||||
int i;
|
||||
int symbol = 0;
|
||||
#ifdef _LZMA_LOC_OPT
|
||||
RC_INIT_VAR
|
||||
#endif
|
||||
@ -202,7 +203,7 @@ int RangeDecoderReverseBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder
|
||||
#ifdef _LZMA_LOC_OPT
|
||||
RC_FLUSH_VAR
|
||||
#endif
|
||||
return 0;
|
||||
return symbol;
|
||||
}
|
||||
|
||||
Byte LzmaLiteralDecode(CProb *probs, CRangeDecoder *rd)
|
||||
|
||||
@ -58,7 +58,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
+ the phy interface, but actually requires internal delays enabled.
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -1434,6 +1434,16 @@ static void b53_adjust_531x5_rgmii(struc
|
||||
@@ -1444,6 +1444,16 @@ static void b53_adjust_531x5_rgmii(struc
|
||||
else
|
||||
off = B53_RGMII_CTRL_P(port);
|
||||
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
/* Configure the port RGMII clock delay by DLL disabled and
|
||||
* tx_clk aligned timing (restoring to reset defaults)
|
||||
*/
|
||||
@@ -1445,19 +1455,24 @@ static void b53_adjust_531x5_rgmii(struc
|
||||
@@ -1455,19 +1465,24 @@ static void b53_adjust_531x5_rgmii(struc
|
||||
* account for this internal delay that is inserted, otherwise
|
||||
* the switch won't be able to receive correctly.
|
||||
*
|
||||
|
||||
@ -56,6 +56,93 @@
|
||||
econet,shadow-interrupts = <7 2>, <8 3>, <13 12>, <30 29>;
|
||||
};
|
||||
|
||||
ethernet: ethernet@1fb50000 {
|
||||
compatible = "econet,en751221-eth";
|
||||
reg = <0x1fb50000 0x10000>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <21>, <22>;
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "econet,eth-mac";
|
||||
reg = <0>;
|
||||
phy-mode = "trgmii";
|
||||
status = "disabled";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
gmac1: mac@1 {
|
||||
compatible = "econet,eth-mac";
|
||||
reg = <1>;
|
||||
status = "disabled";
|
||||
phy-mode = "rgmii-rxid";
|
||||
};
|
||||
|
||||
mdio: mdio-bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switch0: switch@1f {
|
||||
compatible = "mediatek,mt7530";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x1f>;
|
||||
mediatek,mcm;
|
||||
reset-names = "mcm";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
|
||||
port@0 {
|
||||
status = "disabled";
|
||||
reg = <0>;
|
||||
label = "lan0";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "disabled";
|
||||
reg = <1>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "disabled";
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
status = "disabled";
|
||||
reg = <3>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
label = "cpu";
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "trgmii";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
usb: usb@1fb90000 {
|
||||
compatible = "mediatek,mt8173-xhci", "mediatek,mtk-xhci";
|
||||
reg = <0x1fb90000 0x4000>,
|
||||
|
||||
@ -50,3 +50,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@ -29,95 +29,103 @@
|
||||
|
||||
partition@0 {
|
||||
label = "bootloader";
|
||||
reg = <0x00000000 0x00040000>;
|
||||
reg = <0x0 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
// Unused
|
||||
label = "romfile";
|
||||
reg = <0x00040000 0x00040000>;
|
||||
reg = <0x40000 0x40000>;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
// trx - OpenWRT kernel is 4MB, factory is 3MB
|
||||
label = "kernel";
|
||||
reg = <0x00080000 0x00400000>;
|
||||
label = "tclinux";
|
||||
reg = <0x80000 0x2200000>;
|
||||
econet,enable-remap;
|
||||
};
|
||||
|
||||
partition@380000 {
|
||||
// squashfs
|
||||
partition@480000 {
|
||||
label = "rootfs";
|
||||
reg = <0x00480000 0x01F00000>;
|
||||
reg = <0x480000 0x1e00000>;
|
||||
linux,rootfs;
|
||||
};
|
||||
|
||||
partition@2280000 {
|
||||
// trx
|
||||
label = "kernel_slave";
|
||||
reg = <0x02280000 0x00300000>;
|
||||
reg = <0x2280000 0x300000>;
|
||||
};
|
||||
|
||||
partition@2580000 {
|
||||
// squashfs
|
||||
label = "rootfs_slave";
|
||||
reg = <0x02580000 0x01F00000>;
|
||||
reg = <0x2580000 0x1f00000>;
|
||||
};
|
||||
|
||||
partition@4480000 {
|
||||
// trx
|
||||
label = "kernel_oflt";
|
||||
reg = <0x04480000 0x00300000>;
|
||||
reg = <0x4480000 0x300000>;
|
||||
};
|
||||
|
||||
partition@4780000 {
|
||||
// squashfs
|
||||
label = "rootfs_oflt";
|
||||
reg = <0x04780000 0x00C00000>;
|
||||
reg = <0x4780000 0xc00000>;
|
||||
};
|
||||
|
||||
partition@5380000 {
|
||||
// UBI
|
||||
label = "config";
|
||||
reg = <0x05380000 0x00800000>;
|
||||
reg = <0x5380000 0x800000>;
|
||||
};
|
||||
|
||||
partition@5b80000 {
|
||||
// UBI
|
||||
label = "log";
|
||||
reg = <0x05b80000 0x00C00000>;
|
||||
reg = <0x5b80000 0xc00000>;
|
||||
};
|
||||
|
||||
partition@6780000 {
|
||||
// UBI / unused
|
||||
label = "extfs";
|
||||
reg = <0x06780000 0x00600000>;
|
||||
reg = <0x6780000 0x600000>;
|
||||
};
|
||||
|
||||
partition@6d80000 {
|
||||
// binary
|
||||
label = "bosa";
|
||||
reg = <0x06d80000 0x00040000>;
|
||||
reg = <0x6d80000 0x40000>;
|
||||
};
|
||||
|
||||
partition@6dc0000 {
|
||||
label = "flag";
|
||||
reg = <0x06dc0000 0x00040000>;
|
||||
reg = <0x6dc0000 0x40000>;
|
||||
};
|
||||
|
||||
partition@6e00000 {
|
||||
label = "flagback";
|
||||
reg = <0x06e00000 0x00040000>;
|
||||
reg = <0x6e00000 0x40000>;
|
||||
};
|
||||
|
||||
partition@6e40000 {
|
||||
label = "ri";
|
||||
reg = <0x06e40000 0x00040000>;
|
||||
reg = <0x6e40000 0x40000>;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_ri_3e: macaddr@3e {
|
||||
compatible = "mac-base";
|
||||
reg = <0x3e 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@6e80000 {
|
||||
label = "riback";
|
||||
reg = <0x06e80000 0x00040000>;
|
||||
reg = <0x6e80000 0x40000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
nvmem-cells = <&macaddr_ri_3e 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
@ -31,27 +31,35 @@
|
||||
label = "bootloader";
|
||||
reg = <0x0 0x40000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_bootloader_ff48: macaddr@ff48 {
|
||||
compatible = "mac-base";
|
||||
reg = <0xff48 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "romfile";
|
||||
reg = <0x40000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "tclinux";
|
||||
reg = <0x80000 0x1400000>;
|
||||
read-only;
|
||||
econet,enable-remap;
|
||||
};
|
||||
|
||||
/* Nested inside of tclinux */
|
||||
partition@480000 {
|
||||
label = "rootfs";
|
||||
reg = <0x480000 0xf80000>;
|
||||
linux,rootfs;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1480000 {
|
||||
@ -77,6 +85,28 @@
|
||||
partition@de40000 {
|
||||
label = "reservearea";
|
||||
reg = <0xde40000 0x1c0000>;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_reserve_140000: eeprom@140000 {
|
||||
/* MT7592 */
|
||||
reg = <0x140000 0x200>;
|
||||
};
|
||||
|
||||
eeprom_reserve_180040: eeprom@180040 {
|
||||
/* MT7612E */
|
||||
reg = <0x180040 0x600>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
nvmem-cells = <&macaddr_bootloader_ff48 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
@ -29,34 +29,63 @@
|
||||
|
||||
partition@0 {
|
||||
label = "bootloader";
|
||||
reg = <0x0 0x00080000>;
|
||||
reg = <0x0 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "misc";
|
||||
reg = <0x00080000 0x140000>;
|
||||
reg = <0x80000 0x140000>;
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_misc_80000: eeprom@80000 {
|
||||
/* MT7592 */
|
||||
reg = <0x80000 0x200>;
|
||||
};
|
||||
|
||||
eeprom_misc_a0000: eeprom@a0000 {
|
||||
/* MT7613BE */
|
||||
reg = <0xa0000 0x600>;
|
||||
};
|
||||
|
||||
macaddr_misc_8f100: macaddr@8f100 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x4f100 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
partition@1c0200 {
|
||||
label = "kernel";
|
||||
reg = <0x001c0000 0x400000>;
|
||||
|
||||
partition@1c0000 {
|
||||
label = "tclinux";
|
||||
reg = <0x1c0000 0x1e40000>;
|
||||
econet,enable-remap;
|
||||
};
|
||||
|
||||
partition@5c0000 {
|
||||
label = "rootfs";
|
||||
reg = <0x005c0000 0x1a40000>;
|
||||
reg = <0x5c0000 0x1a40000>;
|
||||
linux,rootfs;
|
||||
};
|
||||
partition@1c0000 {
|
||||
label = "firmware";
|
||||
reg = <0x001c0000 0x1e40000>;
|
||||
};
|
||||
|
||||
partition@2000000 {
|
||||
label = "firmware_factory";
|
||||
reg = <0x2000000 0x1e40000>;
|
||||
};
|
||||
|
||||
partition@3e40000 {
|
||||
label = "unused";
|
||||
reg = <0x3e40000 0x1a0000>;
|
||||
};
|
||||
|
||||
partition@3fe0000 {
|
||||
label = "reserve";
|
||||
reg = <0x3fe0000 0x20000>;
|
||||
};
|
||||
|
||||
partition@4000000 {
|
||||
label = "openwrt_ubi";
|
||||
/* From the factory this is unallocated space, so it's ours for the taking.
|
||||
@ -67,3 +96,9 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
nvmem-cells = <&macaddr_misc_8f100 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
@ -120,6 +120,9 @@ CONFIG_NET_INGRESS=y
|
||||
CONFIG_NET_XGRESS=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
@ -141,6 +144,7 @@ CONFIG_RANDSTRUCT_NONE=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
@ -152,7 +156,6 @@ CONFIG_SPI=y
|
||||
CONFIG_SPI_AIROHA_EN7523=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R2=y
|
||||
|
||||
@ -1,13 +1,20 @@
|
||||
From 36ee43df98b0ac16bb73e62fa8cffcdf710c37e4 Mon Sep 17 00:00:00 2001
|
||||
From 6f268e275c74dae0536e0b61982a8db25bcf4f16 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:44 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:19 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix VLAN_ID_IDX write size for BCM5325/65
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Since BCM5325 and BCM5365 only support up to 256 VLANs, the VLAN_ID_IDX
|
||||
register is only 8 bit wide, not 16 bit, so use an appropriate accessor.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Tested-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-2-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
@ -1,7 +1,10 @@
|
||||
From 2bed2d0932c37d6cae9a745613c2e8f83649ed39 Mon Sep 17 00:00:00 2001
|
||||
From 9316012dd01952f75e37035360138ccc786ef727 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:45 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:20 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix extracting VID from entry for BCM5325/65
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
BCM5325/65's Entry register uses the highest three bits for
|
||||
VALID/STATIC/AGE, so shifting by 53 only will add these to
|
||||
@ -10,7 +13,11 @@ b53_arl_entry::vid.
|
||||
So make sure to mask the vid value as well, to not get invalid VIDs.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Tested-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-3-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_priv.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
@ -1,14 +1,21 @@
|
||||
From 8d2f3f0e87fe526686f7a2744bf965ce4e99ae41 Mon Sep 17 00:00:00 2001
|
||||
From 8e46aacea4264bcb8d4265fb07577afff58ae78d Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:46 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:21 +0100
|
||||
Subject: [PATCH] net: dsa: b53: use same ARL search result offset for BCM5325/65
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
BCM5365's search result is at the same offset as BCM5325's search
|
||||
result, and they (mostly) share the same format, so switch BCM5365 to
|
||||
BCM5325's arl ops.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Tested-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-4-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 18 +-----------------
|
||||
drivers/net/dsa/b53/b53_regs.h | 4 +---
|
||||
@ -1,6 +1,6 @@
|
||||
From d0d7daf6e051f8795e4e1b759ff5055c80a85832 Mon Sep 17 00:00:00 2001
|
||||
From 85132103f700b1340fc17df8a981509d17bf4872 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:47 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:22 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix CPU port unicast ARL entries for BCM5325/65
|
||||
|
||||
On BCM5325 and BCM5365, unicast ARL entries use 8 as the value for the
|
||||
@ -9,6 +9,9 @@ at most other places.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-5-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_priv.h | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
@ -27,7 +30,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
u64_to_ether_addr(mac_vid, ent->mac);
|
||||
+ ent->port = (mac_vid >> ARLTBL_DATA_PORT_ID_S_25) &
|
||||
+ ARLTBL_DATA_PORT_ID_MASK_25;
|
||||
+ if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
+ if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
+ ent->port = B53_CPU_PORT_25;
|
||||
ent->vid = (mac_vid >> ARLTBL_VID_S_65) & ARLTBL_VID_MASK_25;
|
||||
}
|
||||
@ -38,7 +41,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
*mac_vid = ether_addr_to_u64(ent->mac);
|
||||
- *mac_vid |= (u64)(ent->port & ARLTBL_DATA_PORT_ID_MASK_25) <<
|
||||
- ARLTBL_DATA_PORT_ID_S_25;
|
||||
+ if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT_25)
|
||||
+ if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT_25)
|
||||
+ *mac_vid |= (u64)B53_CPU_PORT << ARLTBL_DATA_PORT_ID_S_25;
|
||||
+ else
|
||||
+ *mac_vid |= (u64)(ent->port & ARLTBL_DATA_PORT_ID_MASK_25) <<
|
||||
@ -1,6 +1,6 @@
|
||||
From 0a215e4d8da0c5e36ee29304879a111daff5b461 Mon Sep 17 00:00:00 2001
|
||||
From 3b08863469aa6028ac7c3120966f4e2f6051cf6b Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:48 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:23 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix BCM5325/65 ARL entry multicast port masks
|
||||
|
||||
We currently use the mask 0xf for writing and reading b53_entry::port,
|
||||
@ -20,7 +20,10 @@ contained in the Search Result Extension register. So create a separate
|
||||
search result parse function that properly handles this.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-6-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 4 +++-
|
||||
drivers/net/dsa/b53/b53_priv.h | 25 +++++++++++++++++++++----
|
||||
@ -53,11 +56,11 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
- ARLTBL_DATA_PORT_ID_MASK_25;
|
||||
+ ent->port = (mac_vid & ARLTBL_DATA_PORT_ID_MASK_25) >>
|
||||
+ ARLTBL_DATA_PORT_ID_S_25;
|
||||
if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
ent->port = B53_CPU_PORT_25;
|
||||
ent->vid = (mac_vid >> ARLTBL_VID_S_65) & ARLTBL_VID_MASK_25;
|
||||
@@ -388,8 +388,8 @@ static inline void b53_arl_from_entry_25
|
||||
if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT_25)
|
||||
if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT_25)
|
||||
*mac_vid |= (u64)B53_CPU_PORT << ARLTBL_DATA_PORT_ID_S_25;
|
||||
else
|
||||
- *mac_vid |= (u64)(ent->port & ARLTBL_DATA_PORT_ID_MASK_25) <<
|
||||
@ -1,6 +1,6 @@
|
||||
From d41f2d5f1c9c6d492ccd3ffdd09e064e70ebc934 Mon Sep 17 00:00:00 2001
|
||||
From d39514e6a2d14f57830d649e2bf03b49612c2f73 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:49 +0100
|
||||
Date: Fri, 28 Nov 2025 09:06:24 +0100
|
||||
Subject: [PATCH] net: dsa: b53: fix BCM5325/65 ARL entry VIDs
|
||||
|
||||
BCM5325/65's ARL entry registers do not contain the VID, only the search
|
||||
@ -12,6 +12,9 @@ move the VLAN ID field definition to the search register definition.
|
||||
|
||||
Fixes: c45655386e53 ("net: dsa: b53: add support for FDB operations on 5325/5365")
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-7-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 9 +++++++--
|
||||
drivers/net/dsa/b53/b53_priv.h | 12 ++++++------
|
||||
@ -60,7 +63,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
ent->is_valid = !!(mac_vid & ARLTBL_VALID_25);
|
||||
@@ -352,7 +352,7 @@ static inline void b53_arl_to_entry_25(s
|
||||
ARLTBL_DATA_PORT_ID_S_25;
|
||||
if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT)
|
||||
ent->port = B53_CPU_PORT_25;
|
||||
- ent->vid = (mac_vid >> ARLTBL_VID_S_65) & ARLTBL_VID_MASK_25;
|
||||
+ ent->vid = vid_entry;
|
||||
@ -0,0 +1,44 @@
|
||||
From 0b2b27058692d437b12d3f2a3bf0fa699af7376e Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Fri, 28 Nov 2025 09:06:25 +0100
|
||||
Subject: [PATCH] net: dsa: b53: allow VID 0 for BCM5325/65
|
||||
|
||||
Now that writing ARL entries works properly, we can actually use VID 0
|
||||
as the default untagged VLAN for BCM5325 and BCM5365 as well.
|
||||
|
||||
So use 0 as default PVID for all chips and do not reject VLAN 0 anymore,
|
||||
which we ignored since commit 45e9d59d3950 ("net: dsa: b53: do not allow
|
||||
to configure VLAN 0") anyway.
|
||||
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
Link: https://patch.msgid.link/20251128080625.27181-8-jonas.gorski@gmail.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -852,10 +852,7 @@ static void b53_enable_stp(struct b53_de
|
||||
|
||||
static u16 b53_default_pvid(struct b53_device *dev)
|
||||
{
|
||||
- if (is5325(dev) || is5365(dev))
|
||||
- return 1;
|
||||
- else
|
||||
- return 0;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static bool b53_vlan_port_needs_forced_tagged(struct dsa_switch *ds, int port)
|
||||
@@ -1679,9 +1676,6 @@ static int b53_vlan_prepare(struct dsa_s
|
||||
{
|
||||
struct b53_device *dev = ds->priv;
|
||||
|
||||
- if ((is5325(dev) || is5365(dev)) && vlan->vid == 0)
|
||||
- return -EOPNOTSUPP;
|
||||
-
|
||||
/* Port 7 on 7278 connects to the ASP's UniMAC which is not capable of
|
||||
* receiving VLAN tagged frames at all, we can still allow the port to
|
||||
* be configured for egress untagged.
|
||||
@ -1,175 +0,0 @@
|
||||
From b5a97c36457e4299afdb420603d39d1e30da843e Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 25 Nov 2025 08:51:50 +0100
|
||||
Subject: [PATCH] net: dsa: b53: allow VID 0 for BCM5325/65
|
||||
|
||||
Now that writing ARL entries works properly, we can actually use VID 0
|
||||
as the default untagged VLAN for BCM5325 and BCM5365 as well, so use 0
|
||||
as default PVID always.
|
||||
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
---
|
||||
drivers/net/dsa/b53/b53_common.c | 49 +++++++++++---------------------
|
||||
1 file changed, 17 insertions(+), 32 deletions(-)
|
||||
|
||||
--- a/drivers/net/dsa/b53/b53_common.c
|
||||
+++ b/drivers/net/dsa/b53/b53_common.c
|
||||
@@ -850,14 +850,6 @@ static void b53_enable_stp(struct b53_de
|
||||
b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, gc);
|
||||
}
|
||||
|
||||
-static u16 b53_default_pvid(struct b53_device *dev)
|
||||
-{
|
||||
- if (is5325(dev) || is5365(dev))
|
||||
- return 1;
|
||||
- else
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static bool b53_vlan_port_needs_forced_tagged(struct dsa_switch *ds, int port)
|
||||
{
|
||||
struct b53_device *dev = ds->priv;
|
||||
@@ -886,14 +878,12 @@ int b53_configure_vlan(struct dsa_switch
|
||||
struct b53_device *dev = ds->priv;
|
||||
struct b53_vlan vl = { 0 };
|
||||
struct b53_vlan *v;
|
||||
- int i, def_vid;
|
||||
u16 vid;
|
||||
-
|
||||
- def_vid = b53_default_pvid(dev);
|
||||
+ int i;
|
||||
|
||||
/* clear all vlan entries */
|
||||
if (is5325(dev) || is5365(dev)) {
|
||||
- for (i = def_vid; i < dev->num_vlans; i++)
|
||||
+ for (i = 0; i < dev->num_vlans; i++)
|
||||
b53_set_vlan_entry(dev, i, &vl);
|
||||
} else {
|
||||
b53_do_vlan_op(dev, VTA_CMD_CLEAR);
|
||||
@@ -907,7 +897,7 @@ int b53_configure_vlan(struct dsa_switch
|
||||
* entry. Do this only when the tagging protocol is not
|
||||
* DSA_TAG_PROTO_NONE
|
||||
*/
|
||||
- v = &dev->vlans[def_vid];
|
||||
+ v = &dev->vlans[0];
|
||||
b53_for_each_port(dev, i) {
|
||||
if (!b53_vlan_port_may_join_untagged(ds, i))
|
||||
continue;
|
||||
@@ -915,16 +905,15 @@ int b53_configure_vlan(struct dsa_switch
|
||||
vl.members |= BIT(i);
|
||||
if (!b53_vlan_port_needs_forced_tagged(ds, i))
|
||||
vl.untag = vl.members;
|
||||
- b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(i),
|
||||
- def_vid);
|
||||
+ b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(i), 0);
|
||||
}
|
||||
- b53_set_vlan_entry(dev, def_vid, &vl);
|
||||
+ b53_set_vlan_entry(dev, 0, &vl);
|
||||
|
||||
if (dev->vlan_filtering) {
|
||||
/* Upon initial call we have not set-up any VLANs, but upon
|
||||
* system resume, we need to restore all VLAN entries.
|
||||
*/
|
||||
- for (vid = def_vid + 1; vid < dev->num_vlans; vid++) {
|
||||
+ for (vid = 1; vid < dev->num_vlans; vid++) {
|
||||
v = &dev->vlans[vid];
|
||||
|
||||
if (!v->members)
|
||||
@@ -1260,7 +1249,6 @@ static int b53_setup(struct dsa_switch *
|
||||
struct b53_device *dev = ds->priv;
|
||||
struct b53_vlan *vl;
|
||||
unsigned int port;
|
||||
- u16 pvid;
|
||||
int ret;
|
||||
|
||||
/* Request bridge PVID untagged when DSA_TAG_PROTO_NONE is set
|
||||
@@ -1290,8 +1278,7 @@ static int b53_setup(struct dsa_switch *
|
||||
}
|
||||
|
||||
/* setup default vlan for filtering mode */
|
||||
- pvid = b53_default_pvid(dev);
|
||||
- vl = &dev->vlans[pvid];
|
||||
+ vl = &dev->vlans[0];
|
||||
b53_for_each_port(dev, port) {
|
||||
vl->members |= BIT(port);
|
||||
if (!b53_vlan_port_needs_forced_tagged(ds, port))
|
||||
@@ -1720,7 +1707,7 @@ int b53_vlan_add(struct dsa_switch *ds,
|
||||
if (pvid)
|
||||
new_pvid = vlan->vid;
|
||||
else if (!pvid && vlan->vid == old_pvid)
|
||||
- new_pvid = b53_default_pvid(dev);
|
||||
+ new_pvid = 0;
|
||||
else
|
||||
new_pvid = old_pvid;
|
||||
dev->ports[port].pvid = new_pvid;
|
||||
@@ -1770,7 +1757,7 @@ int b53_vlan_del(struct dsa_switch *ds,
|
||||
vl->members &= ~BIT(port);
|
||||
|
||||
if (pvid == vlan->vid)
|
||||
- pvid = b53_default_pvid(dev);
|
||||
+ pvid = 0;
|
||||
dev->ports[port].pvid = pvid;
|
||||
|
||||
if (untagged && !b53_vlan_port_needs_forced_tagged(ds, port))
|
||||
@@ -2249,7 +2236,7 @@ int b53_br_join(struct dsa_switch *ds, i
|
||||
struct b53_device *dev = ds->priv;
|
||||
struct b53_vlan *vl;
|
||||
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
|
||||
- u16 pvlan, reg, pvid;
|
||||
+ u16 pvlan, reg;
|
||||
unsigned int i;
|
||||
|
||||
/* On 7278, port 7 which connects to the ASP should only receive
|
||||
@@ -2258,8 +2245,7 @@ int b53_br_join(struct dsa_switch *ds, i
|
||||
if (dev->chip_id == BCM7278_DEVICE_ID && port == 7)
|
||||
return -EINVAL;
|
||||
|
||||
- pvid = b53_default_pvid(dev);
|
||||
- vl = &dev->vlans[pvid];
|
||||
+ vl = &dev->vlans[0];
|
||||
|
||||
if (dev->vlan_filtering) {
|
||||
/* Make this port leave the all VLANs join since we will have
|
||||
@@ -2275,9 +2261,9 @@ int b53_br_join(struct dsa_switch *ds, i
|
||||
reg);
|
||||
}
|
||||
|
||||
- b53_get_vlan_entry(dev, pvid, vl);
|
||||
+ b53_get_vlan_entry(dev, 0, vl);
|
||||
vl->members &= ~BIT(port);
|
||||
- b53_set_vlan_entry(dev, pvid, vl);
|
||||
+ b53_set_vlan_entry(dev, 0, vl);
|
||||
}
|
||||
|
||||
b53_read16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), &pvlan);
|
||||
@@ -2316,7 +2302,7 @@ void b53_br_leave(struct dsa_switch *ds,
|
||||
struct b53_vlan *vl;
|
||||
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
|
||||
unsigned int i;
|
||||
- u16 pvlan, reg, pvid;
|
||||
+ u16 pvlan, reg;
|
||||
|
||||
b53_read16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), &pvlan);
|
||||
|
||||
@@ -2341,8 +2327,7 @@ void b53_br_leave(struct dsa_switch *ds,
|
||||
b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan);
|
||||
dev->ports[port].vlan_ctl_mask = pvlan;
|
||||
|
||||
- pvid = b53_default_pvid(dev);
|
||||
- vl = &dev->vlans[pvid];
|
||||
+ vl = &dev->vlans[0];
|
||||
|
||||
if (dev->vlan_filtering) {
|
||||
/* Make this port join all VLANs without VLAN entries */
|
||||
@@ -2354,9 +2339,9 @@ void b53_br_leave(struct dsa_switch *ds,
|
||||
b53_write16(dev, B53_VLAN_PAGE, B53_JOIN_ALL_VLAN_EN, reg);
|
||||
}
|
||||
|
||||
- b53_get_vlan_entry(dev, pvid, vl);
|
||||
+ b53_get_vlan_entry(dev, 0, vl);
|
||||
vl->members |= BIT(port);
|
||||
- b53_set_vlan_entry(dev, pvid, vl);
|
||||
+ b53_set_vlan_entry(dev, 0, vl);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(b53_br_leave);
|
||||
@ -1464,13 +1464,13 @@ int rt3050_esw_init(struct fe_priv *priv)
|
||||
const __be32 *rgmii;
|
||||
int ret;
|
||||
|
||||
if (!pdev)
|
||||
return -ENODEV;
|
||||
|
||||
if (!of_device_is_compatible(np, ralink_esw_match->compatible))
|
||||
return -EINVAL;
|
||||
|
||||
pdev = of_find_device_by_node(np);
|
||||
if (!pdev)
|
||||
return -ENODEV;
|
||||
|
||||
esw = platform_get_drvdata(pdev);
|
||||
if (!esw) {
|
||||
put_device(&pdev->dev);
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
From 69cc9d4075855661268327c38c9b0e71ac37eb1c Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Fri, 21 Nov 2025 17:26:59 +0100
|
||||
Subject: [PATCH] mmc: sdhci-of-dwcmshc: Fix command queue support for RK3576
|
||||
|
||||
When I added command queue engine (CQE) support for the Rockchip eMMC
|
||||
controller, I missed that RK3576 has a separate platform data struct.
|
||||
While things are working fine on RK3588 (I tested the ROCK 5B) and
|
||||
the suspend issue is fixed on the RK3576 (I tested the Sige5), this
|
||||
results in stability issues. By also adding the necessary hooks for
|
||||
the RK3576 platform the following problems can be avoided:
|
||||
|
||||
[ 15.606895] mmc0: running CQE recovery
|
||||
[ 15.616189] mmc0: running CQE recovery
|
||||
[...]
|
||||
[ 25.911484] mmc0: running CQE recovery
|
||||
[ 25.926305] mmc0: running CQE recovery
|
||||
[ 25.927468] mmc0: running CQE recovery
|
||||
[...]
|
||||
[ 26.255719] mmc0: running CQE recovery
|
||||
[ 26.257162] ------------[ cut here ]------------
|
||||
[ 26.257581] mmc0: cqhci: spurious TCN for tag 31
|
||||
[ 26.258034] WARNING: CPU: 0 PID: 0 at drivers/mmc/host/cqhci-core.c:796 cqhci_irq+0x440/0x68c
|
||||
[ 26.263786] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.18.0-rc6-gd984ebbf0d15 #1 PREEMPT
|
||||
[ 26.264561] Hardware name: ArmSoM Sige5 (DT)
|
||||
[...]
|
||||
[ 26.272748] Call trace:
|
||||
[ 26.272964] cqhci_irq+0x440/0x68c (P)
|
||||
[ 26.273296] dwcmshc_cqe_irq_handler+0x54/0x88
|
||||
[ 26.273689] sdhci_irq+0xbc/0x1200
|
||||
[ 26.273991] __handle_irq_event_percpu+0x54/0x1d0
|
||||
[...]
|
||||
|
||||
Note that the above problems do not necessarily happen with every boot.
|
||||
|
||||
Reported-by: Adrian Hunter <adrian.hunter@intel.com>
|
||||
Closes: https://lore.kernel.org/linux-rockchip/01949bc9-4873-498b-ac7d-f008393ccc4c@intel.com/
|
||||
Fixes: fda1e0af7c28f ("mmc: sdhci-of-dwcmshc: Add command queue support for rockchip SOCs")
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
|
||||
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
|
||||
---
|
||||
drivers/mmc/host/sdhci-of-dwcmshc.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
|
||||
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
|
||||
@@ -1333,6 +1333,7 @@ static const struct dwcmshc_pltfm_data s
|
||||
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
|
||||
SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
|
||||
},
|
||||
+ .cqhci_host_ops = &rk35xx_cqhci_ops,
|
||||
.init = dwcmshc_rk35xx_init,
|
||||
.postinit = dwcmshc_rk3576_postinit,
|
||||
};
|
||||
@ -0,0 +1,42 @@
|
||||
From c7ce6453b769c45006ed4983762f81e130878171 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Lin <shawn.lin@rock-chips.com>
|
||||
Date: Wed, 26 Nov 2025 07:26:39 +0800
|
||||
Subject: [PATCH] mmc: sdhci-of-dwcmshc: Disable internal clock auto gate for
|
||||
Rockchip SOCs
|
||||
|
||||
Enabling CMDQ support can lead to random occurrences of the error log when
|
||||
there are RPMB access and data flush executed:
|
||||
|
||||
"mmc2: Timeout waiting for hardware interrupt."
|
||||
|
||||
Enabling CMDQ and then issuing a DCMD as the final command before disabling
|
||||
it causes the eMMC controller to auto-gate its internal clock. Chip simulation
|
||||
shows this results in a state machine mismatch after CMDQ mode exit, triggering
|
||||
data-timeout errors for all subsequent read and write operations.
|
||||
|
||||
Therefore, the auto-clock-gate function must be disabled whenever CMDQ is
|
||||
enabled.
|
||||
|
||||
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
|
||||
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
|
||||
Fixes: fda1e0af7c28 ("mmc: sdhci-of-dwcmshc: Add command queue support for rockchip SOCs")
|
||||
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
|
||||
---
|
||||
drivers/mmc/host/sdhci-of-dwcmshc.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
|
||||
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
|
||||
@@ -696,10 +696,11 @@ static void dwcmshc_rk3568_set_clock(str
|
||||
|
||||
sdhci_set_clock(host, clock);
|
||||
|
||||
- /* Disable cmd conflict check */
|
||||
+ /* Disable cmd conflict check and internal clock gate */
|
||||
reg = dwc_priv->vendor_specific_area1 + DWCMSHC_HOST_CTRL3;
|
||||
extra = sdhci_readl(host, reg);
|
||||
extra &= ~BIT(0);
|
||||
+ extra |= BIT(4);
|
||||
sdhci_writel(host, extra, reg);
|
||||
|
||||
if (clock <= 52000000) {
|
||||
@ -0,0 +1,44 @@
|
||||
From 79cf71c0b177c0e23d411e2469435e2c2f83f563 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Lin <shawn.lin@rock-chips.com>
|
||||
Date: Wed, 26 Nov 2025 07:26:40 +0800
|
||||
Subject: [PATCH] mmc: sdhci-of-dwcmshc: reduce CIT for better performance
|
||||
|
||||
CQHCI_SSC1.CIT indicates to the CQE the polling period to use for
|
||||
periodic SEND_QUEUE_STATUS (CMD13) polling. Some eMMCs have only one
|
||||
hardware queue, and CMD13 can only query one slot at a time for data
|
||||
transmission, which cannot be processed in parallel. Modifying the
|
||||
CMD13 query interval can increase the query frequency and improve
|
||||
random write performance.
|
||||
|
||||
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
|
||||
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
|
||||
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
|
||||
---
|
||||
drivers/mmc/host/cqhci.h | 1 +
|
||||
drivers/mmc/host/sdhci-of-dwcmshc.c | 5 +++++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/mmc/host/cqhci.h
|
||||
+++ b/drivers/mmc/host/cqhci.h
|
||||
@@ -93,6 +93,7 @@
|
||||
/* send status config 1 */
|
||||
#define CQHCI_SSC1 0x40
|
||||
#define CQHCI_SSC1_CBC_MASK GENMASK(19, 16)
|
||||
+#define CQHCI_SSC1_CIT_MASK GENMASK(15, 0)
|
||||
|
||||
/* send status config 2 */
|
||||
#define CQHCI_SSC2 0x44
|
||||
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
|
||||
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
|
||||
@@ -614,6 +614,11 @@ static void rk35xx_sdhci_cqe_pre_enable(
|
||||
struct dwcmshc_priv *dwc_priv = sdhci_pltfm_priv(pltfm_host);
|
||||
u32 reg;
|
||||
|
||||
+ /* Set Send Status Command Idle Timer to 10.66us (256 * 1 / 24) */
|
||||
+ reg = sdhci_readl(host, dwc_priv->vendor_specific_area2 + CQHCI_SSC1);
|
||||
+ reg = (reg & ~CQHCI_SSC1_CIT_MASK) | 0x0100;
|
||||
+ sdhci_writel(host, reg, dwc_priv->vendor_specific_area2 + CQHCI_SSC1);
|
||||
+
|
||||
reg = sdhci_readl(host, dwc_priv->vendor_specific_area2 + CQHCI_CFG);
|
||||
reg |= CQHCI_ENABLE;
|
||||
sdhci_writel(host, reg, dwc_priv->vendor_specific_area2 + CQHCI_CFG);
|
||||
@ -41,13 +41,13 @@ SDK_DIRS = \
|
||||
GIT_URL:=$(shell git config --get remote.origin.url 2>/dev/null)
|
||||
GIT_URL:=$(if $(CONFIG_BUILDBOT),$(filter git://% http://% https://%,$(GIT_URL)),$(GIT_URL))
|
||||
GIT_COMMIT:=$(shell git rev-parse HEAD 2>/dev/null)
|
||||
GIT_BRANCH:=$(filter-out master HEAD,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null))
|
||||
GIT_BRANCH:=$(filter-out master main HEAD,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null))
|
||||
GIT_TAGNAME:=$(shell git show-ref --tags --dereference 2>/dev/null | sed -ne '/^$(GIT_COMMIT) / { s|^.*/||; s|\^.*||; p }')
|
||||
|
||||
BASE_FEED:=$(if $(GIT_URL),src-git --root=package base $(GIT_URL)$(if $(GIT_BRANCH),;$(GIT_BRANCH),$(if $(GIT_TAGNAME),;$(GIT_TAGNAME))))
|
||||
BASE_FEED:=$(if $(GIT_URL),src-git --root=package base $(GIT_URL)$(if $(CONFIG_BUILDBOT),^$(GIT_COMMIT),$(if $(GIT_TAGNAME),;$(GIT_TAGNAME),$(if $(GIT_BRANCH),;$(GIT_BRANCH)))))
|
||||
BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C git svn info 2>/dev/null | sed -ne 's/^URL: /src-gitsvn --root=package base /p'))
|
||||
BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),$(shell cd $(TOPDIR); LC_ALL=C svn info 2>/dev/null | sed -ne 's/^URL: /src-svn --root=package base /p'))
|
||||
BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git --root=package base https://github.com/immortalwrt/immortalwrt.git$(if $(GIT_BRANCH),;$(GIT_BRANCH),$(if $(GIT_TAGNAME),;$(GIT_TAGNAME))))
|
||||
BASE_FEED:=$(if $(BASE_FEED),$(BASE_FEED),src-git --root=package base https://github.com/immortalwrt/immortalwrt.git$(if $(CONFIG_BUILDBOT),^$(GIT_COMMIT),$(if $(GIT_TAGNAME),;$(GIT_TAGNAME),$(if $(GIT_BRANCH),;$(GIT_BRANCH)))))
|
||||
|
||||
KDIR_BASE = $(patsubst $(TOPDIR)/%,%,$(LINUX_DIR))
|
||||
KDIR_ARCHES = $(LINUX_KARCH)
|
||||
|
||||
@ -20,8 +20,10 @@ endef
|
||||
define Host/Install
|
||||
$(call Host/Uninstall)
|
||||
$(INSTALL_DIR) $(1)/share/aclocal
|
||||
$(foreach m4,$(notdir $(wildcard $(HOST_BUILD_DIR)/m4/*.m4)),
|
||||
$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/$(m4) $(1)/share/aclocal/gl_$(m4))
|
||||
for m4 in $(HOST_BUILD_DIR)/m4/*.m4; do \
|
||||
$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/$$$$(basename $$$$m4) \
|
||||
$(1)/share/aclocal/gl_$$$$(basename $$$$m4); \
|
||||
done
|
||||
$(CP) $(HOST_BUILD_DIR)/ $(1)/share/gnulib/
|
||||
ln -sf ../share/gnulib/gnulib-tool $(STAGING_DIR_HOST)/bin/gnulib-tool
|
||||
endef
|
||||
|
||||
Loading…
Reference in New Issue
Block a user