Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2076472rwa; Mon, 22 Aug 2022 01:24:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR4YFuT244wnmEEHNWeolym8cQ6dvlsBTcnm5OIwOPpZtvjrtll4oiRnHFCdl7xqUpK1XLvL X-Received: by 2002:a17:906:9b0a:b0:730:d37b:4712 with SMTP id eo10-20020a1709069b0a00b00730d37b4712mr11702240ejc.537.1661156668237; Mon, 22 Aug 2022 01:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661156668; cv=none; d=google.com; s=arc-20160816; b=Szy7M75AWyxsVnsJesIBJx09hse51UMu5Jd5E1oZbAYVTbUidGyNvC4AJy30p5ki/+ HR5Ee08DACrBxETiwKcKxu9iOIv3dQXZNHodzCOmyrT4d+qvnsFwGeybgOYl2Smj0oA0 HzcUv65jfxw32a5UuQgDfmTmBVK6tRABlUTrTKf3+J1q6os1QyaCKA5pA0n/R9+ZA4Yn r6sbu+ewrYI3l2rMAy3YXRVh7hsRwZG4yG32rQn0xckrVI/fJTV/p82hpmPnCqWG+gh4 91A6P1hzJlYbZl9wq+BILFu5Fj6BKEqJB18lmbyWX/kzF5qrQvBeSW/vWeeYNN/xG970 rmlA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KmlchrrmClOEdG+NrQBCHG5tvdW+GLnM4C6arwv7cdA=; b=omzUE7EsGjPbPBKLBsBN3uUx/ld2uSm/2LHXxfDkS/PkiblWnXE7SNCgXgAgItaTGM Go1+jLIgTY3dnBLUf0PygG0Iq3B6dWPOEqIBUiN2iz/fSQYBj3UXM5jIVPESfbR1v64E h98s9WuEyw+oPQbBSIvDZB0kz28CPsMQZ0iAYz2izaCKoocaG9U3+XVO9NWhXWLn3wOb hT3e0toQFyrCieqvzEeLYFUeFXSuf2uNMLZR51gOH1oRLsXANI5nILJ66tkOYU8jEBg2 rr6uav1QeM5tzMxUNUwAkboJkmE2dxpdnh2H8v8YgV4C8kK35t11yU7aYoe1Sl86Vdk5 LKdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b=Dy3JdhYe; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kf8-20020a17090776c800b0073d8837547bsi394544ejc.729.2022.08.22.01.23.59; Mon, 22 Aug 2022 01:24:28 -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=@fris.de header.s=dkim header.b=Dy3JdhYe; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233655AbiHVIFs (ORCPT + 99 others); Mon, 22 Aug 2022 04:05:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233646AbiHVIE4 (ORCPT ); Mon, 22 Aug 2022 04:04:56 -0400 Received: from mail.fris.de (mail.fris.de [116.203.77.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23AB62CDC2; Mon, 22 Aug 2022 01:04:21 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 95CE3BFB01; Mon, 22 Aug 2022 10:04:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1661155460; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=KmlchrrmClOEdG+NrQBCHG5tvdW+GLnM4C6arwv7cdA=; b=Dy3JdhYeHWhHozGJEr2DP/Bct6fv5eiWsGKj1IyhIAHXz0lCcPY/2qzoTCHfFDHHiHUoez FdRJ9RdAgKeTubBUv5dbotFWV1WWPzB++lo2CmXvBVH1NqKLUs8yCPB+aPTwzeF81Ch9bd rUbNb1on/dZd7P/Iebr9A/B0HInuqOMl4TJvDcFZHBXoZ5HnVyPJ1vG91odFosjyCCPi2H X9WGy3BPz5yaNd8KgBMxkzGnR6Fux8GcFCgpdUPaytnDsKWbBKVcaZZvkW5zfC7HKaFHoc Gglqm79l6FTMiuHjboZbEn1WDoXeIqE+i5nTSKm9+Lt/8qqPPyJTMUdK48hBAQ== From: Frieder Schrempf To: devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Sascha Hauer , Shawn Guo Cc: Krzysztof Kozlowski , Frieder Schrempf , Heiko Thiery , Fabio Estevam , NXP Linux Team , Oleksij Rempel , Pengutronix Kernel Team Subject: [PATCH v4 4/8] arm64: dts: imx8mm-kontron: Use the VSELECT signal to switch SD card IO voltage Date: Mon, 22 Aug 2022 10:03:50 +0200 Message-Id: <20220822080357.24478-5-frieder@fris.de> In-Reply-To: <20220822080357.24478-1-frieder@fris.de> References: <20220822080357.24478-1-frieder@fris.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 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 --- Changes in v4: * none Changes in v3: * rebase on v6.0-rc1 Changes in v2: * none --- arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts | 3 +++ arch/arm64/boot/dts/freescale/imx8mm-kontron-sl.dtsi | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts b/arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts index ca533baedcd2..a079322a3793 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts @@ -321,6 +321,7 @@ MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0 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_DATA1_USDHC2_DATA1 0x1d4 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_DATA1_USDHC2_DATA1 0x1d6 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-sl.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-kontron-sl.dtsi index 30299c2a98ea..33179157f619 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-sl.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-sl.dtsi @@ -86,7 +86,6 @@ pca9450: pmic@25 { 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 @@ MX8MM_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c3 pinctrl_pmic: pmicgrp { fsl,pins = < MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x141 - MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4 0x141 >; }; -- 2.37.2