All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dove: add more hardware description in the DT
@ 2013-03-25  9:31 Jean-Francois Moine
  2013-03-25 10:21 ` Sebastian Hesselbarth
  0 siblings, 1 reply; 6+ messages in thread
From: Jean-Francois Moine @ 2013-03-25  9:31 UTC (permalink / raw)
  To: linux-arm-kernel

The 88AP510 chip (Marvell Dove) contains a LCD and display controler
and two audio controlers.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
---
 arch/arm/boot/dts/dove.dtsi |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index f7509ca..6bd36b0 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -253,5 +253,36 @@
 				dmacap,xor;
 			};
 		};
+
+		lcd0: lcd0 at 820000 {
+			compatible = "marvell,dove-lcd";
+			reg = <0x820000 0x1c8>;
+			interrupts = <47>;
+			status = "disabled";
+		};
+
+		lcd1: lcd1 at 810000 {
+			compatible = "marvell,dove-lcd";
+			reg = <0x810000 0x1c8>;
+			interrupts = <46>;
+			status = "disabled";
+		};
+
+		i2s0: i2s0 at b0000 {
+			compatible = "marvell,kirkwood-i2s";
+			reg = <0xb0000 0x4000>;
+			interrupt-parent = <&gpio0>;
+			interrupts = <19 2>;
+			clocks = <&gate_clk 12>;
+			status = "disabled";
+		};
+		i2s1: i2s1 at b4000 {
+			compatible = "marvell,kirkwood-i2s";
+			reg = <0xb4000 0x4000>;
+			interrupt-parent = <&gpio0>;
+			interrupts = <21 2>;
+			clocks = <&gate_clk 13>;
+			status = "disabled";
+		};
 	};
 };
-- 
1.7.10.4

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

* [PATCH] ARM: dove: add more hardware description in the DT
  2013-03-25  9:31 [PATCH] ARM: dove: add more hardware description in the DT Jean-Francois Moine
@ 2013-03-25 10:21 ` Sebastian Hesselbarth
  2013-03-25 12:42   ` Jean-Francois Moine
  2013-03-25 18:29   ` Jean-Francois Moine
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Hesselbarth @ 2013-03-25 10:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 25, 2013 at 10:31 AM, Jean-Francois Moine <moinejf@free.fr> wrote:
> The 88AP510 chip (Marvell Dove) contains a LCD and display controler
> and two audio controlers.
>
> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
> ---
>  arch/arm/boot/dts/dove.dtsi |   31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>
> diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
> index f7509ca..6bd36b0 100644
> --- a/arch/arm/boot/dts/dove.dtsi
> +++ b/arch/arm/boot/dts/dove.dtsi
> @@ -253,5 +253,36 @@
>                                 dmacap,xor;
>                         };
>                 };
> +
> +               lcd0: lcd0 at 820000 {

Jean-Francois,

please choose a more informative node names like

lcd0: lcd-controller at 820000 and
i2s0: audio-controller at b0000

Besides lcd and i2s there is also

dcon: display-controller at 830000 and
ire: image-rotation-engine at 831000

I am not yet 100% sure how to hook them up in dove-drm that I am
writing on but I want to have them in somehow. DCON will allow to
mux lcd0/lcd1 data streams, i.e. clone or pan lcd0 to lcd1. IRE allows
to rotate the memory buffer loaded by -90/90deg.

I also checked Armada 160 datasheets and they have LCD that looks
quite compatible with Dove's LCD, while DCON and IRE are not available.
I also guess there is some more Marvell SoCs out there that also share
LCD with Dove/Armada 160.

> +                       compatible = "marvell,dove-lcd";
> +                       reg = <0x820000 0x1c8>;
> +                       interrupts = <47>;
> +                       status = "disabled";
> +               };
> +
> +               lcd1: lcd1 at 810000 {
> +                       compatible = "marvell,dove-lcd";
> +                       reg = <0x810000 0x1c8>;
> +                       interrupts = <46>;
> +                       status = "disabled";
> +               };
> +
> +               i2s0: i2s0 at b0000 {
> +                       compatible = "marvell,kirkwood-i2s";
> +                       reg = <0xb0000 0x4000>;
> +                       interrupt-parent = <&gpio0>;
> +                       interrupts = <19 2>;

Why did you choose gpio interrupt-parent for i2s?

>From Dove datasheet I can see that, Audio0 has irqs 19, 20
and Audio1 has irqs 21, 22 on the main irq controller.
The corresponding nodes for i2s0 and i2s1 should look like

i2s0: audio-controller at b0000 {
        compatible = "marvell,kirkwood-i2s";
        reg = <0xb0000 0x4000>;
        interrupts = <19>, <20>;
        clocks = <&gate_clk 12>;
        status = "disabled";
}

Sebastian

> +                       clocks = <&gate_clk 12>;
> +                       status = "disabled";
> +               };
> +               i2s1: i2s1 at b4000 {
> +                       compatible = "marvell,kirkwood-i2s";
> +                       reg = <0xb4000 0x4000>;
> +                       interrupt-parent = <&gpio0>;
> +                       interrupts = <21 2>;
> +                       clocks = <&gate_clk 13>;
> +                       status = "disabled";
> +               };
>         };
>  };
> --
> 1.7.10.4

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

* [PATCH] ARM: dove: add more hardware description in the DT
  2013-03-25 10:21 ` Sebastian Hesselbarth
@ 2013-03-25 12:42   ` Jean-Francois Moine
  2013-03-25 13:03     ` Sebastian Hesselbarth
  2013-03-25 18:29   ` Jean-Francois Moine
  1 sibling, 1 reply; 6+ messages in thread
From: Jean-Francois Moine @ 2013-03-25 12:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 25 Mar 2013 11:21:13 +0100
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> wrote:

> On Mon, Mar 25, 2013 at 10:31 AM, Jean-Francois Moine <moinejf@free.fr> wrote:
> > The 88AP510 chip (Marvell Dove) contains a LCD and display controler
> > and two audio controlers.
	[snip]
> > +               lcd0: lcd0 at 820000 {
> 
> please choose a more informative node names like
> 
> lcd0: lcd-controller at 820000 and
> i2s0: audio-controller at b0000

OK.

> Besides lcd and i2s there is also
> 
> dcon: display-controller at 830000 and
> ire: image-rotation-engine at 831000
> 
> I am not yet 100% sure how to hook them up in dove-drm that I am
> writing on but I want to have them in somehow. DCON will allow to
> mux lcd0/lcd1 data streams, i.e. clone or pan lcd0 to lcd1. IRE allows
> to rotate the memory buffer loaded by -90/90deg.

My first aim is to have the dove-drm in the mainline. These devices
could be added later, as the ac'97, gpu and vpu. Also, rotating the
image is not very useful when your monitor cannot rotate! (I wonder if
such monitors still exist as the one I used on a MAC in the 80's)

But, anyway, I may do it. The only problem is that dcon and ire are
sharing the same irq. How should I declare that?

	[snip]
> Why did you choose gpio interrupt-parent for i2s?

Bug. Thanks.

> From Dove datasheet I can see that, Audio0 has irqs 19, 20
> and Audio1 has irqs 21, 22 on the main irq controller.
> The corresponding nodes for i2s0 and i2s1 should look like
> 
> i2s0: audio-controller at b0000 {
>         compatible = "marvell,kirkwood-i2s";
>         reg = <0xb0000 0x4000>;
>         interrupts = <19>, <20>;
>         clocks = <&gate_clk 12>;
>         status = "disabled";
> }

OK.

BTW, I am ready to upload a new version of the dove-drm on my site. It
now uses the dt for getting the hdmi encoder. Do you prefer I or you do
the merge?

-- 
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

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

* [PATCH] ARM: dove: add more hardware description in the DT
  2013-03-25 12:42   ` Jean-Francois Moine
@ 2013-03-25 13:03     ` Sebastian Hesselbarth
  0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Hesselbarth @ 2013-03-25 13:03 UTC (permalink / raw)
  To: linux-arm-kernel

Also added Russell to the discussion, as I am sure he wants to comment
on dove drm driver ;)

On Mon, Mar 25, 2013 at 1:42 PM, Jean-Francois Moine <moinejf@free.fr> wrote:
> On Mon, 25 Mar 2013 11:21:13 +0100
> Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> wrote:
>> On Mon, Mar 25, 2013 at 10:31 AM, Jean-Francois Moine <moinejf@free.fr> wrote:
>> Besides lcd and i2s there is also
>>
>> dcon: display-controller at 830000 and
>> ire: image-rotation-engine at 831000
>>
>> I am not yet 100% sure how to hook them up in dove-drm that I am
>> writing on but I want to have them in somehow. DCON will allow to
>> mux lcd0/lcd1 data streams, i.e. clone or pan lcd0 to lcd1. IRE allows
>> to rotate the memory buffer loaded by -90/90deg.
>
> My first aim is to have the dove-drm in the mainline. These devices
> could be added later, as the ac'97, gpu and vpu. Also, rotating the
> image is not very useful when your monitor cannot rotate! (I wonder if
> such monitors still exist as the one I used on a MAC in the 80's)

I guess you let the user choose to have it rotated or not.

> But, anyway, I may do it. The only problem is that dcon and ire are
> sharing the same irq. How should I declare that?

Then just have one node

dcon: display-controller at 830000 {
   compatible = "marvell,dove-dcon";
   reg = <0x830000 0xc4>, <0x831000 0x8c>;
   interrupts = <45>;
};

We can detect if ire is available on the second reg property.

> BTW, I am ready to upload a new version of the dove-drm on my site. It
> now uses the dt for getting the hdmi encoder. Do you prefer I or you do
> the merge?

>From the current status of either yours or mine driver none of it is ready
for mainline. You can of course have your own repo and provide a version
there. As soon as we are both happy with one of the drivers, we can send
a patch here.

Sebastian

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

* [PATCH] ARM: dove: add more hardware description in the DT
  2013-03-25 10:21 ` Sebastian Hesselbarth
  2013-03-25 12:42   ` Jean-Francois Moine
@ 2013-03-25 18:29   ` Jean-Francois Moine
  2013-03-25 19:50     ` Sebastian Hesselbarth
  1 sibling, 1 reply; 6+ messages in thread
From: Jean-Francois Moine @ 2013-03-25 18:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 25 Mar 2013 11:21:13 +0100
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> wrote:

> please choose a more informative node names like
> 
> lcd0: lcd-controller at 820000 and

I tried that, but it seems that the name is too long: I cannot get the
external clock from the si5351 clkout0.

-- 
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

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

* [PATCH] ARM: dove: add more hardware description in the DT
  2013-03-25 18:29   ` Jean-Francois Moine
@ 2013-03-25 19:50     ` Sebastian Hesselbarth
  0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Hesselbarth @ 2013-03-25 19:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/25/2013 07:29 PM, Jean-Francois Moine wrote:
> On Mon, 25 Mar 2013 11:21:13 +0100
> Sebastian Hesselbarth<sebastian.hesselbarth@gmail.com>  wrote:
>
>> please choose a more informative node names like
>>
>> lcd0: lcd-controller at 820000 and
>
> I tried that, but it seems that the name is too long: I cannot get the
> external clock from the si5351 clkout0.
>

Jean-Francois,

you need to use of_clk_get and clocks property set to phandle of the
external clock instead of clk_get.

I will push a branch with my current driver soon, there you can see
how DT and drm will play together.

For now, please respin this patch with the comments I made or I can
also do this and add your Signed-off-by.

Sebastian

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

end of thread, other threads:[~2013-03-25 19:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25  9:31 [PATCH] ARM: dove: add more hardware description in the DT Jean-Francois Moine
2013-03-25 10:21 ` Sebastian Hesselbarth
2013-03-25 12:42   ` Jean-Francois Moine
2013-03-25 13:03     ` Sebastian Hesselbarth
2013-03-25 18:29   ` Jean-Francois Moine
2013-03-25 19:50     ` Sebastian Hesselbarth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.