Message ID | 20200204235552.7466-13-f.fainelli@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | dt-bindings: arm: bcm: Convert boards to YAML | expand |
On Tue, Feb 04, 2020 at 03:55:52PM -0800, Florian Fainelli wrote: > Convert the Raspberry Pi BCM2835 firmware binding document to YAML. > Verified with dt_binding_check and dtbs_check. > > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> > --- > .../arm/bcm/raspberrypi,bcm2835-firmware.txt | 14 -------- > .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 33 +++++++++++++++++++ > 2 files changed, 33 insertions(+), 14 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt > create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml > > diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt > deleted file mode 100644 > index 6824b3180ffb..000000000000 > --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt > +++ /dev/null > @@ -1,14 +0,0 @@ > -Raspberry Pi VideoCore firmware driver > - > -Required properties: > - > -- compatible: Should be "raspberrypi,bcm2835-firmware" > -- mboxes: Phandle to the firmware device's Mailbox. > - (See: ../mailbox/mailbox.txt for more information) > - > -Example: > - > -firmware { > - compatible = "raspberrypi,bcm2835-firmware"; > - mboxes = <&mailbox>; > -}; > diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml > new file mode 100644 > index 000000000000..db355d970f2b > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml > @@ -0,0 +1,33 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/arm/bcm/raspberrypi,bcm2835-firmware.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Raspberry Pi VideoCore firmware driver > + > +maintainers: > + - Eric Anholt <eric@anholt.net> > + - Stefan Wahren <wahrenst@gmx.net> > + > +properties: > + compatible: > + const: raspberrypi,bcm2835-firmware simple-bus ^ I need to check for spaces with the meta-schema... > + > + mboxes: > + $ref: '/schemas/types.yaml#/definitions/phandle' Already has a type, just need to define how many items and what they are if more than one. > + description: | > + Phandle to the firmware device's Mailbox. > + (See: ../mailbox/mailbox.txt for more information) Drop this. That's every 'mboxes'. > + > +required: > + - compatible > + - mboxes > + > +examples: > + - | > + firmware { > + compatible = "raspberrypi,bcm2835-firmware"; > + mboxes = <&mailbox>; > + }; > +... > -- > 2.19.1 >
On 2/6/2020 11:23 AM, Rob Herring wrote: > On Tue, Feb 04, 2020 at 03:55:52PM -0800, Florian Fainelli wrote: >> Convert the Raspberry Pi BCM2835 firmware binding document to YAML. >> Verified with dt_binding_check and dtbs_check. >> >> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> >> --- >> .../arm/bcm/raspberrypi,bcm2835-firmware.txt | 14 -------- >> .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 33 +++++++++++++++++++ >> 2 files changed, 33 insertions(+), 14 deletions(-) >> delete mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt >> create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml >> >> diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt >> deleted file mode 100644 >> index 6824b3180ffb..000000000000 >> --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt >> +++ /dev/null >> @@ -1,14 +0,0 @@ >> -Raspberry Pi VideoCore firmware driver >> - >> -Required properties: >> - >> -- compatible: Should be "raspberrypi,bcm2835-firmware" >> -- mboxes: Phandle to the firmware device's Mailbox. >> - (See: ../mailbox/mailbox.txt for more information) >> - >> -Example: >> - >> -firmware { >> - compatible = "raspberrypi,bcm2835-firmware"; >> - mboxes = <&mailbox>; >> -}; >> diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml >> new file mode 100644 >> index 000000000000..db355d970f2b >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml >> @@ -0,0 +1,33 @@ >> +# SPDX-License-Identifier: GPL-2.0 >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/arm/bcm/raspberrypi,bcm2835-firmware.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Raspberry Pi VideoCore firmware driver >> + >> +maintainers: >> + - Eric Anholt <eric@anholt.net> >> + - Stefan Wahren <wahrenst@gmx.net> >> + >> +properties: >> + compatible: >> + const: raspberrypi,bcm2835-firmware simple-bus > ^ > > I need to check for spaces with the meta-schema... I believe I had tried to use: const: raspberrypi,bcm2835-firmware const: simple-bus but this did not work, and I had to resort to doing this. > >> + >> + mboxes: >> + $ref: '/schemas/types.yaml#/definitions/phandle' > > Already has a type, just need to define how many items and what they are > if more than one. OK, thanks!
Hi Florian, On Sun, Mar 22, 2020 at 02:35:17PM -0700, Florian Fainelli wrote: > > > On 2/6/2020 11:23 AM, Rob Herring wrote: > > On Tue, Feb 04, 2020 at 03:55:52PM -0800, Florian Fainelli wrote: > >> Convert the Raspberry Pi BCM2835 firmware binding document to YAML. > >> Verified with dt_binding_check and dtbs_check. > >> > >> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> > >> --- > >> .../arm/bcm/raspberrypi,bcm2835-firmware.txt | 14 -------- > >> .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 33 +++++++++++++++++++ > >> 2 files changed, 33 insertions(+), 14 deletions(-) > >> delete mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt > >> create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml > >> > >> diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt > >> deleted file mode 100644 > >> index 6824b3180ffb..000000000000 > >> --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt > >> +++ /dev/null > >> @@ -1,14 +0,0 @@ > >> -Raspberry Pi VideoCore firmware driver > >> - > >> -Required properties: > >> - > >> -- compatible: Should be "raspberrypi,bcm2835-firmware" > >> -- mboxes: Phandle to the firmware device's Mailbox. > >> - (See: ../mailbox/mailbox.txt for more information) > >> - > >> -Example: > >> - > >> -firmware { > >> - compatible = "raspberrypi,bcm2835-firmware"; > >> - mboxes = <&mailbox>; > >> -}; > >> diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml > >> new file mode 100644 > >> index 000000000000..db355d970f2b > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml > >> @@ -0,0 +1,33 @@ > >> +# SPDX-License-Identifier: GPL-2.0 > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/arm/bcm/raspberrypi,bcm2835-firmware.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: Raspberry Pi VideoCore firmware driver > >> + > >> +maintainers: > >> + - Eric Anholt <eric@anholt.net> > >> + - Stefan Wahren <wahrenst@gmx.net> > >> + > >> +properties: > >> + compatible: > >> + const: raspberrypi,bcm2835-firmware simple-bus > > ^ > > > > I need to check for spaces with the meta-schema... > > I believe I had tried to use: > > const: raspberrypi,bcm2835-firmware > const: simple-bus > > but this did not work, and I had to resort to doing this. That would be: compatible: items: - const: raspberrypi,bcm2835-firmware - const: simple-bus It changes slightly from what the initial binding was saying though, since it wasn't mentionning simple-bus at all? Is that on purpose? Maxime
On Mon, 2020-03-23 at 09:40 +0100, Maxime Ripard wrote: > Hi Florian, > > On Sun, Mar 22, 2020 at 02:35:17PM -0700, Florian Fainelli wrote: > > > > On 2/6/2020 11:23 AM, Rob Herring wrote: > > > On Tue, Feb 04, 2020 at 03:55:52PM -0800, Florian Fainelli wrote: > > > > Convert the Raspberry Pi BCM2835 firmware binding document to YAML. > > > > Verified with dt_binding_check and dtbs_check. > > > > > > > > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> > > > > --- > > > > .../arm/bcm/raspberrypi,bcm2835-firmware.txt | 14 -------- > > > > .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 33 +++++++++++++++++++ > > > > 2 files changed, 33 insertions(+), 14 deletions(-) > > > > delete mode 100644 > > > > Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835- > > > > firmware.txt > > > > create mode 100644 > > > > Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835- > > > > firmware.yaml > > > > > > > > diff --git > > > > a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835- > > > > firmware.txt > > > > b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835- > > > > firmware.txt > > > > deleted file mode 100644 > > > > index 6824b3180ffb..000000000000 > > > > --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835- > > > > firmware.txt > > > > +++ /dev/null > > > > @@ -1,14 +0,0 @@ > > > > -Raspberry Pi VideoCore firmware driver > > > > - > > > > -Required properties: > > > > - > > > > -- compatible: Should be "raspberrypi,bcm2835-firmware" > > > > -- mboxes: Phandle to the firmware device's Mailbox. > > > > - (See: ../mailbox/mailbox.txt for more > > > > information) > > > > - > > > > -Example: > > > > - > > > > -firmware { > > > > - compatible = "raspberrypi,bcm2835-firmware"; > > > > - mboxes = <&mailbox>; > > > > -}; > > > > diff --git > > > > a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835- > > > > firmware.yaml > > > > b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835- > > > > firmware.yaml > > > > new file mode 100644 > > > > index 000000000000..db355d970f2b > > > > --- /dev/null > > > > +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835- > > > > firmware.yaml > > > > @@ -0,0 +1,33 @@ > > > > +# SPDX-License-Identifier: GPL-2.0 > > > > +%YAML 1.2 > > > > +--- > > > > +$id: > > > > http://devicetree.org/schemas/arm/bcm/raspberrypi,bcm2835-firmware.yaml# > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > > + > > > > +title: Raspberry Pi VideoCore firmware driver > > > > + > > > > +maintainers: > > > > + - Eric Anholt <eric@anholt.net> > > > > + - Stefan Wahren <wahrenst@gmx.net> > > > > + > > > > +properties: > > > > + compatible: > > > > + const: raspberrypi,bcm2835-firmware simple-bus > > > ^ > > > > > > I need to check for spaces with the meta-schema... > > > > I believe I had tried to use: > > > > const: raspberrypi,bcm2835-firmware > > const: simple-bus > > > > but this did not work, and I had to resort to doing this. > > That would be: > > compatible: > items: > - const: raspberrypi,bcm2835-firmware > - const: simple-bus > > It changes slightly from what the initial binding was saying though, > since it wasn't mentionning simple-bus at all? Is that on purpose? I guess we failed to update the binding after starting to use the firmware device as a bus.
diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt deleted file mode 100644 index 6824b3180ffb..000000000000 --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt +++ /dev/null @@ -1,14 +0,0 @@ -Raspberry Pi VideoCore firmware driver - -Required properties: - -- compatible: Should be "raspberrypi,bcm2835-firmware" -- mboxes: Phandle to the firmware device's Mailbox. - (See: ../mailbox/mailbox.txt for more information) - -Example: - -firmware { - compatible = "raspberrypi,bcm2835-firmware"; - mboxes = <&mailbox>; -}; diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml new file mode 100644 index 000000000000..db355d970f2b --- /dev/null +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/bcm/raspberrypi,bcm2835-firmware.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Raspberry Pi VideoCore firmware driver + +maintainers: + - Eric Anholt <eric@anholt.net> + - Stefan Wahren <wahrenst@gmx.net> + +properties: + compatible: + const: raspberrypi,bcm2835-firmware simple-bus + + mboxes: + $ref: '/schemas/types.yaml#/definitions/phandle' + description: | + Phandle to the firmware device's Mailbox. + (See: ../mailbox/mailbox.txt for more information) + +required: + - compatible + - mboxes + +examples: + - | + firmware { + compatible = "raspberrypi,bcm2835-firmware"; + mboxes = <&mailbox>; + }; +...
Convert the Raspberry Pi BCM2835 firmware binding document to YAML. Verified with dt_binding_check and dtbs_check. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> --- .../arm/bcm/raspberrypi,bcm2835-firmware.txt | 14 -------- .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 33 +++++++++++++++++++ 2 files changed, 33 insertions(+), 14 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.txt create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml