Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp591987ybh; Sat, 18 Jul 2020 13:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOtLn6hhUOUb5wpo8oabrfIj58WlkHLNEl0+MPEuJRiveDW8zFHEPl0dU4/4CzLTXZVp1M X-Received: by 2002:a17:906:c415:: with SMTP id u21mr14072594ejz.45.1595105583584; Sat, 18 Jul 2020 13:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595105583; cv=none; d=google.com; s=arc-20160816; b=U/bOH6ZTAPNlsyw8xhaA1OVmdiETL2AtfjarPoie7z91qeHRChvNSZBAaAmYLhuobW trxI/N9z80TtuvArAx8qpx7XWG06k2i4V2guEPl5raPpNvax9aYL4Vr8HKQO/dwWKgKk yrAPr+oe8GffIGbETHx0zJzvn4MgwxjaBzykV/p5E4DuYlkPmli058C0NyLx4tbZXVrM HJHOUocdY0rrrA6eWQHhJRzVIaj7GE8jKRmdei+WnS/JwUfFSK0a8OQgYyMQoXIiMi0I 7e8feUhtaqkx0R/smGkDotOvn/IcWDbENu4WD5GgKGsbiKXjfkhHSsOl05Q2kwTVBMnP ufkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+rf/8bsU/BzbWJcqF6k8Vy8Ft25YW9u6YMaC5CZ8Fnc=; b=rHoIsKG3bs8uFT9OSeJCLBmnmPfZAYAOrwOSu3AmCKZLfMcnKXdk4z4VGHQYz6YHwm yepVzxh2NJWHKOgR53ZKIzfGzcSWDdGEebI7M0b1y+zzyzzm8pu9DSUgoMeHbazCULod TcZO4QAO9jfSuWyI7tEYqAZYcuFl+rJY7tpcSCjUhvpGveg53VvfzPZqeZBnub8BPAcT T8JxXuMsOHRvXEGNhSNjh7elBt7FzrOqqhGK4n/gSiIZy8gdSzlyZb5ylOW3ENkunAix QVJrOD9zMh84YOuSJ8ZZQoL+0EAWZ5f6VAC2Y2PJwAsZs3fXoiDuQLpcwJO5GqBks3kR 2/iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk7si7561971edb.86.2020.07.18.13.52.41; Sat, 18 Jul 2020 13:53:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728467AbgGRUvf (ORCPT + 99 others); Sat, 18 Jul 2020 16:51:35 -0400 Received: from v6.sk ([167.172.42.174]:37698 "EHLO v6.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727869AbgGRUve (ORCPT ); Sat, 18 Jul 2020 16:51:34 -0400 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 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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"; + }; + }; +}; -- 2.26.2