Skip to contentSkip to conversation

mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5

PATCH Superseded Yangbo Lu 2 participants 5 messages Sep 14, 2015 – Sep 15, 2015 MMC, SD and SDIO

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH 1/3 mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5

If adapter card type identification is supported for platform, we would enable dat[4:7] for eMMC4.5 card.

---
 board/freescale/common/qixis.h | 2 ++
 drivers/mmc/fsl_esdhc.c        | 3 +++
 2 files changed, 5 insertions(+)
board/freescale/common/qixis.h +2 -0
index 51ce9c3..450cd0d 100644
@@ -127,6 +127,8 @@ void qixis_write_i2c(unsigned int reg, u8 value);
 #define QIXIS_ESDHC_NO_ADAPTER                  0x7	/* No Card is Present*/
 #define QIXIS_SDCLKIN		0x08
 #define QIXIS_SDCLKOUT		0x02
+#define QIXIS_DAT5_6_7		0X02
+#define QIXIS_DAT4		0X01
 #endif
 
 #endif
drivers/mmc/fsl_esdhc.c +3 -0
index 0b37002..639ec02 100644
@@ -747,6 +747,9 @@ void mmc_adapter_card_type_ident(void)
 
 	switch (card_id) {
 	case QIXIS_ESDHC_ADAPTER_TYPE_EMMC45:
+		value = QIXIS_READ(brdcfg[5]);
+		value |= (QIXIS_DAT4 | QIXIS_DAT5_6_7);
+		QIXIS_WRITE(brdcfg[5], value);
 		break;
 	case QIXIS_ESDHC_ADAPTER_TYPE_SDMMC_LEGACY:
 		break;
Signature · 1 line
2.1.0.27.g96db324
#1 lore raw

PATCH 1/3 mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5

Yangbo,

Quoted 29 lines · Yangbo Lu

If adapter card type identification is supported for platform, we would enable dat[4:7] for eMMC4.5 card.

---
 board/freescale/common/qixis.h | 2 ++
 drivers/mmc/fsl_esdhc.c        | 3 +++
 2 files changed, 5 insertions(+)
board/freescale/common/qixis.h +2 -0
index 51ce9c3..450cd0d 100644
@@ -127,6 +127,8 @@ void qixis_write_i2c(unsigned int reg, u8 value);
 #define QIXIS_ESDHC_NO_ADAPTER                  0x7	/* No Card is Present*/
 #define QIXIS_SDCLKIN		0x08
 #define QIXIS_SDCLKOUT		0x02
+#define QIXIS_DAT5_6_7		0X02
+#define QIXIS_DAT4		0X01
 #endif
 
 #endif
drivers/mmc/fsl_esdhc.c +0 -0
index 0b37002..639ec02 100644

drivers/mmc/fsl_esdhc.c void mmc_adapter_card_type_ident(void) · line 755

Quoted 9 lines
drivers/mmc/fsl_esdhc.c +3 -0
@@ -747,6 +747,9 @@ void mmc_adapter_card_type_ident(void)
 
 	switch (card_id) {
 	case QIXIS_ESDHC_ADAPTER_TYPE_EMMC45:
+		value = QIXIS_READ(brdcfg[5]);
+		value |= (QIXIS_DAT4 | QIXIS_DAT5_6_7);
+		QIXIS_WRITE(brdcfg[5], value);
 		break;
 	case QIXIS_ESDHC_ADAPTER_TYPE_SDMMC_LEGACY:
 		break;

Does any other board have this identification feature? I see the code only use qixis. How are RDB and customer boards handled?

York

author
#2 lore raw

PATCH 1/3 mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5

Hi York,

Please see my comments below.

Quoted 52 lines

-----Original Message-----
From: Sun York-R58495
Sent: Monday, September 14, 2015 11:57 PM
To: Lu Yangbo-B47093; u-boot at lists.denx.de
Subject: Re: [PATCH 1/3] mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5

Yangbo,

Quoted 15 lines · Yangbo Lu

If adapter card type identification is supported for platform, we would enable dat[4:7] for eMMC4.5 card.

---
 board/freescale/common/qixis.h | 2 ++
 drivers/mmc/fsl_esdhc.c        | 3 +++
 2 files changed, 5 insertions(+)
(quoted diff) +0 -0

b/board/freescale/common/qixis.h index 51ce9c3..450cd0d 100644

board/freescale/common/qixis.h void qixis_write_i2c(unsigned int reg, u8 value); · line 127

Quoted 1 line
board/freescale/common/qixis.h +0 -0
@@ -127,6 +127,8 @@ void qixis_write_i2c(unsigned int reg, u8 value);
 #define QIXIS_ESDHC_NO_ADAPTER                  0x7	/* No Card is

Present*/

Quoted 13 lines
board/freescale/common/qixis.h +2 -0
 #define QIXIS_SDCLKIN		0x08
 #define QIXIS_SDCLKOUT		0x02
+#define QIXIS_DAT5_6_7		0X02
+#define QIXIS_DAT4		0X01
 #endif
 
 #endif
drivers/mmc/fsl_esdhc.c index renamed from drivers/mmc/fsl_esdhc.c +0 -0

0b37002..639ec02 100644

drivers/mmc/fsl_esdhc.c void mmc_adapter_card_type_ident(void) · line 755

Quoted 9 lines
drivers/mmc/fsl_esdhc.c +3 -0
@@ -747,6 +747,9 @@ void mmc_adapter_card_type_ident(void)
 
 	switch (card_id) {
 	case QIXIS_ESDHC_ADAPTER_TYPE_EMMC45:
+		value = QIXIS_READ(brdcfg[5]);
+		value |= (QIXIS_DAT4 | QIXIS_DAT5_6_7);
+		QIXIS_WRITE(brdcfg[5], value);
 		break;
 	case QIXIS_ESDHC_ADAPTER_TYPE_SDMMC_LEGACY:
 		break;

Does any other board have this identification feature? I see the code only use qixis. How are RDB and customer boards handled?

Quoted 1 line

York

[Lu Yangbo-B47093] This feature is used for QDS boards that use SDHC Adapter card. Now only T1040QDS and T2080QDS are enabled, because we want to support SD/MMC UHS-I speed mode on these two boards in kernel and these QIXIS configuration are needed for *the Adapter*. For RDB and customer boards, they don't use Adapter card and the default configuration is ok for SD/MMC Default speed mode and High speed mode.

#3 lore raw

PATCH 1/3 mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5

Quoted 56 lines · On 09/14/2015 07:22 PM, Lu Yangbo-B47093 wrote:

Hi York,

Please see my comments below.

Quoted 52 lines

-----Original Message-----
From: Sun York-R58495
Sent: Monday, September 14, 2015 11:57 PM
To: Lu Yangbo-B47093; u-boot at lists.denx.de
Subject: Re: [PATCH 1/3] mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5

Yangbo,

Quoted 15 lines · Yangbo Lu

If adapter card type identification is supported for platform, we would enable dat[4:7] for eMMC4.5 card.

---
 board/freescale/common/qixis.h | 2 ++
 drivers/mmc/fsl_esdhc.c        | 3 +++
 2 files changed, 5 insertions(+)
(quoted diff) +0 -0

b/board/freescale/common/qixis.h index 51ce9c3..450cd0d 100644

board/freescale/common/qixis.h void qixis_write_i2c(unsigned int reg, u8 value); · line 127

Quoted 1 line
board/freescale/common/qixis.h +0 -0
@@ -127,6 +127,8 @@ void qixis_write_i2c(unsigned int reg, u8 value);
 #define QIXIS_ESDHC_NO_ADAPTER                  0x7	/* No Card is

Present*/

Quoted 13 lines
board/freescale/common/qixis.h +2 -0
 #define QIXIS_SDCLKIN		0x08
 #define QIXIS_SDCLKOUT		0x02
+#define QIXIS_DAT5_6_7		0X02
+#define QIXIS_DAT4		0X01
 #endif
 
 #endif
drivers/mmc/fsl_esdhc.c index renamed from drivers/mmc/fsl_esdhc.c +0 -0

0b37002..639ec02 100644

drivers/mmc/fsl_esdhc.c void mmc_adapter_card_type_ident(void) · line 755

Quoted 9 lines
drivers/mmc/fsl_esdhc.c +3 -0
@@ -747,6 +747,9 @@ void mmc_adapter_card_type_ident(void)
 
 	switch (card_id) {
 	case QIXIS_ESDHC_ADAPTER_TYPE_EMMC45:
+		value = QIXIS_READ(brdcfg[5]);
+		value |= (QIXIS_DAT4 | QIXIS_DAT5_6_7);
+		QIXIS_WRITE(brdcfg[5], value);
 		break;
 	case QIXIS_ESDHC_ADAPTER_TYPE_SDMMC_LEGACY:
 		break;

Does any other board have this identification feature? I see the code only use qixis. How are RDB and customer boards handled?

Quoted 3 lines
Quoted 1 line

York

[Lu Yangbo-B47093] This feature is used for QDS boards that use SDHC Adapter card. Now only T1040QDS and T2080QDS are enabled, because we want to support SD/MMC UHS-I speed mode on these two boards in kernel and these QIXIS configuration are needed for *the Adapter*. For RDB and customer boards, they don't use Adapter card and the default configuration is ok for SD/MMC Default speed mode and High speed mode.

I am actually more concerned how a customer board can take advantage of this.

York

author
#4 lore raw

PATCH 1/3 mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5

Quoted 66 lines · On 09/14/2015 07:22 PM, Lu Yangbo-B47093 wrote:
Quoted 56 lines

Hi York,

Please see my comments below.

Quoted 52 lines

-----Original Message-----
From: Sun York-R58495
Sent: Monday, September 14, 2015 11:57 PM
To: Lu Yangbo-B47093; u-boot at lists.denx.de
Subject: Re: [PATCH 1/3] mmc: fsl_esdhc: enable dat[4:7] for eMMC4.5

Yangbo,

Quoted 15 lines · Yangbo Lu

If adapter card type identification is supported for platform, we would enable dat[4:7] for eMMC4.5 card.

---
 board/freescale/common/qixis.h | 2 ++
 drivers/mmc/fsl_esdhc.c        | 3 +++
 2 files changed, 5 insertions(+)
(quoted diff) +0 -0

b/board/freescale/common/qixis.h index 51ce9c3..450cd0d 100644

board/freescale/common/qixis.h void qixis_write_i2c(unsigned int reg, u8 value); · line 127

Quoted 1 line
board/freescale/common/qixis.h +0 -0
@@ -127,6 +127,8 @@ void qixis_write_i2c(unsigned int reg, u8 value);
 #define QIXIS_ESDHC_NO_ADAPTER                  0x7	/* No Card is

Present*/

Quoted 13 lines
board/freescale/common/qixis.h +2 -0
 #define QIXIS_SDCLKIN		0x08
 #define QIXIS_SDCLKOUT		0x02
+#define QIXIS_DAT5_6_7		0X02
+#define QIXIS_DAT4		0X01
 #endif
 
 #endif
drivers/mmc/fsl_esdhc.c index renamed from drivers/mmc/fsl_esdhc.c +0 -0

0b37002..639ec02 100644

drivers/mmc/fsl_esdhc.c void mmc_adapter_card_type_ident(void) · line 755

Quoted 9 lines
drivers/mmc/fsl_esdhc.c +3 -0
@@ -747,6 +747,9 @@ void mmc_adapter_card_type_ident(void)
 
 	switch (card_id) {
 	case QIXIS_ESDHC_ADAPTER_TYPE_EMMC45:
+		value = QIXIS_READ(brdcfg[5]);
+		value |= (QIXIS_DAT4 | QIXIS_DAT5_6_7);
+		QIXIS_WRITE(brdcfg[5], value);
 		break;
 	case QIXIS_ESDHC_ADAPTER_TYPE_SDMMC_LEGACY:
 		break;

Does any other board have this identification feature? I see the code only use qixis. How are RDB and customer boards handled?

Quoted 2 lines
Quoted 1 line

York

[Lu Yangbo-B47093] This feature is used for QDS boards that use SDHC

Adapter card. Now only T1040QDS and T2080QDS are enabled, because we want to support SD/MMC UHS-I speed mode on these two boards in kernel and these QIXIS configuration are needed for *the Adapter*. For RDB and customer boards, they don't use Adapter card and the default configuration is ok for SD/MMC Default speed mode and High speed mode.

Quoted 1 line
Quoted 4 lines

I am actually more concerned how a customer board can take advantage of this.

York

[Lu Yangbo-B47093] This feature is used to resolve pin multiplexing and Adapter card configuration on QDS board.
RDB and custom boards don't support Adapter card, and the FPGA/CPLD is easier(don't have these register and settings), having no need to change. So they couldn't take advantage of this...

Thanks.

-Yangbo Lu