diff mbox series

[DO,NOT,MERGE,v8,22/36] dt-bindings: display: smi,sm501: SMI SM501 binding json-schema

Message ID 2fb214e148e74fb0acc202543dca8dd8a170a6e6.1716965617.git.ysato@users.sourceforge.jp (mailing list archive)
State Not Applicable
Headers show
Series Device Tree support for SH7751 based board | expand

Commit Message

Yoshinori Sato May 29, 2024, 8:01 a.m. UTC
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 .../bindings/display/smi,sm501.yaml           | 443 ++++++++++++++++++
 1 file changed, 443 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/smi,sm501.yaml

Comments

Rob Herring May 29, 2024, 10:44 a.m. UTC | #1
On Wed, 29 May 2024 17:01:08 +0900, Yoshinori Sato wrote:
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> ---
>  .../bindings/display/smi,sm501.yaml           | 443 ++++++++++++++++++
>  1 file changed, 443 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/smi,sm501.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/smi,sm501.yaml: crt: Missing additionalProperties/unevaluatedProperties constraint
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/smi,sm501.yaml: panel: Missing additionalProperties/unevaluatedProperties constraint

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/2fb214e148e74fb0acc202543dca8dd8a170a6e6.1716965617.git.ysato@users.sourceforge.jp

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/smi,sm501.yaml b/Documentation/devicetree/bindings/display/smi,sm501.yaml
new file mode 100644
index 000000000000..c3ab0f08a894
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/smi,sm501.yaml
@@ -0,0 +1,443 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/smi,sm501.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silicon Motion SM501 Mobile Multimedia Companion Chip
+
+maintainers:
+  - Yoshinori Sato <ysato@user.sourceforge.jp>
+
+description:
+  Silicon Motion Inc, SM501 Companion Chip.
+
+definitions:
+  fb-flag:
+    $ref: /schemas/types.yaml#/definitions/string-array
+    description: Display initialize flags.
+    items:
+      anyOf:
+        - const: use-init-done
+        - const: disable-at-exit
+        - const: use-hwcursor
+        - const: use-hwaccel
+        - const: panel-no-fpen
+        - const: panel-no-vbiasen
+        - const: panel-inv-fpen
+        - const: panel-inv-vbiasen
+    maxItems: 8
+
+properties:
+  compatible:
+    const:
+      smi,sm501
+
+  reg:
+    maxItems: 2
+    description:
+      First entry - System Configuration registers
+      Second entry - IO space (Display Controller register)
+
+  interrupts:
+    description: SM501 interrupt to the cpu should be described here.
+
+  clocks:
+    minItems: 2
+
+  clock-names:
+    items:
+      - const: mclk
+      - const: m1xclk
+
+  mode:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Select a video mode
+
+  edid:
+    $ref: /schemas/types.yaml#/definitions/uint8-array
+    description:
+      Verbatim EDID data block describing attached display.
+      Data from the detailed timing descriptor will be used to
+      program the display controller.
+
+  smi,little-endian:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: available on big endian systems, to set different foreign endian.
+  smi,big-endian:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: available on little endian systems, to set different foreign endian.
+
+  smi,swap-fb-endian:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: swap framebuffer byteorder.
+
+  route-crt-panel:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: Panel output merge to CRT.
+
+  crt:
+    type: object
+    description: CRT output control
+    properties:
+      smi,flags:
+        $ref: "#/definitions/fb-flag"
+
+      bpp:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: Color depth
+
+  panel:
+    type: object
+    description: Panel output control
+    properties:
+      smi,flags:
+        $ref: "#/definitions/fb-flag"
+
+      bpp:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: Color depth
+
+  smi,devices:
+    $ref: /schemas/types.yaml#/definitions/string-array
+    description: Select SM501 device functions.
+    items:
+      anyOf:
+        - const: usb-host
+        - const: usb-slave
+        - const: ssp0
+        - const: ssp1
+        - const: uart0
+        - const: uart1
+        - const: fbaccel
+        - const: ac97
+        - const: i2s
+    minItems: 1
+    maxItems: 9
+
+  smi,misc-timing-ex:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - Extend bus holding time.
+    enum:
+      - none
+      - "16"
+      - "32"
+      - "48"
+      - "64"
+      - "80"
+      - "96"
+      - "112"
+      - "128"
+      - "144"
+      - "160"
+      - "176"
+      - "192"
+      - "208"
+      - "224"
+      - "240"
+
+  smi,misc-timing-xc:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - Xscale clock input select.
+    enum:
+      - internal-pll
+      - hclk
+      - gpio30
+
+  smi,misc-timing-usb-current:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - USB host current detection.
+    enum:
+      - disable
+      - enable
+
+  smi,misc-timing-ssm1:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - System SDRAM Clock Select for PW Mode 1.
+    enum:
+      - "288"
+      - divider
+
+  smi,misc-timing-sm1:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - SDRAM clock divider for PW mode 1.
+    enum:
+      - "1"
+      - "2"
+      - "3"
+      - "4"
+      - "6"
+      - "8"
+      - "12"
+      - "16"
+      - "24"
+      - "32"
+      - "48"
+      - "64"
+      - "96"
+      - "128"
+      - "192"
+      - "384"
+
+  smi,misc-timing-ssm0:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - System SDRAM Clock Select for PW Mode 0.
+    enum:
+      - "288"
+      - divider
+
+  smi,misc-timing-sm0:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - SDRAM clock divider for PW mode 0.
+    enum:
+      - "1"
+      - "2"
+      - "3"
+      - "4"
+      - "6"
+      - "8"
+      - "12"
+      - "16"
+      - "24"
+      - "32"
+      - "48"
+      - "64"
+      - "96"
+      - "128"
+      - "192"
+      - "384"
+
+  smi,misc-timing-deb:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - 96MHz PLL debug control
+    enum:
+      - input-reference
+      - output
+
+  smi,misc-timing-a:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - ACPI Control.
+    enum:
+      - no-acpi
+      - acpi
+
+  smi,misc-timing-divider:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - Output Frequency Selection for Second PLL.
+    enum:
+      - "336"
+      - "288"
+      - "240"
+      - "192"
+
+  smi,misc-timing-u:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - USB Host mode.
+    enum:
+      - normal
+      - simulation
+
+  smi,misc-timing-delay:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Miscellaneous Timing - Delay time to latch read data for external SDRAM memory controller.
+    enum:
+      - none
+      - "0.5"
+      - "1.0"
+      - "1.5"
+      - "2.0"
+      - "2.5"
+
+  smi,misc-control-pad:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - PCI Pad drive strength.
+    enum:
+      - "24"
+      - "12"
+      - "8"
+
+  smi,misc-control-usbclk:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - USB Clcok Select.
+    enum:
+      - xtal
+      - "96"
+      - "48"
+
+  smi,misc-control-ssp:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - UART1/SSP1 Select.
+    enum:
+      - uart1
+      - ssp1
+
+  smi,misc-control-lat:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - 8051 Latch Enable for Address.
+    enum:
+      - disable
+      - enable
+
+  smi,misc-control-fp:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - Flat Panel Data Select.
+    enum:
+      - "18"
+      - "24"
+
+  smi,misc-control-freq:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - Crystal frequency select.
+    enum:
+      - "24"
+      - "12"
+
+  smi,misc-control-refresh:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - Internal memory refresh control
+    enum:
+      - "8"
+      - "16"
+      - "32"
+      - "64"
+
+  smi,misc-control-hold:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - BUS Hold time.
+    enum:
+      - fifo-empty
+      - "8"
+      - "16"
+      - "24"
+      - "32"
+
+  smi,misc-control-sh:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - Renesas SuperH ready polarity.
+    enum:
+      - active-low
+      - active-high
+
+  smi,misc-control-ii:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - Interrupt inverting.
+    enum:
+      - normal
+      - inverted
+
+  smi,misc-control-pll:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - PLL clock count.
+    enum:
+      - disable
+      - enable
+
+  smi,misc-control-gap:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - DAC Band Gap Control.
+    const: "0"
+
+  smi,misc-control-dac:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - DAC Power control.
+    enum:
+      - disable
+      - enable
+
+  smi,misc-control-mc:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - USB slave controller.
+    enum:
+      - cpu
+      - "8051"
+
+  smi,misc-control-bl:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - CPU Master burst length.
+    enum:
+      - "1"
+      - "8"
+
+  smi,misc-control-usb:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - USB port select.
+    enum:
+      - master
+      - slave
+
+  smi,misc-control-vr:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Micellaneous Control - NEC VR Memory map select.
+    enum:
+      - "0x1e00000"
+      - "0x3e00000"
+
+  gpio:
+    type: object
+    description: GPIO pin control
+    additionalProperties: false
+    patternProperties:
+      "^pin-[0-9]+$":
+        $ref: /schemas/types.yaml#/definitions/string
+        enum:
+          - ioport
+          - function
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+
+examples:
+  - |
+        display@10000000 {
+                compatible = "smi,sm501";
+                reg = <0x10000000 0x03e00000
+                       0x13e00000 0x00200000>;
+                interrupt-parent = <&r2dintc>;
+                interrupts = <4 0>;
+                clocks = <&mclk &m1xclk>;
+                clock-names = "mclk", "m1xclk";
+                mode = "640x480-16@60";
+                smi,little-endian;
+                smi,devices = "usb-host", "uart0";
+                smi,swap-fb-endian;
+                edid = [00 ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00
+                        00 00 01 04 00 00 00 00 00 00 00 00 00 00 00 00
+                        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+                        00 00 00 00 00 00 f0 0a 80 fb 20 e0 25 10 32 60
+                        02 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00
+                        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+                        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+                        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bd];
+
+                smi,misc-timing-ex = "16";
+                smi,misc-timing-xc = "internal-pll";
+                smi,misc-timing-usb-current = "disable";
+                smi,misc-control-pad = "24";
+                smi,misc-control-usbclk = "xtal";
+                smi,misc-control-sh = "active-low";
+
+                gpio {
+                        pin-0 = "ioport";
+                        pin-1 = "function";
+                };
+
+                crt {
+                        smi,flags = "use-init-done",
+                                    "disable-at-exit",
+                                    "use-hwcursor",
+                                    "use-hwaccel";
+                };
+
+                panel {
+                        bpp = <16>;
+                        smi,flags = "use-init-done",
+                                    "disable-at-exit",
+                                    "use-hwcursor",
+                                    "use-hwaccel";
+                };
+        };