* [PATCH] arm64: dts: mediatek: Fix malformed SRAM ranges property
@ 2026-10-28 13:45 airjinkela
0 siblings, 0 replies; only message in thread
From: airjinkela @ 2026-10-28 13:45 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno
Cc: linux-mediatek, linux-arm-kernel, devicetree, linux-kernel,
Frank Wunderlich, Sjoerd Simons, StarField Xu
From: StarField Xu <airjinkela@gmail.com>
The eth_sram nodes on MT7981, MT7986 and MT7988 sit under the soc
simple-bus, which provides #address-cells = <2> and #size-cells = <2>,
while the SRAM nodes themselves declare single-cell addressing:
#address-cells = <1>;
#size-cells = <1>;
A ranges entry is therefore sliced by the OF core as 1 + 2 + 1 cells:
child-bus-address (1 cell, from the SRAM node #address-cells)
parent-bus-address (2 cells, from the parent bus #address-cells)
length (1 cell, from the SRAM node #size-cells)
The existing values place the parent address in the wrong position, so
the 64-bit parent base is decoded as 0x1540000000000000 instead of
0x15400000. dtc and dtbs_check stay silent because the total cell count
still matches na + pna + ns, and the sram driver only translates child
addresses, which currently do not exist on any of these nodes.
This is a latent bug: adding a pool or export sub-partition, or any
other child with a reg property, makes sram_reserve_regions() fail with
reserved block ... outside the sram area
and the driver probe aborts. Fix the ranges tuple for all three SoCs so
that the mapping actually resolves to the SRAM window.
Fixes: 65f0e3970143 ("arm64: dts: mediatek: mt7988: add basic ethernet-nodes")
Fixes: d0c970091abf ("arm64: dts: mediatek: mt7986: add sram node")
Fixes: 9846a8c60318 ("arm64: dts: mediatek: mt7981b: Add Ethernet and WiFi offload support")
Signed-off-by: StarField Xu <airjinkela@gmail.com>
---
arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 2 +-
arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 2 +-
arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
index e63ba3ae395e9..2718c7dd7eb60 100644
--- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
@@ -492,7 +492,7 @@ int_gbe_phy: ethernet-phy@0 {
eth_sram: sram@15140000 {
compatible = "mmio-sram";
reg = <0 0x15140000 0 0x40000>;
- ranges = <0 0x15140000 0 0x40000>;
+ ranges = <0 0x0 0x15140000 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
};
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
index 318639a7c64e9..98fd74824653d 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -579,7 +579,7 @@ eth_sram: sram@15140000 {
reg = <0 0x15140000 0 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
- ranges = <0 0x15140000 0 0x40000>;
+ ranges = <0 0x0 0x15140000 0x40000>;
};
wo_ccif0: syscon@151a5000 {
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 8c9a5aba25791..d497ac826d669 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -1009,7 +1009,7 @@ eth_sram: sram@15400000 {
reg = <0 0x15400000 0 0x200000>;
#address-cells = <1>;
#size-cells = <1>;
- ranges = <0 0x15400000 0 0x200000>;
+ ranges = <0 0x0 0x15400000 0x200000>;
};
};
--
2.56.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-28 13:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 13:45 [PATCH] arm64: dts: mediatek: Fix malformed SRAM ranges property airjinkela
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®