From patchwork Sun Oct 30 07:32:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12937 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682090wru; Sun, 30 Oct 2022 00:33:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7kJTcV2FJXPtAXtbreZbuSJ3JCyHKGe0UVgGgByeQMUGWA/X8QG94dmtNhXZDlcniCjLY/ X-Received: by 2002:a17:90b:4b0b:b0:213:227d:149e with SMTP id lx11-20020a17090b4b0b00b00213227d149emr25294620pjb.145.1667115229815; Sun, 30 Oct 2022 00:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115229; cv=none; d=google.com; s=arc-20160816; b=Qz3EYg4tBONFuuM0m8TRRC5Sd4UMoLIiJBhKhXxSo0I/IyJvL/aQeC8wVSaCq8hVPY YeQaW4PSt1JdzNMeIJ97oFasvlDojkM0wvSTifQpFQVLDKtjl62v2peNOw5JDNg91OzQ +tSGbxLmHTQSSw3QeWAzDfL4KqZJTE23UT2CtfA6CDtyT9xLhqsD5fPacL4StKyEsHW4 OE3jLpYZ60t5OuvD93o2o+m+pZ+BLHsjxnDwdBtDhbEpBl7iGnlZcDYXfhUgwSOVQO78 HqKNh3SVSOMkmNNoMcTuo0w1AtZe0ObIRSeQzlcI1bU8kMzCvLayaacjDQ8AkF/L3dyP 0pGA== 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=XghxjIu37G0QdslXOBzmfOXdpqR7HlcYw6n/7d5tT/8=; b=lgaul4HdqQQiujd+i2RM4r4h8XzbNM7OPklW1lVmSH/XETO3OSkq2wMynmYCwwkrzR m7rVD81R4H8U1/aSQ1emPq70M7lvQrgC6Vx/BfeU0pKVOEJqo0lwYqDrbE6CYZL2pDee JoeqRnC6AWaCXXs/Sq3vqbeitNiHeA2MjjosMo8/AQXKOpcfL1QD+NiHkvcmVW5O+fIh foK3Fi0OoO5zyIRC9aiNmp8Zr5fcu76VBXgEDhjf5+P4I1s/DYe1WPUVogo0lMy6FS/A Zmaoifv10IHPUXM/IJ1vPnmtQoGJY8FmRjELR0Y/rkoM5a2fjRPdjS5w6sX203hBkZJU AMvg== 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 n6-20020a170902d2c600b00186e21234f2si5128865plc.177.2022.10.30.00.33.37; Sun, 30 Oct 2022 00:33:49 -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; 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 S230003AbiJ3Hcy (ORCPT + 99 others); Sun, 30 Oct 2022 03:32:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiJ3Hcs (ORCPT ); Sun, 30 Oct 2022 03:32:48 -0400 Received: from relay04.th.seeweb.it (relay04.th.seeweb.it [IPv6:2001:4b7a:2000:18::165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2583F301; Sun, 30 Oct 2022 00:32:44 -0700 (PDT) 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 240B41F948; Sun, 30 Oct 2022 08:32:42 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/10] arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2 Date: Sun, 30 Oct 2022 08:32:23 +0100 Message-Id: <20221030073232.22726-2-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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?1748097019294225498?= X-GMAIL-MSGID: =?utf-8?q?1748097019294225498?= Make sure the SDHCI hardware is properly reset before interacting with it, to protect against any possibly indeterminate state left by the bootloader. Suggested-by: Konrad Dybcio Signed-off-by: Marijn Suijten Reviewed-by: Luca Weiss Tested-by: Luca Weiss # sm7225-fairphone-fp4 Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index c39de7d3ace0..a3ae765d9781 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -490,6 +490,7 @@ sdhc_1: mmc@7c4000 { <&gcc GCC_SDCC1_APPS_CLK>, <&rpmhcc RPMH_CXO_CLK>; clock-names = "iface", "core", "xo"; + resets = <&gcc GCC_SDCC1_BCR>; qcom,dll-config = <0x000f642c>; qcom,ddr-config = <0x80040868>; power-domains = <&rpmhpd SM6350_CX>; @@ -1068,6 +1069,7 @@ sdhc_2: mmc@8804000 { <&gcc GCC_SDCC2_APPS_CLK>, <&rpmhcc RPMH_CXO_CLK>; clock-names = "iface", "core", "xo"; + resets = <&gcc GCC_SDCC2_BCR>; interconnects = <&aggre2_noc MASTER_SDCC_2 0 &clk_virt SLAVE_EBI_CH0 0>, <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_SDCC_2 0>; interconnect-names = "sdhc-ddr", "cpu-sdhc"; From patchwork Sun Oct 30 07:32:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12939 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682225wru; Sun, 30 Oct 2022 00:34:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7yRCSuaLOrZu5p1d7tpAYzLQ6jyoen8qI0PgFNa7EQSlhAklEreZeYGeT9lVdVDbpvbO+C X-Received: by 2002:a63:450b:0:b0:46f:6321:1e2c with SMTP id s11-20020a63450b000000b0046f63211e2cmr7299560pga.390.1667115250281; Sun, 30 Oct 2022 00:34:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115250; cv=none; d=google.com; s=arc-20160816; b=TycdA0SnOh4NxeB/ZxYy2eHaO89Y933mqD3ZDvVPw3ODYOIiZ+AH0tBEtkRaNaX6Hq uxsf2/dmHHRUIP//VHB2GRGc3IOjUJldFSJ0hiGOFCFLklXs59+G4F9vUlj5+/lhqmyj WraZiDKb44SwzatJG6KOImLhxJ3C702+KOpwPv6yTbBAJujGo3KdgNf5NVMez7F+k5MI ooKK595BltbQ5u1KSNzyzW4zu+CxnEh5TadckOMqq13VH6hwUXCKJ2QpaJD2l2rj9FXY LyQZoBtLuYBaCoB4nBa64RoZsX5ueCGIIbQ02LAE+6FTP5f103dQ7i94gOKiK6RZli18 gabw== 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=XyWyMV9wM4Rd/eROK4ngOxgG5QUA2BIRJkTGmff/3zA=; b=oEqjlisLgpjbCX+91oivOanPrNAWT5UPsa7RiKMLXIj8sogK0j6RceCGEgOAlRM90z pGR0H8XxJYeRbqxtZw7Uyo/Wzb4Kf4gUBEJU9F2MxM2rm0mqnkcU0if98L98465uZEMx dD54Xg6kLyoKMwfg03VLg2EP//KTVBkaBqvbPdM2fz7z7W2Fev0mwFOiPwmVdSVQrUbi I007bwGC3xgvCfeG2kOwplTE9HniIA+SHF1jczIdlnIXfpFVYBG8T/Bu9tFJdpeJxHlc Z1ipH66kiL2QsWX5lsoXnUBNKj6By18po57CBn/axzpxW/ek03WJ61Ccola+ybAQ76kh 2ydQ== 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 w19-20020a170902a71300b00176a1183050si4106665plq.80.2022.10.30.00.33.52; Sun, 30 Oct 2022 00:34:10 -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; 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 S229967AbiJ3HdF (ORCPT + 99 others); Sun, 30 Oct 2022 03:33:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbiJ3Hct (ORCPT ); Sun, 30 Oct 2022 03:32:49 -0400 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 767D5C55 for ; Sun, 30 Oct 2022 00:32:45 -0700 (PDT) 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 CBDC41F969; Sun, 30 Oct 2022 08:32:42 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/10] arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2 Date: Sun, 30 Oct 2022 08:32:24 +0100 Message-Id: <20221030073232.22726-3-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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?1748097041070720008?= X-GMAIL-MSGID: =?utf-8?q?1748097041070720008?= Use the generic pin functions specifically for sdc2. Signed-off-by: Marijn Suijten Reviewed-by: Luca Weiss Tested-by: Luca Weiss # sm7225-fairphone-fp4 Reviewed-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index a3ae765d9781..b98b881ebe7e 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -1074,6 +1074,10 @@ sdhc_2: mmc@8804000 { <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_SDCC_2 0>; interconnect-names = "sdhc-ddr", "cpu-sdhc"; + pinctrl-0 = <&sdc2_on_state>; + pinctrl-1 = <&sdc2_off_state>; + pinctrl-names = "default", "sleep"; + qcom,dll-config = <0x0007642c>; qcom,ddr-config = <0x80040868>; power-domains = <&rpmhpd SM6350_CX>; @@ -1316,6 +1320,46 @@ tlmm: pinctrl@f100000 { #interrupt-cells = <2>; gpio-ranges = <&tlmm 0 0 157>; + 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; + }; + }; + qup_uart9_default: qup-uart9-default-state { pins = "gpio25", "gpio26"; function = "qup13_f2"; From patchwork Sun Oct 30 07:32:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12938 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682093wru; Sun, 30 Oct 2022 00:33:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4WyXZ2v/1HATA6pocYnacGIOiuLOoZWBBrGKGRfuT1wY+TbgbrlTZFAhzTMJ4C269inC5y X-Received: by 2002:a17:902:ec8e:b0:186:f4ba:a7fc with SMTP id x14-20020a170902ec8e00b00186f4baa7fcmr7977920plg.55.1667115231120; Sun, 30 Oct 2022 00:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115231; cv=none; d=google.com; s=arc-20160816; b=p0u5jP6JgNXy0MLHBRA1WBsIVqmAw37dXDdM1Mtr3OMnLeCNjC2qVWaR1Jenso+m28 klQUczjcXs1NsyBZkm4JYu4S7wWGnjsmjvLh8hybTrOOTXOO5EWdGPmOHg5gUGH4yVeB BIzeWhOzlmnLIe3DH4mZTwoWj7+aQ0AZ6+pCThvECAWrcUQrYXQDfVLdl/d7ZnmNZDP7 BU+guVS7ylFPDCYjbR68oopo1iekj529cuFuoIvSSKBDnl+7pXnBLfqkSVZKEEpwhksH pWpulTtXS+MkGIHq71GevXU7V7n5g9log5o6m+WOXjYjQxoBu7sogdiLGJ6zrYisz+v2 m0KA== 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=pblRsOhktlGg7Ts0W13ZFlqEgYMqLk5i/RrCWu6WERc=; b=H4Z5sMDsrkyYkOgDtx4YjnxsJesuxMiTjHwxBbTrVDo302Z61RUBJhK8trDcnfBWj7 +isPa10pvMUV1pOH5iRP3mIcW0IoX9e/xls24EhkauTh9p1aVG1I7UyvbiORW+/oddD1 ZyPsNkC2P6hez2nCd/QRgzdblvFLAvzxYT+qhH+qyAUAqcbA5nBrhLhrshwY//NsrJU6 lMzu5S6YA73hGHBDWw7OgVefLh+X4dEGsUI8SLJc4xpV9iP7Hl3095rd3sda97YicNCO pgEcwN7qBUhYual3L1WEC7SmZNv+LyBz1T5ooJZIz8LrRnbaqiK6WbMt/1qoIhmXEfek fz1A== 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 v5-20020a170902b7c500b0017340861a6bsi3950346plz.611.2022.10.30.00.33.39; Sun, 30 Oct 2022 00:33:51 -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; 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 S230056AbiJ3HdA (ORCPT + 99 others); Sun, 30 Oct 2022 03:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbiJ3Hct (ORCPT ); Sun, 30 Oct 2022 03:32:49 -0400 Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it [5.144.164.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67447BF9 for ; Sun, 30 Oct 2022 00:32:45 -0700 (PDT) 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 808E21F9F7; Sun, 30 Oct 2022 08:32:43 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/10] arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off pinctrl Date: Sun, 30 Oct 2022 08:32:25 +0100 Message-Id: <20221030073232.22726-4-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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=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?1748097020341914987?= X-GMAIL-MSGID: =?utf-8?q?1748097020341914987?= 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 Reviewed-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski --- .../qcom/sm6350-sony-xperia-lena-pdx213.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts index 36911b9a5c04..9a96000fc95b 100644 --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts @@ -30,6 +30,24 @@ framebuffer: framebuffer@a0000000 { }; }; +&sdc2_off_state { + sd-cd-pins { + pins = "gpio94"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; +}; + +&sdc2_on_state { + sd-cd-pins { + pins = "gpio94"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; +}; + &sdhc_2 { status = "okay"; From patchwork Sun Oct 30 07:32:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12942 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682280wru; Sun, 30 Oct 2022 00:34:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM489zrUS34mPG38W4SKSa1njzUVETNnsd/5rcUGUitUL1NwXdCPBdWw9ipy1XVF+ulhsBD4 X-Received: by 2002:a63:87c7:0:b0:46b:3cf1:e163 with SMTP id i190-20020a6387c7000000b0046b3cf1e163mr7358343pge.112.1667115260334; Sun, 30 Oct 2022 00:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115260; cv=none; d=google.com; s=arc-20160816; b=cVYEadzEHx0SMwCJO1S2fJFqePUcGmPHXO6QixrALFLw6EYclYd5eoX/kWD1whXvq6 ao/ldZf15Itr8UZ4qr5oxevB8DIJ4ll7n/MJqSFP8Xotm40NphZakEWB5FsMvGogcMqB jEQGLq3q7Jm89QX1ZonwBFnvLnvl6K5RMlShlhoPOITFSw+ZzqYPikQIFsFGEPOBH2Tg IPxJ5Hh6Olrxi3KSRC3axaGp+LTlNsRAF6o45UbUiKb9M5IWTr0fh4UH2XGrhzH+amAR 0dBOJbNXmw4uCsPM9USglZI+i8HNle4HtJvv/WwlRlX4fy/KuAoG6pHnJNAe8P8OCoui nqVQ== 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=hVdzwHOGjx4WLxP2wdWn09mO7D9bGxi9y2i3raezwA8=; b=saB5wGAAjCtml4f/3ed0fRHJVGLpNV9zymREL1Vr78esuCgFSqBP026tWmhH5IqXV8 G0f9n++oR291MLMMxq743exlzynrh/iqj0ls/sth5tzKEb53dLDjX8Kr98X9964Yi2i0 NmvFKfmHfQtHl793X8hBEKZi2CA//BIP26lUNUem7MXa3gFlchhm9xT7W0fdN+5jkySi g2KTol3zJHTMyomHq7COxkhfa1n3z/ZUmegmv98xVYOjYSKg5TN5bWYd1iB8MZnUYPVL ShDfP7TV1Rpat3hRK4dkPmm8cJ93dKCzs6jGC9DAuGrbf+luR79RGE7p0p8p+B11Ndz6 oQhg== 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 14-20020a63174e000000b0045a5d846af1si4590356pgx.134.2022.10.30.00.34.05; Sun, 30 Oct 2022 00:34:20 -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; 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 S230122AbiJ3HdN (ORCPT + 99 others); Sun, 30 Oct 2022 03:33:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbiJ3Hcw (ORCPT ); Sun, 30 Oct 2022 03:32:52 -0400 Received: from relay04.th.seeweb.it (relay04.th.seeweb.it [5.144.164.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35B782AFA; Sun, 30 Oct 2022 00:32:46 -0700 (PDT) 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 363851FF2E; Sun, 30 Oct 2022 08:32:44 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/10] arm64: dts: qcom: pm6350: Include header for KEY_POWER Date: Sun, 30 Oct 2022 08:32:26 +0100 Message-Id: <20221030073232.22726-5-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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?1748097051057372787?= X-GMAIL-MSGID: =?utf-8?q?1748097051057372787?= Make pm6350.dtsi self-contained by including input.h, needed for the KEY_POWER constant used to define the power key. Fixes: d8a3c775d7cd ("arm64: dts: qcom: Add PM6350 PMIC") Signed-off-by: Marijn Suijten Reviewed-by: Luca Weiss Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/pm6350.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/pm6350.dtsi b/arch/arm64/boot/dts/qcom/pm6350.dtsi index 18c14257e2c1..111f4c1c56ae 100644 --- a/arch/arm64/boot/dts/qcom/pm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/pm6350.dtsi @@ -3,6 +3,7 @@ * Copyright (c) 2021, Luca Weiss */ +#include #include &spmi_bus { From patchwork Sun Oct 30 07:32:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12940 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682254wru; Sun, 30 Oct 2022 00:34:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49OiFVbjYwmxtNJco/NrrZX73nBUON06FqvRfPxPYFfGUWf9NBVjyxSBtIIkMR/ELyxLa1 X-Received: by 2002:a17:90b:1bce:b0:213:d0a2:72af with SMTP id oa14-20020a17090b1bce00b00213d0a272afmr1941252pjb.34.1667115255213; Sun, 30 Oct 2022 00:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115255; cv=none; d=google.com; s=arc-20160816; b=vYKAXX8KBSuJP1hQynf7YaEVdAJxbz8CYrXxdf+dBN3Wx7vE8GvmDBtfr21vVXTOTq XhZUo3ApZEU1ndmZ83baPCVXmpZ4FouLV0Lun9uIYxmRWyFc7P2YeWoTYdRui4mdO8Ei f6kUmoURmUU+SAb/r7KS7mOo1OuKqglyvgxY8LT0+oXrod0LAXKnhDX8iz5XKyG9kyyn KwtQ4awSe3S4STW5J40wMDC0WV+oBoatbbYlOCm1uDXL71raMTbXPeUkSNGrXT1K8HUI ckg9mDtLS0SnqVBimKD6Qw+b7S6YjgUKWwBoEaKbpuLyTK3XsGjy8LWG8dnstK4k7S0i /KoA== 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=D1F6NaVr44+llK1Tznmcm3DSlUbNIDUftRUs9PGSMKA=; b=Y9NMlq9eruxNp89TxkJsadgKdJrt+be3RXfTnPxpHFtCapSUMB2mCe3GDiMM1NK7Cb TM6Ql0tebl1zDzbaqeISIuix/+qjfFWCTJcaz2LzJ0nfvwGUngtyaiak3yDe3VjRMxC+ I0S7Z7/Dm0iYPEalipeA9E3huCceoIdvmfg9MjNecv9ypknjEHP/YJIA+8ZCvWK2SI2n 37ySySqNEG7TZG1wCIYBBDx2rt59fYp3atKJALZcgioVg6JZUk79qQggrlWvCK4Q7vQM QHfCwp00Rz702KMQya6P7g2Riw+lgdnvGaNCx1mQLqtXZfyac4FMia5LW3U4T122Vs0+ jAKQ== 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 q35-20020a17090a1b2600b00205d58e9125si4023733pjq.68.2022.10.30.00.33.59; Sun, 30 Oct 2022 00:34:15 -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; 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 S230008AbiJ3HdJ (ORCPT + 99 others); Sun, 30 Oct 2022 03:33:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbiJ3Hcw (ORCPT ); Sun, 30 Oct 2022 03:32:52 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [5.144.164.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C1E25FB1 for ; Sun, 30 Oct 2022 00:32:47 -0700 (PDT) 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 ED321200AC; Sun, 30 Oct 2022 08:32:44 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/10] arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons Date: Sun, 30 Oct 2022 08:32:27 +0100 Message-Id: <20221030073232.22726-6-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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?1748097045733078565?= X-GMAIL-MSGID: =?utf-8?q?1748097045733078565?= Include pm6350 to inherit its GPIO and button configuration, and configure "resin" to serve as volume up, and gpio2 as volume down. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio --- .../qcom/sm6350-sony-xperia-lena-pdx213.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts index 9a96000fc95b..4512b0bf7fe1 100644 --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts @@ -4,7 +4,9 @@ */ /dts-v1/; +#include #include "sm6350.dtsi" +#include "pm6350.dtsi" / { model = "Sony Xperia 10 III"; @@ -28,6 +30,35 @@ framebuffer: framebuffer@a0000000 { clocks = <&gcc GCC_DISP_AXI_CLK>; }; }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys_state>; + + key-volume-down { + label = "volume_down"; + linux,code = ; + gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pm6350_gpios { + gpio_keys_state: gpio-keys-state { + key-volume-down-pins { + pins = "gpio2"; + function = PMIC_GPIO_FUNC_NORMAL; + power-source = <0>; + bias-disable; + input-enable; + }; + }; +}; + +&pm6350_resin { + linux,code = ; + status = "okay"; }; &sdc2_off_state { From patchwork Sun Oct 30 07:32:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12941 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682277wru; Sun, 30 Oct 2022 00:34:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5PZzH8qmuJNthLtXqQxzY6RpvNtyncogG1Ci0+E5n73Ggql9/stvzEcaJdTnygH5LWP8pI X-Received: by 2002:a63:84c6:0:b0:46e:df48:afdd with SMTP id k189-20020a6384c6000000b0046edf48afddmr7250552pgd.458.1667115259922; Sun, 30 Oct 2022 00:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115259; cv=none; d=google.com; s=arc-20160816; b=nD7/jVCNEqEnoCSbMbqn7TfZE5aYXGiFTIe4khDobofIhOna2AB1/1sBBRZv6b4g5G yMTa6lXPK/+nuY/WSN3i68M8jJSFE8CLB6PIWlSfm9vxdv7IiMQzUpkCNTaKRs0r25vP cerQE2r3qJierXBVElcrl8k8OhCoOCcphTMkmVUowNU5O62+bM84XmksCKmhycKdgET+ LgYbzk1UAd2+hB+YT0ZAabp5TuS0bxRxstD6h50QA4q/oTYS3g8QiTZ+WtQdVdtu3o+K 4OF571SkL7uUyZvNC1apzIEi1mLxEjqG+lO10ti3Y9EMoQEzx1L1JL/WWIolH+PM1MhQ uFqg== 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=J8MZxYSF4xkpQE+y9tsPTrB0bTu70Hr+a9FRHIWEA74=; b=YsFSy6hvWNTlKXRdgJTBv1/cIN7Tqx2VKrzR7nDLEEy67sH7m5OfFNZqy3awq9gz0C bG/yb3k2jQ/CB58QhwyRwqAuJSZn/EE74K/jTTri7r4sJ+ICnlEeD4MkD4ko6l6+bGIS PLDhTSnSb2gkgh/IfnDlvmcV6BjGyfeXvAHZpvTqSjbe9EEXVj4UVux3klny/StNPv/u 9l9CiN4mteZtNprnD3elf+zR0vGB34HTG6c93an2oFYXGTM5gYH3NofRsMJ2txxcT1x1 8z0/ib9nECdvxKcsdBmLHlY+zE/APn4YeMhQvD2su2sj11UPJUxWjpb56RReVvvYn1rk QsBg== 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 g13-20020a65594d000000b0043c5d3dc0d4si4547055pgu.332.2022.10.30.00.34.05; Sun, 30 Oct 2022 00:34:19 -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; 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 S230140AbiJ3HdS (ORCPT + 99 others); Sun, 30 Oct 2022 03:33:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbiJ3Hcw (ORCPT ); Sun, 30 Oct 2022 03:32:52 -0400 Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [5.144.164.164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A49360C9; Sun, 30 Oct 2022 00:32:47 -0700 (PDT) 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 AF7A4200B9; Sun, 30 Oct 2022 08:32:45 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/10] arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators Date: Sun, 30 Oct 2022 08:32:28 +0100 Message-Id: <20221030073232.22726-7-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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?1748097051103508202?= X-GMAIL-MSGID: =?utf-8?q?1748097051103508202?= This regulator configuration was adopted from downstream, and is identical to the sm7225 FairPhone 4 configuration bar pm6350_l8a. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio --- .../qcom/sm6350-sony-xperia-lena-pdx213.dts | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts index 4512b0bf7fe1..1aaa9612b061 100644 --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts @@ -5,6 +5,7 @@ /dts-v1/; #include +#include #include "sm6350.dtsi" #include "pm6350.dtsi" @@ -44,6 +45,223 @@ key-volume-down { }; }; +&apps_rsc { + regulators-0 { + compatible = "qcom,pm6350-rpmh-regulators"; + qcom,pmic-id = "a"; + + pm6350_s1: smps1 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + }; + + pm6350_s2: smps2 { + regulator-min-microvolt = <1503000>; + regulator-max-microvolt = <2048000>; + regulator-initial-mode = ; + }; + + pm6350_l2: ldo2 { + regulator-min-microvolt = <1503000>; + regulator-max-microvolt = <1980000>; + regulator-initial-mode = ; + }; + + pm6350_l3: ldo3 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-initial-mode = ; + }; + + pm6350_l4: ldo4 { + regulator-min-microvolt = <352000>; + regulator-max-microvolt = <801000>; + regulator-initial-mode = ; + }; + + pm6350_l5: ldo5 { + regulator-min-microvolt = <1503000>; + regulator-max-microvolt = <1980000>; + regulator-initial-mode = ; + }; + + pm6350_l6: ldo6 { + regulator-min-microvolt = <1710000>; + regulator-max-microvolt = <3544000>; + regulator-initial-mode = ; + }; + + pm6350_l7: ldo7 { + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <1980000>; + regulator-initial-mode = ; + }; + + pm6350_l8: ldo8 { + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <3544000>; + regulator-initial-mode = ; + }; + + pm6350_l9: ldo9 { + regulator-min-microvolt = <1650000>; + regulator-max-microvolt = <3401000>; + regulator-initial-mode = ; + }; + + pm6350_l11: ldo11 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2000000>; + regulator-initial-mode = ; + }; + + pm6350_l12: ldo12 { + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <1980000>; + regulator-initial-mode = ; + }; + + pm6350_l13: ldo13 { + regulator-min-microvolt = <570000>; + regulator-max-microvolt = <650000>; + regulator-initial-mode = ; + }; + + pm6350_l14: ldo14 { + regulator-min-microvolt = <1700000>; + regulator-max-microvolt = <1900000>; + regulator-initial-mode = ; + }; + + pm6350_l15: ldo15 { + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1305000>; + regulator-initial-mode = ; + }; + + pm6350_l16: ldo16 { + regulator-min-microvolt = <830000>; + regulator-max-microvolt = <921000>; + regulator-initial-mode = ; + }; + + pm6350_l18: ldo18 { + regulator-min-microvolt = <788000>; + regulator-max-microvolt = <1049000>; + regulator-initial-mode = ; + }; + + pm6350_l19: ldo19 { + regulator-min-microvolt = <1080000>; + regulator-max-microvolt = <1305000>; + regulator-initial-mode = ; + }; + + pm6350_l20: ldo20 { + regulator-min-microvolt = <530000>; + regulator-max-microvolt = <801000>; + regulator-initial-mode = ; + }; + + pm6350_l21: ldo21 { + regulator-min-microvolt = <751000>; + regulator-max-microvolt = <825000>; + regulator-initial-mode = ; + }; + + pm6350_l22: ldo22 { + regulator-min-microvolt = <1080000>; + regulator-max-microvolt = <1305000>; + regulator-initial-mode = ; + }; + }; + + regulators-1 { + compatible = "qcom,pm6150l-rpmh-regulators"; + qcom,pmic-id = "e"; + + pm6150l_s8: smps8 { + regulator-min-microvolt = <313000>; + regulator-max-microvolt = <1395000>; + regulator-initial-mode = ; + }; + + pm6150l_l1: ldo1 { + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <1980000>; + regulator-initial-mode = ; + }; + + pm6150l_l2: ldo2 { + regulator-min-microvolt = <1170000>; + regulator-max-microvolt = <1305000>; + regulator-initial-mode = ; + }; + + pm6150l_l3: ldo3 { + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1299000>; + regulator-initial-mode = ; + }; + + pm6150l_l4: ldo4 { + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <3300000>; + regulator-initial-mode = ; + }; + + pm6150l_l5: ldo5 { + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <3300000>; + regulator-initial-mode = ; + }; + + pm6150l_l6: ldo6 { + regulator-min-microvolt = <1700000>; + regulator-max-microvolt = <3544000>; + regulator-initial-mode = ; + }; + + pm6150l_l7: ldo7 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3544000>; + regulator-initial-mode = ; + }; + + pm6150l_l8: ldo8 { + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <2000000>; + regulator-initial-mode = ; + }; + + pm6150l_l9: ldo9 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3544000>; + regulator-initial-mode = ; + }; + + pm6150l_l10: ldo10 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3401000>; + regulator-initial-mode = ; + }; + + pm6150l_l11: ldo11 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3401000>; + regulator-initial-mode = ; + }; + + pm6150l_bob: bob { + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <5492000>; + regulator-initial-mode = ; + regulator-allow-bypass; + }; + }; +}; + &pm6350_gpios { gpio_keys_state: gpio-keys-state { key-volume-down-pins { From patchwork Sun Oct 30 07:32:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12943 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682282wru; Sun, 30 Oct 2022 00:34:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5GzOj0woQKlbJ3q6Oi/FnU90q59Z++tpzNLg8+BaprZEq6gTDvuI4m4LsXlKbXr2ptrvCx X-Received: by 2002:a17:902:8544:b0:183:baae:cf8d with SMTP id d4-20020a170902854400b00183baaecf8dmr8197529plo.96.1667115260438; Sun, 30 Oct 2022 00:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115260; cv=none; d=google.com; s=arc-20160816; b=bFobCJLia8Z4kXP5lWFC2OyekeZdcnyCAEmswm5Wn+4WT+T5JUkuA2EWl9oNGXXFDS rPJ8K2aXfoGZFrh9QMvUKCmM04bxJ/MWhNV4WFXXpAdgQHG9k/aI/3N0aqNzUrk8P/Ye 8nxyHb1mb4VgxyfOlz0ld9y+uzGuturmjc9QvkONJ7vOhn4+a1U6uAoUhBx4Cgo8p6q/ NtSTBs5Fx13Yhuo5DhYon/jJQQfLKkhCQwORvogNTAk/KbKZi4thPTLxlTJZhdeW/MrF pigjKL+6rXtCqTVnOlgRprlN9A5Dbo7jWvmZDY1VfSlSqWQAXPapdZFJkV7ZTcM0CPaY S2Fw== 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=hweamoXUannlKVqBVboNeFLHGrCxjuofPJNxlXtfLfQ=; b=GDGT6E/MM3yJ2sLMeKqxcF+spiXwIcN9igzuUdNDk0ijHkXerkKXJpMVNJl1YhG4CT H5rZFF8fihMdj64IrMLIFwzzYI+qE5z3stg6DpDtWf8IUVqx/io4VsYJZCgDKjjzypYl sEJhfF7untfeE9dZpNQDZMi6rhQ9/CB4JSfwaHAUSEs0N4f+5eUb82Vbrk6CmxaVfmdN PFnjDL8MHApUFU9oluKOY03UDQnsYIgj3ZDUpe/zwLe9RJ4N/EKCyg07Aacu9MkcvcyX Q2jtiej7ZnkZMQo/UWdTu789g26Kwr7GYz+Gcd3lDM5ZizF+X6oF0WuRjopFMYOu8iz4 U7mw== 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 il3-20020a17090b164300b002008948605esi4962177pjb.13.2022.10.30.00.34.08; Sun, 30 Oct 2022 00:34:20 -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; 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 S230148AbiJ3HdV (ORCPT + 99 others); Sun, 30 Oct 2022 03:33:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229948AbiJ3Hcw (ORCPT ); Sun, 30 Oct 2022 03:32:52 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [IPv6:2001:4b7a:2000:18::162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DD7E2D9; Sun, 30 Oct 2022 00:32:48 -0700 (PDT) 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 61D1C200BC; Sun, 30 Oct 2022 08:32:46 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/10] arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot) Date: Sun, 30 Oct 2022 08:32:29 +0100 Message-Id: <20221030073232.22726-8-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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?1748097051639568633?= X-GMAIL-MSGID: =?utf-8?q?1748097051639568633?= Without power the SDCard slot / hardware remains dormant. Like many other platforms these regulators are used exclusively by SDHCI, and have their maximum voltage decreased to what downstream sets on the consumer side. Additionally the SDHCI driver supports setting a load, for which the regulator definition is extended much the same. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio --- .../dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts index 1aaa9612b061..5cb76026ef67 100644 --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts @@ -219,8 +219,13 @@ pm6150l_l5: ldo5 { pm6150l_l6: ldo6 { regulator-min-microvolt = <1700000>; - regulator-max-microvolt = <3544000>; + regulator-max-microvolt = <2950000>; regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; pm6150l_l7: ldo7 { @@ -237,8 +242,13 @@ pm6150l_l8: ldo8 { pm6150l_l9: ldo9 { regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <3544000>; + regulator-max-microvolt = <2960000>; regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = + ; + }; pm6150l_l10: ldo10 { @@ -300,6 +310,9 @@ sd-cd-pins { &sdhc_2 { status = "okay"; + vmmc-supply = <&pm6150l_l9>; + vqmmc-supply = <&pm6150l_l6>; + cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>; }; From patchwork Sun Oct 30 07:32:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12944 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682289wru; Sun, 30 Oct 2022 00:34:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4wHHBxbsAFc1SevAxCb8g47xTSidTgv6eogJ89DCMO0cRABu9iIH4qp4CAPt8UOXerUstZ X-Received: by 2002:a63:7e4d:0:b0:43c:8ce9:2a9f with SMTP id o13-20020a637e4d000000b0043c8ce92a9fmr7130852pgn.528.1667115261930; Sun, 30 Oct 2022 00:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115261; cv=none; d=google.com; s=arc-20160816; b=E3swkJKqdas/OHGhBO62QplKTCx5OnvUSMAwqru2jYZZuC73u5p4y/EfiWgLmsLMtb +Fc3b7R+OhezfarxKMjYEMrpSoVw9D7C94+1zHAa73MhX2A+LWWJdRyXQKklwST4QJU3 ik4TgYVE0miTuM58n2M4k/KFd/xOZ/cq12THwEF41evZnmDLpRCwz6d5by1xp5kxLZMV FEK2beVwpCuDVnJJ6IE1Ol5U/hdEIUGhDDnxzcBYJBKkwVOq9pPOCfqyU349EMLvIg6b ME9cM9Y35vPsdr9mMBQqHyD1YI1VW2Xvf9qVcYqpwu98YrzRAvL+n2RiJSTLAil7sjXq IZSA== 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=LX/O49o5NJTiq7YqDv7NVD/YkPzcYMmmSgvOPPLPCyU=; b=EzNjQ+ELAZoTGMqKWPiXczFGX4qckgCpwJK8JXBCVZksp7iGl4gDHnXDQQ8NIEMaSZ VdI9hL7dBGVbUMsc/lYBOwv3gglj+dp6i+CEXKiO0IlH/B1kypTrMzLHInRp0m/T1HMt ns1iVdBtT2p0TxjAR4WF5dJ5orhcxMaRD9pHMa8VLq0NNXBxTXky13CZL1tMY1ORsRvv VMmZpMDjYwql8c49EvUCiIwze9OE6IQqAEOKDEj7VCxL/UMeW+AldG9rVnFWAjb4qFq8 8ZrfxklwOrs/mq/Mw+s+U8q4R7MHNb64Q8DcAkg7Eko+7i+S6f6nvuO2yvtfiAal6yYW vsUw== 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 189-20020a6204c6000000b00563352f734asi3935886pfe.69.2022.10.30.00.34.09; Sun, 30 Oct 2022 00:34:21 -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; 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 S230160AbiJ3Hd0 (ORCPT + 99 others); Sun, 30 Oct 2022 03:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbiJ3Hcw (ORCPT ); Sun, 30 Oct 2022 03:32:52 -0400 Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [5.144.164.164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D21B2DE; Sun, 30 Oct 2022 00:32:48 -0700 (PDT) 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 256C1200D5; Sun, 30 Oct 2022 08:32:47 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/10] arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA Date: Sun, 30 Oct 2022 08:32:30 +0100 Message-Id: <20221030073232.22726-9-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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?1748097052488513112?= X-GMAIL-MSGID: =?utf-8?q?1748097052488513112?= Enable QUP and GPI DMA hardware to be able to add functioning I2C nodes later. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio --- .../dts/qcom/sm6350-sony-xperia-lena-pdx213.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts index 5cb76026ef67..6eb1d4e5e60f 100644 --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts @@ -272,6 +272,14 @@ pm6150l_bob: bob { }; }; +&gpi_dma0 { + status = "okay"; +}; + +&gpi_dma1 { + status = "okay"; +}; + &pm6350_gpios { gpio_keys_state: gpio-keys-state { key-volume-down-pins { @@ -289,6 +297,14 @@ &pm6350_resin { status = "okay"; }; +&qupv3_id_0 { + status = "okay"; +}; + +&qupv3_id_1 { + status = "okay"; +}; + &sdc2_off_state { sd-cd-pins { pins = "gpio94"; From patchwork Sun Oct 30 07:32:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12948 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682376wru; Sun, 30 Oct 2022 00:34:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5R2J3cWFqABtBuqDZkvmDtkiZI4/h7tJsf+g42GKJlg5+ewSSPrzAf6XCjHxF30aTg2rBl X-Received: by 2002:a17:907:ea7:b0:7ad:c3b7:ca52 with SMTP id ho39-20020a1709070ea700b007adc3b7ca52mr1978745ejc.626.1667115275915; Sun, 30 Oct 2022 00:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115275; cv=none; d=google.com; s=arc-20160816; b=X9qX/mVNW070WenZMfruHWKNvdZqiutbnHjEak949mr4+JYz6+Vu6XxJe5+pnh9Zxx yIh7eaBXViHn2IrQxdMES/gjnEX8Uj2hxQPAur82L5qiIokomOqJTCDlRWKrLLDXs/L7 SsZyPtBWx3WPDkZFn67SvV5MPBaRKf6mdO6+mQN5ncWptC6GWH4OjTR1mJHlJJ6Kqb/3 BHe4p6DJ7osyXJewRE5OrxUT0o2ToWZXw1DJBdokW53cTCQPwxmqsP8Y/OMuW4AM91L2 l1goT/qnIPVCYqwbMrwVi/K6jLvkMddvUFN6s7WdVvr8sYpaOPPd9EOwdjOjQeTZIXk2 pADg== 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=h70SHrzzuFW/WJ9cku+GpfFvWZuclH9jb0rCLn/C2ko=; b=BTV3m7dt/RSIvbnzT8xhtS89MzlFqftQFn4CiVyeareLdv/C7Fy3qMhtEyl93h87T+ 8hIiCIU7H3XE8liiXrc9shcRtxa2uZKpv7Wuu7Mf4PQmjBJmkXnixGKqBxcb0Kj4C2Cb KjEtbgwtYDWth9M4L21jvkwsUJa58Hr8EuPOh6Fxj9rsRyVVnCXpREXkRyc2YkbkfYBg MqDiWIi497s8THVRuIWD0kbjsNgXaq1Tq+7OSNgcIoqBWczyEpAcYzl0PKzIYqZqsBHC EyCviVv1J7NaOHFRF23fj/Eo9uWR9xpasTMrox4ePXGwgccKPW4gueEQhw+AwZLdMoJ3 mIHQ== 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 nc9-20020a1709071c0900b0078b96722000si4213013ejc.608.2022.10.30.00.34.12; Sun, 30 Oct 2022 00:34:35 -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; 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 S230167AbiJ3Hdb (ORCPT + 99 others); Sun, 30 Oct 2022 03:33:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbiJ3Hcx (ORCPT ); Sun, 30 Oct 2022 03:32:53 -0400 Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it [5.144.164.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0309962F8; Sun, 30 Oct 2022 00:32:49 -0700 (PDT) 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 D20C3200D9; Sun, 30 Oct 2022 08:32:47 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/10] arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen Date: Sun, 30 Oct 2022 08:32:31 +0100 Message-Id: <20221030073232.22726-10-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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?1748097067549805555?= X-GMAIL-MSGID: =?utf-8?q?1748097067549805555?= Use the generic samsung,s6sy761 touchscreen driver for this device, together with a few pins and regulators to power it up correctly. Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio --- .../qcom/sm6350-sony-xperia-lena-pdx213.dts | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts index 6eb1d4e5e60f..20f35623d1ef 100644 --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts @@ -43,6 +43,15 @@ key-volume-down { gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>; }; }; + + touch_en_vreg: touch-en-regulator { + compatible = "regulator-fixed"; + regulator-name = "touch_en_vreg"; + gpio = <&tlmm 10 GPIO_ACTIVE_HIGH>; + enable-active-high; + + vin-supply = <&pm6350_l6>; + }; }; &apps_rsc { @@ -280,6 +289,23 @@ &gpi_dma1 { status = "okay"; }; +&i2c8 { + clock-frequency = <400000>; + status = "okay"; + + touchscreen@48 { + compatible = "samsung,s6sy761"; + reg = <0x48>; + interrupt-parent = <&tlmm>; + interrupts = <22 0x2008>; + vdd-supply = <&pm6350_l11>; + avdd-supply = <&touch_en_vreg>; + + pinctrl-names = "default"; + pinctrl-0 = <&ts_int_default &ts_active>; + }; +}; + &pm6350_gpios { gpio_keys_state: gpio-keys-state { key-volume-down-pins { @@ -334,6 +360,21 @@ &sdhc_2 { &tlmm { gpio-reserved-ranges = <13 4>, <45 2>, <56 2>; + + ts_active: ts-active-state { + pins = "gpio21"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + + ts_int_default: ts-int-default-state { + pins = "gpio22"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + input-enable; + }; }; &usb_1 { From patchwork Sun Oct 30 07:32:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 12945 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682343wru; Sun, 30 Oct 2022 00:34:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6H2kNJMXPdTV2cgPo5pShy7CsfVhd1ATjLC5iKlgQgUaIPdev5w5GYUkI5rqovwQ2fPGTW X-Received: by 2002:a17:90a:be14:b0:213:c304:1d68 with SMTP id a20-20020a17090abe1400b00213c3041d68mr3737222pjs.80.1667115269820; Sun, 30 Oct 2022 00:34:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115269; cv=none; d=google.com; s=arc-20160816; b=O/wypR8W3L1p4ydOrwuoOgXLWBffPMwI0Y0ATxUKzP12Atmn6nc0S40frCwknvP2g+ 4KrW0YCMPdvupWZ4NK5r88kQ6bVpzhZpwIOpA4Z+rADwzPtgTr3tjuLL1vWOr26f43RB 1HHS2exLH7bldTNUuur9zgcwqJ7s6CPJvRpSWNthwv5r9XZC7+Cd6o9qutDu5VwC8bus xKAA7IvPuOrZ1FealJ5F1ligcS//HzdtPtFWKffXkXGFEVvim3w4h77aXGD2ZP3zEA7/ ScuJ81QMVq34W2uEepvmrSyC/IqizpDOz1ejg5fPHbjopiuKL5Pg24pWL1LKyM6C1FV0 n1Pw== 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=82/j9lbVNUIckm+LhYHZjpeeKQzg4pDsYrcNrlXcoRI=; b=yP4g09y3CGNltUdvFitpmL3iwtXT2+r6y8lyO5m7K6yujXcvrVwymemg5dv8sMTTNx fMGbO6/82O4Ky5Cj5hD4Lh+aC6MoIaQiuU3+qd/bin7BM2dM/6rEobAe//n/77tFWNVV pNnQmyeT99UxCxER9lqdCLtc1tJUbQE82Rsh5ZJAiKcR5gKM032Aze+nUIthP92lNKUh 8beoUJ2IEYywXqLnzHLI+PfKVj4rSMBzlEr3/C+bOGL0qOZOxrZuhzROy86uOVNDi9Zw llMDatqgexP2WiSKAH3jEZzYheW/GoqzBSDrHHSQxtEIpycQTZXRBM5Gd/4lfPD+0fer aPKw== 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 h11-20020a170902f70b00b00186a5b86ea3si4949007plo.50.2022.10.30.00.34.16; Sun, 30 Oct 2022 00:34:29 -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; 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 S230182AbiJ3Hdd (ORCPT + 99 others); Sun, 30 Oct 2022 03:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbiJ3Hcx (ORCPT ); Sun, 30 Oct 2022 03:32:53 -0400 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E064A615C; Sun, 30 Oct 2022 00:32:50 -0700 (PDT) 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 82D06200DF; Sun, 30 Oct 2022 08:32:48 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Luca Weiss , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/10] arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2 nodes Date: Sun, 30 Oct 2022 08:32:32 +0100 Message-Id: <20221030073232.22726-11-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221030073232.22726-1-marijn.suijten@somainline.org> References: <20221030073232.22726-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?1748097061003367744?= X-GMAIL-MSGID: =?utf-8?q?1748097061003367744?= When enabling the APPS SMMU the mainline driver reconfigures the SMMU from its bootloader configuration, loosing the stream mapping for (among which) the SDHCI hardware and breaking its ADMA feature. This feature can be disabled with: sdhci.debug_quirks=0x40 But it is of course desired to have this feature enabled and working through the SMMU. Signed-off-by: Marijn Suijten Reviewed-by: Luca Weiss Tested-by: Luca Weiss # sm7225-fairphone-fp4 Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index b98b881ebe7e..c309a359ded9 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -485,6 +485,7 @@ sdhc_1: mmc@7c4000 { interrupts = , ; interrupt-names = "hc_irq", "pwr_irq"; + iommus = <&apps_smmu 0x60 0x0>; clocks = <&gcc GCC_SDCC1_AHB_CLK>, <&gcc GCC_SDCC1_APPS_CLK>, @@ -1064,6 +1065,7 @@ sdhc_2: mmc@8804000 { interrupts = , ; interrupt-names = "hc_irq", "pwr_irq"; + iommus = <&apps_smmu 0x560 0x0>; clocks = <&gcc GCC_SDCC2_AHB_CLK>, <&gcc GCC_SDCC2_APPS_CLK>,