Add yaml documentation for DSI/LVDS tc358775 bridge
Signed-off-by: Vinay Simha BN <[email protected]>
---
v1:
Initial version
---
.../bindings/display/bridge/toshiba-tc358775.yaml | 174 +++++++++++++++++++++
1 file changed, 174 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
new file mode 100644
index 0000000..e9a9544
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
@@ -0,0 +1,174 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/toshiba-tc358775.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+
+title: Toshiba TC358775 DSI to LVDS bridge bindings
+
+maintainers:
+ - Vinay Simha BN <[email protected]>
+
+description: |
+ This binding supports DSI to LVDS bridge TC358775
+
+properties:
+ compatible:
+ const: toshiba,tc358775
+
+ reg:
+ maxItems: 1
+ description: i2c address of the bridge, 0x0f
+
+ tc, dsi-lanes: 1
+ maxItems: 1
+ description: Number of DSI data lanes connected to the DSI host. It should
+ be one of 1, 2, 3 or 4.
+
+ tc, dual-link: 1
+ maxItems: 1
+ description: To configure the LVDS transmitter either as single-link or dual-link.
+
+ vdd-supply:
+ maxItems: 1
+ description: 1.2V LVDS Power Supply
+
+ vddio-supply:
+ maxItems: 1
+ description: 1.8V IO Power Supply
+
+ stby-gpios:
+ maxItems: 1
+ description: Standby pin, Low active
+
+ reset-gpios:
+ maxItems: 1
+ description: Hardware reset, Low active
+
+ ports:
+ type: object
+
+ properties:
+ port@0:
+ type: object
+ description: |
+ DSI Input. The remote endpoint phandle should be a
+ reference to a valid mipi_dsi_host device node.
+ port@1:
+ type: object
+ description: |
+ Video port for LVDS output (panel or connector).
+
+ required:
+ - port@0
+ - port@1
+
+required:
+ - compatible
+ - reg
+ - dsi-lanes
+ - vdd-supply
+ - vddio-supply
+ - stby-gpios
+ - reset-gpios
+ - ports
+
+examples:
+ - |
+ i2c@78b8000 {
+ /* On High speed expansion */
+ label = "HS-I2C2";
+ status = "okay";
+
+ tc_bridge: bridge@f {
+ status = "okay";
+
+ compatible = "toshiba,tc358775";
+ reg = <0x0f>;
+
+ tc,dsi-lanes = <4>;
+ tc,dual-link = <0>;
+
+ vdd-supply = <&pm8916_l2>;
+ vddio-supply = <&pm8916_l6>;
+
+ stby-gpio = <&msmgpio 99 GPIO_ACTIVE_LOW>;
+ reset-gpio = <&msmgpio 72 GPIO_ACTIVE_LOW>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ d2l_in: endpoint {
+ remote-endpoint = <&dsi0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ d2l_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+ };
+ };
+
+ panel: auo,b101xtn01 {
+ status = "okay";
+ compatible = "auo,b101xtn01", "panel-lvds";
+ power-supply = <&pm8916_l14>;
+
+ width-mm = <223>;
+ height-mm = <125>;
+
+ data-mapping = "jeida-24";
+
+ panel-timing {
+ /* 1366x768 @60Hz */
+ clock-frequency = <72000000>;
+ hactive = <1366>;
+ vactive = <768>;
+ hsync-len = <70>;
+ hfront-porch = <20>;
+ hback-porch = <0>;
+ vsync-len = <42>;
+ vfront-porch = <14>;
+ vback-porch = <0>;
+ };
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&d2l_out>;
+ };
+ };
+ };
+
+ mdss@1a00000 {
+ status = "okay";
+
+ mdp@1a01000 {
+ status = "okay";
+ };
+
+ dsi@1a98000 {
+ status = "okay";
+ ..
+ ports {
+ port@1 {
+ dsi0_out: endpoint {
+ remote-endpoint = <&d2l_in>;
+ data-lanes = <0 1 2 3>;
+ };
+ };
+ };
+ };
+
+ dsi-phy@1a98300 {
+ status = "okay";
+ ..
+ };
+ };
--
2.7.4
Hi Vinay,
Next time add patch version to de subject of email.
On 11.03.2020 10:48, Vinay Simha BN wrote:
> Add yaml documentation for DSI/LVDS tc358775 bridge
>
> Signed-off-by: Vinay Simha BN <[email protected]>
>
> ---
> v1:
> Initial version
> ---
> .../bindings/display/bridge/toshiba-tc358775.yaml | 174 +++++++++++++++++++++
> 1 file changed, 174 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
>
> diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> new file mode 100644
> index 0000000..e9a9544
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> @@ -0,0 +1,174 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: https://protect2.fireeye.com/url?k=cc9be7f9-9155e4b4-cc9a6cb6-000babff24ad-2a6ce73e1e41d358&u=http://devicetree.org/schemas/display/bridge/toshiba-tc358775.yaml#
> +$schema: https://protect2.fireeye.com/url?k=293d6151-74f3621c-293cea1e-000babff24ad-793c0a803cb80d71&u=http://devicetree.org/meta-schemas/core.yaml#
> +
> +
> +title: Toshiba TC358775 DSI to LVDS bridge bindings
> +
> +maintainers:
> + - Vinay Simha BN <[email protected]>
> +
> +description: |
> + This binding supports DSI to LVDS bridge TC358775
> +
> +properties:
> + compatible:
> + const: toshiba,tc358775
> +
> + reg:
> + maxItems: 1
> + description: i2c address of the bridge, 0x0f
> +
> + tc, dsi-lanes: 1
> + maxItems: 1
> + description: Number of DSI data lanes connected to the DSI host. It should
> + be one of 1, 2, 3 or 4.
> +
> + tc, dual-link: 1
> + maxItems: 1
> + description: To configure the LVDS transmitter either as single-link or dual-link.
As Laurent commented earlier, it would be better to use two ports. See
for example for input LVDS ports in:
Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
Both should be defined in bindings but the 2nd can be optional in dts.
Regards
Andrzej
> +
> + vdd-supply:
> + maxItems: 1
> + description: 1.2V LVDS Power Supply
> +
> + vddio-supply:
> + maxItems: 1
> + description: 1.8V IO Power Supply
> +
> + stby-gpios:
> + maxItems: 1
> + description: Standby pin, Low active
> +
> + reset-gpios:
> + maxItems: 1
> + description: Hardware reset, Low active
> +
> + ports:
> + type: object
> +
> + properties:
> + port@0:
> + type: object
> + description: |
> + DSI Input. The remote endpoint phandle should be a
> + reference to a valid mipi_dsi_host device node.
> + port@1:
> + type: object
> + description: |
> + Video port for LVDS output (panel or connector).
> +
> + required:
> + - port@0
> + - port@1
> +
> +required:
> + - compatible
> + - reg
> + - dsi-lanes
> + - vdd-supply
> + - vddio-supply
> + - stby-gpios
> + - reset-gpios
> + - ports
> +
> +examples:
> + - |
> + i2c@78b8000 {
> + /* On High speed expansion */
> + label = "HS-I2C2";
> + status = "okay";
> +
> + tc_bridge: bridge@f {
> + status = "okay";
> +
> + compatible = "toshiba,tc358775";
> + reg = <0x0f>;
> +
> + tc,dsi-lanes = <4>;
> + tc,dual-link = <0>;
> +
> + vdd-supply = <&pm8916_l2>;
> + vddio-supply = <&pm8916_l6>;
> +
> + stby-gpio = <&msmgpio 99 GPIO_ACTIVE_LOW>;
> + reset-gpio = <&msmgpio 72 GPIO_ACTIVE_LOW>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + d2l_in: endpoint {
> + remote-endpoint = <&dsi0_out>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + d2l_out: endpoint {
> + remote-endpoint = <&panel_in>;
> + };
> + };
> + };
> + };
> + };
> +
> + panel: auo,b101xtn01 {
> + status = "okay";
> + compatible = "auo,b101xtn01", "panel-lvds";
> + power-supply = <&pm8916_l14>;
> +
> + width-mm = <223>;
> + height-mm = <125>;
> +
> + data-mapping = "jeida-24";
> +
> + panel-timing {
> + /* 1366x768 @60Hz */
> + clock-frequency = <72000000>;
> + hactive = <1366>;
> + vactive = <768>;
> + hsync-len = <70>;
> + hfront-porch = <20>;
> + hback-porch = <0>;
> + vsync-len = <42>;
> + vfront-porch = <14>;
> + vback-porch = <0>;
> + };
> +
> + port {
> + panel_in: endpoint {
> + remote-endpoint = <&d2l_out>;
> + };
> + };
> + };
> +
> + mdss@1a00000 {
> + status = "okay";
> +
> + mdp@1a01000 {
> + status = "okay";
> + };
> +
> + dsi@1a98000 {
> + status = "okay";
> + ..
> + ports {
> + port@1 {
> + dsi0_out: endpoint {
> + remote-endpoint = <&d2l_in>;
> + data-lanes = <0 1 2 3>;
> + };
> + };
> + };
> + };
> +
> + dsi-phy@1a98300 {
> + status = "okay";
> + ..
> + };
> + };
Hello Vinay,
Please take into account the review comments from v1. We can discuss
them in replies to v1 if you have any question. I'll skip reviewing this
version.
On Wed, Mar 11, 2020 at 03:18:24PM +0530, Vinay Simha BN wrote:
> Add yaml documentation for DSI/LVDS tc358775 bridge
>
> Signed-off-by: Vinay Simha BN <[email protected]>
>
> ---
> v1:
> Initial version
> ---
> .../bindings/display/bridge/toshiba-tc358775.yaml | 174 +++++++++++++++++++++
> 1 file changed, 174 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
>
> diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> new file mode 100644
> index 0000000..e9a9544
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> @@ -0,0 +1,174 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/bridge/toshiba-tc358775.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +
> +title: Toshiba TC358775 DSI to LVDS bridge bindings
> +
> +maintainers:
> + - Vinay Simha BN <[email protected]>
> +
> +description: |
> + This binding supports DSI to LVDS bridge TC358775
> +
> +properties:
> + compatible:
> + const: toshiba,tc358775
> +
> + reg:
> + maxItems: 1
> + description: i2c address of the bridge, 0x0f
> +
> + tc, dsi-lanes: 1
> + maxItems: 1
> + description: Number of DSI data lanes connected to the DSI host. It should
> + be one of 1, 2, 3 or 4.
> +
> + tc, dual-link: 1
> + maxItems: 1
> + description: To configure the LVDS transmitter either as single-link or dual-link.
> +
> + vdd-supply:
> + maxItems: 1
> + description: 1.2V LVDS Power Supply
> +
> + vddio-supply:
> + maxItems: 1
> + description: 1.8V IO Power Supply
> +
> + stby-gpios:
> + maxItems: 1
> + description: Standby pin, Low active
> +
> + reset-gpios:
> + maxItems: 1
> + description: Hardware reset, Low active
> +
> + ports:
> + type: object
> +
> + properties:
> + port@0:
> + type: object
> + description: |
> + DSI Input. The remote endpoint phandle should be a
> + reference to a valid mipi_dsi_host device node.
> + port@1:
> + type: object
> + description: |
> + Video port for LVDS output (panel or connector).
> +
> + required:
> + - port@0
> + - port@1
> +
> +required:
> + - compatible
> + - reg
> + - dsi-lanes
> + - vdd-supply
> + - vddio-supply
> + - stby-gpios
> + - reset-gpios
> + - ports
> +
> +examples:
> + - |
> + i2c@78b8000 {
> + /* On High speed expansion */
> + label = "HS-I2C2";
> + status = "okay";
> +
> + tc_bridge: bridge@f {
> + status = "okay";
> +
> + compatible = "toshiba,tc358775";
> + reg = <0x0f>;
> +
> + tc,dsi-lanes = <4>;
> + tc,dual-link = <0>;
> +
> + vdd-supply = <&pm8916_l2>;
> + vddio-supply = <&pm8916_l6>;
> +
> + stby-gpio = <&msmgpio 99 GPIO_ACTIVE_LOW>;
> + reset-gpio = <&msmgpio 72 GPIO_ACTIVE_LOW>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + d2l_in: endpoint {
> + remote-endpoint = <&dsi0_out>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + d2l_out: endpoint {
> + remote-endpoint = <&panel_in>;
> + };
> + };
> + };
> + };
> + };
> +
> + panel: auo,b101xtn01 {
> + status = "okay";
> + compatible = "auo,b101xtn01", "panel-lvds";
> + power-supply = <&pm8916_l14>;
> +
> + width-mm = <223>;
> + height-mm = <125>;
> +
> + data-mapping = "jeida-24";
> +
> + panel-timing {
> + /* 1366x768 @60Hz */
> + clock-frequency = <72000000>;
> + hactive = <1366>;
> + vactive = <768>;
> + hsync-len = <70>;
> + hfront-porch = <20>;
> + hback-porch = <0>;
> + vsync-len = <42>;
> + vfront-porch = <14>;
> + vback-porch = <0>;
> + };
> +
> + port {
> + panel_in: endpoint {
> + remote-endpoint = <&d2l_out>;
> + };
> + };
> + };
> +
> + mdss@1a00000 {
> + status = "okay";
> +
> + mdp@1a01000 {
> + status = "okay";
> + };
> +
> + dsi@1a98000 {
> + status = "okay";
> + ..
> + ports {
> + port@1 {
> + dsi0_out: endpoint {
> + remote-endpoint = <&d2l_in>;
> + data-lanes = <0 1 2 3>;
> + };
> + };
> + };
> + };
> +
> + dsi-phy@1a98300 {
> + status = "okay";
> + ..
> + };
> + };
--
Regards,
Laurent Pinchart
On Wed, 11 Mar 2020 15:18:24 +0530, Vinay Simha BN wrote:
> Add yaml documentation for DSI/LVDS tc358775 bridge
>
> Signed-off-by: Vinay Simha BN <[email protected]>
>
> ---
> v1:
> Initial version
> ---
> .../bindings/display/bridge/toshiba-tc358775.yaml | 174 +++++++++++++++++++++
> 1 file changed, 174 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml: while scanning for the next token
found character that cannot start any token
in "<unicode string>", line 11, column 1
Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.example.dts' failed
make[1]: *** [Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs....
warning: no schema found in file: Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml: ignoring, error parsing file
Makefile:1262: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2
See https://patchwork.ozlabs.org/patch/1252753
Please check and re-submit.
rob,
i do not get the error when running 'make dt_binding_check' in my
build environment
Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
is there any tool available similar to scripts/checkpatch.pl -f
<file> , for yaml files?
On Thu, Mar 12, 2020 at 8:47 PM Rob Herring <[email protected]> wrote:
>
> On Wed, 11 Mar 2020 15:18:24 +0530, Vinay Simha BN wrote:
> > Add yaml documentation for DSI/LVDS tc358775 bridge
> >
> > Signed-off-by: Vinay Simha BN <[email protected]>
> >
> > ---
> > v1:
> > Initial version
> > ---
> > .../bindings/display/bridge/toshiba-tc358775.yaml | 174 +++++++++++++++++++++
> > 1 file changed, 174 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml: while scanning for the next token
> found character that cannot start any token
> in "<unicode string>", line 11, column 1
> Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.example.dts' failed
> make[1]: *** [Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.example.dts] Error 1
> make[1]: *** Waiting for unfinished jobs....
> warning: no schema found in file: Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml: ignoring, error parsing file
> Makefile:1262: recipe for target 'dt_binding_check' failed
> make: *** [dt_binding_check] Error 2
>
> See https://patchwork.ozlabs.org/patch/1252753
> Please check and re-submit.
--
regards,
vinaysimha
sam,
i need some inputs on the below error. I had created this file
Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
by using vim editor. Do we have any tool to create yaml file?
i do not get the error when running 'make dt_binding_check' in my
build environment
Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
is there any tool available similar to scripts/checkpatch.pl -f
<file> , for yaml files?
On Sun, Mar 15, 2020 at 8:54 PM Vinay Simha B N <[email protected]> wrote:
>
> rob,
>
> i do not get the error when running 'make dt_binding_check' in my
> build environment
> Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
>
> is there any tool available similar to scripts/checkpatch.pl -f
> <file> , for yaml files?
>
> On Thu, Mar 12, 2020 at 8:47 PM Rob Herring <[email protected]> wrote:
> >
> > On Wed, 11 Mar 2020 15:18:24 +0530, Vinay Simha BN wrote:
> > > Add yaml documentation for DSI/LVDS tc358775 bridge
> > >
> > > Signed-off-by: Vinay Simha BN <[email protected]>
> > >
> > > ---
> > > v1:
> > > Initial version
> > > ---
> > > .../bindings/display/bridge/toshiba-tc358775.yaml | 174 +++++++++++++++++++++
> > > 1 file changed, 174 insertions(+)
> > > create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> > >
> >
> > My bot found errors running 'make dt_binding_check' on your patch:
> >
> > Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml: while scanning for the next token
> > found character that cannot start any token
> > in "<unicode string>", line 11, column 1
> > Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.example.dts' failed
> > make[1]: *** [Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.example.dts] Error 1
> > make[1]: *** Waiting for unfinished jobs....
> > warning: no schema found in file: Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml: ignoring, error parsing file
> > Makefile:1262: recipe for target 'dt_binding_check' failed
> > make: *** [dt_binding_check] Error 2
> >
> > See https://patchwork.ozlabs.org/patch/1252753
> > Please check and re-submit.
>
>
>
> --
> regards,
> vinaysimha
--
regards,
vinaysimha
Hi Vinay.
On Tue, Mar 17, 2020 at 12:25:42PM +0530, Vinay Simha B N wrote:
> sam,
>
> i need some inputs on the below error. I had created this file
> Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> by using vim editor. Do we have any tool to create yaml file?
I use vim myself, but is careful to follow the right syntax.
>
> i do not get the error when running 'make dt_binding_check' in my
> build environment
> Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
>
> is there any tool available similar to scripts/checkpatch.pl -f
> <file> , for yaml files?
Please read Documentation/devicetree/writing-schema.
Here you can find general info + instruction how to install the tools
required for "make dt_binding_check".
I could reproduce the error reported by Rob.
I gave your binding file a shot - there were a lot of smaller issues:
- do not use tabs in yaml files
- be consistent in indent
- vendor prefixed properties needed some extra care
- example was full of bugs
- "..."
- no need for status = "okay";
- properties spelled wrong
For the example I adjusted it to use indent of 4 spaces, which IMO
is more readable than the two spaces used in the other parts of the
file.
I have attached the updated binding file - please review and fix.
This is just a quick shot, I did not do a proper review.
Please rename the file, other files in same dir are named "toshiba,xxx",
so replace '-' with ','.
And try to introduce bugs in the example - and check that the tooling
catches the bug.
hint:
make DT=.../foo.yaml dt_binding_check
is a qucik way to check only your binding.
And for new bindings the preferred license is: (GPL-2.0-only OR BSD-2-Clause)
Sam
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/bridge/toshiba-tc358775.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Toshiba TC358775 DSI to LVDS bridge bindings
maintainers:
- Vinay Simha BN <[email protected]>
description: |
This binding supports DSI to LVDS bridge TC358775
properties:
compatible:
const: toshiba,tc358775
reg:
maxItems: 1
description: i2c address of the bridge, 0x0f
toshiba,dsi-lanes:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
- minimum: 1
maximum: 4
default: 1
description: bla bla
toshiba,dual-link:
$ref: /schemas/types.yaml#definitions/flag
description: bla bla
vdd-supply:
maxItems: 1
description: 1.2V LVDS Power Supply
vddio-supply:
maxItems: 1
description: 1.8V IO Power Supply
stby-gpios:
maxItems: 1
description: Standby pin, Low active
reset-gpios:
maxItems: 1
description: Hardware reset, Low active
ports:
type: object
properties:
port@0:
type: object
description: |
DSI Input. The remote endpoint phandle should be a
reference to a valid mipi_dsi_host device node.
port@1:
type: object
description: |
Video port for LVDS output (panel or connector).
required:
- port@0
- port@1
required:
- compatible
- reg
- tc,dsi-lanes
- vdd-supply
- vddio-supply
- stby-gpios
- reset-gpios
- ports
examples:
- |+
#include <dt-bindings/gpio/gpio.h>
i2c@78b8000 {
#address-cells = <1>;
#size-cells = <0>;
/* On High speed expansion */
label = "HS-I2C2";
status = "okay";
tc_bridge: bridge@f {
compatible = "toshiba,tc358775";
reg = <0x0f>;
tc,dsi-lanes = <4>;
tc,dual-link = <0>;
vdd-supply = <&pm8916_l2>;
vddio-supply = <&pm8916_l6>;
stby-gpios = <&msmgpio 99 GPIO_ACTIVE_LOW>;
reset-gpios = <&msmgpio 72 GPIO_ACTIVE_LOW>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
d2l_in: endpoint {
remote-endpoint = <&dsi0_out>;
};
};
port@1 {
reg = <1>;
d2l_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};
};
panel: auo,b101xtn01 {
status = "okay";
compatible = "auo,b101xtn01", "panel-lvds";
power-supply = <&pm8916_l14>;
width-mm = <223>;
height-mm = <125>;
data-mapping = "jeida-24";
panel-timing {
/* 1366x768 @60Hz */
clock-frequency = <72000000>;
hactive = <1366>;
vactive = <768>;
hsync-len = <70>;
hfront-porch = <20>;
hback-porch = <0>;
vsync-len = <42>;
vfront-porch = <14>;
vback-porch = <0>;
};
port {
panel_in: endpoint {
remote-endpoint = <&d2l_out>;
};
};
};
mdss {
dsi@1a98000 {
ports {
port@1 {
dsi0_out: endpoint {
remote-endpoint = <&d2l_in>;
data-lanes = <0 1 2 3>;
};
};
};
};
};
...
sam,
This is my latest yaml file
https://github.com/vinaysimhabn/kernel-msm/blob/5.6.0-rc3-d2l-wip/Documentation/devicetree/bindings/display/bridge/toshiba%2Ctc358775.yaml
make CROSS_COMPILE=$TC64 ARCH=arm64
DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.yaml
dt_binding_check
i am getting these errors
Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.example.dt.yaml:
lvds-out: 'data-mapping', 'height-mm', 'panel-timing', 'width-mm' do
not match any of the regexes: 'pinctrl-[0-9]+'
Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.example.dt.yaml:
lvds-out: compatible: Additional items are not allowed ('panel-lvds'
was unexpected)
Documentation/devicetree/bindings/display/bridge/toshiba,tc358775.example.dt.yaml:
lvds-out: compatible: ['auo,b101xtn01', 'panel-lvds'] is too long
Please suggest how to add the references of panel/lvds.yaml or
panel/panel-common.yaml and panel/advantech,idk-2121wr.yaml in my yaml
file.
On Tue, Mar 17, 2020 at 7:57 PM Sam Ravnborg <[email protected]> wrote:
>
> Hi Vinay.
>
> On Tue, Mar 17, 2020 at 12:25:42PM +0530, Vinay Simha B N wrote:
> > sam,
> >
> > i need some inputs on the below error. I had created this file
> > Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> > by using vim editor. Do we have any tool to create yaml file?
>
> I use vim myself, but is careful to follow the right syntax.
>
> >
> > i do not get the error when running 'make dt_binding_check' in my
> > build environment
> > Documentation/devicetree/bindings/display/bridge/toshiba-tc358775.yaml
> >
> > is there any tool available similar to scripts/checkpatch.pl -f
> > <file> , for yaml files?
>
> Please read Documentation/devicetree/writing-schema.
> Here you can find general info + instruction how to install the tools
> required for "make dt_binding_check".
>
> I could reproduce the error reported by Rob.
> I gave your binding file a shot - there were a lot of smaller issues:
>
> - do not use tabs in yaml files
> - be consistent in indent
> - vendor prefixed properties needed some extra care
> - example was full of bugs
> - "..."
> - no need for status = "okay";
> - properties spelled wrong
>
> For the example I adjusted it to use indent of 4 spaces, which IMO
> is more readable than the two spaces used in the other parts of the
> file.
>
> I have attached the updated binding file - please review and fix.
> This is just a quick shot, I did not do a proper review.
>
> Please rename the file, other files in same dir are named "toshiba,xxx",
> so replace '-' with ','.
>
> And try to introduce bugs in the example - and check that the tooling
> catches the bug.
>
> hint:
>
> make DT=.../foo.yaml dt_binding_check
>
> is a qucik way to check only your binding.
>
> And for new bindings the preferred license is: (GPL-2.0-only OR BSD-2-Clause)
>
> Sam
>
> # SPDX-License-Identifier: GPL-2.0
> %YAML 1.2
> ---
> $id: http://devicetree.org/schemas/display/bridge/toshiba-tc358775.yaml#
> $schema: http://devicetree.org/meta-schemas/core.yaml#
>
>
> title: Toshiba TC358775 DSI to LVDS bridge bindings
>
> maintainers:
> - Vinay Simha BN <[email protected]>
>
> description: |
> This binding supports DSI to LVDS bridge TC358775
>
> properties:
> compatible:
> const: toshiba,tc358775
>
> reg:
> maxItems: 1
> description: i2c address of the bridge, 0x0f
>
> toshiba,dsi-lanes:
> allOf:
> - $ref: /schemas/types.yaml#/definitions/uint32
> - minimum: 1
> maximum: 4
> default: 1
> description: bla bla
>
> toshiba,dual-link:
> $ref: /schemas/types.yaml#definitions/flag
> description: bla bla
>
> vdd-supply:
> maxItems: 1
> description: 1.2V LVDS Power Supply
>
> vddio-supply:
> maxItems: 1
> description: 1.8V IO Power Supply
>
> stby-gpios:
> maxItems: 1
> description: Standby pin, Low active
>
> reset-gpios:
> maxItems: 1
> description: Hardware reset, Low active
>
> ports:
> type: object
>
> properties:
> port@0:
> type: object
> description: |
> DSI Input. The remote endpoint phandle should be a
> reference to a valid mipi_dsi_host device node.
> port@1:
> type: object
> description: |
> Video port for LVDS output (panel or connector).
>
> required:
> - port@0
> - port@1
>
> required:
> - compatible
> - reg
> - tc,dsi-lanes
> - vdd-supply
> - vddio-supply
> - stby-gpios
> - reset-gpios
> - ports
>
> examples:
> - |+
> #include <dt-bindings/gpio/gpio.h>
>
> i2c@78b8000 {
> #address-cells = <1>;
> #size-cells = <0>;
>
> /* On High speed expansion */
> label = "HS-I2C2";
> status = "okay";
>
> tc_bridge: bridge@f {
> compatible = "toshiba,tc358775";
> reg = <0x0f>;
>
> tc,dsi-lanes = <4>;
> tc,dual-link = <0>;
>
> vdd-supply = <&pm8916_l2>;
> vddio-supply = <&pm8916_l6>;
>
> stby-gpios = <&msmgpio 99 GPIO_ACTIVE_LOW>;
> reset-gpios = <&msmgpio 72 GPIO_ACTIVE_LOW>;
>
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
>
> port@0 {
> reg = <0>;
> d2l_in: endpoint {
> remote-endpoint = <&dsi0_out>;
> };
> };
>
> port@1 {
> reg = <1>;
> d2l_out: endpoint {
> remote-endpoint = <&panel_in>;
> };
> };
> };
> };
> };
>
> panel: auo,b101xtn01 {
> status = "okay";
> compatible = "auo,b101xtn01", "panel-lvds";
> power-supply = <&pm8916_l14>;
>
> width-mm = <223>;
> height-mm = <125>;
>
> data-mapping = "jeida-24";
>
> panel-timing {
> /* 1366x768 @60Hz */
> clock-frequency = <72000000>;
> hactive = <1366>;
> vactive = <768>;
> hsync-len = <70>;
> hfront-porch = <20>;
> hback-porch = <0>;
> vsync-len = <42>;
> vfront-porch = <14>;
> vback-porch = <0>;
> };
>
> port {
> panel_in: endpoint {
> remote-endpoint = <&d2l_out>;
> };
> };
> };
>
> mdss {
> dsi@1a98000 {
> ports {
> port@1 {
> dsi0_out: endpoint {
> remote-endpoint = <&d2l_in>;
> data-lanes = <0 1 2 3>;
> };
> };
> };
> };
> };
>
> ...
--
regards,
vinaysimha