Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964923AbcJRPy3 (ORCPT ); Tue, 18 Oct 2016 11:54:29 -0400 Received: from mail.kernel.org ([198.145.29.136]:57556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938478AbcJRPx7 (ORCPT ); Tue, 18 Oct 2016 11:53:59 -0400 MIME-Version: 1.0 In-Reply-To: <87zim32xbo.wl%kuninori.morimoto.gx@renesas.com> References: <87shrv4c8x.wl%kuninori.morimoto.gx@renesas.com> <87zim32xbo.wl%kuninori.morimoto.gx@renesas.com> From: Rob Herring Date: Tue, 18 Oct 2016 10:53:31 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 20/23] ASoC: add simple-graph-card document To: Kuninori Morimoto Cc: Mark Brown , Linux-ALSA , Liam Girdwood , Simon , Laurent , Guennadi , Grant Likely , Frank Rowand , Linux-DT , Linux-Kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3244 Lines: 97 On Mon, Oct 17, 2016 at 3:38 AM, Kuninori Morimoto wrote: > > From: Kuninori Morimoto > > Signed-off-by: Kuninori Morimoto > --- > .../bindings/sound/simple-graph-card.txt | 65 ++++++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/simple-graph-card.txt > > diff --git a/Documentation/devicetree/bindings/sound/simple-graph-card.txt b/Documentation/devicetree/bindings/sound/simple-graph-card.txt > new file mode 100644 > index 0000000..c191c0d > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/simple-graph-card.txt > @@ -0,0 +1,65 @@ > +Simple-Graph-Card: > + > +Simple-Graph-Card specifies audio DAI connections of SoC <-> codec. > +It is based on common bindings for device graphs. > +see ${LINUX}/Documentation/devicetree/bindings/graph.txt > + > +Basically, Simple-Graph-Card is same as Simple-Card, but using graph style. > +see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt > + > +Below are same as Simple-Card. > + > +- simple-audio-card,name > +- simple-audio-card,widgets > +- simple-audio-card,routing > +- simple-audio-card,mclk-fs > +- simple-audio-card,hp-det-gpio > +- simple-audio-card,mic-det-gpio > +- simple-audio-card,format > +- simple-audio-card,frame-master > +- simple-audio-card,bitclock-master > +- simple-audio-card,bitclock-inversion > +- simple-audio-card,frame-inversion > +- simple-audio-card,mclk-fs > +- simple-audio-card,dai-tdm-slot-num > +- simple-audio-card,dai-tdm-slot-width > +- clocks / system-clock-frequency > + > +This Simple-Graph-Card should be located as CPU driver's port[s]. > +And then, CPU driver need to probe it by itself. > + > +Required properties: > + > +- compatible : "asoc-simple-graph-card"; > +- type : "sound"; > + > +Example > + > +ak4643: codec@12 { > + compatible = "asahi-kasei,ak4643"; > + ... > + port { > + type = "sound"; > + ak4643_port: endpoint { > + remote-endpoint = <&rcar_ak4643_port>; > + clocks = <&audio_clock>; This belongs in the codec node. > + }; > + }; > +}; > + > +rcar_sound { > + ... > + port { > + compatible = "asoc-simple-graph-card"; > + > + simple-audio-card,format = "left_j"; > + simple-audio-card,bitclock-master = <&ak4643_port>; > + simple-audio-card,frame-master = <&ak4643_port>; Don't add a bunch of properties with in port and endpoint nodes. The purpose is to describe the graph. Put these in the parent node or perhaps the codec node. > + type = "sound"; I'm still not convinced this is necessary. This is implied either by the fact there is only one port or perhaps the compatible string. > + rcar_ak4643_port: endpoint { > + remote-endpoint = <&ak4643_port>; > + playback = <&ssi0 &src2 &dvc0>; > + capture = <&ssi1 &src3 &dvc1>; > + }; > + }; > +}; > -- > 1.9.1 >