mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] of: base: add new barebox,status property
@ 2026-01-21 11:31 Ahmad Fatoum
  2026-01-21 11:31 ` [PATCH 2/2] arm: dts: rk356x: rock3a: disable pcie3x2 Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Ahmad Fatoum @ 2026-01-21 11:31 UTC (permalink / raw)
  To: barebox; +Cc: mfe, Ahmad Fatoum

I am confronted with an occasional hang on the Radxa Rock 3A during
PCI probe. The board has no PCI devices connected.

This hang doesn't happen in Linux and doesn't happen on the QNAP
TS433-eU, which is also RK3568, but actually has PCIe devices, which are
probed normally.

For such purposes, add a barebox,status property as setting the status
to disabled, would impact Linux as well if barebox were to pass along
its own device tree, e.g. when installing the UEFI device tree
configuration table.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
  - rework to make clearer when to use the new property. (Marco)
  - add example with UEFI device tree configuration table into commit
    message (Marco)
---
 .../devicetree/bindings/barebox/barebox,status.rst | 14 ++++++++++++++
 drivers/of/base.c                                  |  4 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/barebox/barebox,status.rst

diff --git a/Documentation/devicetree/bindings/barebox/barebox,status.rst b/Documentation/devicetree/bindings/barebox/barebox,status.rst
new file mode 100644
index 000000000000..03f484cdcfe1
--- /dev/null
+++ b/Documentation/devicetree/bindings/barebox/barebox,status.rst
@@ -0,0 +1,14 @@
+barebox,status property
+=======================
+
+barebox interprets ``barebox,status`` the same as it does ``status``,
+but gives the barebox-specific property precedence if both exist.
+
+The purpose of this property is to keep the ``status`` property of the
+upstream DT, imported from Linux, untouched.
+
+Using ``barebox,status`` may be necessary to temporarily workaround
+barebox drivers that misbehave on a given board; Disabling the driver
+may be undesirable if it can handle other instances of the same device
+on the board or if barebox is being built to support other boards
+at the same time, where the driver functions correctly.
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 54fd458bd9a1..4e83a757a4e9 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -2149,7 +2149,9 @@ int of_device_is_available(const struct device_node *device)
 	const char *status;
 	int statlen;
 
-	status = of_get_property(device, "status", &statlen);
+	status = of_get_property(device, "barebox,status", &statlen);
+	if (status == NULL)
+		status = of_get_property(device, "status", &statlen);
 	if (status == NULL)
 		return 1;
 
-- 
2.47.3




^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 1/2] of: base: add new barebox,status property
@ 2026-01-20 18:13 Ahmad Fatoum
  2026-01-20 18:13 ` [PATCH 2/2] arm: dts: rk356x: rock3a: disable pcie3x2 Ahmad Fatoum
  0 siblings, 1 reply; 12+ messages in thread
From: Ahmad Fatoum @ 2026-01-20 18:13 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

I am confronted with an occasional hang on the Radxa Rock 3A during
PCI probe. The board has no PCI devices connected.

This hang doesn't happen in Linux and doesn't happen on the QNAP
TS433-eU, which is also RK3568, but actually has PCIe devices, which are
probed normally.

For such purposes, add a barebox,status property as setting the status
to disabled, would impact Linux as well if barebox were to pass along
its own device tree.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../devicetree/bindings/barebox/barebox,status.rst        | 8 ++++++++
 drivers/of/base.c                                         | 4 +++-
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/barebox/barebox,status.rst

diff --git a/Documentation/devicetree/bindings/barebox/barebox,status.rst b/Documentation/devicetree/bindings/barebox/barebox,status.rst
new file mode 100644
index 000000000000..06524b218fb1
--- /dev/null
+++ b/Documentation/devicetree/bindings/barebox/barebox,status.rst
@@ -0,0 +1,8 @@
+barebox,status property
+=======================
+
+barebox interprets ``barebox,status`` the same as it does ``status``,
+but gives the former precedence if both exist.
+
+Use this property only for devices for which barebox has a driver, but
+that barebox should not be probing on a per-board basis.
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 54fd458bd9a1..4e83a757a4e9 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -2149,7 +2149,9 @@ int of_device_is_available(const struct device_node *device)
 	const char *status;
 	int statlen;
 
-	status = of_get_property(device, "status", &statlen);
+	status = of_get_property(device, "barebox,status", &statlen);
+	if (status == NULL)
+		status = of_get_property(device, "status", &statlen);
 	if (status == NULL)
 		return 1;
 
-- 
2.47.3




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-01-21 12:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-21 11:31 [PATCH 1/2] of: base: add new barebox,status property Ahmad Fatoum
2026-01-21 11:31 ` [PATCH 2/2] arm: dts: rk356x: rock3a: disable pcie3x2 Ahmad Fatoum
2026-01-21 12:00   ` Marco Felsch
2026-01-21 11:33 ` [PATCH 1/2] of: base: add new barebox,status property Ahmad Fatoum
2026-01-21 11:59 ` Marco Felsch
  -- strict thread matches above, loose matches on Subject: below --
2026-01-20 18:13 Ahmad Fatoum
2026-01-20 18:13 ` [PATCH 2/2] arm: dts: rk356x: rock3a: disable pcie3x2 Ahmad Fatoum
2026-01-21  0:07   ` Marco Felsch
2026-01-21  7:52     ` Ahmad Fatoum
2026-01-21  9:16       ` Marco Felsch
2026-01-21  9:41         ` Ahmad Fatoum
2026-01-21 10:15           ` Marco Felsch
2026-01-21 11:02             ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox