From patchwork Tue Aug 15 09:27:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13353695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E71AC04A94 for ; Tue, 15 Aug 2023 09:28:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ot0eIJNlsP7Dfd9DjppLwXi3GJFhmlhOWLxcFy+lcc0=; b=2ig+sCHe/r+xhi zXIG0z3ry1dNF1HX5FBlzLR7K14xjzAVx22IjqpO3UguCq6lf9AsG4Cguz8SR4KsDty7ZCZ3C9yFs KYpIH+gm/lsUm4HX4J5H0zUo6bAQqTltySjewNZJaV1ZnOdSj1nFzxBXI53Y+tQ0gLWx4yfMvpy9I 3cs2A/sOX0JxgK9KvuZvm1l4c6SB67l+CzUbnD9fYVz8bsp9pOQkcHO8F8iF0mStqlWz9omY5Okqi P5geBAmryEFoyVY0Wss+fNIyX4o/CuNTc8CE2iaV+MzI4meCjr9hLIa6/lDlYz0LJ4TEUnkt3DXuQ N6+ZJaBv2Lq7QBPlJ2CA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVqLR-001CvJ-0L; Tue, 15 Aug 2023 09:28:09 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVqLL-001Ct8-0S; Tue, 15 Aug 2023 09:28:04 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-317798b359aso4514572f8f.1; Tue, 15 Aug 2023 02:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692091679; x=1692696479; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IxLmACEq8DwvR1DlwOAwmK1lXNm1dEuNHjSmvA+D3D4=; b=FX/o1rqpRFL5xfRi+6HUlHxU7IDdu2pvJrfL9KhKIugOtkau9zCJWta7/bgjIjy5gr NJ6YmwtZoqg/38MW+rvT6YScskVPl9bXtRpQ2+aXIESLHWXzl1SXm9obfSGegZdp6BMV ptGrowxXbEmPRW1lto1CEbCLkbkEFqeanwWjKuslJdJ00p2s9Pz/IcXqI7MCtN0PT428 L00qB8LpjOeYbBpG112XMcB42ZipYVB0PURgihWjmnqrd1WPUWzDk5y9RRTbmHpqFcuS /8jKBvVkxCF4dkahYzeQKyJ5zxEXmbuxnoj77LDwdTiywJounhqHlbohX3VSOK+k3hc+ esTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692091679; x=1692696479; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IxLmACEq8DwvR1DlwOAwmK1lXNm1dEuNHjSmvA+D3D4=; b=XxpAn9UcQm+ql608uNASHHGoGOAi4/lqDGe9EX7tHCzE61zmx8zEqt2vfgrSNM6Ydg b87nLtdkEF9F9g+mv3EmAk3F+wCG5KpSF1jFiDGlJsl5fZpf7EBRtDWVvlL06evmMyXi s4lStbqoiJzpU4s2JFKytI3gEf8+XzoGUy2xfDYx80hgpShxuamN7x/5DfNGEj5nRZO/ FW9dWQ0anRJR+Y0zrHqLuHK1qFFJDoBbxWxyEMx2/050FVWuSwEr52wCPPcqaAWifwV0 4XG2NBNLKQri4RyPgqUYDD7XrPmNZjNUFYnwTQONh3zVL0A96OtetXPd2ftyFd5QONrB Q4gg== X-Gm-Message-State: AOJu0YxGmco1a/pXozWyWinVV1w+LTJHj5t79cEmQtqWEbVCdjdX7e1k s+Ivv8jW/oB/MdDIGgObU/8= X-Google-Smtp-Source: AGHT+IF3cQZNWTyrBIiA0J/8Z5kQ+jSt3gu7hM9b3t2zxfiduxi/iEYIwMYG2mEkwrEV480a99XxAA== X-Received: by 2002:a05:6000:110f:b0:317:6fff:c32b with SMTP id z15-20020a056000110f00b003176fffc32bmr8660548wrw.53.1692091679216; Tue, 15 Aug 2023 02:27:59 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id p1-20020adfcc81000000b003179b3fd837sm17230853wrj.33.2023.08.15.02.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 02:27:58 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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/3] arm64: dts: meson: add audio playback to p200 Date: Tue, 15 Aug 2023 09:27:49 +0000 Message-Id: <20230815092751.1791195-2-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230815092751.1791195-1-christianshewitt@gmail.com> References: <20230815092751.1791195-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230815_022803_186213_DAE8457D X-CRM114-Status: GOOD ( 10.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add initial support limited to HDMI i2s and SPDIF (LPCM). Signed-off-by: Christian Hewitt --- .../boot/dts/amlogic/meson-gxbb-p200.dts | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts index 3c93d1898b40..292c718ee19c 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts @@ -9,11 +9,19 @@ #include "meson-gxbb-p20x.dtsi" #include +#include / { compatible = "amlogic,p200", "amlogic,meson-gxbb"; model = "Amlogic Meson GXBB P200 Development Board"; + spdif_dit: audio-codec-0 { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + status = "okay"; + sound-name-prefix = "DIT"; + }; + avdd18_usb_adc: regulator-avdd18_usb_adc { compatible = "regulator-fixed"; regulator-name = "AVDD18_USB_ADC"; @@ -57,6 +65,58 @@ button-menu { press-threshold-microvolt = <0>; /* 0% */ }; }; + + sound { + compatible = "amlogic,gx-sound-card"; + model = "P200"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + + dai-link-0 { + sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; + }; + + dai-link-1 { + sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; + }; + + dai-link-2 { + sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; + dai-format = "i2s"; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&aiu AIU_HDMI CTRL_I2S>; + }; + }; + + dai-link-3 { + sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; + + codec-0 { + sound-dai = <&spdif_dit>; + }; + }; + + dai-link-4 { + sound-dai = <&aiu AIU_HDMI CTRL_OUT>; + + codec-0 { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&aiu { + status = "okay"; + pinctrl-0 = <&spdif_out_y_pins>; + pinctrl-names = "default"; }; ðmac { From patchwork Tue Aug 15 09:27:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13353694 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 924D3C001B0 for ; Tue, 15 Aug 2023 09:28:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xSH1xCJhzxgo+GdSVfePrHeMfcSbMI/wsgdcc0MVBJc=; b=4YqgxCY6t3teud OR00JzuVBX01qzj6Fb5uUElwqapFxToumQsnNE1n08civvYYNlTVz8Vi5eH7btDl2Kw9aOR9SKDH7 ++smPh/w6uOuXhVcBkOZxyUn2mqt4z4xJXBIsGXzeEJqtM//Rsk/KO/raq4KDefkxqQ5vS61PmLXn 6ltCEv+5gPs+4SNECVhCBuhaxJ4h+BqLZuUWjqy4lpzrYXbxYNP5b2rZQRMjGopO2VxilystUGpGb oKPYICFfwwl40NhsZ0Qqh1BRH5nHFU38bJI0z+zHiuay1L58JpHL7ykHthucHqOVpjjHKStQF9Yeb CC9RPPRQOsAWxtMo243A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVqLQ-001Cur-1h; Tue, 15 Aug 2023 09:28:08 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVqLL-001CtN-0c; Tue, 15 Aug 2023 09:28:04 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-31783d02093so4611771f8f.0; Tue, 15 Aug 2023 02:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692091682; x=1692696482; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EwfzrnXrzs3srhIJvT0mhp0xOGZ4O82IIuIkbmzCw5w=; b=kpH0+vVgFu0XNZt2m6cDg7G6SmrMzwp/GgX+g0GuIL+CVr2BQx6zlBfyaBsb4MMzvb KOsZiZP4/IFdWBEa5TIb+BZAcsuLmj4qxvYnlB79lzxR87zTqmxLJSDPANSTz4JoMwt3 x7vLY1SBDYle13X6Ev2o/8yx8RgQYsoiMOmTcEHr3FDbmKG2kFR2L6v3QAPvqqtNDW9V c89HLh7yjtPJAKTI5nngLMvcIErkZYI/Eh/TbbuVqBUEfuv+eFQU7obb3utpFz6kVS0+ vs69o7QN2CJblnN9QWWEavsHBhJwn+7Um8NxQtYnNEY0WWUb+soe9YMFCpfZM/0WtZDf JwSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692091682; x=1692696482; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EwfzrnXrzs3srhIJvT0mhp0xOGZ4O82IIuIkbmzCw5w=; b=l610pSKO3yHDlualeC6A+4cTGo7yQSuc8SPPzPMxLmJI+jhGZ469pKfL1gK0NYax+Q wVTxb5YM72XICfhlY8PjA/aXisxmjAfjviij8JOTtzW5ytlpRuAD5Szp16jQR3sxAiCE 4KevEFlcgVLO2Xluv9rV937aG5K5BJAe30uAx5aZ7E/d1+hn4BJoeEqjEzaxyxr1pNzr v+TzGytFh70+h2p4Kt2Hs8bKqwP9HM7oAWhiqRKulkZpnNxO+glbx7evHyVGvU/HpOmT E9L0ETrN86MYUR/+cAKYwqJZXHrVvkuVGrq1W9gA174LeI1aIP6rOCiM2oMIDKUy9BjJ dYeA== X-Gm-Message-State: AOJu0YxbaS4pxIiIGd21N8IvM/GtlnMxi7F7EplGS8XoB9sd1MUfteMA t0Z1faOhyY9gUimRIb6h8CI= X-Google-Smtp-Source: AGHT+IF2AQqeJrtG/7WlxfiZa445yC5atouzCZjTj2PShhJzRkZSg2tTZD5WWUIvGr+e32sTlD7Xyg== X-Received: by 2002:adf:f281:0:b0:317:6a07:83a7 with SMTP id k1-20020adff281000000b003176a0783a7mr8573440wro.38.1692091681922; Tue, 15 Aug 2023 02:28:01 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id p1-20020adfcc81000000b003179b3fd837sm17230853wrj.33.2023.08.15.02.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 02:28:01 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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 2/3] arm64: dts: meson: add audio playback to p201 Date: Tue, 15 Aug 2023 09:27:50 +0000 Message-Id: <20230815092751.1791195-3-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230815092751.1791195-1-christianshewitt@gmail.com> References: <20230815092751.1791195-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230815_022803_235380_2FC93D75 X-CRM114-Status: UNSURE ( 9.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add initial audio support limited to HDMI i2s. Signed-off-by: Christian Hewitt --- .../boot/dts/amlogic/meson-gxbb-p201.dts | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts index 150a82f3b2d7..6f81eed83bec 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts @@ -8,10 +8,49 @@ /dts-v1/; #include "meson-gxbb-p20x.dtsi" +#include / { compatible = "amlogic,p201", "amlogic,meson-gxbb"; model = "Amlogic Meson GXBB P201 Development Board"; + + sound { + compatible = "amlogic,gx-sound-card"; + model = "P201"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + + dai-link-0 { + sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; + }; + + dai-link-1 { + sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; + dai-format = "i2s"; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&aiu AIU_HDMI CTRL_I2S>; + }; + }; + + dai-link-2 { + sound-dai = <&aiu AIU_HDMI CTRL_OUT>; + + codec-0 { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&aiu { + status = "okay"; }; ðmac { From patchwork Tue Aug 15 09:27:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13353696 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0315DC001E0 for ; Tue, 15 Aug 2023 09:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PABf6uY30HwBjklhcqS1RlWOa/QTOeMkupp0jI3KwDA=; b=QLAOs3VMLombzw 9oibn1fHAb+UtqqQEVZvHBs1u7qxwfSthHgoTVtjz9SGZ7XrAetgMvpdXgfE5lWfLxc8FohAZB52P O74r0CNqnEstef9Pzkc75HGQpp06OufFkY6LXtNwj1jEWItQr0af73Qs6HX2PncnGabtI10osgtnC aM89hl1z5qnLH/27ZGc1o56UiTXLexcCD8i5RayiggtmvS+IV3povVxCKU98Na1vrBHmox0MZ+DYW XdQKZcuK4WO+seTEPpeVpEfUqd0RU0iuFy8qaN9m6gmXCRq46gogH/qdyq7LCvST5MzCw7A2uPMei eS+v8G/BRc5GBMiN8zug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVqLb-001Cyy-2G; Tue, 15 Aug 2023 09:28:19 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVqLQ-001CuT-1M; Tue, 15 Aug 2023 09:28:09 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3197b461bb5so1260583f8f.3; Tue, 15 Aug 2023 02:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692091685; x=1692696485; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xtNqUIeopnCvxTcNi3T2GUEEaoZ28Jy+DFjFFFyT8kY=; b=nexZY3hBbqKB0Q9QZ6kXTH9joGExdFXSe3KJ7D1JPU19KhorfVL0IogIxT6aHkfat1 F52EeJe0JgDFTiu54XCoRY6By8x24dfKMsBrRibKmwiyi+sdOJ3D7dOgk/kVg3UW2SDj bL5Z2wSM/LK44wlJDYN2+0zhOdDGhokkTvlL5PLLNKZTei2LGuEkRHaikWsrp72lue/J WNDvjO0bsdlezv2khldCa1LOQqZKVQKlXZSOR/3azq+fkPP36Q9e97O8K8cpptkgRGg7 id0gb9OxRzND2yufuugb8WYGBz2fR8nG+J4QoBa0HksvHJiulNCJfEaOl5vP7JsyaHdD BnzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692091685; x=1692696485; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xtNqUIeopnCvxTcNi3T2GUEEaoZ28Jy+DFjFFFyT8kY=; b=dZMuLYHailxXCnVK772geW/8W7pYlQfQyVQ6XDqtDAQ7Yelp8DVZyLjsaBxJDGWYqZ 4A/xhL73E/orBxdn4WCMB/W8z7JyTgrsG4vrIUn02gX+S0K96FUIF+ET+RHI+/urTJ4y qv+eNIEA3SpwOo9Hi3FHv/wwCPlDRxWvvduvRujJ7qM8h6VDEJVanlrVPnFgSECSMJyU w00BoGMzQ/6688D4Y48Nyk0PnNy0DcVrmXtgHELGqFpi5Yw3soL3WyEWpbyNBf0w4RaI OMYNunEK85rqEeTCNPb5WcYlbrE92i+AmdaBxna3wXzYsotzwOMDxeINaVrO0mqRU37r V/aA== X-Gm-Message-State: AOJu0YxJyW/Ut5X9/XrZcAUVclODD86gnwW9u8PN/OoOJJk61LioSSA3 s8rhlp+nFb8jmD1d9v57Unw= X-Google-Smtp-Source: AGHT+IGgJ1hXfXH8IdLfVcudHzzrTaQA/LZPdPXhWhwFfOnj9AXnrEffCEAUM0KBjbQKJ3lmT9K8mw== X-Received: by 2002:adf:ee11:0:b0:319:6e6a:66e with SMTP id y17-20020adfee11000000b003196e6a066emr6071786wrn.14.1692091684544; Tue, 15 Aug 2023 02:28:04 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id p1-20020adfcc81000000b003179b3fd837sm17230853wrj.33.2023.08.15.02.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 02:28:03 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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 3/3] arm64: dts: meson: add audio playback to u200 Date: Tue, 15 Aug 2023 09:27:51 +0000 Message-Id: <20230815092751.1791195-4-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230815092751.1791195-1-christianshewitt@gmail.com> References: <20230815092751.1791195-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230815_022808_465258_964457D7 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add initial support limited to HDMI i2s and SPDIF (LPCM). Signed-off-by: Christian Hewitt --- .../boot/dts/amlogic/meson-g12a-u200.dts | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts index 4b5d11e56364..2878e3ad7de2 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts @@ -8,6 +8,7 @@ #include "meson-g12a.dtsi" #include #include +#include / { compatible = "amlogic,u200", "amlogic,g12a"; @@ -18,6 +19,13 @@ aliases { ethernet0 = ðmac; }; + spdif_dit: audio-codec-1 { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + status = "okay"; + sound-name-prefix = "DIT"; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -147,6 +155,89 @@ vddcpu: regulator-vddcpu { regulator-boot-on; regulator-always-on; }; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "U200"; + 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>; + + 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"; }; &cec_AO { @@ -163,6 +254,10 @@ &cecb_AO { hdmi-phandle = <&hdmi_tx>; }; +&clkc_audio { + status = "okay"; +}; + &cpu0 { cpu-supply = <&vddcpu>; operating-points-v2 = <&cpu_opp_table>; @@ -203,6 +298,18 @@ ðmac { phy-mode = "rmii"; }; +&frddr_a { + status = "okay"; +}; + +&frddr_b { + status = "okay"; +}; + +&frddr_c { + status = "okay"; +}; + &hdmi_tx { status = "okay"; pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; @@ -288,6 +395,28 @@ &sd_emmc_c { vqmmc-supply = <&flash_1v8>; }; +&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"; +}; + &uart_AO { status = "okay"; pinctrl-0 = <&uart_ao_a_pins>;