diff mbox series

[2/6] ARM: dts: imx6qdl-udoo: Properly describe the SD card detect

Message ID 20211218211025.770362-2-festevam@gmail.com
State Accepted
Delegated to: Stefano Babic
Headers show
Series [1/6] udoo_spl: Initialize the eSDHC controller in SPL | expand

Commit Message

Fabio Estevam Dec. 18, 2021, 9:10 p.m. UTC
GPIO7_IO00 is used as SD card detect.

Properly describe this in the devicetree.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 arch/arm/dts/imx6qdl-udoo.dtsi | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Peter Robinson Dec. 19, 2021, 3:54 p.m. UTC | #1
> GPIO7_IO00 is used as SD card detect.
>
> Properly describe this in the devicetree.

Has this also been sent upstream for the Linux kernel dt?

> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  arch/arm/dts/imx6qdl-udoo.dtsi | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/dts/imx6qdl-udoo.dtsi b/arch/arm/dts/imx6qdl-udoo.dtsi
> index d07d8f83456d..2d0d102661bd 100644
> --- a/arch/arm/dts/imx6qdl-udoo.dtsi
> +++ b/arch/arm/dts/imx6qdl-udoo.dtsi
> @@ -4,7 +4,7 @@
>   *
>   * Author: Fabio Estevam <fabio.estevam@freescale.com>
>   */
> -
> +#include <dt-bindings/gpio/gpio.h>
>  / {
>         aliases {
>                 backlight = &backlight;
> @@ -226,6 +226,7 @@
>                                 MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x17059
>                                 MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x17059
>                                 MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x17059
> +                               MX6QDL_PAD_SD3_DAT5__GPIO7_IO00         0x1b0b0
>                         >;
>                 };
>
> @@ -304,7 +305,7 @@
>  &usdhc3 {
>         pinctrl-names = "default";
>         pinctrl-0 = <&pinctrl_usdhc3>;
> -       non-removable;
> +       cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
>         status = "okay";
>  };
>
> --
> 2.25.1
>
Fabio Estevam Dec. 19, 2021, 10:43 p.m. UTC | #2
Hi Peter,

On Sun, Dec 19, 2021 at 12:54 PM Peter Robinson <pbrobinson@gmail.com> wrote:
>
> > GPIO7_IO00 is used as SD card detect.
> >
> > Properly describe this in the devicetree.
>
> Has this also been sent upstream for the Linux kernel dt?

Yes, here it goes:
http://lists.infradead.org/pipermail/linux-arm-kernel/2021-December/705590.html
Tom Rini Jan. 9, 2022, 1:27 a.m. UTC | #3
On Sat, Dec 18, 2021 at 06:10:21PM -0300, Fabio Estevam wrote:

> GPIO7_IO00 is used as SD card detect.
> 
> Properly describe this in the devicetree.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/dts/imx6qdl-udoo.dtsi b/arch/arm/dts/imx6qdl-udoo.dtsi
index d07d8f83456d..2d0d102661bd 100644
--- a/arch/arm/dts/imx6qdl-udoo.dtsi
+++ b/arch/arm/dts/imx6qdl-udoo.dtsi
@@ -4,7 +4,7 @@ 
  *
  * Author: Fabio Estevam <fabio.estevam@freescale.com>
  */
-
+#include <dt-bindings/gpio/gpio.h>
 / {
 	aliases {
 		backlight = &backlight;
@@ -226,6 +226,7 @@ 
 				MX6QDL_PAD_SD3_DAT1__SD3_DATA1		0x17059
 				MX6QDL_PAD_SD3_DAT2__SD3_DATA2		0x17059
 				MX6QDL_PAD_SD3_DAT3__SD3_DATA3		0x17059
+				MX6QDL_PAD_SD3_DAT5__GPIO7_IO00		0x1b0b0
 			>;
 		};
 
@@ -304,7 +305,7 @@ 
 &usdhc3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_usdhc3>;
-	non-removable;
+	cd-gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
 	status = "okay";
 };