[U-Boot] [PATCH 1/2] dm: mmc: sunxi: Add A10/A20 compatible strings

Commit dd27918c2252 ("dm: mmc: sunxi: Add support for driver model") only added the allwinner,sun5i-a13-mmc compatible string for this driver. The DM initialisation code here also works with (at least) A10 and A20, so add the appropriate compatible strings as per Linux 4.17's driver.
Tested on A10 Cubieboard and A20 pcDuino3 Nano with CONFIG_DM_MMC. (A20 worked already, because sun7i-a20.dtsi specifies both the A13 and A20 strings.)
Signed-off-by: Adam Sampson ats@offog.org ---
drivers/mmc/sunxi_mmc.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index fe6d82c7b4..7fa1ae8b16 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -637,7 +637,9 @@ static int sunxi_mmc_bind(struct udevice *dev) }
static const struct udevice_id sunxi_mmc_ids[] = { + { .compatible = "allwinner,sun4i-a10-mmc" }, { .compatible = "allwinner,sun5i-a13-mmc" }, + { .compatible = "allwinner,sun7i-a20-mmc" }, { } };

Use the driver model for MMC and SATA, in preparation for CONFIG_BLK defaulting to y.
Tested on A10 Cubieboard.
Signed-off-by: Adam Sampson ats@offog.org --- I imagine an A13 version (no DM_SCSI needed) would work as well, but I don't have an A13 machine to test with.
arch/arm/mach-sunxi/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 8f70c6750e..a77815c239 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -139,6 +139,8 @@ config MACH_SUN4I bool "sun4i (Allwinner A10)" select CPU_V7A select ARM_CORTEX_CPU_IS_UP + select DM_MMC if MMC + select DM_SCSI if SCSI select PHY_SUN4I_USB select DRAM_SUN4I select SUNXI_GEN_SUN4I

On Sat, Jun 30, 2018 at 01:02:29AM +0100, Adam Sampson wrote:
Use the driver model for MMC and SATA, in preparation for CONFIG_BLK defaulting to y.
Tested on A10 Cubieboard.
Signed-off-by: Adam Sampson ats@offog.org
Acked-by: Maxime Ripard maxime.ripard@bootlin.com
Maxime

On Sat, Jun 30, 2018 at 5:32 AM, Adam Sampson ats@offog.org wrote:
Use the driver model for MMC and SATA, in preparation for CONFIG_BLK defaulting to y.
Tested on A10 Cubieboard.
Did you test eMMC in any of A10 look it is not detecting during SD boot and vice-versa happened during eMMC boot. May be it's because of pincrtrl for U-Boot which is not initializing for in DM_MMC.

On Thu, Jul 12, 2018 at 12:40:14PM +0530, Jagan Teki wrote:
On Sat, Jun 30, 2018 at 5:32 AM, Adam Sampson ats@offog.org wrote:
Use the driver model for MMC and SATA, in preparation for CONFIG_BLK defaulting to y.
Tested on A10 Cubieboard.
Did you test eMMC in any of A10 look it is not detecting during SD boot and vice-versa happened during eMMC boot. May be it's because of pincrtrl for U-Boot which is not initializing for in DM_MMC.
I'm not aware of any A10 board with an eMMC. Which board have you been testing it on?
Maxime

On Thu, Jul 12, 2018 at 1:00 PM, Maxime Ripard maxime.ripard@bootlin.com wrote:
On Thu, Jul 12, 2018 at 12:40:14PM +0530, Jagan Teki wrote:
On Sat, Jun 30, 2018 at 5:32 AM, Adam Sampson ats@offog.org wrote:
Use the driver model for MMC and SATA, in preparation for CONFIG_BLK defaulting to y.
Tested on A10 Cubieboard.
Did you test eMMC in any of A10 look it is not detecting during SD boot and vice-versa happened during eMMC boot. May be it's because of pincrtrl for U-Boot which is not initializing for in DM_MMC.
I'm not aware of any A10 board with an eMMC. Which board have you been testing it on?
Not with A10 I'm trying to verify it on H3. Just to confirm whether A10 with eMMC detected or not.

On Thu, Jul 12, 2018 at 01:13:04PM +0530, Jagan Teki wrote:
On Thu, Jul 12, 2018 at 1:00 PM, Maxime Ripard maxime.ripard@bootlin.com wrote:
On Thu, Jul 12, 2018 at 12:40:14PM +0530, Jagan Teki wrote:
On Sat, Jun 30, 2018 at 5:32 AM, Adam Sampson ats@offog.org wrote:
Use the driver model for MMC and SATA, in preparation for CONFIG_BLK defaulting to y.
Tested on A10 Cubieboard.
Did you test eMMC in any of A10 look it is not detecting during SD boot and vice-versa happened during eMMC boot. May be it's because of pincrtrl for U-Boot which is not initializing for in DM_MMC.
I'm not aware of any A10 board with an eMMC. Which board have you been testing it on?
Not with A10 I'm trying to verify it on H3. Just to confirm whether A10 with eMMC detected or not.
There's no such thing as A10 with eMMC.
Maxime

On Thu, Jul 12, 2018 at 12:40:14PM +0530, Jagan Teki wrote:
Did you test eMMC in any of A10 look it is not detecting during SD boot and vice-versa happened during eMMC boot. May be it's because of pincrtrl for U-Boot which is not initializing for in DM_MMC.
No, I don't have any boards with eMMC, so I haven't tested eMMC with either A10 or A20, I'm afraid.
(I also haven't been able to find an A13 board to test with -- if there are any A13 owners reading this, I suspect a similar change would work, and it'll need doing before the A13 boards get removed for not having DM support...)

On Thu, Jul 12, 2018 at 1:52 PM, Adam Sampson ats@offog.org wrote:
On Thu, Jul 12, 2018 at 12:40:14PM +0530, Jagan Teki wrote:
Did you test eMMC in any of A10 look it is not detecting during SD boot and vice-versa happened during eMMC boot. May be it's because of pincrtrl for U-Boot which is not initializing for in DM_MMC.
No, I don't have any boards with eMMC, so I haven't tested eMMC with either A10 or A20, I'm afraid.
(I also haven't been able to find an A13 board to test with -- if there are any A13 owners reading this, I suspect a similar change would work, and it'll need doing before the A13 boards get removed for not having DM support...)
Look like there is no eMMC on A10, atleast on existing boards in ML. I understand the eMMC issues with existing dt driver will send the patches for the same. sun4i iNet 3F, 3W has missing mmc0 node on DT, DM_MMC need to have this. anyway I'm sending all in one series.
Applied to u-boot-sunxi/master

On Sat, Jun 30, 2018 at 01:02:28AM +0100, Adam Sampson wrote:
Commit dd27918c2252 ("dm: mmc: sunxi: Add support for driver model") only added the allwinner,sun5i-a13-mmc compatible string for this driver. The DM initialisation code here also works with (at least) A10 and A20, so add the appropriate compatible strings as per Linux 4.17's driver.
Tested on A10 Cubieboard and A20 pcDuino3 Nano with CONFIG_DM_MMC. (A20 worked already, because sun7i-a20.dtsi specifies both the A13 and A20 strings.)
Signed-off-by: Adam Sampson ats@offog.org
Acked-by: Maxime Ripard maxime.ripard@bootlin.com
Maxime

On Sat, Jun 30, 2018 at 5:32 AM, Adam Sampson ats@offog.org wrote:
Commit dd27918c2252 ("dm: mmc: sunxi: Add support for driver model") only added the allwinner,sun5i-a13-mmc compatible string for this driver. The DM initialisation code here also works with (at least) A10 and A20, so add the appropriate compatible strings as per Linux 4.17's driver.
Tested on A10 Cubieboard and A20 pcDuino3 Nano with CONFIG_DM_MMC. (A20 worked already, because sun7i-a20.dtsi specifies both the A13 and A20 strings.)
Signed-off-by: Adam Sampson ats@offog.org
Applied to u-boot-sunxi/master
participants (3)
-
Adam Sampson
-
Jagan Teki
-
Maxime Ripard