diff mbox series

ARM: mvebu: dts: omnia: enable eMMC writes

Message ID 20210222150110.20846-1-ynezz@true.cz
State New
Delegated to: Stefan Roese
Headers show
Series ARM: mvebu: dts: omnia: enable eMMC writes | expand

Commit Message

Petr Štetiar Feb. 22, 2021, 3:01 p.m. UTC
Currently it's not possible to write anything into eMMC from U-Boot, so
fix this by disabling the default write protection.

Cc: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 arch/arm/dts/armada-385-turris-omnia.dts | 1 +
 1 file changed, 1 insertion(+)

Comments

Marek Behún Feb. 22, 2021, 4:03 p.m. UTC | #1
On Mon, 22 Feb 2021 16:01:10 +0100
Petr Štetiar <ynezz@true.cz> wrote:

> Currently it's not possible to write anything into eMMC from U-Boot, so
> fix this by disabling the default write protection.
> 
> Cc: Marek Behún <marek.behun@nic.cz>
> Signed-off-by: Petr Štetiar <ynezz@true.cz>
> ---
>  arch/arm/dts/armada-385-turris-omnia.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/dts/armada-385-turris-omnia.dts b/arch/arm/dts/armada-385-turris-omnia.dts
> index 5511c84849ee..5bb0b9c07e48 100644
> --- a/arch/arm/dts/armada-385-turris-omnia.dts
> +++ b/arch/arm/dts/armada-385-turris-omnia.dts
> @@ -85,6 +85,7 @@
>  				bus-width = <8>;
>  				no-1-8-v;
>  				non-removable;
> +				disable-wp;
>  			};
>  
>  			usb3@f0000 {

Hi, 

0. subject tag should be [PATCH u-boot-marvell] and Stefan Roese should
   be in To: header

1. please make subject prefix contain turris_omnia, instead of
   just omnia, and instead "enable eMMC writes" use
   "disable eMMC write protection"

2. do this by changing armada-385-turris-omnia-u-boot.dtsi, instead
   of changing armada-385-turris-omnia.dts. This file is meant to be
   same as in Linux, u-boot specific changes should be in -u-boot.dtsi
   file

Marek
Marek Behún Feb. 22, 2021, 4:13 p.m. UTC | #2
On Mon, 22 Feb 2021 17:03:22 +0100
Marek Behun <marek.behun@nic.cz> wrote:

> On Mon, 22 Feb 2021 16:01:10 +0100
> Petr Štetiar <ynezz@true.cz> wrote:

> > --- a/arch/arm/dts/armada-385-turris-omnia.dts
> > +++ b/arch/arm/dts/armada-385-turris-omnia.dts
> > @@ -85,6 +85,7 @@
> >  				bus-width = <8>;
> >  				no-1-8-v;
> >  				non-removable;
> > +				disable-wp;

Hmm,

Linux Documentation/devicetree/bindings/mmc/mmc-controller.yaml
says this about `disable-wp`:

      When set, no physical write-protect line is present. This
      property should only be specified when the controller has a
      dedicated write-protect detection logic. If a GPIO is always used
      for the write-protect detection logic, it is sufficient to not
      specify the wp-gpios property in the absence of a write-protect
      line. Not used in combination with eMMC or SDIO.

There is no wp control mechanism on Omnia. No GPIO or anything. So
according to documentation, this property should not be used here, and
U-Boot is doing something wrong when it denies writes.

Marek
diff mbox series

Patch

diff --git a/arch/arm/dts/armada-385-turris-omnia.dts b/arch/arm/dts/armada-385-turris-omnia.dts
index 5511c84849ee..5bb0b9c07e48 100644
--- a/arch/arm/dts/armada-385-turris-omnia.dts
+++ b/arch/arm/dts/armada-385-turris-omnia.dts
@@ -85,6 +85,7 @@ 
 				bus-width = <8>;
 				no-1-8-v;
 				non-removable;
+				disable-wp;
 			};
 
 			usb3@f0000 {