Re: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot, off-on-delay-us property

2021-02-23 Thread Fabio Estevam
On Mon, Feb 22, 2021 at 11:14 PM Peng Fan (OSS)  wrote:

> See
> https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mq-evk.dts?h=imx_5.4.70_2.3.0#n100
>
> NXP vendor tree has off-on-delay-us.

Ok, but are you able to determine the appropriate off-on-delay-us for
imx8mq-evk in U-Boot to avoid the existing regression?


RE: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot,off-on-delay-us property

2021-02-22 Thread Peng Fan
> Subject: Re: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot,off-on-delay-us
> property
> 
> Hi Peng,
> 
> On Mon, Feb 22, 2021 at 10:53 PM Peng Fan  wrote:
> 
> > It is board dependent, some board may has a big capacitance, the
> > off-on-delay is to give enough time for the capacitance to leak its
> > voltage.
> 
> Ok, but not clear from your comment if you agree with my change or not.

I think remove it is not correct, the exact time should be measured using
oscilloscope, removing it might make sd3.0 not work. But anyway 2 seems
too large a value.

Regards,
Peng.

> 
> Please clarify.


RE: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot,off-on-delay-us property

2021-02-22 Thread Peng Fan
Hi Fabio,

> Subject: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot,off-on-delay-us
> property
> 
> Commit 247bbeb74c18 ("ARM: dts: imx8m: increase off-on delay on the SD
> Vcc
> regulator") caused the imx8mq-evk board to not be able to store the
> environment variables in the SD card.
> 
> Remove the u-boot,off-on-delay-us property to fix the regression.

It is board dependent, some board may has a big capacitance,
the off-on-delay is to give enough time for the capacitance
to leak its voltage.

Regards,
Peng. 

> 
> Signed-off-by: Fabio Estevam 
> ---
>  arch/arm/dts/imx8mq-evk-u-boot.dtsi | 4 
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> index 44af66372712..2cfc12b7e0a4 100644
> --- a/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> @@ -1,9 +1,5 @@
>  // SPDX-License-Identifier: (GPL-2.0 OR MIT)
> 
> -®_usdhc2_vmmc {
> - u-boot,off-on-delay-us = <2>;
> -};
> -
>  &usdhc1 {
>   mmc-hs400-1_8v;
>  };
> --
> 2.25.1



RE: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot,off-on-delay-us property

2021-02-22 Thread Peng Fan (OSS)


> -Original Message-
> From: Fabio Estevam [mailto:feste...@gmail.com]
> Sent: 2021年2月23日 10:11
> To: Peng Fan 
> Cc: sba...@denx.de; u-boot@lists.denx.de; tr...@konsulko.com;
> loru...@gmail.com; andrey.zhizhi...@leica-geosystems.com
> Subject: Re: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot,off-on-delay-us
> property
> 
> On Mon, Feb 22, 2021 at 11:04 PM Peng Fan  wrote:
> 
> > I think remove it is not correct, the exact time should be measured
> > using oscilloscope, removing it might make sd3.0 not work. But anyway
> > 2 seems too large a value.
> 
> Do you plan to submit a fix for this then? If you don't have the bandwidth for
> working on this, then we could go with my proposal.
> 
> I would like to be able to boot a kernel from the SD card in the
> 2021.04 release and fix the regression.
> 
> Also, why don't we have such property in the imx8mq-evk.dts in the kernel?
> 
> I don't think U-Boot dts should deviate from the Linux devicetree in this
> aspect.

See
https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mq-evk.dts?h=imx_5.4.70_2.3.0#n100

NXP vendor tree has off-on-delay-us.

Regards
Peng.


Re: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot, off-on-delay-us property

2021-02-22 Thread Fabio Estevam
On Mon, Feb 22, 2021 at 11:04 PM Peng Fan  wrote:

> I think remove it is not correct, the exact time should be measured using
> oscilloscope, removing it might make sd3.0 not work. But anyway 2 seems
> too large a value.

Do you plan to submit a fix for this then? If you don't have the
bandwidth for working on this, then we could go with my proposal.

I would like to be able to boot a kernel from the SD card in the
2021.04 release and fix the regression.

Also, why don't we have such property in the imx8mq-evk.dts in the kernel?

I don't think U-Boot dts should deviate from the Linux devicetree in
this aspect.


Re: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot, off-on-delay-us property

2021-02-22 Thread Fabio Estevam
Hi Peng,

On Mon, Feb 22, 2021 at 10:53 PM Peng Fan  wrote:

> It is board dependent, some board may has a big capacitance,
> the off-on-delay is to give enough time for the capacitance
> to leak its voltage.

Ok, but not clear from your comment if you agree with my change or not.

Please clarify.


RE: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot,off-on-delay-us property

2021-02-22 Thread ZHIZHIKIN Andrey
Hello Fabio,

Thanks for taking care of this!

I believe this fix still applies to mx8m mini series, as without it - some SD 
Cards are failed to be recognized.

> -Original Message-
> From: Fabio Estevam 
> Sent: Monday, February 22, 2021 6:41 PM
> To: sba...@denx.de
> Cc: u-boot@lists.denx.de; trini ; loru...@gmail.com;
> ZHIZHIKIN Andrey ;
> peng@nxp.com; Fabio Estevam 
> Subject: [PATCH] ARM: dts: imx8mq-evk: Remove u-boot,off-on-delay-us
> property
> 
> 
> Commit 247bbeb74c18 ("ARM: dts: imx8m: increase off-on delay on the SD Vcc
> regulator") caused the imx8mq-evk board to not be able to store the
> environment variables in the SD card.
> 
> Remove the u-boot,off-on-delay-us property to fix the regression.
> 
> Signed-off-by: Fabio Estevam 
> ---
>  arch/arm/dts/imx8mq-evk-u-boot.dtsi | 4 
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/arm/dts/imx8mq-evk-u-boot.dtsi b/arch/arm/dts/imx8mq-evk-
> u-boot.dtsi
> index 44af66372712..2cfc12b7e0a4 100644
> --- a/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mq-evk-u-boot.dtsi
> @@ -1,9 +1,5 @@
>  // SPDX-License-Identifier: (GPL-2.0 OR MIT)
> 
> -®_usdhc2_vmmc {
> -   u-boot,off-on-delay-us = <2>;
> -};
> -
>  &usdhc1 {
> mmc-hs400-1_8v;
>  };
> --
> 2.25.1

Reviewed-by: Andrey Zhizhikin