Skip to contentSkip to conversation

ARM: dove: add more hardware description in the DT

PATCH New Jean-Francois Moine 2 participants 6 messages Mar 25, 2013 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dove: add more hardware description in the DT

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

---
 arch/arm/boot/dts/dove.dtsi |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
arch/arm/boot/dts/dove.dtsi +31 -0
index f7509ca..6bd36b0 100644
@@ -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";
+		};
 	};
 };
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 ARM: dove: add more hardware description in the DT

Quoted 13 lines · Jean-Francois Moine

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

---
 arch/arm/boot/dts/dove.dtsi |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
arch/arm/boot/dts/dove.dtsi +0 -0
index f7509ca..6bd36b0 100644

arch/arm/boot/dts/dove.dtsi line 257

Quoted 5 lines
arch/arm/boot/dts/dove.dtsi +2 -0
@@ -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.

Quoted 8 lines
arch/arm/boot/dts/dove.dtsi +8 -0
+                       compatible = "marvell,dove-lcd";
+                       reg = <0x820000 0x1c8>;
+                       interrupts = <47>;
+                       status = "disabled";
+               };
+
+               lcd1: lcd1 at 810000 {
+                       compatible = "marvell,dove-lcd";

arch/arm/boot/dts/dove.dtsi line 275

Quoted 10 lines
arch/arm/boot/dts/dove.dtsi +10 -0
+                       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?

Quoted 1 line

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

Quoted 15 lines
arch/arm/boot/dts/dove.dtsi +11 -1
+                       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

#2 lore raw

PATCH 1/1 ARM: dove: add more hardware description in the DT

Quoted 3 lines · On Mon, 25 Mar 2013 11:21:13 +0100 Sebastian Hesselbarth…
Quoted 2 lines · Jean-Francois Moine

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

	[snip]
Quoted 6 lines
Quoted 1 line

+ lcd0: lcd0 at 820000 {

please choose a more informative node names like

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

OK.

Quoted 9 lines

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]
Quoted 1 line

Why did you choose gpio interrupt-parent for i2s?

Bug. Thanks.

Quoted 11 lines

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?

Signature · 2 lines
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
#3 lore raw

PATCH 1/1 ARM: dove: add more hardware description in the DT

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

Quoted 13 lines · Jean-Francois Moine
Quoted 10 lines · On Mon, 25 Mar 2013 11:21:13 +0100 Sebastian Hesselbarth…

On Mon, Mar 25, 2013 at 10:31 AM, Jean-Francois Moine <[email protected]> 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.

Quoted 4 lines

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.

Quoted 2 lines

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.

Quoted 5 lines

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

#4 lore raw

PATCH 1/1 ARM: dove: add more hardware description in the DT

In reply to Sebastian Hesselbarth
Quoted 3 lines · On Mon, 25 Mar 2013 11:21:13 +0100 Sebastian Hesselbarth…

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.

Signature · 2 lines
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
#5 lore raw

PATCH 1/1 ARM: dove: add more hardware description in the DT

Quoted 10 lines · Jean-Francois Moine
Quoted 3 lines · On Mon, 25 Mar 2013 11:21:13 +0100 Sebastian…

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