Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp695345pxj; Wed, 16 Jun 2021 11:23:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzF4FnBPzazMQxH0EdfRxpHgaknIiSmLTG/Vn6NGnQ0JNpEhmWc6PIhiqhAXpT/zLaeM2tn X-Received: by 2002:a05:6602:1304:: with SMTP id h4mr546280iov.180.1623867803443; Wed, 16 Jun 2021 11:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623867803; cv=none; d=google.com; s=arc-20160816; b=03xPMWTIPHFrOcpUNir0TXc3/gohx34vTRwSBf3uMlnIp13z+TMVP0zjBeqh3l9hnC TnpsU9R18QtZb8tAttxkW0UIf7dM9DQX5ZVVZzQDb8+D+fIfGeZ/16O6CEl7GluTsy/z vzqrwqiwGW+XZq61zH8Ty+k/zGC6NpSNpTGQBPI04+X176Vo9mUgbepeq4X78h9gw+C0 R6UnhSxn2g5uOwO3ZWb+HS1smcoSItnQdQkjnNNjwSPaPPhiwHJXBkV2zPmFnADwOorT 3+cs6PXIppfDIO9qsB4IiQuDwwrKSoIoVOk0pZ6hkkfo7GvQOnKEcyeTVo02vUvY92/s cyYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=4iau2WjkU1IOCCwO+rrQYEUN9waFEVc6uwqNfTtIcMw=; b=HEmhuZ8/bZ05Ijdf3Xmq8UJiMo3bXzGguzePFcu1kAQHeHjIPs/zkeCqjiH5Qs71Nm J7mks1j3q0FergUf4FlPs6iQom2Kb8hYOzQiGooPRTd8COCRjy/c+eu0mxLwCSB5QU9x taoan+H80EgM6PSm6YSg+lGvFN9bA/8PdtbXf5nY5WucfEs3CGQQLwSXOoc83k6zB9m4 lKMfwwoDUbSrtdaSLg5yWroKcPCS2/Ym0HwT47gSA9MEv7AsMI1+OsrSVS6BSZjvObSe pjyOKaTz2Gom8Gl0U/NUIw2spwdE2+/hb7RjqbGI70T2qD6nmm2XogvsdLlmKyy7hfvx 9orw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=OjMviC7J; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NsJGbmOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l8si2849053iol.25.2021.06.16.11.23.05; Wed, 16 Jun 2021 11:23:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=OjMviC7J; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NsJGbmOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232430AbhFPMlG (ORCPT + 99 others); Wed, 16 Jun 2021 08:41:06 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:54217 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbhFPMlE (ORCPT ); Wed, 16 Jun 2021 08:41:04 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id A791A5805A6; Wed, 16 Jun 2021 08:38:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 16 Jun 2021 08:38:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=4iau2WjkU1IOCCwO+rrQYEUN9wa FEVc6uwqNfTtIcMw=; b=OjMviC7JjCmwYjaNv82zVecjIS5ou592RSvCz9gQAuy aEm4eM9snzxNA2bxaTQ5xltJhvsTUBmqY8N50SNNNsPMWTVWF+rsr30KUBEdlsOJ CLuWt7xudfw1gKNCG8xCPrWgpjlYoh5AOPGcv9QrMreUWXAAzwTFuK3nG3HeozEf lVFwiHxaogIr1jWBP/VJsApb+bob3pN6hF0pz1RsmzyGY7PONEr498njiUS+sAAf Jkf82n75GOHRgVc3DALPq6atgceWdY8DHXS8xSY6Ybcvj6lj0UMWCiBobAOjYy4B EsSW9ElJiJvDIjCty8m6ELw0JGd4md7jmIKco7buBkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=4iau2W jkU1IOCCwO+rrQYEUN9waFEVc6uwqNfTtIcMw=; b=NsJGbmOWw7S6XMeGTgI3Z4 qWq4CCDQPYyOR7LbqKwNXre6NUQvDQ0FpEB9yBzrOQ7uzj/LpvWWdulIFgEjgFsY lBA3ZO1W2bO+L9Dgqjfg8A3DsFM0AxkbXoyqvtwLr+Mn7wKEeXWj0lNOt5UytL2Y AqbGWIgpcfdPBfbAup2OF7umZG1EVaQWpfAIzgh7zKSjejkNF0JgOltlKSHaBbOe ETXhsKYATgi5ALFXWmBOxsOdynk6IBVtBk7wqFcJh6hAXpe/StVZmKNJJmkgtAx6 dL2QYdNzxv2uz99VE4tMbdk3C+s9yy/eENpboVJolZv5Z9nP4IUNbBiCWS/9R+bg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvledgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtjeenucfhrhhomhepofgrgihimhgvucftihhprghrugcuoehmrgigihhmvgestggv rhhnohdrthgvtghhqeenucggtffrrghtthgvrhhnpeeigfdtteffhefhfffhkeetvdeige dvfeeijedttdevveeiudejgeduvdehvddujeenucffohhmrghinhepuggvvhhitggvthhr vggvrdhorhhgpdihrghmlhdrshhonecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 16 Jun 2021 08:38:57 -0400 (EDT) Date: Wed, 16 Jun 2021 14:38:54 +0200 From: Maxime Ripard To: =?utf-8?B?54+t5rab?= Cc: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, wens@csie.org, jernej.skrabec@gmail.com, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] ASoC: sun50i-dmic: dt-bindings: add DT bindings for DMIC controller Message-ID: <20210616123854.hcdlpqc6owyqn3fu@gilmour> References: <20210615130737.2098-1-fengzheng923@gmail.com> <20210616084920.y6yjic4sau6ungv5@gilmour> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hi7zosja6vhzuga5" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hi7zosja6vhzuga5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 16, 2021 at 06:56:25PM +0800, =E7=8F=AD=E6=B6=9B wrote: > Hi, >=20 > Maxime Ripard =E4=BA=8E2021=E5=B9=B46=E6=9C=8816=E6= =97=A5=E5=91=A8=E4=B8=89 =E4=B8=8B=E5=8D=884:49=E5=86=99=E9=81=93=EF=BC=9A > > > > Hi, > > > > On Tue, Jun 15, 2021 at 09:07:37PM +0800, Ban Tao wrote: > > > The Allwinner SoCs feature an I2S controller across multiple SoC > > > generations. > > > > Which SoC generations? > > > > > Signed-off-by: Ban Tao > > > --- > > > .../sound/allwinner,sun50i-h6-dmic.yaml | 66 +++++++++++++++++= ++ > > > 1 file changed, 66 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/sound/allwinner= ,sun50i-h6-dmic.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun50i= -h6-dmic.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6= -dmic.yaml > > > new file mode 100644 > > > index 000000000000..81d40c374e44 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmi= c.yaml > > > @@ -0,0 +1,66 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/sound/allwinner,sun50i-h6-dmic.ya= ml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Allwinner H6 DMIC Controller Device Tree Bindings > > > + > > > +maintainers: > > > + - Ban Tao > > > + > > > +properties: > > > + "#sound-dai-cells": > > > + const: 0 > > > + > > > + compatible: > > > + const: allwinner,sun50i-h6-dmic > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > + clocks: > > > + items: > > > + - description: Bus Clock > > > + - description: Module Clock > > > + > > > + clock-names: > > > + items: > > > + - const: apb > > > + - const: dmic > > > > The convention we use is bus and mod > > > > > + > > > + dmas: > > > + maxItems: 1 > > > + > > > + dma-names: > > > + const: rx > > > + > > > + resets: > > > + maxItems: 1 > > > + > > > +required: > > > + - "#sound-dai-cells" > > > + - compatible > > > + - reg > > > + - clocks > > > + - clock-names > > > + - dmas > > > + - dma-names > > > + - resets > > > + > > > +additionalProperties: false > > > + > > > +examples: > > > + - | > > > + spdif: spdif@5095000 { > > > > The label and node name seems wrong? > > > Yes, in fact, I don=E2=80=99t know much about yaml format files. > The allwinner,sun50i-h6-dmic.yaml file is based on > allwinner,sun4i-a10-spdif.yaml. > > So, How do i convert txt file to yaml file, for example: > --------------------------------------------- > Required properties: >=20 > - compatible : should be one of the following: > - "allwinner,sun50i-h6-dmic": for the Allwinner H6 SoC >=20 > - reg : physical base address of the > controller and length of memory mapped region. >=20 > - dmas : Generic dma devicetree binding as described in > Documentation/devicetree/bindings/dma/dma.txt. >=20 > - dma-names : DMA have to be defined, "rx". >=20 > - clocks : Contains an entry for each entry in clock-names. >=20 > - clock-names : Includes the following entries: > "apb" clock for the dmic bus. > "dmic" clock for dmic controller. >=20 > - resets : reset specifier for the ahb reset >=20 > Example: >=20 > dmic: dmic@5095000 { > #sound-dai-cells =3D <0>; > compatible =3D "allwinner,sun50i-h6-dmic"; > reg =3D <0x05095000 0x400>; > clocks =3D <&ccu CLK_BUS_DMIC>, <&ccu CLK_DMIC>; > clock-names =3D "apb", "dmic"; > dmas =3D <&dma 7>; > dma-names =3D "rx"; > resets =3D <&ccu RST_BUS_DMIC>; > }; > --------------------------------------------- Just like you already did :) Aside from the few comments, what you did is spot on. Just remember to run make dt_binding_check after you wrote your schema Maxime --hi7zosja6vhzuga5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYMnw3gAKCRDj7w1vZxhR xa8zAP9aN57ypYMSpS8opiH1Ou8RZBFJXFHjtm70c9SstASQUwD/TH9k2r8KZW88 mj/U7b8kdsCLrj8AkyMev6jhXIG3PgI= =tDFN -----END PGP SIGNATURE----- --hi7zosja6vhzuga5--