Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1114254ybf; Thu, 27 Feb 2020 05:18:14 -0800 (PST) X-Google-Smtp-Source: APXvYqxS2Y/IH+jZMJLALqtDPnGQIkpjfnmDD/67Ni0OmMLRSAJeQhzrf5smYYCuXSBOH/ILmsnc X-Received: by 2002:a05:6808:209:: with SMTP id l9mr3314635oie.112.1582809493989; Thu, 27 Feb 2020 05:18:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582809493; cv=none; d=google.com; s=arc-20160816; b=Zny+DtH96yyFmJSaaRSo75ntqkpX/oue4CSv+mQkVVeofbummyQk2Wn6EdiiMMrC3C WIgSn/+zIL70GwlKg4a+2dzjI8e8LCxz3PWuN/ZHjXI046PZ/rl9VaVeGiflDOzQwD0m Z+SawP5TzzN9n4MgJVtJsDTAVdtLKE9zuoUIPmoBt08XPARozambg1i0Alv1P0/YXJw/ Z9odM6KcfpKX1y1eQogdczFBdB4n75xdLmWoHPXkXIkz18xKMNpOM5C+0b/fhKLtp4Pr Vf08rrY47nUkxoXw9nOCF2l15SNEkKJxUs+GhO2fgv2iquftu4ogiaPmppjnQfuTaYqg Z9/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:references :in-reply-to:message-id:date:subject:cc:to:from; bh=bvlQzYpolGr6QUxEHUloeGPU8UpkhyuL8/Yknt+N/wQ=; b=PjXMEFHQj63M3+pdNNV4XibcmCKarnHtQQ9SN3ryo2ltNEjNSYstJfJivzyN+j8tDh KlLsnNxo8gdujdSh5GhMUQIlv4voMgXzk6mX0EF5mUlGPGRf6TmmzpEY9aQVJeT/zxyD QFdIzdJ8U1U6Lj+I8yjyTIjVozc1cA84qdzH4yyJcbtukG4J8O4+Vdnv+rsNT+OkkCCm /I+ykviUeuf6JbPWcSbbYnWw55PeYCBrv+vpKoEdQlafAYoUj9U0dJ6UDZiz65Z3aIg3 GUECM8yVqq+P9MVQtmpJtJ2Gh2VTyKp8+spOFhcKAV0CWMdqcuBgTVoQ/Vh7pkjWghQh hlgg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t28si1588060otr.16.2020.02.27.05.18.01; Thu, 27 Feb 2020 05:18:13 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729169AbgB0NRx (ORCPT + 99 others); Thu, 27 Feb 2020 08:17:53 -0500 Received: from comms.puri.sm ([159.203.221.185]:39690 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729037AbgB0NRx (ORCPT ); Thu, 27 Feb 2020 08:17:53 -0500 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 994D3DFDD5; Thu, 27 Feb 2020 05:17:52 -0800 (PST) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZPwp93vabojf; Thu, 27 Feb 2020 05:17:51 -0800 (PST) From: Martin Kepplinger To: robh@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: linux-imx@nxp.com, Anson.Huang@nxp.com, devicetree@vger.kernel.org, kernel@puri.sm, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Angus Ainslie (Purism)" , Martin Kepplinger Subject: [PATCH v4 2/8] arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec Date: Thu, 27 Feb 2020 14:17:27 +0100 Message-Id: <20200227131733.4228-3-martin.kepplinger@puri.sm> In-Reply-To: <20200227131733.4228-1-martin.kepplinger@puri.sm> References: <20200227131733.4228-1-martin.kepplinger@puri.sm> Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Angus Ainslie (Purism)" Describe the sgtl5000 of the librem 5 devkit in devicetree. Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Martin Kepplinger --- .../dts/freescale/imx8mq-librem5-devkit.dts | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts index bab039500f2b..c829e4579540 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -148,6 +148,34 @@ regulator-always-on; }; + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "sgtl5000"; + simple-audio-card,format = "i2s"; + simple-audio-card,widgets = + "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack", + "Speaker", "Speaker Ext", + "Line", "Line In Jack"; + simple-audio-card,routing = + "MIC_IN", "Microphone Jack", + "Microphone Jack", "Mic Bias", + "LINE_IN", "Line In Jack", + "Headphone Jack", "HP_OUT", + "Speaker Ext", "LINE_OUT"; + + simple-audio-card,cpu { + sound-dai = <&sai2>; + }; + + simple-audio-card,codec { + sound-dai = <&sgtl5000>; + clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>; + frame-master; + bitclock-master; + }; + }; + vibrator { compatible = "gpio-vibrator"; pinctrl-names = "default"; @@ -426,6 +454,19 @@ vddio-supply = <®_3v3_p>; }; + sgtl5000: audio-codec@a { + compatible = "fsl,sgtl5000"; + clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>; + assigned-clocks = <&clk IMX8MQ_CLK_SAI2>; + assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>; + assigned-clock-rates = <24576000>; + #sound-dai-cells = <0>; + reg = <0x0a>; + VDDD-supply = <®_1v8_p>; + VDDIO-supply = <®_3v3_p>; + VDDA-supply = <®_3v3_p>; + }; + touchscreen@5d { compatible = "goodix,gt5688"; reg = <0x5d>; @@ -567,6 +608,16 @@ >; }; + pinctrl_sai2: sai2grp { + fsl,pins = < + MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC 0xd6 + MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK 0xd6 + MX8MQ_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0 0xd6 + MX8MQ_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0 0xd6 + MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK 0xd6 + >; + }; + pinctrl_typec: typecgrp { fsl,pins = < MX8MQ_IOMUXC_NAND_DATA06_GPIO3_IO12 0x16 @@ -742,6 +793,15 @@ status = "okay"; }; +&sai2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai2>; + assigned-clocks = <&clk IMX8MQ_CLK_SAI2>; + assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>; + assigned-clock-rates = <24576000>; + status = "okay"; +}; + &uart1 { /* console */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; -- 2.20.1