From patchwork Tue Oct 15 00:47: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: 13835594 Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) (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 6E1AB482EF for ; Tue, 15 Oct 2024 00:53:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953606; cv=none; b=kZ4KylQqLDwJoO7tzmX8n+V5+pbVVjSHFHCweMs5PlydWBXrdu91eKI2CkbvhS2jhSHAahhKXXowqzF540aoWf3eFMf6tVx15Wf8tsQBMBF32E+55yT4V+eUAO5YiNkXhftiT3y4S1XnnOtxsilm7bK5/BKsBHAJN+kraWWh3Lw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953606; c=relaxed/simple; bh=M9pSr77YpiD2gyGMSu3oZBYC1P5oFRrFGy32m9f1XkQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bPYStYTa6N4/vReo2EidHXOyZqycMN33eRHwkuwh0IBOQS3THMG3N/7+01b3SdzJlJcrJFfZXO92JObDDJe1z5ZRHQmQ6vJMDFB/FjAmGWBzFoZzrVMfy68t957TEzsEsc1chjh1Fq8tsuEePm+fOEYQMjUNpIj5zL5YNQOR8vM= 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=UqGOUIkB; arc=none smtp.client-ip=209.85.221.174 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="UqGOUIkB" Received: by mail-vk1-f174.google.com with SMTP id 71dfb90a1353d-50d5804c13aso452005e0c.1 for ; Mon, 14 Oct 2024 17:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728953603; x=1729558403; 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=IWfViXixCZNOpw64qnGzSzSKYZcS6fQ7/2LaWhKIPDs=; b=UqGOUIkBG3Z48e8BJhFUf1c0a/75rpKX5uBsxk8Rv6khjXaSJOw1K8QnFIHtm5opdn czYTcKkhL3ormypt1L8TJJDamMx3/VX99niZVxAkTCgPlpqe8YQbv/QeBeWJQcHz4ZYX YJyZUj3BdBGwnWG/Y7Dt5iwJMsGOc9kmFGLZm3Dx1jwjXlNTu9cZDkdq7b9et4OEsgal fX6DtHsUurV0hQcOANmEpFLlc2Xj1mc8sTusUI1GbfELgLuZXnmeM33ZzEcvrzisG80B M1xCcvtQe2KFYM+12cm1NCPFHNfW/s1hvSbNeaYDBzp2aZ+CN4FUexV37cAHyooOAcF1 19cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728953603; x=1729558403; 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=IWfViXixCZNOpw64qnGzSzSKYZcS6fQ7/2LaWhKIPDs=; b=pXFuXpf+eTWYNX4tbQqyMMhegxRC1iSaDVJiAgXzT4ajRLvuw9b8N7xCegA8RLoBue uPDKdjme5tAcV4gAj/i2+BhexNGnMwrUR1JUHtXmR9VbsEDIpLkrytcSTSZCI7pLynlC ks9fN8uTBr48kFEvdDvBMTav3ZoIAI3f40XWTuieC5G7fO4Pq2gWxnGtRgRtZlO5NJy7 qIZsV3RpKOVAoAMlGYxjEGPpcjVBDdNnltbGKVvnmw5r+GXAggaTBgJBQRWA6qV50CLm YgAU4MIsLo9k9KNdP6bjvFMBKG41+PBzbBvM8sKoqN30SdXgEFC8bjq4TWpZMFBRiQ8O f98g== X-Gm-Message-State: AOJu0YweY4v9lPYfrGNCjXJPB8eEwtpeHMjoL4oyDtiKlM+irBp1Q7dM uVwKOTJXbL3k59WP4L2DYu7+Q8ImSxcuqbu3hWwQBI/qDMWUo0E8qMWMO8HNbAoay8K/nPDh6Ab 4pH0= X-Google-Smtp-Source: AGHT+IGvbaoUJ4CRlMi5XS2flUCfSbsR4fRBcjNweqxMEcN4bKyqR12UxbpDWubEBGNcicnOeX9jhw== X-Received: by 2002:a05:6122:268f:b0:50d:3ec1:1546 with SMTP id 71dfb90a1353d-50d3ec1165emr5612872e0c.4.1728953603262; Mon, 14 Oct 2024 17:53:23 -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-6cc22910f0bsm1213956d6.16.2024.10.14.17.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 17:53:22 -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 v3 1/5] rtc: pm8xxx: implement qcom,no-alarm flag for non-HLOS owned alarm Date: Mon, 14 Oct 2024 20:47:26 -0400 Message-ID: <20241015004945.3676-2-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241015004945.3676-1-jonathan@marek.ca> References: <20241015004945.3676-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 qcom,no-alarm flag to support RTC on this platform. Signed-off-by: Jonathan Marek Reviewed-by: Bjorn Andersson --- drivers/rtc/rtc-pm8xxx.c | 44 +++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index c32fba550c8e0..1e78939625622 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,14 @@ 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, + "qcom,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 +509,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 +519,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 Tue Oct 15 00:47: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: 13835595 Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (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 B12E24B5C1 for ; Tue, 15 Oct 2024 00:53:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953607; cv=none; b=aG/zsKjPi+fHcyAbbKkiNkSVFHDTEdHvjk85gGQ021A1AZgb3ujNU1xvHjsqKk5brV090h81e5768gzUhMQPWETevs7Sq8LiY6o82l9xvST+0rRkh14fXHljt9AI6PY19cBpvLHs9+NKHEUtZwzunO1rMuBAR/4PhdEO8jEtg1E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953607; c=relaxed/simple; bh=dvNjYFdkB9YBWF1uKqg2XE7SQj8DOkKacGpixglHlcQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kb4R6KuAQkF4prWxuJcBUVDbfcujExclP35SDmxaSczCeLyb6l8p3qjoUG2UJYEchLQcL7VriHlZy0CuoXB5vERMdHA+I737hBxoBSj0PShMkrTS2L2q8sYwiOooQn5C0p9vzsJSjH25KO+u+r+AkED7QklyrC/DXVhfuX//Vho= 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=dWGElcM0; arc=none smtp.client-ip=209.85.219.41 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="dWGElcM0" Received: by mail-qv1-f41.google.com with SMTP id 6a1803df08f44-6cbe53a68b5so31606116d6.1 for ; Mon, 14 Oct 2024 17:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728953604; x=1729558404; 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=uda+QHOh70dpYmmcKG6PZmo8FX69gZoytF2iY+WgOps=; b=dWGElcM0hTAPHWsUseKmLqyWJSaJS3/A9VnvaLekSMmhCpLwZ/fEfIABHws2+mhBu5 JOvml0jg4Se0MGB/L8JTFiQHBCVjzXNJOq68M3XFudx/eQ3DSqJ7jXC/x61wbYf5caAc dO+HLaQKQH6d+vqym6KMVBHEngAmvt9ZDc0R4xaojbvcxQJZfel0WVF4O8pZfkCWcT9Z 5ZOkkS8oLr0cKlsZZZrjDlT0q/6G2mdQ2vyXACgLrnmNs4TEchBj1+K2DS4ovWBs1dUb ty2Rd/ktQ/P0CBLLbccSHCOZcwYPjJZmRsKr6Dl7GEGSvHddnAShe4jqeUh4kR/1ARqP Ceew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728953604; x=1729558404; 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=uda+QHOh70dpYmmcKG6PZmo8FX69gZoytF2iY+WgOps=; b=JQqtNQTjMeQ7+HMKiIG+jHoce2r+kne8aHwdzWPAr+TZXrjMv5TeARSc81jdyJ8uyV TLLZfiYw00mjLWLHsl8yFRWr4K0nqVsgvCxg/TfyiupfRK65A4IJHWtkRQQJYUwNJpE1 CAaI8BHXS/HzaTpqZXr/6NpQSlt0i+WMe5mHciuNQdS1kQPhD4FVRbxlW6G1aZyu+fyt VqF6FwSVRtcgfIQIQFGCG2v0NGzm0/2e/6t400hegnCHEcovRSyKJ8g8WkVBsFngXxrm 3gNRkOKkuBKA6C0NGot5WDb+KhzCGc77SXwUADGapnF1JeXiB0V7XqHrhJgs9JCnsRvR mceA== X-Gm-Message-State: AOJu0YybpvfkKf3ZrNzWjPg1zG/f2e8PGstQJXs6hrPyDnGNqrJKTmuk 7nK8g4KtUhmhtzGkssw8WadvtPCJ8f3ZHTP+ikqjKN+6rj3V+CodEZ3/jy9vpYr9oa96kSnVQPP /o/4= X-Google-Smtp-Source: AGHT+IGujS0YltsUyvVwBJrnueAylsfkK9nEY0qY3I5hzXRc4d5fo+ZlRzW83dHau6iTWTFjwpcg7A== X-Received: by 2002:a05:6214:46a0:b0:6cb:e452:2cee with SMTP id 6a1803df08f44-6cbf0074708mr283404276d6.23.1728953604437; Mon, 14 Oct 2024 17:53:24 -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-6cc22910f0bsm1213956d6.16.2024.10.14.17.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 17:53:24 -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 v3 2/5] dt-bindings: rtc: qcom-pm8xxx: document qcom,no-alarm flag Date: Mon, 14 Oct 2024 20:47:27 -0400 Message-ID: <20241015004945.3676-3-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241015004945.3676-1-jonathan@marek.ca> References: <20241015004945.3676-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 qcom,no-alarm flag to support RTC on this platform. Signed-off-by: Jonathan Marek Reviewed-by: Krzysztof Kozlowski --- 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..23a5316efadba 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. + qcom,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 Tue Oct 15 00:47: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: 13835597 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 E765E14F9FB for ; Tue, 15 Oct 2024 00:53:26 +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=1728953610; cv=none; b=ROcZ3vr516b+4yI+uQWIzgPfKliPo7VvSsNOVKUJJ3ObxarFi9M+rez2L9DYdrqO5zPV/LHrX2JpxRc3H1YneUlcjuMM8LlSYCLJqQxTHyY6Hu51bsqFRlAiiZKhBy8vN/WL4YdoQvMInnex//fPW5xk67w6cMnH9ypURDAdYDI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953610; c=relaxed/simple; bh=D/197BE/sOYqXX2tpg+U+8HUYL3PdYWLDigStzikrII=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TO1n83k+WUwvaoYC3xK5YaKNTb7hoWU0l0zytFbyaqDz02vPMMdK9jQjsKzMZf9rsT7YHTZwzaWaknKKjc34Eo0imHqqGYvd6qmhVZfnskIDE5ScsQMvUJ8gg6jES9owXO7mYzuquqB4jN52BsflG01l0x2KFNhpdjdVztKPRnQ= 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=gorHUc3z; 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="gorHUc3z" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-6c5acb785f2so25375806d6.0 for ; Mon, 14 Oct 2024 17:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728953606; x=1729558406; 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=G5sMuvbvS93s8VBrWna8b+u0k8/Hrp83bAMUi4V/Ays=; b=gorHUc3zWdnogJpmKPsaTFysElvz4KTihj2uvNlOLTgFiYTpMyLVyYI7i7AoVl1FmE gMFYJZZAxBLFKIqq6XP8jubxYveXYJk+zdNQw96jey9Mu8X3tKkhRa/aR/xkgGtAJJ8g 6LmPnHiNw5lIwhDAUnWbGlAgonmNHlu69q5oDHVeCC5JAjW1k9oCsQL9IXEiaok5d82U UPq18iCtoGbvsA84rT4hZBpFFEfL6JcYifuAlIcUxJjetGCjzBnQBDHTmSdcoi8z7s0F oyycz4IcrsK3X5PkK07RMCIcfeTS5b2uSpoU+G74lMXIGp2HPQJcr0uup7hwK3mKWawD 3WmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728953606; x=1729558406; 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=G5sMuvbvS93s8VBrWna8b+u0k8/Hrp83bAMUi4V/Ays=; b=WOHR0WpkjSAR34GQ/Je/bHxRsbpnFCMTuTB36UKcFS7P9FZXfIYeWtcuO/t2Kjgs2u z7NVbtBIIFVHbxzv4bNiyxVV+e2HuS1BVaEeekx8wEWak+qZjFooHwSPJu3923mTQwss IH3Bv5PEDJHNS4pCuVyTQShzCe2XS9gotpoakSRdswJa9MDTaYbDaHTe30N6us8+PoeT Htc24mqmH0chTgHuqbz0hMseeIudYAjCR71hdb5UNv0SnBdHL+iNHiqV+G1EbxOma24L 3rDQWJcnED2KyglqoRbxym3Ok3STMluNVAHOFrSJt4+TclEIZEPn+7/BMu157h83yx1c Zq5Q== X-Gm-Message-State: AOJu0YyBy+nQJYa+yNrcHIoe7RCj/+hTZbZox9g2MMHwH7tgM0KBsiG3 cQj9D6lK1IFM6k/UkcjHyfoamcQwMYaahxS+Cc5yyxqNaZ6V4oFfiSfLCocPdqK0t1smvfk/67Z uvRo= X-Google-Smtp-Source: AGHT+IGXvonG83/eQIbYXj3ksxCLZFkMceOKEHMdRUwHpyHjjqjMQeiXX3BEFIWdL8gQbPL+A0apfw== X-Received: by 2002:a05:6214:3387:b0:6cb:ecb3:4d3b with SMTP id 6a1803df08f44-6cbf00ab35amr199972566d6.42.1728953605683; Mon, 14 Oct 2024 17:53:25 -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-6cc22910f0bsm1213956d6.16.2024.10.14.17.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 17:53:25 -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 v3 3/5] arm64: dts: qcom: x1e80100-pmics: enable RTC Date: Mon, 14 Oct 2024 20:47:28 -0400 Message-ID: <20241015004945.3676-4-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241015004945.3676-1-jonathan@marek.ca> References: <20241015004945.3676-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 qcom,no-alarm flag. Signed-off-by: Jonathan Marek --- arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi index 5b54ee79f048e..b665cb75c2b75 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi +++ b/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi @@ -223,8 +223,7 @@ pmk8550_rtc: rtc@6100 { reg = <0x6100>, <0x6200>; reg-names = "rtc", "alarm"; interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; - /* Not yet sure what blocks access */ - status = "reserved"; + qcom,no-alarm; /* alarm owned by ADSP */ }; pmk8550_sdam_2: nvram@7100 { From patchwork Tue Oct 15 00:47: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: 13835596 Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (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 219A914659A for ; Tue, 15 Oct 2024 00:53:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953609; cv=none; b=VK9lXXQ96FQ0YkSVnrnmadtNv82ZPFQwXqdK9mrOetRQy1c7t7wigR80Kc0nPTQawBf6k1kBY+4doV9/mFhhgIjpeLHmGPI6FgPFh8KCcIPEkts1l+HhH29VbwMRIFYjwluxGj8kZkdBOh8xj3UxK1Sk9nHZQVQ9EXYhVAeuR5M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953609; c=relaxed/simple; bh=yOQYLbpufnAQd61mNPx8dF0RUdCNPiazkZMeVKYLML0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MfUy6nKkcOYG0PgCrDv+uQ8pF1c1TDxi2UQ+krlmiX+a1iLpqvyubI/5oOhV+86ZBx8OmndRuafBSLFQdfTPsPYMpI3DIXJWs59jJTp0nPgSsnF0QEcCfJtn9NqJEm1BLU01K2VvtC4OBUxmzLVymiBrW6uS1tBBfbfAbTW/aOs= 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=MiF2VvUd; arc=none smtp.client-ip=209.85.219.52 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="MiF2VvUd" Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6cbd57cc35bso44604646d6.1 for ; Mon, 14 Oct 2024 17:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728953607; x=1729558407; 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=MiF2VvUdYdYBK9wE5b5WEfODl9qHuV4n6lmqoZLM1awZZs2JTtpb/69EoS35UcUuP2 x3nY7h9T722Gpn/HkHF01khkVckDzODWFWbKFhDxI779CFOVDWKlnEqLftdS0YBATK8y L/mlTdT7lzEGpqPsEAzrZ4xw9zIdBvDTL4oErltuGI77Nzcw1epFUYfcGVRzHVjRSSKr p/uMODHjD4Yz4+mGmYqfgSSD4GVjNDLAHGFMsZpamuSjbtkkaV9ZEY5pPMDgB0wiF/E1 RqyZ6Z8UCr/dSg4u/yLH9AybiaG8GJxTHjvruaBopgJENCl+HP3w60G3K+I7JQiZuvYT q4TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728953607; x=1729558407; 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=voiIGU3eTvh8Eu6pqWCcQVth23yaiH5vqkXpDD3msiWjr54mG000+TU2XMxcTGTjLg cUK5gUm4/H5eEYEcpdfgV7UVwrdtgqn3YNTgK1a48GkgeJLNtBzwnm6z1pxvZ5O7ic3C J5cLQVvqhWXeioL2zEeJGThRqMhZZG42KrU/BtzBeslRBtB4+SnguD/4CSFM/vHNXDfc vaDDE0hsXJrCAMqo6WSYk1uxC/Aan6MOXOmIgpNRWjG4/Eyr726C6zIpgL+JWCqmQVN4 ijN4vzlfirAY6VLNKd5yCu8TF6jHhEdDlt2YQEOHhOPHMAMfVI2v0+n/uuitEt48Oa+e nMhQ== X-Gm-Message-State: AOJu0YyFr3ft8mjO3xCxhjZc7PaDvmU4HbhImrZWp9vA0vpfd8hP29Mr ZhW8aXtNdSeR9bc2ARbfroTV69MB5AjYkY05J7Cyw3G+UvLBHWcgFFgpD0n5BRUnEElRsH74JAl RTdo= X-Google-Smtp-Source: AGHT+IH7AVHW9VFOzpeP6x4ojtz/8ibyMXkPEVnAGtTyL6fVgscFm6vGD8uJ5o1+Hzti6qm2yTnlMw== X-Received: by 2002:a05:6214:5f08:b0:6cb:d0a3:35ac with SMTP id 6a1803df08f44-6cbefa894a4mr225021416d6.8.1728953607014; Mon, 14 Oct 2024 17:53:27 -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-6cc22910f0bsm1213956d6.16.2024.10.14.17.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 17:53:26 -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 v3 4/5] arm64: dts: qcom: x1e80100-crd: add rtc offset to set rtc time Date: Mon, 14 Oct 2024 20:47:29 -0400 Message-ID: <20241015004945.3676-5-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241015004945.3676-1-jonathan@marek.ca> References: <20241015004945.3676-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 Tue Oct 15 00:47: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: 13835598 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 86B791547C6 for ; Tue, 15 Oct 2024 00:53:29 +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=1728953611; cv=none; b=VQoKlBlVTHbX9t1Ajif+prZhOwnLK7aiu8vS9PguN+6d25tWVcOsJAdHJyoIowyQsgJdjwafV9bHRCq7ASwlJ9/deIfoVAcORyQS1xqnJ6gkYAvU+rJDuLMaMQoUxWKlmWtVVr+AJMNWY00fgMHDwglXL7/hOFjx0eUzP9bCjEw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953611; c=relaxed/simple; bh=ARvTbpZoesd0jYRqz5wVnIxLACSl1t1S6Mt4dSv6f9I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y6a+zT4m5sRGgbdTN2hru8gcz4M2u8L6AdV4rbM3Ed3rNmqP3hPv7mR4ydGTq9K7gjyISnGM8h9z6PE2Hvkw7dFzgRcwedockp4RpkS250QlykXP3akmcCobVeNW2yaBIbCNYTtC4WM6Pi0KeHX/fgwsy6Piu6AVcU5j2xxNIP0= 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=Lj9uvTCY; 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="Lj9uvTCY" Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-6cc03b649f2so17392336d6.3 for ; Mon, 14 Oct 2024 17:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728953608; x=1729558408; 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=Lj9uvTCYw/s1Y5RYSVWvx9QISU7CFXRr6Br3U3m6y6AgfIB5u1Iwn4AMkfZdsLpgDQ wcCs9d3RBsLMayvLD/ZYUQb9srx1i7ojpUe3m6PvXhrKJiDeRzTL132NWdmjHo4H3TpZ IKMtkf2zFglqYMuFvXyHm+MVqZ/l6BODr46TtDqiHcB2eQ07xoVwyvl4mpFYwr+8mxbX rp+lsjmvbj3wK868E1bdyqFzwr3SIU2etVwaG2nQKEiYdoC1VMtigTFFbFQwKIL7WKFW Jy5e4Vv5x7gLIlFeQ/8/O0LiUqc2RawEf1w8O//2UZGnrNVWCvM/2uIHKelxcLES2zJf xDSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728953608; x=1729558408; 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=I/AsX4gzXr6cc31qL+izAtQNgqyLItigCuFWs8d3wjCc7Is1/2UFwnHjxfGObZRR5j PWxt7BF3nk3JNktpuJ2Sl0Mpy4GYfspMoJZYUYNrACmYt8VXRUkMYSgZzMqS4EFnzLvy 35M2nCdvg/g5OQoipCneD0ZRNaotsk1uFL9BeW2dAf7M5qTO65LTSlFKEJIt6nlbbM7k CxemjicYDtO5g+hQe/jc0yCjNpG+jUqqpznolr3j9wvRnk4d9kbLK4/znQqJJxyADhWo pUzPY4+R9swtjApGzIfeIOgN62oqkb5F+YPoT6jgEaJ/Zy/lcPjekjGo+ez4iQA74k66 TzUQ== X-Gm-Message-State: AOJu0YzgyxtUSYXiFW2/4f6WFGqnO/TF+8k98TcKs6jhj1Cl9FlGGK6G olOji83OlcsdLfGO0dCg+qfVmtz7rYf4vbFAb5RT7KraW+Q2aIh5H7VlTHrCm0LoPYsQ2XUwGQN 29cQ= X-Google-Smtp-Source: AGHT+IHf0nAGD+4xCXnuvCm+B5XwJ63HlvoTp9hlVDxHTSlAp5n2GzNISk9in5eaiN2OJu3vbb/nAg== X-Received: by 2002:a05:6214:3b83:b0:6cb:6d58:eda with SMTP id 6a1803df08f44-6cbeffd31fdmr217094176d6.23.1728953608327; Mon, 14 Oct 2024 17:53:28 -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-6cc22910f0bsm1213956d6.16.2024.10.14.17.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 17:53:27 -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 v3 5/5] arm64: dts: qcom: x1e78100-t14s: add rtc offset to set rtc time Date: Mon, 14 Oct 2024 20:47:30 -0400 Message-ID: <20241015004945.3676-6-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241015004945.3676-1-jonathan@marek.ca> References: <20241015004945.3676-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"; };