Add Richtek RTQ2208 SubPMIC support
Subsystems (2)
PATCH v2 2/2 regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver
In reply to [email protected]From: alinayu <[email protected]>
Add support for the RTQ2208 SubPMIC
This ic integrates with configurable, synchrnous buck converters and two ldos.
--- drivers/regulator/Kconfig | 12 + drivers/regulator/Makefile | 1 + drivers/regulator/rtq2208-regulator.c | 550 ++++++++++++++++++++++++++++++++++ 3 files changed, 563 insertions(+) create mode 100644 drivers/regulator/rtq2208-regulator.c
drivers/regulator/Kconfig +12 -0
@@ -1213,6 +1213,18 @@ config REGULATOR_RTQ6752 synchronous boost converters for PAVDD, and one synchronous NAVDD buck-boost. This device is suitable for automotive TFT-LCD panel. +config REGULATOR_RTQ2208 + tristate "Richtek RTQ2208 SubPMIC Regulator" + depends on I2C + select REGMAP_I2C + select RTGMAP_IRQ + help + This driver adds support for RTQ2208 SubPMIC regulators. + The RTQ2208 is a multi-phase, programmable power management IC that + integrate with dual multi-configurable, synchronous buck converters + and two ldos. It features wide output voltage range from 0.4V to 2.05V + and the capability to configure the corresponding power stages. + config REGULATOR_S2MPA01 tristate "Samsung S2MPA01 voltage regulator" depends on MFD_SEC_CORE || COMPILE_TEST
drivers/regulator/Makefile +1 -0
@@ -143,6 +143,7 @@ obj-$(CONFIG_REGULATOR_RT6245) += rt6245-regulator.o obj-$(CONFIG_REGULATOR_RTMV20) += rtmv20-regulator.o obj-$(CONFIG_REGULATOR_RTQ2134) += rtq2134-regulator.o obj-$(CONFIG_REGULATOR_RTQ6752) += rtq6752-regulator.o +obj-$(CONFIG_REGULATOR_RTQ2208) += rtq2208-regulator.o obj-$(CONFIG_REGULATOR_S2MPA01) += s2mpa01.o obj-$(CONFIG_REGULATOR_S2MPS11) += s2mps11.o obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
drivers/regulator/rtq2208-regulator.c new file +550 -0
550 lines not on this page · raw message
Signature · 1 line
2.7.4
v2 cover Add Richtek RTQ2208 SubPMIC support
From: alinayu <[email protected]>
This driver adds support for RTQ2208 SubPMIC regulators.
The RTQ2208 is a multi-phase, programmable power management IC that integrate with dual multi-configurable, synchronous buck converters and two ldos. The bucks features wide output voltage range from 0.4V to 2.05V and the capability to configure the corresponding power stages.
alinayu (2):
regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver
.../regulator/richtek,rtq2208-regulator.yaml | 228 +++++++++ drivers/regulator/Kconfig | 12 + drivers/regulator/Makefile | 1 + drivers/regulator/rtq2208-regulator.c | 550 +++++++++++++++++++++ 4 files changed, 791 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml create mode 100644 drivers/regulator/rtq2208-regulator.c
Signature · 1 line
2.7.4
PATCH v2 1/2 regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
From: alinayu <[email protected]>
Add bindings for Richtek RTQ2208 IC controlled SubPMIC
--- .../regulator/richtek,rtq2208-regulator.yaml | 228 +++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +228 -0
@@ -0,0 +1,228 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rtq2208-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RTQ2208 SubPMIC Regulator + +maintainers: + - Alina Yu <[email protected]> + +description: | + The RTQ2208 is a highly integrated multi-configurable power converter that + offers functional safety embedded dual multi-configurable synchronous buck + converters and two LDOs. + + Bucks support "regulator-allowed-modes" and "regulator-mode". The former defines the permitted + swiching operation in normal mode; the latter defines the operation in suspend to RAM mode. + + No matter the RTQ2208 is configured in normal or suspend to RAM mode, there are two switching + operation modes for all buck rails, automic power saving mode (Auto mode) and forced continious + conduction mode (FCCM). + + The meaning of modes is defined in the datasheet which is avaliabe in below link + and their meaning is:: + 0 - Auto mode for power saving, which reducing the switching frequency at light load condition + to maintain high frequency. + 1 - FCCM to meet the strict voltage regulation accuracy, which keeping constant switching frequency. + + Datasheet will be available soon at + https://www.richtek.com/assets/Products + + The standard "regulator-mode" property can only be used for bucks that + changing their mode to suspend to RAM mode. Also, it only takes effect if the + regulator has been enabled for the given suspend state using "regulator-on-in-suspend". + +properties: + compatible: + enum: + - richtek,rtq2208 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + richtek,mtp-sel: + description: | + Buck and ldo vout selection is based on this value. + There are two independently programmable voltage settings named as mtp-sel0 and + mtp-sel1 for RTQ2208 bucks vout voltage. 0 which means this property isn't present + and 1 which means this property is present corresponds to different adjustable registers. + + 0 - DVS0 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL0 register to en/disable vout. + 1 - DVS1 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL1 register to en/disable vout. + + type: boolean + + regulators: + type: object + + patternProperties: + "^buck_[A-H]$": + type: object + $ref: regulator.yaml# + description: | + regulator description for buck[A-H]. + + properties: + regulator-compatible: + pattern: "^BUCK_[A-H]$" + + regulator-allowed-modes: + description: | + describe buck permitted modes. + + "^ldo[1-2]$": + type: object + $ref: regulator.yaml# + description: | + regulator description for ldo[1-2]. + + properties: + regulator-compatible: + pattern: "^LDO[1-2]$" + + richtek,fixed_uV: + $ref: "/schemas/types.yaml#/definitions/uint32" + enum: [ 900000, 1200000, 1800000, 3300000 ] + description: | + the fixed voltage in microvolt which is descided at the factory. + + regulator-state-(mem): + type: object + additionalProperties: true + properties: + regulator-on-in-suspend: false + regulator-mode: false + +required: + - compatible + - reg + - regulators + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rtq2208@10 { + compatible = "richtek,rtq2208"; + reg = <0x10>; + interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; + richtek,mtp-sel; + + regulators { + BUCK_A:buck_A { + regulator-compatible = "BUCK_A"; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + BUCK_B:buck_B { + regulator-compatible = "BUCK_B"; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + BUCK_C:buck_C { + regulator-compatible = "BUCK_C"; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + BUCK_D:buck_D { + regulator-compatible = "BUCK_D"; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + BUCK_E:buck_E { + regulator-compatible = "BUCK_E"; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + BUCK_F:buck_F { + regulator-compatible = "BUCK_F"; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + BUCK_G:buck_G { + regulator-compatible = "BUCK_G"; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + BUCK_H:buck_H { + regulator-compatible = "BUCK_H"; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <2050000>; + regulator-allowed-modes = <0 1>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-mode = <1>; + }; + }; + LDO1:ldo1 { + regulator-compatible = "LDO1"; + richtek,fixed_uV = <1200000>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + LDO2:ldo2 { + regulator-compatible = "LDO2"; + regulator-always-on; + richtek,fixed_uV = <3300000>; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + }; + }; + };
Signature · 1 line
2.7.4
Re: [PATCH v2 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
Quoted 3 lines · On 05/07/2023 17:27, [email protected] wrote:
From: alinayu <[email protected]>
Add bindings for Richtek RTQ2208 IC controlled SubPMIC
Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.
You missed at least DT list (maybe more), so this won't be tested by our tools. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.
Please kindly resend and include all necessary To/Cc entries.
Limited review follows.
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml
Quoted 12 lines
Signed-off-by alinayu <[email protected]>--- .../regulator/richtek,rtq2208-regulator.yaml | 228 +++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yamlDocumentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +0
-0
Filename like compatible.
Quoted 15 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +14
-0@@ -0,0 +1,228 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rtq2208-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RTQ2208 SubPMIC Regulator + +maintainers: + - Alina Yu <[email protected]> + +description: | + The RTQ2208 is a highly integrated multi-configurable power converter that + offers functional safety embedded dual multi-configurable synchronous buck
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 24
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +10
-0+ converters and two LDOs. + + Bucks support "regulator-allowed-modes" and "regulator-mode". The former defines the permitted + swiching operation in normal mode; the latter defines the operation in suspend to RAM mode. + + No matter the RTQ2208 is configured in normal or suspend to RAM mode, there are two switching + operation modes for all buck rails, automic power saving mode (Auto mode) and forced continious + conduction mode (FCCM). + + The meaning of modes is defined in the datasheet which is avaliabe in below link
You have several typos here and before. Please run spellcheck.
Quoted 22 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +22
-0+ and their meaning is:: + 0 - Auto mode for power saving, which reducing the switching frequency at light load condition + to maintain high frequency. + 1 - FCCM to meet the strict voltage regulation accuracy, which keeping constant switching frequency. + + Datasheet will be available soon at + https://www.richtek.com/assets/Products + + The standard "regulator-mode" property can only be used for bucks that + changing their mode to suspend to RAM mode. Also, it only takes effect if the + regulator has been enabled for the given suspend state using "regulator-on-in-suspend". + +properties: + compatible: + enum: + - richtek,rtq2208 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 56
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +10
-0+ + richtek,mtp-sel: + description: | + Buck and ldo vout selection is based on this value. + There are two independently programmable voltage settings named as mtp-sel0 and + mtp-sel1 for RTQ2208 bucks vout voltage. 0 which means this property isn't present + and 1 which means this property is present corresponds to different adjustable registers. + + 0 - DVS0 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL0 register to en/disable vout. + 1 - DVS1 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL1 register to en/disable vout.
I read it three times and still don't understand. This is bool, not 0/1, so are these "0" refer to DVS0 or to presence of the property? Maybe Mark will understand it, I don't get it.
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 57
Quoted 1 line
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +1
-0+
No blank line. Just put type before description.
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 64
Quoted 7 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +7
-0+ type: boolean + + regulators: + type: object + + patternProperties: + "^buck_[A-H]$":
No underscores in node names. Lowercase names.
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 66
Quoted 2 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +2
-0+ type: object + $ref: regulator.yaml#
Missing unevaluatedProperties: false
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 72
Quoted 6 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +6
-0+ description: | + regulator description for buck[A-H]. + + properties: + regulator-compatible: + pattern: "^BUCK_[A-H]$"
Drop the property.
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 75
Quoted 3 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +3
-0+ + regulator-allowed-modes: + description: |
Do not need '|' unless you need to preserve formatting.
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 76
Quoted 1 line
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +1
-0+ describe buck permitted modes.
Exactly: describe them
Quoted 8 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +8
-0+ + "^ldo[1-2]$": + type: object + $ref: regulator.yaml# + description: | + regulator description for ldo[1-2]. + + properties:
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 94
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +10
-0+ regulator-compatible: + pattern: "^LDO[1-2]$" + + richtek,fixed_uV: + $ref: "/schemas/types.yaml#/definitions/uint32" + enum: [ 900000, 1200000, 1800000, 3300000 ] + description: | + the fixed voltage in microvolt which is descided at the factory. + + regulator-state-(mem):
That's not a pattern.
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 96
Quoted 2 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +2
-0+ type: object + additionalProperties: true
Why?
Quoted 9 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +9
-0+ properties: + regulator-on-in-suspend: false + regulator-mode: false + +required: + - compatible + - reg + - regulators +
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 115
Quoted 10 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +10
-0+unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rtq2208@10 {
Node names should be generic. See also explanation and list of examples in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 122
Quoted 7 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +7
-0+ compatible = "richtek,rtq2208"; + reg = <0x10>; + interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; + richtek,mtp-sel; + + regulators { + BUCK_A:buck_A {
Drop labels.
Best regards,
Krzysztof
Re: [PATCH v2 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
Quoted 10 lines · Krzysztof Kozlowski
Quoted 3 lines · On 05/07/2023 17:27, [email protected] wrote:
From: alinayu <[email protected]>
Add bindings for Richtek RTQ2208 IC controlled SubPMIC
Please use
scripts/get_maintainers.plto get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.
Quoted 9 lines
You missed at least DT list (maybe more), so this won't be tested by our tools. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.
Please kindly resend and include all necessary To/Cc entries.
Limited review follows.
Sorry, I will add all necessary people to CC list to v3.
...
Quoted 8 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 56
Quoted 7 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +7
-0+ Buck and ldo vout selection is based on this value. + There are two independently programmable voltage settings named as mtp-sel0 and + mtp-sel1 for RTQ2208 bucks vout voltage. 0 which means this property isn't present + and 1 which means this property is present corresponds to different adjustable registers. + + 0 - DVS0 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL0 register to en/disable vout. + 1 - DVS1 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL1 register to en/disable vout.
Quoted 4 lines
I read it three times and still don't understand. This is bool, not 0/1, so are these "0" refer to DVS0 or to presence of the property? Maybe Mark will understand it, I don't get it.
Yes, "0" refers to DVS0 registers, and "1" refers to DVS1.
and there is only DVS0 and DVS1, so I use boolean to check which one is used.
Is it more understandable if I modify that to enum ? And description will be like this
richtek,mtp-sel:
enum: [0, 1]
description: |
vout register selection besed on this value. 0 - Using DVS0 register setting to adjust vout 1 - Using DVS1 register setting to adjust vout
...
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ + regulator-state-(mem):That's not a pattern.
Should I revise that like this ?
patternProperties:
"^regulator-state-mem$":
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ type: object + additionalProperties: trueWhy?
Does "additionalProperties: true" mean I need to define my own property ?
If yes, I misunderstood additionalProperties as properties like "regulator-on-in-suspend" or "regulator-mode".
Quoted 16 lines
Quoted 16 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +15
-0+ properties: + regulator-on-in-suspend: false + regulator-mode: false + +required: + - compatible + - reg + - regulators + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c {
Quoted 9 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 115
Quoted 4 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +4
-0+ #address-cells = <1>; + #size-cells = <0>; + + rtq2208@10 {Node names should be generic. See also explanation and list of examples in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
I'll modify the node name to
regulator@10
in v3
Quoted 11 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 122
Quoted 7 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +7
-0+ compatible = "richtek,rtq2208"; + reg = <0x10>; + interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; + richtek,mtp-sel; + + regulators { + BUCK_A:buck_A {Drop labels.
BR,
Alina
Re: [PATCH v2 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
Quoted 10 lines · Alina Yu
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ + regulator-state-(mem):That's not a pattern.
Should I revise that like this ?
patternProperties:
"^regulator-state-mem$":
It's still not a pattern, but a regular property, so keep it in properties.
I don't even understand what you want to say with this. You put it outside of any regulator. I don't think this was tested at all. :(
Quoted 8 lines
Quoted 6 lines
Review
Quoted 4 lines
(quoted diff) +2
-0+ type: object + additionalProperties: trueWhy?
Does "additionalProperties: true" mean I need to define my own property ?
No.
Quoted 1 line
If yes, I misunderstood additionalProperties as properties like "regulator-on-in-suspend" or "regulator-mode".
Please open recent regulator bindings and use them as example.
Quoted 27 lines
Quoted 17 lines
Quoted 17 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +15
-0+ properties: + regulator-on-in-suspend: false + regulator-mode: false + +required: + - compatible + - reg + - regulators + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c {Quoted 9 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 115
Quoted 4 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +4
-0+ #address-cells = <1>; + #size-cells = <0>; + + rtq2208@10 {Node names should be generic. See also explanation and list of examples in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
Quoted 3 lines
I'll modify the node name to
regulator@10
If this is PMIC, then "pmic" as name.
Best regards,
Krzysztof
Re: [PATCH v2 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
In reply to Alina YuHi, Krzystof
Quoted 25 lines · Alina Yu
Quoted 5 lines · Krzysztof Kozlowski
Quoted 3 lines · On 05/07/2023 17:27, [email protected] wrote:
From: alinayu <[email protected]>
Add bindings for Richtek RTQ2208 IC controlled SubPMIC
...
Quoted 8 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml line 56
Quoted 7 lines
Documentation/devicetree/bindings/regulator/richtek,rtq2208-regulator.yaml new file +7
-0+ Buck and ldo vout selection is based on this value. + There are two independently programmable voltage settings named as mtp-sel0 and + mtp-sel1 for RTQ2208 bucks vout voltage. 0 which means this property isn't present + and 1 which means this property is present corresponds to different adjustable registers. + + 0 - DVS0 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL0 register to en/disable vout. + 1 - DVS1 registers to adjust buck vout and BUCK_[A-H]_EN_NR_MTP_SEL1 register to en/disable vout.Quoted 4 lines
I read it three times and still don't understand. This is bool, not 0/1, so are these "0" refer to DVS0 or to presence of the property? Maybe Mark will understand it, I don't get it.
Yes, "0" refers to DVS0 registers, and "1" refers to DVS1.
and there is only DVS0 and DVS1, so I use boolean to check which one is used.
Quoted 9 lines
Is it more understandable if I modify that to enum ? And description will be like this
richtek,mtp-sel:
enum: [0, 1]
description: |
vout register selection besed on this value. 0 - Using DVS0 register setting to adjust vout 1 - Using DVS1 register setting to adjust vout
May I ask one more question ?
If I modify the name into "richtek,mtp-sel-high", is that more understandable ? It will be like this,
richtek,mtp-sel-high:
type: boolean
description:
vout register selection besed on this value.
0 - Using DVS0 register setting to adjust vout
1 - Using DVS1 register setting to adjust vout
Quoted 6 lines
Quoted 3 lines
BR,
Alina
Re: [PATCH v2 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
Quoted 17 lines · Alina Yu
Quoted 12 lines
Yes, "0" refers to DVS0 registers, and "1" refers to DVS1.
and there is only DVS0 and DVS1, so I use boolean to check which one is used.Is it more understandable if I modify that to enum ? And description will be like this
richtek,mtp-sel:
enum: [0, 1]
description: |
vout register selection besed on this value. 0 - Using DVS0 register setting to adjust vout 1 - Using DVS1 register setting to adjust voutMay I ask one more question ?
If I modify the name into "richtek,mtp-sel-high", is that more understandable ? It will be like this,
Quoted 6 lines
richtek,mtp-sel-high:
type: boolean
description:
vout register selection besed on this value.
0 - Using DVS0 register setting to adjust vout
1 - Using DVS1 register setting to adjust vout
You don't have 0 or 1 values in such case. The property can be bool, but description is not good.
Best regards,
Krzysztof
Re: [PATCH v2 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
Quoted 25 lines · Krzysztof Kozlowski
Quoted 17 lines · Alina Yu
Quoted 12 lines
Yes, "0" refers to DVS0 registers, and "1" refers to DVS1.
and there is only DVS0 and DVS1, so I use boolean to check which one is used.Is it more understandable if I modify that to enum ? And description will be like this
richtek,mtp-sel:
enum: [0, 1]
description: |
vout register selection besed on this value. 0 - Using DVS0 register setting to adjust vout 1 - Using DVS1 register setting to adjust voutMay I ask one more question ?
If I modify the name into "richtek,mtp-sel-high", is that more understandable ? It will be like this,Quoted 6 lines
richtek,mtp-sel-high:
type: boolean
description:
vout register selection besed on this value.
0 - Using DVS0 register setting to adjust vout
1 - Using DVS1 register setting to adjust vout
Quoted 3 lines
You don't have 0 or 1 values in such case. The property can be bool, but description is not good.
May I modify the description like this ?
richtek,mtp-sel-high:
type: boolean
description:
vout register selection besed on this boolean value. false - Using DVS0 register setting to adjust vout true - Using DVS1 register setting to adjust vout
BR,
Alina.
Re: [PATCH v2 2/2] regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver
In reply to [email protected]Quoted 5 lines · On Wed, Jul 05, 2023 at 11:27:09PM +0800, [email protected] wrote:
From: alinayu <[email protected]>
Add support for the RTQ2208 SubPMIC
This ic integrates with configurable, synchrnous buck converters and two ldos.
Quoted 8 lines
Signed-off-by alinayu <[email protected]>--- drivers/regulator/Kconfig | 12 + drivers/regulator/Makefile | 1 + drivers/regulator/rtq2208-regulator.c | 550 ++++++++++++++++++++++++++++++++++ 3 files changed, 563 insertions(+) create mode 100644 drivers/regulator/rtq2208-regulator.c
...
Sorry, not intend to ping, just want to check the current review status. Is there any comment about rtq2208-regulator.c
Thanks, Alina
Mark Brown
maintainerRe: [PATCH v2 2/2] regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver
Quoted 2 lines · Alina Yu
Sorry, not intend to ping, just want to check the current review status. Is there any comment about
rtq2208-regulator.c
It's not in my queue any more so probably no but I really don't remember, I guess there was some issue with the DT binding that I was expecting a respin for.
Re: [PATCH v2 2/2] regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver
Hi,
Mark
Quoted 8 lines · Mark Brown
Quoted 2 lines · Alina Yu
Sorry, not intend to ping, just want to check the current review status. Is there any comment about
rtq2208-regulator.cIt's not in my queue any more so probably no but I really don't remember, I guess there was some issue with the DT binding that I was expecting a respin for.
Thanks you for your reply,
I send v3 which including modification for dt-binging.
Best regards,
Alina