diff mbox series

[2/3] dt-bindings: power: supply: Document Mitsumi MM8013 fuel gauge

Message ID 20230621-topic-mm8013-v1-2-4407c6260053@linaro.org
State Changes Requested, archived
Headers show
Series MM8013 fg driver | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Konrad Dybcio June 21, 2023, 3:39 p.m. UTC
The Mitsumie MM8013 is an I2C fuel gauge for Li-Ion cells. The partial
datasheet is available at [1]. Add bindings for this chip.

[1] https://www.mitsumi.co.jp/latest-M/Catalog/pdf/battery_mm_8013_e.pdf
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 .../bindings/power/supply/mitsumi,mm8013.yaml      | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)

Comments

Krzysztof Kozlowski June 21, 2023, 4:38 p.m. UTC | #1
On 21/06/2023 17:39, Konrad Dybcio wrote:
> The Mitsumie MM8013 is an I2C fuel gauge for Li-Ion cells. The partial

Mitsumi

> datasheet is available at [1]. Add bindings for this chip.
> 
> [1] https://www.mitsumi.co.jp/latest-M/Catalog/pdf/battery_mm_8013_e.pdf
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../bindings/power/supply/mitsumi,mm8013.yaml      | 35 ++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/mitsumi,mm8013.yaml b/Documentation/devicetree/bindings/power/supply/mitsumi,mm8013.yaml
> new file mode 100644
> index 000000000000..080fd44083ac
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/mitsumi,mm8013.yaml
> @@ -0,0 +1,35 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/supply/mitsumi,mm8013.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Mitsumi MM8013 fuel gauge
> +
> +maintainers:
> +  - Konrad Dybcio <konradybcio@kernel.org>
> +
> +properties:
> +  compatible:
> +    const: mitsumi,mm8013
> +
> +  reg:
> +    maxItems: 1


I think you miss several properties: three power supplies (although not
all might be needed) and most likely monitored-battery. One regulator
output and output GPIO probably can be skipped.

Best regards,
Krzysztof
Konrad Dybcio June 22, 2023, 12:51 a.m. UTC | #2
On 21.06.2023 18:38, Krzysztof Kozlowski wrote:
> On 21/06/2023 17:39, Konrad Dybcio wrote:
>> The Mitsumie MM8013 is an I2C fuel gauge for Li-Ion cells. The partial
> 
> Mitsumi
> 
>> datasheet is available at [1]. Add bindings for this chip.
>>
>> [1] https://www.mitsumi.co.jp/latest-M/Catalog/pdf/battery_mm_8013_e.pdf
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  .../bindings/power/supply/mitsumi,mm8013.yaml      | 35 ++++++++++++++++++++++
>>  1 file changed, 35 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/power/supply/mitsumi,mm8013.yaml b/Documentation/devicetree/bindings/power/supply/mitsumi,mm8013.yaml
>> new file mode 100644
>> index 000000000000..080fd44083ac
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/power/supply/mitsumi,mm8013.yaml
>> @@ -0,0 +1,35 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/power/supply/mitsumi,mm8013.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Mitsumi MM8013 fuel gauge
>> +
>> +maintainers:
>> +  - Konrad Dybcio <konradybcio@kernel.org>
>> +
>> +properties:
>> +  compatible:
>> +    const: mitsumi,mm8013
>> +
>> +  reg:
>> +    maxItems: 1
> 
> 
> I think you miss several properties: three power supplies (although not
> all might be needed) and most likely monitored-battery. One regulator
> output and output GPIO probably can be skipped.
Looking at the example circuit, it seems like the chip's power lines are
hardwired to the battery cell.

monitored-battery does not seem useful today, as we don't have any
information about writing values onto the chip :/ And I'm not willing
to experiment with that! :P

Konrad
> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski June 22, 2023, 6:24 a.m. UTC | #3
On 22/06/2023 02:51, Konrad Dybcio wrote:
> On 21.06.2023 18:38, Krzysztof Kozlowski wrote:
>> On 21/06/2023 17:39, Konrad Dybcio wrote:
>>> The Mitsumie MM8013 is an I2C fuel gauge for Li-Ion cells. The partial
>>
>> Mitsumi

...

>>
>>
>> I think you miss several properties: three power supplies (although not
>> all might be needed) and most likely monitored-battery. One regulator
>> output and output GPIO probably can be skipped.
> Looking at the example circuit, it seems like the chip's power lines are
> hardwired to the battery cell.
> 
> monitored-battery does not seem useful today, as we don't have any
> information about writing values onto the chip :/ And I'm not w

OK. With the typo in commit msg:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/supply/mitsumi,mm8013.yaml b/Documentation/devicetree/bindings/power/supply/mitsumi,mm8013.yaml
new file mode 100644
index 000000000000..080fd44083ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/mitsumi,mm8013.yaml
@@ -0,0 +1,35 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/mitsumi,mm8013.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mitsumi MM8013 fuel gauge
+
+maintainers:
+  - Konrad Dybcio <konradybcio@kernel.org>
+
+properties:
+  compatible:
+    const: mitsumi,mm8013
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      fuel-gauge@55 {
+        compatible = "mitsumi,mm8013";
+        reg = <0x55>;
+      };
+    };