Received: by 10.223.176.5 with SMTP id f5csp4127220wra; Tue, 30 Jan 2018 02:31:32 -0800 (PST) X-Google-Smtp-Source: AH8x227xan7jKLzZ5q5V0VWiM+e0p5luSp9oZmxcwwEMLMSlco7p6ksed7YKQk3CKCsw+yIf7qUl X-Received: by 10.98.28.209 with SMTP id c200mr20077874pfc.24.1517308292358; Tue, 30 Jan 2018 02:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517308292; cv=none; d=google.com; s=arc-20160816; b=R6byrBvi/XpllMnaLY+AlBc2prT3x3viBkDM4/ICzO/p7JfOGujg/YQBxty4PSC/du S+PMsOxAB2JvHc6gqk/xTTa6FctPB54ZakW0z4HdE4uaFzEOrFKSXUTbmTq52gKu2sTm 5y+i4gjk+YvMNe/czhNEsEGDtJDBZmicfyiKZjurLr1rsJ+m4mKamcvSAN5HnwW9qoVG NqY+q1wztOZuLwOvTM2oNVXKzdCB7+2YIxP6ESCIu4IODWd2Mt49HBv2laFCvwimigz9 PjBLCNFVFWYjsArSYvaB6AcjrUrJMFseSP7r7w188wah+T2i+duiqom7uLHD+ozSq2M5 N9QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=sClyVTOHP9ICQLfG7QMoLER1xVF6eKcyrwXAQQT959Y=; b=zvFjY1Ll+kwux+ylGftrO6HkM7P2AhrYpZzkdTk1eM5JgUmoJCIBN/+OAu83ZEk0N1 k19XtQylEGYZHB4DtkKLSvo4eEqvz4gg+I5YOgKioNThFSW45J+Llb9hMEAR5ZsJMkX+ Fgfu4ZPH0ZYXbU/PLFTHtk1zHBzYGnHDE2pbsTl5TnnVUoT17fkJc9yn0M5rA0aCNBIJ CXglcv60/CcX9UP+fT3GlLp4IEid9q/dbZ+ZTIEXkzTRn+jIcLZNL0Nb9/PWMyTgFE4e zRE8iNYuyTGmErI/voeB2P4pAnWj8VDS3lP4qs0tOPSrbC6mRGAR9X2aJWpwDGwxcnZ2 xv9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9-v6si1849141pli.623.2018.01.30.02.31.17; Tue, 30 Jan 2018 02:31:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751948AbeA3KaJ (ORCPT + 99 others); Tue, 30 Jan 2018 05:30:09 -0500 Received: from vegas.theobroma-systems.com ([144.76.126.164]:45066 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbeA3KaH (ORCPT ); Tue, 30 Jan 2018 05:30:07 -0500 X-Greylist: delayed 864 seconds by postgrey-1.27 at vger.kernel.org; Tue, 30 Jan 2018 05:30:07 EST Received: from [86.59.122.178] (port=51424 helo=blau.lan) by mail.theobroma-systems.com with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1egSx3-0002gh-7o; Tue, 30 Jan 2018 11:15:41 +0100 From: Klaus Goger To: linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Heiko Stuebner , Klaus Goger Subject: [PATCH] arm64: dts: rockchip: enable I2S codec on rk3399-puma-haikou Date: Tue, 30 Jan 2018 11:15:31 +0100 Message-Id: <20180130101531.41411-1-klaus.goger@theobroma-systems.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable the NXP SGTL5000 audio codec on the RK3399-Q7 EVK baseboard Haikou. The i2s0_2ch_bus definition is only done in the SoM dtsi as it is missing the LRCK_RX pin (that is used otherwise) and therefore not generic enough for the SoC dtsi. Signed-off-by: Klaus Goger --- .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 49 ++++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 18 ++++++++ 2 files changed, 67 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts index 9a7486058455..060c6be7d7e3 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts @@ -61,6 +61,22 @@ }; }; + i2s0_sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "Haikou,I2S-codec"; + simple-audio-card,mclk-fs = <512>; + simple-audio-card,cpu { + sound-dai = <&i2s0>; + frame-master; + bitclock-master; + }; + simple-audio-card,codec { + sound-dai = <&sgtl5000>; + clocks = <&sgtl5000_clk>; + }; + }; + dc_12v: dc-12v { compatible = "regulator-fixed"; regulator-name = "dc_12v"; @@ -89,6 +105,28 @@ regulator-name = "vcc5v0_otg"; regulator-always-on; }; + + vdda_codec: vdda-codec { + compatible = "regulator-fixed"; + regulator-name = "vdda_codec"; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vddd_codec: vddd-codec { + compatible = "regulator-fixed"; + regulator-name = "vddd_codec"; + regulator-boot-on; + regulator-min-microvolt = <1600000>; + regulator-max-microvolt = <1600000>; + }; + + sgtl5000_clk: sgtl5000-oscillator { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24576000>; + }; }; &i2c1 { @@ -110,6 +148,17 @@ &i2c4 { status = "okay"; clock-frequency = <400000>; + + sgtl5000: codec@0a { + #sound-dai-cells = <0>; + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + VDDA-supply = <&vdda_codec>; + VDDIO-supply = <&vdda_codec>; + VDDD-supply = <&vddd_codec>; + clocks = <&sgtl5000_clk>; + status = "okay"; + }; }; &i2c6 { diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi index 1fc5060d7027..a3fcb803ff69 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -435,6 +435,14 @@ }; }; +&i2s0 { + #sound-dai-cells = <0>; + status = "okay"; + pinctrl-0 = <&i2s0_2ch_bus>; + rockchip,playback-channels = <2>; + rockchip,capture-channels = <2>; +}; + &io_domains { status = "okay"; bt656-supply = <&vcc_1v8>; @@ -461,6 +469,16 @@ }; }; + i2s0 { + i2s0_2ch_bus: i2s0_2ch_bus { + rockchip,pins = + , + , + , + ; + }; + }; + leds { led_pin_module: led-module-gpio { rockchip,pins = -- 2.11.0