From patchwork Wed Mar 29 00:08:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669040 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 D9853C77B71 for ; Wed, 29 Mar 2023 00:08:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbjC2AIm (ORCPT ); Tue, 28 Mar 2023 20:08:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbjC2AIk (ORCPT ); Tue, 28 Mar 2023 20:08:40 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D0B52107 for ; Tue, 28 Mar 2023 17:08:38 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id q16so17978480lfe.10 for ; Tue, 28 Mar 2023 17:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680048516; 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=okTUc2oz20b8x16zB41RfR2tNAdbERt7gZi2YK1IOFU=; b=FRcdutQPgk4tv33RGAzytw972fgyChZiKxdxbOYQKkg7n1eqVKLGt9tod/ay4dz7Bd jHOiolSMwa6dgKHifFW4tWh+welL2Sc4daOgfShmJKoMsJUsXUcLYq2pgCYfrElcL0HL vreCrQsgDTW+U2VqapLDAD92fpRIXzvB1F6bwQHTbXheoJv4e/H0D8+XJiFGfQepStfA yX8EcR6KJd362OiaKgaY8dmvhOBITGYG3kfreV/7X8FJ+HY6s8RyMLAl4yxhONA3Gk30 GfLsnpbyXbwlaQ+umsPCtJC/CAP61ee94o1AW7Y2JIelTUHCgxM8HZzVvQl20DNyk0Dh GKyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680048516; 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=okTUc2oz20b8x16zB41RfR2tNAdbERt7gZi2YK1IOFU=; b=eBgfxTnIf59EW0G3qMUMjm4hQWyVmkOT9jznc+h3UT7YRQIk9VSW6VpxsGOv03DTCL XOauGY40P+oZTiL6YxRkH1uvAHEFhCkG0aw+yFnF2A5ghocG5OfonwGArbltEwk1BxNF zlDQwKdOpw/aUi546NT3rvdAJ18ORIYmFijbcr3swtOrQuzCagr0U7wdOPkPvQlFJSq3 ms63nhMyjT/kYjZZ04s41ZTHhcKsho35x3WD9zmbXjIIV8MGs//Z+XPBnxBhmiY7DgLG KtaFxCca2ZdEVjJGwafbYK1uUE8T1bZI5wKg7YxIcxQHebyi94ebM1Fq256JUq2a6Xyk OEgQ== X-Gm-Message-State: AAQBX9dVgxjCQpyw90smeTgEykjvtOiVyv6pztdhncJO3YH/6vu2pyKt SJAof3YxnkgtnAt+O7KP+DcgiA== X-Google-Smtp-Source: AKy350YcCuC5Xh3d+SgdfQKYsIH+Lw9GYfJ2yQqxDLDJ6FaBBbpoaUgrO3u6GDN5cEVtAJEIp6yb/g== X-Received: by 2002:a19:ee14:0:b0:4e9:74fe:91be with SMTP id g20-20020a19ee14000000b004e974fe91bemr5199512lfb.27.1680048516550; Tue, 28 Mar 2023 17:08:36 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id p21-20020ac246d5000000b004e8011cbaa0sm5238341lfo.111.2023.03.28.17.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 17:08:35 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, Johan Hovold , devicetree@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH 1/6] dt-bindings: iio: qcom,spmi-adc7-pmk8350.h: include sid into defines Date: Wed, 29 Mar 2023 03:08:28 +0300 Message-Id: <20230329000833.2507594-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230329000833.2507594-1-dmitry.baryshkov@linaro.org> References: <20230329000833.2507594-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. Signed-off-by: Dmitry Baryshkov Acked-by: Jonathan Cameron --- .../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 Wed Mar 29 00:08:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 668215 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 93368C76196 for ; Wed, 29 Mar 2023 00:08:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229968AbjC2AIn (ORCPT ); Tue, 28 Mar 2023 20:08:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbjC2AIl (ORCPT ); Tue, 28 Mar 2023 20:08:41 -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 1588D1727 for ; Tue, 28 Mar 2023 17:08:39 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id g17so18008612lfv.4 for ; Tue, 28 Mar 2023 17:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680048517; 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=yb2W4/4EVDefi48oTiv8C33/IEUZH8vy8TmHypAWaU0=; b=D71zo6wc4l+f3y+gZFLoh2BHM3UeR5RrRclnzPDfjITLARSO2qDFzcNKecrvd5WziC iXlQ75kL0eB7p19rmmV5xdPoaQtFuS7omVImgOINtJZA1akomM7qrBvnqvz1uRFZc/sy UzA6gzpC7RfQnGoR3yTKWhNrQjc4NQi0rJBoXSHgg481S6FH/1t2PgcKDS80gmp2bz7j Qcx8gtyK87KBdsc64Tu2/V8tGsNgymwLp4KApJd8PSxOPXXMdTsq1nxeSkE/phFhxp6v sMyz+m1vufjwiasaF5XdxMA2FzzFvuEP4Y2inps2o/3en3TO8tz/OIl2hYDDTrv/nWAE iJLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680048517; 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=yb2W4/4EVDefi48oTiv8C33/IEUZH8vy8TmHypAWaU0=; b=kjS6IYxXwcM1nrw7ziMG91H96Ls4/hLKfEOxvGmCrF94M+cBPBJqrNlIR893r8Fsoi UvbZzBnvr+veRAmZwyKbM7zEH3yDtal+V4s5+JihBaHXzqxk0N39MJEbIncecJeZAEa8 y3+Po3wNUd7mYFTeR4hyjCiqNN892NrYf2J9rpe/WIdOBRI2gNskLqRB4nSsz3bbhkjy siIQCQ4PftA+lL9D9nSsEcbGbZMpfsmVrZNXjVusGrDP4Gq5wofSKczXkOBOM4HsuE9g YY4Z52NolNSmaSoBzDPii8CPdlQ+t1tdZUePLQ3sl4TB7uYVxLD2bVrUROpBDPCRkVqN b14w== X-Gm-Message-State: AAQBX9cAMB+LxrRb1IQA1Rr2ZxHVQhe6oFgShenDuXddyN67SryRQ3G1 Sy9izWl5RlpjZkDepW8sRRFe7A== X-Google-Smtp-Source: AKy350aIBr3rqQlvliAiN1jzYp9HDRfFkHjmDGfP3F28pzFbbMrEgI/1JAySKwo5byJNqLNGQ9Q0lQ== X-Received: by 2002:a05:6512:143:b0:4e9:9f10:b31d with SMTP id m3-20020a056512014300b004e99f10b31dmr5449561lfo.2.1680048517481; Tue, 28 Mar 2023 17:08:37 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id p21-20020ac246d5000000b004e8011cbaa0sm5238341lfo.111.2023.03.28.17.08.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 17:08:36 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, Johan Hovold , devicetree@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH 2/6] arm64: dts: qcom: pmk8350: rename pon label Date: Wed, 29 Mar 2023 03:08:29 +0300 Message-Id: <20230329000833.2507594-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230329000833.2507594-1-dmitry.baryshkov@linaro.org> References: <20230329000833.2507594-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. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- 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 Wed Mar 29 00:08:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669039 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 5C26EC77B74 for ; Wed, 29 Mar 2023 00:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229990AbjC2AIo (ORCPT ); Tue, 28 Mar 2023 20:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229668AbjC2AIm (ORCPT ); Tue, 28 Mar 2023 20:08:42 -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 ECD642D74 for ; Tue, 28 Mar 2023 17:08:39 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id c9so7577051lfb.1 for ; Tue, 28 Mar 2023 17:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680048518; 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=LQDYYo8+UubQkx926hIq/DqgEQQ/S0G2YPIgZd0iTFI=; b=qPcn8QdRqHa11njfKJsPvL4QTb40wYBlPWxf7fBsNsMLC/wHDBq9nyb9GjEzUyrDiM X+nnRMmrdNbNdN73QAbkzyodotCbEr4koG7SlTZfLm8ZO0lr9OnJJJKDPM2RoUe2Clno xuZeMiAKW80M3suKhS8pAdVwswKdcRm/yWh+5Ai3G0GYz1JMYLGiLK7b+5yzWhwA3WMN 59dcLHgJDf0rZiL1veOtXM0EbTrfiBns2KPD1SaW/ZTLUVgF/88nzzDxwupS8w5QcJYQ 5npBCh27/1F6qP7g0ZaV2ISyOxtAWcRamE7YvNEucWgDjtaHFl4dQn15zD+mPTpzo3Jn 6oAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680048518; 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=LQDYYo8+UubQkx926hIq/DqgEQQ/S0G2YPIgZd0iTFI=; b=pI1065TNj3u1KzoLoL0qIxsJ4yglfR/V2vdyIRICLiuH/n+VwPETevAFezLHd+pmOM 1eAX+6nRM6wJXlZm+p9ItdU8W14UMqC58TLt8akzXxT/Vu2dRNmK/R78XBG8cvOsM3SV Fwogg0BmzRDbCd+RecHLLvX0QVbvlKPjjGsGe1sRfqTKvD0x9jH5k8aaqArLSg01iSjH wYNQbpJxVw3/PvFEtNML8OwvLWDpXtuYi0DZFyBh8d3LK+Fs44i27p7yTDA9wyMjKPb5 DTT5VVL2Ysh3cJXLXX9OO7xBWTPMQKkhCQZxipqv1JxFFdWs0X9OH4qIf+uyobNSPL5K 8hfg== X-Gm-Message-State: AAQBX9cB+nEZFmBiFN7JohrXEQYzKPIp8V+gz78/zz+aUCmIrCephhoq RTPZ95LtEWSu2whUw5ax6GYJZw== X-Google-Smtp-Source: AKy350b3iop1p6zuLzIxdAFVWn6gByDQ4b3ywhZ80fYOgL5Sa0lgpBkLLRsyXbp+D8XOaXsLSfVjVw== X-Received: by 2002:a19:f60e:0:b0:4e2:337d:65d3 with SMTP id x14-20020a19f60e000000b004e2337d65d3mr5573643lfe.40.1680048518236; Tue, 28 Mar 2023 17:08:38 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id p21-20020ac246d5000000b004e8011cbaa0sm5238341lfo.111.2023.03.28.17.08.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 17:08:37 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, Johan Hovold , devicetree@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH 3/6] arm64: dts: qcom: use main pmk8350.dtsi for sc8280xp platform Date: Wed, 29 Mar 2023 03:08:30 +0300 Message-Id: <20230329000833.2507594-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230329000833.2507594-1-dmitry.baryshkov@linaro.org> References: <20230329000833.2507594-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Employ existing PMK8350_SID and switch sc8280xp-pmics to use pmk8350.dtsi to reduce duplication and possible discrepancies. For example, this changes sc8280xp platforms to use qcom,pmk8350-pon for the pon device compatibility rather than the incorrect qcom,pm8998-pon. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pmk8350.dtsi | 9 +++ arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 6 +- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 30 ++++----- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 67 ++----------------- 4 files changed, 31 insertions(+), 81 deletions(-) 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>; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index d7b537284990..d32594b5a4e7 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -559,18 +559,18 @@ &pmc8280c_lpg { status = "okay"; }; -&pmk8280_pon_pwrkey { +&pmk8350_pon_pwrkey { status = "okay"; }; -&pmk8280_rtc { +&pmk8350_rtc { nvmem-cells = <&rtc_offset>; nvmem-cell-names = "offset"; status = "okay"; }; -&pmk8280_sdam_6 { +&pmk8350_sdam_6 { status = "okay"; rtc_offset: rtc-offset@bc { 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..7d61108daede 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -275,7 +275,7 @@ thermal-zones { skin-temp-thermal { polling-delay-passive = <250>; polling-delay = <0>; - thermal-sensors = <&pmk8280_adc_tm 5>; + thermal-sensors = <&pmk8350_adc_tm 5>; trips { skin_temp_alert0: trip-point0 { @@ -729,12 +729,12 @@ &pmc8280c_lpg { status = "okay"; }; -&pmk8280_adc_tm { +&pmk8350_adc_tm { status = "okay"; sys-therm@0 { reg = <0>; - io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>; + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; @@ -742,7 +742,7 @@ sys-therm@0 { sys-therm@1 { reg = <1>; - io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>; + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; @@ -750,7 +750,7 @@ sys-therm@1 { sys-therm@2 { reg = <2>; - io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>; + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; @@ -758,7 +758,7 @@ sys-therm@2 { sys-therm@3 { reg = <3>; - io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>; + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; @@ -766,7 +766,7 @@ sys-therm@3 { sys-therm@4 { reg = <4>; - io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>; + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; @@ -774,7 +774,7 @@ sys-therm@4 { sys-therm@5 { reg = <5>; - io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>; + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; @@ -782,7 +782,7 @@ sys-therm@5 { sys-therm@6 { reg = <6>; - io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>; + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; @@ -790,29 +790,29 @@ sys-therm@6 { sys-therm@7 { reg = <7>; - io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>; + io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>; qcom,hw-settle-time-us = <200>; qcom,avg-samples = <2>; qcom,ratiometric; }; }; -&pmk8280_pon_pwrkey { +&pmk8350_pon_pwrkey { status = "okay"; }; -&pmk8280_pon_resin { +&pmk8350_pon_resin { status = "okay"; }; -&pmk8280_rtc { +&pmk8350_rtc { nvmem-cells = <&rtc_offset>; nvmem-cell-names = "offset"; status = "okay"; }; -&pmk8280_sdam_6 { +&pmk8350_sdam_6 { status = "okay"; rtc_offset: rtc-offset@bc { @@ -820,7 +820,7 @@ rtc_offset: rtc-offset@bc { }; }; -&pmk8280_vadc { +&pmk8350_vadc { status = "okay"; pmic-die-temp@3 { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index c35e7f6bd657..781fb6448a52 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,pm8998-pon"; - reg = <0x1300>; - - 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"; - }; - }; +#define PMK8350_SID 0 +#include "pmk8350.dtsi" +#undef PMK8350_SID +&spmi_bus { pmc8280_1: pmic@1 { compatible = "qcom,pm8350", "qcom,spmi-pmic"; reg = <0x1 SPMI_USID>; From patchwork Wed Mar 29 00:08:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 668214 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 022F6C77B77 for ; Wed, 29 Mar 2023 00:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbjC2AIp (ORCPT ); Tue, 28 Mar 2023 20:08:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229987AbjC2AIm (ORCPT ); Tue, 28 Mar 2023 20:08:42 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23BB31712 for ; Tue, 28 Mar 2023 17:08:41 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id y15so17992171lfa.7 for ; Tue, 28 Mar 2023 17:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680048519; 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=Anp0yj4hrP2BGkDafjXptqjvHet/PfY+NJdrlzSWHIQ=; b=J+4nUbY4ebvjmG7lpW5adDKr1N7DvYrWZyxu+9VsO8CNnGCsvW6Ox9ZLGhg2rtGjgX YbUYJ+SScDtvs0Nkp0KDIJQzmbpEouSw9RVdvGYsCqd1wMUUBRtwh1Z7PCCG4bdpfeER asUxDBm8IDTbdx7YDiwmudYI1rlsGdDA49DyJDGeFSA4L0+vDlwAM+YuiHun5diMq9JJ xCOXx4vW/SN4J2ssP8WN6d7Az+0nOUSSFyHfgP8JcyllTJXCAdc2PHf8zHOOnRNsXR3m VdhueqXP9P4dknKBTAK41bbBNoKwSgDWe4XvZXQLe07899ZLMwMlN6mF7WmkeZ/KLnh/ Tybg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680048519; 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=Anp0yj4hrP2BGkDafjXptqjvHet/PfY+NJdrlzSWHIQ=; b=MU+nS4v2a2MW1BqkUrOEfosHPNzanzHBElXf9Oeqn1CCU/rKVGxiuDnEqTMoAYpAyU 83PKeJtNxw72X8VDevlAf5FtrYmL1lyqUzq56GvH8DHKt8YniHcvPvHqZZTppLOdcSfg 8HVKnAI1OcZVeBS0qWBa1aOHxCqVc3c5GIWwSZmi2iHC0lPvvKAEdyDFryS5qtrpJVHN uvHnJlOwgqfNmpaAVX24+xozyaGtFq7DK6tXEluds9GN5FSGY8QlgWnrdpAr8utuwaYf TVbdVW+J7vex2o/T0UexLNCzGa1P+wF8Xg6wT+0cn0caTc6Tqd84y65jPZTjtw47kT+9 DuGA== X-Gm-Message-State: AAQBX9dnQ8BOQwvihE3yYBypYkYzbsM1iiaaeNoiBsbAJc7VuMELKbxt fLvr+dTkuDmUMHbx7hqcMGRc5g== X-Google-Smtp-Source: AKy350YXr+yiWgQVyLFhE/utxU0M7JhVdvyIcNKMVJDA4DiU4YX4oTa0VPXxvej1pPI6NmUhV4T/Eg== X-Received: by 2002:ac2:442a:0:b0:4ea:e68c:91bc with SMTP id w10-20020ac2442a000000b004eae68c91bcmr5421354lfl.18.1680048519533; Tue, 28 Mar 2023 17:08:39 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id p21-20020ac246d5000000b004e8011cbaa0sm5238341lfo.111.2023.03.28.17.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 17:08:38 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, Johan Hovold , devicetree@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH 4/6] arm64: dts: qcom: pm8350: include SID into labels Date: Wed, 29 Mar 2023 03:08:31 +0300 Message-Id: <20230329000833.2507594-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230329000833.2507594-1-dmitry.baryshkov@linaro.org> References: <20230329000833.2507594-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. Include SID into all the labels to simplify such platforms configuration. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/pm8350.dtsi | 31 +++++++++++++------ .../dts/qcom/sm8350-sony-xperia-sagami.dtsi | 4 +-- .../dts/qcom/sm8450-sony-xperia-nagara.dtsi | 4 +-- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pm8350.dtsi b/arch/arm64/boot/dts/qcom/pm8350.dtsi index 2dfeb99300d7..f1ef242760f2 100644 --- a/arch/arm64/boot/dts/qcom/pm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8350.dtsi @@ -6,21 +6,30 @@ #include #include +/* (Sadly) this PMIC can be configured to be at different SIDs */ +#ifndef PM8350_SID + #define PM8350_SID 1 +#endif + +#define __LABEL(pmic, sid, name) pmic ## _ ## sid ## _ ## name +#define _LABEL(pmic, sid, name) __LABEL(pmic, sid, name) +#define LABEL(name) _LABEL(pm8350, PM8350_SID, name) + / { thermal-zones { - pm8350_thermal: pm8350c-thermal { + LABEL(thermal): pm8350c-thermal { polling-delay-passive = <100>; polling-delay = <0>; - thermal-sensors = <&pm8350_temp_alarm>; + thermal-sensors = <&LABEL(temp_alarm)>; trips { - pm8350_trip0: trip0 { + LABEL(trip0): trip0 { temperature = <95000>; hysteresis = <0>; type = "passive"; }; - pm8350_crit: pm8350c-crit { + LABEL(crit): pm8350c-crit { temperature = <115000>; hysteresis = <0>; type = "critical"; @@ -33,25 +42,29 @@ pm8350_crit: pm8350c-crit { &spmi_bus { pm8350: pmic@1 { 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>; }; }; }; + +#undef LABEL +#undef _LABEL +#undef __LABEL 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 e28f49e31b9f..5c09b1d8881b 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi @@ -72,7 +72,7 @@ key-camera-snapshot { key-google-assist { label = "Google Assistant Key"; - gpios = <&pm8350_gpios 9 GPIO_ACTIVE_LOW>; + gpios = <&pm8350_1_gpios 9 GPIO_ACTIVE_LOW>; linux,code = ; debounce-interval = <15>; linux,can-disable; @@ -564,7 +564,7 @@ &mpss { firmware-name = "qcom/sm8350/Sony/sagami/modem.mbn"; }; -&pm8350_gpios { +&pm8350_1_gpios { gpio-line-names = "ASSIGN1_THERM", /* GPIO_1 */ "LCD_ID", "SDR_MMW_THERM", 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 99e9b776b93d..d90e3fedb742 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi @@ -56,7 +56,7 @@ key-camera-snapshot { key-volume-down { label = "Volume Down"; linux,code = ; - gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>; + gpios = <&pm8350_1_gpios 6 GPIO_ACTIVE_LOW>; debounce-interval = <15>; linux,can-disable; wakeup-source; @@ -622,7 +622,7 @@ &pcie0_phy { status = "okay"; }; -&pm8350_gpios { +&pm8350_1_gpios { gpio-line-names = "ASSIGN1_THERM", /* GPIO_1 */ "LCD_ID", "SDR_MMW_THERM", From patchwork Wed Mar 29 00:08:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669038 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 A024AC77B6E for ; Wed, 29 Mar 2023 00:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229670AbjC2AIp (ORCPT ); Tue, 28 Mar 2023 20:08:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbjC2AIn (ORCPT ); Tue, 28 Mar 2023 20:08:43 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC9992107 for ; Tue, 28 Mar 2023 17:08:41 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id br6so17957349lfb.11 for ; Tue, 28 Mar 2023 17:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680048520; 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=uv3nXZmu951wyz4rQx8seqOJOpLq5+CWgoV+CHe6mco=; b=VSLWG9u/Vc9NDvKTNYAnkyfZ8xfXYlQHeQqMaL3ylOGuGWhCtFXWwpOWnw2ggMINwC hjz25Ty+32YhpnhEbPgaDVBY5fxJXpQURzoQc9/9KbYuXgBNaPlvjuBoHyH2lsot3MfX +pAVEABnpMO0GEBiv8/aehICdBgT0qEa/7nK4GR0NZ+9EhlCoVNKdM+9qeAKR4XPGLKX WtYdxaKpOjl/6lkLloXE+etx9eRfN1n1wBSBjSRIc8BuV4iZ+2hvEtyLr4x35fNKgs6s HnmoxCM43W30yUEttbjgdXARZhObhX2s7kVRKB3e0liY2L9J/tP+Q7rOnao6Gr7n2k3q aDYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680048520; 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=uv3nXZmu951wyz4rQx8seqOJOpLq5+CWgoV+CHe6mco=; b=No8cNCPC06y6ZtwkV/lySi1DWnYmIFz7UuOfU6d34Wo4asAU+X5m0pJp4Bkz7LjCKY RaWWouv6K7uU+Odd5wo2DacTBObF9AdUcChQXPmsdAPct8j5kid6RsZn/Ihjuak4fkfv TtHol8wW3eoShjsc8oq5yb+PiAiAzo35+znV4d97TKFl6vSnJSgebhoA8xedYWnieJki wN5qxT8qXxTo3Uas0yj7kCmdwdz8YbSVd3LgT0Jc345DmhCMtJsJrFMG7kbTihZytj2/ q09HFzJtJSKhhoRl014GG8HBDyLXTaIObUAz1JIGlv1Ymp4qaF/qhKpxoyziwKYd/O0q gp/A== X-Gm-Message-State: AAQBX9eaW0twVbC0qoBI6XQyzqMQUaw7lO8rutQqpKgJ2ltne7/Bmgds Kw3oe/Zvmda0NU/5yGB5A1rFmw== X-Google-Smtp-Source: AKy350bBnYrVYXCQ0LNAkNBhyKHmeWzJ1bfJmZBWhA0on9nYbdiTBPX+mX5pSbmd36iuON4PeQoljw== X-Received: by 2002:ac2:5d2c:0:b0:4db:3ddf:2fbd with SMTP id i12-20020ac25d2c000000b004db3ddf2fbdmr4400730lfb.45.1680048520346; Tue, 28 Mar 2023 17:08:40 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id p21-20020ac246d5000000b004e8011cbaa0sm5238341lfo.111.2023.03.28.17.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 17:08:39 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, Johan Hovold , devicetree@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH 5/6] arm64: dts: qcom: sc8280xp*: use pm8350.dtsi Date: Wed, 29 Mar 2023 03:08:32 +0300 Message-Id: <20230329000833.2507594-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230329000833.2507594-1-dmitry.baryshkov@linaro.org> References: <20230329000833.2507594-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Employ PM8350_SID and switch sc8280xp-pmics to use pm8350.dtsi to reduce duplication and possible discrepancies. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 12 +-- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 12 +-- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 98 ++----------------- 3 files changed, 19 insertions(+), 103 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index d32594b5a4e7..58a14c39633b 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -25,7 +25,7 @@ aliases { backlight: backlight { compatible = "pwm-backlight"; pwms = <&pmc8280c_lpg 3 1000000>; - enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>; + enable-gpios = <&pm8350_1_gpios 8 GPIO_ACTIVE_HIGH>; power-supply = <&vreg_edp_bl>; pinctrl-names = "default"; @@ -137,7 +137,7 @@ vreg_edp_bl: regulator-edp-bl { regulator-min-microvolt = <3600000>; regulator-max-microvolt = <3600000>; - gpio = <&pmc8280_1_gpios 9 GPIO_ACTIVE_HIGH>; + gpio = <&pm8350_1_gpios 9 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; @@ -167,7 +167,7 @@ vreg_misc_3p3: regulator-misc-3p3 { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>; + gpio = <&pm8350_1_gpios 1 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; @@ -200,7 +200,7 @@ vreg_wwan: regulator-wwan { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpio = <&pmc8280_2_gpios 1 GPIO_ACTIVE_HIGH>; + gpio = <&pm8350_3_gpios 1 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; @@ -686,7 +686,7 @@ &xo_board_clk { /* PINCTRL - additions to nodes defined in sc8280xp.dtsi */ -&pmc8280_1_gpios { +&pm8350_1_gpios { edp_bl_en: edp-bl-en-state { pins = "gpio8"; function = "normal"; @@ -703,7 +703,7 @@ misc_3p3_reg_en: misc-3p3-reg-en-state { }; }; -&pmc8280_2_gpios { +&pm8350_3_gpios { wwan_sw_en: wwan-sw-en-state { pins = "gpio1"; function = "normal"; 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 7d61108daede..023ccb7725ef 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -55,7 +55,7 @@ wcd938x: audio-codec { backlight: backlight { compatible = "pwm-backlight"; pwms = <&pmc8280c_lpg 3 1000000>; - enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>; + enable-gpios = <&pm8350_1_gpios 8 GPIO_ACTIVE_HIGH>; power-supply = <&vreg_edp_bl>; pinctrl-names = "default"; @@ -178,7 +178,7 @@ vreg_edp_bl: regulator-edp-bl { regulator-min-microvolt = <3600000>; regulator-max-microvolt = <3600000>; - gpio = <&pmc8280_1_gpios 9 GPIO_ACTIVE_HIGH>; + gpio = <&pm8350_1_gpios 9 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; @@ -194,7 +194,7 @@ vreg_misc_3p3: regulator-misc-3p3 { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>; + gpio = <&pm8350_1_gpios 1 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; @@ -253,7 +253,7 @@ vreg_wwan: regulator-wwan { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpio = <&pmc8280_2_gpios 1 GPIO_ACTIVE_HIGH>; + gpio = <&pm8350_3_gpios 1 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; @@ -1148,7 +1148,7 @@ &lpass_tlmm { status = "okay"; }; -&pmc8280_1_gpios { +&pm8350_1_gpios { edp_bl_en: edp-bl-en-state { pins = "gpio8"; function = "normal"; @@ -1165,7 +1165,7 @@ misc_3p3_reg_en: misc-3p3-reg-en-state { }; }; -&pmc8280_2_gpios { +&pm8350_3_gpios { wwan_sw_en: wwan-sw-en-state { pins = "gpio1"; function = "normal"; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index 781fb6448a52..505bb8f9a13c 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -7,79 +7,19 @@ #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"; - }; - }; - }; - }; -}; - #define PMK8350_SID 0 #include "pmk8350.dtsi" #undef PMK8350_SID -&spmi_bus { - pmc8280_1: pmic@1 { - compatible = "qcom,pm8350", "qcom,spmi-pmic"; - reg = <0x1 SPMI_USID>; - #address-cells = <1>; - #size-cells = <0>; +#define PM8350_SID 1 +#include "pm8350.dtsi" +#undef PM8350_SID - 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 PM8350_SID 3 +#include "pm8350.dtsi" +#undef PM8350_SID +&spmi_bus { pmc8280c: pmic@2 { compatible = "qcom,pm8350c", "qcom,spmi-pmic"; reg = <0x2 SPMI_USID>; @@ -108,30 +48,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 0x2 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 Wed Mar 29 00:08:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 668213 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 232BAC77B60 for ; Wed, 29 Mar 2023 00:08:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229982AbjC2AIq (ORCPT ); Tue, 28 Mar 2023 20:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbjC2AIp (ORCPT ); Tue, 28 Mar 2023 20:08:45 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD61B2D55 for ; Tue, 28 Mar 2023 17:08:42 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id h11so11024961lfu.8 for ; Tue, 28 Mar 2023 17:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680048521; 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=Ebf7jyLJf0YeFfOywV30tQ3Yu3KMKIOaI0KbggP0I44=; b=fpDNoe37hld0GXJbbw6UMapmDlKUTjH3G/UFe0O+iDb8qFCa4jRRIl2tEqTYLbSUQ7 DM1XVGjDgNSbgM+kpz6I2jgFc9DL1CwqBkhem7aEW08WWhaWoVvMT0UMdNZYElI2OwFj Y5vuAL1bzjdJOD1vr7VWWsRSD5Udg7eVKsNnU6inMM5uNnZ4y9+e89HGei/fWjxEDSF7 i45XpB3teDhsxzROXVpKCEplzek4ZLkc6eo39hPEAxgcpL2DU4NS6lDfJjbyzdUnUI1I 8n/Kp+f5VCRNpX2smqZDlnDxM3FL8RuUnzVD8RQU+bP1WVFjRo2TEt7zQBQ+VjreCZ9L bPfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680048521; 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=Ebf7jyLJf0YeFfOywV30tQ3Yu3KMKIOaI0KbggP0I44=; b=XemELo1Hk9Eq8IT9xEWtoEYouVFh6sTJiFCipGWL4U6eiWUlAht7Wq0lzfaBqmbHjr Gy0Z3OuUfX7/4Ob1eu3pqHVtcO+PucdsReJYr3vdi5D6KlMRKaLukoVZaMIIZ4c9++Me SeC/EG3htpSCRw+ddKRxIj82XnrfR1JqvJ2qPsSQWz1s1nuouCr+hi0vOd4jGcArINex s82O86BHI6vPlfFLyZkrQeQfx8GxBQ2XKoXHtNXrg0Ca59JmEjQP0AamUnGMzZK6OX9h a0LhtZTfkBrgkPeoVr8vnLsQEwEd/NT8k4mei8DmiJfK1g1ITNzsMPRnvzuZ6SNa09Wr ExXA== X-Gm-Message-State: AAQBX9c9mHm7pwgjNHMWDBnzgrqIJLu/Rmecz29hXPH/o9JXic5NpPYT 57dBTdcOpsqn2wYslpqM0epjFA== X-Google-Smtp-Source: AKy350Y/2LQyLvqfj8TEXfojvFP6bCipVPpkwxs4RmfJABUBSMk7uf2ZuaVRC85iF6aENDARp0e1zA== X-Received: by 2002:ac2:5519:0:b0:4de:e802:b7e3 with SMTP id j25-20020ac25519000000b004dee802b7e3mr5071162lfk.19.1680048521127; Tue, 28 Mar 2023 17:08:41 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id p21-20020ac246d5000000b004e8011cbaa0sm5238341lfo.111.2023.03.28.17.08.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 17:08:40 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, Johan Hovold , devicetree@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH 6/6] arm64: dts: qcom: sc8280xp*: use pm8350c.dtsi and pmr735a.dtsi Date: Wed, 29 Mar 2023 03:08:33 +0300 Message-Id: <20230329000833.2507594-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230329000833.2507594-1-dmitry.baryshkov@linaro.org> References: <20230329000833.2507594-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 pm8350c and pmr735a PMICs, use existing files to prevent possible future issues. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 6 +-- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 +-- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 51 ++----------------- 3 files changed, 11 insertions(+), 52 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 58a14c39633b..aabdacc15aab 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 = <&pm8350c_pwm 3 1000000>; enable-gpios = <&pm8350_1_gpios 8 GPIO_ACTIVE_HIGH>; power-supply = <&vreg_edp_bl>; @@ -555,7 +555,7 @@ &pcie4_phy { status = "okay"; }; -&pmc8280c_lpg { +&pm8350c_pwm { status = "okay"; }; @@ -710,7 +710,7 @@ wwan_sw_en: wwan-sw-en-state { }; }; -&pmc8280c_gpios { +&pm8350c_gpios { edp_bl_pwm: edp-bl-pwm-state { pins = "gpio8"; function = "func1"; 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 023ccb7725ef..7e589e5f6a2e 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 = <&pm8350c_pwm 3 1000000>; enable-gpios = <&pm8350_1_gpios 8 GPIO_ACTIVE_HIGH>; power-supply = <&vreg_edp_bl>; @@ -725,7 +725,7 @@ &pcie4_phy { status = "okay"; }; -&pmc8280c_lpg { +&pm8350c_pwm { status = "okay"; }; @@ -1172,7 +1172,7 @@ wwan_sw_en: wwan-sw-en-state { }; }; -&pmc8280c_gpios { +&pm8350c_gpios { edp_bl_pwm: edp-bl-pwm-state { pins = "gpio8"; function = "func1"; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index 505bb8f9a13c..a37fe4b1458c 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -15,53 +15,12 @@ #include "pm8350.dtsi" #undef PM8350_SID +/* SID 2 */ +#include "pm8350c.dtsi" + #define PM8350_SID 3 #include "pm8350.dtsi" #undef PM8350_SID -&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>; - #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"