public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sc8280xp-blackrock: switch to uefi rtc offset
@ 2025-01-22  6:41 Jens Glathe via B4 Relay
  2025-01-23 15:57 ` Rob Herring (Arm)
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jens Glathe via B4 Relay @ 2025-01-22  6:41 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Johan Hovold,
	Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

On many Qualcomm platforms the PMIC RTC control and time registers are
read-only so that the RTC time can not be updated. Instead an offset
needs be stored in some machine-specific non-volatile memory, which a
driver can take into account.

Switch to using the Qualcomm specific UEFI variable that is used by the
UEFI firmware (and Windows) to store the RTC offset.

This specifically means that the RTC time will be synchronised between
the UEFI firmware setup (or UEFI shell), Windows and Linux.

Note however that Windows stores the RTC time in local time by default,
while Linux typically uses UTC (i.e. as on X86).

Based on a patch by Johan Hovold. [1]

Link: https://lore.kernel.org/all/20250120144152.11949-7-johan+linaro@kernel.org/ # [1]
Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
This is a patch to switch the Windows Dev Kit 2023 over to
using the UEFI offset.
---
 arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts
index fa9d941050522..aaea2fa3c6c0a 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts
@@ -762,20 +762,11 @@ &pmk8280_pon_resin {
 };
 
 &pmk8280_rtc {
-	nvmem-cells = <&rtc_offset>;
-	nvmem-cell-names = "offset";
+	qcom,uefi-rtc-info;
 
 	status = "okay";
 };
 
-&pmk8280_sdam_6 {
-	status = "okay";
-
-	rtc_offset: rtc-offset@bc {
-		reg = <0xbc 0x4>;
-	};
-};
-
 &pmk8280_vadc {
 	channel@144 {
 		reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;

---
base-commit: 232f121837ad8b1c21cc80f2c8842a4090c5a2a0
change-id: 20250120-jg-blackrock-rtc-b4917e6bce94

Best regards,
-- 
Jens Glathe <jens.glathe@oldschoolsolutions.biz>



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

* Re: [PATCH] arm64: dts: qcom: sc8280xp-blackrock: switch to uefi rtc offset
  2025-01-22  6:41 Jens Glathe via B4 Relay
@ 2025-01-23 15:57 ` Rob Herring (Arm)
  2025-01-27 10:24 ` Konrad Dybcio
  2025-02-28  7:48 ` Johan Hovold
  2 siblings, 0 replies; 6+ messages in thread
From: Rob Herring (Arm) @ 2025-01-23 15:57 UTC (permalink / raw)
  To: Jens Glathe
  Cc: Conor Dooley, devicetree, Konrad Dybcio, Bjorn Andersson,
	Krzysztof Kozlowski, linux-kernel, linux-arm-msm, Johan Hovold


On Wed, 22 Jan 2025 07:41:56 +0100, Jens Glathe wrote:
> On many Qualcomm platforms the PMIC RTC control and time registers are
> read-only so that the RTC time can not be updated. Instead an offset
> needs be stored in some machine-specific non-volatile memory, which a
> driver can take into account.
> 
> Switch to using the Qualcomm specific UEFI variable that is used by the
> UEFI firmware (and Windows) to store the RTC offset.
> 
> This specifically means that the RTC time will be synchronised between
> the UEFI firmware setup (or UEFI shell), Windows and Linux.
> 
> Note however that Windows stores the RTC time in local time by default,
> while Linux typically uses UTC (i.e. as on X86).
> 
> Based on a patch by Johan Hovold. [1]
> 
> Link: https://lore.kernel.org/all/20250120144152.11949-7-johan+linaro@kernel.org/ # [1]
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> ---
> This is a patch to switch the Windows Dev Kit 2023 over to
> using the UEFI offset.
> ---
>  arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/qcom/' for 20250122-jg-blackrock-rtc-v1-1-3b05cd85bdfa@oldschoolsolutions.biz:

arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dtb: pmic@0: rtc@6100: 'qcom,uefi-rtc-info' does not match any of the regexes: 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml#
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dtb: rtc@6100: 'qcom,uefi-rtc-info' does not match any of the regexes: 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/rtc/qcom-pm8xxx-rtc.yaml#






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

* Re: [PATCH] arm64: dts: qcom: sc8280xp-blackrock: switch to uefi rtc offset
  2025-01-22  6:41 Jens Glathe via B4 Relay
  2025-01-23 15:57 ` Rob Herring (Arm)
@ 2025-01-27 10:24 ` Konrad Dybcio
  2025-02-28  7:48 ` Johan Hovold
  2 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2025-01-27 10:24 UTC (permalink / raw)
  To: jens.glathe, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Johan Hovold

On 22.01.2025 7:41 AM, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> 
> On many Qualcomm platforms the PMIC RTC control and time registers are
> read-only so that the RTC time can not be updated. Instead an offset
> needs be stored in some machine-specific non-volatile memory, which a
> driver can take into account.
> 
> Switch to using the Qualcomm specific UEFI variable that is used by the
> UEFI firmware (and Windows) to store the RTC offset.
> 
> This specifically means that the RTC time will be synchronised between
> the UEFI firmware setup (or UEFI shell), Windows and Linux.
> 
> Note however that Windows stores the RTC time in local time by default,
> while Linux typically uses UTC (i.e. as on X86).
> 
> Based on a patch by Johan Hovold. [1]
> 
> Link: https://lore.kernel.org/all/20250120144152.11949-7-johan+linaro@kernel.org/ # [1]
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH] arm64: dts: qcom: sc8280xp-blackrock: switch to uefi rtc offset
  2025-01-22  6:41 Jens Glathe via B4 Relay
  2025-01-23 15:57 ` Rob Herring (Arm)
  2025-01-27 10:24 ` Konrad Dybcio
@ 2025-02-28  7:48 ` Johan Hovold
  2 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2025-02-28  7:48 UTC (permalink / raw)
  To: jens.glathe
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

Hi Jens,

On Wed, Jan 22, 2025 at 07:41:56AM +0100, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> 
> On many Qualcomm platforms the PMIC RTC control and time registers are
> read-only so that the RTC time can not be updated. Instead an offset
> needs be stored in some machine-specific non-volatile memory, which a
> driver can take into account.
> 
> Switch to using the Qualcomm specific UEFI variable that is used by the
> UEFI firmware (and Windows) to store the RTC offset.
> 
> This specifically means that the RTC time will be synchronised between
> the UEFI firmware setup (or UEFI shell), Windows and Linux.
> 
> Note however that Windows stores the RTC time in local time by default,
> while Linux typically uses UTC (i.e. as on X86).
> 
> Based on a patch by Johan Hovold. [1]
> 
> Link: https://lore.kernel.org/all/20250120144152.11949-7-johan+linaro@kernel.org/ # [1]
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> ---
> This is a patch to switch the Windows Dev Kit 2023 over to
> using the UEFI offset.

Please try to avoid posting patches before their dependencies have been
merged, but at least mention any such dependencies in the cover letter
(or here under the --- line).

The series this patch depends on has now been superseded with a v2
dropping the DT property so this one will also need a respin once the
driver changes have been merged:

	https://lore.kernel.org/all/20250219134118.31017-1-johan+linaro@kernel.org/

Johan

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

* [PATCH] arm64: dts: qcom: sc8280xp-blackrock: switch to uefi rtc offset
@ 2026-05-01  9:11 Jens Glathe via B4 Relay
  2026-05-04  8:04 ` Konrad Dybcio
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Glathe via B4 Relay @ 2026-05-01  9:11 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Johan Hovold,
	Jens Glathe

From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

On many Qualcomm platforms the PMIC RTC control and time registers are
read-only so that the RTC time can not be updated. Instead an offset
needs be stored in some machine-specific non-volatile memory, which a
driver can take into account.

On platforms where the offset is stored in a Qualcomm specific UEFI
variable the variables are also accessed in a non-standard way, which
means that the OS cannot assume that the variable service is available
by the time the RTC driver probes.

Use the new 'qcom,uefi-rtc-info' property to indicate that the offset is
stored in a UEFI variable so that the OS can determine whether to wait
for it to become available.

[1]: https://lore.kernel.org/r/20250423075143.11157-4-johan+linaro@kernel.org

Fixes: 16a7fed11714 ("arm64: dts: qcom: sc8280xp-blackrock: dt definition for WDK2023")

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
This is the first of a small series of incremental updates for the
Microsoft Windows Dev Kit 2023 (sc8280xp-blackrock / Project Volterra).

Subsequent patches will address:
  - USB-C DP altmode support on the rear port (USB0)
  - Audio on all three DisplayPort-capable connectors
  - A few other cleanups cherry-picked from the Lenovo X13s

The goal is to keep changes small and reviewable.

base-commit: b9303e6bff706758c167af686b5315ad00233bf8
---
 arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts
index 00bbeeef6f14dd89de506e33742f8f73435ac021..3dc3d7ae928d0a509c564a32908e33f5ca934c98 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts
@@ -763,20 +763,11 @@ &pmk8280_pon_resin {
 };
 
 &pmk8280_rtc {
-	nvmem-cells = <&rtc_offset>;
-	nvmem-cell-names = "offset";
+	qcom,uefi-rtc-info;
 
 	status = "okay";
 };
 
-&pmk8280_sdam_6 {
-	status = "okay";
-
-	rtc_offset: rtc-offset@bc {
-		reg = <0xbc 0x4>;
-	};
-};
-
 &pmk8280_vadc {
 	channel@144 {
 		reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;

---
base-commit: b9303e6bff706758c167af686b5315ad00233bf8
change-id: 20260501-blackrock-rtc-2efe7ae9ae64

Best regards,
-- 
Jens Glathe <jens.glathe@oldschoolsolutions.biz>



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

* Re: [PATCH] arm64: dts: qcom: sc8280xp-blackrock: switch to uefi rtc offset
  2026-05-01  9:11 [PATCH] arm64: dts: qcom: sc8280xp-blackrock: switch to uefi rtc offset Jens Glathe via B4 Relay
@ 2026-05-04  8:04 ` Konrad Dybcio
  0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-05-04  8:04 UTC (permalink / raw)
  To: jens.glathe, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Johan Hovold

On 5/1/26 11:11 AM, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> 
> On many Qualcomm platforms the PMIC RTC control and time registers are
> read-only so that the RTC time can not be updated. Instead an offset
> needs be stored in some machine-specific non-volatile memory, which a
> driver can take into account.
> 
> On platforms where the offset is stored in a Qualcomm specific UEFI
> variable the variables are also accessed in a non-standard way, which
> means that the OS cannot assume that the variable service is available
> by the time the RTC driver probes.
> 
> Use the new 'qcom,uefi-rtc-info' property to indicate that the offset is
> stored in a UEFI variable so that the OS can determine whether to wait
> for it to become available.
> 
> [1]: https://lore.kernel.org/r/20250423075143.11157-4-johan+linaro@kernel.org
> 
> Fixes: 16a7fed11714 ("arm64: dts: qcom: sc8280xp-blackrock: dt definition for WDK2023")
> 
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

end of thread, other threads:[~2026-05-04  8:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01  9:11 [PATCH] arm64: dts: qcom: sc8280xp-blackrock: switch to uefi rtc offset Jens Glathe via B4 Relay
2026-05-04  8:04 ` Konrad Dybcio
  -- strict thread matches above, loose matches on Subject: below --
2025-01-22  6:41 Jens Glathe via B4 Relay
2025-01-23 15:57 ` Rob Herring (Arm)
2025-01-27 10:24 ` Konrad Dybcio
2025-02-28  7:48 ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox