[PATCH v1 3/6] ASoC: dt-bindings: rk3308-codec: describe ADC routing and jack detection
From: Xing Zheng
Date: Sun Nov 01 2026 - 00:04:42 EST
Describe the internal ADC stereo-group mapping to I2S2 SDI inputs and
constrain it to a permutation of the four hardware groups.
Document the detection GRF, codec and headphone interrupts, and the
board-specific detection wiring for codec revisions B and C. Keep these
resources optional for existing device trees.
Signed-off-by: Xing Zheng <zhengxing@xxxxxxxxxxxxxx>
---
.../bindings/sound/rockchip,rk3308-codec.yaml | 54 +++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml b/Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml
index 2cf229a076f0..68859c64b72b 100644
--- a/Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml
+++ b/Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml
@@ -36,6 +36,46 @@ properties:
description:
Phandle to the General Register Files (GRF)
+ rockchip,detect-grf:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the detection GRF used for headphone insertion and
+ removal interrupts on codec revisions B and C.
+
+ interrupts:
+ items:
+ - description: Codec interrupt
+ - description: Detection GRF headphone interrupt for revisions B and C
+
+ interrupt-names:
+ items:
+ - const: codec
+ - const: hpdet
+
+ rockchip,no-hp-det:
+ type: boolean
+ description: The internal headphone detection input is not connected.
+
+ rockchip,hp-jack-reversed:
+ type: boolean
+ description: The headphone detection input has inverted insertion polarity.
+
+ rockchip,adc-grps-route:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: |
+ ADC stereo-group mapping to the four I2S2 SDI inputs. Each entry
+ selects the ADC group connected to the corresponding SDI input,
+ in SDI0 through SDI3 order. Group IDs 0 through 3 represent
+ MIC1/MIC2, MIC3/MIC4, MIC5/MIC6 and MIC7/MIC8 respectively.
+ All four groups must appear exactly once. For example, <1 2 3 0>
+ connects groups 1, 2, 3 and 0 to SDI0, SDI1, SDI2 and SDI3.
+ If omitted, the GRF routing is left unchanged.
+ minItems: 4
+ maxItems: 4
+ uniqueItems: true
+ items:
+ enum: [ 0, 1, 2, 3 ]
+
clocks:
items:
- description: clock for TX
@@ -72,6 +112,14 @@ properties:
enum: [ 50, 55, 60, 65, 70, 75, 80, 85 ]
+dependentRequired:
+ rockchip,detect-grf:
+ - interrupts
+ interrupt-names:
+ - interrupts
+ rockchip,hp-jack-reversed:
+ - rockchip,detect-grf
+
required:
- compatible
- reg
@@ -85,11 +133,17 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/clock/rk3308-cru.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
audio_codec: audio-codec@ff560000 {
compatible = "rockchip,rk3308-codec";
reg = <0xff560000 0x10000>;
rockchip,grf = <&grf>;
+ rockchip,detect-grf = <&detect_grf>;
+ interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "codec", "hpdet";
+ rockchip,adc-grps-route = <1 2 3 0>;
clock-names = "mclk_tx", "mclk_rx", "hclk";
clocks = <&cru SCLK_I2S2_8CH_TX_OUT>,
<&cru SCLK_I2S2_8CH_RX_OUT>,