mbox series

[v3,0/4] Convert adi,adv7511.txt DT bindings to yaml

Message ID 20200601063308.13045-1-ricardo.canuelo@collabora.com
Headers show
Series Convert adi,adv7511.txt DT bindings to yaml | expand

Message

Ricardo Cañuelo June 1, 2020, 6:33 a.m. UTC
Hi,

This series convert the adi,adv7511.txt DT bindings to json-schema. As a
result of the conversion some dts files needed to be updated.

The changes to the dts files are of three types:

  - Reordering of the I2C slave addresses list of the ADV75xx node. The
    addresses in the 'reg' property and the matching names in
    'reg-names' for an I2C slave don't need to be in any particular
    order, but the DT schema defines these properties as a cell array
    and a string array respectively, which are ordered, so the
    definitions in the dts files must match the order in the binding.

  - Filling the minimum binding requirements. Most of the time this
    means creating a 'ports' node in the boards that don't define
    them. Note, however, that the purpose of this is simply to make the
    definition compliant with the binding. I didn't define any endpoints
    for the ports.

  - Removing unneeded properties.

About the binding conversion:

  - The original binding covered five different devices: ADV7511,
    ADV7511W, ADV7513, ADV7533 and ADV7535. They all share a common set
    of properties but ADV7533 and ADV7535 have enough differences from
    the rest to warrant their own binding file. In v1 I modelled all the
    properties constraints for all five devices in a single file but it
    turned out a bit too complex. Splitting the binding into one for
    ADV7511/11W/13 and another for ADV7533/35 makes them much easier to
    read and maintain.

Patches 1/4 to 3/4 contain the dts changes. Patch 4/4 contains the
binding conversion.

NOTE: the bindings have been tested with:

  make dt_binding_check ARCH=<arch> DT_SCHEMA_FILES=<...adi,adv7511.yaml>
  make dt_binding_check ARCH=<arch> DT_SCHEMA_FILES=<...adi,adv7533.yaml>
  make dtbs_check ARCH=<arch> DT_SCHEMA_FILES=<...adi,adv7511.yaml>
  make dtbs_check ARCH=<arch> DT_SCHEMA_FILES=<...adi,adv7533.yaml>

for <arch> = arm and arm64. dts changes haven't been tested in hardware.

Some existing DTs are expected to fail after this conversion.

Changes in v3:

  - Removed from the patch series (already in mainline):
    - arm64: dts: renesas: make hdmi encoder nodes compliant with DT bindings
    - ARM: dts: renesas: make hdmi encoder nodes compliant with DT bindings
    - ARM: dts: iwg20d-q7-dbcm-ca: remove unneeded properties in hdmi@39

  - Additional DTs fixes:
    - boot/dts/stm32mp15xx-dhcor-avenger96.dtsi.

  - [Laurent] adi,adv7511.yaml and adi,adv7533.yaml.
    - Documentation fixes and typos.
    - Removed unnecessary allOf's.
    - adi,embedded-sync data type changed to boolean.
    - Power supplies defined as required.
    - Examples updated.

Ricardo Cañuelo (4):
  ARM: dts: zynq: add port definitions to hdmi-tx@39
  arm64: dts: hisilicon: hikey: fixes to comply with adi,adv7533 DT
    binding
  ARM: dts: stm32: make hdmi-transmitter node compliant with DT bindings
  dt-bindings: drm: bridge: adi,adv7511.txt: convert to yaml

 .../bindings/display/bridge/adi,adv7511.txt   | 143 -----------
 .../bindings/display/bridge/adi,adv7511.yaml  | 231 ++++++++++++++++++
 .../bindings/display/bridge/adi,adv7533.yaml  | 175 +++++++++++++
 .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi |   6 +-
 arch/arm/boot/dts/zynq-zc702.dts              |  10 +
 arch/arm/boot/dts/zynq-zc706.dts              |  10 +
 .../boot/dts/hisilicon/hi3660-hikey960.dts    |  11 +
 .../arm64/boot/dts/hisilicon/hi6220-hikey.dts |   2 +-
 8 files changed, 440 insertions(+), 148 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt
 create mode 100644 Documentation/devicetree/bindings/display/bridge/adi,adv7511.yaml
 create mode 100644 Documentation/devicetree/bindings/display/bridge/adi,adv7533.yaml

Comments

Wei Xu July 21, 2020, 2:41 a.m. UTC | #1
Hi Ricardo,

On 2020/6/1 14:33, Ricardo Cañuelo wrote:
> hi3660-hikey960.dts:

>   Define a 'ports' node for 'adv7533: adv7533@39' and the

>   'adi,dsi-lanes' property to make it compliant with the adi,adv7533 DT

>   binding.

> 

>   This fills the requirements to meet the binding requirements,

>   remote endpoints are not defined.

> 

> hi6220-hikey.dts:

>   Change property name s/pd-gpio/pd-gpios, gpio properties should be

>   plural. This is just a cosmetic change.

> 

> Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>

> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


Thanks!
Applied this patch only to the hisilicon arm64 dt tree since
it does not depend on the new yaml format binding.

Best Regards,
Wei

> ---

>  arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 11 +++++++++++

>  arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts    |  2 +-

>  2 files changed, 12 insertions(+), 1 deletion(-)

> 

> diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts

> index e035cf195b19..8c4bfbaf3a80 100644

> --- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts

> +++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts

> @@ -530,6 +530,17 @@

>  		status = "ok";

>  		compatible = "adi,adv7533";

>  		reg = <0x39>;

> +		adi,dsi-lanes = <4>;

> +		ports {

> +			#address-cells = <1>;

> +			#size-cells = <0>;

> +			port@0 {

> +				reg = <0>;

> +			};

> +			port@1 {

> +				reg = <1>;

> +			};

> +		};

>  	};

>  };

>  

> diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts

> index c14205cd6bf5..3e47150c05ec 100644

> --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts

> +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts

> @@ -516,7 +516,7 @@

>  		reg = <0x39>;

>  		interrupt-parent = <&gpio1>;

>  		interrupts = <1 2>;

> -		pd-gpio = <&gpio0 4 0>;

> +		pd-gpios = <&gpio0 4 0>;

>  		adi,dsi-lanes = <4>;

>  		#sound-dai-cells = <0>;

>  

>
Ricardo Cañuelo July 21, 2020, 5:37 a.m. UTC | #2
Hi Wei,

On mar 21-07-2020 10:41:49, Wei Xu wrote:
> Hi Ricardo,

> 

> On 2020/6/1 14:33, Ricardo Cañuelo wrote:

> > hi3660-hikey960.dts:

> >   Define a 'ports' node for 'adv7533: adv7533@39' and the

> >   'adi,dsi-lanes' property to make it compliant with the adi,adv7533 DT

> >   binding.

> > 

> >   This fills the requirements to meet the binding requirements,

> >   remote endpoints are not defined.

> > 

> > hi6220-hikey.dts:

> >   Change property name s/pd-gpio/pd-gpios, gpio properties should be

> >   plural. This is just a cosmetic change.

> > 

> > Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>

> > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> 

> Thanks!

> Applied this patch only to the hisilicon arm64 dt tree since

> it does not depend on the new yaml format binding.

> 

> Best Regards,

> Wei


Great, thanks!

Cheers,
Ricardo