This series adds the Berlin BG2Q SDHCI nodes to support the 3 controllers
available. The Berlin BG2Q SDHCI controllers are compatible with the pxav3
driver. This patches also enable the SD Card reader and the eMMC of the
BG2Q DMP.
This series applies on top of Alexandre's patches for the Berlin's pll:
https://patchwork.kernel.org/patch/3890341/
https://patchwork.kernel.org/patch/3876271/
Changes since v1:
The v2 introduced a custom Berlin SDHCI driver. It turns out the
available pxav3 driver was compatible with the BG2Q SDHCI controllers.
- removed the unneeded custom driver
- switched to the pxav3 driver
- removed the board specific properties from the SoC device tree
Antoine Ténart (2):
ARM: dts: berlin: add the SDHCI nodes for the BG2Q
ARM: dts: berlin: enable SD card reader and eMMC for the BG2Q DMP
arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 11 ++++++++++
arch/arm/boot/dts/berlin2q.dtsi | 32 ++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
--
1.8.3.2
Add the SDHCI nodes for the Marvell Berlin BG2Q, using the mrvl,pxav3-mmc
driver.
Signed-off-by: Antoine Ténart <[email protected]>
---
arch/arm/boot/dts/berlin2q.dtsi | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
index 5925e6a16749..85d0ca5cc47a 100644
--- a/arch/arm/boot/dts/berlin2q.dtsi
+++ b/arch/arm/boot/dts/berlin2q.dtsi
@@ -67,6 +67,14 @@
clock-div = <3>;
};
+ sdio1clk: sdio1clk {
+ compatible = "fixed-factor-clock";
+ #clock-cells = <0>;
+ clocks = <&syspll>;
+ clock-mult = <1>;
+ clock-div = <4>;
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <1>;
@@ -75,6 +83,30 @@
ranges = <0 0xf7000000 0x1000000>;
interrupt-parent = <&gic>;
+ sdhci0: sdhci@ab0000 {
+ compatible = "mrvl,pxav3-mmc";
+ reg = <0xab0000 0x200>;
+ clocks = <&sdio1clk>;
+ interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ sdhci1: sdhci@ab0800 {
+ compatible = "mrvl,pxav3-mmc";
+ reg = <0xab0800 0x200>;
+ clocks = <&sdio1clk>;
+ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ sdhci2: sdhci@ab1000 {
+ compatible = "mrvl,pxav3-mmc";
+ reg = <0xab1000 0x200>;
+ interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&sdio1clk>;
+ status = "disabled";
+ };
+
l2: l2-cache-controller@ac0000 {
compatible = "arm,pl310-cache";
reg = <0xac0000 0x1000>;
--
1.8.3.2
Enable the SD Card reader and the internal eMMC on the Berlin BG2Q DMP
using two of the SDHCI nodes of the Berlin BG2Q.
Signed-off-by: Antoine Ténart <[email protected]>
---
arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
index 2da9c41e29d8..6ca8c9e52b08 100644
--- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
+++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
@@ -26,3 +26,14 @@
&uart0 {
status = "okay";
};
+
+&sdhci1 {
+ broken-cd;
+ sdhci,wp-inverted;
+ status = "okay";
+};
+
+&sdhci2 {
+ non-removable;
+ status = "okay";
+};
--
1.8.3.2
[Added MMC maintainers Chris and Ulf for one question below]
On 04/22/2014 10:27 AM, Antoine Ténart wrote:
> Add the SDHCI nodes for the Marvell Berlin BG2Q, using the mrvl,pxav3-mmc
> driver.
>
> Signed-off-by: Antoine Ténart <[email protected]>
> ---
> arch/arm/boot/dts/berlin2q.dtsi | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
> index 5925e6a16749..85d0ca5cc47a 100644
> --- a/arch/arm/boot/dts/berlin2q.dtsi
> +++ b/arch/arm/boot/dts/berlin2q.dtsi
> @@ -67,6 +67,14 @@
> clock-div = <3>;
> };
>
> + sdio1clk: sdio1clk {
> + compatible = "fixed-factor-clock";
> + #clock-cells = <0>;
> + clocks = <&syspll>;
> + clock-mult = <1>;
> + clock-div = <4>;
> + };
> +
> soc {
> compatible = "simple-bus";
> #address-cells = <1>;
> @@ -75,6 +83,30 @@
> ranges = <0 0xf7000000 0x1000000>;
> interrupt-parent = <&gic>;
>
> + sdhci0: sdhci@ab0000 {
> + compatible = "mrvl,pxav3-mmc";
> + reg = <0xab0000 0x200>;
> + clocks = <&sdio1clk>;
> + interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
> + status = "disabled";
> + };
> +
> + sdhci1: sdhci@ab0800 {
> + compatible = "mrvl,pxav3-mmc";
> + reg = <0xab0800 0x200>;
> + clocks = <&sdio1clk>;
> + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
> + status = "disabled";
> + };
> +
> + sdhci2: sdhci@ab1000 {
Didn't Jisheng ask for sdhci2 being registered at mmc0?
Renaming the node labels will not help, but have you tried using an:
aliases {
mmc0 = &sdhci2;
mmc1 = &sdhci0;
mmc2 = &sdhci1;
};
node and set the platform_device's .id field with what you get
from of_alias_get_id(np, "mmc")?
@Chris, Ulf: Is there any generic alias, e.g. "sdhci", you prefer for
drivers/mmc so we can put it into sdhci_get_of_property()?
Sebastian
> + compatible = "mrvl,pxav3-mmc";
> + reg = <0xab1000 0x200>;
> + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&sdio1clk>;
> + status = "disabled";
> + };
> +
> l2: l2-cache-controller@ac0000 {
> compatible = "arm,pl310-cache";
> reg = <0xac0000 0x1000>;
>
Sebastian,
On Tue, Apr 22, 2014 at 07:35:27PM +0200, Sebastian Hesselbarth wrote:
> On 04/22/2014 10:27 AM, Antoine Ténart wrote:
[…]
> > + sdhci0: sdhci@ab0000 {
> > + compatible = "mrvl,pxav3-mmc";
> > + reg = <0xab0000 0x200>;
> > + clocks = <&sdio1clk>;
> > + interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
> > + status = "disabled";
> > + };
> > +
> > + sdhci1: sdhci@ab0800 {
> > + compatible = "mrvl,pxav3-mmc";
> > + reg = <0xab0800 0x200>;
> > + clocks = <&sdio1clk>;
> > + interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
> > + status = "disabled";
> > + };
> > +
> > + sdhci2: sdhci@ab1000 {
>
> Didn't Jisheng ask for sdhci2 being registered at mmc0?
Yes sure, but I don't know if he agreeded on this solution. I'll ask him.
Otherwise aliases seems ok from my point of view.
> Renaming the node labels will not help, but have you tried using an:
>
> aliases {
> mmc0 = &sdhci2;
> mmc1 = &sdhci0;
> mmc2 = &sdhci1;
> };
>
> node and set the platform_device's .id field with what you get
> from of_alias_get_id(np, "mmc")?
>
> @Chris, Ulf: Is there any generic alias, e.g. "sdhci", you prefer for
> drivers/mmc so we can put it into sdhci_get_of_property()?
I'd also like the subsystem maintainers to give their opinion on this
before updating.
Thanks!
Antoine
--
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
On 04/22/2014 10:27 AM, Antoine Ténart wrote:
> Enable the SD Card reader and the internal eMMC on the Berlin BG2Q DMP
> using two of the SDHCI nodes of the Berlin BG2Q.
>
> Signed-off-by: Antoine Ténart <[email protected]>
> ---
> arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> index 2da9c41e29d8..6ca8c9e52b08 100644
> --- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> +++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> @@ -26,3 +26,14 @@
> &uart0 {
> status = "okay";
> };
> +
> +&sdhci1 {
Antoine,
nit: please sort referenced nodes alphabetically.
With your comments about mmc aliases, I can take both patches
in now (and fixup ordering) if you like.
Sebastian
> + broken-cd;
> + sdhci,wp-inverted;
> + status = "okay";
> +};
> +
> +&sdhci2 {
> + non-removable;
> + status = "okay";
> +};
>
Sebastian,
On Wed, Apr 23, 2014 at 07:26:23PM +0200, Sebastian Hesselbarth wrote:
> On 04/22/2014 10:27 AM, Antoine T?nart wrote:
> > Enable the SD Card reader and the internal eMMC on the Berlin BG2Q DMP
> > using two of the SDHCI nodes of the Berlin BG2Q.
> >
> > Signed-off-by: Antoine T?nart <[email protected]>
> > ---
> > arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> > index 2da9c41e29d8..6ca8c9e52b08 100644
> > --- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> > +++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> > @@ -26,3 +26,14 @@
> > &uart0 {
> > status = "okay";
> > };
> > +
> > +&sdhci1 {
>
> Antoine,
>
> nit: please sort referenced nodes alphabetically.
>
> With your comments about mmc aliases, I can take both patches
> in now (and fixup ordering) if you like.
You can take them.
I talked with Jisheng about this and the plan is to make a following up
series for the aliases since it will require to modify the subsystem.
Thanks!
Antoine
>
> Sebastian
>
> > + broken-cd;
> > + sdhci,wp-inverted;
> > + status = "okay";
> > +};
> > +
> > +&sdhci2 {
> > + non-removable;
> > + status = "okay";
> > +};
> >
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
On 04/23/2014 07:36 PM, Antoine T?nart wrote:
> On Wed, Apr 23, 2014 at 07:26:23PM +0200, Sebastian Hesselbarth wrote:
>> On 04/22/2014 10:27 AM, Antoine T?nart wrote:
>>> Enable the SD Card reader and the internal eMMC on the Berlin BG2Q DMP
>>> using two of the SDHCI nodes of the Berlin BG2Q.
>>>
>>> Signed-off-by: Antoine T?nart <[email protected]>
>>> ---
>>> arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 11 +++++++++++
>>> 1 file changed, 11 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
>>> index 2da9c41e29d8..6ca8c9e52b08 100644
>>> --- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
>>> +++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
>>> @@ -26,3 +26,14 @@
>>> &uart0 {
>>> status = "okay";
>>> };
>>> +
>>> +&sdhci1 {
>>
>> Antoine,
>>
>> nit: please sort referenced nodes alphabetically.
>>
>> With your comments about mmc aliases, I can take both patches
>> in now (and fixup ordering) if you like.
>
> You can take them.
>
> I talked with Jisheng about this and the plan is to make a following up
> series for the aliases since it will require to modify the subsystem.
Applied both patches to berlin/dt, with &uart0, &sdhci1, &sdhci2 sorted
alphabetically now.
Sebastian