[v3,1/4] dt-bindings: arm: rockchip: Update ROCKPi 4 binding
diff mbox series

Message ID 20200723090210.41201-1-jagan@amarulasolutions.com
State New
Headers show
Series
  • [v3,1/4] dt-bindings: arm: rockchip: Update ROCKPi 4 binding
Related show

Commit Message

Jagan Teki July 23, 2020, 9:02 a.m. UTC
ROCKPi 4 has 3 variants of hardware platforms called
ROCKPi 4A, 4B, and 4C.

- ROCKPi 4A has no Wif/BT.
- ROCKPi 4B has AP6256 Wifi/BT, PoE.
- ROCKPi 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enabled
  GPIO pin change compared to 4B, 4C

So, update the existing ROCKPi 4 binding to support
ROCKPi 4A/B/C hardware platforms.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v3:
- new patch

 Documentation/devicetree/bindings/arm/rockchip.yaml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Rob Herring July 23, 2020, 3:50 p.m. UTC | #1
On Thu, Jul 23, 2020 at 02:32:07PM +0530, Jagan Teki wrote:
> ROCKPi 4 has 3 variants of hardware platforms called
> ROCKPi 4A, 4B, and 4C.
> 
> - ROCKPi 4A has no Wif/BT.
> - ROCKPi 4B has AP6256 Wifi/BT, PoE.
> - ROCKPi 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enabled
>   GPIO pin change compared to 4B, 4C
> 
> So, update the existing ROCKPi 4 binding to support
> ROCKPi 4A/B/C hardware platforms.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v3:
> - new patch
> 
>  Documentation/devicetree/bindings/arm/rockchip.yaml | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
> index db2e35796795..e6f656b0bd56 100644
> --- a/Documentation/devicetree/bindings/arm/rockchip.yaml
> +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
> @@ -430,8 +430,12 @@ properties:
>            - const: radxa,rock
>            - const: rockchip,rk3188
>  
> -      - description: Radxa ROCK Pi 4
> +      - description: Radxa ROCK Pi 4A/B/C
>          items:
> +          - enum:
> +              - const: radxa,rockpi4a
> +              - const: radxa,rockpi4b
> +              - const: radxa,rockpi4c
>            - const: radxa,rockpi4

radxa,rockpi4 already meant 'ROCKPi 4A' and should continue to do so. 
Just add 4B and 4C strings. It's up to you if they should be backwards 
compatible with 'radxa,rockpi4' (meaning 4A), but I'd guess not unless 
it's just a board pop option.

>            - const: rockchip,rk3399
>  
> -- 
> 2.25.1
>
Rob Herring July 23, 2020, 3:51 p.m. UTC | #2
On Thu, 23 Jul 2020 14:32:07 +0530, Jagan Teki wrote:
> ROCKPi 4 has 3 variants of hardware platforms called
> ROCKPi 4A, 4B, and 4C.
> 
> - ROCKPi 4A has no Wif/BT.
> - ROCKPi 4B has AP6256 Wifi/BT, PoE.
> - ROCKPi 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enabled
>   GPIO pin change compared to 4B, 4C
> 
> So, update the existing ROCKPi 4 binding to support
> ROCKPi 4A/B/C hardware platforms.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v3:
> - new patch
> 
>  Documentation/devicetree/bindings/arm/rockchip.yaml | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 


My bot found errors running 'make dt_binding_check' on your patch:

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/rockchip.yaml: properties:compatible:oneOf:48:items: [{'enum': [{'const': 'radxa,rockpi4a'}, {'const': 'radxa,rockpi4b'}, {'const': 'radxa,rockpi4c'}]}, {'const': 'radxa,rockpi4'}, {'const': 'rockchip,rk3399'}] is not valid under any of the given schemas (Possible causes of the failure):
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/rockchip.yaml: properties:compatible:oneOf:48:items: [{'enum': [{'const': 'radxa,rockpi4a'}, {'const': 'radxa,rockpi4b'}, {'const': 'radxa,rockpi4c'}]}, {'const': 'radxa,rockpi4'}, {'const': 'rockchip,rk3399'}] is not of type 'object'
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/rockchip.yaml: properties:compatible:oneOf:48:items:0:enum:0: {'const': 'radxa,rockpi4a'} is not of type 'string'
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/rockchip.yaml: properties:compatible:oneOf:48:items:0:enum:1: {'const': 'radxa,rockpi4b'} is not of type 'string'
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/rockchip.yaml: properties:compatible:oneOf:48:items:0:enum:2: {'const': 'radxa,rockpi4c'} is not of type 'string'

Documentation/devicetree/bindings/Makefile:20: recipe for target 'Documentation/devicetree/bindings/arm/rockchip.example.dts' failed
make[1]: *** [Documentation/devicetree/bindings/arm/rockchip.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs....
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/rockchip.yaml: ignoring, error in schema: properties: compatible: oneOf: 48: items
warning: no schema found in file: ./Documentation/devicetree/bindings/arm/rockchip.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/rockchip.yaml: ignoring, error in schema: properties: compatible: oneOf: 48: items
warning: no schema found in file: ./Documentation/devicetree/bindings/arm/rockchip.yaml
Makefile:1347: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2


See https://patchwork.ozlabs.org/patch/1334641

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.
Jagan Teki July 29, 2020, 11:59 a.m. UTC | #3
On Thu, Jul 23, 2020 at 9:20 PM Rob Herring <robh@kernel.org> wrote:
>
> On Thu, Jul 23, 2020 at 02:32:07PM +0530, Jagan Teki wrote:
> > ROCKPi 4 has 3 variants of hardware platforms called
> > ROCKPi 4A, 4B, and 4C.
> >
> > - ROCKPi 4A has no Wif/BT.
> > - ROCKPi 4B has AP6256 Wifi/BT, PoE.
> > - ROCKPi 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enabled
> >   GPIO pin change compared to 4B, 4C
> >
> > So, update the existing ROCKPi 4 binding to support
> > ROCKPi 4A/B/C hardware platforms.
> >
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> > Changes for v3:
> > - new patch
> >
> >  Documentation/devicetree/bindings/arm/rockchip.yaml | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
> > index db2e35796795..e6f656b0bd56 100644
> > --- a/Documentation/devicetree/bindings/arm/rockchip.yaml
> > +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
> > @@ -430,8 +430,12 @@ properties:
> >            - const: radxa,rock
> >            - const: rockchip,rk3188
> >
> > -      - description: Radxa ROCK Pi 4
> > +      - description: Radxa ROCK Pi 4A/B/C
> >          items:
> > +          - enum:
> > +              - const: radxa,rockpi4a
> > +              - const: radxa,rockpi4b
> > +              - const: radxa,rockpi4c
> >            - const: radxa,rockpi4
>
> radxa,rockpi4 already meant 'ROCKPi 4A' and should continue to do so.
> Just add 4B and 4C strings. It's up to you if they should be backwards
> compatible with 'radxa,rockpi4' (meaning 4A), but I'd guess not unless
> it's just a board pop option.

At-least from dts nodes enablement point of view the existing dts
(with radxa,rockpi4) is 4B since it has wifi/bt enabled. 4A is the
real name of the board so having a compatible with radxa,rockpi4a is
meaningful as I understood.

So, based on the above statements the respective binding look like

      - description: Radxa ROCK Pi 4A/B/C
        items:
          - enum:
              - radxa,rockpi4a
              - radxa,rockpi4b
              - radxa,rockpi4c
          - const: radxa,rockpi4
          - const: rockchip,rk3399

Comments, please?

Jagan.

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index db2e35796795..e6f656b0bd56 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -430,8 +430,12 @@  properties:
           - const: radxa,rock
           - const: rockchip,rk3188
 
-      - description: Radxa ROCK Pi 4
+      - description: Radxa ROCK Pi 4A/B/C
         items:
+          - enum:
+              - const: radxa,rockpi4a
+              - const: radxa,rockpi4b
+              - const: radxa,rockpi4c
           - const: radxa,rockpi4
           - const: rockchip,rk3399