ARM: dts: imx25-pinfunc: Use consistent naming for eSDHC
Subsystems (2)
PATCH v3 1/2 ARM: dts: imx25-pinfunc: Use consistent naming for eSDHC
This file had several naming inconsistencies for eSDHC:
- the instances were named sometimes SDn, sometimes SDHCn, whereas they are named ESDHCn in the reference manual, e.g.:
MX25_PAD_SD1_CMD__SD1_CMD
MX25_PAD_D15__SDHC1_DAT7
- the data ports were named sometimes DATAn, sometimes DATn like in the
reference manual, e.g.:
MX25_PAD_SD1_DATA0__SD1_DATA0
MX25_PAD_D15__SDHC1_DAT7
- in one case, the clock port was named DAT_CLK instead of CLK:
MX25_PAD_CSI_D7__SDHC2_DAT_CLKThis change:
- introduces new definitions using the naming from the reference manual,
- keeps definitions using the legacy naming in order not to break compatibility for out-of-tree users (they can be removed later),
- updates the in-tree files that were using the legacy naming.
---
Changes v2 -> v3:
- None.
Changes v1 -> v2:
- New patch (suggested by Uwe).
--- .../boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts | 12 ++-- arch/arm/boot/dts/imx25-pdk.dts | 12 ++-- arch/arm/boot/dts/imx25-pinfunc.h | 72 ++++++++++++++-------- 3 files changed, 60 insertions(+), 36 deletions(-)
arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts +6 -6
@@ -88,12 +88,12 @@ pinctrl_esdhc1: esdhc1grp { fsl,pins = < - MX25_PAD_SD1_CMD__SD1_CMD 0x400000c0 - MX25_PAD_SD1_CLK__SD1_CLK 0x400000c0 - MX25_PAD_SD1_DATA0__SD1_DATA0 0x400000c0 - MX25_PAD_SD1_DATA1__SD1_DATA1 0x400000c0 - MX25_PAD_SD1_DATA2__SD1_DATA2 0x400000c0 - MX25_PAD_SD1_DATA3__SD1_DATA3 0x400000c0 + MX25_PAD_SD1_CMD__ESDHC1_CMD 0x400000c0 + MX25_PAD_SD1_CLK__ESDHC1_CLK 0x400000c0 + MX25_PAD_SD1_DATA0__ESDHC1_DAT0 0x400000c0 + MX25_PAD_SD1_DATA1__ESDHC1_DAT1 0x400000c0 + MX25_PAD_SD1_DATA2__ESDHC1_DAT2 0x400000c0 + MX25_PAD_SD1_DATA3__ESDHC1_DAT3 0x400000c0 >; };
arch/arm/boot/dts/imx25-pdk.dts +6 -6
@@ -165,12 +165,12 @@ pinctrl_esdhc1: esdhc1grp { fsl,pins = < - MX25_PAD_SD1_CMD__SD1_CMD 0x80000000 - MX25_PAD_SD1_CLK__SD1_CLK 0x80000000 - MX25_PAD_SD1_DATA0__SD1_DATA0 0x80000000 - MX25_PAD_SD1_DATA1__SD1_DATA1 0x80000000 - MX25_PAD_SD1_DATA2__SD1_DATA2 0x80000000 - MX25_PAD_SD1_DATA3__SD1_DATA3 0x80000000 + MX25_PAD_SD1_CMD__ESDHC1_CMD 0x80000000 + MX25_PAD_SD1_CLK__ESDHC1_CLK 0x80000000 + MX25_PAD_SD1_DATA0__ESDHC1_DAT0 0x80000000 + MX25_PAD_SD1_DATA1__ESDHC1_DAT1 0x80000000 + MX25_PAD_SD1_DATA2__ESDHC1_DAT2 0x80000000 + MX25_PAD_SD1_DATA3__ESDHC1_DAT3 0x80000000 MX25_PAD_A14__GPIO_2_0 0x80000000 MX25_PAD_A15__GPIO_2_1 0x80000000 >;
arch/arm/boot/dts/imx25-pinfunc.h +48 -24
163 lines not on this page · raw message
Signature · 1 line
2.14.1
PATCH v3 2/2 ARM: dts: imx25-pinfunc: Always set SION for eSDHC CMD
The eSDHC does not work properly if the SION bit is not set for the bidirectional CMD signal, whatever the eSDHC instance and the selected pad. Therefore, setting SION is mandatory for all eSDHC CMD ports. Do this for MX25_PAD_*__ESDHCn_CMD in imx25-pinfunc.h in order to enforce this behavior for all boards.
This had already been done for eSDHC1, but not for eSDHC2. Also, define MX25_PAD_FEC_MDC__ESDHC2_CMD so that all the possible cases are covered from now on.
---
Changes v2 -> v3:
- Quickly mention SION in each comment, besides the reference to the verbose comment (suggested by Uwe).
Changes v1 -> v2:
- Update eSDHC instance and port naming following the addition of "ARM:
dts: imx25-pinfunc: Use consistent naming for eSDHC".
- Reference the more verbose comment for MX25_PAD_SD1_CMD__ESDHC1_CMD instead of copying the same less detailed comment everywhere (suggested by Uwe).
--- arch/arm/boot/dts/imx25-pinfunc.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
arch/arm/boot/dts/imx25-pinfunc.h +11 -7
@@ -236,7 +236,8 @@#define MX25_PAD_LD8__LD8 0x0e8 0x2e0 0x000 0x00 0x000#define MX25_PAD_LD8__UART4_RXD 0x0e8 0x2e0 0x570 0x02 0x000#define MX25_PAD_LD8__FEC_TX_ERR 0x0e8 0x2e0 0x000 0x05 0x000 -#define MX25_PAD_LD8__ESDHC2_CMD 0x0e8 0x2e0 0x4e0 0x06 0x000 +/* SION must be set; see the comment for MX25_PAD_SD1_CMD__ESDHC1_CMD. */ +#define MX25_PAD_LD8__ESDHC2_CMD 0x0e8 0x2e0 0x4e0 0x16 0x000#define MX25_PAD_LD9__LD9 0x0ec 0x2e4 0x000 0x00 0x000#define MX25_PAD_LD9__UART4_TXD 0x0ec 0x2e4 0x000 0x02 0x000
@@ -316,7 +317,8 @@#define MX25_PAD_CSI_D5__CSPI3_RDY 0x12c 0x324 0x000 0x07 0x000#define MX25_PAD_CSI_D6__CSI_D6 0x130 0x328 0x000 0x00 0x000 -#define MX25_PAD_CSI_D6__ESDHC2_CMD 0x130 0x328 0x4e0 0x02 0x001 +/* SION must be set; see the comment for MX25_PAD_SD1_CMD__ESDHC1_CMD. */ +#define MX25_PAD_CSI_D6__ESDHC2_CMD 0x130 0x328 0x4e0 0x12 0x001#define MX25_PAD_CSI_D6__SIM1_PD0 0x130 0x328 0x000 0x04 0x000#define MX25_PAD_CSI_D6__GPIO_1_31 0x130 0x328 0x000 0x05 0x000
@@ -419,11 +421,11 @@#define MX25_PAD_UART2_CTS__GPIO_4_29 0x18c 0x384 0x000 0x05 0x000/* -* Removing the SION bit from MX25_PAD_SD1_CMD__ESDHC1_CMD breaks detecting an -* SD card. According to the i.MX25 reference manual (e.g. Figure 23-2 in -* IMX25RM Rev. 2 from 01/2011) this pin is bidirectional. So it seems to be a -* silicon bug that configuring the ESDHC1_CMD function doesn't enable the input -* path for this pin. +* Removing the SION bit from MX25_PAD_*__ESDHCn_CMD breaks detecting an SD +* card. According to the i.MX25 reference manual (e.g. Figure 23-2 in IMX25RM +* Rev. 2 from 01/2011) this pin is bidirectional. So it seems to be a silicon +* bug that configuring the ESDHCn_CMD function doesn't enable the input path +* for this pin. * This might have side effects for other hardware units that are connected to * that pin and use the respective function as input. */
@@ -496,6 +498,8 @@#define MX25_PAD_KPP_COL3__GPIO_3_4 0x1c4 0x3bc 0x000 0x05 0x000#define MX25_PAD_FEC_MDC__FEC_MDC 0x1c8 0x3c0 0x000 0x00 0x000 +/* SION must be set; see the comment for MX25_PAD_SD1_CMD__ESDHC1_CMD. */ +#define MX25_PAD_FEC_MDC__ESDHC2_CMD 0x1c8 0x3c0 0x4e0 0x11 0x002#define MX25_PAD_FEC_MDC__AUD4_TXD 0x1c8 0x3c0 0x464 0x02 0x001#define MX25_PAD_FEC_MDC__GPIO_3_5 0x1c8 0x3c0 0x000 0x05 0x000
Signature · 1 line
2.14.1
Re: [PATCH v3 2/2] ARM: dts: imx25-pinfunc: Always set SION for eSDHC CMD
Quoted 6 lines · Beno?t Th?baudeau
The eSDHC does not work properly if the SION bit is not set for the bidirectional CMD signal, whatever the eSDHC instance and the selected pad. Therefore, setting SION is mandatory for all eSDHC CMD ports. Do this for MX25_PAD_*__ESDHCn_CMD in
imx25-pinfunc.hin order to enforce this behavior for all boards.
Quoted 7 lines
This had already been done for eSDHC1, but not for eSDHC2. Also, define
MX25_PAD_FEC_MDC__ESDHC2_CMDso that all the possible cases are covered from now on.Cc Uwe Kleine-K?nig <[email protected]>Signed-off-by Beno?t Th?baudeau <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Thanks
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
Re: [PATCH v3 2/2] ARM: dts: imx25-pinfunc: Always set SION for eSDHC CMD
In reply to Benoît ThébaudeauQuoted 23 lines · Beno?t Th?baudeau
The eSDHC does not work properly if the SION bit is not set for the bidirectional CMD signal, whatever the eSDHC instance and the selected pad. Therefore, setting SION is mandatory for all eSDHC CMD ports. Do this for MX25_PAD_*__ESDHCn_CMD in
imx25-pinfunc.hin order to enforce this behavior for all boards.This had already been done for eSDHC1, but not for eSDHC2. Also, define
MX25_PAD_FEC_MDC__ESDHC2_CMDso that all the possible cases are covered from now on.Cc Uwe Kleine-K?nig <[email protected]>Signed-off-by Beno?t Th?baudeau <[email protected]>Reviewed-by Fabio Estevam <[email protected]>---
Changes v2 -> v3:
- Quickly mention SION in each comment, besides the reference to the verbose comment (suggested by Uwe).
Changes v1 -> v2:
- Update eSDHC instance and port naming following the addition of "ARM:
dts: imx25-pinfunc: Use consistent naming for eSDHC".
- Reference the more verbose comment forMX25_PAD_SD1_CMD__ESDHC1_CMDinstead of copying the same less detailed comment everywhere (suggested by Uwe).
Quoted 3 lines
--- arch/arm/boot/dts/imx25-pinfunc.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
Quoted 19 lines · Beno?t Th?baudeau
This file had several naming inconsistencies for eSDHC:
- the instances were named sometimes SDn, sometimes SDHCn, whereas they are named ESDHCn in the reference manual, e.g.:MX25_PAD_SD1_CMD__SD1_CMD MX25_PAD_D15__SDHC1_DAT7 - the data ports were named sometimes DATAn, sometimes DATn like in the reference manual, e.g.: MX25_PAD_SD1_DATA0__SD1_DATA0 MX25_PAD_D15__SDHC1_DAT7 - in one case, the clock port was named DAT_CLK instead of CLK: MX25_PAD_CSI_D7__SDHC2_DAT_CLKThis change:
- introduces new definitions using the naming from the reference manual,
- keeps definitions using the legacy naming in order not to break compatibility for out-of-tree users (they can be removed later),
- updates the in-tree files that were using the legacy naming.
Quoted 3 lines
Cc Uwe Kleine-K?nig <[email protected]>Signed-off-by Beno?t Th?baudeau <[email protected]>Acked-by Uwe Kleine-K?nig <[email protected]>
Quoted 27 lines · Beno?t Th?baudeau
This file had several naming inconsistencies for eSDHC:
- the instances were named sometimes SDn, sometimes SDHCn, whereas they are named ESDHCn in the reference manual, e.g.:MX25_PAD_SD1_CMD__SD1_CMD MX25_PAD_D15__SDHC1_DAT7 - the data ports were named sometimes DATAn, sometimes DATn like in the reference manual, e.g.: MX25_PAD_SD1_DATA0__SD1_DATA0 MX25_PAD_D15__SDHC1_DAT7 - in one case, the clock port was named DAT_CLK instead of CLK: MX25_PAD_CSI_D7__SDHC2_DAT_CLKThis change:
- introduces new definitions using the naming from the reference manual,
- keeps definitions using the legacy naming in order not to break compatibility for out-of-tree users (they can be removed later),
- updates the in-tree files that were using the legacy naming.Cc Uwe Kleine-K?nig <[email protected]>Signed-off-by Beno?t Th?baudeau <[email protected]>Acked-by Uwe Kleine-K?nig <[email protected]>---
Changes v2 -> v3:
- None.
Changes v1 -> v2:
- New patch (suggested by Uwe).
Quoted 5 lines
--- .../boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts | 12 ++-- arch/arm/boot/dts/imx25-pdk.dts | 12 ++-- arch/arm/boot/dts/imx25-pinfunc.h | 72 ++++++++++++++-------- 3 files changed, 60 insertions(+), 36 deletions(-)
Shawn Guo
AppliedQuoted 19 lines · Beno?t Th?baudeau
This file had several naming inconsistencies for eSDHC:
- the instances were named sometimes SDn, sometimes SDHCn, whereas they are named ESDHCn in the reference manual, e.g.:MX25_PAD_SD1_CMD__SD1_CMD MX25_PAD_D15__SDHC1_DAT7 - the data ports were named sometimes DATAn, sometimes DATn like in the reference manual, e.g.: MX25_PAD_SD1_DATA0__SD1_DATA0 MX25_PAD_D15__SDHC1_DAT7 - in one case, the clock port was named DAT_CLK instead of CLK: MX25_PAD_CSI_D7__SDHC2_DAT_CLKThis change:
- introduces new definitions using the naming from the reference manual,
- keeps definitions using the legacy naming in order not to break compatibility for out-of-tree users (they can be removed later),
- updates the in-tree files that were using the legacy naming.
Quoted 3 lines
Cc Uwe Kleine-K?nig <[email protected]>Signed-off-by Beno?t Th?baudeau <[email protected]>Acked-by Uwe Kleine-K?nig <[email protected]>
Applied both, thanks.