mbox series

[v7,0/5] convert grf.txt to YAML

Message ID 20210601164800.7670-1-jbx6244@gmail.com
Headers show
Series convert grf.txt to YAML | expand

Message

Johan Jonker June 1, 2021, 4:47 p.m. UTC
Changed V7:
  rebase
  add compatible for rk3308 USB grf
    add "rockchip,rk3308-usb2phy-grf" to "usb2phy@[0-9a-f]+$"
    patternProperties too
  add USB support to rk3308.dtsi
    restyle
    limit grf reg size
    change sub nodename
  remove applied patches

Changed V6:
  remove some #phy-cells in rockchip-usb-phy.yaml
  rename nodename for phy-rockchip-inno-usb2
  remove applied patches

Changed V5:
  changed compatibles for rk3066/rk3188
  add rockchip-usb-phy.yaml
  move and restyle grf nodes rk3066/rk3188
  remove applied patches

Changed V4:
  revert separate schemas for each 'if' subset
  add additionalProperties
  move properties to top level

Changed V3:
  remove select
  change unevaluatedProperties
  add separate schemas for each 'if' subset

Changed V2:
  add rockchip,rk3328-grf-gpio.yaml
  rename grf-gpio nodename

Johan Jonker (3):
  dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml
  ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2
  arm64: dts: rockchip: rename nodename for phy-rockchip-inno-usb2

Tobias Schramm (2):
  dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf
  arm64: dts: rockchip: add USB support to rk3308.dtsi

 .../bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +---
 .../devicetree/bindings/soc/rockchip/grf.yaml      |  6 +-
 arch/arm/boot/dts/rk322x.dtsi                      |  4 +-
 arch/arm/boot/dts/rv1108.dtsi                      |  2 +-
 arch/arm64/boot/dts/rockchip/px30.dtsi             |  2 +-
 arch/arm64/boot/dts/rockchip/rk3308.dtsi           | 74 +++++++++++++++++++++-
 arch/arm64/boot/dts/rockchip/rk3328.dtsi           |  2 +-
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           |  4 +-
 8 files changed, 87 insertions(+), 18 deletions(-)

Comments

Vinod Koul June 3, 2021, 5:54 a.m. UTC | #1
On 01-06-21, 18:47, Johan Jonker wrote:
> The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"

> in phy-provider.yaml has required "#phy-cells" for phy nodes.

> The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.

> Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent

> notifications. Remove unneeded "#phy-cells" from parent node.

> Also sort example.

> 

> make ARCH=arm dtbs_check

> DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/

> phy/phy-provider.yaml

> 

> Signed-off-by: Johan Jonker <jbx6244@gmail.com>

> Acked-by: Rob Herring <robh@kernel.org>

> ---

>  .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +++--------

>  Documentation/devicetree/bindings/soc/rockchip/grf.yaml       |  4 ++--


I dont have grf.yaml, I guess it would be easier to split this into two
or apply this thru rockchip tree. If you prefer latter:

Acked-By: Vinod Koul <vkoul@kernel.org>


-- 
~Vinod
Heiko Stuebner June 3, 2021, 8:58 a.m. UTC | #2
Hi Vinod,

Am Donnerstag, 3. Juni 2021, 07:54:24 CEST schrieb Vinod Koul:
> On 01-06-21, 18:47, Johan Jonker wrote:

> > The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"

> > in phy-provider.yaml has required "#phy-cells" for phy nodes.

> > The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.

> > Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent

> > notifications. Remove unneeded "#phy-cells" from parent node.

> > Also sort example.

> > 

> > make ARCH=arm dtbs_check

> > DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/

> > phy/phy-provider.yaml

> > 

> > Signed-off-by: Johan Jonker <jbx6244@gmail.com>

> > Acked-by: Rob Herring <robh@kernel.org>

> > ---

> >  .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +++--------

> >  Documentation/devicetree/bindings/soc/rockchip/grf.yaml       |  4 ++--

> 

> I dont have grf.yaml, I guess it would be easier to split this into two

> or apply this thru rockchip tree. If you prefer latter:

> 

> Acked-By: Vinod Koul <vkoul@kernel.org>


before we do any more rounds, I'll just do that with your Ack, thanks :-)


Heiko
Heiko Stuebner June 3, 2021, 9:56 a.m. UTC | #3
On Tue, 1 Jun 2021 18:47:55 +0200, Johan Jonker wrote:
> Changed V7:

>   rebase

>   add compatible for rk3308 USB grf

>     add "rockchip,rk3308-usb2phy-grf" to "usb2phy@[0-9a-f]+$"

>     patternProperties too

>   add USB support to rk3308.dtsi

>     restyle

>     limit grf reg size

>     change sub nodename

>   remove applied patches

> 

> [...]


Applied, thanks!

[1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml
      commit: e71ccdff376b0bd1bf4d47642b7ec4d791293b96
[2/5] dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf
      commit: da76290fa39dc647bf7a1bac6467e66c8e465e54
[3/5] ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2
      commit: 2fd2300a9c17ee1c48b1b7a7fabbb90fd12a64f1
[4/5] arm64: dts: rockchip: rename nodename for phy-rockchip-inno-usb2
      commit: 8c3d64251ac5c5a3d10364f6b07d3603ac1e7b4a
[5/5] arm64: dts: rockchip: add USB support to rk3308.dtsi
      commit: 9fcf74b274a1dc5bcda37c34470061ef1e1130dd

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>
Rob Herring June 7, 2021, 1:16 p.m. UTC | #4
On Thu, Jun 3, 2021 at 3:58 AM Heiko Stübner <heiko@sntech.de> wrote:
>

> Hi Vinod,

>

> Am Donnerstag, 3. Juni 2021, 07:54:24 CEST schrieb Vinod Koul:

> > On 01-06-21, 18:47, Johan Jonker wrote:

> > > The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"

> > > in phy-provider.yaml has required "#phy-cells" for phy nodes.

> > > The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.

> > > Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent

> > > notifications. Remove unneeded "#phy-cells" from parent node.

> > > Also sort example.

> > >

> > > make ARCH=arm dtbs_check

> > > DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/

> > > phy/phy-provider.yaml

> > >

> > > Signed-off-by: Johan Jonker <jbx6244@gmail.com>

> > > Acked-by: Rob Herring <robh@kernel.org>

> > > ---

> > >  .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +++--------

> > >  Documentation/devicetree/bindings/soc/rockchip/grf.yaml       |  4 ++--

> >

> > I dont have grf.yaml, I guess it would be easier to split this into two

> > or apply this thru rockchip tree. If you prefer latter:

> >

> > Acked-By: Vinod Koul <vkoul@kernel.org>

>

> before we do any more rounds, I'll just do that with your Ack, thanks :-)


This is generating warnings on linux-next now:

/builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.example.dt.yaml:
syscon@ff770000: usb2phy@e450: '#phy-cells' does not match any of the
regexes: 'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
/builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.example.dt.yaml:
usb2phy@e450: '#phy-cells' does not match any of the regexes:
'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml

Rob
Johan Jonker June 7, 2021, 1:38 p.m. UTC | #5
On 6/7/21 3:16 PM, Rob Herring wrote:
> On Thu, Jun 3, 2021 at 3:58 AM Heiko Stübner <heiko@sntech.de> wrote:

>>

>> Hi Vinod,

>>

>> Am Donnerstag, 3. Juni 2021, 07:54:24 CEST schrieb Vinod Koul:

>>> On 01-06-21, 18:47, Johan Jonker wrote:

>>>> The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"

>>>> in phy-provider.yaml has required "#phy-cells" for phy nodes.

>>>> The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.

>>>> Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent

>>>> notifications. Remove unneeded "#phy-cells" from parent node.

>>>> Also sort example.

>>>>

>>>> make ARCH=arm dtbs_check

>>>> DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/

>>>> phy/phy-provider.yaml

>>>>

>>>> Signed-off-by: Johan Jonker <jbx6244@gmail.com>

>>>> Acked-by: Rob Herring <robh@kernel.org>

>>>> ---

>>>>  .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +++--------

>>>>  Documentation/devicetree/bindings/soc/rockchip/grf.yaml       |  4 ++--

>>>

>>> I dont have grf.yaml, I guess it would be easier to split this into two

>>> or apply this thru rockchip tree. If you prefer latter:

>>>

>>> Acked-By: Vinod Koul <vkoul@kernel.org>

>>

>> before we do any more rounds, I'll just do that with your Ack, thanks :-)

> 

> This is generating warnings on linux-next now:

> 

> /builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.example.dt.yaml:

> syscon@ff770000: usb2phy@e450: '#phy-cells' does not match any of the

> regexes: 'pinctrl-[0-9]+'

> From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.yaml

> /builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.example.dt.yaml:

> usb2phy@e450: '#phy-cells' does not match any of the regexes:

> 'pinctrl-[0-9]+'

> From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml

> 

> Rob

> 


Hi Rob, Heiko,

Sorry...
That '#phy-cells' in the grf.yaml example also needs to go.

Is that something Heiko can fix in his git tree or
do I have to resubmit the complete patch or just a fix?
Please advise.

Kind regards,

Johan

===
> 

> examples:

>   - |

>     #include <dt-bindings/clock/rk3399-cru.h>

>     #include <dt-bindings/interrupt-controller/arm-gic.h>

>     #include <dt-bindings/power/rk3399-power.h>

>     grf: syscon@ff770000 {

>       compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";

>       reg = <0xff770000 0x10000>;

>       #address-cells = <1>;

>       #size-cells = <1>;

> 

>       mipi_dphy_rx0: mipi-dphy-rx0 {

>         compatible = "rockchip,rk3399-mipi-dphy-rx0";

>         clocks = <&cru SCLK_MIPIDPHY_REF>,

>                  <&cru SCLK_DPHY_RX0_CFG>,

>                  <&cru PCLK_VIO_GRF>;

>         clock-names = "dphy-ref", "dphy-cfg", "grf";

>         power-domains = <&power RK3399_PD_VIO>;

>         #phy-cells = <0>;

>       };

> 

>       u2phy0: usb2phy@e450 {

>         compatible = "rockchip,rk3399-usb2phy";

>         reg = <0xe450 0x10>;

>         clocks = <&cru SCLK_USB2PHY0_REF>;

>         clock-names = "phyclk";

>         #clock-cells = <0>;

>         clock-output-names = "clk_usbphy0_480m";


>         #phy-cells = <0>;


Remove

> 

>         u2phy0_host: host-port {

>           #phy-cells = <0>;

>           interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;

>           interrupt-names = "linestate";

>          };

> 

>         u2phy0_otg: otg-port {

>           #phy-cells = <0>;

>           interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,

>                        <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,

>                        <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;

>           interrupt-names = "otg-bvalid", "otg-id",

>                             "linestate";

>         };

>       };

>     };
Johan Jonker June 7, 2021, 3:37 p.m. UTC | #6
On 6/7/21 4:18 PM, Heiko Stuebner wrote:
> The recent yaml conversion of the grf and inno-usb2-phy bindings

> left the #phy-cells in place in the main usb2phy node inside the

> example in grf.yaml, causing new warnings.

> 

> Drop it to make the bindingcheck happy.

> 

> Fixes: e71ccdff376b ("dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml")

> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

> ---


> Like this I guess?


Hi Heiko,

When I apply this patch locally and give the command below the
notifications are gone.

make ARCH=arm dt_binding_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/soc/rockchip/grf.yaml

Thanks,

Johan

> 

>  Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml

> index 8c1c46fef157..62fa72cfea34 100644

> --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml

> +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml

> @@ -242,7 +242,6 @@ examples:

>          clock-names = "phyclk";

>          #clock-cells = <0>;

>          clock-output-names = "clk_usbphy0_480m";

> -        #phy-cells = <0>;

>  

>          u2phy0_host: host-port {

>            #phy-cells = <0>;

>
Heiko Stuebner June 10, 2021, 7:30 a.m. UTC | #7
Am Montag, 7. Juni 2021, 17:37:06 CEST schrieb Johan Jonker:
> 

> On 6/7/21 4:18 PM, Heiko Stuebner wrote:

> > The recent yaml conversion of the grf and inno-usb2-phy bindings

> > left the #phy-cells in place in the main usb2phy node inside the

> > example in grf.yaml, causing new warnings.

> > 

> > Drop it to make the bindingcheck happy.

> > 

> > Fixes: e71ccdff376b ("dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml")

> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>

> > ---

> 

> > Like this I guess?

> 

> Hi Heiko,

> 

> When I apply this patch locally and give the command below the

> notifications are gone.

> 

> make ARCH=arm dt_binding_check

> DT_SCHEMA_FILES=Documentation/devicetree/bindings/soc/rockchip/grf.yaml


so I've applied the patch on top now in my tree.

Heiko