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: 669652 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 DB568C6FD1D for ; Sat, 1 Apr 2023 22:08:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbjDAWIR (ORCPT ); Sat, 1 Apr 2023 18:08:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230183AbjDAWIP (ORCPT ); Sat, 1 Apr 2023 18:08:15 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DFDCDBE6 for ; Sat, 1 Apr 2023 15:08:13 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id bx10so8316686ljb.8 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=M1EPYC7KYa7qe/jtc6Vx/uaHdEr0Gp3UkNczo6C3Vw2mjLaCF8M0dupuJX3RlUL5iM TN3cgXU+Lo/XofEL5BUHHhUNehjdCpYbHSBiJsvfI7A5GNcMKhq6nuB1Lj7BaSd6JBrG c2PxCiKNOxLwzfGn48lH7+CtIR1ezhTzvM+eWGJgacaTdM5twN0d9in3AGfGKoQyl9wV DSZmn/+sSJgc89PZHeBbDAZMuY8jfTyqlKbgxjUtFfS4Bzz4mBfZbBjXto93bPozM+ET Cv+BK7idM86pWWOKao/1fiPI4wHC0tNmc7dIEDpaQ3z8U/HgcwdBm4j9VVaJBMZBmkmQ 7S7Q== X-Gm-Message-State: AAQBX9cCFgnuM9i2rIZ3Dd6xb6GWUYjrpWX/Gc9OpCzZok8rqYbK4YdA 6VhIaaqmxUIFfOgY59LN9ZQBNA== 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-arm-msm@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: 669430 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 EBFD6C77B6F for ; Sat, 1 Apr 2023 22:08:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230153AbjDAWIS (ORCPT ); Sat, 1 Apr 2023 18:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbjDAWIQ (ORCPT ); Sat, 1 Apr 2023 18:08:16 -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 4D2A9113F4 for ; Sat, 1 Apr 2023 15:08:14 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id b6so6591018ljr.1 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=JdEkELqw5+s0TSAHXAq0bpnITk+b3z3jmJ8LugPOir1JEPWV0oTVgUEb2Irz6BPvar C1kEnr3yNLkH/WTydxBGRlFAuYTQYSfOefQYB73zZ5d3OcQQ90D5ZssQEvbSKzDQsn2M 4yCZHl0JkOLSKtrluOFJ5L9NglFVBMdr7hKFhWePBKdtL28MRji2RX2+iDabMsVnm78E A22y1NM/kBmfLSFfNyoxr7w59TiitQLWX5XuUNm0mow8ubmo7WTfHiKzLgufB6uDurNn Y7vh5o3j9xjjfoW0YsuXfsZaOwjrGq67mQY9V31JcQ5/gVMXS8H+W1VnJlhdwgbrWsUn Z2sw== X-Gm-Message-State: AAQBX9dQNaVGUIhhplFjXuABCVhabOp/QFTi0eu/Ic+PvaLsMbSDQ42o mOmcoug3ptbxHH8/Z9V38jOukQ== 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-arm-msm@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: 669651 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 D882EC76196 for ; Sat, 1 Apr 2023 22:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230192AbjDAWIQ (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 CF45426275 for ; Sat, 1 Apr 2023 15:08:14 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id s20so6332582ljp.7 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=H46Scpbt2zwrs17H9/a3BKD4ilebrgwXs4cu2kTXBab33qG3pYSy8X7mAK11Ir1Klz FUGHCEy3U0cP3x8jUZEknYOk5JVD8hKkD01HhcXBpTHLQs46XTDNQge15a/mo2JpbBJy bbaHPZw2qjj/r/uUt8rm62/s5K22RhlpT0WlzX1X7XJXqX0/C2ZkjAXtVkNQyddHzF79 E76/AWCs7KIGlsu1AjnMU+s2XKKDjdaruu6BImYVgmX7PZZmnj849r/iIyCDAYUGVmQ1 nMPmWVNZ2KPFTvVyUGixcdr7yhq2H0QSULHaNrgSok/fWiupylbMkhVboS3Xn43bB4Su o9nw== X-Gm-Message-State: AAQBX9ceOyw+jiaiCip+U+MCvB4MHsccd0XR45dHPLwNDFlifXFFySdA q8wXJdmQC99tgrd0CztRy0nDTg== 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-arm-msm@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 --- 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: 669650 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 9FE20C77B73 for ; Sat, 1 Apr 2023 22:08:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230192AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230196AbjDAWIR (ORCPT ); Sat, 1 Apr 2023 18:08:17 -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 9E8AB7EFB for ; Sat, 1 Apr 2023 15:08:15 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id by14so7465815ljb.12 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=mFaAQTg4dD7ogZfums5u9nma0XnMVt2i6F9DY2ttlFNxLfNWYhf3M7K7U2bnb6oRvC DPRA2OoLTbQ3e8J4nDMcMIILNP/qmP/n6HZmRr6glVMdqSX0LMoGOgIBJOM0+8MQ24U+ d/BrS+X+JihRs9dkvBbWf4i9aCpmJcPMP1+J0+q4YAHPSUPHKgYcTxzLfi6BoMCbhKRX KuhFlndS2aXlKfT2JSZ1ZtQzhBmrAThoeD+x/QNBbyWMy+YxBjy/oBhik2TNpm5KMLUg UyJjsy/ze4uraGGWt2UxHnHFgLDT6XkeexmydfcCSZprbZFJSEgbcEHNWrYrKmlUIM2J ae8A== X-Gm-Message-State: AAQBX9dX+rEM6U4Pmu4JplWXSv2NJycgo0hku/hVXRMCpFqNsSeeysyL YA+UJmaTjinXDTOWjpnMDKnoAA== 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-arm-msm@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: 669428 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 8DA0CC6FD1D for ; Sat, 1 Apr 2023 22:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230194AbjDAWIV (ORCPT ); Sat, 1 Apr 2023 18:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbjDAWIS (ORCPT ); Sat, 1 Apr 2023 18:08:18 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90E3CE042 for ; Sat, 1 Apr 2023 15:08:16 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id t14so26659781ljd.5 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=n/P91LwA6I/UUAWvwO14J01JFowDvC+jUAq8vii5kMI/2vOMOeqQkagU7tV+LfKBm4 xDaZshRN6PR83cZLq0sT27k95mSS+42WO/rYPZXjcs34T+457ggu3r8CZ/ywKAR3d3GS B9nWmUyhISy+FwXeiCyjMeTzTMnwuiTo4KJtFyK5Wx25DYaSaG+2ndCLZN6sPM2zzGs3 OAOXjG7ZVxiSdrQsUU3rYVHkzsWk0W7GJgSEYa+PnNG3UgEyquWy8nc2DShFMWPCNXVd rbyTkfcFODTnjN5Bqj1JxMcPPihmGhQbBaRZ3C0k8z2vbuDN+hdIdZkTJPzIJ8C9H6gz 6enA== X-Gm-Message-State: AAQBX9f3WAv/FsNBF2iaP1h84/8C6EX/64SpTith84Yj0ieoVVDjGT4x AXeLfdX0ArnS+iOWpSBl9Z2wGQ== 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-arm-msm@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: 669649 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 E7C78C77B77 for ; Sat, 1 Apr 2023 22:08:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229495AbjDAWIW (ORCPT ); Sat, 1 Apr 2023 18:08:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230191AbjDAWIT (ORCPT ); Sat, 1 Apr 2023 18:08:19 -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 227AA27000 for ; Sat, 1 Apr 2023 15:08:17 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id z42so26613677ljq.13 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=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=Jj4kHxCMU3S4quIMvaKHI8Akuaud9xkkoQqD0dTl76Nd0pRIdsA4Lww4Zb42uQpudm gf8l31YuxGq0l2U0cSFIpAJ1hbljIxkko53DNE1sZnRkbRuid1AmdoFuKh6qm+hk/21J 6l6ar59ZVZE56QQOM3SqUia4FZgTD5MruG4Ge7trjwkSUOCCxYyvAII6yMB/TqMEK/9r tkmVjQYmGC8SZ8g2UO6fsnb55yTE6jRhTzbxLrAOsJcEmj/LCjXe5KdFcLFRkcxApH4I pjbvdvL+qAUYRoVuDgtpnkOZ0cNP87d3r+XkNhobAlMr50dhbNLpnHrf2KSX+xCxHp+K Hvcw== X-Gm-Message-State: AAQBX9fRyKVyM9BPf7sI8ttypvOhe5R2sf6CgmfdrfSGTLJEJgkKXdOq jItkkQJ/1ftbLmp09QYp/9nQkQ== 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-arm-msm@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: 669429 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 D0647C77B70 for ; Sat, 1 Apr 2023 22:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230240AbjDAWIV (ORCPT ); Sat, 1 Apr 2023 18:08:21 -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 S230204AbjDAWIR (ORCPT ); Sat, 1 Apr 2023 18:08:17 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D55783CD for ; Sat, 1 Apr 2023 15:08:16 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id z42so26613700ljq.13 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=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=2EEBxZcqDr7bHTm2u4oBw87u2JYAUbY4BRejm9dvVLW7goxDS225XSgDfO8JGCnDf/ jiuEIyQt/uDZ7oBuGCFeoyta/EJ4AxFMm1sCEUXBTnN2YnNVfjUaCjl1CjkJhX3Mn88W YqvsFA9epeAfZ8MxRdpYFzgAxljxRA/ti+51SS9PWEmNffEpWZTBH42JGSTLz33mzpTq WzJKQMOIOubUPnnlDmjIV5+g/6WziWsTLHY/3LNs3C/rC4a0UznZjPOP+IeqU0l9n//9 JP6XJ2n5WPgamo1yy9DjkoX7jvaD/SlaiWHTFVU2nOvtLyvndFm0Y66Ws8+u2I0kZ86G kPaw== X-Gm-Message-State: AAQBX9e1GsStxQC5Z89Enrq+mxKBBrRNdcXqKsxLzBjsysw6mWKiAia4 WLzCHWPzMK03Xo3Uw4BrsUJFjg== 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-arm-msm@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: 669648 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 E85B3C77B76 for ; Sat, 1 Apr 2023 22:08:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230249AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjDAWIU (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 868FB2659A for ; Sat, 1 Apr 2023 15:08:18 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id x20so26622966ljq.9 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=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=Rte3aUgK6+4Bd9fdha8nGbnFbCCwVqKutGym9gk01jtMCnfc4X3LJrcyl7B7Y3jG8h ncKI5VqHN4s1WExhXxpmaePf1gJLa+VNQeURDvGbSMco4SiZxq8enR34DyInLV7NuHJW jWPEGKQ1jh27LGxNb4gbP9FSwpxofEBPBJBuEFyS0tAwouxlVk/9v3E4TgLDcp/Z7Igm 38Ttuk1c3W5GFI5hbIS+lK+ZwYp1MpXwHYeFqA/DfJLv+Y8/+l329wTRpDquMpqSaedV 2It/kFRuc1AAcMGw1HGfPcv1rC17c1ldQgqZc7VFqe1ljYEi39mteLOECCsu+FJZbDUO UymA== X-Gm-Message-State: AAQBX9cg+o3qomDsPrmPMygjked1Tg8Hj40UPGq/fsJnARMW1ljVFrR5 DlmLwt3gy8xQRDKcLkaJ7TORiQ== 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-arm-msm@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: 669647 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 997F4C77B7B for ; Sat, 1 Apr 2023 22:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230037AbjDAWIZ (ORCPT ); Sat, 1 Apr 2023 18:08:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbjDAWIV (ORCPT ); Sat, 1 Apr 2023 18:08:21 -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 0750C29535 for ; Sat, 1 Apr 2023 15:08:19 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id bx10so8316798ljb.8 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=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=iU/ch8QbAMGi3xrhvscUX673xHI+Dkmqu7ZgKjCI8Mf/AuIg3wPoEPxkF4N1+n2B2A rjzHeDqmc2A4eAYDaWY0akO5vP9FDI8qH+Ec0ZBkbtJmYCTPdATCAuMUR/sPjXiqxlHv znNk8PG5ZezOG+GG/mrw1WM3FiaHlsquIKu5iBs3DWjQRdtcYb1eoWarTl7vtS0T05gJ 0hO0cI3277EoYRclsXTKPBNOIqQc9TUpFiWcRKHxKmeqqvfbmunpiZGlv5qCzzVJy2UB 3nYVldvYgb0Xc/Y44CWhc6toicsH50Tgn3m2k/uDCsXtY9+zJ+Pgd8WGfHhiJc8Ep6C8 q2lw== X-Gm-Message-State: AAQBX9eBwvlyir6Z1izELHqeNBJMMQhMSRFtiUXjWcwH/jT6ER2/J4RF LCJ+Fs95fsyYI7PtKUQbLYHvyQ== 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-arm-msm@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: 669427 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 AC592C77B72 for ; Sat, 1 Apr 2023 22:08:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbjDAWIX (ORCPT ); Sat, 1 Apr 2023 18:08:23 -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 S230225AbjDAWIU (ORCPT ); Sat, 1 Apr 2023 18:08:20 -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 7076D83CD for ; Sat, 1 Apr 2023 15:08:18 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 20so26677466lju.0 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=nGnZ4XiYC1f/LOgRjTae6JNSSFcJWfuuAuFZi16y6Dyur4GCfJeVfU6f+uwvbbwl0n 8VrM+Wof6wLn9I3AY+wqc253aF/TWqSU5QZX9MuaNBhOV4JrLNSUcQmGFGXaU56q99xl mDN9KNmqRg5z7sjQklqEC0Gi2rP+FrvbjIAujrytihwKRfYG3r/DzX55VqfF+hCmO6OW naQFv6gk7p0L3tviaS7kAtaXpsVrGriUzEDYzap3N9/0Q9xGr/cLchG89AYq+Yf4CVtG JSJbQMBuQdKtYFzA8jOiR01vzNTPW+/7GjZOGmvVAmmL3diDe9TiZhUGEgTQZjgGDMXR +aCw== X-Gm-Message-State: AAQBX9cqartBj68g86Gpxqy0w6CtyVzWRTmNSuYXbXHoJGILvGVMUhjN aiV7yM2uRqDZOxHv7vPH+szBDQ== 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-arm-msm@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: 669426 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 DE1CEC77B7C for ; Sat, 1 Apr 2023 22:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbjDAWIZ (ORCPT ); Sat, 1 Apr 2023 18:08:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230234AbjDAWIV (ORCPT ); Sat, 1 Apr 2023 18:08:21 -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 1A6DA2780F for ; Sat, 1 Apr 2023 15:08:20 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id a44so7992862ljr.10 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=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=YkQJFuKJTo68b6R2eOD4AjrLkv6yD8fdf0ivAcNwDD1JfpdruYwx6GszyaT8m3fAx/ U8Znyxn8hwjepduFnoLHxlzJ/eZLACdojTGSRWoxr59gZIfgw7Jy9Cpbeu9tqR6FWPZ1 /aH9X8by0rY/4zqdsXs3hr0I8FRhxh/HUxTKNKu7TDpDff28oIe4y835veoesqC1Rj8Q zsloXt1RoHwo2ObglODQnLwRMN7YXfcwh7FlWLY86Rhxk9dWitWj9I0xTH4nyOn6ZnWf G/63fzu01IAqZ8UTpyJxk62Kz4S4LoYnVtmU2Phr3dyHvB2uNFfJVXdytk1ix7QJqvs+ SuBg== X-Gm-Message-State: AAQBX9e9f0/tqMJWxiI/BLlnAvvE5JMILGCfdQdMp9uroiNleSNP6TqZ hmurbvVaXu24umYqYnE38xcjsg== 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-arm-msm@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: 669425 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 C93FAC77B73 for ; Sat, 1 Apr 2023 22:08:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230224AbjDAWI0 (ORCPT ); Sat, 1 Apr 2023 18:08:26 -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 S230241AbjDAWIW (ORCPT ); Sat, 1 Apr 2023 18:08:22 -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 AF0E2FF0D for ; Sat, 1 Apr 2023 15:08:20 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id q14so26638127ljm.11 for ; Sat, 01 Apr 2023 15:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386899; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DgfrnwWfT0ZByQejr3H6Nf3Cbs6AKTJqWqNsjbKuQAg=; b=pSlZejAKAfCt8wjCs7PP47yjBAGcetQT5QN4KyE4e+eWoDmRMAudONk5ZwdJVliefa nZ4c3lY+qMmc5ObDtk7qa3knOsnWPGSm4QWPzFFoWiEXUTHU2kILuNV1EpVFyrfmTxZf bSIT1gG4n5vUQF8MIPCCwZgogD8w0Uwq1w4s9rxPBFRSQ4aF6x8eVCYUzPmC7d1pLp7F QHQRB1H9t5rrhxq3hlKcJdKd8Ano0CLZQwRubzg3E5cVGXgQH77/YBN6Qn2MKvCWt94N m/uGpmhnuK+SBnF3N28ey5sH+OonEDFnyW4jlsUq85CyFYxcuGSEJXeZvuWpco3DypQk eXNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386899; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DgfrnwWfT0ZByQejr3H6Nf3Cbs6AKTJqWqNsjbKuQAg=; b=e1nOx77aZvV2jkrrqEy1SnAyEXU0xUgwroI144DnctZvG+TnQp2avuFG3IXTRpJgzf Kth3OZ+msV9y1aVnAqPq/v5XX7KxZfO7GiSgV3bI6xwZNqXtf3Nzj+QWEgOWOw4tH3Zx zPlcTt393xszD/1zivPfGwU8Dkg6uVuxSzPnFDTYnzQGwL2s9/O27rMXM1pVT7nHFKMk QMZmAG/R4GiqYYhI9wpAj1/vmqvnexzzg2Ljk6rosPQThNdcx8HHkzzqYC4Q4bW8kVBa zlG6KpqJiSfigyKRCb5wyy2XXxsZeMaJkFlHkQ80kfK5jgUYYE5UdJ7DSnu1W5KH5veu YY4A== X-Gm-Message-State: AAQBX9eMXuPY16xWNfn9p59GlMs4/HVTHSZlo/QEEYMj6OWPURgpedkR d1YlEyND9RP1CX4mj4vB9A1TnQ== 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-arm-msm@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: 669424 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 0D733C7EE21 for ; Sat, 1 Apr 2023 22:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230262AbjDAWI1 (ORCPT ); Sat, 1 Apr 2023 18:08:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230251AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78DEA29537 for ; Sat, 1 Apr 2023 15:08:21 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id y15so33382368lfa.7 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=IHyFrOXSK3roEgR2VEnzbNaQaiCx3iS0tL6f9fLnvI+wn3WSp/4E61AsQ9ec3hfBNd +O+cqkGTSUNJpFPVCnGp+Yg45D50EEeUZ1kdMN47VA/Z3LdQMNsDEn153Zw5JWXYfFta cdtTlMKa9ElANJqtErnb0qDHOAmouiQoMv0vzA5wDBr9DHUOzh7okkCdMVg8T56yBQRb le8P8Dc0CKET0H4LWtA0TMQcsVdYJR055iATg9ruzuoUYo6tcpy3TJgRN32BJvZI5SwI 7emWXpdDUy/PIxCjf3wJxfF8tIuPzDLvOoCZK8dlbC2EkGNPZjV74IVXxnKS/Jl4l6Wa w9jw== X-Gm-Message-State: AAQBX9fdDFgxt+OoRJXmuLy7ETsHSLpK9dV/tDfmiTiaR4dr0UY5X8AA +urGoLlqucLCPDNzpt8N/zqjmA== 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-arm-msm@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: 669423 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 40C7EC77B6F for ; Sat, 1 Apr 2023 22:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbjDAWI3 (ORCPT ); Sat, 1 Apr 2023 18:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbjDAWIZ (ORCPT ); Sat, 1 Apr 2023 18:08:25 -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 96BAC2B0E5 for ; Sat, 1 Apr 2023 15:08:22 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id a44so7992889ljr.10 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=BHU5Bcbj3PAwkhaQT5zy1Zoc20xUCbuClYj8DEDa7q/LeYXl2KmWHQzl1SLb/WSW9a SDMcAWb4vb/0n81Nc5CF96rHN5RPpl92VEHGYzTE/nOKm/XWZR5SFP09r9S2I42M0aeo cr0oCGOGBgpYnFRMWpT1/QtYHBQv9PxLkNQnH0iOKVMUKn4xL03sG1W09Tc0KRHn9TBr YjtaPPqBQ+YPwu6e1Fbc4QyYSoZ4yzrg6H4iu6MaHaQN8Qr5hQyup/x6daVX8wlHHSbl hyUvqVKCFVQr1JZ+2p5FdJYeOFlw66dc0Zag8jTkXIocdhdjO6rpJM8T2apJzAAX+Py8 G6FQ== X-Gm-Message-State: AAQBX9eze54wDIfJHz5rypZPhbUbT7w0jQl3+VUYhrNRl2W6YOUJugaz 6gFMldF6HwmFC7ztkbJHmKNzzA== 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-arm-msm@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: 669646 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 91723C77B6C for ; Sat, 1 Apr 2023 22:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230231AbjDAWI1 (ORCPT ); Sat, 1 Apr 2023 18:08:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230244AbjDAWIX (ORCPT ); Sat, 1 Apr 2023 18:08:23 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 768242658A for ; Sat, 1 Apr 2023 15:08:21 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id z42so26613788ljq.13 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=QaMgSee5h9y4fCmmVSFE9KIBsmStO8LX7vHbcN5nxdw7m0vVqwKeG0caiWJa52PvFd /F0gL64LZ/xWajh/CX+UTleN//Y/OIaTGS7QMU1NzAQMuvC9uIESrZnBwWZxu5QAd3s+ y+fMJUWjC5G8qmRkYokR29czap8f0B8HUA8fUdinXuuRfHfbQfrJ9/V5Y0J2IObmA7yW Q7Yt5DNCLb0xsOweANcc3e5XNqJceTvyoYkbggvRbjH5hTl8GjcKuG0DUeywga8IQOfD NHQWfB05ZWsDRMKkh9f3mNlqLoFG6XedAaHjBKTHw4S0+RG/pUtspG1F4v77FCGjSPhP 0yZA== X-Gm-Message-State: AAQBX9czf8KBnm99OMgRNH4HLSGHxBmKlSzHucnddTrAAFivAUqDMoOZ wJann+VRrbG/24YpryPkLQw7DiPfihVgiAt1jZpZew== 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-arm-msm@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: 669645 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 0E191C76196 for ; Sat, 1 Apr 2023 22:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbjDAWI2 (ORCPT ); Sat, 1 Apr 2023 18:08:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230255AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -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 4B15C2B0CB for ; Sat, 1 Apr 2023 15:08:22 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id h9so26658276ljq.2 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=6arMxz4BLXCTScwJ7G5V48SwRZ7xllQGj1OCkiogk0nEXi1W56Lg1lhkhp6XhvjP+c jpkyX4SaUk6vku1BdIopzLRhuwzBRij//888uyDYclP2o7raqRD0qwGH0eTgJp3WKkVn zzgYLpzamDKD3hpx8P2HdzxIYAFwJtsmmI5SuFFyeqRbsKxZw6PduR5vlTysHYRpp2LO z95gNafTcBVmmjmvlLZe6qK5uxDSEmQI5hjOYHUGRzfVNcgrMUaSFVzy5mWEwEFMx7Xb 66X/B3cfoyomd72GYdbf3m9ycrU2eYU1xfnjdas5pOzaAAwU6/nBMu5DO20pc1f7ssmI 1YyQ== X-Gm-Message-State: AAQBX9f8ULdA01lp/nDXe6G8wQk1okqmHFAqKY4q0M3AEVVaG63P5Wvw cGe/9d3LZsX81dGKV8SHAFAc+A== 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-arm-msm@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: 669644 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 9C13CC77B78 for ; Sat, 1 Apr 2023 22:08:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbjDAWIa (ORCPT ); Sat, 1 Apr 2023 18:08:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230215AbjDAWIZ (ORCPT ); Sat, 1 Apr 2023 18:08:25 -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 BAC962BEC3 for ; Sat, 1 Apr 2023 15:08:22 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id z42so26613826ljq.13 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=MiVaxFP2tWgO39LVD+EqAGnirZcyUAOOVkm9GOWoz+HWPlAt1WQvdqsbqOTk5Z+5eg YT6chpQE7zFFKRuqZSWCe+OQYBhc/+RpW3KHPWV+H4RqhAKw0t5VDAbuVReUwSQ6eFWi RGkInaw7ARY849zSvrYd0dUonro+AAGBUZcFvG+7a9e4iV8aJqJ9A8RNmpV7oq3pboE0 Lvo2AyJDONyQmEyubAk0DrUD/z9uV8svySWKLiIVCQwRFZfTvQs9/aL4KR+xJ2rGr0Yu c9O1y2r/4bT0BdNPIZ6x0gkI6FBzKxooaTuRo1PwYFdp3SJr7Fjv/rTI5b4RnlFzz2MF KhwQ== X-Gm-Message-State: AAQBX9dghqhQwGr8jSghI9swH4ugcAyZEEYd+TVje75agVr/mUNLPceo 0oDjtd11uwIlUZlOy5RK/86BiA== 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-arm-msm@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: 669643 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 88569C77B76 for ; Sat, 1 Apr 2023 22:08:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230212AbjDAWIc (ORCPT ); Sat, 1 Apr 2023 18:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230241AbjDAWI1 (ORCPT ); Sat, 1 Apr 2023 18:08:27 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96B652B0C0 for ; Sat, 1 Apr 2023 15:08:24 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id z42so26613834ljq.13 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=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=SN9Jcg74i03FG67NzBP/7scTXEg8VBXDP9YM59BYnT+JGYmuVouzGutht6O7q3s7N2 ACd+9dduGgRUq4WQHf7QQVZxhr4ePyY6pY7qX6AkCKBIvYAasp2O/1HriWCRjQ4I6QKV bSiz+CWHeOr+QB1IM8BDRqfxMDhCzSgbJpPsciBYW8lHsGehdt6fP+oWWFhNwdoIVmcK 0pIjgeMNydNhUZTf1s8Tqewkm7T5hf2lLaCbpjN8RuHAO7/G6urML2jSZ3l7Jt+UXEC+ rMTQ6M0py+EBYhpW0/joTO3+nFw7h4nXRgc1QCgw6RVARR19Cl1QZTTqxQKrfvW1USe6 jmoQ== X-Gm-Message-State: AAQBX9euAXESl0wjOifLJ78BvOzRjXyaMffJ+9svnn3PB2Y2QK8jqtPn rMRiGi1LBpbRsRlFzTPIl0ejdWvT25XL9AoWe91QdQ== 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-arm-msm@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: 669422 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 0B090C77B6E for ; Sat, 1 Apr 2023 22:08:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229805AbjDAWIb (ORCPT ); Sat, 1 Apr 2023 18:08:31 -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 S230210AbjDAWI0 (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 D54322BEDF for ; Sat, 1 Apr 2023 15:08:23 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id h9so26658319ljq.2 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=dbBLXKxTBqgErsw+v/l9L3OKbJFo8CuzCF8fuRSGN2B/3nYFpl4NuFIMupPQ8yuJw8 Fq/wZ51iLoVPD+1fc/DL+ItaPdxZykyy3iLvnD5M6HhZ0RxpoWAAqzlXPniETw14TNZn praoSQ9J1XrZ4EbWDWV0P9EDCrQ20IyWd4TQIDUarMBMfmxgAes/ojZtLuW4GPSWOZ/A GdvvykDwbmE6sX4lNJXyQkUgsN9VV1OyNU0MoOTvvUHtOm391WXxqmm7pZ8yGnd2pO+i lt607TLIDPdNcNCSl8bL4DNjzxlJqlltiuR9rXfn1uMIupuHE3V0JS/rFAC3D4E6DO1L HQpg== X-Gm-Message-State: AAQBX9fWiuRmw79k2jNYw4O8JqtKyMPjI7MGFdbZy/D1naxclhd22h/i RcoxUdOiR7ohq+mt+lBp78x57g== 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-arm-msm@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: 669642 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 68303C77B7C for ; Sat, 1 Apr 2023 22:08:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230218AbjDAWIe (ORCPT ); Sat, 1 Apr 2023 18:08:34 -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 S230244AbjDAWI1 (ORCPT ); Sat, 1 Apr 2023 18:08:27 -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 95F4629508 for ; Sat, 1 Apr 2023 15:08:24 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id bx10so8316945ljb.8 for ; Sat, 01 Apr 2023 15:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/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=cW1BW78w/ee3kYc00azuRajNfiPrTxLX47g3jyWXbSKBfTmqTCcsTNcwl+DATkgTI6 WjJtiRGbVZUyRxf89s0HjAG6Z1mYWpZ9xW5yzVX1uOz1yw0P8WYfNrOlb+oolaSB7/0F a9eKUHulrr+9PwbOmbhjGjFjnX00+rIA3amosDn0SGefRY6lH9fTCxlMHO5jyCaVprLN 3N7NDRMGJ/JQdrwBCCzdI0W8lkEMPLr7Ywr0MCQpJ1wE6Pn3FyOKqTqtAccur7ipsRhJ ZqAhZlQLWLbLS3XPRGJEhgS6WCLinALeHn2l/psdevi7Kz20efyQ9hn6sI+JNJAj/XC2 AGYQ== X-Gm-Message-State: AAQBX9dlJNfbIFiQw6Z6yubj2YQDYZTLG8oQ1r6eCFKNpennN7dV9l0g CbtGvOdaGFvhQmUB0a9wwWJ+Xw== 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-arm-msm@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: 669421 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 1E9DCC77B73 for ; Sat, 1 Apr 2023 22:08:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230191AbjDAWIe (ORCPT ); Sat, 1 Apr 2023 18:08:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230255AbjDAWIa (ORCPT ); Sat, 1 Apr 2023 18:08:30 -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 5511A2B0E8 for ; Sat, 1 Apr 2023 15:08:25 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id x20so26623128ljq.9 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=wWV1bkC2kvKEibP0GBfZM0WDM+tmtKX8HTxLoAmLbsiAKDOos1n2WDiWANvSfg+5un Dpey5z03cEWzoZklt0tKtIlqHBj8nimhxHdjXm4X7DsD6fiHzit1Vjg8IajypBo4KfLY 9Kv4ZQBWkIy949potI1t0Xmj0WFa85IMKbNt2R2QOc9kIkS1BYA+JRWgGtp32MlXd0ch 6npoHkf559ZCUj5+d4i+SjeimM4pSd+g9kkCWOEzjgZUsJVJGPL37E4lZucAu/2FT0QO 3i9ZHYLOLt0UtBsrFSZTCO2uAk+xuR64BunY+fG/OhcRE4ggyXeMM9V3GR8TEzFYPe8G i/hA== X-Gm-Message-State: AAQBX9cxFfoXXtJPoZyDQ8mQrBXBPe9dSv3R0mwoqkv8epSN7bipOVrh +2sDXZ9vXxfGFTnYOFFLHUetPiIGXOssxJCIxcd6Gg== 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-arm-msm@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: 669420 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 C88D0C77B6D for ; Sat, 1 Apr 2023 22:08:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230214AbjDAWIg (ORCPT ); Sat, 1 Apr 2023 18:08:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjDAWIf (ORCPT ); Sat, 1 Apr 2023 18:08:35 -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 62CE82C9D0 for ; Sat, 1 Apr 2023 15:08:27 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id a11so26632465lji.6 for ; Sat, 01 Apr 2023 15:08:27 -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=XsYMsKKbi2b1K5EBaaYL4niF4l4JvgLpiCuUOy4OwvYTfYTEad0/Jhi34hWpUtxCNZ 9JiSlRhBuoqxTZ1+h2x7t8Qf3MEr7xHRTQ1EEH6Ug8n7YHmSkLAWYSCXl34Aj7GFOtmj dez4GAtkhmDX7gESvc1JJrqaFDPJgOpW+kanRihVTfqbAhjE7LdQvR6InS+8NeSdc1BB rwZVhCLk5+Nilf0J2/AFIWMHLYLZfLoHD17IbpwFWxEFNKwQNuS7o4TCpNLYiim7LJgs A+Gvlh0yMO4KuebJwcirTJ8lP4+6reESl/ziGXWq7ZhrMfbM4TPV2oNBAm2zSk+qIrU8 QLVg== X-Gm-Message-State: AAQBX9ezfWSPQNbluun7X30plLZyOdcBO36dNs/K2BOqo/6XnWs26Rku fmJXs5vtdt4HF2N25Ay1sJ4fRA== 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-arm-msm@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"