From patchwork Sat Jul 18 20:50:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 11672061 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B535413B4 for ; Sat, 18 Jul 2020 20:51:04 +0000 (UTC) Received: by mail.kernel.org (Postfix) id B0BD622BF3; Sat, 18 Jul 2020 20:51:04 +0000 (UTC) Delivered-To: soc@kernel.org Received: from v6.sk (v6.sk [167.172.42.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81AA722B4E; Sat, 18 Jul 2020 20:51:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81AA722B4E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=v3.sk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lkundrak@v6.sk Received: from localhost (v6.sk [IPv6:::1]) by v6.sk (Postfix) with ESMTP id 6C08A60D36; Sat, 18 Jul 2020 20:51:03 +0000 (UTC) From: Lubomir Rintel To: Arnd Bergmann , Olof Johansson List-Id: Cc: SoC Team , Rob Herring , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Lubomir Rintel Subject: [PATCH v2 09/13] ARM: dts: mmp2-olpc-xo-1-75: Enable audio support Date: Sat, 18 Jul 2020 22:50:15 +0200 Message-Id: <20200718205019.184927-10-lkundrak@v3.sk> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200718205019.184927-1-lkundrak@v3.sk> References: <20200718205019.184927-1-lkundrak@v3.sk> MIME-Version: 1.0 This enables the audio SRAM, DMA engine, I2S interface, and codec, hooks them together and adds a audio-graph-card instance. It also removes the jack gpios from the gpio-keys instance, because the audio jack driver registers an input device. Signed-off-by: Lubomir Rintel --- arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 65 ++++++++++++++++++------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts index 392f546f7915b..5f1da58550987 100644 --- a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts +++ b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts @@ -57,24 +57,6 @@ tablet_mode { linux,code = ; wakeup-source; }; - - microphone_insert { - label = "Microphone Plug"; - gpios = <&gpio 96 GPIO_ACTIVE_HIGH>; - linux,input-type = ; - linux,code = ; - debounce-interval = <100>; - wakeup-source; - }; - - headphone_insert { - label = "Headphone Plug"; - gpios = <&gpio 97 GPIO_ACTIVE_HIGH>; - linux,input-type = ; - linux,code = ; - debounce-interval = <100>; - wakeup-source; - }; }; i2c { @@ -123,6 +105,18 @@ wlan_pwrseq: pwrseq0 { reset-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>; }; + sound-card { + compatible = "audio-graph-card"; + label = "OLPC XO"; + dais = <&sspa0_dai>; + routing = "Headphones", "HPOL", + "Headphones", "HPOR", + "MIC2", "Mic Jack"; + widgets = "Headphone", "Headphones", "Microphone", "Mic Jack"; + hp-det-gpio = <&gpio 97 GPIO_ACTIVE_HIGH>; + mic-det-gpio = <&gpio 96 GPIO_ACTIVE_HIGH>; + }; + soc { axi@d4200000 { ap-sp@d4290000 { @@ -197,6 +191,14 @@ audio-codec@1a { compatible = "realtek,alc5631"; reg = <0x1a>; status = "okay"; + + port { + rt5631_0: endpoint { + mclk-fs = <256>; + clocks = <&audio_clk 0>; + remote-endpoint = <&sspa0_0>; + }; + }; }; }; @@ -243,3 +245,30 @@ camera0_0: endpoint { }; }; }; + +&asram { + status = "okay"; +}; + +&adma0 { + status = "okay"; +}; + +&audio_clk { + status = "okay"; +}; + +&sspa0 { + status = "okay"; + dmas = <&adma0 0>, <&adma0 1>; + dma-names = "tx", "rx"; + + sspa0_dai: port { + sspa0_0: endpoint { + remote-endpoint = <&rt5631_0>; + frame-master; + bitclock-master; + dai-format = "i2s"; + }; + }; +};