mbox series

[v4,00/11] arm64: allwinner: Add A64 DE2 HDMI support

Message ID 20180904044053.15425-1-icenowy@aosc.io
Headers show
Series arm64: allwinner: Add A64 DE2 HDMI support | expand

Message

Icenowy Zheng Sept. 4, 2018, 4:40 a.m. UTC
Allwinner A64 has display engine pipeline like other Allwinner SOC's A83T/H3/H5.

A64 behaviour similar to Allwinner A83T where
Mixer0 => TCON0 => LVDS/RGB/MIPI-DSI
Mixer1 => TCON1 => HDMI
as per Display System Block Diagram from the A64 user manual.

This patchset adds support for the two display pipelines, and enables
the HDMI output on several boards. The first pipeline is not enabled in
this patchset yet, although it's added.

Icenowy Zheng (2):
  clk: sunxi-ng: a64: Add max. rate constraint to video PLLs
  dt-bindings: sun4i-drm: add HDMI VCC supply property for sun8i-dw-hdmi

Jagan Teki (8):
  clk: sunxi-ng: a64: Add minimal rate for video PLLs
  dt-bindings: display: Add compatible for A64 DE2 display pipeline
  drm/sun4i: Add support for A64 mixers
  drm/sun4i: Add support for A64 display engine
  dt-bindings: display: Add compatible for A64 HDMI
  dt-bindings: clock: sun50i-a64-ccu: Add PLL_VIDEO0 macro
  arm64: dts: allwinner: a64: Add display pipeline
  arm64: dts: allwinner: a64: Enable HDMI output on A64 boards w/ HDMI

Jernej Skrabec (1):
  drm/sun4i: Add support for HDMI voltage regulator

 .../bindings/display/sunxi/sun4i-drm.txt      |   9 +
 .../dts/allwinner/sun50i-a64-bananapi-m64.dts |  34 ++++
 .../dts/allwinner/sun50i-a64-nanopi-a64.dts   |  34 ++++
 .../dts/allwinner/sun50i-a64-olinuxino.dts    |  34 ++++
 .../dts/allwinner/sun50i-a64-orangepi-win.dts |  34 ++++
 .../boot/dts/allwinner/sun50i-a64-pine64.dts  |  34 ++++
 .../allwinner/sun50i-a64-sopine-baseboard.dts |  34 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 170 ++++++++++++++++++
 drivers/clk/sunxi-ng/ccu-sun50i-a64.c         |  48 ++---
 drivers/clk/sunxi-ng/ccu-sun50i-a64.h         |   4 +-
 drivers/gpu/drm/sun4i/sun4i_drv.c             |   1 +
 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c         |  17 +-
 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h         |   2 +
 drivers/gpu/drm/sun4i/sun8i_mixer.c           |  24 +++
 include/dt-bindings/clock/sun50i-a64-ccu.h    |   1 +
 15 files changed, 456 insertions(+), 24 deletions(-)

Comments

Maxime Ripard Sept. 5, 2018, 7:16 a.m. UTC | #1
On Tue, Sep 04, 2018 at 12:40:43PM +0800, Icenowy Zheng wrote:
> From: Jagan Teki <jagan@amarulasolutions.com>
> 
> According to documentation and experience with other similar SoCs, video
> PLLs don't work stable if their output frequency is set below 192 MHz.
> 
> Because of that, set minimal rate to both A64 video PLLs to 192 MHz.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>

Applied, thanks
Maxime
Maxime Ripard Sept. 5, 2018, 7:16 a.m. UTC | #2
On Tue, Sep 04, 2018 at 12:40:44PM +0800, Icenowy Zheng wrote:
> Video PLLs on A64 can be set to higher rate that it is actually
> supported by HW.
> 
> Limit maximum rate to 1008 MHz. This is the maximum allowed rate by BSP
> clock driver. Interestengly, user manual specifies maximum frequency to
> be 600 MHz. Historically, this data was wrong in some user manuals for
> other SoCs, so more faith is put in BSP clock driver.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>

Applied, thanks!
Maxime
Maxime Ripard Sept. 5, 2018, 7:21 a.m. UTC | #3
On Tue, Sep 04, 2018 at 12:40:46PM +0800, Icenowy Zheng wrote:
> From: Jagan Teki <jagan@amarulasolutions.com>
> 
> Mixers in Allwinner have similar capabilities as others SoCs with DE2.
> 
> Add support for them.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> [Icenowy: Add mixer1]
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>

Applied, thanks!
Maxime
Maxime Ripard Sept. 5, 2018, 7:21 a.m. UTC | #4
On Tue, Sep 04, 2018 at 12:40:47PM +0800, Icenowy Zheng wrote:
> From: Jagan Teki <jagan@amarulasolutions.com>
> 
> Display Engine(DE2) in Allwinner A64 has two mixers and tcons.
> 
> The routing for mixer0 is through tcon0 and connected to
> LVDS/RGB/MIPI-DSI controller.
> 
> The routing for mixer1 is through tcon1 and connected to HDMI.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>

Applied, thanks!
Maxime
Maxime Ripard Sept. 5, 2018, 7:22 a.m. UTC | #5
On Tue, Sep 04, 2018 at 12:40:52PM +0800, Icenowy Zheng wrote:
> From: Jernej Skrabec <jernej.skrabec@siol.net>
> 
> Some boards have HDMI VCC pin connected to voltage regulator which may
> not be turned on by default.
> 
> Add support for such boards by adding voltage regulator handling code to
> HDMI driver.
> 
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> [Icenowy: change supply name to "hvcc"]
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>

Applied, thanks!
Maxime
Jagan Teki Sept. 5, 2018, 7:26 a.m. UTC | #6
On Tue, Sep 4, 2018 at 10:10 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
> From: Jagan Teki <jagan@amarulasolutions.com>
>
> Enable all necessary device tree nodes and add connector node to device
> trees for all supported A64 boards with HDMI.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> [Icenowy: squash all board patches altogether and change supply name]
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
> Changes in v4:
> - Rebase some device trees.
> Changes in v3,1:
> - Squash all enablement patches altogether.
> - Change supply name to match DT binding & driver change.
> Changes for v3:
> - Enable all pipeline components
> Changes for v2:
> - none
>
>  .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 34 +++++++++++++++++++
>  .../dts/allwinner/sun50i-a64-nanopi-a64.dts   | 34 +++++++++++++++++++
>  .../dts/allwinner/sun50i-a64-olinuxino.dts    | 34 +++++++++++++++++++
>  .../dts/allwinner/sun50i-a64-orangepi-win.dts | 34 +++++++++++++++++++
>  .../boot/dts/allwinner/sun50i-a64-pine64.dts  | 34 +++++++++++++++++++
>  .../allwinner/sun50i-a64-sopine-baseboard.dts | 34 +++++++++++++++++++
>  6 files changed, 204 insertions(+)

Tested-by: Jagan Teki <jagan@amarulasolutions.com> # BPI-M64, OPI-Win,
A64-Olinuxino, NPI-A64

Pine64 boards look unable by saying
[drm] Cannot find any crtc or sizes

May be someone can confirm, it.
Maxime Ripard Sept. 5, 2018, 7:50 a.m. UTC | #7
On Tue, Sep 04, 2018 at 12:40:50PM +0800, Icenowy Zheng wrote:
> +		hdmi_phy: hdmi-phy@1ef0000 {
> +			compatible = "allwinner,sun8i-h3-hdmi-phy";
> +			reg = <0x01ef0000 0x10000>;
> +			clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
> +				 <&ccu 7>;
> +			clock-names = "bus", "mod", "pll-0";
> +			resets = <&ccu RST_BUS_HDMI0>;
> +			reset-names = "phy";
> +			#phy-cells = <0>;
> +		};

This needs to use the bindings we have for that phy.

Maxime
Maxime Ripard Sept. 5, 2018, 7:51 a.m. UTC | #8
On Wed, Sep 05, 2018 at 12:56:03PM +0530, Jagan Teki wrote:
> On Tue, Sep 4, 2018 at 10:10 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
> > From: Jagan Teki <jagan@amarulasolutions.com>
> >
> > Enable all necessary device tree nodes and add connector node to device
> > trees for all supported A64 boards with HDMI.
> >
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > [Icenowy: squash all board patches altogether and change supply name]
> > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> > ---
> > Changes in v4:
> > - Rebase some device trees.
> > Changes in v3,1:
> > - Squash all enablement patches altogether.
> > - Change supply name to match DT binding & driver change.
> > Changes for v3:
> > - Enable all pipeline components
> > Changes for v2:
> > - none
> >
> >  .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 34 +++++++++++++++++++
> >  .../dts/allwinner/sun50i-a64-nanopi-a64.dts   | 34 +++++++++++++++++++
> >  .../dts/allwinner/sun50i-a64-olinuxino.dts    | 34 +++++++++++++++++++
> >  .../dts/allwinner/sun50i-a64-orangepi-win.dts | 34 +++++++++++++++++++
> >  .../boot/dts/allwinner/sun50i-a64-pine64.dts  | 34 +++++++++++++++++++
> >  .../allwinner/sun50i-a64-sopine-baseboard.dts | 34 +++++++++++++++++++
> >  6 files changed, 204 insertions(+)
> 
> Tested-by: Jagan Teki <jagan@amarulasolutions.com> # BPI-M64, OPI-Win,
> A64-Olinuxino, NPI-A64
> 
> Pine64 boards look unable by saying
> [drm] Cannot find any crtc or sizes
> 
> May be someone can confirm, it.

Then we should drop the pine64 additions until someone figures it out,
as it has been already discussed.

Maxime
Jagan Teki Sept. 5, 2018, 7:57 a.m. UTC | #9
On Wed, Sep 5, 2018 at 1:21 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> On Wed, Sep 05, 2018 at 12:56:03PM +0530, Jagan Teki wrote:
>> On Tue, Sep 4, 2018 at 10:10 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
>> > From: Jagan Teki <jagan@amarulasolutions.com>
>> >
>> > Enable all necessary device tree nodes and add connector node to device
>> > trees for all supported A64 boards with HDMI.
>> >
>> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>> > [Icenowy: squash all board patches altogether and change supply name]
>> > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> > ---
>> > Changes in v4:
>> > - Rebase some device trees.
>> > Changes in v3,1:
>> > - Squash all enablement patches altogether.
>> > - Change supply name to match DT binding & driver change.
>> > Changes for v3:
>> > - Enable all pipeline components
>> > Changes for v2:
>> > - none
>> >
>> >  .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 34 +++++++++++++++++++
>> >  .../dts/allwinner/sun50i-a64-nanopi-a64.dts   | 34 +++++++++++++++++++
>> >  .../dts/allwinner/sun50i-a64-olinuxino.dts    | 34 +++++++++++++++++++
>> >  .../dts/allwinner/sun50i-a64-orangepi-win.dts | 34 +++++++++++++++++++
>> >  .../boot/dts/allwinner/sun50i-a64-pine64.dts  | 34 +++++++++++++++++++
>> >  .../allwinner/sun50i-a64-sopine-baseboard.dts | 34 +++++++++++++++++++
>> >  6 files changed, 204 insertions(+)
>>
>> Tested-by: Jagan Teki <jagan@amarulasolutions.com> # BPI-M64, OPI-Win,
>> A64-Olinuxino, NPI-A64
>>
>> Pine64 boards look unable by saying
>> [drm] Cannot find any crtc or sizes
>>
>> May be someone can confirm, it.
>
> Then we should drop the pine64 additions until someone figures it out,
> as it has been already discussed.

That is fine, but If anyone have pine64 can confirm this.
Sergey Suloev Sept. 5, 2018, 10:22 a.m. UTC | #10
Hi,

On 09/05/2018 10:16 AM, Maxime Ripard wrote:
> On Tue, Sep 04, 2018 at 12:40:44PM +0800, Icenowy Zheng wrote:
>> Video PLLs on A64 can be set to higher rate that it is actually
>> supported by HW.
>>
>> Limit maximum rate to 1008 MHz. This is the maximum allowed rate by BSP
>> clock driver. Interestengly, user manual specifies maximum frequency to
>> be 600 MHz. Historically, this data was wrong in some user manuals for
>> other SoCs, so more faith is put in BSP clock driver.
>>
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Applied, thanks!
> Maxime
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
what source tree this patch is supposed to apply for ?
I can't find  the SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN_MAX declaration 
in 4.19

Thank you
Sergey
Vasily Khoruzhick Sept. 5, 2018, 10:53 p.m. UTC | #11
I can test it tonight.

On Wed, Sep 5, 2018 at 12:57 AM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> On Wed, Sep 5, 2018 at 1:21 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>> On Wed, Sep 05, 2018 at 12:56:03PM +0530, Jagan Teki wrote:
>>> On Tue, Sep 4, 2018 at 10:10 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
>>> > From: Jagan Teki <jagan@amarulasolutions.com>
>>> >
>>> > Enable all necessary device tree nodes and add connector node to device
>>> > trees for all supported A64 boards with HDMI.
>>> >
>>> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>> > [Icenowy: squash all board patches altogether and change supply name]
>>> > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>>> > ---
>>> > Changes in v4:
>>> > - Rebase some device trees.
>>> > Changes in v3,1:
>>> > - Squash all enablement patches altogether.
>>> > - Change supply name to match DT binding & driver change.
>>> > Changes for v3:
>>> > - Enable all pipeline components
>>> > Changes for v2:
>>> > - none
>>> >
>>> >  .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 34 +++++++++++++++++++
>>> >  .../dts/allwinner/sun50i-a64-nanopi-a64.dts   | 34 +++++++++++++++++++
>>> >  .../dts/allwinner/sun50i-a64-olinuxino.dts    | 34 +++++++++++++++++++
>>> >  .../dts/allwinner/sun50i-a64-orangepi-win.dts | 34 +++++++++++++++++++
>>> >  .../boot/dts/allwinner/sun50i-a64-pine64.dts  | 34 +++++++++++++++++++
>>> >  .../allwinner/sun50i-a64-sopine-baseboard.dts | 34 +++++++++++++++++++
>>> >  6 files changed, 204 insertions(+)
>>>
>>> Tested-by: Jagan Teki <jagan@amarulasolutions.com> # BPI-M64, OPI-Win,
>>> A64-Olinuxino, NPI-A64
>>>
>>> Pine64 boards look unable by saying
>>> [drm] Cannot find any crtc or sizes
>>>
>>> May be someone can confirm, it.
>>
>> Then we should drop the pine64 additions until someone figures it out,
>> as it has been already discussed.
>
> That is fine, but If anyone have pine64 can confirm this.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Vasily Khoruzhick Sept. 6, 2018, 4:12 a.m. UTC | #12
On Wed, Sep 5, 2018 at 3:53 PM, Vasily Khoruzhick <anarsoul@gmail.com> wrote:
> I can test it tonight.

It works fine for me on pine64-lts with HDMI monitor:

[    1.969772] sun4i-drm display-engine: bound 1100000.mixer (ops
sun8i_mixer_ops)
[    1.979302] sun4i-drm display-engine: bound 1200000.mixer (ops
sun8i_mixer_ops)
[    1.979738] sun4i-drm display-engine: No panel or bridge found...
RGB output disabled
[    1.979755] sun4i-drm display-engine: bound 1c0c000.lcd-controller
(ops sun4i_tcon_ops)
[    1.979935] sun4i-drm display-engine: bound 1c0d000.lcd-controller
(ops sun4i_tcon_ops)
[    1.980017] sun4i-drm display-engine: failed to bind 1ee0000.hdmi
(ops sun8i_dw_hdmi_ops): -517
[    1.980306] sun4i-drm display-engine: Couldn't bind all pipelines components
[    1.980446] sun4i-drm display-engine: master bind failed: -517
[    4.230997] sun4i-drm display-engine: bound 1100000.mixer (ops
sun8i_mixer_ops)
[    4.247886] sun4i-drm display-engine: bound 1200000.mixer (ops
sun8i_mixer_ops)
[    4.255639] sun4i-drm display-engine: No panel or bridge found...
RGB output disabled
[    4.263482] sun4i-drm display-engine: bound 1c0c000.lcd-controller
(ops sun4i_tcon_ops)
[    4.283255] sun4i-drm display-engine: bound 1c0d000.lcd-controller
(ops sun4i_tcon_ops)
[    4.322055] sun4i-drm display-engine: bound 1ee0000.hdmi (ops
sun8i_dw_hdmi_ops)
[    4.342115] fb: switching to sun4i-drm-fb from simple
[    5.001434] sun4i-drm display-engine: fb0: DRM emulated frame buffer device
[    5.008933] [drm] Initialized sun4i-drm 1.0.0 20150629 for
display-engine on minor 0

I tested non-applied patches from this series on top of
git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git
sunxi/for-next

Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>

>
> On Wed, Sep 5, 2018 at 12:57 AM, Jagan Teki <jagan@amarulasolutions.com> wrote:
>> On Wed, Sep 5, 2018 at 1:21 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>>> On Wed, Sep 05, 2018 at 12:56:03PM +0530, Jagan Teki wrote:
>>>> On Tue, Sep 4, 2018 at 10:10 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
>>>> > From: Jagan Teki <jagan@amarulasolutions.com>
>>>> >
>>>> > Enable all necessary device tree nodes and add connector node to device
>>>> > trees for all supported A64 boards with HDMI.
>>>> >
>>>> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>>> > [Icenowy: squash all board patches altogether and change supply name]
>>>> > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>>>> > ---
>>>> > Changes in v4:
>>>> > - Rebase some device trees.
>>>> > Changes in v3,1:
>>>> > - Squash all enablement patches altogether.
>>>> > - Change supply name to match DT binding & driver change.
>>>> > Changes for v3:
>>>> > - Enable all pipeline components
>>>> > Changes for v2:
>>>> > - none
>>>> >
>>>> >  .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 34 +++++++++++++++++++
>>>> >  .../dts/allwinner/sun50i-a64-nanopi-a64.dts   | 34 +++++++++++++++++++
>>>> >  .../dts/allwinner/sun50i-a64-olinuxino.dts    | 34 +++++++++++++++++++
>>>> >  .../dts/allwinner/sun50i-a64-orangepi-win.dts | 34 +++++++++++++++++++
>>>> >  .../boot/dts/allwinner/sun50i-a64-pine64.dts  | 34 +++++++++++++++++++
>>>> >  .../allwinner/sun50i-a64-sopine-baseboard.dts | 34 +++++++++++++++++++
>>>> >  6 files changed, 204 insertions(+)
>>>>
>>>> Tested-by: Jagan Teki <jagan@amarulasolutions.com> # BPI-M64, OPI-Win,
>>>> A64-Olinuxino, NPI-A64
>>>>
>>>> Pine64 boards look unable by saying
>>>> [drm] Cannot find any crtc or sizes
>>>>
>>>> May be someone can confirm, it.
>>>
>>> Then we should drop the pine64 additions until someone figures it out,
>>> as it has been already discussed.
>>
>> That is fine, but If anyone have pine64 can confirm this.
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Jernej Škrabec Sept. 6, 2018, 5:07 a.m. UTC | #13
Hi Jagan,

Dne sreda, 05. september 2018 ob 09:57:54 CEST je Jagan Teki napisal(a):
> On Wed, Sep 5, 2018 at 1:21 PM, Maxime Ripard <maxime.ripard@bootlin.com> 
wrote:
> > On Wed, Sep 05, 2018 at 12:56:03PM +0530, Jagan Teki wrote:
> >> On Tue, Sep 4, 2018 at 10:10 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
> >> > From: Jagan Teki <jagan@amarulasolutions.com>
> >> > 
> >> > Enable all necessary device tree nodes and add connector node to device
> >> > trees for all supported A64 boards with HDMI.
> >> > 
> >> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> >> > [Icenowy: squash all board patches altogether and change supply name]
> >> > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> >> > ---
> >> > Changes in v4:
> >> > - Rebase some device trees.
> >> > Changes in v3,1:
> >> > - Squash all enablement patches altogether.
> >> > - Change supply name to match DT binding & driver change.
> >> > Changes for v3:
> >> > - Enable all pipeline components
> >> > Changes for v2:
> >> > - none
> >> > 
> >> >  .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 34 +++++++++++++++++++
> >> >  .../dts/allwinner/sun50i-a64-nanopi-a64.dts   | 34 +++++++++++++++++++
> >> >  .../dts/allwinner/sun50i-a64-olinuxino.dts    | 34 +++++++++++++++++++
> >> >  .../dts/allwinner/sun50i-a64-orangepi-win.dts | 34 +++++++++++++++++++
> >> >  .../boot/dts/allwinner/sun50i-a64-pine64.dts  | 34 +++++++++++++++++++
> >> >  .../allwinner/sun50i-a64-sopine-baseboard.dts | 34 +++++++++++++++++++
> >> >  6 files changed, 204 insertions(+)
> >> 
> >> Tested-by: Jagan Teki <jagan@amarulasolutions.com> # BPI-M64, OPI-Win,
> >> A64-Olinuxino, NPI-A64
> >> 
> >> Pine64 boards look unable by saying
> >> [drm] Cannot find any crtc or sizes
> >> 
> >> May be someone can confirm, it.
> > 
> > Then we should drop the pine64 additions until someone figures it out,
> > as it has been already discussed.
> 
> That is fine, but If anyone have pine64 can confirm this.

What is your monitor default resolution and more importantly, what is it's 
pixel clock?

Pine64 has U-Boot support for DE2/HDMI, which has some pixel clock issues 
which can influence Linux, unfortunately. At the time, there wasn't enough 
knowledge to do it properly. I plan to update it after A64 DE2/HDMI support is 
finished in kernel.

Meanwhile, can you test if it works for you either with disabled DE2/HDMI in 
U-Boot or if you apply this patch to Linux:
https://github.com/jernejsk/linux-1/commit/
019121f953229ca2d624ac39300289a24e5389a1

Best regards,
Jernej
Jagan Teki Sept. 6, 2018, 6:18 a.m. UTC | #14
On Tue, Sep 4, 2018 at 10:10 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
> From: Jagan Teki <jagan@amarulasolutions.com>
>
> Allwinner A64 have a display pipeline with 2 mixers/TCONs, the first
> TCON is connected to LCD and the second is to HDMI.
>
> The HDMI controller/PHY pair is similar to the one on H3/H5.
>
> Add all required device tree nodes of the display pipeline, including
> the TCON0 LCD one and the TCON1 HDMI one.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> [Icenowy: refactor commit message and add 1st pipeline]
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
> Changes for v4:
> - Misc fixes
> - Dropped second PLL from HDMI PHY clock

Why? it was there in previous versions.
Icenowy Zheng Sept. 6, 2018, 6:19 a.m. UTC | #15
于 2018年9月6日 GMT+08:00 下午2:18:13, Jagan Teki <jagan@amarulasolutions.com> 写到:
>On Tue, Sep 4, 2018 at 10:10 AM, Icenowy Zheng <icenowy@aosc.io> wrote:
>> From: Jagan Teki <jagan@amarulasolutions.com>
>>
>> Allwinner A64 have a display pipeline with 2 mixers/TCONs, the first
>> TCON is connected to LCD and the second is to HDMI.
>>
>> The HDMI controller/PHY pair is similar to the one on H3/H5.
>>
>> Add all required device tree nodes of the display pipeline, including
>> the TCON0 LCD one and the TCON1 HDMI one.
>>
>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>> [Icenowy: refactor commit message and add 1st pipeline]
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> ---
>> Changes for v4:
>> - Misc fixes
>> - Dropped second PLL from HDMI PHY clock
>
>Why? it was there in previous versions.

Based on my experiments, the bit has no effect on A64, and the parent
is always PLL-VIDEO0.
Jagan Teki Sept. 7, 2018, 4:13 a.m. UTC | #16
On Wed, Sep 5, 2018 at 1:20 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> On Tue, Sep 04, 2018 at 12:40:50PM +0800, Icenowy Zheng wrote:
>> +             hdmi_phy: hdmi-phy@1ef0000 {
>> +                     compatible = "allwinner,sun8i-h3-hdmi-phy";
>> +                     reg = <0x01ef0000 0x10000>;
>> +                     clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
>> +                              <&ccu 7>;
>> +                     clock-names = "bus", "mod", "pll-0";
>> +                     resets = <&ccu RST_BUS_HDMI0>;
>> +                     reset-names = "phy";
>> +                     #phy-cells = <0>;
>> +             };
>
> This needs to use the bindings we have for that phy.

You mean allwinner,sun50i-a64-hdmi-phy ?
Maxime Ripard Sept. 7, 2018, 8:21 a.m. UTC | #17
On Fri, Sep 07, 2018 at 09:43:29AM +0530, Jagan Teki wrote:
> On Wed, Sep 5, 2018 at 1:20 PM, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > On Tue, Sep 04, 2018 at 12:40:50PM +0800, Icenowy Zheng wrote:
> >> +             hdmi_phy: hdmi-phy@1ef0000 {
> >> +                     compatible = "allwinner,sun8i-h3-hdmi-phy";
> >> +                     reg = <0x01ef0000 0x10000>;
> >> +                     clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
> >> +                              <&ccu 7>;
> >> +                     clock-names = "bus", "mod", "pll-0";
> >> +                     resets = <&ccu RST_BUS_HDMI0>;
> >> +                     reset-names = "phy";
> >> +                     #phy-cells = <0>;
> >> +             };
> >
> > This needs to use the bindings we have for that phy.
> 
> You mean allwinner,sun50i-a64-hdmi-phy ?

Yes

Maxime