Re: [PATCH v5 2/2] dt-bindings: rtc: add max313xx RTCs

From: Krzysztof Kozlowski
Date: Tue Apr 04 2023 - 03:22:05 EST


On 04/04/2023 09:10, Alexandre Belloni wrote:
>>
>>> + RTC can be used as a clock source through its clock output pin when
>>> + supplied.
>>> + const: 0
>>> +
>>> + clocks:
>>> + description: |
>>
>> Do not need '|'.
>>
>>> + RTC uses this clock for clock input when supplied. Clock has to provide
>>> + one of these four frequencies: 1Hz, 50Hz, 60Hz or 32.768kHz.
>>> + maxItems: 1
>>> +
>>> + aux-voltage-chargeable:
>>> + enum: [0, 1, 2]
>>> + description: |
>>> + Enables trickle charger.
>>> + 0: Charger is disabled (default)
>>> + 1: Charger is enabled
>>> + 2: Charger is enabled with a diode
>>
>> 2 is not an allowed value. I asked to drop this property. It is coming
>> from rtc.yaml. I also do not understand "with a diode". So otherwise it
>> is charging with, I don't know, FET?
>
> No, what is not explained here (and maybe not unsterstood by the
> submitter) is that the RTC has an extra diode so,

Value of 2 is still not allowed and if the patch was tested, it would be
clearly visible. Unfortunately patch was not tested...

> charging will always
> enable a diode, select a resistor and then have or not an extra diode.
> Figure2 of the MAX31329 datasheet is great.

So the diode is in the max313xx? Then why enabling it is a property of
DT? Either this should be inferred from compatible or is even a policy,
not a DT property. Just because device has a register for something, is
not an argument that "something" should be in DT.


Best regards,
Krzysztof