Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2387799rwb; Mon, 15 Aug 2022 04:43:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR4bwlC+MjtCLsreF94ueY41FBwtlxJiA4yrInHODrn/00ALNg8wnO5JhX2kR4jciV4HaHCy X-Received: by 2002:a63:e24e:0:b0:41b:bfc0:139b with SMTP id y14-20020a63e24e000000b0041bbfc0139bmr13829544pgj.298.1660563806605; Mon, 15 Aug 2022 04:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660563806; cv=none; d=google.com; s=arc-20160816; b=LINFslCU0pfUSayw7dgae36QRRjpa0gHiF1CTf1iTgosYfTjH8RDtWd4oKKEEmw7h6 EK95rVn9zPt02p6PWFV9FaIInrotPygHo8nrY91zADieqDBn5Ol/rViNWykVKrKbhYje S+EJJHB3hFgKDzr/AEIgLK0oMollbjbtwPz+lNH3hwa7sSVw+H4bcrFVs8dWfBH4iC6z I6Ywan6H7LHBgaJZWrsEKVY+kO8DjBq5qU/0SpUz+9Apk44dkHppNW3BIhza8ZeHMfKy Raid+z/Ivj1zMzcv39h+ebjY4/S+ZiHNlf/mnZtetDaR9q3IpzyowYbsQN0GCSLPOejH CsrQ== 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=Xyc3HeD/Wetg/6U2L3dZq0OudoqJsGiwjd9pgCHOEfw=; b=gWhXMJToWHTCTWoP5Orw0K5ck6kvm0HV0sB9gyVAxiuk/CNcRJJUOSFReBLBHnhxMw 71dQclFB3H062Hcgor+fbYLDHV9BsFOf1WJctFxOGBTIddq5febf3DGGcPZxiRY8cHk/ HgK/Y5c0AS0vvpdzPHkLI5rrvBW7UTdWw0FZPHtaSw/g3PqvNiz+27dVyHeB2fBLFsZf qsN1zMOVXcbTYT7QOOpl5RhYY5S3LOT7wB2yNHlV4hfjoS8xQg26FWoBtAJItMIzmjCq 3k1XtIci2lVldyyi0OnaDszcH+5LOg63cfXYCbzxUPVKbwBvaXcXOLgNO/pM8oqQ5ohV FXvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b=KJtHs96K; 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 pc18-20020a17090b3b9200b001f32f26e7d4si17005431pjb.188.2022.08.15.04.43.15; Mon, 15 Aug 2022 04:43:26 -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=KJtHs96K; 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 S242591AbiHOLDi (ORCPT + 99 others); Mon, 15 Aug 2022 07:03:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241893AbiHOLCx (ORCPT ); Mon, 15 Aug 2022 07:02:53 -0400 Received: from mail.fris.de (mail.fris.de [116.203.77.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4551423BD7; Mon, 15 Aug 2022 04:02:51 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 554E7BFC15; Mon, 15 Aug 2022 13:02:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1660561370; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=Xyc3HeD/Wetg/6U2L3dZq0OudoqJsGiwjd9pgCHOEfw=; b=KJtHs96KOZwWH1i5Ys+ncRpNJW56VpiluGSLf6tQnLUuiwvHAurrhNjNzace8/t7ONVzJg uXFbSyedFagrimm4+E51cbvuLvJfSDKynb89C1lc7cgVk6A7w5OjGR69gI350pqcA/Q/Rt kySO67Mf8cpdl8Lcww5ZmezEvBXt4xmhf/3tp3CZTSwgWOfslFiBiyoGghcr408sEnd4kc kcDc3Zw8mh5ZzpsyGbVle5nPansDOe/5dcPfRESXaGbAaXZou1t/jTD2AU5NJKU8GRnaxo T3Dlo84F3TEg5CkXTPNgYOSEdVx4afQW6aYXMUJpApLBhpH0MtflyR176Vi2VQ== 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: Frieder Schrempf , Heiko Thiery , Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Oleksij Rempel , Pengutronix Kernel Team Subject: [PATCH v3 4/8] arm64: dts: imx8mm-kontron: Use the VSELECT signal to switch SD card IO voltage Date: Mon, 15 Aug 2022 13:01:27 +0200 Message-Id: <20220815110134.49683-5-frieder@fris.de> In-Reply-To: <20220815110134.49683-1-frieder@fris.de> References: <20220815110134.49683-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 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 4e5828fa815b..7af3c476fd9a 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.1