* [PATCH master 1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2
@ 2026-10-15 8:48 Ahmad Fatoum
2026-10-15 8:48 ` [PATCH master 2/3] ARM: rpi: look up emmc2bus by alias for dma-ranges fixup Ahmad Fatoum
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2026-10-15 8:48 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
From: Ahmad Fatoum <a.fatoum@barebox.org>
Linux commit 5a16e131ddba ("arm64: dts: rockchip: Fix the common
combophy + SATA on QNAP TSx33 devices"), imported with the v7.0-rc1
dts sync, moved the combphy0 enablement out of the shared
rk3568-qnap-tsx33.dtsi into the TS-233/TS-433 board files and swapped
which SATA controller is enabled where: the dtsi now enables sata2
(+ combphy2) and the boards enable sata1.
Enable combphy0 like upstream now does for the TS-433 and move the
SATA override to sata2, restoring the pre-sync state of the DT.
Fixes: fe223ba39321 ("dts: update to v7.0-rc1")
Assisted-by: Claude:opus-5.5
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
arch/arm/dts/rk3568-qnap-ts433eu.dts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/rk3568-qnap-ts433eu.dts b/arch/arm/dts/rk3568-qnap-ts433eu.dts
index be0455abfe65..ea98b6819db8 100644
--- a/arch/arm/dts/rk3568-qnap-ts433eu.dts
+++ b/arch/arm/dts/rk3568-qnap-ts433eu.dts
@@ -27,6 +27,11 @@ vcc3v3_pcie: regulator-vcc3v3-pcie {
};
};
+/* Connected to usb_host0_xhci */
+&combphy0 {
+ status = "okay";
+};
+
&combphy2 {
status = "okay";
};
@@ -94,7 +99,7 @@ &pcie3x2 {
};
/* Internal SATA controllers not used, ASM1064 used instead */
-&sata1 {
+&sata2 {
status = "disabled";
};
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH master 2/3] ARM: rpi: look up emmc2bus by alias for dma-ranges fixup
2026-10-15 8:48 [PATCH master 1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2 Ahmad Fatoum
@ 2026-10-15 8:48 ` Ahmad Fatoum
2026-10-15 8:48 ` [PATCH master 3/3] of: base: use default bus match table when populating /firmware Ahmad Fatoum
2026-10-15 11:36 ` [PATCH master 1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2 Sascha Hauer
2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2026-10-15 8:48 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
From: Ahmad Fatoum <a.fatoum@barebox.org>
The VideoCore firmware patches the dma-ranges of the eMMC2 bus to match
the BCM2711 stepping (B0 vs. C0). It finds the node via the emmc2bus
alias. Commit 3f9788433919 ("raspi: add a fixup for the `dma-ranges`
property of the `/emmc2bus` dt node") propagates that value into the
DT passed to the OS, but it looks the node up by the hardcoded path
/emmc2bus in the VideoCore DT and then creates/overwrites the node at
the same path in the DT being fixed up.
Linux commit 929dc5b3e06c ("ARM: dts: broadcom: bcm2711: Fix
'simple-bus' node names"), which came in with commit fe223ba39321
("dts: update to v7.0-rc1"), renamed /emmc2bus to /emmc2-bus@fe000000.
Since then, booting with barebox' internal DT and a firmware DT that
still uses the old name (any DT older than Linux v7.0) adds a stray
/emmc2bus node holding the dma-ranges, while the real bus keeps the
hardcoded B0 ranges.
Look up the node via the emmc2bus alias in both trees like the firmware
does, so the fixup works irrespective of the node name, and don't create
the node in the target DT if the alias is missing.
Fixes: 3f9788433919 ("raspi: add a fixup for the `dma-ranges` property of the `/emmc2bus` dt node")
Fixes: fe223ba39321 ("dts: update to v7.0-rc1")
Assisted-by: Claude:opus-5.5
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
arch/arm/boards/raspberry-pi/rpi-common.c | 31 ++++++++++++++++++-----
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index fe0b11efad68..e0a4438d54e0 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -61,8 +61,9 @@ struct rpi_priv {
};
struct rpi_property_fixup_data {
- const struct device_node* vc_node;
- const char *propname;
+ const struct device_node* vc_node;
+ const char *propname;
+ const char *alias;
};
static void rpi_set_usbethaddr(void)
@@ -314,9 +315,23 @@ static int rpi_vc_fdt_fixup_property(struct device_node *root, void *data)
struct device_node *node;
struct property *prop;
- node = of_create_node(root, fixup->vc_node->full_name);
- if (!node)
- return -ENOMEM;
+ if (fixup->alias) {
+ /*
+ * The node name need not be the same in the VideoCore FDT
+ * and in the DT we fix up (e.g. /emmc2bus was renamed to
+ * /emmc2-bus@fe000000 in Linux v7.0), so look it up via
+ * the alias like the firmware does and don't create it.
+ */
+ node = of_find_node_by_alias(root, fixup->alias);
+ if (!node) {
+ pr_debug("no '%s' alias found in fdt\n", fixup->alias);
+ return 0;
+ }
+ } else {
+ node = of_create_node(root, fixup->vc_node->full_name);
+ if (!node)
+ return -ENOMEM;
+ }
prop = of_find_property(fixup->vc_node, fixup->propname, NULL);
if (!prop)
@@ -332,13 +347,15 @@ static int register_vc_property_fixup(struct device_node *root,
struct device_node *node, *tmp;
struct rpi_property_fixup_data* fixup_data;
- node = of_find_node_by_path_from(root, path);
+ node = of_find_node_by_path_or_alias(root, path);
if (node) {
tmp = of_dup(node);
tmp->full_name = xstrdup(node->full_name);
fixup_data = xzalloc(sizeof(*fixup_data));
fixup_data->vc_node = tmp;
fixup_data->propname = xstrdup(propname);
+ if (*path != '/')
+ fixup_data->alias = xstrdup(path);
of_register_fixup(rpi_vc_fdt_fixup_property, fixup_data);
} else {
@@ -377,7 +394,7 @@ static void rpi_vc_fdt_parse(struct device_node *root)
register_vc_property_fixup(root, "/reserved-memory/nvram@0", "reg");
register_vc_property_fixup(root, "/reserved-memory/nvram@0", "status");
register_vc_fixup(root, "/hat");
- register_vc_property_fixup(root, "/emmc2bus", "dma-ranges");
+ register_vc_property_fixup(root, "emmc2bus", "dma-ranges");
register_vc_fixup(root, "/chosen/bootloader");
chosen = register_vc_fixup(root, "/chosen");
if (!chosen) {
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH master 3/3] of: base: use default bus match table when populating /firmware
2026-10-15 8:48 [PATCH master 1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2 Ahmad Fatoum
2026-10-15 8:48 ` [PATCH master 2/3] ARM: rpi: look up emmc2bus by alias for dma-ranges fixup Ahmad Fatoum
@ 2026-10-15 8:48 ` Ahmad Fatoum
2026-10-15 11:36 ` [PATCH master 1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2 Sascha Hauer
2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2026-10-15 8:48 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
From: Ahmad Fatoum <a.fatoum@barebox.org>
This is an adoption of the corresponding Linux commit:
| commit 48e6a9c4a20870e09f85ff1a3628275d6bce31c0
| Author: Rob Herring (Arm) <robh@kernel.org>
| AuthorDate: Tue Jan 13 19:51:58 2026 -0600
|
| of: platform: Use default match table for /firmware
|
| Calling of_platform_populate() without a match table will only populate
| the immediate child nodes under /firmware. This is usually fine, but in
| the case of something like a "simple-mfd" node such as
| "raspberrypi,bcm2835-firmware", those child nodes will not be populated.
| And subsequent calls won't work either because the /firmware node is
| marked as processed already.
|
| Switch the call to of_platform_default_populate() to solve this problem.
| It should be a nop for existing cases.
|
| Fixes: 3aa0582fdb82 ("of: platform: populate /firmware/ node from of_platform_default_populate_init()")
| Cc: stable@vger.kernel.org
| Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
| Link: https://patch.msgid.link/20260114015158.692170-2-robh@kernel.org
| Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This change becomes necessary with the dts sync to Linux v7.1-rc1 in
commit 9eb4ad3c0b8c ("dts: update to v7.1-rc1"), which pulled in Linux
commits:
- 5e3bfd609ffd ("ARM: dts: broadcom: bcm2835-rpi: Move non simple-bus nodes
to root level")
- 0acb1de2b4df ("arm64: dts: broadcom: bcm2712: Move non simple-bus nodes to
root level").
On all Raspberry Pi device trees the "raspberrypi,bcm2835-firmware", "simple-mfd"
node moved from /soc/firmware (below a simple-bus, populated recursively) to
/firmware/rpi-firmware. Its clocks, power, gpio and reset children are
no longer populated.
Fixes: cb667b97c663 ("of: populate "/firmware" while populating device tree")
Assisted-by: Claude:opus-5.5
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
drivers/of/base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 194888359345..81aa69391692 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -3034,7 +3034,7 @@ int of_probe(void)
node = of_find_node_by_path("/firmware");
if (node)
- of_platform_populate(node, NULL, NULL);
+ of_platform_populate(node, of_default_bus_match_table, NULL);
of_platform_populate(root_node, of_default_bus_match_table, NULL);
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH master 1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2
2026-10-15 8:48 [PATCH master 1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2 Ahmad Fatoum
2026-10-15 8:48 ` [PATCH master 2/3] ARM: rpi: look up emmc2bus by alias for dma-ranges fixup Ahmad Fatoum
2026-10-15 8:48 ` [PATCH master 3/3] of: base: use default bus match table when populating /firmware Ahmad Fatoum
@ 2026-10-15 11:36 ` Sascha Hauer
2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2026-10-15 11:36 UTC (permalink / raw)
To: barebox, Ahmad Fatoum; +Cc: Ahmad Fatoum
On Thu, 15 Oct 2026 10:48:29 +0200, Ahmad Fatoum wrote:
> Linux commit 5a16e131ddba ("arm64: dts: rockchip: Fix the common
> combophy + SATA on QNAP TSx33 devices"), imported with the v7.0-rc1
> dts sync, moved the combphy0 enablement out of the shared
> rk3568-qnap-tsx33.dtsi into the TS-233/TS-433 board files and swapped
> which SATA controller is enabled where: the dtsi now enables sata2
> (+ combphy2) and the boards enable sata1.
>
> [...]
Applied, thanks!
[1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2
https://git.pengutronix.de/cgit/barebox/commit/?id=1f05d0099888 (link may not be stable)
[2/3] ARM: rpi: look up emmc2bus by alias for dma-ranges fixup
https://git.pengutronix.de/cgit/barebox/commit/?id=a52cbcc6f3f7 (link may not be stable)
[3/3] of: base: use default bus match table when populating /firmware
https://git.pengutronix.de/cgit/barebox/commit/?id=a26873daa824 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-15 11:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15 8:48 [PATCH master 1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2 Ahmad Fatoum
2026-10-15 8:48 ` [PATCH master 2/3] ARM: rpi: look up emmc2bus by alias for dma-ranges fixup Ahmad Fatoum
2026-10-15 8:48 ` [PATCH master 3/3] of: base: use default bus match table when populating /firmware Ahmad Fatoum
2026-10-15 11:36 ` [PATCH master 1/3] ARM: rockchip: rk3568-qnap-ts433eu: re-enable combphy0, disable sata2 Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox