From patchwork Wed Apr 23 07:51:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 2075945 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=jJgexmis; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-rtc+bounces-3978-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ZjBGR72b6z1yMy for ; Wed, 23 Apr 2025 17:54:55 +1000 (AEST) Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6F1173B7901 for ; Wed, 23 Apr 2025 07:54:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9062B26F469; Wed, 23 Apr 2025 07:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jJgexmis" X-Original-To: linux-rtc@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4207E26D4FB; Wed, 23 Apr 2025 07:54:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745394841; cv=none; b=ADFLIyUa50bJ1UtgrbBSm6T6RLtR+H6UcSEaSA8OvewJ7MhCFy6b3tbVHFDmEgVbRZqM48pZof8X1in0X4kWdhXwaSRyXQo7XtrmzxW6l5GgHALul+9Bxb3HRyRlVI1sS87Uj8NqTlp30uBMa66LmQ0j3KoM8Y4Py2BalAGSBmA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745394841; c=relaxed/simple; bh=Ukky07QaiK/F5NoV7jqIANfFkmUJy5PKAuULzk2Aq+s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TEDUzoDQtnc21K6cKoPVDFF2a9SBREb+oaoIbV2h4tPYSeoUkb32rWEf8s1vBlJnnA0gcDRcn7YN05+FTWx0FdLhR2eGt41n+zzzqWuv8Pf9evcbkDBuCfK2jNd1i1KTdFJK2qqjOJal3ZUZnIqmsxRTykXNm7c6cuKOLLCDTDM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jJgexmis; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C13E1C4AF09; Wed, 23 Apr 2025 07:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745394840; bh=Ukky07QaiK/F5NoV7jqIANfFkmUJy5PKAuULzk2Aq+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jJgexmislfGDHY8SCZBzo52qn9W6DZqU50ME4zPgsTc151AE5OkQ3CvDAxEEYqDnK JUWww1MO8MMw+infSBZFnX4XOT07dDr11pRfTPuQJ7/+34pkYbgB8j31Dx+lsdby8S QcXkKQ446gHcPykLiuxRLTgLww7UncJQ4R/rBE8RjTBAvbnGVhcLs11eE7mrAJ6LuM uE6Yavch5ZbCFIuGg9NfWxTx3hbBDQ/yUhZxdpiY5tpEBaXgw/iCifw7jNkHLnzHyc sHlIzXRshIPD7iZi2xVSJ/Gq+N1Nz6Nia3ZpBdaPno5n1dEe9yegll1EI2MK2K8JWY EVF/xe5cLduYg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1u7Uvf-000000002xD-1Ysi; Wed, 23 Apr 2025 09:53:59 +0200 From: Johan Hovold To: Alexandre Belloni , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 1/4] dt-bindings: rtc: qcom-pm8xxx: add uefi-variable offset Date: Wed, 23 Apr 2025 09:51:40 +0200 Message-ID: <20250423075143.11157-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250423075143.11157-1-johan+linaro@kernel.org> References: <20250423075143.11157-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-rtc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. Add a 'qcom,uefi-rtc-info' boolean flag to indicate that the RTC offset is stored in a Qualcomm specific UEFI variable so that the OS can determine whether to wait for it to become available. The UEFI variable is 882f8c2b-9646-435f-8de5-f208ff80c1bd-RTCInfo and holds a 12-byte structure where the first four bytes is a GPS time offset in little-endian byte order. Link: https://lore.kernel.org/all/aAecIkgmTTlThKEZ@hovoldconsulting.com/ Signed-off-by: Johan Hovold Acked-by: Rob Herring (Arm) --- Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml b/Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml index 68ef3208c886..7497dc3ac5b2 100644 --- a/Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml +++ b/Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml @@ -55,6 +55,12 @@ properties: description: RTC alarm is not owned by the OS + qcom,uefi-rtc-info: + type: boolean + description: + RTC offset is stored as a four-byte GPS time offset in a 12-byte UEFI + variable 882f8c2b-9646-435f-8de5-f208ff80c1bd-RTCInfo + wakeup-source: true required: From patchwork Wed Apr 23 07:51:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 2075942 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=keRBghCG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-rtc+bounces-3976-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ZjBFy4P11z1yMm for ; Wed, 23 Apr 2025 17:54:30 +1000 (AEST) Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D0B5C1B62E05 for ; Wed, 23 Apr 2025 07:54:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A6B826F445; Wed, 23 Apr 2025 07:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="keRBghCG" X-Original-To: linux-rtc@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41EB726D4F5; Wed, 23 Apr 2025 07:54:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745394841; cv=none; b=CI7mn8NPysRBf8/TQXL8NnoffPIgTDcb0XMSajaBFSzOtbWRkDB0vePpM0dYcalLSdzOxFcXFjzdLMo1bac69ZcO0axf2pEiuSX7fHYUWff86nltPa+vDYWiqf6ic6tHaocK30zg01pk82vskhUbAmcbxwo2LBM+7wBiXfC9Nj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745394841; c=relaxed/simple; bh=zDte0/iXQpDSnWpaIOv5baQ9jRG/g3Ee05V6cmpgp+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eVxO0ooEXXzDtvhAHHiRSPcOLxNDAzq9Xpa1he6kbiPHZROEzk0w5EUUj54Vic5S7Ody3Jv9BL8L/PQwF4gR/dPUx7cogW2M7yRWRcjtxym6xf0plxFbZ55VedBdpUUpY+hjE3XJEbkbmr43qJVFVA9gvUW12m62fx3E2v5GMt0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=keRBghCG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF2E9C4CEEF; Wed, 23 Apr 2025 07:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745394840; bh=zDte0/iXQpDSnWpaIOv5baQ9jRG/g3Ee05V6cmpgp+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=keRBghCGdWmUHzXz0BO6ocH91FuuEBSS1x1hpBzecyLMYSfIXvkWntlx6DsrUiIVr hqWf6wlJvKjlROruVM2B5Ab7MsX2gp+kld7415IK6fxUoGJ6BqB5a6NF13PTKy1P7+ t265R0lg6BftcJJIveV3fw4Bd32RzagGEhGTNaVD5NPGnWCxqijZfcHgB0BZL/gxUO EHYsGgQnzbeOXE2TkrxjucinRGQJiSB+ytmidQU2gvZZdQI8wZIJJZZMaCqDGFDmqM o7IP/yu2/2I1jIKDFPaiOpahztGMP1uZSQrciUZcJwCpgKuJZ5m15MUiUaOI+yii9A 7hbR4gLuPNusA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1u7Uvf-000000002xF-1tA6; Wed, 23 Apr 2025 09:53:59 +0200 From: Johan Hovold To: Alexandre Belloni , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , Rob Clark Subject: [PATCH 2/4] rtc: pm8xxx: fix uefi offset lookup Date: Wed, 23 Apr 2025 09:51:41 +0200 Message-ID: <20250423075143.11157-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250423075143.11157-1-johan+linaro@kernel.org> References: <20250423075143.11157-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-rtc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 driver probes. Use the new 'qcom,uefi-rtc-info' property to determine whether to probe defer until the UEFI offset becomes available so that the offset can be used also when the RTC driver is built in or when a dependency of the UEFI variable driver is built as a module (e.g. the driver for the SCM interconnects). Fixes: bba38b874886 ("rtc: pm8xxx: add support for uefi offset") Reported-by: Rob Clark Link: https://lore.kernel.org/lkml/CAF6AEGsfke=x0p1b2-uNX6DuQfRyEjVbJaxTbVLDT2YvSkGJbg@mail.gmail.com/ Signed-off-by: Johan Hovold --- drivers/rtc/rtc-pm8xxx.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index 3c1dddcc81df..5da237e7b9b2 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -576,13 +576,20 @@ static int pm8xxx_rtc_probe_offset(struct pm8xxx_rtc *rtc_dd) } /* Use UEFI storage as fallback if available */ - if (efivar_is_available()) { - rc = pm8xxx_rtc_read_uefi_offset(rtc_dd); - if (rc == 0) - rtc_dd->use_uefi = true; + rtc_dd->use_uefi = of_property_read_bool(rtc_dd->dev->of_node, + "qcom,uefi-rtc-info"); + if (!rtc_dd->use_uefi) + return 0; + + if (!efivar_is_available()) { + if (IS_ENABLED(CONFIG_EFI)) + return -EPROBE_DEFER; + + dev_warn(rtc_dd->dev, "efivars not available\n"); + rtc_dd->use_uefi = false; } - return 0; + return pm8xxx_rtc_read_uefi_offset(rtc_dd); } static int pm8xxx_rtc_probe(struct platform_device *pdev) From patchwork Wed Apr 23 07:51:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 2075940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ODGa/Wv0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.199.223; helo=ny.mirrors.kernel.org; envelope-from=linux-rtc+bounces-3979-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ZjBFt58Hwz1yNL for ; Wed, 23 Apr 2025 17:54:26 +1000 (AEST) Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B5C05168D38 for ; Wed, 23 Apr 2025 07:54:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD93226FA55; Wed, 23 Apr 2025 07:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ODGa/Wv0" X-Original-To: linux-rtc@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7922026F444; Wed, 23 Apr 2025 07:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745394841; cv=none; b=b65t444dzbDreM9H8JEhVr0t2qUzSnHijl8BUdXDOs1VyQZFzXI3xbtvCJQrmDMsap2YHJoB1lsjbOIUr6fUz0RgW1/wKPwyaUdXNSVX5zA+ssZ4keBkyzwdWmuhU1aVnFDXWdPn2NFfk3N+NEfR8asBeh+/Y2EiY0q2wQh5utU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745394841; c=relaxed/simple; bh=wZmVIbw/lQthHIrwcOBgr2yuApg1OYgWGTelA61EH1M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nYP/cZgRyJ/+CTj2/RPWCe8qnwHQC27uoU7gUcfdnvsy/dxRqY9xRBPmemdpO+VBuvjiyIqrmvoHJ+C/IIFsQ69nv4a/GNkP7JZbTCeAIPeV6O3GwbcnRC4SOUpFdd5pI7qQbTVnsN+VMd5mpGq1jpzn4Rtn+igWM8lAardBFag= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ODGa/Wv0; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F4031C4CEF9; Wed, 23 Apr 2025 07:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745394841; bh=wZmVIbw/lQthHIrwcOBgr2yuApg1OYgWGTelA61EH1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ODGa/Wv0EW6YjAydX6uA/bH14EN8i4pWoMUtptnE/kGBA9stKEr9HSH0e/h1WIt5R +/vMRKsP6b1JP/BbQCp8BsvrKcwJ8BkejO6fkmmu4gtPNTZ41RIxbHB9NqK3mrYvpz W33YK/awH668yE99yI84SgHdr5x4QHwhS+eGqmSliVhZVOTxgKTrRDMdUCI57njzz9 Si3LD0xuygUSVBmbEkH10dxOP1rIISDg8eF+ohuXzxYhlOR1OeKgjfxSYe/2tT5keK qEj3viucpCdJirsII+oswJpGtDPlrkZyBM4H3xo9FdWgq9DeZwKHUhc25vhoNTO23L gbbSt0f6anfNw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1u7Uvf-000000002xH-2Def; Wed, 23 Apr 2025 09:53:59 +0200 From: Johan Hovold To: Alexandre Belloni , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 3/4] arm64: dts: qcom: sc8280xp-x13s: describe uefi rtc offset Date: Wed, 23 Apr 2025 09:51:42 +0200 Message-ID: <20250423075143.11157-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250423075143.11157-1-johan+linaro@kernel.org> References: <20250423075143.11157-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-rtc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. Fixes: 409803681a55 ("arm64: dts: qcom: sc8280xp-x13s: switch to uefi rtc offset") Signed-off-by: Johan Hovold --- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 8000254f4db5..66c39765225f 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -1090,6 +1090,8 @@ &pmk8280_pon_resin { }; &pmk8280_rtc { + qcom,uefi-rtc-info; + status = "okay"; }; From patchwork Wed Apr 23 07:51:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 2075938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Sqma4gES; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=linux-rtc+bounces-3977-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ZjBFm6gwSz1yMm for ; Wed, 23 Apr 2025 17:54:20 +1000 (AEST) Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E78E0168457 for ; Wed, 23 Apr 2025 07:54:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 858B526F464; Wed, 23 Apr 2025 07:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Sqma4gES" X-Original-To: linux-rtc@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41FA826D4F6; Wed, 23 Apr 2025 07:54:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745394841; cv=none; b=erY9ohq6X0s/74RiB34ehLJ1LxiEod1Z+doGzxUkZKU6MXZhmQmKBd19yRNHm59kWPOlJuxGE+KohrkNm56Pgn1SW/oh1SNmlTR6S5py7isgAL14CbiGeLhR0C8/l8vWBHoKlh8IA8mGl8hiQ9l5qi6fq3rE05zJrmxoWRJiD9s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745394841; c=relaxed/simple; bh=2vwphhkHgVALJXaVfVrnaAzNXFpIgz4zKU/4c4LyDyw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jpq47G/imumWu7L7wd6rsumeF50d9+Zf5WAeTGEkS2smDkmUwiuRhYtxHU69NpjE5xIGK3ohLEf3bgURRq78NzfaeMcHT3g1KNsmeFcuHUfpvQUY9vW63zVNQY+cFpnxnDnJEh6OEN82GBnFGk+0ILLIn2uFVZG4gyRb4Rx3MC0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Sqma4gES; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8877C4CEF0; Wed, 23 Apr 2025 07:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745394840; bh=2vwphhkHgVALJXaVfVrnaAzNXFpIgz4zKU/4c4LyDyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sqma4gESzk15tGVofga9Q03bD/qnLJvWwgHzFPFRbFECvaqnPkyP13kMy5nM1mmJ3 oOD9MpJrB++4qugTHey4jvkYCQH1W15K5ql0Tdmc4lpECDVtZBLO53pVBmJ0iGVQpu 4nKlb0Dd9P4RtRKJBRrIOI0VpaRJ6hh34mUFN9FcqAYgt5N4LsHXb2NLNjtpp/iN0a 60hEbLPgfc5G1qtly/MGHncmHqmVKtK7C764q40JV9OPyfRRmImW/3ZygXprE/+jew vD7nLtST/evy6Dp4+Bg2oDm3lsasr1xcJj8jmDYuOXdS8GJQacv4wOs01C2lN6VSSU F0JSWkg1JpEIg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1u7Uvf-000000002xJ-2Y45; Wed, 23 Apr 2025 09:53:59 +0200 From: Johan Hovold To: Alexandre Belloni , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 4/4] arm64: dts: qcom: x1e80100: describe uefi rtc offset Date: Wed, 23 Apr 2025 09:51:43 +0200 Message-ID: <20250423075143.11157-5-johan+linaro@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250423075143.11157-1-johan+linaro@kernel.org> References: <20250423075143.11157-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-rtc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. Fixes: b53c2c23d3c2 ("arm64: dts: qcom: x1e80100: enable rtc") Signed-off-by: Johan Hovold --- arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi index a59aa8e7642d..5a170238e74d 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi @@ -224,6 +224,7 @@ pmk8550_rtc: rtc@6100 { reg-names = "rtc", "alarm"; interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; qcom,no-alarm; /* alarm owned by ADSP */ + qcom,uefi-rtc-info; }; pmk8550_sdam_2: nvram@7100 {