All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp
@ 2021-09-29 22:38 Douglas Anderson
  2021-09-29 23:36 ` Matthias Kaehlcke
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Douglas Anderson @ 2021-09-29 22:38 UTC (permalink / raw)
  To: bjorn.andersson
  Cc: vkoul, mka, swboyd, skakit, Douglas Anderson, Andy Gross,
	Rob Herring, devicetree, linux-arm-msm, linux-kernel

The RTC on the pmk8350 is not useful on all boards. Some boards may
not provide backup power to the PMIC but might have another RTC on the
board that does have backup power. In this case it's better to not use
the RTC on the PMIC.

At the moment, the only boards that includes this PMIC are sc7280-idp
and sc7280-idp2. On sc7280-idp I'm not aware of any other RTCs, but
sc7280-idp2 has a Chrome OS EC on it and this is intended to provide
the RTC for the AP.

Let's do what we normally do for hardware that's not used by all
boards and set it to a default status of "disabled" and then enable it
on the boards that need it.

NOTE: for sc7280-idp it's _possible_ we might also want to add
`allow-set-time;`. That could be the subject of a future patch if it
is indeed true.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 arch/arm64/boot/dts/qcom/pmk8350.dtsi   | 1 +
 arch/arm64/boot/dts/qcom/sc7280-idp.dts | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
index 04fc2632a0b2..769f9726806f 100644
--- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi
@@ -59,6 +59,7 @@ pmk8350_rtc: rtc@6100 {
 			reg = <0x6100>, <0x6200>;
 			reg-names = "rtc", "alarm";
 			interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
+			status = "disabled";
 		};
 
 		pmk8350_gpios: gpio@b000 {
diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dts b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
index 64fc22aff33d..e11412bae738 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dts
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dts
@@ -61,6 +61,10 @@ &ipa {
 	modem-init;
 };
 
+&pmk8350_rtc {
+	status = "okay";
+};
+
 &pmk8350_vadc {
 	pmr735a_die_temp {
 		reg = <PMR735A_ADC7_DIE_TEMP>;
-- 
2.33.0.685.g46640cef36-goog


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp
  2021-09-29 22:38 [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp Douglas Anderson
@ 2021-09-29 23:36 ` Matthias Kaehlcke
  2021-09-30  0:03 ` Stephen Boyd
  2021-09-30  4:00 ` skakit
  2 siblings, 0 replies; 7+ messages in thread
From: Matthias Kaehlcke @ 2021-09-29 23:36 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: bjorn.andersson, vkoul, swboyd, skakit, Andy Gross, Rob Herring,
	devicetree, linux-arm-msm, linux-kernel

On Wed, Sep 29, 2021 at 03:38:14PM -0700, Douglas Anderson wrote:
> The RTC on the pmk8350 is not useful on all boards. Some boards may
> not provide backup power to the PMIC but might have another RTC on the
> board that does have backup power. In this case it's better to not use
> the RTC on the PMIC.
> 
> At the moment, the only boards that includes this PMIC are sc7280-idp
> and sc7280-idp2. On sc7280-idp I'm not aware of any other RTCs, but
> sc7280-idp2 has a Chrome OS EC on it and this is intended to provide
> the RTC for the AP.
> 
> Let's do what we normally do for hardware that's not used by all
> boards and set it to a default status of "disabled" and then enable it
> on the boards that need it.
> 
> NOTE: for sc7280-idp it's _possible_ we might also want to add
> `allow-set-time;`. That could be the subject of a future patch if it
> is indeed true.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp
  2021-09-29 22:38 [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp Douglas Anderson
  2021-09-29 23:36 ` Matthias Kaehlcke
@ 2021-09-30  0:03 ` Stephen Boyd
  2021-09-30  4:00 ` skakit
  2 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2021-09-30  0:03 UTC (permalink / raw)
  To: Douglas Anderson, bjorn.andersson
  Cc: vkoul, mka, skakit, Andy Gross, Rob Herring, devicetree,
	linux-arm-msm, linux-kernel

Quoting Douglas Anderson (2021-09-29 15:38:14)
> The RTC on the pmk8350 is not useful on all boards. Some boards may
> not provide backup power to the PMIC but might have another RTC on the
> board that does have backup power. In this case it's better to not use
> the RTC on the PMIC.
>
> At the moment, the only boards that includes this PMIC are sc7280-idp
> and sc7280-idp2. On sc7280-idp I'm not aware of any other RTCs, but
> sc7280-idp2 has a Chrome OS EC on it and this is intended to provide
> the RTC for the AP.
>
> Let's do what we normally do for hardware that's not used by all
> boards and set it to a default status of "disabled" and then enable it
> on the boards that need it.
>
> NOTE: for sc7280-idp it's _possible_ we might also want to add
> `allow-set-time;`. That could be the subject of a future patch if it
> is indeed true.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp
  2021-09-29 22:38 [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp Douglas Anderson
  2021-09-29 23:36 ` Matthias Kaehlcke
  2021-09-30  0:03 ` Stephen Boyd
@ 2021-09-30  4:00 ` skakit
  2021-10-18 21:45   ` Doug Anderson
  2 siblings, 1 reply; 7+ messages in thread
From: skakit @ 2021-09-30  4:00 UTC (permalink / raw)
  To: Douglas Anderson, bjorn.andersson
  Cc: vkoul, mka, swboyd, Andy Gross, Rob Herring, devicetree,
	linux-arm-msm, linux-kernel

On 2021-09-30 04:08, Douglas Anderson wrote:
> The RTC on the pmk8350 is not useful on all boards. Some boards may
> not provide backup power to the PMIC but might have another RTC on the
> board that does have backup power. In this case it's better to not use
> the RTC on the PMIC.
> 
> At the moment, the only boards that includes this PMIC are sc7280-idp
> and sc7280-idp2. On sc7280-idp I'm not aware of any other RTCs, but
> sc7280-idp2 has a Chrome OS EC on it and this is intended to provide
> the RTC for the AP.
> 
> Let's do what we normally do for hardware that's not used by all
> boards and set it to a default status of "disabled" and then enable it
> on the boards that need it.
> 
> NOTE: for sc7280-idp it's _possible_ we might also want to add
> `allow-set-time;`. That could be the subject of a future patch if it
> is indeed true.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 

Reviewed-by: Satya Priya <skakit@codeaurora.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp
  2021-09-30  4:00 ` skakit
@ 2021-10-18 21:45   ` Doug Anderson
  2021-10-24  3:54     ` Bjorn Andersson
  0 siblings, 1 reply; 7+ messages in thread
From: Doug Anderson @ 2021-10-18 21:45 UTC (permalink / raw)
  To: satya priya
  Cc: Bjorn Andersson, Vinod Koul, Matthias Kaehlcke, Stephen Boyd,
	Andy Gross, Rob Herring,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-msm, LKML

Bjorn,

On Wed, Sep 29, 2021 at 9:00 PM <skakit@codeaurora.org> wrote:
>
> On 2021-09-30 04:08, Douglas Anderson wrote:
> > The RTC on the pmk8350 is not useful on all boards. Some boards may
> > not provide backup power to the PMIC but might have another RTC on the
> > board that does have backup power. In this case it's better to not use
> > the RTC on the PMIC.
> >
> > At the moment, the only boards that includes this PMIC are sc7280-idp
> > and sc7280-idp2. On sc7280-idp I'm not aware of any other RTCs, but
> > sc7280-idp2 has a Chrome OS EC on it and this is intended to provide
> > the RTC for the AP.
> >
> > Let's do what we normally do for hardware that's not used by all
> > boards and set it to a default status of "disabled" and then enable it
> > on the boards that need it.
> >
> > NOTE: for sc7280-idp it's _possible_ we might also want to add
> > `allow-set-time;`. That could be the subject of a future patch if it
> > is indeed true.
> >
> > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > ---
> >
>
> Reviewed-by: Satya Priya <skakit@codeaurora.org>

If you're still accepting patches for 5.16, it'd be keen if you'd
consider taking this one. Thanks!

-Doug

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp
  2021-10-18 21:45   ` Doug Anderson
@ 2021-10-24  3:54     ` Bjorn Andersson
  2021-10-27 23:13       ` Doug Anderson
  0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Andersson @ 2021-10-24  3:54 UTC (permalink / raw)
  To: Doug Anderson
  Cc: satya priya, Vinod Koul, Matthias Kaehlcke, Stephen Boyd,
	Andy Gross, Rob Herring,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-msm, LKML

On Mon 18 Oct 16:45 CDT 2021, Doug Anderson wrote:

> Bjorn,
> 
> On Wed, Sep 29, 2021 at 9:00 PM <skakit@codeaurora.org> wrote:
> >
> > On 2021-09-30 04:08, Douglas Anderson wrote:
> > > The RTC on the pmk8350 is not useful on all boards. Some boards may
> > > not provide backup power to the PMIC but might have another RTC on the
> > > board that does have backup power. In this case it's better to not use
> > > the RTC on the PMIC.
> > >
> > > At the moment, the only boards that includes this PMIC are sc7280-idp
> > > and sc7280-idp2. On sc7280-idp I'm not aware of any other RTCs, but
> > > sc7280-idp2 has a Chrome OS EC on it and this is intended to provide
> > > the RTC for the AP.
> > >
> > > Let's do what we normally do for hardware that's not used by all
> > > boards and set it to a default status of "disabled" and then enable it
> > > on the boards that need it.
> > >
> > > NOTE: for sc7280-idp it's _possible_ we might also want to add
> > > `allow-set-time;`. That could be the subject of a future patch if it
> > > is indeed true.
> > >
> > > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > > ---
> > >
> >
> > Reviewed-by: Satya Priya <skakit@codeaurora.org>
> 
> If you're still accepting patches for 5.16, it'd be keen if you'd
> consider taking this one. Thanks!
> 

I've picked the patch and hope to get it included in v5.16.

I do however not understand why the commit message so clearly defines
that the only device including pmk8350 is the sc7280 idp when the
sm8350-mtp.dts contains the following line:

#include "pmk8350.dtsi"


Perhaps I'm missing something obvious, but I took the liberty of also
enabling the RTC in the SM8350 MTP.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp
  2021-10-24  3:54     ` Bjorn Andersson
@ 2021-10-27 23:13       ` Doug Anderson
  0 siblings, 0 replies; 7+ messages in thread
From: Doug Anderson @ 2021-10-27 23:13 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: satya priya, Vinod Koul, Matthias Kaehlcke, Stephen Boyd,
	Andy Gross, Rob Herring,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-msm, LKML

Hi,

On Sat, Oct 23, 2021 at 8:54 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Mon 18 Oct 16:45 CDT 2021, Doug Anderson wrote:
>
> > Bjorn,
> >
> > On Wed, Sep 29, 2021 at 9:00 PM <skakit@codeaurora.org> wrote:
> > >
> > > On 2021-09-30 04:08, Douglas Anderson wrote:
> > > > The RTC on the pmk8350 is not useful on all boards. Some boards may
> > > > not provide backup power to the PMIC but might have another RTC on the
> > > > board that does have backup power. In this case it's better to not use
> > > > the RTC on the PMIC.
> > > >
> > > > At the moment, the only boards that includes this PMIC are sc7280-idp
> > > > and sc7280-idp2. On sc7280-idp I'm not aware of any other RTCs, but
> > > > sc7280-idp2 has a Chrome OS EC on it and this is intended to provide
> > > > the RTC for the AP.
> > > >
> > > > Let's do what we normally do for hardware that's not used by all
> > > > boards and set it to a default status of "disabled" and then enable it
> > > > on the boards that need it.
> > > >
> > > > NOTE: for sc7280-idp it's _possible_ we might also want to add
> > > > `allow-set-time;`. That could be the subject of a future patch if it
> > > > is indeed true.
> > > >
> > > > Signed-off-by: Douglas Anderson <dianders@chromium.org>
> > > > ---
> > > >
> > >
> > > Reviewed-by: Satya Priya <skakit@codeaurora.org>
> >
> > If you're still accepting patches for 5.16, it'd be keen if you'd
> > consider taking this one. Thanks!
> >
>
> I've picked the patch and hope to get it included in v5.16.
>
> I do however not understand why the commit message so clearly defines
> that the only device including pmk8350 is the sc7280 idp when the
> sm8350-mtp.dts contains the following line:
>
> #include "pmk8350.dtsi"
>
>
> Perhaps I'm missing something obvious, but I took the liberty of also
> enabling the RTC in the SM8350 MTP.

Thank you for fixing this up. I must have just glazed over that part
of things. :( Glad you caught and fixed it.

-Doug

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-27 23:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 22:38 [PATCH] arm64: dts: qcom: pmk8350: Make RTC disabled by default; enable on sc7280-idp Douglas Anderson
2021-09-29 23:36 ` Matthias Kaehlcke
2021-09-30  0:03 ` Stephen Boyd
2021-09-30  4:00 ` skakit
2021-10-18 21:45   ` Doug Anderson
2021-10-24  3:54     ` Bjorn Andersson
2021-10-27 23:13       ` Doug Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.