diff mbox series

[2/4] dt-bindings: display: add binding for simple-dbi panels

Message ID 20210802063538.75583-3-icenowy@sipeed.com (mailing list archive)
State New, archived
Headers show
Series Add simple-dbi tinydrm driver | expand

Commit Message

Icenowy Zheng Aug. 2, 2021, 6:35 a.m. UTC
As we're going to introduce a driver for MIPI DBI panels that need only
standard MIPI-DCS commands to initialize (usually because the controller
has some configuration pre-programmed), add a DT binding file for it,
which now includes only one DBI Type C Option 3 panel, ZSX154-B1206.

Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
---
 .../bindings/display/simple-dbi.yaml          | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/simple-dbi.yaml

Comments

Rob Herring Aug. 6, 2021, 9:46 p.m. UTC | #1
On Mon, Aug 02, 2021 at 02:35:36PM +0800, Icenowy Zheng wrote:
> As we're going to introduce a driver for MIPI DBI panels that need only
> standard MIPI-DCS commands to initialize (usually because the controller
> has some configuration pre-programmed), add a DT binding file for it,
> which now includes only one DBI Type C Option 3 panel, ZSX154-B1206.
> 
> Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
> ---
>  .../bindings/display/simple-dbi.yaml          | 72 +++++++++++++++++++
>  1 file changed, 72 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/simple-dbi.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/simple-dbi.yaml b/Documentation/devicetree/bindings/display/simple-dbi.yaml
> new file mode 100644
> index 000000000000..f49b0fda0935
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/simple-dbi.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: GPL-2.0-only

checkpatch.pl will tell you this should be dual licensed.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/simple-dbi.yaml b/Documentation/devicetree/bindings/display/simple-dbi.yaml
new file mode 100644
index 000000000000..f49b0fda0935
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/simple-dbi.yaml
@@ -0,0 +1,72 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/simple-dbi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic MIPI DCS-compatible DBI panels Device Tree Bindings
+
+maintainers:
+  - Icenowy Zheng <icenowy@sipeed.com>
+
+description:
+  This binding is for display panels that utilizes MIPI DBI Type C, follows
+  MIPI DCS and needs no vendor-specific initialization commands.
+
+properties:
+  compatible:
+    oneOf:
+      - description:
+          Zhishengxin ZSX154-B1206 1.54" 240x240 SPI LCD
+        items:
+          - const: zsx,zsx154-b1206
+
+  spi-max-frequency:
+    maximum: 30000000
+
+  dc-gpios:
+    maxItems: 1
+    description: Display data/command selection (D/CX)
+
+  backlight: true
+  reg: true
+  reset-gpios: true
+  rotation: true
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - $ref: panel/panel-common.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: zsx,zsx154-b1206
+
+    then:
+      required:
+        - dc-gpios
+        - reset-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    spi {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            display@0 {
+                    compatible = "zsx,zsx154-b1206";
+                    reg = <0>;
+                    spi-max-frequency = <30000000>;
+                    dc-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>;
+                    reset-gpios = <&r_pio 2 21 GPIO_ACTIVE_HIGH>;
+            };
+    };
+
+...