All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Gene Chen <gene.chen.richtek@gmail.com>
Cc: jic23@kernel.org, jacek.anaszewski@gmail.com, pavel@ucw.cz,
	matthias.bgg@gmail.com, knaack.h@gmx.de, lars@metafoo.de,
	pmeerw@pmeerw.net, dmurphy@ti.com, lgirdwood@gmail.com,
	broonie@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	gene_chen@richtek.com, shufan_lee@richtek.com,
	cy_huang@richtek.com, benjamin.chao@mediatek.com
Subject: Re: [PATCH v2 1/4] dt-bindings: mfd: Add bindings for the Mediatek MT6360 PMIC
Date: Mon, 22 Jun 2020 11:24:20 +0100	[thread overview]
Message-ID: <20200622102420.GR954398@dell> (raw)
In-Reply-To: <1592567631-20363-2-git-send-email-gene.chen.richtek@gmail.com>

On Fri, 19 Jun 2020, Gene Chen wrote:

> From: Gene Chen <gene_chen@richtek.com>
> 
> Add devicetree binding document support Mediatek MT6360 PMIC
> 
> Signed-off-by: Gene Chen <gene_chen@richtek.com>
> ---
>  Documentation/devicetree/bindings/mfd/mt6360.txt | 122 +++++++++++++++++++++++

This needs converting to YAML.

>  include/dt-bindings/mfd/mt6360.h                 |  15 +++
>  2 files changed, 137 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/mt6360.txt
>  create mode 100644 include/dt-bindings/mfd/mt6360.h
> 
> diff --git a/Documentation/devicetree/bindings/mfd/mt6360.txt b/Documentation/devicetree/bindings/mfd/mt6360.txt
> new file mode 100644
> index 0000000..7d7d349
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/mt6360.txt
> @@ -0,0 +1,122 @@
> +MediaTek MT6360 PMIC Driver
> +
> +MT6360 is a multifunction device with the following sub modules:

Sub modules do not follow this sentence.

Please do not use the term "multi-function" in DT bindings.  An MFD is
something we made up.  It's a Linuxisum and has no real meaning in
DT.  This device is not multi-functional.  It has one function, to
control Power.  The multi-function part comes from the fact that we
like things split-up into subsystem for organisation purposes and
simplicity.

> +It is interfaced to host controller using I2C interface.
> +This document describes the binding for PMIC device and its sub module.

This sentence should be at the top.

s/sub module/sub-devices/

> +- ADC
> +- Battery Charger/OTG boost
> +- Flash LED/RGB LED/moonlight LED
> +- 2-channel Buck and 6-channel LDO
> +- USB_PD

These should follow the sentence reviewing to the "sub modules".

> +Required properties:
> +- compatible:	Must be "mediatek,mt6360-pmu"
> +- reg:		Specifies the I2C slave address of PMIC block, Must be <0x34>
> +- interrupts:	I2C device IRQ line connected to the main SoC.

Remove the '.'.

> +Optional subnodes:
> +- ADC
> +	Required properties:
> +		- compatible: "mediatek,mt6360-adc"
> +- battery charger/OTG boost

"Battery"

> +	Required properties:
> +		- compatible: "mediatek,mt6360-chg"
> +- Flash LED/RGB LED/moonlight LED
> +	Required properties:
> +		- compatible: "mediatek,mt6360-led"
> +- 2-channel Buck and 6-channel LDO
> +	Required properties:
> +		- compatible: "mediatek,mt6360-regulator"
> +- USB_PD

Remove the "_" and expand PD.

> +	Required properties:
> +		- compatible: "mediatek,mt6360-tcpc"
> +
> +Example:
> +
> +	#include <dt-bindings/interrupt-controller/irq.h>
> +	#include <dt-bindings/mfd/mt6360.h>
> +
> +	mt6360@34 {
> +		compatible = "mediatek,mt6360";
> +		reg = <0x34>;
> +		wakeup-source;
> +		interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;
> +		interrupt-names = "IRQB";
> +		interrupt-controller;
> +		#interrupt-cells = <1>;

'\n'

> +		adc {
> +			compatible = "mediatek,mt6360-adc";
> +			#io-channel-cells = <1>;

Where is the channel cell?

> +		};

'\n'

> +		regulator {
> +			compatible = "mediatek,mt6360-regulator";
> +			LDO_VIN3-supply = <&BUCK2>;

'\n'

> +			buck1 {
> +				regulator-compatible = "BUCK1";
> +				regulator-name = "mt6360,buck1";
> +				regulator-min-microvolt = <300000>;
> +				regulator-max-microvolt = <1300000>;
> +				regulator-allowed-modes = <MT6360_OPMODE_NORMAL
> +							   MT6360_OPMODE_LP
> +							   MT6360_OPMODE_ULP>;
> +			};

'\n'

Etc etc.

> +			BUCK2: buck2 {
> +				regulator-compatible = "BUCK2";
> +				regulator-name = "mt6360,buck2";
> +				regulator-min-microvolt = <300000>;
> +				regulator-max-microvolt = <1300000>;
> +				regulator-allowed-modes = <MT6360_OPMODE_NORMAL
> +							   MT6360_OPMODE_LP
> +							   MT6360_OPMODE_ULP>;
> +			};
> +			ldo6 {
> +				regulator-compatible = "LDO6";
> +				regulator-name = "mt6360,ldo6";
> +				regulator-min-microvolt = <500000>;
> +				regulator-max-microvolt = <2100000>;
> +				regulator-allowed-modes = <MT6360_OPMODE_NORMAL
> +							   MT6360_OPMODE_LP>;
> +			};
> +			ldo7 {
> +				regulator-compatible = "LDO7";
> +				regulator-name = "mt6360,ldo7";
> +				regulator-min-microvolt = <500000>;
> +				regulator-max-microvolt = <2100000>;
> +				regulator-allowed-modes = <MT6360_OPMODE_NORMAL
> +							   MT6360_OPMODE_LP>;
> +			};
> +			ldo1 {
> +				regulator-compatible = "LDO1";
> +				regulator-name = "mt6360,ldo1";
> +				regulator-min-microvolt = <1200000>;
> +				regulator-max-microvolt = <3600000>;
> +				regulator-allowed-modes = <MT6360_OPMODE_NORMAL
> +							   MT6360_OPMODE_LP>;
> +			};
> +			ldo2 {
> +				regulator-compatible = "LDO2";
> +				regulator-name = "mt6360,ldo2";
> +				regulator-min-microvolt = <1200000>;
> +				regulator-max-microvolt = <3600000>;
> +				regulator-allowed-modes = <MT6360_OPMODE_NORMAL
> +							   MT6360_OPMODE_LP>;
> +			};
> +			ldo3 {
> +				regulator-compatible = "LDO3";
> +				regulator-name = "mt6360,ldo3";
> +				regulator-min-microvolt = <1200000>;
> +				regulator-max-microvolt = <3600000>;
> +				regulator-allowed-modes = <MT6360_OPMODE_NORMAL
> +							   MT6360_OPMODE_LP>;
> +			};
> +			ldo5 {
> +				regulator-compatible = "LDO5";
> +				regulator-name = "mt6360,ldo5";
> +				regulator-min-microvolt = <2700000>;
> +				regulator-max-microvolt = <3600000>;
> +				regulator-allowed-modes = <MT6360_OPMODE_NORMAL
> +							   MT6360_OPMODE_LP>;
> +			};

Why aren't the LDO cells in order?

> +		};
> +	};
> diff --git a/include/dt-bindings/mfd/mt6360.h b/include/dt-bindings/mfd/mt6360.h
> new file mode 100644
> index 0000000..6368388
> --- /dev/null
> +++ b/include/dt-bindings/mfd/mt6360.h
> @@ -0,0 +1,15 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * This header provides macros for MT6360 device bindings.
> + *
> + * Copyright (c) 2020 Mediatek Inc.
> + */
> +
> +#ifndef __DT_BINDINGS_MT6360_H__
> +#define __DT_BINDINGS_MT6360_H__
> +
> +#define MT6360_OPMODE_LP		(2)
> +#define MT6360_OPMODE_ULP		(3)
> +#define MT6360_OPMODE_NORMAL		(0)
> +
> +#endif /* __DT_BINDINGS_MT6360_H__ */
> -- 
> 2.7.4
> 

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2020-06-22 10:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 11:53 [PATCH v2 0/4] dt-bindings: mfd: Add bindings for the Mediatek MT6360 Gene Chen
2020-06-19 11:53 ` Gene Chen
2020-06-19 11:53 ` Gene Chen
2020-06-19 11:53 ` [PATCH v2 1/4] dt-bindings: mfd: Add bindings for the Mediatek MT6360 PMIC Gene Chen
2020-06-19 11:53   ` Gene Chen
2020-06-19 11:53   ` Gene Chen
2020-06-22 10:24   ` Lee Jones [this message]
2020-06-19 11:53 ` [PATCH v2 2/4] mfd: mt6360: implement i2c R/W with CRC Gene Chen
2020-06-19 11:53   ` Gene Chen
2020-06-19 11:53   ` Gene Chen
2020-07-01  7:16   ` Lee Jones
2020-07-01  7:16     ` Lee Jones
2020-07-01  7:16     ` Lee Jones
2020-07-02  8:29     ` Gene Chen
2020-07-02  8:29       ` Gene Chen
2020-07-02  8:29       ` Gene Chen
2020-07-02 10:27       ` Lee Jones
2020-07-02 10:27         ` Lee Jones
2020-07-02 10:27         ` Lee Jones
2020-06-19 11:53 ` [PATCH v2 3/4] iio: adc: mt6360: Add ADC driver for MT6360 Gene Chen
2020-06-19 11:53   ` Gene Chen
2020-06-19 11:53   ` Gene Chen
2020-06-20 17:03   ` Jonathan Cameron
2020-06-20 17:03     ` Jonathan Cameron
2020-06-20 17:03     ` Jonathan Cameron
2020-06-19 11:53 ` [PATCH v2 4/4] regulator: mt6360: Add support for MT6360 regulator Gene Chen
2020-06-19 11:53   ` Gene Chen
2020-06-19 11:53   ` Gene Chen
2020-06-20 16:55 ` [PATCH v2 0/4] dt-bindings: mfd: Add bindings for the Mediatek MT6360 Jonathan Cameron
2020-06-20 16:55   ` Jonathan Cameron
2020-06-20 16:55   ` Jonathan Cameron

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=20200622102420.GR954398@dell \
    --to=lee.jones@linaro.org \
    --cc=benjamin.chao@mediatek.com \
    --cc=broonie@kernel.org \
    --cc=cy_huang@richtek.com \
    --cc=dmurphy@ti.com \
    --cc=gene.chen.richtek@gmail.com \
    --cc=gene_chen@richtek.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=pmeerw@pmeerw.net \
    --cc=shufan_lee@richtek.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.