From patchwork Fri Mar 31 22:06:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 96533 Delivered-To: patches@linaro.org Received: by 10.140.89.233 with SMTP id v96csp923640qgd; Fri, 31 Mar 2017 15:06:10 -0700 (PDT) X-Received: by 10.84.217.68 with SMTP id e4mr5430916plj.99.1490997970879; Fri, 31 Mar 2017 15:06:10 -0700 (PDT) Return-Path: Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com. [2607:f8b0:400e:c05::234]) by mx.google.com with ESMTPS id z62si6210474pgb.391.2017.03.31.15.06.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2017 15:06:10 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::234 as permitted sender) client-ip=2607:f8b0:400e:c05::234; 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:c05::234 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x234.google.com with SMTP id g2so81601744pge.3 for ; Fri, 31 Mar 2017 15:06:10 -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=g7X1PENlym7QL9yMjXflh01Ms9ZG0+DLwiJ8BMVy/nI=; b=Ep6rZvJTFetPpqu/UnKqKGb5YZOQ063OXnc4h+XK6f0WdMx1pJVRarjuSCSfgoFxoc pxwoQj6pDk8EjEq0tfRRIqq8RuYBgOY+BPju5qkjdOZ6HowoMGJuk2RA3OQYS4ZCF6RL GGLe7TWg7UJPvUWRufLA0JfuSSoq5HF8OrPYk= 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:in-reply-to :references; bh=g7X1PENlym7QL9yMjXflh01Ms9ZG0+DLwiJ8BMVy/nI=; b=J6jtrmuydq4gN3NHTa6TlcRrhtIPJtFgZwxeYnMpTsMpChezINEFH200lwM9t0mWX0 yEIPjJ6Tu8NIeeZ4EXhAvlw6Qqzfou7+r3OkNStVePNplNdSGwKeMJPPTBquUD2Do0lA IjP7wmaFPJ8yxTORWZgi5oUIabDXFu+87PLFeReQ8t1GpVsBdClBa0IKqwJ3ZSsOlv5C E9hW01ia6kafZGG9SWHHEG2a4Ep4720lFJ+B7BFhfH/G3M8SEwzbHVCFMVa+8KiTwJKU 1jPC8lAyfSWzqC/Bu+cSZBDyq1EVbe0V0FXFp32AFLoxX7W6U/L+1cZVxS8qgGfNk1sW 069w== X-Gm-Message-State: AFeK/H0OUh+RZxGi3sNHSTFwCL4UVeqoRKLNY9A4hL4FEVsjcEpLxWxj4dbb0H/RQ4LfdAsGB/A= X-Received: by 10.98.102.147 with SMTP id s19mr4519278pfj.202.1490997970545; Fri, 31 Mar 2017 15:06:10 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id 11sm12317990pgf.28.2017.03.31.15.06.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 31 Mar 2017 15:06:09 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , 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: [PATCH 3/3 v4] arm64: dts: hi6220: Add k3-dma and i2s/hdmi audio support Date: Fri, 31 Mar 2017 15:06:01 -0700 Message-Id: <1490997961-31937-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490997961-31937-1-git-send-email-john.stultz@linaro.org> References: <1490997961-31937-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 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 dba3c13..81a3ce1 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -406,6 +406,21 @@ }; }; }; + + 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 { @@ -446,6 +461,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 470461d..9033f5a 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>; @@ -831,6 +844,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 {