Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2614946pxb; Sun, 17 Oct 2021 20:34:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1fGKvpbNnWrNulNWp51XgBs2Nbui+B3o1ewyuL+mdwqSq4wF+b01AzqLxj1ZoTQxknC3X X-Received: by 2002:a17:902:728b:b0:13f:c086:bdfe with SMTP id d11-20020a170902728b00b0013fc086bdfemr2169025pll.6.1634528075301; Sun, 17 Oct 2021 20:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528075; cv=none; d=google.com; s=arc-20160816; b=RUqEHj/2J7wlAqjFBFbtp/3k15PLfqX2VXybHLDto+EMeW25bJvQnEcVc84UZOr2J/ 3WaJQ14sDJrjPvZ8werI5Wg4fh4cOu/y/6Hm7GTPdT7+urIHzLSblp4krWTVwlYjrEmd F106GGhG+BGY1vmDb+Rx3WR01Rd5ClOwnlbkYBWr7duwZ4BssCxERVqYZtbf5cUJS+Yo 00DWuw2uX4SPQwmSLgO2B+Pl+Q4FEaiFWR98fHL3rLkDxIROIN4mrINu5WKe3x8vU9S6 u0wTCwELcHUeoxSw0Lkv/3GUZ/MNV2gcmzrfk1FyOQEy58bQZpdWs9JauDst9MEPb3RI h5NA== 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=wi/go2f54ZbFfXhsHlUc3orIWIsyjFbHjZPbW+7SsAo=; b=WpbmgfxSUFt7bHRvoplEJ9iQYCNwgjJw32sxddtyoa393fvFx69U3zBVYyB011CJ/m gn+8mKuSiLKv8Ickazw1WJXL/eErqpMHde3Pq8GfmDR+7HuNEU94Z2nsYyVASm8ct4z3 WlHs890+uCee5htNmYY/3DOzxvpUd72SZzgXyy8YFE3xI4uf+simb+rA7H3Ht+zR0xJO /N0yohYKEVwtBCIkAUePy4Myz7pJOlgMV6pTrSV5SNqfVMvhJbqeXZFnmOVhvDYlP1EV J7YR7AAo9DKjmH/asacx042yg5qXEJK3FAQBiDC2w8AJiE4tkkF+rHq63fHuzHmtsoRG V1Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mm0NoWBd; 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 o18si18933730pgv.442.2021.10.17.20.34.23; Sun, 17 Oct 2021 20:34:35 -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=mm0NoWBd; 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 S244248AbhJPK5N (ORCPT + 98 others); Sat, 16 Oct 2021 06:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244205AbhJPK47 (ORCPT ); Sat, 16 Oct 2021 06:56:59 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65BFBC061765; Sat, 16 Oct 2021 03:54:51 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id y26so53356104lfa.11; Sat, 16 Oct 2021 03:54:51 -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=wi/go2f54ZbFfXhsHlUc3orIWIsyjFbHjZPbW+7SsAo=; b=mm0NoWBd/yh40pLFmYxh4KC3h1iEnZuhD97go3OXuJu2tfNMkRp5zufOro5MtTKo80 IVk5sOPQKgMaIKtZQk7xQJ88+qGdfeXuMI/RRN0qoZ5qhl1i6h82btNMHwV1KHpYvQX1 sFY1Rniuur2YtuXXrWx4n3jC47xoEv9ff/N+ZFRqyRMmUrOD4pDSxU8XYXz9JCpDdBiU 2XObNpz9YGikcj3ilQxdfJhpBsI4JIfNkYAI+d86XrJV55EL6fzBJr7iWAet/pIxJr19 /G8iZUMFuEAYuCiX0n7GoimqD75H6Lm+afrUBznQmO6M+zdsPNgjGA5M6U3Af/Uufb3l 9QZA== 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=wi/go2f54ZbFfXhsHlUc3orIWIsyjFbHjZPbW+7SsAo=; b=oFoQrrYBjxaSCHa6AH6o1nGiL/RXFjYNc4Kgubd8wfgAvuP9JABRaeijN2Cy456ufd hVjs/GAJINbtf4a/Yt4tnmrg4m0J22kpUZAzJO2ncYS66lBxzFGaMfejKTEK85Q4IAb6 SpSX2QbiyxQC4gJUV7uURWOc14QCI/rRIHhK5PXskxPME6h0gbteoyiP1MdOw1NYIwb1 m+REHsfMnEQ4ZMc4jR5ec8/n0bOCEv1c6dRrMb8L+q2Jn9lCXfG7fesAmxlLNiLubOd6 nuML3b67TbtRAq2vANBKha3nhm5kNpQaXSmdTiVZgmNVp8F2Ji6F1VZHyLcVvJK+xIbn aI7g== X-Gm-Message-State: AOAM532GuzKfb7B3sO1RWId5r3x6X5k8JPp8GCTq8YrCCoK7e+a2ubc0 NpPqLTaBYJ7UjdRAidpUcrUmnqvFn/M= X-Received: by 2002:a05:6512:150:: with SMTP id m16mr16762581lfo.331.1634381689825; Sat, 16 Oct 2021 03:54:49 -0700 (PDT) Received: from localhost.localdomain (84-72-105-84.dclient.hispeed.ch. [84.72.105.84]) by smtp.gmail.com with ESMTPSA id r3sm814224lfc.131.2021.10.16.03.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Oct 2021 03:54:49 -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 4/4] arm64: dts: rockchip: Add analog audio on Quartz64 Date: Sat, 16 Oct 2021 12:53:53 +0200 Message-Id: <20211016105354.116513-5-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211016105354.116513-1-frattaroli.nicolas@gmail.com> References: <20211016105354.116513-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 | 31 ++++++++++++++++++- 1 file changed, 30 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..f1261f25cb35 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>; @@ -392,6 +411,16 @@ regulator-state-mem { }; }; +&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.1