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

dt-bindings: mfd: dlg,da9063: Convert da9062 to json-schema

Convert the da9062 PMIC device tree binding documentation to json-schema.

Document the missing gpio child node for da9062.

While at it, update description with link to product information and
example.

The missing child node with of_compatible defined in MFD_CELL_OF is
causing the below warning message:
da9062-gpio: Failed to locate of_node [id: -1]

So, make all child nodes with of_compatible defined in struct mfd_cell
as required property for da906{1,2} devices.

The "gpio-controller" and "#gpio-cells" properties are defined in the
parent instead of gpio child node as there are existing driver users
based on these parent properties.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20240131102656.3379-7-biju.das.jz@bp.renesas.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Biju Das and committed by
Lee Jones
f1eb64bf ae3a0d70

+212 -132
+1 -2
Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml
··· 11 11 12 12 description: | 13 13 This module is part of the DA9061/DA9062/DA9063. For more details about entire 14 - DA9062 and DA9061 chips see Documentation/devicetree/bindings/mfd/da9062.txt 15 - For DA9063 see Documentation/devicetree/bindings/mfd/dlg,da9063.yaml 14 + DA906{1,2,3} chips see Documentation/devicetree/bindings/mfd/dlg,da9063.yaml 16 15 17 16 This module provides the KEY_POWER event. 18 17
-124
Documentation/devicetree/bindings/mfd/da9062.txt
··· 1 - * Dialog DA9062 Power Management Integrated Circuit (PMIC) 2 - 3 - Product information for the DA9062 and DA9061 devices can be found here: 4 - - https://www.dialog-semiconductor.com/products/da9062 5 - - https://www.dialog-semiconductor.com/products/da9061 6 - 7 - The DA9062 PMIC consists of: 8 - 9 - Device Supply Names Description 10 - ------ ------------ ----------- 11 - da9062-regulator : : LDOs & BUCKs 12 - da9062-rtc : : Real-Time Clock 13 - da9062-onkey : : On Key 14 - da9062-watchdog : : Watchdog Timer 15 - da9062-thermal : : Thermal 16 - da9062-gpio : : GPIOs 17 - 18 - The DA9061 PMIC consists of: 19 - 20 - Device Supply Names Description 21 - ------ ------------ ----------- 22 - da9062-regulator : : LDOs & BUCKs 23 - da9062-onkey : : On Key 24 - da9062-watchdog : : Watchdog Timer 25 - da9062-thermal : : Thermal 26 - 27 - ====== 28 - 29 - Required properties: 30 - 31 - - compatible : Should be 32 - "dlg,da9062" for DA9062 33 - "dlg,da9061" for DA9061 34 - - reg : Specifies the I2C slave address (this defaults to 0x58 but it can be 35 - modified to match the chip's OTP settings). 36 - 37 - Optional properties: 38 - 39 - - gpio-controller : Marks the device as a gpio controller. 40 - - #gpio-cells : Should be two. The first cell is the pin number and the 41 - second cell is used to specify the gpio polarity. 42 - 43 - See Documentation/devicetree/bindings/gpio/gpio.txt for further information on 44 - GPIO bindings. 45 - 46 - - interrupts : IRQ line information. 47 - - interrupt-controller 48 - 49 - See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for 50 - further information on IRQ bindings. 51 - 52 - Sub-nodes: 53 - 54 - - regulators : This node defines the settings for the LDOs and BUCKs. 55 - The DA9062 regulators are bound using their names listed below: 56 - 57 - buck1 : BUCK_1 58 - buck2 : BUCK_2 59 - buck3 : BUCK_3 60 - buck4 : BUCK_4 61 - ldo1 : LDO_1 62 - ldo2 : LDO_2 63 - ldo3 : LDO_3 64 - ldo4 : LDO_4 65 - 66 - The DA9061 regulators are bound using their names listed below: 67 - 68 - buck1 : BUCK_1 69 - buck2 : BUCK_2 70 - buck3 : BUCK_3 71 - ldo1 : LDO_1 72 - ldo2 : LDO_2 73 - ldo3 : LDO_3 74 - ldo4 : LDO_4 75 - 76 - The component follows the standard regulator framework and the bindings 77 - details of individual regulator device can be found in: 78 - Documentation/devicetree/bindings/regulator/regulator.txt 79 - 80 - regulator-initial-mode may be specified for buck regulators using mode values 81 - from include/dt-bindings/regulator/dlg,da9063-regulator.h. 82 - 83 - - rtc : This node defines settings required for the Real-Time Clock associated 84 - with the DA9062. There are currently no entries in this binding, however 85 - compatible = "dlg,da9062-rtc" should be added if a node is created. 86 - 87 - - onkey : See ../input/dlg,da9062-onkey.yaml 88 - 89 - - watchdog: See ../watchdog/dlg,da9062-watchdog.yaml 90 - 91 - - thermal : See ../thermal/dlg,da9062-thermal.yaml 92 - 93 - Example: 94 - 95 - pmic0: da9062@58 { 96 - compatible = "dlg,da9062"; 97 - reg = <0x58>; 98 - interrupt-parent = <&gpio6>; 99 - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 100 - interrupt-controller; 101 - 102 - rtc { 103 - compatible = "dlg,da9062-rtc"; 104 - }; 105 - 106 - regulators { 107 - DA9062_BUCK1: buck1 { 108 - regulator-name = "BUCK1"; 109 - regulator-min-microvolt = <300000>; 110 - regulator-max-microvolt = <1570000>; 111 - regulator-min-microamp = <500000>; 112 - regulator-max-microamp = <2000000>; 113 - regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>; 114 - regulator-boot-on; 115 - }; 116 - DA9062_LDO1: ldo1 { 117 - regulator-name = "LDO_1"; 118 - regulator-min-microvolt = <900000>; 119 - regulator-max-microvolt = <3600000>; 120 - regulator-boot-on; 121 - }; 122 - }; 123 - }; 124 -
+210 -5
Documentation/devicetree/bindings/mfd/dlg,da9063.yaml
··· 4 4 $id: http://devicetree.org/schemas/mfd/dlg,da9063.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Dialog DA9063/DA9063L Power Management Integrated Circuit (PMIC) 7 + title: Dialog DA906{3L,3,2,1} Power Management Integrated Circuit (PMIC) 8 8 9 9 maintainers: 10 10 - Steve Twiss <stwiss.opensource@diasemi.com> ··· 17 17 moment where all voltage monitors are disabled. Next, as da9063 only supports 18 18 UV *and* OV monitoring, both must be set to the same severity and value 19 19 (0: disable, 1: enable). 20 + Product information for the DA906{3L,3,2,1} devices can be found here: 21 + - https://www.dialog-semiconductor.com/products/da9063l 22 + - https://www.dialog-semiconductor.com/products/da9063 23 + - https://www.dialog-semiconductor.com/products/da9062 24 + - https://www.dialog-semiconductor.com/products/da9061 20 25 21 26 properties: 22 27 compatible: 23 28 enum: 29 + - dlg,da9061 30 + - dlg,da9062 24 31 - dlg,da9063 25 32 - dlg,da9063l 26 33 ··· 42 35 "#interrupt-cells": 43 36 const: 2 44 37 38 + gpio-controller: true 39 + 40 + "#gpio-cells": 41 + const: 2 42 + 43 + gpio: 44 + type: object 45 + additionalProperties: false 46 + properties: 47 + compatible: 48 + const: dlg,da9062-gpio 49 + 45 50 onkey: 46 51 $ref: /schemas/input/dlg,da9062-onkey.yaml 47 52 ··· 61 42 type: object 62 43 additionalProperties: false 63 44 patternProperties: 64 - "^(ldo([1-9]|1[01])|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged)$": 45 + "^(ldo([1-9]|1[01])|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck[1-4])$": 65 46 $ref: /schemas/regulator/regulator.yaml 66 47 unevaluatedProperties: false 67 48 ··· 71 52 unevaluatedProperties: false 72 53 properties: 73 54 compatible: 74 - const: dlg,da9063-rtc 55 + enum: 56 + - dlg,da9062-rtc 57 + - dlg,da9063-rtc 58 + 59 + thermal: 60 + $ref: /schemas/thermal/dlg,da9062-thermal.yaml 75 61 76 62 watchdog: 77 63 $ref: /schemas/watchdog/dlg,da9062-watchdog.yaml 78 64 65 + patternProperties: 66 + "^(.+-hog(-[0-9]+)?)$": 67 + type: object 68 + 69 + required: 70 + - gpio-hog 71 + 79 72 required: 80 73 - compatible 81 74 - reg 82 - - interrupts 83 - - interrupt-controller 75 + 76 + allOf: 77 + - if: 78 + properties: 79 + compatible: 80 + contains: 81 + enum: 82 + - dlg,da9063 83 + - dlg,da9063l 84 + then: 85 + properties: 86 + gpio-controller: false 87 + "#gpio-cells": false 88 + gpio: false 89 + regulators: 90 + patternProperties: 91 + "^buck[1-4]$": false 92 + thermal: false 93 + required: 94 + - interrupts 95 + - interrupt-controller 96 + 97 + - if: 98 + properties: 99 + compatible: 100 + contains: 101 + enum: 102 + - dlg,da9062 103 + then: 104 + properties: 105 + regulators: 106 + patternProperties: 107 + "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged)$": false 108 + required: 109 + - gpio 110 + - onkey 111 + - rtc 112 + - thermal 113 + - watchdog 114 + 115 + - if: 116 + properties: 117 + compatible: 118 + contains: 119 + enum: 120 + - dlg,da9061 121 + then: 122 + properties: 123 + gpio-controller: false 124 + "#gpio-cells": false 125 + gpio: false 126 + regulators: 127 + patternProperties: 128 + "^(ldo([5-9]|10|11)|bcore([1-2]|s-merged)|b(pro|mem|io|peri)|bmem-bio-merged|buck4)$": false 129 + rtc: false 130 + required: 131 + - onkey 132 + - thermal 133 + - watchdog 84 134 85 135 additionalProperties: false 86 136 ··· 203 115 regulator-ov-protection-microvolt = <1>; 204 116 regulator-always-on; 205 117 }; 118 + }; 119 + }; 120 + }; 121 + 122 + - | 123 + #include <dt-bindings/interrupt-controller/irq.h> 124 + #include <dt-bindings/regulator/dlg,da9063-regulator.h> 125 + i2c { 126 + #address-cells = <1>; 127 + #size-cells = <0>; 128 + pmic@58 { 129 + compatible = "dlg,da9062"; 130 + reg = <0x58>; 131 + gpio-controller; 132 + #gpio-cells = <2>; 133 + 134 + sd0-pwr-sel-hog { 135 + gpio-hog; 136 + gpios = <1 0>; 137 + input; 138 + line-name = "SD0_PWR_SEL"; 139 + }; 140 + 141 + sd1-pwr-sel-hog { 142 + gpio-hog; 143 + gpios = <2 0>; 144 + input; 145 + line-name = "SD1_PWR_SEL"; 146 + }; 147 + 148 + sw-et0-en-hog { 149 + gpio-hog; 150 + gpios = <3 0>; 151 + input; 152 + line-name = "SW_ET0_EN#"; 153 + }; 154 + 155 + pmic-good-hog { 156 + gpio-hog; 157 + gpios = <4 0>; 158 + output-high; 159 + line-name = "PMIC_PGOOD"; 160 + }; 161 + 162 + gpio { 163 + compatible = "dlg,da9062-gpio"; 164 + }; 165 + 166 + onkey { 167 + compatible = "dlg,da9062-onkey"; 168 + }; 169 + 170 + regulators { 171 + buck1 { 172 + regulator-name = "vdd_arm"; 173 + regulator-min-microvolt = <925000>; 174 + regulator-max-microvolt = <1380000>; 175 + regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>; 176 + regulator-always-on; 177 + }; 178 + buck2 { 179 + regulator-name = "vdd_soc"; 180 + regulator-min-microvolt = <1150000>; 181 + regulator-max-microvolt = <1380000>; 182 + regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>; 183 + regulator-always-on; 184 + }; 185 + buck3 { 186 + regulator-name = "vdd_ddr3"; 187 + regulator-min-microvolt = <1500000>; 188 + regulator-max-microvolt = <1500000>; 189 + regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>; 190 + regulator-always-on; 191 + }; 192 + buck4 { 193 + regulator-name = "vdd_eth"; 194 + regulator-min-microvolt = <1200000>; 195 + regulator-max-microvolt = <1200000>; 196 + regulator-initial-mode = <DA9063_BUCK_MODE_SYNC>; 197 + regulator-always-on; 198 + }; 199 + ldo1 { 200 + regulator-name = "vdd_snvs"; 201 + regulator-min-microvolt = <3000000>; 202 + regulator-max-microvolt = <3000000>; 203 + regulator-always-on; 204 + }; 205 + ldo2 { 206 + regulator-name = "vdd_high"; 207 + regulator-min-microvolt = <3000000>; 208 + regulator-max-microvolt = <3000000>; 209 + regulator-always-on; 210 + }; 211 + ldo3 { 212 + regulator-name = "vdd_eth_io"; 213 + regulator-min-microvolt = <2500000>; 214 + regulator-max-microvolt = <2500000>; 215 + }; 216 + ldo4 { 217 + regulator-name = "vdd_emmc"; 218 + regulator-min-microvolt = <1800000>; 219 + regulator-max-microvolt = <1800000>; 220 + regulator-always-on; 221 + }; 222 + }; 223 + 224 + rtc { 225 + compatible = "dlg,da9062-rtc"; 226 + }; 227 + 228 + thermal { 229 + compatible = "dlg,da9062-thermal"; 230 + }; 231 + 232 + watchdog { 233 + compatible = "dlg,da9062-watchdog"; 234 + dlg,use-sw-pm; 206 235 }; 207 236 }; 208 237 };
+1 -1
Documentation/devicetree/bindings/thermal/dlg,da9062-thermal.yaml
··· 11 11 12 12 description: | 13 13 This module is part of the DA9061/DA9062. For more details about entire 14 - DA9062 and DA9061 chips see Documentation/devicetree/bindings/mfd/da9062.txt 14 + DA906{1,2} chips see Documentation/devicetree/bindings/mfd/dlg,da9063.yaml 15 15 16 16 Junction temperature thermal module uses an interrupt signal to identify 17 17 high THERMAL_TRIP_HOT temperatures for the PMIC device.