From patchwork Fri Feb 3 08:19:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 52407 Return-Path: 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 + 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 ); 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 To: , , CC: Rob Herring , Krzysztof Kozlowski , Jaehoon Chung , Ulf Hansson , William Qiu , 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 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 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: 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?= 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 --- .../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; + 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"; + }; }; };