From patchwork Sat Apr 1 22:07:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197223 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 C3EB4C77B6D for ; Sat, 1 Apr 2023 22:08:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230201AbjDAWIR (ORCPT ); Sat, 1 Apr 2023 18:08:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230162AbjDAWIP (ORCPT ); Sat, 1 Apr 2023 18:08:15 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E88CE042 for ; Sat, 1 Apr 2023 15:08:13 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id s20so6332560ljp.7 for ; Sat, 01 Apr 2023 15:08:13 -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=lCFV/JZY4vdJPFM0WDvkY95TY5KbxeGsCW3ncDsaCxg=; b=C0ul0wXf7+xeK2qdVL8Ws7RwyDQRnKIYtJNobpH/wINGuYSejJ4F5YP0xUDN9lG3v/ DflFxTvJyT4/OwPlh9GaVRHNbba9i4hEtCPUgz15HD105KK4KFhV9/eWqrR926h2R0vY 4o6wpfBSk3796RSXy92xVzR8sDZcmSRb1OzmgdsFC46pj4c4vNA1GTWoqdjIJdmDndLa KatTf2GARa08mPPHVzzarjgOQw7qMoytSNesvmYTlv0/gwKvMQ9EQxySqnultSFLXw8z hONJOF20A/6KkTggNOhpVD+pu1bDB/XP2zXl/PEbqDIJ5JGKO8zbCivlPZh/sPseIbTs 5e1Q== 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=lCFV/JZY4vdJPFM0WDvkY95TY5KbxeGsCW3ncDsaCxg=; b=7f2hH2AEm9HS0jx014Xz3zBYCJQ33RrkZ2H1XWUYP/5J575m1jrYdEa//Y6J8ZElPE /SMRpyDMV197BOJ9ol5OBsS3CjIoqZA2Zn2V7rlNdAZvmD1pa+rR7M9o24aLCjb4HbvV wTQqkhjF3l5LRwnJxl0y3/AMAxvG8SoXL1LEHdICI4IrFIukk+XeNtlV8GGxEpgrMX5e L0X6piuzzgkf+Pnc+kO42iZ+C1kdS2Z7PMuPJ6JYX7of5gfaY/6yeOaOWnOzstmz1cFX uMYry5/M20hTshYx8PniN+43Xt9IpPcZLaQFzL+5lGnqQe8LjHmZ4EjoML4X38/gySYa WqFg== X-Gm-Message-State: AAQBX9clF3YdYSIyUoVaevhcDLTOsH5lhVBGPavP4s1W4w8TspsFtM8i PUORRCqqB6Cf2xrY0UfmoXPnHyuXoaBm1SmOihJyIQ== X-Google-Smtp-Source: AKy350bi3qN8U/Vnkt+r3pGLwSjBAcc3BB5h9Y1pZ1zP5WtZbk5JGLAH3ZgR2sfvxKsKrxLgZlDgaQ== X-Received: by 2002:a05:651c:8c:b0:29f:4358:7142 with SMTP id 12-20020a05651c008c00b0029f43587142mr9092105ljq.47.1680386891905; Sat, 01 Apr 2023 15:08:11 -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:11 -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 01/22] arm64: dts: qcom: pm8350: fix thermal zone node name Date: Sun, 2 Apr 2023 01:07:49 +0300 Message-Id: <20230401220810.3563708-2-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: linux-iio@vger.kernel.org Correct the thermal zone node names to remove the clash with pm8350c.dtsi. Remove unused labels. Fixes: 7a79b95f4288 ("arm64: dts: qcom: pm8350: add temp sensor and thermal zone config") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/pm8350.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm8350.dtsi b/arch/arm64/boot/dts/qcom/pm8350.dtsi index 2dfeb99300d7..9fb963df4b41 100644 --- a/arch/arm64/boot/dts/qcom/pm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8350.dtsi @@ -8,19 +8,19 @@ / { thermal-zones { - pm8350_thermal: pm8350c-thermal { + pm8350-thermal { polling-delay-passive = <100>; polling-delay = <0>; thermal-sensors = <&pm8350_temp_alarm>; trips { - pm8350_trip0: trip0 { + trip0 { temperature = <95000>; hysteresis = <0>; type = "passive"; }; - pm8350_crit: pm8350c-crit { + crit { temperature = <115000>; hysteresis = <0>; type = "critical"; 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: 13197224 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 B4732C77B70 for ; Sat, 1 Apr 2023 22:08:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230183AbjDAWIS (ORCPT ); Sat, 1 Apr 2023 18:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230191AbjDAWIP (ORCPT ); Sat, 1 Apr 2023 18:08:15 -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 43730FF0D for ; Sat, 1 Apr 2023 15:08:14 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 20so26677361lju.0 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=5m9rrE1NXGZRU43VxHeW0u7+IIey/ki4JqL2RSXQzpRsq3iGnN0od2EEi7KPWI/dmH FIDHsXGUjMu/ErmcbyQ4LleEcjDBSbGNqoV40jClfezagHOgxBAOu4XwIpIUT64vM84C j47b47NsRaOmB3Jrq1cLI2pV/JlHifhyTkalVuuDDh58IvvllZhhVXzkyZK4FxhG6Z3i vgFMaWbqOYe/e5ckiAXYARmoXK75ImfLODjlWjoUAXZeoEpuIwLkEhZ+MHRieexgKxCN UT3SloZB78lrEC9CSlbRpY7Ql+GyKar+2SitSVd+mfMwMdDEURkmXJDHdTlPq2jaxyk2 eOiw== X-Gm-Message-State: AAQBX9c/gCldsNcOIm+AMiNGrjmwBNj9whMzH6aIVPGb6ROv93FPq6/U 5v9mjILPqo4CoatUBEoWvEQqWw== 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: linux-iio@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 Reviewed-by: Konrad Dybcio --- 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:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197225 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 75765C77B71 for ; Sat, 1 Apr 2023 22:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230209AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbjDAWIQ (ORCPT ); Sat, 1 Apr 2023 18:08:16 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07E927AB6 for ; Sat, 1 Apr 2023 15:08:14 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id e9so11382377ljq.4 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=1680386893; 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=nFzU/RoZm6eZTzjO9SylWYXHFKUfHNnvYIBQnLL1hz4=; b=OLQ5z9ab/AYzJPGYpJPW7PIEuthr4UqQQJOmecbXz44JAr6M6SwvXp4Nbeg234uusD BuACEu2ROamWJ7A7MSxbbY1go87El2ldsV9FqlA3O7XC1UkkuboJDaTrNQDs24lCg2Fe QKf9n2XPz12uVt7M0I2EnuF8HL6S19d9TiJklJcUoWPlF2zaNwDjALejNJfQwlMWWS47 ukxKt1qXSQ4jnNwn14IcNN/dlUyWGxl9elncOgv0/iTVq/1zlh1/9h9qwCgDn4sDY0rJ pGdLl9LTAxetb9FOnIVzcHNUeZ+nqq6tgC6pb221ml+MvbllmiDa00opuzpvVSs12fxa /rkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386893; 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=nFzU/RoZm6eZTzjO9SylWYXHFKUfHNnvYIBQnLL1hz4=; b=vH+87HgIwysQUyP++0CDKpYG/sDzRz6vK35obXMih+VhSqjpA3LiAwnpxD/w3HsqZZ v+HIuHbuROtGUff1Ag7tcMOukJ8GOxK+R5cqaa7yg1prSszbkyeOA6legu5ydcuuxMx6 7fq1fJKqzGwUJ1TIbc/Tnt9BK5qDJUOA+FM8jjJD9sCl0tJCmZnBuLqsS/5l7oQZx3Aq jPDCvMjF0q8LAqiISFAApwQncbViBen4TCPxJjOIun6Edt2vyoFgt8TllUu2P62UNSvd fW+byrpBAA5gp0lyt+DmOlFr1Qp7b6asaXVzGN0zbetNaal+lkvWLMK23BUBj3+aqHfp X4Dw== X-Gm-Message-State: AAQBX9dOIqipYkygnLXnnCPBPDmCumm7R78m6fI8SL5t07w9TFr9kfuA u2Ly6K5+qE21xCuJtAxP28yJ7w== X-Google-Smtp-Source: AKy350YfduvZUjFyAhN1cJuc78kmuFkWFASvlJSIoiIOn9AjnzwJB5UoUNwosWtAYG0ORgrgazhgTQ== X-Received: by 2002:a2e:82d5:0:b0:2a6:16b5:c656 with SMTP id n21-20020a2e82d5000000b002a616b5c656mr3094350ljh.46.1680386893213; 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.12 (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 03/22] arm64: dts: qcom: sc8280xp-pmics: use pmk8350 specifics for pon device Date: Sun, 2 Apr 2023 01:07:51 +0300 Message-Id: <20230401220810.3563708-4-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: linux-iio@vger.kernel.org Following the commit c0ee8e0ba5cc ("arm64: dts: qcom: pmk8350: Use the correct PON compatible") and commit f46ef374e0dc ("arm64: dts: qcom: pmk8350: Specify PBS register for PON") use "qcom,pmk8350-pon" compat string and add RBS region to the PON device. Fixes: ccd3517faf18 ("arm64: dts: qcom: sc8280xp: Add reference device") Signed-off-by: Dmitry Baryshkov Signed-off-by: Ingo Molnar --- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index c35e7f6bd657..a3c7369f9594 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -59,8 +59,8 @@ pmk8280: pmic@0 { #size-cells = <0>; pmk8280_pon: pon@1300 { - compatible = "qcom,pm8998-pon"; - reg = <0x1300>; + compatible = "qcom,pmk8350-pon"; + reg = <0x1300>, <0x800>; pmk8280_pon_pwrkey: pwrkey { compatible = "qcom,pmk8350-pwrkey"; 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: 13197226 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 EFBF8C77B72 for ; Sat, 1 Apr 2023 22:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230217AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230198AbjDAWIR (ORCPT ); Sat, 1 Apr 2023 18:08:17 -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 9E9772658B for ; Sat, 1 Apr 2023 15:08:15 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id b6so6591046ljr.1 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=a5J3cqCs4yzYF3+XdAJBJAY0SnCs/a5MKsvIBcJJwSzh29GKw7inAuxpdFRXqkK5ue fS3WPzbWgl+5wt35ktJKOKDYI4tR5zptt+r7OyKP583ByqAYQ0U00XflK7G9OcEUsCey sv0UsrswpJK5LKb6vZ65NMx/M+ExDmYXT1kYTnMaIDSwk5PSPto/LIX0FjLvFDvn++vk gjdCdPTLU7PRGQKoywz99KV+2NKE+jNPbP0HfZj9Z3VMF1a+NmfvIxiPiU9WEAAX1YM5 tbqJ/DD2tA4154foPzOPrxRjh1sQzzQu1AdqmCWrEaYqLHsJWvfGnKXp6FjKJdnv7xln 4xRA== X-Gm-Message-State: AAQBX9ezUTO8oaqTg5aCO8KRybxSOqbzVacnbKQkwwZhsl4R1SwImsAL g8TfYb2R7OtWBoqhM/iCEiUQiA== 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: linux-iio@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 Reviewed-by: Konrad Dybcio --- 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:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197228 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 9EDF6C77B6D for ; Sat, 1 Apr 2023 22:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230233AbjDAWIV (ORCPT ); Sat, 1 Apr 2023 18:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBDCCEC5F for ; Sat, 1 Apr 2023 15:08:16 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id bx10so8316753ljb.8 for ; Sat, 01 Apr 2023 15:08:16 -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=c+ncye5umI1tZvLHf/bJkbEX997B+2yRqwH3006HgP8=; b=BwXech6rabDvRwHHsDRFT26Wam60tZJF5p879RE7a5XG/j2cGfL2hujErQGGGyraLo SXVbxQ0M+ZEWoLcjJBypymfNGTSQiEgGLIzAGA8VQDmovOusMD/AuHKFd66vXI+S8wIE cHzz69TA5riZh1m+ZAXHmlxlBoBc0s3y2FS3DGfCefWByRF/x8XNBaqbNpcE/thMNpPb s2BToVAvchbBfzIC3snIqWmwMrKZgXAyU39Hd4NiCtyq1W80qpZsX7Dvc3YGdGp8nFuC Ug8mmc2RCitSqprjF88SVdy7SZ8mlOhbP8HEGD4ukv5Hz9Wd5wu9aUX2AFtPvm4J/DJQ 1L+w== 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=c+ncye5umI1tZvLHf/bJkbEX997B+2yRqwH3006HgP8=; b=bMaG5gZL5OLUg/bYVuGZjpTr7GtExZ0OM2fnbjbxVsdGOIXEzZ4Yvv1+3jCbuQEJ1J w4XBdm9+O7DknbT1K8kMLsXcq2ixBjLXxRf5rEr4Tc1lIh6SEtLOm73rMl7VuRXqh0Gm fWVwpLt3rlYpVRTaO/JbRiRFqB1xtL7TT3EnZEFi6/cCQIxKG1uZJ/pwRA4gdkhXfx+A cFkee1TBeiauZTWt1WlX4SmHwylDL4zpUKxux7F/91cIzq7Dw3poRClCnr/C8ubF0Xyl TZngVtW1fZBbcowOUD8E5VhD3Bqt98ZwdGBboUNN7who7kgQPXj53DCfG6d3xzFyw2IG eSmA== X-Gm-Message-State: AAQBX9cAC4u7PhAeVW0XgUXaWynWN+d4aBfEtWYenKYH8vH93r8oUHdR KohGERisZh+8gJJWLJPD2yMpLA== X-Google-Smtp-Source: AKy350YipCjOjQ7c/Icad8BxlePwV7waZJV+UTgvZeyWRN6iXbLIMhEnRkRO8sKiYhHkWIvA2YgwcA== X-Received: by 2002:a2e:9cc1:0:b0:299:a984:94b with SMTP id g1-20020a2e9cc1000000b00299a984094bmr10963243ljj.8.1680386894605; Sat, 01 Apr 2023 15:08:14 -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, Krzysztof Kozlowski , Jonathan Cameron Subject: [PATCH v2 05/22] dt-bindings: iio: qcom,spmi-adc7-pmk8350.h: include sid into defines Date: Sun, 2 Apr 2023 01:07:53 +0300 Message-Id: <20230401220810.3563708-6-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: linux-iio@vger.kernel.org pmk8350 can take different addresses on SPMI bus. Rather than having a default SID, follow the pm8350's example and make the sid explicit when specifying ADC channels. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Signed-off-by: Dmitry Baryshkov --- .../bindings/iio/adc/qcom,spmi-vadc.yaml | 2 +- .../bindings/thermal/qcom-spmi-adc-tm5.yaml | 4 +- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 2 +- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 +- .../boot/dts/qcom/sm7225-fairphone-fp4.dts | 2 +- .../dt-bindings/iio/qcom,spmi-adc7-pmk8350.h | 52 +++++++++---------- 7 files changed, 32 insertions(+), 36 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml index bd6e0d6f6e0c..df317901e7d0 100644 --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml @@ -293,7 +293,7 @@ examples: /* Other properties are omitted */ xo-therm@44 { - reg = ; + reg = ; qcom,ratiometric; qcom,hw-settle-time = <200>; }; diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml b/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml index 52ec18cf1eda..ff07d27775dc 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml +++ b/Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml @@ -218,7 +218,7 @@ examples: /* Other properties are omitted */ xo-therm@44 { - reg = ; + reg = ; qcom,ratiometric; qcom,hw-settle-time = <200>; }; @@ -240,7 +240,7 @@ examples: pmk8350-xo-therm@0 { reg = <0>; - io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>; + io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU(0)>; qcom,decimation = <340>; qcom,ratiometric; qcom,hw-settle-time-us = <200>; diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi index 5dc9bee28e7f..14c9bdaa46ed 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi @@ -433,7 +433,7 @@ &pcie1_phy { &pmk8350_vadc { pmk8350-die-temp@3 { - reg = ; + reg = ; label = "pmk8350_die_temp"; qcom,pre-scaling = <1 1>; }; diff --git a/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi b/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi index cb0cc2ba2fa3..e3919e074ebd 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi @@ -389,7 +389,7 @@ &pm8350c_pwm { &pmk8350_vadc { pmk8350-die-temp@3 { - reg = ; + reg = ; label = "pmk8350_die_temp"; qcom,pre-scaling = <1 1>; }; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 46c7fdafb840..590400985055 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -824,13 +824,13 @@ &pmk8280_vadc { status = "okay"; pmic-die-temp@3 { - reg = ; + reg = ; qcom,pre-scaling = <1 1>; label = "pmk8350_die_temp"; }; xo-therm@44 { - reg = ; + reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; label = "pmk8350_xo_therm"; diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts index 7ae6aba5d2ec..af6cf4fbddc7 100644 --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts @@ -516,7 +516,7 @@ &pmk8350_rtc { &pmk8350_vadc { adc-chan@644 { - reg = ; + reg = ; qcom,ratiometric; qcom,hw-settle-time = <200>; qcom,pre-scaling = <1 1>; diff --git a/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h b/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h index 6c296870e95b..ca85a2d69453 100644 --- a/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h +++ b/include/dt-bindings/iio/qcom,spmi-adc7-pmk8350.h @@ -6,41 +6,37 @@ #ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PMK8350_H #define _DT_BINDINGS_QCOM_SPMI_VADC_PMK8350_H -#ifndef PMK8350_SID -#define PMK8350_SID 0 -#endif - /* ADC channels for PMK8350_ADC for PMIC7 */ -#define PMK8350_ADC7_REF_GND (PMK8350_SID << 8 | 0x0) -#define PMK8350_ADC7_1P25VREF (PMK8350_SID << 8 | 0x01) -#define PMK8350_ADC7_VREF_VADC (PMK8350_SID << 8 | 0x02) -#define PMK8350_ADC7_DIE_TEMP (PMK8350_SID << 8 | 0x03) +#define PMK8350_ADC7_REF_GND(sid) ((sid) << 8 | 0x0) +#define PMK8350_ADC7_1P25VREF(sid) ((sid) << 8 | 0x01) +#define PMK8350_ADC7_VREF_VADC(sid) ((sid) << 8 | 0x02) +#define PMK8350_ADC7_DIE_TEMP(sid) ((sid) << 8 | 0x03) -#define PMK8350_ADC7_AMUX_THM1 (PMK8350_SID << 8 | 0x04) -#define PMK8350_ADC7_AMUX_THM2 (PMK8350_SID << 8 | 0x05) -#define PMK8350_ADC7_AMUX_THM3 (PMK8350_SID << 8 | 0x06) -#define PMK8350_ADC7_AMUX_THM4 (PMK8350_SID << 8 | 0x07) -#define PMK8350_ADC7_AMUX_THM5 (PMK8350_SID << 8 | 0x08) +#define PMK8350_ADC7_AMUX_THM1(sid) ((sid) << 8 | 0x04) +#define PMK8350_ADC7_AMUX_THM2(sid) ((sid) << 8 | 0x05) +#define PMK8350_ADC7_AMUX_THM3(sid) ((sid) << 8 | 0x06) +#define PMK8350_ADC7_AMUX_THM4(sid) ((sid) << 8 | 0x07) +#define PMK8350_ADC7_AMUX_THM5(sid) ((sid) << 8 | 0x08) /* 30k pull-up1 */ -#define PMK8350_ADC7_AMUX_THM1_30K_PU (PMK8350_SID << 8 | 0x24) -#define PMK8350_ADC7_AMUX_THM2_30K_PU (PMK8350_SID << 8 | 0x25) -#define PMK8350_ADC7_AMUX_THM3_30K_PU (PMK8350_SID << 8 | 0x26) -#define PMK8350_ADC7_AMUX_THM4_30K_PU (PMK8350_SID << 8 | 0x27) -#define PMK8350_ADC7_AMUX_THM5_30K_PU (PMK8350_SID << 8 | 0x28) +#define PMK8350_ADC7_AMUX_THM1_30K_PU(sid) ((sid) << 8 | 0x24) +#define PMK8350_ADC7_AMUX_THM2_30K_PU(sid) ((sid) << 8 | 0x25) +#define PMK8350_ADC7_AMUX_THM3_30K_PU(sid) ((sid) << 8 | 0x26) +#define PMK8350_ADC7_AMUX_THM4_30K_PU(sid) ((sid) << 8 | 0x27) +#define PMK8350_ADC7_AMUX_THM5_30K_PU(sid) ((sid) << 8 | 0x28) /* 100k pull-up2 */ -#define PMK8350_ADC7_AMUX_THM1_100K_PU (PMK8350_SID << 8 | 0x44) -#define PMK8350_ADC7_AMUX_THM2_100K_PU (PMK8350_SID << 8 | 0x45) -#define PMK8350_ADC7_AMUX_THM3_100K_PU (PMK8350_SID << 8 | 0x46) -#define PMK8350_ADC7_AMUX_THM4_100K_PU (PMK8350_SID << 8 | 0x47) -#define PMK8350_ADC7_AMUX_THM5_100K_PU (PMK8350_SID << 8 | 0x48) +#define PMK8350_ADC7_AMUX_THM1_100K_PU(sid) ((sid) << 8 | 0x44) +#define PMK8350_ADC7_AMUX_THM2_100K_PU(sid) ((sid) << 8 | 0x45) +#define PMK8350_ADC7_AMUX_THM3_100K_PU(sid) ((sid) << 8 | 0x46) +#define PMK8350_ADC7_AMUX_THM4_100K_PU(sid) ((sid) << 8 | 0x47) +#define PMK8350_ADC7_AMUX_THM5_100K_PU(sid) ((sid) << 8 | 0x48) /* 400k pull-up3 */ -#define PMK8350_ADC7_AMUX_THM1_400K_PU (PMK8350_SID << 8 | 0x64) -#define PMK8350_ADC7_AMUX_THM2_400K_PU (PMK8350_SID << 8 | 0x65) -#define PMK8350_ADC7_AMUX_THM3_400K_PU (PMK8350_SID << 8 | 0x66) -#define PMK8350_ADC7_AMUX_THM4_400K_PU (PMK8350_SID << 8 | 0x67) -#define PMK8350_ADC7_AMUX_THM5_400K_PU (PMK8350_SID << 8 | 0x68) +#define PMK8350_ADC7_AMUX_THM1_400K_PU(sid) ((sid) << 8 | 0x64) +#define PMK8350_ADC7_AMUX_THM2_400K_PU(sid) ((sid) << 8 | 0x65) +#define PMK8350_ADC7_AMUX_THM3_400K_PU(sid) ((sid) << 8 | 0x66) +#define PMK8350_ADC7_AMUX_THM4_400K_PU(sid) ((sid) << 8 | 0x67) +#define PMK8350_ADC7_AMUX_THM5_400K_PU(sid) ((sid) << 8 | 0x68) #endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PMK8350_H */ 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: 13197227 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 B392FC77B6C for ; Sat, 1 Apr 2023 22:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230168AbjDAWIV (ORCPT ); Sat, 1 Apr 2023 18:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230212AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3394827813 for ; Sat, 1 Apr 2023 15:08:17 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id b6so6591084ljr.1 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=DeB7C5eEWF9fLn4TKqYVvM+PpKigxNOsX3xcxSg1Am1Hqp6VqN3qDWFkUAOZWITO0X Y59deY10fYZb+Es+ve05dbWfzxtkbSyk8ViS2J5MYyXW8pnIVejljStP8mhiJ2Ri1iBE nLy0bKRRBdFROhz81MP5vP1etlb/F1YelUpS7l0PkEbLs+cmBUOy1Qfa0Jj+/ziJDyyz XZ9usNyDYQmPHUpMZIAi/9J7SaZuwGhEKY69K8BdMpQsMMxwFo4vOl5W7pQMTarxijbH JQpRDvjhewz/SXSttem6cV/og+qdXFco3uqIt+C2wqMNRIsV1vDkNz5zP3Jamhgt3mMa 0tDg== X-Gm-Message-State: AAQBX9eBwzBiqY+ihkZOhwNHeq0nk54AU2TLW3xTzdu7DY20itGlb5lD cv0zPB4+6CPF2YByQMi+ozX8SA== 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: linux-iio@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:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197230 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 36614C77B78 for ; Sat, 1 Apr 2023 22:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230250AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -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 S230222AbjDAWIU (ORCPT ); Sat, 1 Apr 2023 18:08:20 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF9272658A for ; Sat, 1 Apr 2023 15:08:17 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id e9so11382431ljq.4 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=BWojdc1ild/jkFKcyiUFlzgUKZw9Hjq+5anNECZfCIY=; b=Q9byt6+GUeEnSswYsjDJovP3MECz1PizUCuzOd+lX7l9yUJPgJIFTAzQs7+0ccTDtu v5ia7JGYlH1K+B6MpU3LxMq3povv6FD4j3/1xadfX3MGda1oL2dllKxdOF4u1wMESHCJ V4u1IxVLWHxIV6Yt19sC6LdrVjkaxToufu13vniOmlV2fbhd0n6H5LHD44UXxOODBB57 e3MsuyF1pFTJ6fjLLg0k8A3Z5EfSdSfx+gH+5jxvR5yGu4elO6HSaULFcI2jWZHoLDQ4 wsuFfk3ZkNKfQm9f2/+VLzo5zNJRB2URFEY6wRQwR0FMxuJVrQqiOu244oTZJ1tThlp7 46ng== 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=BWojdc1ild/jkFKcyiUFlzgUKZw9Hjq+5anNECZfCIY=; b=ilOcUqm2Im+utTdyupK7AV+W7Z4ncyjqUAPhHpK+ty71X3K778mgOPlqbY8K43Tjfn YFG3mpQNtLNreCnFMUtdEqwTJ2pW+re+i9Jp1RvE+odtIJKVyGMXoJaDQWDWYunZg6t/ hQEZaF+GQpiST5hIlcw2tzrVjbPElY9GO9JMxxp7hS9X2+tokJyq65Lko115cJPBrhxR tXjfC69abT7KZP/Rt02/YIhamfqa8hVQXq5yifV6msnxzUotKa+5XZOMHYdIRBvENUnK fiiJEoMRS1j49HQWd6k+Im3H7HUmFURRUJXePp06S3+27zs2Nb4+RtrN/AqWDsH0Fdak y0eg== X-Gm-Message-State: AAQBX9cy4y6BdoUuWD4bLtR0l1ryABl/hjNC+qUxBpddDeYFAtKT/ZaD x9FHrrAFf03X1vYnwy0oydxUcQ== X-Google-Smtp-Source: AKy350ZesZrciIaS34piWXf66NS5s/Sz5aXKdUb1T4ZUckmKU3mk6TM+tKJluPSPKVxTs8z/fkyUig== X-Received: by 2002:a2e:80c9:0:b0:2a3:8903:f161 with SMTP id r9-20020a2e80c9000000b002a38903f161mr9259265ljg.42.1680386895999; 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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:15 -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 07/22] arm64: dts: qcom: pmk8350: port sdam_6 device from sc8280xp-pmics Date: Sun, 2 Apr 2023 01:07:55 +0300 Message-Id: <20230401220810.3563708-8-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: linux-iio@vger.kernel.org sc8280xp-pmics.dtsi contains a copy of pmk8350 with one extra device, nvram (sdam). Port its definition from sc8280xp-pmics.dtsi into main pmk8350.dtsi file. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pmk8350.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi index 455ffffb5f5c..26e40dbfc173 100644 --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi @@ -66,6 +66,15 @@ pmk8350_rtc: rtc@6100 { status = "disabled"; }; + pmk8350_sdam_6: nvram@8500 { + compatible = "qcom,spmi-sdam"; + reg = <0x8500>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x8500 0x100>; + status = "disabled"; + }; + pmk8350_gpios: gpio@b000 { compatible = "qcom,pmk8350-gpio", "qcom,spmi-gpio"; reg = <0xb000>; 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: 13197231 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 D62BEC77B71 for ; Sat, 1 Apr 2023 22:08:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230198AbjDAWIX (ORCPT ); Sat, 1 Apr 2023 18:08:23 -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 S230214AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -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 228672702E for ; Sat, 1 Apr 2023 15:08:17 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id by14so7465885ljb.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=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=qcmVNoUzyjy53zLdWIl/8uR5t/jwn4mfmGc9Wpzyd3dJkC3fQXGQGGXibyM9pkm4// fpsPY9hcZKFfphHsILhWaNmP1r/tUh4ZYdEwaIEZ02iduAZKrYUcwgj2wltiXmGNE/nE h0YWwe1H3aCZMprNO1D+QpduMWY70J1/hJWgw42fNHXDsevPd3DwPC+tAZ+53ZETFTnB /cEj383ijKcQ3XlJhH2Bv02qmXTAxpzes/AD5LC/KD6Sfpd3Rtbpg/nSwWGWkRB5jWlc LaXGpLk/kLDFc8zRnLJRno0CoV3b0V5ywYmJSOZojK8SLByEk0wiq0Z1NSEk7m/zMyLC 2OAg== X-Gm-Message-State: AAQBX9eeIqGD/Jw8SZNFp7yX9b6jExA/QzJeYz6qHViuN98kXe8bCQtv HBXFSnPrUb0OjY0p1FpdxVU/2g== 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: linux-iio@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 Reviewed-by: Konrad Dybcio --- 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:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197229 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 1D417C76196 for ; Sat, 1 Apr 2023 22:08:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbjDAWIW (ORCPT ); Sat, 1 Apr 2023 18:08:22 -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 S230218AbjDAWIU (ORCPT ); Sat, 1 Apr 2023 18:08:20 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAEF27EFB for ; Sat, 1 Apr 2023 15:08:17 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id e9so11382455ljq.4 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=1680386897; 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=auhVCLXv3fO8ZAo9OD1BbJNImSoPje+kK0+NreVCtXI=; b=qmcTQxgZZhT0WKiawRJHVvusVuA3P6pfm6DKwhLxxtddcSE5S5Yx+1BVKQmMbZPo2e EcDunjbF/j+ktcnK6k7XGqDkJB7AHzJb2o8VQIhhZ2Yn2/SVcRmwTQ8+3OhED5fFtV31 pxKw8dSLkOQY5iIfJjiNzMWPrAWRPi7vXCNAIrTErY3YBIn3HJyIE7eBk8Ov6tiuuirA k8WjWxX9BuU0+aWc9VJYIXKUxRRSMj6wAFP2Ts3UuolXGv5escIG0DKfYObgPAV3Vdy2 x80ijEYCvl6x8pvejmDvSVM4lI5HHupoAQq8EtUf+tH0lce0zYKNF5BqmrPooPkxWHUR WHjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386897; 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=auhVCLXv3fO8ZAo9OD1BbJNImSoPje+kK0+NreVCtXI=; b=styt6+ihnYAl8sZHIK9Su3PxdxBBQTMnkb+xixkdTIuk5QlY8MdcsuGnCXplY7RMv1 aiJFYUtq08t6MMRja9Qf6wqsm7wRfdHbEj1VHhnyd7WV+m58Xwo6PrmmdK9e3a9LfjbM mQJ8nU/VqYFHNGcui4W2VdVRqbv385y6X0SI0aP8wsvTQ9Hb63c1Ne6Dis3/T/YZEK5W 5Vv+VFCJqk4VHyaSXDN4ocmuCju54NDSHbuBIlG/WAL6347zjXAXQBUULwpM9FYT8oyq rd0Mb/N1GG0/VSvY747nftIdXmg9tTass5YvXfVxLo8KYgzOVedU2jo+M5Ci6QLGEyI5 DMUA== X-Gm-Message-State: AAQBX9efArHpd2dYWtXnf8rHEzGugcXUSyD2k40XR+NOrM/tFhFTKO4i c4g+5FS25y6l01MWku3gwmWtuQ== X-Google-Smtp-Source: AKy350YQocIcRLL0wIu0npSlWeIyQU0VL8/DBpGRkcboyhPBiNIxIzdMMtxteIVNwyIGwLnsaXxfEA== X-Received: by 2002:a2e:9ccc:0:b0:2a6:183a:9a13 with SMTP id g12-20020a2e9ccc000000b002a6183a9a13mr3113541ljj.46.1680386897244; 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.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 09/22] arm64: dts: qcom: pmk8350: allow overriding the label Date: Sun, 2 Apr 2023 01:07:57 +0300 Message-Id: <20230401220810.3563708-10-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: linux-iio@vger.kernel.org sc8280xp-pmics.dtsi incorporates a copy of pmk8350, but the dts files use labels following the markings found in the schematics. Allow overriding the labels in pmk8350.dtsi. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi | 13 +++++++++ arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi | 14 ++++++++++ arch/arm64/boot/dts/qcom/pmk8350.dtsi | 28 +++++++++++-------- 3 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi create mode 100644 arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi diff --git a/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi new file mode 100644 index 000000000000..1c81269f0783 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023, Linaro Limited + */ + +/* cleanly revert the effects pmic-dyn-header.dtsi */ + +#undef LABEL +#undef _LABEL +#undef __LABEL + +#undef PMIC_SID +#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 new file mode 100644 index 000000000000..75f0448568bd --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023, Linaro Limited + */ + +/* + * Preprocessor symbols to assist in describing PMICs which have configurable + * SID. All effects of this header (or its parameters) must be reverted in + * pmic-dyn-footer.dtsi. + */ + +#define LABEL(name) _LABEL(PMIC_LABEL, name) +#define _LABEL(pmic, name) __LABEL(pmic, name) +#define __LABEL(pmic, name) pmic ## _ ## name diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi index 02e7518ab57b..f26ff3daf119 100644 --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi @@ -13,33 +13,39 @@ #define PMIC_SID 0 #endif +#ifndef PMIC_LABEL +#define PMIC_LABEL pmk8350 +#endif + +#include "pmic-dyn-header.dtsi" + &spmi_bus { - pmk8350: pmic@PMIC_SID { + PMIC_LABEL: pmic@PMIC_SID { compatible = "qcom,pmk8350", "qcom,spmi-pmic"; reg = ; #address-cells = <1>; #size-cells = <0>; - pmk8350_pon: pon@1300 { + LABEL(pon): pon@1300 { compatible = "qcom,pmk8350-pon"; reg = <0x1300>, <0x800>; reg-names = "hlos", "pbs"; - pmk8350_pon_pwrkey: pwrkey { + LABEL(pon_pwrkey): pwrkey { compatible = "qcom,pmk8350-pwrkey"; interrupts = ; linux,code = ; status = "disabled"; }; - pmk8350_pon_resin: resin { + LABEL(pon_resin): resin { compatible = "qcom,pmk8350-resin"; interrupts = ; status = "disabled"; }; }; - pmk8350_vadc: adc@3100 { + LABEL(vadc): adc@3100 { compatible = "qcom,spmi-adc7"; reg = <0x3100>; #address-cells = <1>; @@ -48,7 +54,7 @@ pmk8350_vadc: adc@3100 { #io-channel-cells = <1>; }; - pmk8350_adc_tm: adc-tm@3400 { + LABEL(adc_tm): adc-tm@3400 { compatible = "qcom,adc-tm7"; reg = <0x3400>; interrupts = ; @@ -58,7 +64,7 @@ pmk8350_adc_tm: adc-tm@3400 { status = "disabled"; }; - pmk8350_rtc: rtc@6100 { + LABEL(rtc): rtc@6100 { compatible = "qcom,pmk8350-rtc"; reg = <0x6100>, <0x6200>; reg-names = "rtc", "alarm"; @@ -66,7 +72,7 @@ pmk8350_rtc: rtc@6100 { status = "disabled"; }; - pmk8350_sdam_6: nvram@8500 { + LABEL(sdam_6): nvram@8500 { compatible = "qcom,spmi-sdam"; reg = <0x8500>; #address-cells = <1>; @@ -75,11 +81,11 @@ pmk8350_sdam_6: nvram@8500 { status = "disabled"; }; - pmk8350_gpios: gpio@b000 { + LABEL(gpios): gpio@b000 { compatible = "qcom,pmk8350-gpio", "qcom,spmi-gpio"; reg = <0xb000>; gpio-controller; - gpio-ranges = <&pmk8350_gpios 0 0 4>; + gpio-ranges = <&LABEL(gpios) 0 0 4>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; @@ -87,4 +93,4 @@ pmk8350_gpios: gpio@b000 { }; }; -#undef PMIC_SID +#include "pmic-dyn-footer.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: 13197233 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 724ACC77B79 for ; Sat, 1 Apr 2023 22:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230260AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbjDAWIU (ORCPT ); Sat, 1 Apr 2023 18:08:20 -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 7A3F7E042 for ; Sat, 1 Apr 2023 15:08:18 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id s20so6332672ljp.7 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=4bQHFYxNmzibbHhZbKt9swBv/K+RhtSjzVeqiBZ9l1tttUHTaCBQ8nw8Us9v9bVb+I 4TDVnQD2NP7SP3PEXoEczTDiZoZhfmmE1OdLVIj3G1v2V/ojVUTFTDo9IBAhVKYYwVKu kaIAeyQ74xUTpSfvZuiVU22rCiCok8NfNsvbDTFWOL5WFSfy5/1U6PMkBWr2/GEILEtP v75KWy2+usUuT4NE69w83zpClZEBgzRIef+m/IhL88y9nzjoSNKMgRr/7t4wRMt/FNz9 Q16PtKRb+/rKoGiivjSdUWl52biJ52qfeg8r5u6kisZhrPolq1R9UeaJvsYr4/BeNnYZ ItDw== X-Gm-Message-State: AAQBX9cUM19As1ooxwrbkINLTC1ED54aR7ELgVsixS5KUbZl7mwiREUv VVbo8HVXO30MHNn5oAb/TxrI/Q== 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: linux-iio@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 Reviewed-by: Konrad Dybcio --- 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:07:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197232 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 9FA62C77B70 for ; Sat, 1 Apr 2023 22:08:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230227AbjDAWI0 (ORCPT ); Sat, 1 Apr 2023 18:08:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbjDAWIV (ORCPT ); Sat, 1 Apr 2023 18:08:21 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D67F2B0C8 for ; Sat, 1 Apr 2023 15:08:20 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id h9so26658219ljq.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=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=6m0hdfq0uiUbCtIDj7GtLY/zovcSFcUMPdTKKyhrM9A=; b=rlCf6nwQVKQmnNVNtddeGfkzHqk1sS7gMvpv+/FNvEEkmiW8m5hUY8z+cKVaRfNPn4 y//KdphYqgCRa2y8+m5EqNpcG02Q5GBlmBy60BMKFNSIYzGt1/3JmKOpnA0Fvo6oimyH WRkOvOpEFiZvEuxmaSQFqteNnHBOaJwPdhdu/gYxd67YCqHKvI+18xtKeDV0KrFukTMz Fa4epttegyFCb7ImN5aXKm2oTkxnVPf8AonEaAC9C8lFkr7ewdBKb/AJFnar5tD3gJuq dwY4Q6mn0H6r7ObwvH57oWK4NsQ6/aP9b44hjpESv5CMqcKiyqm4CsDf++PxR29aD39I aDAA== 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=6m0hdfq0uiUbCtIDj7GtLY/zovcSFcUMPdTKKyhrM9A=; b=Qi38iprALxj+nH0E7x6xYrWud+8Wgu7XOz/QNqNFySlq9AeSzupMwYszjk3JesThZt HAth6GdIoXU9XwD+sKpSNXSz0a3l76HQOWjlMAS1r9YcgBPfqXWDl7Nu+wt/0Uvc3w0Z m5clAwe/4PS/2jNOInSSP/+dBYYjWK5TcKIHSGRm1b04ge0kWa5FGqchDhqnU+dw4ByR ne1IaPfmDXR9cC/cZV8JpTJ+19l7hHG1hyOEAbilfE59PpYZt2FG78P7GuWapxJptQ3W CC7ai1kdY2x0I1bhzMf+FECkziAcRHt6KlJIIVLbob/JoOKjfKzMg+HJouktO7/gKz7V VDkA== X-Gm-Message-State: AAQBX9eEjEtAoT0z5FYTS2e1+KjpL38rqtlDbzUOhz7iZpzyh1u7ks6T oc9xs7TpeSjdJ9Np9kNgxkR286tlCaOLLb2LP3hKaw== X-Google-Smtp-Source: AKy350a3fAKWohjrLSSjtytWHa012WYJ6te7dAnRvRG/lWN9D4ucYtLhOMjxCQAnS1oZIFuIhbxpLw== X-Received: by 2002:a2e:9589:0:b0:298:a7bd:5c56 with SMTP id w9-20020a2e9589000000b00298a7bd5c56mr9194539ljh.53.1680386898434; Sat, 01 Apr 2023 15:08:18 -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: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 11/22] arm64: dts: qcom: sc8280xp*: use pmk8350.dtsi Date: Sun, 2 Apr 2023 01:07:59 +0300 Message-Id: <20230401220810.3563708-12-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: linux-iio@vger.kernel.org Employ PMIC_LABEL and switch sc8280xp-pmics to use pmk8350.dtsi in order to reduce duplication and possible discrepancies. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 67 ++------------------ 1 file changed, 4 insertions(+), 63 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index 254337345e45..6c183b6c9207 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -51,70 +51,11 @@ trip1 { }; }; -&spmi_bus { - pmk8280: pmic@0 { - compatible = "qcom,pmk8350", "qcom,spmi-pmic"; - reg = <0x0 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pmk8280_pon: pon@1300 { - compatible = "qcom,pmk8350-pon"; - reg = <0x1300>, <0x800>; - - pmk8280_pon_pwrkey: pwrkey { - compatible = "qcom,pmk8350-pwrkey"; - interrupts-extended = <&spmi_bus 0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>; - linux,code = ; - status = "disabled"; - }; - - pmk8280_pon_resin: resin { - compatible = "qcom,pmk8350-resin"; - interrupts-extended = <&spmi_bus 0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>; - status = "disabled"; - }; - }; - - pmk8280_vadc: adc@3100 { - compatible = "qcom,spmi-adc7"; - reg = <0x3100>; - interrupts-extended = <&spmi_bus 0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; - #address-cells = <1>; - #size-cells = <0>; - #io-channel-cells = <1>; - status = "disabled"; - }; - - pmk8280_adc_tm: adc-tm@3400 { - compatible = "qcom,spmi-adc-tm5-gen2"; - reg = <0x3400>; - interrupts-extended = <&spmi_bus 0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; - #address-cells = <1>; - #size-cells = <0>; - #thermal-sensor-cells = <1>; - status = "disabled"; - }; - - pmk8280_rtc: rtc@6100 { - compatible = "qcom,pmk8350-rtc"; - reg = <0x6100>, <0x6200>; - reg-names = "rtc", "alarm"; - interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; - wakeup-source; - status = "disabled"; - }; - - pmk8280_sdam_6: nvram@8500 { - compatible = "qcom,spmi-sdam"; - reg = <0x8500>; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 0x8500 0x100>; - status = "disabled"; - }; - }; +/* SID 0 */ +#define PMIC_LABEL pmk8280 +#include "pmk8350.dtsi" +&spmi_bus { pmc8280_1: pmic@1 { compatible = "qcom,pm8350", "qcom,spmi-pmic"; reg = <0x1 SPMI_USID>; 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: 13197234 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 385ECC77B75 for ; Sat, 1 Apr 2023 22:08:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbjDAWIZ (ORCPT ); Sat, 1 Apr 2023 18:08:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230231AbjDAWIV (ORCPT ); Sat, 1 Apr 2023 18:08:21 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A95E27000 for ; Sat, 1 Apr 2023 15:08:19 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id s20so6332699ljp.7 for ; Sat, 01 Apr 2023 15:08:19 -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=Y2WnB6+ixxTwTiXGny0Zmz7u6/N0DGA5c331mYpsrCExfW94MuxIQ7GhsMOvuKkVT1 iA27L+dPOdv6uyF4Pg0UYca2gNWrsFSGBf6x/5O7EDR3w0n6GrprFaSt+K52waUYKTP+ qE/u0vo/K5MtbnpDnabc/wTK7YdvQdIWweywk4JcAs8s90Hm4FPtVYkJmjAdwSJ7YOGP BKXxF7bzuaUFb+AmOaXuJIWIQqNd6qBZKRmC3lN3ZYm9rO+yVj2YUrmyvjCY0AVWVXAA oeemI8l2TnCszoCkRCQxk8kMDWax8Gcj1Isfcn5NiWUtIU3VwluiYqPLdTtxFtItRPOi +97g== X-Gm-Message-State: AAQBX9fAGvUDsJv/8tvDfY7SW5zitorhMOrZRci/J93ZQnm6efR0hJV3 nz1fbQ7CQyNiO2jViQJjJTjc7g== 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: linux-iio@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: 13197237 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 25CB6C7EE23 for ; Sat, 1 Apr 2023 22:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230263AbjDAWI1 (ORCPT ); Sat, 1 Apr 2023 18:08:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78FAE2953F for ; Sat, 1 Apr 2023 15:08:21 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id x17so33422315lfu.5 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=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=n5ruaswPTr4aTQUaqOUNDdtLf7Fy/weN6GQ93n/n+pk=; b=wUS5/NeTMj/GEX9U9VbtMXGTZS5sR18rzgRXIWNtONvEkF1tirg/cNAfXLIy+VCRiV J37oJXNMj/zalgk85iGGzUTFV4qa0SGpVpcs+gKm0sI8m2jp62Vv+pGYqLwnDb0nw6iu GW7cX0e5BssInpeHmfIGoUViP893Q8Pvga8yLwdJ2CFeo7eVvRr9Lkk8ai+Sx/INif7K VcgI8ZKx2QvYTQ1hIgJmcWjNkHzgRPeY7voKqgMovMIYhn4Y2DxNo/oF/NQD1ilyrCTU XxEg/f0fi2plYneOCCe5xP4q5h3P+2KSRdBHmCiaLjYjn26STWKHxRYI4OoZAToBxOi6 /Ctg== 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=n5ruaswPTr4aTQUaqOUNDdtLf7Fy/weN6GQ93n/n+pk=; b=3d7B4ZigOHZQJHSX0p7Cr5j0feByaWQcLFpE9pyMtMRBKmHSQCyUHm73MGrEyGqvuI K9mnVynf9wOV3tcBZq3s/GFddHhvZhRcljjToXVH5fkstQQoDfPSovH1uRa2+eZk89fv hn8FYp0SBeZjWYk6d03ilQkgItdg2RTXgTKjDH0O8ZD7vfdRP2vsuu+GNLqe6/sO1tWy 4vjAa2CCSg4gSy91RmmvKhRFx9qznzYmN7ly/IFpsMNp3LWRcR0lGZcnFFfzDMs/53dZ By6hnunFz2o+WLuUO4I2RNnjYY7xtLYbhSCyz0kf7Qmqyx9JBIifHO7mJ9wp+im7Id+v 8jvg== X-Gm-Message-State: AAQBX9eLX7xi+6yUHw0pMFeShqqu9AOXqBaCFI0IxJ/5MGFnWP/WZFX6 kebVchg81IVm2XiweResnF5wlA== 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: linux-iio@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:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197238 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 74259C7EE25 for ; Sat, 1 Apr 2023 22:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230254AbjDAWI3 (ORCPT ); Sat, 1 Apr 2023 18:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230204AbjDAWIZ (ORCPT ); Sat, 1 Apr 2023 18:08:25 -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 7A435EC5F for ; Sat, 1 Apr 2023 15:08:22 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id q14so26638150ljm.11 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=566P1oEdGUnwQYipK9fvtxMeISuZlL/SKkQhiagAQZs=; b=tgLrMFjCqn22fp34MT5t69p4Q0FiqKaMZw+CLj7zr3psxSHtbX1yYEbbtBhxPC7ozA XdWpfM27HDs5oS4Qb9/CaRNll5fN7naH2gWdTFZuMdEvMLgmCU31lec+pWBY7AaTV5by H62EMFEzYHDMqgumICPEw4b0bi8bXlLm/mfdYvOuIpZ9sTiUguzV+HRa5cafqTe2KSPg qeUQAal+rMyGyIQKXWgowkhfjy01T9flD7WmPUXxtQZ3v0yEtRJ3NVeDjNCDRlVLpCEv syiq2OcZRcr/KWq2XMR+oXQMvqwZJfenkByQ9Tnkd+mzyybmqB93qGnl/tSExuslCM7Y rP/w== 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=566P1oEdGUnwQYipK9fvtxMeISuZlL/SKkQhiagAQZs=; b=vGb1ogN/CjdpiiJBoufuVgC+2ArXo1WF5cRMI8llW8OoKfxoJ2AMrtPwneyP3cgCvg dZjmMejsNYrJ/c/6ajKxwQWKb1KgXePbk3uovAq1xV1pJyvDWWeaMvskLkVFp8p4qvEm OEEi/XAblQk4L6okGYBWt566Pd0lBRc0gl11+5UOTrq5x+fELT6pSiV4sUHronilQc0N JIhtzW6Z9RBvgARO27CeV7wOhTXR7EmLIUeMt/tP5hYQh7+ZFnohK21AHJGOmYdpi2WL EqnAso90u8f3FT8p+3hKryhUJt1VVYl2RH9YBl54xmE2aBetSmAkgfceZzbMn/rN69Cu 6tLA== X-Gm-Message-State: AAQBX9cW9P5ZsD7CBEw6AWcelxndhfIgekOqZqRfQGz0+iSlXoDatulV 7BINgS8uzCdYeBLdkmBbZPVMtQ== X-Google-Smtp-Source: AKy350YIw4NyPSk+07lE5eoo886mPe9HrYEqRCY2wxq+nsbQFzC0ON1ttGbQelMHp5Ha/w5KzO5TEA== X-Received: by 2002:a2e:9b81:0:b0:295:a8e6:6b15 with SMTP id z1-20020a2e9b81000000b00295a8e66b15mr3987590lji.4.1680386900340; 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.19 (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 14/22] arm64: dts: qcom: sc8280xp*: use pm8350.dtsi Date: Sun, 2 Apr 2023 01:08:02 +0300 Message-Id: <20230401220810.3563708-15-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: linux-iio@vger.kernel.org Employ PMIC_SID/PMIC_LABEL and switch sc8280xp-pmics to use pm8350.dtsi in order to reduce duplication and possible discrepancies. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 100 ++----------------- 1 file changed, 9 insertions(+), 91 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index 6c183b6c9207..69f79ed87f62 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -7,79 +7,21 @@ #include #include -/ { - thermal-zones { - pm8280_1_thermal: pm8280-1-thermal { - polling-delay-passive = <100>; - polling-delay = <0>; - thermal-sensors = <&pm8280_1_temp_alarm>; - - trips { - trip0 { - temperature = <95000>; - hysteresis = <0>; - type = "passive"; - }; - - trip1 { - temperature = <115000>; - hysteresis = <0>; - type = "critical"; - }; - }; - }; - - pm8280_2_thermal: pm8280-2-thermal { - polling-delay-passive = <100>; - polling-delay = <0>; - thermal-sensors = <&pm8280_2_temp_alarm>; - - trips { - trip0 { - temperature = <95000>; - hysteresis = <0>; - type = "passive"; - }; - - trip1 { - temperature = <115000>; - hysteresis = <0>; - type = "critical"; - }; - }; - }; - }; -}; - /* SID 0 */ #define PMIC_LABEL pmk8280 #include "pmk8350.dtsi" -&spmi_bus { - pmc8280_1: pmic@1 { - compatible = "qcom,pm8350", "qcom,spmi-pmic"; - reg = <0x1 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; +#define PMIC_SID 1 +#define PMIC_LABEL pmc8280_1 +#define PMIC_NODE pmc82801 +#include "pm8350.dtsi" - pm8280_1_temp_alarm: temp-alarm@a00 { - compatible = "qcom,spmi-temp-alarm"; - reg = <0xa00>; - interrupts-extended = <&spmi_bus 0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; - #thermal-sensor-cells = <0>; - }; - - pmc8280_1_gpios: gpio@8800 { - compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio"; - reg = <0x8800>; - gpio-controller; - gpio-ranges = <&pmc8280_1_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; +#define PMIC_SID 3 +#define PMIC_LABEL pmc8280_2 +#define PMIC_NODE pmc82802 +#include "pm8350.dtsi" +&spmi_bus { pmc8280c: pmic@2 { compatible = "qcom,pm8350c", "qcom,spmi-pmic"; reg = <0x2 SPMI_USID>; @@ -108,30 +50,6 @@ pmc8280c_lpg: pwm { }; }; - pmc8280_2: pmic@3 { - compatible = "qcom,pm8350", "qcom,spmi-pmic"; - reg = <0x3 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pm8280_2_temp_alarm: temp-alarm@a00 { - compatible = "qcom,spmi-temp-alarm"; - reg = <0xa00>; - interrupts-extended = <&spmi_bus 0x3 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; - #thermal-sensor-cells = <0>; - }; - - pmc8280_2_gpios: gpio@8800 { - compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio"; - reg = <0x8800>; - gpio-controller; - gpio-ranges = <&pmc8280_2_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - pmr735a: pmic@4 { compatible = "qcom,pmr735a", "qcom,spmi-pmic"; reg = <0x4 SPMI_USID>; 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: 13197235 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 4D98CC77B7F for ; Sat, 1 Apr 2023 22:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230234AbjDAWI1 (ORCPT ); Sat, 1 Apr 2023 18:08:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230247AbjDAWIX (ORCPT ); Sat, 1 Apr 2023 18:08:23 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76BF22782C for ; Sat, 1 Apr 2023 15:08:21 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id by14so7465964ljb.12 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=4yshsiUYUR1vpfr80h8E8//XOHmjjd+uBhfV1af/VyruQye8qHedTDBE6U+VEzL/nQ OpSBG+PNf/Dzk9+yBVi/rPPn8i5TOfaDZNYRr/aW1L/u8ss9U6cP2UanMZMim4DOZLyf b7SmZ93vlrTgvz7xEOXQ/eeZkBqgAWaayreOcTqNTGdMwg4L2bVgNjQr4U7/JNyEQpqo RcNAr7hxbsg9bU4FgFA8SvJv5ipeVNZtoqQIeAl0mjyC26qA7nSoWNQJswLOmMF0rReO 5INJ50B6O+ZMlPd1eTZia62hYf6r5LO/sFz0iLFUoyC644uX3H/mrYSMI6EdBy0cIoik ASlw== X-Gm-Message-State: AAQBX9fvPLwIt8F3OURUqiF3VVr1VUWYFtTgRR5ErZVxTVE5epBrh7jH 3gENoPisZNJjPkfRMxFobusISQ== 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: linux-iio@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:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197236 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 7CBEDC7EE22 for ; Sat, 1 Apr 2023 22:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230264AbjDAWI2 (ORCPT ); Sat, 1 Apr 2023 18:08:28 -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 S230254AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F46C29502 for ; Sat, 1 Apr 2023 15:08:22 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id b6so6591222ljr.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=p7Y3KWurDVmeNMJ1PgoNSWwvLTrrzW/b+U81BYECoKQ=; b=WL6veunStgKvS/trjZTjbc5YO4zQum/MCdtE3rB7wM7s+JjAR+j1wDmxs59w29Ajjz eCtCdR7nsdZGNNW23rWOc0U0xhCskN3PmBhkEu0THZm52oTQ4x4wxryMzSti4xFhnT7z vF801nMY/k8l3LKdb5yButx2bU7H/sTQIl7dUlAFmd87k2uHwAv1UCLXMnPJdflpufYL 9BwZJvd6OAQeK4gbUBS4aC/4Fru88nhTv/EG/iDKAwxlV3OAqltg/E9cHjZ6z/bAR0ir HOCLISPIsJ/8HmWAhDn29wOavKw7hQLzbGFUKPgYebH6woJURAckseIXO0843Qgywyz9 nKwg== 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=p7Y3KWurDVmeNMJ1PgoNSWwvLTrrzW/b+U81BYECoKQ=; b=GPSkRAvYz6cxMIDOnkHHKEBTzhJRXQ8S10P9ohqScg7qgJUU1qKqhJWjB6IvKAdcsn r+DDN0U7ezJPacNHsZyhP3LAjRZViRDgAvEDfAukEyl6ZA6vITBvOIT8HRb0L15kF5rR MNtRQlakdSEZXi4gKJhZAhyAFhKi2NsFwmSX2hV9BUGQYa47H+gOMLg5/jFzFwYNj0tT du9FkZ66SxlmPbgsZvb9MBP5zlHXkpESbNZfoEiwr8znZtW7DL+m14mVuK8uyDZa4L1x OE+HrvrgFZAHuGE7Y0ev5ZeXEVUG2ZZn78YOZzL6GtZhV3Zi4gP/obFFG1HQm1htLCe6 0muA== X-Gm-Message-State: AAQBX9cywkQciD14wAGic5rEbI1eZaUSIPwYQ73D/J3wNx+ILsex5LOA 0UYEf7f+dFm28Fgb9D7iAgCsVw== X-Google-Smtp-Source: AKy350YJE78lIeCkl5UjUQWNcbugthNjhLSEs2bkDo+SlJ9QrSPkLbCENDegNkd9WqIMkX4MDx2u7w== X-Received: by 2002:a2e:97ce:0:b0:2a2:5a2e:1d46 with SMTP id m14-20020a2e97ce000000b002a25a2e1d46mr9235511ljj.28.1680386901602; Sat, 01 Apr 2023 15:08:21 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:21 -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 16/22] arm64: dts: qcom: pm8350c: allow overriding SID and label Date: Sun, 2 Apr 2023 01:08:04 +0300 Message-Id: <20230401220810.3563708-17-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: linux-iio@vger.kernel.org The platform can use several instances of PM8350C PMIC. Allow overriding the SID and node labels inside pm8350c.dtsi. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8350c.dtsi | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm8350c.dtsi b/arch/arm64/boot/dts/qcom/pm8350c.dtsi index ee25c07ce31d..ddfc8fd6bb3e 100644 --- a/arch/arm64/boot/dts/qcom/pm8350c.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8350c.dtsi @@ -6,12 +6,23 @@ #include #include +/* (Sadly) this PMIC can be configured to be at different SIDs */ +#ifndef PMIC_SID + #define PMIC_SID 2 +#endif + +#ifndef PMIC_LABEL + #define PMIC_LABEL pm8350c +#endif + +#include "pmic-dyn-header.dtsi" + / { thermal-zones { pm8350c-thermal { polling-delay-passive = <100>; polling-delay = <0>; - thermal-sensors = <&pm8350c_temp_alarm>; + thermal-sensors = <&LABEL(temp_alarm)>; trips { trip0 { @@ -31,33 +42,35 @@ pm8350c-crit { }; &spmi_bus { - pm8350c: pmic@2 { + pmic@PMIC_SID { compatible = "qcom,pm8350c", "qcom,spmi-pmic"; - reg = <0x2 SPMI_USID>; + reg = ; #address-cells = <1>; #size-cells = <0>; - pm8350c_temp_alarm: temp-alarm@a00 { + LABEL(temp_alarm): temp-alarm@a00 { compatible = "qcom,spmi-temp-alarm"; reg = <0xa00>; interrupts = <0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; #thermal-sensor-cells = <0>; }; - pm8350c_gpios: gpio@8800 { + LABEL(gpios): gpio@8800 { compatible = "qcom,pm8350c-gpio", "qcom,spmi-gpio"; reg = <0x8800>; gpio-controller; - gpio-ranges = <&pm8350c_gpios 0 0 9>; + gpio-ranges = <&LABEL(gpios) 0 0 9>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; }; - pm8350c_pwm: pwm { + LABEL(pwm): pwm { compatible = "qcom,pm8350c-pwm"; #pwm-cells = <2>; status = "disabled"; }; }; }; + +#include "pmic-dyn-footer.dtsi" From patchwork Sat Apr 1 22:08:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197239 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 60B6FC77B77 for ; Sat, 1 Apr 2023 22:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230230AbjDAWI3 (ORCPT ); Sat, 1 Apr 2023 18:08:29 -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 S230141AbjDAWI0 (ORCPT ); Sat, 1 Apr 2023 18:08:26 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED2532BECF for ; Sat, 1 Apr 2023 15:08:22 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id s20so6332766ljp.7 for ; Sat, 01 Apr 2023 15:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386902; 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=YQcvFQ9kHeNL8IHceY65oLWn/T5sUycgBhvoOeDCGS8=; b=l8LipmmPEPafjGuO2N3xSP9FojJsVdZrEgkYuzcKJoi0L9qS3edOM6WL76Y7N6FK5u FkH87FgUmo6qGbv57vR8qh4nRRm5tgOVWF1yd1ksuElpIjmfuo/UZVdN8QYfYIwR0SXh R8SK3/tWR3jNo2zQXGeYIxqCfPYyr5X/dJ5MvchIdMmoCFz26IvCTC3FxHM91BNbY9jS CjZer0mdDfk0n76Jh95loIFykDcF18ExMuO64+G5QJ9ehol53V1eBnlZ3oMUZzpti1t8 tdgYacDb8qXItq2B9pjWLqJxWufWZAM5UZ0fetHREgPruNmV4PxtK/NeZoezkMkLD/EM cqGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386902; 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=YQcvFQ9kHeNL8IHceY65oLWn/T5sUycgBhvoOeDCGS8=; b=LWACFT4tzi+FUwYAB4g8ES5Z1yVdoA/5Q+KNGvLuuuYo/3Alw/UnYie5X52d0N/Qiv i9gCNYY3dOfpPj2szhyIXpZl5q2bNRGZNltalK7e9bADXxH0GxNGtKeO+o1YzlbFeHdg QQpi8H6/u4YHXpT4QQQBj6dmUbQVXxlPugFVRizuKP33fxUsDJoaTjf2enDGBF0dhyJM 6gndF2AVJ1QbhsiIZvhcXlK0WX4a9b+lV0RLQlAeWV8p5cGjcsK1NEt0Tpjfcdvawhli uILn2zq11wm9GmQClSPkojqvDrOs3bWWZFKR9vXVi6EHcnUZtGErs4iEmupNeuCrwBCD UsWw== X-Gm-Message-State: AAQBX9dOmPC0BeqkA7pWYH7oP/1jwezpfrVsRNJtSdy0mZ0PQ3WWFQpx HObjnKoa8kyw3ab5Uq/Wbayxtg== X-Google-Smtp-Source: AKy350bvN/CKvFinouzJhGtptL8M6mIPhxsjXlT8iGe9Xvr0pWQAgGSuCYWdsO7ajfzeTotjaD0AHg== X-Received: by 2002:a2e:9001:0:b0:29f:6fd7:697c with SMTP id h1-20020a2e9001000000b0029f6fd7697cmr9134501ljg.28.1680386902171; Sat, 01 Apr 2023 15:08:22 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:21 -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 17/22] arm64: dts: qcom: pm8350c: use interrupts-extended for IRQ specification Date: Sun, 2 Apr 2023 01:08:05 +0300 Message-Id: <20230401220810.3563708-18-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: linux-iio@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/pm8350c.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/pm8350c.dtsi b/arch/arm64/boot/dts/qcom/pm8350c.dtsi index ddfc8fd6bb3e..eef36900dee6 100644 --- a/arch/arm64/boot/dts/qcom/pm8350c.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8350c.dtsi @@ -51,7 +51,7 @@ pmic@PMIC_SID { LABEL(temp_alarm): temp-alarm@a00 { compatible = "qcom,spmi-temp-alarm"; reg = <0xa00>; - interrupts = <0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; + interrupts-extended = <&spmi_bus PMIC_SID 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; #thermal-sensor-cells = <0>; }; From patchwork Sat Apr 1 22:08:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197242 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 7E30FC77B60 for ; Sat, 1 Apr 2023 22:08:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbjDAWIa (ORCPT ); Sat, 1 Apr 2023 18:08:30 -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 S230195AbjDAWI0 (ORCPT ); Sat, 1 Apr 2023 18:08:26 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4352D2780F for ; Sat, 1 Apr 2023 15:08:23 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id x20so26623095ljq.9 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=1680386902; 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=Prd++xPaLuXWKrZ9/YvClXLdfWQ6hYA83t8qkIsDY/s=; b=X0HJIBmB+sEjaqhIloH0DkRY8Qaqtm4WsmOB2ZeSD+a2griARyH/GFyzmz1kMhjd8d dZSrBTSRWAWxRCcURw1a8buklE/v9eYxgjgrGda3hMpM3Oerm506ZTHOqpo7g0fiv59r h8tHxmPG0kwU8YVloZHepoeE4NZEo2YIc5KEHIhxttk+h1sUrgtBvO5qB+StZNi0jA8t UtqLhXqdNguId/JTTMTykMw8AosFguRucZ147HknoQc8xACoWCpLixgzW387VVITeX45 iJLVD3MZeR7NQIA/EN/viMBJiAz/h/XZcJ6Zf99lb1xtJ5MqoVkpDXsThdUKF58eTH75 ofbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386902; 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=Prd++xPaLuXWKrZ9/YvClXLdfWQ6hYA83t8qkIsDY/s=; b=KWkcdUe6GFKQ9tBRqS4YuztXS0qlOTonPWqCjv4yYVQshwahXHdecwdFg5QgEmQkQl rCAXfZ86MJ4N7QelWVfDKg27H+7i42g1gy1w05/OldV0jfHYdUlSiIFfcwf9Xn0fbDui 06bCi0FhUGyO6vMRSHmbr8ADUqKi0apN6yhPFk1PK8wRNBrtO7MQy5kgmAG9u3fhRLDh QcP7RvVvzktavfL3YCyts/rvLkGSUPgVnfg+uKOxq1qrmuOQm576t6axyuXDrP3wBz8S NsHhb5O7tGbKqEVLJ9zcl+4Ehylr/RKSIDBtMlbgKdt7zdQuidRA0wHfNtWNLSqUc6vx uUGQ== X-Gm-Message-State: AAQBX9dNOukQKodPdczFAHSuBifFlFSNC7iG6ahlbEqJ8qBYYi1B3Xj2 7JFV8nBBzsrz2HQKJSVPLva7EQ== X-Google-Smtp-Source: AKy350Y07FInGOk+rwDxq5xduEweLqehE6tsu1usirPoiFmQj1rrjZUT/sX9JfowVUsm9AU45VYS4Q== X-Received: by 2002:a2e:aa8b:0:b0:2a1:ed00:4b9e with SMTP id bj11-20020a2eaa8b000000b002a1ed004b9emr3834703ljb.1.1680386902809; Sat, 01 Apr 2023 15:08:22 -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:22 -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 18/22] arm64: dts: qcom: sc8280xp*: use pm8350c.dtsi Date: Sun, 2 Apr 2023 01:08:06 +0300 Message-Id: <20230401220810.3563708-19-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: linux-iio@vger.kernel.org Employ PMIC_SID/_LABEL and switch sc8280xp-pmics to use pm8350c.dtsi in order to reduce duplication and possible discrepancies. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 +-- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 +-- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 32 +++---------------- 3 files changed, 8 insertions(+), 32 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index d7b537284990..18f821d99434 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -24,7 +24,7 @@ aliases { backlight: backlight { compatible = "pwm-backlight"; - pwms = <&pmc8280c_lpg 3 1000000>; + pwms = <&pmc8280c_pwm 3 1000000>; enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>; power-supply = <&vreg_edp_bl>; @@ -555,7 +555,7 @@ &pcie4_phy { status = "okay"; }; -&pmc8280c_lpg { +&pmc8280c_pwm { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 590400985055..c74d32f7931e 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -54,7 +54,7 @@ wcd938x: audio-codec { backlight: backlight { compatible = "pwm-backlight"; - pwms = <&pmc8280c_lpg 3 1000000>; + pwms = <&pmc8280c_pwm 3 1000000>; enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>; power-supply = <&vreg_edp_bl>; @@ -725,7 +725,7 @@ &pcie4_phy { status = "okay"; }; -&pmc8280c_lpg { +&pmc8280c_pwm { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index 69f79ed87f62..3d2914d13fd2 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -16,40 +16,16 @@ #define PMIC_NODE pmc82801 #include "pm8350.dtsi" +#define PMIC_SID 2 +#define PMIC_LABEL pmc8280c +#include "pm8350c.dtsi" + #define PMIC_SID 3 #define PMIC_LABEL pmc8280_2 #define PMIC_NODE pmc82802 #include "pm8350.dtsi" &spmi_bus { - pmc8280c: pmic@2 { - compatible = "qcom,pm8350c", "qcom,spmi-pmic"; - reg = <0x2 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pmc8280c_gpios: gpio@8800 { - compatible = "qcom,pm8350c-gpio", "qcom,spmi-gpio"; - reg = <0x8800>; - gpio-controller; - gpio-ranges = <&pmc8280c_gpios 0 0 9>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - - pmc8280c_lpg: pwm { - compatible = "qcom,pm8350c-pwm"; - - #address-cells = <1>; - #size-cells = <0>; - - #pwm-cells = <2>; - - status = "disabled"; - }; - }; - pmr735a: pmic@4 { compatible = "qcom,pmr735a", "qcom,spmi-pmic"; reg = <0x4 SPMI_USID>; 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: 13197240 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 E4A28C77B72 for ; Sat, 1 Apr 2023 22:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbjDAWIb (ORCPT ); Sat, 1 Apr 2023 18:08:31 -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 S230212AbjDAWI0 (ORCPT ); Sat, 1 Apr 2023 18:08:26 -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 D53552BEDB for ; Sat, 1 Apr 2023 15:08:23 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id a11so26632422lji.6 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=mIEVXj/Vs+jv0Jd2zFWgmrVJs7ONxUgaTRgnJuF55gHHRH4F6qeCaMOPOXogY5Pb+h /NLfNjJnkU5gp9/4AzwfpJEPlnNUhLCeqIHV6n3v+PvP4UfQ88SmAQtrlR2LwR+Ddxny EsjS1rEKq363wpGqL0XW2IJfGDtNnuoDwCyhAeFz3YEglZpuO8CmUM9ngxkSQYsDySxX +pZ2bzv9hBJ99kzKoev4irQD5EFvGyOW4AAKYFN89KIHwDolvmGfYDBdP4sC29tGKKIN vM3FEsxIRfD+nT7Damw5avaHmVEVrbgyjQyln40jmv/tMXAKekQbfqnwhOzBmurLgNfI OrVg== X-Gm-Message-State: AAQBX9dvYyIl+WRcCRyKStNUt8ObV5zXK0CS6n8EHYeTp2XZFEqGekHJ auHmoGfDqnpXnPs9XYth48RkvA== 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: linux-iio@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: 13197241 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 6D728C77B70 for ; Sat, 1 Apr 2023 22:08:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230210AbjDAWIc (ORCPT ); Sat, 1 Apr 2023 18:08:32 -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 S230253AbjDAWI2 (ORCPT ); Sat, 1 Apr 2023 18:08:28 -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 94334265A9 for ; Sat, 1 Apr 2023 15:08:24 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id b6so6591274ljr.1 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=/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=DNJnjOSeLpUgYLuD54ZL5UheaFskGbpKiHou0+rVBmSQXhDouccqARFBmWpw8NckUf oYouEtIkTtvLB1ARGxLTe5vi4P/rppw41jsX8Uu2hpMUVlqXP3BVtYD8iBMMqkW/Z8hk PY2QVTh88sLNWqPh5TmewHUwWaGGXsc9h3liwkfJpDLqHJaQJ53b6JZ6A1hIilyaNvQ/ OgV9iB9km5XXy45OkJaNjWYfFfi4F4dcKM5vFuF+9kkMITzHJp4p50EtkRozW2aFVXcd WnZPGMQh2DslAenHnFvqHUI6AOCArIREPKa5gJHmjsLuCznCXfr6cPOmJfHhoKED597x p1PQ== X-Gm-Message-State: AAQBX9d/bJXe4ykndz8EJIKVX6hYQ3Z+6VLxJ55IwiaibzDKqqa+jsRI Jq0TFTlXvY2AaQ24tE71v0Vhrg== 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: linux-iio@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: 13197243 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 32DB0C77B75 for ; Sat, 1 Apr 2023 22:08:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230216AbjDAWIe (ORCPT ); Sat, 1 Apr 2023 18:08:34 -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 S230173AbjDAWI3 (ORCPT ); Sat, 1 Apr 2023 18:08:29 -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 2BDDB27839 for ; Sat, 1 Apr 2023 15:08:25 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id by14so7466048ljb.12 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=yw2nGjUurUpUaqb6GpaDKDSe3OrCL/6LWtcrwqacaOXZYUCAhT0lxh3jKkKtlY3ISu PV6lhJowcVRsU6zkz7TId9fmNRMEBF0OUZzpyTjGQVrcAk3yH+HywMGgi4HRXbCpvZJA isAQQkAeAdzjZO07VzdLRkSen7pWRmwYW14ofQm7kq3kJ8DMgRKhrql+ex3K3HVz3ECF k7Z7Ppk03hQ+x+atSuo3DPNsMGnTMzHtYlvEXEpncrO79wJRGLXZZl5EZRAs9t0SV6ce +W1u6Idljn04vacqtj8FUoZOdsZGdA6aPXyTx/xZ26nscGzLcUmlz/5zDBjnGOUnKCx2 sBdg== X-Gm-Message-State: AAQBX9dEyRedpjYRTxD5PIAW/J8ijbUp1YeyX7ZX7EzrTbkgfbHjS2Kt RFNc6+9eqAJPCo/nAx1xRkHB0g== 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: linux-iio@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) From patchwork Sat Apr 1 22:08:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13197244 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 3C9DBC77B7A for ; Sat, 1 Apr 2023 22:08:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229452AbjDAWIe (ORCPT ); Sat, 1 Apr 2023 18:08:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbjDAWIa (ORCPT ); Sat, 1 Apr 2023 18:08:30 -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 3CD2C26275 for ; Sat, 1 Apr 2023 15:08:25 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id bx10so8316968ljb.8 for ; Sat, 01 Apr 2023 15:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386905; 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=OGkRD76uD7OXKz4EqwytB34LnS2rXp7QOWAbxt/JqAk=; b=Dd/vxYQVguwM1BNjjHEvOXpOK4Btzb9q0wk/ayUlAZjwl1a8QeFs4FjTueJiKl8pr+ pm+z4eQ2ZoaYTD+x8FJA/FPSe88rxRmK3a/t/vG/t4RxOERQUNyyb7SDDKEU4+SabR76 B/O7gWPDVNqnu8akwMkdBkjLYuaBQBjPBPVnONqVYUf99Y8LWWM/6a28tHtYKebLqoT6 mROqxKGKAmAhX3pREMfxWtQo20NB+jVztw0qw3mNlRmztxv9VuLLaSre2EffBwgKgtEo g7nHsSb+Yz6jPYQYLrp1cPes8Gaf/Ow6uYRI3mgyI+UtcaODxGyK+zpLJ8dzlCjGXGZK B/Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386905; 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=OGkRD76uD7OXKz4EqwytB34LnS2rXp7QOWAbxt/JqAk=; b=cM9rj60SxTv/Pq18g+GmqfCRWZfBcNcWaiP+Hi7zd+sS/pr67Lu/XqrmL950F79i+p YVrEhayflzyeausoSUPEkicHiQe0Eg7XkqLwTag3iCfVfb22+6ieZm9oo1bekznxB5CA h6biCRz54vsqXxgqkOaEQjOiKysX4UemMg0zACT/hUR7o6rGYgnvAfh40+qVkArsRzVN XgfGd8F6nVkCjkhqoexzgID/bLqJH1OeyMaIgCob41cRGvUNBqAa3D6HTG2B3UMJsTTT QOvTqkfbb5ANB41dCtZnSApHmLy9Gn2YUiyJS3dDjfuDIDeHP4UUEnNJx8s2YiwRhO0y qsVA== X-Gm-Message-State: AAQBX9cr24p2lg+jJxF/9KJAbMhr7JbvzvLI4RTamT0Ypn3YpbqeWvSI VW2b8XOsguLSabYzg1tSqZ5kV8tdo6s0KN3ZgADN6Q== X-Google-Smtp-Source: AKy350YuIagO5QqOGb/PQPnYyzndtjqejr5GChId1RnzSZ/hYDurDo9gfWtskkjeeHjAN4ZuUeYktg== X-Received: by 2002:a2e:8508:0:b0:2a6:3161:6eed with SMTP id j8-20020a2e8508000000b002a631616eedmr296752lji.32.1680386905148; Sat, 01 Apr 2023 15:08:25 -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 22/22] arm64: dts: qcom sa8540p-pmics: switch to pm8150.dtsi Date: Sun, 2 Apr 2023 01:08:10 +0300 Message-Id: <20230401220810.3563708-23-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: linux-iio@vger.kernel.org sa8540-pmics.dtsi contains 4 stripped down versions of pm8150 PMIC declarations. Change it to use pm8150.dtsi directly. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sa8540p-pmics.dtsi | 96 ++++----------------- 1 file changed, 19 insertions(+), 77 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sa8540p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8540p-pmics.dtsi index 1221be89b3de..201297b6bb19 100644 --- a/arch/arm64/boot/dts/qcom/sa8540p-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8540p-pmics.dtsi @@ -7,80 +7,22 @@ #include #include -&spmi_bus { - pmm8540a: pmic@0 { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x0 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - rtc@6000 { - compatible = "qcom,pm8941-rtc"; - reg = <0x6000>, <0x6100>; - reg-names = "rtc", "alarm"; - interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; - wakeup-source; - }; - - pmm8540a_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pmm8540a_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - pmm8540c: pmic@4 { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x4 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pmm8540c_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pmm8540c_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - pmm8540e: pmic@8 { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0x8 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pmm8540e_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pmm8540e_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; - - pmm8540g: pmic@c { - compatible = "qcom,pm8150", "qcom,spmi-pmic"; - reg = <0xc SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; - - pmm8540g_gpios: gpio@c000 { - compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pmm8540g_gpios 0 0 10>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - }; - }; -}; +#define PMIC_SID 0 +#define PMIC_SID1 1 +#define PMIC_LABEL pmm8540a +#include "pm8150.dtsi" + +#define PMIC_SID 4 +#define PMIC_SID1 5 +#define PMIC_LABEL pmm8540c +#include "pm8150.dtsi" + +#define PMIC_SID 8 +#define PMIC_SID1 9 +#define PMIC_LABEL pmm8540e +#include "pm8150.dtsi" + +#define PMIC_SID c +#define PMIC_SID1 d +#define PMIC_LABEL pmm8540g +#include "pm8150.dtsi"