From patchwork Wed Jun 14 18:25:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 105574 Delivered-To: patches@linaro.org Received: by 10.140.91.77 with SMTP id y71csp425448qgd; Wed, 14 Jun 2017 11:25:28 -0700 (PDT) X-Received: by 10.84.224.206 with SMTP id k14mr1519776pln.195.1497464728226; Wed, 14 Jun 2017 11:25:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497464728; cv=none; d=google.com; s=arc-20160816; b=l8S56rV1u1bA4zzSkgqVNidyr/pyaxKita0+ofDjKphRCcwaStc7lu0t48v7we/wO0 FC7KM3x0KbL5Z5BqC8HI0iurOEluDzcQO9NTqH1Lx6m53tG8yVDy+j67YvjSopyIzBlT 6se8iKXEd02sJyuSE47pbea9IWCZF3bhCR2LFgMgB3ZjyuIwKzlhCGK8M1TypMlmrYk8 YuwegqsWH5YjY2z/ePfikrJ3/03bZggKp2eLSQduvAfjjoW3aad5g4+zr5MDPVReopwr tMVVUttJkjusjfzdJ42+LPMpSoM5/KzWXAcJ3IPVmzSk1qWTMLgdQkdlYZMZOQBrkCcB R3CQ== 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=ffJPmnUZUsK/nzIIMGXYoXTYcGCs63gGdpaWIZB7cGU=; b=UFdmEOLhe1qxQQsx+9Alu3e94aJocf4VEIfTsk8X2pPpD/CUKeWuWd1y+xWZlGy3Fz QrNEfLG4Msjd63aQKwr8DLJkxM2CFJ6kmguY1pv/5p8QbnCcNPYNxHT/rTVjKDp0jFGM 7lcCIaI0JUNIPDS5eXLOosYg/s47Wi8KUvNrq+WHk3MxGxwmWGjibljArCURk7brs3iA aoGJjqAkea2nf0Vk9Tky0FJrFRXR9DsjuUso7r0DWG1TBcBaBw0z4BmkFVZDsMHusTjU OpjFPgurISSwaLv8MOyQ0jgoUTI4E4feCBvmM+woXyMVWr1QktidhF30tBQcdW4ML94B w4nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=fWZKBw6u; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22e 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-x22e.google.com (mail-pf0-x22e.google.com. [2607:f8b0:400e:c00::22e]) by mx.google.com with ESMTPS id 97si478543plc.447.2017.06.14.11.25.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2017 11:25:28 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22e as permitted sender) client-ip=2607:f8b0:400e:c00::22e; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=fWZKBw6u; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22e 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-x22e.google.com with SMTP id 83so4184904pfr.0 for ; Wed, 14 Jun 2017 11:25:28 -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=ffJPmnUZUsK/nzIIMGXYoXTYcGCs63gGdpaWIZB7cGU=; b=fWZKBw6uwTuwI5NW9w1Wq4DgO5GK03z+n9pJrZfZX9nXi/1Zj6+H/WNh8ZdRdza/Yh TX9U/lvBADpddEwkbFfSjODkcaU60V89nQQfDNFtn0Fo17apAvoxpILqoS9LFebX67J3 8+ZZfHKWUWQXQFM45jJe8nXBvT3aNGwqfQu2k= 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=ffJPmnUZUsK/nzIIMGXYoXTYcGCs63gGdpaWIZB7cGU=; b=nTjxfbYVPRBycBHU1jznnZqjwqAZj+fkezkBZJwcAlpLp4soyY6976pE7CTkmkWlCa YBHITqbLQAyvMIUnkzwT5p7hD71G5ufOm4IU751N/m7vV0GUXVs6kL9IfwO5BCVzgDrd 5B3Q5ujVfy3XXnLOHRQRt2RKpKWOl3MvVJo94UbpSxL6r4F+reZZ/pttF2zSFrdalNC9 2D6BIVSIjjMmo+5Jx0pWM/bKrJ/a2HrnFP3gDmwzcvtNEiSZ0N4IKcsIQWir963Z/jYZ xlCqF4mU0vrqPJUhItN4CGPfatnqStQJnF6kV85cXWcQ+oJ6ax8IWrgG6XxBD6y+mb6I 8UQw== X-Gm-Message-State: AKS2vOyXwjq5PWs9B1igG1eYSI7n4ePqmKC2yEFgBXDxe6t0uuL2rVSS LhcmB/P3mrEnCiJVteo= X-Received: by 10.84.129.35 with SMTP id 32mr1500410plb.165.1497464727925; Wed, 14 Jun 2017 11:25:27 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id f72sm1150711pfe.4.2017.06.14.11.25.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 11:25:26 -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: [PATCH v5] arm64: dts: hi6220: Add k3-dma and i2s/hdmi audio support Date: Wed, 14 Jun 2017 11:25:17 -0700 Message-Id: <1497464717-32234-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 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 v5: * Rework audio description to use the audio-card-graph method as requested by Mark. --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 34 +++++++++++++++++++++++--- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 26 ++++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) -- 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..2b52630 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -468,6 +468,11 @@ method = "smc"; }; }; + + sound_card { + compatible = "audio-graph-card"; + dais = <&i2s0_port0>; + }; }; &uart2 { @@ -508,10 +513,33 @@ interrupts = <1 2>; pd-gpio = <&gpio0 4 0>; adi,dsi-lanes = <4>; + #sound-dai-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + adv7533_in: endpoint { + remote-endpoint = <&dsi_out0>; + }; + }; + port@2 { + reg = <2>; + codec_endpoint: endpoint { + remote-endpoint = <&i2s0_cpu_endpoint>; + }; + }; + }; + }; +}; - port { - adv7533_in: endpoint { - remote-endpoint = <&dsi_out0>; +&i2s0 { + + ports { + i2s0_port0: port@0 { + i2s0_cpu_endpoint: endpoint { + remote-endpoint = <&codec_endpoint>; + dai-format = "i2s"; }; }; }; 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 {