From patchwork Wed Aug 9 01:39:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 133026 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2514747vqr; Tue, 8 Aug 2023 19:15:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHypwBJhbwjYeouZVTZmKkqngBEwYoR3HV+B2AZiQVT7EeqdW6fFWKdwlvFIYiCe9rcClLP X-Received: by 2002:a17:90b:124f:b0:268:2f2:cc89 with SMTP id gx15-20020a17090b124f00b0026802f2cc89mr1171623pjb.4.1691547302951; Tue, 08 Aug 2023 19:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691547302; cv=none; d=google.com; s=arc-20160816; b=GTkz30q/GkkzqN9hnjbmk/Isj1iKB5GzVF28mKCjckHefJK+wpakmNk7B05FNHRcvh WBJ9wUUEj4BZKgcQ9ZAdCZZGsgLWJz/viEpPnerTqZsxubjLOTMRt9ehIZ43IEl6O2a8 ADGBDNCYiFE3KLiv00pMACuxo3YJfDzoDtjRB0Gzy4FOaGJ/qjHwnMwcDcZLZKeu/Krw MaTCusISmyrqupsCSqlQbntMu+bbhJro9VFt+7U860ySGf2QUYRb5lbkQuCugWQFPeW7 y4V/FqyVg2M645O7VhRDAJYI+HIaqZ9RlA4QU8zdAjGz/YAZLOFZSDATZb5ECGrmIwwI DSJA== 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=tOEvqz985w3zRPP186X2SKuOlLVOfh4SCbX82ftgdsA=; fh=HNft1qjYGTtm4ut+iSAbeLjVpAUBlSvCgiLgW/z78nw=; b=K7BhjU2sX9bCBdKUbY9TnHu+RWZHqwCCSUUJLtK7RnYJRfTgp1Thk/7jjaOWW889gK GE0F9SytVTlSGB3CLO+EnV56tnlhHDs8Dd5A1xymVUjs95xSX9t99fjJY7+8upt6qFoj JReONlq1lxqz1/dVfkpFQN/0ae42c0CWEaxrBjrYGQJExFqYanHhW5FoSZH5qV7209F5 Y8QU4BEx2G7SEZTKHsfQ/KCdY7yhypL0jpdqCVaAmaOSZHgRWgcc2WKnv22R91oR/Qvz OEKa9zwD1YEfGxzy1l73Zmphg43LJnMatpb5A0tGcI1jiH4+0q/F30GxO8p6d1acsuay eeeQ== 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 oj18-20020a17090b4d9200b00263cdc45e8bsi453711pjb.87.2023.08.08.19.14.50; Tue, 08 Aug 2023 19:15:02 -0700 (PDT) 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 S230135AbjHIBj0 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 8 Aug 2023 21:39:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbjHIBjZ (ORCPT ); Tue, 8 Aug 2023 21:39:25 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7471319AD; Tue, 8 Aug 2023 18:39:22 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id BCABB24E280; Wed, 9 Aug 2023 09:39:19 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 9 Aug 2023 09:39:19 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 9 Aug 2023 09:39:18 +0800 From: William Qiu To: , , CC: Emil Renner Berthing , Rob Herring , Krzysztof Kozlowski , Conor Dooley , William Qiu Subject: [PATCH v1 1/2] riscv: dts: starfive: enable DCDC1&ALDO4 node in axp15060 Date: Wed, 9 Aug 2023 09:39:16 +0800 Message-ID: <20230809013917.81674-2-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230809013917.81674-1-william.qiu@starfivetech.com> References: <20230809013917.81674-1-william.qiu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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: INBOX X-GMAIL-THRID: 1773715904830466124 X-GMAIL-MSGID: 1773715904830466124 Enable DCDC1 node for vmmc-supply and enable ALDO4 node for vqmmc-supply. Signed-off-by: William Qiu --- .../starfive/jh7110-starfive-visionfive-2.dtsi | 16 ++++++++++++++++ 1 file changed, 16 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 d2f3b9eb859b..d67e26b9c791 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -165,12 +165,28 @@ axp15060: pmic@36 { #interrupt-cells = <1>; regulators { + vcc_3v3: dcdc1 { + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc_3v3"; + }; + vdd_cpu: dcdc2 { regulator-always-on; regulator-min-microvolt = <500000>; regulator-max-microvolt = <1540000>; regulator-name = "vdd-cpu"; }; + + emmc_vdd: aldo4 { + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "emmc_vdd"; + }; }; }; }; From patchwork Wed Aug 9 01:39:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 133027 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2514878vqr; Tue, 8 Aug 2023 19:15:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOCOXsX+MMWYTknD/72A2lMPh0l7gQJQYP6Jb1HKlyp7RgX3jRPOUA3ICWbc5iCv0fG5nm X-Received: by 2002:a05:6a20:918d:b0:116:d935:f742 with SMTP id v13-20020a056a20918d00b00116d935f742mr1581118pzd.20.1691547326498; Tue, 08 Aug 2023 19:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691547326; cv=none; d=google.com; s=arc-20160816; b=HQYn8hHOnxsawvNcz6hhLxTn5LqYW3x0mKj0ymoPnXJOxN+3hHaTXgCQSYfEUpiLKV Z2kbj0UePVlAJXoVT5MytY+IpbBG/TduvXTqFJ1A/FnAT6X3bY0pQdeMaAD7u6Y6/mHS KW+t42nTR1jyssdhq2i5G/vNdDlgz+h0TyTDbdo+OmqkoHsWgxd05LbK0NcPh/7x/uHk 1TENVukNJ1z7ytAEkYhBP5gKK4r2R5z+z/tQhHntD37VFBbQjQJU/fzG3YcUTmy6+Kl+ jFWV1VW2IdvX71xv13511rjpEANRjOWJqFkBt87CmbuUTZUmkG7c5UBeICGsvFDRgT3g dOmA== 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=m+GS6zTHJC3nsDdt+poHvAax5dJeabgv8Tfe+rFn5os=; fh=HNft1qjYGTtm4ut+iSAbeLjVpAUBlSvCgiLgW/z78nw=; b=V9mTjXz65kqI3Zms5n7uRwa+mIC2gFXsEKwQ3iY4VSbzOpzb2wjNdUChoeowvQjRmE LC1axWCD6yFGc2u30gq6wzKfYsS8DkS3/9rLW9/Dmzi1GkiWwDT+1N3Yh2kccGHpRLD/ fcNs/hS3pjYXiINFp8VxihzWcoKxvDQcYgtNjjZ6J56tQQsmnig3A9gkL4aKnJop2uU9 f462v7B+2A/m5gBoymM5Qn85qQkgD2coJpZtmpCD8PzAJ2yvKt0FxP/VGV9TmhJxaSnF qu+vHQnUlTqLnU0WNdcehhelEuJXg9EaPav6Eqh+xS/Tmgldhbxq6ui4OWz9rKNX+jgD VK5w== 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 t16-20020a63eb10000000b0055acc7f805bsi8196203pgh.334.2023.08.08.19.15.14; Tue, 08 Aug 2023 19:15:26 -0700 (PDT) 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 S230353AbjHIBj1 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 8 Aug 2023 21:39:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbjHIBjZ (ORCPT ); Tue, 8 Aug 2023 21:39:25 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D0471982; Tue, 8 Aug 2023 18:39:22 -0700 (PDT) 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 8134724E293; Wed, 9 Aug 2023 09:39:20 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 9 Aug 2023 09:39:20 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 9 Aug 2023 09:39:19 +0800 From: William Qiu To: , , CC: Emil Renner Berthing , Rob Herring , Krzysztof Kozlowski , Conor Dooley , William Qiu Subject: [PATCH v1 2/2] riscv: dts: starfive: Add mmc nodes on VisionFive 2 board Date: Wed, 9 Aug 2023 09:39:17 +0800 Message-ID: <20230809013917.81674-3-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230809013917.81674-1-william.qiu@starfivetech.com> References: <20230809013917.81674-1-william.qiu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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: INBOX X-GMAIL-THRID: 1773715929813383815 X-GMAIL-MSGID: 1773715929813383815 Add the mmc nodes for the StarFive JH7110 SoC. Set mmc0 node to emmc and set mmc1 node to sd. Signed-off-by: William Qiu Reviewed-by: Hal Feng --- .../jh7110-starfive-visionfive-2.dtsi | 96 +++++++++++++++++++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 32 +++++++ 2 files changed, 128 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 d67e26b9c791..d79f94432b27 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -17,6 +17,8 @@ aliases { i2c2 = &i2c2; i2c5 = &i2c5; i2c6 = &i2c6; + mmc0 = &mmc0; + mmc1 = &mmc1; serial0 = &uart0; }; @@ -201,6 +203,35 @@ &i2c6 { status = "okay"; }; +&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>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins>; + vmmc-supply = <&vcc_3v3>; + vqmmc-supply = <&emmc_vdd>; + status = "okay"; +}; + +&mmc1 { + max-frequency = <100000000>; + bus-width = <4>; + no-sdio; + no-mmc; + broken-cd; + cap-sd-highspeed; + post-power-on-delay-ms = <200>; + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + status = "okay"; +}; + &qspi { #address-cells = <1>; #size-cells = <0>; @@ -306,6 +337,71 @@ GPOEN_SYS_I2C6_DATA, }; }; + mmc0_pins: mmc0-0 { + rst-pins { + pinmux = ; + bias-pull-up; + drive-strength = <12>; + input-disable; + input-schmitt-disable; + slew-rate = <0>; + }; + + mmc-pins { + pinmux = , + , + , + , + , + , + , + , + , + ; + bias-pull-up; + drive-strength = <12>; + input-enable; + }; + }; + + mmc1_pins: mmc1-0 { + clk-pins { + pinmux = ; + bias-pull-up; + drive-strength = <12>; + input-disable; + input-schmitt-disable; + slew-rate = <0>; + }; + + mmc-pins { + pinmux = , + , + , + , + ; + bias-pull-up; + drive-strength = <12>; + input-enable; + input-schmitt-enable; + slew-rate = <0>; + }; + }; + spi0_pins: spi0-0 { mosi-pins { pinmux = ; }; + 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 = <&sys_syscon 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 = <&sys_syscon 0x9c 0x1 0x3e>; + status = "disabled"; + }; + gmac0: ethernet@16030000 { compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20"; reg = <0x0 0x16030000 0x0 0x10000>;