From patchwork Sat Oct 22 07:28:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7652 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1107886wrr; Sat, 22 Oct 2022 01:42:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM59ifKEeM0o6peWPnBdIsxz6SC083toA3WEPxsNxfdOkiH/IH+7OiH7b7lYtdpRqu7FnDnz X-Received: by 2002:a05:6402:5489:b0:43b:b935:db37 with SMTP id fg9-20020a056402548900b0043bb935db37mr21882365edb.347.1666428145437; Sat, 22 Oct 2022 01:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666428145; cv=none; d=google.com; s=arc-20160816; b=VenP+2/oLuJdPBxafbxI7QY/Rf2Q1bBOV4y4WfXia6zN+K6XlpvU2h+eXw1RGz8bU9 DQIGMU/PDU5haoRBcwseNNe4kYLQGa23Gt9Tq7aYbEzyB/G59DrzgF2JZ5KavmZXuumx i40kRQxUh6n5bgD+97QJL/wv+Sse2tpCyT5F2eJ+jtbsoLkrR39LpJST+v2f3fK5vz5Z 8dow/b01X2fVuN21rdKnWSFqO/csBf5AmTSmgKHZczLlPgrH4+LgJ3EpNJmcjjuZoKNW Bch0b8TLXH6D8ogt6Arcc2dErWS8Bkge4tpHU1pFWO7QTZm4HJmtVlJMjb6jdm/JPKh5 Me2A== 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=YzagvETNKrI8ZmSiwqrdzu0n0CBER1NGUzMGH3poXOz+23Uwwpz7opaDbP+P/HMfWT cxo/BenprAUrv5VGOHe15Qsn+0InuruguLWAsOBPHofjg3qpOrOsd+KL6nDMpl5XEODb 3n53UZHBAa7ufHqPfRYgwQGP5hVNS3Tr/qRRP+oxP+wjU0un0NXqkCL3al4sgV965cYa T+I5cbv96UOENkAyad5s8K4EWYG6Bd1l1NYC6WtkMa4mkdmGCO4I00hxcDwN1/T7tBsF XE6wYI0OhmyP9uSDgtxeijm8wXcDCk17XntB7AYc/eP3FwJyc84hcAKpvfd09866HVWY VtIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2V3SWDir; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa6-20020a170907868600b007836ec6999dsi23498430ejc.904.2022.10.22.01.42.00; Sat, 22 Oct 2022 01:42:25 -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=2V3SWDir; 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 S234356AbiJVIk5 (ORCPT + 99 others); Sat, 22 Oct 2022 04:40:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234527AbiJVIfp (ORCPT ); Sat, 22 Oct 2022 04:35: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 4811148A12; Sat, 22 Oct 2022 01:04:46 -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 B8E8160B95; Sat, 22 Oct 2022 08:04:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F0BAC43470; Sat, 22 Oct 2022 08:04:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425863; bh=9k1/VbHeguU3yVKC6fiS5SarwOPVXS7nqwlfeyR3xoI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2V3SWDiraC7WsKbE48vMEY9vedL1846MEVZj3dKolG0WroM22hxJk7HbG5OGYJECk TOM/1zG0vPvYJnB/0w+IQwZ2D2szhpTrn9xdkI5KCAKRzTmT/QPEykFIvHriHbfl+C mX+vPg5VJQV2j+TghkNw10r0jzClmkUAZqHsngek= 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 5.19 640/717] arm64: dts: imx8mm-kontron: Use the VSELECT signal to switch SD card IO voltage Date: Sat, 22 Oct 2022 09:28:39 +0200 Message-Id: <20221022072526.737289436@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747376559079149594?= X-GMAIL-MSGID: =?utf-8?q?1747376559079149594?= 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 >; };