mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Drew Fustini <dfustini@baylibre.com>
To: Jisheng Zhang <jszhang@kernel.org>, Guo Ren <guoren@kernel.org>,
	Fu Wei <wefu@redhat.com>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Conor Dooley <conor@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	Robert Nelson <robertcnelson@beagleboard.org>,
	Jason Kridner <jkridner@beagleboard.org>,
	Drew Fustini <dfustini@baylibre.com>
Subject: [PATCH RFC 0/4] RISC-V: Add basic eMMC support for BeagleV Ahead
Date: Mon, 24 Jul 2023 17:59:14 -0700	[thread overview]
Message-ID: <20230724-th1520-emmc-v1-0-cca1b2533da2@baylibre.com> (raw)

This series adds initial support for the eMMC on the BeagleV Ahead
board. This allows the kernel to boot with the root fs on eMMC.

I tested [1] on top of v6.5-rc3 along with the prerequisite series [2]
that adds the BeagleV Ahead dts file.

I am submitting this as an RFC for other people that want to boot
mainline Liunx from the eMMC. There several issues that need to be
addressed in order to claim that MMC fully supported on TH1520:

  - Only the MMC controller connected to the eMMC is enabled. I did
    not attempt to configure or use the microSD card slot.

  - The new th1520 compatible in the sdhci-of-dwcmshc driver turns off
    DMA and just uses the inefficient PIO mode, because I did not yet
    get into the correct configuration for DMA support.

  - The new th1520 compatible in sdhci-of-dwcmshc turns the reset op
    into a no-op. The vendor boot loader [3] fully configures the mmc
    controller and the phy. The kernel does not yet know how to do that
    so it avoids doing a reset. This is essentially a hack and not the
    correct way to handle the situation.

Fortunately, Jisheng is the original author of sdhci-of-dwcmshc so I
am sure Jisheng will know many ways in which this can be improved.

NOTE: I combined schema, dts and driver patches into this one series for
the purposes discussing the RFC but that is probably not the correct
structure for a real patch series.

Thanks,
Drew

[1] https://gist.github.com/pdp7/23259595a7570f1f11086d286e16dfb6
[2] https://lore.kernel.org/linux-riscv/20230722-upstream-beaglev-ahead-dts-v2-0-a470ab8fe806@baylibre.com/
[3] https://git.beagleboard.org/beaglev-ahead/beaglev-ahead-u-boot

Signed-off-by: Drew Fustini <dfustini@baylibre.com>
---
Drew Fustini (4):
      dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 compatible
      riscv: dts: thead: Add TH1520 mmc controller and sdhci clock
      riscv: dts: thead: Enable BeagleV Ahead eMMC controller
      mmc: sdhci-of-dwcmshc: Add support for T-Head TH1520

 .../bindings/mmc/snps,dwcmshc-sdhci.yaml           |  1 +
 arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 14 ++++++++
 arch/riscv/boot/dts/thead/th1520.dtsi              | 17 +++++++++
 drivers/mmc/host/sdhci-of-dwcmshc.c                | 42 ++++++++++++++++++++++
 4 files changed, 74 insertions(+)
---
base-commit: cb8c874afdc063290797ae1776a5d410fecb06cb
change-id: 20230724-th1520-emmc-73cde98805d6

Best regards,
-- 
Drew Fustini <dfustini@baylibre.com>


             reply	other threads:[~2023-07-25  1:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25  0:59 Drew Fustini [this message]
2023-07-25  0:59 ` [PATCH RFC 1/4] dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 compatible Drew Fustini
2023-07-25  5:40   ` Krzysztof Kozlowski
2023-07-25  0:59 ` [PATCH RFC 2/4] riscv: dts: thead: Add TH1520 mmc controller and sdhci clock Drew Fustini
2023-07-25  0:59 ` [PATCH RFC 3/4] riscv: dts: thead: Enable BeagleV Ahead eMMC controller Drew Fustini
2023-07-25  0:59 ` [PATCH RFC 4/4] mmc: sdhci-of-dwcmshc: Add support for T-Head TH1520 Drew Fustini
2023-07-25 15:03   ` Jisheng Zhang
2023-07-25 15:54     ` Drew Fustini

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=20230724-th1520-emmc-v1-0-cca1b2533da2@baylibre.com \
    --to=dfustini@baylibre.com \
    --cc=adrian.hunter@intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=guoren@kernel.org \
    --cc=jkridner@beagleboard.org \
    --cc=jszhang@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robertcnelson@beagleboard.org \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wefu@redhat.com \
    /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

all inboxes | Powered by JetHome®