Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp883586pxb; Fri, 3 Sep 2021 16:21:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSwySOG7f6bkoFG17qGnP0JkJNgTRAOrOqCpB/kEKoIJMRLQRqXhj53F6CF+UuI8d1xGV3 X-Received: by 2002:a17:906:2bd0:: with SMTP id n16mr1389036ejg.132.1630711280414; Fri, 03 Sep 2021 16:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630711280; cv=none; d=google.com; s=arc-20160816; b=uPLTcMa6+n8Ypm1cetGQAYlK6j7oTEYvT/PK/M9fNCkTN9iyMcRe8GkRiloVHXuhUM cX6GzZkjX+PZc3cfujfGuemF33yPlUIEdG1M8K5DR4Hf2DGcjzhDJWd7zDyB9Jt49IOu v3GwO6tnY0aosKSjRd7MpcbAk8cXRPZjRcSCs3/+2Te2N4Qy5mqanL/T/x8YVqU5pNb5 SDKXzrbgaVQDgOEIBM3AVwHl7By/m+3hG8rBysJQwjG0FbuLootIPSIuUHQy2uUTlU+I dAnbC/koOi9z7kvbAHsw+G4NYJuFSNSjY3q/NiJx86sc3YyzbWPFIwCbuWDHeanuMAAI JfKA== 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=xnw6WzrVj6kVz7+rhXWWV0P1D+1rQjUWR64V6tXpcQc=; b=wvAyWWiqBtKsCtLRCX2TGF/CFRGLuLHaHlrxKJIZiHAuewvH4H9Mdr7FFDWiSmWdis 6d/9YDlWIfZ5LCKL1PfBl/QOPUmx1+kpCEoC1A7zfJsc8y39vFPWO6UPosN9UmSGDJm5 5o0qWCyvVr3bak3X0Knq3yscHrJ9/rS5m2VueWqvkHWBb6venQ181XdbVcPZhBRvTpPH AuHB/xxZv0CCXlXZ2yjQF6wn7GHIeh7cYY+ZJM9vCdi9BmQQaKyA/GmtpmxKN73F6gip fZjDEju4PrfqQvjIONJg1W0u+Rl81L8p1jTpnhHWoXJXsDXqERun2yFb0y7vPSMI88cP k4Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LUy4S5O3; 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 i5si830661eds.477.2021.09.03.16.20.55; Fri, 03 Sep 2021 16:21:20 -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=20210112 header.b=LUy4S5O3; 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 S1350731AbhICXRn (ORCPT + 99 others); Fri, 3 Sep 2021 19:17:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350727AbhICXRm (ORCPT ); Fri, 3 Sep 2021 19:17:42 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 457C0C061575; Fri, 3 Sep 2021 16:16:42 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id i21so1111375ejd.2; Fri, 03 Sep 2021 16:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xnw6WzrVj6kVz7+rhXWWV0P1D+1rQjUWR64V6tXpcQc=; b=LUy4S5O3JpUY6Tl+oGYBAq42NZWaI/sMarxUr2Acgv4qDjateQV1MESdAljoiBEN5x voXVsB2Jjo6tEcDBWlh6PERG6UG72yEuWJph9IP19xZeNdhdRuAjZUE6R2i+AyXsTREX 38f9EpjowbY2D6zHtIxOGh14Z48HWkUiAdQPNRWxdosm4GeOKzpYtC5t7IgY/YcUs4aT h+Esers0HD8QmxvAjnID+HmlKmJAFvCuj6HT2ETpWZ+NUgX39BcfYd6vxM6pimt0iugO cTbBswjwVVKQUWJVwIOyQoJHQfnnMQhob8bnYYA4x8on413eq553u3Tv00w1k0JV6eel arjQ== 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=xnw6WzrVj6kVz7+rhXWWV0P1D+1rQjUWR64V6tXpcQc=; b=Hf9rNWz3HmyYD8Y8+DRxcSxcyaLaKxT+eFxzHDdLV0NV+Ywfki7oBaUVoqcFcFBx3c vTwD0kbIwGRsW25774vWBnZJlRPPDzE+eaBYff3iBt3tFXwQxRMSzAbY0V8H8jms9dX/ wXxE+QKlnyvPQP5ROrYldhgTADW+tjslf4ID/l9MFqex9jIcPJ9++6jyUSvaP66CYJeH oiqLWfBGofS9ZrrxKtbK3oPIm7QWU9PT5DVJHOSiYSFyKxZtbrqYzg1V9gCuK1m7Kumd 9qcnQ+xRCbg/pjnmsNV7kJUwZeC8Wu4fEb+xG5snxz8WJ2toco+1ntv4GcecxtCT4ZCX PJig== X-Gm-Message-State: AOAM532GAPc3eG+SJZRuU3H9731NXuGJSv58FA5fIE4NA5t5M8yfaQVz KsO4btn4F/i/VX7eY98Au64= X-Received: by 2002:a17:906:8399:: with SMTP id p25mr1324360ejx.449.1630711000888; Fri, 03 Sep 2021 16:16:40 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id r11sm214068ejy.71.2021.09.03.16.16.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 16:16:40 -0700 (PDT) From: Nicolas Frattaroli To: Rob Herring , Heiko Stuebner Cc: Nicolas Frattaroli , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 4/4] arm64: dts: rockchip: add analog audio on Quartz64 Date: Sat, 4 Sep 2021 01:15:36 +0200 Message-Id: <20210903231536.225540-5-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210903231536.225540-1-frattaroli.nicolas@gmail.com> References: <20210903231536.225540-1-frattaroli.nicolas@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On the Quartz64 Model A, the I2S1 TDM controller is connected to the rk817 codec in I2S mode. Enabling it and adding the necessary simple-sound-card and codec nodes allows for analog audio output on the PINE64 Quartz64 Model A SBC. Signed-off-by: Nicolas Frattaroli --- .../boot/dts/rockchip/rk3566-quartz64-a.dts | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts index a244f7b87e38..3a87c0240b30 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts @@ -58,6 +58,20 @@ led-diy { }; }; + rk817-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "Analog RK817"; + simple-audio-card,mclk-fs = <256>; + + simple-audio-card,cpu { + sound-dai = <&i2s1_8ch>; + }; + simple-audio-card,codec { + sound-dai = <&rk817>; + }; + }; + vcc12v_dcin: vcc12v_dcin { compatible = "regulator-fixed"; regulator-name = "vcc12v_dcin"; @@ -199,8 +213,13 @@ rk817: pmic@20 { interrupts = ; clock-output-names = "rk808-clkout1", "rk808-clkout2"; + #sound-dai-cells = <0>; + clock-names = "mclk"; + clocks = <&cru I2S1_MCLKOUT_TX>; + assigned-clocks = <&cru I2S1_MCLKOUT_TX>; + assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; pinctrl-names = "default"; - pinctrl-0 = <&pmic_int_l>; + pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>; rockchip,system-power-controller; wakeup-source; #clock-cells = <1>; @@ -389,9 +408,23 @@ regulator-state-mem { }; }; }; + + rk817_codec: codec { + }; + }; }; +&i2s1_8ch { + status = "okay"; + rockchip,trcm-sync-tx-only; + pinctrl-names = "default"; + pinctrl-0 = <&i2s1m0_sclktx + &i2s1m0_lrcktx + &i2s1m0_sdi0 + &i2s1m0_sdo0>; +}; + &mdio1 { rgmii_phy1: ethernet-phy@0 { compatible = "ethernet-phy-ieee802.3-c22"; -- 2.33.0