From patchwork Tue Dec 19 14:54:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13498406 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B224C41535 for ; Tue, 19 Dec 2023 14:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GbxTK2xeB3NLBTmd0qCXoC9DjAKRoZ9zHGsi8A+yGL0=; b=xsQXmwfx7jgpBB RkGgSnyDBjbGvNqXVyQF1JRMREcz7qA+gsegUlY39sRFNG8l73M5vMkAQ6Yzek4c9LAvpkfcUbk7y F/TeJB5kAvRpcSYLqMeurAPd+s3Dz7M084aW5aTJOklWIC3aFPg0Ra19DsniZcx8J1ycWLUjMmAyH He5bAWMdi+8V7gRAvQBWeovBbfVckwVN1TI1RgCdys0kYc1dB6/CxzjUVY80RbmmP7y91ebx5wtnn CRAloMNns0i/uktX+lGtUf5jcouF95ZPcsw731HQHpazyVYmtKW6/NeqIsu3xnfX926rh9eAXcqM+ QyeEczhaDFiz9xgq06yA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFbUt-00ERro-1s; Tue, 19 Dec 2023 14:55:03 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFbUh-00ERio-0q; Tue, 19 Dec 2023 14:54:53 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 3812040009; Tue, 19 Dec 2023 14:54:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702997688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jzW2JR3KUHEBRvbUZ7SjMZvoo6agNjWiHJ41yASPvJk=; b=aJcqxiuMtphsbOJDgOQgGXFv9oXj1R2pBkky5UQf5hja8CM7txnmYwBGBAI4XbP6V8qRdY C77Pw6F0VhT10q5DHM9T8rvGWJV4ASEOFfbFcxLIVcJAN/UiHDI8RDS4qN3+UduXYlF9B1 h7JfwmshDbJaW4WkgSUKCw/igEfeWCQX78BQk+X3PpL0uGha65K9Kn7NT8R5y6hyCSfsGG A2xUjiarZhJxQIj/SlYXGOu/xQlq0eL0R8eSCfLlqf3NXMgVUrvjCdARUw/B4VOGLzdKgt 1fYRymmyrTM3skVhJB9ztnByhaeDFHJoRHXxCeLCaNQF18WApSdQdyu71IfbAA== From: Luca Ceresoli Date: Tue, 19 Dec 2023 15:54:17 +0100 Subject: [PATCH v2 2/6] ASoC: dt-bindings: Add Rockchip RK3308 internal audio codec MIME-Version: 1.0 Message-Id: <20231219-rk3308-audio-codec-v2-2-c70d06021946@bootlin.com> References: <20231219-rk3308-audio-codec-v2-0-c70d06021946@bootlin.com> In-Reply-To: <20231219-rk3308-audio-codec-v2-0-c70d06021946@bootlin.com> To: Nicolas Frattaroli , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel Cc: Thomas Petazzoni , linux-rockchip@lists.infradead.org, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.12.4 X-GND-Sasl: luca.ceresoli@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231219_065451_561862_D9F728D4 X-CRM114-Status: GOOD ( 17.78 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Add device tree bindings document for the internal audio codec of the Rockchip RK3308 SoC. Signed-off-by: Luca Ceresoli --- Changed in v2: - reword commit title - add maxItems to resets - remove quotes from reset-names - use percent values for rockchip,micbias-avdd-multiplier - use name compliant to the docs in the example --- .../bindings/sound/rockchip,rk3308-codec.yaml | 98 ++++++++++++++++++++++ MAINTAINERS | 5 ++ 2 files changed, 103 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml b/Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml new file mode 100644 index 000000000000..27a9e5bcfa58 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml @@ -0,0 +1,98 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/rockchip,rk3308-codec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip RK3308 Internal Codec + +description: | + This is the audio codec embedded in the Rockchip RK3308 + SoC. It has 8 24-bit ADCs and 2 24-bit DACs. The maximum supported + sampling rate is 192 kHz. + + It is connected internally to one out of a selection of the internal I2S + controllers. + + The RK3308 audio codec has 8 independent capture channels, but some + features work on stereo pairs called groups: + * grp 0 -- MIC1 / MIC2 + * grp 1 -- MIC3 / MIC4 + * grp 2 -- MIC5 / MIC6 + * grp 3 -- MIC7 / MIC8 + +maintainers: + - Luca Ceresoli + +properties: + compatible: + const: rockchip,rk3308-codec + + reg: + maxItems: 1 + + rockchip,grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the General Register Files (GRF) + + clocks: + items: + - description: clock for TX + - description: clock for RX + - description: AHB clock driving the interface + + clock-names: + items: + - const: mclk_tx + - const: mclk_rx + - const: hclk + + resets: + maxItems: 1 + + reset-names: + items: + - const: codec + + "#sound-dai-cells": + const: 0 + + rockchip,micbias-avdd-percent: + description: | + Voltage setting for the MICBIAS pins expressed as a percentage of + AVDD. + + E.g. if rockchip,micbias-avdd-percent = 85 and AVDD = 3v3, then the + MIC BIAS voltage will be 3.3 V * 85% = 2.805 V. + + enum: [ 50, 55, 60, 65, 70, 75, 80, 85 ] + +required: + - compatible + - reg + - rockchip,grf + - clocks + - resets + - "#sound-dai-cells" + +additionalProperties: false + +examples: + - | + #include + + audio-codec: audio-codec@ff560000 { + compatible = "rockchip,rk3308-codec"; + reg = <0xff560000 0x10000>; + rockchip,grf = <&grf>; + clock-names = "mclk_tx", "mclk_rx", "hclk"; + clocks = <&cru SCLK_I2S2_8CH_TX_OUT>, + <&cru SCLK_I2S2_8CH_RX_OUT>, + <&cru PCLK_ACODEC>; + reset-names = "codec"; + resets = <&cru SRST_ACODEC_P>; + #sound-dai-cells = <0>; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 9104430e148e..feddd6610b51 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18669,6 +18669,11 @@ S: Maintained F: Documentation/devicetree/bindings/media/rockchip-rga.yaml F: drivers/media/platform/rockchip/rga/ +ROCKCHIP RK3308 INTERNAL AUDIO CODEC +M: Luca Ceresoli +S: Maintained +F: Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml + ROCKCHIP VIDEO DECODER DRIVER M: Ezequiel Garcia L: linux-media@vger.kernel.org