Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4795642ybb; Tue, 24 Mar 2020 05:33:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv41Ilxzc0eY2lvQypppgMuAxu9XGFbZbAc9IJDdUaB9WTOs8n+W3PgwlmLpl9V6ECm8+Ax X-Received: by 2002:aca:4cd8:: with SMTP id z207mr3045946oia.155.1585053235508; Tue, 24 Mar 2020 05:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585053235; cv=none; d=google.com; s=arc-20160816; b=VC4TKaZ1wcs+hX3ZZKtuW5pJeNBv91y+oXv6TW4NL8l+YiQTQ/IEdvWoPmzcovdA6y R/jB73l98B/japTHmAFGY8WcUW1DLmw5Axr4nXicaoLT5uIhqE2dp4sRIf9WbRgAMJ+V Dgpi592SFPCh9QcFThqLTzUgOk+LXhlxfllIp42SyG7Ive2+h59vaFVgb2EFxmg0Om4n 7NLuIc9wgadGvIFxgyIZSMu+CPyuNCf0C/RrcRgObuMiy+4Frb1cM6aHG5bjiXUf7CYV 58QJ/oHqrDGAvV7YnsLmBT1z2LQOtgPeCYX4xpHbe2IIWA39CQeSHCFy6O9BHacnV2+F 8sKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=38HH6IBZZ8KwOhVeRkDxUvCLLKPnaez8n8AXFpKIeMg=; b=drIdblpHj5dVDWhSg2+rHgjZ8641jLnYcuzP4RrFsIaWBmwoufwW7YsXj6edVk4Jek 2VymjYE4Sklb3BHa1KEQsWcCglWt1xy3Eu+hsH4GXEofAy371UeTnI1XUwWq1WL/4tj2 kG1kuBNRUxFPmlVHcOvDKXV5e5w1/frPz/EHOzlpMqZB6iSquNE8C+w+owEW+09oR4NA ns+1QUaK93AwREyNW1S/ZsSbpJTuy3+CSD/f+TujzOPlZhVJadPYaCIkWkR508ZPKXiB MpQJFacQZ5fetai3wJxzB6s1/Ew/f6pQTuSMMG7s0gmsFlfp8oJsmeffpGusm/9V29Mr Nxfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Y/Ol+rcd"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13si57346oom.86.2020.03.24.05.33.42; Tue, 24 Mar 2020 05:33:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Y/Ol+rcd"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727668AbgCXMcF (ORCPT + 99 others); Tue, 24 Mar 2020 08:32:05 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42201 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgCXMcF (ORCPT ); Tue, 24 Mar 2020 08:32:05 -0400 Received: by mail-wr1-f65.google.com with SMTP id h15so8977583wrx.9; Tue, 24 Mar 2020 05:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=38HH6IBZZ8KwOhVeRkDxUvCLLKPnaez8n8AXFpKIeMg=; b=Y/Ol+rcdr7tU1DcIzrNVazfo8/dsyiQnuabpEE+kK6YL1CclxM53LcSLSMYcUfSizu UfmmS9zioH/kNWHK9/3B3bRLKMF2wqyn1jHjjFCC5RDo3E1SpIjS1mMhw2bD3WvqvT2o WVZntinXqcni7oCriGPu9d5TE+xXEPnduS7mddVE8Yn8PgN/9s2GXDtkEsAaJjSiXKbM mtBPdIvs8DBubpqsmDTrARuZznNpC6SpNnMjaBYcgs+Zedl3HmirCkPe6OB7XF0y200F wY+oNrmQ3YLm9OWD0GbgUliGQ2BvpMgK/0D2mUtMnMRxpIKla/pSzux5D3LYtEQJqRgK VZVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=38HH6IBZZ8KwOhVeRkDxUvCLLKPnaez8n8AXFpKIeMg=; b=H4K2Ec5eAr6cbF7ff4l5ZTO9buKUT7LkO/kDOf0vqE/9z2UMH/vMuh4dD4OmNcAp23 +XzWxKb++r6F1oiPv/DGur8JJYklQJ8YEd+koOH/Ea0bb+Vtt1tYAsnLnDWS4LfRlAPS 9Xcqlxg0x1qRFQx5ik4rEmYSB9n/OBMOKmyXYYg4w1c/y+8itj/wSotbZXhbkysq0LNG HbEnrB3G+nh72PFcuE4gsMCpIW7ksnGA/1Q0YfMrcs3Vn/hEauyCEZ1lHJrvTx9u+CSx MJmf42e49SLP/M02E5rvNeHJJaC0e0BZ/CDPfSJPQd45ZcOAgKIGe6qGagiAFIlZuFHv ACHg== X-Gm-Message-State: ANhLgQ3UAM82/6EyR+eLr69ZAS/Uhu/1QfCUUYJ18pIxIoONozMh/tG0 DzsX6IwmdElKF9lKdGn2n3M= X-Received: by 2002:adf:f104:: with SMTP id r4mr26880182wro.375.1585053122512; Tue, 24 Mar 2020 05:32:02 -0700 (PDT) Received: from debian.home (ip51ccf9cd.speed.planet.nl. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id k185sm4215029wmb.7.2020.03.24.05.32.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2020 05:32:01 -0700 (PDT) From: Johan Jonker To: lgirdwood@gmail.com Cc: broonie@kernel.org, heiko@sntech.de, robh+dt@kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: sound: convert rockchip spdif bindings to yaml Date: Tue, 24 Mar 2020 13:31:53 +0100 Message-Id: <20200324123155.11858-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Current dts files with 'spdif' nodes are manually verified. In order to automate this process rockchip-spdif.txt has to be converted to yaml. Also rk3188.dtsi, rk3288.dtsi use an extra fallback string, so change this in the documentation. Changed: "rockchip,rk3188-spdif", "rockchip,rk3066-spdif" "rockchip,rk3288-spdif", "rockchip,rk3066-spdif" Signed-off-by: Johan Jonker --- Changed V2: dmas and dma-names layout --- .../devicetree/bindings/sound/rockchip-spdif.txt | 45 ----------- .../devicetree/bindings/sound/rockchip-spdif.yaml | 94 ++++++++++++++++++++++ 2 files changed, 94 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/rockchip-spdif.txt create mode 100644 Documentation/devicetree/bindings/sound/rockchip-spdif.yaml diff --git a/Documentation/devicetree/bindings/sound/rockchip-spdif.txt b/Documentation/devicetree/bindings/sound/rockchip-spdif.txt deleted file mode 100644 index ec20c1271..000000000 --- a/Documentation/devicetree/bindings/sound/rockchip-spdif.txt +++ /dev/null @@ -1,45 +0,0 @@ -* Rockchip SPDIF transceiver - -The S/PDIF audio block is a stereo transceiver that allows the -processor to receive and transmit digital audio via an coaxial cable or -a fibre cable. - -Required properties: - -- compatible: should be one of the following: - - "rockchip,rk3066-spdif" - - "rockchip,rk3188-spdif" - - "rockchip,rk3228-spdif" - - "rockchip,rk3288-spdif" - - "rockchip,rk3328-spdif" - - "rockchip,rk3366-spdif" - - "rockchip,rk3368-spdif" - - "rockchip,rk3399-spdif" -- reg: physical base address of the controller and length of memory mapped - region. -- interrupts: should contain the SPDIF interrupt. -- dmas: DMA specifiers for tx dma. See the DMA client binding, - Documentation/devicetree/bindings/dma/dma.txt -- dma-names: should be "tx" -- clocks: a list of phandle + clock-specifier pairs, one for each entry - in clock-names. -- clock-names: should contain following: - - "hclk": clock for SPDIF controller - - "mclk" : clock for SPDIF bus - -Required properties on RK3288: - - rockchip,grf: the phandle of the syscon node for the general register - file (GRF) - -Example for the rk3188 SPDIF controller: - -spdif: spdif@1011e000 { - compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif"; - reg = <0x1011e000 0x2000>; - interrupts = ; - dmas = <&dmac1_s 8>; - dma-names = "tx"; - clock-names = "hclk", "mclk"; - clocks = <&cru HCLK_SPDIF>, <&cru SCLK_SPDIF>; - #sound-dai-cells = <0>; -}; diff --git a/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml b/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml new file mode 100644 index 000000000..d1c72c8a5 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml @@ -0,0 +1,94 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/rockchip-spdif.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip SPDIF transceiver + +description: + The S/PDIF audio block is a stereo transceiver that allows the + processor to receive and transmit digital audio via a coaxial or + fibre cable. + +maintainers: + - Heiko Stuebner + +properties: + compatible: + oneOf: + - const: rockchip,rk3066-spdif + - const: rockchip,rk3228-spdif + - const: rockchip,rk3328-spdif + - const: rockchip,rk3366-spdif + - const: rockchip,rk3368-spdif + - const: rockchip,rk3399-spdif + - items: + - enum: + - rockchip,rk3188-spdif + - rockchip,rk3288-spdif + - const: rockchip,rk3066-spdif + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: clock for SPDIF bus + - description: clock for SPDIF controller + + clock-names: + items: + - const: mclk + - const: hclk + + dmas: + maxItems: 1 + + dma-names: + const: tx + + rockchip,grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + The phandle of the syscon node for the GRF register. + Required property on RK3288. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - dmas + - dma-names + +if: + properties: + compatible: + contains: + const: rockchip,rk3288-spdif + +then: + required: + - rockchip,grf + +additionalProperties: false + +examples: + - | + #include + #include + #include + spdif: spdif@1011e000 { + compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif"; + reg = <0x1011e000 0x2000>; + interrupts = ; + clocks = <&cru SCLK_SPDIF>, <&cru HCLK_SPDIF>; + clock-names = "mclk", "hclk"; + dmas = <&dmac1_s 8>; + dma-names = "tx"; + }; -- 2.11.0