Commit eb917497 authored by Sebastian Reichel's avatar Sebastian Reichel Committed by Sebastian Reichel
Browse files

dt-bindings: power: supply: ab8500: Convert to DT schema format



Convert the binding to DT schema format.

Note: The battery node does not have a compatible value and needs
to be described from the binding file for the PMIC. That has not
yet been converted, so I kept the information in plaintext for now.

Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
parent ee662741
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
=== AB8500 Battery Temperature Monitor Driver ===

The properties below describes the node for btemp driver.

Required Properties:
- compatible = Shall be: "stericsson,ab8500-btemp"
- battery = Shall be battery specific information

	Example:
	ab8500_btemp {
		compatible = "stericsson,ab8500-btemp";
		battery	   = <&ab8500_battery>;
	};

For information on battery specific node, Ref:
Documentation/devicetree/bindings/power/supply/ab8500/fg.txt
+0 −16
Original line number Diff line number Diff line
=== AB8500 Charging Algorithm Driver ===

The properties below describes the node for chargalg driver.

Required Properties:
- compatible = Shall be: "stericsson,ab8500-chargalg"
- battery = Shall be battery specific information

Example:
ab8500_chargalg {
	compatible = "stericsson,ab8500-chargalg";
	battery	   = <&ab8500_battery>;
};

For information on battery specific node, Ref:
Documentation/devicetree/bindings/power/supply/ab8500/fg.txt
+0 −25
Original line number Diff line number Diff line
=== AB8500 Charger Driver ===

Required Properties:
- compatible = Shall be "stericsson,ab8500-charger"
- battery = Shall be battery specific information
	Example:
	ab8500_charger {
		compatible = "stericsson,ab8500-charger";
		battery	   = <&ab8500_battery>;
	};

- vddadc-supply: Supply for USB and Main charger
	Example:
	ab8500-charger {
		vddadc-supply	= <&ab8500_ldo_tvout_reg>;
	}
- autopower_cfg:
	Boolean value depicting the presence of 'automatic poweron after powerloss'
	Example:
	ab8500-charger {
		autopower_cfg;
	};

For information on battery specific node, Ref:
Documentation/devicetree/bindings/power/supply/ab8500/fg.txt
+4 −28
Original line number Diff line number Diff line
=== AB8500 Fuel Gauge Driver ===

AB8500 is a mixed signal multimedia and power management
device comprising: power and energy-management-module,
wall-charger, usb-charger, audio codec, general purpose adc,
tvout, clock management and sim card interface.

Fuelgauge support is part of energy-management-modules, other
components of this module are:
main-charger, usb-combo-charger and battery-temperature-monitoring.

The properties below describes the node for fuelgauge driver.

Required Properties:
- compatible = This shall be: "stericsson,ab8500-fg"
- battery = Shall be battery specific information
	Example:
	ab8500_fg {
		compatible = "stericsson,ab8500-fg";
		battery	   = <&ab8500_battery>;
	};

dependent node:
	ab8500_battery: ab8500_battery {
	};
	This node will provide information on 'thermistor interface' and
	'battery technology type' used.
AB85000 PMIC contains a node, which contains shared
information about the battery connected to the PMIC.
The node has no compatible property.

Properties of this node are:

thermistor-on-batctrl:
	A boolean value indicating thermistor interface	to battery

@@ -55,4 +32,3 @@ battery-type:
	ab8500_battery: ab8500_battery {
		stericsson,battery-type = "LIPO";
	}
+73 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021 Sebastian Reichel
%YAML 1.2
---
$id: "http://devicetree.org/schemas/power/supply/stericsson,ab8500-btemp.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: AB8500 Battery Temperature Monitor

maintainers:
  - Sebastian Reichel <sre@kernel.org>

allOf:
  - $ref: power-supply.yaml#

properties:
  compatible:
    const: stericsson,ab8500-btemp

  battery:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: phandle to battery node

  interrupts:
    maxItems: 5

  interrupt-names:
    items:
      - const: BAT_CTRL_INDB
      - const: BTEMP_LOW
      - const: BTEMP_HIGH
      - const: BTEMP_LOW_MEDIUM
      - const: BTEMP_MEDIUM_HIGH

  io-channels:
    maxItems: 2

  io-channel-names:
    items:
      - const: btemp_ball
      - const: bat_ctrl

required:
  - compatible
  - battery
  - interrupts
  - interrupt-names
  - io-channels
  - io-channel-names

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    pmic {
      battery-temperature {
        compatible = "stericsson,ab8500-btemp";
        battery = <&ab8500_battery>;
        interrupts = <20 IRQ_TYPE_LEVEL_HIGH>,
                     <80 IRQ_TYPE_LEVEL_HIGH>,
                     <83 IRQ_TYPE_LEVEL_HIGH>,
                     <81 IRQ_TYPE_LEVEL_HIGH>,
                     <82 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "BAT_CTRL_INDB",
                          "BTEMP_LOW",
                          "BTEMP_HIGH",
                          "BTEMP_LOW_MEDIUM",
                          "BTEMP_MEDIUM_HIGH";
        io-channels = <&gpadc 0x02>, <&gpadc 0x01>;
        io-channel-names = "btemp_ball", "bat_ctrl";
      };
    };
Loading