[PATCH v3 0/5] x1e80100 RTC support

Jonathan Marek posted 5 patches 1 year, 3 months ago
.../bindings/rtc/qcom-pm8xxx-rtc.yaml         |  5 +++
.../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 11 +++++
arch/arm64/boot/dts/qcom/x1e80100-crd.dts     | 11 +++++
arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi  |  3 +-
drivers/rtc/rtc-pm8xxx.c                      | 44 +++++++++++++------
5 files changed, 58 insertions(+), 16 deletions(-)
[PATCH v3 0/5] x1e80100 RTC support
Posted by Jonathan Marek 1 year, 3 months ago
x1e80100 needs a workaround because the RTC alarm is not owned by HLOS.
It also needs the same offset workaround as sc8280xp/etc.

v2: remove duplicated ops and use RTC_FEATURE_ALARM instead
v3:
 - renamed flag to qcom,no-alarm
 - don't remove alarm registers/interrupt from dts

Jonathan Marek (5):
  rtc: pm8xxx: implement qcom,no-alarm flag for non-HLOS owned alarm
  dt-bindings: rtc: qcom-pm8xxx: document qcom,no-alarm flag
  arm64: dts: qcom: x1e80100-pmics: enable RTC
  arm64: dts: qcom: x1e80100-crd: add rtc offset to set rtc time
  arm64: dts: qcom: x1e78100-t14s: add rtc offset to set rtc time

 .../bindings/rtc/qcom-pm8xxx-rtc.yaml         |  5 +++
 .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 11 +++++
 arch/arm64/boot/dts/qcom/x1e80100-crd.dts     | 11 +++++
 arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi  |  3 +-
 drivers/rtc/rtc-pm8xxx.c                      | 44 +++++++++++++------
 5 files changed, 58 insertions(+), 16 deletions(-)

-- 
2.45.1
Re: [PATCH v3 0/5] x1e80100 RTC support
Posted by Alexandre Belloni 1 year ago
Hello,

Did I miss v4 of this series?

On 14/10/2024 20:47:25-0400, Jonathan Marek wrote:
> x1e80100 needs a workaround because the RTC alarm is not owned by HLOS.
> It also needs the same offset workaround as sc8280xp/etc.
> 
> v2: remove duplicated ops and use RTC_FEATURE_ALARM instead
> v3:
>  - renamed flag to qcom,no-alarm
>  - don't remove alarm registers/interrupt from dts
> 
> Jonathan Marek (5):
>   rtc: pm8xxx: implement qcom,no-alarm flag for non-HLOS owned alarm
>   dt-bindings: rtc: qcom-pm8xxx: document qcom,no-alarm flag
>   arm64: dts: qcom: x1e80100-pmics: enable RTC
>   arm64: dts: qcom: x1e80100-crd: add rtc offset to set rtc time
>   arm64: dts: qcom: x1e78100-t14s: add rtc offset to set rtc time
> 
>  .../bindings/rtc/qcom-pm8xxx-rtc.yaml         |  5 +++
>  .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 11 +++++
>  arch/arm64/boot/dts/qcom/x1e80100-crd.dts     | 11 +++++
>  arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi  |  3 +-
>  drivers/rtc/rtc-pm8xxx.c                      | 44 +++++++++++++------
>  5 files changed, 58 insertions(+), 16 deletions(-)
> 
> -- 
> 2.45.1
> 
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Re: [PATCH v3 0/5] x1e80100 RTC support
Posted by Johan Hovold 1 year ago
Hi Alexandre and Jonathan,

On Mon, Jan 13, 2025 at 12:35:38AM +0100, Alexandre Belloni wrote:
> Did I miss v4 of this series?

We are still waiting for Qualcomm to provide a free and safe-to-use
allocation for the RTC offset in the PMIC.

I got tired of reminding the Qualcomm folks about this and instead
revived my patches for using the UEFI variable that the firmware (and
Windows) use for the offset.

I included Jonathan's v3 series after making the changes that we
discussed here (and a few more).

The result is here:

	https://lore.kernel.org/lkml/20250120144152.11949-1-johan+linaro@kernel.org/

and should allow us to enable the RTC on X1E today (and also avoids
running into the same SDAM allocation issue for the next platform).

> On 14/10/2024 20:47:25-0400, Jonathan Marek wrote:
> > x1e80100 needs a workaround because the RTC alarm is not owned by HLOS.
> > It also needs the same offset workaround as sc8280xp/etc.
> > 
> > v2: remove duplicated ops and use RTC_FEATURE_ALARM instead
> > v3:
> >  - renamed flag to qcom,no-alarm
> >  - don't remove alarm registers/interrupt from dts
> > 
> > Jonathan Marek (5):
> >   rtc: pm8xxx: implement qcom,no-alarm flag for non-HLOS owned alarm
> >   dt-bindings: rtc: qcom-pm8xxx: document qcom,no-alarm flag
> >   arm64: dts: qcom: x1e80100-pmics: enable RTC
> >   arm64: dts: qcom: x1e80100-crd: add rtc offset to set rtc time
> >   arm64: dts: qcom: x1e78100-t14s: add rtc offset to set rtc time

Johan