dt-bindings: display: Convert stm32 display bindings to json-schema
Subsystems (5)
PATCH v3 1/1 dt-bindings: display: Convert stm32 display bindings to json-schema
Convert the STM32 display binding to DT schema format using json-schema. Split the original bindings in two yaml files:
- one for display controller (ltdc)
- one for DSI controller
---
changes in v3:
- use (GPL-2.0-only OR BSD-2-Clause) license
changes in v2:
- use BSD-2-Clause license
- add panel property
- fix identation
- remove pinctrl-names: true
- remove pinctrl-[0-9]+: true
- rework ports block to include port@0 and port@1
- use const for #adress-cells and #size-cells
- add additionalProperties: false
.../devicetree/bindings/display/st,stm32-dsi.yaml | 151 +++++++++++++++++++++ .../devicetree/bindings/display/st,stm32-ltdc.txt | 144 -------------------- .../devicetree/bindings/display/st,stm32-ltdc.yaml | 81 +++++++++++ 3 files changed, 232 insertions(+), 144 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/st,stm32-dsi.yaml delete mode 100644 Documentation/devicetree/bindings/display/st,stm32-ltdc.txt create mode 100644 Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
Documentation/devicetree/bindings/display/st,stm32-dsi.yaml new file +151 -0
@@ -0,0 +1,151 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/st,stm32-dsi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 DSI host controller + +maintainers: + - Philippe Cornu <[email protected]> + - Yannick Fertre <[email protected]> + +description: + The STMicroelectronics STM32 DSI controller uses the Synopsys DesignWare MIPI-DSI host controller. + +properties: + compatible: + const: st,stm32-dsi + + reg: + maxItems: 1 + + clocks: + items: + - description: Module Clock + - description: DSI bus clock + - description: Pixel clock + minItems: 2 + maxItems: 3 + + clock-names: + items: + - const: pclk + - const: ref + - const: px_clk + minItems: 2 + maxItems: 3 + + resets: + maxItems: 1 + + reset-names: + items: + - const: apb + + phy-dsi-supply: + maxItems: 1 + description: + Phandle of the regulator that provides the supply voltage. + + ports: + type: object + description: + A node containing DSI input & output port nodes with endpoint + definitions as documented in + Documentation/devicetree/bindings/media/video-interfaces.txt + Documentation/devicetree/bindings/graph.txt + properties: + port@0: + type: object + description: + DSI input port node, connected to the ltdc rgb output port. + + port@1: + type: object + description: + DSI output port node, connected to a panel or a bridge input port" + +patternProperties: + "^(panel|panel-dsi)@[0-9]$": + type: object + description: + A node containing the panel or bridge description as documented in + Documentation/devicetree/bindings/display/mipi-dsi-bus.txt + properties: + port@0: + type: object + description: + Panel or bridge port node, connected to the DSI output port (port@1) + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +required: + - "#address-cells" + - "#size-cells" + - compatible + - reg + - clocks + - clock-names + - ports + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/stm32mp1-clks.h> + #include <dt-bindings/reset/stm32mp1-resets.h> + #include <dt-bindings/gpio/gpio.h> + dsi: dsi@5a000000 { + compatible = "st,stm32-dsi"; + reg = <0x5a000000 0x800>; + clocks = <&rcc DSI_K>, <&clk_hse>, <&rcc DSI_PX>; + clock-names = "pclk", "ref", "px_clk"; + resets = <&rcc DSI_R>; + reset-names = "apb"; + phy-dsi-supply = <®18>; + + #address-cells = <1>; + #size-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + remote-endpoint = <<dc_ep1_out>; + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + + panel-dsi@0 { + compatible = "orisetech,otm8009a"; + reg = <0>; + reset-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>; + power-supply = <&v3v3>; + + port { + panel_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; + }; + +... + +
Documentation/devicetree/bindings/display/st,stm32-ltdc.txt deleted +0 -144
144 lines not on this page · raw message
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
2.15.0
Quoted 101 lines · Benjamin Gaignard
Convert the STM32 display binding to DT schema format using json-schema. Split the original bindings in two yaml files:
- one for display controller (ltdc)
- one for DSI controllerSigned-off-by Benjamin Gaignard <[email protected]>---
changes in v3:
- use (GPL-2.0-only OR BSD-2-Clause) licensechanges in v2:
- use BSD-2-Clause license
- add panel property
- fix identation
- remove pinctrl-names: true
- remove pinctrl-[0-9]+: true
- rework ports block to include port@0 and port@1
- use const for #adress-cells and #size-cells
- add additionalProperties: false.../devicetree/bindings/display/st,stm32-dsi.yaml | 151 +++++++++++++++++++++ .../devicetree/bindings/display/st,stm32-ltdc.txt | 144 -------------------- .../devicetree/bindings/display/st,stm32-ltdc.yaml | 81 +++++++++++ 3 files changed, 232 insertions(+), 144 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/st,stm32-dsi.yaml delete mode 100644 Documentation/devicetree/bindings/display/st,stm32-ltdc.txt create mode 100644 Documentation/devicetree/bindings/display/st,stm32-ltdc.yamlDocumentation/devicetree/bindings/display/st,stm32-dsi.yaml new file +66
-0@@ -0,0 +1,151 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/st,stm32-dsi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 DSI host controller + +maintainers: + - Philippe Cornu <[email protected]> + - Yannick Fertre <[email protected]> + +description: + The STMicroelectronics STM32 DSI controller uses the Synopsys DesignWare MIPI-DSI host controller. + +properties: + compatible: + const: st,stm32-dsi + + reg: + maxItems: 1 + + clocks: + items: + - description: Module Clock + - description: DSI bus clock + - description: Pixel clock + minItems: 2 + maxItems: 3 + + clock-names: + items: + - const: pclk + - const: ref + - const: px_clk + minItems: 2 + maxItems: 3 + + resets: + maxItems: 1 + + reset-names: + items: + - const: apb + + phy-dsi-supply: + maxItems: 1 + description: + Phandle of the regulator that provides the supply voltage. + + ports: + type: object + description: + A node containing DSI input & output port nodes with endpoint + definitions as documented in + Documentation/devicetree/bindings/media/video-interfaces.txt + Documentation/devicetree/bindings/graph.txt + properties: + port@0: + type: object + description: + DSI input port node, connected to the ltdc rgb output port. + + port@1: + type: object + description:
Documentation/devicetree/bindings/display/st,stm32-dsi.yaml line 76
Quoted 10 lines
Documentation/devicetree/bindings/display/st,stm32-dsi.yaml new file +10
-0+ DSI output port node, connected to a panel or a bridge input port" + +patternProperties: + "^(panel|panel-dsi)@[0-9]$": + type: object + description: + A node containing the panel or bridge description as documented in + Documentation/devicetree/bindings/display/mipi-dsi-bus.txt + properties: + port@0:
You can drop this. The unit address for the panel port is decided by the panel binding, not this one.
Quoted 3 lines
Documentation/devicetree/bindings/display/st,stm32-dsi.yaml new file +3
-0+ type: object + description: + Panel or bridge port node, connected to the DSI output port (port@1)
[...]
Quoted 18 lines
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml new file +12
-0@@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/st,stm32-ltdc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 lcd-tft display controller + +maintainers: + - Philippe Cornu <[email protected]> + - Yannick Fertre <[email protected]> +
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml line 22
Quoted 10 lines
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml new file +10
-0+properties: + compatible: + const: st,stm32-ltdc + + reg: + maxItems: 1 + + interrupts: + minItems: 2 + maxItems: 2
Need to describe what each interrupt is.
items:
- description: ...
- description: ...
Quoted 14 lines
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml new file +14
-0+ + clocks: + maxItems: 1 + + clock-names: + items: + - const: lcd + + resets: + maxItems: 1 + + port: + type: object + description:
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml line 46
Quoted 10 lines
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml new file +10
-0+ "Video port for DPI RGB output. + ltdc has one video port with up to 2 endpoints: + - for external dpi rgb panel or bridge, using gpios. + - for internal dpi input of the MIPI DSI host controller. + Note: These 2 endpoints cannot be activated simultaneously. + Please refer to the bindings defined in + Documentation/devicetree/bindings/media/video-interfaces.txt." + + dma-ranges: + maxItems: 1
dma-ranges goes in bus nodes, not device nodes.
Quoted 36 lines
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml new file +35
-1+ +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + - port + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/stm32mp1-clks.h> + #include <dt-bindings/reset/stm32mp1-resets.h> + ltdc: display-controller@40016800 { + compatible = "st,stm32-ltdc"; + reg = <0x5a001000 0x400>; + interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&rcc LTDC_PX>; + clock-names = "lcd"; + resets = <&rcc LTDC_R>; + + port { + ltdc_out_dsi: endpoint { + remote-endpoint = <&dsi_in>; + }; + }; + }; + +... + --
Quoted 2 lines
2.15.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel