All of lore.kernel.org
 help / color / mirror / Atom feed
From: Priit Laes <plaes@plaes.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] [PATCH 0/9] sunxi: enable DM_MMC
Date: Mon, 21 Jan 2019 08:22:05 +0000	[thread overview]
Message-ID: <20190121082205.6222p6wqpgsuw6tn@plaes.org> (raw)
In-Reply-To: <6851bd0e-64a1-03cf-0406-13ba27d9c1f4@arm.com>

On Mon, Jan 21, 2019 at 12:54:52AM +0000, André Przywara wrote:
> On 20/01/2019 19:51, Priit Laes wrote:
> 
> Hi,
> 
> > On Sat, Jan 19, 2019 at 01:30:46AM +0000, Andre Przywara wrote:
> >> This series enables the Allwinner MMC driver to drive all SoCs with its
> >> DM_MMC variant. We use the gates clock and reset support from the new
> >> clock driver, but keep the actual mod clock in its somewhat hackish
> >> state. Properly supporting this via the clock driver is a bit more work.
> >> The per-compatible variant struct for now only holds the mod clock
> >> address (which will go away), but we will need the struct later again
> >> for the various timing modes.
> >>
> >> This allows us to eventually enable DM_MMC for all SoCs, and get rid of
> >> the nasty deprecation warning.
> >>
> >> The first patch adds the MMC clock gates and resets to the clock driver.
> >> Patch 2/9 adds support for the A80 MMC config clock, which is a bit
> >> special. I can't test this, so please give this a try if you have a board.
> >>
> >> Patch 3 uses the new clocks in the MMC driver, the following three patches
> >> add the remaining compatible strings along with their required mod clock
> >> addresses.
> >>
> >> Patch 7 fixes the Pine64-LTS board, while patch 8 eventually enables
> >> everything. Patch 9 is some comment fix to make it easier to reason
> >> about what part of the driver is for DM_MMC and which is not.
> >>
> >> I successfully compiled the HEAD for all 142 Allwinner boards, also
> >> compiled all patches for selected boards.
> >>
> >> This was briefly tested on Pine-H64 (H6), Pine64-LTS (A64), OrangePi PC 2
> >> (H5), OrangePi Zero (H2+) and BananaPi-M1 (A20).
> >>
> >> Please run it on every board that you can get hold of to give this series
> >> a good shake.
> > 
> > Testing with A10 Gemei G9 Tablet, FEL mode is broken:
> > 
> > a) With usb-boot via fel:
> > 
> > I get following error/warning: 
> > Loading Environment from FAT... Card did not respond to voltage select!
> > 
> > => mmc list
> > mmc at 1c0f000: 0
> > ### All commands below stalls for a bit (~2 seconds), but return nothing
> > => mmc info  
> > => mmc dev 0
> > => mmc part

Similar issue with A20 Olinuxino Lime2 revk with SPI.

a) Fel mode usb-boot failure (cannot properly initialize sd / emmc)
b) SPI boot failure (cannot properly initialize sd / emmc)

c) Regular SD-card boot works ok!
d) eMMC boot works ok!

> Ah, thanks for mentioning that. Can reproduce this on the Pine64-LTS.
> And I was already wondering why we wouldn't need the pinctrl parts I was
> working on ...
> 
> So if we boot from SD card, the SPL sets up the pinmux for the SD pins,
> and stuff works. For U-Boot proper we rely on board_mmc_init() to do
> this for us, but this gets only called for !DM_MMC configurations.
> If we boot with a SPL which doesn't initialise the MMC (booting via FEL
> or SPI or NAND), the pinmux setup is missing and it fails.
> 
> If anyone has a clever idea how to fix this without too much hacking and
> without bringing in a DM_PINCTRL driver, I am all ears.

Well, we know that there are basically only a few SPL boot options..
> 
> Thanks for testing and the report!
> 
> Cheers,
> Andre.
> 
> > 
> > b) When booting from SD-card [1], card is properly found, identified and
> > even partitions are there.
> > 
> > dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 seek=8 bs=1024
> > 
> > 
> >> This goes on top of current sunxi/master (543049ab5906) and is available
> >> on https://github.com/apritzel/u-boot/commits/sunxi-dm.
> >>
> >> This replaces Jagan's v2 series "mmc: sunxi: Enable DM_MMC" in a more
> >> driver model compliant way, borrowing two patches from him.
> >>
> >> Cheers,
> >> Andre.
> >>
> >> Andre Przywara (7):
> >>   sunxi: clk: add MMC gates/resets
> >>   sunxi: clk: A80: add MMC clock support
> >>   mmc: sunxi: Add DM clk and reset support
> >>   mmc: sunxi: Add H6 support
> >>   mmc: sunxi: Add A80 support
> >>   mmc: sunxi: Honour non-removable property in DT
> >>   mmc: sunxi: Mark end of DM_MMC #ifdefs
> >>
> >> Jagan Teki (2):
> >>   mmc: sunxi: Add missing compatible strings
> >>   arm: sunxi: Enable DM_MMC
> >>
> >>  arch/arm/Kconfig                      |  1 +
> >>  arch/arm/mach-sunxi/Kconfig           |  1 -
> >>  configs/Linksprite_pcDuino3_defconfig |  1 -
> >>  drivers/clk/sunxi/clk_a10.c           |  4 +++
> >>  drivers/clk/sunxi/clk_a10s.c          |  3 ++
> >>  drivers/clk/sunxi/clk_a23.c           |  6 ++++
> >>  drivers/clk/sunxi/clk_a31.c           |  8 +++++
> >>  drivers/clk/sunxi/clk_a64.c           |  6 ++++
> >>  drivers/clk/sunxi/clk_a80.c           | 28 ++++++++++++++++-
> >>  drivers/clk/sunxi/clk_a83t.c          |  6 ++++
> >>  drivers/clk/sunxi/clk_h3.c            |  6 ++++
> >>  drivers/clk/sunxi/clk_h6.c            |  6 ++++
> >>  drivers/clk/sunxi/clk_r40.c           |  8 +++++
> >>  drivers/mmc/sunxi_mmc.c               | 59 +++++++++++++++++++++++++++++------
> >>  14 files changed, 131 insertions(+), 12 deletions(-)
> >>
> >> -- 
> >> 2.14.5
> >>
> >> -- 
> >> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com.
> >> For more options, visit https://groups.google.com/d/optout.
> 

  reply	other threads:[~2019-01-21  8:22 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-19  1:30 [U-Boot] [PATCH 0/9] sunxi: enable DM_MMC Andre Przywara
2019-01-19  1:30 ` [U-Boot] [PATCH 1/9] sunxi: clk: add MMC gates/resets Andre Przywara
2019-01-19  1:30 ` [U-Boot] [PATCH 2/9] sunxi: clk: A80: add MMC clock support Andre Przywara
2019-01-21  9:31   ` [U-Boot] [linux-sunxi] " Jagan Teki
2019-01-21  9:34     ` Chen-Yu Tsai
2019-01-21  9:38       ` Andre Przywara
2019-01-21 10:02         ` Chen-Yu Tsai
2019-01-21 10:12           ` Andre Przywara
2019-01-21 10:29             ` Chen-Yu Tsai
2019-01-19  1:30 ` [U-Boot] [PATCH 3/9] mmc: sunxi: Add DM clk and reset support Andre Przywara
2019-01-19  1:30 ` [U-Boot] [PATCH 4/9] mmc: sunxi: Add H6 support Andre Przywara
2019-01-19  1:30 ` [U-Boot] [PATCH 5/9] mmc: sunxi: Add missing compatible strings Andre Przywara
2019-01-19  1:30 ` [U-Boot] [PATCH 6/9] mmc: sunxi: Add A80 support Andre Przywara
2019-01-19  1:30 ` [U-Boot] [PATCH 7/9] mmc: sunxi: Honour non-removable property in DT Andre Przywara
2019-01-25  7:16   ` [U-Boot] [linux-sunxi] " Jagan Teki
2019-01-25  9:28     ` Andre Przywara
2019-01-29 18:20   ` Jagan Teki
2019-01-19  1:30 ` [U-Boot] [PATCH 8/9] arm: sunxi: Enable DM_MMC Andre Przywara
2019-01-31 10:04   ` Simon Glass
2019-01-19  1:30 ` [U-Boot] [PATCH 9/9] mmc: sunxi: Mark end of DM_MMC #ifdefs Andre Przywara
2019-01-31 10:04   ` Simon Glass
2019-01-31 14:55     ` Andre Przywara
2019-01-19 18:32 ` [U-Boot] [PATCH 0/9] sunxi: enable DM_MMC Vasily Khoruzhick
2019-01-19 20:33   ` André Przywara
2019-01-19 23:42     ` Vasily Khoruzhick
2019-01-20 19:51 ` [U-Boot] [linux-sunxi] " Priit Laes
2019-01-21  0:54   ` André Przywara
2019-01-21  8:22     ` Priit Laes [this message]
2019-01-21  8:51       ` Andre Przywara
2019-01-21  9:10         ` Priit Laes
2019-01-22  9:49     ` Lukasz Majewski
2019-01-21  9:22 ` Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190121082205.6222p6wqpgsuw6tn@plaes.org \
    --to=plaes@plaes.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.