From patchwork Wed Dec 14 23:20:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 33400 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp21982wrn; Wed, 14 Dec 2022 15:23:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf5xFHZ0jp0nmFkKo9NSCRwVM3RTdwJixi+3E+aW9CPUYFgANnIYr1ISXBcZFz85e8sfnnhH X-Received: by 2002:a17:903:186:b0:189:b3bf:c0b5 with SMTP id z6-20020a170903018600b00189b3bfc0b5mr39990887plg.34.1671060212393; Wed, 14 Dec 2022 15:23:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671060212; cv=none; d=google.com; s=arc-20160816; b=sGSQhgjkgJRj7PuI2EHZ+bcQbXN+NHTdTDDdze8/UYHdyMA+r5K19TFH6jinEHlB+U ydf+Qr2Jhg5DiElT2fA0xSFhBqPrluYM39kBGV7Fs+8IRgLapknbe+zflev+/IS39xfA LtIdr6zJKP6CQQAiMT6KrT7QkgFvHWO9B1K5esTWXYSvCBvLtqMAHk0M4WciCEh69y1/ K3Ajg4mijOwwfq0lLJrMlxpdTGmEBg6aizr8QciVfcWGjhv4q3jE04OJlGxHESZ7gd6F 7OXsPzDMWR86K+CLnHTR1hh5httaWg9Cl0lEUc3iqVakz8BZWMRK+XdHXCMmdNXW1yk5 0ftw== 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; bh=6wIn0yogqcuJipaFx/vbOhKAx1thEtZ/s2EoYOhv8q4=; b=HTi0A3R+Wfp45D9oJomQCOUUUHv8Tr02kUItCtrDR//Va5jdT3+nIbfONkgmb9GYb+ drKlmsUcVHHR7UFl4nx1kUDXmU5RtAnmuIR+rtQRPOfQdAQbkXypPvE1JHt9VzsjHz3z cgEHEEx0hwX/xDvc2ADKCKNEsJJKoy0xT4dEZowVt7ODp6v1f5dsY3Edsqh8ke85NM3n 4DmvPcXeKtq/kwG/x/FKzdKlMVgPQ23u2N6Oe/bPC0k3u8+jmxZdjIhlIYOWOp3WFdWq W7FjzsU21fNEk6iKSWpdOpiPB4D9/ke66CIkvurDyCxYqivpts7RsOjIRJmIQs5P2Sxv hOPw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 12-20020a170902ee4c00b001782ecb617dsi3965605plo.412.2022.12.14.15.23.17; Wed, 14 Dec 2022 15:23:32 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229822AbiLNXVc (ORCPT + 99 others); Wed, 14 Dec 2022 18:21:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbiLNXVS (ORCPT ); Wed, 14 Dec 2022 18:21:18 -0500 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01A984AF20; Wed, 14 Dec 2022 15:21:16 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 9028720394; Thu, 15 Dec 2022 00:21:14 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Luca Weiss , Adam Skladowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] arm64: dts: qcom: pmi8950: Add USB vbus and id sensing nodes Date: Thu, 15 Dec 2022 00:20:44 +0100 Message-Id: <20221214232049.703484-2-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221214232049.703484-1-marijn.suijten@somainline.org> References: <20221214232049.703484-1-marijn.suijten@somainline.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1752233633253160348?= X-GMAIL-MSGID: =?utf-8?q?1752233633253160348?= USB sensing is performed on the PMIC, exposed as extcon nodes for use in the relevant USB (otg) driver nodes as the hardware itself is not able to sense USB presence (5V vbus) nor the role (ID pin). Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/qcom/pmi8950.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pmi8950.dtsi b/arch/arm64/boot/dts/qcom/pmi8950.dtsi index 32d27e2187e3..7a857b2f3a5a 100644 --- a/arch/arm64/boot/dts/qcom/pmi8950.dtsi +++ b/arch/arm64/boot/dts/qcom/pmi8950.dtsi @@ -12,6 +12,20 @@ pmic@2 { #address-cells = <1>; #size-cells = <0>; + pmi8950_usb_id: usb-id@1100 { + compatible = "qcom,pm8941-misc"; + reg = <0x1100>; + interrupts = <0x2 0x11 0x3 IRQ_TYPE_NONE>; + interrupt-names = "usb_id"; + }; + + pmi8950_usb_vbus: usb-detect@1300 { + compatible = "qcom,pm8941-misc"; + reg = <0x1300>; + interrupts = <0x2 0x13 0x2 IRQ_TYPE_NONE>; + interrupt-names = "usb_vbus"; + }; + pmi8950_vadc: adc@3100 { compatible = "qcom,spmi-vadc"; reg = <0x3100>; From patchwork Wed Dec 14 23:20:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 33398 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp21868wrn; Wed, 14 Dec 2022 15:23:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf7TVUCtbwjH/zGXuSJs/E3VwplLPM6a3IA/ic5crXnh6ozH9NeAMCEBUP2xQAtfJ7hsPa5k X-Received: by 2002:a17:90a:a2b:b0:219:84a8:bdb1 with SMTP id o40-20020a17090a0a2b00b0021984a8bdb1mr25717940pjo.4.1671060197191; Wed, 14 Dec 2022 15:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671060197; cv=none; d=google.com; s=arc-20160816; b=q4PSm4imTQc5Ol9RVCD2NYYiXZjdR+cLpWPb6SEEPxtQJZFsEu66uC6/VHClihudfI iHa3q4zHFjWtnrMp9dB7xzggZYOizJ9PesZb3hPSpiyeKumjpkPULAwmwniGBIPn71r6 HCvAfbbVXnyu5Ii5r/UfFcG2576biwQqsOsYUDOkYS0kO9Xelf39zaNCUZFLCToqMq2j g6gm87cvQBJTHrhKcer/5KxT5Oxn7mBB9ut7nS5C+fjxnLwLOXelCWGdNEl0eYb8VxO6 wmC3wl5xOpEVVyaJ1NK1JS9+lxnIDwJ4hlcJvzT34AYunmHDC9f1s0+0MDEa+df3Kky6 /t4Q== 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; bh=3MY2FMmCIxMQZZtoQ9NC9lVet9Qe2RiPICHdfGbWJGk=; b=Z7MnP4Y2ZWXWWjWzYFQKNZeUwBkBV8rmtV/aR4AAGAKZggN1Jg0a7G623AiEVbLlcH GPHlfRqh4w6EbALUcSCnMTqWQUOOMoEZNKPF0hY4KDnSDBiOPiAnrlTK13z+UndDTj7i hmIUrn5bXJiZsknbo4wV7BKgPz76Lss5ADDvqglTccwGVQWOOLjFCH6IZnrZpAx1PcxR t+5VPe3dJatmd6bN9W4lfAAvJe3mdljzB4LAlcMkWI0R/TG5fRleL+hG5A7/Qi9HwXbN kIns3Li0aR49u3qDMjsgYO8NRE7XknAw5cBkegijpP6LJtYH7joTJRmX6iWxv8rwFwEJ 1+Xw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mv20-20020a17090b199400b0021945f60e1asi3068430pjb.61.2022.12.14.15.23.03; Wed, 14 Dec 2022 15:23:17 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229820AbiLNXVi (ORCPT + 99 others); Wed, 14 Dec 2022 18:21:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbiLNXVT (ORCPT ); Wed, 14 Dec 2022 18:21:19 -0500 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A8E364C2 for ; Wed, 14 Dec 2022 15:21:17 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 58D8020384; Thu, 15 Dec 2022 00:21:15 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Luca Weiss , Adam Skladowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] arm64: dts: qcom: msm8956-loire: Add usb vbus and id extcons to ci-hdrc Date: Thu, 15 Dec 2022 00:20:45 +0100 Message-Id: <20221214232049.703484-3-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221214232049.703484-1-marijn.suijten@somainline.org> References: <20221214232049.703484-1-marijn.suijten@somainline.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1752233617330388373?= X-GMAIL-MSGID: =?utf-8?q?1752233617330388373?= ci-hdrc does not have the ability to detect voltage presence (5V vbus) on the USB connector nor the role (via an ID sensing pin), and relies on the PMIC-side charger to provide such information through an extcon driver. Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi | 2 ++ 1 file changed, 2 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 67baced639c9..700583a56a0e 100644 --- a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi @@ -77,6 +77,8 @@ &gcc { &otg { status = "okay"; + + extcon = <&pmi8950_usb_vbus>, <&pmi8950_usb_id>; }; &pm8004_spmi_regulators { From patchwork Wed Dec 14 23:20:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 33404 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp22296wrn; Wed, 14 Dec 2022 15:24:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf6CWbmZ1HQmw5OsrhyYmUqNDvP9qqjyxc+uaes1hX2PE7/h4MsFu7lWnL+0NzL31tpehoSI X-Received: by 2002:a17:90b:b04:b0:219:70fd:d8c0 with SMTP id bf4-20020a17090b0b0400b0021970fdd8c0mr26395925pjb.11.1671060262930; Wed, 14 Dec 2022 15:24:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671060262; cv=none; d=google.com; s=arc-20160816; b=t6skgTom1QHKAwD4r0H8Mpj4u/lMCS1MmtPHJzmTieX/dFVR3guNfLigLhVei5ZsaK U8E9ZkGkptexFC09W5GxCEhc2sfh6zLA1iF6FpqS9354RdZGO7Zy+ebmS8Dqy3nc1vgr RZSJLaFNKoRo+DpH6e6uxuX0Em5tBtJjHNuzKlntJ39qKFJMePHNf7+3W7bipNWT2cZm mNYZvrOIexC038W9rOX8glP72k0U94fu0xXUa0ucAjdJE78z0rrm9m5wMh2QDWoeYX9z iIP5m7TM2lPYLg+kkoNoXY0d4AaqQdR+hkjHuoqUwhXk17b3sGmIyQ+EcRLqhp7LJ4/r ONOw== 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; bh=MJ29YJwq+SKzc9rPMd8pjDfrmyOJqalfD8d/xbm2lX8=; b=aretf1EkBVaJq6eBFRfXoKKaJykI4djwq3QN16eic8fAnuWl1o7fI6YHChyjd+G3jr 3kmcshZn6RFsh67YUhk/eojnEjBDJ8CzSImy5AtiH19HkypDFB1x4AGHOPkm/qMIoyV+ TJ2VtfetyOBFmkxGpLwGfARP+xASRCT1vEkwnJIdmYRoPgdYTZmO9jcw9o29ljpZNUjh SKo+DAqAR2YFqM93PgmWxo9Pfj5UGGaMEuuS2CtOkhYwTH7rLpuxrn4q6GtTMpZu/07r Hq4jtQqnVOqxIi4ttP7JjTgHZ7XRfQZSL9aXc9kFBwIjMbGRi6IoGSMI42J1Sj4GwfmI iPBA== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id om5-20020a17090b3a8500b0021421d45058si3723553pjb.103.2022.12.14.15.24.09; Wed, 14 Dec 2022 15:24:22 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229912AbiLNXVm (ORCPT + 99 others); Wed, 14 Dec 2022 18:21:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229708AbiLNXVU (ORCPT ); Wed, 14 Dec 2022 18:21:20 -0500 Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it [IPv6:2001:4b7a:2000:18::170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 249874AF2A; Wed, 14 Dec 2022 15:21:18 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 20D7620392; Thu, 15 Dec 2022 00:21:16 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Luca Weiss , Adam Skladowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] arm64: dts: qcom: pmi8950: Add missing ADC channels Date: Thu, 15 Dec 2022 00:20:46 +0100 Message-Id: <20221214232049.703484-4-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221214232049.703484-1-marijn.suijten@somainline.org> References: <20221214232049.703484-1-marijn.suijten@somainline.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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?1752233686365636726?= X-GMAIL-MSGID: =?utf-8?q?1752233686365636726?= These seem to have previously been excluded due to either not residing on the test board, and/or lacking VADC_USB_DP/VADC_USB_DM definitions. Now that the channel constants are included in dt-bindings, add the channels to DT as well. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/pmi8950.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pmi8950.dtsi b/arch/arm64/boot/dts/qcom/pmi8950.dtsi index 7a857b2f3a5a..42a867685275 100644 --- a/arch/arm64/boot/dts/qcom/pmi8950.dtsi +++ b/arch/arm64/boot/dts/qcom/pmi8950.dtsi @@ -69,6 +69,30 @@ adc-chan@d { qcom,pre-scaling = <1 1>; label = "chg_temp"; }; + + adc-chan@e { + reg = ; + qcom,pre-scaling = <1 1>; + label = "ref_gnd"; + }; + + adc-chan@f { + reg = ; + qcom,pre-scaling = <1 1>; + label = "ref_vdd"; + }; + + adc-chan@43 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "usb_dp"; + }; + + adc-chan@44 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "usb_dm"; + }; }; pmi8950_mpps: mpps@a000 { From patchwork Wed Dec 14 23:20:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 33399 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp21955wrn; Wed, 14 Dec 2022 15:23:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf6OYdWrNRqHDHyqhgCPiQGsAXSQAGMZsyLPJ7YpBdYoqPjaXfjoWANEAwE3SQLjz3AFFFEe X-Received: by 2002:a05:6a21:6d9d:b0:a5:6ec:dbc3 with SMTP id wl29-20020a056a216d9d00b000a506ecdbc3mr41299568pzb.19.1671060209575; Wed, 14 Dec 2022 15:23:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671060209; cv=none; d=google.com; s=arc-20160816; b=hhGZA1qHy1yBAAr/VucGDFThMmhBNQe/oP2u4KjR04LXdrAhWacOMyda0TekEYG3s4 WrWeuZz8F1aYShyegmQAZvc6+wB9uwxZur2Ct7NN2sKmTJTH39KdtbPM8rWD2JL1m6sy IbCmH+wtc6NxXZZQ+q+xBnPm9j7nIBlkq22ucQEkPCwsOgMAcXwXUDF0anNOHak8ee6h 0EwWJMb4XCZQLYxSdQzmu/nY8ROFqu5VMx/ckw7Jm50H+Xade5KsHJRcm4eMOBiKLrXF kmJiO/Ki2pp7MniM296GxqszsS2mhXCRJ7Ip4goXSqfeVC9P3d9VtOMzvFK0gu/7DCwx Zp+Q== 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; bh=GA4f1kT/3lWT+nKP3iYBQBrRNclmM3GgFmq3yjPZXAk=; b=v7N5UrxYtRdmymyiqBGoJDkDVwMslGuvAqPxkTM5a3PQX0ZaasuSeoEd8o+4n0wVZI MIOPecrrJbYTw/VPq/239awym6qa7R2V2yZIHkc32pGMxR4Up/FNpNgyqFgSSrnLLh/O lNdrVh2f4n5oq9lPpAFDtIXh4yk3z/Y4SYqtOdiwtR939a7waylQArHazGVZPjPM8kyx ngiIPpX7hDsDLErfR3TLC3FOE27FYvByfHNhZ4Ukxavc/lRTyPbUWZVSOwKcr7duRCfs GnX7S0gh5TLkxfP1XqCx6MUcBsT+9bX43snywboqOYm1QnDmzgaxZSJHygEM+H6uF1Qd vjYg== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a632705000000b0047767ded526si1299980pgn.100.2022.12.14.15.23.15; Wed, 14 Dec 2022 15:23:29 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229846AbiLNXVp (ORCPT + 99 others); Wed, 14 Dec 2022 18:21:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbiLNXVW (ORCPT ); Wed, 14 Dec 2022 18:21:22 -0500 Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it [5.144.164.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8572C770; Wed, 14 Dec 2022 15:21:18 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id E1B8F20395; Thu, 15 Dec 2022 00:21:16 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Luca Weiss , Adam Skladowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] arm64: dts: qcom: msm8976: Declare and use SDC1 pins Date: Thu, 15 Dec 2022 00:20:47 +0100 Message-Id: <20221214232049.703484-5-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221214232049.703484-1-marijn.suijten@somainline.org> References: <20221214232049.703484-1-marijn.suijten@somainline.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1752233630163300312?= X-GMAIL-MSGID: =?utf-8?q?1752233630163300312?= Add the pinctrl states for SDC1 and use them on sdhc_1. Signed-off-by: Marijn Suijten --- arch/arm64/boot/dts/qcom/msm8976.dtsi | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi index 05dcb30b0779..7d4c7548882c 100644 --- a/arch/arm64/boot/dts/qcom/msm8976.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi @@ -508,6 +508,56 @@ tlmm: pinctrl@1000000 { interrupt-controller; #interrupt-cells = <2>; + sdc1_off_state: sdc1-off-state { + clk-pins { + pins = "sdc1_clk"; + drive-strength = <2>; + bias-disable; + }; + + cmd-pins { + pins = "sdc1_cmd"; + drive-strength = <2>; + bias-pull-up; + }; + + data-pins { + pins = "sdc1_data"; + drive-strength = <2>; + bias-pull-up; + }; + + rclk-pins { + pins = "sdc1_rclk"; + bias-pull-down; + }; + }; + + sdc1_on_state: sdc1-on-state { + clk-pins { + pins = "sdc1_clk"; + drive-strength = <16>; + bias-disable; + }; + + cmd-pins { + pins = "sdc1_cmd"; + drive-strength = <10>; + bias-pull-up; + }; + + data-pins { + pins = "sdc1_data"; + drive-strength = <10>; + bias-pull-up; + }; + + rclk-pins { + pins = "sdc1_rclk"; + bias-pull-down; + }; + }; + spi1_default: spi0-default-state { spi-pins { pins = "gpio0", "gpio1", "gpio3"; @@ -680,6 +730,11 @@ sdhc_1: mmc@7824000 { <&gcc GCC_SDCC1_APPS_CLK>, <&rpmcc RPM_SMD_XO_CLK_SRC>; clock-names = "iface", "core", "xo"; + + pinctrl-0 = <&sdc1_on_state>; + pinctrl-1 = <&sdc1_off_state>; + pinctrl-names = "default", "sleep"; + status = "disabled"; }; From patchwork Wed Dec 14 23:20:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 33403 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp22092wrn; Wed, 14 Dec 2022 15:23:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf723DKLXr0n/mtRojVTj9g3BShG+6Ds3+vnVgIN4lwD5Ww81Kd+uK3OB/R8sN3TxswEqbx1 X-Received: by 2002:a05:6a20:2aa4:b0:9d:efd3:66d4 with SMTP id v36-20020a056a202aa400b0009defd366d4mr41415074pzh.27.1671060227733; Wed, 14 Dec 2022 15:23:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671060227; cv=none; d=google.com; s=arc-20160816; b=h75ZRzxe7HFxL8Hgb6kV8SxAx5/STqYM+RcVhpM2RVIyHpin12aCLo+o2hZAaY032N oz3b97y+5o9hSd/O5gwin7smjL0o7uTu4UuwC6wsYmZvzXLJASCr9SxxJCwW//LSsya7 WzCmwn5buTfdz3r7Yqs5M7cwcotunZvhqQhJ4THccgbowYyxyzjdvTCug82LD1FjZZj1 RmKtWp6v4llzFGBsgZsh7k6giOq33UJJqQryJwQ1XEmE2E0KI0a8wu4+B4RD+wwxwfCy MbKYbl5csa5giZeLNN4p3ULBaIn8uNXTvLglLOjXJgmTy6btJJTLQMPaxGfElXwDCE5S mCSQ== 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; bh=bmRIZCEMiBm5Jkfk/kxP+frZ2FfiB3scBmCkU8A7JPo=; b=EsEKd2ZGAu7ZLpXY/8P2BwZAJ7zEkrlRQ+IDKIPux5RoQ4R+ren9ijsL25CVW6b84m 7jj89ZbcWsYGBzwepNYERjw51OXcXs7HMdTJGxsyvUkXRdZPSjr4u6H8PLTMekIoy9oL jFR4OlEDzU/ax8gLI8XkQUUZzTfztrc7a/xwv6hytnHN9qIqTye5Wuf9ib+9Hpye43mC 0GUEys0EGWykOMgE+NyTFKekaELzEZnyImKLTQt9x6hw36zA0xnzBQkXP2o0F1FS6ubd 0DKL0grnmElge2ADsIzT9ZBxm823S2BLK/4Re0kEGdOES3bGrdmSbKljv9cV8ChY4cx+ SDIQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx15-20020a056a00428f00b005726ac39d2esi1075683pfb.30.2022.12.14.15.23.32; Wed, 14 Dec 2022 15:23:47 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229480AbiLNXVw (ORCPT + 99 others); Wed, 14 Dec 2022 18:21:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbiLNXVX (ORCPT ); Wed, 14 Dec 2022 18:21:23 -0500 Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [5.144.164.164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DD3927143; Wed, 14 Dec 2022 15:21:19 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id C252020397; Thu, 15 Dec 2022 00:21:17 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Luca Weiss , Adam Skladowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] arm64: dts: qcom: msm8976: Declare and use SDC2 pins Date: Thu, 15 Dec 2022 00:20:48 +0100 Message-Id: <20221214232049.703484-6-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221214232049.703484-1-marijn.suijten@somainline.org> References: <20221214232049.703484-1-marijn.suijten@somainline.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1752233649305260999?= X-GMAIL-MSGID: =?utf-8?q?1752233649305260999?= Add the pinctrl states for SDC2 and use them on sdhc_2 to support SD Cards on the currently mainlined Sony Loire platform. Signed-off-by: Marijn Suijten --- .../qcom/msm8956-sony-xperia-loire-kugo.dts | 6 +++ .../dts/qcom/msm8956-sony-xperia-loire.dtsi | 6 +++ arch/arm64/boot/dts/qcom/msm8976.dtsi | 45 +++++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire-kugo.dts b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire-kugo.dts index 3fb8e23e4330..9178943e2ee1 100644 --- a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire-kugo.dts +++ b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire-kugo.dts @@ -33,3 +33,9 @@ &pm8950_l1 { regulator-min-microvolt = <1100000>; regulator-max-microvolt = <1300000>; }; + +&sdc2_on_state { + data-pins { + drive-strength = <8>; + }; +}; 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 700583a56a0e..2253fb05f1c9 100644 --- a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi @@ -264,6 +264,12 @@ &sdhc_1 { status = "okay"; }; +&sdc2_on_state { + clk-pins { + drive-strength = <10>; + }; +}; + &sdhc_2 { bus-width = <4>; cd-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>; diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi index 7d4c7548882c..f3371eaa2940 100644 --- a/arch/arm64/boot/dts/qcom/msm8976.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi @@ -558,6 +558,46 @@ rclk-pins { }; }; + sdc2_off_state: sdc2-off-state { + clk-pins { + pins = "sdc2_clk"; + drive-strength = <2>; + bias-disable; + }; + + cmd-pins { + pins = "sdc2_cmd"; + drive-strength = <2>; + bias-pull-up; + }; + + data-pins { + pins = "sdc2_data"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + sdc2_on_state: sdc2-on-state { + clk-pins { + pins = "sdc2_clk"; + drive-strength = <16>; + bias-disable; + }; + + cmd-pins { + pins = "sdc2_cmd"; + drive-strength = <10>; + bias-pull-up; + }; + + data-pins { + pins = "sdc2_data"; + drive-strength = <10>; + bias-pull-up; + }; + }; + spi1_default: spi0-default-state { spi-pins { pins = "gpio0", "gpio1", "gpio3"; @@ -751,6 +791,11 @@ sdhc_2: mmc@7864000 { <&gcc GCC_SDCC2_APPS_CLK>, <&rpmcc RPM_SMD_XO_CLK_SRC>; clock-names = "iface", "core", "xo"; + + pinctrl-0 = <&sdc2_on_state>; + pinctrl-1 = <&sdc2_off_state>; + pinctrl-names = "default", "sleep"; + status = "disabled"; }; From patchwork Wed Dec 14 23:20:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 33401 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp22076wrn; Wed, 14 Dec 2022 15:23:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf61x8uSFvRfPZ/rfPoXPMNmzqn1iyN8NEcFftd0JnfjxB4lpiKsI8coxxN4B2VP+Rtgpmdd X-Received: by 2002:a17:903:18c:b0:188:51c2:d378 with SMTP id z12-20020a170903018c00b0018851c2d378mr33777568plg.16.1671060224950; Wed, 14 Dec 2022 15:23:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671060224; cv=none; d=google.com; s=arc-20160816; b=NIhMhI9l1cDvrIOYrjSdBqAXv0Lm61FY7t/N1+9dXvUYit43+tr7OD5AbVfhoXTOiB mWzsRbT6A2aB+ZvLT1GUueptg+kbksCViGF/FnWbOmebK2MngIXjFbe7bG+7hby3j8eH uZqRrADlqWqLqN/A6EFtLsprcVemaa8GQq3lwKsZ2kyWXFEMkNUOygLSPLvyAn1mRwt4 sEY7j8+y/v6lGNPO6N4/g9RCpuSUleM88R+wiL+gLH3Qry8/r0E3jIo8V2D7xH79rYWh aFU7rpTaCn7WqdsZros1sCxHrrTBm8JS5YWPWfEQyb3GEmoR1Aj9HNJjXk/tTjml/Wz9 bPKQ== 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; bh=HeZnxR+x8D0tB/x5ssPIu1KklgEkahhNlJ12g4kIxJI=; b=GGgwyOMR1+9+Sw4YKB+i25nGKnDsMtjbCOC5rbm0vToNSQBYrKDAiuZiO5XxUfL479 fw8KsWePNHTBt85Hbk1LdtjEwkJVp+ELbrnThNXtKBfRYB8n0Z6aHdISQRS4Taoc3azF rBaISCp9SF9mV7F7SBujj66WTx0IIS8846oX4dKg34dKUmq2kKdrNCOgDXb3+VjXoPsm 2o+bJt/nt8gGxqMGQkW3MA2++4ZAUde0HwUlxjBt2ja2oT1E7NzAdZCv1/W4ZBBw1MFy GBPd1wFcg9FSwF5Z8kE5gIyapmD9X5ve8BKo7n5cdkGGB1sm42gtEFf2MTatYvqRojfA /kzQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a170902f1c500b00189bae9d90dsi3793234plc.149.2022.12.14.15.23.22; Wed, 14 Dec 2022 15:23:44 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229941AbiLNXVz (ORCPT + 99 others); Wed, 14 Dec 2022 18:21:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbiLNXVX (ORCPT ); Wed, 14 Dec 2022 18:21:23 -0500 Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [5.144.164.164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B19454B982 for ; Wed, 14 Dec 2022 15:21:20 -0800 (PST) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 8C1A620398; Thu, 15 Dec 2022 00:21:18 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Luca Weiss , Adam Skladowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] arm64: dts: qcom: msm8956-loire: Add SD Card Detect to SDC2 pin states Date: Thu, 15 Dec 2022 00:20:49 +0100 Message-Id: <20221214232049.703484-7-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221214232049.703484-1-marijn.suijten@somainline.org> References: <20221214232049.703484-1-marijn.suijten@somainline.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, 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?1752233646061257461?= X-GMAIL-MSGID: =?utf-8?q?1752233646061257461?= 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 --- .../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 2253fb05f1c9..a91b0af3e8c6 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; + }; +}; + &sdc2_on_state { clk-pins { drive-strength = <10>; }; + + sd-cd-pins { + pins = "gpio100"; + function = "gpio"; + drive-strength = <2>; + input-enable; + bias-pull-up; + }; }; &sdhc_2 {