Message ID | 20221230085010.717423-1-abel.vesa@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2798861wrt; Fri, 30 Dec 2022 01:04:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXvRokpGmvogxlEDYu+TBSBsAON6aUPQdWXQB2mOiYJG6UAQr4YFj9/DSwDeNXvLJQN/+wJE X-Received: by 2002:a17:902:d052:b0:192:5950:656c with SMTP id l18-20020a170902d05200b001925950656cmr24972074pll.37.1672391052154; Fri, 30 Dec 2022 01:04:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672391052; cv=none; d=google.com; s=arc-20160816; b=jV7XHyYk1o56pcb0W16SNQ+cmdVSV1NHlwUn3Eqk7N3Y55HwkZW9hO9r3x4ebaVIAw 2SG2iM0HcIGpYMx6dlOQE6hPbbWGdm6vsDOGrVwrRis8Zcloy0wsnZfy972lF3GZLZua JRKcSOJhFbRMILWqNShm5A5/vOhiooBpvFHzw0zLRWkL8WT8PCjOvq/kMklUCgPe18e7 dupiT19ntHyDFjsHbYIvgZgFActfaaWutn4tGyE+2bsGQc2np0WshHZQ4qYG7wmYv3K/ sEsxa1qZBp4sWBDHNrOTWXaBDr9wl/a2l+ZciFtODYiXX/B9PxJ55CpGI2mUBID8g/qA AzKA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=GN2FSEX7eS4zfNg7tbkbHXZHA7GmeTgA/fVSW3xN/JY=; b=LpAtM8NTvZXr32o+bFBpN/owqmbaV0WjIWXcSWl3Zs+CprEeX1E2kbB8cTq6gNpQ/o 0GxF+vEpkIhzgcJK0W0cPynWQ7x1s3dbU8A5KbN1oGao+zkQxYkf6u69A23grtbCxBfK cgIMUWD19vm3M7xJR8wns3pjnUPRMtq8J+Mh3zuKzEs2oo89E5kkSaf4I8/RV5ILDnhE nrvvwaJdBfQOIKQi4FmbtE8gxajQxFyPsYCYFyYs43PFsn0IkLFv1BRovfRu6j9vBdnC idGSDboZEMz/YwC+Ci4T7lUtcxVMITDUTbbVAGY3JeyBPTd3fYjnBoygrhcsAJ18k2sM qvGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hVm2wH14; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3-20020a170902ecc300b00189697e2433si23801298plh.537.2022.12.30.01.03.59; Fri, 30 Dec 2022 01:04:12 -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=@linaro.org header.s=google header.b=hVm2wH14; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233908AbiL3IuU (ORCPT <rfc822;cscallsign@gmail.com> + 99 others); Fri, 30 Dec 2022 03:50:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbiL3IuT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 30 Dec 2022 03:50:19 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D52D192B4 for <linux-kernel@vger.kernel.org>; Fri, 30 Dec 2022 00:50:16 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id k22-20020a05600c1c9600b003d1ee3a6289so14772139wms.2 for <linux-kernel@vger.kernel.org>; Fri, 30 Dec 2022 00:50:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GN2FSEX7eS4zfNg7tbkbHXZHA7GmeTgA/fVSW3xN/JY=; b=hVm2wH14FZTtEwXm/Y6uEwnchiXQVfFIyb4+gn2gPUnXsnuk2ntRajXqkWTr38OFOf pdxZHzWZDFLL5hYdHkgNYun4k+6to9KqUCmA+nwkZTyfgIph/rYHk16jAxfsAXNvlXK1 2znQxZ+uqXlC4CDjepUnB6fz4EPYqaNyOd/6at+YTh6k6VJA2HMV4i+B95mLDcNjLehM VR3fV3H/jUO+/Jst5krZ9Rxrrx1sH1baoU4ayufSAzWm82KO8NbjiyZIXyjyoqCfKb4l Myh2nPZVWRu33iKH3vdr1ZttJnp1iRilCKoZCivap6YQ/dUQhZCG759S0zotI1TKOH2M vkqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GN2FSEX7eS4zfNg7tbkbHXZHA7GmeTgA/fVSW3xN/JY=; b=6v3KNIck3g2GIv7494sKzu2fBODPgpaJGxtIzAb9YiTPMSJ35BiWSseuKt/HO1pZoj 0Fxgz5gOXB2grEDROXHkEepnjbMR/7iai0VqpyxntFt8LutvgwWOMqw8qGIq0r0iPl81 GLNtuE0LNDFKlWzyzhK2kaoefDzz9MXxtmuUdaBfupB6r7MzT9DkyycLGA6SRVi8T30K kMd9P3372BpLbWp8N4fz/hjaqDHCYYvKq7T4EHhG+KuM98YtvUVRm3HIHa2w/8nFKFwl gKRVB+BvRvUo5uUPIwOvBUHCyRzK7ryjAn+8fJEKW2rSzQqAxRGm3WN1xkOsZuBzcxyO ysXg== X-Gm-Message-State: AFqh2kqBJeW9UWFqb4C+SCCHqqKaQZ/n/W+oXgtegp5nIHMX5KUHidWs CuxGMtQQQwTL3SEHktUj9/XZfQ== X-Received: by 2002:a05:600c:1e8c:b0:3d6:2952:679b with SMTP id be12-20020a05600c1e8c00b003d62952679bmr21963079wmb.34.1672390214913; Fri, 30 Dec 2022 00:50:14 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id bh12-20020a05600c3d0c00b003cfa81e2eb4sm27599612wmb.38.2022.12.30.00.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Dec 2022 00:50:14 -0800 (PST) From: Abel Vesa <abel.vesa@linaro.org> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Johan Hovold <johan@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: [PATCH] arm64: dts: qcom: sc8280xp-x13s: Add RTC support Date: Fri, 30 Dec 2022 10:50:10 +0200 Message-Id: <20221230085010.717423-1-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753629119535835011?= X-GMAIL-MSGID: =?utf-8?q?1753629119535835011?= |
Series |
arm64: dts: qcom: sc8280xp-x13s: Add RTC support
|
|
Commit Message
Abel Vesa
Dec. 30, 2022, 8:50 a.m. UTC
The PMK8350 PMIC has an available RTC block. Describe it in
sc8280xp-pmics dtsi and enable it in Lenovo Thinkpad X13s specific dts.
Mark it as wakeup-source to allow waking the system from sleep.
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
.../arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ++++
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 8 ++++++++
2 files changed, 12 insertions(+)
Comments
Hi Abel, On Fri, Dec 30, 2022 at 10:50:10AM +0200, Abel Vesa wrote: > The PMK8350 PMIC has an available RTC block. Describe it in > sc8280xp-pmics dtsi and enable it in Lenovo Thinkpad X13s specific dts. > Mark it as wakeup-source to allow waking the system from sleep. > > Signed-off-by: Abel Vesa <abel.vesa@linaro.org> I'm currently working on proper RTC support which implies reading and storing the time offset from EFI. This patch in itself is pretty much useless as the returned time is just some random time from the epoch (e.g. in the 1970's). So I suggest waiting another week or so until I'm done. Johan
On 22-12-30 10:08:33, Johan Hovold wrote: > Hi Abel, > > On Fri, Dec 30, 2022 at 10:50:10AM +0200, Abel Vesa wrote: > > The PMK8350 PMIC has an available RTC block. Describe it in > > sc8280xp-pmics dtsi and enable it in Lenovo Thinkpad X13s specific dts. > > Mark it as wakeup-source to allow waking the system from sleep. > > > > Signed-off-by: Abel Vesa <abel.vesa@linaro.org> > > I'm currently working on proper RTC support which implies reading and > storing the time offset from EFI. > > This patch in itself is pretty much useless as the returned time is just > some random time from the epoch (e.g. in the 1970's). > > So I suggest waiting another week or so until I'm done. Sure thing. Consider this dropped then. Please CC me when you have something so I can try it out. Thanks, Abel > > Johan
On Fri, Dec 30, 2022 at 11:20:11AM +0200, Abel Vesa wrote: > On 22-12-30 10:08:33, Johan Hovold wrote: > > Hi Abel, > > > > On Fri, Dec 30, 2022 at 10:50:10AM +0200, Abel Vesa wrote: > > > The PMK8350 PMIC has an available RTC block. Describe it in > > > sc8280xp-pmics dtsi and enable it in Lenovo Thinkpad X13s specific dts. > > > Mark it as wakeup-source to allow waking the system from sleep. > > > > > > Signed-off-by: Abel Vesa <abel.vesa@linaro.org> > > > > I'm currently working on proper RTC support which implies reading and > > storing the time offset from EFI. > > > > This patch in itself is pretty much useless as the returned time is just > > some random time from the epoch (e.g. in the 1970's). > > > > So I suggest waiting another week or so until I'm done. > > Sure thing. Consider this dropped then. > > Please CC me when you have something so I can try it out. Sure, I will. Since it depends on UEFI support it may take a while to get everything merged in mainline, but we should have working out-of-tree support shortly. Johan
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 568c6be1ceaa..4f6daa3f8cb9 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -419,6 +419,10 @@ &pmk8280_pon_resin { status = "okay"; }; +&pmk8280_rtc { + status = "okay"; +}; + &pmk8280_vadc { status = "okay"; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi index f2c0b71b5d8e..00b13f9a7af8 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi @@ -95,6 +95,14 @@ pmk8280_adc_tm: adc-tm@3400 { #thermal-sensor-cells = <1>; status = "disabled"; }; + + pmk8280_rtc: rtc@6100 { + compatible = "qcom,pmk8350-rtc"; + reg = <0x6100>, <0x6200>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; + status = "disabled"; + }; }; pmc8280_1: pmic@1 {