* [PATCH v2 0/2] ASoC: es8316: Add regulator support
@ 2026-08-12 9:35 Hongyang Zhao
2026-08-12 9:35 ` [PATCH v2 1/2] ASoC: dt-bindings: es8316: Add regulator supplies Hongyang Zhao
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Hongyang Zhao @ 2026-08-12 9:35 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Daniel Drake, Katsuhiro Suzuki, Matteo Martelli,
Binbin Zhou, Jaroslav Kysela, Takashi Iwai
Cc: Konrad Dybcio, Roger Shimizu, linux-sound, devicetree,
linux-kernel, Hongyang Zhao
Add regulator support for the four ES8316 power domains so board
descriptions can model and control the codec supplies.
The binding patch documents AVDD, CPVDD, DVDD and PVDD as optional
supplies for ES8316, preserving compatibility with existing device-tree
descriptions. The driver patch enables the supplies before initializing
the regmap and keeps them enabled for the lifetime of the I2C device.
The missing supply model was identified while reviewing the RubikPi 3
audio support:
https://lore.kernel.org/linux-arm-msm/c293d9c7-bdb7-4303-80c8-404228c434d7@oss.qualcomm.com/
Signed-off-by: Hongyang Zhao <hongyang.zhao@thundersoft.com>
---
Changes in v2:
- Restrict the supply properties to the ES8316 compatible.
- Enable the regulators before regmap initialization and keep them enabled
for the lifetime of the I2C device.
- Link to v1: https://lore.kernel.org/r/20260723-es8316-regulator-next-20260722-v1-0-721f757879a0@thundersoft.com
---
Hongyang Zhao (2):
ASoC: dt-bindings: es8316: Add regulator supplies
ASoC: codecs: es8316: Add regulator support
.../devicetree/bindings/sound/everest,es8316.yaml | 27 ++++++++++++++++++++++
sound/soc/codecs/es8316.c | 13 +++++++++++
2 files changed, 40 insertions(+)
---
base-commit: 5e6de6a2b522f659defacb1551d0465ba6ce13cf
change-id: 20260723-es8316-regulator-next-20260722-7d96badfd4da
Best regards,
--
Hongyang Zhao <hongyang.zhao@thundersoft.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] ASoC: dt-bindings: es8316: Add regulator supplies
2026-08-12 9:35 [PATCH v2 0/2] ASoC: es8316: Add regulator support Hongyang Zhao
@ 2026-08-12 9:35 ` Hongyang Zhao
2026-08-12 19:28 ` Rob Herring (Arm)
2026-08-12 19:42 ` Rob Herring
2026-08-12 9:35 ` [PATCH v2 2/2] ASoC: codecs: es8316: Add regulator support Hongyang Zhao
2026-08-12 10:49 ` [PATCH v2 0/2] ASoC: " Mark Brown
2 siblings, 2 replies; 6+ messages in thread
From: Hongyang Zhao @ 2026-08-12 9:35 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Daniel Drake, Katsuhiro Suzuki, Matteo Martelli,
Binbin Zhou, Jaroslav Kysela, Takashi Iwai
Cc: Konrad Dybcio, Roger Shimizu, linux-sound, devicetree,
linux-kernel, Hongyang Zhao
The ES8316 has separate AVDD, CPVDD, DVDD and PVDD supply inputs for
its analog, charge pump, digital core and digital I/O domains. Describe
all four inputs so boards can model the codec power topology.
The binding also covers ES8311 and ES8323, whose supply inputs differ,
so restrict these properties to the ES8316 compatible. Keep them
optional for compatibility with existing descriptions.
Signed-off-by: Hongyang Zhao <hongyang.zhao@thundersoft.com>
---
.../devicetree/bindings/sound/everest,es8316.yaml | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/everest,es8316.yaml b/Documentation/devicetree/bindings/sound/everest,es8316.yaml
index fe5d938ca310..276c73bb4790 100644
--- a/Documentation/devicetree/bindings/sound/everest,es8316.yaml
+++ b/Documentation/devicetree/bindings/sound/everest,es8316.yaml
@@ -30,6 +30,17 @@ description: |
allOf:
- $ref: dai-common.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: everest,es8316
+ else:
+ properties:
+ avdd-supply: false
+ cpvdd-supply: false
+ dvdd-supply: false
+ pvdd-supply: false
properties:
compatible:
@@ -49,6 +60,18 @@ properties:
items:
- const: mclk
+ avdd-supply:
+ description: Regulator providing the analog supply, from 2.0 V to 3.6 V
+
+ cpvdd-supply:
+ description: Regulator providing the charge pump supply, from 1.6 V to 2.0 V
+
+ dvdd-supply:
+ description: Regulator providing the digital core supply, from 1.6 V to 3.6 V
+
+ pvdd-supply:
+ description: Regulator providing the digital I/O supply, from 1.6 V to 3.6 V
+
interrupts:
maxItems: 1
description: Headphone detect interrupt
@@ -77,6 +100,10 @@ examples:
reg = <0x11>;
clocks = <&clks 10>;
clock-names = "mclk";
+ avdd-supply = <®_3p3v>;
+ cpvdd-supply = <®_1p8v>;
+ dvdd-supply = <®_1p8v>;
+ pvdd-supply = <®_1p8v>;
#sound-dai-cells = <0>;
};
};
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] ASoC: codecs: es8316: Add regulator support
2026-08-12 9:35 [PATCH v2 0/2] ASoC: es8316: Add regulator support Hongyang Zhao
2026-08-12 9:35 ` [PATCH v2 1/2] ASoC: dt-bindings: es8316: Add regulator supplies Hongyang Zhao
@ 2026-08-12 9:35 ` Hongyang Zhao
2026-08-12 10:49 ` [PATCH v2 0/2] ASoC: " Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Hongyang Zhao @ 2026-08-12 9:35 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Daniel Drake, Katsuhiro Suzuki, Matteo Martelli,
Binbin Zhou, Jaroslav Kysela, Takashi Iwai
Cc: Konrad Dybcio, Roger Shimizu, linux-sound, devicetree,
linux-kernel, Hongyang Zhao
ES8316 has separate AVDD, CPVDD, DVDD and PVDD supply inputs.
Request and enable the supplies during I2C probe, before initializing
the regmap. Keep them enabled for the lifetime of the I2C device so the
regmap cannot access an unpowered device and its cache remains
synchronized if the ASoC component is unbound and rebound.
Signed-off-by: Hongyang Zhao <hongyang.zhao@thundersoft.com>
---
sound/soc/codecs/es8316.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index 87f331868dc7..24ec8b211cdb 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -15,6 +15,7 @@
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -31,6 +32,13 @@ static const unsigned int supported_mclk_lrck_ratios[] = {
256, 384, 400, 500, 512, 768, 1024
};
+static const char * const es8316_supply_names[] = {
+ "avdd",
+ "cpvdd",
+ "dvdd",
+ "pvdd",
+};
+
struct es8316_priv {
struct mutex lock;
struct clk *mclk;
@@ -866,6 +874,11 @@ static int es8316_i2c_probe(struct i2c_client *i2c_client)
i2c_set_clientdata(i2c_client, es8316);
+ ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(es8316_supply_names),
+ es8316_supply_names);
+ if (ret)
+ return dev_err_probe(dev, ret, "unable to enable supplies\n");
+
es8316->regmap = devm_regmap_init_i2c(i2c_client, &es8316_regmap);
if (IS_ERR(es8316->regmap))
return PTR_ERR(es8316->regmap);
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] ASoC: es8316: Add regulator support
2026-08-12 9:35 [PATCH v2 0/2] ASoC: es8316: Add regulator support Hongyang Zhao
2026-08-12 9:35 ` [PATCH v2 1/2] ASoC: dt-bindings: es8316: Add regulator supplies Hongyang Zhao
2026-08-12 9:35 ` [PATCH v2 2/2] ASoC: codecs: es8316: Add regulator support Hongyang Zhao
@ 2026-08-12 10:49 ` Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2026-08-12 10:49 UTC (permalink / raw)
To: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Daniel Drake, Katsuhiro Suzuki, Matteo Martelli, Binbin Zhou,
Jaroslav Kysela, Takashi Iwai, Hongyang Zhao
Cc: Konrad Dybcio, Roger Shimizu, linux-sound, devicetree,
linux-kernel
On Wed, 12 Aug 2026 17:35:42 +0800, Hongyang Zhao wrote:
> ASoC: es8316: Add regulator support
>
> Add regulator support for the four ES8316 power domains so board
> descriptions can model and control the codec supplies.
>
> The binding patch documents AVDD, CPVDD, DVDD and PVDD as optional
> supplies for ES8316, preserving compatibility with existing device-tree
> descriptions. The driver patch enables the supplies before initializing
> the regmap and keeps them enabled for the lifetime of the I2C device.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/2] ASoC: dt-bindings: es8316: Add regulator supplies
https://git.kernel.org/broonie/sound/c/e9966d450b46
[2/2] ASoC: codecs: es8316: Add regulator support
https://git.kernel.org/broonie/sound/c/c60279912ef0
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] ASoC: dt-bindings: es8316: Add regulator supplies
2026-08-12 9:35 ` [PATCH v2 1/2] ASoC: dt-bindings: es8316: Add regulator supplies Hongyang Zhao
@ 2026-08-12 19:28 ` Rob Herring (Arm)
2026-08-12 19:42 ` Rob Herring
1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring (Arm) @ 2026-08-12 19:28 UTC (permalink / raw)
To: Hongyang Zhao
Cc: linux-sound, linux-kernel, Matteo Martelli, Takashi Iwai,
Konrad Dybcio, Krzysztof Kozlowski, Liam Girdwood, Binbin Zhou,
Roger Shimizu, Daniel Drake, Mark Brown, Conor Dooley, devicetree,
Jaroslav Kysela, Katsuhiro Suzuki
On Wed, 12 Aug 2026 17:35:43 +0800, Hongyang Zhao wrote:
> The ES8316 has separate AVDD, CPVDD, DVDD and PVDD supply inputs for
> its analog, charge pump, digital core and digital I/O domains. Describe
> all four inputs so boards can model the codec power topology.
>
> The binding also covers ES8311 and ES8323, whose supply inputs differ,
> so restrict these properties to the ES8316 compatible. Keep them
> optional for compatibility with existing descriptions.
>
> Signed-off-by: Hongyang Zhao <hongyang.zhao@thundersoft.com>
> ---
> .../devicetree/bindings/sound/everest,es8316.yaml | 27 ++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/everest,es8316.yaml: allOf:1: 'then' is a dependency of 'if'
hint: Keywords must be a subset of known json-schema keywords
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/everest,es8316.yaml: allOf:1: 'then' is a dependency of 'else'
hint: Keywords must be a subset of known json-schema keywords
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260812-es8316-regulator-next-20260722-v2-1-e7078bc9bc9c@thundersoft.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] ASoC: dt-bindings: es8316: Add regulator supplies
2026-08-12 9:35 ` [PATCH v2 1/2] ASoC: dt-bindings: es8316: Add regulator supplies Hongyang Zhao
2026-08-12 19:28 ` Rob Herring (Arm)
@ 2026-08-12 19:42 ` Rob Herring
1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2026-08-12 19:42 UTC (permalink / raw)
To: Hongyang Zhao
Cc: Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Conor Dooley,
Daniel Drake, Katsuhiro Suzuki, Matteo Martelli, Binbin Zhou,
Jaroslav Kysela, Takashi Iwai, Konrad Dybcio, Roger Shimizu,
linux-sound, devicetree, linux-kernel
On Wed, Aug 12, 2026 at 05:35:43PM +0800, Hongyang Zhao wrote:
> The ES8316 has separate AVDD, CPVDD, DVDD and PVDD supply inputs for
> its analog, charge pump, digital core and digital I/O domains. Describe
> all four inputs so boards can model the codec power topology.
>
> The binding also covers ES8311 and ES8323, whose supply inputs differ,
> so restrict these properties to the ES8316 compatible. Keep them
> optional for compatibility with existing descriptions.
>
> Signed-off-by: Hongyang Zhao <hongyang.zhao@thundersoft.com>
> ---
> .../devicetree/bindings/sound/everest,es8316.yaml | 27 ++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/everest,es8316.yaml b/Documentation/devicetree/bindings/sound/everest,es8316.yaml
> index fe5d938ca310..276c73bb4790 100644
> --- a/Documentation/devicetree/bindings/sound/everest,es8316.yaml
> +++ b/Documentation/devicetree/bindings/sound/everest,es8316.yaml
> @@ -30,6 +30,17 @@ description: |
>
> allOf:
> - $ref: dai-common.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: everest,es8316
> + else:
Missing 'then'. You need to invert the 'if'.
Looks like Mark already applied, so you'll need to send incremental
patch.
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-08-12 19:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 9:35 [PATCH v2 0/2] ASoC: es8316: Add regulator support Hongyang Zhao
2026-08-12 9:35 ` [PATCH v2 1/2] ASoC: dt-bindings: es8316: Add regulator supplies Hongyang Zhao
2026-08-12 19:28 ` Rob Herring (Arm)
2026-08-12 19:42 ` Rob Herring
2026-08-12 9:35 ` [PATCH v2 2/2] ASoC: codecs: es8316: Add regulator support Hongyang Zhao
2026-08-12 10:49 ` [PATCH v2 0/2] ASoC: " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox