From patchwork Tue Jan 30 10:15:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Goger X-Patchwork-Id: 10191595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C0CB0601A0 for ; Tue, 30 Jan 2018 10:16:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AADB92873B for ; Tue, 30 Jan 2018 10:16:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EE7D28741; Tue, 30 Jan 2018 10:16:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8DFF2873E for ; Tue, 30 Jan 2018 10:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=7wMmL7Y/BKxYcnjIgX5vmA0nOikrPVvakJYOFKdQNWM=; b=Wur CyE57t+pG1vVN8eh+AspySjMYwLQjhgt8D6QVvKk3ZB9ac+yfee8zmif968bHyav1GnD/0fYTM4HY IikuogLGfsS7N6He4SVqEu16xtpm0PFZ6Lizg7QN9qGUAIp3pL248T4SFYB2Y+Q8l4USMKU8fRepI uQwS2WTiVGW9HEXN3IjVcfMi6c13FYI3sOi36x6pgVs46uA/ifYXq2Sd7EkPxnx2PPR6tHnbzni8V 2q9So+OajFO2VRBcdNPyQeBcDED1R7OWtYFO/B5gVmk2hXZhOFlIC3chklJJRcG9Cl5ttGexDoren 54YL4QndP6Pi8Sk4bj/l3gpNfkEe76w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1egSxR-0001tV-NM; Tue, 30 Jan 2018 10:16:05 +0000 Received: from vegas.theobroma-systems.com ([144.76.126.164] helo=mail.theobroma-systems.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1egSxK-0001su-Gh for linux-rockchip@lists.infradead.org; Tue, 30 Jan 2018 10:16:04 +0000 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 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 X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Klaus Goger , linux-kernel@vger.kernel.org, Heiko Stuebner MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 =