From patchwork Mon Jun 12 19:43:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rezvanov X-Patchwork-Id: 9782667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 08F9F602DA for ; Mon, 12 Jun 2017 19:43:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5335284EE for ; Mon, 12 Jun 2017 19:43:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9311286B7; Mon, 12 Jun 2017 19:43:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5CE3D284EE for ; Mon, 12 Jun 2017 19:43:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=k39Egat2k/2tGKNl8UPfFCza7m8+LzdmoCk7sjBmv5g=; b=sTX bTaaf2pLyLpOnFwJ+uKCyc5I61ahSwrEMMlPErqy7G7Ujxyb/FZQ5uNZFih0O0ADZH0VlwLbDry3T Rf8MC+oxqw2H9XIZQ0HjuroQaQVJd3LhI/SFnPOe/LbXVWKpnAbJKkrUUhb2B1G7YdvnshWowhCPw 0Jo+ixeDFZmMNj7MMdWF7zlAmWOVgdFcUEDYUPotQUyYOhJPZGaoZm/oWekh3PPxOzEu4QKxT+/CK rtMlkNg0jd35KJQASZ2ewjgUB/9Ry574H7i/Qk4SOfuwlMS1Oaftj8iuRrqF6RAtKsPFsH587Ab6F zDnHDDPALggcoadiSfR6LwQ3ccBeutg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKVFi-0002xu-KV; Mon, 12 Jun 2017 19:43:54 +0000 Received: from forward14j.cmail.yandex.net ([2a02:6b8:0:1630::b4]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dKVFe-0002wk-Sv for linux-arm-kernel@lists.infradead.org; Mon, 12 Jun 2017 19:43:53 +0000 Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [77.88.29.86]) by forward14j.cmail.yandex.net (Yandex) with ESMTP id BE21D20B51; Mon, 12 Jun 2017 22:43:24 +0300 (MSK) Received: from smtp3p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3p.mail.yandex.net (Yandex) with ESMTP id 8B53413200A4; Mon, 12 Jun 2017 22:43:22 +0300 (MSK) Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Yo074mAb0a-hMP4cWkI; Mon, 12 Jun 2017 22:43:22 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1497296602; bh=jT/FFXtPtSXvD7o6CbZMqvr91f1iaDE/1/HD9rIaFJI=; h=From:To:Cc:Subject:Date:Message-Id; b=CIL4pWeVhlpSqaNZkhmvDjZN5O3w4zWjT6LJIrNcecIcUAXyLlRSNcbn0qwM7w+Zu Qd4sAnMgZIe50ymSGK9tYbYxHnlE/atlZZKQA4t4k+45FzkN0dY6y2GwrxWtkYUtB/ aZE/5tAz51Y8uCw9r9NwGDFvI6Erf0s9lQX1DHQ8= Authentication-Results: smtp3p.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0,1 0,1 705703002 From: Dmitry Rezvanov To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: dts: at91: add support DT for AC97 driver for at91sam9g45 Date: Tue, 13 Jun 2017 04:43:14 +0900 Message-Id: <20170612194314.19289-1-dmitry.rezvanov@yandex.ru> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170612_124351_328636_7A86773C X-CRM114-Status: GOOD ( 10.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dmitry Rezvanov MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Dmitry Rezvanov --- arch/arm/boot/dts/at91sam9g45.dtsi | 23 +++++++++++++++++++++-- arch/arm/boot/dts/at91sam9m10g45ek.dts | 10 +++++++--- sound/atmel/ac97c.c | 3 ++- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi index e567d5fd3f9d..3e9b17935fb3 100644 --- a/arch/arm/boot/dts/at91sam9g45.dtsi +++ b/arch/arm/boot/dts/at91sam9g45.dtsi @@ -715,7 +715,15 @@ AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD15 periph A */ }; }; - + ac97 { + pinctrl_ac97: ac97-0 { + atmel,pins = + ; /* PD9 periph A AC97CK pin */ + }; + }; spi0 { pinctrl_spi0: spi0-0 { atmel,pins = @@ -1028,7 +1036,7 @@ clock-names = "pclk"; status = "disabled"; }; - + adc0: adc@fffb0000 { #address-cells = <1>; #size-cells = <0>; @@ -1154,6 +1162,17 @@ status = "disabled"; }; + ac97: sound@fffac000 { + compatible = "atmel,at91sam9g45-ac97c"; + reg = <0xfffac000 0x4000>; + interrupts = <24 IRQ_TYPE_LEVEL_HIGH 4>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ac97>; + clocks = <&ac97_clk>; + clock-names = "ac97_clk"; + status = "disabled"; + }; + usb2: gadget@fff78000 { #address-cells = <1>; #size-cells = <0>; diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts index 2400c99134f7..1f4173a1a90b 100644 --- a/arch/arm/boot/dts/at91sam9m10g45ek.dts +++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts @@ -151,7 +151,7 @@ }; }; - spi0: spi@fffa4000{ + spi0: spi@fffa4000 { status = "okay"; cs-gpios = <&pioB 3 0>, <0>, <0>, <0>; mtd_dataflash@0 { @@ -161,11 +161,15 @@ }; }; + ac97: sound@fffac000 { + status = "okay"; + }; + usb2: gadget@fff78000 { atmel,vbus-gpio = <&pioB 19 GPIO_ACTIVE_HIGH>; status = "okay"; }; - + adc0: adc@fffb0000 { pinctrl-names = "default"; pinctrl-0 = < @@ -306,7 +310,7 @@ linux,default-trigger = "mmc0"; }; }; - + gpio_keys { compatible = "gpio-keys"; diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 6dad042630d8..8ffb3744e435 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c @@ -908,7 +908,8 @@ static void atmel_ac97c_reset(struct atmel_ac97c *chip) #ifdef CONFIG_OF static const struct of_device_id atmel_ac97c_dt_ids[] = { { .compatible = "atmel,at91sam9263-ac97c", }, - { } + { .compatible = "atmel,at91sam9g45-ac97c"}, + {} }; MODULE_DEVICE_TABLE(of, atmel_ac97c_dt_ids);