From patchwork Sun Oct 13 05:15:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 835132 Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) (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 1C7376EB4A for ; Sun, 13 Oct 2024 05:22:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796961; cv=none; b=SXHVU3n2G/ytqPqIbjAbDBzYVaTVI0aBcs20tdDjVRZgpL5P4BASXNtPVTk0AXhDiU19Ozl9g/BFOT9d5EYG3EAKulsDZdJg1usV9xwp+zJDiYcN4Ow1MVCR3j3AYmWHf1HqbLi4AtN0MRoQ8QZB0l5OEkyTnhaxMfvmyQmZ2fw= 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.44 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-f44.google.com with SMTP id 6a1803df08f44-6c5ab2de184so21564166d6.0 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=qyF5FotGYP28uboOPgXxO/M8RCrXVAOGD1vCHZaTDFdt7pOgb3RmKmc3qHJcKQ6j3C 2Hm8kKQHmV0TOHe+g5UClL9fn5tsGnMDw7tlNz8tIfUv2AL/HHA4YCHOq89QYuR3/cUV Q3yN2kjZ7VtArjA2SYzOuaW0OGqV4X/IC28v2H+xUkmD3ZCYie9N8DN1HCsJXwbtPyY4 HJLoMaX9GkoYGD6XHmK15drcC/V+iv8AiwAOujT1YcxbgiYAzqaNzf2MgDELawh0v7cS BPUF2Ton/AcXTft4G9CL0rzEWpV1RGaafio7v8sdcs/HCt+W/lPq1N/OXkULcJaZdNff 3INw== X-Gm-Message-State: AOJu0YyjMsJshR/z2hbroPWJvBpGykTuzdSnXDVe2cVeJvapzUq2CkD9 qgcSKRbC3xnklz2yi2KyU/5B+QobasrLHEL7er6J/p1Xh7mdpnzrIhkNlIpv4iluInyk2a+oPwK 5Vio= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 *pdev) if (!rtc_dd->regmap) return -ENXIO; - rtc_dd->alarm_irq = platform_get_irq(pdev, 0); - if (rtc_dd->alarm_irq < 0) - return -ENXIO; + rtc_dd->no_alarm = of_property_read_bool(pdev->dev.of_node, "no-alarm"); + + if (!rtc_dd->no_alarm) { + rtc_dd->alarm_irq = platform_get_irq(pdev, 0); + if (rtc_dd->alarm_irq < 0) + return -ENXIO; + } rtc_dd->allow_set_time = of_property_read_bool(pdev->dev.of_node, "allow-set-time"); @@ -503,7 +508,8 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rtc_dd); - device_init_wakeup(&pdev->dev, 1); + if (!rtc_dd->no_alarm) + device_init_wakeup(&pdev->dev, 1); rtc_dd->rtc = devm_rtc_allocate_device(&pdev->dev); if (IS_ERR(rtc_dd->rtc)) @@ -512,27 +518,36 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) rtc_dd->rtc->ops = &pm8xxx_rtc_ops; rtc_dd->rtc->range_max = U32_MAX; - rc = 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 = 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; + } rc = devm_rtc_register_device(rtc_dd->rtc); if (rc) return rc; - rc = dev_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq); - if (rc) - return rc; + if (!rtc_dd->no_alarm) { + rc = 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); + } return 0; } static void pm8xxx_remove(struct platform_device *pdev) { - dev_pm_clear_wake_irq(&pdev->dev); + struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev); + + if (!rtc_dd->no_alarm) + dev_pm_clear_wake_irq(&pdev->dev); } static struct platform_driver pm8xxx_rtc_driver = { From patchwork Sun Oct 13 05:15:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 835232 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 7250684D0D for ; Sun, 13 Oct 2024 05:22:41 +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=1728796963; cv=none; b=p6LMFnfj1C2xDl5bRpCzLbKpSpWU+WYa7+Kd/j9rMoVTf3vptyvhhGXYr0bnOD5TbGfRzAcmKjPrMkB4Hm20LQmZm5os6qqQxm1JtUo0xbuj/WwdCEw+aRFNX1y0zM8rPWpsSwJ3pPNLWiboo9lnUOwPKHp6rWmAsipnjbhOpgw= 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.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="O19POQh0" Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-6cbe3ea8e3fso23719706d6.0 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=BqEQngrPY23nddS5rzAg8mhZLpkVrFA5aRavrQhRtQBDEZKBaRQ5NrLuEUd/bJUN1N /ofL2Y0EtaI79+OBXszCvceDp/ZvAatXKm68/e0mhlZ2DCFEza0ttbFr5T11EIkPoTL2 7ysrC5sTSbVFEKS2BDRfzQdmOg3wgVA8Vd/UtHXfn7RpPpokxJ6hugTdS1D66fJoLpmO 3lDq9HubkBbHTWBPylvmua1XXvi4Q4aJEw1OAFkwHyYZy1KGGGKV3S37EeY2/wROLt+Q q77CkQ+74m3lgFWTZ36SUT8mNwef409J7ACgvna+x1ClYLyZtaA4b3xFG2rACq6io8wj 757Q== X-Gm-Message-State: AOJu0YyKm91tCS8qJYNiUFSj0yEsw0R79HYTIDnSG7dztRMu2XBt78XD VOdfc1kepJhCKWZJ51lTyammYTSHW05Re6PBs2pxa9ezOluHK6E538k2mt+dbAjeDYfzsw+FTS4 94nw= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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/Documentation/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. + no-alarm: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates that RTC alarm is not owned by HLOS (Linux). + nvmem-cells: items: - description: From patchwork Sun Oct 13 05:15:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 835131 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 AADE313A863 for ; Sun, 13 Oct 2024 05:22:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796964; cv=none; b=d1kPE32ct2/YAREbigieXWgetSXuZsrxoFCqNq/YhnmCiEXwAs5TSgOrIyZISPlvmVyhMwyMUW5Ylc7Cp7bwwdTkWSyd8XNrnBuhgbkamT81/01XIbyZi1v48ey3y7hc3z2TO/22qnSMUiz9teNJat2BSYvRkPvDt+e4Bb1w6q0= 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.53 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-f53.google.com with SMTP id 6a1803df08f44-6cb82317809so24002666d6.0 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=mBgrJVqvjtdtLlkLw7scpfqaZUONxpSSvZcTUZO4hX2OSRaFG7T+Y9bj3M+dtT+luQ gS4fILTY9G9KAV6RgmmETlOSwjFRro/Cp7c+Rjo5kdwPxB6Xv5zBbSAj+EEK1rO5aCb7 nbWTKxJnrY/EJe0PMYL7LrDx3IPwrOyI1CgvFhZ1f6qk6LhtdMkrrHWVpbsps3b3on0E YLeS0/YuvUlng6rhHcJDHcWg1rvWftUXMJVA2CH8succM3/mVmg93JVm84HCFGpvWIsX uObdb9QYDtg4lJJBLkKBHKm66X0gZG0pjtGVhebU5PttW0qEsnlAE/FwsQ8qWabv5KKk I+cw== X-Gm-Message-State: AOJu0YxSvjZFijMc21bwcgy/uu9/pBy47UcWQiuymkECIg4TorEy7KFc LmHoswbjP3mWOEF50vwcg/0KvDg6qq6B6EFcBEh0Gk44vB17+h3PpCC/dWkBwwQpncmPQ2cqk1T Ijdk= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 { pmk8550_rtc: rtc@6100 { compatible = "qcom,pmk8350-rtc"; - reg = <0x6100>, <0x6200>; - reg-names = "rtc", "alarm"; - interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; - /* Not yet sure what blocks access */ - status = "reserved"; + reg = <0x6100>; + reg-names = "rtc"; + no-alarm; /* alarm owned by ADSP */ }; pmk8550_sdam_2: nvram@7100 { From patchwork Sun Oct 13 05:15:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 835231 Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) (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 DDC4513B584 for ; Sun, 13 Oct 2024 05:22:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796965; cv=none; b=rUMBRUc/EyYtE8WKeAlvAhGCpBcOdEwKmpESvDH7HBrTEIs6u4wVkbhq/roKvCDTBAFqUzGdvG2tFVN6/wG9/FWHUH1zqfiCO8JsdbrXnBw9RKbv8EgnnMXZGJNJsBW3fKCX+T6O0mfC/ka00aOVh5bdF6Q4ILw8ksRvf4SwBqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796965; c=relaxed/simple; bh=yOQYLbpufnAQd61mNPx8dF0RUdCNPiazkZMeVKYLML0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eMmc2nZJCihnjhy5HlPUUHOfWjhFdBDPvGe7OHxcKu6lR5kPh/LBwU/U5c4CRH+jvGsqVAXzX/038V2KIySNPsEy9PwuyWmptWcEl987OMOzjUjFgBhI2cgIWeUhzGMNQunX+esybzE74I+g/DqX6ntKSJkwsq221Es6V6p08s8= 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.44 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-f44.google.com with SMTP id 6a1803df08f44-6cbcd8ce5f9so30119006d6.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=bdJ08QCcJ8176CHF81JE3RXhvKwkLdEt+kQYnw86Rpaa2KfJomYN9uj5q1GMSwn1kd +p6Ta7lDcXdgda5wRjbktjjojeyDf7XRMkpxd3OlyccreVAFMRdJwCj0y5G6w7uj7bij cOuQFKHQ//VIZ0x1TN9ddysCo2bVA+X+XDCwjrOJVNmXZw+m1oAug+0Z9TJI0FkAgA2o cgQvE/Gn1pd31B6KiZfB8JoyFbd6IzvEt66pVBRskJz0pXHjWqPNCndr1km3178Pd9cl yszpg5FFseQyMMbDiMtgEY6S9xK7w+sx7QeAbm0RRY8W9M7EgWf6ZjhTFAj0AtBOHrLu /KuQ== X-Gm-Message-State: AOJu0YySlZUR+t0j/wMnuzM/9wgizOy9jz+KeeG38qb1EovL/fiQ+kXg bTJYhxjoif7W5smzDKmHZAu636Ge/e+aox2Gwipru6KhO1jAXg7FppiqWbDaVC81+WCxbMOWpQ5 aZr0= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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/dts/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 { }; }; +&pmk8550_rtc { + nvmem-cells = <&rtc_offset>; + nvmem-cell-names = "offset"; +}; + +&pmk8550_sdam_2 { + rtc_offset: rtc-offset@bc { + reg = <0xbc 0x4>; + }; +}; + &qupv3_0 { status = "okay"; }; From patchwork Sun Oct 13 05:15:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 835130 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 2BA2E13CFA5 for ; Sun, 13 Oct 2024 05:22:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728796966; cv=none; b=Ho5huASBNYD5HJF7I5WUtY8LMRPY7/VFEcbN5dh2xoVwXTbWVaTCxz9N3xMAClgQACjdii3yc3h/oyaY6UWKMa918CNDbyEtqDhERnKi7i/yfcgW7IEpKIxjG4KS4M8Gxqq2BNG3vOMS0yrrmYNiT3V2rNnehGmtRVBi8ERwJMk= 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.49 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-f49.google.com with SMTP id 6a1803df08f44-6cbceb321b3so27108516d6.3 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=p9XwFj3PDb/ThTCrnszbKACTfPSydByCU/4fEitmxongK3TDmYi9qZVUOLdhjJbn71 6ho9vo85HCw1b7ZuQAPdIFt7qzxQK2C1Be2OIGB5oejgG52jyoymNP20aExDnqjwL6wf q7qKFK1IPHUE3fvzMkn3j62SD8Ns/+CEgekeMTxEAYwVl16Z1cTXIg4MKb+ch1NVL8S+ AXxAkcjaXKYfKciRqOrp42SVcev5qhRugsGn5VAnn+pvYJeOgXtAXsjARgw+1+ZDDGKo RXKKW56nuaAeIkvCFs0J3s0Ohd9HXoe1bHgqaukOjprdTD7IK/Jx3lbxQNoCmU/y5rQY XGCA== X-Gm-Message-State: AOJu0YzjUwOxKBVXH05A/WGnF4t9+zI73Gi9XcfsOIqR7MzCrOsmzgj8 OZJC35mvpGZOjMhhV1JID6SHfhsa61cxQpMGA2c4Fo7M7GHS1320KWMRPXVa9v7u9HuDl9nJWjg N0mY= 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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/arch/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 { }; }; +&pmk8550_rtc { + nvmem-cells = <&rtc_offset>; + nvmem-cell-names = "offset"; +}; + +&pmk8550_sdam_2 { + rtc_offset: rtc-offset@bc { + reg = <0xbc 0x4>; + }; +}; + &qupv3_0 { status = "okay"; };