From patchwork Mon May 27 13:47:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 165210 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp7192989ili; Mon, 27 May 2019 06:48:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwahcUBDEojN5xE7NqBEBpuMelEUZf58+DUGNa1NH7pv0EMCDam0IY3OeQDwMBtaoXM3QXj X-Received: by 2002:aa7:90d3:: with SMTP id k19mr133454349pfk.1.1558964895498; Mon, 27 May 2019 06:48:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558964895; cv=none; d=google.com; s=arc-20160816; b=s45Xfq6KdyKhUqEfbr72/W+J2/WMlfEz8tx+9Z5PpSt6EpHWEr6GrQi61/9UaoF0rn AMT7y+Dkzb+Jo9IJrAFiSCDkQ19RRzPtRAYtXB2s5KUdwvKmPHLsMK+UWAKG+yTm1gkS R/yrIewkme++quKXnnQ6HslgTsxRVNeOTXGZ+Xa4mVQCzX0zARNr7iwJPz/vj/CpaLXx EKS0UQvOibU3OzQ61F/luhM3cDPD3sYf8DEOHEuqibYS+nCP8jab0o/DAyfJ0CuPOsOa WVs+ruKv8OvAaM5mNNbgb497tlJOhs4jpx6I4N7a18eBq2g3Oo3uqBrzgl5ElvKSzbag N4iA== 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=ZKT12Vzx/kSHE/8F3najsAsHMQLq4s4oIvtH5HXzqHU=; b=M5QwPA/6OYijnuxVguqiVtPR9YY6oo5HiY0YlRivx3JBzFEqv/FnSx1iuSdTM6qNZd wRRMqWiGx5vOrLXxCH1pRbgNPkpSfpfGjsbdOdUU5J+AuwBwQXkAcKk4Uq/QTUdVq7Wg QCJri5tW6xhpCVg9wRj9ri1FZK6KQ58mw1HsSuf2/uw5ShyZyT27KTs27w6sjPOilzK8 7xmO3wQ4rTiUvMo0v8WuFrSHAx6KEmZkvo5Ot8MSYdz0oZnHT+ceNL7En+upY5idyGJ7 gmrqwC7qqZo5NSZ8geUv/HQ8lH3dFBJxyoJDMtmVwbed6VdagzDKtPvvJvW/ZttE1DT1 z+mw== 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 y23si20128046pfn.287.2019.05.27.06.48.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 May 2019 06:48:15 -0700 (PDT) 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 7D6AC6E217; Mon, 27 May 2019 13:48:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by gabe.freedesktop.org (Postfix) with ESMTPS id 399336E216 for ; Mon, 27 May 2019 13:48:12 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4RDm33o053918; Mon, 27 May 2019 08:48:03 -0500 Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4RDm3LG054707 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 May 2019 08:48:03 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 27 May 2019 08:48:02 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 27 May 2019 08:48:02 -0500 Received: from jadmar.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 x4RDlviE065947; Mon, 27 May 2019 08:48:00 -0500 From: Jyri Sarha To: , , Subject: [PATCH v8 1/6] drm/bridge: sii902x: add input_bus_flags Date: Mon, 27 May 2019 16:47:52 +0300 Message-ID: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: 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=1558964883; bh=jnO0wQSVfRbEBt1Q0sFOXV/qwgajJK9ldb5h/H7MyV0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=JaRegP5b4EDwtUe0dmkvmgqI310ehK9utAiYb7nK/8fxfUcA/4Ghe4WVM5gS/6SAs y3MMdFWlm1Gpa3x/YfUI3JcCQiXflYFUg4LHBfp2i/vECKfTqatDUMhI5rTtyflkQ0 WHJEYpD1/ZfMtbr0jBmLVSsgy5ApsYDgG3ESabBA= 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: peter.ujfalusi@ti.com, tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Tomi Valkeinen The driver always sets InputBusFmt:EDGE to 0 (falling edge). Add drm_bridge_timings's input_bus_flags to reflect that the bridge samples on falling edges. Signed-off-by: Tomi Valkeinen Signed-off-by: Jyri Sarha Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/bridge/sii902x.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index cdb8dfdb2dff..0d3d730b97ff 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -461,6 +461,12 @@ static int sii902x_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id) return 0; } +static const struct drm_bridge_timings default_sii902x_timings = { + .input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE + | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE + | DRM_BUS_FLAG_DE_HIGH, +}; + static int sii902x_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -531,6 +537,7 @@ static int sii902x_probe(struct i2c_client *client, sii902x->bridge.funcs = &sii902x_bridge_funcs; sii902x->bridge.of_node = dev->of_node; + sii902x->bridge.timings = &default_sii902x_timings; drm_bridge_add(&sii902x->bridge); i2c_set_clientdata(client, sii902x); From patchwork Mon May 27 13:47:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 165212 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp7193027ili; Mon, 27 May 2019 06:48:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgMRhWj9ibNGlRm/0M1aLMiXRdgZkKatbm6NgE/OJMqTTOU0i6+kFNrR8wtfc6YdxfE3qt X-Received: by 2002:a63:2b92:: with SMTP id r140mr39131632pgr.363.1558964897798; Mon, 27 May 2019 06:48:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558964897; cv=none; d=google.com; s=arc-20160816; b=u+3YsZ2pBV0NvgkjKtAcDeLdtopMK3d/qp2i4M5vcdmd7CRDg6Y2IaRbcxLazuFv7g t9yQSdOsvOEbWBsUEGotCBmg7+GLFpmNUlR+7xe2bWGN4/Ix6zo6YvIo1yWzghc4vFD7 IILFR1Dj1juobe60Q1eOwWvdPeO98rw2aq1/DRtOyIVs0I/IM27mr8YE2AEFSCpKZqHA mv1jdlBuFN4tl9xFnoiR8gE3hZ1h7/6cf0qotobaUwMYDaiT+9CpUmCdbcO4yggwcCx1 2f9tO08LvMhq2OfNyYvj1KxIrTMyzcH9Fp6qngnaJ/O0LusgWr8683URrLmje4jmxlVD cgXg== 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=otZ7oBFrIjG97sOAgdwFWtusb724sl5J2CgZC04aFMs=; b=WlETnNMiMIPSwVP7ZIuOGyZWD2ZwNo1pk/IgxFxVKK9kPQXsM9gawLWalAn6apk/8M q/3IIBM0Q+VTYao8anuJABDlFEONX2fMDEPZ7l90aDI3Ym9g5mMd8bxOqAszMf9ea3Qx zWFhVggvQigSSVWJzKALaKf+Olz0V2VNPSLqKum7nu6HuP+52cT2i3uzjS5sj4A0kBMO v3PPUsdiBbfu7KtpVRwUBXcc0RiyHsnXQSh4ndQ72Wh32Jj2yJJ5KIILY5kHAUWkGSUt 7YTRRoVjOckeePlVDKALDQCB2pITIt1oeR0jXLxrxvcGZdYsVNji/cBTOChF23m1RZ7z jtTg== 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 b4si17955238pgb.31.2019.05.27.06.48.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 May 2019 06:48:17 -0700 (PDT) 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 049516E218; Mon, 27 May 2019 13:48:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C1996E216 for ; Mon, 27 May 2019 13:48:13 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4RDm68Y073368; Mon, 27 May 2019 08:48:06 -0500 Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4RDm6xC054858 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 May 2019 08:48:06 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 27 May 2019 08:48:04 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 27 May 2019 08:48:04 -0500 Received: from jadmar.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 x4RDlviF065947; Mon, 27 May 2019 08:48:02 -0500 From: Jyri Sarha To: , , Subject: [PATCH v8 2/6] drm/bridge: sii902x: Set output mode to HDMI or DVI according to EDID Date: Mon, 27 May 2019 16:47:53 +0300 Message-ID: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: 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=1558964886; bh=Hf8IFHndzk4D6oqYha5f5/8yYRj5fgQTA/zOXHmnD2s=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GyzUuE8DUCwo1pogTWF8uek1L63iZTVcZKPiu1iQUQ1fWkBeLSW/4r3PW1kL6+Lax iK5y31Ik6dhiV0RVKFqGuiu4NzHynba9GoPc1LiuwzXjR1Ot47ftL4oseyxAAXU8tR WKEE0uAtZp/DYr1soZyH+KIvgAJJ+ZswVP6y9ywA= 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: peter.ujfalusi@ti.com, tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Set output mode to HDMI or DVI according to EDID HDMI signature. Signed-off-by: Jyri Sarha Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/bridge/sii902x.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index 0d3d730b97ff..128d8fdb4ba6 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -181,12 +181,16 @@ static int sii902x_get_modes(struct drm_connector *connector) { struct sii902x *sii902x = connector_to_sii902x(connector); u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24; + u8 output_mode = SII902X_SYS_CTRL_OUTPUT_DVI; struct edid *edid; int num = 0, ret; edid = drm_get_edid(connector, sii902x->i2cmux->adapter[0]); drm_connector_update_edid_property(connector, edid); if (edid) { + if (drm_detect_hdmi_monitor(edid)) + output_mode = SII902X_SYS_CTRL_OUTPUT_HDMI; + num = drm_add_edid_modes(connector, edid); kfree(edid); } @@ -196,6 +200,11 @@ static int sii902x_get_modes(struct drm_connector *connector) if (ret) return ret; + ret = regmap_update_bits(sii902x->regmap, SII902X_SYS_CTRL_DATA, + SII902X_SYS_CTRL_OUTPUT_MODE, output_mode); + if (ret) + return ret; + return num; } From patchwork Mon May 27 13:47:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 165215 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp7193088ili; Mon, 27 May 2019 06:48:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0sXXsFeS7cnOm+RoCkhubWcTjYW+f5XMAx/ddBNO1Rnot4jTvF9hslNVQ1hTJ2nkJLmFp X-Received: by 2002:a17:90a:a00a:: with SMTP id q10mr31152412pjp.102.1558964900749; Mon, 27 May 2019 06:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558964900; cv=none; d=google.com; s=arc-20160816; b=xtAeUME3r0oJrex44Bd750Djctuwh2CV8iXrD1Yr05aQZiB4o8xPOr6c5QcESeHMnt 2FCao6eSJHHf2T2CgyJZ3Vcleyd97zVJ7AnzuMfq7BC9ukAROUzntnbfX276GsoiTDry uI9KvhMymUKmDrc/EdP7jWarfbS7V21lJYpVb0cINnPFTWse4eqgD+DkWJYKp+8G5yll UnrFRcCAfVI1P43WqR/IhovDHAdAVW0/7n4E/aJGSZlict69cDWzmZqfkg4bYBENw5jm KJRqzEGTKhbQ00izjQoDpEbaeHcnWyUOCnZ++aeAh6lyHFiFbx3ut42EDC0/VKUuoXNY U5JA== 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=vl1YkIPeddY4zE8ntWTyaoOhb55p/k02lsRgMxvQH7E=; b=Q3QRUyTdLEFrSK7BIp15WUh9khjOrD6ab8lKE90fNhYL5lOyxTVzYVRcbtzbohzS1X Smbn4jGX+biLd1JthTFKmKw3nNaX1gO8XCXgkNSQzd9bwwPYoJ9YIidvEyLXbRyHkhxH L/xNmZ/zbdBZMu3od9b/eebicaa9r1S6y6MMXyDqQT+cF6zgIsgm+05DY+2WlNSmBaFr IeFbmAfu9FgaNCPOvgZpiD9dOH79ZU5edUZDjuKxhwycc1XQeJow6E4SZe32olr+/WN3 nHSHGfCQiUBFp10ez8FsoaAgQjQRe4VR4+7E8smq9DhWNLndYdcQ5+UPDTtjwXBezIv1 sIIg== 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 w5si17068854pga.550.2019.05.27.06.48.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 May 2019 06:48:20 -0700 (PDT) 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 906CD89216; Mon, 27 May 2019 13:48:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D20C89216 for ; Mon, 27 May 2019 13:48:18 +0000 (UTC) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x4RDmBow053952; Mon, 27 May 2019 08:48:11 -0500 Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x4RDmBnm026368 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 May 2019 08:48:11 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 27 May 2019 08:48:11 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 27 May 2019 08:48:11 -0500 Received: from jadmar.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 x4RDlviI065947; Mon, 27 May 2019 08:48:09 -0500 From: Jyri Sarha To: , , Subject: [PATCH v8 5/6] dt-bindings: display: sii902x: Add HDMI audio bindings Date: Mon, 27 May 2019 16:47:56 +0300 Message-ID: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: 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=1558964891; bh=tXdIuQWjAhHLfchDCp84KHyZg8p1JChPL/Ztp9I9tiA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=LFu9LiSht6nSP8iT+FEf/C0tJVePpm8+Kz/8V3ApTVfhrbQ8Tz2vFJpi57Rum8IBT nOaRxDmDUG/vTSbTHqT883j5ZCkFUX5JNifROWf3YlSMRS867hvGEumvvu0v7qZOjF XSb25qYGuMAA0mle7nMAKqJUJsxT98nqSOEmvfB0= 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: peter.ujfalusi@ti.com, tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The sii902x chip family supports also HDMI audio. Add binding for describing the necessary i2s and mclk wiring for it. Signed-off-by: Jyri Sarha Reviewed-by: Rob Herring --- .../bindings/display/bridge/sii902x.txt | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt index c4c1855ca654..2df44b7d3821 100644 --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt +++ b/Documentation/devicetree/bindings/display/bridge/sii902x.txt @@ -9,6 +9,40 @@ Optional properties: about hotplug events. - reset-gpios: OF device-tree gpio specification for RST_N pin. + HDMI audio properties: + - #sound-dai-cells: <0> or <1>. <0> if only i2s or spdif pin + is wired, <1> if the both are wired. HDMI audio is + configured only if this property is found. + - sil,i2s-data-lanes: Array of up to 4 integers with values of 0-3 + Each integer indicates which i2s pin is connected to which + audio fifo. The first integer selects i2s audio pin for the + first audio fifo#0 (HDMI channels 1&2), second for fifo#1 + (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s + pins (SD0 - SD3). Any i2s pin can be connected to any fifo, + but there can be no gaps. E.g. an i2s pin must be mapped to + fifo#0 and fifo#1 before mapping a channel to fifo#2. Default + value is <0>, describing SD0 pin beiging routed to hdmi audio + fifo #0. + - clocks: phandle and clock specifier for each clock listed in + the clock-names property + - clock-names: "mclk" + Describes SII902x MCLK input. MCLK is used to produce + HDMI audio CTS values. This property is required if + "#sound-dai-cells"-property is present. This property follows + Documentation/devicetree/bindings/clock/clock-bindings.txt + consumer binding. + + If HDMI audio is configured the sii902x device becomes an I2S + and/or spdif audio codec component (e.g a digital audio sink), + that can be used in configuring a full audio devices with + simple-card or audio-graph-card binding. See their binding + documents on how to describe the way the sii902x device is + connected to the rest of the audio system: + Documentation/devicetree/bindings/sound/simple-card.txt + Documentation/devicetree/bindings/sound/audio-graph-card.txt + Note: In case of the audio-graph-card binding the used port + index should be 3. + Optional subnodes: - video input: this subnode can contain a video input port node to connect the bridge to a display controller output (See this @@ -21,6 +55,12 @@ Example: compatible = "sil,sii9022"; reg = <0x39>; reset-gpios = <&pioA 1 0>; + + #sound-dai-cells = <0>; + sil,i2s-data-lanes = < 0 1 2 >; + clocks = <&mclk>; + clock-names = "mclk"; + ports { #address-cells = <1>; #size-cells = <0>;