[v6,6/7] riscv: dts: thead: Enable BeagleV Ahead eMMC and microSD

Message ID 20231114-th1520-mmc-v6-6-3273c661a571@baylibre.com
State New
Headers
Series RISC-V: Add MMC support for TH1520 boards |

Commit Message

Drew Fustini Nov. 14, 2023, 9:08 p.m. UTC
  Add mmc0 properties for the eMMC device and add mmc1 properties for
the microSD slot. Set the frequency for the sdhci clock.

Signed-off-by: Drew Fustini <dfustini@baylibre.com>
---
 arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
  

Comments

Conor Dooley Nov. 14, 2023, 9:24 p.m. UTC | #1
On Tue, Nov 14, 2023 at 04:08:00PM -0500, Drew Fustini wrote:

> +&mmc0 {
> +	bus-width = <8>;
> +	max-frequency = <198000000>;

> +&mmc1 {
> +	max-frequency = <198000000>;
> +	bus-width = <4>;

If there's another iteration of this patchset, can you use a consistent
ordering for your properties please?

Cheers,
Conor.
  
Drew Fustini Nov. 14, 2023, 10:24 p.m. UTC | #2
On Tue, Nov 14, 2023 at 09:24:40PM +0000, Conor Dooley wrote:
> On Tue, Nov 14, 2023 at 04:08:00PM -0500, Drew Fustini wrote:
> 
> > +&mmc0 {
> > +	bus-width = <8>;
> > +	max-frequency = <198000000>;
> 
> > +&mmc1 {
> > +	max-frequency = <198000000>;
> > +	bus-width = <4>;
> 
> If there's another iteration of this patchset, can you use a consistent
> ordering for your properties please?

Bah, I don't know how I missed that. Thanks for spotting that. I'll fix
it if there is another rev. I still need to see if Jisheng's is okay
with the most recent changes in the driver patch.

Drew
  

Patch

diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
index 70e8042c8304..f91d94f95510 100644
--- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
+++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
@@ -48,6 +48,10 @@  &apb_clk {
 	clock-frequency = <62500000>;
 };
 
+&sdhci_clk {
+	clock-frequency = <198000000>;
+};
+
 &uart_sclk {
 	clock-frequency = <100000000>;
 };
@@ -56,6 +60,22 @@  &dmac0 {
 	status = "okay";
 };
 
+&mmc0 {
+	bus-width = <8>;
+	max-frequency = <198000000>;
+	mmc-hs400-1_8v;
+	non-removable;
+	no-sdio;
+	no-sd;
+	status = "okay";
+};
+
+&mmc1 {
+	max-frequency = <198000000>;
+	bus-width = <4>;
+	status = "okay";
+};
+
 &uart0 {
 	status = "okay";
 };