dt-bindings: mfd: Convert dlg,da9052-i2c.txt to yaml format
Subsystems (4)
Frank Li
maintainerPATCH 1/1 dt-bindings: mfd: Convert dlg,da9052-i2c.txt to yaml format
Convert dlg,da9052-i2c.txt to yaml format.
Additional changes:
- compatible string fallback to dlg,da9052 to align existing dts files.
- Add interrupts property.
- Add ref to /schemas/spi/spi-peripheral-props.yaml#
Remove dlg,da9053 from trivial-devices.yaml.
--- .../devicetree/bindings/mfd/da9052-i2c.txt | 67 ------------- .../devicetree/bindings/mfd/dlg,da9052.yaml | 93 +++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 2 - 3 files changed, 93 insertions(+), 69 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/da9052-i2c.txt create mode 100644 Documentation/devicetree/bindings/mfd/dlg,da9052.yaml
Documentation/devicetree/bindings/mfd/da9052-i2c.txt deleted +0 -67
@@ -1,67 +0,0 @@ -* Dialog DA9052/53 Power Management Integrated Circuit (PMIC) - -Required properties: -- compatible : Should be "dlg,da9052", "dlg,da9053-aa", - "dlg,da9053-ab", or "dlg,da9053-bb" - -Optional properties: -- dlg,tsi-as-adc : Boolean, if set the X+, X-, Y+, Y- touchscreen - input lines are used as general purpose analogue - input. -- tsiref-supply: Phandle to the regulator, which provides the reference - voltage for the TSIREF pin. Must be provided when the - touchscreen pins are used for ADC purposes. - -Sub-nodes: -- regulators : Contain the regulator nodes. The DA9052/53 regulators are - bound using their names as listed below: - - buck1 : regulator BUCK CORE - buck2 : regulator BUCK PRO - buck3 : regulator BUCK MEM - buck4 : regulator BUCK PERI - ldo1 : regulator LDO1 - ldo2 : regulator LDO2 - ldo3 : regulator LDO3 - ldo4 : regulator LDO4 - ldo5 : regulator LDO5 - ldo6 : regulator LDO6 - ldo7 : regulator LDO7 - ldo8 : regulator LDO8 - ldo9 : regulator LDO9 - ldo10 : regulator LDO10 - - The bindings details of individual regulator device can be found in: - Documentation/devicetree/bindings/regulator/regulator.txt - -Examples: - -i2c@63fc8000 { /* I2C1 */ - - pmic: dialog@48 { - compatible = "dlg,da9053-aa"; - reg = <0x48>; - - regulators { - buck1 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <2075000>; - }; - - buck2 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <2075000>; - }; - - buck3 { - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <2500000>; - }; - - buck4 { - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <2500000>; - }; - }; - }; -};
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +93 -0
93 lines not on this page · raw message
Documentation/devicetree/bindings/trivial-devices.yaml +0 -2
@@ -103,8 +103,6 @@ properties: - dfrobot,sen0322 # DH electronics GmbH on-board CPLD trivial SPI device - dh,dhcom-board - # DA9053: flexible system level PMIC with multicore support - - dlg,da9053 # DMARD05: 3-axis I2C Accelerometer - domintech,dmard05 # DMARD06: 3-axis I2C Accelerometer
Signature · 1 line
2.34.1
Quoted 103 lines · Frank Li
Convert dlg,da9052-i2c.txt to yaml format.
Additional changes:
- compatible string fallback to dlg,da9052 to align existing dts files.
- Add interrupts property.
- Add ref to /schemas/spi/spi-peripheral-props.yaml#Remove dlg,da9053 from
trivial-devices.yaml.Signed-off-by Frank Li <[email protected]>--- .../devicetree/bindings/mfd/da9052-i2c.txt | 67 ------------- .../devicetree/bindings/mfd/dlg,da9052.yaml | 93 +++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 2 - 3 files changed, 93 insertions(+), 69 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/da9052-i2c.txt create mode 100644 Documentation/devicetree/bindings/mfd/dlg,da9052.yamlDocumentation/devicetree/bindings/mfd/da9052-i2c.txt deleted +0
-67@@ -1,67 +0,0 @@ -* Dialog DA9052/53 Power Management Integrated Circuit (PMIC) - -Required properties: -- compatible : Should be "dlg,da9052", "dlg,da9053-aa", - "dlg,da9053-ab", or "dlg,da9053-bb" - -Optional properties: -- dlg,tsi-as-adc : Boolean, if set the X+, X-, Y+, Y- touchscreen - input lines are used as general purpose analogue - input. -- tsiref-supply: Phandle to the regulator, which provides the reference - voltage for the TSIREF pin. Must be provided when the - touchscreen pins are used for ADC purposes. - -Sub-nodes: -- regulators : Contain the regulator nodes. The DA9052/53 regulators are - bound using their names as listed below: - - buck1 : regulator BUCK CORE - buck2 : regulator BUCK PRO - buck3 : regulator BUCK MEM - buck4 : regulator BUCK PERI - ldo1 : regulator LDO1 - ldo2 : regulator LDO2 - ldo3 : regulator LDO3 - ldo4 : regulator LDO4 - ldo5 : regulator LDO5 - ldo6 : regulator LDO6 - ldo7 : regulator LDO7 - ldo8 : regulator LDO8 - ldo9 : regulator LDO9 - ldo10 : regulator LDO10 - - The bindings details of individual regulator device can be found in: - Documentation/devicetree/bindings/regulator/regulator.txt - -Examples: - -i2c@63fc8000 { /* I2C1 */ - - pmic: dialog@48 { - compatible = "dlg,da9053-aa"; - reg = <0x48>; - - regulators { - buck1 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <2075000>; - }; - - buck2 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <2075000>; - }; - - buck3 { - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <2500000>; - }; - - buck4 { - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <2500000>; - }; - }; - }; -};Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +7
-0@@ -0,0 +1,93 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/dlg,da9052.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Dialog DA9052/53 Power Management Integrated Circuit (PMIC)
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +10
-0+ +maintainers: + - Frank Li <[email protected]> + +properties: + compatible: + oneOf: + - items: + - enum: + - dlg,da9053
Should this actually exist? It was never in any drivers etc at all, and as far as I can tell any users use the -XX suffixed ones. Probably this is the only compatible that /should/ have been used, but it might be pointless to add now.
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 20
Quoted 3 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +3
-0+ - dlg,da9053-aa + - dlg,da9053-ab + - dlg,da9053-bb
The driver also has a bc, I think that should be added.
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 21
Quoted 1 line
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +1
-0+ - const: dlg,da9052
Is this actually a correct fallback?
I know it is being used, but looking at the drivers I see things like:
/* Select the appropriate current limit range */ if (regulator->da9052->chip_id == DA9052) row = 0; else if (offset == 0) row = 1;
in both the battery and regulator drivers.
Might actually be the devicetrees are wrong here?
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 24
Quoted 3 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +3
-0+ - enum: + - dlg,da9052 + - dlg,da9053-aa # Just for match existed old platform
Could you just change that one old platform using it? Otherwise, conversion looks okay to me.
pw-bot: changes-requested
Cheers,
Conor.
Quoted 85 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +69
-0+ + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + dlg,tsi-as-adc: + type: boolean + description: + if set the X+, X-, Y+, Y- touchscreen input lines are used as general + purpose analogue input. + + tsiref-supply: + description: The reference voltage for the TSIREF pin. + + regulators: + type: object + additionalProperties: false + + patternProperties: + "^(ldo([1-9]|10)|buck[1-4])$": + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + - regulators + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@48 { + compatible = "dlg,da9053-aa"; + reg = <0x48>; + + regulators { + buck1 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2075000>; + }; + + buck2 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2075000>; + }; + + buck3 { + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <2500000>; + }; + + buck4 { + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <2500000>; + }; + }; + }; + };Documentation/devicetree/bindings/trivial-devices.yaml +0
-2@@ -103,8 +103,6 @@ properties: - dfrobot,sen0322 # DH electronics GmbH on-board CPLD trivial SPI device - dh,dhcom-board - # DA9053: flexible system level PMIC with multicore support - - dlg,da9053 # DMARD05: 3-axis I2C Accelerometer - domintech,dmard05 # DMARD06: 3-axis I2C AccelerometerSignature · 1 line
2.34.1
Frank Li
maintainerQuoted 111 lines · Conor Dooley
Quoted 110 lines · Frank Li
Convert dlg,da9052-i2c.txt to yaml format.
Additional changes:
- compatible string fallback to dlg,da9052 to align existing dts files.
- Add interrupts property.
- Add ref to /schemas/spi/spi-peripheral-props.yaml#Remove dlg,da9053 from
trivial-devices.yaml.Signed-off-by Frank Li <[email protected]>--- .../devicetree/bindings/mfd/da9052-i2c.txt | 67 ------------- .../devicetree/bindings/mfd/dlg,da9052.yaml | 93 +++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 2 - 3 files changed, 93 insertions(+), 69 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/da9052-i2c.txt create mode 100644 Documentation/devicetree/bindings/mfd/dlg,da9052.yamlDocumentation/devicetree/bindings/mfd/da9052-i2c.txt deleted +0
-67@@ -1,67 +0,0 @@ -* Dialog DA9052/53 Power Management Integrated Circuit (PMIC) - -Required properties: -- compatible : Should be "dlg,da9052", "dlg,da9053-aa", - "dlg,da9053-ab", or "dlg,da9053-bb" - -Optional properties: -- dlg,tsi-as-adc : Boolean, if set the X+, X-, Y+, Y- touchscreen - input lines are used as general purpose analogue - input. -- tsiref-supply: Phandle to the regulator, which provides the reference - voltage for the TSIREF pin. Must be provided when the - touchscreen pins are used for ADC purposes. - -Sub-nodes: -- regulators : Contain the regulator nodes. The DA9052/53 regulators are - bound using their names as listed below: - - buck1 : regulator BUCK CORE - buck2 : regulator BUCK PRO - buck3 : regulator BUCK MEM - buck4 : regulator BUCK PERI - ldo1 : regulator LDO1 - ldo2 : regulator LDO2 - ldo3 : regulator LDO3 - ldo4 : regulator LDO4 - ldo5 : regulator LDO5 - ldo6 : regulator LDO6 - ldo7 : regulator LDO7 - ldo8 : regulator LDO8 - ldo9 : regulator LDO9 - ldo10 : regulator LDO10 - - The bindings details of individual regulator device can be found in: - Documentation/devicetree/bindings/regulator/regulator.txt - -Examples: - -i2c@63fc8000 { /* I2C1 */ - - pmic: dialog@48 { - compatible = "dlg,da9053-aa"; - reg = <0x48>; - - regulators { - buck1 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <2075000>; - }; - - buck2 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <2075000>; - }; - - buck3 { - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <2500000>; - }; - - buck4 { - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <2500000>; - }; - }; - }; -};Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +14
-0@@ -0,0 +1,93 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/dlg,da9052.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Dialog DA9052/53 Power Management Integrated Circuit (PMIC) + +maintainers: + - Frank Li <[email protected]> + +properties: + compatible: + oneOf:
Quoted 8 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 17
Quoted 3 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +3
-0+ - items: + - enum: + - dlg,da9053Should this actually exist? It was never in any drivers etc at all, and as far as I can tell any users use the -XX suffixed ones. Probably this is the only compatible that /should/ have been used, but it might be pointless to add now.
A old dts arch/arm/boot/dts/nxp/imx/imx53-smd.dts use "dlg,da9053", "dlg,da9052"
Quoted 11 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 20
Quoted 4 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +3
-0+ - dlg,da9053-aa + - dlg,da9053-ab + - dlg,da9053-bbThe driver also has a bc, I think that should be added.
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 21
Quoted 1 line
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +1
-0+ - const: dlg,da9052Is this actually a correct fallback?
I know it is being used, but looking at the drivers I see things like:
Quoted 7 lines
/* Select the appropriate current limit range */ if (regulator->da9052->chip_id == DA9052) row = 0; else if (offset == 0) row = 1;in both the battery and regulator drivers.
Might actually be the devicetrees are wrong here?
Ideally, not fallback to dlg,da9052, but need update old dts file to clean up warning.
If you prefer this way, I can remove fallback and update dts files.
Quoted 6 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 24
Quoted 4 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +3
-0+ - enum: + - dlg,da9052 + - dlg,da9053-aa # Just for match existed old platformCould you just change that one old platform using it?
Yes
Frank
Quoted 92 lines
Otherwise, conversion looks okay to me.
pw-bot: changes-requested
Cheers,
Conor.Quoted 85 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +69
-0+ + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + dlg,tsi-as-adc: + type: boolean + description: + if set the X+, X-, Y+, Y- touchscreen input lines are used as general + purpose analogue input. + + tsiref-supply: + description: The reference voltage for the TSIREF pin. + + regulators: + type: object + additionalProperties: false + + patternProperties: + "^(ldo([1-9]|10)|buck[1-4])$": + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + - regulators + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@48 { + compatible = "dlg,da9053-aa"; + reg = <0x48>; + + regulators { + buck1 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2075000>; + }; + + buck2 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <2075000>; + }; + + buck3 { + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <2500000>; + }; + + buck4 { + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <2500000>; + }; + }; + }; + };Documentation/devicetree/bindings/trivial-devices.yaml +0
-3@@ -103,8 +103,6 @@ properties: - dfrobot,sen0322 # DH electronics GmbH on-board CPLD trivial SPI device - dh,dhcom-board - # DA9053: flexible system level PMIC with multicore support - - dlg,da9053 # DMARD05: 3-axis I2C Accelerometer - domintech,dmard05 # DMARD06: 3-axis I2C Accelerometer --2.34.1
Quoted 121 lines · Frank Li
Quoted 111 lines · Conor Dooley
Quoted 110 lines · Frank Li
Convert dlg,da9052-i2c.txt to yaml format.
Additional changes:
- compatible string fallback to dlg,da9052 to align existing dts files.
- Add interrupts property.
- Add ref to /schemas/spi/spi-peripheral-props.yaml#Remove dlg,da9053 from
trivial-devices.yaml.Signed-off-by Frank Li <[email protected]>--- .../devicetree/bindings/mfd/da9052-i2c.txt | 67 ------------- .../devicetree/bindings/mfd/dlg,da9052.yaml | 93 +++++++++++++++++++ .../devicetree/bindings/trivial-devices.yaml | 2 - 3 files changed, 93 insertions(+), 69 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/da9052-i2c.txt create mode 100644 Documentation/devicetree/bindings/mfd/dlg,da9052.yamlDocumentation/devicetree/bindings/mfd/da9052-i2c.txt deleted +0
-67@@ -1,67 +0,0 @@ -* Dialog DA9052/53 Power Management Integrated Circuit (PMIC) - -Required properties: -- compatible : Should be "dlg,da9052", "dlg,da9053-aa", - "dlg,da9053-ab", or "dlg,da9053-bb" - -Optional properties: -- dlg,tsi-as-adc : Boolean, if set the X+, X-, Y+, Y- touchscreen - input lines are used as general purpose analogue - input. -- tsiref-supply: Phandle to the regulator, which provides the reference - voltage for the TSIREF pin. Must be provided when the - touchscreen pins are used for ADC purposes. - -Sub-nodes: -- regulators : Contain the regulator nodes. The DA9052/53 regulators are - bound using their names as listed below: - - buck1 : regulator BUCK CORE - buck2 : regulator BUCK PRO - buck3 : regulator BUCK MEM - buck4 : regulator BUCK PERI - ldo1 : regulator LDO1 - ldo2 : regulator LDO2 - ldo3 : regulator LDO3 - ldo4 : regulator LDO4 - ldo5 : regulator LDO5 - ldo6 : regulator LDO6 - ldo7 : regulator LDO7 - ldo8 : regulator LDO8 - ldo9 : regulator LDO9 - ldo10 : regulator LDO10 - - The bindings details of individual regulator device can be found in: - Documentation/devicetree/bindings/regulator/regulator.txt - -Examples: - -i2c@63fc8000 { /* I2C1 */ - - pmic: dialog@48 { - compatible = "dlg,da9053-aa"; - reg = <0x48>; - - regulators { - buck1 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <2075000>; - }; - - buck2 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <2075000>; - }; - - buck3 { - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <2500000>; - }; - - buck4 { - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <2500000>; - }; - }; - }; -};Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +14
-0@@ -0,0 +1,93 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/dlg,da9052.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Dialog DA9052/53 Power Management Integrated Circuit (PMIC) + +maintainers: + - Frank Li <[email protected]> + +properties: + compatible: + oneOf:Quoted 8 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 17
Quoted 3 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +3
-0+ - items: + - enum: + - dlg,da9053Should this actually exist? It was never in any drivers etc at all, and as far as I can tell any users use the -XX suffixed ones. Probably this is the only compatible that /should/ have been used, but it might be pointless to add now.
Quoted 1 line
A old dts
arch/arm/boot/dts/nxp/imx/imx53-smd.dtsuse "dlg,da9053", "dlg,da9052"
Given my observations about the fallback below, I think this one should be changed in the dts to whatever dlg,da9053-XX variant it actually is.
Quoted 18 lines
Quoted 10 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 20
Quoted 3 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +3
-0+ - dlg,da9053-aa + - dlg,da9053-ab + - dlg,da9053-bbThe driver also has a bc, I think that should be added.
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 21
Quoted 1 line
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +1
-0+ - const: dlg,da9052Is this actually a correct fallback?
I know it is being used, but looking at the drivers I see things like:Quoted 7 lines
/* Select the appropriate current limit range */ if (regulator->da9052->chip_id == DA9052) row = 0; else if (offset == 0) row = 1;in both the battery and regulator drivers.
Might actually be the devicetrees are wrong here?
Quoted 4 lines
Ideally, not fallback to dlg,da9052, but need update old dts file to clean up warning.
If you prefer this way, I can remove fallback and update dts files.
Yeah, I think so. If the things need different current limits I don't think that the fallback is really suitable.
Quoted 7 lines
Quoted 5 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml line 24
Quoted 3 lines
Documentation/devicetree/bindings/mfd/dlg,da9052.yaml new file +3
-0+ - enum: + - dlg,da9052 + - dlg,da9053-aa # Just for match existed old platformCould you just change that one old platform using it?
Yes
And since we are removing the da9052 fallback, this comment can be removed and the old platform can stay as it is.