2021-10-01 04:05:41

by Satya Priya

[permalink] [raw]
Subject: [PATCH V2 0/4] Add Qualcomm Technologies, Inc. PM8008 regulator driver

Satya Priya (2):
regulator: dt-bindings: Add pm8008 regulator bindings
dt-bindings: mfd: pm8008: Add pm8008 regulator node

satya priya (2):
regulator: Add a regulator driver for the PM8008 PMIC
arm64: dts: qcom: sc7280: Add pm8008 regulators support for sc7280-idp

.../devicetree/bindings/mfd/qcom,pm8008.yaml | 24 ++
.../bindings/regulator/qcom,pm8008-regulator.yaml | 72 +++++
arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 103 +++++++
drivers/regulator/Kconfig | 9 +
drivers/regulator/Makefile | 1 +
drivers/regulator/qcom-pm8008-regulator.c | 320 +++++++++++++++++++++
6 files changed, 529 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/qcom,pm8008-regulator.yaml
create mode 100644 drivers/regulator/qcom-pm8008-regulator.c

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


2021-10-01 04:06:26

by Satya Priya

[permalink] [raw]
Subject: [PATCH V2 1/4] regulator: dt-bindings: Add pm8008 regulator bindings

Add bindings for pm8008 pmic regulators.

Signed-off-by: Satya Priya <[email protected]>
---
Changes in V2:
- Moved this patch before "mfd: pm8008: Add pm8008 regulator node" to
resolve dtschema errors. Removed regulator-min-microvolt and
regulator-max-microvolt properties.

.../bindings/regulator/qcom,pm8008-regulator.yaml | 72 ++++++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/qcom,pm8008-regulator.yaml

diff --git a/Documentation/devicetree/bindings/regulator/qcom,pm8008-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,pm8008-regulator.yaml
new file mode 100644
index 0000000..31ac1eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/qcom,pm8008-regulator.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/qcom,pm8008-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. PM8008 Regulator bindings
+
+maintainers:
+ - Satya Priya <[email protected]>
+
+description:
+ Qualcomm Technologies, Inc. PM8008 is an I2C controlled PMIC
+ containing 7 LDO regulators.
+
+properties:
+ compatible:
+ const: qcom,pm8008-regulator
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ vdd_l1_l2-supply:
+ description: Input supply phandle of ldo1 and ldo2 regulators.
+
+ vdd_l3_l4-supply:
+ description: Input supply phandle of ldo3 and ldo4 regulators.
+
+ vdd_l5-supply:
+ description: Input supply phandle of ldo5 regulator.
+
+ vdd_l6-supply:
+ description: Input supply phandle of ldo6 regulator.
+
+ vdd_l7-supply:
+ description: Input supply phandle of ldo7 regulator.
+
+patternProperties:
+ "^regulator@[0-9a-f]+$":
+ type: object
+
+ $ref: "regulator.yaml#"
+
+ description: PM8008 regulator peripherals of PM8008 regulator device
+
+ properties:
+ reg:
+ maxItems: 1
+ regulator-name: true
+ qcom,min-dropout-voltage:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Specifies the minimum voltage in microvolts that the parent
+ supply regulator must output, above the output of this
+ regulator.
+
+ required:
+ - reg
+ - regulator-name
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+...
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

2021-10-08 22:24:52

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH V2 1/4] regulator: dt-bindings: Add pm8008 regulator bindings

On Fri, Oct 01, 2021 at 09:30:56AM +0530, Satya Priya wrote:
> Add bindings for pm8008 pmic regulators.
>
> Signed-off-by: Satya Priya <[email protected]>
> ---
> Changes in V2:
> - Moved this patch before "mfd: pm8008: Add pm8008 regulator node" to
> resolve dtschema errors. Removed regulator-min-microvolt and
> regulator-max-microvolt properties.
>
> .../bindings/regulator/qcom,pm8008-regulator.yaml | 72 ++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/qcom,pm8008-regulator.yaml
>
> diff --git a/Documentation/devicetree/bindings/regulator/qcom,pm8008-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,pm8008-regulator.yaml
> new file mode 100644
> index 0000000..31ac1eb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/qcom,pm8008-regulator.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/qcom,pm8008-regulator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Technologies, Inc. PM8008 Regulator bindings
> +
> +maintainers:
> + - Satya Priya <[email protected]>
> +
> +description:
> + Qualcomm Technologies, Inc. PM8008 is an I2C controlled PMIC
> + containing 7 LDO regulators.
> +
> +properties:
> + compatible:
> + const: qcom,pm8008-regulator
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> + vdd_l1_l2-supply:
> + description: Input supply phandle of ldo1 and ldo2 regulators.
> +
> + vdd_l3_l4-supply:
> + description: Input supply phandle of ldo3 and ldo4 regulators.
> +
> + vdd_l5-supply:
> + description: Input supply phandle of ldo5 regulator.
> +
> + vdd_l6-supply:
> + description: Input supply phandle of ldo6 regulator.
> +
> + vdd_l7-supply:
> + description: Input supply phandle of ldo7 regulator.
> +
> +patternProperties:
> + "^regulator@[0-9a-f]+$":
> + type: object
> +
> + $ref: "regulator.yaml#"
> +
> + description: PM8008 regulator peripherals of PM8008 regulator device
> +
> + properties:
> + reg:
> + maxItems: 1

blank line here

What do the reg values represent here? You need to define that since it
specific to this devices. Some constraints on the values would be nice
too.

> + regulator-name: true

blank line.

> + qcom,min-dropout-voltage:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + Specifies the minimum voltage in microvolts that the parent

Use a standard unit suffix and you can drop the type ref.

> + supply regulator must output, above the output of this
> + regulator.
> +
> + required:
> + - reg
> + - regulator-name
> +
> + additionalProperties: false
> +
> +required:
> + - compatible
> + - "#address-cells"
> + - "#size-cells"
> +
> +additionalProperties: false
> +...
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>
>