From 398a823c6cb1ad4740c12c5a5b8d049781801a0d Mon Sep 17 00:00:00 2001 From: Han Gao Date: Fri, 17 Jul 2026 22:16:10 +0800 Subject: [PATCH] SPECS: linux: refresh patchset Signed-off-by: Han Gao --- ...m-Move-dma_contiguous_reserve-after-.patch | 74 ++++++++++ ...ings-soc-spacemit-k3-add-i2s_sysclk-.patch | 40 ++++++ ...k-spacemit-k3-fix-i2s-clock-topology.patch | 115 +++++++++++++++ ...cemit-k3-fix-missing-2-factor-in-i2s.patch | 46 ++++++ ...efconfig-enable-RFKILL-and-RFKILL_GP.patch | 32 +++++ ...ts-spacemit-k3-add-rfkill-node-for-B.patch | 40 ++++++ ...ts-spacemit-k3-add-USB3-B-and-C-cont.patch | 131 ++++++++++++++++++ ...ts-spacemit-k3-add-rfkill-node-for-W.patch | 39 ++++++ ...v-require-vmemmap-for-NUMA-balancing.patch | 46 ++++++ ...ime-Add-missing-__iomem-in-get_cycle.patch | 43 ++++++ ...cemiT-vendor-id-and-its-K3-device-id.patch | 34 ----- ...e-Spacemit-vendor-and-device-IDs-to-.patch | 54 ++++++++ ...pci-add-SpacemiT-K3-to-36-bit-DMA-al.patch | 36 ----- ...w89-pci-enable-36-bit-DMA-on-spacemi.patch | 39 ++++++ ...mpxchg-Use-.option-arch-for-Zacas-an.patch | 97 +++++++++++++ ...s-th1520-add-licheepi4a-16g-support.patch} | 2 +- ...-dts-th1520-rename-thead-to-xuantie.patch} | 2 +- ...ts-th1520-add-xuantie-th1520-mbox-r.patch} | 2 +- ...s-nvmem-Add-SG2044-eFuse-controller.patch} | 2 +- ...vmem-Add-Sophgo-SG2044-eFuse-driver.patch} | 2 +- ...-dts-sophgo-sg2044-Add-eFUSE-device.patch} | 2 +- ...42-errata-Replace-thead-cache-clean.patch} | 2 +- ...-dts-sg2044-Modify-pcie-bar-address.patch} | 2 +- ...ccess-don-t-use-vector-if-buffer-is.patch} | 2 +- ...isable-dynamic-PCIe-speed-switch-on.patch} | 2 +- ...-dwcmshc-Add-support-for-SG2042-FPG.patch} | 2 +- ...-sophgo-sg2044-srd3-add-spifmc-node.patch} | 2 +- ...HACK-riscv-entry-nmi_exit-before-die.patch | 45 ++++++ SPECS/linux/series | 40 ++++-- 29 files changed, 879 insertions(+), 96 deletions(-) create mode 100644 SPECS/linux/0222-FROMLIST-riscv-mm-Move-dma_contiguous_reserve-after-.patch create mode 100644 SPECS/linux/0223-FROMLIST-dt-bindings-soc-spacemit-k3-add-i2s_sysclk-.patch create mode 100644 SPECS/linux/0224-FROMLIST-clk-spacemit-k3-fix-i2s-clock-topology.patch create mode 100644 SPECS/linux/0225-FROMLIST-clk-spacemit-k3-fix-missing-2-factor-in-i2s.patch create mode 100644 SPECS/linux/0226-FROMLIST-riscv-defconfig-enable-RFKILL-and-RFKILL_GP.patch create mode 100644 SPECS/linux/0227-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-B.patch create mode 100644 SPECS/linux/0228-FROMLIST-riscv-dts-spacemit-k3-add-USB3-B-and-C-cont.patch create mode 100644 SPECS/linux/0229-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-W.patch create mode 100644 SPECS/linux/0230-FROMLIST-riscv-require-vmemmap-for-NUMA-balancing.patch create mode 100644 SPECS/linux/0231-FROMLIST-riscv-time-Add-missing-__iomem-in-get_cycle.patch delete mode 100644 SPECS/linux/0231-RUYI-PCI-add-SpacemiT-vendor-id-and-its-K3-device-id.patch create mode 100644 SPECS/linux/0232-FROMLIST-PCI-Move-Spacemit-vendor-and-device-IDs-to-.patch delete mode 100644 SPECS/linux/0232-RUYI-wifi-rtw89-pci-add-SpacemiT-K3-to-36-bit-DMA-al.patch create mode 100644 SPECS/linux/0233-FROMLIST-wifi-rtw89-pci-enable-36-bit-DMA-on-spacemi.patch create mode 100644 SPECS/linux/0234-FROMLIST-riscv-cmpxchg-Use-.option-arch-for-Zacas-an.patch rename SPECS/linux/{0222-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch => 0235-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch} (96%) rename SPECS/linux/{0223-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch => 0236-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch} (93%) rename SPECS/linux/{0224-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch => 0237-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch} (95%) rename SPECS/linux/{0225-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch => 0238-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch} (96%) rename SPECS/linux/{0226-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch => 0239-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch} (99%) rename SPECS/linux/{0227-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch => 0240-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch} (96%) rename SPECS/linux/{0228-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch => 0241-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch} (94%) rename SPECS/linux/{0229-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch => 0242-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch} (98%) rename SPECS/linux/{0230-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch => 0243-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch} (98%) rename SPECS/linux/{0233-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch => 0244-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch} (96%) rename SPECS/linux/{0234-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch => 0245-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch} (97%) rename SPECS/linux/{0235-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch => 0246-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch} (94%) create mode 100644 SPECS/linux/0247-RUYI-HACK-riscv-entry-nmi_exit-before-die.patch diff --git a/SPECS/linux/0222-FROMLIST-riscv-mm-Move-dma_contiguous_reserve-after-.patch b/SPECS/linux/0222-FROMLIST-riscv-mm-Move-dma_contiguous_reserve-after-.patch new file mode 100644 index 0000000000..ed0208dee8 --- /dev/null +++ b/SPECS/linux/0222-FROMLIST-riscv-mm-Move-dma_contiguous_reserve-after-.patch @@ -0,0 +1,74 @@ +From 3d8030b08d755d8219924a0e54e1b4857a3a5d4a Mon Sep 17 00:00:00 2001 +From: Eder Zulian +Date: Tue, 14 Jul 2026 20:56:48 +0200 +Subject: [RUYI PATCH] FROMLIST: riscv: mm: Move dma_contiguous_reserve() after + NUMA initialization + +Move the dma_contiguous_reserve() call from setup_bootmem() to +misc_mem_init(), placing it after arch_numa_init(). This ensures that +NUMA topology is initialized when reserving contiguous memory for DMA. + +Tested with CMA_SIZE_PERNUMA enabled and two NUMA nodes on QEMU: + +qemu-system-riscv64 \ + -machine virt \ + -nographic \ + -smp 2 -m 512M \ + -numa node,nodeid=0,cpus=0,memdev=m0 \ + -numa node,nodeid=1,cpus=1,memdev=m1 \ + -object memory-backend-ram,id=m0,size=256M \ + -object memory-backend-ram,id=m1,size=256M \ + -kernel arch/riscv/boot/Image \ + -append "console=ttyS0 earlycon loglevel=7 cma=16M" + +Unpatched kernel's log (one global CMA pool and no per-nodepools, 16 MiB +cma-reserved): + + [ 0.000000] cma: Reserved 16 MiB at 0x000000009ee00000 + ... + [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000008fffffff] + [ 0.000000] Initmem setup node 1 [mem 0x0000000090000000-0x000000009fffffff] + ... + [ 0.056397] smp: Brought up 2 nodes, 2 CPUs + [ 0.066135] Memory: 449288K/524288K available (12279K kernel code, 5980K rwdata, 6144K rodata, 2467K init, 482K bss, 54504K reserved, 16384K cma-reserved) + +Patched kernel's log (three CMA pools are created, 48 MiB total), + + [ 0.000000] cma: Reserved 16 MiB at 0x000000009ee00000 + [ 0.000000] cma: Reserved 16 MiB at 0x000000008ee00000 + [ 0.000000] cma: Reserved 16 MiB at 0x000000009de00000 + ... + [ 0.054251] smp: Brought up 2 nodes, 2 CPUs + [ 0.064082] Memory: 416520K/524288K available (12279K kernel code, 5980K rwdata, 6144K rodata, 2467K init, 482K bss, 54504K reserved, 49152K cma-reserved) + +Signed-off-by: Eder Zulian +Link: https://lore.kernel.org/r/20260714185648.1082483-1-ezulian@redhat.com +Signed-off-by: Han Gao +--- + arch/riscv/mm/init.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c +index 2ec9a9df20cb..86b0527d993e 100644 +--- a/arch/riscv/mm/init.c ++++ b/arch/riscv/mm/init.c +@@ -303,8 +303,6 @@ static void __init setup_bootmem(void) + */ + if (!IS_ENABLED(CONFIG_BUILTIN_DTB)) + memblock_reserve(dtb_early_pa, fdt_totalsize(dtb_early_va)); +- +- dma_contiguous_reserve(dma32_phys_limit); + } + + #ifdef CONFIG_RELOCATABLE +@@ -1363,6 +1361,7 @@ void __init misc_mem_init(void) + { + early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT); + arch_numa_init(); ++ dma_contiguous_reserve(dma32_phys_limit); + #ifdef CONFIG_SPARSEMEM_VMEMMAP + /* The entire VMEMMAP region has been populated. Flush TLB for this region */ + local_flush_tlb_kernel_range(VMEMMAP_START, VMEMMAP_END); +-- +2.53.0 + diff --git a/SPECS/linux/0223-FROMLIST-dt-bindings-soc-spacemit-k3-add-i2s_sysclk-.patch b/SPECS/linux/0223-FROMLIST-dt-bindings-soc-spacemit-k3-add-i2s_sysclk-.patch new file mode 100644 index 0000000000..a6b79732c3 --- /dev/null +++ b/SPECS/linux/0223-FROMLIST-dt-bindings-soc-spacemit-k3-add-i2s_sysclk-.patch @@ -0,0 +1,40 @@ +From e7f3a9d454260acfb0b7c9f92e06658628c5d320 Mon Sep 17 00:00:00 2001 +From: Troy Mitchell +Date: Fri, 17 Jul 2026 00:26:01 -0700 +Subject: [RUYI PATCH] FROMLIST: dt-bindings: soc: spacemit: k3: add + i2s_sysclk, i2s_bclk_factor and i2s1_sysclk_src IDs + +Add three new clock IDs to expose clocks introduced by the topology fix: +- CLK_MPMU_I2S_SYSCLK (51): the common i2s sysclk DDN at MPMU_ISCCR1 +- CLK_MPMU_I2S_BCLK_FACTOR (52): the implicit /2 factor feeding i2s_bclk +- CLK_MPMU_I2S1_SYSCLK_SRC (53): the dedicated i2s1 sysclk source mux + +CLK_MPMU_I2S1_SYSCLK keeps its existing ID (47) but will be repointed to +the real per-instance i2s1 clock in a subsequent patch. No in-tree user +references this ID so the semantic change is contained. + +Fixes: efe897b557e2 ("dt-bindings: soc: spacemit: k3: add clock support") +Signed-off-by: Troy Mitchell +Link: https://lore.kernel.org/r/20260717-k3-clk-fix-i2s-v1-1-e95001a692ee@linux.spacemit.com +Signed-off-by: Han Gao +--- + include/dt-bindings/clock/spacemit,k3-clocks.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/include/dt-bindings/clock/spacemit,k3-clocks.h b/include/dt-bindings/clock/spacemit,k3-clocks.h +index 69978ab0b29f..4f1099f5da1c 100644 +--- a/include/dt-bindings/clock/spacemit,k3-clocks.h ++++ b/include/dt-bindings/clock/spacemit,k3-clocks.h +@@ -145,6 +145,9 @@ + #define CLK_MPMU_I2S3_SYSCLK 48 + #define CLK_MPMU_I2S4_SYSCLK 49 + #define CLK_MPMU_I2S5_SYSCLK 50 ++#define CLK_MPMU_I2S_SYSCLK 51 ++#define CLK_MPMU_I2S_BCLK_FACTOR 52 ++#define CLK_MPMU_I2S1_SYSCLK_SRC 53 + + /* APBC clocks */ + #define CLK_APBC_UART0 0 +-- +2.53.0 + diff --git a/SPECS/linux/0224-FROMLIST-clk-spacemit-k3-fix-i2s-clock-topology.patch b/SPECS/linux/0224-FROMLIST-clk-spacemit-k3-fix-i2s-clock-topology.patch new file mode 100644 index 0000000000..89a6c01de2 --- /dev/null +++ b/SPECS/linux/0224-FROMLIST-clk-spacemit-k3-fix-i2s-clock-topology.patch @@ -0,0 +1,115 @@ +From 75ce305dab9cd4feeeb740270f76cf4c5845650e Mon Sep 17 00:00:00 2001 +From: Troy Mitchell +Date: Fri, 17 Jul 2026 00:26:02 -0700 +Subject: [RUYI PATCH] FROMLIST: clk: spacemit: k3: fix i2s clock topology + +The K3 i2s clocks were modelled as a single path behind one MPMU +register: + + pll1_d96_25p6 / i2s_153p6_base + `-- i2s_sysclk_src (mux+gate, MPMU_ISCCR) + `-- i2s1_sysclk (DDN, MPMU_ISCCR) + |-- i2s_bclk (div+gate, MPMU_ISCCR) + `-- i2s2_sysclk (mux, parent 0) + +The hardware actually has two i2s clock control registers, ISCCR0 +(0x0040) and ISCCR1 (0x0044): ISCCR1 drives the common sysclk shared +by i2s0/2/3/4/5 and the common bclk, whose divider always implies a +fixed 1/2 factor in front, while ISCCR0 drives a dedicated path for +i2s1: + + pll1_d96_25p6 / i2s_153p6_base + |-- i2s_sysclk_src (mux+gate, MPMU_ISCCR1) + | `-- i2s_sysclk (DDN, MPMU_ISCCR1) + | |-- i2s_bclk_factor (fixed factor, /2) + | | `-- i2s_bclk (div+gate, MPMU_ISCCR1) + | `-- i2s2_sysclk (mux, parent 0) + `-- i2s1_sysclk_src (mux+gate, MPMU_ISCCR0) + `-- i2s1_sysclk (DDN, MPMU_ISCCR0) + +Because of this mismatch, i2s_bclk reported twice the real rate, and +the dedicated i2s1 clock path could not be described in DT at all. + +Model the tree as above: split the MPMU_ISCCR register macro into +MPMU_ISCCR0 and MPMU_ISCCR1 to match the hardware register names, +rename the common DDN to i2s_sysclk, insert the fixed 1/2 factor +i2s_bclk_factor in front of i2s_bclk, and add the i2s1_sysclk_src mux +and i2s1_sysclk DDN backed by MPMU_ISCCR0. CLK_MPMU_I2S1_SYSCLK now +refers to the dedicated i2s1 clock; no in-tree user references this +ID, so nothing is affected by the change of meaning. + +Fixes: e371a77255b8 ("clk: spacemit: k3: add the clock tree") +Signed-off-by: Troy Mitchell +Link: https://lore.kernel.org/r/20260717-k3-clk-fix-i2s-v1-2-e95001a692ee@linux.spacemit.com +Signed-off-by: Han Gao +--- + drivers/clk/spacemit/ccu-k3.c | 21 ++++++++++++++++----- + include/soc/spacemit/k3-syscon.h | 3 ++- + 2 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/drivers/clk/spacemit/ccu-k3.c b/drivers/clk/spacemit/ccu-k3.c +index 5d0e31f07d6d..5cb14349358a 100644 +--- a/drivers/clk/spacemit/ccu-k3.c ++++ b/drivers/clk/spacemit/ccu-k3.c +@@ -218,11 +218,19 @@ static const struct clk_parent_data i2s_sysclk_src_parents[] = { + CCU_PARENT_HW(pll1_d96_25p6), + CCU_PARENT_HW(i2s_153p6_base), + }; +-CCU_MUX_GATE_DEFINE(i2s_sysclk_src, i2s_sysclk_src_parents, MPMU_ISCCR, 30, 1, BIT(31), 0); ++CCU_MUX_GATE_DEFINE(i2s_sysclk_src, i2s_sysclk_src_parents, MPMU_ISCCR1, 30, 1, BIT(31), 0); + +-CCU_DDN_DEFINE(i2s1_sysclk, i2s_sysclk_src, MPMU_ISCCR, 0, 15, 15, 12, 1, 0); ++CCU_DDN_DEFINE(i2s_sysclk, i2s_sysclk_src, MPMU_ISCCR1, 0, 15, 15, 12, 1, 0); + +-CCU_DIV_GATE_DEFINE(i2s_bclk, CCU_PARENT_HW(i2s1_sysclk), MPMU_ISCCR, 27, 2, BIT(29), 0); ++CCU_FACTOR_DEFINE(i2s_bclk_factor, CCU_PARENT_HW(i2s_sysclk), 2, 1); ++/* ++ * Divider of i2s_bclk always implies a 1/2 factor, which is ++ * described by i2s_bclk_factor. ++ */ ++CCU_DIV_GATE_DEFINE(i2s_bclk, CCU_PARENT_HW(i2s_bclk_factor), MPMU_ISCCR1, 27, 2, BIT(29), 0); ++ ++CCU_MUX_GATE_DEFINE(i2s1_sysclk_src, i2s_sysclk_src_parents, MPMU_ISCCR0, 30, 1, BIT(31), 0); ++CCU_DDN_DEFINE(i2s1_sysclk, i2s1_sysclk_src, MPMU_ISCCR0, 0, 15, 15, 12, 1, 0); + + static const struct clk_parent_data i2s_sysclk_parents[] = { + CCU_PARENT_HW(pll1_d4_614p4), +@@ -243,7 +251,7 @@ CCU_DDN_DEFINE(i2s4_sysclk_div, i2s4_sysclk_sel, MPMU_I2S4_SYSCLK, 0, 16, 16, 16 + CCU_DDN_DEFINE(i2s5_sysclk_div, i2s5_sysclk_sel, MPMU_I2S5_SYSCLK, 0, 16, 16, 16, 1, 0); + + static const struct clk_parent_data i2s2_sysclk_parents[] = { +- CCU_PARENT_HW(i2s1_sysclk), ++ CCU_PARENT_HW(i2s_sysclk), + CCU_PARENT_HW(i2s2_sysclk_div), + }; + CCU_GATE_DEFINE(i2s0_sysclk, CCU_PARENT_HW(i2s0_sysclk_div), MPMU_I2S_SYSCLK_CTRL, BIT(2), 0); +@@ -1162,8 +1170,11 @@ static struct clk_hw *k3_ccu_mpmu_hws[] = { + [CLK_MPMU_I2S_153P6] = &i2s_153p6.common.hw, + [CLK_MPMU_I2S_153P6_BASE] = &i2s_153p6_base.common.hw, + [CLK_MPMU_I2S_SYSCLK_SRC] = &i2s_sysclk_src.common.hw, +- [CLK_MPMU_I2S1_SYSCLK] = &i2s1_sysclk.common.hw, ++ [CLK_MPMU_I2S_SYSCLK] = &i2s_sysclk.common.hw, ++ [CLK_MPMU_I2S_BCLK_FACTOR] = &i2s_bclk_factor.common.hw, + [CLK_MPMU_I2S_BCLK] = &i2s_bclk.common.hw, ++ [CLK_MPMU_I2S1_SYSCLK_SRC] = &i2s1_sysclk_src.common.hw, ++ [CLK_MPMU_I2S1_SYSCLK] = &i2s1_sysclk.common.hw, + [CLK_MPMU_I2S0_SYSCLK_SEL] = &i2s0_sysclk_sel.common.hw, + [CLK_MPMU_I2S2_SYSCLK_SEL] = &i2s2_sysclk_sel.common.hw, + [CLK_MPMU_I2S3_SYSCLK_SEL] = &i2s3_sysclk_sel.common.hw, +diff --git a/include/soc/spacemit/k3-syscon.h b/include/soc/spacemit/k3-syscon.h +index a68255dd641f..959d8d0786fe 100644 +--- a/include/soc/spacemit/k3-syscon.h ++++ b/include/soc/spacemit/k3-syscon.h +@@ -45,7 +45,8 @@ + #define POSR_PLL7_LOCK BIT(30) + #define POSR_PLL8_LOCK BIT(31) + #define MPMU_SUCCR 0x0014 +-#define MPMU_ISCCR 0x0044 ++#define MPMU_ISCCR0 0x0040 ++#define MPMU_ISCCR1 0x0044 + #define MPMU_WDTPCR 0x0200 + #define MPMU_RIPCCR 0x0210 + #define MPMU_ACGR 0x1024 +-- +2.53.0 + diff --git a/SPECS/linux/0225-FROMLIST-clk-spacemit-k3-fix-missing-2-factor-in-i2s.patch b/SPECS/linux/0225-FROMLIST-clk-spacemit-k3-fix-missing-2-factor-in-i2s.patch new file mode 100644 index 0000000000..c48a6482b4 --- /dev/null +++ b/SPECS/linux/0225-FROMLIST-clk-spacemit-k3-fix-missing-2-factor-in-i2s.patch @@ -0,0 +1,46 @@ +From f61d332adfa09de5f0135735d32ed23756caaf7d Mon Sep 17 00:00:00 2001 +From: Troy Mitchell +Date: Fri, 17 Jul 2026 00:26:03 -0700 +Subject: [RUYI PATCH] FROMLIST: clk: spacemit: k3: fix missing /2 factor in + i2s sysclk dividers + +The i2s{0,2,3,4,5}_sysclk_div DDNs have an additional fixed 1/2 +divider in the hardware IP after the configurable divider, so the +real output rate is: + + rate = parent_rate * num / (den * 2) + +Set pre_div to 2 to account for it. + +Fixes: e371a77255b8 ("clk: spacemit: k3: add the clock tree") +Signed-off-by: Troy Mitchell +Link: https://lore.kernel.org/r/20260717-k3-clk-fix-i2s-v1-3-e95001a692ee@linux.spacemit.com +Signed-off-by: Han Gao +--- + drivers/clk/spacemit/ccu-k3.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/drivers/clk/spacemit/ccu-k3.c b/drivers/clk/spacemit/ccu-k3.c +index 5cb14349358a..972499084d3a 100644 +--- a/drivers/clk/spacemit/ccu-k3.c ++++ b/drivers/clk/spacemit/ccu-k3.c +@@ -244,11 +244,11 @@ CCU_MUX_DEFINE(i2s3_sysclk_sel, i2s_sysclk_parents, MPMU_I2S_SYSCLK_CTRL, 12, 2, + CCU_MUX_DEFINE(i2s4_sysclk_sel, i2s_sysclk_parents, MPMU_I2S_SYSCLK_CTRL, 16, 2, 0); + CCU_MUX_DEFINE(i2s5_sysclk_sel, i2s_sysclk_parents, MPMU_I2S_SYSCLK_CTRL, 20, 2, 0); + +-CCU_DDN_DEFINE(i2s0_sysclk_div, i2s0_sysclk_sel, MPMU_I2S0_SYSCLK, 0, 16, 16, 16, 1, 0); +-CCU_DDN_DEFINE(i2s2_sysclk_div, i2s2_sysclk_sel, MPMU_I2S2_SYSCLK, 0, 16, 16, 16, 1, 0); +-CCU_DDN_DEFINE(i2s3_sysclk_div, i2s3_sysclk_sel, MPMU_I2S3_SYSCLK, 0, 16, 16, 16, 1, 0); +-CCU_DDN_DEFINE(i2s4_sysclk_div, i2s4_sysclk_sel, MPMU_I2S4_SYSCLK, 0, 16, 16, 16, 1, 0); +-CCU_DDN_DEFINE(i2s5_sysclk_div, i2s5_sysclk_sel, MPMU_I2S5_SYSCLK, 0, 16, 16, 16, 1, 0); ++CCU_DDN_DEFINE(i2s0_sysclk_div, i2s0_sysclk_sel, MPMU_I2S0_SYSCLK, 0, 16, 16, 16, 2, 0); ++CCU_DDN_DEFINE(i2s2_sysclk_div, i2s2_sysclk_sel, MPMU_I2S2_SYSCLK, 0, 16, 16, 16, 2, 0); ++CCU_DDN_DEFINE(i2s3_sysclk_div, i2s3_sysclk_sel, MPMU_I2S3_SYSCLK, 0, 16, 16, 16, 2, 0); ++CCU_DDN_DEFINE(i2s4_sysclk_div, i2s4_sysclk_sel, MPMU_I2S4_SYSCLK, 0, 16, 16, 16, 2, 0); ++CCU_DDN_DEFINE(i2s5_sysclk_div, i2s5_sysclk_sel, MPMU_I2S5_SYSCLK, 0, 16, 16, 16, 2, 0); + + static const struct clk_parent_data i2s2_sysclk_parents[] = { + CCU_PARENT_HW(i2s_sysclk), +-- +2.53.0 + diff --git a/SPECS/linux/0226-FROMLIST-riscv-defconfig-enable-RFKILL-and-RFKILL_GP.patch b/SPECS/linux/0226-FROMLIST-riscv-defconfig-enable-RFKILL-and-RFKILL_GP.patch new file mode 100644 index 0000000000..d65b4c0fee --- /dev/null +++ b/SPECS/linux/0226-FROMLIST-riscv-defconfig-enable-RFKILL-and-RFKILL_GP.patch @@ -0,0 +1,32 @@ +From 8557c54a7e4f9eb25e3ada86c4c88e495ad31ac2 Mon Sep 17 00:00:00 2001 +From: Aurelien Jarno +Date: Thu, 16 Jul 2026 23:19:01 +0200 +Subject: [RUYI PATCH] FROMLIST: riscv: defconfig: enable RFKILL and + RFKILL_GPIO + +The SpacemiT K3 Pico-ITX requires RFKILL_GPIO to enable Bluetooth and +WLAN. + +Signed-off-by: Aurelien Jarno +Link: https://lore.kernel.org/r/20260716213314.3027969-2-aurelien@aurel32.net +Signed-off-by: Han Gao +--- + arch/riscv/configs/defconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig +index 9fdc4d1831ed..c3beed5ceae7 100644 +--- a/arch/riscv/configs/defconfig ++++ b/arch/riscv/configs/defconfig +@@ -99,6 +99,8 @@ CONFIG_NET_CLS_CGROUP=m + CONFIG_NETLINK_DIAG=y + CONFIG_CGROUP_NET_PRIO=y + CONFIG_CAN=m ++CONFIG_RFKILL=m ++CONFIG_RFKILL_GPIO=m + CONFIG_NET_9P=y + CONFIG_NET_9P_VIRTIO=y + CONFIG_PCI=y +-- +2.53.0 + diff --git a/SPECS/linux/0227-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-B.patch b/SPECS/linux/0227-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-B.patch new file mode 100644 index 0000000000..ad5ccd4a22 --- /dev/null +++ b/SPECS/linux/0227-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-B.patch @@ -0,0 +1,40 @@ +From 69ea6d4a407286fa41b54cc1a541a7a02f4a3f44 Mon Sep 17 00:00:00 2001 +From: Aurelien Jarno +Date: Thu, 16 Jul 2026 23:19:02 +0200 +Subject: [RUYI PATCH] FROMLIST: riscv: dts: spacemit: k3: add rfkill node for + Bluetooth on Pico-ITX board + +On the K3 PICO-ITX board, by default the GPIO pin that connects to the +RTL8852BE Bluetooth enable signal is driven low, resulting in +impossibility to use Bluetooth. Add a DT node to expose it as an RFKILL +device, which lets the Bluetooth driver or userspace toggle it as +required. + +Signed-off-by: Aurelien Jarno +Link: https://lore.kernel.org/r/20260716213314.3027969-3-aurelien@aurel32.net +Signed-off-by: Han Gao +--- + arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +index 7327eb65593c..df6b6201ecc2 100644 +--- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts ++++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +@@ -43,6 +43,13 @@ reg_aux_vcc5v: regulator-aux-vcc5v { + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; ++ ++ rfkill-usb-bt { ++ compatible = "rfkill-gpio"; ++ label = "rfkill-usb-bt"; ++ radio-type = "bluetooth"; ++ shutdown-gpios = <&gpio 0 30 GPIO_ACTIVE_HIGH>; ++ }; + }; + + &i2c2 { +-- +2.53.0 + diff --git a/SPECS/linux/0228-FROMLIST-riscv-dts-spacemit-k3-add-USB3-B-and-C-cont.patch b/SPECS/linux/0228-FROMLIST-riscv-dts-spacemit-k3-add-USB3-B-and-C-cont.patch new file mode 100644 index 0000000000..d6370c062f --- /dev/null +++ b/SPECS/linux/0228-FROMLIST-riscv-dts-spacemit-k3-add-USB3-B-and-C-cont.patch @@ -0,0 +1,131 @@ +From 7741a6b666f312640fa04303bc789a842334667c Mon Sep 17 00:00:00 2001 +From: Aurelien Jarno +Date: Thu, 16 Jul 2026 23:19:03 +0200 +Subject: [RUYI PATCH] FROMLIST: riscv: dts: spacemit: k3: add USB3 B and C + controllers for Pico-ITX board + +The SpacemiT K3 has 4 USB3 controllers labelled A to D. + +On the K3 Pico-ITX board, the controllers B and C are used in USB 2 mode +only respectively for the M.2 B-Key slot and for the RTL8852BE Bluetooth +controller. + +Add the two controller nodes and the two corresponding USB2 PHY nodes +(the PCIe/USB3 combo PHY driver is not yet merged) and enable them on +the K3 Pico-ITX board. + +Signed-off-by: Aurelien Jarno +Link: https://lore.kernel.org/r/20260716213314.3027969-4-aurelien@aurel32.net +Signed-off-by: Han Gao +--- + arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 18 ++++++ + arch/riscv/boot/dts/spacemit/k3.dtsi | 64 ++++++++++++++++++++ + 2 files changed, 82 insertions(+) + +diff --git a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +index df6b6201ecc2..e60d57b0891b 100644 +--- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts ++++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +@@ -369,6 +369,24 @@ &usb2_phy { + status = "okay"; + }; + ++&usb3b { ++ maximum-speed = "high-speed"; ++ status = "okay"; ++}; ++ ++&usb3b_u2phy { ++ status = "okay"; ++}; ++ ++&usb3c { ++ maximum-speed = "high-speed"; ++ status = "okay"; ++}; ++ ++&usb3c_u2phy { ++ status = "okay"; ++}; ++ + &usb3d_u2phy { + status = "okay"; + }; +diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi +index d7beabc88d86..ab3d71282da0 100644 +--- a/arch/riscv/boot/dts/spacemit/k3.dtsi ++++ b/arch/riscv/boot/dts/spacemit/k3.dtsi +@@ -634,6 +634,70 @@ pcie4_port: pcie@0 { + }; + }; + ++ usb3b: usb@81400000 { ++ compatible = "spacemit,k3-dwc3"; ++ reg = <0x0 0x81400000 0x0 0x10000>; ++ interrupts = <125 IRQ_TYPE_LEVEL_HIGH>; ++ interrupt-parent = <&saplic>; ++ clocks = <&syscon_apmu CLK_APMU_USB3_PORTB_BUS>; ++ clock-names = "usbdrd30"; ++ resets = <&syscon_apmu RESET_APMU_USB3_B_AHB>, ++ <&syscon_apmu RESET_APMU_USB3_B_VCC>, ++ <&syscon_apmu RESET_APMU_USB3_B_PHY>; ++ reset-names = "ahb", "vcc", "phy"; ++ phys = <&usb3b_u2phy>; ++ phy-names = "usb2-phy"; ++ phy_type = "utmi"; ++ snps,dis_enblslpm_quirk; ++ snps,dis_u2_susphy_quirk; ++ snps,dis_u3_susphy_quirk; ++ snps,dis-del-phy-power-chg-quirk; ++ snps,dis-tx-ipgap-linecheck-quirk; ++ snps,parkmode-disable-ss-quirk; ++ dr_mode = "host"; ++ status = "disabled"; ++ }; ++ ++ usb3b_u2phy: phy@81500000 { ++ compatible = "spacemit,k3-usb2-phy"; ++ reg = <0x0 0x81500000 0x0 0x200>; ++ clocks = <&syscon_apmu CLK_APMU_USB3_PORTB_BUS>; ++ #phy-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ usb3c: usb@81700000 { ++ compatible = "spacemit,k3-dwc3"; ++ reg = <0x0 0x81700000 0x0 0x10000>; ++ interrupts = <148 IRQ_TYPE_LEVEL_HIGH>; ++ interrupt-parent = <&saplic>; ++ clocks = <&syscon_apmu CLK_APMU_USB3_PORTC_BUS>; ++ clock-names = "usbdrd30"; ++ resets = <&syscon_apmu RESET_APMU_USB3_C_AHB>, ++ <&syscon_apmu RESET_APMU_USB3_C_VCC>, ++ <&syscon_apmu RESET_APMU_USB3_C_PHY>; ++ reset-names = "ahb", "vcc", "phy"; ++ phys = <&usb3c_u2phy>; ++ phy-names = "usb2-phy"; ++ phy_type = "utmi"; ++ snps,dis_enblslpm_quirk; ++ snps,dis_u2_susphy_quirk; ++ snps,dis_u3_susphy_quirk; ++ snps,dis-del-phy-power-chg-quirk; ++ snps,dis-tx-ipgap-linecheck-quirk; ++ snps,parkmode-disable-ss-quirk; ++ dr_mode = "host"; ++ status = "disabled"; ++ }; ++ ++ usb3c_u2phy: phy@81800000 { ++ compatible = "spacemit,k3-usb2-phy"; ++ reg = <0x0 0x81800000 0x0 0x200>; ++ clocks = <&syscon_apmu CLK_APMU_USB3_PORTC_BUS>; ++ #phy-cells = <0>; ++ status = "disabled"; ++ }; ++ + usb3d: usb@81a00000 { + compatible = "spacemit,k3-dwc3"; + reg = <0x0 0x81a00000 0x0 0x10000>; +-- +2.53.0 + diff --git a/SPECS/linux/0229-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-W.patch b/SPECS/linux/0229-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-W.patch new file mode 100644 index 0000000000..e381561c03 --- /dev/null +++ b/SPECS/linux/0229-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-W.patch @@ -0,0 +1,39 @@ +From f2027308ebf09c1313801b03a5fd078697df6593 Mon Sep 17 00:00:00 2001 +From: Aurelien Jarno +Date: Thu, 16 Jul 2026 23:19:04 +0200 +Subject: [RUYI PATCH] FROMLIST: riscv: dts: spacemit: k3: add rfkill node for + WLAN on Pico-ITX board + +By default the GPIO pin that connects to the RTL8852BE WLAN enable +signal is driven low, resulting in impossibility to connect to any +network. Add a DT node to expose it as an RFKILL device, which lets the +WiFi driver or userspace toggle it as required. + +Signed-off-by: Aurelien Jarno +Link: https://lore.kernel.org/r/20260716213314.3027969-5-aurelien@aurel32.net +Signed-off-by: Han Gao +--- + arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +index e60d57b0891b..9dd60d1acb34 100644 +--- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts ++++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +@@ -44,6 +44,13 @@ reg_aux_vcc5v: regulator-aux-vcc5v { + regulator-always-on; + }; + ++ rfkill-pcie-wlan { ++ compatible = "rfkill-gpio"; ++ label = "rfkill-pcie-wlan"; ++ radio-type = "wlan"; ++ shutdown-gpios = <&gpio 1 3 GPIO_ACTIVE_HIGH>; ++ }; ++ + rfkill-usb-bt { + compatible = "rfkill-gpio"; + label = "rfkill-usb-bt"; +-- +2.53.0 + diff --git a/SPECS/linux/0230-FROMLIST-riscv-require-vmemmap-for-NUMA-balancing.patch b/SPECS/linux/0230-FROMLIST-riscv-require-vmemmap-for-NUMA-balancing.patch new file mode 100644 index 0000000000..216dbb240f --- /dev/null +++ b/SPECS/linux/0230-FROMLIST-riscv-require-vmemmap-for-NUMA-balancing.patch @@ -0,0 +1,46 @@ +From 7d2ac412c932b5dc5e75a75c87dc71b35af73c13 Mon Sep 17 00:00:00 2001 +From: Jia Wang +Date: Thu, 16 Jul 2026 14:47:10 +0800 +Subject: [RUYI PATCH] FROMLIST: riscv: require vmemmap for NUMA balancing + +RISC-V randconfig can enable NUMA balancing while selecting +SPARSEMEM_EXTREME without SPARSEMEM_VMEMMAP. In that layout, the +section and node fields can consume enough page flag bits that +LAST_CPUPID cannot fit in page->flags. + +The generic MM code then stores last_cpupid in struct page and emits +the "Unfortunate NUMA and NUMA Balancing config" warning from +mm/memory.c. + +NUMA balancing needs LAST_CPUPID storage, but this fallback grows +struct page for a configuration that randconfig can select +accidentally. Keep NUMA support available, but advertise RISC-V NUMA +balancing support only when SPARSEMEM_VMEMMAP is enabled, where the +page flag layout leaves room for LAST_CPUPID. + +This was originally seen with a RISC-V randconfig generated from +KCONFIG_SEED=550012. + +Signed-off-by: Jia Wang +Link: https://lore.kernel.org/r/20260716-numa_kconfig-v1-1-b0cd6d29accb@ultrarisc.com +Signed-off-by: Han Gao +--- + arch/riscv/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig +index 278e6157611a..ab610e340c9e 100644 +--- a/arch/riscv/Kconfig ++++ b/arch/riscv/Kconfig +@@ -484,7 +484,7 @@ endchoice + config NUMA + bool "NUMA Memory Allocation and Scheduler Support" + depends on SMP && MMU +- select ARCH_SUPPORTS_NUMA_BALANCING ++ select ARCH_SUPPORTS_NUMA_BALANCING if SPARSEMEM_VMEMMAP + select GENERIC_ARCH_NUMA + select HAVE_SETUP_PER_CPU_AREA + select NEED_PER_CPU_EMBED_FIRST_CHUNK +-- +2.53.0 + diff --git a/SPECS/linux/0231-FROMLIST-riscv-time-Add-missing-__iomem-in-get_cycle.patch b/SPECS/linux/0231-FROMLIST-riscv-time-Add-missing-__iomem-in-get_cycle.patch new file mode 100644 index 0000000000..efca372b4d --- /dev/null +++ b/SPECS/linux/0231-FROMLIST-riscv-time-Add-missing-__iomem-in-get_cycle.patch @@ -0,0 +1,43 @@ +From 581e5dd0f435f5e66e34b2dcbe513f99b37afe08 Mon Sep 17 00:00:00 2001 +From: Nam Cao +Date: Thu, 16 Jul 2026 07:33:19 +0200 +Subject: [RUYI PATCH] FROMLIST: riscv: time: Add missing __iomem in + get_cycles() and get_cycles_hi() + +__iomem is missing while calling readl_relaxed() in get_cycles() and +get_cycles_hi() and sparse complains. + +Add __iomem to silence the sparse warnings. + +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202607160619.14G8GHp5-lkp@intel.com/ +Signed-off-by: Nam Cao +Link: https://lore.kernel.org/r/20260716053319.2178937-1-namcao@linutronix.de +Signed-off-by: Han Gao +--- + arch/riscv/include/asm/timex.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h +index a06697846e69..d41acfb3959d 100644 +--- a/arch/riscv/include/asm/timex.h ++++ b/arch/riscv/include/asm/timex.h +@@ -22,13 +22,13 @@ static inline cycles_t get_cycles(void) + #else /* !CONFIG_64BIT */ + static inline u32 get_cycles(void) + { +- return readl_relaxed(((u32 *)clint_time_val)); ++ return readl_relaxed(((u32 __iomem *)clint_time_val)); + } + #define get_cycles get_cycles + + static inline u32 get_cycles_hi(void) + { +- return readl_relaxed(((u32 *)clint_time_val) + 1); ++ return readl_relaxed(((u32 __iomem *)clint_time_val) + 1); + } + #define get_cycles_hi get_cycles_hi + #endif /* CONFIG_64BIT */ +-- +2.53.0 + diff --git a/SPECS/linux/0231-RUYI-PCI-add-SpacemiT-vendor-id-and-its-K3-device-id.patch b/SPECS/linux/0231-RUYI-PCI-add-SpacemiT-vendor-id-and-its-K3-device-id.patch deleted file mode 100644 index 56ca7acd30..0000000000 --- a/SPECS/linux/0231-RUYI-PCI-add-SpacemiT-vendor-id-and-its-K3-device-id.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 9db2433c565b076643f8198d1e2b8be60c05a9bb Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng -Date: Wed, 20 May 2026 23:28:15 +0800 -Subject: [RUYI PATCH] RUYI: PCI: add SpacemiT vendor id and its K3 device id - to pci_ids - -The SpacemiT K3 chip's root complex needs to be listed in the allowlist -of rtw89 driver to allow 36-bit DMA. - -Add the vendor and device IDs to pci_ids.h header file. - -Signed-off-by: Icenowy Zheng -Signed-off-by: Han Gao ---- - include/linux/pci_ids.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h -index 1c848bd40de4..cf03ccdf8ff0 100644 ---- a/include/linux/pci_ids.h -+++ b/include/linux/pci_ids.h -@@ -2642,6 +2642,9 @@ - #define PCI_VENDOR_ID_SUNIX 0x1fd4 - #define PCI_DEVICE_ID_SUNIX_1999 0x1999 - -+#define PCI_VENDOR_ID_SPACEMIT 0x201f -+#define PCI_DEVICE_ID_SPACEMIT_K3 0x0002 -+ - #define PCI_VENDOR_ID_HINT 0x3388 - #define PCI_DEVICE_ID_HINT_VXPROII_IDE 0x8013 - --- -2.53.0 - diff --git a/SPECS/linux/0232-FROMLIST-PCI-Move-Spacemit-vendor-and-device-IDs-to-.patch b/SPECS/linux/0232-FROMLIST-PCI-Move-Spacemit-vendor-and-device-IDs-to-.patch new file mode 100644 index 0000000000..50ce6af64a --- /dev/null +++ b/SPECS/linux/0232-FROMLIST-PCI-Move-Spacemit-vendor-and-device-IDs-to-.patch @@ -0,0 +1,54 @@ +From 29ea628fa2de088e773cbfba1cef237cd7489385 Mon Sep 17 00:00:00 2001 +From: Anirudh Srinivasan +Date: Thu, 16 Jul 2026 18:05:10 -0500 +Subject: [RUYI PATCH] FROMLIST: PCI: Move Spacemit vendor and device IDs to + linux/pci_ids.h + +Move the vendor and device ID for the existing Spacemit K1 PCIe Root +Complex to include/linux/pci_ids.h. Also add K3's Root Complex device ID +to this header. This is done so that these values can be referenced in +the rtw89 driver to enable 36-bit DMA ability in it for WiFi to function +on the K3 Pico ITX board. + +Acked-by: Bjorn Helgaas +Signed-off-by: Anirudh Srinivasan +Link: https://lore.kernel.org/r/20260716-rtw89-spacemit-k3-v2-1-392b577ebf75@oss.tenstorrent.com +Signed-off-by: Han Gao +--- + drivers/pci/controller/dwc/pcie-spacemit-k1.c | 4 ---- + include/linux/pci_ids.h | 4 ++++ + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/pci/controller/dwc/pcie-spacemit-k1.c b/drivers/pci/controller/dwc/pcie-spacemit-k1.c +index 7502d66bd0d0..bf2ab5cb59ce 100644 +--- a/drivers/pci/controller/dwc/pcie-spacemit-k1.c ++++ b/drivers/pci/controller/dwc/pcie-spacemit-k1.c +@@ -21,10 +21,6 @@ + + #include "pcie-designware.h" + +-#define PCI_VENDOR_ID_SPACEMIT 0x201f +-#define PCI_DEVICE_ID_SPACEMIT_K1 0x0001 +-#define PCI_DEVICE_ID_SPACEMIT_K3 0x0002 +- + /* Offsets and field definitions for link management registers */ + #define K1_PHY_AHB_IRQ_EN 0x0000 + #define PCIE_INTERRUPT_EN BIT(0) +diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h +index 1c848bd40de4..161daf96a27f 100644 +--- a/include/linux/pci_ids.h ++++ b/include/linux/pci_ids.h +@@ -2642,6 +2642,10 @@ + #define PCI_VENDOR_ID_SUNIX 0x1fd4 + #define PCI_DEVICE_ID_SUNIX_1999 0x1999 + ++#define PCI_VENDOR_ID_SPACEMIT 0x201f ++#define PCI_DEVICE_ID_SPACEMIT_K1 0x0001 ++#define PCI_DEVICE_ID_SPACEMIT_K3 0x0002 ++ + #define PCI_VENDOR_ID_HINT 0x3388 + #define PCI_DEVICE_ID_HINT_VXPROII_IDE 0x8013 + +-- +2.53.0 + diff --git a/SPECS/linux/0232-RUYI-wifi-rtw89-pci-add-SpacemiT-K3-to-36-bit-DMA-al.patch b/SPECS/linux/0232-RUYI-wifi-rtw89-pci-add-SpacemiT-K3-to-36-bit-DMA-al.patch deleted file mode 100644 index fe025e6bf1..0000000000 --- a/SPECS/linux/0232-RUYI-wifi-rtw89-pci-add-SpacemiT-K3-to-36-bit-DMA-al.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cfc2f19d92126f0e47d14fdebc7f76be089756e7 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng -Date: Wed, 20 May 2026 23:29:46 +0800 -Subject: [RUYI PATCH] RUYI: wifi: rtw89: pci: add SpacemiT K3 to 36-bit DMA - allowlist - -The SpacemiT K3 platform has no system memory in the 32-bit address -space, and it's verified that the chip works well with 36-bit DMA of -RTL8852BE. - -Add it to the 36-bit DMA allowlist of rtw89_pci. - -Signed-off-by: Icenowy Zheng -Signed-off-by: Han Gao ---- - drivers/net/wireless/realtek/rtw89/pci.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c -index 43c61b3dc969..6470d09f17f3 100644 ---- a/drivers/net/wireless/realtek/rtw89/pci.c -+++ b/drivers/net/wireless/realtek/rtw89/pci.c -@@ -3312,6 +3312,10 @@ static bool rtw89_pci_is_dac_compatible_bridge(struct rtw89_dev *rtwdev) - if (bridge->device == 0x2806) - return true; - break; -+ case PCI_VENDOR_ID_SPACEMIT: -+ if (bridge->device == PCI_DEVICE_ID_SPACEMIT_K3) -+ return true; -+ break; - } - - return false; --- -2.53.0 - diff --git a/SPECS/linux/0233-FROMLIST-wifi-rtw89-pci-enable-36-bit-DMA-on-spacemi.patch b/SPECS/linux/0233-FROMLIST-wifi-rtw89-pci-enable-36-bit-DMA-on-spacemi.patch new file mode 100644 index 0000000000..b2bc303c29 --- /dev/null +++ b/SPECS/linux/0233-FROMLIST-wifi-rtw89-pci-enable-36-bit-DMA-on-spacemi.patch @@ -0,0 +1,39 @@ +From e8194c4e195085975f1d3124161fee6536e53f2d Mon Sep 17 00:00:00 2001 +From: Anirudh Srinivasan +Date: Thu, 16 Jul 2026 18:05:11 -0500 +Subject: [RUYI PATCH] FROMLIST: wifi: rtw89: pci: enable 36-bit DMA on + spacemit K3 + +The Spacemit K3 Pico ITX Board has a RTL8852BE pcie card behind a PCIe +root port, but the SoC doesn't have any 32 bit DMA addreseses which the +rtw89 seems to use by default. Enable 36 bit DMA ability that the driver +has when this particular root port is detected so that the driver can +probe on this SoC. + +Tested-by: Aurelien Jarno +Acked-by: Ping-Ke Shih +Signed-off-by: Anirudh Srinivasan +Link: https://lore.kernel.org/r/20260716-rtw89-spacemit-k3-v2-2-392b577ebf75@oss.tenstorrent.com +Signed-off-by: Han Gao +--- + drivers/net/wireless/realtek/rtw89/pci.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c +index 43c61b3dc969..6470d09f17f3 100644 +--- a/drivers/net/wireless/realtek/rtw89/pci.c ++++ b/drivers/net/wireless/realtek/rtw89/pci.c +@@ -3312,6 +3312,10 @@ static bool rtw89_pci_is_dac_compatible_bridge(struct rtw89_dev *rtwdev) + if (bridge->device == 0x2806) + return true; + break; ++ case PCI_VENDOR_ID_SPACEMIT: ++ if (bridge->device == PCI_DEVICE_ID_SPACEMIT_K3) ++ return true; ++ break; + } + + return false; +-- +2.53.0 + diff --git a/SPECS/linux/0234-FROMLIST-riscv-cmpxchg-Use-.option-arch-for-Zacas-an.patch b/SPECS/linux/0234-FROMLIST-riscv-cmpxchg-Use-.option-arch-for-Zacas-an.patch new file mode 100644 index 0000000000..0682fa06a7 --- /dev/null +++ b/SPECS/linux/0234-FROMLIST-riscv-cmpxchg-Use-.option-arch-for-Zacas-an.patch @@ -0,0 +1,97 @@ +From 615961e762585cfd8044598a7b95ee0fb87cbee9 Mon Sep 17 00:00:00 2001 +From: Vivian Wang +Date: Fri, 17 Jul 2026 20:40:06 +0800 +Subject: [RUYI PATCH] FROMLIST: riscv: cmpxchg: Use .option arch for Zacas and + Zabha + +Instead of adding these to -march globally, use .option arch to use +instructions from these extensions only in code paths where we know they +are available, like how it is done for most other extensions. +TOOLCHAIN_HAS_{ZACAS,ZABHA} already depend on AS_HAS_OPTION_ARCH, so +this is not a functionality regression even on older assemblers. + +Although the compiler is unlikely to generate atomics on its own accord, +this aligns handling of Zacas and Zabha with most other extensions and +improves consistency on how assembly code requiring extra extensions is +written in kernel code. + +This is analogous to the use of __LSE_PREAMBLE or .arch_extension lse in +arm64 code. + +Signed-off-by: Vivian Wang +Link: https://lore.kernel.org/r/20260717-riscv-no-zacas-zabha-in-march-v1-1-82b5b0799fb6@iscas.ac.cn +Signed-off-by: Han Gao +--- + arch/riscv/Makefile | 6 ------ + arch/riscv/include/asm/cmpxchg.h | 14 +++++++++++++- + 2 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile +index 729a46ac2b0d..3592f9788da3 100644 +--- a/arch/riscv/Makefile ++++ b/arch/riscv/Makefile +@@ -83,12 +83,6 @@ else + riscv-march-$(CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI) := $(riscv-march-y)_zicsr_zifencei + endif + +-# Check if the toolchain supports Zacas +-riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZACAS) := $(riscv-march-y)_zacas +- +-# Check if the toolchain supports Zabha +-riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZABHA) := $(riscv-march-y)_zabha +- + KBUILD_BASE_ISA = -march=$(shell echo $(riscv-march-y) | sed -E 's/(rv32ima|rv64ima)fd([^v_]*)v?/\1\2/') + export KBUILD_BASE_ISA + +diff --git a/arch/riscv/include/asm/cmpxchg.h b/arch/riscv/include/asm/cmpxchg.h +index 8712cf9c69dc..662e160b0522 100644 +--- a/arch/riscv/include/asm/cmpxchg.h ++++ b/arch/riscv/include/asm/cmpxchg.h +@@ -23,7 +23,10 @@ + riscv_has_extension_unlikely(RISCV_ISA_EXT_ZABHA)) { \ + __asm__ __volatile__ ( \ + prepend \ ++ " .option push\n" \ ++ " .option arch, +zabha\n" \ + " amoswap" swap_sfx " %0, %z2, %1\n" \ ++ " .option pop\n" \ + swap_append \ + : "=&r" (r), "+A" (*(p)) \ + : "rJ" (n) \ +@@ -141,7 +144,10 @@ + \ + __asm__ __volatile__ ( \ + cas_prepend \ ++ " .option push\n" \ ++ " .option arch, +zacas, +zabha\n" \ + " amocas" cas_sfx " %0, %z2, %1\n" \ ++ " .option pop\n" \ + cas_append \ + : "+&r" (r), "+A" (*(p)) \ + : "rJ" (n) \ +@@ -188,7 +194,10 @@ + \ + __asm__ __volatile__ ( \ + cas_prepend \ ++ " .option push\n" \ ++ " .option arch, +zacas\n" \ + " amocas" cas_sfx " %0, %z2, %1\n" \ ++ " .option pop\n" \ + cas_append \ + : "+&r" (r), "+A" (*(p)) \ + : "rJ" (n) \ +@@ -340,7 +349,10 @@ union __u128_halves { + register unsigned long t4 asm ("t4") = __ho.high; \ + \ + __asm__ __volatile__ ( \ +- " amocas.q" cas_sfx " %0, %z3, %2" \ ++ " .option push\n" \ ++ " .option arch, +zacas\n" \ ++ " amocas.q" cas_sfx " %0, %z3, %2\n" \ ++ " .option pop\n" \ + : "+&r" (t3), "+&r" (t4), "+A" (*(p)) \ + : "rJ" (t1), "rJ" (t2) \ + : "memory"); \ +-- +2.53.0 + diff --git a/SPECS/linux/0222-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch b/SPECS/linux/0235-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch similarity index 96% rename from SPECS/linux/0222-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch rename to SPECS/linux/0235-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch index a4f0cb7fd8..949c8c3242 100644 --- a/SPECS/linux/0222-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch +++ b/SPECS/linux/0235-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch @@ -1,4 +1,4 @@ -From 172d565a909c7f9de0e7cd44a0fb74e5da2800fc Mon Sep 17 00:00:00 2001 +From 5056575e47391bbde1719f5e23aa984ddf737fc7 Mon Sep 17 00:00:00 2001 From: Han Gao Date: Mon, 24 Nov 2025 20:38:44 +0800 Subject: [RUYI PATCH] XUANTIE: riscv: dts: th1520: add licheepi4a 16g support diff --git a/SPECS/linux/0223-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch b/SPECS/linux/0236-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch similarity index 93% rename from SPECS/linux/0223-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch rename to SPECS/linux/0236-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch index 4929c0273f..8c27a93ba5 100644 --- a/SPECS/linux/0223-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch +++ b/SPECS/linux/0236-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch @@ -1,4 +1,4 @@ -From 25dc034d12eea80915dd7ea05d8665dd5727340c Mon Sep 17 00:00:00 2001 +From d2f75f9cb1f06bd44856eb994cc0c6b876a56462 Mon Sep 17 00:00:00 2001 From: Han Gao Date: Wed, 14 May 2025 08:16:15 +0800 Subject: [RUYI PATCH] REVYOS: riscv: dts: th1520: rename thead to xuantie diff --git a/SPECS/linux/0224-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch b/SPECS/linux/0237-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch similarity index 95% rename from SPECS/linux/0224-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch rename to SPECS/linux/0237-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch index 75fdf6325e..33c2ed3f7d 100644 --- a/SPECS/linux/0224-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch +++ b/SPECS/linux/0237-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch @@ -1,4 +1,4 @@ -From 269061b8fa1269cfe4858d99e8d2a97da1b8d977 Mon Sep 17 00:00:00 2001 +From 874fa875248483d09322a0149a488285412874bb Mon Sep 17 00:00:00 2001 From: Han Gao Date: Wed, 14 May 2025 08:27:18 +0800 Subject: [RUYI PATCH] REVYOS: riscv: dts: th1520: add xuantie,th1520-mbox-r diff --git a/SPECS/linux/0225-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch b/SPECS/linux/0238-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch similarity index 96% rename from SPECS/linux/0225-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch rename to SPECS/linux/0238-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch index 3b9824d902..877fec3c16 100644 --- a/SPECS/linux/0225-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch +++ b/SPECS/linux/0238-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch @@ -1,4 +1,4 @@ -From 530f04b36983760977c7db646c7da14bd8279b87 Mon Sep 17 00:00:00 2001 +From 67d12c7d2dc10d4ecf413832f31e4e6f6832fe08 Mon Sep 17 00:00:00 2001 From: Inochi Amaoto Date: Sun, 19 Nov 2023 21:13:31 +0800 Subject: [RUYI PATCH] SOPHGO: dt-bindings: nvmem: Add SG2044 eFuse controller diff --git a/SPECS/linux/0226-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch b/SPECS/linux/0239-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch similarity index 99% rename from SPECS/linux/0226-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch rename to SPECS/linux/0239-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch index 2554a4abf3..e61a1eebdd 100644 --- a/SPECS/linux/0226-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch +++ b/SPECS/linux/0239-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch @@ -1,4 +1,4 @@ -From ace95ae04352ca7e4460100232f8235444caddcc Mon Sep 17 00:00:00 2001 +From 53b8180f49035a42cc8db3d3b9861745a1669720 Mon Sep 17 00:00:00 2001 From: Inochi Amaoto Date: Sun, 19 Nov 2023 21:13:32 +0800 Subject: [RUYI PATCH] SOPHGO: nvmem: Add Sophgo SG2044 eFuse driver diff --git a/SPECS/linux/0227-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch b/SPECS/linux/0240-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch similarity index 96% rename from SPECS/linux/0227-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch rename to SPECS/linux/0240-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch index 8d750e236b..a4b9b61974 100644 --- a/SPECS/linux/0227-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch +++ b/SPECS/linux/0240-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch @@ -1,4 +1,4 @@ -From efcbe0aca57342d25314c622476250884d24634f Mon Sep 17 00:00:00 2001 +From c235df2165f1b2ce719152769fb045b0bfeb3161 Mon Sep 17 00:00:00 2001 From: Inochi Amaoto Date: Thu, 5 Dec 2024 13:24:13 +0800 Subject: [RUYI PATCH] SOPHGO: riscv: dts: sophgo: sg2044: Add eFUSE device diff --git a/SPECS/linux/0228-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch b/SPECS/linux/0241-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch similarity index 94% rename from SPECS/linux/0228-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch rename to SPECS/linux/0241-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch index 27c4599bf0..d16782a61e 100644 --- a/SPECS/linux/0228-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch +++ b/SPECS/linux/0241-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch @@ -1,4 +1,4 @@ -From 3b8d0a824db29843e19f152a14077545e3e0689f Mon Sep 17 00:00:00 2001 +From 37ddcf4d80286b1ed394bc17390d606672ada6f2 Mon Sep 17 00:00:00 2001 From: Xiaoguang Xing Date: Mon, 22 Jan 2024 10:31:30 +0800 Subject: [RUYI PATCH] SOPHGO: riscv: sg2042: errata: Replace thead cache clean diff --git a/SPECS/linux/0229-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch b/SPECS/linux/0242-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch similarity index 98% rename from SPECS/linux/0229-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch rename to SPECS/linux/0242-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch index de5f5065ad..ea969e8442 100644 --- a/SPECS/linux/0229-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch +++ b/SPECS/linux/0242-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch @@ -1,4 +1,4 @@ -From 31f970b4f87d869a8215b44d2a467b7f26764944 Mon Sep 17 00:00:00 2001 +From 5c7f00c25bc95b108907109670a8ae2a354c9614 Mon Sep 17 00:00:00 2001 From: Han Gao Date: Sun, 28 Dec 2025 23:02:15 +0800 Subject: [RUYI PATCH] SOPHGO: dts: sg2044: Modify pcie bar address diff --git a/SPECS/linux/0230-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch b/SPECS/linux/0243-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch similarity index 98% rename from SPECS/linux/0230-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch rename to SPECS/linux/0243-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch index 2b00279c71..cad0b417f9 100644 --- a/SPECS/linux/0230-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch +++ b/SPECS/linux/0243-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch @@ -1,4 +1,4 @@ -From d110b4d033b92bbb2bbe3a231a424b70455d5b87 Mon Sep 17 00:00:00 2001 +From ff8cd2a2c485a5770abf9b70824a7fd188343163 Mon Sep 17 00:00:00 2001 From: Zhang Meng Date: Mon, 5 Jan 2026 20:05:04 +0800 Subject: [RUYI PATCH] SPACEMIT: riscv: uaccess: don't use vector if buffer is diff --git a/SPECS/linux/0233-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch b/SPECS/linux/0244-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch similarity index 96% rename from SPECS/linux/0233-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch rename to SPECS/linux/0244-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch index e1b42d152c..9f564c7f7e 100644 --- a/SPECS/linux/0233-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch +++ b/SPECS/linux/0244-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch @@ -1,4 +1,4 @@ -From d77d93170ffebc8346aa47cce6959aab1860c854 Mon Sep 17 00:00:00 2001 +From dcca751285dd40b040fcd44ebe7c52ac173cfa41 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Tue, 19 May 2026 19:57:52 +0800 Subject: [RUYI PATCH] RUYI: drm/amdgpu: disable dynamic PCIe speed switch on diff --git a/SPECS/linux/0234-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch b/SPECS/linux/0245-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch similarity index 97% rename from SPECS/linux/0234-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch rename to SPECS/linux/0245-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch index 06db7a2398..4387458656 100644 --- a/SPECS/linux/0234-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch +++ b/SPECS/linux/0245-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch @@ -1,4 +1,4 @@ -From 52558a18a8e361f925bdf98c50be907e7192ef3f Mon Sep 17 00:00:00 2001 +From 8cf67e37c7c3e2c09c10613b915b4121a7cbca06 Mon Sep 17 00:00:00 2001 From: Vivian Wang Date: Thu, 28 May 2026 14:18:23 +0800 Subject: [RUYI PATCH] RUYI: mmc: sdhci-of-dwcmshc: Add support for SG2042 FPGA diff --git a/SPECS/linux/0235-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch b/SPECS/linux/0246-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch similarity index 94% rename from SPECS/linux/0235-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch rename to SPECS/linux/0246-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch index aa0a0093fe..ce5ba588ff 100644 --- a/SPECS/linux/0235-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch +++ b/SPECS/linux/0246-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch @@ -1,4 +1,4 @@ -From 9049063e935587f7c78d9501dedf99405384d116 Mon Sep 17 00:00:00 2001 +From 6477daddbe719e7db83611bfbba0c1ca397acce2 Mon Sep 17 00:00:00 2001 From: Hangfan Li Date: Fri, 3 Jul 2026 17:29:21 +0800 Subject: [RUYI PATCH] RUYI: riscv: dts: sophgo: sg2044: srd3: add spifmc node diff --git a/SPECS/linux/0247-RUYI-HACK-riscv-entry-nmi_exit-before-die.patch b/SPECS/linux/0247-RUYI-HACK-riscv-entry-nmi_exit-before-die.patch new file mode 100644 index 0000000000..0ad3e404b9 --- /dev/null +++ b/SPECS/linux/0247-RUYI-HACK-riscv-entry-nmi_exit-before-die.patch @@ -0,0 +1,45 @@ +From e2d6be015eae6ca7e1a0ccba58e7909ed4ade592 Mon Sep 17 00:00:00 2001 +From: Vivian Wang +Date: Tue, 7 Jul 2026 09:35:50 +0800 +Subject: [RUYI PATCH] RUYI: HACK: riscv: entry: nmi_exit() before die() + +Breakpoint exceptions are handled in_nmi() since they could be kernel +breakpoints. As such, nmi_exit() before die() to give the kernel a +chance to recover instead of having make_task_dead() generate a +full-machine panic. + +This is similar to how some exceptions are handled in powerpc. + +This is a bit of a hack. A better solution was being discussed [1] but +no concrete conclusion has been arrived to yet. + +Link: https://lore.kernel.org/linux-riscv/20230702025708.784106-1-guoren@kernel.org/ # [1] +Signed-off-by: Vivian Wang +Signed-off-by: Han Gao +--- + arch/riscv/kernel/traps.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c +index 8c62c771a656..034882134234 100644 +--- a/arch/riscv/kernel/traps.c ++++ b/arch/riscv/kernel/traps.c +@@ -296,10 +296,13 @@ void handle_break(struct pt_regs *regs) + return; + #endif + else if (report_bug(regs->epc, regs) == BUG_TRAP_TYPE_WARN || +- handle_cfi_failure(regs) == BUG_TRAP_TYPE_WARN) ++ handle_cfi_failure(regs) == BUG_TRAP_TYPE_WARN) { + regs->epc += get_break_insn_length(regs->epc); +- else ++ } else { ++ /* Avoid a panic, since we're in_nmi(). */ ++ nmi_exit(); + die(regs, "Kernel BUG"); ++ } + } + + asmlinkage __visible __trap_section void do_trap_break(struct pt_regs *regs) +-- +2.53.0 + diff --git a/SPECS/linux/series b/SPECS/linux/series index afb83956eb..63964bcfdf 100644 --- a/SPECS/linux/series +++ b/SPECS/linux/series @@ -219,17 +219,29 @@ 0219-FROMLIST-Failed-to-reinit-phy-of-spacemit-dwmac-when.patch 0220-FROMLIST-riscv-mm-Make-mark_new_valid_map-stuff-depe.patch 0221-FROMLIST-mm-sparse-vmemmap-flush_cache_vmap-after-ho.patch -0222-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch -0223-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch -0224-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch -0225-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch -0226-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch -0227-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch -0228-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch -0229-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch -0230-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch -0231-RUYI-PCI-add-SpacemiT-vendor-id-and-its-K3-device-id.patch -0232-RUYI-wifi-rtw89-pci-add-SpacemiT-K3-to-36-bit-DMA-al.patch -0233-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch -0234-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch -0235-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch +0222-FROMLIST-riscv-mm-Move-dma_contiguous_reserve-after-.patch +0223-FROMLIST-dt-bindings-soc-spacemit-k3-add-i2s_sysclk-.patch +0224-FROMLIST-clk-spacemit-k3-fix-i2s-clock-topology.patch +0225-FROMLIST-clk-spacemit-k3-fix-missing-2-factor-in-i2s.patch +0226-FROMLIST-riscv-defconfig-enable-RFKILL-and-RFKILL_GP.patch +0227-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-B.patch +0228-FROMLIST-riscv-dts-spacemit-k3-add-USB3-B-and-C-cont.patch +0229-FROMLIST-riscv-dts-spacemit-k3-add-rfkill-node-for-W.patch +0230-FROMLIST-riscv-require-vmemmap-for-NUMA-balancing.patch +0231-FROMLIST-riscv-time-Add-missing-__iomem-in-get_cycle.patch +0232-FROMLIST-PCI-Move-Spacemit-vendor-and-device-IDs-to-.patch +0233-FROMLIST-wifi-rtw89-pci-enable-36-bit-DMA-on-spacemi.patch +0234-FROMLIST-riscv-cmpxchg-Use-.option-arch-for-Zacas-an.patch +0235-XUANTIE-riscv-dts-th1520-add-licheepi4a-16g-support.patch +0236-REVYOS-riscv-dts-th1520-rename-thead-to-xuantie.patch +0237-REVYOS-riscv-dts-th1520-add-xuantie-th1520-mbox-r.patch +0238-SOPHGO-dt-bindings-nvmem-Add-SG2044-eFuse-controller.patch +0239-SOPHGO-nvmem-Add-Sophgo-SG2044-eFuse-driver.patch +0240-SOPHGO-riscv-dts-sophgo-sg2044-Add-eFUSE-device.patch +0241-SOPHGO-riscv-sg2042-errata-Replace-thead-cache-clean.patch +0242-SOPHGO-dts-sg2044-Modify-pcie-bar-address.patch +0243-SPACEMIT-riscv-uaccess-don-t-use-vector-if-buffer-is.patch +0244-RUYI-drm-amdgpu-disable-dynamic-PCIe-speed-switch-on.patch +0245-RUYI-mmc-sdhci-of-dwcmshc-Add-support-for-SG2042-FPG.patch +0246-RUYI-riscv-dts-sophgo-sg2044-srd3-add-spifmc-node.patch +0247-RUYI-HACK-riscv-entry-nmi_exit-before-die.patch