Message ID | 20221213005539.1133443-1-echanude@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2560167wrr; Mon, 12 Dec 2022 17:03:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf5+/Q/HVuURVDOPLd4m8tTf8xS0R8YLrP8RqxjUIb4rLYI6EohGamIfSJwCMS/+i+QAFAO4 X-Received: by 2002:a17:90a:f689:b0:219:1b52:859a with SMTP id cl9-20020a17090af68900b002191b52859amr18756151pjb.10.1670893404501; Mon, 12 Dec 2022 17:03:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670893404; cv=none; d=google.com; s=arc-20160816; b=1Ju1u3QCsQDhAnDyGZi1Og06NtFFi+xiNNO53pOI6qTeRp1vBCEGR0vwN0V78RG0qD OAREZAkqmDv2hTzst9LE2Ku4IfBq6/w35h4TWlH/HP/8JIIPaVTxX0tzVXJORUKHH2cd ZlGUh2kXL58Rc4/sLsugK4TQI4zgjS7iLTcwbvC1sw966qX8tjs7OVcl554LncvyMnbA tqwOjX8rH0C2iD0WYvPUd1JZbDDMnpEudzQkb5yyg45Sx8mBpjTynooqhUpfSoG/Y+1F EJ+XJMYMediGmVgLyBNAoNYxRokIPx7OWGPLK1fPBSDYXm7MNNJpmbvDgThFbTgQJKyH QPwA== 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=0G5DlIm/58n/d7ddm5UPOg5NB4JeT07TXknicvMHP1k=; b=APQDkuNAcR7E8SgdGNuiEcFZyQm/NDLAcZmfrVh9PDs2Ks9JxVug9tdsZvCimeo/2l qLMTuJLYtb5hKvG/7SK0sm+4sbPh6iRxct7rgdAEvIsUP2Ycd2myY2fvoiAEo6VNqKY4 K4VMeTiFE3Ld5sdzeIG1CBN0DqHfyXIC4bf+cIXEbpAFlrRmBbHXA2BdLEKNolY7qYCS gCuXb8IYqe+bEw870AGZ0XKMy6kaDeY11VDJdY/kzXQoklkmexDJ5o2oObF6v8T6ShQh qIcf5NLmtykgX0CZYqkaahaJkQiQ1uXiLwn9BISyFw728kMDPN1Kiv05uMdIPGv5HNHs 85bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h3GffPa6; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu9-20020a17090b388900b00200b5c30f73si11995374pjb.106.2022.12.12.17.03.10; Mon, 12 Dec 2022 17:03:24 -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=@redhat.com header.s=mimecast20190719 header.b=h3GffPa6; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233696AbiLMA6E (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Mon, 12 Dec 2022 19:58:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233680AbiLMA6C (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 12 Dec 2022 19:58:02 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A19317E39 for <linux-kernel@vger.kernel.org>; Mon, 12 Dec 2022 16:56:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670893018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0G5DlIm/58n/d7ddm5UPOg5NB4JeT07TXknicvMHP1k=; b=h3GffPa6LmsxWVurgFMT3r0cTNjmgBfw84LliU+B5NfEnqHUWluBqlm0e7TICgR1xu7zdk 7WMJ/zTrj6rW0wURCJtK75U9FpH2zulPLUdknSOZuEjOx1XIRP6g+RukW7N5ob7im+35I2 r9PabI4W4iNay+DJAqOFJai8i37g138= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-470--0cg3x5tOtia3z1FnEZkag-1; Mon, 12 Dec 2022 19:56:57 -0500 X-MC-Unique: -0cg3x5tOtia3z1FnEZkag-1 Received: by mail-qk1-f200.google.com with SMTP id bq13-20020a05620a468d00b006fa5a75759aso16023163qkb.13 for <linux-kernel@vger.kernel.org>; Mon, 12 Dec 2022 16:56:57 -0800 (PST) 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=0G5DlIm/58n/d7ddm5UPOg5NB4JeT07TXknicvMHP1k=; b=o+/O1EtiQ7J5qehSrqcBUC5nODpYmYFbbqvvfSudLA+iyaZJoB8Q1Df6qCJc80hzaR S9WHOjZVB/HrckanCLIJv1u1bn+pTNFE0FaCEs83P4eMBUax15EaL7PrKauTyOhylog1 Mj9Te7W9yiz8ZQAj+H2aL9SC4QrrWmT2bu8N4VJuv7HzjgQox1EsgZXagudXtg3DjU6y kSbmRYxDQu91JONDm3M7P6uZlEdUz/KA0TJZbAhjkX4W0Tjf5ZiZagN4dvip5DasOtle CnquBIkvP5DIDHSjZwcgeL1/663C+c46I9sAcJcQonScMJ2kqikjgZhzgDUlrNvf5PAO pyfA== X-Gm-Message-State: ANoB5pmmlEP8LBuVwYP5G5aTWEKXirm11XiT2VTrbOR7u91n0VtG7igQ BN8kr41yLm97aZWUSHDl3DbjtwD4c8MaWN4PNXLNvSnu6toKmEfr49w4dSUefzw0/WtVJif3s7c 6zheuWtlon0HD94y2OVX4m/9o X-Received: by 2002:a05:622a:90f:b0:3a6:2170:b0a1 with SMTP id bx15-20020a05622a090f00b003a62170b0a1mr28843450qtb.6.1670893016781; Mon, 12 Dec 2022 16:56:56 -0800 (PST) X-Received: by 2002:a05:622a:90f:b0:3a6:2170:b0a1 with SMTP id bx15-20020a05622a090f00b003a62170b0a1mr28843427qtb.6.1670893016567; Mon, 12 Dec 2022 16:56:56 -0800 (PST) Received: from localhost (pool-96-230-116-121.bstnma.fios.verizon.net. [96.230.116.121]) by smtp.gmail.com with ESMTPSA id 195-20020a370ccc000000b006fb11eee465sm6747657qkm.64.2022.12.12.16.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 16:56:55 -0800 (PST) From: Eric Chanudet <echanude@redhat.com> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Konrad Dybcio <konrad.dybcio@linaro.org> Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Halaney <ahalaney@redhat.com>, Brian Masney <bmasney@redhat.com>, Eric Chanudet <echanude@redhat.com> Subject: [PATCH 1/2] arm64: dts: qcom: pm8450a: add rtc node Date: Mon, 12 Dec 2022 19:55:38 -0500 Message-Id: <20221213005539.1133443-1-echanude@redhat.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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?1752058722294224073?= X-GMAIL-MSGID: =?utf-8?q?1752058722294224073?= |
Series |
[1/2] arm64: dts: qcom: pm8450a: add rtc node
|
|
Commit Message
Eric Chanudet
Dec. 13, 2022, 12:55 a.m. UTC
Add the rtc block on pm8450a first pmic to enable the rtc for
sa8540p-ride.
Signed-off-by: Eric Chanudet <echanude@redhat.com>
---
arch/arm64/boot/dts/qcom/pm8450a.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
On 13 December 2022 03:55:38 GMT+03:00, Eric Chanudet <echanude@redhat.com> wrote: >Add the rtc block on pm8450a first pmic to enable the rtc for >sa8540p-ride. > >Signed-off-by: Eric Chanudet <echanude@redhat.com> >--- > arch/arm64/boot/dts/qcom/pm8450a.dtsi | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/arch/arm64/boot/dts/qcom/pm8450a.dtsi b/arch/arm64/boot/dts/qcom/pm8450a.dtsi >index 34fc72896761..af761dbfbc66 100644 >--- a/arch/arm64/boot/dts/qcom/pm8450a.dtsi >+++ b/arch/arm64/boot/dts/qcom/pm8450a.dtsi >@@ -13,6 +13,14 @@ pm8450a: pmic@0 { > #address-cells = <1>; > #size-cells = <0>; > >+ rtc@6000 { >+ compatible = "qcom,pm8941-rtc"; >+ reg = <0x6000>; >+ reg-names = "rtc", "alarm"; >+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; 0x60? >+ wakeup-source; >+ }; >+ > pm8450a_gpios: gpio@c000 { > compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; > reg = <0xc000>;
On Tue, Dec 13, 2022 at 04:18:00AM +0300, Dmitry Baryshkov wrote: > >diff --git a/arch/arm64/boot/dts/qcom/pm8450a.dtsi b/arch/arm64/boot/dts/qcom/pm8450a.dtsi > >index 34fc72896761..af761dbfbc66 100644 > >--- a/arch/arm64/boot/dts/qcom/pm8450a.dtsi > >+++ b/arch/arm64/boot/dts/qcom/pm8450a.dtsi > >@@ -13,6 +13,14 @@ pm8450a: pmic@0 { > > #address-cells = <1>; > > #size-cells = <0>; > > > >+ rtc@6000 { > >+ compatible = "qcom,pm8941-rtc"; > >+ reg = <0x6000>; > >+ reg-names = "rtc", "alarm"; > >+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; > > > 0x60? Checking downstream it uses 0x61 for the ppid. This is also the case for all other descriptions of that RTC I could find. On the other hand, that does not describe the "alarm" register bank at 0x6100. Should it be added, if anything to match reg-names? I tried a quick test of the alarm on sa8540p-ride: $ echo $(date '+%s' -d '+ 10 seconds') > /sys/class/rtc/rtc0/wakealarm It logged the interrupt: 172: 3 0 0 0 0 0 0 0 pmic_arb 101777441 Edge pm8xxx_rtc_alarm
On 13 December 2022 20:18:55 EET, Eric Chanudet <echanude@redhat.com> wrote: >On Tue, Dec 13, 2022 at 04:18:00AM +0300, Dmitry Baryshkov wrote: >> >diff --git a/arch/arm64/boot/dts/qcom/pm8450a.dtsi b/arch/arm64/boot/dts/qcom/pm8450a.dtsi >> >index 34fc72896761..af761dbfbc66 100644 >> >--- a/arch/arm64/boot/dts/qcom/pm8450a.dtsi >> >+++ b/arch/arm64/boot/dts/qcom/pm8450a.dtsi >> >@@ -13,6 +13,14 @@ pm8450a: pmic@0 { >> > #address-cells = <1>; >> > #size-cells = <0>; >> > >> >+ rtc@6000 { >> >+ compatible = "qcom,pm8941-rtc"; >> >+ reg = <0x6000>; >> >+ reg-names = "rtc", "alarm"; >> >+ interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; >> >> >> 0x60? > >Checking downstream it uses 0x61 for the ppid. This is also the case >for all other descriptions of that RTC I could find. On the other hand, >that does not describe the "alarm" register bank at 0x6100. >Should it be added, if anything to match reg-names? Definitely yes. I think otherwise it breaks the idea of reg-names. > >I tried a quick test of the alarm on sa8540p-ride: >$ echo $(date '+%s' -d '+ 10 seconds') > /sys/class/rtc/rtc0/wakealarm >It logged the interrupt: >172: 3 0 0 0 0 0 0 0 pmic_arb 101777441 Edge pm8xxx_rtc_alarm >
diff --git a/arch/arm64/boot/dts/qcom/pm8450a.dtsi b/arch/arm64/boot/dts/qcom/pm8450a.dtsi index 34fc72896761..af761dbfbc66 100644 --- a/arch/arm64/boot/dts/qcom/pm8450a.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8450a.dtsi @@ -13,6 +13,14 @@ pm8450a: pmic@0 { #address-cells = <1>; #size-cells = <0>; + rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; + wakeup-source; + }; + pm8450a_gpios: gpio@c000 { compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio"; reg = <0xc000>;