Re: [PATCH v2 3/9] dt-bindings: mfd: document ASUS Transformer EC
From: Svyatoslav Ryhel
Date: Tue Feb 10 2026 - 06:41:20 EST
вт, 10 лют. 2026 р. о 13:24 Krzysztof Kozlowski <krzk@xxxxxxxxxx> пише:
>
> On 10/02/2026 12:14, Svyatoslav Ryhel wrote:
> > вт, 10 лют. 2026 р. о 13:04 Krzysztof Kozlowski <krzk@xxxxxxxxxx> пише:
> >>
> >> On 10/02/2026 11:59, Svyatoslav Ryhel wrote:
> >>>>>>> + asus,clear-factory-mode:
> >>>>>>> + type: boolean
> >>>>>>> + description: clear Factory Mode bit in EC control register
> >>>>>>
> >>>>>> Why would this be a static/fixed property over lifecycle of all devices?
> >>>>>>
> >>>>>
> >>>>> Specify pls.
> >>>>
> >>>> Provide rationale why we need to clear it every time, not once. Or any
> >>>> other rationale why we would accept that property.
> >>>>
> >>>
> >>> Cause it is done by original Asus code and Asus did not provide
> >>> schematic or any data apart from downstream source regarding this EC.
> >>
> >> So that's a no. downstream code which is poor quality, not following DT
> >> rules at all, is never an argument for a DT property.
> >>
> >
> > This property indicates that this controller on every reset restores
>
> Implied by compatible then and you can drop the property.
>
> > factory bit hence it must be cleared. Bit is write only and cannot be
> > detected. EC remains in factory mode which blocks its functions.
> >
> >>>
> >>>>>
> >>>>>>> +
> >>>>>>> + battery:
> >>>>>>> + type: object
> >>>>>>> + $ref: /schemas/power/supply/power-supply.yaml
> >>>>>>> + unevaluatedProperties: false
> >>>>>>> +
> >>>>>>> + properties:
> >>>>>>> + compatible:
> >>>>>>> + const: asus,ec-battery
> >>>>>>> +
> >>>>>>> + required:
> >>>>>>> + - compatible
> >>>>>>> +
> >>>>>>> + charger:
> >>>>>>> + type: object
> >>>>>>> + $ref: /schemas/power/supply/power-supply.yaml
> >>>>>>> + additionalProperties: false
> >>>>>>> +
> >>>>>>> + properties:
> >>>>>>> + compatible:
> >>>>>>> + const: asus,ec-charger
> >>>>>>> +
> >>>>>>> + monitored-battery: true
> >>>>>>> +
> >>>>>>> + required:
> >>>>>>> + - compatible
> >>>>>>> +
> >>>>>>> + keyboard-ext:
> >>>>>>> + type: object
> >>>>>>> + description: top row of multimedia keys
> >>>>>>> + additionalProperties: false
> >>>>>>> +
> >>>>>>> + properties:
> >>>>>>> + compatible:
> >>>>>>> + const: asus,ec-keys
> >>>>>>> +
> >>>>>>> + required:
> >>>>>>> + - compatible
> >>>>>>> +
> >>>>>>> + led:
> >>>>>>> + type: object
> >>>>>>> + additionalProperties: false
> >>>>>>> +
> >>>>>>> + properties:
> >>>>>>> + compatible:
> >>>>>>> + const: asus,ec-led
> >>>>>>> +
> >>>>>>> + required:
> >>>>>>> + - compatible
> >>>>>>> +
> >>>>>>> + serio:
> >>>>>>
> >>>>>> All of these children are pointless - no resources. Drop all of them,
> >>>>>> it's btw explicitly documented rule in writing bindings.
> >>>>>>
> >>>>>
> >>>>> They are all needed to be able to disable them individually from the
> >>>>> device tree if needed.
> >>>>
> >>>> They should not be disabled from DT, so they are not valid here. The
> >>>> given EC for given device is fixed/static. Does not change.
> >>>>
> >>>
> >>> Have you considered a possibility that function may be
> >>> disabled/unrouted within the controller. By the vendor.
> >>
> >> And then it is implied by the compatible, so no need for any of that.
> >> Otherwise, if it is not specific per device, then specifying it for DTS
> >> for all devices would make no sense.
> >>
> >
> > So you propose introduce a compatible for every single ec used in
> > transformers instead of simply disable unpopulated functions? And how
> > then battery and charger can reach monitored cell if they have no
> > dedicated node?
>
> Just like for other bindings for nodes without resources, fold into
> parent. This is already explained in writing bindings, so you could have
> just read that. I will pass with answering more questions till you read
> that doc.
>
Unfolding asus,ec-pad and asus,ec-dock will result in this list:
asus,tf101-dock-ec
asus,tf101g-dock-ec
asus,sl101-pad-ec
asus,tf201-pad-ec
asus,tf201-dock-ec
asus,tf300t-pad-ec
asus,tf300t-dock-ec
asus,tf300tg-pad-ec
asus,tf300tg-dock-ec
asus,tf300tl-pad-ec
asus,tf300tl-dock-ec
asus,tf600t-pad-ec
asus,tf700t-pad-ec
asus,tf700t-dock-ec
asus,tf701t-pad-ec
asus,p1801-t-pad-ec
with minor variations in populated cells. Is this acceptible?
>
> Best regards,
> Krzysztof