From patchwork Mon Jan 23 10:41:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 9532403 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 631646042F for ; Mon, 23 Jan 2017 12:19:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49BB827C2D for ; Mon, 23 Jan 2017 12:19:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E1BF28304; Mon, 23 Jan 2017 12:19:02 +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, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 337C527C2D for ; Mon, 23 Jan 2017 12:19:00 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7D449266C2F; Mon, 23 Jan 2017 13:18:59 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id DF28A26686A; Mon, 23 Jan 2017 13:16:40 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8DCC1266B60; Mon, 23 Jan 2017 11:42:28 +0100 (CET) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by alsa0.perex.cz (Postfix) with ESMTP id EB714266B55 for ; Mon, 23 Jan 2017 11:42:25 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: rperier) with ESMTPSA id 8860726842D From: Romain Perier To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Heiko Stuebner Date: Mon, 23 Jan 2017 11:41:49 +0100 Message-Id: <20170123104149.2508-5-romain.perier@collabora.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170123104149.2508-1-romain.perier@collabora.com> References: <20170123104149.2508-1-romain.perier@collabora.com> Cc: Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , linux-rockchip@lists.infradead.org, Sjoerd Simons , Rob Herring , Kumar Gala , Romain Perier Subject: [alsa-devel] [PATCH v4 4/4] arm: dts: Add support for ES8388 to the Radxa Rock 2 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This commit adds the DT definition of the es8388 i2c device found at address 0x10. It also adds the definition for connecting the Rockchip I2S to the es8388 analog output. This commit is based on the initial work that was done by Sjoerd Simons with some improvements. Signed-off-by: Romain Perier --- Changes in v4: - Updated to the new DT binding - Added the property 'rockchip,routing' - Renamed the node sound_es8388 to sound_i2s Changes in v3: None Changes in v2: None arch/arm/boot/dts/rk3288-rock2-square.dts | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-rock2-square.dts b/arch/arm/boot/dts/rk3288-rock2-square.dts index dd3ad2e..6b176b8 100644 --- a/arch/arm/boot/dts/rk3288-rock2-square.dts +++ b/arch/arm/boot/dts/rk3288-rock2-square.dts @@ -86,6 +86,19 @@ #sound-dai-cells = <0>; }; + sound_i2s { + compatible = "rockchip,rk3288-hdmi-analog"; + rockchip,model = "I2S"; + rockchip,i2s-controller = <&i2s>; + rockchip,audio-codec = <&es8388>; + rockchip,routing = "Analog", "LOUT2", + "Analog", "ROUT2"; + rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>; + rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&headphone>; + }; + sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; clocks = <&hym8563>; @@ -173,10 +186,29 @@ }; }; +&i2c2 { + status = "okay"; + + es8388: es8388@10 { + compatible = "everest,es8388", "everest,es8328"; + reg = <0x10>; + AVDD-supply = <&vcca_codec>; + DVDD-supply = <&vcca_codec>; + HPVDD-supply = <&vcca_codec>; + PVDD-supply = <&vcca_codec>; + clocks = <&cru SCLK_I2S0_OUT>; + clock-names = "i2s_clk_out"; + }; +}; + &i2c5 { status = "okay"; }; +&i2s { + status = "okay"; +}; + &pinctrl { ir { ir_int: ir-int { @@ -190,6 +222,13 @@ }; }; + sound { + headphone: headphone { + rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>, + <7 7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + usb { host_vbus_drv: host-vbus-drv { rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;