From nobody Wed Nov 27 00:26:50 2024 Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) (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 5A3AD482DD for ; Tue, 15 Oct 2024 00:53:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953606; cv=none; b=niQbnZmmQ2edCUFFOH8ITXRFtv4g1m5/gqkbKQAieN/wkLjNbesrpL4E6S+vKUZXy1Sjp4QLbUBXl1PkWvmlFP2CTCVk/mxvgd3MLJHcrid4Wwaq5ZJb7o90QNzhc5RCn/yEHq7vj2fxR2/+7rvvBlFJMwcZ+wVu/EE1htBdROw= 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.169 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-f169.google.com with SMTP id 71dfb90a1353d-50ce2aa412dso1478927e0c.0 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=hGpo30AGUrBS0/Y4JNk5NMW4c4Xf8AwxxQY4d4BhHJTmeqBBnGs+smATBWDl/e9e+c xDz+Z3xR7aSPXcjbfaBeSztfALElIhXqrk6mbQKCcMxMO52XPnUK7a395/vqzQJQ42lm gmdqN6ejnUxZoW+3NcqE/XtaR1fbA6UXxLuIzJLI41FucXYaaiLFRNlQQZPvrxsgwxwR zA9AwkLp4zCsMFe2SM39yzVnAVSb7xZvnNNkvuXRwo/1t4+WQkB/oQceEhG90SZI70tL QfKAXTJ5TAnIkSG8CXMa1LuvuaU1YKGDvJrazQPK31zhJeHrb2lHZ4JK6VfK0N+I2TZ0 d+Iw== X-Forwarded-Encrypted: i=1; AJvYcCXMd56hetDGni44oM8A21xOohBmkkGzEzKn8sjyLrEaRmLd3dp5zPBzgdYk/lCBYRNZv6WA6zt5eTwSVBc=@vger.kernel.org X-Gm-Message-State: AOJu0YzDipNsqliqbBalh1U2FFiPutXil73dnPwFBrh4nt0NscoXG2Eq 8yYAQ4+wJI3GTWeTcMuNj7GYcwyRZuX4fOvhcaA86VqVkBHWLMZ2xLzSqdZzVjo= 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-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 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 *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, + "qcom,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 +509,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 +519,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 00:26:50 2024 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (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 7400845BEC for ; Tue, 15 Oct 2024 00:53:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953606; cv=none; b=mI5H/5NjnIsHwi0Pd3+A/SWDVebqGzGL0QtXSRfAHe/iVOaQmUdc9vDF2WqCNu5waxcm4BVntgHP85mthPt29AoGoOVmmbtcrIp7oyfjnD9Hs5O/yqGJHPndFyKuF34A8PkAM9zAy56fmCQg/MGEW92KhMehGenjvN/9464Mhq4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953606; c=relaxed/simple; bh=dvNjYFdkB9YBWF1uKqg2XE7SQj8DOkKacGpixglHlcQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p+xAGHv1PL1ZjnYu7jw6ArNSiDQYqcp3u1ycPTIMH00PLbHme95C9uGqCS7vAOtXdpOE85B9XBo+kY/WRe9oGd2F5VogQjjgaFPlDAUrAUD4Qb4rzL9SXb0k32rOr9tCw5JmnDREQFbgXzqkwE4CmmJ8xntZgGROHZB06RV0lDU= 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.222.181 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-qk1-f181.google.com with SMTP id af79cd13be357-7afc591c69cso333782185a.0 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=TnPK17hcjgm//vtUpDECIU3f3BnIeLeq+qEMeDwuR2NaTyLwLIoIE6dm1sNxSSyTuV wUkCR0KItbrl6rTvDBdj7F4jjcx3p29LOKQF9EuoQPxsXgLgBDhqvfqc+sqsU9OUi3vc pzYb4PjRsAG+Q2zbEEFvykYAqUAubPJWI/qCrExJwDyxZhy2sRF5Fap3o0FnWuwIs/G5 8cSfuYmvj7keNe8uSHoUvShk2kaaHGuJolx4pjYyLdGryvhQ6P6iBR5B95JgHyMLlTfA ZF9VeE5Q3rPQUwcDsuW/YJVKCzHk/8atSKZ1xL4SjSAR0MgcVyvlz7q1LsI81B7SiobE yIJA== X-Forwarded-Encrypted: i=1; AJvYcCWu2HcwUuvP5ESlzZaI7EDPQcCHgek8+4OwXWXqqFB8h9wz8OMZ2aW6V4z+DCpIa/QE5LEVqDgMAy25cWM=@vger.kernel.org X-Gm-Message-State: AOJu0YwW+YXu7MDtOp2IZtx/+fh4T+/XJgfMyoQ2dRuWuN8OP/W6o9JO 9gwmmcFdqEg6eCah0lNbU7sSdDVH/ZkGVQHwHCbx7Wmd+hzQi6Pu/ibO7TiHzWE= 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-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 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/D= ocumentation/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. =20 + qcom,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 00:26:50 2024 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 AC47112F5B1 for ; Tue, 15 Oct 2024 00:53:26 +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=1728953608; cv=none; b=a0MhlGvX7cGiS/105ETudPMC2L3Q34jYrTBhifomLCs4Y7ZAbO3MxnXpODjwgmOm6SfBATuWtY21W9M2RkogKbtVFyclaPy31U5Vp4rZaDQkH4vLHqiTpAKHGTzXjxsaVtB8k6/cViCTYjo+6OzFUDM/4pn2V25wQ9ofOSH++aU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953608; c=relaxed/simple; bh=D/197BE/sOYqXX2tpg+U+8HUYL3PdYWLDigStzikrII=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c2jCzgiFAXoabLSFCwaP0cDoh/b8S/ZYQbI29XH7ml3psQtn7Frs/I4EgMY0bp5QI09Nr7bO6tUt8PjV2bdMKyeWNs3A+GEAsNuAmQmE0/n3nrSJyDsflm2zYAGr+6IXMJrvBdmpsXoWWkpddLJN6g6PMmGCsu+dirv/sk/RLX4= 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.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="gorHUc3z" Received: by mail-qv1-f41.google.com with SMTP id 6a1803df08f44-6cbe3e99680so23799096d6.3 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=h6FfTSGyZgCVwADDQpF9VzsQWz8OLbGxqHXf8m+gp95yZa16LA1UbJhJPj5PTqFx/I 4zDgSgUDBTh+sXQx8xP/F4NtR8DB6+qn1BfpuvcBG/hMQefmrIGqcH+fW598CjfRRJex i6UZXkf56o9r6hPyKPAth06v73bPBtx6SV8lDqv95GN62ZHeDLxPRACcXVjU+2KjY29+ RfkaO3rO1NYWraaLSAOegk5iv6OxZipKo7QJHWP1OPd5vN5ITbuTrPiiCLuAPqmx6fJK /DmNGN7e2bi3z9Spag9unwxSor/ca/SbZsPUAA9yc8NtqL2aUimSINO8UU/EkghG4S+3 ravg== X-Forwarded-Encrypted: i=1; AJvYcCXnHpYxCMK3QnA5Gk2pgVwSqjQcrqLHPl1LjyAYvm5brDdCmqoJ6j2u40nsnu0SF8zZJWqh78Btdm0b400=@vger.kernel.org X-Gm-Message-State: AOJu0Yyn+A+K+FuxpzT1d1eIiGbCJkbjbpXbNMW7XfXAI6aliUzKgVHZ dys6lZzVDZBcwmpaq2UXLLzWTY3bzIZ3M49TNrq7HFUbbwMvmb2kk0N+z+gBdSc= 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-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 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 =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"; + qcom,no-alarm; /* alarm owned by ADSP */ }; =20 pmk8550_sdam_2: nvram@7100 { --=20 2.45.1 From nobody Wed Nov 27 00:26:50 2024 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 2248E1514F8 for ; Tue, 15 Oct 2024 00:53:27 +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=1728953610; cv=none; b=KZikWanmysPHUX2HBpOE2nR3ygEQV53+CxOMxuKLW+g0E0DFvJ+fUfEfzqdi5/VMY8daavQgRKizmmlFmVOqNgFYRjUqlkvNPO88zNVgLJLJDZtnLLCrD5LvlKzB30/dTyv/kKyHyZ/2VNSmAbSd6NQMfSQA0gF1OI0YxDNS/po= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953610; c=relaxed/simple; bh=yOQYLbpufnAQd61mNPx8dF0RUdCNPiazkZMeVKYLML0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AkPf/hB/511ki527FEaSjt0KxsnegrgClraa+xw27TK89Vy7G5vWUM2TXFt2hVDcwJT1/SPt4MTdmMLVBMqwkaf1jxZi7e788zDGYh7utwGuO1ArmdSYykJINRw7aOsRSHP5EWq/RFH5vMgwKYD/Dphncuw04qKt/3r3uY5n2jw= 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.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="MiF2VvUd" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6cbf693d794so25587096d6.0 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=fQbtyzlbKvtqiWGQ65n8NRvP01cHFFogXP+wAax8TgZf6GH01uxq2OsGIkbtIAym+r FION15NbJ6hty9fxw2H6lBRYudoADcCzaoowwKH0+jO+k/LsiWIHY7h0SLxuYKB91m5v pln1Pf4aqZIcNfLX3odXxytpYqpKI5kT8EkXCnhc5ucYw2iMXFSp/lS+hpJjwYocIbuX x6hvr094/wWyLpUAC+RkAzwM20uFAFQvKm3/JSOmDGJWU3mR260BG58d81VCEGLdwg87 Cyd/S+M4e/pb/05D7auMjDfdNpUAeLfkzakGrxkmdBVcl69amLVBSxCI/awTRRx4Y+FO Z2tQ== X-Forwarded-Encrypted: i=1; AJvYcCVIDFFAfR7Am2cWsDEUhIbvfhwXlb4NXilrAtFAAQoyBPST3qeoxZr+LTB2LmW19X9m4zC+x56hiOBfLj4=@vger.kernel.org X-Gm-Message-State: AOJu0YzbVFNdKbRt6hJ6AF9wyKdopp1oV9Mw9/9JFod33NqpKidjEeMM +481B5IiZouULz7sDipWB+unLNZLEfLoz1NtxyfVXSi8xw6swPo8jenfHv+fg5I= 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-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 00:26:50 2024 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 592A415383A for ; Tue, 15 Oct 2024 00:53:29 +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=sNORR5NBsPhFpgm0nfS4l6UTkF025mkLyDyeze6ump+2mCBKFNDIbuwNHjTLvFs8bp+2swsCNFkm3iRraby3t3iFETq9H2w1+QNVWBDN2JJJqln/My0SfdAFUDpc6b4IB/YQY49DFKKM68Wi0QvGJuIpsm1psbht3RLlGGria04= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953610; c=relaxed/simple; bh=ARvTbpZoesd0jYRqz5wVnIxLACSl1t1S6Mt4dSv6f9I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bdD24eT1T9ez1uBgRaKNLtlVAzDJBEu1zlaPCgj+GDDiwKQC61bYVfiHLVO3H186GiD6R65y5kIyDGZd+DfohO2Qw+LomBRF7P2ZPLj0WW9zKLmtydPLjMH6fUpd9uN/u4nOf/62Ex92IUBfvWCdtKydKdhG0vnIhvOQ/fiMzxw= 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.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="Lj9uvTCY" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-6cbe3ea8e3fso34758646d6.0 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=nwRNRyBLrhhBwAwE90qYs5/ftRDhYiB7yX58rOYykhpIIlHxaNfBBKnbfKRJ+dC1Pp WvnDXfdGQvBmqjySkMxo9HzNaOm1AiIY4Yt8NTi2wgECkklO3WsXcjJd6pRU1NeKDlXB rE9toU6gC08Krj7q/NTGocwEa2W74n0ggVIgv5rm2I1TL4VeZ92Vg65xSJv7GS6iUtpD +8FfhVZP6hYW4NzvTKk3YuwKv/DOYtLmrqapL2SoEINtfUonxOzg+4Lh67A/Gg3sd4NV Rh8SVj+Ac8Lv4QxE0C6bZ3QmIibnKEbOk4DR+MwSR3QPMH3VJiriaCmKAe4ix9YspgpF 1F3A== X-Forwarded-Encrypted: i=1; AJvYcCUvxasGfJtExsbwgkXpiBVWt5jvzP/kjc7D5aWcIdZSok1yMjlOW96rJ/Tmeni1zqnaOJQ3bLqWUk2S35Y=@vger.kernel.org X-Gm-Message-State: AOJu0Yw7hCUTvJsJfFCK+VsGZpf3CTdFBIyewucoKrlN53uUbjPquJB3 JjAy0o1cX3ZgDGFmgoH7QzJJzBpnnZWkb708uyfz/rU+ON4PuLlBRspWNayNpdQ= 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-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