Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: display: Convert Allwinner DSI to a schema

The Allwinner SoCs have a MIPI-DSI and MIPI-D-PHY controllers supported in
Linux, with a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190527120910.18964-1-maxime.ripard@bootlin.com

+157 -93
+100
Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/allwinner,sun6i-a31-mipi-dsi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A31 MIPI-DSI Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <maxime.ripard@bootlin.com> 12 + 13 + properties: 14 + "#address-cells": true 15 + "#size-cells": true 16 + 17 + compatible: 18 + const: allwinner,sun6i-a31-mipi-dsi 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: 24 + maxItems: 1 25 + 26 + clocks: 27 + items: 28 + - description: Bus Clock 29 + - description: Module Clock 30 + 31 + clock-names: 32 + items: 33 + - const: bus 34 + - const: mod 35 + 36 + resets: 37 + maxItems: 1 38 + 39 + phys: 40 + maxItems: 1 41 + 42 + phy-names: 43 + const: dphy 44 + 45 + port: 46 + type: object 47 + description: 48 + A port node with endpoint definitions as defined in 49 + Documentation/devicetree/bindings/media/video-interfaces.txt. That 50 + port should be the input endpoint, usually coming from the 51 + associated TCON. 52 + 53 + patternProperties: 54 + "^panel@[0-9]+$": true 55 + 56 + required: 57 + - "#address-cells" 58 + - "#size-cells" 59 + - compatible 60 + - reg 61 + - interrupts 62 + - clocks 63 + - clock-names 64 + - phys 65 + - phy-names 66 + - resets 67 + - port 68 + 69 + additionalProperties: false 70 + 71 + examples: 72 + - | 73 + dsi0: dsi@1ca0000 { 74 + compatible = "allwinner,sun6i-a31-mipi-dsi"; 75 + reg = <0x01ca0000 0x1000>; 76 + interrupts = <0 89 4>; 77 + clocks = <&ccu 23>, <&ccu 96>; 78 + clock-names = "bus", "mod"; 79 + resets = <&ccu 4>; 80 + phys = <&dphy0>; 81 + phy-names = "dphy"; 82 + #address-cells = <1>; 83 + #size-cells = <0>; 84 + 85 + panel@0 { 86 + compatible = "bananapi,lhr050h41", "ilitek,ili9881c"; 87 + reg = <0>; 88 + power-gpios = <&pio 1 7 0>; /* PB07 */ 89 + reset-gpios = <&r_pio 0 5 1>; /* PL05 */ 90 + backlight = <&pwm_bl>; 91 + }; 92 + 93 + port { 94 + dsi0_in_tcon0: endpoint { 95 + remote-endpoint = <&tcon0_out_dsi0>; 96 + }; 97 + }; 98 + }; 99 + 100 + ...
-93
Documentation/devicetree/bindings/display/sunxi/sun6i-dsi.txt
··· 1 - Allwinner A31 DSI Encoder 2 - ========================= 3 - 4 - The DSI pipeline consists of two separate blocks: the DSI controller 5 - itself, and its associated D-PHY. 6 - 7 - DSI Encoder 8 - ----------- 9 - 10 - The DSI Encoder generates the DSI signal from the TCON's. 11 - 12 - Required properties: 13 - - compatible: value must be one of: 14 - * allwinner,sun6i-a31-mipi-dsi 15 - - reg: base address and size of memory-mapped region 16 - - interrupts: interrupt associated to this IP 17 - - clocks: phandles to the clocks feeding the DSI encoder 18 - * bus: the DSI interface clock 19 - * mod: the DSI module clock 20 - - clock-names: the clock names mentioned above 21 - - phys: phandle to the D-PHY 22 - - phy-names: must be "dphy" 23 - - resets: phandle to the reset controller driving the encoder 24 - 25 - - ports: A ports node with endpoint definitions as defined in 26 - Documentation/devicetree/bindings/media/video-interfaces.txt. The 27 - first port should be the input endpoint, usually coming from the 28 - associated TCON. 29 - 30 - Any MIPI-DSI device attached to this should be described according to 31 - the bindings defined in ../mipi-dsi-bus.txt 32 - 33 - D-PHY 34 - ----- 35 - 36 - Required properties: 37 - - compatible: value must be one of: 38 - * allwinner,sun6i-a31-mipi-dphy 39 - - reg: base address and size of memory-mapped region 40 - - clocks: phandles to the clocks feeding the DSI encoder 41 - * bus: the DSI interface clock 42 - * mod: the DSI module clock 43 - - clock-names: the clock names mentioned above 44 - - resets: phandle to the reset controller driving the encoder 45 - 46 - Example: 47 - 48 - dsi0: dsi@1ca0000 { 49 - compatible = "allwinner,sun6i-a31-mipi-dsi"; 50 - reg = <0x01ca0000 0x1000>; 51 - interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; 52 - clocks = <&ccu CLK_BUS_MIPI_DSI>, 53 - <&ccu CLK_DSI_SCLK>; 54 - clock-names = "bus", "mod"; 55 - resets = <&ccu RST_BUS_MIPI_DSI>; 56 - phys = <&dphy0>; 57 - phy-names = "dphy"; 58 - #address-cells = <1>; 59 - #size-cells = <0>; 60 - 61 - panel@0 { 62 - compatible = "bananapi,lhr050h41", "ilitek,ili9881c"; 63 - reg = <0>; 64 - power-gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>; /* PB07 */ 65 - reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL05 */ 66 - backlight = <&pwm_bl>; 67 - }; 68 - 69 - ports { 70 - #address-cells = <1>; 71 - #size-cells = <0>; 72 - 73 - port@0 { 74 - #address-cells = <1>; 75 - #size-cells = <0>; 76 - reg = <0>; 77 - 78 - dsi0_in_tcon0: endpoint { 79 - remote-endpoint = <&tcon0_out_dsi0>; 80 - }; 81 - }; 82 - }; 83 - }; 84 - 85 - dphy0: d-phy@1ca1000 { 86 - compatible = "allwinner,sun6i-a31-mipi-dphy"; 87 - reg = <0x01ca1000 0x1000>; 88 - clocks = <&ccu CLK_BUS_MIPI_DSI>, 89 - <&ccu CLK_DSI_DPHY>; 90 - clock-names = "bus", "mod"; 91 - resets = <&ccu RST_BUS_MIPI_DSI>; 92 - #phy-cells = <0>; 93 - };
+57
Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/allwinner,sun6i-a31-mipi-dphy.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A31 MIPI D-PHY Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <maxime.ripard@bootlin.com> 12 + 13 + properties: 14 + "#phy-cells": 15 + const: 0 16 + 17 + compatible: 18 + const: allwinner,sun6i-a31-mipi-dphy 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + clocks: 24 + items: 25 + - description: Bus Clock 26 + - description: Module Clock 27 + 28 + clock-names: 29 + items: 30 + - const: bus 31 + - const: mod 32 + 33 + resets: 34 + maxItems: 1 35 + 36 + required: 37 + - "#phy-cells" 38 + - compatible 39 + - reg 40 + - clocks 41 + - clock-names 42 + - resets 43 + 44 + additionalProperties: false 45 + 46 + examples: 47 + - | 48 + dphy0: d-phy@1ca1000 { 49 + compatible = "allwinner,sun6i-a31-mipi-dphy"; 50 + reg = <0x01ca1000 0x1000>; 51 + clocks = <&ccu 23>, <&ccu 97>; 52 + clock-names = "bus", "mod"; 53 + resets = <&ccu 4>; 54 + #phy-cells = <0>; 55 + }; 56 + 57 + ...