Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2340832ybz; Sat, 18 Apr 2020 22:41:18 -0700 (PDT) X-Google-Smtp-Source: APiQypKUjSRAP07uv21AZcvd4aiSM7xb48X2waDuzuwKhHIpz3RcatpLubkV1bskVrdmoveZgt/Y X-Received: by 2002:a17:906:9482:: with SMTP id t2mr10101681ejx.241.1587274878618; Sat, 18 Apr 2020 22:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587274878; cv=none; d=google.com; s=arc-20160816; b=rHzusGBU5itaXG6zcWhYXht4F3EePiFaCqEMrrKPGMgoH2GH0FjIfRGd8/vHbu4MJa VDxh5hhF9LIXbI9J+cdnZk366HAUQNgQrWZ07jElHNVXjhOxh8BrC1j8iZt6derjFEPn Kg5czexOEiMTqY+s34Ogciq423FIwbb8Ax0kyYevgu90+04O3jsQO5pwVHaxSmbIR357 EPSKsv0v8coiKtqMzo571W8bU+4G9XWlsTD1MdWqP5fd8o/zvRUqGlTssxhkU1KdoCCh gvGNU0UwOKtkTwMsrTNe03bKKSKCHZQYD+xnZ8C8h8Dbo4uZ09QjIfhzn9T7fMHgDttg V60A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=pLxLZ6U1xkA5yiZbYuidUVm3065atpE39pborliHgTs=; b=sdKJ4rgZSd1u/9zNr7kN/hmSMkm4optiEh3tALR0zNBmnS7cHRxLRV9y//DjL9k6fo nmO+jT7jXUsqTakTjL4hRdIvjZ6EsFFL8dlsvM4wuRqiE4KEoFGHx0wL8TIcDJWVdt6c +g6uRjTaU1+f0PfVfQ1FAzCmF4bxKFIc5ekv6PvjMvJ4W+F2XKnQOO7Nh+zFja7dCjYa 88ZlbEIe3gg8cqxKUrhuxh3nGpq4G/F53c0lLuhrxWOISDpuIYuHBJQ0MJb2BedCRslV XjX5NPdYk3r5T3kd6KFKlVhIaKMoo9jgZzPhrStp1v1+cO7BXQX/S9CRogn6ZlHauQ6d MOOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="XCl2/pww"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d25si17349967edn.519.2020.04.18.22.40.23; Sat, 18 Apr 2020 22:41:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="XCl2/pww"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726048AbgDSFi1 (ORCPT + 99 others); Sun, 19 Apr 2020 01:38:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbgDSFi0 (ORCPT ); Sun, 19 Apr 2020 01:38:26 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EB99C061A0C; Sat, 18 Apr 2020 22:38:25 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id t11so5198404lfe.4; Sat, 18 Apr 2020 22:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pLxLZ6U1xkA5yiZbYuidUVm3065atpE39pborliHgTs=; b=XCl2/pwwSdF8hrlQ62iKaUc1SVIem2w1TxmJRFHTVKB0L5DlsZYLkf1oitqaqKWjuX PbjNSlTYv0ntIeULCPh+Ep5mfAgxzrsxD4KjaWlWnJtFrB5kK3O4UyriyY+tCvoL7qt5 DhDlkpQVRahUG91eU1Xp/FSDGyR+9XXXuaxL1axPDsJnM2kB0z6LaAKzeY6zKW4zcnCw TzSpoSSvCibsRP6vR9+6K9hamlIhZdFBUlgBC0jOkfcpH+HusCQW4t6Ohp4d3ZJeb3Ut CpE73cVa7xcUYhZE6baMrXj6Q9cwmmF9KvoTvw22cNxdgb8PINFsSHiuWYMKkcr8i/GM Vm/A== 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=pLxLZ6U1xkA5yiZbYuidUVm3065atpE39pborliHgTs=; b=pOadM/fXuH8zYTz/3QKTuGOieUAWQhxXu7nEoi/BuX6Xt+g+33x/pRq9B+JWafPy3S ++LjlvdztZdKFFk9Ojm/lE8VN5H83kN5MKcUVxSyXA35rXqdZxF0ytFGjjD/NfYq6bJT wuCEzWwYOH5z68xOs9l7mDbvWCOQd9ezhnD6yUujGta60vmLYJvnMvWKLZYxErWhBybP FJRnebTazfct0HsA3j6BhbZV36IhD69zaBOKLjZ3PvRmmKE5SIucSccUcBe+/R7QZaXm Il5GUu8RymVurFzv9fs+fSHhCA+ByFxmdJ9BRgs/dbsZjVUPnOXmZKqR74JAwLn8cNu1 equw== X-Gm-Message-State: AGi0PuZzwLL2D2H8fPm0XvLKcgwXsW9hWOEiZ8eae1zilonwHNdksn7g xhN0TQB5YXPkTZFytUDYTQM= X-Received: by 2002:ac2:43c6:: with SMTP id u6mr6860631lfl.170.1587274704120; Sat, 18 Apr 2020 22:38:24 -0700 (PDT) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id r23sm20416619ljh.34.2020.04.18.22.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Apr 2020 22:38:23 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Mark Rutland , Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 1/5] arm64: dts: meson: create common hdmi/hdmi-spdif audio dtsi Date: Sun, 19 Apr 2020 05:38:11 +0000 Message-Id: <20200419053815.15731-2-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200419053815.15731-1-christianshewitt@gmail.com> References: <20200419053815.15731-1-christianshewitt@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Create common audio dtsi with the HDMI and HDMI+S/PDIF configs used with many devices that follow Amlogic U200/W400 reference designs. Signed-off-by: Christian Hewitt --- .../amlogic/meson-g12-audio-hdmi-spdif.dtsi | 139 ++++++++++++++++++ .../dts/amlogic/meson-g12-audio-hdmi.dtsi | 96 ++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12-audio-hdmi-spdif.dtsi create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12-audio-hdmi.dtsi diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-audio-hdmi-spdif.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-audio-hdmi-spdif.dtsi new file mode 100644 index 000000000000..e7cc738c0c3a --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-g12-audio-hdmi-spdif.dtsi @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong + * Copyright (c) 2019 Christian Hewitt + */ + +#include + +/ { + spdif_dit: audio-codec-1 { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + status = "okay"; + sound-name-prefix = "DIT"; + }; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "G12-HDMI-SPDIF"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", + "TDMOUT_B IN 2", "FRDDR_C OUT 1", + "TDM_B Playback", "TDMOUT_B OUT", + "SPDIFOUT IN 0", "FRDDR_A OUT 3", + "SPDIFOUT IN 1", "FRDDR_B OUT 3", + "SPDIFOUT IN 2", "FRDDR_C OUT 3"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + dai-link-0 { + sound-dai = <&frddr_a>; + }; + + dai-link-1 { + sound-dai = <&frddr_b>; + }; + + dai-link-2 { + sound-dai = <&frddr_c>; + }; + + /* 8ch hdmi interface */ + dai-link-3 { + sound-dai = <&tdmif_b>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-0 = <1 1>; + dai-tdm-slot-tx-mask-1 = <1 1>; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-tx-mask-3 = <1 1>; + mclk-fs = <256>; + + codec { + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; + }; + }; + + /* spdif hdmi or toslink interface */ + dai-link-4 { + sound-dai = <&spdifout>; + + codec-0 { + sound-dai = <&spdif_dit>; + }; + + codec-1 { + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>; + }; + }; + + /* spdif hdmi interface */ + dai-link-5 { + sound-dai = <&spdifout_b>; + + codec { + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>; + }; + }; + + /* hdmi glue */ + dai-link-6 { + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; + + codec { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&arb { + status = "okay"; +}; + +&clkc_audio { + status = "okay"; +}; + +&frddr_a { + status = "okay"; +}; + +&frddr_b { + status = "okay"; +}; + +&frddr_c { + status = "okay"; +}; + +&spdifout { + pinctrl-0 = <&spdif_out_h_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&spdifout_b { + status = "okay"; +}; + +&tdmif_b { + status = "okay"; +}; + +&tdmout_b { + status = "okay"; +}; + +&tohdmitx { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-audio-hdmi.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-audio-hdmi.dtsi new file mode 100644 index 000000000000..445549c26ba8 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-g12-audio-hdmi.dtsi @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong + * Copyright (c) 2019 Christian Hewitt + */ + +#include + +/ { + sound { + compatible = "amlogic,axg-sound-card"; + model = "G12-HDMI"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", + "TDMOUT_B IN 2", "FRDDR_C OUT 1", + "TDM_B Playback", "TDMOUT_B OUT"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + dai-link-0 { + sound-dai = <&frddr_a>; + }; + + dai-link-1 { + sound-dai = <&frddr_b>; + }; + + dai-link-2 { + sound-dai = <&frddr_c>; + }; + + /* 8ch hdmi interface */ + dai-link-3 { + sound-dai = <&tdmif_b>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-0 = <1 1>; + dai-tdm-slot-tx-mask-1 = <1 1>; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-tx-mask-3 = <1 1>; + mclk-fs = <256>; + + codec { + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; + }; + }; + + dai-link-4 { + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; + + codec { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&arb { + status = "okay"; +}; + +&clkc_audio { + status = "okay"; +}; + +&frddr_a { + status = "okay"; +}; + +&frddr_b { + status = "okay"; +}; + +&frddr_c { + status = "okay"; +}; + +&tdmif_b { + status = "okay"; +}; + +&tdmout_b { + status = "okay"; +}; + +&tohdmitx { + status = "okay"; +}; -- 2.17.1