From patchwork Thu Jan 26 14:20:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 48713 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp296736wrn; Thu, 26 Jan 2023 06:24:27 -0800 (PST) X-Google-Smtp-Source: AK7set/jkg+mv74YHKEFFNG1YR5Y8U/M8clueELJePLtKB0CmgNf5Zi1Adn4ycSI9QlJLxoLCm/c X-Received: by 2002:a50:ee95:0:b0:4a0:b70f:95b2 with SMTP id f21-20020a50ee95000000b004a0b70f95b2mr3997267edr.13.1674743067201; Thu, 26 Jan 2023 06:24:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674743067; cv=none; d=google.com; s=arc-20160816; b=j93f5NnkxxGpdExhkkR92D9UPrdYDMzlMOkK8VdRNctFkGJkhYv4UN4OTVIEqyS1U4 dn743P3UTxvW9PYx+E4XMPg12EC79IFE5Eefy75HHbod0wQ+oh1plBSZ2YP0RSJr/sVW HPA+BitNiSd0lKRXrjO9IgWsIiIFaGoWXtVtlO8mnuv3xTo/2d/UJ3Dyd5f8q09mh2n/ 7SXLVeMVMMmxMmONB6A9IyjaqBk+bbXYXPtTFWI93K/vtecv7cVA7bXPqnioMsVKGdM8 1YEQkr5xM0BFjrQIkz+2wG60Ub1bJdsXFBBkAS2VncEjT0W5iroECm+Ord9OqDMuiLIc vK+A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5iOSugU4J1aatxBtIWlOok20Z3UHw0KrifYoS1+fzyA=; b=JGKOvAGzdbRJtdfh9CG4On5qIRetQJnICWOJU95hNLNlncB1eK0Fl2pJeqB+NyrkU0 +vX5/rxDvqKzxMCnkOwTGBFka1TvVtD34HBElxZiZdiIHHiCi7rNFEs7t7evoPYEQlLL 3b7fTUZbDRt6Kh0WyiaPGDRTdOOYi/Y/OsuSEnuI+umm+hk2/ZH38+4XvCh8xPXUoA5d S1OJGr7el1sXXRkBVc7mLa3VyMpdWg3CgfAiN5ugr7I9Jv478Uy44zrCJAsFFWeLCu38 JQVUAlAvFLyNuHjfyvPoFX+ebP+I6V8rLmeX1qs6k22N46eQZw2Et2xj9czBH+Sj1SvP 2iPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eHPvLL5B; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h30-20020a0564020e9e00b004a0ac03019bsi1716732eda.141.2023.01.26.06.24.03; Thu, 26 Jan 2023 06:24:27 -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=@kernel.org header.s=k20201202 header.b=eHPvLL5B; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232063AbjAZOXQ (ORCPT + 99 others); Thu, 26 Jan 2023 09:23:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231856AbjAZOXB (ORCPT ); Thu, 26 Jan 2023 09:23:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CF7A17166; Thu, 26 Jan 2023 06:23:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 23D026184D; Thu, 26 Jan 2023 14:22:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8139C43615; Thu, 26 Jan 2023 14:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674742978; bh=kGIY8BsCOcAUuz4rUJvWx7AsZas3uSRgZ9e8CL6ualY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eHPvLL5BRkmGEBfeV0iCFJ3m0Iy4byK3gJD3+Hddcma5Ep/xVtAEUO/0qwXqvwaZo magytMcxv9mNvnSd6TFYB/fxbtTjvpzjN7hlSsA+jo6yO+LDjYDhlonTkaZfVWI3Dx wpeYT2zFfGcjZOeCcIZbT7vWFYKz4ghVcEcnSPHJhHXKTtSeW7WVpjQkaXwJ53xPhb fwr8m7ENW8IdVTy6XQxMcZFZgC89DcB1mD2k1SIXAVFHajUm0B81w+NjoOxvyIaHcD 1qnfPvntsA3zL2SnMDHS+c0HKZFIGTtSQ6m+WFdVVXE4yLWLUW2H+QGAhXhD++AmOl MHSYrWJ2zBi0A== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pL39d-0006j1-Hw; Thu, 26 Jan 2023 15:23:05 +0100 From: Johan Hovold To: Alexandre Belloni , Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Alessandro Zummo , Rob Herring , Krzysztof Kozlowski , Maximilian Luz , linux-arm-msm@vger.kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [RFC 18/24] dt-bindings: rtc: qcom-pm8xxx: add uefi-variable offset Date: Thu, 26 Jan 2023 15:20:51 +0100 Message-Id: <20230126142057.25715-19-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230126142057.25715-1-johan+linaro@kernel.org> References: <20230126142057.25715-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756095386558766437?= X-GMAIL-MSGID: =?utf-8?q?1756095386558766437?= 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. Add a 'qcom,uefi-rtc-info' boolean flag which indicates that the RTC offset is stored in a Qualcomm specific UEFI variable so that the RTC time can be updated on such platforms. 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. Signed-off-by: Johan Hovold --- 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 b95a69cc9ae0..774c34c3f8f6 100644 --- a/Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml +++ b/Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml @@ -50,6 +50,12 @@ properties: items: - const: offset + 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: