mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Luca Leonardo Scorcia <l.scorcia@gmail.com>,
	linux-mediatek@lists.infradead.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Sen Chu <sen.chu@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	Macpaul Lin <macpaul.lin@mediatek.com>,
	Lee Jones <lee@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Linus Walleij <linusw@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Julien Massot <julien.massot@collabora.com>,
	Gary Bisson <bisson.gary@gmail.com>,
	Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>,
	Val Packett <val@packett.cool>,
	Fabien Parent <parent.f@gmail.com>,
	Chen Zhong <chen.zhong@mediatek.com>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3 3/9] dt-bindings: regulator: Document MediaTek MT6392 PMIC Regulators
Date: Wed, 18 Mar 2026 13:39:14 +0100	[thread overview]
Message-ID: <62b1463b-3d32-4d5c-8af3-f09202f96fb5@collabora.com> (raw)
In-Reply-To: <20260317184507.523060-4-l.scorcia@gmail.com>

Il 17/03/26 19:43, Luca Leonardo Scorcia ha scritto:
> Add bindings for the regulators found in the MediaTek MT6392 PMIC,
> usually found in board designs using the MediaTek MT8516/MT8167 SoCs.
> 
> Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
> ---
>   .../regulator/mediatek,mt6392-regulator.yaml  | 318 ++++++++++++++++++
>   .../regulator/mediatek,mt6392-regulator.h     |  24 ++
>   2 files changed, 342 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6392-regulator.yaml
>   create mode 100644 include/dt-bindings/regulator/mediatek,mt6392-regulator.h
> 
> diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6392-regulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6392-regulator.yaml
> new file mode 100644
> index 000000000000..fa4aad2dcbe8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6392-regulator.yaml
> @@ -0,0 +1,318 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/mediatek,mt6392-regulator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek MT6392 Regulator
> +
> +description:
> +  Regulator node of the PMIC. This node should under the PMIC's device node.
> +  All voltage regulators provided by the PMIC are described as sub-nodes of
> +  this node.
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: mediatek,mt6392-regulator
> +
> +patternProperties:
> +  "^(buck_)?v(core|proc|sys)$":
> +    description: Buck regulators
> +    type: object
> +    $ref: regulator.yaml#
> +    properties:
> +      regulator-allowed-modes:
> +        description: |
> +          BUCK regulators can set regulator-initial-mode and regulator-allowed-modes to
> +          values specified in dt-bindings/regulator/mediatek,mt6392-regulator.h
> +        items:
> +          enum: [0, 1]
> +    unevaluatedProperties: false
> +
> +  "^(ldo_)?v(adc18|camio|cn18|io18)$":

There was a discussion a bit of time ago and we decided to drop the "ldo_" and
"buck_" prefix from the regulators.

Can you please drop those?

Cheers,
Angelo

> +    description: LDOs with fixed 1.8V output
> +    type: object
> +    $ref: regulator.yaml#
> +    properties:
> +      regulator-allowed-modes:
> +        description: |
> +          LDO regulators can set regulator-initial-mode and regulator-allowed-modes to
> +          values specified in dt-bindings/regulator/mediatek,mt6392-regulator.h
> +        items:
> +          enum: [0, 1]
> +    unevaluatedProperties: false
> +
> +  "^(ldo_)?v(xo22)$":
> +    description: LDOs with fixed 2.2V output
> +    type: object
> +    $ref: regulator.yaml#
> +    properties:
> +      regulator-allowed-modes:
> +        description: |
> +          LDO regulators can set regulator-initial-mode and regulator-allowed-modes to
> +          values specified in dt-bindings/regulator/mediatek,mt6392-regulator.h
> +        items:
> +          enum: [0, 1]
> +    unevaluatedProperties: false
> +
> +  "^(ldo_)?v(m25)$":
> +    description: LDOs with fixed 2.5V output
> +    type: object
> +    $ref: regulator.yaml#
> +    properties:
> +      regulator-allowed-modes:
> +        description: |
> +          LDO regulators can set regulator-initial-mode and regulator-allowed-modes to
> +          values specified in dt-bindings/regulator/mediatek,mt6392-regulator.h
> +        items:
> +          enum: [0, 1]
> +    unevaluatedProperties: false
> +
> +  "^(ldo_)?v(aud28|io28)$":
> +    description: LDOs with fixed 2.8V output w/ mode
> +    type: object
> +    $ref: regulator.yaml#
> +    properties:
> +      regulator-allowed-modes:
> +        description: |
> +          LDO regulators can set regulator-initial-mode and regulator-allowed-modes to
> +          values specified in dt-bindings/regulator/mediatek,mt6392-regulator.h
> +        items:
> +          enum: [0, 1]
> +    unevaluatedProperties: false
> +
> +  "^(ldo_)?v(cama)$":
> +    description: LDOs with fixed 2.8V output w/o mode
> +    type: object
> +    $ref: regulator.yaml#
> +    unevaluatedProperties: false
> +
> +  "^(ldo_)?vusb$":
> +    description: LDOs with fixed 3.3V output
> +    type: object
> +    $ref: regulator.yaml#
> +    properties:
> +      regulator-allowed-modes:
> +        description: |
> +          LDO regulators can set regulator-initial-mode and regulator-allowed-modes to
> +          values specified in dt-bindings/regulator/mediatek,mt6392-regulator.h
> +        items:
> +          enum: [0, 1]
> +    unevaluatedProperties: false
> +
> +  "^(ldo_)?v(aud22|camaf|camd|cn35|efuse|emc3v3|gp1|gp2|m|mc|mch)$":
> +    description: LDOs with variable output
> +    type: object
> +    $ref: regulator.yaml#
> +    properties:
> +      regulator-allowed-modes: false
> +    unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    mt6392_regulators: regulators {
> +        compatible = "mediatek,mt6392-regulator";
> +
> +        mt6392_vproc_reg: buck_vproc {
> +            regulator-name = "vproc";
> +            regulator-min-microvolt = <700000>;
> +            regulator-max-microvolt = <1350000>;
> +            regulator-ramp-delay = <12500>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vsys_reg: buck_vsys {
> +            regulator-name = "vsys";
> +            regulator-min-microvolt = <1400000>;
> +            regulator-max-microvolt = <2987500>;
> +            regulator-ramp-delay = <25000>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vcore_reg: buck_vcore {
> +            regulator-name = "vcore";
> +            regulator-min-microvolt = <700000>;
> +            regulator-max-microvolt = <1350000>;
> +            regulator-ramp-delay = <12500>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vxo22_reg: ldo_vxo22 {
> +            regulator-name = "vxo22";
> +            regulator-min-microvolt = <2200000>;
> +            regulator-max-microvolt = <2200000>;
> +            regulator-enable-ramp-delay = <110>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vaud22_reg: ldo_vaud22 {
> +            regulator-name = "vaud22";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <2200000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vcama_reg: ldo_vcama {
> +            regulator-name = "vcama";
> +            regulator-min-microvolt = <2800000>;
> +            regulator-max-microvolt = <2800000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +
> +        mt6392_vaud28_reg: ldo_vaud28 {
> +            regulator-name = "vaud28";
> +            regulator-min-microvolt = <2800000>;
> +            regulator-max-microvolt = <2800000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vadc18_reg: ldo_vadc18 {
> +            regulator-name = "vadc18";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vcn35_reg: ldo_vcn35 {
> +            regulator-name = "vcn35";
> +            regulator-min-microvolt = <3300000>;
> +            regulator-max-microvolt = <3600000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +
> +        mt6392_vio28_reg: ldo_vio28 {
> +            regulator-name = "vio28";
> +            regulator-always-on;
> +            regulator-boot-on;
> +            regulator-min-microvolt = <2800000>;
> +            regulator-max-microvolt = <2800000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vusb_reg: ldo_vusb {
> +            regulator-name = "vusb";
> +            regulator-min-microvolt = <3300000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vmc_reg: ldo_vmc {
> +            regulator-name = "vmc";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vmch_reg: ldo_vmch {
> +            regulator-name = "vmch";
> +            regulator-min-microvolt = <3000000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vemc3v3_reg: ldo_vemc3v3 {
> +            regulator-name = "vemc3v3";
> +            regulator-min-microvolt = <3000000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vgp1_reg: ldo_vgp1 {
> +            regulator-name = "vgp1";
> +            regulator-min-microvolt = <1200000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +
> +        mt6392_vgp2_reg: ldo_vgp2 {
> +            regulator-name = "vgp2";
> +            regulator-min-microvolt = <1200000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +
> +        mt6392_vcn18_reg: ldo_vcn18 {
> +            regulator-name = "vcn18";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +
> +        mt6392_vcamaf_reg: ldo_vcamaf {
> +            regulator-name = "vcamaf";
> +            regulator-min-microvolt = <1200000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +
> +        mt6392_vm_reg: ldo_vm {
> +            regulator-name = "vm";
> +            regulator-min-microvolt = <1240000>;
> +            regulator-max-microvolt = <1390000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vio18_reg: ldo_vio18 {
> +            regulator-name = "vio18";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <264>;
> +            regulator-always-on;
> +            regulator-boot-on;
> +        };
> +
> +        mt6392_vcamd_reg: ldo_vcamd {
> +            regulator-name = "vcamd";
> +            regulator-min-microvolt = <1200000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +
> +        mt6392_vcamio_reg: ldo_vcamio {
> +            regulator-name = "vcamio";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +
> +        mt6392_vm25_reg: ldo_vm25 {
> +            regulator-name = "vm25";
> +            regulator-min-microvolt = <2500000>;
> +            regulator-max-microvolt = <2500000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +
> +        mt6392_vefuse_reg: ldo_vefuse {
> +            regulator-name = "vefuse";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <2000000>;
> +            regulator-enable-ramp-delay = <264>;
> +        };
> +    };
> diff --git a/include/dt-bindings/regulator/mediatek,mt6392-regulator.h b/include/dt-bindings/regulator/mediatek,mt6392-regulator.h
> new file mode 100644
> index 000000000000..8bd1a13faad8
> --- /dev/null
> +++ b/include/dt-bindings/regulator/mediatek,mt6392-regulator.h
> @@ -0,0 +1,24 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +
> +#ifndef _DT_BINDINGS_REGULATOR_MEDIATEK_MT6392_H_
> +#define _DT_BINDINGS_REGULATOR_MEDIATEK_MT6392_H_
> +
> +/*
> + * Buck mode constants which may be used in devicetree properties (eg.
> + * regulator-initial-mode, regulator-allowed-modes).
> + * See the manufacturer's datasheet for more information on these modes.
> + */
> +
> +#define MT6392_BUCK_MODE_AUTO		0
> +#define MT6392_BUCK_MODE_FORCE_PWM	1
> +
> +/*
> + * LDO mode constants which may be used in devicetree properties (eg.
> + * regulator-initial-mode, regulator-allowed-modes).
> + * See the manufacturer's datasheet for more information on these modes.
> + */
> +
> +#define MT6392_LDO_MODE_NORMAL		0
> +#define MT6392_LDO_MODE_LP		1
> +
> +#endif



  parent reply	other threads:[~2026-03-18 12:39 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 18:43 [PATCH v3 0/9] Add support for mt6392 PMIC Luca Leonardo Scorcia
2026-03-17 18:43 ` [PATCH v3 1/9] dt-bindings: mfd: mt6397: Add bindings for MT6392 PMIC Luca Leonardo Scorcia
2026-03-18  7:37   ` Krzysztof Kozlowski
2026-03-18  7:47   ` Krzysztof Kozlowski
2026-03-18 12:39   ` AngeloGioacchino Del Regno
2026-03-17 18:43 ` [PATCH v3 2/9] dt-bindings: input: mtk-pmic-keys: add MT6392 binding definition Luca Leonardo Scorcia
2026-03-18 12:39   ` AngeloGioacchino Del Regno
2026-03-17 18:43 ` [PATCH v3 3/9] dt-bindings: regulator: Document MediaTek MT6392 PMIC Regulators Luca Leonardo Scorcia
2026-03-18  7:43   ` Krzysztof Kozlowski
2026-03-18 21:25     ` Luca Leonardo Scorcia
2026-03-18 22:14       ` Krzysztof Kozlowski
2026-03-19  4:53         ` Chen-Yu Tsai
2026-03-19  7:23           ` Krzysztof Kozlowski
2026-03-18 12:39   ` AngeloGioacchino Del Regno [this message]
2026-03-19  4:56   ` Chen-Yu Tsai
2026-03-17 18:43 ` [PATCH v3 4/9] dt-bindings: pinctrl: mt65xx: Document MT6392 pinctrl Luca Leonardo Scorcia
2026-03-18 12:39   ` AngeloGioacchino Del Regno
2026-03-17 18:43 ` [PATCH v3 5/9] mfd: mt6397: Add support for MT6392 pmic Luca Leonardo Scorcia
2026-03-18 12:39   ` AngeloGioacchino Del Regno
2026-03-26 12:10   ` Lee Jones
2026-03-17 18:43 ` [PATCH v3 6/9] input: keyboard: mtk-pmic-keys: add MT6392 support Luca Leonardo Scorcia
2026-03-18 12:39   ` AngeloGioacchino Del Regno
2026-03-17 18:43 ` [PATCH v3 7/9] regulator: mt6392: Add support for MT6392 regulator Luca Leonardo Scorcia
2026-03-18 12:39   ` AngeloGioacchino Del Regno
2026-03-19  5:04   ` Chen-Yu Tsai
2026-03-30  7:39     ` Luca Leonardo Scorcia
2026-03-30  9:35       ` Chen-Yu Tsai
2026-03-17 18:43 ` [PATCH v3 8/9] pinctrl: mediatek: mt6397: Add support for MT6392 variant Luca Leonardo Scorcia
2026-03-18 12:38   ` AngeloGioacchino Del Regno
2026-03-17 18:43 ` [PATCH v3 9/9] arm64: dts: mt6392: add mt6392 PMIC dtsi Luca Leonardo Scorcia
2026-03-18 12:39   ` AngeloGioacchino Del Regno
2026-03-18 13:54     ` Chen-Yu Tsai
2026-03-18 17:22       ` AngeloGioacchino Del Regno
2026-03-26  5:43         ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62b1463b-3d32-4d5c-8af3-f09202f96fb5@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=bisson.gary@gmail.com \
    --cc=broonie@kernel.org \
    --cc=chen.zhong@mediatek.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=julien.massot@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=l.scorcia@gmail.com \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=louisalexis.eyraud@collabora.com \
    --cc=macpaul.lin@mediatek.com \
    --cc=matthias.bgg@gmail.com \
    --cc=parent.f@gmail.com \
    --cc=robh@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=sen.chu@mediatek.com \
    --cc=val@packett.cool \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®