mbox series

[00/10] drm/sunxi: Display pipeline and HDMI output on A10/A20

Message ID 20171017121807.2994-1-wens@csie.org
Headers show
Series drm/sunxi: Display pipeline and HDMI output on A10/A20 | expand

Message

Chen-Yu Tsai Oct. 17, 2017, 12:17 p.m. UTC
Hi everyone,

This series adds display support for Allwinner A10/A20 SoCs to the
sun4i-drm driver. The core display pipeline components and HDMI are
covered. LCD panel RGB output should also be available, but I do not
have devices to test this on.

Jonathan had HDMI working on the A20, along with LCD panels for a
development board. I've picked up the work, polished it, and added A10
(which is what the A20 is based on) support to the batch.

The series is based on my latest sun4i-drm cleanup series. The patches
should apply without them, but display would be broken on devices with
more than 1GB RAM, and HDMI display colors would be inverted on A10
devices.

The TCON changes will likely conflict with the A83T LVDS series Maxime
posted, but they would be obvious and easy to fix.

The patches are pretty self-explaining:

  - 1 patch exports the PLLs used by the HDMI controller

  - 1 patch adds support for the backend output mux

  - 3 patches add A10/A20 compatible strings to the sun4i-drm driver

  - 2 patches add the display pipeline nodes to the .dtsi files
 
  - 2 patches enable HDMI output on various boards

Chen-Yu Tsai (6):
  drm/sun4i: backend: Support output muxing
  drm/sun4i: hdmi: Support HDMI controller on A10
  drm/sun4i: Add support for A10 display pipeline components
  ARM: dts: sun4i: Add device nodes for display pipelines
  ARM: dts: sun4i: Enable HDMI support on some A10 devices
  ARM: dts: sun7i: Enable HDMI support on some A20 devices

Jonathan Liu (4):
  drm/sun4i: tcon: Add support for A10 TCON
  drm/sun4i: Add support for A20 display pipeline components
  clk: sunxi-ng: sun4i: Export video PLLs
  ARM: dts: sun7i: Add device nodes for display pipelines

 .../bindings/display/sunxi/sun4i-drm.txt           |   9 +
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts         |  25 ++
 arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts     |  21 ++
 arch/arm/boot/dts/sun4i-a10.dtsi                   | 306 ++++++++++++++++++++
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts   |  25 ++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts        |  25 ++
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts         |  25 ++
 arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts          |  25 ++
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts     |  25 ++
 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts    |  25 ++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts    |  25 ++
 arch/arm/boot/dts/sun7i-a20.dtsi                   | 307 +++++++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun4i-a10.h               |   4 +-
 drivers/gpu/drm/sun4i/sun4i_backend.c              |  68 ++++-
 drivers/gpu/drm/sun4i/sun4i_backend.h              |   3 +-
 drivers/gpu/drm/sun4i/sun4i_drv.c                  |  10 +-
 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c             |  53 ++++
 drivers/gpu/drm/sun4i/sun4i_tcon.c                 |  37 +++
 include/dt-bindings/clock/sun4i-a10-ccu.h          |   2 +
 19 files changed, 1012 insertions(+), 8 deletions(-)

Comments

Chen-Yu Tsai Oct. 17, 2017, 2:38 p.m. UTC | #1
On Tue, Oct 17, 2017 at 8:18 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> Various A10-based development boards have standard HDMI connectors
> wired to the dedicated HDMI pins on the SoC.
>
> Enable the display pipeline and HDMI output on boards I have or have
> access to schematics:
>
>   - Cubieboard
>   - Olimex A10-OLinuXino-LIME
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>
> Can someone could double check the LIME for me? It should work given
> it's the same layout as the A20 variant, which has been tested.
>
> ---
>  arch/arm/boot/dts/sun4i-a10-cubieboard.dts     | 25 +++++++++++++++++++++++++
>  arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 21 +++++++++++++++++++++
>  2 files changed, 46 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> index d5ba5400a975..1982c8c238c5 100644
> --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> @@ -59,6 +59,17 @@
>                 stdout-path = "serial0:115200n8";
>         };
>
> +       hdmi-connector {
> +               compatible = "hdmi-connector";
> +               type = "a";
> +
> +               port {
> +                       hdmi_con_in: endpoint {
> +                               remote-endpoint = <&hdmi_out_con>;
> +                       };
> +               };
> +       };
> +
>         leds {
>                 compatible = "gpio-leds";
>                 pinctrl-names = "default";
> @@ -90,6 +101,10 @@
>         cpu-supply = <&reg_dcdc2>;
>  };
>
> +&de {
> +       status = "okay";
> +};
> +
>  &ehci0 {
>         status = "okay";
>  };
> @@ -107,6 +122,16 @@
>         status = "okay";
>  };
>
> +&hdmi {
> +       status = "okay";
> +};
> +
> +&hdmi_out {
> +       hdmi_out_con: endpoint {
> +               remote-endpoint = <&hdmi_con_in>;
> +       };
> +};
> +
>  &i2c0 {
>         status = "okay";
>
> diff --git a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
> index 2d1b4329f54a..e39ec9beef75 100644
> --- a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
> +++ b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
> @@ -58,6 +58,17 @@
>                 stdout-path = "serial0:115200n8";
>         };
>
> +       hdmi-connector {
> +               compatible = "hdmi-connector";
> +               type = "a";
> +
> +               port {
> +                       hdmi_con_in: endpoint {
> +                               remote-endpoint = <&hdmi_out_con>;
> +                       };
> +               };
> +       };
> +
>         leds {
>                 compatible = "gpio-leds";
>                 pinctrl-names = "default";
> @@ -106,6 +117,16 @@
>         status = "okay";
>  };

The LIME's dts change is missing the &de part. :(
I can fix this when applying.

ChenYu

>
> +&hdmi {
> +       status = "okay";
> +};
> +
> +&hdmi_out {
> +       hdmi_out_con: endpoint {
> +               remote-endpoint = <&hdmi_con_in>;
> +       };
> +};
> +
>  &i2c0 {
>         status = "okay";
>
> --
> 2.14.2
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Maxime Ripard Oct. 17, 2017, 6:10 p.m. UTC | #2
On Tue, Oct 17, 2017 at 10:38:45PM +0800, Chen-Yu Tsai wrote:
> > diff --git a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
> > index 2d1b4329f54a..e39ec9beef75 100644
> > --- a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
> > +++ b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
> > @@ -58,6 +58,17 @@
> >                 stdout-path = "serial0:115200n8";
> >         };
> >
> > +       hdmi-connector {
> > +               compatible = "hdmi-connector";
> > +               type = "a";
> > +
> > +               port {
> > +                       hdmi_con_in: endpoint {
> > +                               remote-endpoint = <&hdmi_out_con>;
> > +                       };
> > +               };
> > +       };
> > +
> >         leds {
> >                 compatible = "gpio-leds";
> >                 pinctrl-names = "default";
> > @@ -106,6 +117,16 @@
> >         status = "okay";
> >  };
> 
> The LIME's dts change is missing the &de part. :(
> I can fix this when applying.

I've applied all of rest, I'll leave that one up to you, with my
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Maxime
Chen-Yu Tsai Oct. 18, 2017, 1:42 a.m. UTC | #3
On Wed, Oct 18, 2017 at 2:10 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Tue, Oct 17, 2017 at 10:38:45PM +0800, Chen-Yu Tsai wrote:
>> > diff --git a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
>> > index 2d1b4329f54a..e39ec9beef75 100644
>> > --- a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
>> > +++ b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
>> > @@ -58,6 +58,17 @@
>> >                 stdout-path = "serial0:115200n8";
>> >         };
>> >
>> > +       hdmi-connector {
>> > +               compatible = "hdmi-connector";
>> > +               type = "a";
>> > +
>> > +               port {
>> > +                       hdmi_con_in: endpoint {
>> > +                               remote-endpoint = <&hdmi_out_con>;
>> > +                       };
>> > +               };
>> > +       };
>> > +
>> >         leds {
>> >                 compatible = "gpio-leds";
>> >                 pinctrl-names = "default";
>> > @@ -106,6 +117,16 @@
>> >         status = "okay";
>> >  };
>>
>> The LIME's dts change is missing the &de part. :(
>> I can fix this when applying.
>
> I've applied all of rest, I'll leave that one up to you, with my
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Done.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html