Message ID | 20130325103159.0c1b4f17@armhf (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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@820000 { Jean-Francois, please choose a more informative node names like lcd0: lcd-controller@820000 and i2s0: audio-controller@b0000 Besides lcd and i2s there is also dcon: display-controller@830000 and ire: image-rotation-engine@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@810000 { > + compatible = "marvell,dove-lcd"; > + reg = <0x810000 0x1c8>; > + interrupts = <46>; > + status = "disabled"; > + }; > + > + i2s0: i2s0@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@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@b4000 { > + compatible = "marvell,kirkwood-i2s"; > + reg = <0xb4000 0x4000>; > + interrupt-parent = <&gpio0>; > + interrupts = <21 2>; > + clocks = <&gate_clk 13>; > + status = "disabled"; > + }; > }; > }; > -- > 1.7.10.4
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@820000 { > > please choose a more informative node names like > > lcd0: lcd-controller@820000 and > i2s0: audio-controller@b0000 OK. > Besides lcd and i2s there is also > > dcon: display-controller@830000 and > ire: image-rotation-engine@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@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?
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@830000 and >> ire: image-rotation-engine@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@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
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@820000 and I tried that, but it seems that the name is too long: I cannot get the external clock from the si5351 clkout0.
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@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
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@820000 { + compatible = "marvell,dove-lcd"; + reg = <0x820000 0x1c8>; + interrupts = <47>; + status = "disabled"; + }; + + lcd1: lcd1@810000 { + compatible = "marvell,dove-lcd"; + reg = <0x810000 0x1c8>; + interrupts = <46>; + status = "disabled"; + }; + + i2s0: i2s0@b0000 { + compatible = "marvell,kirkwood-i2s"; + reg = <0xb0000 0x4000>; + interrupt-parent = <&gpio0>; + interrupts = <19 2>; + clocks = <&gate_clk 12>; + status = "disabled"; + }; + i2s1: i2s1@b4000 { + compatible = "marvell,kirkwood-i2s"; + reg = <0xb4000 0x4000>; + interrupt-parent = <&gpio0>; + interrupts = <21 2>; + clocks = <&gate_clk 13>; + status = "disabled"; + }; }; };
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(+)