[1/3] arm64: dts: qcom: acer-aspire1: Enable RTC

Message ID 20231027-aspire1-sound-v1-1-5ff3cf8b5701@trvn.ru
State New
Headers
Series sc7180-acer-aspire1: Add sound |

Commit Message

Nikita Travkin Oct. 27, 2023, 2:42 p.m. UTC
  pm6150 has a read-only RTC that can be used to keep the time with some
extra userspace tools. Enable it.

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
 arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Konrad Dybcio Oct. 30, 2023, 9:47 p.m. UTC | #1
On 27.10.2023 16:42, Nikita Travkin wrote:
> pm6150 has a read-only RTC that can be used to keep the time with some
> extra userspace tools. Enable it.
> 
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

kinda unsure why it'd ever be disabled

Konrad
  
Doug Anderson Oct. 30, 2023, 9:55 p.m. UTC | #2
Hi,

On Mon, Oct 30, 2023 at 2:47 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 27.10.2023 16:42, Nikita Travkin wrote:
> > pm6150 has a read-only RTC that can be used to keep the time with some
> > extra userspace tools. Enable it.
> >
> > Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> > ---
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>
> kinda unsure why it'd ever be disabled
>
> Konrad

FWIW we don't use the PMIC RTC in Chrome boards. I can't quite
remember why, but I _think_ that the power lines aren't hooked up to
the PMIC to keep power on for the board's lowest power states.
Instead we use the RTC that's on the EC (Embedded Controller).

-Doug
  
Nikita Travkin Oct. 31, 2023, 7:18 a.m. UTC | #3
Doug Anderson писал(а) 31.10.2023 02:55:
> Hi,
> 
> On Mon, Oct 30, 2023 at 2:47 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> On 27.10.2023 16:42, Nikita Travkin wrote:
>> > pm6150 has a read-only RTC that can be used to keep the time with some
>> > extra userspace tools. Enable it.
>> >
>> > Signed-off-by: Nikita Travkin <nikita@trvn.ru>
>> > ---
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>>
>> kinda unsure why it'd ever be disabled
>>
>> Konrad
> 
> FWIW we don't use the PMIC RTC in Chrome boards. I can't quite
> remember why, but I _think_ that the power lines aren't hooked up to
> the PMIC to keep power on for the board's lowest power states.
> Instead we use the RTC that's on the EC (Embedded Controller).
> 

When it was submitted, I suggested to keep it disabled by default
because of the firmware mess qcom has - the rtc is set to
read-only and if one enables it on cros without allow-set-time;
and validating that qtiseclib doesn't block it too, it would
likely cause issues by taking devices back to 1970s :D

Nikita

> -Doug
  

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts b/arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts
index dbb48934d499..cfde8cd47107 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts
@@ -351,6 +351,10 @@  &pm6150_pon {
 	status = "disabled";
 };
 
+&pm6150_rtc {
+	status = "okay";
+};
+
 &qupv3_id_0 {
 	status = "okay";
 };