* [PATCH] regulator: rt5133: Add DT binding document for Richtek RT5133
@ 2025-07-18 8:12 jeff_chang
2025-07-18 8:25 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: jeff_chang @ 2025-07-18 8:12 UTC (permalink / raw)
To: lgirdwood, broonie, robh, krzk+dt, conor+dt, linux-kernel,
devicetree
Cc: jeff_chang
From: Jeff Chang <jeff_chang@richtek.com>
Add DT binding document for Richtek RT5133 voltage regulator.
Signed-off-by: Jeff Chang <jeff_chang@richtek.com>
---
.../bindings/regulator/richtek,rt5133.yaml | 178 ++++++++++++++++++
1 file changed, 178 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
new file mode 100644
index 000000000000..c1ba2d9d83c6
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
@@ -0,0 +1,178 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/richtek,rt5133.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Richtek RT5133 PMIC Regulator
+
+maintainers:
+ - ShihChia Chang <jeff_chang@richtek.com>
+
+description: |
+ RT5133 is an integrated chip. It includes 8 LDOs and 3 GPOs that can be
+ used to drive output high/low purpose. The dependency of the GPO block
+ is internally LDO1 Voltage. If LDO1 voltage output disabled, GPO cannot
+ be used to drive output high. It need to pay more attention on the usage.
+
+allOf:
+ - $ref: regulator.yaml#
+
+properties:
+ compatible:
+ enum:
+ - richtek,rt5133
+
+ reg:
+ maxItems: 1
+
+ enable-gpios:
+ description: A connection of the 'enable' gpio line.
+ maxItems: 1
+
+ wakeup-source: true
+
+ interrupts:
+ maxItems: 1
+
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+
+ regulators:
+ type: object
+
+ BASE:
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for base regulator which for force-off base circuit
+
+ properties:
+ oc-shutdown-all:
+ type: object
+ description: |
+ Anyone of LDO OC state
+ 0: LDO OC only shut down itself
+ 1: LDO OC shut down all channels
+
+ pgb-shutdown-all:
+ type: object
+ description: |
+ Anyone of PGB OC state
+ 0: LDO PGB only shut down itself
+ 1: LDO PGB shut down all channels
+
+ required:
+ - regulator-name
+
+patternProperties:
+ "^LDO([1-6])$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for single LDO regulator
+
+ required:
+ - regulator-name
+
+ "^LDO([7-8])$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for single LDO regulator
+
+ properties:
+ rt5133-ldo1-supply:
+ description: |
+ Only for LDO7 LDO8, pvin7 and pvin8 reference design are RT5133 LDO1.
+ If not connect to LDO1 vout, this property for pvin7 and pvin8 is necessary.
+
+ required:
+ - regulator-name
+
+required:
+ - compatible
+ - reg
+ - interrupts-extended
+ - wakeup-source
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rt5133: rt5133@18 {
+ compatible = "richtek,rt5133";
+ reg = <0x18>;
+ wakeup-source;
+ interrupts-extended = <&pio 187 0x0>;
+ enable-gpios = <&pio 186 0x0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ regulators {
+ BASE {
+ regulator-name = "rt5133,base";
+ oc-shutdown-all = <0>;
+ pgb-shutdown-all = <0>;
+ };
+ rt5133_ldo1: LDO1 {
+ regulator-name = "rt5133-ldo1";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3199998>;
+ regulator-active-discharge;
+ };
+ rt5133_ldo2: LDO2 {
+ regulator-name = "rt5133-ldo2";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3200000>;
+ regulator-active-discharge;
+ };
+ rt5133_ldo3: LDO3 {
+ regulator-name = "rt5133-ldo3";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-active-discharge;
+ };
+ rt5133_ldo4: LDO4 {
+ regulator-name = "rt5133-ldo4";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-active-discharge;
+ };
+ rt5133_ldo5: LDO5 {
+ regulator-name = "rt5133-ldo5";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-active-discharge;
+ };
+ rt5133_ldo6: LDO6 {
+ regulator-name = "rt5133-ldo6";
+ regulator-min-microvolt = <1700000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-active-discharge;
+ };
+ rt5133_ldo7: LDO7 {
+ regulator-name = "rt5133-ldo7";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-active-discharge;
+ rt5133-ldo1-supply = <&rt5133_ldo1>;
+ };
+ rt5133_ldo8: LDO8 {
+ regulator-name = "rt5133-ldo8";
+ regulator-min-microvolt = <855000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-active-discharge;
+ rt5133-ldo1-supply = <&rt5133_ldo1>;
+ };
+ };
+ };
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: rt5133: Add DT binding document for Richtek RT5133
2025-07-18 8:12 [PATCH] regulator: rt5133: Add DT binding document for Richtek RT5133 jeff_chang
@ 2025-07-18 8:25 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-18 8:25 UTC (permalink / raw)
To: jeff_chang, lgirdwood, broonie, robh, krzk+dt, conor+dt,
linux-kernel, devicetree
On 18/07/2025 10:12, jeff_chang@richtek.com wrote:
> From: Jeff Chang <jeff_chang@richtek.com>
>
> Add DT binding document for Richtek RT5133 voltage regulator.
1. Please use subject prefixes matching the subsystem. You can get them
for example with `git log --oneline -- DIRECTORY_OR_FILE` on the
directory your patch is touching. For bindings, the preferred subjects
are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
2. A nit, subject: drop second/last, redundant "bindings". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
3. Missing threading or user of the binding.
4. Please version your patches correctly, e.g. use b4 or git
format-patch -vX, and add changelog in cover letter or under '---' of
individual patches describing changes from previous version.
>
> Signed-off-by: Jeff Chang <jeff_chang@richtek.com>
> ---
> .../bindings/regulator/richtek,rt5133.yaml | 178 ++++++++++++++++++
> 1 file changed, 178 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
>
> diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
> new file mode 100644
> index 000000000000..c1ba2d9d83c6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
> @@ -0,0 +1,178 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/richtek,rt5133.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Richtek RT5133 PMIC Regulator
> +
> +maintainers:
> + - ShihChia Chang <jeff_chang@richtek.com>
> +
> +description: |
Do not need '|' unless you need to preserve formatting.
> + RT5133 is an integrated chip. It includes 8 LDOs and 3 GPOs that can be
> + used to drive output high/low purpose. The dependency of the GPO block
> + is internally LDO1 Voltage. If LDO1 voltage output disabled, GPO cannot
> + be used to drive output high. It need to pay more attention on the usage.
> +
> +allOf:
> + - $ref: regulator.yaml#
No, this is not a regulator.
> +
> +properties:
> + compatible:
> + enum:
> + - richtek,rt5133
> +
> + reg:
> + maxItems: 1
> +
> + enable-gpios:
> + description: A connection of the 'enable' gpio line.
Drop description, redundant.
> + maxItems: 1
> +
> + wakeup-source: true
> +
> + interrupts:
> + maxItems: 1
> +
> + gpio-controller: true
> +
> + "#gpio-cells":
> + const: 2
> +
> + regulators:
> + type: object
What is in this node? Missing additionalProperties: false. Also missing
tests which would tell you that.
> +
> + BASE:
I doubt this was ever tested... totally messed indentation.
Also, only lowercase.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-18 8:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18 8:12 [PATCH] regulator: rt5133: Add DT binding document for Richtek RT5133 jeff_chang
2025-07-18 8:25 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).