dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: display: samsung, exynos5-dp: convert to DT Schema
@ 2024-03-13 18:28 Krzysztof Kozlowski
  2024-03-20 17:04 ` [PATCH v2] dt-bindings: display: samsung,exynos5-dp: " Conor Dooley
  2024-03-25 14:36 ` Rob Herring
  0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-13 18:28 UTC (permalink / raw)
  To: Inki Dae, Seung-Woo Kim, Kyungmin Park, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar,
	dri-devel, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel
  Cc: Krzysztof Kozlowski

Convert Samsung Exynos5250/5420 SoC Display Port Controller bindings to
DT schema with a change: add power-domains, already used in DTS.

This Display Port controller is actually variant of Analogix Display
Port bridge, however new DT Schema does not reference analogix,dp.yaml,
because of incompatibilities in the driver.  The analogix,dp.yaml
expects two ports, input and output, but Linux Exynos DP DRM driver and
DTS use only one port: output.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Changes in v2:
1. Document deprecated samsung,hpd-gpios
---
 .../bindings/display/exynos/exynos_dp.txt     | 112 ------------
 .../display/samsung/samsung,exynos5-dp.yaml   | 163 ++++++++++++++++++
 2 files changed, 163 insertions(+), 112 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
 create mode 100644 Documentation/devicetree/bindings/display/samsung/samsung,exynos5-dp.yaml

diff --git a/Documentation/devicetree/bindings/display/exynos/exynos_dp.txt b/Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
deleted file mode 100644
index 3a401590320f..000000000000
--- a/Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
+++ /dev/null
@@ -1,112 +0,0 @@
-The Exynos display port interface should be configured based on
-the type of panel connected to it.
-
-We use two nodes:
-	-dp-controller node
-	-dptx-phy node(defined inside dp-controller node)
-
-For the DP-PHY initialization, we use the dptx-phy node.
-Required properties for dptx-phy: deprecated, use phys and phy-names
-	-reg: deprecated
-		Base address of DP PHY register.
-	-samsung,enable-mask: deprecated
-		The bit-mask used to enable/disable DP PHY.
-
-For the Panel initialization, we read data from dp-controller node.
-Required properties for dp-controller:
-	-compatible:
-		should be "samsung,exynos5-dp".
-	-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:
-	-interlaced:
-		interlace scan mode.
-			Progressive if defined, Interlaced if not defined
-	-vsync-active-high:
-		VSYNC polarity configuration.
-			High if defined, Low if not defined
-	-hsync-active-high:
-		HSYNC polarity configuration.
-			High if defined, Low if not defined
-	-samsung,hpd-gpio:
-		Hotplug detect GPIO.
-			Indicates which GPIO should be used for hotplug
-			detection
-	-video interfaces: Device node can contain video interface port
-			nodes according to [1].
-	- display-timings: timings for the connected panel as described by
-		Documentation/devicetree/bindings/display/panel/display-timing.txt
-
-For the below properties, please refer to Analogix DP binding document:
- * Documentation/devicetree/bindings/display/bridge/analogix,dp.yaml
-	-phys (required)
-	-phy-names (required)
-	-hpd-gpios (optional)
-	 force-hpd (optional)
-
-Deprecated properties for DisplayPort:
--interlaced:            deprecated prop that can parsed from drm_display_mode.
--vsync-active-high:     deprecated prop that can parsed from drm_display_mode.
--hsync-active-high:     deprecated prop that can parsed from drm_display_mode.
--samsung,ycbcr-coeff:   deprecated prop that can parsed from drm_display_mode.
--samsung,dynamic-range: deprecated prop that can parsed from drm_display_mode.
--samsung,color-space:   deprecated prop that can parsed from drm_display_info.
--samsung,color-depth:   deprecated prop that can parsed from drm_display_info.
--samsung,link-rate:     deprecated prop that can reading from monitor by dpcd method.
--samsung,lane-count:    deprecated prop that can reading from monitor by dpcd method.
--samsung,hpd-gpio:      deprecated name for hpd-gpios.
-
--------------------------------------------------------------------------------
-
-Example:
-
-SOC specific portion:
-	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";
-	};
-
-Board Specific portion:
-	dp-controller {
-		display-timings {
-			native-mode = <&lcd_timing>;
-			lcd_timing: 1366x768 {
-				clock-frequency = <70589280>;
-				hactive = <1366>;
-				vactive = <768>;
-				hfront-porch = <40>;
-				hback-porch = <40>;
-				hsync-len = <32>;
-				vback-porch = <10>;
-				vfront-porch = <12>;
-				vsync-len = <6>;
-			};
-		};
-
-		ports {
-			port@0 {
-				dp_out: endpoint {
-					remote-endpoint = <&bridge_in>;
-				};
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/display/samsung/samsung,exynos5-dp.yaml b/Documentation/devicetree/bindings/display/samsung/samsung,exynos5-dp.yaml
new file mode 100644
index 000000000000..dda9097a7911
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/samsung/samsung,exynos5-dp.yaml
@@ -0,0 +1,163 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/samsung/samsung,exynos5-dp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos5250/Exynos5420 SoC Display Port
+
+maintainers:
+  - Inki Dae <inki.dae@samsung.com>
+  - Seung-Woo Kim <sw0312.kim@samsung.com>
+  - Kyungmin Park <kyungmin.park@samsung.com>
+  - Krzysztof Kozlowski <krzk@kernel.org>
+
+properties:
+  compatible:
+    const: samsung,exynos5-dp
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: dp
+
+  display-timings:
+    $ref: /schemas/display/panel/display-timings.yaml#
+
+  interrupts:
+    maxItems: 1
+
+  hpd-gpios:
+    description:
+      Hotplug detect GPIO.
+      Indicates which GPIO should be used for hotplug detection
+
+  phys:
+    maxItems: 1
+
+  phy-names:
+    items:
+      - const: dp
+
+  power-domains:
+    maxItems: 1
+
+  interlaced:
+    type: boolean
+    deprecated: true
+    description:
+      Interlace scan mode. Progressive if defined, interlaced if not defined.
+
+  vsync-active-high:
+    type: boolean
+    deprecated: true
+    description:
+      VSYNC polarity configuration. High if defined, low if not defined
+
+  hsync-active-high:
+    type: boolean
+    deprecated: true
+    description:
+      HSYNC polarity configuration. High if defined, low if not defined
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port:
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
+          Port node with one endpoint connected to a dp-connector node.
+
+    required:
+      - port
+
+  samsung,hpd-gpios:
+    maxItems: 1
+    deprecated: true
+
+  samsung,ycbcr-coeff:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    deprecated: true
+    description:
+      Deprecated prop that can parsed from drm_display_mode.
+
+  samsung,dynamic-range:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    deprecated: true
+    description:
+      Deprecated prop that can parsed from drm_display_mode.
+
+  samsung,color-space:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    deprecated: true
+    description:
+      Deprecated prop that can parsed from drm_display_info.
+
+  samsung,color-depth:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    deprecated: true
+    description:
+      Deprecated prop that can parsed from drm_display_info.
+
+  samsung,link-rate:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    deprecated: true
+    description:
+      Deprecated prop that can reading from monitor by dpcd method.
+
+  samsung,lane-count:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    deprecated: true
+    description:
+      Deprecated prop that can reading from monitor by dpcd method.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - interrupts
+  - phys
+  - phy-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/exynos5250.h>
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    dp-controller@145b0000 {
+        compatible = "samsung,exynos5-dp";
+        reg = <0x145b0000 0x1000>;
+        clocks = <&clock CLK_DP>;
+        clock-names = "dp";
+        interrupts = <10 3>;
+        interrupt-parent = <&combiner>;
+        phys = <&dp_phy>;
+        phy-names = "dp";
+        pinctrl-0 = <&dp_hpd>;
+        pinctrl-names = "default";
+        power-domains = <&pd_disp1>;
+
+        samsung,color-space = <0>;
+        samsung,color-depth = <1>;
+        samsung,link-rate = <0x0a>;
+        samsung,lane-count = <2>;
+        hpd-gpios = <&gpx0 7 GPIO_ACTIVE_HIGH>;
+
+        ports {
+            port {
+                dp_out: endpoint {
+                    remote-endpoint = <&bridge_in>;
+                };
+            };
+        };
+    };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: display: samsung,exynos5-dp: convert to DT Schema
  2024-03-13 18:28 [PATCH v2] dt-bindings: display: samsung, exynos5-dp: convert to DT Schema Krzysztof Kozlowski
@ 2024-03-20 17:04 ` Conor Dooley
  2024-03-21  7:37   ` Krzysztof Kozlowski
  2024-03-25 14:36 ` Rob Herring
  1 sibling, 1 reply; 5+ messages in thread
From: Conor Dooley @ 2024-03-20 17:04 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Inki Dae, Seung-Woo Kim, Kyungmin Park, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar,
	dri-devel, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

On Wed, Mar 13, 2024 at 07:28:55PM +0100, Krzysztof Kozlowski wrote:

> +  clock-names:
> +    items:
> +      - const: dp

> +  phy-names:
> +    items:
> +      - const: dp

The items lists here are redundant when you only have a single item, no?
Isnt it just
phy-names:
  const: dp
?

Otherwise,
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: display: samsung,exynos5-dp: convert to DT Schema
  2024-03-20 17:04 ` [PATCH v2] dt-bindings: display: samsung,exynos5-dp: " Conor Dooley
@ 2024-03-21  7:37   ` Krzysztof Kozlowski
  2024-03-21 13:13     ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-21  7:37 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Inki Dae, Seung-Woo Kim, Kyungmin Park, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alim Akhtar,
	dri-devel, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

On 20/03/2024 18:04, Conor Dooley wrote:
> On Wed, Mar 13, 2024 at 07:28:55PM +0100, Krzysztof Kozlowski wrote:
> 
>> +  clock-names:
>> +    items:
>> +      - const: dp
> 
>> +  phy-names:
>> +    items:
>> +      - const: dp
> 
> The items lists here are redundant when you only have a single item, no?
> Isnt it just
> phy-names:
>   const: dp

Somehow the convention for properties was to define the list. Unlike for
compatible where we use shorter syntax like you propose. Shall we change
the approach and use shorter syntax in general?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: display: samsung,exynos5-dp: convert to DT Schema
  2024-03-21  7:37   ` Krzysztof Kozlowski
@ 2024-03-21 13:13     ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2024-03-21 13:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Conor Dooley, Inki Dae, Seung-Woo Kim, Kyungmin Park,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Krzysztof Kozlowski, Conor Dooley,
	Alim Akhtar, dri-devel, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

On Thu, Mar 21, 2024 at 08:37:15AM +0100, Krzysztof Kozlowski wrote:
> On 20/03/2024 18:04, Conor Dooley wrote:
> > On Wed, Mar 13, 2024 at 07:28:55PM +0100, Krzysztof Kozlowski wrote:
> > 
> >> +  clock-names:
> >> +    items:
> >> +      - const: dp
> > 
> >> +  phy-names:
> >> +    items:
> >> +      - const: dp
> > 
> > The items lists here are redundant when you only have a single item, no?
> > Isnt it just
> > phy-names:
> >   const: dp
> 
> Somehow the convention for properties was to define the list. Unlike for
> compatible where we use shorter syntax like you propose. Shall we change
> the approach and use shorter syntax in general?

I guess the difference is -names is usually more than 1 whereas 
compatible is frequently only 1. Either way is fine I think.

Rob

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: display: samsung,exynos5-dp: convert to DT Schema
  2024-03-13 18:28 [PATCH v2] dt-bindings: display: samsung, exynos5-dp: convert to DT Schema Krzysztof Kozlowski
  2024-03-20 17:04 ` [PATCH v2] dt-bindings: display: samsung,exynos5-dp: " Conor Dooley
@ 2024-03-25 14:36 ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring @ 2024-03-25 14:36 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Inki Dae, devicetree, Seung-Woo Kim, linux-samsung-soc,
	Conor Dooley, Alim Akhtar, Maxime Ripard, Maarten Lankhorst,
	David Airlie, Daniel Vetter, Krzysztof Kozlowski, dri-devel,
	linux-arm-kernel, Thomas Zimmermann, Kyungmin Park, linux-kernel


On Wed, 13 Mar 2024 19:28:55 +0100, Krzysztof Kozlowski wrote:
> Convert Samsung Exynos5250/5420 SoC Display Port Controller bindings to
> DT schema with a change: add power-domains, already used in DTS.
> 
> This Display Port controller is actually variant of Analogix Display
> Port bridge, however new DT Schema does not reference analogix,dp.yaml,
> because of incompatibilities in the driver.  The analogix,dp.yaml
> expects two ports, input and output, but Linux Exynos DP DRM driver and
> DTS use only one port: output.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Changes in v2:
> 1. Document deprecated samsung,hpd-gpios
> ---
>  .../bindings/display/exynos/exynos_dp.txt     | 112 ------------
>  .../display/samsung/samsung,exynos5-dp.yaml   | 163 ++++++++++++++++++
>  2 files changed, 163 insertions(+), 112 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/exynos/exynos_dp.txt
>  create mode 100644 Documentation/devicetree/bindings/display/samsung/samsung,exynos5-dp.yaml
> 

Applied, thanks!


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-25 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13 18:28 [PATCH v2] dt-bindings: display: samsung, exynos5-dp: convert to DT Schema Krzysztof Kozlowski
2024-03-20 17:04 ` [PATCH v2] dt-bindings: display: samsung,exynos5-dp: " Conor Dooley
2024-03-21  7:37   ` Krzysztof Kozlowski
2024-03-21 13:13     ` Rob Herring
2024-03-25 14:36 ` 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).