* [PATCH] dt-bindings: display: analogix_dp.txt: convert to yaml
@ 2020-04-24 11:26 Ricardo Cañuelo
2020-05-11 21:31 ` Rob Herring
2020-05-11 21:38 ` Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Ricardo Cañuelo @ 2020-04-24 11:26 UTC (permalink / raw)
To: devicetree; +Cc: robh+dt, kernel, dri-devel, ykk
This converts the DT binding for the Analogix DP bridge used in
the Exynos 5 and Rockchip RK3288/RK3399 SoCs to yaml.
Changes from the original binding:
- phy and phy-names aren't defined as 'required' (rk3399-evb.dts doesn't
define them)
Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
---
This binding is meant to be used in conjunction with
Documentation/bindings/display/rockchip/analogix_dp-rockchip.txt
and
Documentation/bindings/display/exynos/exynos_dp.txt
I was careful to define the bindings to be flexible enough for both
cases, since the properties might be slightly different depending
on the SoC.
Tested with
make dt_binding_check ARCH=arm64 DT_SCHEMA_FILES=<...analogix_dp.yaml>
make dtbs_check ARCH=arm64 DT_SCHEMA_FILES=<...analogix_dp.yaml>
.../bindings/display/bridge/analogix_dp.txt | 51 --------
.../bindings/display/bridge/analogix_dp.yaml | 120 ++++++++++++++++++
2 files changed, 120 insertions(+), 51 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/display/bridge/analogix_dp.txt
create mode 100644 Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/analogix_dp.txt b/Documentation/devicetree/bindings/display/bridge/analogix_dp.txt
deleted file mode 100644
index 027d76c27a41..000000000000
--- a/Documentation/devicetree/bindings/display/bridge/analogix_dp.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-Analogix Display Port bridge bindings
-
-Required properties for dp-controller:
- -compatible:
- platform specific such as:
- * "samsung,exynos5-dp"
- * "rockchip,rk3288-dp"
- * "rockchip,rk3399-edp"
- -reg:
- physical base address of the controller and length
- of memory mapped region.
- -interrupts:
- interrupt combiner values.
- -clocks:
- from common clock binding: handle to dp clock.
- -clock-names:
- from common clock binding: Shall be "dp".
- -phys:
- from general PHY binding: the phandle for the PHY device.
- -phy-names:
- from general PHY binding: Should be "dp".
-
-Optional properties for dp-controller:
- -force-hpd:
- Indicate driver need force hpd when hpd detect failed, this
- is used for some eDP screen which don't have hpd signal.
- -hpd-gpios:
- Hotplug detect GPIO.
- Indicates which GPIO should be used for hotplug detection
- -port@[X]: SoC specific port nodes with endpoint definitions as defined
- in Documentation/devicetree/bindings/media/video-interfaces.txt,
- please refer to the SoC specific binding document:
- * Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
- * Documentation/devicetree/bindings/display/rockchip/analogix_dp-rockchip.txt
-
-[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
--------------------------------------------------------------------------------
-
-Example:
-
- dp-controller {
- compatible = "samsung,exynos5-dp";
- reg = <0x145b0000 0x10000>;
- interrupts = <10 3>;
- interrupt-parent = <&combiner>;
- clocks = <&clock 342>;
- clock-names = "dp";
-
- phys = <&dp_phy>;
- phy-names = "dp";
- };
diff --git a/Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml b/Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml
new file mode 100644
index 000000000000..a29a79d92c4b
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml
@@ -0,0 +1,120 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/analogix_dp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analogix Display Port bridge bindings
+
+maintainers:
+ - Yakir Yang <ykk@rock-chips.com>
+
+description: |
+ The Samsung Exynos eDP and Rockchip RK3288 eDP controllers share the
+ same IP. This binding describes the nodes and properties that are
+ common to both SoCs.
+
+ Please, read this together with
+ Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
+ and
+ Documentation/devicetree/bindings/display/rockchip/analogix_dp-rockchip.txt
+
+properties:
+ compatible:
+ enum:
+ - samsung,exynos5-dp
+ - rockchip,rk3288-dp
+ - rockchip,rk3399-edp
+
+ reg:
+ maxItems: 1
+ description:
+ Physical base address of the controller and length of memory
+ mapped region.
+
+ interrupts:
+ maxItems: 1
+ description: Interrupt combiner values.
+
+ clocks:
+ description: Phandles to dp clocks.
+
+ clock-names:
+ minItems: 1
+ maxItems: 3
+ additionalItems: true
+ items:
+ - const: dp
+ description: Must define at least "dp".
+
+ phys:
+ maxItems: 1
+ description: Phandle for the PHY device.
+
+ phy-names:
+ const: dp
+
+ force-hpd: true
+
+ hpd-gpios:
+ maxItems: 1
+ description:
+ Hotplug Detect GPIO. Indicates which GPIO should be used for
+ hotplug detection.
+
+ ports:
+ type: object
+ description: |
+ A node containing SoC-specific port nodes with endpoint
+ definitions as documented in
+ Documentation/devicetree/bindings/media/video-interfaces.txt
+
+ Please, refer to
+ Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
+ and
+ Documentation/devicetree/bindings/display/rockchip/analogix_dp-rockchip.txt
+ for SoC-specific information about port and endpoint definitions.
+
+ properties:
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ port@0:
+ type: object
+
+ properties:
+ reg:
+ const: 0
+
+ port@1:
+ type: object
+
+ properties:
+ reg:
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
+examples:
+ - |
+ dp: dp-controller@145b0000 {
+ compatible = "samsung,exynos5-dp";
+ reg = <0x145b0000 0x10000>;
+ interrupts = <10 3>;
+ interrupt-parent = <&combiner>;
+ clocks = <&clock 342>;
+ clock-names = "dp";
+
+ phys = <&dp_phy>;
+ phy-names = "dp";
+ };
+
+...
--
2.18.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: display: analogix_dp.txt: convert to yaml
2020-04-24 11:26 [PATCH] dt-bindings: display: analogix_dp.txt: convert to yaml Ricardo Cañuelo
@ 2020-05-11 21:31 ` Rob Herring
2020-05-13 8:42 ` Ricardo Cañuelo
2020-05-11 21:38 ` Rob Herring
1 sibling, 1 reply; 4+ messages in thread
From: Rob Herring @ 2020-05-11 21:31 UTC (permalink / raw)
To: Ricardo Cañuelo; +Cc: devicetree, kernel, dri-devel, ykk
On Fri, Apr 24, 2020 at 01:26:34PM +0200, Ricardo Cañuelo wrote:
> This converts the DT binding for the Analogix DP bridge used in
> the Exynos 5 and Rockchip RK3288/RK3399 SoCs to yaml.
>
> Changes from the original binding:
> - phy and phy-names aren't defined as 'required' (rk3399-evb.dts doesn't
> define them)
>
> Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
> ---
> This binding is meant to be used in conjunction with
> Documentation/bindings/display/rockchip/analogix_dp-rockchip.txt
> and
> Documentation/bindings/display/exynos/exynos_dp.txt
>
> I was careful to define the bindings to be flexible enough for both
> cases, since the properties might be slightly different depending
> on the SoC.
They need to be converted all at once to schema.
>
> Tested with
> make dt_binding_check ARCH=arm64 DT_SCHEMA_FILES=<...analogix_dp.yaml>
> make dtbs_check ARCH=arm64 DT_SCHEMA_FILES=<...analogix_dp.yaml>
>
> .../bindings/display/bridge/analogix_dp.txt | 51 --------
> .../bindings/display/bridge/analogix_dp.yaml | 120 ++++++++++++++++++
> 2 files changed, 120 insertions(+), 51 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/display/bridge/analogix_dp.txt
> create mode 100644 Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml
>
> diff --git a/Documentation/devicetree/bindings/display/bridge/analogix_dp.txt b/Documentation/devicetree/bindings/display/bridge/analogix_dp.txt
> deleted file mode 100644
> index 027d76c27a41..000000000000
> --- a/Documentation/devicetree/bindings/display/bridge/analogix_dp.txt
> +++ /dev/null
> @@ -1,51 +0,0 @@
> -Analogix Display Port bridge bindings
> -
> -Required properties for dp-controller:
> - -compatible:
> - platform specific such as:
> - * "samsung,exynos5-dp"
> - * "rockchip,rk3288-dp"
> - * "rockchip,rk3399-edp"
> - -reg:
> - physical base address of the controller and length
> - of memory mapped region.
> - -interrupts:
> - interrupt combiner values.
> - -clocks:
> - from common clock binding: handle to dp clock.
> - -clock-names:
> - from common clock binding: Shall be "dp".
> - -phys:
> - from general PHY binding: the phandle for the PHY device.
> - -phy-names:
> - from general PHY binding: Should be "dp".
> -
> -Optional properties for dp-controller:
> - -force-hpd:
> - Indicate driver need force hpd when hpd detect failed, this
> - is used for some eDP screen which don't have hpd signal.
> - -hpd-gpios:
> - Hotplug detect GPIO.
> - Indicates which GPIO should be used for hotplug detection
> - -port@[X]: SoC specific port nodes with endpoint definitions as defined
> - in Documentation/devicetree/bindings/media/video-interfaces.txt,
> - please refer to the SoC specific binding document:
> - * Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
> - * Documentation/devicetree/bindings/display/rockchip/analogix_dp-rockchip.txt
> -
> -[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
> --------------------------------------------------------------------------------
> -
> -Example:
> -
> - dp-controller {
> - compatible = "samsung,exynos5-dp";
> - reg = <0x145b0000 0x10000>;
> - interrupts = <10 3>;
> - interrupt-parent = <&combiner>;
> - clocks = <&clock 342>;
> - clock-names = "dp";
> -
> - phys = <&dp_phy>;
> - phy-names = "dp";
> - };
> diff --git a/Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml b/Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml
> new file mode 100644
> index 000000000000..a29a79d92c4b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml
> @@ -0,0 +1,120 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/bridge/analogix_dp.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analogix Display Port bridge bindings
> +
> +maintainers:
> + - Yakir Yang <ykk@rock-chips.com>
> +
> +description: |
> + The Samsung Exynos eDP and Rockchip RK3288 eDP controllers share the
> + same IP. This binding describes the nodes and properties that are
> + common to both SoCs.
> +
> + Please, read this together with
> + Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
> + and
> + Documentation/devicetree/bindings/display/rockchip/analogix_dp-rockchip.txt
> +
> +properties:
> + compatible:
> + enum:
> + - samsung,exynos5-dp
> + - rockchip,rk3288-dp
> + - rockchip,rk3399-edp
> +
> + reg:
> + maxItems: 1
> + description:
> + Physical base address of the controller and length of memory
> + mapped region.
That's all 'reg' properties, drop.
> +
> + interrupts:
> + maxItems: 1
> + description: Interrupt combiner values.
> +
> + clocks:
> + description: Phandles to dp clocks.
Need:
minItems: 1
maxItems: 3
> +
> + clock-names:
> + minItems: 1
> + maxItems: 3
> + additionalItems: true
> + items:
> + - const: dp
> + description: Must define at least "dp".
That's what the schema says.
> +
> + phys:
> + maxItems: 1
> + description: Phandle for the PHY device.
Drop
> +
> + phy-names:
> + const: dp
> +
> + force-hpd: true
> +
> + hpd-gpios:
> + maxItems: 1
> + description:
> + Hotplug Detect GPIO. Indicates which GPIO should be used for
> + hotplug detection.
This should be marked deprecated because this belongs in a connector
node.
> +
> + ports:
> + type: object
> + description: |
> + A node containing SoC-specific port nodes with endpoint
> + definitions as documented in
> + Documentation/devicetree/bindings/media/video-interfaces.txt
> +
> + Please, refer to
> + Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
> + and
> + Documentation/devicetree/bindings/display/rockchip/analogix_dp-rockchip.txt
> + for SoC-specific information about port and endpoint definitions.
Is the port numbering different? If so, probably should just have 2
separate schema files.
> +
> + properties:
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> + port@0:
> + type: object
Needs 'description' to say what data each port is.
> +
> + properties:
> + reg:
> + const: 0
> +
> + port@1:
> + type: object
> +
> + properties:
> + reg:
> + const: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> +
> +examples:
> + - |
> + dp: dp-controller@145b0000 {
> + compatible = "samsung,exynos5-dp";
> + reg = <0x145b0000 0x10000>;
> + interrupts = <10 3>;
> + interrupt-parent = <&combiner>;
> + clocks = <&clock 342>;
> + clock-names = "dp";
> +
> + phys = <&dp_phy>;
> + phy-names = "dp";
> + };
> +
> +...
> --
> 2.18.0
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: display: analogix_dp.txt: convert to yaml
2020-04-24 11:26 [PATCH] dt-bindings: display: analogix_dp.txt: convert to yaml Ricardo Cañuelo
2020-05-11 21:31 ` Rob Herring
@ 2020-05-11 21:38 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-05-11 21:38 UTC (permalink / raw)
To: Ricardo Cañuelo
Cc: devicetree, Collabora Kernel ML, dri-devel, Yakir Yang
On Fri, Apr 24, 2020 at 6:26 AM Ricardo Cañuelo
<ricardo.canuelo@collabora.com> wrote:
>
> This converts the DT binding for the Analogix DP bridge used in
> the Exynos 5 and Rockchip RK3288/RK3399 SoCs to yaml.
>
> Changes from the original binding:
> - phy and phy-names aren't defined as 'required' (rk3399-evb.dts doesn't
> define them)
>
> Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com>
> ---
> This binding is meant to be used in conjunction with
> Documentation/bindings/display/rockchip/analogix_dp-rockchip.txt
> and
> Documentation/bindings/display/exynos/exynos_dp.txt
>
> I was careful to define the bindings to be flexible enough for both
> cases, since the properties might be slightly different depending
> on the SoC.
>
> Tested with
> make dt_binding_check ARCH=arm64 DT_SCHEMA_FILES=<...analogix_dp.yaml>
> make dtbs_check ARCH=arm64 DT_SCHEMA_FILES=<...analogix_dp.yaml>
>
> .../bindings/display/bridge/analogix_dp.txt | 51 --------
> .../bindings/display/bridge/analogix_dp.yaml | 120 ++++++++++++++++++
> 2 files changed, 120 insertions(+), 51 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/display/bridge/analogix_dp.txt
> create mode 100644 Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml
[...]
> diff --git a/Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml b/Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml
> new file mode 100644
> index 000000000000..a29a79d92c4b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/analogix_dp.yaml
> @@ -0,0 +1,120 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/bridge/analogix_dp.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analogix Display Port bridge bindings
> +
> +maintainers:
> + - Yakir Yang <ykk@rock-chips.com>
And this email address bounces, so find a new maintainer.
Rob
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: display: analogix_dp.txt: convert to yaml
2020-05-11 21:31 ` Rob Herring
@ 2020-05-13 8:42 ` Ricardo Cañuelo
0 siblings, 0 replies; 4+ messages in thread
From: Ricardo Cañuelo @ 2020-05-13 8:42 UTC (permalink / raw)
To: Rob Herring; +Cc: airlied, devicetree, kernel, dri-devel
Hi Rob,
Thanks for reviewing the patch and I'm sorry it had so many mistakes,
this was my first attempt at converting a DT binding to schema.
On lun 11-05-2020 16:31:08, Rob Herring wrote:
> > This binding is meant to be used in conjunction with
> > Documentation/bindings/display/rockchip/analogix_dp-rockchip.txt
> > and
> > Documentation/bindings/display/exynos/exynos_dp.txt
> >
> > I was careful to define the bindings to be flexible enough for both
> > cases, since the properties might be slightly different depending
> > on the SoC.
>
> They need to be converted all at once to schema.
I'll queue that up to work on next and I'll try to come up with a good
patch series to convert the three bindings.
Cheers,
Ricardo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-13 8:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 11:26 [PATCH] dt-bindings: display: analogix_dp.txt: convert to yaml Ricardo Cañuelo
2020-05-11 21:31 ` Rob Herring
2020-05-13 8:42 ` Ricardo Cañuelo
2020-05-11 21:38 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).