From patchwork Mon Jan 30 19:11:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 50439 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2350380wrn; Mon, 30 Jan 2023 11:13:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXs6X4ZAjZ2d+BSVIQriMgNc2JsVqLyXGFh7M+/QvVqXedJ3cOBR4pvlHxF34hc69GzmyhSQ X-Received: by 2002:a17:906:5417:b0:877:5dbc:da84 with SMTP id q23-20020a170906541700b008775dbcda84mr43175013ejo.72.1675106011609; Mon, 30 Jan 2023 11:13:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675106011; cv=none; d=google.com; s=arc-20160816; b=vGmCp3jpoRIIxd7fpM7aut2n4+FmVo8texbW558lpOogAzY+WH/slonLyLCS2BwQsO JfgBXuFJ8qjPTW//d1mPY+5PW7Gtxa8Hl0TLKi0c5sQcg411kqkhb40jBA4KwSJNWvTJ BCAQhsNWl4Bo1uykXsDsmLYT17uIvKLi8X9MdWzBsnj+6UpSb7D5B2ARVhzV87joM8ET 1u8QXAI1U/SD11TMyH08G7PCNd0CYJkJWPa54+x9WE8l23XEGQYP9R2y28Dcwgy0fKdV U4ZR1UFjKTU4eYmSoYEP8CP2bzHDMCsqgMHiE1ZkmTo6ev9sMgseDlom7nPPe0NeN3Ui tMAA== 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 :message-id:date:subject:cc:to:from; bh=dHFOPmEFUmCXIsVjVbGW4qPYQ2zBQud14WJRCsoe1JM=; b=dl2RNTNLYez7VIqmjgPt/9hNxumMWZb05YlozvPu/56UA6v/nmJn6RHKAU5Ywl+FGa KpyQhAbntB2lrPMlXVep6vpdM3cV5/00WVf4TEZRGriQVzkc7Mpt8OoucCsphCjJf3b7 XBot6/0oYAp0C8MKL2Yq5r+Wg8AW8tSZKnt0N2j2+9pytSk3OjkTYtWA2jF5WQaWcIYh hWavC39Fyr19dyiXzvZD4l+/HyK/qQOGpAkqUhnVLZP8m8NPEMzZf1+4jKK/Cr44LTUP u6GxqGNagmQp7V7oB25IWnrzu0MNkQVXu/4ZWDxzLw0kVsNuzAlKp4ak62ImJkkzoime NIVg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a17090668ce00b0084d1a0d90cdsi15586956ejr.674.2023.01.30.11.13.08; Mon, 30 Jan 2023 11:13:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238218AbjA3TMR (ORCPT + 99 others); Mon, 30 Jan 2023 14:12:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237950AbjA3TML (ORCPT ); Mon, 30 Jan 2023 14:12:11 -0500 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 05CB930D9; Mon, 30 Jan 2023 11:11:59 -0800 (PST) X-IronPort-AV: E=Sophos;i="5.97,258,1669042800"; d="scan'208";a="147890848" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 31 Jan 2023 04:11:59 +0900 Received: from mulinux.home (unknown [10.226.92.190]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id D70FF4003FDC; Tue, 31 Jan 2023 04:11:55 +0900 (JST) From: Fabrizio Castro To: Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven Cc: Fabrizio Castro , Magnus Damm , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Paterson , Biju Das , Laurent Pinchart , Jacopo Mondi Subject: [PATCH v2] arm64: dts: renesas: v2mevk2: Add uSD card and eMMC support Date: Mon, 30 Jan 2023 19:11:52 +0000 Message-Id: <20230130191152.182826-1-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.5 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, LOTS_OF_MONEY,SPF_HELO_NONE,SPF_PASS autolearn=no 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?1756475960736279176?= X-GMAIL-MSGID: =?utf-8?q?1756475960736279176?= The RZ/V2M EVK comes with a slot for a uSD card, and an eMMC. Add support for the both of them. Please note that the pinctrl driver for RZ/V2M doesn't support interrupts yet, therefore the card detect pin has been connected to the SDHI IP directly in this patch. We'll connect the card detect pin to its corresponding GPIO when we'll have driver support for interrupts in the RZ/V2M pinctrl driver. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven --- v1->v2: Add properties no-sd; and no-sdio; to emmc node Moved emmc_pins to respect sort order Added Reviewed-by: Geert Uytterhoeven .../boot/dts/renesas/r9a09g011-v2mevk2.dts | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts index d6737395df67..36a2afeb6c74 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts +++ b/arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts @@ -7,6 +7,7 @@ /dts-v1/; #include "r9a09g011.dtsi" +#include #include / { @@ -35,6 +36,36 @@ memory@180000000 { device_type = "memory"; reg = <0x1 0x80000000 0x0 0x80000000>; }; + + reg_1v8: regulator-1v8 { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3v3: regulator-3v3 { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + vccq_sdhi0: regulator-vccq-sdhi0 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI0 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&pwc 0 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 0>, <1800000 1>; + }; }; &avb { @@ -50,6 +81,24 @@ phy0: ethernet-phy@0 { }; }; +&emmc { + pinctrl-0 = <&emmc_pins>; + pinctrl-1 = <&emmc_pins>; + pinctrl-names = "default", "state_uhs"; + + vmmc-supply = <®_3v3>; + vqmmc-supply = <®_1v8>; + bus-width = <8>; + mmc-hs200-1_8v; + no-sd; + no-sdio; + non-removable; + fixed-emmc-driver-type = <1>; + max-frequency = <200000000>; + status = "okay"; +}; + + &extal_clk { clock-frequency = <48000000>; }; @@ -69,6 +118,26 @@ &i2c2 { }; &pinctrl { + emmc_pins: emmc { + emmc_pins_data { + pinmux = , /* MMDAT0 */ + , /* MMDAT1 */ + , /* MMDAT2 */ + , /* MMDAT3 */ + , /* MMDAT4 */ + , /* MMDAT5 */ + , /* MMDAT6 */ + ; /* MMDAT7 */ + power-source = <1800>; + }; + + emmc_pins_ctrl { + pinmux = , /* MMCMD */ + ; /* MMCLK */ + power-source = <1800>; + }; + }; + i2c0_pins: i2c0 { pinmux = , /* SDA */ ; /* SCL */ @@ -78,6 +147,48 @@ i2c2_pins: i2c2 { pinmux = , /* SDA */ ; /* SCL */ }; + + sdhi0_pins: sd0 { + sd0_data { + pinmux = , /* SD0DAT0 */ + , /* SD0DAT1 */ + , /* SD0DAT2 */ + ; /* SD0DAT3 */ + power-source = <3300>; + }; + + sd0_ctrl { + pinmux = , /* SD0CMD */ + ; /* SD0CLK */ + power-source = <3300>; + }; + + sd0_cd { + pinmux = ; /* SD0CD */ + power-source = <3300>; + }; + }; + + sdhi0_pins_uhs: sd0_uhs { + sd0_data_uhs { + pinmux = , /* SD0DAT0 */ + , /* SD0DAT1 */ + , /* SD0DAT2 */ + ; /* SD0DAT3 */ + power-source = <1800>; + }; + + sd0_ctrl_uhs { + pinmux = , /* SD0CMD */ + ; /* SD0CLK */ + power-source = <1800>; + }; + + sd0_cd_uhs { + pinmux = ; /* SD0CD */ + power-source = <1800>; + }; + }; }; &pwc { @@ -85,6 +196,19 @@ &pwc { status = "okay"; }; +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-1 = <&sdhi0_pins_uhs>; + pinctrl-names = "default", "state_uhs"; + + vmmc-supply = <®_3v3>; + vqmmc-supply = <&vccq_sdhi0>; + bus-width = <4>; + sd-uhs-sdr50; + sd-uhs-sdr104; + status = "okay"; +}; + &uart0 { status = "okay"; };