Re: [PATCH v6 03/11] dt-bindings: mfd: add documentation for S2MU005 PMIC
From: Kaustabh Chakraborty
Date: Sun May 17 2026 - 09:10:26 EST
On 2026-05-16 23:25 +01:00, Conor Dooley wrote:
> On Sat, May 16, 2026 at 02:41:29AM +0530, Kaustabh Chakraborty wrote:
>> On 2026-05-15 18:14 +01:00, Conor Dooley wrote:
>> > On Fri, May 15, 2026 at 04:08:59PM +0530, Kaustabh Chakraborty wrote:
>> >> Samsung's S2MU005 PMIC includes subdevices for a charger, an MUIC (Micro
>> >> USB Interface Controller), and flash and RGB LED controllers.
>> >>
>> >> Add the compatible and documentation for the S2MU005 PMIC. Also, add an
>> >> example for nodes for supported sub-devices, i.e. MUIC, flash LEDs, and
>> >> RGB LEDs. Charger sub-device uses the node of the parent.
>> >>
>> >> Signed-off-by: Kaustabh Chakraborty <kauschluss@xxxxxxxxxxx>
>> >> ---
>> >> .../bindings/mfd/samsung,s2mu005-pmic.yaml | 120 +++++++++++++++++++++
>> >> 1 file changed, 120 insertions(+)
>> >>
>> >> diff --git a/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml b/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
>> >> new file mode 100644
>> >> index 0000000000000..0e6afb7d2017b
>> >> --- /dev/null
>> >> +++ b/Documentation/devicetree/bindings/mfd/samsung,s2mu005-pmic.yaml
>> >> @@ -0,0 +1,120 @@
>> >> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> >> +%YAML 1.2
>> >> +---
>> >> +$id: http://devicetree.org/schemas/mfd/samsung,s2mu005-pmic.yaml#
>> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> >> +
>> >> +title: Samsung S2MU005 Power Management IC
>> >> +
>> >> +maintainers:
>> >> + - Kaustabh Chakraborty <kauschluss@xxxxxxxxxxx>
>> >> +
>> >> +description: |
>> >> + The S2MU005 is a companion power management IC which includes subdevices for
>> >> + a charger controller, an MUIC (Micro USB Interface Controller), and flash and
>> >> + RGB LED controllers.
>> >> +
>> >> +allOf:
>> >> + - $ref: /schemas/power/supply/power-supply.yaml#
>> >> +
>> >> +properties:
>> >> + compatible:
>> >> + const: samsung,s2mu005-pmic
>> >> +
>> >> + flash:
>> >> + $ref: /schemas/leds/samsung,s2mu005-flash.yaml
>> >> + description:
>> >> + Child node describing flash LEDs.
>> >> +
>> >> + interrupts:
>> >> + maxItems: 1
>> >> +
>> >> + muic:
>> >> + $ref: /schemas/extcon/samsung,s2mu005-muic.yaml#
>> >> + description:
>> >> + Child node describing MUIC device.
>> >> +
>> >> + multi-led:
>> >> + type: object
>> >> +
>> >> + allOf:
>> >> + - $ref: /schemas/leds/leds-class-multicolor.yaml#
>> >
>> > Does this need to be an allOf when the other refs are not?
>>
>> It has it's own properties, that's the reason. This used to be it's own
>> thing in dt-bindings/leds, but I was asked to move it here in prior
>> reviews.
>
> What do you mean by "its own properties"?
I mean, the other schemas (muic, flash) are in their own file, with
compatible, and other properties too.
This one, inherits properties from leds-class-multicolor, AND has a
"compatible" property with it, which is not defined in
leds-class-multicolor. Now if you ask why does the compatible exist,
that's something Krzysztof suggested in previous revisions.
And, Krzysztof had also reviewed this patch, and (similar to the prev
patch) I've missed the trailers, which have been addressed in v7 now.
>>
>> >> +
>> >> + properties:
>> >> + compatible:
>> >> + const: samsung,s2mu005-rgb
>> >> +
>> >> + required:
>> >> + - compatible
>> >> +
>> >> + unevaluatedProperties: false
>> >> +
>> >> + reg:
>> >> + maxItems: 1
>> >
>> > Move this above the child nodes please.
>>
>> But properties are sorted in lex order?
>
> Typically the binding is sorted in the same order as properties go in
> nodes. Common stuff like reg/clocks/interrupts therefore send up above
> child nodes.
So, do I change this? For one, I don't see the same being followed in
other schemas of samsung in the same dir (not that I'm trying to pose it
as an argument against your suggestion), and this was reviewed by
Krzysztof and is adderssed in v7.