Skip to contentSkip to conversation

sunxi: Improve the SinA33 support

PATCH New Maxime Ripard 5 participants 25 messages Nov 4, 2016 – Nov 14, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover sunxi: Improve the SinA33 support

Hi all,

The SinA33 board is based on an Allwinner A33 SoC and features an external (and optional) LCD display and a 4GB Toshida eMMC.

This eMMC wasn't recognized by default in U-boot because it was failing to switch in high speed mode at the first attempt.

The first three patches are to enable the eMMC, the last one to enable the LCD.

Let me know what you think,
Maxime

Maxime Ripard (4):
mmc: Retry the switch command
mmc: sunxi: Enable 8bits bus width for sun8i
sunxi: sina33: Enable the eMMC
sunxi: sina33: Enable the LCD

 configs/Sinlinx_SinA33_defconfig |  5 +++++
 drivers/mmc/mmc.c                | 15 +++++++++++----
 drivers/mmc/sunxi_mmc.c          |  2 +-
 3 files changed, 17 insertions(+), 5 deletions(-)

base-commit: d8bdfc80da39211d95f10d24e79f2e867305f71b

Signature · 1 line
git-series 0.8.11
#1 lore raw

PATCH 1/4 mmc: Retry the switch command

Some eMMC will fail at the first switch, but would succeed in a subsequent one.

Make sure we try several times to cover those cases. The number of retries (and the behaviour) is currently what is being used in Linux.

---
 drivers/mmc/mmc.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/mmc/mmc.c +11 -4
index 4380c7c195a6..d6b7e4f510c9 100644
@@ -494,6 +494,7 @@ int mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value)
 {
 	struct mmc_cmd cmd;
 	int timeout = 1000;
+	int retries = 3;
 	int ret;
 
 	cmd.cmdidx = MMC_CMD_SWITCH;
@@ -502,11 +503,17 @@ int mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value)
 				 (index << 16) |
 				 (value << 8);
 
-	ret = mmc_send_cmd(mmc, &cmd, NULL);
+	while (retries > 0) {
+		ret = mmc_send_cmd(mmc, &cmd, NULL);
 
-	/* Waiting for the ready status */
-	if (!ret)
-		ret = mmc_send_status(mmc, timeout);
+		/* Waiting for the ready status */
+		if (!ret) {
+			ret = mmc_send_status(mmc, timeout);
+			return ret;
+		}
+
+		retries--;
+	}
 
 	return ret;
 
Signature · 1 line
git-series 0.8.11
#2 lore raw

PATCH 1/4 mmc: Retry the switch command

Hi,

Quoted 7 lines · Maxime Ripard

Some eMMC will fail at the first switch, but would succeed in a subsequent one.

Make sure we try several times to cover those cases. The number of retries (and the behaviour) is currently what is being used in Linux.

LGTM:

Pantelis or Tom, can you pick this up please ?

Regards,

Hans

Quoted 39 lines
---
 drivers/mmc/mmc.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/mmc/mmc.c +11 -4
index 4380c7c195a6..d6b7e4f510c9 100644
@@ -494,6 +494,7 @@ int mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value)
 {
 	struct mmc_cmd cmd;
 	int timeout = 1000;
+	int retries = 3;
 	int ret;
 
 	cmd.cmdidx = MMC_CMD_SWITCH;
@@ -502,11 +503,17 @@ int mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value)
 				 (index << 16) |
 				 (value << 8);
 
-	ret = mmc_send_cmd(mmc, &cmd, NULL);
+	while (retries > 0) {
+		ret = mmc_send_cmd(mmc, &cmd, NULL);
 
-	/* Waiting for the ready status */
-	if (!ret)
-		ret = mmc_send_status(mmc, timeout);
+		/* Waiting for the ready status */
+		if (!ret) {
+			ret = mmc_send_status(mmc, timeout);
+			return ret;
+		}
+
+		retries--;
+	}
 
 	return ret;
 
#3 lore raw

PATCH 1/4 mmc: Retry the switch command

Quoted 6 lines · Hans de Goede

Hi,

Quoted 3 lines · Maxime Ripard

Some eMMC will fail at the first switch, but would succeed in a subsequent one.

Quoted 8 lines
Quoted 4 lines

Make sure we try several times to cover those cases. The number of retries (and the behaviour) is currently what is being used in Linux.

LGTM:

Quoted 1 line

Pantelis or Tom, can you pick this up please ?

Want to just pick it up with the rest of the series in the sunxi tree?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161113/01619abf/attachment.sig>
#4 lore raw

PATCH 1/4 mmc: Retry the switch command

Quoted 14 lines · Tom Rini
Quoted 13 lines · Hans de Goede

Hi,

Quoted 7 lines · Maxime Ripard

Some eMMC will fail at the first switch, but would succeed in a subsequent one.

Make sure we try several times to cover those cases. The number of retries (and the behaviour) is currently what is being used in Linux.

LGTM:

Quoted 7 lines
Quoted 1 line
Quoted 1 line

Pantelis or Tom, can you pick this up please ?

Want to just pick it up with the rest of the series in the sunxi tree?

Sorry for late..If you are ok, i will pick these on today. If you already picked this..let me know, plz.

Best Regards,
Jaehoon Chung

Quoted 1 line
#5 lore raw

PATCH 1/4 mmc: Retry the switch command

Hi,

Quoted 17 lines · Jaehoon Chung
Quoted 16 lines · Tom Rini
Quoted 14 lines · Hans de Goede

Hi,

Quoted 7 lines · Maxime Ripard

Some eMMC will fail at the first switch, but would succeed in a subsequent one.

Make sure we try several times to cover those cases. The number of retries (and the behaviour) is currently what is being used in Linux.

LGTM:

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Pantelis or Tom, can you pick this up please ?

Want to just pick it up with the rest of the series in the sunxi tree?

Sorry for late..If you are ok, i will pick these on today.

Go ahead and pick these up please.

Quoted 1 line

If you already picked this..let me know, plz.

Regards,

Hans

#6 lore raw

PATCH 1/4 mmc: Retry the switch command

Quoted 22 lines · Hans de Goede

Hi,

Quoted 19 lines · Jaehoon Chung
Quoted 18 lines · Tom Rini
Quoted 6 lines · Hans de Goede

Hi,

Quoted 3 lines · Maxime Ripard

Some eMMC will fail at the first switch, but would succeed in a subsequent one.

Quoted 8 lines
Quoted 4 lines

Make sure we try several times to cover those cases. The number of retries (and the behaviour) is currently what is being used in Linux.

LGTM:

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Pantelis or Tom, can you pick this up please ?

Want to just pick it up with the rest of the series in the sunxi tree?

Sorry for late..If you are ok, i will pick these on today.

Go ahead and pick these up please.

Ok. I will pick these series.

Thanks!

Best Regards,
Jaehoon Chung

Quoted 9 lines
Quoted 2 lines

If you already picked this..let me know, plz.

Regards,

Hans

#7 lore raw

PATCH 1/4 mmc: Retry the switch command

In reply to Hans de Goede
Quoted 9 lines · Hans de Goede

Hi,

Quoted 6 lines · Maxime Ripard

Some eMMC will fail at the first switch, but would succeed in a subsequent one.

Make sure we try several times to cover those cases. The number of retries (and the behaviour) is currently what is being used in Linux.

Quoted 7 lines
Quoted 1 line

LGTM:

Pantelis or Tom, can you pick this up please ?

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

Quoted 48 lines

Regards,

Hans

Quoted 39 lines
---
 drivers/mmc/mmc.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/mmc/mmc.c +11 -4
index 4380c7c195a6..d6b7e4f510c9 100644
@@ -494,6 +494,7 @@ int mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value)
 {
     struct mmc_cmd cmd;
     int timeout = 1000;
+    int retries = 3;
     int ret;
 
     cmd.cmdidx = MMC_CMD_SWITCH;
@@ -502,11 +503,17 @@ int mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value)
                  (index << 16) |
                  (value << 8);
 
-    ret = mmc_send_cmd(mmc, &cmd, NULL);
+    while (retries > 0) {
+        ret = mmc_send_cmd(mmc, &cmd, NULL);
 
-    /* Waiting for the ready status */
-    if (!ret)
-        ret = mmc_send_status(mmc, timeout);
+        /* Waiting for the ready status */
+        if (!ret) {
+            ret = mmc_send_status(mmc, timeout);
+            return ret;
+        }
+
+        retries--;
+    }
 
     return ret;
 
#8 lore raw

PATCH 2/4 mmc: sunxi: Enable 8bits bus width for sun8i

In reply to Maxime Ripard

The sun8i SoCs also have a 8 bits capable MMC2 controller. Enable the support for those too.

---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/sunxi_mmc.c +1 -1
index 6953accce123..b8716c93cb06 100644
@@ -463,7 +463,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 
 	cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
 	cfg->host_caps = MMC_MODE_4BIT;
-#ifdef CONFIG_MACH_SUN50I
+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I)
 	if (sdc_no == 2)
 		cfg->host_caps = MMC_MODE_8BIT;
 #endif
Signature · 1 line
git-series 0.8.11
#9 lore raw

PATCH 2/4 mmc: sunxi: Enable 8bits bus width for sun8i

Quoted 13 lines · Maxime Ripard

The sun8i SoCs also have a 8 bits capable MMC2 controller. Enable the support for those too.

---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/sunxi_mmc.c +0 -0
index 6953accce123..b8716c93cb06 100644

drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 466

Quoted 5 lines
drivers/mmc/sunxi_mmc.c +1 -1
@@ -463,7 +463,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 
        cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
        cfg->host_caps = MMC_MODE_4BIT;
-#ifdef CONFIG_MACH_SUN50I
+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I)

8 come before 50. :)

Otherwise,

Quoted 5 lines
drivers/mmc/sunxi_mmc.c +0 -1
        if (sdc_no == 2)
                cfg->host_caps = MMC_MODE_8BIT;
 #endif
--

git-series 0.8.11

#10 lore raw

PATCH 2/4 mmc: sunxi: Enable 8bits bus width for sun8i

Quoted 16 lines · Chen-Yu Tsai
Quoted 14 lines · Maxime Ripard

The sun8i SoCs also have a 8 bits capable MMC2 controller. Enable the support for those too.

---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/sunxi_mmc.c +0 -0
index 6953accce123..b8716c93cb06 100644
@@ -463,7 +463,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 
Quoted 6 lines

drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 466

Quoted 4 lines
drivers/mmc/sunxi_mmc.c +1 -1
        cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
        cfg->host_caps = MMC_MODE_4BIT;
-#ifdef CONFIG_MACH_SUN50I
+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I)

8 come before 50. :)

But 5 comes before 8, and 0 before i :)

Quoted 3 lines

Otherwise,

Thanks,
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161106/4f183687/attachment.sig>
#11 lore raw

PATCH 2/4 mmc: sunxi: Enable 8bits bus width for sun8i

Quoted 17 lines · Maxime Ripard
Quoted 16 lines · Chen-Yu Tsai
Quoted 14 lines · Maxime Ripard

The sun8i SoCs also have a 8 bits capable MMC2 controller. Enable the support for those too.

---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/sunxi_mmc.c +0 -0
index 6953accce123..b8716c93cb06 100644
@@ -463,7 +463,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 
Quoted 8 lines
Quoted 6 lines

drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 466

Quoted 4 lines
drivers/mmc/sunxi_mmc.c +1 -1
        cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
        cfg->host_caps = MMC_MODE_4BIT;
-#ifdef CONFIG_MACH_SUN50I
+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I)

8 come before 50. :)

But 5 comes before 8, and 0 before i :)

Indeed, though 8 and 50 are akin to a generation number, so it makes sense to sort them in natural order. :)

ChenYu

Quoted 12 lines
Quoted 4 lines

Otherwise,

Thanks,
Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

#12 lore raw

PATCH 2/4 mmc: sunxi: Enable 8bits bus width for sun8i

1;4600;0c

Quoted 26 lines · Chen-Yu Tsai
Quoted 24 lines · Maxime Ripard
Quoted 22 lines · Chen-Yu Tsai
Quoted 13 lines · Maxime Ripard

The sun8i SoCs also have a 8 bits capable MMC2 controller. Enable the support for those too.

---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/sunxi_mmc.c +0 -0
index 6953accce123..b8716c93cb06 100644

drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 466

Quoted 5 lines
drivers/mmc/sunxi_mmc.c +1 -1
@@ -463,7 +463,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 
        cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
        cfg->host_caps = MMC_MODE_4BIT;
-#ifdef CONFIG_MACH_SUN50I
+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I)

8 come before 50. :)

Quoted 4 lines
Quoted 1 line

But 5 comes before 8, and 0 before i :)

Indeed, though 8 and 50 are akin to a generation number, so it makes sense to sort them in natural order. :)

I know, but it was one of the comments I had in Linux, and we used that ordering there. And we probably want to be consistent, but I don't really care.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161107/8c125758/attachment.sig>
#13 lore raw

PATCH 2/4 mmc: sunxi: Enable 8bits bus width for sun8i

Quoted 28 lines · Maxime Ripard

1;4600;0c

Quoted 26 lines · Chen-Yu Tsai
Quoted 24 lines · Maxime Ripard
Quoted 22 lines · Chen-Yu Tsai
Quoted 13 lines · Maxime Ripard

The sun8i SoCs also have a 8 bits capable MMC2 controller. Enable the support for those too.

---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/sunxi_mmc.c +0 -0
index 6953accce123..b8716c93cb06 100644

drivers/mmc/sunxi_mmc.c struct mmc *sunxi_mmc_init(int sdc_no) · line 466

Quoted 5 lines
drivers/mmc/sunxi_mmc.c +1 -1
@@ -463,7 +463,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 
        cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
        cfg->host_caps = MMC_MODE_4BIT;
-#ifdef CONFIG_MACH_SUN50I
+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I)

8 come before 50. :)

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

But 5 comes before 8, and 0 before i :)

Indeed, though 8 and 50 are akin to a generation number, so it makes sense to sort them in natural order. :)

I know, but it was one of the comments I had in Linux, and we used that ordering there. And we probably want to be consistent, but I don't really care.

I see we have dictionary order in the ccu driver, natural order in pinctrl/sunxi/Kconfig, and ordered by SoC name (Axx) in pinctrl/sunxi/Makefile.

Anyway, no point in bikeshedding over this. Hans, please pick up this patch as is with my Reviewed-by, unless you have other concerns. :)

ChenYu

#14 lore raw

PATCH 2/4 mmc: sunxi: Enable 8bits bus width for sun8i

In reply to Maxime Ripard

Hi,

Quoted 4 lines · Maxime Ripard

The sun8i SoCs also have a 8 bits capable MMC2 controller. Enable the support for those too.

LGTM:

Regards,

Hans

Quoted 18 lines
---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/sunxi_mmc.c +1 -1
index 6953accce123..b8716c93cb06 100644
@@ -463,7 +463,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 
 	cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
 	cfg->host_caps = MMC_MODE_4BIT;
-#ifdef CONFIG_MACH_SUN50I
+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I)
 	if (sdc_no == 2)
 		cfg->host_caps = MMC_MODE_8BIT;
 #endif
#15 lore raw

PATCH 2/4 mmc: sunxi: Enable 8bits bus width for sun8i

Quoted 11 lines · Hans de Goede

Hi,

Quoted 4 lines · Maxime Ripard

The sun8i SoCs also have a 8 bits capable MMC2 controller. Enable the support for those too.

LGTM:

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

Quoted 27 lines

Regards,

Hans

Quoted 18 lines
---
 drivers/mmc/sunxi_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/sunxi_mmc.c +1 -1
index 6953accce123..b8716c93cb06 100644
@@ -463,7 +463,7 @@ struct mmc *sunxi_mmc_init(int sdc_no)
 
     cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
     cfg->host_caps = MMC_MODE_4BIT;
-#ifdef CONFIG_MACH_SUN50I
+#if defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUN8I)
     if (sdc_no == 2)
         cfg->host_caps = MMC_MODE_8BIT;
 #endif
#16 lore raw

PATCH 3/4 sunxi: sina33: Enable the eMMC

In reply to Maxime Ripard

The SinA33 has an 4GB Toshiba eMMC connected to the MMC2 controller. Enable it.

---
 configs/Sinlinx_SinA33_defconfig | 1 +
 1 file changed, 1 insertion(+), 0 deletions(-)
configs/Sinlinx_SinA33_defconfig +1 -0
index 2a5f985dd303..f4719db2d501 100644
@@ -4,6 +4,7 @@ CONFIG_MACH_SUN8I_A33=y
 CONFIG_DRAM_CLK=552
 CONFIG_DRAM_ZQ=15291
 CONFIG_MMC0_CD_PIN="PB4"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PH8"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
Signature · 1 line
git-series 0.8.11
#18 lore raw

PATCH 3/4 sunxi: sina33: Enable the eMMC

In reply to Maxime Ripard

Hi,

Quoted 4 lines · Maxime Ripard

The SinA33 has an 4GB Toshiba eMMC connected to the MMC2 controller. Enable it.

LGTM:

Regards,

Hans

Quoted 17 lines
---
 configs/Sinlinx_SinA33_defconfig | 1 +
 1 file changed, 1 insertion(+), 0 deletions(-)
configs/Sinlinx_SinA33_defconfig +1 -0
index 2a5f985dd303..f4719db2d501 100644
@@ -4,6 +4,7 @@ CONFIG_MACH_SUN8I_A33=y
 CONFIG_DRAM_CLK=552
 CONFIG_DRAM_ZQ=15291
 CONFIG_MMC0_CD_PIN="PB4"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PH8"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
#19 lore raw

PATCH 3/4 sunxi: sina33: Enable the eMMC

Quoted 11 lines · Hans de Goede

Hi,

Quoted 4 lines · Maxime Ripard

The SinA33 has an 4GB Toshiba eMMC connected to the MMC2 controller. Enable it.

LGTM:

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

Quoted 26 lines

Regards,

Hans

Quoted 17 lines
---
 configs/Sinlinx_SinA33_defconfig | 1 +
 1 file changed, 1 insertion(+), 0 deletions(-)
configs/Sinlinx_SinA33_defconfig +1 -0
index 2a5f985dd303..f4719db2d501 100644
@@ -4,6 +4,7 @@ CONFIG_MACH_SUN8I_A33=y
 CONFIG_DRAM_CLK=552
 CONFIG_DRAM_ZQ=15291
 CONFIG_MMC0_CD_PIN="PB4"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PH8"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
#20 lore raw

PATCH 4/4 sunxi: sina33: Enable the LCD

In reply to Maxime Ripard

The SinA33 comes with an optional 7" display. Enable it in the configuration.

---
 configs/Sinlinx_SinA33_defconfig | 4 ++++
 1 file changed, 4 insertions(+), 0 deletions(-)
configs/Sinlinx_SinA33_defconfig +4 -0
index f4719db2d501..26b119a9b92f 100644
@@ -6,6 +6,10 @@ CONFIG_DRAM_ZQ=15291
 CONFIG_MMC0_CD_PIN="PB4"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PH8"
+CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:18,pclk_khz:66000,le:90,ri:160,up:3,lo:127,hs:70,vs:20,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_BL_EN="PH6"
+CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
Signature · 1 line
git-series 0.8.11
#21 lore raw

PATCH 4/4 sunxi: sina33: Enable the LCD

Hi,

Quoted 13 lines · Maxime Ripard

The SinA33 comes with an optional 7" display. Enable it in the configuration.

---
 configs/Sinlinx_SinA33_defconfig | 4 ++++
 1 file changed, 4 insertions(+), 0 deletions(-)
configs/Sinlinx_SinA33_defconfig +0 -0
index f4719db2d501..26b119a9b92f 100644

configs/Sinlinx_SinA33_defconfig CONFIG_DRAM_ZQ=15291 · line 12

Quoted 7 lines
configs/Sinlinx_SinA33_defconfig +4 -0
@@ -6,6 +6,10 @@ CONFIG_DRAM_ZQ=15291
 CONFIG_MMC0_CD_PIN="PB4"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PH8"
+CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:18,pclk_khz:66000,le:90,ri:160,up:3,lo:127,hs:70,vs:20,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_BL_EN="PH6"
+CONFIG_VIDEO_LCD_BL_PWM="PH0"

I'm using the exact same panel with my SinA31s. The schematics show that these 2 pins aren't actually hooked up to the panel at all. Instead of BL_EN, the corresponding pin is pull-ed up to 3.3V by a resistor just before the LCD connector on the base board.

Please try it without these 2 pins set.

ChenYu

P.S. I've also a VGA converter board for the SinA33 which I've never tried.

Quoted 5 lines
configs/Sinlinx_SinA33_defconfig +0 -1
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
--

git-series 0.8.11

#22 lore raw

PATCH 4/4 sunxi: sina33: Enable the LCD

In reply to Maxime Ripard

Hi,

Quoted 4 lines · Maxime Ripard

The SinA33 comes with an optional 7" display. Enable it in the configuration.

LGTM:

Regards,

Hans

Quoted 20 lines
---
 configs/Sinlinx_SinA33_defconfig | 4 ++++
 1 file changed, 4 insertions(+), 0 deletions(-)
configs/Sinlinx_SinA33_defconfig +4 -0
index f4719db2d501..26b119a9b92f 100644
@@ -6,6 +6,10 @@ CONFIG_DRAM_ZQ=15291
 CONFIG_MMC0_CD_PIN="PB4"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PH8"
+CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:18,pclk_khz:66000,le:90,ri:160,up:3,lo:127,hs:70,vs:20,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_BL_EN="PH6"
+CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
#23 lore raw

PATCH 4/4 sunxi: sina33: Enable the LCD

Hi Hans,

Quoted 11 lines · Hans de Goede

Hi,

Quoted 4 lines · Maxime Ripard

The SinA33 comes with an optional 7" display. Enable it in the configuration.

LGTM:

This patch is not on MMC side. But i picked with other patches. If there is other issue, let me know, plz.

Best Regards,
Jaehoon Chung

Quoted 30 lines

Regards,

Hans

Quoted 20 lines
---
 configs/Sinlinx_SinA33_defconfig | 4 ++++
 1 file changed, 4 insertions(+), 0 deletions(-)
configs/Sinlinx_SinA33_defconfig +4 -0
index f4719db2d501..26b119a9b92f 100644
@@ -6,6 +6,10 @@ CONFIG_DRAM_ZQ=15291
 CONFIG_MMC0_CD_PIN="PB4"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PH8"
+CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:18,pclk_khz:66000,le:90,ri:160,up:3,lo:127,hs:70,vs:20,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_BL_EN="PH6"
+CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y
#24 lore raw

PATCH 4/4 sunxi: sina33: Enable the LCD

In reply to Hans de Goede
Quoted 11 lines · Hans de Goede

Hi,

Quoted 4 lines · Maxime Ripard

The SinA33 comes with an optional 7" display. Enable it in the configuration.

LGTM:

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

Quoted 30 lines

Regards,

Hans

Quoted 20 lines
---
 configs/Sinlinx_SinA33_defconfig | 4 ++++
 1 file changed, 4 insertions(+), 0 deletions(-)
configs/Sinlinx_SinA33_defconfig +4 -0
index f4719db2d501..26b119a9b92f 100644
@@ -6,6 +6,10 @@ CONFIG_DRAM_ZQ=15291
 CONFIG_MMC0_CD_PIN="PB4"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB0_ID_DET="PH8"
+CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:18,pclk_khz:66000,le:90,ri:160,up:3,lo:127,hs:70,vs:20,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_DCLK_PHASE=0
+CONFIG_VIDEO_LCD_BL_EN="PH6"
+CONFIG_VIDEO_LCD_BL_PWM="PH0"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL=y