From patchwork Thu Aug 27 04:19:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jianwei wang X-Patchwork-Id: 7081001 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0A851BEEC1 for ; Thu, 27 Aug 2015 04:25:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 38DBE20456 for ; Thu, 27 Aug 2015 04:25:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4C68620985 for ; Thu, 27 Aug 2015 04:25:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AD01A6E6F1; Wed, 26 Aug 2015 21:25:41 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0094.outbound.protection.outlook.com [65.55.169.94]) by gabe.freedesktop.org (Postfix) with ESMTPS id C4D546E6F1 for ; Wed, 26 Aug 2015 21:25:39 -0700 (PDT) Received: from BY2PR03CA058.namprd03.prod.outlook.com (10.141.249.31) by BY1PR03MB1418.namprd03.prod.outlook.com (10.162.127.148) with Microsoft SMTP Server (TLS) id 15.1.243.23; Thu, 27 Aug 2015 04:25:36 +0000 Received: from BY2FFO11FD048.protection.gbl (2a01:111:f400:7c0c::154) by BY2PR03CA058.outlook.office365.com (2a01:111:e400:2c5d::31) with Microsoft SMTP Server (TLS) id 15.1.256.15 via Frontend Transport; Thu, 27 Aug 2015 04:25:36 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.158.2) smtp.mailfrom=gmail.com; cmss.chinamobile.com; dkim=none (message not signed) header.d=none;cmss.chinamobile.com; dmarc=fail action=none header.from=gmail.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 192.88.158.2 as permitted sender) Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD048.mail.protection.outlook.com (10.1.15.176) with Microsoft SMTP Server (TLS) id 15.1.256.10 via Frontend Transport; Thu, 27 Aug 2015 04:25:36 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t7R4PUfw022233; Wed, 26 Aug 2015 21:25:32 -0700 From: Jianwei Wang To: Subject: [PATCH 1/2] drm/layerscape: Add HDMI support for DCU DRM driver Date: Thu, 27 Aug 2015 12:19:57 +0800 Message-ID: <1440649198-27244-1-git-send-email-jianwei.wang.chn@gmail.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130851231364986564; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD048; 1:Y6Y7XcLqILBnUlO1DjbZRFPnnJO9+ThtzJUuNEgUOFNytuWpCO9peQaiwFHkAqYMmj/AkeR39Jk/F+i5m5VGy4HViHL1NtqZaSrIfG4xN7iOKZz5SR+1ouGBt5YREK1AFCcZJEqk/3YaX7GPSRoXnQAnAUMqZI/kSnKQjQr/vuRdeMAGM0u5QZNQfIR58Corhgn2f6JyvzISk7JKTF6lsTWTWSxQLUNMSqdl6toCp2xcUoFkwVUc0ROZDvxkk7zd4Bevi8GfbxZD+ylpeHKG+YFHIHhrPu/UF1RrF3htd3n4dFhagthyqwyQwqubRrhoBR1LpnehYS2vpOHBdPYvrP6kY1S5XRxv1qwMnubLHUkQ7VwRwID8vygq7yg6nyKTHJceA7ZYp97Rii/BJcpf4EBkuM05tZf9bvQE8NdZA86Ea7/y+5fckOPjF74JqjjeSvvf/5PB6B2+23S7o5fhww== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(3050300001)(189002)(199003)(6806004)(575784001)(19580395003)(5001860100001)(46102003)(50226001)(5007970100001)(5001830100001)(69596002)(81156007)(76482005)(77096005)(97736004)(73972006)(5890100001)(73392002)(55446002)(68736005)(77156002)(104016003)(92566002)(81442002)(4001540100001)(33646002)(19580405001)(229853001)(87572001)(50986999)(62966003)(87936001)(36756003)(5003940100001)(82202001)(48376002)(50466002)(83322999)(47776003)(106466001)(110136002)(2351001)(61266001)(86362001)(64706001)(6260500002)(189998001)(5001960100002)(105596002)(2004002)(217873001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR03MB1418; H:az84smr01.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1418; 2:BOjaUNrL/6tOMn3U5LDUTLD4dBqm+/hKasC+Rbnd9lQyAwOk0fdPS2xn/u3nfJBPBlxX7o2lA4bUAc/JFpGYF4e/Mz78NnT23AP/ZduPgufr7BEi7P2hQKJUJq+6p4RsFJxGnwwgE+8bqoZwWNaCj2g2EbjJy+bdiQ037encgaU=; 3:uz2Y7or7R1NXjzuezV2d/+OB826RcuDHv5MtBuTlkisO56joWGYS89oghqVLkZ02LTEq27FYESMGgWO6SyGdMTu2fRuj4lsGOllzEa5EtDfHusc24M2mgdf3URX8aJwVVfCZOOCaWfsZOkYA+yNAQJLT+cW2MkXRtRYiuV256xFGuqqbttjFCBdtNVKKVc3RkmddB0EJANZJrVe40XSeQamaSYcsOAQiovqEq/6g01k=; 25:md1qWS13o2dJSXh/5yZMXsrdjS3L/MFeNneIhF4eukFufBxtI7zkM3BWx/WIqeIkbl/72dBi1s5T7mDcOc8eqOjImzZ8QzppXmrcrWv/BbeTDVR+Z18w7WRe7NZS71FDF0njTPIkiyunWZx1LpuS0zvZKUeqnemtAI5fuY+bVaYDJKTHiB+6hz1xM+O8oEpi685sk3bWq0hzJ4NrGNhveuH/PsPGF4M5naGz811HEvEDuEVSbUx/OIrZInK2GEdPBpNuJAFTO58svC2hV4otKg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1418; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(8121501046)(5005006)(3002001); SRVR:BY1PR03MB1418; BCL:0; PCL:0; RULEID:(400006); SRVR:BY1PR03MB1418; X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1418; 4:VU6CdbxxeE4sCm9ZxoNuvZDn7fEVxJC8GHDr1AcXQWyjE81gj3L8JPfZBHm8itaLd+n/dGYPEthLCh56RjaQoRBeNkG5xbNCkvHpK5gcfUjvRPvKy3sEf+glE3afLnzD+qeHhRwS4VlUZ9Z7+P0qtxZCLQkOtzHafjRRr0f7jLXxIFLQky4PcmN4JDLK+HMC0RfOPqJlkIgSeplaO9lLAU61wnLfUCFhCheq826i0YeCpOq5hDdKwkevxDo/dRoBxtZ/8/f0+rMb/36vh5m7kaJzXp3W/PEm9CsGE2IGq2OYQCcQpTkJCISK+LKmwZ8H X-Forefront-PRVS: 06818431B9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR03MB1418; 23:UlQbcSoHwGnuUPbjvSUlLSb3AONhEuDY941K0jLej?= =?us-ascii?Q?YunPVGGWuOVqvpngJL6nUNTUwF8BMvrXyCQL9EJwiyVfFz1bJ54GzEZ6Na7w?= =?us-ascii?Q?2Y6WioR7HKgulON/27xerjO+3WN0kxW1wF/LM+SGIejLceGPOJvOK2qxUcTH?= =?us-ascii?Q?8jOb08sd6ZYlE8fb4yD+ifvT0cAstOfPjJE1bduza9itx6uJ5mwYAd/Tqs2Q?= =?us-ascii?Q?F+hxkgfhrM3tY4F2qTzlO4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xJHoy15X+IC?= =?us-ascii?Q?lU5udZTkvjuCfRdzjoLJPA5JgFg2aeTqsBaZmh5tXTrl9FvsYrAVzGffAQ/T?= =?us-ascii?Q?0x9z28R0VHWsEwbJyiQN54o1C8VgydvHAZF/4ZWGM6UNwJrtdhQ8t9j5JwJT?= =?us-ascii?Q?ySSdefmhne+SvJAUSSPZ3X+8XUagxHmPplg2mkss9lf8+GhtgWPqwghYgEKb?= =?us-ascii?Q?rEzDIZEfyD07sXaEHbqjdegz+ldSs7jAnk7mShMEjiObNjLgkv+g+ZHzl5lU?= =?us-ascii?Q?K+jdQmL1JsoC6VLdNh6JnDsR+Fnlwtrx/dg8tDZZuvVo6hPv+G0g/BCdesrX?= =?us-ascii?Q?K153oSM33/45F2xU7ILkBSSP3fQFOk=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1418; 5:RqKEKxMiOCVuVitlNCfjaYlM9XXi+oF0fIIdb1VcqEOYpJTAgdaN1MQ0CoNMqy92L0oNS/rwU6tV7X4zwhcapLvQFOsuRoUpR0EUBqtChj2mfV2tDcU1eymw5cO6ToudwKCVt07oeswYspQjGL+uacrzptPPzCabTbNR9Wa9I6w=; 24:TTka1A1iGh2jt6fBNc6cQMvbU62lGSgK2MY6PfGSOQuMwkB7/sQ7kOLVF0nnofAOrb51bGEjklGDB/jYnIw0c/KDj9OGvsiYwWm0zn6nqxk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2015 04:25:36.2490 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1418 Cc: devicetree@vger.kernel.org, Xiubo Li , Alison Wang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some Freescale SoCs, there has an DVI/HDMI controller and a PHY, attached to one of their display controller unit's LCDC interfaces. This patch adds a driver for SiI902x. The SiI902x is a HDMI transmitter It supports resolutions from standard definition 480i/p and 576i/p all the way to high-definition 720p, 1080i, and 1080p, the highest resolution supported by HDTVs today. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- .../devicetree/bindings/video/SiI902x.txt | 17 + drivers/gpu/drm/fsl-dcu/Makefile | 1 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c | 639 +++++++++++++++++++++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 10 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 10 + 5 files changed, 677 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/SiI902x.txt create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c diff --git a/Documentation/devicetree/bindings/video/SiI902x.txt b/Documentation/devicetree/bindings/video/SiI902x.txt new file mode 100644 index 0000000..d304499 --- /dev/null +++ b/Documentation/devicetree/bindings/video/SiI902x.txt @@ -0,0 +1,17 @@ +Device-Tree bindings for the SiI902x hdmi transmitter. + +Required properties: +- compatible: Should be "sii902x". +- reg: The I2C address of the device. +- interrupts: Interrupt number to the cpu. + +Example: + +&i2c1 { + status = "okay"; + hdmi: sii9022a@39 { + compatible = "sii902x"; + reg = <0x39>; + interrupts = ; + }; +}; diff --git a/drivers/gpu/drm/fsl-dcu/Makefile b/drivers/gpu/drm/fsl-dcu/Makefile index 6ea1523..98cacc2 100644 --- a/drivers/gpu/drm/fsl-dcu/Makefile +++ b/drivers/gpu/drm/fsl-dcu/Makefile @@ -1,6 +1,7 @@ fsl-dcu-drm-y := fsl_dcu_drm_drv.o \ fsl_dcu_drm_kms.o \ fsl_dcu_drm_rgb.o \ + fsl_dcu_drm_hdmi.o \ fsl_dcu_drm_plane.o \ fsl_dcu_drm_crtc.o \ fsl_dcu_drm_fbdev.o diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c new file mode 100644 index 0000000..b91c8ca --- /dev/null +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c @@ -0,0 +1,639 @@ +/* + * Copyright 2015 Freescale Semiconductor, Inc. + * + * Freescale DCU drm device driver + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include