From patchwork Mon Nov 25 13:10:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 180153 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3132436ilf; Mon, 25 Nov 2019 05:11:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwqthSohBrPlwodMYWZ3u0B+gtw61LTBkoYDbQB3i5q04Nl/51UTi9Jp5PdpOj/ldiKSE5U X-Received: by 2002:a63:d617:: with SMTP id q23mr25027012pgg.146.1574687491309; Mon, 25 Nov 2019 05:11:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574687491; cv=none; d=google.com; s=arc-20160816; b=jqHRpix2t59FiS8BHA2WBZXakVn8CeUV33uvfUlhCGdvr3ifBB81GZDYwZF/Kq2qzn UBkgkRYrQ2Kx0MNK03CzSF3G4CeuW3t+DUMdhc7I8JIuqaF9k7DtmLVwqTPs7UCXP8EK Rh3O9cZBMaOoeYNUfhxmFt+HZYBC5rEeydFOoHZn5UMgkF5EUK1aBn49p8iDH6FcmecD 98e7KlwuSfm3bs/BtN8cMLkMVflbWNf74bUVHYMuWnPfT6THJYToNmu/EcSV01cHr8eR QZ2X4ji2WOjuv/hn8gxkDwte7/ccb2UqhUNDDqtZJk+9Wr4SbBs8pvvI2JSqDQy0roB3 7ARw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=9gJYXyFzcTVRcMvgsSEh2m7uXnuIR/ssZ9y7ZZSps9s=; b=gGKphNX8+qv4xqfPxKrEa+h0CAX/FSaenOOy9GLxSiCWSfo+x7q0nGCra20hE+mYYE 2l8DRf/zNvSbVJ3VhEyR8ocDvtPRvbnpfYDjh7vauyeHzNOsN5LFfbbRqTnKOjbWhjvl NEUSGjP5JemDbURb/tSSZP34oymKmppi9d/yLRCrp6aALniHnWa7ZR/aroLksBICpHe9 14S3Rwbpyb2B2b3d6gz90U9gm+yG/OtfSZvg5w+ihV6U0v6VN5yFpmdWcv+SxSubawlq brDJJnv4eSuxJjB5473g1oUy+MsiEsq+T2xps+IWiQ752qkxEifQcSuZHyWlbfRo4CWa hpPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id w197si8086861pfd.106.2019.11.25.05.11.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Nov 2019 05:11:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B12689FC9; Mon, 25 Nov 2019 13:11:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2B1D089FC3 for ; Mon, 25 Nov 2019 13:11:20 +0000 (UTC) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAPDBCI8126062; Mon, 25 Nov 2019 07:11:12 -0600 Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAPDBCFv070827 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 25 Nov 2019 07:11:12 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 25 Nov 2019 07:11:12 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Mon, 25 Nov 2019 07:11:12 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAPDB7rl113038; Mon, 25 Nov 2019 07:11:10 -0600 From: Tomi Valkeinen To: , , Subject: [PATCH 2/4] ARM: dts: am437x-epos-evm: add HDMI support Date: Mon, 25 Nov 2019 15:10:58 +0200 Message-ID: <20191125131100.9839-2-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191125131100.9839-1-tomi.valkeinen@ti.com> References: <20191125131100.9839-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574687472; bh=agMY92W2bwaR6RtyoJZToavWwnkd24a1j8kvLzHdN3Y=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=pT7b1L03JH3AL788c+iiy6tBVoFRR49sN1ehmL6lcnh80MWtecUc+Zv0CUT41EAZE tf3d1178t0Hj0rNwzYHXu/BFgIrfBGhpL9xA1A5Hfv/6oWdQ4CQnwkkoLvdXnSBecu IGfAwj30f+8z9hcXQk7q9stngeSRUkOFgEekagHY= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Tomi Valkeinen , robh+dt@kernel.org, Jyri Sarha , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Jyri Sarha Add HDMI support for AM43x EPOS EVM. The HDMI uses SiI9022 HDMI encoder for audio and display, and it is mutually exclusive with the LCD and analogue audio. The choice between LCD + analogue audio and HDMI + HDMI-audio is made by booting either with am43x-epos-evm.dtb or am43x-epos-evm-hdmi.dtb. Signed-off-by: Jyri Sarha Signed-off-by: Tomi Valkeinen --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am43x-epos-evm-hdmi.dts | 120 ++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 arch/arm/boot/dts/am43x-epos-evm-hdmi.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 612149069180..43ba465596ad 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -777,6 +777,7 @@ dtb-$(CONFIG_ARCH_OMAP4) += \ omap4-var-stk-om44.dtb dtb-$(CONFIG_SOC_AM43XX) += \ am43x-epos-evm.dtb \ + am43x-epos-evm-hdmi.dtb \ am437x-cm-t43.dtb \ am437x-gp-evm.dtb \ am437x-gp-evm-hdmi.dtb \ diff --git a/arch/arm/boot/dts/am43x-epos-evm-hdmi.dts b/arch/arm/boot/dts/am43x-epos-evm-hdmi.dts new file mode 100644 index 000000000000..314e9e8c513c --- /dev/null +++ b/arch/arm/boot/dts/am43x-epos-evm-hdmi.dts @@ -0,0 +1,120 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/* AM437x EPOS EVM with HDMI output */ + +#include "am43x-epos-evm.dts" + +/delete-node/ &lcd0; + +/ { + aliases { + display0 = &hdmi; + }; + + hdmi: connector { + compatible = "hdmi-connector"; + label = "hdmi"; + + type = "b"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&sii9022_out>; + }; + }; + }; + + sound@1 { + compatible = "simple-audio-card"; + simple-audio-card,name = "HDMI"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&hdmi_dailink_master>; + simple-audio-card,frame-master = <&hdmi_dailink_master>; + hdmi_dailink_master: simple-audio-card,cpu { + sound-dai = <&mcasp1>; + system-clock-frequency = <24000000>; + system-clock-direction-out; + }; + + simple-audio-card,codec { + sound-dai = <&sii9022>; + }; + }; + + sii9022_mclk: sii9022_mclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <12000000>; + }; +}; + +&lcd_bl { + status = "disabled"; +}; + +&sound0 { + status = "disabled"; +}; + +&tlv320aic3111 { + status = "disabled"; +}; + +&am43xx_pinmux { + sii9022_pins: sii9022_pins { + pinctrl-single,pins = < + AM4372_IOPAD(0x848, PIN_INPUT | MUX_MODE7) /* gpmc_a2.gpio1_18 */ + >; + }; +}; + +&i2c2 { + sii9022: sii9022@3b { + #sound-dai-cells = <0>; + compatible = "sil,sii9022"; + reg = <0x3b>; + + interrupt-parent = <&gpio1>; + interrupts = <18 IRQ_TYPE_LEVEL_LOW>; + + sil,i2s-data-lanes = < 0 >; + clocks = <&sii9022_mclk>; + clock-names = "mclk"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + sii9022_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + + port@1 { + reg = <1>; + + sii9022_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; + }; +}; + +&dpi_out { + remote-endpoint = <&sii9022_in>; + data-lines = <24>; +}; + +/* Override SelLCDorHDMI from am437x-epos-evm.dts to select HDMI */ +&gpio2 { + p1 { + output-low; + }; +};