2023-04-06 06:10:49

by Andreas Kemnade

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: leds: ROHM BD2606MVV LED driver

Document ROHM BD2606MVV LED driver devicetree bindings.

Signed-off-by: Andreas Kemnade <[email protected]>
---
.../bindings/leds/rohm,bd2606mvv.yaml | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml

diff --git a/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
new file mode 100644
index 0000000000000..6d4ddd8d31162
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/rohm,bd2606mvv.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: BD2606MVV LED controller
+
+maintainers:
+ - Andreas Kemnade <[email protected]>
+
+description:
+ The BD2606 MVV is a programmable LED controller connected via I2C that can
+ drive 6 separate lines. Each of them can be individually switched on and off
+ but the brightness setting is shared between two of them.
+
+properties:
+ compatible:
+ const: rohm,bd2606mvv
+
+ reg:
+ description: I2C slave address of the controller.
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^led@[0-6]$":
+ type: object
+ $ref: common.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ reg:
+ minimum: 0
+ maximum: 6
+
+ required:
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+
+ #include <dt-bindings/leds/common.h>
+
+ i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@66 {
+ compatible = "rohm,bd2606mvv";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x66>;
+
+ led@0 {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_POWER;
+ reg = <0x0>;
+ };
+
+ led@2 {
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_STATUS;
+ reg = <0x2>;
+ };
+ };
+ };
+
+...
--
2.39.2


2023-04-06 08:39:32

by Matti Vaittinen

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: leds: ROHM BD2606MVV LED driver

Hi Andreas,

Thanks for the patch! Adding new support for devices is Much Appreciated!

On 4/6/23 09:08, Andreas Kemnade wrote:
> Document ROHM BD2606MVV LED driver devicetree bindings.
>
> Signed-off-by: Andreas Kemnade <[email protected]>
> ---
> .../bindings/leds/rohm,bd2606mvv.yaml | 76 +++++++++++++++++++
> 1 file changed, 76 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
>
> diff --git a/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
> new file mode 100644
> index 0000000000000..6d4ddd8d31162
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
> @@ -0,0 +1,76 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/rohm,bd2606mvv.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: BD2606MVV LED controller
> +
> +maintainers:
> + - Andreas Kemnade <[email protected]>
> +
> +description:
> + The BD2606 MVV is a programmable LED controller connected via I2C that can
> + drive 6 separate lines. Each of them can be individually switched on and off
> + but the brightness setting is shared between two of them.

Maybe add a link to data-sheet?
https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/led_driver/bd2606mvv_1-e.pdf

> +
> +properties:
> + compatible:
> + const: rohm,bd2606mvv
> +
> + reg:
> + description: I2C slave address of the controller.
> + maxItems: 1
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> +patternProperties:
> + "^led@[0-6]$":
> + type: object
> + $ref: common.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + minimum: 0
> + maximum: 6
> +
> + required:
> + - reg
> +
> +additionalProperties: false

According to the data-sheet, BD2606 has an enable-pin. Should it be
visible in the bindings?


Yours,
-- Matti

--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~

2023-04-06 11:41:09

by Andreas Kemnade

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: leds: ROHM BD2606MVV LED driver

Hi Matti,

On Thu, 6 Apr 2023 11:32:42 +0300
Matti Vaittinen <[email protected]> wrote:

> Hi Andreas,
>
> Thanks for the patch! Adding new support for devices is Much Appreciated!
>
> On 4/6/23 09:08, Andreas Kemnade wrote:
> > Document ROHM BD2606MVV LED driver devicetree bindings.
> >
> > Signed-off-by: Andreas Kemnade <[email protected]>
> > ---
> > .../bindings/leds/rohm,bd2606mvv.yaml | 76 +++++++++++++++++++
> > 1 file changed, 76 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
> > new file mode 100644
> > index 0000000000000..6d4ddd8d31162
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
> > @@ -0,0 +1,76 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/leds/rohm,bd2606mvv.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: BD2606MVV LED controller
> > +
> > +maintainers:
> > + - Andreas Kemnade <[email protected]>
> > +
> > +description:
> > + The BD2606 MVV is a programmable LED controller connected via I2C that can
> > + drive 6 separate lines. Each of them can be individually switched on and off
> > + but the brightness setting is shared between two of them.
>
> Maybe add a link to data-sheet?
> https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/led_driver/bd2606mvv_1-e.pdf
>
Maybe also (because it has the register description):
https://fscdn.rohm.com/en/products/databook/applinote/ic/power/led_driver/bd2606mvv_tsb_001_ug-e.pdf

> > +
> > +properties:
> > + compatible:
> > + const: rohm,bd2606mvv
> > +
> > + reg:
> > + description: I2C slave address of the controller.
> > + maxItems: 1
> > +
> > + "#address-cells":
> > + const: 1
> > +
> > + "#size-cells":
> > + const: 0
> > +
> > +patternProperties:
> > + "^led@[0-6]$":
> > + type: object
> > + $ref: common.yaml#
> > + unevaluatedProperties: false
> > +
> > + properties:
> > + reg:
> > + minimum: 0
> > + maximum: 6
> > +
> > + required:
> > + - reg
> > +
> > +additionalProperties: false
>
> According to the data-sheet, BD2606 has an enable-pin. Should it be
> visible in the bindings?
>
yes, it should.

Regards,
Andreas

2023-04-06 12:43:28

by Matti Vaittinen

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: leds: ROHM BD2606MVV LED driver

On 4/6/23 14:33, Andreas Kemnade wrote:
> Hi Matti,
>
> On Thu, 6 Apr 2023 11:32:42 +0300
> Matti Vaittinen <[email protected]> wrote:
>
>> Hi Andreas,
>>
>> Thanks for the patch! Adding new support for devices is Much Appreciated!
>>
>> On 4/6/23 09:08, Andreas Kemnade wrote:
>>> Document ROHM BD2606MVV LED driver devicetree bindings.
>>>
>>> Signed-off-by: Andreas Kemnade <[email protected]>
>>> ---
>>> .../bindings/leds/rohm,bd2606mvv.yaml | 76 +++++++++++++++++++
>>> 1 file changed, 76 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
>>>
>>> diff --git a/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
>>> new file mode 100644
>>> index 0000000000000..6d4ddd8d31162
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml
>>> @@ -0,0 +1,76 @@
>>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/leds/rohm,bd2606mvv.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: BD2606MVV LED controller
>>> +
>>> +maintainers:
>>> + - Andreas Kemnade <[email protected]>
>>> +
>>> +description:
>>> + The BD2606 MVV is a programmable LED controller connected via I2C that can
>>> + drive 6 separate lines. Each of them can be individually switched on and off
>>> + but the brightness setting is shared between two of them.
>>
>> Maybe add a link to data-sheet?
>> https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/led_driver/bd2606mvv_1-e.pdf
>>
> Maybe also (because it has the register description):
> https://fscdn.rohm.com/en/products/databook/applinote/ic/power/led_driver/bd2606mvv_tsb_001_ug-e.pdf

I think both documents do contain the register description. Well, the
eval board user-guide seems to contain the IC information as well as the
eval board information so I am fine with either of these.

Yours,
-- Matti

--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~