[openwrt/openwrt] realtek: add NAND hardware description to RTL93xx
LEDE Commits
lede-commits at lists.infradead.org
Wed Jul 30 14:22:29 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9b5d0550769cb16a892febef472082fb22b4441b
commit 9b5d0550769cb16a892febef472082fb22b4441b
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Mon Jul 28 10:16:24 2025 -0400
realtek: add NAND hardware description to RTL93xx
Include the NAND specs into the DTS. It is unclear which devices
really need it. Keep it disabled for now. As the SoC register area
is defined too small until now, increase the size to an appropriate
value.
If enabled one can see the following log messages (e.g. Linksys
LGS328C or LGS352C).
[ 1.206600] spi-nand spi1.0: Macronix SPI NAND was found.
[ 1.212795] spi-nand spi1.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[ 1.222217] 3 fixed-partitions partitions found on MTD device spi1.0
[ 1.229466] OF: Bad cell count for /soc/spi at 1a400/flash at 0/partitions
[ 1.236617] OF: Bad cell count for /soc/spi at 1a400/flash at 0/partitions
[ 1.244164] Creating 3 MTD partitions on "spi1.0":
[ 1.249620] 0x000000000000-0x000004000000 : "ubifs"
[ 1.423593] 0x000004000000-0x000005e00000 : "firmware"
[ 1.738268] mtdsplit_uimage: no uImage found in "firmware"
[ 1.744577] 0x000005e00000-0x000007c00000 : "runtime2"
Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19583
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
target/linux/realtek/dts/rtl930x.dtsi | 14 +++++++++++++-
target/linux/realtek/dts/rtl931x.dtsi | 14 +++++++++++++-
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/target/linux/realtek/dts/rtl930x.dtsi b/target/linux/realtek/dts/rtl930x.dtsi
index 947f0d9be5..31fe3ffd8b 100644
--- a/target/linux/realtek/dts/rtl930x.dtsi
+++ b/target/linux/realtek/dts/rtl930x.dtsi
@@ -59,7 +59,7 @@
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
- ranges = <0x0 0x18000000 0x10000>;
+ ranges = <0x0 0x18000000 0x20000>;
intc: interrupt-controller at 3000 {
compatible = "realtek,rtl9300-intc", "realtek,rtl-intc";
@@ -71,6 +71,18 @@
interrupts = <2>, <3>, <4>, <5>, <6>, <7>;
};
+ snand: spi at 1a400 {
+ compatible = "realtek,rtl9301-snand";
+ reg = <0x1a400 0x44>;
+ interrupt-parent = <&intc>;
+ interrupts = <19 2>;
+ clocks = <&lx_clk>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
spi0: spi at 1200 {
compatible = "realtek,rtl8380-spi";
reg = <0x1200 0x100>;
diff --git a/target/linux/realtek/dts/rtl931x.dtsi b/target/linux/realtek/dts/rtl931x.dtsi
index df85112464..86634d6c16 100644
--- a/target/linux/realtek/dts/rtl931x.dtsi
+++ b/target/linux/realtek/dts/rtl931x.dtsi
@@ -95,7 +95,7 @@
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
- ranges = <0x0 0x18000000 0x10000>;
+ ranges = <0x0 0x18000000 0x20000>;
spi0: spi at 1200 {
status = "okay";
@@ -107,6 +107,18 @@
#size-cells = <0>;
};
+ snand: spi at 1a400 {
+ compatible = "realtek,rtl9301-snand";
+ reg = <0x1a400 0x44>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SHARED 37 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&lx_clk>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+ };
+
watchdog0: watchdog at 3260 {
compatible = "realtek,rtl9310-wdt";
reg = <0x3260 0xc>;
More information about the lede-commits
mailing list