Add Richtek RTQ2208 SubPMIC support
Subsystems (2)
v7 cover Add Richtek RTQ2208 SubPMIC support
This patch series 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.
Thank you,
Alina yu
---
Change in v7:
- In Patch 2/2:
- Include missing <linux/mod_devicetable.h>
- Remove fixed_uV in self-defined structure and rtq2208_ldo_get_voltage
- Modify sizeof() parameter in rdesc = devm_kzalloc(..., sizeof().....)
- Add const to type casting in regulator_ops to avoid unexpected manipulation
- Remove rtq2208_of_parse_cb and use of_regulator_match to get constraints.min_uV
- Return devm_request_threaded_irq directly
- Remove __maybe_unused and redundant comma in rtq2208_device_tables
- Remove v2 in MODULE_LICENSE
Change in v6:
- In Patch 1/2:
- Add "additionalProperties: false" to regulator node
- In Patch 2/2:
- Remove Reported-by tag
Change in v5:
- In Patch 1/2:
- Revise filename from $id
- Remove "regulator-compatible" for ldos
- Add missing "high" for "richtek,mtp-sel-high"
- Remove "regulator-mode" property
- Add and modify "unevaluatedProperties: false" and "additionalProperties: false"
- Remove "richtek,fixed-uV"
- Remove redundant space in "buck-a" and "ldo2"
- In Patch 2/2:
- Modify 'rdesc->fixed_uV' get, becasue "richtek,fixed-uV" is removed from yaml
- Modify 'mtp_sel' get because read property is changed from "richtek,mtp-sel" to "richtek,mtp-sel-high" in yaml
- Add missing regulators_node points to regulator node in yaml
- Include <linux/bitfield.h> for 'FIELD_PREP' reported by kernel test robot
Change in v4:
- In Patch 1/2:
- Modify filename to "richtek,rtq2208"
- Add more desciptions for "regulator-allowed-modes"
Change in v3:
- In Patch 1/2:
- Fix some typos
- Modify the descriptions for "richtek,mtp-sel"
- Modify the node name to lowercase and remove underscore
- Remove '|' from description
- Remove "regulator-compatible" from property
- Remove "regulator-state-mem" from pattern
- Modify node name to generic one
---
Alina Yu (2):
regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver
.../bindings/regulator/richtek,rtq2208.yaml | 197 +++++++ drivers/regulator/Kconfig | 11 + drivers/regulator/Makefile | 1 + drivers/regulator/rtq2208-regulator.c | 583 +++++++++++++++++++++ 4 files changed, 792 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml create mode 100644 drivers/regulator/rtq2208-regulator.c
Signature · 1 line
2.7.4
PATCH v7 1/2 regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
Add bindings for Richtek RTQ2208 IC controlled SubPMIC
---
v6
- Add "additionalProperties: false" to regulator node
v5
- Revise filename from $id
- Remove "regulator-compatible" for ldos
- Add missing "high" for "richtek,mtp-sel-high"
- Remove "regulator-mode" property
- Add and modify "unevaluatedProperties: false" and "additionalProperties: false"
- Remove "richtek,fixed-uV"
- Remove redundant space in "buck-a" and "ldo2"
v4
- Modify filename to "richtek,rtq2208"
- Add more desciptions for "regulator-allowed-modes"
--- .../bindings/regulator/richtek,rtq2208.yaml | 197 +++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml new file +197 -0
@@ -0,0 +1,197 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/richtek,rtq2208.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RTQ2208 SubPMIC Regulator + +maintainers: + - Alina Yu <[email protected]> + +description: | + RTQ2208 is a highly integrated power converter that offers functional safety dual + multi-configurable synchronous buck converters and two LDOs. + + Bucks support "regulator-allowed-modes" and "regulator-mode". The former defines the permitted + switching operation in normal mode; the latter defines the operation in suspend to RAM mode. + + No matter the RTQ2208 is configured to normal or suspend to RAM mode, there are two switching + operation modes for all buck rails, automatic power saving mode (Auto mode) and forced continuous + conduction mode (FCCM). + + The definition of modes is in the datasheet which is available 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 + +properties: + compatible: + enum: + - richtek,rtq2208 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + richtek,mtp-sel-high: + type: boolean + description: + vout register selection based on this boolean value. + false - Using DVS0 register setting to adjust vout + true - Using DVS1 register setting to adjust vout + + regulators: + type: object + additionalProperties: false + + patternProperties: + "^buck-[a-h]$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + description for buck-[a-h] regulator. + + properties: + regulator-allowed-modes: + description: + two buck modes in different switching accuracy. + 0 - Auto mode + 1 - FCCM + items: + enum: [0, 1] + + "^ldo[1-2]$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + description: + regulator description for ldo[1-2]. + +required: + - compatible + - reg + - regulators + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@10 { + compatible = "richtek,rtq2208"; + reg = <0x10>; + interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>; + richtek,mtp-sel-high; + + regulators { + 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 { + 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 { + 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 { + 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 { + 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 { + 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 { + 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 { + 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 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + ldo2 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + }; + }; + };
Signature · 1 line
2.7.4
Re: [PATCH v7 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
Quoted 5 lines · Alina Yu
Add bindings for Richtek RTQ2208 IC controlled SubPMIC
Signed-off-by Alina Yu <[email protected]>---
v6
Best regards,
Krzysztof
PATCH v7 2/2 regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver
In reply to Alina YuAdd support for the RTQ2208 SubPMIC
This ic integrates with configurable, synchrnous buck converters and two ldos.
---
v7
- Include missing <linux/mod_devicetable.h>
- Remove fixed_uV in self-defined structure and rtq2208_ldo_get_voltage
- Modify sizeof() parameter in rdesc = devm_kzalloc(..., sizeof().....)
- Add const to type casting in regulator_ops to avoid unexpected manipulation
- Remove rtq2208_of_parse_cb and use of_regulator_match to get constraints.min_uV
- Return devm_request_threaded_irq directly
- Remove __maybe_unused and redundant comma in rtq2208_device_tables
- Remove v2 in MODULE_LICENSE
v6
- Remove Reported-by tag
v5
- Modify 'rdesc->fixed_uV' get, becasue "richtek,fixed-uV" is removed from yaml
- Modify 'mtp_sel' get because read property is changed from "richtek,mtp-sel" to "richtek,mtp-sel-high" in yaml
- Add missing regulators_node points to regulator node in yaml
- Include <linux/bitfield.h> for 'FIELD_PREP' reported by kernel test robot
--- drivers/regulator/Kconfig | 11 + drivers/regulator/Makefile | 1 + drivers/regulator/rtq2208-regulator.c | 583 ++++++++++++++++++++++++++++++++++ 3 files changed, 595 insertions(+) create mode 100644 drivers/regulator/rtq2208-regulator.c
drivers/regulator/Kconfig +11 -0
@@ -1213,6 +1213,17 @@ 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 + 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 +583 -0
583 lines not on this page · raw message
Signature · 1 line
2.7.4
Mark Brown
maintainerQuoted 10 lines · Alina Yu
This patch series 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.
Thank you,
Alina yu[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
commit: 4b591ed6971191134e331f02300b4ec4dee188ea
[2/2] regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver
commit: 85a11f55621a0c18b22b43ab4219450ac1d19386All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark