2024-01-30 14:55:57

by Johan Jonker

[permalink] [raw]
Subject: [PATCH v1 1/6] dt-bindings: display: rockchip: rockchip,dw-hdmi: deprecate port property

The hdmi-connector nodes are now functional and the new way to model
hdmi nodes with, so deprecate the port property and make port@0 and
port@1 a requirement. Also update example.

Signed-off-by: Johan Jonker <[email protected]>
---
.../display/rockchip/rockchip,dw-hdmi.yaml | 27 ++++++++++++++++---
1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
index 7e59dee15a5f..cd0a42f35f24 100644
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
@@ -97,8 +97,11 @@ properties:
ports:
$ref: /schemas/graph.yaml#/properties/ports

- patternProperties:
- "^port(@0)?$":
+ properties:
+ port:
+ $ref: /schemas/graph.yaml#/properties/port
+ deprecated: true
+ port@0:
$ref: /schemas/graph.yaml#/properties/port
description: Input of the DWC HDMI TX
properties:
@@ -108,11 +111,14 @@ properties:
description: Connection to the VOPB
endpoint@1:
description: Connection to the VOPL
- properties:
port@1:
$ref: /schemas/graph.yaml#/properties/port
description: Output of the DWC HDMI TX

+ required:
+ - port@0
+ - port@1
+
rockchip,grf:
$ref: /schemas/types.yaml#/definitions/phandle
description:
@@ -147,7 +153,11 @@ examples:
clock-names = "iahb", "isfr";

ports {
- port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
#address-cells = <1>;
#size-cells = <0>;

@@ -155,11 +165,20 @@ examples:
reg = <0>;
remote-endpoint = <&vopb_out_hdmi>;
};
+
hdmi_in_vopl: endpoint@1 {
reg = <1>;
remote-endpoint = <&vopl_out_hdmi>;
};
};
+
+ port@1 {
+ reg = <1>;
+
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+ };
};
};

--
2.39.2



2024-01-30 14:57:48

by Johan Jonker

[permalink] [raw]
Subject: [PATCH v1 3/6] ARM: dts: rockchip: fix rk3288 hdmi ports node

Fix rk3288 hdmi ports node so that it matches the
rockchip,dw-hdmi.yaml binding.

Signed-off-by: Johan Jonker <[email protected]>
---
arch/arm/boot/dts/rockchip/rk3288.dtsi | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rockchip/rk3288.dtsi b/arch/arm/boot/dts/rockchip/rk3288.dtsi
index ead343dc3df1..1a63281dcb36 100644
--- a/arch/arm/boot/dts/rockchip/rk3288.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3288.dtsi
@@ -1239,28 +1239,38 @@ edp_out: port@1 {
hdmi: hdmi@ff980000 {
compatible = "rockchip,rk3288-dw-hdmi";
reg = <0x0 0xff980000 0x0 0x20000>;
- reg-io-width = <4>;
- #sound-dai-cells = <0>;
- rockchip,grf = <&grf>;
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>;
clock-names = "iahb", "isfr", "cec";
power-domains = <&power RK3288_PD_VIO>;
+ reg-io-width = <4>;
+ rockchip,grf = <&grf>;
+ #sound-dai-cells = <0>;
status = "disabled";

ports {
- hdmi_in: port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hdmi_in: port@0 {
+ reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
+
hdmi_in_vopb: endpoint@0 {
reg = <0>;
remote-endpoint = <&vopb_out_hdmi>;
};
+
hdmi_in_vopl: endpoint@1 {
reg = <1>;
remote-endpoint = <&vopl_out_hdmi>;
};
};
+
+ hdmi_out: port@1 {
+ reg = <1>;
+ };
};
};

--
2.39.2


2024-01-30 14:58:04

by Johan Jonker

[permalink] [raw]
Subject: [PATCH v1 4/6] ARM: dts: rockchip: fix rk322x hdmi ports node

Fix rk322x hdmi ports node so that it matches the
rockchip,dw-hdmi.yaml binding.

Signed-off-by: Johan Jonker <[email protected]>
---
arch/arm/boot/dts/rockchip/rk322x.dtsi | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/rockchip/rk322x.dtsi b/arch/arm/boot/dts/rockchip/rk322x.dtsi
index 831561fc1814..ff8e778ea50f 100644
--- a/arch/arm/boot/dts/rockchip/rk322x.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk322x.dtsi
@@ -720,7 +720,6 @@ iep_mmu: iommu@20070800 {
hdmi: hdmi@200a0000 {
compatible = "rockchip,rk3228-dw-hdmi";
reg = <0x200a0000 0x20000>;
- reg-io-width = <4>;
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
assigned-clocks = <&cru SCLK_HDMI_PHY>;
assigned-clock-parents = <&hdmi_phy>;
@@ -732,18 +731,25 @@ hdmi: hdmi@200a0000 {
reset-names = "hdmi";
phys = <&hdmi_phy>;
phy-names = "hdmi";
+ reg-io-width = <4>;
rockchip,grf = <&grf>;
status = "disabled";

ports {
- hdmi_in: port {
- #address-cells = <1>;
- #size-cells = <0>;
- hdmi_in_vop: endpoint@0 {
- reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hdmi_in: port@0 {
+ reg = <0>;
+
+ hdmi_in_vop: endpoint {
remote-endpoint = <&vop_out_hdmi>;
};
};
+
+ hdmi_out: port@1 {
+ reg = <1>;
+ };
};
};

--
2.39.2


2024-01-30 14:58:44

by Johan Jonker

[permalink] [raw]
Subject: [PATCH v1 6/6] arm64: dts: rockchip: fix rk3399 hdmi ports node

Fix rk3399 hdmi ports node so that it matches the
rockchip,dw-hdmi.yaml binding.

Signed-off-by: Johan Jonker <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 0caa842bba0e..2c4924465aad 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -2036,7 +2036,11 @@ hdmi: hdmi@ff940000 {
status = "disabled";

ports {
- hdmi_in: port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hdmi_in: port@0 {
+ reg = <0>;
#address-cells = <1>;
#size-cells = <0>;

@@ -2049,6 +2053,10 @@ hdmi_in_vopl: endpoint@1 {
remote-endpoint = <&vopl_out_hdmi>;
};
};
+
+ hdmi_out: port@1 {
+ reg = <1>;
+ };
};
};

--
2.39.2


2024-01-30 15:16:29

by Johan Jonker

[permalink] [raw]
Subject: [PATCH v1 2/6] dt-bindings: display: rockchip,dw-hdmi: add power-domains property

Most Rockchip hdmi nodes are part of a power domain.
Add a power-domains property. Fix example.

Signed-off-by: Johan Jonker <[email protected]>
---
.../bindings/display/rockchip/rockchip,dw-hdmi.yaml | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
index cd0a42f35f24..6f421740b613 100644
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
@@ -94,6 +94,9 @@ properties:
- const: default
- const: unwedge

+ power-domains:
+ maxItems: 1
+
ports:
$ref: /schemas/graph.yaml#/properties/ports

@@ -141,16 +144,18 @@ examples:
#include <dt-bindings/clock/rk3288-cru.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/power/rk3288-power.h>

hdmi: hdmi@ff980000 {
compatible = "rockchip,rk3288-dw-hdmi";
reg = <0xff980000 0x20000>;
- reg-io-width = <4>;
- ddc-i2c-bus = <&i2c5>;
- rockchip,grf = <&grf>;
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>;
clock-names = "iahb", "isfr";
+ ddc-i2c-bus = <&i2c5>;
+ power-domains = <&power RK3288_PD_VIO>;
+ reg-io-width = <4>;
+ rockchip,grf = <&grf>;

ports {
#address-cells = <1>;
--
2.39.2


2024-01-30 15:16:56

by Johan Jonker

[permalink] [raw]
Subject: [PATCH v1 5/6] arm64: dts: rockchip: fix rk3328 hdmi ports node

Fix rk3328 hdmi ports node so that it matches the
rockchip,dw-hdmi.yaml binding.

Signed-off-by: Johan Jonker <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index fb5dcf6e9327..749b3f965f32 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -727,7 +727,6 @@ vop_mmu: iommu@ff373f00 {
hdmi: hdmi@ff3c0000 {
compatible = "rockchip,rk3328-dw-hdmi";
reg = <0x0 0xff3c0000 0x0 0x20000>;
- reg-io-width = <4>;
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_HDMI>,
@@ -740,16 +739,26 @@ hdmi: hdmi@ff3c0000 {
phy-names = "hdmi";
pinctrl-names = "default";
pinctrl-0 = <&hdmi_cec &hdmii2c_xfer &hdmi_hpd>;
+ reg-io-width = <4>;
rockchip,grf = <&grf>;
#sound-dai-cells = <0>;
status = "disabled";

ports {
- hdmi_in: port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hdmi_in: port@0 {
+ reg = <0>;
+
hdmi_in_vop: endpoint {
remote-endpoint = <&vop_out_hdmi>;
};
};
+
+ hdmi_out: port@1 {
+ reg = <1>;
+ };
};
};

--
2.39.2


2024-01-30 18:05:26

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v1 2/6] dt-bindings: display: rockchip,dw-hdmi: add power-domains property

On Tue, Jan 30, 2024 at 03:57:23PM +0100, Johan Jonker wrote:
> Most Rockchip hdmi nodes are part of a power domain.
> Add a power-domains property.

Acked-by: Conor Dooley <[email protected]>

> Fix example.

Just a note, in the future please explain why simply reordering the
properties constitutes "fixing" the example. I figure your intention is
to align with the (new) documentation about property ordering.

Thanks,
Conor.

>
> Signed-off-by: Johan Jonker <[email protected]>
> ---
> .../bindings/display/rockchip/rockchip,dw-hdmi.yaml | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> index cd0a42f35f24..6f421740b613 100644
> --- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> @@ -94,6 +94,9 @@ properties:
> - const: default
> - const: unwedge
>
> + power-domains:
> + maxItems: 1
> +
> ports:
> $ref: /schemas/graph.yaml#/properties/ports
>
> @@ -141,16 +144,18 @@ examples:
> #include <dt-bindings/clock/rk3288-cru.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/power/rk3288-power.h>
>
> hdmi: hdmi@ff980000 {
> compatible = "rockchip,rk3288-dw-hdmi";
> reg = <0xff980000 0x20000>;
> - reg-io-width = <4>;
> - ddc-i2c-bus = <&i2c5>;
> - rockchip,grf = <&grf>;
> interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>;
> clock-names = "iahb", "isfr";
> + ddc-i2c-bus = <&i2c5>;
> + power-domains = <&power RK3288_PD_VIO>;
> + reg-io-width = <4>;
> + rockchip,grf = <&grf>;
>
> ports {
> #address-cells = <1>;
> --
> 2.39.2
>
>


Attachments:
(No filename) (2.07 kB)
signature.asc (235.00 B)
Download all attachments

2024-01-30 18:19:01

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v1 1/6] dt-bindings: display: rockchip: rockchip,dw-hdmi: deprecate port property

On Tue, Jan 30, 2024 at 03:55:43PM +0100, Johan Jonker wrote:
> The hdmi-connector nodes are now functional and the new way to model
> hdmi nodes with, so deprecate the port property and

This doesn't really explain what makes having hdmi-connector nodes
replace the usecase for "port".

> make port@0 and
> port@1 a requirement.

Why?

> Also update example.

"Also do x" is a red flag when it comes to commit messages, as it
immediately makes me think that this should be more than one commit.
I'd probably write this as "Update the example to avoid use of the
deprecated property" or something to avoid bad gut reactions.
That's not worth resending for though obviously...

>
> Signed-off-by: Johan Jonker <[email protected]>
> ---
> .../display/rockchip/rockchip,dw-hdmi.yaml | 27 ++++++++++++++++---
> 1 file changed, 23 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> index 7e59dee15a5f..cd0a42f35f24 100644
> --- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> @@ -97,8 +97,11 @@ properties:
> ports:
> $ref: /schemas/graph.yaml#/properties/ports
>
> - patternProperties:
> - "^port(@0)?$":
> + properties:
> + port:
> + $ref: /schemas/graph.yaml#/properties/port
> + deprecated: true

This change makes the deprecated property's description incomplete,
since it doesn't cover the endpoints any more. It also doesn't make
port@0 and port mutually exclusive.
I think I'd just be inclined to delete the "port" bit entirely from the
binding if you're not gonna preserve the description of what that
property was meant to be. Otherwise, I'd be doing something like:
@@ -112,6 +112,8 @@ properties:
endpoint@1:
description: Connection to the VOPL
properties:
+ port:
+ deprecated: true
port@1:
$ref: /schemas/graph.yaml#/properties/port
description: Output of the DWC HDMI TX

So that the description of the deprecated property is maintained.

Cheers,
Conor.

> + port@0:
> $ref: /schemas/graph.yaml#/properties/port
> description: Input of the DWC HDMI TX
> properties:
> @@ -108,11 +111,14 @@ properties:
> description: Connection to the VOPB
> endpoint@1:
> description: Connection to the VOPL
> - properties:
> port@1:
> $ref: /schemas/graph.yaml#/properties/port
> description: Output of the DWC HDMI TX
>
> + required:
> + - port@0
> + - port@1
> +
> rockchip,grf:
> $ref: /schemas/types.yaml#/definitions/phandle
> description:
> @@ -147,7 +153,11 @@ examples:
> clock-names = "iahb", "isfr";
>
> ports {
> - port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> #address-cells = <1>;
> #size-cells = <0>;
>
> @@ -155,11 +165,20 @@ examples:
> reg = <0>;
> remote-endpoint = <&vopb_out_hdmi>;
> };
> +
> hdmi_in_vopl: endpoint@1 {
> reg = <1>;
> remote-endpoint = <&vopl_out_hdmi>;
> };
> };
> +
> + port@1 {
> + reg = <1>;
> +
> + hdmi_out_con: endpoint {
> + remote-endpoint = <&hdmi_con_in>;
> + };
> + };
> };
> };
>
> --
> 2.39.2
>


Attachments:
(No filename) (3.77 kB)
signature.asc (235.00 B)
Download all attachments

2024-01-31 14:03:21

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v1 2/6] dt-bindings: display: rockchip,dw-hdmi: add power-domains property

On Tue, Jan 30, 2024 at 03:57:23PM +0100, Johan Jonker wrote:
> Most Rockchip hdmi nodes are part of a power domain.
> Add a power-domains property. Fix example.
>
> Signed-off-by: Johan Jonker <[email protected]>
> ---
> .../bindings/display/rockchip/rockchip,dw-hdmi.yaml | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> index cd0a42f35f24..6f421740b613 100644
> --- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> @@ -94,6 +94,9 @@ properties:
> - const: default
> - const: unwedge
>
> + power-domains:
> + maxItems: 1
> +
> ports:
> $ref: /schemas/graph.yaml#/properties/ports
>
> @@ -141,16 +144,18 @@ examples:
> #include <dt-bindings/clock/rk3288-cru.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/power/rk3288-power.h>
>
> hdmi: hdmi@ff980000 {
> compatible = "rockchip,rk3288-dw-hdmi";
> reg = <0xff980000 0x20000>;
> - reg-io-width = <4>;

It makes more sense to keep reg-io-width together with reg.

> - ddc-i2c-bus = <&i2c5>;
> - rockchip,grf = <&grf>;
> interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>;
> clock-names = "iahb", "isfr";
> + ddc-i2c-bus = <&i2c5>;
> + power-domains = <&power RK3288_PD_VIO>;
> + reg-io-width = <4>;
> + rockchip,grf = <&grf>;
>
> ports {
> #address-cells = <1>;
> --
> 2.39.2
>

2024-01-31 14:43:37

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v1 1/6] dt-bindings: display: rockchip: rockchip,dw-hdmi: deprecate port property

On Tue, Jan 30, 2024 at 06:18:49PM +0000, Conor Dooley wrote:
> On Tue, Jan 30, 2024 at 03:55:43PM +0100, Johan Jonker wrote:
> > The hdmi-connector nodes are now functional and the new way to model
> > hdmi nodes with, so deprecate the port property and
>
> This doesn't really explain what makes having hdmi-connector nodes
> replace the usecase for "port".
>
> > make port@0 and
> > port@1 a requirement.
>
> Why?

That means the deprecated way will always have warnings which makes
documenting the deprecated stuff a bit pointless. Technically, new
required properties are ABI break and something I'm working on making
the tools check (by comparing 2 versions of schemas). That said, if all
the upstream dts files are fixed already, then I don't care too much.


> > Also update example.
>
> "Also do x" is a red flag when it comes to commit messages, as it
> immediately makes me think that this should be more than one commit.
> I'd probably write this as "Update the example to avoid use of the
> deprecated property" or something to avoid bad gut reactions.
> That's not worth resending for though obviously...
>
> >
> > Signed-off-by: Johan Jonker <[email protected]>
> > ---
> > .../display/rockchip/rockchip,dw-hdmi.yaml | 27 ++++++++++++++++---
> > 1 file changed, 23 insertions(+), 4 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> > index 7e59dee15a5f..cd0a42f35f24 100644
> > --- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> > +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml
> > @@ -97,8 +97,11 @@ properties:
> > ports:
> > $ref: /schemas/graph.yaml#/properties/ports
> >
> > - patternProperties:
> > - "^port(@0)?$":
> > + properties:
> > + port:
> > + $ref: /schemas/graph.yaml#/properties/port
> > + deprecated: true
>
> This change makes the deprecated property's description incomplete,
> since it doesn't cover the endpoints any more. It also doesn't make
> port@0 and port mutually exclusive.

graph.yaml has a check that effectively does that.

Rob