2022-11-02 19:09:17

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v2 0/8] Adjust usage of rt5682(s) power supply properties


This series sets straight the usage of power supply properties for the
rt5682 and rt5682s audio codecs.

These properties were already being used by sc7180-trogdor.dtsi (and
derived DTs like sc7180-trogdor-kingoftown.dtsi).

We start by documenting the power supplies that are already in use and
then add few others that were missing to the bindings.

Then we update the drivers to also support the new supplies.

Finally we update the trogdor DTs so they have the newly added but
required supplies and remove a superfluous one that was causing
warnings.

v1: https://lore.kernel.org/all/[email protected]

Changes in v2:
- Made new supply names uppercase to be consistent with the existing
ones

Nícolas F. R. A. Prado (8):
ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies
ASoC: dt-bindings: realtek,rt5682s: Add DBVDD and LDO1-IN supplies
ASoC: dt-bindings: rt5682: Add AVDD, MICVDD and VBAT supplies
ASoC: dt-bindings: rt5682: Add DBVDD and LDO1-IN supplies
ASoC: rt5682s: Support DBVDD and LDO1-IN supplies
ASoC: rt5682: Support DBVDD and LDO1-IN supplies
arm64: dts: qcom: sc7180-trogdor: Add missing supplies for rt5682
arm64: dts: qcom: sc7180-trogdor: Remove VBAT supply from rt5682s

.../bindings/sound/realtek,rt5682s.yaml | 23 +++++++++++++++++++
.../devicetree/bindings/sound/rt5682.txt | 20 ++++++++++++++++
.../dts/qcom/sc7180-trogdor-kingoftown.dtsi | 1 +
...0-trogdor-wormdingler-rev1-boe-rt5682s.dts | 1 +
...0-trogdor-wormdingler-rev1-inx-rt5682s.dts | 1 +
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 ++
sound/soc/codecs/rt5682.c | 2 ++
sound/soc/codecs/rt5682.h | 2 +-
sound/soc/codecs/rt5682s.c | 22 ++++++++++++++++++
sound/soc/codecs/rt5682s.h | 2 ++
10 files changed, 75 insertions(+), 1 deletion(-)

--
2.38.1



2022-11-02 19:12:26

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v2 7/8] arm64: dts: qcom: sc7180-trogdor: Add missing supplies for rt5682

The DBVDD and LDO1-IN supplies for rt5682 are required but are missing.
They are supplied by the same power rail as AVDD. Add them.

Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>

---

Changes in v2:
- Made names uppercase

arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
index 1a1c346d619c..2adb2fbfebae 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi
@@ -768,6 +768,8 @@ alc5682: codec@1a {
interrupts = <28 IRQ_TYPE_EDGE_BOTH>;

AVDD-supply = <&pp1800_alc5682>;
+ DBVDD-supply = <&pp1800_alc5682>;
+ LDO1-IN-supply = <&pp1800_alc5682>;
MICVDD-supply = <&pp3300_codec>;
VBAT-supply = <&pp3300_audio>;

--
2.38.1


2022-11-02 19:14:11

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v2 2/8] ASoC: dt-bindings: realtek,rt5682s: Add DBVDD and LDO1-IN supplies

The rt5682s codec has two additional power supply pins, DBVDD and
LDO1_IN, that aren't currently described in the binding. Add them.

Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>

---

Changes in v2:
- Made names uppercase

.../devicetree/bindings/sound/realtek,rt5682s.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
index b7338bfc0f5a..dc418652f241 100644
--- a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
+++ b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
@@ -97,6 +97,13 @@ properties:
description: Regulator supplying power for the microphone bias through the
MICVDD pin.

+ DBVDD-supply:
+ description: Regulator supplying I/O power through the DBVDD pin.
+
+ LDO1-IN-supply:
+ description: Regulator supplying power to the digital core and charge pump
+ through the LDO1_IN pin.
+
additionalProperties: false

required:
@@ -104,6 +111,8 @@ required:
- reg
- AVDD-supply
- MICVDD-supply
+ - DBVDD-supply
+ - LDO1-IN-supply

examples:
- |
@@ -132,5 +141,7 @@ examples:

AVDD-supply = <&avdd_reg>;
MICVDD-supply = <&micvdd_reg>;
+ DBVDD-supply = <&dbvdd_reg>;
+ LDO1-IN-supply = <&ldo1_in_reg>;
};
};
--
2.38.1


2022-11-02 20:03:08

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v2 3/8] ASoC: dt-bindings: rt5682: Add AVDD, MICVDD and VBAT supplies

The rt5682 codec has three supplies - AVDD, MICVDD and VBAT - which are
already used by sc7180-trogdor.dtsi. Document them in the binding.

Acked-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---

(no changes since v1)

Documentation/devicetree/bindings/sound/rt5682.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/rt5682.txt b/Documentation/devicetree/bindings/sound/rt5682.txt
index 6b87db68337c..89e6245b870e 100644
--- a/Documentation/devicetree/bindings/sound/rt5682.txt
+++ b/Documentation/devicetree/bindings/sound/rt5682.txt
@@ -8,6 +8,15 @@ Required properties:

- reg : The I2C address of the device.

+- AVDD-supply: phandle to the regulator supplying analog power through the
+ AVDD pin
+
+- MICVDD-supply: phandle to the regulator supplying power for the microphone
+ bias through the MICVDD pin. Either MICVDD or VBAT should be present.
+
+- VBAT-supply: phandle to the regulator supplying battery power through the
+ VBAT pin. Either MICVDD or VBAT should be present.
+
Optional properties:

- interrupts : The CODEC's interrupt output.
@@ -75,4 +84,7 @@ rt5682 {

clocks = <&osc>;
clock-names = "mclk";
+
+ AVDD-supply = <&avdd_reg>;
+ MICVDD-supply = <&micvdd_reg>;
};
--
2.38.1


2022-11-04 22:40:07

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 2/8] ASoC: dt-bindings: realtek,rt5682s: Add DBVDD and LDO1-IN supplies


On Wed, 02 Nov 2022 14:19:56 -0400, N?colas F. R. A. Prado wrote:
> The rt5682s codec has two additional power supply pins, DBVDD and
> LDO1_IN, that aren't currently described in the binding. Add them.
>
> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
> Signed-off-by: N?colas F. R. A. Prado <[email protected]>
>
> ---
>
> Changes in v2:
> - Made names uppercase
>
> .../devicetree/bindings/sound/realtek,rt5682s.yaml | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>

Reviewed-by: Rob Herring <[email protected]>

2022-12-06 18:54:25

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v2 0/8] Adjust usage of rt5682(s) power supply properties

On Wed, 2 Nov 2022 14:19:54 -0400, Nícolas F. R. A. Prado wrote:
> This series sets straight the usage of power supply properties for the
> rt5682 and rt5682s audio codecs.
>
> These properties were already being used by sc7180-trogdor.dtsi (and
> derived DTs like sc7180-trogdor-kingoftown.dtsi).
>
> We start by documenting the power supplies that are already in use and
> then add few others that were missing to the bindings.
>
> [...]

Applied, thanks!

[7/8] arm64: dts: qcom: sc7180-trogdor: Add missing supplies for rt5682
commit: 172cb25fd25786a3290cffd38dea677edb0b7cca
[8/8] arm64: dts: qcom: sc7180-trogdor: Remove VBAT supply from rt5682s
commit: 147e8b2080f1a0496a1f51739cf591324f133619

Best regards,
--
Bjorn Andersson <[email protected]>