From nobody Wed Nov 27 04:47:21 2024 Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 070E43EA71 for ; Sun, 13 Oct 2024 05:22:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796961; cv=none; b=dlYfsFcpxALJnxCWN19wUhpxkCuBbYis68TfC5Ub+flwWQsnAkwKow06Owr79t+Ry1iyeEleCBn7/mSJVTmJn4GivBlEYvDk1dojEW5SP1J0y//EjVaRjZ8ZKV01AuIeVeGYhxf/xQqOrI8HHhMt2J+ePXbU3ywjSF3c9Dtjlvc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796961; c=relaxed/simple; bh=4MZOvQKHClittUmpnQnoq/i+2Op7x5TOc+aMOdSKGRQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KGmO52d48Us7kTc6BiQAYeaUfwoDZ7XJ2Votbrkx8CxZMD/4DL7DAqHgwqXZxXf8KRWOtzmp2b+r26qNGMJsx4AXuuCnNWl1oxdX7XwDyLNYyQGP1Plb2B4QbIhgfW2pdmCQelKGSWnHYSOXFJIGTuMQFShp98LQGuMhM/4i0vE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca; spf=pass smtp.mailfrom=marek.ca; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b=cvx74f9L; arc=none smtp.client-ip=209.85.219.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marek.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b="cvx74f9L" Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-6cbe68f787dso20991326d6.2 for ; Sat, 12 Oct 2024 22:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728796959; x=1729401759; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=B6xxZ43bcNrMRSyYePE5aWtWwfMTqg7K7KAOvUgotws=; b=cvx74f9LirfQIpvi8uN+yNHViK0Vu5/j8Nqhu8mJsOjnvlJnZjFHvLWxq9p5J56oS3 ESmsViBMhZ3sZH9LDwsD0zVlm2Y+XChD2MBvTNfBem/Nx8ToFBOofCXy4vuSKOHmW7ya OVp/94rTQ6sGxK7OMI3HsyFTqenU57uuO5HOWQlxfbMDfeqkgxkq33ko5S+2w0oW+JIT R7giN2IZfnR1rlVFfOX3uqwpWX00GmrKU7x7RSZR19LBKIOlZyk+4p1RLgU2WOkvMeG9 dmQhnSiFJAD9OftS4iO3wwSlsm0yKGRxs+RTJ4VKBkLmrT4ktctz0jZTdNh0gcYJgmiX QY0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728796959; x=1729401759; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B6xxZ43bcNrMRSyYePE5aWtWwfMTqg7K7KAOvUgotws=; b=dmtcdjsePUvBMH6lUdgkLrUW3XzKczNVZnasW9iGcMHl5Hs0x9TFgGCQnxDCYyS61z GHKoMTI4qw5E8AFG2jHX/ZKvdh/qyvQIVOebJskjMbOond2w272HJkN8fEnKRXCyMtlr Cf1yx6/BUV3ZRLLrIr7kHoCAoNKj5fKS9XKU/3KsvBirIZYsWX14zyM3QvtytKUjID8M mCyCltpN5lQQF0TUZKs0sdkvov5wwI9MK2YIeM9iRKgnLUM5ps2Qp66RQFVws628dnx1 5GVGWdQk9AJ8jMZ9KBrLncSndGWkGjNJUueemsP1GofqUMcYIdaRGFxE4EJ5yzqqqthv MBMg== X-Forwarded-Encrypted: i=1; AJvYcCU5VzrrxAldSyxXVItGtLXIiSE4FX3zOInQ75i5UkOKxuJ6CjRfSX5s3twuo+TtpEhTvFuUADbfGX4S95E=@vger.kernel.org X-Gm-Message-State: AOJu0YwWoE8ns76aGTJJcSxB1gJdEQZa54T/vmV6NZMXYM+X00dH1QLX EE7+TIFgOqE4N6xDM3uDPSgU1oYqHZkGXI82xpl8wF6+mx995VCPet6EYhjWTgA= X-Google-Smtp-Source: AGHT+IHsbqqTS9ovb3ovjSqTfhAbFTCjDmWZz0KsigO/gs/tDfosJX8dkKPETxwqd4+611XM0iYC4A== X-Received: by 2002:a05:6214:5d0c:b0:6cb:f991:ec51 with SMTP id 6a1803df08f44-6cbf991ec9bmr71722876d6.45.1728796958920; Sat, 12 Oct 2024 22:22:38 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cbe8608e2csm31821496d6.102.2024.10.12.22.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 22:22:38 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Alexandre Belloni , linux-rtc@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 1/5] rtc: pm8xxx: implement no-alarm flag for non-HLOS owned alarm Date: Sun, 13 Oct 2024 01:15:26 -0400 Message-ID: <20241013051859.22800-2-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241013051859.22800-1-jonathan@marek.ca> References: <20241013051859.22800-1-jonathan@marek.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Qualcomm x1e80100 firmware sets the ownership of the RTC alarm to ADSP. Thus writing to RTC alarm registers and receiving alarm interrupts is not possible. Add a no-alarm flag to support RTC on this platform. Signed-off-by: Jonathan Marek --- drivers/rtc/rtc-pm8xxx.c | 43 +++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index c32fba550c8e0..0de55779b04f7 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -61,6 +61,7 @@ struct pm8xxx_rtc { struct rtc_device *rtc; struct regmap *regmap; bool allow_set_time; + bool no_alarm; int alarm_irq; const struct pm8xxx_rtc_regs *regs; struct device *dev; @@ -473,9 +474,13 @@ static int pm8xxx_rtc_probe(struct platform_device *pd= ev) if (!rtc_dd->regmap) return -ENXIO; =20 - rtc_dd->alarm_irq =3D platform_get_irq(pdev, 0); - if (rtc_dd->alarm_irq < 0) - return -ENXIO; + rtc_dd->no_alarm =3D of_property_read_bool(pdev->dev.of_node, "no-alarm"); + + if (!rtc_dd->no_alarm) { + rtc_dd->alarm_irq =3D platform_get_irq(pdev, 0); + if (rtc_dd->alarm_irq < 0) + return -ENXIO; + } =20 rtc_dd->allow_set_time =3D of_property_read_bool(pdev->dev.of_node, "allow-set-time"); @@ -503,7 +508,8 @@ static int pm8xxx_rtc_probe(struct platform_device *pde= v) =20 platform_set_drvdata(pdev, rtc_dd); =20 - device_init_wakeup(&pdev->dev, 1); + if (!rtc_dd->no_alarm) + device_init_wakeup(&pdev->dev, 1); =20 rtc_dd->rtc =3D devm_rtc_allocate_device(&pdev->dev); if (IS_ERR(rtc_dd->rtc)) @@ -512,27 +518,36 @@ static int pm8xxx_rtc_probe(struct platform_device *p= dev) rtc_dd->rtc->ops =3D &pm8xxx_rtc_ops; rtc_dd->rtc->range_max =3D U32_MAX; =20 - rc =3D devm_request_any_context_irq(&pdev->dev, rtc_dd->alarm_irq, - pm8xxx_alarm_trigger, - IRQF_TRIGGER_RISING, - "pm8xxx_rtc_alarm", rtc_dd); - if (rc < 0) - return rc; + if (!rtc_dd->no_alarm) { + rc =3D devm_request_any_context_irq(&pdev->dev, rtc_dd->alarm_irq, + pm8xxx_alarm_trigger, + IRQF_TRIGGER_RISING, + "pm8xxx_rtc_alarm", rtc_dd); + if (rc < 0) + return rc; + } =20 rc =3D devm_rtc_register_device(rtc_dd->rtc); if (rc) return rc; =20 - rc =3D dev_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq); - if (rc) - return rc; + if (!rtc_dd->no_alarm) { + rc =3D dev_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq); + if (rc) + return rc; + } else { + clear_bit(RTC_FEATURE_ALARM, rtc_dd->rtc->features); + } =20 return 0; } =20 static void pm8xxx_remove(struct platform_device *pdev) { - dev_pm_clear_wake_irq(&pdev->dev); + struct pm8xxx_rtc *rtc_dd =3D platform_get_drvdata(pdev); + + if (!rtc_dd->no_alarm) + dev_pm_clear_wake_irq(&pdev->dev); } =20 static struct platform_driver pm8xxx_rtc_driver =3D { --=20 2.45.1 From nobody Wed Nov 27 04:47:21 2024 Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 512B7139590 for ; Sun, 13 Oct 2024 05:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796963; cv=none; b=i8eXiJJDnk3WfO9n2GKixS4D4LOmcn4rztnuJ4j0xm6RHPlzvD2UV2yoqixNf7Pw6ScYrXlFt+y5nkSLWwUXvSmEMN/soLJKQ3S75fCJUgvD8Hvm4FA6YK0AfMUeNrDN9l+XwuY7R9Ua1dng9/utQybsVHTC70KkQRq1s6l03+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796963; c=relaxed/simple; bh=gygbM/0TWbve0yTggoKlMNvknZTLgYXQh0HMHtv9mEQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bg+qRCwqDv7LO6WkY5uilwKGMktlflv5C371NxhyftbBTuocqTgDx/ugiEyfqsvZjRk7GGpfihgvpaerBzkhyvCp8a0p8qLeOGAVcTyiL41+8vAthEHYcErsJvDx5G/mFAWDzl1MhUdR9v3sTPxoAJvOUShnBeeWP0ANB3UP7IU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca; spf=pass smtp.mailfrom=marek.ca; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b=O19POQh0; arc=none smtp.client-ip=209.85.219.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marek.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b="O19POQh0" Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-6cbc845e12eso25401596d6.2 for ; Sat, 12 Oct 2024 22:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728796960; x=1729401760; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0NvbtWswNjmMVigXav8simFFQPZnS0nT4PzjzHauoQI=; b=O19POQh0HY3gPsy5bt3wr5GIjOL+2mvm81hh+krMSXcmNDHhXC3n9zT+BQhD3SPfmW 2+FnUIJ6n050F2UggFc4p65UmUA6fLeMhAsPnOl91ha+wJTLqCftKtGoypsz4qmkVNB1 QJOMj847dcDBrTsy3TwzBLbDeZQcQHgVMEDdSi0wgUCXaXsnQJcqbuT7BJgKjHuUTzL2 aO8goBXVj1o5ERqLNQoyffmSB+m2Cyi9UiACSVVDNCpqr7v1h1D8t52NIoNyTWu3weR8 Ncy/Zs6+RthBtObFnWD5xB7RWcdqt6EUk2YewrvnTgxaO9/ltsktTHmg4dP/u5zTNvTO 5oXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728796960; x=1729401760; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0NvbtWswNjmMVigXav8simFFQPZnS0nT4PzjzHauoQI=; b=bareRSrBgLvqlCLhlWCR4/ywhm9UCf518/YP+xr+OpE1aNT2pwlmJclJaK3UHY6rgn +HLFuXLBjaEopKXhC8jyQ443IbEEzoWyAoT+B1U6DtG/0cimwYg8zBYHfrJcCJMmPomd 9SWKrI1NS/bJ7F8/k/26l2L0dxNPipsWh8cfstHWnw3/oneOygr8fpD6haBXCNXbGq3Z LbrBFmvRfNseBi+ecZu26+vXCpAhpLmB5z0AspzcE11JyS/F7FjpNcawFEGSqnZheP5B OFrr3olEcp285ysUCp4KnIMhFYzFzrwLJMIhntCcCMzu/3/zOHyeLqSuRx8/nkemZxj/ Bwmw== X-Forwarded-Encrypted: i=1; AJvYcCXjJ/mRp6xbeuIJl23FDTtU0VeuynLStCjyzrb3CcHD3E95eUIVh2l/Owm3zwSAlvnVT3ufF+vPEnCJjps=@vger.kernel.org X-Gm-Message-State: AOJu0YzSl+mIQXwUXZM7/+M1XT9pY9AOo+1E77Okpm1RI0Hbb4cFrTSS Z4gVLnaX1KvNyQMRw90bY0lL0yh/Ld0/HCiRj8iHT5bR3Hkll++bjrNBBm1hEdGh88zXiySCDsI FDa0= X-Google-Smtp-Source: AGHT+IFuz8C8fhCweOGUHpxhRS/dLI42qjf0yDlGdmaj1Wf+WcCRwh2Yemg/DnbCRpkubNZ3pmdL4g== X-Received: by 2002:a05:6214:2f87:b0:6cb:eb9c:63c2 with SMTP id 6a1803df08f44-6cbeffa2c15mr104653106d6.15.1728796960240; Sat, 12 Oct 2024 22:22:40 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cbe8608e2csm31821496d6.102.2024.10.12.22.22.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 22:22:39 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Satya Priya , linux-rtc@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 2/5] dt-bindings: rtc: qcom-pm8xxx: document no-alarm flag Date: Sun, 13 Oct 2024 01:15:27 -0400 Message-ID: <20241013051859.22800-3-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241013051859.22800-1-jonathan@marek.ca> References: <20241013051859.22800-1-jonathan@marek.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Qualcomm x1e80100 firmware sets the ownership of the RTC alarm to ADSP. Thus writing to RTC alarm registers and receiving alarm interrupts is not possible. Add a no-alarm flag to support RTC on this platform. Signed-off-by: Jonathan Marek --- Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml b/D= ocumentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml index d274bb7a534b5..210f76a819e90 100644 --- a/Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml +++ b/Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml @@ -40,6 +40,11 @@ properties: description: Indicates that the setting of RTC time is allowed by the host CPU. =20 + no-alarm: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates that RTC alarm is not owned by HLOS (Linux). + nvmem-cells: items: - description: --=20 2.45.1 From nobody Wed Nov 27 04:47:21 2024 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1F8813A3F3 for ; Sun, 13 Oct 2024 05:22:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796964; cv=none; b=thzaWYoOL88oE918A6UKsclO9qkncC52ZLKJXWu8tDf6+53OK2jXChxc4gnkK86UhpOFXpvgKtceT4D5h9Dj7BuxnIysPEN46hQp/wkAl4aTiJto/oU4ADNrGh3QcEfudmIIqcbVnSCRQP06Mtahp3HmYmK7yai57aVUuZUYwxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796964; c=relaxed/simple; bh=Gx8UGYyCoJLkmTfYCCLLqZ+vI7a5HA77QIzlDLw8kbA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UiCWbuHW8s61Y3MmPvd/qKKTVcHOTPNf0EolsRhWFpNp19kSuVikeX5FtXigoPCKGZ+xIgCRdci1szDQ+hscJcvNG1sk6oieP0dpzeHstlpmoyB0Uxw6C0q/Nr3sCqov06UPdhFbchHC2mfvjrS7Sy37QDf+tTKVz3NKFYyP4Ws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca; spf=pass smtp.mailfrom=marek.ca; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b=ZNIjy/PT; arc=none smtp.client-ip=209.85.219.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marek.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b="ZNIjy/PT" Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-6cbce9e4598so22465576d6.2 for ; Sat, 12 Oct 2024 22:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728796961; x=1729401761; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WvVQKd9PLxbemSCsM67gMOfDNJDIxXsysvUovMumA3I=; b=ZNIjy/PTVeIXaYotaYX/g9VE01S/vydF8SRR0MZpOnriqODjVTgj4lTtQXaHulF9Wq VIdYvCXhZPYdNqC9Ep8rpao+QdhSeZfYlO1ky5+fBtDa/nHXq3k5q0jfZ5YqWq9VG3TD L5qCCvqOAny2ZKZuFsOCAwxaKc/VCh4gry+I8TJRlrDJMm3NUFXKZKlehrLveur2oC07 6pqW495xE06dSF3C1GNaWx3s5R6liVuSR9f6TJVqLEW0f60zSxzHgxW2uns/uCmEQf0R yVU9NQO7CItHAJVjF+MFKDJ3pX5jIrWKOAe9zJvQXKqV6qnzVe/X9o3eLWPL6qUTNyDJ ZciA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728796961; x=1729401761; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WvVQKd9PLxbemSCsM67gMOfDNJDIxXsysvUovMumA3I=; b=eQLm6mwHSUwG5xzPQmEI2q8pTrHeLMRYJpOatlcEa/11tueMxtZQ+JXH+AjaTku/dl LvQ8N3tH5lCLfHpU8ex2igVGX7o4HbdS1RNvpLHbyluoj7wmDquXhJAUwVaMhR2xJE/P PRwc7XTdjaG+IHdUZMmvwUVX00pkG40Y560PXcwvTXDf/TkWVUV/6f/TyCHVJSObToZi T44CYTlQfWsZk/vOV3H/GtSi+33Dr6L1S4gYL5p6cahFiHjEAM0LnpCOKz/Oe6kLoWNZ SfkT0d1ts3Ltr9gUpCyYhaWG5HWykrrHGxBorqfsIxLxooFwcNBDGSgx/MxkN06r6NXp uMJw== X-Forwarded-Encrypted: i=1; AJvYcCVOrkypbonz2m3Q9JWJVdy2IMmoKdEeIVmRxNOBaLEvNkbTrz8qh9uunhla9l6GVMChZnFnamCWXlD8U9o=@vger.kernel.org X-Gm-Message-State: AOJu0YwdNAaYyp+UZRGDrDklhnNRxFNffFZmYX7X5TlIfT5Vdke5Kouu yAuff54kfQs4LlLS8Y+0c2CBBCxoej4+OGTUkvtEjdGxSTh0cVny5q1MvkEQ3Ik= X-Google-Smtp-Source: AGHT+IG3X+CwbagBKnpKliy5KyuMFT5lYpfYOdROgevhJ0y9Vsl5tgYm7JjVvSB98U3HFa6I1oDaqw== X-Received: by 2002:a05:6214:5b82:b0:6cb:8339:3443 with SMTP id 6a1803df08f44-6cbf9d0cb9emr75169256d6.7.1728796961575; Sat, 12 Oct 2024 22:22:41 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cbe8608e2csm31821496d6.102.2024.10.12.22.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 22:22:41 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 3/5] arm64: dts: qcom: x1e80100-pmics: enable RTC Date: Sun, 13 Oct 2024 01:15:28 -0400 Message-ID: <20241013051859.22800-4-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241013051859.22800-1-jonathan@marek.ca> References: <20241013051859.22800-1-jonathan@marek.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Only access to RTC alarm is blocked. Enable RTC access by setting the no-alarm flag. Signed-off-by: Jonathan Marek --- arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi b/arch/arm64/boot= /dts/qcom/x1e80100-pmics.dtsi index 5b54ee79f048e..304a98d60472e 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi @@ -220,11 +220,9 @@ pon_resin: resin { =20 pmk8550_rtc: rtc@6100 { compatible =3D "qcom,pmk8350-rtc"; - reg =3D <0x6100>, <0x6200>; - reg-names =3D "rtc", "alarm"; - interrupts =3D <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; - /* Not yet sure what blocks access */ - status =3D "reserved"; + reg =3D <0x6100>; + reg-names =3D "rtc"; + no-alarm; /* alarm owned by ADSP */ }; =20 pmk8550_sdam_2: nvram@7100 { --=20 2.45.1 From nobody Wed Nov 27 04:47:21 2024 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFD0813B2B6 for ; Sun, 13 Oct 2024 05:22:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796966; cv=none; b=ifgBC5JaX68aMKBcz/t891NrT2A1rSaLO3TMAvVrnIBFd0J7m9ocsiCstaQylC6a7tBmZGSEDCYzO+MdCjmSEov83yzjsUlr1z2UM8N5QuvylU/vPR7J34Zn7mrQAJlHSAExkM1lc2w+dpiPQlr36UrNRFC7qkjCCynwopYUD+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796966; c=relaxed/simple; bh=yOQYLbpufnAQd61mNPx8dF0RUdCNPiazkZMeVKYLML0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iT9xe4Crw0UhEc+yvwrFgwrbDBEQjeWBcuOW+mNi+tw++JZW/A4z0bwdJPXq4ZkrSBfTkF5y6ftGywMWoZkDOfrdrpAXyUCyFEVPVtlTSZx86QSF01h8n2Ba3c0DHND7RxJ/ZAOujPhOynlX4mAILIgLgyUzTqYfO4FIO38FzBw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca; spf=pass smtp.mailfrom=marek.ca; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b=Sa4cB3ZB; arc=none smtp.client-ip=209.85.219.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marek.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b="Sa4cB3ZB" Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-6cbcd8ce5f9so30118996d6.2 for ; Sat, 12 Oct 2024 22:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728796963; x=1729401763; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=shwb9N4WF4JyvqNRDgkrcwpOBqNWS70KY1SExpzylBM=; b=Sa4cB3ZB8zCVV+gf2TrAgtRwPunQ4Hndjj1z0J5+v6RLuBqBW5iRFzsvSDhelZjKuI EuLl1lJnWGqTdwiN988ribTa8r7kZtC5jE/lLbH/Fcc/vfnIc0AID1ldNcIc8mJJCFXQ lhO0NU8P6rMvQgT79AvnNMHo+hj515OEZGzl4sRSNFJ6ssxeHaZgsq1mQZSRF3NAAtAS BPSYbi0a466R/Ef2XRfztWlsnBwrmC9KXxUTpj4PVW/HlEw4TJy41tLxdrrVvzycVZNp Em3PwnQJ9FtSH0fImqYNv0/6P1uwrOJ+IpP1Co33y7zLiPexvZeYQaWeezPebIvC2AZm OHig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728796963; x=1729401763; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=shwb9N4WF4JyvqNRDgkrcwpOBqNWS70KY1SExpzylBM=; b=uRsoKaO49y3DvSyjqRciI6o0cg7FoNp71SzcPQFkzPvbZpq/UnrsS64Rtr/4XSsyrm MwXsY+bXiJ4gjcdYnTPYi9ud2FmAL/hKLdagM02BMStXU0jp5OtK86p1L7WhlHf9YQ7e 1AJBZgU8EVN3Jh2FkUvNBwlLYn6MCaDwygIhPHMDsSfKgO5Y6yAoeCNGUkmaw+Aczi9P BGfm8YT0fSgqTuB2OSSvKFlHwtH6aJncZFzbX5e0KYlDx8oUoBRbFv8axPELatmgtejg sXdRK12VpQwCtgahwl7tybsBOAaQ9E12tZNW9nX1oEvG0aOEsbUB/I7F6NvfuYveXSXS cg0Q== X-Forwarded-Encrypted: i=1; AJvYcCWHvMWJzdqTaWatSxxS+bWqFAprkLwQukVD2OLhyMfqxZzaLsSRr7ud6kojZ/NLv5TV+oYKWg3OZa+uKIQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxERdHbfQ8fXxBXqpyENdfPFkLu/q0hWTviibVIT5sKQIW4KLZr xaigrkTUkSrTIk/txi1YxPbQdW2BGaNkYnxRdCy7Pk7sCGc5cOnG0v602X/VaXqhMTe47cwhI1p JzJQ= X-Google-Smtp-Source: AGHT+IEy3DhBkV/4tsh5OQ4TqIaCRLYxUH/ViKmGl48XQk3QJ76bWUv6FLpogI15DSs5xRjZR3nj0Q== X-Received: by 2002:a05:6214:5b0d:b0:6cb:e52c:c8dd with SMTP id 6a1803df08f44-6cbf9e9f4ecmr71827136d6.53.1728796962626; Sat, 12 Oct 2024 22:22:42 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cbe8608e2csm31821496d6.102.2024.10.12.22.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 22:22:42 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 4/5] arm64: dts: qcom: x1e80100-crd: add rtc offset to set rtc time Date: Sun, 13 Oct 2024 01:15:29 -0400 Message-ID: <20241013051859.22800-5-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241013051859.22800-1-jonathan@marek.ca> References: <20241013051859.22800-1-jonathan@marek.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" See commit e67b45582c5e for explanation. Note: the 0xbc offset is arbitrary, it just needs to not be already in use. Signed-off-by: Jonathan Marek --- arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dt= s/qcom/x1e80100-crd.dts index 6dfc85eda3540..eb6b735c41453 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts +++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts @@ -1224,6 +1224,17 @@ edp_bl_en: edp-bl-en-state { }; }; =20 +&pmk8550_rtc { + nvmem-cells =3D <&rtc_offset>; + nvmem-cell-names =3D "offset"; +}; + +&pmk8550_sdam_2 { + rtc_offset: rtc-offset@bc { + reg =3D <0xbc 0x4>; + }; +}; + &qupv3_0 { status =3D "okay"; }; --=20 2.45.1 From nobody Wed Nov 27 04:47:21 2024 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC6F013C9B8 for ; Sun, 13 Oct 2024 05:22:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796966; cv=none; b=XAVo6Fkq8/Z/KKhITw9CEDBl3xffkHhncvSkLqZc1brrVJ9b/r8UmJ3bauMzw9LSUcP4VdqyiZZUQQistdNDAUG0JU8LOx+oGFPlMso1S0fiPKd1dlE8uDwJpSkWVyofLpLtQaXJSqBl/RLPdV2P7in+MvxwGpBFAMIE2YyIq4c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796966; c=relaxed/simple; bh=ARvTbpZoesd0jYRqz5wVnIxLACSl1t1S6Mt4dSv6f9I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o9yezrqIegCWtkjL24Ie7rdmY8s6wSOKdYCi6J1GRw2K98S2kjNX2obD/NkH2ZnQOoIir6BlFiPL3UK/eTLlhXj+Lyeq1Vad9vnMmvHjlu5C/ScrJquKXcdOVT28SWIzqkt1+818A9CgojDP9X/xjdVXLG6OmzTVovxZRPAFiY4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca; spf=pass smtp.mailfrom=marek.ca; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b=NxwNnV69; arc=none smtp.client-ip=209.85.219.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=marek.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marek.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marek.ca header.i=@marek.ca header.b="NxwNnV69" Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-6cbc28f8e1bso27341286d6.0 for ; Sat, 12 Oct 2024 22:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728796964; x=1729401764; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u6yGSmyzg21J/Zpyi1ZX21XVWREXLzfX8fd72TE5Ubs=; b=NxwNnV69paSBGyIY4pzVHL7FcFuXndto0DPfmRIOFboC0lRRDOYoJm5AZX4PzZzMRu QxRnKSO73MbWyAkRVp1iN9KkqRTXqIDp1Dc9vKsqIRw2ve73nA5cp1tyWIeKusheSvZC /BBSkv8YhelIlHMBjT1sYeOZpa8jw32idbeSyLKObMYkq6hy4zLhif3Kbt1KfwfS3Ow2 v1TUI7hDwt+pnvEdxib5Sp22ctHTd8tzFk55N/ilj68T0m3dmY/ocI7gO8e9V9fcGhcw MdiNPlCsAuMz0UxG8Ydd9H6B4IOPNljRPZgnIW84Cr8dFWewj5hbXsvRYuihvf1uM5xx Iuyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728796964; x=1729401764; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u6yGSmyzg21J/Zpyi1ZX21XVWREXLzfX8fd72TE5Ubs=; b=gS8M8vtwZpP/sms79uQAluNgyHZahyibrMd5U8DZPySDT8C0H9fIiF4yBeZxilBt8L EwWJoHyB0TnLqurQ9OTvK8Q355CKCM3L6w1W5y9YgEsnmZM38leEHDjE8oX1ahTDeOWt ZzecoCQ157cU9S+x5DtsGltuPuybx3nSqrcqLbyzizEyR/Y+rB47urFMNOnlEs4Ehen4 Y+6xIQyjROPunzuTHs5+OZ29qLPPYkOWGnfgylYRGbyCLKm5efqQB37KWz1TkZVkRtb7 roAETNAQWbEd2PNOOSjCleQQjoZ9+Kj3lJeEfBsZlhf7KMkhNoLjFLv01/KNftNi3trF cvjg== X-Forwarded-Encrypted: i=1; AJvYcCXF8Vmlf3esy8snM+neP/s6bHVUqm16tvSUudg+pnsnvAofJ9brDOmCi9+RSyxn+WgS67/ZJeY1oFJY7NI=@vger.kernel.org X-Gm-Message-State: AOJu0YzT6ZICkE347dbUhnbemw2wokZe6pr2tva7fKyWFUZTg6gb5XLi TdYebdZneA6p3QQrLDzimuiAVdOzou6ekyYoiS2hmGb9N6miESj6xlZsu+h3k8M= X-Google-Smtp-Source: AGHT+IF8AUTc+jOtWy9UppEuKKcTtAsp1aniVjQun9cMK8ZFcTOjysON2IY5sk1DerArEgUw7kRllA== X-Received: by 2002:a05:6214:4403:b0:6cb:fb55:5378 with SMTP id 6a1803df08f44-6cbfb55552fmr48947056d6.25.1728796963959; Sat, 12 Oct 2024 22:22:43 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cbe8608e2csm31821496d6.102.2024.10.12.22.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2024 22:22:43 -0700 (PDT) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 5/5] arm64: dts: qcom: x1e78100-t14s: add rtc offset to set rtc time Date: Sun, 13 Oct 2024 01:15:30 -0400 Message-ID: <20241013051859.22800-6-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241013051859.22800-1-jonathan@marek.ca> References: <20241013051859.22800-1-jonathan@marek.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" See commit e67b45582c5e for explanation. Note: the 0xbc offset is arbitrary, it just needs to not be already in use. Signed-off-by: Jonathan Marek --- .../boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts b/a= rch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts index d18461c545547..f05523cb51cd4 100644 --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts @@ -897,6 +897,17 @@ edp_bl_en: edp-bl-en-state { }; }; =20 +&pmk8550_rtc { + nvmem-cells =3D <&rtc_offset>; + nvmem-cell-names =3D "offset"; +}; + +&pmk8550_sdam_2 { + rtc_offset: rtc-offset@bc { + reg =3D <0xbc 0x4>; + }; +}; + &qupv3_0 { status =3D "okay"; }; --=20 2.45.1