Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754593AbbGNKJN (ORCPT ); Tue, 14 Jul 2015 06:09:13 -0400 Received: from mail-bn1on0138.outbound.protection.outlook.com ([157.56.110.138]:53011 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754212AbbGNKJG convert rfc822-to-8bit (ORCPT ); Tue, 14 Jul 2015 06:09:06 -0400 From: Huan Wang To: Shawn Guo CC: "shawn.guo@linaro.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] dts: ls1021a: audio: Add dts nodes for audio on LS1021A Thread-Topic: [PATCH] dts: ls1021a: audio: Add dts nodes for audio on LS1021A Thread-Index: AQHQtUUqU+kF9onLOEGprzPV8VlB/J3Zgz6AgAFLfkA= Date: Tue, 14 Jul 2015 10:09:04 +0000 Message-ID: References: <1435895912-47451-1-git-send-email-b18965@freescale.com> <20150713141913.GT23464@tiger> In-Reply-To: <20150713141913.GT23464@tiger> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none; x-originating-ip: [192.158.241.86] x-microsoft-exchange-diagnostics: 1;BN3PR0301MB0865;5:IYTUp/jYgVQ3dGA3beUgePCMNLjM8Ct9uS4Ja6UTiATyayxSbEFfXwsgZC/DjlaWM5FElDfGCQz0hpJSUcZzPFnKJLlBt2SnjHoIVFxVOYPuVX256lBka3wfyflrRlgtMKzWJMnws0ikt+CSbsbHxg==;24:Qc9QhvUjk0DFGaVUdPAVhD9bLgLQ7VKTeQypsNdgFHqKfNhO/FrfWrFqDdwH+LvoJ+75n9bPVIhD0ntiu1Rj3hTz5V4H0sNRpW/uCvAN99U=;20:9+Ic+C/ztxyTTQTdU/2YKhPJ86vb1EuqZMQYt08gSZcvwlgrqoKQa+H4hjHrC5lCN1FF65ooYJV2a7txROW/7g== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(42134001)(42139001);SRVR:BN3PR0301MB0865; bn3pr0301mb0865: X-MS-Exchange-Organization-RulesExecuted x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN3PR0301MB0865;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB0865; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(24454002)(51704005)(15975445007)(66066001)(106116001)(62966003)(5003600100002)(102836002)(2900100001)(2950100001)(99286002)(77156002)(40100003)(46102003)(110136002)(189998001)(74316001)(92566002)(575784001)(5002640100001)(5001920100001)(77096005)(87936001)(19580395003)(33656002)(76176999)(50986999)(19580405001)(86362001)(54356999)(2656002)(76576001)(5001960100002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB0865;H:BN3PR0301MB0867.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jul 2015 10:09:04.8484 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB0865 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7531 Lines: 281 Shawn, > On Fri, Jul 03, 2015 at 11:58:32AM +0800, Alison Wang wrote: > > This patch adds dts nodes for audio on LS1021A. > > > > Signed-off-by: Alison Wang > > --- > > arch/arm/boot/dts/ls1021a-qds.dts | 71 > > +++++++++++++++++++++++++++++++++++++++ > > arch/arm/boot/dts/ls1021a-twr.dts | 63 > ++++++++++++++++++++++++++++++++++ > > arch/arm/boot/dts/ls1021a.dtsi | 14 ++++---- > > 3 files changed, 142 insertions(+), 6 deletions(-) > > > > diff --git a/arch/arm/boot/dts/ls1021a-qds.dts > > b/arch/arm/boot/dts/ls1021a-qds.dts > > index f16a061..9533f1d 100644 > > --- a/arch/arm/boot/dts/ls1021a-qds.dts > > +++ b/arch/arm/boot/dts/ls1021a-qds.dts > > @@ -58,6 +58,57 @@ > > enet0_sgmii_phy = &sgmii_phy1c; > > enet1_sgmii_phy = &sgmii_phy1d; > > }; > > + > > + clocks { > > + sys_mclk: clock { > > The generic node name works only when there is a @unit-address after it. > Otherwise, when you have more clocks to add, they will have the same > node name. > > But one of the device tree maintainer doesn't like the idea of "clocks" > container at all. So you may just want to put the node directly under > root with a unit node name, something like the following. > > sys_mclk: clock-mclk { > compatible = "fixed-clock"; > #clock-cells = <0>; > clock-frequency = <24576000>; > }; [Alison Wang] Thanks for your explanation and suggestion. I will change in v2. > > Shawn > > > + compatible = "fixed-clock"; > > + #clock-cells = <0>; > > + clock-frequency = <24576000>; > > + }; > > + }; > > + > > + regulators { > > + compatible = "simple-bus"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + reg_3p3v: regulator@0 { > > + compatible = "regulator-fixed"; > > + reg = <0>; > > + regulator-name = "3P3V"; > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + regulator-always-on; > > + }; > > + }; > > + > > + sound { > > + compatible = "simple-audio-card"; > > + simple-audio-card,format = "i2s"; > > + simple-audio-card,widgets = > > + "Microphone", "Microphone Jack", > > + "Headphone", "Headphone Jack", > > + "Speaker", "Speaker Ext", > > + "Line", "Line In Jack"; > > + simple-audio-card,routing = > > + "MIC_IN", "Microphone Jack", > > + "Microphone Jack", "Mic Bias", > > + "LINE_IN", "Line In Jack", > > + "Headphone Jack", "HP_OUT", > > + "Speaker Ext", "LINE_OUT"; > > + > > + simple-audio-card,cpu { > > + sound-dai = <&sai2>; > > + frame-master; > > + bitclock-master; > > + }; > > + > > + simple-audio-card,codec { > > + sound-dai = <&codec>; > > + frame-master; > > + bitclock-master; > > + }; > > + }; > > }; > > > > &dspi0 { > > @@ -99,6 +150,7 @@ > > status = "okay"; > > > > pca9547: mux@77 { > > + compatible = "nxp,pca9547"; > > reg = <0x77>; > > #address-cells = <1>; > > #size-cells = <0>; > > @@ -153,6 +205,21 @@ > > reg = <0x4c>; > > }; > > }; > > + > > + i2c@4 { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + reg = <0x4>; > > + > > + codec: sgtl5000@2a { > > + #sound-dai-cells = <0>; > > + compatible = "fsl,sgtl5000"; > > + reg = <0x2a>; > > + VDDA-supply = <®_3p3v>; > > + VDDIO-supply = <®_3p3v>; > > + clocks = <&sys_mclk 1>; > > + }; > > + }; > > }; > > }; > > > > @@ -251,6 +318,10 @@ > > }; > > }; > > > > +&sai2 { > > + status = "okay"; > > +}; > > + > > &uart0 { > > status = "okay"; > > }; > > diff --git a/arch/arm/boot/dts/ls1021a-twr.dts > > b/arch/arm/boot/dts/ls1021a-twr.dts > > index 4b61766..a0d9ad6 100644 > > --- a/arch/arm/boot/dts/ls1021a-twr.dts > > +++ b/arch/arm/boot/dts/ls1021a-twr.dts > > @@ -56,6 +56,57 @@ > > enet0_sgmii_phy = &sgmii_phy2; > > enet1_sgmii_phy = &sgmii_phy0; > > }; > > + > > + clocks { > > + sys_mclk: clock { > > + compatible = "fixed-clock"; > > + #clock-cells = <0>; > > + clock-frequency = <24576000>; > > + }; > > + }; > > + > > + regulators { > > + compatible = "simple-bus"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + reg_3p3v: regulator@0 { > > + compatible = "regulator-fixed"; > > + reg = <0>; > > + regulator-name = "3P3V"; > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + regulator-always-on; > > + }; > > + }; > > + > > + sound { > > + compatible = "simple-audio-card"; > > + simple-audio-card,format = "i2s"; > > + simple-audio-card,widgets = > > + "Microphone", "Microphone Jack", > > + "Headphone", "Headphone Jack", > > + "Speaker", "Speaker Ext", > > + "Line", "Line In Jack"; > > + simple-audio-card,routing = > > + "MIC_IN", "Microphone Jack", > > + "Microphone Jack", "Mic Bias", > > + "LINE_IN", "Line In Jack", > > + "Headphone Jack", "HP_OUT", > > + "Speaker Ext", "LINE_OUT"; > > + > > + simple-audio-card,cpu { > > + sound-dai = <&sai1>; > > + frame-master; > > + bitclock-master; > > + }; > > + > > + simple-audio-card,codec { > > + sound-dai = <&codec>; > > + frame-master; > > + bitclock-master; > > + }; > > + }; > > }; > > > > &dspi1 { > > @@ -99,6 +150,14 @@ > > > > &i2c1 { > > status = "okay"; > > + codec: sgtl5000@a { > > + #sound-dai-cells = <0>; > > + compatible = "fsl,sgtl5000"; > > + reg = <0x0a>; > > + VDDA-supply = <®_3p3v>; > > + VDDIO-supply = <®_3p3v>; > > + clocks = <&sys_mclk 1>; > > + }; > > }; > > > > &ifc { > > @@ -138,6 +197,10 @@ > > }; > > }; > > > > +&sai1 { > > + status = "okay"; > > +}; > > + > > &uart0 { > > status = "okay"; > > }; > > diff --git a/arch/arm/boot/dts/ls1021a.dtsi > > b/arch/arm/boot/dts/ls1021a.dtsi index 6c41b10..4ad30d0 100644 > > --- a/arch/arm/boot/dts/ls1021a.dtsi > > +++ b/arch/arm/boot/dts/ls1021a.dtsi > > @@ -345,28 +345,30 @@ > > }; > > > > sai1: sai@2b50000 { > > + #sound-dai-cells = <0>; > > compatible = "fsl,vf610-sai"; > > reg = <0x0 0x2b50000 0x0 0x10000>; > > interrupts = ; > > - clocks = <&platform_clk 1>; > > - clock-names = "sai"; > > + clocks = <&platform_clk 1>, <&platform_clk 1>, > > + <&platform_clk 1>, <&platform_clk 1>; > > + clock-names = "bus", "mclk1", "mclk2", "mclk3"; > > dma-names = "tx", "rx"; > > dmas = <&edma0 1 47>, > > <&edma0 1 46>; > > - big-endian; > > status = "disabled"; > > }; > > > > sai2: sai@2b60000 { > > + #sound-dai-cells = <0>; > > compatible = "fsl,vf610-sai"; > > reg = <0x0 0x2b60000 0x0 0x10000>; > > interrupts = ; > > - clocks = <&platform_clk 1>; > > - clock-names = "sai"; > > + clocks = <&platform_clk 1>, <&platform_clk 1>, > > + <&platform_clk 1>, <&platform_clk 1>; > > + clock-names = "bus", "mclk1", "mclk2", "mclk3"; > > dma-names = "tx", "rx"; > > dmas = <&edma0 1 45>, > > <&edma0 1 44>; > > - big-endian; > > status = "disabled"; > > }; > > > > -- > > 2.1.0.27.g96db324 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe > > linux-kernel" in the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > Please read the FAQ at http://www.tux.org/lkml/ > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/