diff mbox series

[09/12] dt-bindings: panel: Add Bananapi S070WV20-CT16 MIPI-DSI panel bindings

Message ID 20180927114850.24565-10-jagan@amarulasolutions.com (mailing list archive)
State Superseded, archived
Headers show
Series drm/sun4i: Allwinner A64 MIPI-DSI support | expand

Commit Message

Jagan Teki Sept. 27, 2018, 11:48 a.m. UTC
Bananapi S070WV20-CT16 is 800x480, 4-lane MIPI-DSI panel, the
same panel PCB comes with parallel RBG which is supported via
panel-simple with "bananapi,s070wv20-ct16" compatible.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 .../panel/bananapi,s070wv20-ct16-dsi.txt      | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt

Comments

Rob Herring (Arm) Oct. 15, 2018, 6:24 p.m. UTC | #1
On Thu, 27 Sep 2018 17:18:47 +0530, Jagan Teki wrote:
> Bananapi S070WV20-CT16 is 800x480, 4-lane MIPI-DSI panel, the
> same panel PCB comes with parallel RBG which is supported via
> panel-simple with "bananapi,s070wv20-ct16" compatible.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  .../panel/bananapi,s070wv20-ct16-dsi.txt      | 21 +++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Chen-Yu Tsai Oct. 22, 2018, 10:22 a.m. UTC | #2
Hi Rob,

On Mon, Oct 15, 2018 at 7:24 PM Rob Herring <robh@kernel.org> wrote:
>
> On Thu, 27 Sep 2018 17:18:47 +0530, Jagan Teki wrote:
> > Bananapi S070WV20-CT16 is 800x480, 4-lane MIPI-DSI panel, the
> > same panel PCB comes with parallel RBG which is supported via
> > panel-simple with "bananapi,s070wv20-ct16" compatible.
> >
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> >  .../panel/bananapi,s070wv20-ct16-dsi.txt      | 21 +++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt
> >
>
> Reviewed-by: Rob Herring <robh@kernel.org>

This "panel" is actually an RGB panel with a MIPI-DSI-to-RGB bridge
tacked on. On one particular revision of this module, one can also
directly use the RGB interface.

Would it be better to model this as bridge+panel? We already have
a binding for the RGB version [1]. This would make it harder to
make a driver though, as there is no publicly available datasheet
for the bridge chip, so it's likely that part of the init sequence
would have to be hard-coded.

Thanks
ChenYu

[1] Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt
Rob Herring (Arm) Oct. 23, 2018, 3:11 p.m. UTC | #3
On Mon, Oct 22, 2018 at 5:22 AM Chen-Yu Tsai <wens@csie.org> wrote:
>
> Hi Rob,
>
> On Mon, Oct 15, 2018 at 7:24 PM Rob Herring <robh@kernel.org> wrote:
> >
> > On Thu, 27 Sep 2018 17:18:47 +0530, Jagan Teki wrote:
> > > Bananapi S070WV20-CT16 is 800x480, 4-lane MIPI-DSI panel, the
> > > same panel PCB comes with parallel RBG which is supported via
> > > panel-simple with "bananapi,s070wv20-ct16" compatible.
> > >
> > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > ---
> > >  .../panel/bananapi,s070wv20-ct16-dsi.txt      | 21 +++++++++++++++++++
> > >  1 file changed, 21 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt
> > >
> >
> > Reviewed-by: Rob Herring <robh@kernel.org>
>
> This "panel" is actually an RGB panel with a MIPI-DSI-to-RGB bridge
> tacked on. On one particular revision of this module, one can also
> directly use the RGB interface.
>
> Would it be better to model this as bridge+panel? We already have
> a binding for the RGB version [1]. This would make it harder to
> make a driver though, as there is no publicly available datasheet
> for the bridge chip, so it's likely that part of the init sequence
> would have to be hard-coded.

Perhaps you can use the same compatible and detect based on the OF
graph connection whether it is DSI or RGB interface? That would mean
the RGB version doesn't use simple-panel driver, but that should be
okay.

If there's other users of this bridge chip, then modeling the bridge
separately would be better.

Rob
Chen-Yu Tsai Oct. 24, 2018, 8:22 p.m. UTC | #4
On Tue, Oct 23, 2018 at 4:11 PM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Oct 22, 2018 at 5:22 AM Chen-Yu Tsai <wens@csie.org> wrote:
> >
> > Hi Rob,
> >
> > On Mon, Oct 15, 2018 at 7:24 PM Rob Herring <robh@kernel.org> wrote:
> > >
> > > On Thu, 27 Sep 2018 17:18:47 +0530, Jagan Teki wrote:
> > > > Bananapi S070WV20-CT16 is 800x480, 4-lane MIPI-DSI panel, the
> > > > same panel PCB comes with parallel RBG which is supported via
> > > > panel-simple with "bananapi,s070wv20-ct16" compatible.
> > > >
> > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > > ---
> > > >  .../panel/bananapi,s070wv20-ct16-dsi.txt      | 21 +++++++++++++++++++
> > > >  1 file changed, 21 insertions(+)
> > > >  create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt
> > > >
> > >
> > > Reviewed-by: Rob Herring <robh@kernel.org>
> >
> > This "panel" is actually an RGB panel with a MIPI-DSI-to-RGB bridge
> > tacked on. On one particular revision of this module, one can also
> > directly use the RGB interface.
> >
> > Would it be better to model this as bridge+panel? We already have
> > a binding for the RGB version [1]. This would make it harder to
> > make a driver though, as there is no publicly available datasheet
> > for the bridge chip, so it's likely that part of the init sequence
> > would have to be hard-coded.
>
> Perhaps you can use the same compatible and detect based on the OF
> graph connection whether it is DSI or RGB interface? That would mean
> the RGB version doesn't use simple-panel driver, but that should be
> okay.

I think that would work.

> If there's other users of this bridge chip, then modeling the bridge
> separately would be better.

I doubt we'd find it. And given that there are no docs for the init
sequence, even though we could make out some parts, it will always
be a partially binary sequence tied to the compatible for the panel.

Thanks
ChenYu
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt b/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt
new file mode 100644
index 000000000000..c477163f7999
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16-dsi.txt
@@ -0,0 +1,21 @@ 
+Bananapi S070WV20 CT16 MIPI-DSI panel
+
+Required properties:
+- compatible: must be "bananapi,s070wv20-ct16-dsi"
+- reg: DSI virtual channel used by that screen
+- avdd-supply: analog regulator dc1 switch
+- dvdd-supply: 3v3 digital regulator
+- reset-gpios: a GPIO phandle for the reset pin
+
+Optional properties:
+- backlight: phandle for the backlight control.
+
+Example:
+panel@0 {
+	compatible = "bananapi,s070wv20-ct16-dsi";
+	reg = <0>;
+	avdd-supply = <&reg_dc1sw>;
+	dvdd-supply = <&reg_dldo1>;
+	reset-gpios = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
+	backlight = <&backlight_dsi>;
+};