Received: by 10.223.176.5 with SMTP id f5csp1092477wra; Tue, 6 Feb 2018 12:29:57 -0800 (PST) X-Google-Smtp-Source: AH8x226Za3M0gxabCdyLvPtJ4lS0/Ucsi0vdw4s3od/pYGaU7MVhtdlxzmeWs/f3/0+jtLgamNK2 X-Received: by 10.98.138.70 with SMTP id y67mr1202620pfd.176.1517948997428; Tue, 06 Feb 2018 12:29:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517948997; cv=none; d=google.com; s=arc-20160816; b=MF3UasQ4n9tdCn+BA57XWWcZubSAD9PidaXqDFdqCIhdz5ZM52/MJKnpQWmugR3V3p N3iNmPBKJpiKv9spmtPskza215lWl2++HHCpAtyH/GrL9hgEq5A5LJN1TXLvIuMNxMUA E+HcujV4cBXKQqMxXpAQFB0Ph242yczQKLOyT1VmXMiIMYk0ugGCdML8pCaGm1PRvWsc enY890A2C2Cu9cxFJggfV5isomv5rptVQvw90wjoE/PLYfvHPNUplYxDezG17zU5t75R 25obPrytGp26ui48Psjntu6Gf0K5QGDTS/zKMOns6NjL1SuoqG1lObNYb1+ORP5JwMJ4 xj7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=ZjC58MZgPhRnkzExDLu5IjMIn6AMG8VNiSAcwwj5lyU=; b=iCjaR12KeOr5htKiBEFXP74JqR3FsNkieNijktuH+pQSXOo9KDFYd+txvP/hSigy9q x0jn8rhzBeCLKum0pFYXit2OeIZBHSNz6IX2maw+AAO5qrxl96RwZc6RCao9ufVwujrn L/LAl8jPFfKIWcAVYf/LIFvwozgTigA1fpqcLImP5RwopnbvVHfvqIRmEB4fvACWDcHq NHtn021pCP5ZCb1iMMrKxT4yOUpDVL/qpsvGCRVdbGuqcRYH/S8g/IJArT/zTZDYyOoN EnVmW8eTKNPjcsz32R40GEVe2iE1tMJDLG9atSLy3ODrZ/hLOMDz5l/J5K6xAISwilpE Y1YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gateworks-com.20150623.gappssmtp.com header.s=20150623 header.b=D1oZeNrf; 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 n6-v6si9006011pla.387.2018.02.06.12.29.43; Tue, 06 Feb 2018 12:29:57 -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; dkim=pass header.i=@gateworks-com.20150623.gappssmtp.com header.s=20150623 header.b=D1oZeNrf; 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 S1753521AbeBFU2c (ORCPT + 99 others); Tue, 6 Feb 2018 15:28:32 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:45696 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753408AbeBFU2U (ORCPT ); Tue, 6 Feb 2018 15:28:20 -0500 Received: by mail-pl0-f66.google.com with SMTP id p5so1974413plo.12 for ; Tue, 06 Feb 2018 12:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZjC58MZgPhRnkzExDLu5IjMIn6AMG8VNiSAcwwj5lyU=; b=D1oZeNrf9NtQDKxjLc77Pg+mh97QlTeXw3pD3Hx7v1NAf306ws6+AyTUVVfwgA8/g7 gOvKLiJHOAh+30Ff9gLymgzWMGyr/CKEqiQfhitGk40sozd8q/3VcS8outcLyMqUqf1s H11zsB3+DH/CGXqTCBv6/zyk/qrwGWTBdBWqjld+sMIuLYS6fzUgIkQnf3FeamggnlhB IkQETRQt4eOisOYMh3+4PklVkHYP+x/LCi/TfILERS4xDkBXEdHVYoMUXW44sO2kNv65 wHLNPOrsGl7BRaE5kLBDA+yDwwmyDauWv0xzH4PTYXwGbORfl1oxDBq0BsWRD/L5hCXq xETg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZjC58MZgPhRnkzExDLu5IjMIn6AMG8VNiSAcwwj5lyU=; b=V2uW19gbPeRwQ33MEgyzD7P610dr2+9bbEgmI0w1sFcDTXAtTxg1l7ob8leOFI2zv0 8yL3F2jQMzXrpDt40NXR9ff6OuoAjkRHRNiVzCY6hxZNKDzhDwo+QZggbt02jmekDo1c qDgFncZ1dY7C8B7nOvAyS60tkRQitaeFcGYDRMBNMYyv+eebfQQjvZhUmNb1FQN2Wj9O kZgRZSiy24t5XNxUX20U/41IwArMAQYsjSI81HqifCc60pxeHJIMVdaZOK49cZNZMT6f EN4Aa0VW+2DuHNwdi3m0W+yA0ttmOeGxro6wHJt6T7tV3L6Pmp4suMpProU4pwzgpbZM Uj/w== X-Gm-Message-State: APf1xPARL2tMlb1jKPeCFPCDIU0DbnrTE8kIUJV2jjN3r8zfci9/uMn2 gcPdS/W6nHUgDKyga5qcLi3z+A== X-Received: by 2002:a17:902:6b89:: with SMTP id p9-v6mr3554102plk.377.1517948899718; Tue, 06 Feb 2018 12:28:19 -0800 (PST) Received: from tharvey.pdc.gateworks.com (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by smtp.gmail.com with ESMTPSA id m9sm22943512pff.59.2018.02.06.12.28.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Feb 2018 12:28:18 -0800 (PST) From: Tim Harvey To: linux-media@vger.kernel.org, alsa-devel@alsa-project.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, shawnguo@kernel.org, Steve Longerbeam , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH v8 6/7] ARM: dts: imx: Add TDA19971 HDMI Receiver to GW54xx Date: Tue, 6 Feb 2018 12:27:53 -0800 Message-Id: <1517948874-21681-7-git-send-email-tharvey@gateworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517948874-21681-1-git-send-email-tharvey@gateworks.com> References: <1517948874-21681-1-git-send-email-tharvey@gateworks.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The GW54xx has a front-panel microHDMI connector routed to a TDA19971 which is connected the the IPU CSI when using IMX6Q. Signed-off-by: Tim Harvey --- v5: - remove leading 0 from unit address - add newline between property list and child node v4: no changes v3: no changes v2: - add HDMI audio input support --- arch/arm/boot/dts/imx6q-gw54xx.dts | 105 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 29 +++++++++- 2 files changed, 131 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx6q-gw54xx.dts b/arch/arm/boot/dts/imx6q-gw54xx.dts index 56e5b50..0477120 100644 --- a/arch/arm/boot/dts/imx6q-gw54xx.dts +++ b/arch/arm/boot/dts/imx6q-gw54xx.dts @@ -12,10 +12,30 @@ /dts-v1/; #include "imx6q.dtsi" #include "imx6qdl-gw54xx.dtsi" +#include / { model = "Gateworks Ventana i.MX6 Dual/Quad GW54XX"; compatible = "gw,imx6q-gw54xx", "gw,ventana", "fsl,imx6q"; + + sound-digital { + compatible = "simple-audio-card"; + simple-audio-card,name = "tda1997x-audio"; + + simple-audio-card,dai-link@0 { + format = "i2s"; + + cpu { + sound-dai = <&ssi2>; + }; + + codec { + bitclock-master; + frame-master; + sound-dai = <&tda1997x>; + }; + }; + }; }; &i2c3 { @@ -35,6 +55,61 @@ }; }; }; + + tda1997x: codec@48 { + compatible = "nxp,tda19971"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_tda1997x>; + reg = <0x48>; + interrupt-parent = <&gpio1>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; + DOVDD-supply = <®_3p3v>; + AVDD-supply = <&sw4_reg>; + DVDD-supply = <&sw4_reg>; + #sound-dai-cells = <0>; + nxp,audout-format = "i2s"; + nxp,audout-layout = <0>; + nxp,audout-width = <16>; + nxp,audout-mclk-fs = <128>; + /* + * The 8bpp YUV422 semi-planar mode outputs CbCr[11:4] + * and Y[11:4] across 16bits in the same cycle + * which we map to VP[15:08]<->CSI_DATA[19:12] + */ + nxp,vidout-portcfg = + /*G_Y_11_8<->VP[15:12]<->CSI_DATA[19:16]*/ + < TDA1997X_VP24_V15_12 TDA1997X_G_Y_11_8 >, + /*G_Y_7_4<->VP[11:08]<->CSI_DATA[15:12]*/ + < TDA1997X_VP24_V11_08 TDA1997X_G_Y_7_4 >, + /*R_CR_CBCR_11_8<->VP[07:04]<->CSI_DATA[11:08]*/ + < TDA1997X_VP24_V07_04 TDA1997X_R_CR_CBCR_11_8 >, + /*R_CR_CBCR_7_4<->VP[03:00]<->CSI_DATA[07:04]*/ + < TDA1997X_VP24_V03_00 TDA1997X_R_CR_CBCR_7_4 >; + + port { + tda1997x_to_ipu1_csi0_mux: endpoint { + remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>; + bus-width = <16>; + hsync-active = <1>; + vsync-active = <1>; + data-active = <1>; + }; + }; + }; +}; + +&ipu1_csi0_from_ipu1_csi0_mux { + bus-width = <16>; +}; + +&ipu1_csi0_mux_from_parallel_sensor { + remote-endpoint = <&tda1997x_to_ipu1_csi0_mux>; + bus-width = <16>; +}; + +&ipu1_csi0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ipu1_csi0>; }; &ipu2_csi1_from_ipu2_csi1_mux { @@ -63,6 +138,30 @@ >; }; + pinctrl_ipu1_csi0: ipu1_csi0grp { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT4__IPU1_CSI0_DATA04 0x1b0b0 + MX6QDL_PAD_CSI0_DAT5__IPU1_CSI0_DATA05 0x1b0b0 + MX6QDL_PAD_CSI0_DAT6__IPU1_CSI0_DATA06 0x1b0b0 + MX6QDL_PAD_CSI0_DAT7__IPU1_CSI0_DATA07 0x1b0b0 + MX6QDL_PAD_CSI0_DAT8__IPU1_CSI0_DATA08 0x1b0b0 + MX6QDL_PAD_CSI0_DAT9__IPU1_CSI0_DATA09 0x1b0b0 + MX6QDL_PAD_CSI0_DAT10__IPU1_CSI0_DATA10 0x1b0b0 + MX6QDL_PAD_CSI0_DAT11__IPU1_CSI0_DATA11 0x1b0b0 + MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12 0x1b0b0 + MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13 0x1b0b0 + MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14 0x1b0b0 + MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15 0x1b0b0 + MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16 0x1b0b0 + MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17 0x1b0b0 + MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18 0x1b0b0 + MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19 0x1b0b0 + MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC 0x1b0b0 + MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK 0x1b0b0 + MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC 0x1b0b0 + >; + }; + pinctrl_ipu2_csi1: ipu2_csi1grp { fsl,pins = < MX6QDL_PAD_EIM_EB2__IPU2_CSI1_DATA19 0x1b0b0 @@ -78,4 +177,10 @@ MX6QDL_PAD_EIM_A16__IPU2_CSI1_PIXCLK 0x1b0b0 >; }; + + pinctrl_tda1997x: tda1997xgrp { + fsl,pins = < + MX6QDL_PAD_GPIO_7__GPIO1_IO07 0x1b0b0 + >; + }; }; diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi index eab75f3..f9e1fb9 100644 --- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi @@ -10,6 +10,7 @@ */ #include +#include / { /* these are used by bootloader for disabling nodes */ @@ -114,12 +115,12 @@ }; }; - sound { + sound-analog { compatible = "fsl,imx6q-ventana-sgtl5000", "fsl,imx-audio-sgtl5000"; model = "sgtl5000-audio"; ssi-controller = <&ssi1>; - audio-codec = <&codec>; + audio-codec = <&sgtl5000>; audio-routing = "MIC_IN", "Mic Jack", "Mic Jack", "Mic Bias", @@ -133,6 +134,25 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_audmux>; /* AUD4<->sgtl5000 */ status = "okay"; + + ssi2 { + fsl,audmux-port = <1>; + fsl,port-config = < + (IMX_AUDMUX_V2_PTCR_TFSDIR | + IMX_AUDMUX_V2_PTCR_TFSEL(4+8) | /* RXFS */ + IMX_AUDMUX_V2_PTCR_TCLKDIR | + IMX_AUDMUX_V2_PTCR_TCSEL(4+8) | /* RXC */ + IMX_AUDMUX_V2_PTCR_SYN) + IMX_AUDMUX_V2_PDCR_RXDSEL(4) + >; + }; + + aud5 { + fsl,audmux-port = <4>; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN + IMX_AUDMUX_V2_PDCR_RXDSEL(1)>; + }; }; &can1 { @@ -331,7 +351,7 @@ pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; - codec: sgtl5000@a { + sgtl5000: codec@a { compatible = "fsl,sgtl5000"; reg = <0x0a>; clocks = <&clks IMX6QDL_CLK_CKO>; @@ -475,6 +495,9 @@ MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x110b0 MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x130b0 MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x130b0 /* AUD4_MCK */ + MX6QDL_PAD_EIM_D25__AUD5_RXC 0x130b0 + MX6QDL_PAD_DISP0_DAT19__AUD5_RXD 0x130b0 + MX6QDL_PAD_EIM_D24__AUD5_RXFS 0x130b0 >; }; -- 2.7.4