Message ID | 20230203081913.81968-4-william.qiu@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp711063wrn; Fri, 3 Feb 2023 00:22:55 -0800 (PST) X-Google-Smtp-Source: AK7set+HAv3ivRdqC/rE/H06hBEkfVdklZB7zzOg0rS6j9azRgZ6H38Qurfep/HmQd6UpGgJCjcv X-Received: by 2002:a17:906:2ad4:b0:871:dd2:4af0 with SMTP id m20-20020a1709062ad400b008710dd24af0mr9411040eje.26.1675412575431; Fri, 03 Feb 2023 00:22:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675412575; cv=none; d=google.com; s=arc-20160816; b=kjSi4IJuazDZC0H+o9gZGIEryXtMiG9usW+52FUlxIPHvAbOG03igGHjcH99mK+Q+9 ynNPH9BQKRINYQAr9nPkwuI1mzMBLSI6cG/DTp9YvsJJ/dR8/bW1hhbEgB6e7BsAIb+M 2/47z1qJVVjeGAPSPEaifYarNYu4zpE6A12R6Z0PMH2rvgthI1cjDuAaTwyLPGm3j8fZ Gdwo/dSlxe16fN52yXOs32EywDz0VIT73mRNZmctUFULsCUa7qDW4ytnG7Ay4XyqdtTH p7Cw5rbJI6JwxOT1KH5EelqBqXtO4M1XHqR8T+foLzLc6umZ9R5aA4L873MW3yLHyTb/ QglQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mYhwjNYDVkrdpeu4mWw6V339ORRL5bq+HhGy8dQ1hrk=; b=GjOoMcBPIJfueTaKiNkaqeebFwkIQYjkwO03VWHjj/cHY7doX6YMwNaSoi/un2DF8G 63+z+vuHZh3Mu+jL6wAxI/NuCtiUW/SwEE+7i4XbCGbWwHaztnhCo4IoO2CmXu37k2u7 lrzzpNBFQ/xyh8BE08p1pkl9w+mk/FfSohpo8omqSjxxuUbEobbE+SEOx+WLVq+n4d5h tNGLUj1+HOoWYlAif6XkDv+rbsY2AFLsABRy1d91+BgEys3TPcMOecHFRVzHclyskMBq 8bR3P/YTozdrNnb6WySSMmq2ZfSsWN1UO2k0WMFLjku1wuRjyLGVWc+B0tgklRdUeP8U kA3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 15-20020a17090602cf00b0088b3b09e143si2790096ejk.593.2023.02.03.00.22.32; Fri, 03 Feb 2023 00:22:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232904AbjBCIVe convert rfc822-to-8bit (ORCPT <rfc822;il.mystafa@gmail.com> + 99 others); Fri, 3 Feb 2023 03:21:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232749AbjBCIVK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Feb 2023 03:21:10 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 184DB6DB2E; Fri, 3 Feb 2023 00:19:43 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id B102024E28F; Fri, 3 Feb 2023 16:19:16 +0800 (CST) Received: from EXMBX168.cuchost.com (172.16.6.78) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 3 Feb 2023 16:19:16 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX168.cuchost.com (172.16.6.78) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 3 Feb 2023 16:19:15 +0800 From: William Qiu <william.qiu@starfivetech.com> To: <linux-riscv@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-mmc@vger.kernel.org> CC: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Jaehoon Chung <jh80.chung@samsung.com>, Ulf Hansson <ulf.hansson@linaro.org>, William Qiu <william.qiu@starfivetech.com>, <linux-kernel@vger.kernel.org> Subject: [PATCH v3 3/3] riscv: dts: starfive: Add mmc node Date: Fri, 3 Feb 2023 16:19:13 +0800 Message-ID: <20230203081913.81968-4-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230203081913.81968-1-william.qiu@starfivetech.com> References: <20230203081913.81968-1-william.qiu@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX168.cuchost.com (172.16.6.78) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756797416575790424?= X-GMAIL-MSGID: =?utf-8?q?1756797416575790424?= |
Series |
StarFive's SDIO/eMMC driver support
|
|
Commit Message
William Qiu
Feb. 3, 2023, 8:19 a.m. UTC
This adds the mmc node for the StarFive JH7110 SoC.
Set mmco node to emmc and set mmc1 node to sd.
Signed-off-by: William Qiu <william.qiu@starfivetech.com>
---
.../jh7110-starfive-visionfive-2.dtsi | 23 ++++++++++++
arch/riscv/boot/dts/starfive/jh7110.dtsi | 37 +++++++++++++++++++
2 files changed, 60 insertions(+)
Comments
On 03/02/2023 09:19, William Qiu wrote: > This adds the mmc node for the StarFive JH7110 SoC. Do not use "This xxx". Use imperative mode. https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95 > Set mmco node to emmc and set mmc1 node to sd. > > Signed-off-by: William Qiu <william.qiu@starfivetech.com> > + > &gmac0_rmii_refin { > clock-frequency = <50000000>; > }; > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi > index 64d260ea1f29..ae1a664e7af5 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > @@ -370,6 +370,11 @@ syscrg: clock-controller@13020000 { > #reset-cells = <1>; > }; > > + sysreg: syscon@13030000 { > + compatible = "starfive,sysreg", "syscon"; No: 1. Undocumented. 2. A bit too generic. You should have here SoC specific compatible as well (either as second or third compatible, if all your SoCs share register layout). > + reg = <0x0 0x13030000 0x0 0x1000>; > + }; > + Best regards, Krzysztof
On 2023/2/3 17:02, Krzysztof Kozlowski wrote: > On 03/02/2023 09:19, William Qiu wrote: >> This adds the mmc node for the StarFive JH7110 SoC. > > Do not use "This xxx". Use imperative mode. > https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95 > >> Set mmco node to emmc and set mmc1 node to sd. >> >> Signed-off-by: William Qiu <william.qiu@starfivetech.com> > > >> + >> &gmac0_rmii_refin { >> clock-frequency = <50000000>; >> }; >> diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi >> index 64d260ea1f29..ae1a664e7af5 100644 >> --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi >> +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi >> @@ -370,6 +370,11 @@ syscrg: clock-controller@13020000 { >> #reset-cells = <1>; >> }; >> >> + sysreg: syscon@13030000 { >> + compatible = "starfive,sysreg", "syscon"; > > No: > 1. Undocumented. > 2. A bit too generic. You should have here SoC specific compatible as > well (either as second or third compatible, if all your SoCs share > register layout). > Hi Krzysztof, As for the compatible, I will change it to "starfive,jh7110-sysreg" in next version,but for undocumented, I don't get it, can you clarify that. Thank you anyway. Best regards, William Qiu >> + reg = <0x0 0x13030000 0x0 0x1000>; >> + }; >> + > > Best regards, > Krzysztof >
On 03/02/2023 10:23, William Qiu wrote: > > > On 2023/2/3 17:02, Krzysztof Kozlowski wrote: >> On 03/02/2023 09:19, William Qiu wrote: >>> This adds the mmc node for the StarFive JH7110 SoC. >> >> Do not use "This xxx". Use imperative mode. >> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95 >> >>> Set mmco node to emmc and set mmc1 node to sd. >>> >>> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >> >> >>> + >>> &gmac0_rmii_refin { >>> clock-frequency = <50000000>; >>> }; >>> diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi >>> index 64d260ea1f29..ae1a664e7af5 100644 >>> --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi >>> +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi >>> @@ -370,6 +370,11 @@ syscrg: clock-controller@13020000 { >>> #reset-cells = <1>; >>> }; >>> >>> + sysreg: syscon@13030000 { >>> + compatible = "starfive,sysreg", "syscon"; >> >> No: >> 1. Undocumented. >> 2. A bit too generic. You should have here SoC specific compatible as >> well (either as second or third compatible, if all your SoCs share >> register layout). >> > > Hi Krzysztof, > > As for the compatible, I will change it to "starfive,jh7110-sysreg" > in next version,but for undocumented, I don't get it, can you > clarify that. > Thank you anyway. You need bindings for it. I don't see it in linux-next, cover letter dependencies nor here. Best regards, Krzysztof
On 2023/2/3 17:30, Krzysztof Kozlowski wrote: > On 03/02/2023 10:23, William Qiu wrote: >> >> >> On 2023/2/3 17:02, Krzysztof Kozlowski wrote: >>> On 03/02/2023 09:19, William Qiu wrote: >>>> This adds the mmc node for the StarFive JH7110 SoC. >>> >>> Do not use "This xxx". Use imperative mode. >>> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95 >>> >>>> Set mmco node to emmc and set mmc1 node to sd. >>>> >>>> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >>> >>> >>>> + >>>> &gmac0_rmii_refin { >>>> clock-frequency = <50000000>; >>>> }; >>>> diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi >>>> index 64d260ea1f29..ae1a664e7af5 100644 >>>> --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi >>>> +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi >>>> @@ -370,6 +370,11 @@ syscrg: clock-controller@13020000 { >>>> #reset-cells = <1>; >>>> }; >>>> >>>> + sysreg: syscon@13030000 { >>>> + compatible = "starfive,sysreg", "syscon"; >>> >>> No: >>> 1. Undocumented. >>> 2. A bit too generic. You should have here SoC specific compatible as >>> well (either as second or third compatible, if all your SoCs share >>> register layout). >>> >> >> Hi Krzysztof, >> >> As for the compatible, I will change it to "starfive,jh7110-sysreg" >> in next version,but for undocumented, I don't get it, can you >> clarify that. >> Thank you anyway. > > You need bindings for it. I don't see it in linux-next, cover letter > dependencies nor here. > I see, I will update it in next version. Thank you for taking time to review and provide helpful comments for this patch. Best regards, William Qiu > Best regards, > Krzysztof >
On Fri, 3 Feb 2023 at 09:21, William Qiu <william.qiu@starfivetech.com> wrote: > > This adds the mmc node for the StarFive JH7110 SoC. > Set mmco node to emmc and set mmc1 node to sd. > > Signed-off-by: William Qiu <william.qiu@starfivetech.com> > --- > .../jh7110-starfive-visionfive-2.dtsi | 23 ++++++++++++ > arch/riscv/boot/dts/starfive/jh7110.dtsi | 37 +++++++++++++++++++ > 2 files changed, 60 insertions(+) > > diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi > index c60280b89c73..e1a0248e907f 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi > @@ -42,6 +42,29 @@ &rtc_osc { > clock-frequency = <32768>; > }; > > +&mmc0 { > + max-frequency = <100000000>; > + bus-width = <8>; > + cap-mmc-highspeed; > + mmc-ddr-1_8v; > + mmc-hs200-1_8v; > + non-removable; > + cap-mmc-hw-reset; > + post-power-on-delay-ms = <200>; > + status = "okay"; > +}; > + > +&mmc1 { > + max-frequency = <100000000>; > + bus-width = <4>; > + no-sdio;ru > + no-mmc; > + broken-cd; > + cap-sd-highspeed; > + post-power-on-delay-ms = <200>; > + status = "okay"; > +}; Please add these so they're sorted alphabetically (but keep the clocks at the top), so there's at least some sort of system. > &gmac0_rmii_refin { > clock-frequency = <50000000>; > }; > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi > index 64d260ea1f29..ae1a664e7af5 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > @@ -370,6 +370,11 @@ syscrg: clock-controller@13020000 { > #reset-cells = <1>; > }; > > + sysreg: syscon@13030000 { > + compatible = "starfive,sysreg", "syscon"; > + reg = <0x0 0x13030000 0x0 0x1000>; > + }; > + > gpio: gpio@13040000 { > compatible = "starfive,jh7110-sys-pinctrl"; > reg = <0x0 0x13040000 0x0 0x10000>; > @@ -407,5 +412,37 @@ gpioa: gpio@17020000 { > gpio-controller; > #gpio-cells = <2>; > }; > + > + mmc0: mmc@16010000 { > + compatible = "starfive,jh7110-mmc"; > + reg = <0x0 0x16010000 0x0 0x10000>; > + clocks = <&syscrg JH7110_SYSCLK_SDIO0_AHB>, > + <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>; > + clock-names = "biu","ciu"; > + resets = <&syscrg JH7110_SYSRST_SDIO0_AHB>; > + reset-names = "reset"; > + interrupts = <74>; > + fifo-depth = <32>; > + fifo-watermark-aligned; > + data-addr = <0>; > + starfive,sysreg = <&sysreg 0x14 0x1a 0x7c000000>; This may need updating depending on whether you fix the driver or bindings. > + status = "disabled"; > + }; > + > + mmc1: mmc@16020000 { > + compatible = "starfive,jh7110-mmc"; > + reg = <0x0 0x16020000 0x0 0x10000>; > + clocks = <&syscrg JH7110_SYSCLK_SDIO1_AHB>, > + <&syscrg JH7110_SYSCLK_SDIO1_SDCARD>; > + clock-names = "biu","ciu"; > + resets = <&syscrg JH7110_SYSRST_SDIO1_AHB>; > + reset-names = "reset"; > + interrupts = <75>; > + fifo-depth = <32>; > + fifo-watermark-aligned; > + data-addr = <0>; > + starfive,sysreg = <&sysreg 0x9c 0x1 0x3e>; > + status = "disabled"; > + }; > }; > }; > -- > 2.34.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
On 2023/2/15 18:31, Emil Renner Berthing wrote: > On Fri, 3 Feb 2023 at 09:21, William Qiu <william.qiu@starfivetech.com> wrote: >> >> This adds the mmc node for the StarFive JH7110 SoC. >> Set mmco node to emmc and set mmc1 node to sd. >> >> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >> --- >> .../jh7110-starfive-visionfive-2.dtsi | 23 ++++++++++++ >> arch/riscv/boot/dts/starfive/jh7110.dtsi | 37 +++++++++++++++++++ >> 2 files changed, 60 insertions(+) >> >> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi >> index c60280b89c73..e1a0248e907f 100644 >> --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi >> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi >> @@ -42,6 +42,29 @@ &rtc_osc { >> clock-frequency = <32768>; >> }; >> >> +&mmc0 { >> + max-frequency = <100000000>; >> + bus-width = <8>; >> + cap-mmc-highspeed; >> + mmc-ddr-1_8v; >> + mmc-hs200-1_8v; >> + non-removable; >> + cap-mmc-hw-reset; >> + post-power-on-delay-ms = <200>; >> + status = "okay"; >> +}; >> + >> +&mmc1 { >> + max-frequency = <100000000>; >> + bus-width = <4>; >> + no-sdio;ru >> + no-mmc; >> + broken-cd; >> + cap-sd-highspeed; >> + post-power-on-delay-ms = <200>; >> + status = "okay"; >> +}; > > Please add these so they're sorted alphabetically (but keep the clocks > at the top), so there's at least some sort of system. > >> &gmac0_rmii_refin { >> clock-frequency = <50000000>; >> }; >> diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi >> index 64d260ea1f29..ae1a664e7af5 100644 >> --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi >> +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi >> @@ -370,6 +370,11 @@ syscrg: clock-controller@13020000 { >> #reset-cells = <1>; >> }; >> >> + sysreg: syscon@13030000 { >> + compatible = "starfive,sysreg", "syscon"; >> + reg = <0x0 0x13030000 0x0 0x1000>; >> + }; >> + >> gpio: gpio@13040000 { >> compatible = "starfive,jh7110-sys-pinctrl"; >> reg = <0x0 0x13040000 0x0 0x10000>; >> @@ -407,5 +412,37 @@ gpioa: gpio@17020000 { >> gpio-controller; >> #gpio-cells = <2>; >> }; >> + >> + mmc0: mmc@16010000 { >> + compatible = "starfive,jh7110-mmc"; >> + reg = <0x0 0x16010000 0x0 0x10000>; >> + clocks = <&syscrg JH7110_SYSCLK_SDIO0_AHB>, >> + <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>; >> + clock-names = "biu","ciu"; >> + resets = <&syscrg JH7110_SYSRST_SDIO0_AHB>; >> + reset-names = "reset"; >> + interrupts = <74>; >> + fifo-depth = <32>; >> + fifo-watermark-aligned; >> + data-addr = <0>; >> + starfive,sysreg = <&sysreg 0x14 0x1a 0x7c000000>; > > This may need updating depending on whether you fix the driver or bindings. > I'll do it then >> + status = "disabled"; >> + }; >> + >> + mmc1: mmc@16020000 { >> + compatible = "starfive,jh7110-mmc"; >> + reg = <0x0 0x16020000 0x0 0x10000>; >> + clocks = <&syscrg JH7110_SYSCLK_SDIO1_AHB>, >> + <&syscrg JH7110_SYSCLK_SDIO1_SDCARD>; >> + clock-names = "biu","ciu"; >> + resets = <&syscrg JH7110_SYSRST_SDIO1_AHB>; >> + reset-names = "reset"; >> + interrupts = <75>; >> + fifo-depth = <32>; >> + fifo-watermark-aligned; >> + data-addr = <0>; >> + starfive,sysreg = <&sysreg 0x9c 0x1 0x3e>; >> + status = "disabled"; >> + }; >> }; >> }; >> -- >> 2.34.1 >> >> >> _______________________________________________ >> linux-riscv mailing list >> linux-riscv@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-riscv
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index c60280b89c73..e1a0248e907f 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -42,6 +42,29 @@ &rtc_osc { clock-frequency = <32768>; }; +&mmc0 { + max-frequency = <100000000>; + bus-width = <8>; + cap-mmc-highspeed; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + non-removable; + cap-mmc-hw-reset; + post-power-on-delay-ms = <200>; + status = "okay"; +}; + +&mmc1 { + max-frequency = <100000000>; + bus-width = <4>; + no-sdio; + no-mmc; + broken-cd; + cap-sd-highspeed; + post-power-on-delay-ms = <200>; + status = "okay"; +}; + &gmac0_rmii_refin { clock-frequency = <50000000>; }; diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index 64d260ea1f29..ae1a664e7af5 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -370,6 +370,11 @@ syscrg: clock-controller@13020000 { #reset-cells = <1>; }; + sysreg: syscon@13030000 { + compatible = "starfive,sysreg", "syscon"; + reg = <0x0 0x13030000 0x0 0x1000>; + }; + gpio: gpio@13040000 { compatible = "starfive,jh7110-sys-pinctrl"; reg = <0x0 0x13040000 0x0 0x10000>; @@ -407,5 +412,37 @@ gpioa: gpio@17020000 { gpio-controller; #gpio-cells = <2>; }; + + mmc0: mmc@16010000 { + compatible = "starfive,jh7110-mmc"; + reg = <0x0 0x16010000 0x0 0x10000>; + clocks = <&syscrg JH7110_SYSCLK_SDIO0_AHB>, + <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>; + clock-names = "biu","ciu"; + resets = <&syscrg JH7110_SYSRST_SDIO0_AHB>; + reset-names = "reset"; + interrupts = <74>; + fifo-depth = <32>; + fifo-watermark-aligned; + data-addr = <0>; + starfive,sysreg = <&sysreg 0x14 0x1a 0x7c000000>; + status = "disabled"; + }; + + mmc1: mmc@16020000 { + compatible = "starfive,jh7110-mmc"; + reg = <0x0 0x16020000 0x0 0x10000>; + clocks = <&syscrg JH7110_SYSCLK_SDIO1_AHB>, + <&syscrg JH7110_SYSCLK_SDIO1_SDCARD>; + clock-names = "biu","ciu"; + resets = <&syscrg JH7110_SYSRST_SDIO1_AHB>; + reset-names = "reset"; + interrupts = <75>; + fifo-depth = <32>; + fifo-watermark-aligned; + data-addr = <0>; + starfive,sysreg = <&sysreg 0x9c 0x1 0x3e>; + status = "disabled"; + }; }; };