linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artur Weber <aweber.kernel@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Olof Johansson <olof@lixom.net>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	soc@kernel.org, Rob Herring <robh+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v4] ARM: dts: exynos: Add Samsung Galaxy Tab 3 8.0 boards
Date: Thu, 22 Jun 2023 14:52:35 +0200	[thread overview]
Message-ID: <72af054e-e82b-917c-1f9b-fe231dcfa5bf@gmail.com> (raw)
In-Reply-To: <aae10e8f-b4f2-7417-ab08-41d6ec9ab8fc@linaro.org>

On 04/06/2023 21:15, Krzysztof Kozlowski wrote:
> On 04/06/2023 18:56, Artur Weber wrote:
>> +/*
>> + * This device does not use the built-in RTC; instead, the RTC in the
>> + * S5M8786 PMIC is used instead. Remove the unused node to avoid DTB check
>> + * warnings.
>> + */
>> +/delete-node/ &rtc;
> 
> This is not the solution. The S3C RTC is there. Just like all other
> boards we have two RTCs and DTS should be complete. Definitely you
> should not remove something just because there were warnings. Instead
> warnings should be fixed.

The problem is that the built-in RTC does not seem to work on this
device. I attempted to add it, using the same clocks as other devices
in mainline using the S5M8676 PMIC:

&rtc {
	status = "okay";
	clocks = <&clock CLK_RTC>, <&s5m8767_osc S2MPS11_CLK_AP>;
	clock-names = "rtc", "rtc_src";
};

However, it just prints the following on startup:

 s3c-rtc 10070000.rtc: rtc disabled, re-enabling
 s3c-rtc 10070000.rtc: registered as rtc0
 s3c-rtc 10070000.rtc: hctosys: unable to read the hardware clock

Since the internal RTC gets registered as rtc0, it's used as the default
by the OS, whereas the working RTC from the PMIC is registered as rtc1.
Writing to the internal RTC succeeds but the settings are not kept after
a reboot. The PMIC's RTC works fine.

This isn't a mainline-only issue; the internal RTC does not work in the
downstream kernel on this device either.

Not adding the RTC node results in a warning about missing clocks
(exynos4.dtsi only provides 1 clock, whereas bindings require 2):

arch/arm/boot/dts/exynos4212-tab3-3g8.dtb: rtc@10070000: clocks: [[5, 346]] is too short
	From schema: /mnt/linux/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml
arch/arm/boot/dts/exynos4212-tab3-3g8.dtb: rtc@10070000: clock-names: ['rtc'] is too short
	From schema: /mnt/linux/Documentation/devicetree/bindings/rtc/s3c-rtc.yaml

...which makes sense, since we don't want to add clocks given that we're
not going to be using this RTC. I suppose deleting the node with
delete-node is a bit too destructive though.

I guess a good solution would be to set up the &rtc node as seen in
the snippet I sent earlier, but keep it disabled + add a note explaining
why it's done.

In your opinion, what would be the best solution?

Best regards
Artur

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-06-22 12:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-04 16:56 [PATCH v4] ARM: dts: exynos: Add Samsung Galaxy Tab 3 8.0 boards Artur Weber
2023-06-04 19:15 ` Krzysztof Kozlowski
2023-06-22 12:52   ` Artur Weber [this message]
2023-06-23  8:04     ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=72af054e-e82b-917c-1f9b-fe231dcfa5bf@gmail.com \
    --to=aweber.kernel@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=soc@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).