diff mbox series

[v3,1/2] dt-bindings: display: bridge: Add documentation for Toshiba tc358768

Message ID 20200127105634.7638-2-peter.ujfalusi@ti.com
State Superseded
Headers show
Series drm/bridge: Support for Toshiba tc358768 RGB to DSI bridge | expand

Commit Message

Peter Ujfalusi Jan. 27, 2020, 10:56 a.m. UTC
TC358768/TC358778 is a Parallel RGB to MIPI DSI bridge.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

---
 .../display/bridge/toshiba,tc358768.yaml      | 158 ++++++++++++++++++
 1 file changed, 158 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml

-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Comments

Rob Herring (Arm) Jan. 27, 2020, 6:49 p.m. UTC | #1
On Mon, Jan 27, 2020 at 12:56:33PM +0200, Peter Ujfalusi wrote:
> TC358768/TC358778 is a Parallel RGB to MIPI DSI bridge.

> 

> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> ---

>  .../display/bridge/toshiba,tc358768.yaml      | 158 ++++++++++++++++++

>  1 file changed, 158 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml

> 

> diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml

> new file mode 100644

> index 000000000000..8dd8cca39a77

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml

> @@ -0,0 +1,158 @@

> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/display/bridge/toshiba,tc358768.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: Toschiba TC358768/TC358778 Parallel RGB to MIPI DSI bridge

> +

> +maintainers:

> +  - Peter Ujfalusi <peter.ujfalusi@ti.com>

> +

> +description: |

> +  The TC358768/TC358778 is bridge device which converts RGB to DSI.

> +

> +properties:

> +  compatible:

> +    enum:

> +      - toshiba,tc358768

> +      - toshiba,tc358778

> +

> +  reg:

> +    maxItems: 1

> +    description: base I2C address of the device

> +

> +  reset-gpios:

> +    maxItems: 1

> +    description: GPIO connected to active low RESX pin

> +

> +  vddc-supply:

> +    description: Regulator for 1.2V internal core power.

> +

> +  vddmipi-supply:

> +    description: Regulator for 1.2V for the MIPI.

> +

> +  vddio-supply:

> +    description: Regulator for 1.8V - 3.3V IO power.

> +

> +  clocks:

> +    maxItems: 1

> +

> +  clock-names:

> +    const: refclk

> +

> +  ports:

> +    type: object

> +

> +    properties:

> +      "#address-cells":

> +        const: 1

> +

> +      "#size-cells":

> +        const: 0

> +

> +      port@0:

> +        type: object

> +        additionalProperties: false

> +

> +        description: |

> +          Video port for RGB input

> +

> +        properties:

> +          reg:

> +            const: 0

> +

> +        patternProperties:

> +          endpoint:

> +            type: object

> +            additionalProperties: false

> +

> +            properties:

> +              data-lines:

> +                enum: [ 16, 18, 24 ]

> +

> +              remote-endpoint: true

> +

> +        required:

> +          - reg

> +

> +      port@1:

> +        type: object

> +        additionalProperties: false

> +

> +        description: |

> +          Video port for DSI output (panel or connector).

> +

> +        properties:

> +          reg:

> +            const: 1

> +

> +        patternProperties:

> +          endpoint:

> +            type: object

> +            additionalProperties: false

> +

> +            properties:

> +              remote-endpoint: true

> +

> +        required:

> +          - reg

> +

> +    required:

> +      - "#address-cells"

> +      - "#size-cells"

> +      - port@0

> +      - port@1

> +

> +required:

> +  - compatible

> +  - reg

> +  - vddc-supply

> +  - vddmipi-supply

> +  - vddio-supply

> +  - ports

> +

> +additionalProperties: false

> +

> +examples:

> +  - |

> +    i2c1 {

> +      #address-cells = <1>;

> +      #size-cells = <0>;

> +

> +      dsi_bridge: tc358768@0e {


Generic node names and no leading 0s:

dsi-bridge@e

> +        compatible = "toshiba,tc358768";

> +        reg = <0x0e>;

> +

> +        clocks = <&tc358768_refclk>;

> +        clock-names = "refclk";

> +

> +        /* GPIO line is inverted before going to the bridge */

> +        reset-gpios = <&pcf_display_board 0 1 /* GPIO_ACTIVE_LOW */>;


You just need to add the include for the define to work.

> +

> +        vddc-supply = <&v1_2d>;

> +        vddmipi-supply = <&v1_2d>;

> +        vddio-supply = <&v3_3d>;

> +

> +        dsi_bridge_ports: ports {

> +          #address-cells = <1>;

> +          #size-cells = <0>;

> +

> +          port@0 {

> +            reg = <0>;

> +            rgb_in: endpoint {

> +              remote-endpoint = <&dpi_out>;

> +              data-lines = <24>;

> +            };

> +          };

> +

> +          port@1 {

> +            reg = <1>;

> +            dsi_out: endpoint {

> +              remote-endpoint = <&lcd_in>;

> +            };

> +          };

> +        };

> +      };

> +    };

> +    

> -- 

> Peter

> 

> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.

> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Peter Ujfalusi Jan. 28, 2020, 10:14 a.m. UTC | #2
Hi Rob,

On 27/01/2020 20.49, Rob Herring wrote:
> On Mon, Jan 27, 2020 at 12:56:33PM +0200, Peter Ujfalusi wrote:
>> TC358768/TC358778 is a Parallel RGB to MIPI DSI bridge.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> ---
>>  .../display/bridge/toshiba,tc358768.yaml      | 158 ++++++++++++++++++
>>  1 file changed, 158 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml
>> new file mode 100644
>> index 000000000000..8dd8cca39a77
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml
>> +examples:
>> +  - |
>> +    i2c1 {
>> +      #address-cells = <1>;
>> +      #size-cells = <0>;
>> +
>> +      dsi_bridge: tc358768@0e {
> 
> Generic node names and no leading 0s:
> 
> dsi-bridge@e

Right, I'll correct it.

>> +        compatible = "toshiba,tc358768";
>> +        reg = <0x0e>;
>> +
>> +        clocks = <&tc358768_refclk>;
>> +        clock-names = "refclk";
>> +
>> +        /* GPIO line is inverted before going to the bridge */
>> +        reset-gpios = <&pcf_display_board 0 1 /* GPIO_ACTIVE_LOW */>;
> 
> You just need to add the include for the define to work.

You are right, it compiles fine with the include added.

Thank you,
- Péter

>> +
>> +        vddc-supply = <&v1_2d>;
>> +        vddmipi-supply = <&v1_2d>;
>> +        vddio-supply = <&v3_3d>;
>> +
>> +        dsi_bridge_ports: ports {
>> +          #address-cells = <1>;
>> +          #size-cells = <0>;
>> +
>> +          port@0 {
>> +            reg = <0>;
>> +            rgb_in: endpoint {
>> +              remote-endpoint = <&dpi_out>;
>> +              data-lines = <24>;
>> +            };
>> +          };
>> +
>> +          port@1 {
>> +            reg = <1>;
>> +            dsi_out: endpoint {
>> +              remote-endpoint = <&lcd_in>;
>> +            };
>> +          };
>> +        };
>> +      };
>> +    };
>> +    
>> -- 
>> Peter
>>
>> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
>> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>>


Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml
new file mode 100644
index 000000000000..8dd8cca39a77
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358768.yaml
@@ -0,0 +1,158 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/toshiba,tc358768.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Toschiba TC358768/TC358778 Parallel RGB to MIPI DSI bridge
+
+maintainers:
+  - Peter Ujfalusi <peter.ujfalusi@ti.com>
+
+description: |
+  The TC358768/TC358778 is bridge device which converts RGB to DSI.
+
+properties:
+  compatible:
+    enum:
+      - toshiba,tc358768
+      - toshiba,tc358778
+
+  reg:
+    maxItems: 1
+    description: base I2C address of the device
+
+  reset-gpios:
+    maxItems: 1
+    description: GPIO connected to active low RESX pin
+
+  vddc-supply:
+    description: Regulator for 1.2V internal core power.
+
+  vddmipi-supply:
+    description: Regulator for 1.2V for the MIPI.
+
+  vddio-supply:
+    description: Regulator for 1.8V - 3.3V IO power.
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: refclk
+
+  ports:
+    type: object
+
+    properties:
+      "#address-cells":
+        const: 1
+
+      "#size-cells":
+        const: 0
+
+      port@0:
+        type: object
+        additionalProperties: false
+
+        description: |
+          Video port for RGB input
+
+        properties:
+          reg:
+            const: 0
+
+        patternProperties:
+          endpoint:
+            type: object
+            additionalProperties: false
+
+            properties:
+              data-lines:
+                enum: [ 16, 18, 24 ]
+
+              remote-endpoint: true
+
+        required:
+          - reg
+
+      port@1:
+        type: object
+        additionalProperties: false
+
+        description: |
+          Video port for DSI output (panel or connector).
+
+        properties:
+          reg:
+            const: 1
+
+        patternProperties:
+          endpoint:
+            type: object
+            additionalProperties: false
+
+            properties:
+              remote-endpoint: true
+
+        required:
+          - reg
+
+    required:
+      - "#address-cells"
+      - "#size-cells"
+      - port@0
+      - port@1
+
+required:
+  - compatible
+  - reg
+  - vddc-supply
+  - vddmipi-supply
+  - vddio-supply
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c1 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      dsi_bridge: tc358768@0e {
+        compatible = "toshiba,tc358768";
+        reg = <0x0e>;
+
+        clocks = <&tc358768_refclk>;
+        clock-names = "refclk";
+
+        /* GPIO line is inverted before going to the bridge */
+        reset-gpios = <&pcf_display_board 0 1 /* GPIO_ACTIVE_LOW */>;
+
+        vddc-supply = <&v1_2d>;
+        vddmipi-supply = <&v1_2d>;
+        vddio-supply = <&v3_3d>;
+
+        dsi_bridge_ports: ports {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          port@0 {
+            reg = <0>;
+            rgb_in: endpoint {
+              remote-endpoint = <&dpi_out>;
+              data-lines = <24>;
+            };
+          };
+
+          port@1 {
+            reg = <1>;
+            dsi_out: endpoint {
+              remote-endpoint = <&lcd_in>;
+            };
+          };
+        };
+      };
+    };
+