Skip to contentSkip to conversation

ASoC: dt-bindings: Add cmx655 codec

PATCH Superseded Nikola Jelic 2 participants 8 messages Feb 14, 2025 – Mar 24, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 ASoC: dt-bindings: Add cmx655 codec

---
V3 -> V4: review remarks
V2 -> V3: fixed dt_binding_check + yamllint warnings V1 -> V2: removed the txt file, fixed review remarks

---
 .../bindings/sound/cml,cmx655d.yaml           | 62 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  2 +
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/cml,cmx655d.yaml
Documentation/devicetree/bindings/sound/cml,cmx655d.yaml new file +62 -0
new file mode 100644
index 000000000000..577e1d4942c6
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/cml,cmx655d.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CML Micro CMX655D codec
+
+maintainers:
+  - Richard Walton <[email protected]>
+  - Nikola Jelic <[email protected]>
+
+description:
+  The CMX655D is an ultra-low power voice codec.
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: cml,cmx655d
+
+  reg:
+    maxItems: 1
+
+  "#sound-dai-cells":
+    const: 0
+
+  reset-gpios:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    const: cmx-irq
+
+required:
+  - compatible
+  - reg
+  - '#sound-dai-cells'
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        audio-codec@54 {
+            compatible = "cml,cmx655d";
+            reg = <0x54>;
+            #sound-dai-cells = <0>;
+            reset-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+            interrupt-parent = <&gpio>;
+            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+        };
+
+    };
+...
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index dac80c62b742..74f925f3e3cb 100644
@@ -310,6 +310,8 @@ patternProperties:
     description: Carl Cloos Schweisstechnik GmbH.
   "^cloudengines,.*":
     description: Cloud Engines, Inc.
+  "^cml,.*":
+    description: CML Micro, Ltd.
   "^cnm,.*":
     description: Chips&Media, Inc.
   "^cnxt,.*":
Signature · 1 line
2.47.2
#1 lore raw

PATCH v5 2/2 ASoC: codecs: cmx655: Add CML's CMX655D codec

---
V4 -> V5: Introduced a module parameter for reset attempts, header fixes V3 -> V4: Kernel test robot remarks
V2 -> V3: Review remarks
V1 -> V2: Review remarks, code style + various other fixes

---
 sound/soc/codecs/Kconfig      |   16 +
 sound/soc/codecs/Makefile     |    6 +
 sound/soc/codecs/cmx655-i2c.c |   59 ++
 sound/soc/codecs/cmx655-spi.c |   59 ++
 sound/soc/codecs/cmx655.c     | 1030 +++++++++++++++++++++++++++++++++
 sound/soc/codecs/cmx655.h     |  151 +++++
 6 files changed, 1321 insertions(+)
 create mode 100644 sound/soc/codecs/cmx655-i2c.c
 create mode 100644 sound/soc/codecs/cmx655-spi.c
 create mode 100644 sound/soc/codecs/cmx655.c
 create mode 100644 sound/soc/codecs/cmx655.h
sound/soc/codecs/Kconfig +16 -0
index ee35f3aa5521..d06b4eb8f1e5 100644
@@ -63,6 +63,7 @@ config SND_SOC_ALL_CODECS
 	imply SND_SOC_BT_SCO
 	imply SND_SOC_BD28623
 	imply SND_SOC_CHV3_CODEC
+	imply SND_SOC_CMX655
 	imply SND_SOC_CQ0093VC
 	imply SND_SOC_CROS_EC_CODEC
 	imply SND_SOC_CS35L32
@@ -747,6 +748,21 @@ config SND_SOC_CPCAP
 	tristate "Motorola CPCAP codec"
 	depends on MFD_CPCAP || COMPILE_TEST
 
+config SND_SOC_CMX655D
+	tristate
+
+config SND_SOC_CMX655D_I2C
+       tristate "CMX655D codec (I2C)"
+       depends on I2C
+       select SND_SOC_CMX655D
+       select REGMAP_I2C
+
+config SND_SOC_CMX655D_SPI
+       tristate "CMX655D codec (SPI)"
+       depends on SPI
+       select SND_SOC_CMX655D
+       select REGMAP_SPI
+
 config SND_SOC_CQ0093VC
 	tristate
 
sound/soc/codecs/Makefile +6 -0
index d7ad795603c1..130d29e2e574 100644
@@ -58,6 +58,9 @@ snd-soc-aw88399-y := aw88399.o
 snd-soc-bd28623-y := bd28623.o
 snd-soc-bt-sco-y := bt-sco.o
 snd-soc-chv3-codec-y := chv3-codec.o
+snd-soc-cmx655-y := cmx655.o
+snd-soc-cmx655-i2c-y := cmx655-i2c.o
+snd-soc-cmx655-spi-y := cmx655-spi.o
 snd-soc-cpcap-y := cpcap.o
 snd-soc-cq93vc-y := cq93vc.o
 snd-soc-cros-ec-codec-y := cros_ec_codec.o
@@ -475,6 +478,9 @@ obj-$(CONFIG_SND_SOC_AW88399)	+= snd-soc-aw88399.o
 obj-$(CONFIG_SND_SOC_BD28623)	+= snd-soc-bd28623.o
 obj-$(CONFIG_SND_SOC_BT_SCO)	+= snd-soc-bt-sco.o
 obj-$(CONFIG_SND_SOC_CHV3_CODEC) += snd-soc-chv3-codec.o
+obj-$(CONFIG_SND_SOC_CMX655D) += snd-soc-cmx655.o
+obj-$(CONFIG_SND_SOC_CMX655D_I2C) += snd-soc-cmx655-i2c.o
+obj-$(CONFIG_SND_SOC_CMX655D_SPI) += snd-soc-cmx655-spi.o
 obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o
 obj-$(CONFIG_SND_SOC_CPCAP)	+= snd-soc-cpcap.o
 obj-$(CONFIG_SND_SOC_CROS_EC_CODEC)	+= snd-soc-cros-ec-codec.o
sound/soc/codecs/cmx655-i2c.c new file +59 -0

59 lines not on this page · raw message

sound/soc/codecs/cmx655-spi.c new file +59 -0

59 lines not on this page · raw message

sound/soc/codecs/cmx655.c new file +1030 -0

1,030 lines not on this page · raw message

sound/soc/codecs/cmx655.h new file +151 -0

151 lines not on this page · raw message

Signature · 1 line
2.47.2
#2 lore raw

Re: [PATCH 2/2 V5] ASoC: codecs: cmx655: Add CML's CMX655D codec

Quoted 4 lines · Nikola Jelic

---
V4 -> V5: Introduced a module parameter for reset attempts, header fixes

Why this is v5 but other patch is v4?

Entire patchset is versioned, not patches. b4 does it for you. git format-patch -v4 as well.

Best regards,
Krzysztof

#3 lore raw
In reply to Nikola Jelic
Quoted 4 lines · Nikola Jelic

---
V3 -> V4: review remarks

You keep sending the same, not responding to comments and not fixing them. Still nothing improved - same problems as v1.

What above changelog even mean?

Please respond to the feedback, the best to the v1 which you received, that you acknowledge and implement it. If you have questions, then ask. Sending something with the same mistakes for 5th or 6th time means we do not understand each other.

Best regards,
Krzysztof

#4 lore raw
Quoted 9 lines · Krzysztof Kozlowski
Quoted 4 lines · Nikola Jelic

---
V3 -> V4: review remarks

You keep sending the same, not responding to comments and not fixing them. Still nothing improved - same problems as v1.

Quoted 6 lines

What above changelog even mean?

Please respond to the feedback, the best to the v1 which you received, that you acknowledge and implement it. If you have questions, then ask. Sending something with the same mistakes for 5th or 6th time means we do not understand each other.

To recap, feedback from v1 to respond to:

Please run scripts/checkpatch.pl and fix reported warnings. After that, run also scripts/checkpatch.pl --strict and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.

Feedback from v3: go to v3 and respond or implement. Your changelog suggests nothing changed or it is just not precise enough.

Best regards,
Krzysztof

#5 lore raw

PATCH v6 1/2 ASoC: dt-bindings: Add cmx655 codec

The driver is for cmx655d audio codecs from CML Micro. The CMX655D is an ultra-low power voice codec targeted at digital voice and sensor applications.

---

2025-01-25 Nikola Jelic <[email protected]> V1
* /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml: added the device tree binding
* /Documentation/devicetree/bindings/sound/cmx655.txt: added the device tree description file
* /Documentation/devicetree/bindings/vendor-prefixes.yaml: added CML Micro, Ltd. to the vendor prefixes
* /sound/soc/codecs/Kconfig: added SND_SOC_CMX655D and its dependencies
* /sound/soc/codecs/Makefile: added snd-soc-cmx655 and its dependencies
* /sound/soc/codecs/cmx655.c: added the main driver file for the codec
* /sound/soc/codecs/cmx655.h: added the main header file for the codec
* /sound/soc/codecs/cmx655_i2c.c: added the i2c adapter for the codec
* /sound/soc/codecs/cmx655_spi.c: added the spi adapter for the codec

2025-02-03 Nikola Jelic <[email protected]> V2
* mailin-list: added the missing recipients
* mail-header: fixed the subjects of the emails, to align with the norms for the subsystem
* /Documentation/devicetree/bindings/sound/cmx655.txt: removed the file, obsolete now
* /sound/soc/codecs/Kconfig: changed the dependencies between the configuration options
* /sound/soc/codecs/Makefile: renamed i2c and spi files and fixed the dependencies
* /sound/soc/codecs/cmx655.c:
Removed unnecessary comments.
Fixed the comments to conform to the kerneldoc format.
cmx655_volatile_reg: removed unnecessary bool ret variable.
cmx655_regmap: changed cache type to REGCACHE_MAPLE.
Changes symbol exports to the GPL variant.
Changed usage of master/slave to primary/secondary.
Introduced the constraint mechanism for the baud rates.
cmx655_dai_startup: added the function for registering the constraints.
Renamed several controls and widgets to be more verbose and precise. cmx655_common_register_component: moved majority of the registration code from i2c and spi into this function.
* /sound/soc/codecs/cmx655.h:
Removed unnecessary comments.
Fixed the comments to conform to the kerneldoc format.
Introduced the usage of the BIT() macro.
cmx655_common_register_component: changed the function's signature
* /sound/soc/codecs/cmx655-i2c.c:
Renamed the file
Reduced the initialisation code, moved to cmx655.c
* /sound/soc/codecs/cmx655-spi.c:
Renamed the file
Reduced the initialisation code, moved to cmx655.c

2025-02-07 Nikola Jelic <[email protected]> V3
* mail-header: added versioning to the patch series
* mail-body: added a minimalistic changelog for the patch series
* /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml:
Removed '|' from the description field.
Added descriptions to all used properties.
Removed pinctrl-* properties.
Fixed description for the cmx655,classd-oc-reset-attempts property. Added minimum and maximum for the cmx655,classd-oc-reset-attempts property. Fixed the example of usage.
* /sound/soc/codecs/cmx655-i2c.c:
Added a holder variable for the regmap.
Removed gpio toggling during removal.
* /sound/soc/codecs/cmx655-spi.c:
Added a holder variable for the regmap.
Removed gpio toggling during removal.
* /sound/soc/codecs/cmx655.c:
cmx655_start_sys_clk: added newlines after for-loops.
cmx655_get_sys_clk_config: removed brackets around case values.
cmx655_setup_rate: error causes an immediate return, no silent drops anymore. Removed the constraints functions and structures.
cmx655_component_remove: added a newline after variable initialisation.
cmx655_companding: removed "enum" from the name.
cmx655_alc_gain: removed "Gain" from the name.
cmx655_mic_dapm_event: removed brackets around case values.
CMX655_DAPM_MIC: new macro used for the microphone definitions.
cmx655_parse_data_from_of: fixed the name of the custom property. cmx655_common_unregister_component: added gpio toggling.
* /sound/soc/codecs/cmx655.c:
CMX655_DAPM_MIC: new macro introduced.

2025-02-10 Nikola Jelic <[email protected]> V4
* mail-header: capital 'V' for the patch series version
* /sound/soc/codecs/cmx655-i2c.c: removed version.h header.
* /sound/soc/codecs/cmx655-spi.c: removed version.h header.
* /sound/soc/codecs/cmx655.c:
Removed version.h heaer.
cmx655_get_sys_clk_config: fixed logical to bitwise 'or'.
cmx655_mic_dapm_event: fixed reg_val checking.

2025-02-14 Nikola Jelic <[email protected]> V5
* /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml:
"compatible" changed to const.
Removed unnecessary descriptions of properties. cml,classd-oc-reset-attempts: removed altogether.
Removed "status" from the example.
Fixed the order of the properties in the example.
* /sound/soc/codecs/cmx655.c:
Moved reset_attempts to the module parameter.
cmx655_irq_thread: uses the module parameter now.
cmx655_parse_data_from_of: removed. cmx655_common_register_component: doesn't invoke cmx655_parse_data_from_of anymore.
* /sound/soc/codecs/cmx655.h:
CMX655_DAPM_MIC: fixed formatting issues.
cmx655_data: removed oc_cnt_max field.

2025-03-21 Nikola Jelic <[email protected]> V6
* branch: rebased to next-20250321 tag
* mail-body:
Much more verbose changelog.
Fixed inconsistency between changelogs in two patches. Added "in-reply-to".
* MAINTAINERS: added the "CML CODEC DRIVER" entry
* /sound/soc/codecs/Kconfig:
Fixed a typo in the SND_SOC_ALL_CODECS imply section. Added "help" sections to the added configuration options.

---
 .../bindings/sound/cml,cmx655d.yaml           | 62 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  2 +
 MAINTAINERS                                   |  7 +++
 3 files changed, 71 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/cml,cmx655d.yaml
Documentation/devicetree/bindings/sound/cml,cmx655d.yaml new file +62 -0
new file mode 100644
index 000000000000..577e1d4942c6
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/cml,cmx655d.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CML Micro CMX655D codec
+
+maintainers:
+  - Richard Walton <[email protected]>
+  - Nikola Jelic <[email protected]>
+
+description:
+  The CMX655D is an ultra-low power voice codec.
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: cml,cmx655d
+
+  reg:
+    maxItems: 1
+
+  "#sound-dai-cells":
+    const: 0
+
+  reset-gpios:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    const: cmx-irq
+
+required:
+  - compatible
+  - reg
+  - '#sound-dai-cells'
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        audio-codec@54 {
+            compatible = "cml,cmx655d";
+            reg = <0x54>;
+            #sound-dai-cells = <0>;
+            reset-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+            interrupt-parent = <&gpio>;
+            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+        };
+
+    };
+...
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 86f6a19b28ae..49ea70169b1b 100644
@@ -310,6 +310,8 @@ patternProperties:
     description: Carl Cloos Schweisstechnik GmbH.
   "^cloudengines,.*":
     description: Cloud Engines, Inc.
+  "^cml,.*":
+    description: CML Micro, Ltd.
   "^cnm,.*":
     description: Chips&Media, Inc.
   "^cnxt,.*":
MAINTAINERS +7 -0
index cc6536141bb3..9d4b1bdb4456 100644
@@ -5801,6 +5801,13 @@ C:	irc://irc.oftc.net/bcache
 F:	include/linux/closure.h
 F:	lib/closure.c
 
+CML CODEC DRIVER
+M:	Nikola Jelic <[email protected]>
+M:	Richard Walton <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/sound/cml,cmx655d.yaml
+
 CMPC ACPI DRIVER
 M:	Thadeu Lima de Souza Cascardo <[email protected]>
 L:	[email protected]
Signature · 1 line
2.47.2
#6 lore raw

PATCH v6 2/2 ASoC: codecs: cmx655: Add CML's CMX655D codec

The driver is for cmx655d audio codecs from CML Micro. The CMX655D is an ultra-low power voice codec targeted at digital voice and sensor applications.

---

2025-01-25 Nikola Jelic <[email protected]> V1
* /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml: added the device tree binding
* /Documentation/devicetree/bindings/sound/cmx655.txt: added the device tree description file
* /Documentation/devicetree/bindings/vendor-prefixes.yaml: added CML Micro, Ltd. to the vendor prefixes
* /sound/soc/codecs/Kconfig: added SND_SOC_CMX655D and its dependencies
* /sound/soc/codecs/Makefile: added snd-soc-cmx655 and its dependencies
* /sound/soc/codecs/cmx655.c: added the main driver file for the codec
* /sound/soc/codecs/cmx655.h: added the main header file for the codec
* /sound/soc/codecs/cmx655_i2c.c: added the i2c adapter for the codec
* /sound/soc/codecs/cmx655_spi.c: added the spi adapter for the codec

2025-02-03 Nikola Jelic <[email protected]> V2
* mailin-list: added the missing recipients
* mail-header: fixed the subjects of the emails, to align with the norms for the subsystem
* /Documentation/devicetree/bindings/sound/cmx655.txt: removed the file, obsolete now
* /sound/soc/codecs/Kconfig: changed the dependencies between the configuration options
* /sound/soc/codecs/Makefile: renamed i2c and spi files and fixed the dependencies
* /sound/soc/codecs/cmx655.c:
Removed unnecessary comments.
Fixed the comments to conform to the kerneldoc format.
cmx655_volatile_reg: removed unnecessary bool ret variable.
cmx655_regmap: changed cache type to REGCACHE_MAPLE.
Changes symbol exports to the GPL variant.
Changed usage of master/slave to primary/secondary.
Introduced the constraint mechanism for the baud rates.
cmx655_dai_startup: added the function for registering the constraints.
Renamed several controls and widgets to be more verbose and precise. cmx655_common_register_component: moved majority of the registration code from i2c and spi into this function.
* /sound/soc/codecs/cmx655.h:
Removed unnecessary comments.
Fixed the comments to conform to the kerneldoc format.
Introduced the usage of the BIT() macro.
cmx655_common_register_component: changed the function's signature
* /sound/soc/codecs/cmx655-i2c.c:
Renamed the file
Reduced the initialisation code, moved to cmx655.c
* /sound/soc/codecs/cmx655-spi.c:
Renamed the file
Reduced the initialisation code, moved to cmx655.c

2025-02-07 Nikola Jelic <[email protected]> V3
* mail-header: added versioning to the patch series
* mail-body: added a minimalistic changelog for the patch series
* /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml:
Removed '|' from the description field.
Added descriptions to all used properties.
Removed pinctrl-* properties.
Fixed description for the cmx655,classd-oc-reset-attempts property. Added minimum and maximum for the cmx655,classd-oc-reset-attempts property. Fixed the example of usage.
* /sound/soc/codecs/cmx655-i2c.c:
Added a holder variable for the regmap.
Removed gpio toggling during removal.
* /sound/soc/codecs/cmx655-spi.c:
Added a holder variable for the regmap.
Removed gpio toggling during removal.
* /sound/soc/codecs/cmx655.c:
cmx655_start_sys_clk: added newlines after for-loops.
cmx655_get_sys_clk_config: removed brackets around case values.
cmx655_setup_rate: error causes an immediate return, no silent drops anymore. Removed the constraints functions and structures.
cmx655_component_remove: added a newline after variable initialisation.
cmx655_companding: removed "enum" from the name.
cmx655_alc_gain: removed "Gain" from the name.
cmx655_mic_dapm_event: removed brackets around case values.
CMX655_DAPM_MIC: new macro used for the microphone definitions.
cmx655_parse_data_from_of: fixed the name of the custom property. cmx655_common_unregister_component: added gpio toggling.
* /sound/soc/codecs/cmx655.c:
CMX655_DAPM_MIC: new macro introduced.

2025-02-10 Nikola Jelic <[email protected]> V4
* mail-header: capital 'V' for the patch series version
* /sound/soc/codecs/cmx655-i2c.c: removed version.h header.
* /sound/soc/codecs/cmx655-spi.c: removed version.h header.
* /sound/soc/codecs/cmx655.c:
Removed version.h header.
cmx655_get_sys_clk_config: fixed logical to bitwise 'or'.
cmx655_mic_dapm_event: fixed reg_val checking.

2025-02-14 Nikola Jelic <[email protected]> V5
* /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml:
"compatible" changed to const.
Removed unnecessary descriptions of properties. cml,classd-oc-reset-attempts: removed altogether.
Removed "status" from the example.
Fixed the order of the properties in the example.
* /sound/soc/codecs/cmx655.c:
Moved reset_attempts to the module parameter.
cmx655_irq_thread: uses the module parameter now.
cmx655_parse_data_from_of: removed. cmx655_common_register_component: doesn't invoke cmx655_parse_data_from_of anymore.
* /sound/soc/codecs/cmx655.h:
CMX655_DAPM_MIC: fixed formatting issues.
cmx655_data: removed oc_cnt_max field.

2025-03-21 Nikola Jelic <[email protected]> V6
* branch: rebased to next-20250321 tag
* mail-body:
Much more verbose changelog.
Fixed inconsistency between changelogs in two patches. Added "in-reply-to".
* MAINTAINERS: added the "CML CODEC DRIVER" entry
* /sound/soc/codecs/Kconfig:
Fixed a typo in the SND_SOC_ALL_CODECS imply section. Added "help" sections to the added configuration options.

---
 MAINTAINERS                   |    1 +
 sound/soc/codecs/Kconfig      |   28 +
 sound/soc/codecs/Makefile     |    6 +
 sound/soc/codecs/cmx655-i2c.c |   59 ++
 sound/soc/codecs/cmx655-spi.c |   59 ++
 sound/soc/codecs/cmx655.c     | 1030 +++++++++++++++++++++++++++++++++
 sound/soc/codecs/cmx655.h     |  151 +++++
 7 files changed, 1334 insertions(+)
 create mode 100644 sound/soc/codecs/cmx655-i2c.c
 create mode 100644 sound/soc/codecs/cmx655-spi.c
 create mode 100644 sound/soc/codecs/cmx655.c
 create mode 100644 sound/soc/codecs/cmx655.h
MAINTAINERS +1 -0
index 9d4b1bdb4456..7eddd860c671 100644
@@ -5807,6 +5807,7 @@ M:	Richard Walton <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/sound/cml,cmx655d.yaml
+F:	sound/soc/codecs/cmx655d*
 
 CMPC ACPI DRIVER
 M:	Thadeu Lima de Souza Cascardo <[email protected]>
sound/soc/codecs/Kconfig +28 -0
index 40bb7a1d44bc..0557ad52e581 100644
@@ -64,6 +64,7 @@ config SND_SOC_ALL_CODECS
 	imply SND_SOC_BT_SCO
 	imply SND_SOC_BD28623
 	imply SND_SOC_CHV3_CODEC
+	imply SND_SOC_CMX655D
 	imply SND_SOC_CQ0093VC
 	imply SND_SOC_CROS_EC_CODEC
 	imply SND_SOC_CS35L32
@@ -760,6 +761,33 @@ config SND_SOC_CPCAP
 	tristate "Motorola CPCAP codec"
 	depends on MFD_CPCAP || COMPILE_TEST
 
+config SND_SOC_CMX655D
+	tristate
+
+config SND_SOC_CMX655D_I2C
+       tristate "CMX655D codec (I2C)"
+       depends on I2C
+       select SND_SOC_CMX655D
+       select REGMAP_I2C
+       help
+         Enables support for the CMX655D low-power voice codec with I2C control.
+	 It supports up to two MEMS microphones and one Class-D speaker via I2S.
+
+	 To compile this driver as a module, choose M here: the module
+	 will be called snd-soc-cmx655-i2c.
+
+config SND_SOC_CMX655D_SPI
+       tristate "CMX655D codec (SPI)"
+       depends on SPI
+       select SND_SOC_CMX655D
+       select REGMAP_SPI
+       help
+         Enables support for the CMX655D low-power voice codec with SPI control.
+	 It supports up to two MEMS microphones and one Class-D speaker via I2S.
+
+	 To compile this driver as a module, choose M here: the module
+	 will be called snd-soc-cmx655-spi.
+
 config SND_SOC_CQ0093VC
 	tristate
 
sound/soc/codecs/Makefile +6 -0
index 10f726066b6c..c9e33bff98ff 100644
@@ -59,6 +59,9 @@ snd-soc-aw88399-y := aw88399.o
 snd-soc-bd28623-y := bd28623.o
 snd-soc-bt-sco-y := bt-sco.o
 snd-soc-chv3-codec-y := chv3-codec.o
+snd-soc-cmx655-y := cmx655.o
+snd-soc-cmx655-i2c-y := cmx655-i2c.o
+snd-soc-cmx655-spi-y := cmx655-spi.o
 snd-soc-cpcap-y := cpcap.o
 snd-soc-cq93vc-y := cq93vc.o
 snd-soc-cros-ec-codec-y := cros_ec_codec.o
@@ -477,6 +480,9 @@ obj-$(CONFIG_SND_SOC_AW88399)	+= snd-soc-aw88399.o
 obj-$(CONFIG_SND_SOC_BD28623)	+= snd-soc-bd28623.o
 obj-$(CONFIG_SND_SOC_BT_SCO)	+= snd-soc-bt-sco.o
 obj-$(CONFIG_SND_SOC_CHV3_CODEC) += snd-soc-chv3-codec.o
+obj-$(CONFIG_SND_SOC_CMX655D) += snd-soc-cmx655.o
+obj-$(CONFIG_SND_SOC_CMX655D_I2C) += snd-soc-cmx655-i2c.o
+obj-$(CONFIG_SND_SOC_CMX655D_SPI) += snd-soc-cmx655-spi.o
 obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o
 obj-$(CONFIG_SND_SOC_CPCAP)	+= snd-soc-cpcap.o
 obj-$(CONFIG_SND_SOC_CROS_EC_CODEC)	+= snd-soc-cros-ec-codec.o
sound/soc/codecs/cmx655-i2c.c new file +59 -0

59 lines not on this page · raw message

sound/soc/codecs/cmx655-spi.c new file +59 -0

59 lines not on this page · raw message

sound/soc/codecs/cmx655.c new file +1030 -0

1,030 lines not on this page · raw message

sound/soc/codecs/cmx655.h new file +151 -0

151 lines not on this page · raw message

Signature · 1 line
2.47.2
#7 lore raw
In reply to Nikola Jelic
Quoted 1 line · Nikola Jelic

The driver is for cmx655d audio codecs from CML Micro. The CMX655D is an

This is not a driver, but binding. Drop the first sentence.

Quoted 6 lines

ultra-low power voice codec targeted at digital voice and sensor applications.

---

Do not attach (thread) your patchsets to some other threads (unrelated or older versions). This buries them deep in the mailbox and might interfere with applying entire sets.

Quoted 7 lines

2025-01-25 Nikola Jelic <[email protected]> V1
* /Documentation/devicetree/bindings/sound/cml,cmx655d.yaml: added the device tree binding
* /Documentation/devicetree/bindings/sound/cmx655.txt: added the device tree description file
* /Documentation/devicetree/bindings/vendor-prefixes.yaml: added CML Micro, Ltd. to the vendor prefixes

Quoted 6 lines

* /sound/soc/codecs/Kconfig: added SND_SOC_CMX655D and its dependencies
* /sound/soc/codecs/Makefile: added snd-soc-cmx655 and its dependencies
* /sound/soc/codecs/cmx655.c: added the main driver file for the codec
* /sound/soc/codecs/cmx655.h: added the main header file for the codec
* /sound/soc/codecs/cmx655_i2c.c: added the i2c adapter for the codec
* /sound/soc/codecs/cmx655_spi.c: added the spi adapter for the codec

How are these related to this patch? Per-patch changelog is supposed to have only per-patch changes.

...

Quoted 12 lines
 .../bindings/sound/cml,cmx655d.yaml           | 62 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  2 +
 MAINTAINERS                                   |  7 +++
 3 files changed, 71 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/cml,cmx655d.yaml
Documentation/devicetree/bindings/sound/cml,cmx655d.yaml new file +0 -0
new file mode 100644
index 000000000000..577e1d4942c6

Documentation/devicetree/bindings/sound/cml,cmx655d.yaml line 10

Quoted 10 lines
Documentation/devicetree/bindings/sound/cml,cmx655d.yaml new file +10 -0
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/cml,cmx655d.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CML Micro CMX655D codec
+
+maintainers:
+  - Richard Walton <[email protected]>

Some ack on taking maintainer duties would be useful.

Quoted 16 lines
Documentation/devicetree/bindings/sound/cml,cmx655d.yaml new file +16 -0
+  - Nikola Jelic <[email protected]>
+
+description:
+  The CMX655D is an ultra-low power voice codec.
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: cml,cmx655d
+
+  reg:
+    maxItems: 1
+
+  "#sound-dai-cells":

Documentation/devicetree/bindings/sound/cml,cmx655d.yaml line 36

Quoted 10 lines
Documentation/devicetree/bindings/sound/cml,cmx655d.yaml new file +10 -0
+    const: 0
+
+  reset-gpios:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    const: cmx-irq

The name equal to device name is not really usefull. Drop interrupt-names from binding and DTS.

Quoted 14 lines
Documentation/devicetree/bindings/sound/cml,cmx655d.yaml new file +14 -0
+
+required:
+  - compatible
+  - reg
+  - '#sound-dai-cells'
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;

Documentation/devicetree/bindings/sound/cml,cmx655d.yaml line 60

Quoted 10 lines
Documentation/devicetree/bindings/sound/cml,cmx655d.yaml new file +10 -0
+        #size-cells = <0>;
+        audio-codec@54 {
+            compatible = "cml,cmx655d";
+            reg = <0x54>;
+            #sound-dai-cells = <0>;
+            reset-gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
+            interrupt-parent = <&gpio>;
+            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+        };
+

Drop stray blank line.

Best regards,
Krzysztof