From patchwork Mon Mar 6 12:13: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: 64627 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1808946wrd; Mon, 6 Mar 2023 04:28:36 -0800 (PST) X-Google-Smtp-Source: AK7set/QjC4ElMqlwTiPLFovng52nGzBjQRJcZV/fnppBtiLzBq88IGDccy+oYPUX5J4Skw1+F6u X-Received: by 2002:a05:6a20:144c:b0:cd:272:fd3f with SMTP id a12-20020a056a20144c00b000cd0272fd3fmr12607554pzi.25.1678105716609; Mon, 06 Mar 2023 04:28:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678105716; cv=none; d=google.com; s=arc-20160816; b=XLQygOiGZb7T7Ve2lhDENoTPNOcPvphBOh04AAIyrrdwFurcBzzp+OxeqnxVKd7KXQ DQ2bHdA5V/FDKixRClciWOBd6Znlp3Zwz255NEDAtOYNSUX4FDZfMeDWw9/ybDKHcmDd 403TXGXQvclxuS0NLNOLNlRsasVPt0qzqLGA9qgkvUNsglk5O6ne2Di0e945zcM+kt2D VQhv53ujO1xLhMBMnhvzxuIlEI+7UQnMfSzsIzXtvQ3391rcJkxA68HGBOrO/13StdfB iKP3Ug40EcwoSl7KgqphUlbusoeAOljrsj06JqZgqUV24xdcm3oFtFzs21SaV0ioSDgD n3RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hqVGLCz75in4ibx0Afcg4VSjNSP/OXCd6v9qu5TVZNQ=; b=JyZROnCLemPkWQx5XlIe7obx0wv43Oqjn8mdNl0IPKUgiq9TJ4myG+vQhZCeztsOHu FOJGQeWPlaoaoVNabW8iA5/7N6XnY3QuRJ5CLDZXHZON5hlYqpzjG/3McrXiLfp5/zh0 hRNx6StXaG+6UN71gWq7JaFRGXEqy40XhBOhHfZOweRFbVrcAICANoqCJrTi0k+uC5wn QqNIbAD0h3SPuXT1DHICpqfJNL8HrFa1tAaZqBT6w70Vs7CgXQ/EFc2S8iHu2w3p8nHx bOvEROpMYw9jnL5TEx4Ul01WsacKagSQmo/2VFnanpynPgUTzqTD3/+2DaOrJYFE/EBX W5iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UoFXneCV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a63f508000000b004fc2aebe0easi9654663pgh.865.2023.03.06.04.28.24; Mon, 06 Mar 2023 04:28:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UoFXneCV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230283AbjCFMOK (ORCPT + 99 others); Mon, 6 Mar 2023 07:14:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230301AbjCFMOG (ORCPT ); Mon, 6 Mar 2023 07:14:06 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F36826853; Mon, 6 Mar 2023 04:14:05 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id t15so8566126wrz.7; Mon, 06 Mar 2023 04:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678104843; 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=hqVGLCz75in4ibx0Afcg4VSjNSP/OXCd6v9qu5TVZNQ=; b=UoFXneCVw3bGVin62ZuU3ZlNMIfvK9/I1ysAfVmo5C5Z0o9FbzP1TAdGV4uIUCzyui 4AbPrA4kaIM1zPtbVtr1/FT/KE72xpST8yjXeLkZgnHG6r0oODNFs/K9RUW5wBIGx+Wn RkGJ97cTiT05VzMHN4cc/AqBhp05HB26Omzaw9ylxll2a/eEI1xFhyrvkHzyv1HFB81m tdQ79aFm8jVINdnzhks31IJE1Q+iyiFsWlOx/MXEhamJvuJLoLTdjtUYZrCYXrORLBco c7cdoOdne0cJV3xbLIX59zFZrzncvRZkD3F5i6Oheop7wQ0WvYfvjIgEw89YdVeaFpsl y1CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678104843; 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=hqVGLCz75in4ibx0Afcg4VSjNSP/OXCd6v9qu5TVZNQ=; b=0FDD+jWKZEL98cSX/P8egE6BtS/19Bzra5J+aWoZMcQFWnkDfB2VmzfOn0RNYVOdzY 11PXmWkUjKqwGopLurTKfNa0utfKL3Rtnm2vP4mD3pnI+4eFyiMy6MwHFdPTtCznZADj q7fq6ta9DPS17S2wcJkKdA/Mv7bYXRA8BHDrFEhXF9vzonTBCHC857WRxYqBEN9V1i4l GTSsLP6vKeQeGtZa2UvJk8B1N0z1XhNQAniHokrAU+Vw0smWGThoqBCJxLUaeM+Z/QOV ULmmH9u4hu5zHKN9pgKzDa2azbnU6YwkVu4pL/vAiRflwPqvT4OsHrNTga/Pxxjrb0nr ho5A== X-Gm-Message-State: AO0yUKXwS9rR+cLiqNJWzUfmN25R13al8x/lW5KDAKGIM1SuT6Jm4xmB jv+nRzbI4rHGMh+zImGryg4= X-Received: by 2002:adf:f408:0:b0:2bf:d285:b787 with SMTP id g8-20020adff408000000b002bfd285b787mr7146208wro.56.1678104843493; Mon, 06 Mar 2023 04:14:03 -0800 (PST) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id n10-20020a5d660a000000b002c70ce264bfsm9814798wru.76.2023.03.06.04.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 04:14:03 -0800 (PST) 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 , Ferass El Hafidi Subject: [PATCH v3 3/3] arm64: dts: meson: gxbb-kii-pro: add initial audio support Date: Mon, 6 Mar 2023 12:13:51 +0000 Message-Id: <20230306121351.1606360-4-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230306121351.1606360-1-christianshewitt@gmail.com> References: <20230306121351.1606360-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759621379635441737?= X-GMAIL-MSGID: =?utf-8?q?1759621379635441737?= Add initial support for HDMI and S/PDIF audio output. Signed-off-by: Christian Hewitt Tested-by: Ferass El Hafidi Reviewed-by: Neil Armstrong --- .../boot/dts/amlogic/meson-gxbb-kii-pro.dts | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts index a800e8955c4a..e238f1f10124 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts @@ -9,11 +9,19 @@ #include #include #include +#include / { compatible = "videostrong,kii-pro", "amlogic,meson-gxbb"; model = "Videostrong KII Pro"; + spdif_dit: audio-codec-0 { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + status = "okay"; + sound-name-prefix = "DIT"; + }; + leds { compatible = "gpio-leds"; led { @@ -34,6 +42,58 @@ button-reset { gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; }; }; + + sound { + compatible = "amlogic,gx-sound-card"; + model = "KII-PRO"; + 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 {