From patchwork Fri Jul 3 03:58:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alison Wang X-Patchwork-Id: 6712811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9EFC0C05AC for ; Fri, 3 Jul 2015 04:06:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89E6020760 for ; Fri, 3 Jul 2015 04:06:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71204206FE for ; Fri, 3 Jul 2015 04:06:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZAsCy-0001KA-9y; Fri, 03 Jul 2015 04:04:12 +0000 Received: from mail-bl2on0141.outbound.protection.outlook.com ([65.55.169.141] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZAsCG-0001J3-HF for linux-arm-kernel@lists.infradead.org; Fri, 03 Jul 2015 04:03:29 +0000 Received: from BN3PR0301CA0023.namprd03.prod.outlook.com (10.160.180.161) by BN3PR0301MB0868.namprd03.prod.outlook.com (10.160.155.142) with Microsoft SMTP Server (TLS) id 15.1.201.16; Fri, 3 Jul 2015 04:03:06 +0000 Received: from BY2FFO11OLC009.protection.gbl (2a01:111:f400:7c0c::101) by BN3PR0301CA0023.outlook.office365.com (2a01:111:e400:4000::33) with Microsoft SMTP Server (TLS) id 15.1.201.16 via Frontend Transport; Fri, 3 Jul 2015 04:03:06 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11OLC009.mail.protection.outlook.com (10.1.15.0) with Microsoft SMTP Server (TLS) id 15.1.201.10 via Frontend Transport; Fri, 3 Jul 2015 04:03:05 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t63432Ab012399; Thu, 2 Jul 2015 21:03:03 -0700 From: Alison Wang To: , , 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 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+IIXMQ4w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-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150702_210328_795095_3C0B4CAD X-CRM114-Status: GOOD ( 13.80 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alison Wang Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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"; };