From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933582AbcE3PQT (ORCPT ); Mon, 30 May 2016 11:16:19 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:43556 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753551AbcE3PQM (ORCPT ); Mon, 30 May 2016 11:16:12 -0400 From: Joao Pinto To: linux-kernel@vger.kernel.org Cc: ijc+devicetree@hellion.org.uk, rmk+kernel@armlinux.org.uk, linux@armlinux.org.uk, liviu.dudau@arm.com, ryan.harkin@linaro.org, Joao Pinto Subject: [PATCH 2/3] tda998x: adding sound support for Juno in the DT Date: Mon, 30 May 2016 16:15:53 +0100 Message-Id: <5c715fe20e6a6a280eb95e3521b36cf718c3ea3e.1464619185.git.jpinto@synopsys.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds the sound over HDMI feature to the Juno Device Tree. Signed-off-by: Joao Pinto --- arch/arm64/boot/dts/arm/juno-base.dtsi | 92 +++++++++++++++++++---- 1 file changed, 78 insertions(+), 14 deletions(-) diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi b/arch/arm64/boot/dts/arm/juno-base.dtsi index 68ccc39..50c0c9a 100644 --- a/arch/arm64/boot/dts/arm/juno-base.dtsi +++ b/arch/arm64/boot/dts/arm/juno-base.dtsi @@ -105,17 +105,17 @@ clocks { compatible = "arm,scpi-clocks"; - scpi_dvfs: scpi-dvfs { + scpi_dvfs: scpi_clocks@0 { compatible = "arm,scpi-dvfs-clocks"; #clock-cells = <1>; clock-indices = <0>, <1>, <2>; - clock-output-names = "atlclk", "aplclk","gpuclk"; + clock-output-names = "atlclk", "aplclk","clk_mali"; }; - scpi_clk: scpi-clk { + scpi_clk: scpi_clocks@3 { compatible = "arm,scpi-variable-clocks"; #clock-cells = <1>; - clock-indices = <3>; - clock-output-names = "pxlclk"; + clock-indices = <3>, <4>, <5>; + clock-output-names = "pxlclk0", "pxlclk1", "i2sclk"; }; }; @@ -127,7 +127,7 @@ /include/ "juno-clocks.dtsi" - dma@7ff00000 { + dma0: dma@7ff00000 { compatible = "arm,pl330", "arm,primecell"; reg = <0x0 0x7ff00000 0 0x1000>; #dma-cells = <1>; @@ -144,8 +144,10 @@ ; clocks = <&soc_faxiclk>; clock-names = "apb_pclk"; + dmas = <&dma0 1>, <&dma0 2>; + dma-names = "rx", "tx"; }; - +/* hdlcd@7ff50000 { compatible = "arm,hdlcd"; reg = <0 0x7ff50000 0 0x1000>; @@ -154,21 +156,21 @@ clock-names = "pxlclk"; port { - hdlcd1_output: hdlcd1-endpoint { + hdlcd1_output: endpoint@0 { remote-endpoint = <&tda998x_1_input>; }; }; }; - +*/ hdlcd@7ff60000 { compatible = "arm,hdlcd"; reg = <0 0x7ff60000 0 0x1000>; interrupts = ; - clocks = <&scpi_clk 3>; + clocks = <&scpi_clk 4>; clock-names = "pxlclk"; port { - hdlcd0_output: hdlcd0-endpoint { + hdlcd0_output: endpoint@0 { remote-endpoint = <&tda998x_0_input>; }; }; @@ -192,13 +194,20 @@ i2c-sda-hold-time-ns = <500>; clocks = <&soc_smc50mhz>; - hdmi-transmitter@70 { + hdmi_transmitter0: hdmi-transmitter@70 { compatible = "nxp,tda998x"; reg = <0x70>; + audio-ports = <0x03>, <0x04>; + audio-port-names = "i2s", "spdif"; + #sound-dai-cells = <1>; port { - tda998x_0_input: tda998x-0-endpoint { + tda998x_0_input: endpoint@0 { remote-endpoint = <&hdlcd0_output>; }; + + tda998x_0_output: endpoint@1 { + remote-endpoint = <&hdmi0_connector_output>; + }; }; }; @@ -206,9 +215,64 @@ compatible = "nxp,tda998x"; reg = <0x71>; port { - tda998x_1_input: tda998x-1-endpoint { +/* tda998x_1_input: endpoint@0 { remote-endpoint = <&hdlcd1_output>; }; +*/ + tda998x_1_output: endpoint@1 { + remote-endpoint = <&hdmi1_connector_output>; + }; + }; + }; + }; + + soc_i2s: i2s@7ff90000 { + compatible = "snps,designware-i2s"; + reg = <0x0 0x7ff90000 0x0 0x1000>; + clocks = <&scpi_clk 5>, <&soc_refclk100mhz>; + clock-names = "i2sclk", "apb_pclk"; + #sound-dai-cells = <0>; + dmas = <&dma0 5>; + dma-names = "tx"; + }; + + hdmi_audio: hdmi_audio@0 { + compatible = "linux,hdmi-audio"; + #sound-dai-cells = <0>; + status = "okay"; + }; + + sound { + compatible = "simple-audio-card"; + + simple-audio-card,format = "i2s"; + + simple-audio-card,cpu { + sound-dai = <&soc_i2s>; + }; + + simple-audio-card,codec { + sound-dai = <&hdmi_transmitter0 0>; + }; + + }; + + hdmi0: connector@0 { + compatible = "hdmi-connector"; + type = "a"; + port { + hdmi0_connector_output: endpoint { + remote-endpoint = <&tda998x_0_output>; + }; + }; + }; + + hdmi1: connector@1 { + compatible = "hdmi-connector"; + type = "a"; + port { + hdmi1_connector_output: endpoint { + remote-endpoint = <&tda998x_1_output>; }; }; }; -- 1.8.1.5