From patchwork Mon Nov 5 21:41:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 10669249 X-Patchwork-Delegate: horms@verge.net.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 990F51709 for ; Mon, 5 Nov 2018 21:41:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9480329E4B for ; Mon, 5 Nov 2018 21:41:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8842429E64; Mon, 5 Nov 2018 21:41:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0920E29E54 for ; Mon, 5 Nov 2018 21:41:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387683AbeKFHDL (ORCPT ); Tue, 6 Nov 2018 02:03:11 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34157 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387580AbeKFHDL (ORCPT ); Tue, 6 Nov 2018 02:03:11 -0500 Received: by mail-wr1-f67.google.com with SMTP id j26-v6so11211979wre.1; Mon, 05 Nov 2018 13:41:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LXDzffOVer+kbCQixI2LnSQ8+SUb/06qPeuETZnXSMc=; b=GuCRrLwbZpkXZtlQ9x/IGuI6+wplnOSQmb80vn/LEuUO9taPyYrLlRiH+hS/Ip0Y7/ BcSQDHD6sHGB+7ZRrrc/bhzX4GjHH3yP23ab2wrfohgvlSfl2VVLNbD1r/ErHR5v4VY2 CKUlO1Fat30kluSaKl6icRbelCyKtCy/a3fuw5FrGNo69yCqpuVbk8CZ+ilEnCvj1Jz5 UV2NEHxyB+gTxJsq+Hk1sk9N/MsL2hA8yuPD+8p+o6JaU+22/tm38hKAAs1+/omJDkea Us+ODHyCX83cHgLrq3QU7KRvEIqdsirqOfAcjrSUCerWSGPsbhCAsLr2/PAvMynVVHD0 w69w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LXDzffOVer+kbCQixI2LnSQ8+SUb/06qPeuETZnXSMc=; b=I3se/tcLnd5RJXbjAMzTWb/KBFOS6UpxrF89qA9c6TfKtPtQaH4Aglp6rZj/3y8Guz DEJoUxyi98mkwVb2Y6uslZ4o2aN5derDDsKsonabpYbA8a87uz3LwywGyEPyTuxbhNk3 W3XKQChUQx1EYX5drH8LuO0+w8UI5+9HxNzibhO4X6EizAFQdEi/CiBCSMnTqv2/CZfG BZZjCfgxIb1ffkyH1O0qAJ9/z6v3EAAsDG9q2hu7ojqplpb5zKwSkGKd5Lr7CYMSsSWD sr+9ZnQiMk8CsAy9hxgrohNhoZyBelqhGcOLpmZHFNWwN2cS61Sc0hPY/4IVHYfbL2qs LaQQ== X-Gm-Message-State: AGRZ1gK277MS3zXdIKGLYyxnF9pkrDvIU5QFYpX4NtzYnKNUK1FsZB5J Qjz84lJVqIuBfk/9pgwwmlVVzxuK X-Google-Smtp-Source: AJdET5d/zB4uOH9wNHxK0wtitrjCiHOUuIcTZW1eKV2zmg2pyA/IjeLGvvi2fEsdVnV5rF512PdlHQ== X-Received: by 2002:adf:d181:: with SMTP id h1-v6mr21130485wri.138.1541454085580; Mon, 05 Nov 2018 13:41:25 -0800 (PST) Received: from kurokawa.lan (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id b5-v6sm29055951wrs.34.2018.11.05.13.41.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 13:41:24 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: devicetree@vger.kernel.org Cc: Takeshi Kihara , Marek Vasut , Geert Uytterhoeven , Simon Horman , Wolfram Sang , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] arm64: dts: r8a77990: ebisu: Enable SDHI interfaces Date: Mon, 5 Nov 2018 22:41:17 +0100 Message-Id: <20181105214117.11734-2-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181105214117.11734-1-marek.vasut+renesas@gmail.com> References: <20181105214117.11734-1-marek.vasut+renesas@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Takeshi Kihara This patch enables SD card slot connected to SDHI0, micro SD card slot connected to SDHI1 and eMMC connected to SDHI3 on the Ebisu board using the R8A77990 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Simon Horman Cc: Wolfram Sang Cc: Yoshihiro Shimoda Cc: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Yoshihiro Shimoda --- .../arm64/boot/dts/renesas/r8a77990-ebisu.dts | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts index 611f0265fcc5..bda1765dcdbd 100644 --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts @@ -119,6 +119,15 @@ }; }; + reg_1p8v: regulator0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + reg_3p3v: regulator1 { compatible = "regulator-fixed"; regulator-name = "fixed-3.3V"; @@ -133,6 +142,54 @@ #clock-cells = <0>; clock-frequency = <74250000>; }; + + vcc_sdhi0: regulator-vcc-sdhi0 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI0 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio5 17 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi0: regulator-vccq-sdhi0 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI0 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + + vcc_sdhi1: regulator-vcc-sdhi1 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI1 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vccq_sdhi1: regulator-vccq-sdhi1 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI1 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; }; &avb { @@ -326,6 +383,42 @@ function = "scif2"; }; + sdhi0_pins: sd0 { + groups = "sdhi0_data4", "sdhi0_ctrl"; + function = "sdhi0"; + power-source = <3300>; + }; + + sdhi0_pins_uhs: sd0_uhs { + groups = "sdhi0_data4", "sdhi0_ctrl"; + function = "sdhi0"; + power-source = <1800>; + }; + + sdhi1_pins: sd1 { + groups = "sdhi1_data4", "sdhi1_ctrl"; + function = "sdhi1"; + power-source = <3300>; + }; + + sdhi1_pins_uhs: sd1_uhs { + groups = "sdhi1_data4", "sdhi1_ctrl"; + function = "sdhi1"; + power-source = <1800>; + }; + + sdhi3_pins: sd3 { + groups = "sdhi3_data8", "sdhi3_ctrl"; + function = "sdhi3"; + power-source = <1800>; + }; + + sdhi3_pins_uhs: sd3_uhs { + groups = "sdhi3_data8", "sdhi3_ctrl"; + function = "sdhi3"; + power-source = <1800>; + }; + usb0_pins: usb { groups = "usb0_b"; function = "usb0"; @@ -380,3 +473,46 @@ status = "okay"; }; + +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-1 = <&sdhi0_pins_uhs>; + pinctrl-names = "default", "state_uhs"; + + vmmc-supply = <&vcc_sdhi0>; + vqmmc-supply = <&vccq_sdhi0>; + cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; + bus-width = <4>; + sd-uhs-sdr50; + sd-uhs-sdr104; + status = "okay"; +}; + +&sdhi1 { + pinctrl-0 = <&sdhi1_pins>; + pinctrl-1 = <&sdhi1_pins_uhs>; + pinctrl-names = "default", "state_uhs"; + + vmmc-supply = <&vcc_sdhi1>; + vqmmc-supply = <&vccq_sdhi1>; + cd-gpios = <&gpio3 14 GPIO_ACTIVE_LOW>; + bus-width = <4>; + sd-uhs-sdr50; + sd-uhs-sdr104; + status = "okay"; +}; + +&sdhi3 { + /* used for on-board 8bit eMMC */ + pinctrl-0 = <&sdhi3_pins>; + pinctrl-1 = <&sdhi3_pins_uhs>; + pinctrl-names = "default", "state_uhs"; + + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + mmc-hs200-1_8v; + bus-width = <8>; + non-removable; + status = "okay"; +};