diff mbox series

[v1,1/2] dt-bindings: display: panel: Add Starry-er88577 support

Message ID 20240509064959.23550-2-lvzhaoxiong@huaqin.corp-partner.google.com (mailing list archive)
State New, archived
Headers show
Series Add starry bindings and driver | expand

Commit Message

Zhaoxiong Lv May 9, 2024, 6:49 a.m. UTC
Create a new dt-scheam for the Starry-er88577.

Signed-off-by: Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
---
 .../display/panel/starry,er88577.yaml         | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/starry,er88577.yaml

Comments

Krzysztof Kozlowski May 9, 2024, 8:40 a.m. UTC | #1
On 09/05/2024 08:49, Zhaoxiong Lv wrote:
> Create a new dt-scheam for the Starry-er88577.

typo, but anyway, this is not a "dt-schema".

Describe hardware instead in one sentence.

> 
> Signed-off-by: Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
> ---
>  .../display/panel/starry,er88577.yaml         | 59 +++++++++++++++++++
>  1 file changed, 59 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/starry,er88577.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/starry,er88577.yaml b/Documentation/devicetree/bindings/display/panel/starry,er88577.yaml
> new file mode 100644
> index 000000000000..6686beaf0f16
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/starry,er88577.yaml
> @@ -0,0 +1,59 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/starry,er88577.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Starry Display ER88577 based MIPI-DSI panels
> +
> +description: |

Do not need '|' unless you need to preserve formatting.


> +  -This binding is for display panels using an ER88577 controller

No need to say binding is a binding. Describe hardware instead.

> +
> +maintainers:
> +  - Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: starry,er88577
> +
> +  pp3300-supply: true
> +  reg: true

Hm, I wonder why we do not have constraints here in most of the bindings...

Anyway, keep the same order as in required:

> +
> +required:
> +  - compatible
> +  - reg
> +  - enable-gpios
> +  - pp3300-supply
> +  - backlight
> +  - port
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>

You include this header for?

> +
> +    dsi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        panel: panel@0 {
> +            compatible = "starry,er88577";
> +            reg = <0>;
> +            enable-gpios = <&pio 98 0>;

And here do not use it? Use the define.


Best regards,
Krzysztof
Krzysztof Kozlowski May 9, 2024, 9:19 a.m. UTC | #2
On 09/05/2024 10:40, Krzysztof Kozlowski wrote:
> 
>> +
>> +maintainers:
>> +  - Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
>> +
>> +allOf:
>> +  - $ref: panel-common.yaml#
>> +
>> +properties:
>> +  compatible:
>> +    const: starry,er88577
>> +
>> +  pp3300-supply: true
>> +  reg: true
> 
> Hm, I wonder why we do not have constraints here in most of the bindings...
> 

I'll send a patchset adding maxItems to other cases, so please use
maxItems here instead.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/starry,er88577.yaml b/Documentation/devicetree/bindings/display/panel/starry,er88577.yaml
new file mode 100644
index 000000000000..6686beaf0f16
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/starry,er88577.yaml
@@ -0,0 +1,59 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/starry,er88577.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Starry Display ER88577 based MIPI-DSI panels
+
+description: |
+  -This binding is for display panels using an ER88577 controller
+
+maintainers:
+  - Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    const: starry,er88577
+
+  pp3300-supply: true
+  reg: true
+
+required:
+  - compatible
+  - reg
+  - enable-gpios
+  - pp3300-supply
+  - backlight
+  - port
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    dsi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        panel: panel@0 {
+            compatible = "starry,er88577";
+            reg = <0>;
+            enable-gpios = <&pio 98 0>;
+            pinctrl-names = "default";
+            pinctrl-0 = <&panel_pins_default>;
+            pp3300-supply = <&en_pp6000_mipi_disp>;
+            backlight = <&backlight_lcd0>;
+            rotation = <90>;
+            port {
+                panel_in: endpoint {
+                    remote-endpoint = <&dsi_out>;
+                };
+            };
+        };
+    };
+
+...