mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Documentation: devicetree: list automatic boot argument fixups
@ 2023-03-17 11:07 Johannes Zink
  2023-03-17 11:15 ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Zink @ 2023-03-17 11:07 UTC (permalink / raw)
  To: barebox; +Cc: Johannes Zink, afa, jzi

Barebox automatically fixes up several entries to the root and
chosen-node of the devicetree passed to the booted system.

These entries contain information about the hardware, reset source
and the barebox version string.

Add documentation on how to query these information from the booted
linux system.

Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
---
 Documentation/devicetree/index.rst | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/Documentation/devicetree/index.rst b/Documentation/devicetree/index.rst
index 36fa69058d1d..92a91dc35a11 100644
--- a/Documentation/devicetree/index.rst
+++ b/Documentation/devicetree/index.rst
@@ -151,3 +151,24 @@ Contents:
    bindings/regulator/*
    bindings/rtc/*
    bindings/watchdog/*
+
+automatic boot argument fixups to the devicetree
+------------------------------------------------
+
+Barebox automatically fixes up some arguments in the devicetree.
+
+In the devicetree root barebox fixes up
+
+ * serial-number (if available)
+ * machine compatible (if available)
+
+In the ``chosen``-node barebox fixes up
+
+ * barebox-version
+ * reset-source
+ * reset-source-instance (if available)
+ * reset-source-device (phandle, only if available)
+ * bootsource
+ * boot-hartid (only on RISCV)
+
+These values can be read from the booted linux system in ``/proc/device-tree/``.
-- 
2.30.2




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

* Re: [PATCH] Documentation: devicetree: list automatic boot argument fixups
  2023-03-17 11:07 [PATCH] Documentation: devicetree: list automatic boot argument fixups Johannes Zink
@ 2023-03-17 11:15 ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2023-03-17 11:15 UTC (permalink / raw)
  To: Johannes Zink, barebox; +Cc: afa, jzi

Hello Johannes,

Thanks for documenting this. Some minor suggestions below.

On 17.03.23 12:07, Johannes Zink wrote:
> Barebox automatically fixes up several entries to the root and

s/entries/properties/

> chosen-node of the devicetree passed to the booted system.

chosen node, device tree

> 
> These entries contain information about the hardware, reset source
> and the barebox version string.
> 
> Add documentation on how to query these information from the booted
> linux system.
> 
> Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
> ---
>  Documentation/devicetree/index.rst | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/Documentation/devicetree/index.rst b/Documentation/devicetree/index.rst
> index 36fa69058d1d..92a91dc35a11 100644
> --- a/Documentation/devicetree/index.rst
> +++ b/Documentation/devicetree/index.rst
> @@ -151,3 +151,24 @@ Contents:
>     bindings/regulator/*
>     bindings/rtc/*
>     bindings/watchdog/*
> +
> +automatic boot argument fixups to the devicetree

Title case or at least a capital letter at the beginning?

> +------------------------------------------------
> +
> +Barebox automatically fixes up some arguments in the devicetree.

s/Barebox/barebox/, s/devicetree/device tree/, s/arguments/properties/
or information.

> +
> +In the devicetree root barebox fixes up

, barebox

> +
> + * serial-number (if available)
> + * machine compatible (if available)

s/available/overridden/
There's nearly always a machine compatible.

> +
> +In the ``chosen``-node barebox fixes up

, barebox

> +
> + * barebox-version
> + * reset-source
> + * reset-source-instance (if available)
> + * reset-source-device (phandle, only if available)

node path, not the numeric phandle, compare

 property = &path -> "/path/to/something"

vs.

 property = <&path> -> <0x23>, with &path { phandle = <0x23>; }

> + * bootsource
> + * boot-hartid (only on RISCV)

RISC-V

> +
> +These values can be read from the booted linux system in ``/proc/device-tree/`

"or /sys/firmware/devicetree/base".


Thanks,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

end of thread, other threads:[~2023-03-17 11:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 11:07 [PATCH] Documentation: devicetree: list automatic boot argument fixups Johannes Zink
2023-03-17 11:15 ` Ahmad Fatoum

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