All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Alexandre Mergnat <amergnat@baylibre.com>
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Fabien Parent <fabien.parent@linaro.org>,
	Tianping Fang <tianping.fang@mediatek.com>,
	Flora Fu <flora.fu@mediatek.com>,
	Chen Zhong <chen.zhong@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>, Pavel Machek <pavel@ucw.cz>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-mediatek@lists.infradead.org,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	linux-kernel@vger.kernel.org, Rob Herring <robh@kernel.org>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	linux-rtc@vger.kernel.org, linux-input@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Fabien Parent <fparent@baylibre.com>,
	linux-leds@vger.kernel.org
Subject: Re: [PATCH v7 4/8] dt-bindings: mfd: mediatek: Add bindings for MT6357 PMIC
Date: Wed, 30 Nov 2022 10:08:07 +0000	[thread overview]
Message-ID: <Y4crh0Ob3sz20s5T@google.com> (raw)
In-Reply-To: <20221005-mt6357-support-v7-4-477e60126749@baylibre.com>

On Tue, 29 Nov 2022, Alexandre Mergnat wrote:

> Currently, almost all MT63XX PMIC are documented mfd/mt6397.txt.
> Unfortunately, the PMICs haven't always similar HW sub-features.
> To have a better human readable schema, I chose to make one PMIC schema
> to match the exact HW capabilities instead of convert mt6397.txt to
> mediatek,mt63xx.yaml and put a bunch of properties behind
> "if contain ... then ..."
> 
> - add interrupt property
> - change property refs to match with new yaml documentation
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>

Acked-by: Lee Jones <lee@kernel.org>

> ---
>  .../devicetree/bindings/mfd/mediatek,mt6357.yaml   | 111 +++++++++++++++++++++
>  1 file changed, 111 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> new file mode 100644
> index 000000000000..837a77013d57
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> @@ -0,0 +1,111 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/mediatek,mt6357.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek MT6357 PMIC
> +
> +maintainers:
> +  - Flora Fu <flora.fu@mediatek.com>
> +  - Alexandre Mergnat <amergnat@baylibre.com>
> +
> +description: |
> +  MT6357 is a power management system chip containing 5 buck
> +  converters and 29 LDOs. Supported features are audio codec,
> +  USB battery charging, fuel gauge, RTC
> +
> +  This is a multifunction device with the following sub modules:
> +  - Regulator
> +  - RTC
> +  - Keys
> +
> +  It is interfaced to host controller using SPI interface by a proprietary hardware
> +  called PMIC wrapper or pwrap. This MFD is a child device of pwrap.
> +  See the following for pwrap node definitions:
> +  Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
> +
> +properties:
> +  compatible:
> +    const: mediatek,mt6357
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  interrupt-controller: true
> +
> +  "#interrupt-cells":
> +    const: 2
> +
> +  regulators:
> +    type: object
> +    $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
> +    description:
> +      List of MT6357 BUCKs and LDOs regulators.
> +
> +  rtc:
> +    type: object
> +    $ref: /schemas/rtc/rtc.yaml#
> +    description:
> +      MT6357 Real Time Clock.
> +    properties:
> +      compatible:
> +        const: mediatek,mt6357-rtc
> +      start-year: true
> +    required:
> +      - compatible
> +
> +  keys:
> +    type: object
> +    $ref: /schemas/input/mediatek,pmic-keys.yaml
> +    description:
> +      MT6357 power and home keys.
> +
> +required:
> +  - compatible
> +  - regulators
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    pwrap {
> +        pmic {
> +            compatible = "mediatek,mt6357";
> +
> +            interrupt-parent = <&pio>;
> +            interrupts = <145 IRQ_TYPE_LEVEL_HIGH>;
> +            interrupt-controller;
> +            #interrupt-cells = <2>;
> +
> +            regulators {
> +                mt6357_vproc_reg: buck-vproc {
> +                    regulator-name = "vproc";
> +                    regulator-min-microvolt = <518750>;
> +                    regulator-max-microvolt = <1312500>;
> +                    regulator-ramp-delay = <6250>;
> +                    regulator-enable-ramp-delay = <220>;
> +                    regulator-always-on;
> +                };
> +
> +                // ...
> +
> +                mt6357_vusb33_reg: ldo-vusb33 {
> +                    regulator-name = "vusb33";
> +                    regulator-min-microvolt = <3000000>;
> +                    regulator-max-microvolt = <3100000>;
> +                    regulator-enable-ramp-delay = <264>;
> +                };
> +            };
> +
> +            rtc {
> +                compatible = "mediatek,mt6357-rtc";
> +            };
> +
> +            keys {
> +                compatible = "mediatek,mt6357-keys";
> +            };
> +        };
> +    };
> 

-- 
Lee Jones [李琼斯]

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee@kernel.org>
To: Alexandre Mergnat <amergnat@baylibre.com>
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Fabien Parent <fabien.parent@linaro.org>,
	Tianping Fang <tianping.fang@mediatek.com>,
	Flora Fu <flora.fu@mediatek.com>,
	Chen Zhong <chen.zhong@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>, Pavel Machek <pavel@ucw.cz>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-mediatek@lists.infradead.org,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-kernel@vger.kernel.org, Rob Herring <robh@kernel.org>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	linux-rtc@vger.kernel.org, linux-input@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Fabien Parent <fparent@baylibre.com>,
	linux-leds@vger.kernel.org
Subject: Re: [PATCH v7 4/8] dt-bindings: mfd: mediatek: Add bindings for MT6357 PMIC
Date: Wed, 30 Nov 2022 10:08:07 +0000	[thread overview]
Message-ID: <Y4crh0Ob3sz20s5T@google.com> (raw)
In-Reply-To: <20221005-mt6357-support-v7-4-477e60126749@baylibre.com>

On Tue, 29 Nov 2022, Alexandre Mergnat wrote:

> Currently, almost all MT63XX PMIC are documented mfd/mt6397.txt.
> Unfortunately, the PMICs haven't always similar HW sub-features.
> To have a better human readable schema, I chose to make one PMIC schema
> to match the exact HW capabilities instead of convert mt6397.txt to
> mediatek,mt63xx.yaml and put a bunch of properties behind
> "if contain ... then ..."
> 
> - add interrupt property
> - change property refs to match with new yaml documentation
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>

Acked-by: Lee Jones <lee@kernel.org>

> ---
>  .../devicetree/bindings/mfd/mediatek,mt6357.yaml   | 111 +++++++++++++++++++++
>  1 file changed, 111 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> new file mode 100644
> index 000000000000..837a77013d57
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> @@ -0,0 +1,111 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/mediatek,mt6357.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek MT6357 PMIC
> +
> +maintainers:
> +  - Flora Fu <flora.fu@mediatek.com>
> +  - Alexandre Mergnat <amergnat@baylibre.com>
> +
> +description: |
> +  MT6357 is a power management system chip containing 5 buck
> +  converters and 29 LDOs. Supported features are audio codec,
> +  USB battery charging, fuel gauge, RTC
> +
> +  This is a multifunction device with the following sub modules:
> +  - Regulator
> +  - RTC
> +  - Keys
> +
> +  It is interfaced to host controller using SPI interface by a proprietary hardware
> +  called PMIC wrapper or pwrap. This MFD is a child device of pwrap.
> +  See the following for pwrap node definitions:
> +  Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
> +
> +properties:
> +  compatible:
> +    const: mediatek,mt6357
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  interrupt-controller: true
> +
> +  "#interrupt-cells":
> +    const: 2
> +
> +  regulators:
> +    type: object
> +    $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
> +    description:
> +      List of MT6357 BUCKs and LDOs regulators.
> +
> +  rtc:
> +    type: object
> +    $ref: /schemas/rtc/rtc.yaml#
> +    description:
> +      MT6357 Real Time Clock.
> +    properties:
> +      compatible:
> +        const: mediatek,mt6357-rtc
> +      start-year: true
> +    required:
> +      - compatible
> +
> +  keys:
> +    type: object
> +    $ref: /schemas/input/mediatek,pmic-keys.yaml
> +    description:
> +      MT6357 power and home keys.
> +
> +required:
> +  - compatible
> +  - regulators
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    pwrap {
> +        pmic {
> +            compatible = "mediatek,mt6357";
> +
> +            interrupt-parent = <&pio>;
> +            interrupts = <145 IRQ_TYPE_LEVEL_HIGH>;
> +            interrupt-controller;
> +            #interrupt-cells = <2>;
> +
> +            regulators {
> +                mt6357_vproc_reg: buck-vproc {
> +                    regulator-name = "vproc";
> +                    regulator-min-microvolt = <518750>;
> +                    regulator-max-microvolt = <1312500>;
> +                    regulator-ramp-delay = <6250>;
> +                    regulator-enable-ramp-delay = <220>;
> +                    regulator-always-on;
> +                };
> +
> +                // ...
> +
> +                mt6357_vusb33_reg: ldo-vusb33 {
> +                    regulator-name = "vusb33";
> +                    regulator-min-microvolt = <3000000>;
> +                    regulator-max-microvolt = <3100000>;
> +                    regulator-enable-ramp-delay = <264>;
> +                };
> +            };
> +
> +            rtc {
> +                compatible = "mediatek,mt6357-rtc";
> +            };
> +
> +            keys {
> +                compatible = "mediatek,mt6357-keys";
> +            };
> +        };
> +    };
> 

-- 
Lee Jones [李琼斯]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-11-30 10:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 15:56 [PATCH v7 0/8] Add MediaTek MT6357 PMIC support Alexandre Mergnat
2022-11-29 15:56 ` Alexandre Mergnat
2022-11-29 15:57 ` [PATCH v7 1/8] dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC Alexandre Mergnat
2022-11-29 15:57   ` Alexandre Mergnat
2022-11-29 15:57 ` [PATCH v7 2/8] regulator: dt-bindings: Add binding schema for mt6357 regulators Alexandre Mergnat
2022-11-29 15:57   ` Alexandre Mergnat
2022-11-29 15:57 ` [PATCH v7 3/8] dt-bindings: soc: mediatek: convert pwrap documentation Alexandre Mergnat
2022-11-29 15:57   ` Alexandre Mergnat
2022-12-01 23:33   ` Rob Herring
2022-12-01 23:33     ` Rob Herring
2022-11-29 15:57 ` [PATCH v7 4/8] dt-bindings: mfd: mediatek: Add bindings for MT6357 PMIC Alexandre Mergnat
2022-11-29 15:57   ` Alexandre Mergnat
2022-11-30 10:08   ` Lee Jones [this message]
2022-11-30 10:08     ` Lee Jones
2022-11-29 15:57 ` [PATCH v7 5/8] arm64: dts: mt6358: change node names Alexandre Mergnat
2022-11-29 15:57   ` Alexandre Mergnat
2022-11-29 15:57 ` [PATCH v7 6/8] arm64: dts: mt8173: change node name Alexandre Mergnat
2022-11-29 15:57   ` Alexandre Mergnat
2022-11-29 15:57 ` [PATCH v7 7/8] regulator: add mt6357 regulator Alexandre Mergnat
2022-11-29 15:57   ` Alexandre Mergnat
2022-11-29 15:57 ` [PATCH v7 8/8] Input: mtk-pmic-keys: add MT6357 support Alexandre Mergnat
2022-11-29 15:57   ` Alexandre Mergnat
2022-12-02 13:54 ` (subset) [PATCH v7 0/8] Add MediaTek MT6357 PMIC support Mark Brown
2022-12-02 13:54   ` Mark Brown
2022-12-05 13:16 ` Kevin Hilman
2022-12-05 13:16   ` Kevin Hilman
2022-12-16 12:53   ` Matthias Brugger
2022-12-16 12:53     ` Matthias Brugger
2023-01-02 16:10     ` Alexandre Mergnat
2023-01-02 16:10       ` Alexandre Mergnat
2023-01-18  8:37       ` Alexandre Mergnat
2023-01-18  8:37         ` Alexandre Mergnat

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=Y4crh0Ob3sz20s5T@google.com \
    --to=lee@kernel.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=amergnat@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=chen.zhong@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fabien.parent@linaro.org \
    --cc=flora.fu@mediatek.com \
    --cc=fparent@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=tianping.fang@mediatek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.