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: 13191723 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 C2F00C77B6F for ; Wed, 29 Mar 2023 00:08:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229947AbjC2AIm (ORCPT ); Tue, 28 Mar 2023 20:08:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbjC2AIk (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 5C3171FE0 for ; Tue, 28 Mar 2023 17:08:38 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id k37so18051947lfv.0 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=0XUmRqbiyJHPmZCn1yJcsOn+QhS46VNQlVgAFj5HuQdFo60d1l66jB89DA+NRXzWtZ H31qnmeKxHk0t9VCgTGOSRQ2mjCWV3hKnjhdDAyWbHAGuDGV3p95r76uHua/R2cixhoL l9R5BoFxGtDOaFURRgu+PVlZpwHFkbF6mtJ3Hacz9e9LekCFof/pR4cO5s8bmNJSqllc eSyeJCTl63fDuzUSQQToPX3B7AK+UW1/jRcM3lUBCfl3pgc7ZHVYi4PEsRz0ZPiFDcpU JWt2/zNFlK9w6m7QzwfC3hpm+9RnCpVySTZYtcH80HHKne8KI2pVASN0XNC1f0xvnrzm YZnA== X-Gm-Message-State: AAQBX9dzbU3fSY2lCo2x1FW+Q1rtWGcfiY/bol2LuCqjXuRM9Je58amf JRtQ6MUZ9thPDJuP0/FTAVkKTw== 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-iio@vger.kernel.org pmk8350 can take different addresses on SPMI bus. Rather than having a default SID, follow the pm8350's example and make the sid explicit when specifying ADC channels. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski 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: 13191722 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 19873C77B6E for ; Wed, 29 Mar 2023 00:08:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229984AbjC2AIl (ORCPT ); Tue, 28 Mar 2023 20:08:41 -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 S229967AbjC2AIk (ORCPT ); Tue, 28 Mar 2023 20:08:40 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13AC71720 for ; Tue, 28 Mar 2023 17:08:39 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id x17so18010678lfu.5 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=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=VrZxyvQQqaEyinvZYLLA2ifx5vzIlYIOwlLgn+CJzYMJSM2JOSYi55qKBx/C9SSsVa cquQ+ognl6/gKd+udDBLEFyZaP+ruOyTcm5QVCRv/LUTByyEYY383gZhNW0BkoU8tA3p uk9KA57vuSn68MOMedcTjQ06HKP9lodS/AJCaZa8km9bSOrLmRmk4eKRsl55qBua3npB fpDbJqlvV6cOGdHXrtbdB2CGekcogbD6Pi4EA2g+USMMkPtdAnB01cxQtl1nXhODVwlZ m3Nw58prxmEwQcgmfncl39Id06+LT7jG/wHCvTqtwqObwsJYaE3miCuudHUT5Yqkhpiu xtCA== X-Gm-Message-State: AAQBX9ctVwsimgdizd0HZoTQ+GVZMqQu/pMTeE7myzRke12hoQRjKihq 8ER9ZwLJhpI0bB5wZYaVYsSPQQ== 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-iio@vger.kernel.org To reduce a possibility of the conflicts, rename pmk8350's pon_pwrkey and pon_resin to contain the PMIC name too. 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: 13191724 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 4724DC77B72 for ; Wed, 29 Mar 2023 00:08:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229970AbjC2AIn (ORCPT ); Tue, 28 Mar 2023 20:08:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbjC2AIl (ORCPT ); Tue, 28 Mar 2023 20:08:41 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBF152D68 for ; Tue, 28 Mar 2023 17:08:39 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id h11so11024851lfu.8 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=UiS4aPCFfRgk1n7hdAemo37ct9oJ1wZUGxJJV8AMjutn4OwhYA1hkWUBQixijIW8ce qdExGEY6Lzc73JTEaykYC9NYkRmy6v0sF9LPYB+zOg7CrJF3nOTu4CwXqRQrs22V7sxq PsaG4LkI0weQmgbCAv+wYAfNYm+xFefxIrdvqdxKHiaCButQo37bhKF2819T6/mLTdpg kV7U+1RdmgVxvKErr9Tci7J6kFXuiIsQzUt1+gNRZDCnBSh2Nu9rLQsMU3nFRJuSP7V9 KQ3naK18XgPnQj5LoUE0/+wTEKL2V1mDjy64dX1Z5ESUqkEDVTvg2lKXxdjQ2cHdY1ho TFGQ== X-Gm-Message-State: AAQBX9cMTYGN0H/5j0oIYSZhhRwLIJc3rz8hM/3N5+Ez6MkHhIykEHIS WjEfXYDx+slqCGsdfqAVtrjI/VebETP4CAOXQ5A= 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-iio@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: 13191725 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 3C4EEC6FD18 for ; Wed, 29 Mar 2023 00:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229784AbjC2AIo (ORCPT ); Tue, 28 Mar 2023 20:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbjC2AIm (ORCPT ); Tue, 28 Mar 2023 20:08:42 -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 249151720 for ; Tue, 28 Mar 2023 17:08:41 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id h25so17991643lfv.6 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=vn6Dqn7SpFwg2F6eRBYOli5nTFYf25/8aR4Zz4MX7UXbfb+eiEAZ0neHc25STU6dJK wdb/s9igu7LVMB7EfsVKiCzrASOUiysJUqCedj3ug8ZJfLi6ZLptLdJXoBBn0eGeSkp3 ZQiYW5EBgEL4UyAjY6ATh/fKaogf2TZTWOheFT4u/E5ZixN93pgEbbUYFSIyBazSEAdk 05Ym4vYyukDsCV7qYHXM2QGxX2nRrdpJfk/x2LhaUOEhSfecyBIvU0B7xl5seeimPhub gtqhWqcCHIL4MLfYNat0uS4ZcpOglBWfu5iVWMX6bUnLPp6lpj/Jr5UhNOyx8teLOW8h 3vaQ== X-Gm-Message-State: AAQBX9fzfUNVskSoZc13/8qEj+/65iMQNESqYwKzb3HJT3kzq4M7qYDS ShBVurJNAuXJkp9Ee3HQuFd+7g== 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-iio@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: 13191727 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 BAB2BC77B78 for ; Wed, 29 Mar 2023 00:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229610AbjC2AIp (ORCPT ); Tue, 28 Mar 2023 20:08:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbjC2AIo (ORCPT ); Tue, 28 Mar 2023 20:08:44 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1C3A211B for ; Tue, 28 Mar 2023 17:08:41 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id g19so4876034lfr.9 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=bVkYZhhR5eKWcr8/wx8zTp5VAg0bnkM1ADkoY3LAycuHmVsK8mJgl0f72TtiqlU0So kHFZJqAbSQbcruN9wFtDZ6xexUaqsk/ZBP8O9YzJhv9QduchHW022z7XC1UKINHGk0qE dViFj9X3R/kJGqFlhWSw2nk8zndXazvziXgW5CNatRpH6ajyHtKMPmJFmZd6Tfc/NyUE N7MV83Bn/jCvrHOhPBsJGP7rioDmu1x8aYqtcpaQNlIbCrgNKirJ7ae/UQaBva5xAzlK 646NmUhd8fAL+gdh/uTJ51seq44+1SzJSAjapZ7ZFaoMmXAYvVvX8Mi8Go4mArC4HXiB ELLw== X-Gm-Message-State: AAQBX9cIa46/daVdrqT1uI4fSo56FxPYXYWszwvHmnSPnvfmY9fUmSOr pTfdlF4TieHdAmz4Qf6t0nbJJA== 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-iio@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: 13191726 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 C9E9BC77B75 for ; Wed, 29 Mar 2023 00:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229983AbjC2AIp (ORCPT ); Tue, 28 Mar 2023 20:08:45 -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 S229765AbjC2AIn (ORCPT ); Tue, 28 Mar 2023 20:08:43 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB0DE1738 for ; Tue, 28 Mar 2023 17:08:41 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id c29so18014787lfv.3 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=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=bBVSLE1DhOVWVcTztTZjfTfj3uRv66JmbogxoQWN+s84qclzXwRZFvlCQfoJxSE/Rs O50JtM4TqD9OPOiYJHsSpl84Q8T0qAuyT4QYQDgI4SN9svIc9hH9Z6m0ZNuSwmmks3xo GiIyDin36SYcWcu75ZzztdjjGJwLfZs3wp6ZuJERCQozJ149Ihm3DI0Gg7oHzvZqE/qX 3K5bq/4OLpMP79fkLfruIcV7593VAqTHuN4eMGci7RaHeMNXckxhOgNz1ORx7lx+6qTX WL7ji96J/8lhAYEe+xdt2sc2u7NhrPs5PwfWZpM5givOxS+nSgvHk8SwwriPeVHt4zuR s1hg== X-Gm-Message-State: AAQBX9cT32fywuGityhu7DzhdLoAK455sMgTjMv7tvZuoMX3Q1Ffn2z8 d/bHBkD9aB2RtoCcd+zT6QjyBE3NZ7EgzYAd8w0= 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-iio@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"