Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1978009imn; Mon, 1 Aug 2022 06:58:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vsgVvki2CbqnLHhS1FmsArFH6t5Vu1nTTlEPhFJBe4KUFxKm4Jo8t8Z/qc6GI+oOELyCu3 X-Received: by 2002:a05:6402:3881:b0:43a:691f:8e3b with SMTP id fd1-20020a056402388100b0043a691f8e3bmr15890493edb.217.1659362317616; Mon, 01 Aug 2022 06:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659362317; cv=none; d=google.com; s=arc-20160816; b=qcjzwCtw5fTnvLQ7pbgba8w1T9jX9r9SCuGxoLgUbRYOeYlQM3Yua6RLk0yiztxbhk qeBD+jqADfRHIlMGadRxVBZ0z3OAQLU6RCyN8Q2R+iodSPRmScVrZaC0meKtybAFXsxf r0NtWouGZNuNn1nqXk44cbDmX14hvHFp+FLWmzf4EEoxNCN+do/9SextHvxTb345N9Jf ArJwh0fN359E084YqnMJq/MmK+8jPxz2wkBkFVUZykGpRd+YQRsMdpVX55cAPA5mZArW sKj8dFSiU+Fbd1X7hawJrc0Uik8akOgEQ2g97b5NX7MRqFZ51MDL+dOw+AFoAzENljO8 Gi+A== 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=uEhwV847uQ4J0YX9XnJNc7BuGq20ipcYeJhXwV8hGfQ=; b=GwTX8xMCD8ozZOCWUs7RLipyAMC2cDaI9SZTjnFyWpt0wtsdenVemqELUr/K2+J+QM tD5WKezr2gjhD77s3s4vubFViZHZhAzNGp6uM89bPK3/gFZCOzP8XE2P4XFEbvHw00Am CtnBXnxsQZvLgEXdmNexXYuz/dEUfau5A6QHz7HDp/DMnzyMkfYBqOnd+7N0PBPgpLmp qsZccirIzIGzg/Trfxgc3KHmaBsPojSeGCxu9Z9yoCdsXknw1Sl+D5J5M5oUtuj7DLHj Dt6H+ylJ2H1oga9ybhXA4T76l1h7r2prVk+OyrtpyBR8CV1B18nnVFY9BBrr9azBqE8A qoTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b=rJIHRllQ; 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 n17-20020a170906841100b0072b66c5cdf0si8537918ejx.481.2022.08.01.06.58.12; Mon, 01 Aug 2022 06:58:37 -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=rJIHRllQ; 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 S232051AbiHANQX (ORCPT + 99 others); Mon, 1 Aug 2022 09:16:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231509AbiHANQS (ORCPT ); Mon, 1 Aug 2022 09:16:18 -0400 Received: from mail.fris.de (mail.fris.de [IPv6:2a01:4f8:c2c:390b::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED5322C10E; Mon, 1 Aug 2022 06:16:11 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id DD187C01C1; Mon, 1 Aug 2022 15:16:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1659359769; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=uEhwV847uQ4J0YX9XnJNc7BuGq20ipcYeJhXwV8hGfQ=; b=rJIHRllQZmD6WLYndAzI53c6VELbAIE/0yYoV4fKu9yLcpXeWhHgFSuvnR+aGNx46Sxo/W VgEIknyFuEFzO+djnNedHDYTyvZxejWR6LmU7FI/1ITc6ux98BLb9xp8DWzslYSQ6bR4cM 2laySzagDfl6um3sqLSS8oG9N0mwB0gUCKqOixFxRLQvbLCiwatTs58A6f1o2g/q+zb7CD lAmOGM+vuL9GHGjWZiQA+ryruO6RFsntB7YjoPysg5/i3phGPYb42/gKjdYvaj47ToDoB/ 666vZL4yk1ENZUBadWm83M1yqBvj64ugUEY2Z8c0VasSFbNL7v5Q3Xdcixo4UQ== 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: Fabio Estevam , Frieder Schrempf , Heiko Thiery , Krzysztof Kozlowski , NXP Linux Team , Oleksij Rempel , Pengutronix Kernel Team Subject: [PATCH v2 4/8] arm64: dts: imx8mm-kontron: Use the VSELECT signal to switch SD card IO voltage Date: Mon, 1 Aug 2022 15:15:48 +0200 Message-Id: <20220801131554.116795-5-frieder@fris.de> In-Reply-To: <20220801131554.116795-1-frieder@fris.de> References: <20220801131554.116795-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 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 v2: * Add Heiko's R-b tag (Thanks!) --- 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 cb8102bb8db5..bc46426ad8f6 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_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-n801x-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi index b6d90d646a5f..77c074b491a6 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 @@ 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.1