From patchwork Thu May 18 21:54:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13247439 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 73482C77B7D for ; Thu, 18 May 2023 21:55:30 +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=wAJ/A/RuX4BNjorW3rT7UYkw2NV9DKjLFMMCfVfcafA=; b=UTrYhUErCHepMw dhrSrXF/CoQ46gKWGT8xgS8e+zlHGuEXTMWKbC3O/l9IIiSq6PzRDbDVsaOnywfIRsxQGV8gENEBC fuywYkpqyFtmygQJwNlmgS/reOByHvQ3rml8mvwXXxB4t8qq8O5R6EsdLDVYRI3RlrfNuaq6+aaIJ Ud7Nf22Oh+1s40OjUpoNNUmnUQK7br/ORJXFTjq//5g/tEVZqGeOwXdbNkgsO9jJrNEr6EScBkEy6 mYeO3RxDT4I1s6cp70cpiDi/Gu2HuVIvnKxoLSieILy+/0F/NkrBRPSLLukE3bsz/ORRy2TVjSsg2 WFgVfUFamkYZ6aCBKImw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzlaU-00EI9J-3B; Thu, 18 May 2023 21:55:06 +0000 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzlaS-00EI8l-0j for linux-arm-kernel@lists.infradead.org; Thu, 18 May 2023 21:55:05 +0000 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-19a0f511155so302026fac.1 for ; Thu, 18 May 2023 14:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684446902; x=1687038902; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BswmFc5DiNNOMqTToSSSSvY6B2Ot3WmlwboXKMs4in4=; b=qBcPWtRUT1A0N4bJFxTreNSs7btOKtzRDI+xdfIgEW4nqWuncN158gGGNRbYKSr1da JmQw1KXbcUUm/SbA24mQkonVSIOR5A7BgyEt4Fqc5CRwF+PGNtWNF7MsgNO7gjaNJ0SC QPROCnrkGGvc8i+D8xODbEN0iqf0w8rD666kygAEHni0QcuSgSMgq5GWlomXYFWpmGNI jORLO7S0sxe3kd2SewES5JcOaPrt+VZ+z43W8LlFQflzxV1mfGNw97FBwEO7Cxmn7VsF UKmipZme7udGdU9ZYkboNhoBUlBZB88H9/h7YSXEOEBu3Zo9zzBKilo3FD9OiK1YpM+1 nsyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684446902; x=1687038902; 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=BswmFc5DiNNOMqTToSSSSvY6B2Ot3WmlwboXKMs4in4=; b=l0UG9R1MYunbMMkofrnSdjq1ecAaFl73Y2d+eVccsNZ5Cz4HzcO639aLj6hI0AcFA/ SvEy/Ks0Pd+mUV84RymzZuRTWjiFtwkCzasJk54ikYBLmdZQIx2pzfmmyAVRpO9fOjAV XHrBLG4hU7LUtzhHa8+2bVjq52JlSXSWvs+k/3/sg6YBEjX5K92oglwuzQR0Sp7/tFtc iqebYk9hWUFsQudOsS1v0ZZV44j45E+JNEqH4M9bb41I/cP1NxIxU/SI4yKHX5Qll9VQ isaI8QCmzpZ0sFdb9HPt2tCAyxi0u5Xfh5g5WeqjQ1PsnC37wPi50TBxJ8jo/Z/ADZQo 8kvA== X-Gm-Message-State: AC+VfDyd2ZvBBV/rwJDp2OEORF9BMc0x/dkSgImrXObHloY+fpjKs7vg L1Oja33weoE7DzDVB7hvc/0= X-Google-Smtp-Source: ACHHUZ7MgcX/kziBeStMNu3BBzIlgGyurKsczKodQs4ait1A2U6rN1pUubvKybI0Q6Oakolj6EWKzg== X-Received: by 2002:a05:6870:6128:b0:195:e6f8:5592 with SMTP id s40-20020a056870612800b00195e6f85592mr194422oae.0.1684446902128; Thu, 18 May 2023 14:55:02 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b69:e366:77e8:4ae8:a240]) by smtp.gmail.com with ESMTPSA id dx11-20020a056870768b00b0017b21991355sm1264460oab.20.2023.05.18.14.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 14:55:01 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: linux-imx@nxp.com, ye.li@nxp.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Fabio Estevam Subject: [PATCH 1/2] ARM: dts: imx7d-sdb: Describe the SD card regulator Date: Thu, 18 May 2023 18:54:46 -0300 Message-Id: <20230518215447.180298-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-20230518_145504_288653_DD42FD1C X-CRM114-Status: UNSURE ( 9.90 ) 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 --- 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..6e45f1154611 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>; + startup-delay-us = <200000>; + off-on-delay-us = <20000>; + enable-active-high; + }; + 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 Thu May 18 21:54:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13247440 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 8C71EC77B73 for ; Thu, 18 May 2023 21:55:34 +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=0w+6BnJe74FoS+Wh4ThWch+m2jwf16oFYjQUVVX8OAM=; b=4kacByrblvhbYH Qop0ThgP6o6/F0BR51+WyHqWcvl4M9S9AsRu4IUOsM054mokzVc6fTMAPD1DkeV6+EvXff+QBiFnE o2dwD6THhJUHJs3dERv00zeEgwaJARRMi+XRxw0D9VOTsY8VB53ZzTlFK7pvqr3PXpxzRq8QkbVCC hpGhorUkv5soh5TDAHhoubk1hnOEBmTkE4QURugReraesWA+pTq5KgIeEfNMV2ZU/HIRDTtvRqsuO Gk1+EiC63wgcb9IRDGMHM9a/ZJELwzdviueLzb44B8AHqqUlazcOasT0ExNDXbPW5Ebb2ZryqzfQd 07mz7ZF4/p1AZe8DVGHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzlaa-00EIBW-29; Thu, 18 May 2023 21:55:12 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzlaU-00EI9E-20 for linux-arm-kernel@lists.infradead.org; Thu, 18 May 2023 21:55:07 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-19a336df959so118188fac.0 for ; Thu, 18 May 2023 14:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684446905; x=1687038905; 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=KmAZbtkgKPh9RaA52sr1pZc5YndAAKQTnl7Me1l5sAI=; b=e0Kz8Zz16wi0RRpe3GK8M9ogAfryPalq20hNPL5IxqrK37lQJDyoXgPQlrAYit+e50 F7ycO3/uYE7072xGH7xhDcGclEekxdYf30UiDt9l8DzUwFqSSFCFlxlT0GXyI5mFudAV 76xidvX4Z3cc1PcJbiiv2DO/ycUJXNp0pMFzKy4cRIEktg7FC2247Y3gKrG3lkc6alKp YILIDrLMmJIL79J2yqgNOnEjOnLizmaAnz5DCxKrvwtKQvrvAiK4JiPSlYCmH17YnZF3 93SqppW6xIkk8l2lCODL5Mt409MTfBU2IQtMMB+2tANorwnpkC3SaDMflAKVsUm8o+va KpRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684446905; x=1687038905; 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=KmAZbtkgKPh9RaA52sr1pZc5YndAAKQTnl7Me1l5sAI=; b=YhfZD2vPNSsRmqMqh7XxuZqdlwwKDDrj6P55OHHxBOPQskmpK59gOL4JbnQ0oxP/i6 gGcEtzGLfRJfvgvy3t1Tmi07JLXcaGXbd6SVqR+IXjiG7Yqfn91ZT94imVDyg4RhMqqt 7xFBvwvGMoGdlIZX9STtEoK5tdl+gKsWdr+HVdphVy164fPvH40kplUR42QHkgQBhDz1 t8sr4BifXPPdXl5vo9ZlBBUCISb69esoE1N0AQ/5rd/jlbRioGCmP5Gcx4eN6nT3J5tk IqPOPaMtIFWEEJdGMETxGQN7lZRkDxvxj5nHLHtAP4fZfsHt2LkgvprOtS8//04EZwgQ cmBA== X-Gm-Message-State: AC+VfDxzkAxawWrbOrM9ByS7KlahX/dhIvcPA2e3/Bjzr6Qb8JF6FxXN SLD3VYOaHUXUHU5kaRqsEpSKRJtfeDo= X-Google-Smtp-Source: ACHHUZ6ZtQcM1k2gPj2UVoOgZF8PRDBfY5mvzAHPd251fKMluuh/ESK47cCPTOuzlSY9GqoEFS5YhA== X-Received: by 2002:a05:6870:d24b:b0:199:c25b:f966 with SMTP id h11-20020a056870d24b00b00199c25bf966mr155089oac.2.1684446905244; Thu, 18 May 2023 14:55:05 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b69:e366:77e8:4ae8:a240]) by smtp.gmail.com with ESMTPSA id dx11-20020a056870768b00b0017b21991355sm1264460oab.20.2023.05.18.14.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 14:55:04 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: linux-imx@nxp.com, ye.li@nxp.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Fabio Estevam Subject: [PATCH 2/2] ARM: dts: imx7d-sdb: Allow UHS modes Date: Thu, 18 May 2023 18:54:47 -0300 Message-Id: <20230518215447.180298-2-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518215447.180298-1-festevam@gmail.com> References: <20230518215447.180298-1-festevam@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230518_145506_659232_D8B80C82 X-CRM114-Status: GOOD ( 12.13 ) 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 --- 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 >; };