Devicetree
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: display: elgin,jg10309-01: Add own binding
@ 2024-09-10 21:30 Fabio Estevam
  2024-09-11 17:44 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2024-09-10 21:30 UTC (permalink / raw)
  To: robh; +Cc: krzk+dt, conor+dt, devicetree, otavio, Fabio Estevam

Currently, the compatible 'elgin,jg10309-01' is documented inside
trivial-devices.yaml, but it does not fit well there as it requires
extra properties such as spi-max-frequency, spi-cpha, and spi-cpol.

This causes the following dt-schema warnings:

make CHECK_DTBS=y rockchip/rv1108-elgin-r1.dtb -j12

  DTC [C] arch/arm/boot/dts/rockchip/rv1108-elgin-r1.dtb
rv1108-elgin-r1.dtb:display@0: 'spi-cpha', 'spi-cpol' do not match any of the regexes:
...

Fix this problem by introducing a specific binding for the Elgin
JG10309-01 SPI-controlled display.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 .../bindings/display/elgin,jg10309-01.yaml    | 54 +++++++++++++++++++
 .../devicetree/bindings/trivial-devices.yaml  |  2 -
 2 files changed, 54 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/elgin,jg10309-01.yaml

diff --git a/Documentation/devicetree/bindings/display/elgin,jg10309-01.yaml b/Documentation/devicetree/bindings/display/elgin,jg10309-01.yaml
new file mode 100644
index 000000000000..faca0cb3f154
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/elgin,jg10309-01.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/elgin,jg10309-01.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Elgin JG10309-01 SPI-controlled display
+
+maintainers:
+  - Fabio Estevam <festevam@gmail.com>
+
+description: |
+  The Elgin JG10309-01 SPI-controlled display is used on the RV1108-Elgin-r1
+  board and is a custom display.
+
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+  compatible:
+    const: elgin,jg10309-01
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency:
+    maximum: 24000000
+
+  spi-cpha: true
+
+  spi-cpol: true
+
+required:
+  - compatible
+  - reg
+  - spi-cpha
+  - spi-cpol
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        display@0 {
+            compatible = "elgin,jg10309-01";
+            reg = <0>;
+            spi-max-frequency = <24000000>;
+            spi-cpha;
+            spi-cpol;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index 75a5fad08c44..2b675e97be3d 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -106,8 +106,6 @@ properties:
           - domintech,dmard09
             # DMARD10: 3-axis Accelerometer
           - domintech,dmard10
-            # Elgin SPI-controlled LCD
-          - elgin,jg10309-01
             # MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
           - fsl,mma7660
             # MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: display: elgin,jg10309-01: Add own binding
  2024-09-10 21:30 [PATCH] dt-bindings: display: elgin,jg10309-01: Add own binding Fabio Estevam
@ 2024-09-11 17:44 ` Rob Herring
  2024-09-11 17:53   ` Fabio Estevam
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2024-09-11 17:44 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: krzk+dt, conor+dt, devicetree, otavio

On Tue, Sep 10, 2024 at 06:30:56PM -0300, Fabio Estevam wrote:
> Currently, the compatible 'elgin,jg10309-01' is documented inside
> trivial-devices.yaml, but it does not fit well there as it requires
> extra properties such as spi-max-frequency, spi-cpha, and spi-cpol.

Looks good, but it will have to go to Mark or wait til 6.12-rc1 for me 
to take it.

> 
> This causes the following dt-schema warnings:
> 
> make CHECK_DTBS=y rockchip/rv1108-elgin-r1.dtb -j12
> 
>   DTC [C] arch/arm/boot/dts/rockchip/rv1108-elgin-r1.dtb
> rv1108-elgin-r1.dtb:display@0: 'spi-cpha', 'spi-cpol' do not match any of the regexes:
> ...
> 
> Fix this problem by introducing a specific binding for the Elgin
> JG10309-01 SPI-controlled display.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  .../bindings/display/elgin,jg10309-01.yaml    | 54 +++++++++++++++++++
>  .../devicetree/bindings/trivial-devices.yaml  |  2 -
>  2 files changed, 54 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/display/elgin,jg10309-01.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/elgin,jg10309-01.yaml b/Documentation/devicetree/bindings/display/elgin,jg10309-01.yaml
> new file mode 100644
> index 000000000000..faca0cb3f154
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/elgin,jg10309-01.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/elgin,jg10309-01.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Elgin JG10309-01 SPI-controlled display
> +
> +maintainers:
> +  - Fabio Estevam <festevam@gmail.com>
> +
> +description: |
> +  The Elgin JG10309-01 SPI-controlled display is used on the RV1108-Elgin-r1
> +  board and is a custom display.
> +
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> +  compatible:
> +    const: elgin,jg10309-01
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency:
> +    maximum: 24000000
> +
> +  spi-cpha: true
> +
> +  spi-cpol: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - spi-cpha
> +  - spi-cpol
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        display@0 {
> +            compatible = "elgin,jg10309-01";
> +            reg = <0>;
> +            spi-max-frequency = <24000000>;
> +            spi-cpha;
> +            spi-cpol;
> +        };
> +    };
> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
> index 75a5fad08c44..2b675e97be3d 100644
> --- a/Documentation/devicetree/bindings/trivial-devices.yaml
> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml
> @@ -106,8 +106,6 @@ properties:
>            - domintech,dmard09
>              # DMARD10: 3-axis Accelerometer
>            - domintech,dmard10
> -            # Elgin SPI-controlled LCD
> -          - elgin,jg10309-01
>              # MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
>            - fsl,mma7660
>              # MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
> -- 
> 2.34.1
> 

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

* Re: [PATCH] dt-bindings: display: elgin,jg10309-01: Add own binding
  2024-09-11 17:44 ` Rob Herring
@ 2024-09-11 17:53   ` Fabio Estevam
  0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2024-09-11 17:53 UTC (permalink / raw)
  To: Rob Herring, Mark Brown; +Cc: krzk+dt, conor+dt, devicetree, otavio

On Wed, Sep 11, 2024 at 2:44 PM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Sep 10, 2024 at 06:30:56PM -0300, Fabio Estevam wrote:
> > Currently, the compatible 'elgin,jg10309-01' is documented inside
> > trivial-devices.yaml, but it does not fit well there as it requires
> > extra properties such as spi-max-frequency, spi-cpha, and spi-cpol.
>
> Looks good, but it will have to go to Mark or wait til 6.12-rc1 for me
> to take it.

Ok, I will send it to Mark then.

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

end of thread, other threads:[~2024-09-11 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-10 21:30 [PATCH] dt-bindings: display: elgin,jg10309-01: Add own binding Fabio Estevam
2024-09-11 17:44 ` Rob Herring
2024-09-11 17:53   ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox