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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240215142052.GA4180777-robh@kernel.org>
Date: Thu, 15 Feb 2024 08:20:52 -0600
From: Rob Herring <robh@...nel.org>
To: Karel Balej <karelb@...li.ms.mff.cuni.cz>
Cc: Karel Balej <balejk@...fyz.cz>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>, Lee Jones <lee@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>, linux-input@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	Duje Mihanović <duje.mihanovic@...le.hr>,
	~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org
Subject: Re: [RFC PATCH v2 1/6] dt-bindings: mfd: add entry for Marvell
 88PM886 PMIC

On Sun, Feb 11, 2024 at 10:35:51AM +0100, Karel Balej wrote:
> From: Karel Balej <balejk@...fyz.cz>
> 
> Marvell 88PM886 is a PMIC with several subdevices such as onkey,
> regulators or battery and charger. It comes in at least two revisions,
> A0 and A1 -- only A1 is described here at the moment.
> 
> Signed-off-by: Karel Balej <balejk@...fyz.cz>
> ---
> 
> Notes:
>     RFC v2:
>     - Address Rob's feedback:
>       - Drop mention of 88PM880.
>       - Make sure the file passes bindings check (add the necessary header
>         and fix `interrupt-cells`).
>       - Other small changes.
>     - Add regulators. Changes with respect to the regulator RFC series:
>       - Address Krzysztof's comments:
>         - Drop unused compatible.
>         - Fix sub-node pattern.
> 
>  .../bindings/mfd/marvell,88pm88x.yaml         | 74 +++++++++++++++++++

Filename should match the compatible.

In general, drop the 'x' wildcard.

>  .../regulator/marvell,88pm88x-regulator.yaml  | 28 +++++++
>  2 files changed, 102 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml
>  create mode 100644 Documentation/devicetree/bindings/regulator/marvell,88pm88x-regulator.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml b/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml
> new file mode 100644
> index 000000000000..29ab979862d5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/marvell,88pm88x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Marvell 88PM88X PMIC core
> +
> +maintainers:
> +  - Karel Balej <balejk@...fyz.cz>
> +
> +description:
> +  Marvell 88PM886 is a PMIC providing several functions such as onkey,
> +  regulators or battery and charger.
> +
> +properties:
> +  compatible:
> +    const: marvell,88pm886-a1
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupt-controller: true

What is the device providing interrupts to (in DT)?

> +
> +  interrupts:
> +    maxItems: 1
> +
> +  "#interrupt-cells":
> +    const: 1
> +
> +  regulators:
> +    $ref: /schemas/regulator/marvell,88pm88x-regulator.yaml#

That's simple enough, I'd just move the regulator nodes into this doc.

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupt-controller
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +      pmic@30 {
> +        compatible = "marvell,88pm886-a1";
> +        reg = <0x30>;
> +        interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
> +        interrupt-parent = <&gic>;
> +        interrupt-controller;
> +        #interrupt-cells = <1>;
> +
> +        regulators {
> +          ldo2: ldo2 {
> +            regulator-min-microvolt = <3100000>;
> +            regulator-max-microvolt = <3300000>;
> +            };
> +
> +          ldo15: ldo15 {
> +            regulator-min-microvolt = <3300000>;
> +            regulator-max-microvolt = <3300000>;
> +            };
> +
> +          buck2: buck2 {
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            };
> +        };
> +      };
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/regulator/marvell,88pm88x-regulator.yaml b/Documentation/devicetree/bindings/regulator/marvell,88pm88x-regulator.yaml
> new file mode 100644
> index 000000000000..1b4b5f1b4932
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/marvell,88pm88x-regulator.yaml
> @@ -0,0 +1,28 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/marvell,88pm88x-regulator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Regulators of Marvell 88PM88X PMICs.
> +
> +maintainers:
> +  - Karel Balej <balejk@...fyz.cz>
> +
> +description: |
> +  This is a part of device tree bindings for Marvell 88PM88X MFD.
> +
> +  The regulators node is represented as a sub-node of the PMIC node on the
> +  device tree.
> +
> +  See also Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml for
> +  additional information and example.
> +
> +patternProperties:
> +  "^(ldo(1[0-6]|[1-9])|buck[1-5])$":
> +    type: object
> +    $ref: /schemas/regulator/regulator.yaml#
> +    description: LDO or buck regulator.
> +    unevaluatedProperties: false
> +
> +additionalProperties: false
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ