From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] Re: [PATCH v3 0/9] mmc: sunxi: Enable DM_MMC
Date: Fri, 25 Jan 2019 11:51:15 +0000 [thread overview]
Message-ID: <20190125115115.7b7221ab@donnerap.cambridge.arm.com> (raw)
In-Reply-To: <CAGb2v65n7qkQFCe3Qxyfd2WNhqnkuv5MyKFN1Fqr=eZKnajbSw@mail.gmail.com>
On Fri, 25 Jan 2019 19:42:22 +0800
Chen-Yu Tsai <wens@csie.org> wrote:
> On Fri, Jan 25, 2019 at 7:37 PM Andre Przywara
> <andre.przywara@arm.com> wrote:
> >
> > On Fri, 25 Jan 2019 19:01:12 +0800
> > Chen-Yu Tsai <wens@csie.org> wrote:
> >
> > Hi,
> >
> > > On Fri, Jan 25, 2019 at 6:41 PM Jagan Teki
> > > <jagan@amarulasolutions.com> wrote:
> > > >
> > > > On Fri, Jan 25, 2019 at 2:05 PM Chen-Yu Tsai <wens@csie.org>
> > > > wrote:
> > > > >
> > > > > On Fri, Jan 25, 2019 at 4:27 PM Jagan Teki
> > > > > <jagan@amarulasolutions.com> wrote:
> > > > > >
> > > > > > On Tue, Jan 22, 2019 at 7:55 AM Chen-Yu Tsai <wens@csie.org>
> > > > > > wrote:
> > > > > > >
> > > > > > > On Mon, Jan 21, 2019 at 6:31 PM Jagan Teki
> > > > > > > <jagan@amarulasolutions.com> wrote:
> > > > > > > >
> > > > > > > > Compared to previous version changes[1] this version do
> > > > > > > > manage ahb clocks/resets via CLK framework.
> > > > > > > >
> > > > > > > > This version created changes along with Andre patches to
> > > > > > > > support clock/resets[2]
> > > > > > > >
> > > > > > > > Tested A64, SD, eMMC and respective changes available at
> > > > > > > > u-boot-sunxi/next
> > > > > > > >
> > > > > > > > Changes for v3:
> > > > > > > > - Handle clock via CLK framework.
> > > > > > > > Changes for v2:
> > > > > > > > - update the 'reset enablement' logic to do
> > > > > > > > required SoC's
> > > > > > > >
> > > > > > > > [1] https://patchwork.ozlabs.org/cover/1026828/
> > > > > > > > [2] https://patchwork.ozlabs.org/cover/1027850/
> > > > > > > >
> > > > > > > > Andre Przywara (2):
> > > > > > > > sunxi: clk: add MMC gates/resets
> > > > > > > > sunxi: clk: A80: add MMC clock support
> > > > > > > >
> > > > > > > > Jagan Teki (7):
> > > > > > > > mmc: sunxi: Add A83T emmc compatible
> > > > > > > > mmc: sunxi: Add mmc, emmc H5/A64 compatible
> > > > > > > > mmc: sunxi: Add DM_MMC support for H6
> > > > > > > > mmc: sunxi: Add DM_MMC support for A80
> > > > > > > > dm: mmc: sunxi: Add CLK and RESET support
> > > > > > > > arm: sunxi: Enable DM_MMC
> > > > > > > > arm: dts: sunxi: Enumerate MMC2 as MMC1
> > > > > > >
> > > > > > > Tested-by: Chen-Yu Tsai <wens@csie.org> # on the Bananapi
> > > > > > > M2M
> > > > > > >
> > > > > > > However, the A80 MMC clock patch is still missing code to
> > > > > > > toggle the upstream bus clock gate and reset control in
> > > > > > > the CCU.
> > > > > >
> > > > > > Sent it with original mmc clock and reset patch[1], let me
> > > > > > know your comments.
> > > > >
> > > > > Right. The problem is nowhere in this series are those
> > > > > enabled / deasserted. The A80 CCU only has one gate & reset
> > > > > for the whole MMC subsystem, including the MMC config clocks
> > > > > block. Ideally the driver for that block should enable the
> > > > > gate and deassert the reset control.
> > > >
> > > > Yes, that same has been included with v3.1 patch which I linked
> > > > above.
> > >
> > > The gates/resets are added in that patch. No one is using them.
> > > The device tree node for the MMC controllers do _not_ reference
> > > this clock and reset, only the individual ones in the MMC config
> > > clock block.
> > >
> > > Unless you are expecting BROM or SPL to have set that up for you,
> > > which IMO is quite fragile. You could very well boot from SPI or
> > > even FEL, and it wouldn't be correctly setup, in which case MMC
> > > would be completely broken.
> > >
> > > FYI the clk-sun9i-mmc driver in Linux deasserts the reset at
> > > probe:
> > >
> > > https://elixir.bootlin.com/linux/latest/source/drivers/clk/sunxi/clk-sun9i-mmc.c#L145
> > >
> > > And enables the bus gate when it needs to toggle bits in its
> > > register space:
> > >
> > > https://elixir.bootlin.com/linux/latest/source/drivers/clk/sunxi/clk-sun9i-mmc.c#L53
> > >
> > > This is what is missing. Andre's patch doesn't have them. He
> > > specifically mentioned this.
> >
> > But this is addressed by this, isn't it?
> > https://lists.denx.de/pipermail/u-boot/2019-January/355856.html
> > (combined with Jagan's addition of the shared gates in v3.1)
>
> Yes it does, however nowhere is it mentioned in the cover letter.
True, I realised this myself while searching for it in the archive ;-)
Will fix that in v2.
> That and I managed to purge it from my short term memory.
>
> So with the two series combined it should work properly on the A80.
Cool. We need some serious testing of this, once we have settled on
something ;-)
Fortunately we now have more than two months until the release.
Cheers,
Andre.
> BTW, Jagan, vN.M patches are very hard to track...
>
> ChenYu
>
> > Btw.: Somehow I managed to send it from the wrong branch (doesn't
> > even compile), will send a fix later.
> >
> > Jagan, we need this patch for A80, and also the pinmux setup patch
> > (1/2 in this series) for it to work. That together with the H3
> > reset hiccup should be enough to justify a v4, I believe. Also I
> > had some comments on your v3 (commit messages outdated, 7/9 too
> > complicated), are you going to address them?
> >
> > Meanwhile I prepared a branch to have everything we need:
> > https://github.com/apritzel/u-boot/commits/sunxi-dm-gates
> > Please ignore the top 4 commits for now (adding SPI flash support).
> >
> > Cheers,
> > Andre.
prev parent reply other threads:[~2019-01-25 11:51 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 10:31 [U-Boot] [PATCH v3 0/9] mmc: sunxi: Enable DM_MMC Jagan Teki
2019-01-21 10:31 ` [U-Boot] [PATCH v3 1/9] sunxi: clk: add MMC gates/resets Jagan Teki
2019-01-23 1:08 ` André Przywara
2019-01-21 10:31 ` [U-Boot] [PATCH v3 2/9] sunxi: clk: A80: add MMC clock support Jagan Teki
2019-01-21 10:31 ` [U-Boot] [PATCH v3 3/9] mmc: sunxi: Add A83T emmc compatible Jagan Teki
2019-01-23 1:37 ` André Przywara
2019-01-21 10:31 ` [U-Boot] [PATCH v3 4/9] mmc: sunxi: Add mmc, emmc H5/A64 compatible Jagan Teki
2019-01-23 1:39 ` André Przywara
2019-01-21 10:31 ` [U-Boot] [PATCH v3 5/9] mmc: sunxi: Add DM_MMC support for H6 Jagan Teki
2019-01-23 1:41 ` André Przywara
2019-01-21 10:31 ` [U-Boot] [PATCH v3 6/9] mmc: sunxi: Add DM_MMC support for A80 Jagan Teki
2019-01-23 1:52 ` André Przywara
2019-01-21 10:31 ` [U-Boot] [PATCH v3 7/9] dm: mmc: sunxi: Add CLK and RESET support Jagan Teki
2019-01-22 23:36 ` André Przywara
2019-01-21 10:31 ` [U-Boot] [PATCH v3 8/9] arm: sunxi: Enable DM_MMC Jagan Teki
2019-01-23 1:54 ` André Przywara
2019-01-21 10:31 ` [U-Boot] [PATCH v3 9/9] arm: dts: sunxi: Enumerate MMC2 as MMC1 Jagan Teki
2019-01-21 10:42 ` Chen-Yu Tsai
2019-01-21 11:07 ` Jagan Teki
2019-01-21 17:31 ` Chen-Yu Tsai
2019-01-21 15:38 ` Vasily Khoruzhick
2019-01-21 15:46 ` Jagan Teki
2019-01-22 4:24 ` Vasily Khoruzhick
2019-01-22 4:45 ` Vasily Khoruzhick
2019-01-21 17:05 ` Chen-Yu Tsai
2019-01-22 2:25 ` [U-Boot] [PATCH v3 0/9] mmc: sunxi: Enable DM_MMC Chen-Yu Tsai
2019-01-25 8:27 ` Jagan Teki
2019-01-25 8:34 ` Chen-Yu Tsai
2019-01-25 10:41 ` Jagan Teki
2019-01-25 11:01 ` [U-Boot] [linux-sunxi] " Chen-Yu Tsai
2019-01-25 11:36 ` Andre Przywara
2019-01-25 11:41 ` Jagan Teki
2019-01-25 11:42 ` Chen-Yu Tsai
2019-01-25 11:51 ` Andre Przywara [this message]
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=20190125115115.7b7221ab@donnerap.cambridge.arm.com \
--to=andre.przywara@arm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox