Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2274281rdb; Wed, 21 Feb 2024 02:32:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVwNZT0F+iFALK3J85I2cgapgDzjYFLD3lpej2dVCEgBwLK1O7iKSjzUjaA2v/WfLEIWK0XyK2hZJ0/vQcY4brxOwCt5f4vOaGX1ku99Q== X-Google-Smtp-Source: AGHT+IE/0d/dqoc+NnM0l+2oOkyXhwkfgml1KuNHYriNzocMr9EqPuSTOtTZkhygnoKcUWFrqemC X-Received: by 2002:a17:902:6502:b0:1db:65a3:e17f with SMTP id b2-20020a170902650200b001db65a3e17fmr15585205plk.6.1708511541788; Wed, 21 Feb 2024 02:32:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708511541; cv=pass; d=google.com; s=arc-20160816; b=eemydic5QmJdx5Nw/tWMkI8t3RY54hQCv+QBg6WzxqROHsrzlBxKBAfELK5gxVqHl7 WbcmK6V5KBOJEdYOD6tvz6sW3KdJpqa5lZuDd36RSmItGCnjnOL/wzsu4zHVYxEFTfeo /jA7T9KPLxT4vtlgmi7lqe1lfbGgAy7wWJJBprO1eblvieqPBMTGkhq8ktfVN4759Y6q YZphuG4HYqpiiNJpQhl6YNJclkiURJAf5e5T6h2noLlw1uOejaPQ9QPaPyoumzeuf0E1 6KM6V+m/8mi0OCGp7rlU3ULobWojoSqRauzUeP4MheahClqzaOPeYTwlwPguq99EerKJ 3BeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=dDoynNu1VkjhDETvyNw0Qy9EjQXXU4BgD5Avde40d1Q=; fh=YBpXnBz4z5WTNuRpmEjjmJAYZAysFFiStO3A7cE8DhM=; b=vlB4SRhynWGzQJ6OETaGXKSJD5GDaAAdvr3jgNoutOSwNTDOANhsD6FgD/ur93rHMh /eCOJ7gNOCtRyHNFAH3RzmJ7de1s0cAGFv1Tn/YQksOG+/Ur8nb7B/1dU/JFeMF3DRUl 4ug6TUAvZv9ctNIFOYFrBwkERXxswxtCVwmROlkPeOMPRZPnK3WPIQrlGYRHzBXTi9kn 770HI1xijpDf/oJbDgh490fmebGT2vOmoXL+pQbbU0GR3vSnm3UV9fEzfLNVxN6/7V21 /4j1yNQEf+Tftjc7x3SUI5DD7QbUjbTKAFvHayeFEDP2wn4WR83LdjeS2zS0T2TmM526 tgrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=og6x6a7d; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-74519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jb19-20020a170903259300b001d8e7df68d9si7636515plb.465.2024.02.21.02.32.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 02:32:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=og6x6a7d; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-74519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C3DE62884B8 for ; Wed, 21 Feb 2024 10:23:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 975353DB9B; Wed, 21 Feb 2024 10:23:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="og6x6a7d" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A3F03D96B; Wed, 21 Feb 2024 10:23:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708510994; cv=none; b=OXxjN0+SMit/6Hch7QtmnLhWf0t/o+pUSi/EGdsv+Bfe7gd16vw87db0KMEfAMJ35I73w/quVDuPjHhJI+H7+876f3UwsmbpyRzS80mn4/YbFvizRzTpXwpQDlU1qDS7S/VkbtN8zGvm7vgEc7LHuvVBbJEbEbJGPzWq5OSMwB8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708510994; c=relaxed/simple; bh=1MQdjYak1V6zAqHUzUmAhT/V/GwYszErhypfdhCS1hE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ukv6pUcmN80knf/zIuU5ib1I44fd1Qkx7x/3Ee442AH/eAfrSRq8LuqYMwCzcBYdb6SZ9FTJHRzJCHhMFFVbe9FyjQhBhjs19gMVKnJWvti6mDbhI7bmlmVsJwBK+2SAOIFB0VpfVmZci8LVZ4O8/99OICldwQQP7hlhPPUztJw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=og6x6a7d; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 1169B24000A; Wed, 21 Feb 2024 10:23:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708510990; 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=dDoynNu1VkjhDETvyNw0Qy9EjQXXU4BgD5Avde40d1Q=; b=og6x6a7dtHjM95+Fj6PUbx90nsRaFZGvUhjDRQnxZc22SVX79WwYM6ICrDO6GyoUSt3HZj TI0hU9ugs1hLOJQ0FD1k+BJX/zJklGa5oLZS8Ri/2NCDeqVLRi5yYxO3KHYSw7KZIXmNBR KbztdQhzPOtoObgda8Ga3zREyqA/b+d2l77exvFv0mWdFmUaUNBYpUgi0OaPcqOc8Jfa5m a6Xi7I3h0Q4+/E2m3HTBaKPAZgY7JO8DO+aOkLhuRqTualOl022CA7BR5njk5tuQHAyvWh aO4zajofKKdMq5iG0BSLOkU8b6wqj6BBYh9ThuypUxXEkA34VfeCbP8TE40kbQ== From: Luca Ceresoli Date: Wed, 21 Feb 2024 11:22:46 +0100 Subject: [PATCH v3 2/7] ASoC: dt-bindings: Add Rockchip RK3308 internal audio codec Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240221-rk3308-audio-codec-v3-2-dfa34abfcef6@bootlin.com> References: <20240221-rk3308-audio-codec-v3-0-dfa34abfcef6@bootlin.com> In-Reply-To: <20240221-rk3308-audio-codec-v3-0-dfa34abfcef6@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 Add device tree bindings document for the internal audio codec of the Rockchip RK3308 SoC. Signed-off-by: Luca Ceresoli --- Changed in v3: - fix underscore in DT label 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..ecf3d7d968c8 --- /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 9ed4d3868539..b67835da3994 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18924,6 +18924,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 -- 2.34.1