From patchwork Tue Jul 19 23:22:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 72383 Delivered-To: patches@linaro.org Received: by 10.140.29.52 with SMTP id a49csp332095qga; Tue, 19 Jul 2016 16:23:10 -0700 (PDT) X-Received: by 10.66.89.66 with SMTP id bm2mr69025099pab.154.1468970578548; Tue, 19 Jul 2016 16:22:58 -0700 (PDT) Return-Path: Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com. [2607:f8b0:400e:c03::22e]) by mx.google.com with ESMTPS id g9si3093354pfk.211.2016.07.19.16.22.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2016 16:22:58 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c03::22e as permitted sender) client-ip=2607:f8b0:400e:c03::22e; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c03::22e as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pa0-x22e.google.com with SMTP id fi15so11506661pac.1 for ; Tue, 19 Jul 2016 16:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cfEhMeTiEFg72jqz42uWYg4y9YPiZLtyP61nv/x0ZPY=; b=IowZpI8jLhdakdiUF+RRi0c6S01VZCsi6MRArTu0fIRbzWP6HZhV4MMDvJj7kW4M3G aoPU1NWKBcrSI1uzQrnQEQUISD0Fw+6fZhh/AxxMiLcGIB6ZJq9vpIluRD8f1Tw/uA4G yBNTF+szhd9eKyFOTA+fgfbKlRdyEKl1yn28U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cfEhMeTiEFg72jqz42uWYg4y9YPiZLtyP61nv/x0ZPY=; b=MRC4X3ACkDiaYCatA2GzVs2llpZB21heHHs/h3/QFJEyfb0TzoxEJsoz1Uk6j/zD/d 6cVLgtjwD4GcARf8sAmC8pYhlmvYPeBCmciBXizidbNFHw1L9P0tCWILzDONN1Unk30p KbP7x/H7KV4SVXXWVqjOx3yY1b0PdMzLrx/Td/C9ailUu9QvRcYmcAVplCth0TShri5e wCItJxfEy6ivWT327fjXwu7dVCxQzImo0kM3AacE4rfthjNtDQ2mWQnZG6FcOdvBJfbg 5oD0qja5qlOCtDw1t3EMhxzjaTzn4M18In18a9+LVxW448OsOTHQOMemMERamBqa4hAo LGiQ== X-Gm-Message-State: ALyK8tLlk7XTmI9ZZLp4JkiZhn01+khNf/bGJs8/eomcVw/ONwdmmVueKAS+RntE4VuPlYMKe/o= X-Received: by 10.66.244.199 with SMTP id xi7mr68950335pac.127.1468970578261; Tue, 19 Jul 2016 16:22:58 -0700 (PDT) Return-Path: Received: from localhost.localdomain (c-73-67-244-238.hsd1.or.comcast.net. [73.67.244.238]) by smtp.gmail.com with ESMTPSA id 81sm7303604pfm.90.2016.07.19.16.22.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Jul 2016 16:22:57 -0700 (PDT) From: John Stultz To: lkml Cc: Zhangfei Gao , Jingoo Han , Krzysztof Kozlowski , Maxime Ripard , Vinod Koul , Dan Williams , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Wei Xu , Rob Herring , Andy Green Subject: [RFC][PATCH 10/10 v2] dts: hi6220: Add k3-dma and i2s/hdmi audio support Date: Tue, 19 Jul 2016 16:22:46 -0700 Message-Id: <1468970566-24498-11-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468970566-24498-1-git-send-email-john.stultz@linaro.org> References: <1468970566-24498-1-git-send-email-john.stultz@linaro.org> Add entry for k3-dma driver and i2s/hdmi audio devices. This enables HDMI audio output. Cc: Zhangfei Gao Cc: Jingoo Han Cc: Krzysztof Kozlowski Cc: Maxime Ripard Cc: Vinod Koul Cc: Dan Williams Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Wei Xu Cc: Rob Herring Cc: Andy Green Signed-off-by: John Stultz --- v2: * Split core i2s entry into dtsi and hdmi specific bits into hikey dts arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 22 ++++++++++++++++++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 31 ++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) -- 1.9.1 diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts index e92a30c..6979c55 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -221,6 +221,28 @@ }; }; }; + + hi6210_hdmi_codec: hi6210_hdmi_codec { + compatible = "hisilicon,hi6210-hdmi-audio-codec"; + #sound-dai-cells = <0>; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "hikey-hdmi"; + simple-audio-card,format = "i2s"; + + simple-audio-card,bitclock-master = <&sound_master>; + simple-audio-card,frame-master = <&sound_master>; + + sound_master: simple-audio-card,cpu { + sound-dai = <&i2s0>; + }; + + simple-audio-card,codec { + sound-dai = <&hi6210_hdmi_codec>; + }; + }; }; &uart2 { diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index 189d215..9c60bff 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -228,6 +228,8 @@ compatible = "simple-bus"; #address-cells = <2>; #size-cells = <2>; + #sound-dai-cells = <0>; + interrupt-parent = <&gic>; ranges; sram: sram@fff80000 { @@ -325,6 +327,19 @@ status = "disabled"; }; + dma0: dma@f7370000 { + compatible = "hisilicon,k3-dma-1.0"; + reg = <0x0 0xf7370000 0x0 0x1000>; + #dma-cells = <1>; + dma-channels = <15>; + dma-requests = <32>; + interrupts = <0 84 4>; + clocks = <&sys_ctrl HI6220_EDMAC_ACLK>; + dma-no-cci; + dma-type = "hi6220_dma"; + status = "ok"; + }; + dual_timer0: timer@f8008000 { compatible = "arm,sp804", "arm,primecell"; reg = <0x0 0xf8008000 0x0 0x1000>; @@ -800,6 +815,22 @@ #thermal-sensor-cells = <1>; }; + i2s0: hi6210_i2s { + compatible = "hisilicon,hi6210-i2s"; + reg = <0x0 0xf7118000 0x0 0x8000>, /* i2s unit */ + <0x0 0xf7030000 0x0 0x400>, /* syscon */ + <0x0 0xf7032000 0x0 0x400>; /* pmctrl */ + interrupts = <0 123 0x4>; /* 155 "DigACodec_intr"-32 */ + pinctrl-names = "default"; + pinctrl-0 = <&bt_pmx_func &bt_cfg_func>; + clocks = <&sys_ctrl HI6220_DACODEC_PCLK>, + <&sys_ctrl HI6220_BBPPLL0_DIV>; + clock-names = "dacodec", "i2s-base"; + dmas = <&dma0 15 &dma0 14>; + dma-names = "rx", "tx"; + #sound-dai-cells = <0>; + }; + thermal-zones { cls0: cls0 {