Message ID | 20230314183043.619997-6-brgl@bgdev.pl |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1918896wrd; Tue, 14 Mar 2023 11:33:21 -0700 (PDT) X-Google-Smtp-Source: AK7set+Z0y8Z6OX1tDFj2wDjur8oE1cPVc5b8SKBhm3AkQNVmb82hLhyhOnIUKqQ/sFnyxkP0AjY X-Received: by 2002:a05:6a20:72a2:b0:d4:a56b:bd24 with SMTP id o34-20020a056a2072a200b000d4a56bbd24mr4730924pzk.16.1678818800855; Tue, 14 Mar 2023 11:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678818800; cv=none; d=google.com; s=arc-20160816; b=IGjShNV3wu+TscHuoKSXzk4hTD5WEBg+Ej3KymkB+rwMb5Sn5w/JQlQ6xMJPq8NGZv osFmjw+olh3UBRsP4OmsSwLkG1Iw5mY1N//rQQs9csekfS8GZugTUT8Y5MHLrNsDDuEb heDLreUkIRuQI0YFo4N+P73yh/jZENxodDeUR1IKyyegC5SVf4zzCPz3BILuszIBWEwF 424ILOGtaqXXJifLDtJE+xrDeQepn4ixXFDY5mk9m18MwowLd1Ep9s703Mbs0R+CLLA6 UYSkTFc/zCfMriaDtsN7LacRyLYsQRXcRpM6qGDMEVapnVNQscETkvmmcD5TIReG7F5L AqeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7zlKvK/qoHQY6rAwjMUbU+tla4aUvklVHkaE62d6X1o=; b=jjYuUPiDGSlquXDIyTOtbm6DCNQgR5Ehhrtai+eeYwst4tGtZo2/6CZI7SDYtd4PMH tJLVO0KFL3sQfQNJf2SUDjMG30w1qzlHs9VdP6/7GPPGZ1p4Nwfow6eKW+HCsvv4LYaO m07DVZl5rJLnlfcDPUA6BAYSH4EeW18pNsLWWOqdalTv6jn6OnwGPKZ4tI9ravBlYIOO h2YnCvcwbxNkR9jK+72SWB1aCfbTFTOruKgscck2D3WybLTSoViknd7PJAXJowQzTceW MQTipDwECpHY3yveYT3dvHwq1Z96TnY/Z+Lvg/1O9vL4VNHgyUcthfbahYp1p2wphbJc 7LvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=mAHZfWoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t71-20020a63814a000000b0050a16d20f02si2688105pgd.688.2023.03.14.11.33.05; Tue, 14 Mar 2023 11:33:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=mAHZfWoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbjCNSb1 (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 14:31:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230312AbjCNSbL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 14:31:11 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5817410274 for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 11:31:00 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id k25-20020a7bc419000000b003ed23114fa7so5131673wmi.4 for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 11:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; t=1678818658; 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=7zlKvK/qoHQY6rAwjMUbU+tla4aUvklVHkaE62d6X1o=; b=mAHZfWoHife7osWAwNO1qjf1eVt4tln5Im6PldiMduGLQ+6yF8xbQVPRGTryokoOYM tyDwJvmRrXHKoKmwlLwSuebsVS+SiMCR6np98xw+xyNTllnVxqC5UQRFyLUebAzXVce7 ftS8+C6Qc4XlIC+UOSIMV/6ek8IRbrSpx/BV+pzaLj6mcxHLQyzUndX8C0HLljUFEdJr Pq3g2TmdV8zdbH3GH6BOZEAEX/kZPvPN7vYmX5Rv4MRt1Q7RJcFNValYkbMd4XjXpdRc VvbqwxhkfvVMpw9A5pkufi6nZpqVKa9DOVCXVosNh7DKyOOthkbe9cRUDWJd7TEMyqQz OGLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678818658; 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=7zlKvK/qoHQY6rAwjMUbU+tla4aUvklVHkaE62d6X1o=; b=SFZpPuwehAGTLaGDYIcdEu8vRGNU456LHrcKzB63nvBpSb0gABE37jLgI+i4Y4INi3 CHswiokkVuxOh7iNonjfM1C/DYcYobqpTrxg2GsyNw8xhbe+6NOTsBHTwbuI8topN+WH 2TnNCaqYv7Qk9DYJvW4CgYV+RNz6DrR0W+aLF1Hb+ENyDdFJ3o6YE/8AvONCUM7jMWmO mw/KlSUizI0+K5gvYhZEa+FhSdZBXsAj39r/S5Ri7AXnnpzhy0Befpjh4Apz9zrNmrSH L6Zo3qcr8rL3umZxR9TrYMXb+2AXkwApAqhq+6V2zMWec45Kt/ABS7EWWQzUCvPjAnRO aL/g== X-Gm-Message-State: AO0yUKUFbQt/fP7p2dT5LtugVmpcBH7QkKtr02W7t3okyZISfJzn6efM D6o0ShL2RNKGznsOOPolTLigtA== X-Received: by 2002:a05:600c:358a:b0:3e1:e149:b67b with SMTP id p10-20020a05600c358a00b003e1e149b67bmr3037171wmq.18.1678818658568; Tue, 14 Mar 2023 11:30:58 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:fd14:bd52:b53b:d94c]) by smtp.gmail.com with ESMTPSA id k28-20020a05600c1c9c00b003e209b45f6bsm4083938wms.29.2023.03.14.11.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 11:30:58 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Subject: [PATCH 05/14] arm64: dts: qcom: sa8775p: add support for the on-board PMICs Date: Tue, 14 Mar 2023 19:30:34 +0100 Message-Id: <20230314183043.619997-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230314183043.619997-1-brgl@bgdev.pl> References: <20230314183043.619997-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760369103014715552?= X-GMAIL-MSGID: =?utf-8?q?1760369103014715552?= |
Series |
arm64: dts: qcom: sa8775p: add basic PMIC support
|
|
Commit Message
Bartosz Golaszewski
March 14, 2023, 6:30 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Add a new .dtsi file for sa8775p PMICs and add the four PMICs interfaced to the SoC via SPMI. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
Comments
On 14.03.2023 19:30, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Add a new .dtsi file for sa8775p PMICs and add the four PMICs interfaced > to the SoC via SPMI. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 37 +++++++++++++++++++++ > 1 file changed, 37 insertions(+) > create mode 100644 arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi > new file mode 100644 > index 000000000000..77e2515a7ab9 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi > @@ -0,0 +1,37 @@ > +// SPDX-License-Identifier: BSD-3-Clause > +/* > + * Copyright (c) 2023, Linaro Limited > + */ > + > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/spmi/spmi.h> > + > +&spmi_bus { > + pmk8775_0: pmic@0 { pmk8775.. > + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; ..or pmm8654au? Konrad > + reg = <0x0 SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > + > + pmk8775_1: pmic@2 { > + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; > + reg = <0x2 SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > + > + pmk8775_2: pmic@4 { > + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; > + reg = <0x4 SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > + > + pmk8775_3: pmic@6 { > + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; > + reg = <0x6 SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > +};
On Tue, Mar 14, 2023 at 9:22 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote: > > > > On 14.03.2023 19:30, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > Add a new .dtsi file for sa8775p PMICs and add the four PMICs interfaced > > to the SoC via SPMI. > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > > arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 37 +++++++++++++++++++++ > > 1 file changed, 37 insertions(+) > > create mode 100644 arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi > > > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi > > new file mode 100644 > > index 000000000000..77e2515a7ab9 > > --- /dev/null > > +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi > > @@ -0,0 +1,37 @@ > > +// SPDX-License-Identifier: BSD-3-Clause > > +/* > > + * Copyright (c) 2023, Linaro Limited > > + */ > > + > > +#include <dt-bindings/input/input.h> > > +#include <dt-bindings/spmi/spmi.h> > > + > > +&spmi_bus { > > + pmk8775_0: pmic@0 { > pmk8775.. > > > + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; > ..or pmm8654au? > Honestly, I got inspired by this bit from sc8280xp-pmics.dtsi: 54 &spmi_bus { 55 pmk8280: pmic@0 { 56 compatible = "qcom,pmk8350", "qcom,spmi-pmic"; 57 reg = <0x0 SPMI_USID>; 58 #address-cells = <1>; 59 #size-cells = <0>; Where the label seems to follow the SoC's numbering. Do you think it would be better to consistently use the pmic's name? Bartosz > Konrad > > + reg = <0x0 SPMI_USID>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + }; > > + > > + pmk8775_1: pmic@2 { > > + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; > > + reg = <0x2 SPMI_USID>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + }; > > + > > + pmk8775_2: pmic@4 { > > + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; > > + reg = <0x4 SPMI_USID>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + }; > > + > > + pmk8775_3: pmic@6 { > > + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; > > + reg = <0x6 SPMI_USID>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + }; > > +};
On 20.03.2023 11:24, Bartosz Golaszewski wrote: > On Tue, Mar 14, 2023 at 9:22 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote: >> >> >> >> On 14.03.2023 19:30, Bartosz Golaszewski wrote: >>> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> >>> >>> Add a new .dtsi file for sa8775p PMICs and add the four PMICs interfaced >>> to the SoC via SPMI. >>> >>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> >>> --- >>> arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 37 +++++++++++++++++++++ >>> 1 file changed, 37 insertions(+) >>> create mode 100644 arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi >>> new file mode 100644 >>> index 000000000000..77e2515a7ab9 >>> --- /dev/null >>> +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi >>> @@ -0,0 +1,37 @@ >>> +// SPDX-License-Identifier: BSD-3-Clause >>> +/* >>> + * Copyright (c) 2023, Linaro Limited >>> + */ >>> + >>> +#include <dt-bindings/input/input.h> >>> +#include <dt-bindings/spmi/spmi.h> >>> + >>> +&spmi_bus { >>> + pmk8775_0: pmic@0 { >> pmk8775.. >> >>> + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; >> ..or pmm8654au? >> > > Honestly, I got inspired by this bit from sc8280xp-pmics.dtsi: > > 54 &spmi_bus { > 55 pmk8280: pmic@0 { > 56 compatible = "qcom,pmk8350", "qcom,spmi-pmic"; > 57 reg = <0x0 SPMI_USID>; > 58 #address-cells = <1>; > 59 #size-cells = <0>; > > Where the label seems to follow the SoC's numbering. Do you think it > would be better to consistently use the pmic's name? Generally, the automotive PMICs seem to be carbon copies of their non-AU relatives, except they're built to a better electrical spec (because well.. they're gonna be used in cars) or very very slightly modified, so I propose: actual_pmic: pmic@sid { compatbile = "qcom,actualpmic", "qcom,pmic-its-based-on"; } Konrad > > Bartosz > >> Konrad >>> + reg = <0x0 SPMI_USID>; >>> + #address-cells = <1>; >>> + #size-cells = <0>; >>> + }; >>> + >>> + pmk8775_1: pmic@2 { >>> + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; >>> + reg = <0x2 SPMI_USID>; >>> + #address-cells = <1>; >>> + #size-cells = <0>; >>> + }; >>> + >>> + pmk8775_2: pmic@4 { >>> + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; >>> + reg = <0x4 SPMI_USID>; >>> + #address-cells = <1>; >>> + #size-cells = <0>; >>> + }; >>> + >>> + pmk8775_3: pmic@6 { >>> + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; >>> + reg = <0x6 SPMI_USID>; >>> + #address-cells = <1>; >>> + #size-cells = <0>; >>> + }; >>> +};
diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi new file mode 100644 index 000000000000..77e2515a7ab9 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023, Linaro Limited + */ + +#include <dt-bindings/input/input.h> +#include <dt-bindings/spmi/spmi.h> + +&spmi_bus { + pmk8775_0: pmic@0 { + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; + + pmk8775_1: pmic@2 { + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; + reg = <0x2 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; + + pmk8775_2: pmic@4 { + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; + reg = <0x4 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; + + pmk8775_3: pmic@6 { + compatible = "qcom,pmm8654au", "qcom,spmi-pmic"; + reg = <0x6 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; +};