From patchwork Tue Jul 13 23:11:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 12375353 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EACC8C07E95 for ; Tue, 13 Jul 2021 23:13:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B66B061361 for ; Tue, 13 Jul 2021 23:13:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B66B061361 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=cMMTZimdeMVAgSGS92md9nASka9Mc9WDXsqPOUILK+M=; b=F59hpOexYbxUPT LLbYd6f8ZV9phiNuvTbxVKCmmQfNU0mxXYZ8IyXhqQXfgT50EzsQjzcltSP8PdztawL0WdWluEGA5 OPTEmtRADDtL9pRnzx+weTSONj3+4HXO5YCkh92vPzrcwJg71Zd85mkp/lTBa0gJzyf3OGyu9QUZO kUPDMmALCdX3DGL5q2v/a+VOXB5STfVuDp5Wi0IjDtLoycamz3ygsFNwx5o1/m/mZN/kH2IWfhwzp aIozE3GOkduRNrzaOKEasC7iMrTFriwHTYZgnuYTh3i2tApQBAaMsWxj/bV/FQnFLmMZrkV+ipq3l Gx0G2Vq4E+uwcAlwvk5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3RYl-00BZpx-4w; Tue, 13 Jul 2021 23:11:27 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3RYW-00BZmZ-Aw; Tue, 13 Jul 2021 23:11:14 +0000 Received: by mail-wr1-x42f.google.com with SMTP id g16so760001wrw.5; Tue, 13 Jul 2021 16:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QSb3ObAo4ylOUw0FlyxhZx8xAa3rKpfUqluE9lkrXRM=; b=X2+0woRl6dwUbgPxnKsHnNPShGzW7Zlak3pDlZy1mXIZ24tnJZtXQ8U/WX6dKzUCmk MuIPurdh7dcQT+ZADiIScnXTtPxvUSN8ptkY1CztSrUPIxenRPOFVkZT0n3GtF1U2TOx 83SFDq3Lg4r+exQ59RnRwDou7neb4hTKTQdLCgUic6jZufLOtSn10gNVnOZ3cMaTTjlH 11IheQ9BaOO619bnnOHYjbJp140JoymFgjOcDT18U26NWWLF/zTeRkTCV1zC2KqH61X5 6TILsuLNIoRkyGQLPJ6rupEgdcPXM82U8PKiCwFj/Ez+tv+sKb2274NqlBL9Gvi803dw OwOQ== 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:mime-version:content-transfer-encoding; bh=QSb3ObAo4ylOUw0FlyxhZx8xAa3rKpfUqluE9lkrXRM=; b=a1YHhVCWUcXal+fM5va4x5AQ8swp1vLSI8yE2jAorlrNye5ygB+KDtWTeOHpQQl7FJ 1QUlfIvwnQV4bVsLccQRbpw2uBJeQU1xz9nmYw8m489ClQpLi3y8sXtzBKMYpbHVK2Zd oeMKbAOZTrg7Ygnw4Um2MycmjQV7cexvspSMbS2YlcJjAshALoQ7Lb+uPF68E2Cs8npC 7O1HQqcwx3Yy/lk1PdkTTaDCucxjDYVxmpsSFwDnqD2jg8QRNnaGftoeNCEzKaB2XTm4 UIzIgQx9uNJF1KFDRRaWN4vXXZmPup6Y/xzN4u9UjnxBc7OvDTIO/p9GZKC+3RsUzQ5I jK/w== X-Gm-Message-State: AOAM531Dbc/iSERRWIu/ODLhKsx39C3Shnghm2B5pZ407qjbu8reMzC/ sxFicnNITEabxe5sCcoYfVt9ciKhHck= X-Google-Smtp-Source: ABdhPJxu5zW+U7tPxlUasKv+D8P4pl4jIiUS1ggFku8BsXHu7/b6Gu6oF8K1Q+KoYQybmzxmmludSA== X-Received: by 2002:adf:e581:: with SMTP id l1mr8643410wrm.116.1626217870639; Tue, 13 Jul 2021 16:11:10 -0700 (PDT) Received: from localhost.localdomain (dynamic-2a01-0c23-c041-6f00-f22f-74ff-fe21-0725.c23.pool.telefonica.de. [2a01:c23:c041:6f00:f22f:74ff:fe21:725]) by smtp.googlemail.com with ESMTPSA id y16sm3551608wmq.1.2021.07.13.16.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 16:11:10 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org Cc: narmstrong@baylibre.com, khilman@baylibre.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Blumenstingl Subject: [PATCH 1/2] ARM: dts: meson: Add the AIU audio controller Date: Wed, 14 Jul 2021 01:11:02 +0200 Message-Id: <20210713231103.2994354-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210713231103.2994354-1-martin.blumenstingl@googlemail.com> References: <20210713231103.2994354-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_161112_418288_11CA7E8E X-CRM114-Status: GOOD ( 12.65 ) 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 the AIU audio controller to the Amlogic Meson6/8/8b/8m2 SoC DT. This provides I2S and SPDIF outputs as well as codec glues for the internal HDMI controller. Also add the clock inputs and pin mux definitions on Meson8/8b/8m2. On Meson6 this is omitted because we neither have a clock nor pin controller node there yet. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson.dtsi | 11 ++++++ arch/arm/boot/dts/meson8.dtsi | 63 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/meson8b.dtsi | 63 ++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi index bd0e864964e9..6a30ed54ca83 100644 --- a/arch/arm/boot/dts/meson.dtsi +++ b/arch/arm/boot/dts/meson.dtsi @@ -5,6 +5,7 @@ #include #include +#include / { #address-cells = <1>; @@ -36,6 +37,16 @@ hhi: system-controller@4000 { reg = <0x4000 0x400>; }; + aiu: audio-controller@5400 { + compatible = "amlogic,aiu"; + #sound-dai-cells = <2>; + reg = <0x5400 0x2ac>; + interrupts = , + ; + interrupt-names = "i2s", "spdif"; + status = "disabled"; + }; + assist: assist@7c00 { compatible = "amlogic,meson-mx-assist", "syscon"; reg = <0x7c00 0x200>; diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 686c7b7c79d5..f80ddc98d3a2 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -317,6 +317,29 @@ mali: gpu@c0000 { }; }; /* end of / */ +&aiu { + compatible = "amlogic,aiu-meson8", "amlogic,aiu"; + clocks = <&clkc CLKID_AIU_GLUE>, + <&clkc CLKID_I2S_OUT>, + <&clkc CLKID_AOCLK_GATE>, + <&clkc CLKID_CTS_AMCLK>, + <&clkc CLKID_MIXER_IFACE>, + <&clkc CLKID_IEC958>, + <&clkc CLKID_IEC958_GATE>, + <&clkc CLKID_CTS_MCLK_I958>, + <&clkc CLKID_CTS_I958>; + clock-names = "pclk", + "i2s_pclk", + "i2s_aoclk", + "i2s_mclk", + "i2s_mixer", + "spdif_pclk", + "spdif_aoclk", + "spdif_mclk", + "spdif_mclk_sel"; + resets = <&reset RESET_AIU>; +}; + &aobus { pmu: pmu@e0 { compatible = "amlogic,meson8-pmu", "syscon"; @@ -340,6 +363,38 @@ gpio_ao: ao-bank@14 { gpio-ranges = <&pinctrl_aobus 0 0 16>; }; + i2s_am_clk_pins: i2s-am-clk-out { + mux { + groups = "i2s_am_clk_out_ao"; + function = "i2s_ao"; + bias-disable; + }; + }; + + i2s_out_ao_clk_pins: i2s-ao-clk-out { + mux { + groups = "i2s_ao_clk_out_ao"; + function = "i2s_ao"; + bias-disable; + }; + }; + + i2s_out_lr_clk_pins: i2s-lr-clk-out { + mux { + groups = "i2s_lr_clk_out_ao"; + function = "i2s_ao"; + bias-disable; + }; + }; + + i2s_out_ch01_ao_pins: i2s-out-ch01 { + mux { + groups = "i2s_out_ch01_ao"; + function = "i2s_ao"; + bias-disable; + }; + }; + uart_ao_a_pins: uart_ao_a { mux { groups = "uart_tx_ao_a", "uart_rx_ao_a"; @@ -460,6 +515,14 @@ mux { }; }; + spdif_out_pins: spdif-out { + mux { + groups = "spdif_out"; + function = "spdif"; + bias-disable; + }; + }; + spi_nor_pins: nor { mux { groups = "nor_d", "nor_q", "nor_c", "nor_cs"; diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index c02b03cbcdf4..b49b7cbaed4e 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -279,6 +279,29 @@ mali: gpu@c0000 { }; }; /* end of / */ +&aiu { + compatible = "amlogic,aiu-meson8b", "amlogic,aiu"; + clocks = <&clkc CLKID_AIU_GLUE>, + <&clkc CLKID_I2S_OUT>, + <&clkc CLKID_AOCLK_GATE>, + <&clkc CLKID_CTS_AMCLK>, + <&clkc CLKID_MIXER_IFACE>, + <&clkc CLKID_IEC958>, + <&clkc CLKID_IEC958_GATE>, + <&clkc CLKID_CTS_MCLK_I958>, + <&clkc CLKID_CTS_I958>; + clock-names = "pclk", + "i2s_pclk", + "i2s_aoclk", + "i2s_mclk", + "i2s_mixer", + "spdif_pclk", + "spdif_aoclk", + "spdif_mclk", + "spdif_mclk_sel"; + resets = <&reset RESET_AIU>; +}; + &aobus { pmu: pmu@e0 { compatible = "amlogic,meson8b-pmu", "syscon"; @@ -302,6 +325,46 @@ gpio_ao: ao-bank@14 { gpio-ranges = <&pinctrl_aobus 0 0 16>; }; + i2s_am_clk_pins: i2s-am-clk-out { + mux { + groups = "i2s_am_clk_out"; + function = "i2s"; + bias-disable; + }; + }; + + i2s_out_ao_clk_pins: i2s-ao-clk-out { + mux { + groups = "i2s_ao_clk_out"; + function = "i2s"; + bias-disable; + }; + }; + + i2s_out_lr_clk_pins: i2s-lr-clk-out { + mux { + groups = "i2s_lr_clk_out"; + function = "i2s"; + bias-disable; + }; + }; + + i2s_out_ch01_ao_pins: i2s-out-ch01 { + mux { + groups = "i2s_out_01"; + function = "i2s"; + bias-disable; + }; + }; + + spdif_out_1_pins: spdif-out-1 { + mux { + groups = "spdif_out_1"; + function = "spdif_1"; + bias-disable; + }; + }; + uart_ao_a_pins: uart_ao_a { mux { groups = "uart_tx_ao_a", "uart_rx_ao_a"; From patchwork Tue Jul 13 23:11:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 12375355 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4EB2C07E96 for ; Tue, 13 Jul 2021 23:13:06 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B1E246135A for ; Tue, 13 Jul 2021 23:13:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1E246135A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=11q8l43KcvRvprIl/s7OEJsEohVmveKANDw6IWbqUqc=; b=x+wUSb44dKSBHC LjFrFl1CJPp8xdFjx2ebAwy7dIuRGGiXhs8tDszXwpemfGI2Rsx1bUjQnD+2YK+Y+H+12sYQv9vtm e/eGrDCuheYbKpuv52VlJ6nJXKqfvIxFanH6CvxSiu+pUK2lC9yIa+fLGu5kEmVIi4C+SVdF1CyFs bW+uDyLvuJ0Bs+l3Sxh6/wx6zbZ2W1hap7c9GMOzTgdhGR1yOt4MGlp9K7EtHbZDbE8n3mWQVlgXA F/4QXXUdAQMxF/74fuFcZ6Th3lyd63bh35RmNJOlxpVu06OISqnyd4zsFJOm5n72Jea73dcRPZMMl 18u5Uk9MA9KpEGg8pw+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3RYw-00BZtA-L3; Tue, 13 Jul 2021 23:11:39 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3RYW-00BZmo-Tr; Tue, 13 Jul 2021 23:11:14 +0000 Received: by mail-wm1-x334.google.com with SMTP id w13so380150wmc.3; Tue, 13 Jul 2021 16:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SWl1Vtp4REPunQuHP81GLtdpuPygHjaGQhTUxCn58D0=; b=f+xHksQOVZnAOtbQbk5DNKurXzF2JLVBFVEO+Wl6FuhaNLj5ZMv06DWOrhpD1JceHA 3bCdar4rI5CXlp89SFulcQ+VT0+oj0fC/rgY6/KGpV/bJ3sNtKqQxA9SMYSUrPOsVuVY Z+LCcH1hOwbSdGMv54OHWg1HzGNWgXoQPn3hwjLwjvL8tZpcrIVWGr0FfB8WQU6xBuZU enggdKrn/byhMOB2F/ySVGipjAwzf28ZrPYeVMOBnk6uu6UiWuf+2bGeRxWmzsZtFfF/ 1pb+soBHHq+NmofNqKHpOns6jPwlFOmj/s9FzclVG+E8Vxm+feZ832zAsXxQdNEhoTDz VUvQ== 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:mime-version:content-transfer-encoding; bh=SWl1Vtp4REPunQuHP81GLtdpuPygHjaGQhTUxCn58D0=; b=gVTiu9CxxzK6SGDtnih7DevKa7oATX8WsEV0LCXzV9jhTiWBQdg5euXSJyw0wYyuAd j/5qOkU7TSnUstlExGFbXBQGkXCzDXmhupRvRfYNClOmeJ28PJGG4NOG/de93b2WtvR/ qh/Ci4De77ksne8cjj3uhkNqvtThRFcrs07V7YLCqmB5xGA4j+RgF4ynfbyjA8SzbPGP +Prpq/Q5hREIlBH+sT2kwWUORvEylmWD/MBvkQttbL78jOj+/5se2f2zUq2zTqOI8mXy +fVzya8BWoJXquSnuuwf1QUCFt3GXt5EgNH7dBQQhPHLlyf06vbyw+mKJncmLmsokVGB s4jw== X-Gm-Message-State: AOAM5337xo5/YNdY7QQOXfK3lVtuMjIeg4k57Yqp9sAVqanSt/cPulF2 nF3+3HzvSXCQHlIQDtXi3P+EzdebRME= X-Google-Smtp-Source: ABdhPJxT0/VK6AQnrwEjVZgSRZKbRAjsJ/9U141iVpixe9DWQ5/xe2EfLg/RUDX5xPIRUkBMyOqeKg== X-Received: by 2002:a7b:c316:: with SMTP id k22mr620798wmj.56.1626217871429; Tue, 13 Jul 2021 16:11:11 -0700 (PDT) Received: from localhost.localdomain (dynamic-2a01-0c23-c041-6f00-f22f-74ff-fe21-0725.c23.pool.telefonica.de. [2a01:c23:c041:6f00:f22f:74ff:fe21:725]) by smtp.googlemail.com with ESMTPSA id y16sm3551608wmq.1.2021.07.13.16.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 16:11:11 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org Cc: narmstrong@baylibre.com, khilman@baylibre.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Blumenstingl Subject: [PATCH 2/2] ARM: dts: meson8b: ec100: wire up the RT5640 audio codec Date: Wed, 14 Jul 2021 01:11:03 +0200 Message-Id: <20210713231103.2994354-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210713231103.2994354-1-martin.blumenstingl@googlemail.com> References: <20210713231103.2994354-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_161113_001688_4FC7D996 X-CRM114-Status: GOOD ( 14.23 ) 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 The Realtek RT5640 codec is connected to the SoC's I2S interface. Describe this in the .dts together with the codec's LDO1 enable GPIO so audio can be played on the Endless Mini. While here, add a note about the realtek,ldo1-en-gpios for which the EC100 uses GPIO_BSD_EN. Due to driver limitations this pin cannot be used currently. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b-ec100.dts | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-ec100.dts b/arch/arm/boot/dts/meson8b-ec100.dts index 8e48ccc6b634..177feb09a66d 100644 --- a/arch/arm/boot/dts/meson8b-ec100.dts +++ b/arch/arm/boot/dts/meson8b-ec100.dts @@ -96,6 +96,33 @@ rtc32k_xtal: rtc32k-xtal-clk { #clock-cells = <0>; }; + sound { + compatible = "amlogic,gx-sound-card"; + model = "M8B-EC100"; + audio-routing = "I2S Encoder Playback", "I2S FIFO Playback"; + + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; + assigned-clock-rates = <270950400>, + <294912000>, + <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 = <&rt5640>; + }; + }; + }; + usb_vbus: regulator-usb-vbus { /* * Silergy SY6288CCAC-GP 2A Power Distribution Switch. @@ -242,6 +269,14 @@ vddee: regulator-vddee { }; }; +&aiu { + status = "okay"; + + pinctrl-0 = <&i2s_am_clk_pins>, <&i2s_out_ao_clk_pins>, + <&i2s_out_lr_clk_pins>, <&i2s_out_ch01_ao_pins>; + pinctrl-names = "default"; +}; + &cpu0 { cpu-supply = <&vcck>; }; @@ -283,9 +318,19 @@ &i2c_A { rt5640: codec@1c { compatible = "realtek,rt5640"; + reg = <0x1c>; + + #sound-dai-cells = <0>; + interrupt-parent = <&gpio_intc>; interrupts = <13 IRQ_TYPE_EDGE_BOTH>; /* GPIOAO_13 */ + + /* + * TODO: realtek,ldo1-en-gpios is connected to GPIO_BSD_EN. + * We currently cannot configure this pin correctly. + * Luckily for us it's in the "right" state by default. + */ realtek,in1-differential; }; };