From patchwork Tue Jun 30 13:54:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuhiro Suzuki X-Patchwork-Id: 11634137 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 19FE8912 for ; Tue, 30 Jun 2020 14:03:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 B3567206BE for ; Tue, 30 Jun 2020 14:03:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="P0az1wXJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KV3gsVPT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3567206BE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=katsuster.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Ceue7ByB+LHP7MGKd8CKP8g17Z73gcD6lp5Z3e1sc+0=; b=P0az1wXJeREi6FifpvcFu2BSW2 oYO6fQk5bNeN3j64R5bnbUWqG2QKn/NSltVPrGlzff/DGRuFJl94wJOqmd/45CH1uR3z04bT1M4M2 tcqOECnRUFFNk9Sd7MPzmzWn3IrGq3VNSuxVQVnlOPpKNzT7ee9wjZTQB9CvxIjF4zX5B7kPgJEWD ZRKvaivk8DYfAgkqjZP/McNkAzqxWdIfcIhhNCjMuWSgE9a9BfEM8SzlvApBQhTkS28gdRJHr7qlT hEiMjzyzLqqoFBrDWGYsTOMWLchJLOsWwxuXATrO/HYyVT91noP1GK6kXKJscB0ici4P6cEHzB9nE pSXeiDCg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqGqr-0007Oz-AF; Tue, 30 Jun 2020 14:03:09 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqGis-0003F7-L0 for linux-rockchip@merlin.infradead.org; Tue, 30 Jun 2020 13:54:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=1rnHfj165FaFZqxYWAuVMjRFtbSIMc5A5gy2kpd+J7Q=; b=KV3gsVPT4/bqWnWnKdNlSjq3yr ++jKfUX0K/yn6C6ykC1QjXuC32KxDDCuvbleY65uSrwqzyc14ke/w3BLqA0Q8JRSvf32Gp45lFQZ9 4lilsR2c78Ht6yIqvkLQ3Mt6KQsAf5hSA35G2g98F7OC5JJFMpEbshxvwBcoWXJGCYVYdRc+peBZH 2fjJIKZ/kkkwdsFC69evs5iMcKlKoTky2rhnuKcztWOuDn9i2aZlcE4AiLAEt0F2OTbxq+3212WKa ot0r63KaIHeNeXwjh2wuoHqsQxolmRrMrBIIqch4QdlSd5FApUTG0ADGPP272uwb6i8jdeHqXFL17 sqfawbNg==; Received: from www1102.sakura.ne.jp ([219.94.129.142]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqGio-0000ed-Ps for linux-rockchip@lists.infradead.org; Tue, 30 Jun 2020 13:54:53 +0000 Received: from fsav104.sakura.ne.jp (fsav104.sakura.ne.jp [27.133.134.231]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 05UDsJKI069879; Tue, 30 Jun 2020 22:54:19 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav104.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav104.sakura.ne.jp); Tue, 30 Jun 2020 22:54:19 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav104.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 05UDsFJk069836 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Jun 2020 22:54:19 +0900 (JST) (envelope-from katsuhiro@katsuster.net) From: Katsuhiro Suzuki To: Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v2] dt-bindings: sound: convert rk3328 codec binding to yaml Date: Tue, 30 Jun 2020 22:54:12 +0900 Message-Id: <20200630135412.718447-1-katsuhiro@katsuster.net> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200630_145451_547073_43F8B2CF X-CRM114-Status: GOOD ( 17.94 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Katsuhiro Suzuki , linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, Heiko Stuebner , linux-arm-kernel@lists.infradead.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org This patch converts Rockchip rk3328 audio codec binding to DT schema. And adds description about "mclk" clock and fixes some errors in original example. Signed-off-by: Katsuhiro Suzuki Reviewed-by: Rob Herring --- .../bindings/sound/rockchip,rk3328-codec.txt | 28 -------- .../bindings/sound/rockchip,rk3328-codec.yaml | 70 +++++++++++++++++++ 2 files changed, 70 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..525b48c2f5de --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3328-codec.yaml @@ -0,0 +1,70 @@ +# 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 + - description: clock for I2S master clock + + clock-names: + items: + - const: pclk + - const: mclk + + 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) + + "#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_ACODECPHY>, <&cru SCLK_I2S1>; + clock-names = "pclk", "mclk"; + rockchip,grf = <&grf>; + mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>; + spk-depop-time-ms = <100>; + #sound-dai-cells = <0>; + };