Message ID | 20221229103212.984324-1-konrad.dybcio@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2333226wrt; Thu, 29 Dec 2022 02:34:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXvmOA5qtYIvYauD7QShaiu1wUA2sGfa17bzV/rcRSpcgJsFUO/ulefSHNcCKIes1kQW8AIG X-Received: by 2002:a17:906:d217:b0:7c1:6fc:6048 with SMTP id w23-20020a170906d21700b007c106fc6048mr21269929ejz.24.1672310076613; Thu, 29 Dec 2022 02:34:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672310076; cv=none; d=google.com; s=arc-20160816; b=az2OF040YqS+fCtuA73ca9Ss7EjPLvT2tb+/7zULTnB0tcnodxMGj3w4uyV/nUGEZt hjfMQITRiI4A5udIcqs4Vz/lPLGxtoN5ywOvNGfAoBW+YylJxQ94m2ftNizmSNf4rlOR AhB/LA+L8c2g4rhehScljfpk0Xt5+X7l82w/ggO0x2d5TT62HMu/nOS03KcUaYOqCwlN sCw4dKK96fB8B2zKs0xbUBVGT38o8+4ZHrOEZx2SKiCASSfG1lkZv6SU6NGofoXpGpY9 J3nbXmVKR1+Y1J8Y0MygS90HMCicCjgrTQI/EqHB7OywRBjpEM90oYUr9/jEBi19fMVq BiPQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=qjoW8U49t0MENbj+T08nhJ9chgSRAiBnlKUnJphbMdo=; b=djkgIfLiVNr77D3KSW7xuqdkvi5dw64lIuKXQQ9U/zy3HaepI8JnYaCxqrpj6vSLWi 2DbTnynw/kwAfzxtvKSA/FKRMwnMAFfLKOP9uCGWhzLc1GigHR4AmvxumQXNBxit++La Q7dA6hHXM/Es4jGeLKpJsulak5pifUAouaKbrawDAyECUbLEKtkROavys6zRFry2UCua eZp+8ecnkZ0ezANiuOc+NGD+10VORMQfKMLgb0kZ2zHBNc2waUmLM5esVsh7x/EJGiAQ EDx9UrZkA+V8r4lS2GrROrkwqemF+3lKGCnx6VCncTj5d60ukwG26TAoKeBJt81hPQfj VHEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Szgo241J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xb13-20020a170907070d00b007c146656546si15692739ejb.317.2022.12.29.02.34.12; Thu, 29 Dec 2022 02:34:36 -0800 (PST) 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=@linaro.org header.s=google header.b=Szgo241J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230173AbiL2KcU (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Thu, 29 Dec 2022 05:32:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232731AbiL2KcS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 29 Dec 2022 05:32:18 -0500 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 6874E764E for <linux-kernel@vger.kernel.org>; Thu, 29 Dec 2022 02:32:17 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id bf43so26967838lfb.6 for <linux-kernel@vger.kernel.org>; Thu, 29 Dec 2022 02:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=qjoW8U49t0MENbj+T08nhJ9chgSRAiBnlKUnJphbMdo=; b=Szgo241JMMmrAzd+ZeXQ3nqtyB/LkaZdbVAVyNiKThaG4REZRdvFcrotRSVRAltFvY O/CTiJznC6GaWA30ykgrD+xWB8/h4K5Cvbvbfhwor7292buyK9rKvzIjkOTuJ947hLch oEDbIGyGKbdHRLSfN4yHmfCmBuPSFXOiXm0fBL+WqNQLeGPtcxU4an8jIR4Afsc3fghZ VPFQ2w81zQiiPxBnQdY70dqKxhiVnK+j9FdVon+pJ3kXouifkwQdPC6f8TXKuljfDCEn naiJgueBA17GkPGkm9QMGe/1Aszkf3ou7SLnNrY9u2A+WTmuF3rZK4Dp2whn9XDvvkSK WMRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qjoW8U49t0MENbj+T08nhJ9chgSRAiBnlKUnJphbMdo=; b=S8sNumlQNhYst5A6ywv0CXsH1BrUrhz2dcxlBC/jNwcMBD3St598N7wgi+SkQrQVyR QPm+DlPu34YefbBTP5ZafhAKPLRE/Gim4b43kv6PMQwZgd0CVGH/heCoLhXJAbM2Xhbg N1mWChC7I8OiMun8yYZyqUk5/VdnNAGRzeeIHsHpUbrP9t8v69vU6Yv46fNhJYMVBeNn Nnhz+Y1Lnp8GCD1Jsnmk4UyhcAOt+0PPj26ct/kPzoyg6PAO0u8VodpPQjCaVeKMNWQM nPCQ6IUTeKhn3lebbi/broScURZoaf4djoI1l1i5HU0AcGgW077Dn6VeRjMdM3nfCjBv BD6g== X-Gm-Message-State: AFqh2kqLzTSSoEay7qDOYxM7EryGKZInAsmJ6OqeiuXyLY5uCkTb9bwf JJEUL+je65P0kXN7ptnl8dpxqA== X-Received: by 2002:a05:6512:3d9e:b0:4b5:5efe:966e with SMTP id k30-20020a0565123d9e00b004b55efe966emr10416789lfv.15.1672309935791; Thu, 29 Dec 2022 02:32:15 -0800 (PST) Received: from localhost.localdomain (abyl184.neoplus.adsl.tpnet.pl. [83.9.31.184]) by smtp.gmail.com with ESMTPSA id m1-20020a056512114100b004a478c2f4desm2993526lfg.163.2022.12.29.02.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 02:32:15 -0800 (PST) From: Konrad Dybcio <konrad.dybcio@linaro.org> To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Vinod Koul <vkoul@kernel.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/7] arm64: dts: qcom: sm8450: add spmi node Date: Thu, 29 Dec 2022 11:32:06 +0100 Message-Id: <20221229103212.984324-1-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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?1753544210806829866?= X-GMAIL-MSGID: =?utf-8?q?1753544210806829866?= |
Series |
[v2,1/7] arm64: dts: qcom: sm8450: add spmi node
|
|
Commit Message
Konrad Dybcio
Dec. 29, 2022, 10:32 a.m. UTC
From: Vinod Koul <vkoul@kernel.org> Add the spmi bus as found in the SM8450 SoC Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> [Konrad: 0x0 -> 0, move #cells down, make reg-names a vertical list] Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> --- v1 -> v2: No changes arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
Comments
On 29/12/2022 11:32, Konrad Dybcio wrote: > From: Vinod Koul <vkoul@kernel.org> > > Add the spmi bus as found in the SM8450 SoC > > Signed-off-by: Vinod Koul <vkoul@kernel.org> > Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> > [Konrad: 0x0 -> 0, move #cells down, make reg-names a vertical list] > Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> > --- > v1 -> v2: > No changes > > arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi > index 570475040d95..b9b59c5223eb 100644 > --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi > @@ -2715,6 +2715,28 @@ aoss_qmp: power-controller@c300000 { > #clock-cells = <0>; > }; > > + spmi_bus: spmi@c42d000 { Hmm looks different than reg. > + compatible = "qcom,spmi-pmic-arb"; > + reg = <0 0x0c400000 0 0x00003000>, > + <0 0x0c500000 0 0x00400000>, > + <0 0x0c440000 0 0x00080000>, > + <0 0x0c4c0000 0 0x00010000>, > + <0 0x0c42d000 0 0x00010000>; x Best regards, Krzysztof
On 29.12.2022 11:42, Krzysztof Kozlowski wrote: > On 29/12/2022 11:32, Konrad Dybcio wrote: >> From: Vinod Koul <vkoul@kernel.org> >> >> Add the spmi bus as found in the SM8450 SoC >> >> Signed-off-by: Vinod Koul <vkoul@kernel.org> >> Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> >> [Konrad: 0x0 -> 0, move #cells down, make reg-names a vertical list] >> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> >> --- >> v1 -> v2: >> No changes >> >> arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++++++++++++++++++ >> 1 file changed, 22 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi >> index 570475040d95..b9b59c5223eb 100644 >> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi >> @@ -2715,6 +2715,28 @@ aoss_qmp: power-controller@c300000 { >> #clock-cells = <0>; >> }; >> >> + spmi_bus: spmi@c42d000 { > > Hmm looks different than reg. > >> + compatible = "qcom,spmi-pmic-arb"; >> + reg = <0 0x0c400000 0 0x00003000>, >> + <0 0x0c500000 0 0x00400000>, >> + <0 0x0c440000 0 0x00080000>, >> + <0 0x0c4c0000 0 0x00010000>, >> + <0 0x0c42d000 0 0x00010000>; > x Hm, my guess would be that Vinod chose to put the "cnfg" reg instead of "core" in the unit address, as 8450 has 2 SPMI bus hosts and they both share the core reg, so it would have been impossible to have two spmi@core nodes.. Konrad > > Best regards, > Krzysztof >
On 29/12/2022 11:45, Konrad Dybcio wrote: > > > On 29.12.2022 11:42, Krzysztof Kozlowski wrote: >> On 29/12/2022 11:32, Konrad Dybcio wrote: >>> From: Vinod Koul <vkoul@kernel.org> >>> >>> Add the spmi bus as found in the SM8450 SoC >>> >>> Signed-off-by: Vinod Koul <vkoul@kernel.org> >>> Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> >>> [Konrad: 0x0 -> 0, move #cells down, make reg-names a vertical list] >>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> >>> --- >>> v1 -> v2: >>> No changes >>> >>> arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++++++++++++++++++ >>> 1 file changed, 22 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi >>> index 570475040d95..b9b59c5223eb 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi >>> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi >>> @@ -2715,6 +2715,28 @@ aoss_qmp: power-controller@c300000 { >>> #clock-cells = <0>; >>> }; >>> >>> + spmi_bus: spmi@c42d000 { >> >> Hmm looks different than reg. >> >>> + compatible = "qcom,spmi-pmic-arb"; >>> + reg = <0 0x0c400000 0 0x00003000>, >>> + <0 0x0c500000 0 0x00400000>, >>> + <0 0x0c440000 0 0x00080000>, >>> + <0 0x0c4c0000 0 0x00010000>, >>> + <0 0x0c42d000 0 0x00010000>; >> x > Hm, my guess would be that Vinod chose to put the "cnfg" reg > instead of "core" in the unit address, as 8450 has 2 SPMI bus > hosts and they both share the core reg, so it would have been > impossible to have two spmi@core nodes.. Eh? SM8450 has 2 SPMI hosts both using 0x0c400000? How does that work? Usually address can be mapped only once. Where is the second SPMI? I cannot find it in linux-next. Best regards, Krzysztof
On 29.12.2022 11:57, Krzysztof Kozlowski wrote: > On 29/12/2022 11:45, Konrad Dybcio wrote: >> >> >> On 29.12.2022 11:42, Krzysztof Kozlowski wrote: >>> On 29/12/2022 11:32, Konrad Dybcio wrote: >>>> From: Vinod Koul <vkoul@kernel.org> >>>> >>>> Add the spmi bus as found in the SM8450 SoC >>>> >>>> Signed-off-by: Vinod Koul <vkoul@kernel.org> >>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> >>>> [Konrad: 0x0 -> 0, move #cells down, make reg-names a vertical list] >>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> >>>> --- >>>> v1 -> v2: >>>> No changes >>>> >>>> arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++++++++++++++++++ >>>> 1 file changed, 22 insertions(+) >>>> >>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi >>>> index 570475040d95..b9b59c5223eb 100644 >>>> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi >>>> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi >>>> @@ -2715,6 +2715,28 @@ aoss_qmp: power-controller@c300000 { >>>> #clock-cells = <0>; >>>> }; >>>> >>>> + spmi_bus: spmi@c42d000 { >>> >>> Hmm looks different than reg. >>> >>>> + compatible = "qcom,spmi-pmic-arb"; >>>> + reg = <0 0x0c400000 0 0x00003000>, >>>> + <0 0x0c500000 0 0x00400000>, >>>> + <0 0x0c440000 0 0x00080000>, >>>> + <0 0x0c4c0000 0 0x00010000>, >>>> + <0 0x0c42d000 0 0x00010000>; >>> x >> Hm, my guess would be that Vinod chose to put the "cnfg" reg >> instead of "core" in the unit address, as 8450 has 2 SPMI bus >> hosts and they both share the core reg, so it would have been >> impossible to have two spmi@core nodes.. > > Eh? SM8450 has 2 SPMI hosts both using 0x0c400000? How does that work? > Usually address can be mapped only once. No idea either! > > Where is the second SPMI? I cannot find it in linux-next. It's only there on downstream and I'm not sure how useful it is really, only some debug subdevice is attached to it.. Perhaps we could ignore its existence for now and I could use the core reg in unit address for spmi0? Konrad > > > Best regards, > Krzysztof >
On 29/12/2022 12:04, Konrad Dybcio wrote: > > > On 29.12.2022 11:57, Krzysztof Kozlowski wrote: >> On 29/12/2022 11:45, Konrad Dybcio wrote: >>> >>> >>> On 29.12.2022 11:42, Krzysztof Kozlowski wrote: >>>> On 29/12/2022 11:32, Konrad Dybcio wrote: >>>>> From: Vinod Koul <vkoul@kernel.org> >>>>> >>>>> Add the spmi bus as found in the SM8450 SoC >>>>> >>>>> Signed-off-by: Vinod Koul <vkoul@kernel.org> >>>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> >>>>> [Konrad: 0x0 -> 0, move #cells down, make reg-names a vertical list] >>>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> >>>>> --- >>>>> v1 -> v2: >>>>> No changes >>>>> >>>>> arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++++++++++++++++++ >>>>> 1 file changed, 22 insertions(+) >>>>> >>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi >>>>> index 570475040d95..b9b59c5223eb 100644 >>>>> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi >>>>> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi >>>>> @@ -2715,6 +2715,28 @@ aoss_qmp: power-controller@c300000 { >>>>> #clock-cells = <0>; >>>>> }; >>>>> >>>>> + spmi_bus: spmi@c42d000 { >>>> >>>> Hmm looks different than reg. >>>> >>>>> + compatible = "qcom,spmi-pmic-arb"; >>>>> + reg = <0 0x0c400000 0 0x00003000>, >>>>> + <0 0x0c500000 0 0x00400000>, >>>>> + <0 0x0c440000 0 0x00080000>, >>>>> + <0 0x0c4c0000 0 0x00010000>, >>>>> + <0 0x0c42d000 0 0x00010000>; >>>> x >>> Hm, my guess would be that Vinod chose to put the "cnfg" reg >>> instead of "core" in the unit address, as 8450 has 2 SPMI bus >>> hosts and they both share the core reg, so it would have been >>> impossible to have two spmi@core nodes.. >> >> Eh? SM8450 has 2 SPMI hosts both using 0x0c400000? How does that work? >> Usually address can be mapped only once. > No idea either! > >> >> Where is the second SPMI? I cannot find it in linux-next. > It's only there on downstream and I'm not sure how useful it is > really, only some debug subdevice is attached to it.. Perhaps > we could ignore its existence for now and I could use the core > reg in unit address for spmi0? I see it indeed in downstream. core, chnls and obsrvr IO are the same. There is quite of debug devices attached. There is a comment in PMIC arbiter code to use a IO mapping allowing simultaneous mappings, so this is actually valid. Anyway, DT expects unit address to match first reg, so if we want to have second PMIC, we need to change the order of reg entries. We can ignore this problem till we add second PMIC... Best regards, Krzysztof
On Thu, Dec 29, 2022 at 11:57:58AM +0100, Krzysztof Kozlowski wrote: > On 29/12/2022 11:45, Konrad Dybcio wrote: > > > > > > On 29.12.2022 11:42, Krzysztof Kozlowski wrote: > >> On 29/12/2022 11:32, Konrad Dybcio wrote: > >>> From: Vinod Koul <vkoul@kernel.org> > >>> > >>> Add the spmi bus as found in the SM8450 SoC > >>> > >>> Signed-off-by: Vinod Koul <vkoul@kernel.org> > >>> Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> > >>> [Konrad: 0x0 -> 0, move #cells down, make reg-names a vertical list] > >>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> > >>> --- > >>> v1 -> v2: > >>> No changes > >>> > >>> arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++++++++++++++++++ > >>> 1 file changed, 22 insertions(+) > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi > >>> index 570475040d95..b9b59c5223eb 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi > >>> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi > >>> @@ -2715,6 +2715,28 @@ aoss_qmp: power-controller@c300000 { > >>> #clock-cells = <0>; > >>> }; > >>> > >>> + spmi_bus: spmi@c42d000 { > >> > >> Hmm looks different than reg. > >> > >>> + compatible = "qcom,spmi-pmic-arb"; > >>> + reg = <0 0x0c400000 0 0x00003000>, > >>> + <0 0x0c500000 0 0x00400000>, > >>> + <0 0x0c440000 0 0x00080000>, > >>> + <0 0x0c4c0000 0 0x00010000>, > >>> + <0 0x0c42d000 0 0x00010000>; > >> x > > Hm, my guess would be that Vinod chose to put the "cnfg" reg > > instead of "core" in the unit address, as 8450 has 2 SPMI bus > > hosts and they both share the core reg, so it would have been > > impossible to have two spmi@core nodes.. > > Eh? SM8450 has 2 SPMI hosts both using 0x0c400000? How does that work? > Usually address can be mapped only once. > The SPMI controller does something like multi-master. The driver expects the same region to be mapped multiple times and qcom,channel is used to select which one each instance should operate on. Regards, Bjorn > Where is the second SPMI? I cannot find it in linux-next. > > > Best regards, > Krzysztof >
On 29-12-22, 10:12, Bjorn Andersson wrote: > On Thu, Dec 29, 2022 at 11:57:58AM +0100, Krzysztof Kozlowski wrote: > > On 29/12/2022 11:45, Konrad Dybcio wrote: > > > > > > > > > On 29.12.2022 11:42, Krzysztof Kozlowski wrote: > > >> On 29/12/2022 11:32, Konrad Dybcio wrote: > > >>> From: Vinod Koul <vkoul@kernel.org> > > >>> > > >>> Add the spmi bus as found in the SM8450 SoC > > >>> > > >>> Signed-off-by: Vinod Koul <vkoul@kernel.org> > > >>> Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org> > > >>> [Konrad: 0x0 -> 0, move #cells down, make reg-names a vertical list] > > >>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> > > >>> --- > > >>> v1 -> v2: > > >>> No changes > > >>> > > >>> arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++++++++++++++++++ > > >>> 1 file changed, 22 insertions(+) > > >>> > > >>> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi > > >>> index 570475040d95..b9b59c5223eb 100644 > > >>> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi > > >>> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi > > >>> @@ -2715,6 +2715,28 @@ aoss_qmp: power-controller@c300000 { > > >>> #clock-cells = <0>; > > >>> }; > > >>> > > >>> + spmi_bus: spmi@c42d000 { > > >> > > >> Hmm looks different than reg. > > >> > > >>> + compatible = "qcom,spmi-pmic-arb"; > > >>> + reg = <0 0x0c400000 0 0x00003000>, > > >>> + <0 0x0c500000 0 0x00400000>, > > >>> + <0 0x0c440000 0 0x00080000>, > > >>> + <0 0x0c4c0000 0 0x00010000>, > > >>> + <0 0x0c42d000 0 0x00010000>; > > >> x > > > Hm, my guess would be that Vinod chose to put the "cnfg" reg > > > instead of "core" in the unit address, as 8450 has 2 SPMI bus > > > hosts and they both share the core reg, so it would have been > > > impossible to have two spmi@core nodes.. > > > > Eh? SM8450 has 2 SPMI hosts both using 0x0c400000? How does that work? > > Usually address can be mapped only once. > > > > The SPMI controller does something like multi-master. The driver expects > the same region to be mapped multiple times and qcom,channel is used to > select which one each instance should operate on. Right, this one adds same as downstream. I agree in future we should revisit this and decide how we should model this. For now I am more inclined to get this piece closed, it been more than a year :-( lets not make it two!
On Thu, 29 Dec 2022 11:32:06 +0100, Konrad Dybcio wrote: > From: Vinod Koul <vkoul@kernel.org> > > Add the spmi bus as found in the SM8450 SoC > > Applied, thanks! [1/7] arm64: dts: qcom: sm8450: add spmi node commit: f891f86e47c3208986b0985ca1fbc94647ba2ad0 [2/7] arm64: dts: qcom: sm8450-nagara: Include PMIC DTSIs commit: 25deb75e99bc57a7860cef2688b032d0e2f979dc [3/7] arm64: dts: qcom: sm8450-nagara: Add GPIO line names for PMIC GPIOs commit: 4c5ab70d11ba591e28d4b07e50847084141c2374 [4/7] arm64: dts: qcom: sm8450-nagara: Add GPIO keys commit: 7b2557697890a947e178d4dc20848b479e384123 [5/7] arm64: dts: qcom: sm8450-nagara: Set up camera regulators commit: 40430a7c485b5463247b28691ad6a4fc5e280235 [6/7] arm64: dts: qcom: sm8450-nagara: Enable PMIC RESIN+PON commit: e9090691e48d2ceabec70448ac893637fbf0e27e [7/7] arm64: dts: qcom: sm8450-nagara: Configure SLG51000 PMIC commit: 0d89bfbcd6d4c2691f5d70b8f2938aeb7774e7f6 Best regards,
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 570475040d95..b9b59c5223eb 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -2715,6 +2715,28 @@ aoss_qmp: power-controller@c300000 { #clock-cells = <0>; }; + spmi_bus: spmi@c42d000 { + compatible = "qcom,spmi-pmic-arb"; + reg = <0 0x0c400000 0 0x00003000>, + <0 0x0c500000 0 0x00400000>, + <0 0x0c440000 0 0x00080000>, + <0 0x0c4c0000 0 0x00010000>, + <0 0x0c42d000 0 0x00010000>; + reg-names = "core", + "chnls", + "obsrvr", + "intr", + "cnfg"; + interrupt-names = "periph_irq"; + interrupts-extended = <&pdc 1 IRQ_TYPE_LEVEL_HIGH>; + qcom,ee = <0>; + qcom,channel = <0>; + interrupt-controller; + #interrupt-cells = <4>; + #address-cells = <2>; + #size-cells = <0>; + }; + ipcc: mailbox@ed18000 { compatible = "qcom,sm8450-ipcc", "qcom,ipcc"; reg = <0 0x0ed18000 0 0x1000>;