[PATCH v2 3/7] ASoC: dt-bindings: add TDM slot idle mode properties

James Calligeros
2025-12-21T09:36:50Z

Add properties to describe TDM slot idle behaviour. These properties can
be used to describe how a DAI is supposed to behave when not active.

For example, Apple Silicon laptops split a single I2S bus between two
physical lines which are combined at an OR gate in front of the
receiving port. One codec on each line is expected to transmit zeroes
during the active TDM slots of the opposite line, or we will have corrupted
data at the receiver.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
---
.../bindings/sound/tdm-slot.yaml | 33 +++++++++++++++++++++++++
1 file changed, 33 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/tdm-slot.yaml b/Documentation/devicetree/bindings/sound/tdm-slot.yaml
index 5bc46048d689..e8b2d35a7c37 100644
--- a/Documentation/devicetree/bindings/sound/tdm-slot.yaml
+++ b/Documentation/devicetree/bindings/sound/tdm-slot.yaml
@@ -33,6 +33,17 @@ $defs:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Receive direction slot mask. Optional. Identical to TX mask.

+ dai-tdm-idle-mode:
+ $ref: /schemas/types.yaml#/definitions/string
+ enum:
+ - none
+ - off
+ - zero
+ - pulldown
+ - hiz
+ - pullup
+ - drivehigh
+
properties:
dai-tdm-slot-num:
$ref: "#/$defs/dai-tdm-slot-num"
@@ -46,4 +57,26 @@ properties:
dai-tdm-slot-rx-mask:
$ref: "#/$defs/dai-tdm-slot-rx-mask"

+ dai-tdm-slot-tx-idle-mode:
+ $ref: "#/$defs/dai-tdm-idle-mode"
+ description: Transmit direction idle slot mode. Optional. For hardware
+ that can configure its behaviour during idle TDM slots via
+ .set_tdm_idle(). "None" represents UB/unspecified behaviour and is the
+ same as not setting this property.
+
+ dai-tdm-slot-rx-idle-mode:
+ $ref: "#/$defs/dai-tdm-idle-mode"
+ description: Receive direction idle slot mode. Optional. Identical to TX
+ idle slot mode.
+
+ dai-tdm-slot-tx-idle-mask:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Transmit direction idle slot mask. Optional. 1 represents
+ an idle slot.
+
+ dai-tdm-slot-rx-idle-mask:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Receive direction idle slot mask. Optional. Identical to
+ TX mask.
+
additionalProperties: true

--
2.52.0