Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp785108ybh; Wed, 11 Mar 2020 10:44:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs/s3KsYeqwEYYMpcNGchONFtfDC6YN6JXvIt2w/I3zrtThfWhwvDCiyZKShrsaCejl13ej X-Received: by 2002:a4a:c299:: with SMTP id b25mr1084195ooq.6.1583948694741; Wed, 11 Mar 2020 10:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583948694; cv=none; d=google.com; s=arc-20160816; b=ClMhqhiTN5EN4Ffp0qfASgVtq7/xszmyxryQCLbEZjmaSsb820T6UV8Qp0FIVpBHkl i40uKjk4cS6P4uTRL1sXJziriNRbVuKjxNDdpybD8+un5WdkghoaRQD18lOKIjoLtZ3r fqEeVKQ2aZH/CfTMryiczbmgD4fX5/Idm0fBff91jT+LRUw417AxTD89QVwrDZP6Wp6Q NfrvBk32qxN65aqoYGVXm7yUm0K9+ZvgQfGbDQ+FmXSjzTgzvdw2JT1e3Q7TDGWg8QWX xnze8+g86odU296xPSNPcEwjHbJBGV40jyUO4yg9sN8sxRr3XuNh5AONApjbuAl/flgy I39A== 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=1pJAR/sckcdLGJSwTx5sy+rsfwGpz9fPR5d1aK/vSAI=; b=xrNunjkQoZvrcPsbujh/4YhivBJYqzzMIXoNQLn//zrwwDYtVBgn186+/bHr2cGhVB Qv2q8aOxiawneftSchzFmY1BNsTKnp95rc/7Mifm9KAvWDKjG7JMEmZmSvJet4g7zz07 EBnn/zO/vBpcqG2GbyON8G/D6e4/1D6IDY+bzqpsZCcsalGxCovNH9cwW6s30gZBPt7g XI5Y595p5jzx4nJA9lxkrG5YiKY484DUNvtZV0o+jHO1NftWVMOZgG/Tctocajpku4c3 XXKE1mGUhEBnqqqL+HoK3hAIdbtdb640iAvFT677AdIe7r+figkwbTWCya6yzRNoZzKK 1x+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IL8dp+f8; 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 t193si1555559oih.61.2020.03.11.10.44.43; Wed, 11 Mar 2020 10:44:54 -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=IL8dp+f8; 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 S1730625AbgCKRni (ORCPT + 99 others); Wed, 11 Mar 2020 13:43:38 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46681 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730258AbgCKRnd (ORCPT ); Wed, 11 Mar 2020 13:43:33 -0400 Received: by mail-wr1-f65.google.com with SMTP id n15so3725331wrw.13; Wed, 11 Mar 2020 10:43:31 -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=1pJAR/sckcdLGJSwTx5sy+rsfwGpz9fPR5d1aK/vSAI=; b=IL8dp+f8Ls3O4ZBKg0S7q07Ne+0KPwrBNYU44a8fqCPSWcItDMq7pjC/Pr4uqGqNmK DHpK2vhTYvwwq0Lrf7gqR71/s3LT/NYqhabkqVpXujHAJfueU6HTfxAimK9nAYUlLRd7 lt3Gv4w90ahkiZKxkl7iR1T+1EJ076xesoMRWnNEAvwJEsgQzPHtq9PRL8W8ekuVzTf7 ioIU13aDkkHHPljPEklJFzPk4+p11P6iLhX8yW4vTwAqf94uLiO0QhJgwA/wvIMX4R4a NYuws1oJ3ECaYpHh6LOWP8PdZ8f0hxSndx8shMo16QBEBlt9zWHv5E1zISbAf9wfK8VC eliA== 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=1pJAR/sckcdLGJSwTx5sy+rsfwGpz9fPR5d1aK/vSAI=; b=slWiPuWY4OjCvR1JF4hoQl3X86WSwW8hLBJufizXPHB4sdLnuBRCJNgnLAv7jpoghN gI2WBhQwD41icBXjIuP615qUxpW2GHwgMQyoRLFR668Q3sckKu6CnfwxvOca/K/29Zfi S+AR56C6dTajg1Yo4rLPuKgMAesiguH45DHPuVIN5RkQ0Knt8VSbYUetsiYx2iYF+R9U 2CMey7VS7Jr+YqeKxlqkbG7AnFtLf/NlKRIurQTtBOi71iZUta4VHlm9zQ4ThiCvXWxZ a2nhdmEQy93mnQdnd5yTXEaQaTv/kVlPIFiSREH4GT21q5IrMqOfrPMeYz3HYeHquX0Q btIg== X-Gm-Message-State: ANhLgQ1IXfhPBEWE9uUcWWqJZeuDwfV4JRt0LgL6WGH1PzbiFgbPn6xv fQ9sFuY49Yit3ReFOoPcf/NfBAv4 X-Received: by 2002:a5d:6544:: with SMTP id z4mr5535066wrv.298.1583948610652; Wed, 11 Mar 2020 10:43:30 -0700 (PDT) Received: from debian.home (ip51ccf9cd.speed.planet.nl. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id d1sm8933166wrw.52.2020.03.11.10.43.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2020 10:43:29 -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 v1 1/2] dt-bindings: sound: convert rockchip i2s bindings to yaml Date: Wed, 11 Mar 2020 18:43:21 +0100 Message-Id: <20200311174322.23813-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 'i2s' nodes are manually verified. In order to automate this process rockchip-i2s.txt has to be converted to yaml. Signed-off-by: Johan Jonker --- .../devicetree/bindings/sound/rockchip-i2s.txt | 49 ---------- .../devicetree/bindings/sound/rockchip-i2s.yaml | 106 +++++++++++++++++++++ 2 files changed, 106 insertions(+), 49 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/rockchip-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/rockchip-i2s.yaml diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt deleted file mode 100644 index 54aefab71..000000000 --- a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt +++ /dev/null @@ -1,49 +0,0 @@ -* Rockchip I2S controller - -The I2S bus (Inter-IC sound bus) is a serial link for digital -audio data transfer between devices in the system. - -Required properties: - -- compatible: should be one of the following: - - "rockchip,rk3066-i2s": for rk3066 - - "rockchip,px30-i2s", "rockchip,rk3066-i2s": for px30 - - "rockchip,rk3036-i2s", "rockchip,rk3066-i2s": for rk3036 - - "rockchip,rk3188-i2s", "rockchip,rk3066-i2s": for rk3188 - - "rockchip,rk3228-i2s", "rockchip,rk3066-i2s": for rk3228 - - "rockchip,rk3288-i2s", "rockchip,rk3066-i2s": for rk3288 - - "rockchip,rk3328-i2s", "rockchip,rk3066-i2s": for rk3328 - - "rockchip,rk3366-i2s", "rockchip,rk3066-i2s": for rk3366 - - "rockchip,rk3368-i2s", "rockchip,rk3066-i2s": for rk3368 - - "rockchip,rk3399-i2s", "rockchip,rk3066-i2s": for rk3399 -- reg: physical base address of the controller and length of memory mapped - region. -- interrupts: should contain the I2S interrupt. -- dmas: DMA specifiers for tx and rx dma. See the DMA client binding, - Documentation/devicetree/bindings/dma/dma.txt -- dma-names: should include "tx" and "rx". -- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. -- clock-names: should contain the following: - - "i2s_hclk": clock for I2S BUS - - "i2s_clk" : clock for I2S controller -- rockchip,playback-channels: max playback channels, if not set, 8 channels default. -- rockchip,capture-channels: max capture channels, if not set, 2 channels default. - -Required properties for controller which support multi channels -playback/capture: - -- rockchip,grf: the phandle of the syscon node for GRF register. - -Example for rk3288 I2S controller: - -i2s@ff890000 { - compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s"; - reg = <0xff890000 0x10000>; - interrupts = ; - dmas = <&pdma1 0>, <&pdma1 1>; - dma-names = "tx", "rx"; - clock-names = "i2s_hclk", "i2s_clk"; - clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>; - rockchip,playback-channels = <8>; - rockchip,capture-channels = <2>; -}; diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml b/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml new file mode 100644 index 000000000..eff06b4b5 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/rockchip-i2s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip I2S controller + +description: + The I2S bus (Inter-IC sound bus) is a serial link for digital + audio data transfer between devices in the system. + +maintainers: + - Heiko Stuebner + +properties: + compatible: + oneOf: + - const: rockchip,rk3066-i2s + - items: + - enum: + - rockchip,px30-i2s + - rockchip,rk3036-i2s + - rockchip,rk3188-i2s + - rockchip,rk3228-i2s + - rockchip,rk3288-i2s + - rockchip,rk3328-i2s + - rockchip,rk3366-i2s + - rockchip,rk3368-i2s + - rockchip,rk3399-i2s + - const: rockchip,rk3066-i2s + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: clock for I2S controller + - description: clock for I2S BUS + + clock-names: + items: + - const: i2s_clk + - const: i2s_hclk + + dmas: + items: + - description: TX DMA Channel + - description: RX DMA Channel + + dma-names: + items: + - const: tx + - const: rx + + rockchip,capture-channels: + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + default: 2 + description: + Max capture channels, if not set, 2 channels default. + + rockchip,playback-channels: + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + default: 8 + description: + Max playback channels, if not set, 8 channels default. + + rockchip,grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: + The phandle of the syscon node for the GRF register. + Required property for controllers which support multi channel + playback/capture. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + i2s@ff890000 { + compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s"; + reg = <0xff890000 0x10000>; + interrupts = ; + clocks = <&cru SCLK_I2S0>, <&cru HCLK_I2S0>; + clock-names = "i2s_clk", "i2s_hclk"; + dmas = <&pdma1 0>, <&pdma1 1>; + dma-names = "tx", "rx"; + rockchip,capture-channels = <2>; + rockchip,playback-channels = <8>; + }; -- 2.11.0