lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXv+5FTuY=ZHB3-2Woit5amRZ=RxByGMq=LQp-es8tWEhAQUA@mail.gmail.com>
Date:   Mon, 28 Aug 2023 12:36:00 +0800
From:   Chen-Yu Tsai <wenst@...omium.org>
To:     Macpaul Lin <macpaul.lin@...iatek.com>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Fabien Parent <fparent@...libre.com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org,
        Bear Wang <bear.wang@...iatek.com>,
        Pablo Sun <pablo.sun@...iatek.com>,
        Macpaul Lin <macpaul@...il.com>,
        Chunfeng Yun <chunfeng.yun@...iatek.com>
Subject: Re: [PATCH 3/4] arm64: dts: mediatek: mt6360: add PMIC MT6360 related nodes

On Fri, Aug 25, 2023 at 7:46 PM Macpaul Lin <macpaul.lin@...iatek.com> wrote:
>
> MT6360 is the secondary PMIC for MT8195.
> It supports USB Type-C and PD functions.
> Add MT6360 related common nodes which is used for MT8195 platform, includes
>  - charger
>  - ADC
>  - LED
>  - regulators
>
> Signed-off-by: Macpaul Lin <macpaul.lin@...iatek.com>
> ---
>  arch/arm64/boot/dts/mediatek/mt6360.dtsi | 112 +++++++++++++++++++++++
>  1 file changed, 112 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/mediatek/mt6360.dtsi
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt6360.dtsi b/arch/arm64/boot/dts/mediatek/mt6360.dtsi
> new file mode 100644
> index 000000000000..e841f4e5a54b
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt6360.dtsi
> @@ -0,0 +1,112 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright (C) 2023 MediaTek Inc.
> + */
> +
> +#include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
> +
> +&mt6360 {
> +       interrupt-controller;
> +       interrupt-parent = <&pio>;
> +       interrupt-names = "IRQB";
> +
> +       charger {
> +               compatible = "mediatek,mt6360-chg";
> +               richtek,vinovp-microvolt = <14500000>;
> +
> +               otg_vbus_regulator: usb-otg-vbus-regulator {
> +                       regulator-compatible = "usb-otg-vbus";
> +                       regulator-name = "usb-otg-vbus";
> +                       regulator-min-microvolt = <4425000>;
> +                       regulator-max-microvolt = <5825000>;
> +               };
> +       };
> +
> +       adc {
> +               compatible = "mediatek,mt6360-adc";
> +               #io-channel-cells = <1>;
> +       };
> +
> +       led {
> +               compatible = "mediatek,mt6360-led";
> +       };
> +
> +       regulator {
> +               compatible = "mediatek,mt6360-regulator";
> +               LDO_VIN3-supply = <&mt6360_buck2>;
> +
> +               mt6360_buck1: buck1 {
> +                       regulator-compatible = "BUCK1";
> +                       regulator-name = "mt6360,buck1";

Normally there's no need to provide a default name. Any used regulator
should have been named to match the power rail name from the board's
schematics.

> +                       regulator-min-microvolt = <300000>;
> +                       regulator-max-microvolt = <1300000>;

These values correspond to the regulator's range. They make no sense as
regulator constraints. The min/max values are supposed to be the most
restrictive set of voltages of the regulator consumers. If what is fed
by this regulator can only take 0.7V ~ 1.1V, then it should save 0.7V
and 1.1V here. If the regulator is unused, then there are no constraints,
and these can be left out.

Just leave them out of the file.

Both comments apply to all the regulators.

ChenYu

> +                       regulator-allowed-modes = <MT6360_OPMODE_NORMAL
> +                                                  MT6360_OPMODE_LP
> +                                                  MT6360_OPMODE_ULP>;
> +               };
> +
> +               mt6360_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>;
> +               };
> +
> +               mt6360_ldo1: 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>;
> +               };
> +
> +               mt6360_ldo2: 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>;
> +               };
> +
> +               mt6360_ldo3: 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>;
> +               };
> +
> +               mt6360_ldo5: 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>;
> +               };
> +
> +               mt6360_ldo6: 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>;
> +               };
> +
> +               mt6360_ldo7: 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>;
> +               };
> +       };
> +};
> --
> 2.18.0
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ