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 v2 0/4] RISC-V: Add basic eMMC support for BeagleV Ahead Date: Fri, 04 Aug 2023 20:14:44 -0700 [thread overview] Message-ID: <20230724-th1520-emmc-v2-0-132ed2e2171e@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 with this config [2] along with the prerequisite series [3] that adds the BeagleV Ahead dts file. I am submitting this as an RFC for other people that want to test booting from the eMMC with mainline. There are several issues that need to be resolved before this code can progress beyond an RFC: - Only the MMC controller connected to the eMMC is enabled. I did not yet attempt to configure or use the microSD card slot. - The thead,th1520-dwcmshc compatible sets quirks which disable DMA and forces the use of inefficient PIO mode. I need to determine the correct configuration for the SDMA and ADMA modes. - th1520-specific code is needed in dwcmshc_set_uhs_signaling() for MMC_TIMING_MMC_HS400. I have not figured out add proper way to make that code conditional so that it only runs on th1520. One method could be to add a th1520 flag to dwcmshc_priv but that seems like a hack. Alternatively, set_uhs_signaling in sdhci_dwcmshc_th1520_ops could point to a th1520-specific function, but that new function would have to duplicate all the code in the current dwcmshc_set_uhs_signaling(). NOTE: I combined schema, dts and driver patches into this one series to simplify review and testing of this RFC. References: [1] https://gist.github.com/pdp7/09995be1e30df0a04b9b9cd31420f9d5 [2] https://gist.github.com/pdp7/e4585311eb2cd27df7b50c87babc15fd [3] https://lore.kernel.org/linux-riscv/20230722-upstream-beaglev-ahead-dts-v2-0-a470ab8fe806@baylibre.com/ Changes in v2: - Expand dwcmshc_priv based on driver in the T-Head 5.10 kernel: delay_line, non_removable, pull_up_en, io_fixed_1v8 - New boolean property "thead,pull-up" indicates phy pull-up config - New boolean property "thead,io-fixed-1v8" indicates that io voltage should be set to 1.8V during reset - Add th1520_phy_1_8v_init() as voltage_switch op - Add th1520_execute_tuning() as the platform_execute_tuning op - Added th1520_sdhci_reset() as the .reset op. This function will set io voltage to 1.8V after calling the standard sdhci_reset() function. - Modified dwcmshc_set_uhs_signaling() to enable SDHCI_CTRL_VDD_180 when io_fixed_1v8 is true - Add many defines for register offsets and settings based on the mmc support in the T-Head downstream v5.10 kernel v1 series: https://lore.kernel.org/r/20230724-th1520-emmc-v1-0-cca1b2533da2@baylibre.com Signed-off-by: Drew Fustini <dfustini@baylibre.com> --- Drew Fustini (4): dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support 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 | 9 + arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 17 ++ arch/riscv/boot/dts/thead/th1520.dtsi | 17 ++ drivers/mmc/host/sdhci-of-dwcmshc.c | 336 +++++++++++++++++++++ 4 files changed, 379 insertions(+) --- base-commit: cb8c874afdc063290797ae1776a5d410fecb06cb change-id: 20230724-th1520-emmc-73cde98805d6 Best regards, -- Drew Fustini <dfustini@baylibre.com>
WARNING: multiple messages have this Message-ID (diff)
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 v2 0/4] RISC-V: Add basic eMMC support for BeagleV Ahead Date: Fri, 04 Aug 2023 20:14:44 -0700 [thread overview] Message-ID: <20230724-th1520-emmc-v2-0-132ed2e2171e@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 with this config [2] along with the prerequisite series [3] that adds the BeagleV Ahead dts file. I am submitting this as an RFC for other people that want to test booting from the eMMC with mainline. There are several issues that need to be resolved before this code can progress beyond an RFC: - Only the MMC controller connected to the eMMC is enabled. I did not yet attempt to configure or use the microSD card slot. - The thead,th1520-dwcmshc compatible sets quirks which disable DMA and forces the use of inefficient PIO mode. I need to determine the correct configuration for the SDMA and ADMA modes. - th1520-specific code is needed in dwcmshc_set_uhs_signaling() for MMC_TIMING_MMC_HS400. I have not figured out add proper way to make that code conditional so that it only runs on th1520. One method could be to add a th1520 flag to dwcmshc_priv but that seems like a hack. Alternatively, set_uhs_signaling in sdhci_dwcmshc_th1520_ops could point to a th1520-specific function, but that new function would have to duplicate all the code in the current dwcmshc_set_uhs_signaling(). NOTE: I combined schema, dts and driver patches into this one series to simplify review and testing of this RFC. References: [1] https://gist.github.com/pdp7/09995be1e30df0a04b9b9cd31420f9d5 [2] https://gist.github.com/pdp7/e4585311eb2cd27df7b50c87babc15fd [3] https://lore.kernel.org/linux-riscv/20230722-upstream-beaglev-ahead-dts-v2-0-a470ab8fe806@baylibre.com/ Changes in v2: - Expand dwcmshc_priv based on driver in the T-Head 5.10 kernel: delay_line, non_removable, pull_up_en, io_fixed_1v8 - New boolean property "thead,pull-up" indicates phy pull-up config - New boolean property "thead,io-fixed-1v8" indicates that io voltage should be set to 1.8V during reset - Add th1520_phy_1_8v_init() as voltage_switch op - Add th1520_execute_tuning() as the platform_execute_tuning op - Added th1520_sdhci_reset() as the .reset op. This function will set io voltage to 1.8V after calling the standard sdhci_reset() function. - Modified dwcmshc_set_uhs_signaling() to enable SDHCI_CTRL_VDD_180 when io_fixed_1v8 is true - Add many defines for register offsets and settings based on the mmc support in the T-Head downstream v5.10 kernel v1 series: https://lore.kernel.org/r/20230724-th1520-emmc-v1-0-cca1b2533da2@baylibre.com Signed-off-by: Drew Fustini <dfustini@baylibre.com> --- Drew Fustini (4): dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support 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 | 9 + arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 17 ++ arch/riscv/boot/dts/thead/th1520.dtsi | 17 ++ drivers/mmc/host/sdhci-of-dwcmshc.c | 336 +++++++++++++++++++++ 4 files changed, 379 insertions(+) --- base-commit: cb8c874afdc063290797ae1776a5d410fecb06cb change-id: 20230724-th1520-emmc-73cde98805d6 Best regards, -- Drew Fustini <dfustini@baylibre.com> _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2023-08-05 3:15 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-05 3:14 Drew Fustini [this message] 2023-08-05 3:14 ` [PATCH RFC v2 0/4] RISC-V: Add basic eMMC support for BeagleV Ahead Drew Fustini 2023-08-05 3:14 ` [PATCH RFC v2 1/4] dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support Drew Fustini 2023-08-05 3:14 ` Drew Fustini 2023-08-07 6:29 ` Krzysztof Kozlowski 2023-08-07 6:29 ` Krzysztof Kozlowski 2023-08-16 22:26 ` Drew Fustini 2023-08-16 22:26 ` Drew Fustini 2023-08-19 13:06 ` Krzysztof Kozlowski 2023-08-19 13:06 ` Krzysztof Kozlowski 2023-08-05 3:14 ` [PATCH RFC v2 2/4] riscv: dts: thead: Add TH1520 mmc controller and sdhci clock Drew Fustini 2023-08-05 3:14 ` Drew Fustini 2023-08-05 3:14 ` [PATCH RFC v2 3/4] riscv: dts: thead: Enable BeagleV Ahead eMMC controller Drew Fustini 2023-08-05 3:14 ` Drew Fustini 2023-08-05 3:14 ` [PATCH RFC v2 4/4] mmc: sdhci-of-dwcmshc: Add support for T-Head TH1520 Drew Fustini 2023-08-05 3:14 ` Drew Fustini 2023-08-06 10:09 ` Jisheng Zhang 2023-08-06 10:09 ` Jisheng Zhang 2023-08-16 21:17 ` Drew Fustini 2023-08-16 21:17 ` Drew Fustini 2023-08-17 23:32 ` Guo Ren 2023-08-17 23:32 ` Guo Ren 2023-08-28 4:40 ` [PATCH RFC v2 0/4] RISC-V: Add basic eMMC support for BeagleV Ahead Jiexun Wang 2023-08-28 4:40 ` Jiexun Wang 2023-08-28 15:05 ` Jisheng Zhang 2023-08-28 15:05 ` Jisheng Zhang 2023-08-29 1:56 ` Jiexun Wang 2023-08-29 1:56 ` Jiexun Wang 2023-08-29 15:19 ` Drew Fustini 2023-08-29 15:19 ` Drew Fustini 2023-09-04 14:53 ` Jisheng Zhang 2023-09-04 14:53 ` Jisheng Zhang
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-v2-0-132ed2e2171e@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: linkBe 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.