From patchwork Tue Jun 23 12:47:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuhiro Suzuki X-Patchwork-Id: 11620665 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 71F8290 for ; Tue, 23 Jun 2020 12:49:12 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 089AD20774 for ; Tue, 23 Jun 2020 12:49:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="CjUFTmMB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 089AD20774 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=katsuster.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7DBE817DE; Tue, 23 Jun 2020 14:48:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7DBE817DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592916550; bh=eueGRvvDOy1WOVlw2JL5/lc48TRJH7FrBa0ahDjl0uE=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=CjUFTmMBwqe8jy5S1onosz2RV6J+rGN41O/POq9tCjaS3DU5MXj+0WEbNgnJ4Khpi CtOQCUyBgfDnKAuWDDZj2b5onXTdj62jo86l1BtBtWhkJrLiMf96Hien8ZRy8tw1it ZOIhL2IjH98XYGAER5Qks/+NoS0R9e3PBLvG/3vM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1A92BF8012F; Tue, 23 Jun 2020 14:48:22 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8D8BFF80234; Tue, 23 Jun 2020 14:48:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from www1102.sakura.ne.jp (www1102.sakura.ne.jp [219.94.129.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E17C5F8010E for ; Tue, 23 Jun 2020 14:48:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E17C5F8010E Received: from fsav107.sakura.ne.jp (fsav107.sakura.ne.jp [27.133.134.234]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 05NClfLP068785; Tue, 23 Jun 2020 21:47:41 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav107.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav107.sakura.ne.jp); Tue, 23 Jun 2020 21:47:41 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav107.sakura.ne.jp) Received: from localhost.localdomain (121.252.232.153.ap.dti.ne.jp [153.232.252.121]) (authenticated bits=0) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 05NClbP5068743 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Jun 2020 21:47:41 +0900 (JST) (envelope-from katsuhiro@katsuster.net) From: Katsuhiro Suzuki To: Rob Herring , devicetree@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: sound: convert rk3328 codec binding to yaml Date: Tue, 23 Jun 2020 21:47:33 +0900 Message-Id: <20200623124734.1736470-1-katsuhiro@katsuster.net> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Cc: Katsuhiro Suzuki , linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, Heiko Stuebner , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Just convert Rockchip rk3328 audio codec binding to DT schema. Signed-off-by: Katsuhiro Suzuki --- .../bindings/sound/rockchip,rk3328-codec.txt | 28 --------- .../bindings/sound/rockchip,rk3328-codec.yaml | 61 +++++++++++++++++++ 2 files changed, 61 insertions(+), 28 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt deleted file mode 100644 index 1ecd75d2032a..000000000000 --- a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.txt +++ /dev/null @@ -1,28 +0,0 @@ -* Rockchip Rk3328 internal codec - -Required properties: - -- compatible: "rockchip,rk3328-codec" -- reg: physical base address of the controller and length of memory mapped - region. -- rockchip,grf: the phandle of the syscon node for GRF register. -- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. -- clock-names: should be "pclk". -- spk-depop-time-ms: speak depop time msec. - -Optional properties: - -- mute-gpios: GPIO specifier for external line driver control (typically the - dedicated GPIO_MUTE pin) - -Example for rk3328 internal codec: - -codec: codec@ff410000 { - compatible = "rockchip,rk3328-codec"; - reg = <0x0 0xff410000 0x0 0x1000>; - rockchip,grf = <&grf>; - clocks = <&cru PCLK_ACODEC>; - clock-names = "pclk"; - mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>; - spk-depop-time-ms = 100; -}; diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml new file mode 100644 index 000000000000..08a74e28e483 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/rockchip,rk3328-codec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip rk3328 internal codec + +maintainers: + - Heiko Stuebner + +properties: + compatible: + const: rockchip,rk3328-codec + + reg: + maxItems: 1 + + clocks: + items: + - description: clock for audio codec + + clock-names: + items: + - const: pclk + + rockchip,grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + The phandle of the syscon node for the GRF register. + + spk-depop-time-ms: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 200 + description: + Speaker depop time in msec. + + mute-gpios: + maxItems: 1 + description: + GPIO specifier for external line driver control (typically the + dedicated GPIO_MUTE pin) + +required: + - compatible + - reg + - clocks + - clock-names + - rockchip,grf + +examples: + - | + codec: codec@ff410000 { + compatible = "rockchip,rk3328-codec"; + reg = <0xff410000 0x1000>; + clocks = <&cru PCLK_ACODEC>; + clock-names = "pclk"; + rockchip,grf = <&grf>; + mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>; + spk-depop-time-ms = 100; + }; From patchwork Tue Jun 23 12:47:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuhiro Suzuki X-Patchwork-Id: 11620671 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 216C0618 for ; Tue, 23 Jun 2020 12:50:05 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA33120738 for ; Tue, 23 Jun 2020 12:50:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="nS7rbrSQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA33120738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=katsuster.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2D1D317DD; Tue, 23 Jun 2020 14:49:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2D1D317DD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1592916603; bh=mDZRnAWXxUc01VOaqrlbzSe1EoQy57r5X4eZZgjwveI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=nS7rbrSQxuIo03BTl9KtuzcVRlhqqsznKVJdNsu6HY/x9UwEYUGv/h1AL4OolTTf8 JPmb+4ku22R38rAmlQKEFTMnZmCozwf8tErK8fZxjriEi3QicvmkZ1gIOC/wLLc0qJ FMDqyECmSxdBI3zJ9D/XMezm+rJLVgvlhaKlwO3k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2A303F80259; Tue, 23 Jun 2020 14:48:24 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id C557BF80218; Tue, 23 Jun 2020 14:48:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from www1102.sakura.ne.jp (www1102.sakura.ne.jp [219.94.129.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 52577F800B2 for ; Tue, 23 Jun 2020 14:48:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 52577F800B2 Received: from fsav107.sakura.ne.jp (fsav107.sakura.ne.jp [27.133.134.234]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 05NClfui068788; Tue, 23 Jun 2020 21:47:41 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav107.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav107.sakura.ne.jp); Tue, 23 Jun 2020 21:47:41 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav107.sakura.ne.jp) Received: from localhost.localdomain (121.252.232.153.ap.dti.ne.jp [153.232.252.121]) (authenticated bits=0) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 05NClbP6068743 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Jun 2020 21:47:41 +0900 (JST) (envelope-from katsuhiro@katsuster.net) From: Katsuhiro Suzuki To: Rob Herring , devicetree@vger.kernel.org Subject: [PATCH 2/2] dt-bindings: sound: add missing clock description of rk3328 DT schema Date: Tue, 23 Jun 2020 21:47:34 +0900 Message-Id: <20200623124734.1736470-2-katsuhiro@katsuster.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623124734.1736470-1-katsuhiro@katsuster.net> References: <20200623124734.1736470-1-katsuhiro@katsuster.net> MIME-Version: 1.0 Cc: Katsuhiro Suzuki , linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, Heiko Stuebner , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" This patch adds description about "mclk" clock and fixes some errors which are dt_binding_check reported. Signed-off-by: Katsuhiro Suzuki --- .../bindings/sound/rockchip,rk3328-codec.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml index 08a74e28e483..525b48c2f5de 100644 --- a/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml @@ -19,10 +19,12 @@ properties: clocks: items: - description: clock for audio codec + - description: clock for I2S master clock clock-names: items: - const: pclk + - const: mclk rockchip,grf: $ref: /schemas/types.yaml#/definitions/phandle @@ -41,21 +43,28 @@ properties: GPIO specifier for external line driver control (typically the dedicated GPIO_MUTE pin) + "#sound-dai-cells": + const: 0 + required: - compatible - reg - clocks - clock-names - rockchip,grf + - "#sound-dai-cells" examples: - | + #include + #include codec: codec@ff410000 { compatible = "rockchip,rk3328-codec"; reg = <0xff410000 0x1000>; - clocks = <&cru PCLK_ACODEC>; - clock-names = "pclk"; + clocks = <&cru PCLK_ACODECPHY>, <&cru SCLK_I2S1>; + clock-names = "pclk", "mclk"; rockchip,grf = <&grf>; mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>; - spk-depop-time-ms = 100; + spk-depop-time-ms = <100>; + #sound-dai-cells = <0>; };