Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mfd: max77650: Convert the binding document to yaml

Convert the binding document for MAX77650 core MFD module to YAML.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Bartosz Golaszewski and committed by
Lee Jones
59dbc0e0 b944a688

+149 -46
-46
Documentation/devicetree/bindings/mfd/max77650.txt
··· 1 - MAX77650 ultra low-power PMIC from Maxim Integrated. 2 - 3 - Required properties: 4 - ------------------- 5 - - compatible: Must be "maxim,max77650" 6 - - reg: I2C device address. 7 - - interrupts: The interrupt on the parent the controller is 8 - connected to. 9 - - interrupt-controller: Marks the device node as an interrupt controller. 10 - - #interrupt-cells: Must be <2>. 11 - 12 - - gpio-controller: Marks the device node as a gpio controller. 13 - - #gpio-cells: Must be <2>. The first cell is the pin number and 14 - the second cell is used to specify the gpio active 15 - state. 16 - 17 - Optional properties: 18 - -------------------- 19 - gpio-line-names: Single string containing the name of the GPIO line. 20 - 21 - The GPIO-controller module is represented as part of the top-level PMIC 22 - node. The device exposes a single GPIO line. 23 - 24 - For device-tree bindings of other sub-modules (regulator, power supply, 25 - LEDs and onkey) refer to the binding documents under the respective 26 - sub-system directories. 27 - 28 - For more details on GPIO bindings, please refer to the generic GPIO DT 29 - binding document <devicetree/bindings/gpio/gpio.txt>. 30 - 31 - Example: 32 - -------- 33 - 34 - pmic@48 { 35 - compatible = "maxim,max77650"; 36 - reg = <0x48>; 37 - 38 - interrupt-controller; 39 - interrupt-parent = <&gpio2>; 40 - #interrupt-cells = <2>; 41 - interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 42 - 43 - gpio-controller; 44 - #gpio-cells = <2>; 45 - gpio-line-names = "max77650-charger"; 46 - };
+149
Documentation/devicetree/bindings/mfd/max77650.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/max77650.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MAX77650 ultra low-power PMIC from Maxim Integrated. 8 + 9 + maintainers: 10 + - Bartosz Golaszewski <bgolaszewski@baylibre.com> 11 + 12 + description: | 13 + MAX77650 is an ultra-low power PMIC providing battery charging and power 14 + supply for low-power IoT and wearable applications. 15 + 16 + The GPIO-controller module is represented as part of the top-level PMIC 17 + node. The device exposes a single GPIO line. 18 + 19 + For device-tree bindings of other sub-modules (regulator, power supply, 20 + LEDs and onkey) refer to the binding documents under the respective 21 + sub-system directories. 22 + 23 + properties: 24 + compatible: 25 + const: maxim,max77650 26 + 27 + reg: 28 + description: 29 + I2C device address. 30 + maxItems: 1 31 + 32 + interrupts: 33 + maxItems: 1 34 + 35 + interrupt-controller: true 36 + 37 + "#interrupt-cells": 38 + const: 2 39 + description: 40 + The first cell is the IRQ number, the second cell is the trigger type. 41 + 42 + gpio-controller: true 43 + 44 + "#gpio-cells": 45 + const: 2 46 + description: 47 + The first cell is the pin number and the second cell is used to specify 48 + the gpio active state. 49 + 50 + gpio-line-names: 51 + maxItems: 1 52 + description: 53 + Single string containing the name of the GPIO line. 54 + 55 + regulators: 56 + $ref: ../regulator/max77650-regulator.yaml 57 + 58 + charger: 59 + $ref: ../power/supply/max77650-charger.yaml 60 + 61 + leds: 62 + $ref: ../leds/leds-max77650.yaml 63 + 64 + onkey: 65 + $ref: ../input/max77650-onkey.yaml 66 + 67 + required: 68 + - compatible 69 + - reg 70 + - interrupts 71 + - interrupt-controller 72 + - "#interrupt-cells" 73 + - gpio-controller 74 + - "#gpio-cells" 75 + 76 + examples: 77 + - | 78 + #include <dt-bindings/interrupt-controller/irq.h> 79 + #include <dt-bindings/input/linux-event-codes.h> 80 + i2c { 81 + #address-cells = <1>; 82 + #size-cells = <0>; 83 + 84 + pmic@48 { 85 + compatible = "maxim,max77650"; 86 + reg = <0x48>; 87 + 88 + interrupt-controller; 89 + interrupt-parent = <&gpio2>; 90 + #interrupt-cells = <2>; 91 + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 92 + 93 + gpio-controller; 94 + #gpio-cells = <2>; 95 + gpio-line-names = "max77650-charger"; 96 + 97 + regulators { 98 + compatible = "maxim,max77650-regulator"; 99 + 100 + max77650_ldo: regulator@0 { 101 + regulator-compatible = "ldo"; 102 + regulator-name = "max77650-ldo"; 103 + regulator-min-microvolt = <1350000>; 104 + regulator-max-microvolt = <2937500>; 105 + }; 106 + 107 + max77650_sbb0: regulator@1 { 108 + regulator-compatible = "sbb0"; 109 + regulator-name = "max77650-sbb0"; 110 + regulator-min-microvolt = <800000>; 111 + regulator-max-microvolt = <1587500>; 112 + }; 113 + }; 114 + 115 + charger { 116 + compatible = "maxim,max77650-charger"; 117 + input-voltage-min-microvolt = <4200000>; 118 + input-current-limit-microamp = <285000>; 119 + }; 120 + 121 + leds { 122 + compatible = "maxim,max77650-led"; 123 + #address-cells = <1>; 124 + #size-cells = <0>; 125 + 126 + led@0 { 127 + reg = <0>; 128 + label = "blue:usr0"; 129 + }; 130 + 131 + led@1 { 132 + reg = <1>; 133 + label = "red:usr1"; 134 + linux,default-trigger = "heartbeat"; 135 + }; 136 + 137 + led@2 { 138 + reg = <2>; 139 + label = "green:usr2"; 140 + }; 141 + }; 142 + 143 + onkey { 144 + compatible = "maxim,max77650-onkey"; 145 + linux,code = <KEY_END>; 146 + maxim,onkey-slide; 147 + }; 148 + }; 149 + };