Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp334111imi; Thu, 21 Jul 2022 01:37:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sZBTzLJqDRWgqY7DlVH7W6b/iGyB5BLY1nD1NJnkT9pzARQuFUZh7q7pqPrx3EtbXJpN09 X-Received: by 2002:a17:902:ce09:b0:16b:ec52:760b with SMTP id k9-20020a170902ce0900b0016bec52760bmr42585929plg.155.1658392630195; Thu, 21 Jul 2022 01:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658392630; cv=none; d=google.com; s=arc-20160816; b=HHXx2c5y8IDLGXj31ENz4BAgBiOfbtjo6uybg4Uj1yWPm96k8/YxqXOqaBOFvlSORZ f1dah+ZZMzdtQQZsXYWLBIwVArOjbyUd3VkAuRo3ROPCXZIRe5H0p1yW0jOy5nTV2Ymu WLW7rov4KWksF9KDrkjuCa0P8jv5Ei1UebbFApISfJYYi/mKWNZZRgQ3RQ/vJCZnebOB GKHzYZPPBEOUbaOw9c/iaq0rKojWz3jPH+5/qnBG9WsXkZh2jIXurHl+L/5TJwavCcCb xGcQBFaUzJp0evuK2MVtnyt47QH4kZLK5HoQGxLKtu8WfBhcVJ8l1pF4KyMU2oOcZYgT IjlA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=6/ZzFcfNXq3FJXVmp131vQ08suTfBEJgqdvlvCUqagg=; b=WbyrHfZipCxYImYelWVw9UmHCuhlQdq/mXqFQplt/D7OgTMklhpMIfcOiC1qtyW6jj eIKSIG5gGJyN/jNxy/Po1xgFvw1bK8jjYQVWteiSvdmF5SfPtSv/hkyh0P440UgtjgSw 0BXsNDW54SPFCI+eiXrI2U7TlvcVF3vKXe2Z6paX9YeciYd+WZNMFJD9n0q4uU1wW7u1 ZvJveFmUVXuorhhJi/802JxBKp0CIXXAu7v/F3FQESKi4Y2YxeEToWlPOpuThFUmGCdY 6fNC4Ot8OTpoXTBkTJSAVKumwiQKax1Xcxb77/StR/61maBWu8cdKefC+KSzEkqq+Ikg 6fdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fUW992UR; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a170902c94300b0016c3d9ae242si1891193pla.211.2022.07.21.01.36.55; Thu, 21 Jul 2022 01:37:10 -0700 (PDT) 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=fUW992UR; 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 S232265AbiGUIdO (ORCPT + 99 others); Thu, 21 Jul 2022 04:33:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231443AbiGUIdN (ORCPT ); Thu, 21 Jul 2022 04:33:13 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25B8225E81; Thu, 21 Jul 2022 01:33:12 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id oy13so1942586ejb.1; Thu, 21 Jul 2022 01:33:12 -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:mime-version :content-transfer-encoding; bh=6/ZzFcfNXq3FJXVmp131vQ08suTfBEJgqdvlvCUqagg=; b=fUW992UR56l7WdJLfb9SyQEjVC5L/8Eo6Nt2OaDp0tKrGDUSHL81BTaID//izNAGoN F/S33qqLYfo8TkE9+9ylLiZPVibzSm3gocSkepuoCW9lCpZ6hl6pJhZ/W37MWNYxM5G5 ynX7JmuFURmDatrMSq+bmMiYskW7Vag4JS56v2zHeSwCq8z4jzz0wgfDVF5CcWg75BEs HakItCvr+Hn3/0Desi71EpvdIrnhZXk98I72hI7CF2iZVyFvgSn7SuvlgV75K7OElvPq Zl4XtI+oPoDnocDrzPju6w8dLpG04uEC2RlxdTIXfdYneDmpTfKnJ5gIjHD1B+6c/nEt 7yfQ== 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:mime-version :content-transfer-encoding; bh=6/ZzFcfNXq3FJXVmp131vQ08suTfBEJgqdvlvCUqagg=; b=m+hDyNHXZfrX7ctH+JxIGaVIlVlvQO4PdJmz0j8stSUTdGSViBA5JBuQm6SK/WLdVs UjrcFQa/4XW6oWqQhXEa/RS4Z2I0l9o5DEQfsrYEqstibBOEb2lQ4bafyf8ZN1GQUT6H zjqDqznQFZJ09ccBRiLsoQesNcFZPWAN5RueOyxusSHn5KNKEbxLhbvKDYpkT4EI6YQM /x1PiuqdtnFx8+NzdRkZeO+mKKNv+KV7pBh4SFTmQVZTg/Pft37VcEHTjSW/KHRVe0O+ f5xoflNC/PN7lBTSG0kDVbxycj8NUQZcahy+A0IF4rncu/wFDwiMLF6J3aD/2EuNxXVQ c/NA== X-Gm-Message-State: AJIora+S55zdcMZ1NM36SglVhFZ3Xn8H71ZaTFRVm2SNXKpzzjnnQBLc Zwn50okgGCPWCH9fU+s1RLY= X-Received: by 2002:a17:906:84f7:b0:72b:57c2:5e13 with SMTP id zp23-20020a17090684f700b0072b57c25e13mr40568129ejb.702.1658392390546; Thu, 21 Jul 2022 01:33:10 -0700 (PDT) Received: from localhost.localdomain (ict-networks-195-176-112-012.fwd-v4.ethz.ch. [195.176.112.12]) by smtp.gmail.com with ESMTPSA id m18-20020aa7c492000000b0043ba45cec41sm615485edq.36.2022.07.21.01.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 01:33:10 -0700 (PDT) From: Nicolas Frattaroli To: Rob Herring , Krzysztof Kozlowski , 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 v2] arm64: dts: rockchip: Add analog audio output on quartz64-b Date: Thu, 21 Jul 2022 10:33:00 +0200 Message-Id: <20220721083301.3711-1-frattaroli.nicolas@gmail.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This adds the necessary device tree changes to enable analog audio output on the PINE64 Quartz64 Model B with its RK809 codec. The headphone detection pin is left out for now because I couldn't get it to work and am not sure if it even matters, but for future reference: It's pin GPIO4 RK_PC4, named HP_DET_L_GPIO4_C4 in the schematic. Signed-off-by: Nicolas Frattaroli --- Changes since v1: - use generic node name for the simple-audio-card node --- .../boot/dts/rockchip/rk3566-quartz64-b.dts | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-b.dts b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-b.dts index 02d5f5a8ca03..3897980d69d1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-b.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-b.dts @@ -42,6 +42,21 @@ led-user { }; }; + sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "Analog RK809"; + simple-audio-card,mclk-fs = <256>; + + simple-audio-card,cpu { + sound-dai = <&i2s1_8ch>; + }; + + simple-audio-card,codec { + sound-dai = <&rk809>; + }; + }; + sdio_pwrseq: sdio-pwrseq { status = "okay"; compatible = "mmc-pwrseq-simple"; @@ -177,11 +192,16 @@ rk809: pmic@20 { reg = <0x20>; interrupt-parent = <&gpio0>; interrupts = ; + assigned-clocks = <&cru I2S1_MCLKOUT_TX>; + assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; + clock-names = "mclk"; + clocks = <&cru I2S1_MCLKOUT_TX>; clock-output-names = "rk808-clkout1", "rk808-clkout2"; pinctrl-names = "default"; - pinctrl-0 = <&pmic_int>; + pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>; rockchip,system-power-controller; + #sound-dai-cells = <0>; wakeup-source; #clock-cells = <1>; @@ -420,6 +440,16 @@ &i2c5 { status = "disabled"; }; +&i2s1_8ch { + pinctrl-names = "default"; + pinctrl-0 = <&i2s1m0_sclktx + &i2s1m0_lrcktx + &i2s1m0_sdi0 + &i2s1m0_sdo0>; + rockchip,trcm-sync-tx-only; + status = "okay"; +}; + &mdio1 { rgmii_phy1: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; -- 2.37.1