From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: alina_yu@richtek.com, lgirdwood@gmail.com, broonie@kernel.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC
Date: Wed, 19 Jul 2023 11:44:45 +0200 [thread overview]
Message-ID: <44b50616-a6ee-76e4-21b8-3e39b1a2ccd1@linaro.org> (raw)
In-Reply-To: <1689758686-14409-2-git-send-email-alina_yu@richtek.com>
On 19/07/2023 11:24, alina_yu@richtek.com wrote:
> From: alinayu <alina_yu@richtek.com>
>
> Add bindings for Richtek RTQ2208 IC controlled SubPMIC
>
> Signed-off-by: Alina Yu <alina_yu@richtek.com>
> ---
> v4
> - Modify filename to "richtek,rtq2208"
> - Add more desciptions for "regulator-allowed-modes"
> ---
> .../bindings/regulator/richtek,rtq2208.yaml | 208 +++++++++++++++++++++
> 1 file changed, 208 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
>
> diff --git a/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml b/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
> new file mode 100644
> index 0000000..6cc441f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/richtek,rtq2208.yaml
> @@ -0,0 +1,208 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/richtek,rtq2208-regulator.yaml#
Please test the patch before sending.
It does not look like you tested the bindings, at least after quick
look. Please run `make dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
Also, one patchset version per day... give people time to review.
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Richtek RTQ2208 SubPMIC Regulator
> +
> +maintainers:
> + - Alina Yu <alina_yu@richtek.com>
> +
> +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:
> + 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
> +
> + 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]
> +
> + regulator-mode:
> + enum: [0, 1]
> + description:
> + describe buck initial operating mode in suspend state.
There is no such property on this level. Aren't you mixing initial one?
> +
> + "^ldo[1-2]$":
> + type: object
> + $ref: regulator.yaml#
Missing unevaluatedProperties: false.
> + description:
> + regulator description for ldo[1-2].
> +
> + properties:
> + regulator-compatible:
> + pattern: "^LDO[1-2]$"
> +
> + richtek,fixed-uV:
> + $ref: "/schemas/types.yaml#/definitions/uint32"
This is pointed out by schema, so standard text:
It does not look like you tested the bindings, at least after quick
look. Please run `make dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).
Maybe you need to update your dtschema and yamllint.
> + enum: [ 900000, 1200000, 1800000, 3300000 ]
> + description:
> + the fixed voltage in micro volt which is decided at the factory.
I don't understand this property. Why this is different from min/max
microvolt? Plus, you use incorrect unit suffix.
> +
> +required:
> + - compatible
> + - reg
> + - regulators
> +
> +unevaluatedProperties: false
Instead: 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;
> +
> + regulators {
> + buck-a {
Wrong indentation. If you use 2 spaces, use it consistently.
> + regulator-min-microvolt = <400000>;
> + regulator-max-microvolt = <2050000>;
> + regulator-allowed-modes = <0 1>;
...
> + };
> + ldo2 {
> + regulator-always-on;
And three spaces here?
> + richtek,fixed-uV = <3300000>;
> + regulator-state-mem {
> + regulator-on-in-suspend;
> + };
> + };
> + };
> + };
> + };
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-07-19 9:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 9:24 [PATCH v4 0/2] Add Richtek RTQ2208 SubPMIC support alina_yu
2023-07-19 9:24 ` [PATCH v4 1/2] regulator: dt-bindings: rtq2208: Add Richtek RTQ2208 SubPMIC alina_yu
2023-07-19 9:44 ` Krzysztof Kozlowski [this message]
2023-07-20 8:07 ` Alina Yu
2023-07-20 8:38 ` Krzysztof Kozlowski
2023-07-21 6:27 ` Alina Yu
2023-07-24 2:23 ` Alina Yu
2023-07-19 10:43 ` Rob Herring
2023-07-19 9:24 ` [PATCH v4 2/2] regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver alina_yu
2023-07-19 17:08 ` Mark Brown
2023-07-20 17:55 ` kernel test robot
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=44b50616-a6ee-76e4-21b8-3e39b1a2ccd1@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=alina_yu@richtek.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).