From patchwork Sat Apr 1 22:07:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 258C1C77B60 for ; Sat, 1 Apr 2023 22:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230206AbjDAWIS (ORCPT ); Sat, 1 Apr 2023 18:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbjDAWIQ (ORCPT ); Sat, 1 Apr 2023 18:08:16 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56D0012845 for ; Sat, 1 Apr 2023 15:08:14 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id by14so7465787ljb.12 for ; Sat, 01 Apr 2023 15:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386892; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AggToq1LerLWW8VVOtxwYKPnVhm1iAj3sd5znRZbW7E=; b=b3TISBuujfIMLfND7fbsWNW3TLzKR+YacZ6TIAbqjKcaa9vbFl+Lo41HZKzBzFv9Q3 JWnOor3VFJqrGoQiwjhUrLkC2pnCfKV3bhuD5QjX1ACrX2ls2NBGkW42WOZi6H0kI8Ol T/h/NnzLHnPszfzTnbi90Sa2yAx9hP6UoXPFZR5iysNkgaOjfo86IzBWvAk1XyMJw52r XSuJmeM+ZsfVxAbHM2ObZd6f5sozQh/TZLI0RCRmtrWPkUIFdHJvODe3CmFGhzuHtnuq VT232aQkNtJBsvaPg7OjFmpyn9m741+ArVLddbOOD/bb7rFyOIwq1TNmsJhhUJ99hkbI 5ViQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386892; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AggToq1LerLWW8VVOtxwYKPnVhm1iAj3sd5znRZbW7E=; b=0za2FJqblCCWTyUAWdbkEM8QlEVUDe/a/ay39ADsSmb7nJLcvjyplVk/UIUWGcbvmu /r5LPk0TFcekwmpmbahETZ1komxZ64E46HLELL0lQoj/H2VUzY9ofRrvkvcqFxd+5rSR 9UyBDH+aKT1JA6OCQZF2LgPZ1zTuhSqtQ6VISGWM+C8nbGxeGEwlbwnaGuZ5ZWhgRb+y AJMjOA/SA/S20fchjq7H0fXlI9XAP5vYfha/6fhnc0ejlrgTEg7kT5zyN2wp5wXsZKUd 94f4CUiGxtu5mw/1bQYGCOdf/qUCldf4rGPzZD8GjLQV9LoCNuhsYqxyiIAvd4dYiLFd kZkA== X-Gm-Message-State: AAQBX9eZZqX9NQQJXSJmmMaUfbOVrruVeCgUGox1/mJ0ENa2aIjkQ2Ny wzBszFDLK3eK80TTE5e7VtlZ3w== X-Google-Smtp-Source: AKy350aiQGt1kwAWWmJxnSdDFlBt+Wu2X9kjyZezW2VbG9k6HLGbnlhvPf7VznQkv4uihVW8Nqz33w== X-Received: by 2002:a2e:988a:0:b0:29b:d235:2c50 with SMTP id b10-20020a2e988a000000b0029bd2352c50mr9219932ljj.25.1680386892586; Sat, 01 Apr 2023 15:08:12 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:12 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 02/22] arm64: dts: qcom: pm8350b: fix thermal zone node name Date: Sun, 2 Apr 2023 01:07:50 +0300 Message-Id: <20230401220810.3563708-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Correct the thermal zone node name to remove the clash with pm8350c.dtsi. Remove unused labels. Fixes: 5c1399299d9d ("arm64: dts: qcom: pm8350b: add temp sensor and thermal zone config") Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8350b.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm8350b.dtsi b/arch/arm64/boot/dts/qcom/pm8350b.dtsi index f1c7bd9d079c..95e971b80ccc 100644 --- a/arch/arm64/boot/dts/qcom/pm8350b.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8350b.dtsi @@ -8,19 +8,19 @@ / { thermal-zones { - pm8350b_thermal: pm8350c-thermal { + pm8350b-thermal { polling-delay-passive = <100>; polling-delay = <0>; thermal-sensors = <&pm8350b_temp_alarm>; trips { - pm8350b_trip0: trip0 { + trip0 { temperature = <95000>; hysteresis = <0>; type = "passive"; }; - pm8350b_crit: pm8350c-crit { + crit { temperature = <115000>; hysteresis = <0>; type = "critical"; From patchwork Sat Apr 1 22:07:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669500 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18094C77B75 for ; Sat, 1 Apr 2023 22:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230196AbjDAWIV (ORCPT ); Sat, 1 Apr 2023 18:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230199AbjDAWIR (ORCPT ); Sat, 1 Apr 2023 18:08:17 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB04A2659A for ; Sat, 1 Apr 2023 15:08:15 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id e9so11382388ljq.4 for ; Sat, 01 Apr 2023 15:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386894; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ORNKgb+wSUzqo2LQNzeZPsMRlHgqol5isFCZrnYrBHY=; b=VUa6COaTvnSAo0xBGO88h2BDU9PcUlS+m3qjsrQOAFah7VkyJ/FHNMLs+KAcJhTtY5 a1mqWh8XIX0mYVTJEBhuIHx/wFA9iPWypn4N9wWPKwnyrvqqUi3zANmaE5+xVbnyf03V RZa9qm4tEfH6xSA7r50TNBLxE11vV1n6rqur8xLVCJ1ICDAfp2f41YlRzv+jc83Rnmv9 Xf0JD6au+9mn3nK3QAGJW5DLxCmHCZDgBTFPbJzyLDuooYujnR37JvbTbBnK+dErOf3R qKYVLTcST9BymZA3kbLMKsg5piOCwfBMDyu4z9h1pCCR1+rznKKa5C5Y52ZDy9iJFUog a5og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386894; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ORNKgb+wSUzqo2LQNzeZPsMRlHgqol5isFCZrnYrBHY=; b=L9OhQI5ckiRJrf2g2tTaGCMqECz3H/wH1MGsi9um1Ei2DGZ81hDJcaXgHNiUBjNOq0 8Get7GlXADGa9UdE7RiOQTC3xkKwCiP4qal5vPHKfjdXZgFqGWN563apy4WYoTrYD+Ry /jWC32JKEAVsfbZz/8Ra15banxxp/60JRVaT/3ecV5gC1YWEdC3d+738+pAb3yLjAVZs w7NBykLzTn+ejzM0N/lRxomX4cbL5Megl841jlZs7p/NMEAUqJmX3RNNvhs2VpZe3Yko LS2VI7CnvI40Cix6gNNNqE4Bt3o8OzvZHZBiTYXZLjFf+AhV+fquaePsDkAxAKJEu5PN EBXw== X-Gm-Message-State: AAQBX9f4ePSblr18g3IQ4q3sKcS3aCsDcQeB8GTAaVKFm61P7u78cH+g l1huXVF10OdeiY+SOHubyG9+ow== X-Google-Smtp-Source: AKy350aKPyTxIHA0YZTXUNlr20lCOtPS3TZ7L3OHWyb5q/H/F9SixqKiaUTEcIIkfA5hvB0pEMB+gg== X-Received: by 2002:a2e:83d7:0:b0:29c:714e:57b5 with SMTP id s23-20020a2e83d7000000b0029c714e57b5mr9208976ljh.5.1680386893928; Sat, 01 Apr 2023 15:08:13 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:13 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 04/22] arm64: dts: qcom: sc8280xp-pmics: correct interrupt routing for pm8280_2_temp_alarm Date: Sun, 2 Apr 2023 01:07:52 +0300 Message-Id: <20230401220810.3563708-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The PMIC pm8280_2 has SID equal to 3, thus it interrupts-extended should use 3 as the first argument value. Fix the interrupts-extended value for pm8280_2_temp_alarm device node. Fixes: 6c82f40ec94e ("arm64: dts: qcom: sc8280xp-pmics: Add temp alarm for PM8280_{1/2} PMICs") Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index a3c7369f9594..254337345e45 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -176,7 +176,7 @@ pmc8280_2: pmic@3 { pm8280_2_temp_alarm: temp-alarm@a00 { compatible = "qcom,spmi-temp-alarm"; reg = <0xa00>; - interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + interrupts-extended = <&spmi_bus 0x3 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; #thermal-sensor-cells = <0>; }; From patchwork Sat Apr 1 22:07:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669498 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BDB5C77B74 for ; Sat, 1 Apr 2023 22:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230248AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3705F27819 for ; Sat, 1 Apr 2023 15:08:17 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id by14so7465849ljb.12 for ; Sat, 01 Apr 2023 15:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386895; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wo7hNFgWkmnMOkJb7IUde00I0wylcKYMGhkL0Te7EUM=; b=SH+EbcUlX4yL03lNwa4vuXBYV37S+JaguNgM4CWXCzaodw49NgcKRERthNX8HgTzE9 WJVIDOAG2U3NgYVm4gA0WAmQvpPcM9HZ3fcwBSuOU1ogH9/4DPcdxTUHVd8bncop2rft WpN88qD9XPZz7ocoQQGYE7wxTuuhSxS3UD3d4fwliaiikxL9U+0BOJbaBblHY4eQaWUi MbrZ/ZJ0NB97C4RMlJWWiISDRckPLqowcHD7/DiS4/vMoHhglfo6+tLUk+hOWmXederL LuK+OAh31toQhdA3qPRTwDx8bP143+EIoWOsKk3kPLNvyTlW5Q3rhywwhZlPmzNBEKf4 hcLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386895; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wo7hNFgWkmnMOkJb7IUde00I0wylcKYMGhkL0Te7EUM=; b=lPQcIIgriEJI9sKA+TqIR7udsvuhuX6IvcJ5j2s3rgGzrYH1Agm3gl5vff1XzUD9Uq qLQ/NSNGA8MDA8OUOy+Q6XRxsOR1ob8F1WL19O9UvDwTy0ian+sRL05WlaQXoKoTo3Pj Sx2p5v3ALh+twi8DGi5MWl9UD4og7jZVEyqfh/LXfikWJlN7gAAQlXeM3W/2kmhffynU Drzhfxnaveo4ypxuqohCS1ka/u0YEY7lk5c+5UufolaXacKIGORH7ax7QmfqnxdOhhsZ q72CdFxIAjVKELufgRbOq7j8nfk6Kj7IenWWYBtmEBLhqyJFvJLM73Ny+rKw7qPiGP92 M3KA== X-Gm-Message-State: AAQBX9fUuAP7ZloXhdLD973/tqsJTJ1vix8gAYQdoH7RnFIE8cxHjtFD U2Pd6pbJzj/v73qus+pHP2+ZIQ== X-Google-Smtp-Source: AKy350ZsWyAGhQPrVhlRvpsC6hpOup3F5JMBatVQQTkgFICDuU3e6rzjpfCJlvPcsMxpArvm7ghfLQ== X-Received: by 2002:a2e:b0d3:0:b0:2a2:e84c:bff9 with SMTP id g19-20020a2eb0d3000000b002a2e84cbff9mr9128136ljl.29.1680386895307; Sat, 01 Apr 2023 15:08:15 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:14 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 06/22] arm64: dts: qcom: pmk8350: rename pon label Date: Sun, 2 Apr 2023 01:07:54 +0300 Message-Id: <20230401220810.3563708-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org To reduce a possibility of the conflicts, rename pmk8350's pon_pwrkey and pon_resin to contain the PMIC name too. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pmk8350.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/sm8350-mtp.dts | 8 ++++---- arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi | 8 ++++---- arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi index f26fb7d32faf..455ffffb5f5c 100644 --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi @@ -25,14 +25,14 @@ pmk8350_pon: pon@1300 { reg = <0x1300>, <0x800>; reg-names = "hlos", "pbs"; - pon_pwrkey: pwrkey { + pmk8350_pon_pwrkey: pwrkey { compatible = "qcom,pmk8350-pwrkey"; interrupts = ; linux,code = ; status = "disabled"; }; - pon_resin: resin { + pmk8350_pon_resin: resin { compatible = "qcom,pmk8350-resin"; interrupts = ; status = "disabled"; diff --git a/arch/arm64/boot/dts/qcom/sm8350-mtp.dts b/arch/arm64/boot/dts/qcom/sm8350-mtp.dts index d21d2aacf201..152601832cbc 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8350-mtp.dts @@ -285,17 +285,17 @@ &mpss { firmware-name = "qcom/sm8350/modem.mbn"; }; -&pmk8350_rtc { +&pmk8350_pon_pwrkey { status = "okay"; }; -&pon_pwrkey { +&pmk8350_pon_resin { status = "okay"; + linux,code = ; }; -&pon_resin { +&pmk8350_rtc { status = "okay"; - linux,code = ; }; &qupv3_id_0 { diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi index 89382ad73133..e28f49e31b9f 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi @@ -618,17 +618,17 @@ vol_down_n: vol-down-n-state { }; }; -&pmk8350_rtc { +&pmk8350_pon_pwrkey { status = "okay"; }; -&pon_pwrkey { +&pmk8350_pon_resin { status = "okay"; + linux,code = ; }; -&pon_resin { +&pmk8350_rtc { status = "okay"; - linux,code = ; }; &qupv3_id_0 { diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi index 67538b5a557e..99e9b776b93d 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi @@ -684,11 +684,11 @@ &pmk8350_gpios { "PMK8350_OPTION"; }; -&pon_pwrkey { +&pmk8350_pon_pwrkey { status = "okay"; }; -&pon_resin { +&pmk8350_pon_resin { linux,code = ; status = "okay"; }; From patchwork Sat Apr 1 22:07:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E93C1C77B6E for ; Sat, 1 Apr 2023 22:08:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230243AbjDAWIW (ORCPT ); Sat, 1 Apr 2023 18:08:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 229B72703C for ; Sat, 1 Apr 2023 15:08:17 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id bx10so8316787ljb.8 for ; Sat, 01 Apr 2023 15:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dbYMjr8axBk3951HCSojoBjEFzExGGWWF+tXKuXtXzw=; b=rByn2aOlbs4CijcEPk7eFC1228R7hF2TZ22PmjQlvQRWcukEy4FoPbjCOAO0tdSnBV 0FroMWOe9kcKSqzHDnl3IInbCZNv9hQeP+XSqdnUr66L9M3bujkpmWz37RQHYULjdlOs 7oNP6J5SAG8WPuD+xFGcKQOT0kVwuXZHcKLv5VMpusHkouOWK5mnGj0Cb5vvcbAcATgD DlldJ3iO+UzIPJ3VfuRFwZod4Iwt0+DDSi1/VnLzSJQwUQ6GlemqxqH+pX3eDI4Bj1LY kLTEHvvRlA0zEu02E/rZVOQ0m+3OUYfRwdyyHzfGGdJilktdtSHoweM4OBzFBdqqUs3D WpJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dbYMjr8axBk3951HCSojoBjEFzExGGWWF+tXKuXtXzw=; b=GntbtVU1tufR40pzGk6F09h63LFagjiUn9LBCf2aAHb5fl/MOaMDQd3lCZb819JRoU 0WFcQPVEI9/EMArOUWbe5mPy6TnYWrKMub0MQezaRf3+4Ih7F4WDhAG7vsAi3inkNi2d nKaf66zy6YMZnEDnPmi9wXyPArqIvRr0jyFUeX1iwLYvB5yzY8yX+kUBgEzXj1tQukEj A8c2f4grHOcgU0CrjweIrVET7x6bRecJwtmxkuM3pe28frG3sdKeBz7QH/TsDZnL/I/d PSAl3kIM9HSzUAll0POf1uJwBg4P1s9OywlN3XN4BBb1C9fScA6B4+pxMF8CHqY2VlcH MM5w== X-Gm-Message-State: AAQBX9fApC/D1Q7doTiZ92wZ1U2NrM3nTIvGxMc8fcXKCRL4xrYkLkRU OTtet4W8AEMAx8LyDi49u5dcGQ== X-Google-Smtp-Source: AKy350acBpKROXD/B0ZV4u66ffLJMowqKcRArGgeLknsFWg1GCMr+JKspSwRwwMRd52TO4gwGxQavw== X-Received: by 2002:a2e:8543:0:b0:298:aa76:2fb8 with SMTP id u3-20020a2e8543000000b00298aa762fb8mr9700370ljj.12.1680386896681; Sat, 01 Apr 2023 15:08:16 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:16 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 08/22] arm64: dts: qcom: pmk8350: rename PMK8350_SID to PMIC_SID Date: Sun, 2 Apr 2023 01:07:56 +0300 Message-Id: <20230401220810.3563708-9-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Several next patches are going to introduce flexibility into several other PMICs in order to support variable SID and node labels. This will result in close duplication of several similar preprocessor constructions. Having a per-PMIC defines would be error prone and can result in hard-to-notices mistakes. Thus rename PMK8350_SID to a generic PMIC_SID. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pmk8350.dtsi | 20 ++++++++++--------- .../qcom/sm6375-sony-xperia-murray-pdx225.dts | 7 ++++--- .../boot/dts/qcom/sm7225-fairphone-fp4.dts | 6 +++--- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi index 26e40dbfc173..02e7518ab57b 100644 --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi @@ -9,14 +9,14 @@ #include /* (Sadly) this PMIC can be configured to be at different SIDs */ -#ifndef PMK8350_SID - #define PMK8350_SID 0 +#ifndef PMIC_SID + #define PMIC_SID 0 #endif &spmi_bus { - pmk8350: pmic@PMK8350_SID { + pmk8350: pmic@PMIC_SID { compatible = "qcom,pmk8350", "qcom,spmi-pmic"; - reg = ; + reg = ; #address-cells = <1>; #size-cells = <0>; @@ -27,14 +27,14 @@ pmk8350_pon: pon@1300 { pmk8350_pon_pwrkey: pwrkey { compatible = "qcom,pmk8350-pwrkey"; - interrupts = ; + interrupts = ; linux,code = ; status = "disabled"; }; pmk8350_pon_resin: resin { compatible = "qcom,pmk8350-resin"; - interrupts = ; + interrupts = ; status = "disabled"; }; }; @@ -44,14 +44,14 @@ pmk8350_vadc: adc@3100 { reg = <0x3100>; #address-cells = <1>; #size-cells = <0>; - interrupts = ; + interrupts = ; #io-channel-cells = <1>; }; pmk8350_adc_tm: adc-tm@3400 { compatible = "qcom,adc-tm7"; reg = <0x3400>; - interrupts = ; + interrupts = ; #address-cells = <1>; #size-cells = <0>; #thermal-sensor-cells = <1>; @@ -62,7 +62,7 @@ pmk8350_rtc: rtc@6100 { compatible = "qcom,pmk8350-rtc"; reg = <0x6100>, <0x6200>; reg-names = "rtc", "alarm"; - interrupts = ; + interrupts = ; status = "disabled"; }; @@ -86,3 +86,5 @@ pmk8350_gpios: gpio@b000 { }; }; }; + +#undef PMIC_SID diff --git a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts index b691c3834b6b..863fc1f4b0b6 100644 --- a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts +++ b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts @@ -5,13 +5,14 @@ /dts-v1/; -/* PMK8350 is configured to use SID6 instead of 0 */ -#define PMK8350_SID 6 - #include #include "sm6375.dtsi" #include "pm6125.dtsi" + +/* PMK8350 is configured to use SID6 instead of 0 */ +#define PMIC_SID 6 #include "pmk8350.dtsi" + #include "pmr735a.dtsi" /* PM6125 PON is used and we can't have duplicate labels */ diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts index af6cf4fbddc7..965b37245007 100644 --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts @@ -5,9 +5,6 @@ /dts-v1/; -/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */ -#define PMK8350_SID 6 - #include #include #include @@ -18,6 +15,9 @@ #include "pm6150l.dtsi" #include "pm6350.dtsi" #include "pm7250b.dtsi" + +/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */ +#define PMIC_SID 6 #include "pmk8350.dtsi" / { From patchwork Sat Apr 1 22:07:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669497 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EF1DC77B7E for ; Sat, 1 Apr 2023 22:08:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229970AbjDAWIZ (ORCPT ); Sat, 1 Apr 2023 18:08:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbjDAWIU (ORCPT ); Sat, 1 Apr 2023 18:08:20 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E36C2658B for ; Sat, 1 Apr 2023 15:08:18 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id t14so26659864ljd.5 for ; Sat, 01 Apr 2023 15:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386898; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ySASawghnPCNQg5Zy9Kh+8NS4Lf0RS8xKbNr318Bjz8=; b=W0BR1gprWBEUrZUSxwGBb2IrWYBu6TvL+Dc/SDq4/zx5tgDU+fWf342LRyB2KIZh+L nwVFdMoA74rq3OlHa5HCY6r9aYojW7LQytxykdn2WDRwuxl4TrqruoDonbb2+TYfwAhr bjBR0sqlqD/28o2nOQPa+OMO3Y2D6DNtIdz0mppoODFZdqFS5kMfGx+J1AQptN+APNio gRNLKjrp8OsXZHYZl4ouwN+Zwq22jx3dtnuP/Owk627psJrDGxhEt4X3fklh5wx0DoO+ EsnULcnbyVDzueAGouaRcoRFR+sZ0vXix2pv21xsoP37Dk60Fh6WID2pNi+A5I9C0KRi zqUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386898; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ySASawghnPCNQg5Zy9Kh+8NS4Lf0RS8xKbNr318Bjz8=; b=A+NpXErtBqoDK6SXhPSmLiipykiXeq6Zwqs+M4D1FKxP4PRjNUnb8Y02W6j4UlLZfI vE6y4+k1/3uHWWDJL5llebGSsMxsVsMzM+HuB0wGISML1ZPilpc/O3ldCJe9oACkYbEY IaPYvPtDqH/1MdHc2uKbZmv/cvEt9WPsiOgZSwRrJDh2pOhY0gEyXCYDGDDC3uXHdMOA tkGbOIUb3qLNEogqFdqVMfeWvxc28GAvHYpK7ZoTHvnC5aBhEc15joNnru/KxqcQLctg oHxpGl0uHfmIRU6u/CMs2/0w6B1y1byYxrGI02UmouC6Q9EM0W7ZN9qBwv7vsjFCyrny ADyw== X-Gm-Message-State: AAQBX9e2izSOgmwkoP7NxxmMYhFjytNAn+cWSxNFF6UkdHDpjDzdj0tS pJPvDPORG+acsCAkquK1x6RQITV8hNU80zgVRI9jLQ== X-Google-Smtp-Source: AKy350ZxmTIiCYo+Tt/BzPNE4954hOljzXSHARk88CEN9GKuAWOPcmQQHgcJ9VX7U4x5wCjxcr4Smw== X-Received: by 2002:a2e:8417:0:b0:2a6:1961:c865 with SMTP id z23-20020a2e8417000000b002a61961c865mr3122267ljg.12.1680386897818; Sat, 01 Apr 2023 15:08:17 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:17 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 10/22] arm64: dts: qcom: pmk8350: use interrupts-extended for IRQ specification Date: Sun, 2 Apr 2023 01:07:58 +0300 Message-Id: <20230401220810.3563708-11-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org As stated in the commit 2d5cab9232ba ("arm64: dts: qcom: sc8280xp-pmics: Specify interrupt parent explicitly"), we should not use bare interrupts for our PMIC devices. Instead interrupts-extended should be used. Change pmk8350.dtsi to use interrupts-extended propery. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pmk8350.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi index f26ff3daf119..87b8e4269c60 100644 --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi @@ -33,14 +33,14 @@ LABEL(pon): pon@1300 { LABEL(pon_pwrkey): pwrkey { compatible = "qcom,pmk8350-pwrkey"; - interrupts = ; + interrupts-extended = <&spmi_bus PMIC_SID 0x13 0x7 IRQ_TYPE_EDGE_BOTH>; linux,code = ; status = "disabled"; }; LABEL(pon_resin): resin { compatible = "qcom,pmk8350-resin"; - interrupts = ; + interrupts-extended = <&spmi_bus PMIC_SID 0x13 0x6 IRQ_TYPE_EDGE_BOTH>; status = "disabled"; }; }; @@ -50,14 +50,14 @@ LABEL(vadc): adc@3100 { reg = <0x3100>; #address-cells = <1>; #size-cells = <0>; - interrupts = ; + interrupts-extended = <&spmi_bus PMIC_SID 0x31 0x0 IRQ_TYPE_EDGE_RISING>; #io-channel-cells = <1>; }; LABEL(adc_tm): adc-tm@3400 { compatible = "qcom,adc-tm7"; reg = <0x3400>; - interrupts = ; + interrupts-extended = <&spmi_bus PMIC_SID 0x34 0x0 IRQ_TYPE_EDGE_RISING>; #address-cells = <1>; #size-cells = <0>; #thermal-sensor-cells = <1>; @@ -68,7 +68,7 @@ LABEL(rtc): rtc@6100 { compatible = "qcom,pmk8350-rtc"; reg = <0x6100>, <0x6200>; reg-names = "rtc", "alarm"; - interrupts = ; + interrupts-extended = <&spmi_bus PMIC_SID 0x62 0x1 IRQ_TYPE_EDGE_RISING>; status = "disabled"; }; From patchwork Sat Apr 1 22:08:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669496 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65116C7EE20 for ; Sat, 1 Apr 2023 22:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230205AbjDAWI1 (ORCPT ); Sat, 1 Apr 2023 18:08:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230242AbjDAWIW (ORCPT ); Sat, 1 Apr 2023 18:08:22 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF23912845 for ; Sat, 1 Apr 2023 15:08:20 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id h9so26658232ljq.2 for ; Sat, 01 Apr 2023 15:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386899; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DgfrnwWfT0ZByQejr3H6Nf3Cbs6AKTJqWqNsjbKuQAg=; b=pSlZejAKAfCt8wjCs7PP47yjBAGcetQT5QN4KyE4e+eWoDmRMAudONk5ZwdJVliefa nZ4c3lY+qMmc5ObDtk7qa3knOsnWPGSm4QWPzFFoWiEXUTHU2kILuNV1EpVFyrfmTxZf bSIT1gG4n5vUQF8MIPCCwZgogD8w0Uwq1w4s9rxPBFRSQ4aF6x8eVCYUzPmC7d1pLp7F QHQRB1H9t5rrhxq3hlKcJdKd8Ano0CLZQwRubzg3E5cVGXgQH77/YBN6Qn2MKvCWt94N m/uGpmhnuK+SBnF3N28ey5sH+OonEDFnyW4jlsUq85CyFYxcuGSEJXeZvuWpco3DypQk eXNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386899; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DgfrnwWfT0ZByQejr3H6Nf3Cbs6AKTJqWqNsjbKuQAg=; b=QggaZCVXq6Ebj/Hz5UxbPPD29lpQP8GNHue9BMrPEMJY+Dql4L4tr8K8284QKoLtSx VbS2GxUKlbQ1PF6MCZAxb8xHxo1HMZeNIqluBXv/Zm46aEL0ZrZ9dHKAVUGxJoohMK2t ocDTwVKL9/I6PujSClK2l0h1JDPOvPIKS0UsAJFtQ94XK9zFszyHzNCm5Q0A1nxBA5kP 3Pl2lqttPirPd0b1Hk4kBjEfXmnY0s2dw+QpKlMiNOuJNDHpBEuZGdF0DMQAmxdlVCVK xGE6wAH0x0o49tFZlUX+9KRXATcRt+ICBimsulJ4xkuHvec/exU9kemAljEOmnkPmRDP PRUw== X-Gm-Message-State: AAQBX9e7zKldlFmfLk9vLLsIClWmUgrjUjWItThIJUnVTOzIxwHg1pZM TDNPda/NuhOJU5dCEXUHOqZDrw== X-Google-Smtp-Source: AKy350aBTXWUHkOoWWpMiB5LjRWMtYr+sdwftDAorySY6Rt+TMIBXriebG11fJ5qLoogFUA1yoY4qQ== X-Received: by 2002:a2e:8715:0:b0:298:a7c3:c26a with SMTP id m21-20020a2e8715000000b00298a7c3c26amr9124268lji.25.1680386899049; Sat, 01 Apr 2023 15:08:19 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:18 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 12/22] arm64: dts: qcom: pm8350: allow overriding SID and label Date: Sun, 2 Apr 2023 01:08:00 +0300 Message-Id: <20230401220810.3563708-13-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The platform can use several instances of PM8350 PMIC. Allow overriding the SID and node labels inside pm8350.dtsi. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8350.dtsi | 29 ++++++++++++++----- arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi | 3 ++ arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi | 6 ++++ 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm8350.dtsi b/arch/arm64/boot/dts/qcom/pm8350.dtsi index 9fb963df4b41..b7b14b5fe67d 100644 --- a/arch/arm64/boot/dts/qcom/pm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8350.dtsi @@ -6,12 +6,23 @@ #include #include +/* (Sadly) this PMIC can be configured to be at different SIDs */ +#ifndef PMIC_SID + #define PMIC_SID 1 +#endif + +#ifndef PMIC_LABEL + #define PMIC_LABEL pm8350 +#endif + +#include "pmic-dyn-header.dtsi" + / { thermal-zones { - pm8350-thermal { + NODE(thermal) { polling-delay-passive = <100>; polling-delay = <0>; - thermal-sensors = <&pm8350_temp_alarm>; + thermal-sensors = <&LABEL(temp_alarm)>; trips { trip0 { @@ -31,27 +42,29 @@ crit { }; &spmi_bus { - pm8350: pmic@1 { + PMIC_LABEL: pmic@PMIC_SID { compatible = "qcom,pm8350", "qcom,spmi-pmic"; - reg = <0x1 SPMI_USID>; + reg = ; #address-cells = <1>; #size-cells = <0>; - pm8350_temp_alarm: temp-alarm@a00 { + LABEL(temp_alarm): temp-alarm@a00 { compatible = "qcom,spmi-temp-alarm"; reg = <0xa00>; - interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + interrupts = ; #thermal-sensor-cells = <0>; }; - pm8350_gpios: gpio@8800 { + LABEL(gpios): gpio@8800 { compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio"; reg = <0x8800>; gpio-controller; - gpio-ranges = <&pm8350_gpios 0 0 10>; + gpio-ranges = <&LABEL(gpios) 0 0 10>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; }; }; }; + +#include "pmic-dyn-footer.dtsi" diff --git a/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi index 1c81269f0783..29b10e7fb8c3 100644 --- a/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi +++ b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi @@ -9,5 +9,8 @@ #undef _LABEL #undef __LABEL +#undef NODE + #undef PMIC_SID #undef PMIC_LABEL +#undef PMIC_NODE diff --git a/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi b/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi index 75f0448568bd..bb41c9387aba 100644 --- a/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi +++ b/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi @@ -9,6 +9,12 @@ * pmic-dyn-footer.dtsi. */ +#ifndef PMIC_NODE + #define PMIC_NODE PMIC_LABEL +#endif + #define LABEL(name) _LABEL(PMIC_LABEL, name) #define _LABEL(pmic, name) __LABEL(pmic, name) #define __LABEL(pmic, name) pmic ## _ ## name + +#define NODE(name) PMIC_NODE ##-## name From patchwork Sat Apr 1 22:08:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669494 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82417C7EE29 for ; Sat, 1 Apr 2023 22:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230204AbjDAWI3 (ORCPT ); Sat, 1 Apr 2023 18:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230257AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 874D02B0DE for ; Sat, 1 Apr 2023 15:08:21 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id g19so20278213lfr.9 for ; Sat, 01 Apr 2023 15:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386900; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n5ruaswPTr4aTQUaqOUNDdtLf7Fy/weN6GQ93n/n+pk=; b=ZEpy7/4ZwVUWfIAFoBISq9RqI6lYNoVN2p1wRDOZH0felwuMgYEt/p5gGta0bBtTRR ottstO63Wu3tn3TW1XJxRX43ts6AsmRqxPLBqpVGgntUX2jpAtOst7hfjW5SlEklDhhb f/sJbS75T65ThqNGX9WjVwXWHjEac+wU7DZk2Sv65k+xQpFczrwCu7R+XDUvDn5m6LeP a5jHI+sdwo8kuJGzGKEop1j1kUTsZMffkHYjNAfs6XRwTCZriAiZLMUVRG/yS7Q5BdbO uES7UGgVGnyhyUKKv1/XKWyqk/Gf9ZrpBVyUX/Oq18A6VJS1PHB7s1Xxtd9m3k5PCs41 J6mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386900; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n5ruaswPTr4aTQUaqOUNDdtLf7Fy/weN6GQ93n/n+pk=; b=LmerqehGaJtFDq9g9Se/60OvntVcHVX2LrUioRLwyaQWy0UfLlo1Nq0LWrYBkTJVP3 0/b3rPagrKCTtk/X5pLBsIHRt1swAi1NGEX5EUykjDJ4H+ueSN8aE++PFPOsE0iKmOqB kDzgnrRezAAs+KoBi0gE6jmOrrgMJvDoabH5vbbnih5ynvjeWe2H3UC3n5S6cLXpNOwI pbHnSUnlqijyMh11967PK3My8AzoxdSNkUx8QHP0szKUorXbUvhO25TeSDUXNGScIXUn vJLZXF/OZG9YmhGd2JScln8eYmCaPs1qq65kCKalLFnkVeI3/aY0HBLqCP+kVoxIW4OI N6Ag== X-Gm-Message-State: AAQBX9fmJhOQSX9xl9f0h2X+5df01wrPpJMsON1ARYSs3kjsqrcXA/gL aWpS+V3JJyKAw3W0kaf5NkaTxw== X-Google-Smtp-Source: AKy350avgAeQ5DR2a8K7GdxlOow51bxZGCa1YIEYOP2BtdmZG42HCzEOQEsCttNlfrMgsNEmN0zH8A== X-Received: by 2002:ac2:5499:0:b0:4e9:c792:c95b with SMTP id t25-20020ac25499000000b004e9c792c95bmr8316305lfk.42.1680386899714; Sat, 01 Apr 2023 15:08:19 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:19 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 13/22] arm64: dts: qcom: pm8350: use interrupts-extended for IRQ specification Date: Sun, 2 Apr 2023 01:08:01 +0300 Message-Id: <20230401220810.3563708-14-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org As stated in the commit 2d5cab9232ba ("arm64: dts: qcom: sc8280xp-pmics: Specify interrupt parent explicitly"), we should not use bare interrupts for our PMIC devices. Instead interrupts-extended should be used. Change pm8350.dtsi to use interrupts-extended propery. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/pm8350.dtsi b/arch/arm64/boot/dts/qcom/pm8350.dtsi index b7b14b5fe67d..b05bc01e3ef5 100644 --- a/arch/arm64/boot/dts/qcom/pm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8350.dtsi @@ -51,7 +51,7 @@ PMIC_LABEL: pmic@PMIC_SID { LABEL(temp_alarm): temp-alarm@a00 { compatible = "qcom,spmi-temp-alarm"; reg = <0xa00>; - interrupts = ; + interrupts-extended = <&spmi_bus PMIC_SID 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; #thermal-sensor-cells = <0>; }; From patchwork Sat Apr 1 22:08:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669495 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C6F3C7EE24 for ; Sat, 1 Apr 2023 22:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230251AbjDAWI2 (ORCPT ); Sat, 1 Apr 2023 18:08:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbjDAWIX (ORCPT ); Sat, 1 Apr 2023 18:08:23 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76B5427813 for ; Sat, 1 Apr 2023 15:08:21 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id b6so6591203ljr.1 for ; Sat, 01 Apr 2023 15:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386901; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vYGHiV1R/+Oqzp8BCM7u0HdJIZFvTeY8mPEGVCR3FyQ=; b=kHI2t57u7p0BpVvemoRzS/NGuVuUORCogJwJ/7g/qJHlL0UX3gRr38f6cmYu8THEMC x8kfEFOQZy8KeEsmoyoBZCppVAEmDCwolrjfI1gq97w0zuBFT/ewBCiFNEF5qAfH4fer wV1swBCcCp3rt4AUBFfLd/tuN5U5Q+b88+igCUAmIGXAgRshwFYNoirTg06Fhgze2dws UElfNDkTXA2MPjnuYDHGO3pgraScZGNBmqg1YJRaqL9z0tA7J1gjdogOEuzA9++nyRqq PrwcV6maJ5cOwFsEKAJpHbExp0VSobl8ZhnsB5H3QRMGOp5ohDORZDJJYMK4u1fCtYXS jaMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386901; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vYGHiV1R/+Oqzp8BCM7u0HdJIZFvTeY8mPEGVCR3FyQ=; b=B53eqVqcxux4990MA5sPQq5rsUMXRWS6SDBUjgg0+tQPHDav+Nmg9qRoHuQEzcYIh3 MuOqwFDeF2Ku4zAvaahhEGN/9Xt0dBFZbDGzsoh4FzR6BkPwwU6T0Z7ltHnO0vkVLEWN zDMu2Rs4uFlyJl3Msb0+JmEDiGfarfHU6uVw6dvotzXnozN0DSnjlQvCu0GH7ofFWm3Y SflXLue0LOhV517GA8BECf9m1iryYqbq2WZlHUeuaFIxKZOpyVbb2TkZtL9FhjEebJNC gC7X4sswE6ast0HqJ27DwHxsKYvVDIzXhmvy+RCkhkSXA4NVXLSnqVZErKSUsvEpz2RD ZhXA== X-Gm-Message-State: AAQBX9fyrBi1mn65mHvhbuP6vo/7LAi1GHRFL+gDcNriNpcaZonG3uVe F2uKf5/45Csoi5z5RqsHBXRDTw== X-Google-Smtp-Source: AKy350abCZAwgc2ptKlDUYnZiI0LSIlKkFQZRJs3PmEPliroMxlWrUW4so3U1mtaLRe0CJfI8jwSYA== X-Received: by 2002:a2e:7215:0:b0:2a3:3b80:509f with SMTP id n21-20020a2e7215000000b002a33b80509fmr9198775ljc.34.1680386900928; Sat, 01 Apr 2023 15:08:20 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:20 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 15/22] arm64: dts: qcom: pm8350c: move thermal zone declaration to the top Date: Sun, 2 Apr 2023 01:08:03 +0300 Message-Id: <20230401220810.3563708-16-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Other PMIC files have thermal zone at the top of the file. Move the pm8350c's thermal zone to the top. While we are at it, drop unused labels. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8350c.dtsi | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm8350c.dtsi b/arch/arm64/boot/dts/qcom/pm8350c.dtsi index f28e71487d5c..ee25c07ce31d 100644 --- a/arch/arm64/boot/dts/qcom/pm8350c.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8350c.dtsi @@ -6,6 +6,30 @@ #include #include +/ { + thermal-zones { + pm8350c-thermal { + polling-delay-passive = <100>; + polling-delay = <0>; + thermal-sensors = <&pm8350c_temp_alarm>; + + trips { + trip0 { + temperature = <95000>; + hysteresis = <0>; + type = "passive"; + }; + + pm8350c-crit { + temperature = <115000>; + hysteresis = <0>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pm8350c: pmic@2 { compatible = "qcom,pm8350c", "qcom,spmi-pmic"; @@ -37,27 +61,3 @@ pm8350c_pwm: pwm { }; }; }; - -/ { - thermal-zones { - pm8350c_thermal: pm8350c-thermal { - polling-delay-passive = <100>; - polling-delay = <0>; - thermal-sensors = <&pm8350c_temp_alarm>; - - trips { - pm8350c_trip0: trip0 { - temperature = <95000>; - hysteresis = <0>; - type = "passive"; - }; - - pm8350c_crit: pm8350c-crit { - temperature = <115000>; - hysteresis = <0>; - type = "critical"; - }; - }; - }; - }; -}; From patchwork Sat Apr 1 22:08:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669493 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5086C77B71 for ; Sat, 1 Apr 2023 22:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229765AbjDAWIb (ORCPT ); Sat, 1 Apr 2023 18:08:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230216AbjDAWI0 (ORCPT ); Sat, 1 Apr 2023 18:08:26 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D59B12BEE4 for ; Sat, 1 Apr 2023 15:08:23 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id s20so6332789ljp.7 for ; Sat, 01 Apr 2023 15:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386903; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vpAPdB8a1KxE/31P7n445ITkGLoAKYAjcNmqI1cmGfU=; b=SD4iocEM9j+/oieJlsvl9UQdJPs2hHxkezcB9YDxP97z8qcJtXlMgBBX2Oip75L1Gr uThwfZZ1MXX+s4rdHGk+iRCmzLXGhz9qJE5nXAYpacVn1R9MV7A0kdvJkjDoketVY2pv tco6T4uVW8GttLasAQnLiqPnwHc16IPSheNGWQLhNsu+AN03TGrPFECudDW9G5Kke9+4 QI72OscETsAF9ZqThS4Do+D4c0VyPFjpilCsUstnVXeQwl5WEVBU62wngNRjOx3up3xv 9gHMOTwHDNsUgFB3RiUdhPWPUA+3mTYYmKtNsTOBWaQwiOrvxolIqekKii2QWLKokDAq +k6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386903; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vpAPdB8a1KxE/31P7n445ITkGLoAKYAjcNmqI1cmGfU=; b=bxQs32ZTa8Y2fZ2FOoiwh44CG2O6wGNTqqDpeFcPGeyhtLWI28EqvfSdELvvh2twD9 0tSm+OO+10tR5PU4Lz/pnyi+cYpQ+f5E00hkMUbjknY9x8Rv3kYaZnFjjgDhGzP4BOT3 7GTbYqFn2PuuR+SlEokIyxYjCBBYgPjQde8UjzegCZm7U6j8kg74zT0MZtdeEkv39Cwz PAvQ8xeT1uti6dYWIi5nPJASd0iPIwzLBy76GGxlG3uUaHw+nXvM5UAhGO+Q3s84NiWO oB2B2JSWyfxh9i1RmPMzOKm2YOFwvoGLz0UsLpi/2YWx4HkLTYsUl8c1VyUeMCFN2nOX mH2Q== X-Gm-Message-State: AAQBX9dBVw3+Kdcl+bjDCEE2hph0tuRbT/l/5mEUZfir2Av2Wfz23W+Q XNMQ7RjIxMRbSW/O83umWZob8Q== X-Google-Smtp-Source: AKy350ZvcqUde57P5OLtX4UdluqR5qLCim03qpfPgnHRL+SLBDdb8ouQPncf3Zd94cdr2C7KW55hqQ== X-Received: by 2002:a2e:83d5:0:b0:298:6d34:31c6 with SMTP id s21-20020a2e83d5000000b002986d3431c6mr8739886ljh.47.1680386903378; Sat, 01 Apr 2023 15:08:23 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:23 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 19/22] arm64: dts: qcom: sc8280xp*: use pmr735a.dtsi Date: Sun, 2 Apr 2023 01:08:07 +0300 Message-Id: <20230401220810.3563708-20-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Stop duplicating declarations of pmr735a PMICs, use existing file to prevent possible future issues. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index 3d2914d13fd2..7a1298a71791 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -25,21 +25,5 @@ #define PMIC_NODE pmc82802 #include "pm8350.dtsi" -&spmi_bus { - pmr735a: pmic@4 { - compatible = "qcom,pmr735a", "qcom,spmi-pmic"; - reg = <0x4 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pmr735a_gpios: gpio@8800 { - compatible = "qcom,pmr735a-gpio", "qcom,spmi-gpio"; - reg = <0x8800>; - gpio-controller; - gpio-ranges = <&pmr735a_gpios 0 0 4>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; -}; +/* SID 4 */ +#include "pmr735a.dtsi" From patchwork Sat Apr 1 22:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE77CC77B7D for ; Sat, 1 Apr 2023 22:08:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230141AbjDAWIf (ORCPT ); Sat, 1 Apr 2023 18:08:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230122AbjDAWIc (ORCPT ); Sat, 1 Apr 2023 18:08:32 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D48A2BEC9 for ; Sat, 1 Apr 2023 15:08:26 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id o20so23714169ljp.3 for ; Sat, 01 Apr 2023 15:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/4p6ERzkRu9AnspBZ9AUdWZ5pV1CnYsS0+M38enTe40=; b=QJkW3nrrwWYXButVD/8lohroU9VKsy0Tz9GCgpQYYtdNEiQaoFsKHuztsjtChSDcBp enmC5Y696r0oyOYF60G/qGY4YN89XpCwnC5AOPiqyG9q7JWOxNJMtdGfZ00/aPijC5u3 3D0o25iF8XApAWX44NvyfUCEtgzsDZhL4msP+dYpm7PMSxY+mmmEttbYP+kvtGcsayN6 dL0Y+fWsr69l2YdbB2xfx/R4YVHj2zh/CgSjFkACTEaj0FOA/OZf+H2yCDcP9inX9PoT ZiNFE96EaX0LRbdaynht3Br7wfOnK38ANohaPxrCYJ1RiKH+z1K77BGT/1FPfwnhGV59 sqfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/4p6ERzkRu9AnspBZ9AUdWZ5pV1CnYsS0+M38enTe40=; b=oWTClefUNXRGVYEu2B8A6f0S8hEtb9/TlisKrqH3QA8mtV5PsqFotKGlIQAu1bQrVw DCPkcGBxYnKt7XQzWIZz2RfUaNZdayYaYXCF0G1TP2eOzQmTlaZkL0cX4l8EXInpyDhd /5iLZ2x4qdidvyMpUsLBBfa00nbVjKKib+TaEa3niulk8K0NxHKzD6wMIHrU1B73e7O6 UV8ZFlYkbp76csAPw2D0TwiYEM02nprO4oNMWSQjaCUrMAJFanPVoOVIJKDjt2EyzAow WctIqUfA1TU2QcYanU4NVogF7bx70oLi7Pt+NJQDap5UtpiMcKYkuoUJ2sAYN+LasHJg 9NbA== X-Gm-Message-State: AAQBX9f9cLrMcxy6ik7WrDJJbb8/gr7kNjhx1j3MSOUlYdc5H/AeqfsY txaP4M4Hevhzyxo/Q86dZ+sUujGhAaXPHpYiNzSZNA== X-Google-Smtp-Source: AKy350YSwXn/xytYEtSL/8SZ4zXa7JBKVo9QRL5uy42lweXVIbHc7vyTxdHGFOoeFIg8b9VXeriHGA== X-Received: by 2002:a2e:a40e:0:b0:2a6:22fd:6b08 with SMTP id p14-20020a2ea40e000000b002a622fd6b08mr1938648ljn.3.1680386903986; Sat, 01 Apr 2023 15:08:23 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:23 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 20/22] arm64: dts: qcom: pm8150: convert to use dynamic SID/LABEL Date: Sun, 2 Apr 2023 01:08:08 +0300 Message-Id: <20230401220810.3563708-21-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org SA8450p-based platforms have 4 instances of pm8150. Convert pm8150.dtsi to use pmic-dyn-header.dtsi in order to support dynamic and label assignment. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8150.dtsi | 53 ++++++++++++------- arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi | 1 + 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm8150.dtsi b/arch/arm64/boot/dts/qcom/pm8150.dtsi index db90c55fa2cf..77bb325e425b 100644 --- a/arch/arm64/boot/dts/qcom/pm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8150.dtsi @@ -9,13 +9,28 @@ #include #include +/* (Sadly) this PMIC can be configured to be at different SIDs */ +#ifndef PMIC_SID + #define PMIC_SID 0 +#endif + +#ifndef PMIC_SID1 + #define PMIC_SID1 1 +#endif + +#ifndef PMIC_LABEL + #define PMIC_LABEL pm8150 +#endif + +#include "pmic-dyn-header.dtsi" + / { thermal-zones { - pm8150-thermal { + NODE(thermal) { polling-delay-passive = <100>; polling-delay = <0>; - thermal-sensors = <&pm8150_temp>; + thermal-sensors = <&LABEL(temp)>; trips { trip0 { @@ -41,9 +56,9 @@ trip2 { }; &spmi_bus { - pm8150_0: pmic@0 { + pmic@0 { compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x0 SPMI_USID>; + reg = ; #address-cells = <1>; #size-cells = <0>; @@ -55,7 +70,7 @@ pon: pon@800 { pon_pwrkey: pwrkey { compatible = "qcom,pm8941-pwrkey"; - interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>; + interrupts = ; debounce = <15625>; bias-pull-up; linux,code = ; @@ -65,7 +80,7 @@ pon_pwrkey: pwrkey { pon_resin: resin { compatible = "qcom,pm8941-resin"; - interrupts = <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>; + interrupts = ; debounce = <15625>; bias-pull-up; @@ -73,22 +88,22 @@ pon_resin: resin { }; }; - pm8150_temp: temp-alarm@2400 { + LABEL(temp): temp-alarm@2400 { compatible = "qcom,spmi-temp-alarm"; reg = <0x2400>; - interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; - io-channels = <&pm8150_adc ADC5_DIE_TEMP>; + interrupts = ; + io-channels = <&LABEL(adc) ADC5_DIE_TEMP>; io-channel-names = "thermal"; #thermal-sensor-cells = <0>; }; - pm8150_adc: adc@3100 { + LABEL(adc): adc@3100 { compatible = "qcom,spmi-adc5"; reg = <0x3100>; #address-cells = <1>; #size-cells = <0>; #io-channel-cells = <1>; - interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + interrupts = ; ref-gnd@0 { reg = ; @@ -109,10 +124,10 @@ die-temp@6 { }; }; - pm8150_adc_tm: adc-tm@3500 { + LABEL(adc_tm): adc-tm@3500 { compatible = "qcom,spmi-adc-tm5"; reg = <0x3500>; - interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>; + interrupts = ; #thermal-sensor-cells = <1>; #address-cells = <1>; #size-cells = <0>; @@ -123,24 +138,26 @@ rtc@6000 { compatible = "qcom,pm8941-rtc"; reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; - interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; + interrupts = ; }; - pm8150_gpios: gpio@c000 { + LABEL(gpios): gpio@c000 { compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; reg = <0xc000>; gpio-controller; - gpio-ranges = <&pm8150_gpios 0 0 10>; + gpio-ranges = <&LABEL(gpios) 0 0 10>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; }; }; - pmic@1 { + pmic@PMIC_SID1 { compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x1 SPMI_USID>; + reg = ; #address-cells = <1>; #size-cells = <0>; }; }; + +#include "pmic-dyn-footer.dtsi" diff --git a/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi index 29b10e7fb8c3..83a2bada48ff 100644 --- a/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi +++ b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi @@ -12,5 +12,6 @@ #undef NODE #undef PMIC_SID +#undef PMIC_SID1 #undef PMIC_LABEL #undef PMIC_NODE From patchwork Sat Apr 1 22:08:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669492 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AE4AC77B79 for ; Sat, 1 Apr 2023 22:08:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbjDAWIe (ORCPT ); Sat, 1 Apr 2023 18:08:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjDAWI3 (ORCPT ); Sat, 1 Apr 2023 18:08:29 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB3D2702E for ; Sat, 1 Apr 2023 15:08:25 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id bx10so8316956ljb.8 for ; Sat, 01 Apr 2023 15:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aFAjGC6zhILn0mPDKxdlAN+y3zIIQ7ldIAczmYLBd2A=; b=E6m9YA+qlZGexpONIIU75zHZXRTM7DPLwq7cQkLNBc2wFE9185ToWbeehqqwpl5cmJ LcG0RHc/i5ls7z7Ljo740RzL6FxpfR7f+STsxOX2n+oIp89pkbVdez+4jiMc/JIJZsXX M6qwmm2ZKVi1+6AAT6ucHex2L5WuO1d4Ku/iOG4rAM/Eit23o6AsH2YjB5X6fF/SnSG5 crR/I3qoExdcuCx7Nz4y7kx2eTY9+SXTgBr5GH51gE0oTOf+vnkmaWDoNvfpKH9jvf2x fx/bxlZZ9JlWTr40YcqQqw7jM0JOgM9ganDle21cyKASkniX4YqnmhICId76w9Qd6xvC Vigg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aFAjGC6zhILn0mPDKxdlAN+y3zIIQ7ldIAczmYLBd2A=; b=7Ml4gbD2Laq+3g8JL+bYl2FkGcEhDuYddgWs/SNrphsMo5OSaErzBZSrm7BJgJtNvM /hZ55AhjG8386tHFbxm3akR6d+JwPAnrbdewJlN4QUvN/Xt30kYG8KBo82Vcxt4ImLef H/JxkKALWEL14b62pH2htZsPXs11N+tkJsp3Yl5l1/W6xzxHTS3HM1VNks0+yMwhN1+V RCVRY1UKUQGkIaLU2Xh/jNtYLAj3baYGaUdhtUU5eGcPbxQ/lbgovK3BBxduOHRK4XmO i2QmPTJvnu2IdKJHVNVqP3zf9dcN85UuIPyHFeoGxTYVQ87xacDCsy/bBjwsJjUa2LlP AQjw== X-Gm-Message-State: AAQBX9cFSV1ZQEi3w9NW9fHa8vZq0ZsUzdtpWOeihuZxQjVKihlEbf/4 YHNgsDYTcUtejUN9m+/nC9s1+g== X-Google-Smtp-Source: AKy350a94Su8jmKkZ/4NO1jhSAxMM3jX5OQ85DUUOpiRViRuYvwfcPgmfXV8EaMZwoeZNTalOQIXcA== X-Received: by 2002:a2e:7812:0:b0:298:a853:1c3c with SMTP id t18-20020a2e7812000000b00298a8531c3cmr9343919ljc.4.1680386904575; Sat, 01 Apr 2023 15:08:24 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:24 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 21/22] arch: arm64: dts: qcom: pm8150: support SID greater that 9 Date: Sun, 2 Apr 2023 01:08:09 +0300 Message-Id: <20230401220810.3563708-22-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Supporting SIDs greater than 9 required additional handling in order to properly generatae hex values. Apply this customization to pm8150.dtsi. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8150.dtsi | 16 ++++++++-------- arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi | 6 ++++++ arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi | 6 ++++++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm8150.dtsi b/arch/arm64/boot/dts/qcom/pm8150.dtsi index 77bb325e425b..37cc99e5d1a6 100644 --- a/arch/arm64/boot/dts/qcom/pm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8150.dtsi @@ -58,7 +58,7 @@ trip2 { &spmi_bus { pmic@0 { compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = ; + reg = ; #address-cells = <1>; #size-cells = <0>; @@ -70,7 +70,7 @@ pon: pon@800 { pon_pwrkey: pwrkey { compatible = "qcom,pm8941-pwrkey"; - interrupts = ; + interrupts = ; debounce = <15625>; bias-pull-up; linux,code = ; @@ -80,7 +80,7 @@ pon_pwrkey: pwrkey { pon_resin: resin { compatible = "qcom,pm8941-resin"; - interrupts = ; + interrupts = ; debounce = <15625>; bias-pull-up; @@ -91,7 +91,7 @@ pon_resin: resin { LABEL(temp): temp-alarm@2400 { compatible = "qcom,spmi-temp-alarm"; reg = <0x2400>; - interrupts = ; + interrupts = ; io-channels = <&LABEL(adc) ADC5_DIE_TEMP>; io-channel-names = "thermal"; #thermal-sensor-cells = <0>; @@ -103,7 +103,7 @@ LABEL(adc): adc@3100 { #address-cells = <1>; #size-cells = <0>; #io-channel-cells = <1>; - interrupts = ; + interrupts = ; ref-gnd@0 { reg = ; @@ -127,7 +127,7 @@ die-temp@6 { LABEL(adc_tm): adc-tm@3500 { compatible = "qcom,spmi-adc-tm5"; reg = <0x3500>; - interrupts = ; + interrupts = ; #thermal-sensor-cells = <1>; #address-cells = <1>; #size-cells = <0>; @@ -138,7 +138,7 @@ rtc@6000 { compatible = "qcom,pm8941-rtc"; reg = <0x6000>, <0x6100>; reg-names = "rtc", "alarm"; - interrupts = ; + interrupts = ; }; LABEL(gpios): gpio@c000 { @@ -154,7 +154,7 @@ LABEL(gpios): gpio@c000 { pmic@PMIC_SID1 { compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = ; + reg = ; #address-cells = <1>; #size-cells = <0>; }; diff --git a/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi index 83a2bada48ff..f3743ef3aa13 100644 --- a/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi +++ b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi @@ -11,6 +11,12 @@ #undef NODE +#undef HEX +#undef _HEX + +#undef PMIC_SID_HEX +#undef PMIC_SID1_HEX + #undef PMIC_SID #undef PMIC_SID1 #undef PMIC_LABEL diff --git a/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi b/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi index bb41c9387aba..640d1bf5ce8e 100644 --- a/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi +++ b/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi @@ -18,3 +18,9 @@ #define __LABEL(pmic, name) pmic ## _ ## name #define NODE(name) PMIC_NODE ##-## name + +#define HEX(sid) _HEX(sid) +#define _HEX(sid) 0x## sid + +#define PMIC_SID_HEX HEX(PMIC_SID) +#define PMIC_SID1_HEX HEX(PMIC_SID1)