devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Marvell Dove DRM for DT
@ 2014-07-01 13:04 Sebastian Hesselbarth
  2014-07-01 13:04 ` [PATCH 1/4] dt-bindings: add Marvell Dove LCD controller documentation Sebastian Hesselbarth
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sebastian Hesselbarth @ 2014-07-01 13:04 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Randy Dunlap, Russell King, Jason Cooper, Andrew Lunn,
	Gregory Clement, devicetree, linux-doc, linux-arm-kernel,
	linux-kernel

Thanks to Russell we have Armada DRM driver but currently DT support
for it is stalled in various discussions/improvements. We know there
are issues with the whole DRM chain (si5351,lcd,tda998x) that are not
easy to track down. To get at least some more code testing coverage,
this patch set picks up some patches from Russell slightly reworked
to allow Dove DT to register and use Armada DRM.

The approach taken is based on what we did in the past for mach-dove
to mach-mvebu/dove conversion: platform_devices are registered like
it was before DT and quirks are added to allow to register the
corresponsing device properly. Then we start removing each of the
quirks incrementally.

Russell currently has a quite huge gap [1,2,3] between his branch and
mainline Linux, so this is a tiny step forward to closen the gap and
free some of his time for more controversal discussion. Also, it will
allow us to participate in those discussions as we'll be able to test
them more easily.

Patches 1-3 add DT binding docs and corresponding nodes for the
LCD controllers found on Marvell Dove SoCs. The binding itself is
considered stable and not likely to change in the future.

Patch 4 then adds above platform_device registration for DRM driver
to Dove DT based setup. Currently, we require to steal some CMA mem
for the framebuffers, collect lcd resources, and clocks from
different nodes. As soon as DT for DRM driver and component framework
have settled, we can remove the quirks again.

Patches are based on v3.16-rc1 and have been tested on DT SolidRun
CuBox.

Sebastian

[1] http://lkml.kernel.org/r/20140630142516.GA32514@n2100.arm.linux.org.uk
[2] http://lkml.kernel.org/r/20140630165615.GE32514@n2100.arm.linux.org.uk
[3] http://lkml.kernel.org/r/20140630193540.GG32514@n2100.arm.linux.org.uk

Russell King (4):
  dt-bindings: add Marvell Dove LCD controller documentation
  ARM: dts: dove: add DT LCD controllers
  ARM: dts: dove: enable lcd0 on SolidRun CuBox
  ARM: mvebu: add armada drm init to Dove board setup

 .../bindings/drm/armada/marvell,dove-lcd.txt       |   14 ++++
 arch/arm/boot/dts/dove-cubox.dts                   |    6 ++
 arch/arm/boot/dts/dove.dtsi                        |   14 ++++
 arch/arm/mach-mvebu/dove.c                         |   70 +++++++++++++++++++-
 4 files changed, 103 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt

---
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: devicetree@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
-- 
1.7.2.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] dt-bindings: add Marvell Dove LCD controller documentation
  2014-07-01 13:04 [PATCH 0/4] Marvell Dove DRM for DT Sebastian Hesselbarth
@ 2014-07-01 13:04 ` Sebastian Hesselbarth
  2014-07-01 13:04 ` [PATCH 2/4] ARM: dts: dove: add DT LCD controllers Sebastian Hesselbarth
  2014-07-01 13:04 ` [PATCH 3/4] ARM: dts: dove: enable lcd0 on SolidRun CuBox Sebastian Hesselbarth
  2 siblings, 0 replies; 6+ messages in thread
From: Sebastian Hesselbarth @ 2014-07-01 13:04 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Russell King, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
	Kumar Gala, Randy Dunlap, Jason Cooper, Andrew Lunn,
	Gregory Clement, devicetree, linux-doc, linux-arm-kernel,
	linux-kernel

From: Russell King <rmk+kernel@arm.linux.org.uk>

Add the Marvell Dove LCD controller DT binding documentation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: devicetree@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 .../bindings/drm/armada/marvell,dove-lcd.txt       |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt

diff --git a/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt b/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt
new file mode 100644
index 0000000..97c600d
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/armada/marvell,dove-lcd.txt
@@ -0,0 +1,14 @@
+Device Tree bindings for Armada DRM CRTC driver
+
+Required properties:
+ - compatible: value should be "marvell,dove-lcd".
+ - reg: base address and size of the LCD controller
+ - interrupts: single interrupt number for the LCD controller
+
+Example:
+
+	lcd0: lcd-controller@820000 {
+		compatible = "marvell,dove-lcd";
+		reg = <0x820000 0x1000>;
+		interrupts = <47>;
+	};
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] ARM: dts: dove: add DT LCD controllers
  2014-07-01 13:04 [PATCH 0/4] Marvell Dove DRM for DT Sebastian Hesselbarth
  2014-07-01 13:04 ` [PATCH 1/4] dt-bindings: add Marvell Dove LCD controller documentation Sebastian Hesselbarth
@ 2014-07-01 13:04 ` Sebastian Hesselbarth
  2014-07-01 13:04 ` [PATCH 3/4] ARM: dts: dove: enable lcd0 on SolidRun CuBox Sebastian Hesselbarth
  2 siblings, 0 replies; 6+ messages in thread
From: Sebastian Hesselbarth @ 2014-07-01 13:04 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Mark Rutland, Andrew Lunn, Jason Cooper, Pawel Moll, Ian Campbell,
	linux-kernel, devicetree, Rob Herring, Kumar Gala,
	Gregory Clement, Russell King, linux-arm-kernel

From: Russell King <rmk+kernel@arm.linux.org.uk>

Add the DT fragment for the Marvell Dove LCD controllers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/boot/dts/dove.dtsi |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 3b891dd..a5441d5 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -630,6 +630,20 @@
 				reg = <0xe8400 0x0c>;
 				ngpios = <8>;
 			};
+
+			lcd1: lcd-controller@810000 {
+				compatible = "marvell,dove-lcd";
+				reg = <0x810000 0x1000>;
+				interrupts = <46>;
+				status = "disabled";
+			};
+
+			lcd0: lcd-controller@820000 {
+				compatible = "marvell,dove-lcd";
+				reg = <0x820000 0x1000>;
+				interrupts = <47>;
+				status = "disabled";
+			};
 		};
 	};
 };
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] ARM: dts: dove: enable lcd0 on SolidRun CuBox
  2014-07-01 13:04 [PATCH 0/4] Marvell Dove DRM for DT Sebastian Hesselbarth
  2014-07-01 13:04 ` [PATCH 1/4] dt-bindings: add Marvell Dove LCD controller documentation Sebastian Hesselbarth
  2014-07-01 13:04 ` [PATCH 2/4] ARM: dts: dove: add DT LCD controllers Sebastian Hesselbarth
@ 2014-07-01 13:04 ` Sebastian Hesselbarth
       [not found]   ` <1404219871-18419-4-git-send-email-sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Sebastian Hesselbarth @ 2014-07-01 13:04 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Mark Rutland, Andrew Lunn, Jason Cooper, Pawel Moll, Ian Campbell,
	linux-kernel, devicetree, Rob Herring, Kumar Gala,
	Gregory Clement, Russell King, linux-arm-kernel

From: Russell King <rmk+kernel@arm.linux.org.uk>

This enables lcd0 on SolidRun CuBox which is connected to TDA998x
HDMI transmitter. Also, set the external video clock connected to
Si5351 clock generator.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 arch/arm/boot/dts/dove-cubox.dts |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts
index 7a70f4c..303a354 100644
--- a/arch/arm/boot/dts/dove-cubox.dts
+++ b/arch/arm/boot/dts/dove-cubox.dts
@@ -134,3 +134,9 @@
 	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_audio1_extclk>;
 	pinctrl-names = "default";
 };
+
+&lcd0 {
+	status = "okay";
+	clocks = <&si5351 0>;
+	clock-names = "ext_ref_clk_1";
+};
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/4] ARM: dts: dove: enable lcd0 on SolidRun CuBox
       [not found]   ` <1404219871-18419-4-git-send-email-sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-07-01 13:18     ` Mark Rutland
  2014-07-01 15:40     ` Jean-Francois Moine
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Rutland @ 2014-07-01 13:18 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Russell King, Rob Herring, Pawel Moll, Ian Campbell, Kumar Gala,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Tue, Jul 01, 2014 at 02:04:30PM +0100, Sebastian Hesselbarth wrote:
> From: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> 
> This enables lcd0 on SolidRun CuBox which is connected to TDA998x
> HDMI transmitter. Also, set the external video clock connected to
> Si5351 clock generator.
> 
> Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> Cc: Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
> Cc: Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> Cc: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> Cc: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
> Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
> Cc: Gregory Clement <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  arch/arm/boot/dts/dove-cubox.dts |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts
> index 7a70f4c..303a354 100644
> --- a/arch/arm/boot/dts/dove-cubox.dts
> +++ b/arch/arm/boot/dts/dove-cubox.dts
> @@ -134,3 +134,9 @@
>  	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_audio1_extclk>;
>  	pinctrl-names = "default";
>  };
> +
> +&lcd0 {
> +	status = "okay";
> +	clocks = <&si5351 0>;
> +	clock-names = "ext_ref_clk_1";

This clock wasn't mentioned in the binding document. Could you please
amend that?

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/4] ARM: dts: dove: enable lcd0 on SolidRun CuBox
       [not found]   ` <1404219871-18419-4-git-send-email-sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2014-07-01 13:18     ` Mark Rutland
@ 2014-07-01 15:40     ` Jean-Francois Moine
  1 sibling, 0 replies; 6+ messages in thread
From: Jean-Francois Moine @ 2014-07-01 15:40 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Mark Rutland, Andrew Lunn, Jason Cooper, Pawel Moll, Ian Campbell,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Kumar Gala,
	Gregory Clement, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Tue,  1 Jul 2014 15:04:30 +0200
Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> From: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> 
> This enables lcd0 on SolidRun CuBox which is connected to TDA998x
> HDMI transmitter. Also, set the external video clock connected to
> Si5351 clock generator.
> 
> Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> Cc: Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
> Cc: Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> Cc: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> Cc: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
> Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
> Cc: Gregory Clement <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  arch/arm/boot/dts/dove-cubox.dts |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts
> index 7a70f4c..303a354 100644
> --- a/arch/arm/boot/dts/dove-cubox.dts
> +++ b/arch/arm/boot/dts/dove-cubox.dts
> @@ -134,3 +134,9 @@
>  	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_audio1_extclk>;
>  	pinctrl-names = "default";
>  };
> +
> +&lcd0 {
> +	status = "okay";
> +	clocks = <&si5351 0>;
> +	clock-names = "ext_ref_clk_1";
> +};

My driver has "axiclk", "extclk0", "lcdpll" and "extclk1" as the clock
names. It is a bit shorter.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-01 15:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-01 13:04 [PATCH 0/4] Marvell Dove DRM for DT Sebastian Hesselbarth
2014-07-01 13:04 ` [PATCH 1/4] dt-bindings: add Marvell Dove LCD controller documentation Sebastian Hesselbarth
2014-07-01 13:04 ` [PATCH 2/4] ARM: dts: dove: add DT LCD controllers Sebastian Hesselbarth
2014-07-01 13:04 ` [PATCH 3/4] ARM: dts: dove: enable lcd0 on SolidRun CuBox Sebastian Hesselbarth
     [not found]   ` <1404219871-18419-4-git-send-email-sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-01 13:18     ` Mark Rutland
2014-07-01 15:40     ` Jean-Francois Moine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).