Re: [PATCH v2 3/9] dt-bindings: mfd: document ASUS Transformer EC
From: Svyatoslav Ryhel
Date: Tue Feb 10 2026 - 06:00:15 EST
вт, 10 лют. 2026 р. о 12:48 Krzysztof Kozlowski <krzk@xxxxxxxxxx> пише:
>
> On 10/02/2026 10:37, Svyatoslav Ryhel wrote:
> > вт, 10 лют. 2026 р. о 11:22 Krzysztof Kozlowski <krzk@xxxxxxxxxx> пише:
> >>
> >> On Mon, Feb 09, 2026 at 12:44:01PM +0200, Svyatoslav Ryhel wrote:
> >>> Document embedded controller used in ASUS Transformer device series.
> >>>
> >>> Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> >>> ---
> >>> .../devicetree/bindings/mfd/asus,ec.yaml | 152 ++++++++++++++++++
> >>> 1 file changed, 152 insertions(+)
> >>> create mode 100644 Documentation/devicetree/bindings/mfd/asus,ec.yaml
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/mfd/asus,ec.yaml b/Documentation/devicetree/bindings/mfd/asus,ec.yaml
> >>> new file mode 100644
> >>> index 000000000000..1d1a62761b71
> >>> --- /dev/null
> >>> +++ b/Documentation/devicetree/bindings/mfd/asus,ec.yaml
> >>
> >> EC do not go to MFD, but to dedicated directory (there is such).
> >>
> >
> > Noted
> >
> >>> @@ -0,0 +1,152 @@
> >>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >>> +%YAML 1.2
> >>> +---
> >>> +$id: http://devicetree.org/schemas/mfd/asus,ec.yaml#
> >>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>> +
> >>> +title: ASUS Transformer's Embedded Controller
> >>> +
> >>> +description:
> >>> + Several Nuvoton based Embedded Controller attached to an I2C bus,
> >>> + running a custom ASUS firmware, specific to the Asus Transformer
> >>> + device series.
> >>> +
> >>> +maintainers:
> >>> + - Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> >>> +
> >>> +properties:
> >>> + compatible:
> >>> + oneOf:
> >>
> >> Drop oneOf
> >>
> >
> > Noted
> >
> >>> + - enum:
> >>> + - asus,ec-pad # Pad part of Asus Transformer
> >>> + - asus,ec-dock # Dock part of Asus Transformer
> >>
> >>
> >> Compatibles are way too generic. "ec" basically means you document all
> >> Asus EC, which is for sure not true. You need specific compatible for
> >> this specific model.
> >>
> >
> > Asus were not so generous to provide more specific data, they call
> > there controllers asusdec and asusped in their sources.
>
> Look how other ECs are called. Your device is not "", but e.g.
> "Transformer".
>
> >
> >> Missing blank line.
> >>
> >
> > noted
> >
> >>> + reg:
> >>> + maxItems: 1
> >>> +
> >>> + interrupts:
> >>> + maxItems: 1
> >>> +
> >>> + request-gpio:
> >>
> >> gpio is deprecated. gpios, look at any other binding.
> >>
> >
> > noted
> >
> >>> + maxItems: 1
> >>> +
> >>> + asus,dockram:
> >>> + $ref: /schemas/types.yaml#/definitions/phandle
> >>> + description: I2C device used to access power related functions.
> >>> +
> >>> + 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.
> >
> >>> +
> >>> + 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.
>
> Best regards,
> Krzysztof