Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753913AbbGCEDP (ORCPT ); Fri, 3 Jul 2015 00:03:15 -0400 Received: from mail-bl2on0114.outbound.protection.outlook.com ([65.55.169.114]:46496 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752781AbbGCEDI (ORCPT ); Fri, 3 Jul 2015 00:03:08 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; From: Alison Wang To: , , CC: Alison Wang Subject: [PATCH] dts: ls1021a: audio: Add dts nodes for audio on LS1021A Date: Fri, 3 Jul 2015 11:58:32 +0800 Message-ID: <1435895912-47451-1-git-send-email-b18965@freescale.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC009;1:8Cmidjz59pLWUGqPP7o9t81Ezs4f+M2BUGjc/GqlgWYfoIllbRlyz1FiLNhRYitPcA7nY1z7tJBDSplpj5nawepY9uSx19tFGFeKCjvkK15kaoCh66PMd7uLrt+k1fR+5dfZycm1SKA5cUoVQ23uS4MfTPjn6AoLO+XTQ/21ZmY9WsTbGxGXkp+U9dZ6aHCxoTdxi1Sf34KWxTIF2FPLKdKxBwT9cFlqOGKqWrQntT3KXvHAbGS6Vbg6ppIRPG5tRghws3KK1by3Ozl4/86Y6KOn4b4wqzaCwW6VuNUGbTh84G3uIH73HwZSlcvPV5Z8BWEqyVXLQk1Hm14y1Uo7sQ== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(87936001)(46102003)(106466001)(50986999)(5001770100001)(19580395003)(229853001)(48376002)(62966003)(77156002)(104016003)(575784001)(105606002)(47776003)(33646002)(6806004)(36756003)(5001960100002)(107886002)(85426001)(19580405001)(92566002)(189998001)(50226001)(2201001)(77096005)(50466002)(4001430100001)(2101003)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB0868;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB0868;2:Soj2QM7lr8tGjowP8Z81/RdOWFPpWweLmFDCPf8F9u9eEWHB9UVKviw/R0WPRdcq;3:NiIzZivGP/hsqjGgiJOZicgXvX3y4hyiucvUsqMSU/mtugjho/YsQXhXN1YRNkNHPsus4iZkOYBGNF5uPjyc2MdXvxeXEutAMcaWahRwt8T7gWu9ZI/+DYPRsK9Jb7VkYiYE4Ifw7tHrLxj7N3n5tjHMnwvqQfrjOo8U1BSZxFzN/0L0QHGXSJ5pDjaOxs5kxSQdCLbNRWnMS/h/IBhUjK/bKFzZvz4XkaIfuQqDwC8=;25:Hf6fx0FXbfi7RuCgk4zZnDYNbDZE3Nm+HoZgF9/b4sJERkaUVC+ucXPhzLn5m9AA0u3k7Xc0odUWYbAbdYVvQVapgde6zlBbGV62Rgfpb2Bm9SWzzTDvJbdweaOLPX6oTENOyffhbwGU7ALgz1g6dzuWxueP5D59NbNQ1bl2Nt9UZZuPpcUOTwSuwNlDR9bpPVUP/HVPcHpcwRJuyFiwlcpEJCTn/KN9po7FwQoHc5NyKB7pC36B0ko34RA/1QZxVlRLMijysc9lXUBYwMjS6A==;20:wBA0uUew5ZBRxhIZUzbHAvfBXZ+jnuYMb+3+op0fiQGVksmWK8B8SgdldOfcXU75Rm6bwo9Qt9g+BMlB6x4E+LASH3494ohXQpMxwjyWfLWAMigZOt+fOjkwortDuNyQZJmIxqLFBtgN5GakFCjheAE0zyY4FkUcNfheL76Fjpjl+KrI+nC8RoEjwT0Sq4lbP1TvVkRr2TAisbem2jnfFtGs2CnRlPKWqUfC+xpDUJyhIfOmh5ns7Cmq24NpGRgyR7wqz/dm+wdcEHzcDgV2nT8hE9ah06WtcL6V5NPoXfLsizTwvobvqvcP4p05SsRgMk4jhZ0JzsRsQTbRbXtiVHlXgwA0z7XGLMLfxjBkZhI= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB0868; 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:BN3PR0301MB0868;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB0868; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB0868;4:NfPWsahdmGm4LvlT0on4hh3zWFnQdMzhJkJlwzJglFAKxJjPidYX0pt6g9UavPeJZOb1CD0SnGpy+oEovc5waqYphzIIYV2Iq2/4/dw3XVM13H+Nj0e46VrRZ79xoweGRLNcmzBOV5B2h4C6fJpVnsdR0ixopmAHOQ7rkWmZH1RfqfOP41OPJfFxe+d5ZB9UAQVhiTdU48sqeZX85ArpB3eNIxjljcPhFRkpAiRK2c73VoOMdcXTVglAip1r1quBk+Cs0KEo/8FGnynND8o2aiCE7WcNY9RxhsSSY7E7Arg= X-Forefront-PRVS: 0626C21B10 X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB0868;23:ymSTkkGWzgjOJ1Ph6G4tDwtelSWQ6ziZq45j8OwUZVBrv18Com4ojAzJE7+6UAbxP+VQ47KLfDn2kWpLyf2w9JdakMZeCzH/qL3vitCWY0iIq+V9HMxMONhen665HW7M2vVBf38V0itOx6u3w4fKSS9BHOdnSuYJYAFI8nH3jtO1uuWUu066vU81ebgO5Et8PYY7i7TkAHke6LMLXuiqA7kl7HIE6E6AXRgw/X0vQrYV3g6CUnYF7fk98/9libW9agmgw1xQ7iRLTvqJtekae+IIXMQ4w6dBQnGZWMUsdENhyuG8eCR+brXIcxRqDyR67CCK38U8v+yHwbNOU/T7pdwsQc5JD7gwZ6bNkeHHRNT01m1KUT6N77rnzq3A3IIzzFOTol/SMxVMyIik1LLg9kF014N/Ugi7WTl/W9NyVt6knIeTuUTijKNgbkNvogOESZgiSUZsFnLwIVsIh3UfPuvP/t7fsoWDBrGj1kNVDiVftT5LS/4TEwnDr9I5ux/TphG+772IpFpff/6Idtbjf2bsuAPJWSsaj9vfcdH/40gOTbEgzCI9wEtsfgI9HfAXG6p1v7XiHZAuUY0XY/IEDeXZv76EbcRbQsTzTH5Cw5triYPn8BlGUNB6BhHlXWgPuXOLICWIqPRMgCtkRRf+R015ZoVwI81DlZDCWSZxaqo8L6FqM78Mh9YboQfyTuKtqph54VH36tZwuo00ZwRqX/BrrRR/7y2Fr7odl1BTn4mB3+ApDhu7OM08RNkDCfinukucIOfGRTwRw3ZmC7cjKNeCpNDcSDCzYtsvVG0f2eFFTr3NPgVx0bnFIENLai3zIMTfRJw9RazWhTl4U7HENAb2z3/Rzkfy+OlNEWrFV1uQm7N3WZ1HGMGXjPZItqmJDeITJDQxYEZWrL+9T9pdENC1muabg2TFU8CJIrFK1EsglNratqNW1QNG5YhRwT8I X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB0868;5:jBBDMKh8yCOs4tuOWSSQzIdcAy9fqlKk4+A8c25Htj0NhNaaTnNUZT5b70SKM6EFUs3mJxwLQ8m9H811zZfBxxphUFPO6JO0raNClatAquq3M0cdqUoykjVT4XcfKDRtYJGY3J2Pr+ea8Bqj8KNSOg==;24:NtUyc6L8OAQpWhWPyPF23nE5xdw0nPW0Q9kirgqJHu0H5QuCKrhxqggb34epLba8FestAvHI8qr5yjwQybVrdNERfivyktMu7+4DPahQa5g=;20:yxg3fS5reQSqsYrnWmGEjvQ/UZ4v45K6zVUpDVFbFcWKycKVV1yT2bQ4l3mDDknsk+imHxgPTIgBL5q3+679dw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2015 04:03:05.5405 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB0868 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5637 Lines: 249 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 { + 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/