* [PATCH] ASoC: codecs: add support for ES8326 dts
@ 2022-03-26 4:13 zhuning
0 siblings, 0 replies; 3+ messages in thread
From: zhuning @ 2022-03-26 4:13 UTC (permalink / raw)
To: alsa-devel; +Cc: pierre-louis.bossart
From: yangxiaohua <yangxiaohua@everest-semi.com>
Subject: [PATCH 1/1] ASoC: codecs: add support for ES8326 dts
The ES8326 codec is not compatible with ES8316 and requires a dedicated driver.
This is a separate patch for ES8326 dts
Signed-off-by: David Yang <yangxiaohua@everest-semi.com>
---
.../bindings/sound/everest,es8326.yaml | 109 ++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100755 Documentation/devicetree/bindings/sound/everest,es8326.yaml
diff --git a/Documentation/devicetree/bindings/sound/everest,es8326.yaml b/Documentation/devicetree/bindings/sound/everest,es8326.yaml
new file mode 100755
index 000000000000..8cae9c328dbc
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/everest,es8326.yaml
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/everest,es8326.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Everest ES8326 audio CODEC
+
+maintainers:
+ - David Yang <yangxiaohua@everest-semi.com>
+
+properties:
+ compatible:
+ const: everest,es8326
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: clock for master clock (MCLK)
+
+ clock-names:
+ items:
+ - const: mclk
+
+ "#sound-dai-cells":
+ const: 0
+
+ mclk-rate:
+ description:
+ clock rate of mclk
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+
+ everest,jack-pol:
+ description:
+ just the value of reg 57. Bit(3) decides whether the jack polarity is inverted.
+ Bit(2) decides whether the bottom on the headset is inverted.
+ Bit(1)/(0) decides the mic properity to be OMTP/CTIA or auto.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0
+ maximum: 0x0f
+ default: 0x0f
+
+ everest,mic1-src:
+ description:
+ the value of reg 2A when headset plugged.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0x00
+ maximum: 0x77
+ default: 0x22
+
+ everest,mic2-src:
+ description:
+ the value of reg 2A when headset unplugged.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0x00
+ maximum: 0x77
+ default: 0x44
+
+ everest,amic1-src:
+ description:
+ the value of reg 23 when headset plugged.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0x19
+ maximum: 0x29
+ default: 0x19
+
+ everest,amic2-src:
+ description:
+ the value of reg 23 when headset unplugged.
+ Set to 0x19 if dmic used. Set to 0x29 if amic used.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0x19
+ maximum: 0x29
+ default: 0x19
+
+ everest,jack-detect-inverted:
+ description:
+ Defined to invert the jack detection.
+ $ref: /schemas/types.yaml#/definitions/flag
+
+required:
+ - compatible
+ - reg
+ - "#sound-dai-cells"
+
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ es8326: codec@19 {
+ compatible = "everest,es8326";
+ reg = <0x19>;
+ clocks = <&clks 10>;
+ clock-names = "mclk";
+ #sound-dai-cells = <0>;
+ mic1-src = [22];
+ mic2-src = [44];
+ amic1-src = [19];
+ amic2-src = [19];
+ jack-pol = [0e];
+ };
+ };
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ASoC: codecs: add support for ES8326 dts
@ 2022-04-05 13:31 Zhu Ning
2022-04-05 13:46 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Zhu Ning @ 2022-04-05 13:31 UTC (permalink / raw)
To: alsa-devel; +Cc: Zhu Ning, broonie, pierre-louis.bossart, yangxiaohua, tiwai
From: yangxiaohua <yangxiaohua@everest-semi.com>
The ES8326 codec is not compatible with ES8316 and requires a dedicated driver.
This is a separate patch for ES8326 dts
Signed-off-by: David Yang <yangxiaohua@everest-semi.com>
Signed-off-by: Zhu Ning <zhuning@everest-semi.com>
---
.../bindings/sound/everest,es8326.yaml | 109 ++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100755 Documentation/devicetree/bindings/sound/everest,es8326.yaml
diff --git a/Documentation/devicetree/bindings/sound/everest,es8326.yaml b/Documentation/devicetree/bindings/sound/everest,es8326.yaml
new file mode 100755
index 000000000000..8cae9c328dbc
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/everest,es8326.yaml
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/everest,es8326.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Everest ES8326 audio CODEC
+
+maintainers:
+ - David Yang <yangxiaohua@everest-semi.com>
+
+properties:
+ compatible:
+ const: everest,es8326
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: clock for master clock (MCLK)
+
+ clock-names:
+ items:
+ - const: mclk
+
+ "#sound-dai-cells":
+ const: 0
+
+ mclk-rate:
+ description:
+ clock rate of mclk
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+
+ everest,jack-pol:
+ description:
+ just the value of reg 57. Bit(3) decides whether the jack polarity is inverted.
+ Bit(2) decides whether the bottom on the headset is inverted.
+ Bit(1)/(0) decides the mic properity to be OMTP/CTIA or auto.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0
+ maximum: 0x0f
+ default: 0x0f
+
+ everest,mic1-src:
+ description:
+ the value of reg 2A when headset plugged.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0x00
+ maximum: 0x77
+ default: 0x22
+
+ everest,mic2-src:
+ description:
+ the value of reg 2A when headset unplugged.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0x00
+ maximum: 0x77
+ default: 0x44
+
+ everest,amic1-src:
+ description:
+ the value of reg 23 when headset plugged.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0x19
+ maximum: 0x29
+ default: 0x19
+
+ everest,amic2-src:
+ description:
+ the value of reg 23 when headset unplugged.
+ Set to 0x19 if dmic used. Set to 0x29 if amic used.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minimum: 0x19
+ maximum: 0x29
+ default: 0x19
+
+ everest,jack-detect-inverted:
+ description:
+ Defined to invert the jack detection.
+ $ref: /schemas/types.yaml#/definitions/flag
+
+required:
+ - compatible
+ - reg
+ - "#sound-dai-cells"
+
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ es8326: codec@19 {
+ compatible = "everest,es8326";
+ reg = <0x19>;
+ clocks = <&clks 10>;
+ clock-names = "mclk";
+ #sound-dai-cells = <0>;
+ mic1-src = [22];
+ mic2-src = [44];
+ amic1-src = [19];
+ amic2-src = [19];
+ jack-pol = [0e];
+ };
+ };
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: codecs: add support for ES8326 dts
2022-04-05 13:31 Zhu Ning
@ 2022-04-05 13:46 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-04-05 13:46 UTC (permalink / raw)
To: Zhu Ning; +Cc: Zhu Ning, alsa-devel, pierre-louis.bossart, yangxiaohua, tiwai
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
On Tue, Apr 05, 2022 at 09:31:21PM +0800, Zhu Ning wrote:
> + mclk-rate:
> + description:
> + clock rate of mclk
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 1
There's a standard clock binding for assigning rates to clocks
(assigned-clocks) - that should be used instead of having a custom
binding for the MCLK rate.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-08 7:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-26 4:13 [PATCH] ASoC: codecs: add support for ES8326 dts zhuning
-- strict thread matches above, loose matches on Subject: below --
2022-04-05 13:31 Zhu Ning
2022-04-05 13:46 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox