* [PATCH v2 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator @ 2023-05-27 16:06 Fabio Estevam 2023-05-27 16:06 ` [PATCH v2 2/2] ARM: dts: imx7d-sdb: Allow UHS modes Fabio Estevam 2023-06-04 12:13 ` [PATCH v2 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator Shawn Guo 0 siblings, 2 replies; 3+ messages in thread From: Fabio Estevam @ 2023-05-27 16:06 UTC (permalink / raw) To: shawnguo Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree, linux-arm-kernel, Fabio Estevam From: Fabio Estevam <festevam@denx.de> Improve the devicetree description by adding the SD card regulator that is controlled via GPIO5_2. Signed-off-by: Fabio Estevam <festevam@denx.de> --- Changes since v1: - Put 'enable-active-high' right after 'gpio'. (Shawn) arch/arm/boot/dts/imx7d-sdb.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts index 25681c430393..c898d66e27ad 100644 --- a/arch/arm/boot/dts/imx7d-sdb.dts +++ b/arch/arm/boot/dts/imx7d-sdb.dts @@ -60,6 +60,17 @@ extended_io: gpio-expander@0 { }; }; + reg_sd1_vmmc: regulator-sd1-vmmc { + compatible = "regulator-fixed"; + regulator-name = "VDD_SD1"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <200000>; + off-on-delay-us = <20000>; + }; + reg_usb_otg1_vbus: regulator-usb-otg1-vbus { compatible = "regulator-fixed"; regulator-name = "usb_otg1_vbus"; @@ -477,6 +488,7 @@ &usdhc1 { pinctrl-0 = <&pinctrl_usdhc1>; cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; wp-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; + vmmc-supply = <®_sd1_vmmc>; wakeup-source; keep-power-in-suspend; status = "okay"; -- 2.34.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] ARM: dts: imx7d-sdb: Allow UHS modes 2023-05-27 16:06 [PATCH v2 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator Fabio Estevam @ 2023-05-27 16:06 ` Fabio Estevam 2023-06-04 12:13 ` [PATCH v2 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator Shawn Guo 1 sibling, 0 replies; 3+ messages in thread From: Fabio Estevam @ 2023-05-27 16:06 UTC (permalink / raw) To: shawnguo Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree, linux-arm-kernel, Fabio Estevam, Ye Li From: Fabio Estevam <festevam@denx.de> Describe the SD1_VSELECT pad, which is necessary to allow UHS modes. Also, to support higher SD card speed modes, describe the 100MHz and 200MHz SD card pinctrl entries. Suggested-by: Ye Li <ye.li@nxp.com> Signed-off-by: Fabio Estevam <festevam@denx.de> --- Changes since v1: - None arch/arm/boot/dts/imx7d-sdb.dts | 40 ++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts index 6e45f1154611..98e77fdfc27a 100644 --- a/arch/arm/boot/dts/imx7d-sdb.dts +++ b/arch/arm/boot/dts/imx7d-sdb.dts @@ -484,8 +484,10 @@ &usbotg2 { }; &usdhc1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usdhc1>; + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_usdhc1_gpio>; + pinctrl-1 = <&pinctrl_usdhc1_100mhz>, <&pinctrl_usdhc1_gpio>; + pinctrl-2 = <&pinctrl_usdhc1_200mhz>, <&pinctrl_usdhc1_gpio>; cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; wp-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; vmmc-supply = <®_sd1_vmmc>; @@ -743,6 +745,15 @@ MX7D_PAD_ECSPI1_MISO__UART6_DCE_RTS 0x79 >; }; + pinctrl_usdhc1_gpio: usdhc1_gpiogrp { + fsl,pins = < + MX7D_PAD_SD1_CD_B__GPIO5_IO0 0x59 /* CD */ + MX7D_PAD_SD1_WP__GPIO5_IO1 0x59 /* WP */ + MX7D_PAD_SD1_RESET_B__GPIO5_IO2 0x59 /* vmmc */ + MX7D_PAD_GPIO1_IO08__SD1_VSELECT 0x59 /* VSELECT */ + >; + }; + pinctrl_usdhc1: usdhc1grp { fsl,pins = < MX7D_PAD_SD1_CMD__SD1_CMD 0x59 @@ -751,9 +762,28 @@ MX7D_PAD_SD1_DATA0__SD1_DATA0 0x59 MX7D_PAD_SD1_DATA1__SD1_DATA1 0x59 MX7D_PAD_SD1_DATA2__SD1_DATA2 0x59 MX7D_PAD_SD1_DATA3__SD1_DATA3 0x59 - MX7D_PAD_SD1_CD_B__GPIO5_IO0 0x59 /* CD */ - MX7D_PAD_SD1_WP__GPIO5_IO1 0x59 /* WP */ - MX7D_PAD_SD1_RESET_B__GPIO5_IO2 0x59 /* vmmc */ + >; + }; + + pinctrl_usdhc1_100mhz: usdhc1grp_100mhz { + fsl,pins = < + MX7D_PAD_SD1_CMD__SD1_CMD 0x5a + MX7D_PAD_SD1_CLK__SD1_CLK 0x1a + MX7D_PAD_SD1_DATA0__SD1_DATA0 0x5a + MX7D_PAD_SD1_DATA1__SD1_DATA1 0x5a + MX7D_PAD_SD1_DATA2__SD1_DATA2 0x5a + MX7D_PAD_SD1_DATA3__SD1_DATA3 0x5a + >; + }; + + pinctrl_usdhc1_200mhz: usdhc1grp_200mhz { + fsl,pins = < + MX7D_PAD_SD1_CMD__SD1_CMD 0x5b + MX7D_PAD_SD1_CLK__SD1_CLK 0x1b + MX7D_PAD_SD1_DATA0__SD1_DATA0 0x5b + MX7D_PAD_SD1_DATA1__SD1_DATA1 0x5b + MX7D_PAD_SD1_DATA2__SD1_DATA2 0x5b + MX7D_PAD_SD1_DATA3__SD1_DATA3 0x5b >; }; -- 2.34.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator 2023-05-27 16:06 [PATCH v2 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator Fabio Estevam 2023-05-27 16:06 ` [PATCH v2 2/2] ARM: dts: imx7d-sdb: Allow UHS modes Fabio Estevam @ 2023-06-04 12:13 ` Shawn Guo 1 sibling, 0 replies; 3+ messages in thread From: Shawn Guo @ 2023-06-04 12:13 UTC (permalink / raw) To: Fabio Estevam Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree, linux-arm-kernel, Fabio Estevam On Sat, May 27, 2023 at 01:06:33PM -0300, Fabio Estevam wrote: > From: Fabio Estevam <festevam@denx.de> > > Improve the devicetree description by adding the SD card regulator > that is controlled via GPIO5_2. > > Signed-off-by: Fabio Estevam <festevam@denx.de> Applied both, thanks! ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-04 12:13 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-05-27 16:06 [PATCH v2 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator Fabio Estevam 2023-05-27 16:06 ` [PATCH v2 2/2] ARM: dts: imx7d-sdb: Allow UHS modes Fabio Estevam 2023-06-04 12:13 ` [PATCH v2 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator Shawn Guo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).