From patchwork Sat May 27 16:06:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13257688 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 84960C77B73 for ; Sat, 27 May 2023 16:07:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jXFok+g2l1hxQkCS2ShVrCX9EdnWr9Ete4WNPddNAGs=; b=TXh4RjbyWjwoqj o2y0U1D9XMeYiY4Z6jCFvzeBtKhUT/CGMzhNcO6Gwhlrl91pM4Kj1sbGhYbwcwzpA8ZDQHckTqeHi QXvr3+fHTiOpNQSIuNXuyNpbj73IdjPKQ6K4wjejg+js2dsoSpXmVY392A3c5GDir7Cb2eLZXjq8b JdNdx7M6W06fYQw3g4qnT4nGsOP/nC+3eb+p38clBWcN7oCe+cUhsRjx1UVKjEwJJ8NnnnqOgRy+B 90I5fhiTfyKZV9nM/F3tY75VTzPNwEbozgPRRiWZuqDJcLRIetezc50oU2jzwsioFf8TayR/94B98 j+v0inCuoDTKMt+j0vuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q2wRi-0060Y7-1n; Sat, 27 May 2023 16:07:10 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q2wRf-0060X4-26 for linux-arm-kernel@lists.infradead.org; Sat, 27 May 2023 16:07:08 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-39844be599eso208186b6e.1 for ; Sat, 27 May 2023 09:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685203623; x=1687795623; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=R3b4d6zb+fzHSCJwyIG4CucfmH+1XsmXWXyvKR7Uzmw=; b=AfUg4fg0d9rpymTa4rWNCsHXz+YG/cnefWJye/a/m+GpucO0IRCkToVy8m0xCvy832 uTyLdYE9Zh4LNdBNOkUh7pQdrrmIiPhlq/ZnX1lSMNg0YETv11nGIKIwziH+J1/Mywd3 8sAqI54Cp/fw/dCIbcP+1yOSNoyMWRdvx0SzRwibX9g0vfqU6tmR8TBhFvmedNtp7F+3 ramIlNTOU4ouTTKxJ1lHCVa6bKJqRjqy5D03GMsNyXHBFMWaWksn2X+Mkna+BUVeSSZU pnRWx31tu44D7X+9xx2JISHKdXlv4oiAdcx6/jMqlzLWsVGoDOiiLloGnSHFcJ5FN7FZ 8Uvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685203623; x=1687795623; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=R3b4d6zb+fzHSCJwyIG4CucfmH+1XsmXWXyvKR7Uzmw=; b=PtQYl7AlefQNWVZ5+lvD8l1vmgN6wuzqViR+UFgL2Lf9JavZynmv8pclH4i+lmQldX PYJVLURBOkDc/xyx1OVcud9nJEiCmZW9cD3seL8BabuzGjLeHh1zrQxkR2CX4aVI69px s+UJ2W0BakK9cmY4l9XAzi8p0pL2crNvvlgCqBobHru1GFA8irtu3LMf1fL0byv4XmFr tR6aQKIj8Yzgk/fR1G7Lsw1pPn8buOKMbYPbpRUIG6tb9FPIfQ8hhyNeIR35eiEK0t45 QF+yBe9nSmVRpuBy+iEKcoiqQHL3ah7wzmxKU84BQb8jecFhtjO3w5U5BvDqvhf+nanx SEWQ== X-Gm-Message-State: AC+VfDy/03KKunueGhznh57rNaWKF8wZ/vohNsoS96jsh9HZj6hp6Cwv bkt70nbJFvf98CsQvL81DTk= X-Google-Smtp-Source: ACHHUZ5m9VaGA51v5LIXCYn003DjHDtgDSI2o95e66iC0cDi4NJBfPjAicXssGzYfMeGkMow8Za06w== X-Received: by 2002:a05:6830:6012:b0:6af:8e08:e061 with SMTP id bx18-20020a056830601200b006af8e08e061mr2795647otb.2.1685203622703; Sat, 27 May 2023 09:07:02 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b69:1d6b:5783:aa5c:b83d]) by smtp.gmail.com with ESMTPSA id q6-20020a9d6646000000b006ab305429e7sm2847461otm.0.2023.05.27.09.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 May 2023 09:07:01 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH v2 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator Date: Sat, 27 May 2023 13:06:33 -0300 Message-Id: <20230527160634.345195-1-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230527_090707_700271_843E223E X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Fabio Estevam Improve the devicetree description by adding the SD card regulator that is controlled via GPIO5_2. Signed-off-by: Fabio Estevam --- Changes since v1: - Put 'enable-active-high' right after 'gpio'. (Shawn) arch/arm/boot/dts/imx7d-sdb.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts index 25681c430393..c898d66e27ad 100644 --- a/arch/arm/boot/dts/imx7d-sdb.dts +++ b/arch/arm/boot/dts/imx7d-sdb.dts @@ -60,6 +60,17 @@ extended_io: gpio-expander@0 { }; }; + reg_sd1_vmmc: regulator-sd1-vmmc { + compatible = "regulator-fixed"; + regulator-name = "VDD_SD1"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <200000>; + off-on-delay-us = <20000>; + }; + reg_usb_otg1_vbus: regulator-usb-otg1-vbus { compatible = "regulator-fixed"; regulator-name = "usb_otg1_vbus"; @@ -477,6 +488,7 @@ &usdhc1 { pinctrl-0 = <&pinctrl_usdhc1>; cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; wp-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; + vmmc-supply = <®_sd1_vmmc>; wakeup-source; keep-power-in-suspend; status = "okay"; From patchwork Sat May 27 16:06:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13257689 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EEABCC77B7E for ; Sat, 27 May 2023 16:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3BXnLHEsTzE3KPGIVrxI01GD1zhI97GmoNl5/z2aVAY=; b=rZYB8DxaCmr+uY JK7PEEwVCzUr2nk6oh8w20WB1+uKL7KqiXQ6OB0aPCZ9oFC2m6fnKf29EJ7qxLbxe8t4jlga9klbK YGT+iUYpHNSEKF7mE3An/sWaDmHXy8A0QxzTg7q8P9G2RatO8p5TeF0LwGf30B8/nc/JRyEw5kZWM 4iI23nGsa+zetGMXTfoEz+eSXzVJj9H15xL7dWLnRbkpiiG5NrlMiYXpwJnPrNlT0v+2iq5uaK485 s17Fa8k6XD2pcIr3pqNDwJpvVTvJOzwoPGK/tC/D0iuW8pX6QXyJlVZrlFVBtXg/PCeIKola+6MzL /up7KUbkHFc+HGxvBxPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q2wRq-0060ZT-0O; Sat, 27 May 2023 16:07:18 +0000 Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q2wRi-0060Xa-03 for linux-arm-kernel@lists.infradead.org; Sat, 27 May 2023 16:07:11 +0000 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-19ebec56cf6so146250fac.0 for ; Sat, 27 May 2023 09:07:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685203626; x=1687795626; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CEBm1wNwRaDl5Lqr6amCvpET/UqIdy1LBifWgcCk60g=; b=R6+Fg/dji5cQTAWsF7ICvzSl/+tqF5JAu3DXt/QhNaYOntSmYUHrXUfnA4PjMAz1Rc rUb+jQfGLNEvjUpuWPnhVFh/UKhQa0t3iPtzKMwvbTeN+Yxq1d0gXtPFkb494zdK7hZJ +oqK60Gn/mce+SKv6Ut4EiyepYCkEeYHE9+qy2URlO2aGKIvFYjsf3p+ALs+lwAgveP+ BOe6y8I1BhXp28u/4mjAGHtiOYnIm92ZNPyFQbSVHvHg6mWCuyHhjeTxodkkQoapCUWJ W5Jbtq1X6lae2JAl9TiJ7I/YeWzoZj4OxBoov2r41N9mGgQe6k8/WBCLN0Pg50Ycvi1K VF0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685203626; x=1687795626; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CEBm1wNwRaDl5Lqr6amCvpET/UqIdy1LBifWgcCk60g=; b=MXCMxRx90YfHmP6lKAT7z0RqbzSUnmPLfQA5epOAquLjwWptBcnqVzDRzVgquyfQat 9AQgP1aLNE/bluDahtdKxx+JKJXWKARV8cPaCechHriu6TSbdeQjOpRcfFsaNSfkf5Qk uwZo/sjdiaptpgDStrgyLst0zjJ5F4EGNZGFTxKQ/FWRehTT3JehFugfAq4nDnsh1auX /ZScYLxuE+zrkcE4bUIdY/6zQOO7Q69+pFns1oK32mt+gLtwT4OBoFCFmF2J2Mnznk46 Z80XK5a4QUOZUxO25DVSOnDJJVY4dXSndHTTdIDFP1LwF0hctkyGO6Afzjxe34KBc+d0 vscQ== X-Gm-Message-State: AC+VfDxkdBBNhTvNQgD3sUJGHqJD2wTZTAyJCOo38UWYNcbcWoW1Flse tAIwjLVwKEM+4G3g0VO5ep4= X-Google-Smtp-Source: ACHHUZ5ds503eUcniIRTzm1Gk+YX4RhhuNgRO+n3pa504XNMeR7hF1loXEquqK7jYTb31KOHW3FzQg== X-Received: by 2002:a05:6870:a68e:b0:199:cae6:3147 with SMTP id i14-20020a056870a68e00b00199cae63147mr3166879oam.4.1685203625748; Sat, 27 May 2023 09:07:05 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b69:1d6b:5783:aa5c:b83d]) by smtp.gmail.com with ESMTPSA id q6-20020a9d6646000000b006ab305429e7sm2847461otm.0.2023.05.27.09.07.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 May 2023 09:07:05 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam , Ye Li Subject: [PATCH v2 2/2] ARM: dts: imx7d-sdb: Allow UHS modes Date: Sat, 27 May 2023 13:06:34 -0300 Message-Id: <20230527160634.345195-2-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230527160634.345195-1-festevam@gmail.com> References: <20230527160634.345195-1-festevam@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230527_090710_052779_D181A70D X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Fabio Estevam Describe the SD1_VSELECT pad, which is necessary to allow UHS modes. Also, to support higher SD card speed modes, describe the 100MHz and 200MHz SD card pinctrl entries. Suggested-by: Ye Li Signed-off-by: Fabio Estevam --- Changes since v1: - None arch/arm/boot/dts/imx7d-sdb.dts | 40 ++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts index 6e45f1154611..98e77fdfc27a 100644 --- a/arch/arm/boot/dts/imx7d-sdb.dts +++ b/arch/arm/boot/dts/imx7d-sdb.dts @@ -484,8 +484,10 @@ &usbotg2 { }; &usdhc1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usdhc1>; + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_usdhc1_gpio>; + pinctrl-1 = <&pinctrl_usdhc1_100mhz>, <&pinctrl_usdhc1_gpio>; + pinctrl-2 = <&pinctrl_usdhc1_200mhz>, <&pinctrl_usdhc1_gpio>; cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; wp-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; vmmc-supply = <®_sd1_vmmc>; @@ -743,6 +745,15 @@ MX7D_PAD_ECSPI1_MISO__UART6_DCE_RTS 0x79 >; }; + pinctrl_usdhc1_gpio: usdhc1_gpiogrp { + fsl,pins = < + MX7D_PAD_SD1_CD_B__GPIO5_IO0 0x59 /* CD */ + MX7D_PAD_SD1_WP__GPIO5_IO1 0x59 /* WP */ + MX7D_PAD_SD1_RESET_B__GPIO5_IO2 0x59 /* vmmc */ + MX7D_PAD_GPIO1_IO08__SD1_VSELECT 0x59 /* VSELECT */ + >; + }; + pinctrl_usdhc1: usdhc1grp { fsl,pins = < MX7D_PAD_SD1_CMD__SD1_CMD 0x59 @@ -751,9 +762,28 @@ MX7D_PAD_SD1_DATA0__SD1_DATA0 0x59 MX7D_PAD_SD1_DATA1__SD1_DATA1 0x59 MX7D_PAD_SD1_DATA2__SD1_DATA2 0x59 MX7D_PAD_SD1_DATA3__SD1_DATA3 0x59 - MX7D_PAD_SD1_CD_B__GPIO5_IO0 0x59 /* CD */ - MX7D_PAD_SD1_WP__GPIO5_IO1 0x59 /* WP */ - MX7D_PAD_SD1_RESET_B__GPIO5_IO2 0x59 /* vmmc */ + >; + }; + + pinctrl_usdhc1_100mhz: usdhc1grp_100mhz { + fsl,pins = < + MX7D_PAD_SD1_CMD__SD1_CMD 0x5a + MX7D_PAD_SD1_CLK__SD1_CLK 0x1a + MX7D_PAD_SD1_DATA0__SD1_DATA0 0x5a + MX7D_PAD_SD1_DATA1__SD1_DATA1 0x5a + MX7D_PAD_SD1_DATA2__SD1_DATA2 0x5a + MX7D_PAD_SD1_DATA3__SD1_DATA3 0x5a + >; + }; + + pinctrl_usdhc1_200mhz: usdhc1grp_200mhz { + fsl,pins = < + MX7D_PAD_SD1_CMD__SD1_CMD 0x5b + MX7D_PAD_SD1_CLK__SD1_CLK 0x1b + MX7D_PAD_SD1_DATA0__SD1_DATA0 0x5b + MX7D_PAD_SD1_DATA1__SD1_DATA1 0x5b + MX7D_PAD_SD1_DATA2__SD1_DATA2 0x5b + MX7D_PAD_SD1_DATA3__SD1_DATA3 0x5b >; };