From patchwork Tue Nov 30 10:01:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 12646745 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 2943EC433F5 for ; Tue, 30 Nov 2021 10:19:08 +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=SPoBkfxu6Uj4OyJkf5TsGcf0Wxf2qnP+YbttdlyRjYA=; b=joplZhgkhn0Uyo NqZFrKeQhQmO1Y2TDCbVA/IZ4RPUEeS9RBJEwmVbdyrOZ27DZ0UJZ5fLjQt5iXU4/+ApqOctwZvmK i1u8htq95ivwOu4OPxVUwQTTaJ8kiKMRPjYWO+adARSXEkHP0MIAqEqxWQYjNX2g4sMEZGP3BZy/l X8sN6EWJMz05vy12A/l2CUY28IHuMIieIxVBGuK2TxfNAlwvAzocbzVvqdqhoRZdBfQNwgJsCYo9N SdKnI0ag2h+irtAdvbXzXAJJGxYzboag1w+Cgl8IsDvOa+iZiz66BO0g4YPXsi01y396bJz/w9t5s s4FrJueGSZ4c0/xePiVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ms0E2-004Yt3-V7; Tue, 30 Nov 2021 10:19:02 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrzxj-004Tje-63 for linux-amlogic@lists.infradead.org; Tue, 30 Nov 2021 10:02:12 +0000 Received: by mail-wr1-x42d.google.com with SMTP id c4so43091107wrd.9 for ; Tue, 30 Nov 2021 02:02:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wQNf1jb+oM4Q0vCqJnqmXLx+F84dNeiuJDE210Yt7E4=; b=JloMFV+eOjaemtIsi6SlE3gSiN/2NjlDv5Q8eL9sKoO/ogaDDDrugB5Da56fUqKX6B 0A9J41R2AurwDoBgRAKDYWSwTOC02AnHm5egm0FxYDV7MZnK8tpb4ATnLb5avGsNEs0S 44Zcdn/nqrclaLb2t6+KS3ynvMfpKJ3ienvxiEX3Q9fQDP/ckDpO7bT6HjKSfjL1x1g1 2+aGi4QP2JDt7U7+EI92Kqexm6sLRD50oNzFBWChatgXdLMsBioVComUOXOiFl3Et0Jj ApCKBfP4c6RfPsGQOOtsI3nIJyO8bly8t6RRc3nsFOssKJZuyqmTPRiZddGE+l6dHY30 ZRRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wQNf1jb+oM4Q0vCqJnqmXLx+F84dNeiuJDE210Yt7E4=; b=0nbXrS3Fj11wphF7V380nvNlEfG1QUtdsBkPJCMOpzGdXi5vXXpB4MpRmOZuBa+Up1 CJuAUaxSJERp3FcKlI9tqm79kWHyqTE4Aa4EOFvf5KMZVfJJgtWmNbhyHwngy/HKuYDx J5lp0/sm3odvHBRDe4aHLOEtxGTT4XY1wSjiFnKdtupyCXmQYDVKgUOpUq+lCvua3Oth pjiffhR3aUiTVTPIBzGKty2SV7GDHux7HCLEy8PC1L7Osp4cL9yXMaDFT465bswOrhP6 MMAhLl3PEu95szyEISmkAUDEWKAKdxKSBYVbkmaUAjV1aPk1HOFxCvnuhNZFcLejiKzn zv6A== X-Gm-Message-State: AOAM530dPurWOOAfngRoHj/7AutgRILWuiZ6ZgJP/kw2uBuJ5y37xoJ5 roqr9Dab93dkyGj4BHvRVniAoQ== X-Google-Smtp-Source: ABdhPJxT2VWRB6le7wRc5VAZr2LTZ47CKl+OU8xp96iK5sGkVWvF1Zr5R/74ZxBPJK1Tys/l9d2vVQ== X-Received: by 2002:adf:a145:: with SMTP id r5mr37573738wrr.462.1638266529843; Tue, 30 Nov 2021 02:02:09 -0800 (PST) Received: from jackdaw.lan (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id e12sm21117166wrq.20.2021.11.30.02.02.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 02:02:09 -0800 (PST) From: Jerome Brunet To: Kevin Hilman , Neil Armstrong Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: meson: p241: add vcc_5v regulator Date: Tue, 30 Nov 2021 11:01:58 +0100 Message-Id: <20211130100159.214489-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130100159.214489-1-jbrunet@baylibre.com> References: <20211130100159.214489-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211130_020211_281286_382A0032 X-CRM114-Status: UNSURE ( 9.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Add the VCC_5V regulator, which feeds the HDMI, USB and audio amplifier. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong --- .../arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts index eb7f5a3fefd4..9d0684a8264b 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts @@ -84,6 +84,14 @@ vcc_3v3: regulator-vcc_3v3 { regulator-max-microvolt = <3300000>; }; + vcc_5v: regulator-vcc-5v { + compatible = "regulator-fixed"; + regulator-name = "VCC_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + emmc_pwrseq: emmc-pwrseq { compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; @@ -136,6 +144,7 @@ &hdmi_tx { status = "okay"; pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; pinctrl-names = "default"; + hdmi-supply = <&vcc_5v>; }; &hdmi_tx_tmds_port { @@ -220,3 +229,7 @@ &usb { status = "okay"; dr_mode = "host"; }; + +&usb2_phy0 { + phy-supply = <&vcc_5v>; +}; From patchwork Tue Nov 30 10:01:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 12646747 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 7B4BFC433EF for ; Tue, 30 Nov 2021 10:19:14 +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=EB5//TxyPMMmOx8+nBxMdnxbNxzf6jXjvTaya31/yV8=; b=OUaDNno0i5429W ggb9WYVZ3JKqemoWnazc6L/V5ystQ8jxyJLJXsthvA4q89U1TuPHRI/9gpndmx45v/9nrGOr6wPZ8 hWYhRUxfIFfFjM8zsFyKv6bt/MPdn8JZi/PR5KKbi0TN1EjXBDeM78WegigORQRIQ8taAKnvVs0ZS dg4M9s+koG8mDX/V4q5KVpKojRQ09dTxFLQGMTFOtpAGK9eF3ZyF95RQRR649Vwvrbg0M8XW5VT3s Uk/4Wq7BxJHXv5Ziu8JDYhK1U8o0oS60cdhJJSG54ruE/wYZONNmDbsP8OCW33GeI0/AHCWkqLCUh woaYiheuJS8EIIHnK+mQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ms0E7-004YvE-OS; Tue, 30 Nov 2021 10:19:07 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrzxk-004Tk0-2x for linux-amlogic@lists.infradead.org; Tue, 30 Nov 2021 10:02:13 +0000 Received: by mail-wr1-x430.google.com with SMTP id j3so43143085wrp.1 for ; Tue, 30 Nov 2021 02:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2StaEqVy9B8+ZfyW369JbxqFphYPc6IMTPWpr8yAUuQ=; b=CWupZEVGGC6d32E+1UEuD7BmkxvC73SyoaKJt1B+bj0IaS4oBm4h0YfoNhIzNybvqJ sDPgGk9SxiHxr2eqgHXxnmB3GUcPUGQwXvdynyLDpttddDHV/aEmiJ3/tFT/8hcAamVl qpHrVCfoFSHnL3MmvzxIu7YcHOMnNjlNfoRYNZI14wcn/XKs80gZd7OhmtqaUrSrsrhD tMKiVEwfm6WcWLbUOq6qvTeWrVW3I5FCQJIk/sEP3XhMlRDGZX/bBNcQxNMXUYi1Xb7I ZCqYZEPuW3RoXA3uHdYpfAZfMo96J4e/iYwUowJjC4QEsi01nZyZLhYYD5EMSKJu38xd VzSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2StaEqVy9B8+ZfyW369JbxqFphYPc6IMTPWpr8yAUuQ=; b=VMi3N/7GFJe9JitYYukWh70Xd4jkw4BYOZb4Fa6EpN0hydDKqXnuzccVIr0s8k5pJD BngGj+fNbMa5KSe5TP2HL48VbxrxuvBgr3yS10+G4DvIN4a638VShkREbj1eOBe8KWc2 q8t9wda/MOl8b/kaehHvIQE789EvYjSNjr2q886F4KJ8TIl1K3lGgKnc75IAezM/7KZD kPNxcHjzDebWbGsNAeubsYJtrsshYN22UStQqJ76Xz+44SGLlf8xmXWaYlZpylgtW24c 8Qn/A8WMRTrntL6fwRY5sKm6Ok57BhCmM+CZQ5xMIEwGfM+stVlCzx6I+fXutagPGkYn 41aA== X-Gm-Message-State: AOAM533saGSdoGmHI+AQcec/5WMQ2XQERtDtI0pFXDdVHwI84JenkHYa 7vMxPxF9vaChdE8JbMztJTeEZA== X-Google-Smtp-Source: ABdhPJxAAvutkQ/CSzmM4k0ljhFTQPLnHG9Yg8AI6TQdmyY5geq4w7Nmn2rB8BsTgH34lKzABlDF9A== X-Received: by 2002:adf:cd89:: with SMTP id q9mr39425844wrj.205.1638266530710; Tue, 30 Nov 2021 02:02:10 -0800 (PST) Received: from jackdaw.lan (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id e12sm21117166wrq.20.2021.11.30.02.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 02:02:10 -0800 (PST) From: Jerome Brunet To: Kevin Hilman , Neil Armstrong Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] arm64: dts: meson: p241: add sound support Date: Tue, 30 Nov 2021 11:01:59 +0100 Message-Id: <20211130100159.214489-3-jbrunet@baylibre.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130100159.214489-1-jbrunet@baylibre.com> References: <20211130100159.214489-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211130_020212_163950_2614893F X-CRM114-Status: UNSURE ( 9.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Add the p241 sound card support. This board can play audio through HDMI and the internal DAC. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong --- .../boot/dts/amlogic/meson-gxl-s805x-p241.dts | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts index 9d0684a8264b..ff906becd2ab 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts @@ -8,6 +8,7 @@ /dts-v1/; #include +#include #include "meson-gxl-s805x.dtsi" @@ -21,6 +22,13 @@ aliases { ethernet0 = ðmac; }; + au2: analog-amplifier { + compatible = "simple-audio-amplifier"; + sound-name-prefix = "AU2"; + VCC-supply = <&vcc_5v>; + enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -110,6 +118,68 @@ sdio_pwrseq: sdio-pwrseq { clocks = <&wifi32k>; clock-names = "ext_clock"; }; + + sound { + compatible = "amlogic,gx-sound-card"; + model = "GXL-P241"; + audio-aux-devs = <&au2>; + audio-widgets = "Line", "Lineout"; + audio-routing = "AU2 INL", "ACODEC LOLN", + "AU2 INR", "ACODEC LORN", + "Lineout", "AU2 OUTL", + "Lineout", "AU2 OUTR"; + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + 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>; + }; + + codec-1 { + sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; + }; + }; + + dai-link-2 { + sound-dai = <&aiu AIU_HDMI CTRL_OUT>; + + codec-0 { + sound-dai = <&hdmi_tx>; + }; + }; + + dai-link-3 { + sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; + + codec-0 { + sound-dai = <&acodec>; + }; + }; + }; +}; + +&acodec { + AVDD-supply = <&vddio_ao18>; + status = "okay"; +}; + +&aiu { + status = "okay"; }; &cec_AO {