From patchwork Wed Jul 15 08:02:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alison Wang X-Patchwork-Id: 6794461 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 EAA26C05AC for ; Wed, 15 Jul 2015 08:11:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E96332052F for ; Wed, 15 Jul 2015 08:11:20 +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 EBFAB20527 for ; Wed, 15 Jul 2015 08:11:19 +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 1ZFHjU-00063c-86; Wed, 15 Jul 2015 08:08:00 +0000 Received: from mail-bl2on0145.outbound.protection.outlook.com ([65.55.169.145] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZFHjR-0005rv-5L for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2015 08:07:58 +0000 Received: from DM2PR03CA0035.namprd03.prod.outlook.com (10.141.96.34) by BY1PR0301MB0871.namprd03.prod.outlook.com (10.160.194.141) with Microsoft SMTP Server (TLS) id 15.1.219.17; Wed, 15 Jul 2015 08:07:34 +0000 Received: from BN1BFFO11FD035.protection.gbl (2a01:111:f400:7c10::1:186) by DM2PR03CA0035.outlook.office365.com (2a01:111:e400:2428::34) with Microsoft SMTP Server (TLS) id 15.1.219.17 via Frontend Transport; Wed, 15 Jul 2015 08:07:33 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; kernel.org; 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 BN1BFFO11FD035.mail.protection.outlook.com (10.58.144.98) with Microsoft SMTP Server (TLS) id 15.1.213.8 via Frontend Transport; Wed, 15 Jul 2015 08:07:33 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t6F87Tjx010027; Wed, 15 Jul 2015 01:07:30 -0700 From: Alison Wang To: , , Subject: [PATCH v2] ARM: dts: ls1021a: audio: Add dts nodes for audio on LS1021A Date: Wed, 15 Jul 2015 16:02:46 +0800 Message-ID: <1436947366-36547-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; BN1BFFO11FD035; 1:HnqUdY5ck6nVxeEWIqWz6QBaI77Ucv4X+kEAf7GHg9+c5SiGFKALBhU+8uNQRAZ00zxrwf8a7J2TXEOxPx3qgtkvd/hbo045QsPE6wmWi4Ju9nYMMhRyGFzLSJ0/L9yfBEPACesBVr6YPZHu4RqaSyDhrMOd64QdWFo+zdOsSz/3z/3ECLeL4t6v6dpzhR3f9qUBwwbemPBQfMYgI7sqfhVnJ+Ldc8dl9UJmfmG99YK+aqX6L022eu9+I+Q8wHrtxNuSfQsY6Sc4y2DOKP44YgADRwhIpfhvK8nEPCymvEFU8UZ8hfQY67elRps1b7Poim59RrqPJwElhJ0LsaNG6d5Z8XWsvgiEk3sVHDRp9ClaAjs6rbqyXO43PLrszRLY+xywH2dZ2fc5qbyh4OCPOu/ZMgK5hXG4Who6fOrHrVhkAo5eMjtVaTL9rLOtOfUK X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(199003)(189002)(50466002)(77156002)(62966003)(189998001)(50226001)(105606002)(48376002)(575784001)(2201001)(5001960100002)(106466001)(47776003)(19580405001)(6806004)(87936001)(36756003)(85426001)(19580395003)(92566002)(50986999)(5003940100001)(5001920100001)(229853001)(104016003)(77096005)(5001770100001)(46102003)(33646002)(42262002)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB0871; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0871; 2:961dHvV2Mz5NzN1j96fcWOkDIFm+jZAh3uiL0jBrELm1nJolvet1xZagAZkvubZA; 3:mumf1BIvS5ZOpHfhNWI9zzgeMW/rOyJB95VbY6vNrLVvFEm9hQQCmXD0TzSGFWuHNp0SCqy5ydIChf0RpXg6xqROAKpUjsX8d7bYEvK+cJlDfJzCtWDI69/Vdti92DjFkgo59S6VslWbxzxb4Mh7G0R/RsrEEU5NrZMlfujv0ImcPfPJyIThJOqtHtxhqyWc1oMtFR854IaTAuJ/3M5Hoiv1YNIAebcIsrQfKt7ReMA=; 25:1BUNTekLbTsNtxBAJG3tpcHPrLJNVBMVSR43dMmVbNm5s2rlpBoFV8GfE5x+6BGgm5faNus/l44IuHhxHkB2NyXN8ZX50stPA3it4YG/Qe7ODfKIYNmQfsEmZn4sJprph9FzyYOJ2wSamdDRVIuU7oekDwvq7l5RDoQ1eTfUt03iIqAoot3P88ECoKrWAdFLZSmA9Pf3qtTymfiwrLK8G7l4RvPGVZ5/92Ib3F6UR3kv+7fSWwRl6Hi0+EG7XaGYe5i2dr0ktj49UdAQTbWFvQ==; 20:dI/ovIcpTvnhx01mcWQttPpWpcrN6IXIa8nw5IB4PuL1zOd0ByTobkixH3PqjghiVPJHdXazh4PA3m0T38DMnroCHF4razXbpeD4c+c0bylp4Wy0yQfDgiX/Y/bpLdK5romF+2540+gXh4P3NyekCCsdf9RrCYLmhVapYYsbgDLGC0oMAROGx2fsN3EJLvx9whP2CQKv1IRyIrxMncKDUga5fpcpwTez81EUVd86AroahwNi2tL0EzQh5brHCJKxg+FqkMZ+wVts6QrkBuaaf/3vYLumNhqqrvixU5RNGn6rHD468gBpLDRrHt97GX/o712kcHi1WMRw4l7RUlkLEAq2u8ZMwmiVVgq4RX/+6jM= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB0871; BY1PR0301MB0871: 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:BY1PR0301MB0871; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB0871; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0871; 4:29t45HkAz+xbA7t9QbywvjcTggFbLQKf02q6mvu5X5A3YD01iamdMyy3kH0+fJjp/nrylCFtYY3Mz6L0TqBV6cnVEu0cT/rfbtcr9rMtWoF01dGF0mEVgbnBWg9vR9yTI99nq9GFW+tuX2Zr3IetVz7zjyETUJ1D64STUM7K96yNpZM/vQXXfJhTlFl1VYU+yQ4qPtMfmkeHWSawJTHGwk5nWF+JEz//9Sko2K3r48er6QnpudN5ZgP6JpRo4ZpwEb97mx8mms9GOkuoBqFO1Q0TtUh/OwKNqNZJntsih5s= X-Forefront-PRVS: 0638FD5066 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0871; 23:Nwm8ojHbOYq3j3M+CcT02W9PTZ+YKt8ojawwkGrGF6WdGm0iwBvJAJIAEKZyaxZ82qkcEJexc4Awt2Y2ePFS8qs4epZ/8oab/eLXgB2ZMkyuykP88EgmZXNf9x3Ls0mN1223BvhSthIGPxKuIPYLK5f9mOXsEWUsiMCIma8eb32U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Ae1IGbCudWv4DoAIrkcISiitpfTZypG2/JxBpUy2l1/lN2hmdgdp8xQIcHEaZf3tJa1ZPD3qkmUizIpvRncw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2015 08:07:33.0429 (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: BY1PR0301MB0871 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150715_010757_485722_503CAD43 X-CRM114-Status: GOOD ( 14.84 ) 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: Shawn Guo , 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=-5.6 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 Signed-off-by: Shawn Guo --- Changes since v1: - Remove "clocks" container, and use a unit node name. arch/arm/boot/dts/ls1021a-qds.dts | 69 +++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/ls1021a-twr.dts | 61 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/ls1021a.dtsi | 14 ++++---- 3 files changed, 138 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts index f14731b..f5f4194 100644 --- a/arch/arm/boot/dts/ls1021a-qds.dts +++ b/arch/arm/boot/dts/ls1021a-qds.dts @@ -58,6 +58,55 @@ enet0_sgmii_phy = &sgmii_phy1c; enet1_sgmii_phy = &sgmii_phy1d; }; + + sys_mclk: clock-mclk { + 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 { @@ -83,6 +132,7 @@ status = "okay"; pca9547: mux@77 { + compatible = "nxp,pca9547"; reg = <0x77>; #address-cells = <1>; #size-cells = <0>; @@ -137,6 +187,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>; + }; + }; }; }; @@ -235,6 +300,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 a2c591e..db41e4f 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,55 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + sys_mclk: clock-mclk { + 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 { @@ -79,6 +128,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 { @@ -118,6 +175,10 @@ }; }; +&sai1 { + status = "okay"; +}; + &uart0 { status = "okay"; }; diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index 7e9e122..b65f11f 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -350,28 +350,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"; };