Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp318931qtb; Wed, 19 Oct 2022 02:48:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7b3IKRxe5lrX7Q38q438N4geW2C47xkItHwGQHFHxBlaV8QnXAj9QdYrymMRhOZPjjfwW1 X-Received: by 2002:a17:902:d192:b0:182:b25c:e526 with SMTP id m18-20020a170902d19200b00182b25ce526mr7545041plb.13.1666172938682; Wed, 19 Oct 2022 02:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172938; cv=none; d=google.com; s=arc-20160816; b=P7zkzaIItCRT526C9bp3naIN7XudidVAvYwDUeo9X2tIkrgtzwh+XTt6rwEKSi/LXc saHZFRZFyRURlq57MIBLrze9YcMUkfc/9Rqll9tMwvEw6+1hKoeFKrHN5ihEBQGIPPGy fGISPL+aJQoyVngJ/l7S16HFIXeAigpZsxwh5q8FD2e7aJYWGfWAY4sWS/xAwluQQGyC Djy/kfy/HewqnJRmwzbEl0B8lNDDRkJA3VtYn6ma/AonmeqIOrgyiUvwmjab201lkkB2 J/jGJCpsbwBsWDn7Xyo68rxNcliId1EnMfZdpT905f9WU24NQz2g3SQ2yyDMZ7nHzBRQ yqLQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=znJ33oZa3MkKH/OF1WUCb7Nf+L5apWN0T5CuBPR8zgg=; b=owEi7DOoGoVVdjUEk1evAVUP75XUTrlQDxOub19rr39OIeukSA4tQDV/MIBBydQIhn zhNwu73SN+TRHs/XyxHSslPdcIy0il+tgCKZSuH4A6O5/m3IoQmWPlNGwsFk7c8kJ3L+ lK4RD97+32n1FFvIsd7FmHjLunYmkIc+6IOwObMnuidxppnUsYFlJFdkUxjwnjvOvdCM SmKeOFxmiGEAkrxaehEF+HLYk8T+xxOaq02gra6vrepB/J2GoUFCuV3sYtPvLpmDjUpX 0aQ9njStQjH54JRv3E/ZIx/W319PCAa1Aa09LwuI4Y4bjJnoNFd8kKgAGGIBAEHOA3oP /4tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZTJ4CDZM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on10-20020a17090b1d0a00b0020db486e32esi20182213pjb.158.2022.10.19.02.48.46; Wed, 19 Oct 2022 02:48:58 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZTJ4CDZM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234641AbiJSJo5 (ORCPT + 99 others); Wed, 19 Oct 2022 05:44:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234862AbiJSJlp (ORCPT ); Wed, 19 Oct 2022 05:41:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20E01F5CD1; Wed, 19 Oct 2022 02:18:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DF852617D7; Wed, 19 Oct 2022 09:14:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03EE2C433D6; Wed, 19 Oct 2022 09:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170882; bh=9k1/VbHeguU3yVKC6fiS5SarwOPVXS7nqwlfeyR3xoI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZTJ4CDZMEXjw6/V4ZoGKhDDLc79UCYvihM9g5YG7SfbADT67TVo6F/CtvHooXxvTH dlGP3REa/3SfaVKRlFIC4AdGYYHYqcU2xuCY/8rYA19+h2PFdLEPHfB6yyfa5Cdq2Y ACwVo9hsMLoEf25c+fhtoPeyA+YU2xfYSOZL6ouk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heiko Thiery , Frieder Schrempf , Shawn Guo , Sasha Levin Subject: [PATCH 6.0 780/862] arm64: dts: imx8mm-kontron: Use the VSELECT signal to switch SD card IO voltage Date: Wed, 19 Oct 2022 10:34:27 +0200 Message-Id: <20221019083324.374869972@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Frieder Schrempf [ Upstream commit eef2c0217e02b6c7ed5b10b82ea944127145e113 ] It turns out that it is not necessary to declare the VSELECT signal as GPIO and let the PMIC driver set it to a fixed high level. This switches the voltage between 3.3V and 1.8V by setting the PMIC register for LDO5 accordingly. Instead we can do it like other boards already do and simply mux the VSELECT signal of the USDHC interface to the pin. This makes sure that the correct voltage is selected by setting the PMIC's SD_VSEL input to high or low accordingly. Reported-by: Heiko Thiery Signed-off-by: Frieder Schrempf Reviewed-by: Heiko Thiery Signed-off-by: Shawn Guo Signed-off-by: Sasha Levin --- arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 3 +++ arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts index 23be1ec538ba..c54536c0a2ba 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts @@ -321,6 +321,7 @@ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 + MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 >; }; @@ -333,6 +334,7 @@ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 + MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 >; }; @@ -345,6 +347,7 @@ MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 + MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0 >; }; }; diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi index 8f90eb02550d..6307af803429 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi @@ -86,7 +86,6 @@ pinctrl-0 = <&pinctrl_pmic>; interrupt-parent = <&gpio1>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; - sd-vsel-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; regulators { reg_vdd_soc: BUCK1 { @@ -229,7 +228,6 @@ pinctrl_pmic: pmicgrp { fsl,pins = < MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x141 - MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4 0x141 >; }; -- 2.35.1