diff mbox series

[1/2] dt-bindings: arm: bcm2835: Specify /system/linux,revision property

Message ID 20240708-raspi-revision-v1-1-66e7e403e0b5@gmx.net
State Changes Requested
Headers show
Series ARM: Expose Raspberry Pi revision code in /proc/cpuinfo | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 18 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

J. Neuschäfer July 7, 2024, 11:08 p.m. UTC
The Raspberry Pi bootloader provides a revision code[0] in the
devicetree, at /system/linux,revision. This patch adds
/system/linux,revision to the schema to allow it to be used in
mainline Linux.

[0]: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#new-style-revision-codes
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
 Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml | 12 ++++++++++++
 1 file changed, 12 insertions(+)


--
2.43.0

Comments

Krzysztof Kozlowski July 8, 2024, 2:13 p.m. UTC | #1
On 08/07/2024 01:08, Jonathan Neuschäfer wrote:
> The Raspberry Pi bootloader provides a revision code[0] in the
> devicetree, at /system/linux,revision. This patch adds
> /system/linux,revision to the schema to allow it to be used in
> mainline Linux.

Sorry, no, we do not document stuff for various out of tree things.
Otherwise we would have to accept hundreds of ridiculous, vendor properties.

Fix your bootloader or make it upstream.

Best regards,
Krzysztof
J. Neuschäfer July 9, 2024, 7:52 p.m. UTC | #2
On Mon, Jul 08, 2024 at 04:13:10PM +0200, Krzysztof Kozlowski wrote:
> On 08/07/2024 01:08, Jonathan Neuschäfer wrote:
> > The Raspberry Pi bootloader provides a revision code[0] in the
> > devicetree, at /system/linux,revision. This patch adds
> > /system/linux,revision to the schema to allow it to be used in
> > mainline Linux.
>
> Sorry, no, we do not document stuff for various out of tree things.
> Otherwise we would have to accept hundreds of ridiculous, vendor properties.

Fair enough.

> Fix your bootloader or make it upstream.

There is no open source upstream for this bootloader. It is (sadly)
Broadcom's own proprietary code.

Not sure what fixing it would entail.


Jonathan
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
index 162a39dab21823..c6abf818b5ea57 100644
--- a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
+++ b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
@@ -54,6 +54,18 @@  properties:
               - raspberrypi,model-zero-2-w
           - const: brcm,bcm2837

+  system:
+    type: object
+    additionalProperties: true
+    properties:
+
+      linux,revision:
+        $ref: /schemas/types.yaml#/definitions/string-array
+        description:
+          The "system revision" number, as determined by the bootloader.
+          https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#new-style-revision-codes
+
+
 additionalProperties: true

 ...