diff mbox series

[2/4,v2] drm/panel: simple: Add TI nspire panel bindings

Message ID 20190805085847.25554-3-linus.walleij@linaro.org
State New
Headers show
Series None | expand

Commit Message

Linus Walleij Aug. 5, 2019, 8:58 a.m. UTC
Add bindings for the TI NSPIRE simple display panels.

Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
ChangeLog v1->v2:
- New patch as bindings are required
- Let's use YAML
---
 .../bindings/display/panel/ti,nspire.yaml     | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/ti,nspire.yaml

-- 
2.21.0

Comments

Rob Herring (Arm) Aug. 5, 2019, 3:28 p.m. UTC | #1
On Mon, Aug 5, 2019 at 2:59 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>

> Add bindings for the TI NSPIRE simple display panels.

>

> Cc: devicetree@vger.kernel.org

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

> ChangeLog v1->v2:

> - New patch as bindings are required

> - Let's use YAML

> ---

>  .../bindings/display/panel/ti,nspire.yaml     | 36 +++++++++++++++++++

>  1 file changed, 36 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/display/panel/ti,nspire.yaml

>

> diff --git a/Documentation/devicetree/bindings/display/panel/ti,nspire.yaml b/Documentation/devicetree/bindings/display/panel/ti,nspire.yaml

> new file mode 100644

> index 000000000000..fa81602a922a

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/display/panel/ti,nspire.yaml

> @@ -0,0 +1,36 @@

> +# SPDX-License-Identifier: (GPL-2.0+ OR X11)


I think you want MIT rather than X11. However, the preference on new
bindings is (GPL-2.0-only OR BSD-2-Clause).

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/display/panel/ti,nspire.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: Texas Instruments NSPIRE Display Panels

> +

> +maintainers:

> +  - Linus Walleij <linus.walleij@linaro.org>

> +

> +properties:

> +  compatible:

> +    oneOf:

> +      - items:


You can drop this. Just 'enum' is sufficient.

> +          - enum:

> +              - ti,nspire-cx-lcd-panel

> +              - ti,nspire-classic-lcd-panel

> +

> +required:

> +  - compatible

> +

> +additionalProperties: false

> +

> +examples:

> +  - |

> +    panel {

> +        compatible = "ti,nspire-cx-lcd-panel";

> +        ports {

> +           port {


You need to capture that there's a single port in the schema. There's
not really a lot of examples for this yet, but you should add:

allOf:
  - $ref: panel-common.yaml#

With a single port, you can drop 'ports' or you can keep it. If you do
the latter, then you need to define 'ports' and then 'port' in your
schema. The common schema is only sufficient if you have a single
'port' node otherwise you need to define what's under 'ports'.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/ti,nspire.yaml b/Documentation/devicetree/bindings/display/panel/ti,nspire.yaml
new file mode 100644
index 000000000000..fa81602a922a
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/ti,nspire.yaml
@@ -0,0 +1,36 @@ 
+# SPDX-License-Identifier: (GPL-2.0+ OR X11)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/ti,nspire.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments NSPIRE Display Panels
+
+maintainers:
+  - Linus Walleij <linus.walleij@linaro.org>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - ti,nspire-cx-lcd-panel
+              - ti,nspire-classic-lcd-panel
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    panel {
+        compatible = "ti,nspire-cx-lcd-panel";
+        ports {
+    	    port {
+                panel_in: endpoint {
+                    remote-endpoint = <&pads>;
+                };
+            };
+        };
+    };