.../bindings/soc/bcm/raspberrypi,bcm2835-power.txt | 47 ---------------------- .../soc/bcm/raspberrypi,bcm2835-power.yaml | 42 +++++++++++++++++++ 2 files changed, 42 insertions(+), 47 deletions(-)
Convert the raspberrypi,bcm2835-power binding to Dt schema
Signed-off-by: Karan Sanghavi <karansanghvi98@gmail.com>
---
.../bindings/soc/bcm/raspberrypi,bcm2835-power.txt | 47 ----------------------
.../soc/bcm/raspberrypi,bcm2835-power.yaml | 42 +++++++++++++++++++
2 files changed, 42 insertions(+), 47 deletions(-)
diff --git a/Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.txt b/Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.txt
deleted file mode 100644
index 30942cf7992b..000000000000
--- a/Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-Raspberry Pi power domain driver
-
-Required properties:
-
-- compatible: Should be "raspberrypi,bcm2835-power".
-- firmware: Reference to the RPi firmware device node.
-- #power-domain-cells: Should be <1>, we providing multiple power domains.
-
-The valid defines for power domain are:
-
- RPI_POWER_DOMAIN_I2C0
- RPI_POWER_DOMAIN_I2C1
- RPI_POWER_DOMAIN_I2C2
- RPI_POWER_DOMAIN_VIDEO_SCALER
- RPI_POWER_DOMAIN_VPU1
- RPI_POWER_DOMAIN_HDMI
- RPI_POWER_DOMAIN_USB
- RPI_POWER_DOMAIN_VEC
- RPI_POWER_DOMAIN_JPEG
- RPI_POWER_DOMAIN_H264
- RPI_POWER_DOMAIN_V3D
- RPI_POWER_DOMAIN_ISP
- RPI_POWER_DOMAIN_UNICAM0
- RPI_POWER_DOMAIN_UNICAM1
- RPI_POWER_DOMAIN_CCP2RX
- RPI_POWER_DOMAIN_CSI2
- RPI_POWER_DOMAIN_CPI
- RPI_POWER_DOMAIN_DSI0
- RPI_POWER_DOMAIN_DSI1
- RPI_POWER_DOMAIN_TRANSPOSER
- RPI_POWER_DOMAIN_CCP2TX
- RPI_POWER_DOMAIN_CDP
- RPI_POWER_DOMAIN_ARM
-
-Example:
-
-power: power {
- compatible = "raspberrypi,bcm2835-power";
- firmware = <&firmware>;
- #power-domain-cells = <1>;
-};
-
-Example for using power domain:
-
-&usb {
- power-domains = <&power RPI_POWER_DOMAIN_USB>;
-};
diff --git a/Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.yaml b/Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.yaml
new file mode 100644
index 000000000000..bab6d7dea8a5
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/bcm/raspberrypi,bcm2835-power.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/bcm/raspberrypi,bcm2835-power.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM2835 power domain driver
+
+maintainers:
+ - Karan Sanghavi <karansanghvi98@gmail.com>
+
+description: |
+ The Raspberry Pi power domain driver manages power for various subsystems
+ in the Raspberry Pi BCM2835 SoC.
+
+properties:
+ compatible:
+ enum:
+ - raspberrypi,bcm2835-power
+
+ firmware:
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ '#power-domain-cells':
+ const: 1
+
+required:
+ - compatible
+ - firmware
+ - "#power-domain-cells"
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/power/raspberrypi-power.h>
+ power: power {
+ compatible = "raspberrypi,bcm2835-power";
+ firmware = <&firmware>;
+ #power-domain-cells = <1>;
+ };
+
---
base-commit: 8e929cb546ee42c9a61d24fae60605e9e3192354
change-id: 20241019-raspberrypi-bcm2835-power-5a4231be8959
Best regards,
--
Karan Sanghavi <karansanghvi98@gmail.com>
On Sat, Oct 19, 2024 at 07:51:18PM +0000, Karan Sanghavi wrote: $subject: dt-bindings: soc: bcm: Convert to Dt schema That's not specific enough about what binding you're converting here. > +maintainers: > + - Karan Sanghavi <karansanghvi98@gmail.com> Why not the maintainer of the original binding? > + > +description: | The | here serves no purpose, as you have no formatting to preserve. > + The Raspberry Pi power domain driver manages power for various subsystems > + in the Raspberry Pi BCM2835 SoC. > + > +properties: > + compatible: > + enum: > + - raspberrypi,bcm2835-power > + > + firmware: > + $ref: /schemas/types.yaml#/definitions/phandle > + > + '#power-domain-cells': > + const: 1 > + > +required: > + - compatible > + - firmware > + - "#power-domain-cells" > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/power/raspberrypi-power.h> What do you use from this header? > + power: power { The label here should be removed, it is never referenced. Cheers, Conor.
On Mon, Oct 21, 2024 at 12:39:28PM +0100, Conor Dooley wrote: > On Sat, Oct 19, 2024 at 07:51:18PM +0000, Karan Sanghavi wrote: > > $subject: dt-bindings: soc: bcm: Convert to Dt schema > > That's not specific enough about what binding you're converting here. > Sure will make the changes. > > +maintainers: > > + - Karan Sanghavi <karansanghvi98@gmail.com> > > Why not the maintainer of the original binding? > I had read somewhere that who ever converts the binding file becomes its maintainer thus added my name but will add the original binding file's maintainer name which can actually help in maintaining this file. > > + > > +description: | > > The | here serves no purpose, as you have no formatting to preserve. > Sure will make the changes. > > + The Raspberry Pi power domain driver manages power for various subsystems > > + in the Raspberry Pi BCM2835 SoC. > > + > > +properties: > > + compatible: > > + enum: > > + - raspberrypi,bcm2835-power > > + > > + firmware: > > + $ref: /schemas/types.yaml#/definitions/phandle > > + > > + '#power-domain-cells': > > + const: 1 > > + > > +required: > > + - compatible > > + - firmware > > + - "#power-domain-cells" > > + > > +unevaluatedProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/power/raspberrypi-power.h> > > What do you use from this header? > Example for power node power: power { compatible = "raspberrypi,bcm2835-power"; firmware = <&firmware>; #power-domain-cells = <1>; }; Example for using the power domain &usb { power-domains = <&power RPI_POWER_DOMAIN_USB>; }; We need the header for referring the power domain defines in the sub nodes. I didn't understood exactly how should I include the usb example thus omitted it but if required can you please let me know how to add them. > > + power: power { > > The label here should be removed, it is never referenced. > > Cheers, > Conor. Thank you, Karan.
On Mon, Oct 21, 2024 at 06:13:17PM +0000, Karan Sanghavi wrote: > On Mon, Oct 21, 2024 at 12:39:28PM +0100, Conor Dooley wrote: > > On Sat, Oct 19, 2024 at 07:51:18PM +0000, Karan Sanghavi wrote: > > > +examples: > > > + - | > > > + #include <dt-bindings/power/raspberrypi-power.h> > > > > What do you use from this header? > > > Example for power node > power: power { > compatible = "raspberrypi,bcm2835-power"; > firmware = <&firmware>; > #power-domain-cells = <1>; > }; > > Example for using the power domain > > &usb { > power-domains = <&power RPI_POWER_DOMAIN_USB>; > }; > > We need the header for referring the power domain defines in the sub > nodes. > > I didn't understood exactly how should I include the usb example thus > omitted it but if required can you please let me know how to add them. There's usually no consumers in a provider binding example, and you have not included one, so the header isn't needed.
© 2016 - 2024 Red Hat, Inc.