Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp450755rdb; Mon, 22 Jan 2024 09:05:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+CFJn+qp8zWtDgRsmy7hc45FfJaLgP4QPT6ogeezJti9v+ipSGDYNXZ9MTfvS3F5S+E5e X-Received: by 2002:a05:6e02:e4e:b0:361:a7ff:f569 with SMTP id l14-20020a056e020e4e00b00361a7fff569mr5844486ilk.7.1705943108881; Mon, 22 Jan 2024 09:05:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705943108; cv=pass; d=google.com; s=arc-20160816; b=KRN6i0/R2YDQYfYsgN+2kxII9yX14cTfb7Ohi/mIznVpoV4ykVIcZrOTq7DTQ11GDq Z2SCcpnYwhYOo9wweScYbLcjkP1SP1Ggb2UK+/Qh17w1MlyBBI3X5I++vLsSBuS9I960 Wcvk6yKudvxofpy2NhFATnVRZZaFiOoon7xLPvvQ3/lIl06Psn59pOw6m0L8vnKC8tm7 3G7B0rYKxq+tyRn7V7mG70aa00jtRm8+zcyME6NKGyThVhef6DqvXERUf7/Ml2vr06Yq C1lFo8OJ3wyiF1fS0MnaIcqV3eAPQbwiVnBM4/IdxDFQ8SI8zU7hlaBqf3aXhATXDE8l Gzng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=17Ae4bbz0U63U5jIzf2+B/tjd2E6da3aT05+xgqxu2s=; fh=JiFro9ytIyFWw4+pTbLaWTaKP3eNU4AUNSOFwpAogNg=; b=cKHw6akoBAgPXRr9zVJ8eh/ZabNIpcoHHcxoISVCmKbKV0V/5tY6FaQX97ZL6XPMu/ 9Nvxsv4mSE4vyM8LkeWHwj7Zdnd6pHF7LHRnqspPH+yGGGvixLAkWQm6j4KtPod6mpVq XoSyEkbiph3cjKj2gexuoYCbN7QWVwST/Tif83yBWMquf2Ay6Wa57L/yhNY7831Z2z+t 0iL/sk+LUHDlTw3TSnmINv/h4rM7TwiGk65hqpVxqHnqAgyAyI1wle8geyLqgUHG0+TP zmR3tDeM3ZLfSMZoN1SaP7ztp4usvHRSq+HefYYa3QOl6ma2HjVzY0xJwb0quULIc/WB 1A/Q== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=somainline.org); spf=pass (google.com: domain of linux-kernel+bounces-33506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33506-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id z32-20020a631920000000b005cec914717dsi8460189pgl.440.2024.01.22.09.05.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 09:05:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=somainline.org); spf=pass (google.com: domain of linux-kernel+bounces-33506-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33506-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 07529B30555 for ; Mon, 22 Jan 2024 16:28:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FBDA13DB90; Mon, 22 Jan 2024 15:15:55 +0000 (UTC) Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [5.144.164.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97B5355C07; Mon, 22 Jan 2024 15:15:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.144.164.162 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705936554; cv=none; b=bUj4WMzti1vGXNVX9AdOJcDclxZK/g9Xfo6/X6oiy12iO/KtjEKhHRX1iZh+Hpp7Fc1YFvltCgetmu/KhiO3xyR5350Y6GHiLkinh7fVUAKZBrQuqBNT/Lp68Q3kOaC65zVn3kqpYk4gjmMCdoi3c+aICvJ0kfhyW5OMZ1ShRso= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705936554; c=relaxed/simple; bh=JLs25aczWYuLmQs1zTJgP5QEDQhbdQ+gViZDEdCvxFQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E+PpnbScrrIavXqRvbTx8s/9o7LsT7o9HmwCgcpqmfFXLgT9pwtoixH6DrmYfX6tmOsqBWdaxUXSjZuMbXZ1nM+8cJoZNqDAjjIrl6v/aF/2nvpO8oGnRTBIngHOlBPRwjE23RSs8SMZj93/JcNWcj+pESOG0xRH89McCy3+6qE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org; spf=pass smtp.mailfrom=somainline.org; arc=none smtp.client-ip=5.144.164.162 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=somainline.org Received: from SoMainline.org (82-72-63-87.cable.dynamic.v4.ziggo.nl [82.72.63.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id C1AFE20046; Mon, 22 Jan 2024 16:15:48 +0100 (CET) Date: Mon, 22 Jan 2024 16:15:47 +0100 From: Marijn Suijten To: AngeloGioacchino Del Regno Cc: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , ~postmarketos/upstreaming@lists.sr.ht, Luca Weiss , Adam Skladowski , Konrad Dybcio , Martin Botka , Jami Kettunen , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Re: [PATCH v2 6/6] arm64: dts: qcom: msm8956-loire: Add SD Card Detect to SDC2 pin states Message-ID: References: <20240121-msm8976-dt-v2-0-7b186a02dc72@somainline.org> <20240121-msm8976-dt-v2-6-7b186a02dc72@somainline.org> <9d3623f8-697b-44ab-a9eb-9d2d305b0e5c@collabora.com> <48946c81-dad0-4e2d-9569-5fbac1675bb6@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48946c81-dad0-4e2d-9569-5fbac1675bb6@collabora.com> On 2024-01-22 15:59:37, AngeloGioacchino Del Regno wrote: > Il 22/01/24 14:49, Marijn Suijten ha scritto: > > On 2024-01-22 12:48:27, AngeloGioacchino Del Regno wrote: > >> Il 21/01/24 23:33, Marijn Suijten ha scritto: > >>> In addition to the SDC2 pins, set the SD Card Detect pin in a sane state > >>> to be used as an interrupt when an SD Card is slotted in or removed. > >>> > >>> Signed-off-by: Marijn Suijten > >>> --- > >>> arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi | 17 +++++++++++++++++ > >>> 1 file changed, 17 insertions(+) > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi > >>> index b0b83edd3627..75412e37334c 100644 > >>> --- a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi > >>> +++ b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi > >>> @@ -264,10 +264,27 @@ &sdhc_1 { > >>> status = "okay"; > >>> }; > >>> > >>> +&sdc2_off_state { > >>> + sd-cd-pins { > >>> + pins = "gpio100"; > >>> + function = "gpio"; > >>> + drive-strength = <2>; > >>> + bias-disable; > >>> + }; > >> > >> Are you sure that you really don't want card detect during system suspend? > > > > Does it make a difference if the rest of pinctrl and the SDHCI controller are > > also turned off? > > > >> You could simply add a sdc2-cd-pins out of sdc2_{on,off}_state and add use it for > >> both default and sleep. > > > > This sounds close to what Konrad suggested by using a new block wit its own > > label rather than extending the existing state. > > > >> pinctrl-0 = <&sdc2_on_state>, <&sdc2_card_det_n>; > >> pinctrl-1 = <&sdc2_off_state>; > > > > You said both, but it's not in pinctrl-1 here? (And might unselect bias-pull-up > > implicitly instead of explicitly selecting bias-disable via an off node?) > > > > I meant to add it to both, sorry. > > In any case, take the typo'ed example as a simplification of your first version :-) Okay, I'll resend a version that creates a new pinctrl node and applies it to both cases. Unfortunately I can no longer test and confirm that it makes a difference to have the card-detect IRQ always biased, even while the SDHCI controller is "asleep" or off, so I'll trust your word for it. If I remember correctly downstream turns it off as well? - Marijn