From patchwork Fri Oct 11 15:22:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 13832659 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (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 0382B194C78 for ; Fri, 11 Oct 2024 15:27:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660454; cv=none; b=d0Dl6wvUHqlTHIYvJoYAVlqqVk25t5yf0EhhsULsB7nrh6B0OuCyWT6UGhFE4oh2E/9H9CjK+RZlRKD1FlpMu3abdt4yop8Rbz1EV6rOatFopItMK8VGha/MDI1Vk679NqShplLrkKC2k2hnx3pU6Art4tGFra8mYq9X/LyzQ2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660454; c=relaxed/simple; bh=m279UNxDg86MeiepLCsRcDWK8TQ3a2VS5ATEvwMBUgM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LW9vcMccbwWYpHH3Ka1vvIbqpnz4V3QvDeILQExv5DOow8LHyC29DF5X0loY6ixi10HcBj3bA7Ttcvcwuay0hx/59tCrcA6Zz165W61PlKGyaiuhJ7YYblkw7jC3hG5Uc48pZHnRLoM9EPU4rY8CZQUAi5xe4u0NOQUCz4y79vg= 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=LDgX+4bX; arc=none smtp.client-ip=209.85.160.179 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="LDgX+4bX" Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-45f07eb6f5fso20059981cf.1 for ; Fri, 11 Oct 2024 08:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728660451; x=1729265251; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ENjo8WaNMM2SxgI285IjIz9pg6uqFRWPMbu3WxVYb8I=; b=LDgX+4bXqQ5v/UyT/v1RwVyRnbGeiiY6nnjGiKrlQTlg+MedbMX8cw083PAjEejltd gMZs8HphK9HP9U3a9hADp4FvQ8SCwgJjrbI/J2VI3jrxJ8Q4b7B+bSsT5t+iERzJYtdh xatTW4X0Xvd8h4NBGA1vhDJtxRExMMts/uwXYYNgducWOKibNKFoeL+4CwdjVbRYsySA 85EM/e4PVhBvLGNldYidKu09zxMCkDd4CTzxQ0LDN0mT8X+oYgZSB4Y/To7gqTThZYnh 6IdylrTnLhoLzr4OPZ2CsV2Y5liVi+ueEtgVnGYVnizTyiZ/Y7FDg/yrrXFaomt23OB9 bjDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728660451; x=1729265251; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ENjo8WaNMM2SxgI285IjIz9pg6uqFRWPMbu3WxVYb8I=; b=FeVKp8jMrPp1Buw4BLvQg/KSmortVeW4RlAsFnhocymPjl++LRrak8UGVQr7kLsfk5 lVka+gQzVrnEYg2BWcWP/tiIb593WPo7o0gD+cFNEdKG1/b3q95qKMSL6Po+2VQ2IHUI TDhP1qbB/W3Jq8Cgv6DoNn/4Q440CA6n45OcUPd/rD/H2tXWXtDhSA19k+fhest1EBBq yvb3YtHmyG2dEWfn0IeHkxwtLOTGfwOE4MjMGW8+oA7kF3tKdTBlXeGe3R8PVBsAha6B xZxDs37dLaM/qtxCIzM1u0RKIQhkc+7qExcGYaetz9k+aOnZ9laSy1IdIMce+nlj/FFo zUlQ== X-Gm-Message-State: AOJu0Yylpji3P6kG89ZGj1DEOOh0GtnZfvSSJUIdfOxTuY1EQX+xbPMp 1XKoyjjpl/6bl71gItgJZeChLx7ZRMDWGD1XPm2f9XvFAZFCx0Ghv+RjFM/iIdmoXDwznq5ZGpb PggU= X-Google-Smtp-Source: AGHT+IHYNJkgaLLv/w799rZpdoAMPPyoB55wmJ3IpkehRsO0xuYABXaHyGFaAam7/8aabgIuvV/wDQ== X-Received: by 2002:a05:622a:15cf:b0:45f:3d1:24ad with SMTP id d75a77b69052e-4604b273053mr50520501cf.13.1728660450735; Fri, 11 Oct 2024 08:27:30 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-460427d5220sm16344131cf.32.2024.10.11.08.27.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 08:27:30 -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 1/5] rtc: pm8xxx: implement no-alarm flag for non-HLOS owned alarm Date: Fri, 11 Oct 2024 11:22:39 -0400 Message-ID: <20241011152244.31267-1-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 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 | 48 ++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index c32fba550c8e0..9240844022092 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; @@ -375,6 +376,11 @@ static const struct rtc_class_ops pm8xxx_rtc_ops = { .alarm_irq_enable = pm8xxx_rtc_alarm_irq_enable, }; +static const struct rtc_class_ops pm8xxx_rtc_no_alarm_ops = { + .read_time = pm8xxx_rtc_read_time, + .set_time = pm8xxx_rtc_set_time, +}; + static irqreturn_t pm8xxx_alarm_trigger(int irq, void *dev_id) { struct pm8xxx_rtc *rtc_dd = dev_id; @@ -473,9 +479,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 +513,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 +523,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; + } else { + rtc_dd->rtc->ops = &pm8xxx_rtc_no_alarm_ops; + } 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; + } 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 Fri Oct 11 15:22:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 13832660 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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 1C98A19580F for ; Fri, 11 Oct 2024 15:27:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660454; cv=none; b=lWXT0n5Uf++e4RtYEcQBbnZTC696uS+9F53veLWoW8m+mR78NOGNCCjvqO7yDsF1urfJtufRcz3q9y8a4X/Q7lscwKpjLS7dijxQCd23lUYwBY12iuRcmonpMvg8MR1uCk3//oQd0sZff8ip8GK6s3gtEhZO1Nxesl512QKYOzw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660454; c=relaxed/simple; bh=gygbM/0TWbve0yTggoKlMNvknZTLgYXQh0HMHtv9mEQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tRSX49nHYYR8dLAUbC/4S32OVLU8TL7i0tNCjwvi67nkRgAdcgf0nHVeo0q5FQylF+M6F51zMLOELMbxigNjMNM0wRuyLebHZczGAa6imdiaGLVm6fivLUEGCHqje9s25Ws+WHic4kwpzFOTxdMAfArjg3H84NBBChiHpclTPKE= 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=eTAHlZHK; arc=none smtp.client-ip=209.85.222.170 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="eTAHlZHK" Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-7b10e800ba9so246529785a.1 for ; Fri, 11 Oct 2024 08:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728660452; x=1729265252; 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=eTAHlZHKgXdhvHPRoUscEYmUQlokGEzIl1MhqslOrWmVCcPIPKF+f97VN1EXHS66mB BT++1EeDmZKMG/Fpfim9OM/Z7cfxxkyF8PjGa3myr7uqlpEWsFyGEcwcWplwk0umc5Tr MFoYnH5/TUplB/PomtefmpZ/vghoAkSizrfcWI6ssi6MYfSTMLMejqjU7MdadHz2CpSc 4hvnFx9eRNHg8+zRcXO+lHYkR9GrjXBTfDir/EhqCpzLJ4NpZmBUVi9qFywv6dGkBzzZ BCIPmXY+A+e6nE9RfoLTou4IkcygjYxB4bNOO4P5PR9aHRKsm9/y8MXpjruHeHdoVx6G A1JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728660452; x=1729265252; 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=YJAgpEKzuRnkyb87Qg9C3npXqB+An+JOeFJY0aJ4jEpzF72csLyNzDnl5vpl0gxtN5 sVG9/bi1LFTTuf0PBV1eRAPijFWwfxu+4ulWeYWktkLmbFHB7z007b5P9bjwnwg907Ez vxtUeZGqBUTYYK1xOAy0tWscjkdfYjfPyKoXMDcQQ2UoyawX2UfZLcX8MFjwHVm+wxw2 s5ivoFkWQirgfdWG77ldziAMbHCeJKVodTrFO8axOre1CrbuaktwX2yz84AhNnuDS8Ac p/Jp5cYMxbtXLKUUFHxgtt5FWJt0a7e8ww+ixtcOyFqNtycbqplQzHQ7IRLzGFeF/LLx HYzQ== X-Gm-Message-State: AOJu0Yyy0aVmTrHGzp5+btQojvvOtlw6eF/sscG/cnLlaoEDSo+vWSZ0 AiNvNucQpEDXGnKlFQRguGk2edJxBBhxSoGywnaPiKQkdno0601G8PayxYso4f6ZIgbJYmmLNXv nrYI= X-Google-Smtp-Source: AGHT+IEuUyr47HQ77Dj6rHURBePuo97R3GxYp5l2VR2BBG5BruZx4SafyF/ZWlHT/YwBEzdpqhA3lw== X-Received: by 2002:a05:620a:46a5:b0:7af:cea2:75f1 with SMTP id af79cd13be357-7b11a3b5c47mr518993285a.24.1728660451832; Fri, 11 Oct 2024 08:27:31 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-460427d5220sm16344131cf.32.2024.10.11.08.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 08:27:31 -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 2/5] dt-bindings: rtc: qcom-pm8xxx: document no-alarm flag Date: Fri, 11 Oct 2024 11:22:40 -0400 Message-ID: <20241011152244.31267-2-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241011152244.31267-1-jonathan@marek.ca> References: <20241011152244.31267-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 Fri Oct 11 15:22:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 13832661 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 05F6A195B18 for ; Fri, 11 Oct 2024 15:27:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660455; cv=none; b=Pj5cTlickqcGihAX9YXdTTuUg2avC1ivLz9w5/siUTst26oSjVVX/hwEICQLVQgqhOuI2O79tXqBOEGZ4TUxakiP1NdHrn5ZSPRYjrqNUpIVtjO7JEv9W1LaT0jUDX2vodyhSGKQ+P1waOMD99UezmBG3CvFbfL6ZnAZoivrbCY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660455; c=relaxed/simple; bh=Gx8UGYyCoJLkmTfYCCLLqZ+vI7a5HA77QIzlDLw8kbA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p1BxiJ3BG70tGkiXK1T7Qk9aWFqy+2ewZb9O4BLt80EeVSPTYKz++vAfgYxnQCBl6uMYI+4B8YUSTBcejWUcwLZoIDrpU+CExE3x02w3dGGAZz/i86/2xg1W4NbQ7BOJFzvoryLD4EOoowYj4NMsSZIpOmicYgh7cekjfOgdpzw= 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=ZG8n9i8z; arc=none smtp.client-ip=209.85.160.173 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="ZG8n9i8z" Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-4604d8f162eso5601891cf.3 for ; Fri, 11 Oct 2024 08:27:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728660453; x=1729265253; 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=ZG8n9i8z9nKjdmPOMvK/qohYGGfjl+Ja/TS3pKgck6GbYlIAqBzCiDYhcOQM6kjiCf CUbo+dO0aMxlFxIxDI0NPjVyX7C9PjMH42QHs8zJx3wOecaHNJNY51wRZh81+d4kIUfm sgb2LYqfy8RxX4Zld5o4oosQ0NfTPFmFtXKZZxgSTs3dWEsQsY6kf1xKrhnl42uBcRv6 cx03c2c9wcm54Yy84NIXIMoRuQgtdziRbHvTsKnPvOGgZzMfDjKdKr+pQxmZvb8Lz/tQ qHzjqBXiMiwJDPT5hxtqw5zZ1u0ZzbKWhfMZcjSwUlFnvfoGMnQ48cwCu43gpaE32U8x 2bMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728660453; x=1729265253; 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=JjdJ4YAcZGHOaVEdCCmwwQF2EFHME6woOiS29xnTQi3bhV0dfAmvK4lvDHdjiIPf4n /j7aUpofYK0veBzvQ2OGPVuHHs5Qlt2sY0AODDJcLjvAjOwj9bBKNN5Qj53jBlX1LWq6 9LTBVaGdApm8uroEZL3qrlECT49KaOktwYgJFJsh+qATe6mZ8Mwmpwz1fBPjsLjdJlf9 W/GPu1QUuaK0R+PwAUChrJXo8xXDnIDcBRgLiFXVGntZwPSFooYEK5KbdFVodVgJ8IT3 pseI3B7B/BNOr89wIfBZDu2LHvL7MAEZMf/Yls7rfScQPg0/Khs1TsozxfcwYXGleBzL fdNg== X-Gm-Message-State: AOJu0Ywd1ED9pQgC3NBFJbHltF8CPXjVo3JcJNscIEYl2vJvRwgU9g2b wjy9lSNGUUU/Ge0RCO7XsoljD/5n25H8GTxlZzHdHaT4duMIN7OdlYDWVoer6O6zYOvZnBvhHB+ whvA= X-Google-Smtp-Source: AGHT+IEXnQ/LD2VsUTesyG1k3Rzr18V6yq2EmOcJVW7Bge/+h5oQISsyZXZcWyI3JbjmbvZ/MrE3dw== X-Received: by 2002:ac8:7d46:0:b0:458:2764:37d5 with SMTP id d75a77b69052e-4604bb93e90mr37264241cf.6.1728660452820; Fri, 11 Oct 2024 08:27:32 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-460427d5220sm16344131cf.32.2024.10.11.08.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 08:27:32 -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 3/5] arm64: dts: qcom: x1e80100-pmics: enable RTC Date: Fri, 11 Oct 2024 11:22:41 -0400 Message-ID: <20241011152244.31267-3-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241011152244.31267-1-jonathan@marek.ca> References: <20241011152244.31267-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 Fri Oct 11 15:22:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 13832662 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 28DCB19753F for ; Fri, 11 Oct 2024 15:27:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660456; cv=none; b=E1FCSmmwU0s6tW1OdUiDWgLxLBXm5mxECiHodXCmd0qO9xJjdeA27ITp92PFUOXZHntIfpf5w2cJrLzbgptxCRJomSUHmu/uFPvyOJVapNrOSLIIBPQAR1EoT2Npq74PxNWzVEW+vKqC7+pONHCQKPORgBulNhnsrNEYXBqhxqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660456; c=relaxed/simple; bh=dEvzDCYAXuLeb9shmkvV229Mz3PupSTBjVcy+LVPZCY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BvhVFu1LoB74rm28h9+cU+VvKCfBccWkP+xJn/9aPWmajDdqnE5VuR3rZzAD4E16jujP0z8q10xzcsp+EGtzJCaytxBCTVo4HCKFYU5uuUVPg8k6/yDfaMK2GR1B75vV5uYZoS46OKyWj8v3/bmJVWSJBw3Fnf6X8FQyDH3Dt2E= 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=QX5EgXCj; arc=none smtp.client-ip=209.85.160.171 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="QX5EgXCj" Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-46045199e4dso17516211cf.3 for ; Fri, 11 Oct 2024 08:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728660454; x=1729265254; 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=Q571hUiLhwNDOzZzuG6Dkz03yB6v2Tw/xn24I5ji6Yg=; b=QX5EgXCjUW8pYNY3bcFxosbgLMEoKEW5+aS5GKMepxKM+LstlWx0QUFvcTj4CpB7Ul 9WZFzo0UvX8zXSTp6jXB+6Kw86fvLEmVbAUYwhg+no4R4YwUM+p7U6VqFsJtMrONTUFu uKLLbNbSalqKs8ykU7drsmc2tJYJQLIOf6KQtFKzNa+TnVncHEG7KFBiol9fMo+YvRaF c1CsjHVNAdihfwIfmutxOrmvxCbybmlM3ZYCTO9SBK9nC506ZUCdxfeUTyj8RzOT4ubq OVqFSCz5iVKicIGFfQyzKvHIqfGNbZpWe9KR5rQa2Fx9OpULO0zyFcknf5h/evJqGDfK IRsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728660454; x=1729265254; 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=Q571hUiLhwNDOzZzuG6Dkz03yB6v2Tw/xn24I5ji6Yg=; b=gkOMS6XeVNpgh8nM7wTdEk3zpS+4thxaDB1x2FPf7TfH8x850ftPKJZg7H5gRlFcFH 6xEn64n4LwOFCMWjnBCeY9xeUgL2Wa55aaF3qrMthWgetIf7mrQtTfW/tyeXSymB/ur3 yfnEuaD6cDwx88BZKcBQaRrQBrp5MtwexX/avbWWZ82S5Z0CEmjmwth2Q9spz8TX0L+k I44xwS5KyND+1ZK3Dn5unbUeN9smmfQjwxdwSWTldXkGglk5XiYpiT2hUdwhxOkIIPK3 5WnmLVk2NJj9lrOnH8PlrZ63lEn3Xfu+9h7u8mYu7PK8lb4Xwh2zliAmFa2J5gFKHpKh 309w== X-Gm-Message-State: AOJu0YweFXYK40NYHowjhE4a+G4AwvtMTrLKM9Rz1HwaWNW4ncXau/lX 88iALgstyfcdkm0SlgiZUhgiJ0yiedw/KyM6Lk7pZbZWVU9/YUZNL2bNoL62sWg2HZM5deH9Vpu KuSE= X-Google-Smtp-Source: AGHT+IHYfPQwR4zCXOR7gPAHxDGjfJdijerKgatLMcVSSJq8egdoY5LDJMsFjviVfi9qPOvZKtdp2Q== X-Received: by 2002:a05:622a:1b1e:b0:460:3f14:89b6 with SMTP id d75a77b69052e-4604bbd4f30mr46871291cf.28.1728660453911; Fri, 11 Oct 2024 08:27:33 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-460427d5220sm16344131cf.32.2024.10.11.08.27.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 08:27:33 -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 4/5] arm64: dts: qcom: x1e80100-crd: add rtc offset to set rtc time Date: Fri, 11 Oct 2024 11:22:42 -0400 Message-ID: <20241011152244.31267-4-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241011152244.31267-1-jonathan@marek.ca> References: <20241011152244.31267-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 53e76b3f0c831..c8fac0f2701b9 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 Fri Oct 11 15:22:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 13832663 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 0022E198827 for ; Fri, 11 Oct 2024 15:27:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660457; cv=none; b=I7y7FO6N3YeeJLBoPjxj/00+/1j1wFinqTGVpYyFb8yO0B/Lt7appNCsb7cZ6zncSQtl5FUpEre8HMg/vaMUqxF/Vlpx47LaOjm/IFVhwcyjj/9HsQYMWN0by1SAZI6yVH6836FnaTV93m9fPejGaDyWtMsdcHUt4ffMbq+gIWA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728660457; c=relaxed/simple; bh=PP45Dg1iGyv3y2H3r24fUF6A1hgqS1Bu5leVBaRAUcI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Znko5IkNUa28wTdKXiCladWvMZQVoqsoXySQ6Yb2F7AT5zUSe5MuwP9CeoLOpbnGWdR82qg0oeZlWxaOo8ApxrudGuQmLFtUUaE4epOu6LGcCPjTKF0ASxHyRwvO3KMsEMm45Uvd37czfw/oZLr5XRBfezyf6E5tPekU28vVDso= 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=KxtzA3RV; arc=none smtp.client-ip=209.85.160.173 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="KxtzA3RV" Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-45f091bf433so17257701cf.3 for ; Fri, 11 Oct 2024 08:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek.ca; s=google; t=1728660455; x=1729265255; 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=nfIq3eRh8OI9mTcVWpkOySISef6TcE4+YhZrQqF6xqI=; b=KxtzA3RVMif7UHb+6bjH+A/aOKt5C3ETC/+hTEvr4MDG4ciZkhnTWaHGCBq8lEs4S7 u5av0gZSodxkt57nb4IyX4jTGncRQLBxNj7iyAC8kKOmNuMtE7CvQqEfcvQJI880sYQU vZeiDVKIO+THsGUBzYPi3MwEnI5AT3n3Ovn6W9KGZb5r45pY2n/esU3YpwP+LNU15/vT fXifnrB3EvyZ4YnP2+itPRduGLgUXeDNKgsc4IWLDanaIdOXBnT6qV096XTY+rE7+0To gG0D7MZz3oIykJ863CukGk1XXQbnbn0JSHfg6XBsDO1LD6ZMQeWq4Bzm99pBpJl8ACHy k/sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728660455; x=1729265255; 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=nfIq3eRh8OI9mTcVWpkOySISef6TcE4+YhZrQqF6xqI=; b=GVdSna1skWXLhKPBLjLwMwpSYd6nf1PQQo0n4Brgi4PnWp5QTGO9IR90rBOmV4EtWA lpl3UqF18Z5WMrRVuMWRSVp85sqx8buIt1icM7izI/HumE6DMGW/QSbxVTD1Tv8RbCqU 9jLR5YPrLR6VWEqywCj4pr9yLJUcw16d2yppCltXQyl3p7attkMUO0Rvp1b+tiFNn6Kc eqasXQCtuwBzR0qUaClB0BmhX9Wx88CO6I2BEW5ISz1u69JNQqTs24ynKKOR01yMvman TCMyHgPwKpU93DgQcbcBBAzrvRF0VctpVcS0lHprOr/STgtIx3mRPCeIngcxUAZPLCvo qpsA== X-Gm-Message-State: AOJu0YwGYc82pX8zeZAb9BnKijV6jdwuqY03nOerVDhjykcpDXKtwCsO /ZDKhDQ6YvVF8UgsmPlwjQJLKbShCVtB65LF8jSC2sBfd6kBdjGVwyD4tJHiI59XybvJ1X1oIOW rLQk= X-Google-Smtp-Source: AGHT+IGQig3AH+6PsHNsgNhCOMU6nyFyU97psC6t2DSMG/IxFOgutRPzphS2AY3CaiEXqetYDbD+Nw== X-Received: by 2002:a05:622a:4c8c:b0:458:3154:4d0d with SMTP id d75a77b69052e-4604bc2d776mr43570241cf.37.1728660454899; Fri, 11 Oct 2024 08:27:34 -0700 (PDT) Received: from localhost.localdomain (modemcable125.110-19-135.mc.videotron.ca. [135.19.110.125]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-460427d5220sm16344131cf.32.2024.10.11.08.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 08:27:34 -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 5/5] arm64: dts: qcom: x1e78100-t14s: add rtc offset to set rtc time Date: Fri, 11 Oct 2024 11:22:43 -0400 Message-ID: <20241011152244.31267-5-jonathan@marek.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20241011152244.31267-1-jonathan@marek.ca> References: <20241011152244.31267-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 8cd08c3a93382..f406c3a63d6a1 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"; };