diff mbox

[1/1] ARM: dts: sunxi: Add a olinuxino-lime2-emmc

Message ID 1461827998-12192-1-git-send-email-oliver@schinagl.nl (mailing list archive)
State New, archived
Headers show

Commit Message

Olliver Schinagl April 28, 2016, 7:19 a.m. UTC
There are 3 kinds of OLinuXino Lime2 boards.
One without any on board storage, one with NAND storage and one with
eMMC storage. This patch adds the eMMC variant of boards.

eMMC storage is different from a regular SD card in that it is soldered
on the board and cannot be changed. Additionally, it shares pins with
the NAND module and with the second SPI port.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
---
 .../boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts    | 64 ++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts

Comments

Maxime Ripard May 2, 2016, 10:55 a.m. UTC | #1
Hi,

On Thu, Apr 28, 2016 at 09:19:58AM +0200, Olliver Schinagl wrote:
> There are 3 kinds of OLinuXino Lime2 boards.
> One without any on board storage, one with NAND storage and one with
> eMMC storage. This patch adds the eMMC variant of boards.
> 
> eMMC storage is different from a regular SD card in that it is soldered
> on the board and cannot be changed. Additionally, it shares pins with
> the NAND module and with the second SPI port.
> 
> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>

Is it a publicly available board, or is it a private hack you made
yourself?

Maxime
Chen-Yu Tsai May 3, 2016, 3:33 a.m. UTC | #2
Hi,

On Thu, Apr 28, 2016 at 3:19 PM, Olliver Schinagl <oliver@schinagl.nl> wrote:
> There are 3 kinds of OLinuXino Lime2 boards.
> One without any on board storage, one with NAND storage and one with
> eMMC storage. This patch adds the eMMC variant of boards.
>
> eMMC storage is different from a regular SD card in that it is soldered
> on the board and cannot be changed. Additionally, it shares pins with
> the NAND module and with the second SPI port.
>
> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
> ---
>  .../boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts    | 64 ++++++++++++++++++++++
>  1 file changed, 64 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
>
> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
> new file mode 100644
> index 0000000..689da36
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
> @@ -0,0 +1,64 @@
> + /*
> + * Copyright 2015 - Ultimaker B.V.
> + * Author Olliver Schinagl <oliver@schinagl.nl>
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This file is free software; you can redistribute it and/or
> + *     modify it under the terms of the GNU General Public License as
> + *     published by the Free Software Foundation; either version 2 of the
> + *     License, or (at your option) any later version.
> + *
> + *     This file is distributed in the hope that it will be useful,
> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *     GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +#include "sun7i-a20-olinuxino-lime2.dts"
> +
> +/ {
> +       model = "Olimex A20-OLinuXino-LIME2-eMMC";
> +};
> +
> +&mmc2 {
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&mmc2_pins_a>;
> +       vmmc-supply = <&reg_vcc3v3>;
> +       bus-width = <4>;

Only 4 bits? We normally see eMMC with 8 bits. 4 bits are some kind of
embedded SD card.

> +       non-removable;
> +       no-1-8-v;

This flag is not supported on sunxi.

Instead, use the vqmmc-supply with the correct regulator and constraints.

ChenYu

> +       status = "okay";
> +
> +       emmc: emmc@0 {
> +               reg = <0>;
> +               compatible = "mmc-card";
> +               broken-hpi;
> +       };
> +};
> --
> 2.8.0.rc3
>
christo.radev@gmail.com May 3, 2016, 7:12 a.m. UTC | #3
Hi to All,

I have already solved and tested this issue on Armbian build.
Find patches for both legacy (3.4.111) and mainline (4.5.2) kernels on:
http://forum.armbian.com/index.php/topic/853-armbian-customization/page-2#entry7494
There it is also described how to do eMMC bootable and much more.

About the board - Olimex already sold all 3 kinds after migration to their HW rev. E. One have to specify Lime2-eMMC as A20-Olinuxino-Lime2-eMMC instead of their old 2 options A20-Olinuxino-Lime2(-4GB).

Regards
Chris
Olliver Schinagl May 3, 2016, 7:21 a.m. UTC | #4
Hey Chen,

On 03-05-16 05:33, Chen-Yu Tsai wrote:
> Hi,
>
> On Thu, Apr 28, 2016 at 3:19 PM, Olliver Schinagl <oliver@schinagl.nl> wrote:
>> There are 3 kinds of OLinuXino Lime2 boards.
>> One without any on board storage, one with NAND storage and one with
>> eMMC storage. This patch adds the eMMC variant of boards.
>>
>> eMMC storage is different from a regular SD card in that it is soldered
>> on the board and cannot be changed. Additionally, it shares pins with
>> the NAND module and with the second SPI port.
>>
>> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
>> ---
>>   .../boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts    | 64 ++++++++++++++++++++++
>>   1 file changed, 64 insertions(+)
>>   create mode 100644 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
>>
>> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
>> new file mode 100644
>> index 0000000..689da36
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
>> @@ -0,0 +1,64 @@
>> + /*
>> + * Copyright 2015 - Ultimaker B.V.
>> + * Author Olliver Schinagl <oliver@schinagl.nl>
>> + *
>> + * This file is dual-licensed: you can use it either under the terms
>> + * of the GPL or the X11 license, at your option. Note that this dual
>> + * licensing only applies to this file, and not this project as a
>> + * whole.
>> + *
>> + *  a) This file is free software; you can redistribute it and/or
>> + *     modify it under the terms of the GNU General Public License as
>> + *     published by the Free Software Foundation; either version 2 of the
>> + *     License, or (at your option) any later version.
>> + *
>> + *     This file is distributed in the hope that it will be useful,
>> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + *     GNU General Public License for more details.
>> + *
>> + * Or, alternatively,
>> + *
>> + *  b) Permission is hereby granted, free of charge, to any person
>> + *     obtaining a copy of this software and associated documentation
>> + *     files (the "Software"), to deal in the Software without
>> + *     restriction, including without limitation the rights to use,
>> + *     copy, modify, merge, publish, distribute, sublicense, and/or
>> + *     sell copies of the Software, and to permit persons to whom the
>> + *     Software is furnished to do so, subject to the following
>> + *     conditions:
>> + *
>> + *     The above copyright notice and this permission notice shall be
>> + *     included in all copies or substantial portions of the Software.
>> + *
>> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + *     OTHER DEALINGS IN THE SOFTWARE.
>> + */
>> +
>> +#include "sun7i-a20-olinuxino-lime2.dts"
>> +
>> +/ {
>> +       model = "Olimex A20-OLinuXino-LIME2-eMMC";
>> +};
>> +
>> +&mmc2 {
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&mmc2_pins_a>;
>> +       vmmc-supply = <&reg_vcc3v3>;
>> +       bus-width = <4>;
> Only 4 bits? We normally see eMMC with 8 bits. 4 bits are some kind of
> embedded SD card.
On A20 as well? Our investigations so far have concluded that the A10 
and A20 have those pins not mapped out to pads. The IP does support it 
however we assume.
>
>> +       non-removable;
>> +       no-1-8-v;
> This flag is not supported on sunxi.
>
> Instead, use the vqmmc-supply with the correct regulator and constraints.
That was not supposed to be there, i'll fix it! Sorry.
>
> ChenYu
>
>> +       status = "okay";
>> +
>> +       emmc: emmc@0 {
>> +               reg = <0>;
>> +               compatible = "mmc-card";
>> +               broken-hpi;
>> +       };
>> +};
>> --
>> 2.8.0.rc3
>>
Chen-Yu Tsai May 3, 2016, 7:25 a.m. UTC | #5
On Tue, May 3, 2016 at 3:21 PM, Olliver Schinagl <oliver@schinagl.nl> wrote:
> Hey Chen,

ChenYu :)

>
>
> On 03-05-16 05:33, Chen-Yu Tsai wrote:
>>
>> Hi,
>>
>> On Thu, Apr 28, 2016 at 3:19 PM, Olliver Schinagl <oliver@schinagl.nl>
>> wrote:
>>>
>>> There are 3 kinds of OLinuXino Lime2 boards.
>>> One without any on board storage, one with NAND storage and one with
>>> eMMC storage. This patch adds the eMMC variant of boards.
>>>
>>> eMMC storage is different from a regular SD card in that it is soldered
>>> on the board and cannot be changed. Additionally, it shares pins with
>>> the NAND module and with the second SPI port.
>>>
>>> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
>>> ---
>>>   .../boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts    | 64
>>> ++++++++++++++++++++++
>>>   1 file changed, 64 insertions(+)
>>>   create mode 100644 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
>>>
>>> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
>>> b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
>>> new file mode 100644
>>> index 0000000..689da36
>>> --- /dev/null
>>> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
>>> @@ -0,0 +1,64 @@
>>> + /*
>>> + * Copyright 2015 - Ultimaker B.V.
>>> + * Author Olliver Schinagl <oliver@schinagl.nl>
>>> + *
>>> + * This file is dual-licensed: you can use it either under the terms
>>> + * of the GPL or the X11 license, at your option. Note that this dual
>>> + * licensing only applies to this file, and not this project as a
>>> + * whole.
>>> + *
>>> + *  a) This file is free software; you can redistribute it and/or
>>> + *     modify it under the terms of the GNU General Public License as
>>> + *     published by the Free Software Foundation; either version 2 of
>>> the
>>> + *     License, or (at your option) any later version.
>>> + *
>>> + *     This file is distributed in the hope that it will be useful,
>>> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>> + *     GNU General Public License for more details.
>>> + *
>>> + * Or, alternatively,
>>> + *
>>> + *  b) Permission is hereby granted, free of charge, to any person
>>> + *     obtaining a copy of this software and associated documentation
>>> + *     files (the "Software"), to deal in the Software without
>>> + *     restriction, including without limitation the rights to use,
>>> + *     copy, modify, merge, publish, distribute, sublicense, and/or
>>> + *     sell copies of the Software, and to permit persons to whom the
>>> + *     Software is furnished to do so, subject to the following
>>> + *     conditions:
>>> + *
>>> + *     The above copyright notice and this permission notice shall be
>>> + *     included in all copies or substantial portions of the Software.
>>> + *
>>> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>>> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>>> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>>> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>>> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>>> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>>> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>>> + *     OTHER DEALINGS IN THE SOFTWARE.
>>> + */
>>> +
>>> +#include "sun7i-a20-olinuxino-lime2.dts"
>>> +
>>> +/ {
>>> +       model = "Olimex A20-OLinuXino-LIME2-eMMC";
>>> +};
>>> +
>>> +&mmc2 {
>>> +       pinctrl-names = "default";
>>> +       pinctrl-0 = <&mmc2_pins_a>;
>>> +       vmmc-supply = <&reg_vcc3v3>;
>>> +       bus-width = <4>;
>>
>> Only 4 bits? We normally see eMMC with 8 bits. 4 bits are some kind of
>> embedded SD card.
>
> On A20 as well? Our investigations so far have concluded that the A10 and
> A20 have those pins not mapped out to pads. The IP does support it however
> we assume.

You're right. My bad. First time A10/A20 sees eMMC support.

>>
>>
>>> +       non-removable;
>>> +       no-1-8-v;
>>
>> This flag is not supported on sunxi.
>>
>> Instead, use the vqmmc-supply with the correct regulator and constraints.
>
> That was not supposed to be there, i'll fix it! Sorry.

Thanks
ChenYu

>
>>
>> ChenYu
>>
>>> +       status = "okay";
>>> +
>>> +       emmc: emmc@0 {
>>> +               reg = <0>;
>>> +               compatible = "mmc-card";
>>> +               broken-hpi;
>>> +       };
>>> +};
>>> --
>>> 2.8.0.rc3
>>>
>
Maxime Ripard May 3, 2016, 1:14 p.m. UTC | #6
Hi,

On Tue, May 03, 2016 at 12:12:06AM -0700, christo.radev@gmail.com wrote:
> Hi to All,
> 
> I have already solved and tested this issue on Armbian build.  Find
> patches for both legacy (3.4.111) and mainline (4.5.2) kernels on:
> http://forum.armbian.com/index.php/topic/853-armbian-customization/page-2#entry7494
> There it is also described how to do eMMC bootable and much more.
> 
> About the board - Olimex already sold all 3 kinds after migration to
> their HW rev. E. One have to specify Lime2-eMMC as
> A20-Olinuxino-Lime2-eMMC instead of their old 2 options
> A20-Olinuxino-Lime2(-4GB).

Interesting, you have a link to that device?

Thanks,
Maxime
christo.radev@gmail.com May 3, 2016, 3:02 p.m. UTC | #7
On Tuesday, May 3, 2016 at 4:14:41 PM UTC+3, Maxime Ripard wrote:
> Hi,
> 
> On Tue, May 03, 2016 at 4:12:06 PM UTC+3, Christo Radev wrote:
> > Hi to All,
> > 
> > I have already solved and tested this issue on Armbian build.  Find
> > patches for both legacy (3.4.111) and mainline (4.5.2) kernels on:
> > http://forum.armbian.com/index.php/topic/853-armbian-customization/page-2#entry7494
> > There it is also described how to do eMMC bootable and much more.
> > 
> > About the board - Olimex already sold all 3 kinds after migration to
> > their HW rev. E. One have to specify Lime2-eMMC as
> > A20-Olinuxino-Lime2-eMMC instead of their old 2 options
> > A20-Olinuxino-Lime2(-4GB).
> 
> Interesting, you have a link to that device?
> 
> Thanks,
> Maxime
> 
> -- 
> Maxime Ripard, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

I have really 2 boards delivered by their local distributor.

Unfortunately, they do not update their site. Use the link for NAND option:
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2-4GB/open-source-hardware
There you can find Users Manual where it is described that eMMC option is available from HW rev. D. The schematic for HW rev. E is also available on their repository:
https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A20-OLinuXino-LIME2

On the board both 4GB NAND and eMMC Flash chips can be placed alternatively on the same place. There is difference in some other components as well.

If one want to order it from the site probably has to order A20-Olinuxino-Lime2-4GB with note that eMMC option is required. The price is the same.
Olliver Schinagl May 3, 2016, 3:52 p.m. UTC | #8
Hey all,

On 03-05-16 17:02, christo.radev@gmail.com wrote:
> On Tuesday, May 3, 2016 at 4:14:41 PM UTC+3, Maxime Ripard wrote:
>> Hi,
>>
>> On Tue, May 03, 2016 at 4:12:06 PM UTC+3, Christo Radev wrote:
>>> Hi to All,
>>>
>>> I have already solved and tested this issue on Armbian build.  Find
>>> patches for both legacy (3.4.111) and mainline (4.5.2) kernels on:
>>> http://forum.armbian.com/index.php/topic/853-armbian-customization/page-2#entry7494
>>> There it is also described how to do eMMC bootable and much more.
>>>
>>> About the board - Olimex already sold all 3 kinds after migration to
>>> their HW rev. E. One have to specify Lime2-eMMC as
>>> A20-Olinuxino-Lime2-eMMC instead of their old 2 options
>>> A20-Olinuxino-Lime2(-4GB).
>> Interesting, you have a link to that device?
>>
>> Thanks,
>> Maxime
>>
>> -- 
>> Maxime Ripard, Free Electrons
>> Embedded Linux, Kernel and Android engineering
>> http://free-electrons.com
> I have really 2 boards delivered by their local distributor.
>
> Unfortunately, they do not update their site. Use the link for NAND option:
> https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2-4GB/open-source-hardware
> There you can find Users Manual where it is described that eMMC option is available from HW rev. D. The schematic for HW rev. E is also available on their repository:
> https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A20-OLinuXino-LIME2
>
> On the board both 4GB NAND and eMMC Flash chips can be placed alternatively on the same place. There is difference in some other components as well.
>
> If one want to order it from the site probably has to order A20-Olinuxino-Lime2-4GB with note that eMMC option is required. The price is the same.
Sorry for the late reply, but yeah the board exists, we asked Olimex to 
develop the eMMC variant for us. I currently have a dozen or so on my 
desk :)

I don't know when Olimex will update their webshop with the new designs, 
but they simply might not have enough eMMC chips available yet?
Priit Laes May 4, 2016, 5:13 a.m. UTC | #9
On Tue, 2016-05-03 at 17:52 +0200, Olliver Schinagl wrote:
> Hey all,
> 
> On 03-05-16 17:02, christo.radev@gmail.com wrote:
> > On Tuesday, May 3, 2016 at 4:14:41 PM UTC+3, Maxime Ripard wrote:
> > > Hi,
> > > 
> > > On Tue, May 03, 2016 at 4:12:06 PM UTC+3, Christo Radev wrote:
> > > > Hi to All,
> > > > 
> > > > I have already solved and tested this issue on Armbian build. 
> > > >  Find
> > > > patches for both legacy (3.4.111) and mainline (4.5.2) kernels
> > > > on:
> > > > http://forum.armbian.com/index.php/topic/853-armbian-customizat
> > > > ion/page-2#entry7494
> > > > There it is also described how to do eMMC bootable and much
> > > > more.
> > > > 
> > > > About the board - Olimex already sold all 3 kinds after
> > > > migration to
> > > > their HW rev. E. One have to specify Lime2-eMMC as
> > > > A20-Olinuxino-Lime2-eMMC instead of their old 2 options
> > > > A20-Olinuxino-Lime2(-4GB).
> > > Interesting, you have a link to that device?

I guess, it is this one:

https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2-eMMC/
open-source-hardware

> > > 
> > > Thanks,
> > > Maxime
> > > 
> > > -- 
> > > Maxime Ripard, Free Electrons
> > > Embedded Linux, Kernel and Android engineering
> > > http://free-electrons.com
> > I have really 2 boards delivered by their local distributor.
> > 
> > Unfortunately, they do not update their site. Use the link for NAND
> > option:
> > https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2-4
> > GB/open-source-hardware
> > There you can find Users Manual where it is described that eMMC
> > option is available from HW rev. D. The schematic for HW rev. E is
> > also available on their repository:
> > https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A20-OLinuX
> > ino-LIME2
> > 
> > On the board both 4GB NAND and eMMC Flash chips can be placed
> > alternatively on the same place. There is difference in some other
> > components as well.
> > 
> > If one want to order it from the site probably has to order A20
> > -Olinuxino-Lime2-4GB with note that eMMC option is required. The
> > price is the same.
> Sorry for the late reply, but yeah the board exists, we asked Olimex
> to 
> develop the eMMC variant for us. I currently have a dozen or so on my
> desk :)
> 
> I don't know when Olimex will update their webshop with the new
> designs, 
> but they simply might not have enough eMMC chips available yet?
>
Radoslav Kolev May 4, 2016, 12:30 p.m. UTC | #10
2016-05-03 10:25 GMT+03:00 Chen-Yu Tsai <wens@csie.org>:
> On Tue, May 3, 2016 at 3:21 PM, Olliver Schinagl <oliver@schinagl.nl> wrote:
>>>> +       bus-width = <4>;
>>>
>>> Only 4 bits? We normally see eMMC with 8 bits. 4 bits are some kind of
>>> embedded SD card.
>>
>> On A20 as well? Our investigations so far have concluded that the A10 and
>> A20 have those pins not mapped out to pads. The IP does support it however
>> we assume.
>
> You're right. My bad. First time A10/A20 sees eMMC support.

I can't say anything about A10/A20, but I have a board with A13 and
the same eMMC chip and it works fine in 8 bit mode.

Regards,
Radoslav
Olliver Schinagl May 4, 2016, 12:52 p.m. UTC | #11
Hey Radoslav,

On 04-05-16 14:30, Radoslav Kolev wrote:
> 2016-05-03 10:25 GMT+03:00 Chen-Yu Tsai <wens@csie.org>:
>> On Tue, May 3, 2016 at 3:21 PM, Olliver Schinagl <oliver@schinagl.nl> wrote:
>>>>> +       bus-width = <4>;
>>>> Only 4 bits? We normally see eMMC with 8 bits. 4 bits are some kind of
>>>> embedded SD card.
>>> On A20 as well? Our investigations so far have concluded that the A10 and
>>> A20 have those pins not mapped out to pads. The IP does support it however
>>> we assume.
>> You're right. My bad. First time A10/A20 sees eMMC support.
> I can't say anything about A10/A20, but I have a board with A13 and
> the same eMMC chip and it works fine in 8 bit mode.
Yep, sun5i actually brings them all out to pads, the A20 however does 
not :( We first thought that the A20 would also be an 8bitter, because 
the mmc IP appears to be the same as sun5i, but initial tests show it is 
not. As for A10, it has older IP and it might not even support 8 bit 
mode, let alone bring out the pins.

But with A20's + eMMC being available via the lime2, others may repeat 
my experiments! The lime2 is 8 bit connected.

Olliver
>
> Regards,
> Radoslav
Stefan Mavrodiev July 15, 2016, 8:39 a.m. UTC | #12
Hi Olliver,

Why are you using nRST signal?
What I mean is this pin is inactive on this eMMC chip. To use the signal 
byte 162 of ECSD registers should be written.

On my board, this "reset" signal causes eMMC not to work.

Best regards,
Stefan Mavrodiev
Olliver Schinagl July 15, 2016, 8:57 a.m. UTC | #13
On 15-07-16 10:39, stefan.mavrodiev@gmail.com wrote:
> Hi Olliver,
>
> Why are you using nRST signal?
> What I mean is this pin is inactive on this eMMC chip. To use the signal
> byte 162 of ECSD registers should be written.
Then that sounds like a bug in the mmc layer I would say (or a missing 
attribute in the dts), we have a nRST signal it is wired, if the chip 
ignores it, then nothing lost, if the chip needs to be initialized with 
byte 162 of the ECSD register to make the nRST work, then that it sounds 
like it should be fixed there?

By ommitting the nRST signal just because the chip isn't properly 
initialized sounds more like a work-around to me, but I could be wrong 
and see things wrong.

What do the mmc guys, who have far more experience here, say?

>
> On my board, this "reset" signal causes eMMC not to work.
That supprises me, as afaik I was using it just fine...

Olliver
>
> Best regards,
> Stefan Mavrodiev
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
new file mode 100644
index 0000000..689da36
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
@@ -0,0 +1,64 @@ 
+ /*
+ * Copyright 2015 - Ultimaker B.V.
+ * Author Olliver Schinagl <oliver@schinagl.nl>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sun7i-a20-olinuxino-lime2.dts"
+
+/ {
+	model = "Olimex A20-OLinuXino-LIME2-eMMC";
+};
+
+&mmc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc2_pins_a>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	non-removable;
+	no-1-8-v;
+	status = "okay";
+
+	emmc: emmc@0 {
+		reg = <0>;
+		compatible = "mmc-card";
+		broken-hpi;
+	};
+};