From patchwork Tue Sep 19 12:45:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 142033 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3570756vqi; Tue, 19 Sep 2023 10:48:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGg6z/EDMBV3xPjYoZK1suBVO+p5yGpyyg/oCjTDquNuT+/zNEzNRIwbejljGu9kLsjWAd3 X-Received: by 2002:a05:6a00:2e03:b0:68f:cdb8:ae33 with SMTP id fc3-20020a056a002e0300b0068fcdb8ae33mr4896177pfb.10.1695145686004; Tue, 19 Sep 2023 10:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695145685; cv=none; d=google.com; s=arc-20160816; b=Ghu833a45i5ZnXxFx/F+67Po+Ax9oana3PDJL9qO1syNb3Vq81eIwCawoyfxE0AyKU f71hmPWPI8ARjDkBQmE/aiW68qyWnzXGgccD33Qt935scoa5jGKspoQMnsNpDWCl445Z 3zisvB4fUj8ZK7v1iSUfRI8zufasvA5+3tZERYN8KqUCMbATT9Ps3eNI9rYT54128k1t oTWOSe9YwECUvmzjStC3Xh6U98i0pU4Mny2jxTCsmpc2AZeH0bS1VQmftj2YUsi7W8gs aHDyfIMRRuC30a9uZPG90tH/2l5PRg2PInfKxayjeYnUIxxGgxN4aU7PV+xb2i4T/nyv uIRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=1cayq2XwlrQqenkKdhvhc7PohXHp9znYKa41IjUAF5M=; fh=57Ku0CTLA12Md3K6sQXAemFuM2rYfMcgUlRGEKAlkzM=; b=ufhLY0xAKRPLe2ldrAyBt2R27FKBj7ASVc/wuNd4LfQmKbu4HnE3sIepkWU/D2xuAJ j5duTljo3RJ4MFeszEWUq8F0HhqgLE/gWr6wRn3EUO0NlrE19bPrx2X1bfP+/G9LtM2T Jlg648++GxDBGYdkewvnf2Fb1cdNj262om1Lo38xN1mcL6f+PDm2kAwzUPdb9/tRiUiL 9OrNa+u5LKsjogYk6DwcusizqqrrvPKNO4UxlMicJVP2hJnT6HafPPm50G8aj+nInAT9 QvrSjWluO0jInrdBAhSqIOMcJ6oiff5YiNjQpS5lzQsQM4Ik30VrvbfjmeQA60XcuVoR USEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=1jHnQ4nn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id z12-20020a63190c000000b00566022a3894si10063809pgl.415.2023.09.19.10.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 10:48:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=1jHnQ4nn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 021978049D60; Tue, 19 Sep 2023 05:46:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232269AbjISMqj (ORCPT + 26 others); Tue, 19 Sep 2023 08:46:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232133AbjISMqR (ORCPT ); Tue, 19 Sep 2023 08:46:17 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A3DC12F for ; Tue, 19 Sep 2023 05:46:08 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3ff1c397405so60881225e9.3 for ; Tue, 19 Sep 2023 05:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1695127566; x=1695732366; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1cayq2XwlrQqenkKdhvhc7PohXHp9znYKa41IjUAF5M=; b=1jHnQ4nnifw4Tu6o8RPPr/cQxt9dmogX5YtccjTHuwNL7YhLYIL5v6HyOk7WP2Yxn2 XPmwVGwch5YBwGeBzjiJ2yit/yBPvI53LZ/RHPleL1Rd7PYpGLLx20cQHLCypcDA2cr7 /a1LtU6oDy9B2v5q/OfQ1X4y0Bnw8VSMP++8g4rHEmim6PQ3Ch7+40sNs7URuMJlteJJ nzA/1POYQ7UvRnNvfvHAHYt1YzxOz8fKVw+cOWgdeF1j6MczUYbN/dnZ5Jhc2boXfRup BtNTBPU2D7j1Ehk1gFd38lFHGbYXvRQpUZDIgEvpzkAKjmOLw4juM8AdP0bBzY/P9yyF 4FTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695127566; x=1695732366; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1cayq2XwlrQqenkKdhvhc7PohXHp9znYKa41IjUAF5M=; b=mpYlT/wABvhYBQl8juJ+mnVZbt4Yh92Rvjk1XBxXnVzFNOwoU86UrOQGN26zOwsKBP wfjtHg2ROSpvw9/BptaNIfShFZtSFNkdf4Ue5d9IK7JKBnvkUgf63JLbJB3oZrYIEahs J+T7ZxI7us65bxBydV09P0R5YF+TDndxfYAhb36Bp4F5FcU9+9dWMh45OOrhrbqfoXsn a4Bg4haDiD5ECiLAOJ515/IS6ICH1G/jTEgXZbtd1OG90hTgWjXI7ZUodj4d+thiwHej V/LuZWa8RdWOnJ4rQn7r47EVJlr39L2T0YvcEZwfD3w9wo+AbJboyz5FlDoG3T0LZmF8 oW1w== X-Gm-Message-State: AOJu0YxgBi9Od3X4Dto/x9Vl6hPQ3HNGFYrq0H8xTs6W7qXlNmfikCex 8/jKhPt1MRLzIYfabk1JUU9Nqafu/0nEEd2F9HKwyh1G X-Received: by 2002:a05:6000:612:b0:321:55e6:9a12 with SMTP id bn18-20020a056000061200b0032155e69a12mr4808624wrb.6.1695127566482; Tue, 19 Sep 2023 05:46:06 -0700 (PDT) Received: from otso.luca.vpn.lucaweiss.eu (static-212-193-78-212.thenetworkfactory.nl. [212.78.193.212]) by smtp.gmail.com with ESMTPSA id dn22-20020a05640222f600b00532c1dfe8ecsm635878edb.66.2023.09.19.05.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 05:46:06 -0700 (PDT) From: Luca Weiss Date: Tue, 19 Sep 2023 14:45:57 +0200 Subject: [PATCH v2 3/7] arm64: dts: qcom: pm7250b: make SID configurable MIME-Version: 1.0 Message-Id: <20230919-fp5-initial-v2-3-14bb7cedadf5@fairphone.com> References: <20230919-fp5-initial-v2-0-14bb7cedadf5@fairphone.com> In-Reply-To: <20230919-fp5-initial-v2-0-14bb7cedadf5@fairphone.com> To: cros-qcom-dts-watchers@chromium.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Srinivas Kandagatla , Linus Walleij , "Rafael J. Wysocki" , Viresh Kumar Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 05:46:41 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777489082334771458 X-GMAIL-MSGID: 1777489082334771458 Like other Qualcomm PMICs the PM7250B can be used on different addresses on the SPMI bus. Use similar defines like the PMK8350 to make this possible but skip the ifndef based on maintainer feedback. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/qcom/pm7250b.dtsi | 14 +++++++------- arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm7250b.dtsi b/arch/arm64/boot/dts/qcom/pm7250b.dtsi index e8540c36bd99..df0afe82f250 100644 --- a/arch/arm64/boot/dts/qcom/pm7250b.dtsi +++ b/arch/arm64/boot/dts/qcom/pm7250b.dtsi @@ -39,16 +39,16 @@ trip2 { }; &spmi_bus { - pmic@2 { + pmic@PM7250B_SID { compatible = "qcom,pm7250b", "qcom,spmi-pmic"; - reg = <0x2 SPMI_USID>; + reg = ; #address-cells = <1>; #size-cells = <0>; pm7250b_temp: temp-alarm@2400 { compatible = "qcom,spmi-temp-alarm"; reg = <0x2400>; - interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; + interrupts = ; io-channels = <&pm7250b_adc ADC5_DIE_TEMP>; io-channel-names = "thermal"; #thermal-sensor-cells = <0>; @@ -60,7 +60,7 @@ pm7250b_adc: adc@3100 { #address-cells = <1>; #size-cells = <0>; #io-channel-cells = <1>; - interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + interrupts = ; channel@0 { reg = ; @@ -141,7 +141,7 @@ channel@99 { pm7250b_adc_tm: adc-tm@3500 { compatible = "qcom,spmi-adc-tm5"; reg = <0x3500>; - interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>; + interrupts = ; #thermal-sensor-cells = <1>; #address-cells = <1>; #size-cells = <0>; @@ -159,9 +159,9 @@ pm7250b_gpios: pinctrl@c000 { }; }; - pmic@3 { + pmic@PM7250B_SID1 { compatible = "qcom,pm7250b", "qcom,spmi-pmic"; - reg = <0x3 SPMI_USID>; + reg = ; #address-cells = <1>; #size-cells = <0>; }; diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts index 136e273d09a7..943d5a150b64 100644 --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts @@ -5,6 +5,10 @@ /dts-v1/; +/* PM7250B is configured to use SID2/3 */ +#define PM7250B_SID 2 +#define PM7250B_SID1 3 + /* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */ #define PMK8350_SID 6