From patchwork Mon Jun 12 20:52:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 103674 Delivered-To: patches@linaro.org Received: by 10.140.91.77 with SMTP id y71csp104920qgd; Mon, 12 Jun 2017 13:53:02 -0700 (PDT) X-Received: by 10.99.152.70 with SMTP id l6mr58075142pgo.136.1497300782556; Mon, 12 Jun 2017 13:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497300782; cv=none; d=google.com; s=arc-20160816; b=mFW08qEg8IH1ukRrP/p/5zM1ZWJcMWRUPKAPBgq/8uhIGnC2JCwQmrDsd07Q1I2Yrc yv++CA08bbD+07CkdIcPSjeZBum4k3h3aTswmIYEaKWFCmu31XSD4tTeanKzRPRQNj0y H7mofbXfPH4n82X5C69LXQTv1Pfgh2fgsUqmA8acfxsSBsA9PsDKdAsxZ9gEgLPA5CDk B6NcsZVrb8Sz+sIMoBy+MZLh9pb8XdNHJ7O5iQQQPdPL9ERtCXs5HYFIWPhaetdl5vNL 82V8zAwS5r6XeBa4WsNI3ZasR0sj+pwrq17x5JOzhPrvwW7Hfu6cUNSSGSW1CRXPafWr +jQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=vvnFl2IOa0ehT8YlFIyik1w0TvuUq0V1gNWYD/f9ues=; b=gkBR+iymr7dWntb1ezVSGCuzWhzEy7e/r5f0jUzdqnzpCaR5EXb+Xh2VLsEHRMIf91 9GRMyz8XfkklG9H2G9rXBsAgWncU876CXo9j0r/0R7Smt9rS5PQVaEBOpN1C9M58sZ/0 EJ9eVIgbC3T1ddQ7JgI8dCPbJdkjZFH8DL0dUg7eu2dmxtUwpm85k/B2FKV+dlao6TzM QWxb5dhf2srQiDq97nruNlMSAE68IhCx7ytMKgYRKN1GUz4kYIxAH2CB8c82/Kk9VYWl UvR9e43hylWlPcSwKvbw3Hc2Up/gjMv73m2UdR7MSOO/h2AVgIKuoDVjo0TcEoqVZsVt D47g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::231 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com. [2607:f8b0:400e:c00::231]) by mx.google.com with ESMTPS id h82si7699853pfj.139.2017.06.12.13.53.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 13:53:02 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::231 as permitted sender) client-ip=2607:f8b0:400e:c00::231; 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:c00::231 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-pf0-x231.google.com with SMTP id x63so56371128pff.3 for ; Mon, 12 Jun 2017 13:53:02 -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; bh=vvnFl2IOa0ehT8YlFIyik1w0TvuUq0V1gNWYD/f9ues=; b=cr5TdJZRP7GkWkDSjke8XZUCAlrkUBqMnMIwfldHGI19s8JevMQh57aPoZdxT+WSJX x8eyOEKD/exbgIzNCneljyWyncjHVmQECxviBJ3aK3wx42qhui7c+tYvDiXE9kx9Xy5f p+WTjFT/kQJFsOGYuMIQJlv/C/AyiDIsKvU6Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vvnFl2IOa0ehT8YlFIyik1w0TvuUq0V1gNWYD/f9ues=; b=N+YSM16Uv36FOUc7WWidnKpfvj92Qa4lX3XO98l31T5M1BbJi6RwetTLclQObvReKp dTujRe+xK3Q8R5WwBprkL5peWP5pWvtL1jTtZX5g9qkuUzRxM6Y97gSasDEJ+ZMZS3Ok P2Q4BOOGGDMN7246h4aQEoBQa0kHL4t4vjLNngTicX4YnJYdq490I0eh2+SOGO3g0j22 PK5jq9nj0oOwmzA6GQx3FZlNpJt9dmjmKENl6ikTjnSL68yWFPSa0ohkmgig4wcVO6DV U3ppYJTMwAorn/Bxd/0lqTr5iRTXMd1S4lDT5qGVd6eizzjxrvfWA+honpIFMjHHlUQT abuA== X-Gm-Message-State: AODbwcBHfYPKMrsQ7aZGCZEkQjHtpdLe7WZq0KHY0iyklGtVLwTLwouT 90n4+Qlt/37ehtQe3oY= X-Received: by 10.101.86.11 with SMTP id l11mr25727253pgs.202.1497300782149; Mon, 12 Jun 2017 13:53:02 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id g70sm19861476pfc.47.2017.06.12.13.53.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Jun 2017 13:53:00 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Zhangfei Gao , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Wei Xu , Rob Herring , Andy Green , Dave Long , Guodong Xu , Antonio Borneo , Olof Johansson , Arnd Bergmann Subject: [RESEND x3][PATCH v4] arm64: dts: hi6220: Add k3-dma and i2s/hdmi audio support Date: Mon, 12 Jun 2017 13:52:46 -0700 Message-Id: <1497300766-23675-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 Add entry for k3-dma driver and i2s/hdmi audio devices. This enables HDMI audio output. Cc: Zhangfei Gao Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Wei Xu Cc: Rob Herring Cc: Andy Green Cc: Dave Long Cc: Guodong Xu Cc: Antonio Borneo Cc: Olof Johansson Cc: Arnd Bergmann Signed-off-by: John Stultz --- Olof/Arnd: I'm having trouble getting a repsonse from Wei on this patch, and want to try to avoid missing another merge window. Might you consider queuing this directly? v2: * Split core i2s entry into dtsi and hdmi specific bits into hikey dts v4: * Rework simple-card to use many-dai-links method, as there may be other links in the future --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 16 ++++++++++++++++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 26 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) -- 2.7.4 diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts index 5cdfe73..c916929 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -468,6 +468,21 @@ method = "smc"; }; }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "hikey-hdmi"; + + simple-audio-card,dai-link@0 { /* I2S - HDMI */ + format = "i2s"; + cpu { + sound-dai = <&i2s0 0>; + }; + codec { + sound-dai = <&adv7533>; + }; + }; + }; }; &uart2 { @@ -508,6 +523,7 @@ interrupts = <1 2>; pd-gpio = <&gpio0 4 0>; adi,dsi-lanes = <4>; + #sound-dai-cells = <0>; port { adv7533_in: endpoint { diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index 5013e4b..f2e218c 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -332,6 +332,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>; @@ -805,6 +818,19 @@ #thermal-sensor-cells = <1>; }; + i2s0: i2s@f7118000{ + compatible = "hisilicon,hi6210-i2s"; + reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */ + interrupts = ; /* 155 "DigACodec_intr"-32 */ + 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"; + hisilicon,sysctrl-syscon = <&sys_ctrl>; + #sound-dai-cells = <1>; + }; + thermal-zones { cls0: cls0 {