Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1623276ybz; Thu, 30 Apr 2020 02:37:28 -0700 (PDT) X-Google-Smtp-Source: APiQypL4i7ZMkqoqB7xV3JGw4uBf0Lh3EFwKD8BAIZZay+kWVcpxzOAnWvHJDGoCzhldedNDTrUt X-Received: by 2002:a50:a2e5:: with SMTP id 92mr1804624edm.139.1588239448469; Thu, 30 Apr 2020 02:37:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588239448; cv=pass; d=google.com; s=arc-20160816; b=vOyBuKDWdS/uw+G0ZaCVQdFDePrKBagQaI2vZxWbUJHEL/Sch1bh6msvzYtQze8HxG SgPQnlFy1GA88QdGgp2JePa7RxAodTZ6IZsPlt5+o0UbxjMrda8oCY1gHTxRSGAvuWxu NQIV/Ey0gXyoBs+tYSisEbngLnfLZNeavcLg3N/LfLh/cmxbxANTaCNasATAOO8t6b0n UkrBgYa+kwwWQjaH2mLngHr7ql4wCaiuJtlSjAwXZy/Xlb0Yfic+aGmzRMNi3cuuworC kzzY0fEudeEwuUGNoW6rwb5nK+Gllm4M2TcBcqdoezuh+6J5JCBnr0QLkmzvn9ybyl7q UzBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature; bh=b59D5Y86EAdRsulwTuCJjhChgco3AbJVTyOHH8ByrtM=; b=AtRdmfBWsQhQJL6XKzSnndWTTD/aJVGOlKv9of++1H5WRGEUbRmtMuAdoOIqR3G0uw rxxw4q/FNUNUj9tnSEn9Nj9NDZFugpP/UuTLDWlRujPHM+q9yzO2BaymcQFLXSPj2Nni kDu1tCcHWb9UWj/bYiuc8YFfX1okD6azBtwMWceouypSK//HQ0wXoEPu8MSECZorP4+k aR5O9qIJj8Rqv0gFQL+fsefy6qeOB7caQ5CttOQIqji3ui/aLg2/yJO0Vlojl3xCfAZi u99F1QCO5LhybDqiibakzJRlv68yBJRm7hjpT9ygognnxyJ18V8cEonEoPenVfDzzDtj ZleQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=N1JiH4gc; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si5101800edc.217.2020.04.30.02.37.03; Thu, 30 Apr 2020 02:37:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=N1JiH4gc; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726677AbgD3Jfd (ORCPT + 99 others); Thu, 30 Apr 2020 05:35:33 -0400 Received: from mail-mw2nam10on2096.outbound.protection.outlook.com ([40.107.94.96]:31425 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726378AbgD3Jfc (ORCPT ); Thu, 30 Apr 2020 05:35:32 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eBeKG5H/tMeoPxQ2cadjPWw8amsmN8gH/HFkrS2drYIg8oh16tqnT38iXs6nmSS6KNxjM4PVHgxmuTNK3wUkD1hhVV5fdxZcOqQGILm9Css02ZYnkp+okFSHjaZqJ1E6TNEGr0z/T67KI57JXJSNxT5qExM2tJWCYwMZOub74WAZ2bGA6by2fnClJO0DALfMJtBQ1AliwpkJXoDPGPKDH9YjWhZvJcpz3WWM7SazUO7ADL6xXQNjkmyZCFmShDk50/OYAwoHnIkwIXZI7ADrWps0IpbpWJfzG8VYMZgD9cSq/oGUWv0XylQfWH7gsC8DB/GZdevBA849BY8Mhx3XpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b59D5Y86EAdRsulwTuCJjhChgco3AbJVTyOHH8ByrtM=; b=Z4J7K6fq9YDDCy1Ha9piDsdsVowiQ5Aq1DIJ58Yrb1v2z6ahFJI5N6bA0H1msmCZQNOD1yqB5adQFsGxAuc54rCKuth8VsOOlCm6iw4arBsHTAqQ+p8dhwC6feSH/07/c4NcXYriTKJ24+ok+xGupRez5iV7iUYI1xdqTvfArIjmGxLnwlCtuSWZCAyC1vpLT3hdAS1TFq81AYkyarwlZLnB/6hfESlIYU3/20puo55XnlVwu8yJ0t4kgf+C1UQBi5VhGh/kHTjcpavVMibddQiPmI8jZchakOG72RkTHKTTI5mLW0k6VoTEg4u97VWnzTtkuS0L3xkEn2489t4/iw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=analogixsemi.com; dmarc=pass action=none header.from=analogixsemi.com; dkim=pass header.d=analogixsemi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Analogixsemi.onmicrosoft.com; s=selector2-Analogixsemi-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b59D5Y86EAdRsulwTuCJjhChgco3AbJVTyOHH8ByrtM=; b=N1JiH4gcYVhoS+HdlMClo1HUMRDozAfOuWiB+xzwDclTB3MtbejL/llfmRW7VqVY1eFIoFx9mXQtkWleXaUioGY7cBaSw//pi9gOKc1327x6nEBBC6U939ZfeCRT5jgZba05iv7KGha1EaGtZIXvXS1bWAog3wMnrsAtlrt0ObA= Authentication-Results: analogixsemi.com; dkim=none (message not signed) header.d=none;analogixsemi.com; dmarc=none action=none header.from=analogixsemi.com; Received: from BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) by BY5PR04MB6625.namprd04.prod.outlook.com (2603:10b6:a03:219::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Thu, 30 Apr 2020 09:35:17 +0000 Received: from BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::4517:bcc8:a3bd:407f]) by BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::4517:bcc8:a3bd:407f%6]) with mapi id 15.20.2958.020; Thu, 30 Apr 2020 09:35:17 +0000 Date: Thu, 30 Apr 2020 17:35:09 +0800 From: Xin Ji To: devel@driverdev.osuosl.org, Laurent Pinchart , Andrzej Hajda , Nicolas Boichat , Sam Ravnborg Cc: Neil Armstrong , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Dan Carpenter , Nicolas Boichat , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Pi-Hsun Shih , Sheng Pan Subject: [PATCH v9 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Message-ID: References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-ClientProxiedBy: HK2PR02CA0141.apcprd02.prod.outlook.com (2603:1096:202:16::25) To BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xin-VirtualBox (114.247.245.254) by HK2PR02CA0141.apcprd02.prod.outlook.com (2603:1096:202:16::25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.2958.19 via Frontend Transport; Thu, 30 Apr 2020 09:35:15 +0000 X-Originating-IP: [114.247.245.254] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 008ea6eb-54f5-4e2b-8ba7-08d7ece9ca5d X-MS-TrafficTypeDiagnostic: BY5PR04MB6625: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-Forefront-PRVS: 0389EDA07F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FynCK95FnribQmO1uc5PlF7/wwOxbdggrDsR6f/hBQwvwaeZCOOT0UfjpxqQujS0bSZFgB8Mz9aASKIUnTTEkMm4VVzk7yo0WF6G9j0iPNQ7Wg7MSekQxqul18KCPGA8VZ4queHdeke2DWA16YjDEDjYpGhiDLCNJG0gSN7CwzlGlJOMpdr3BMdhKXx6x6mer2yJMc4xO/UZcdGqHOKs0TJNYclYhfJ68TDHjM96Yre7m67bR3VsMI5aVQBJcowIKmgmETyslmzKdybLdmUTkmYklj5yWGzJvgfHXmJ68ogbsjTi0fsDzveb9IZauCg8wIamJyjJKfRhQGt8o6us7vEwTCzfcf/RQNRC93ZGda3vaduHY13c4HGIIaBH0MuKcIoChqloNqZkUCQnsfDIckMAAii21cgZTriL1HL917gtMMUqCuutOzcvezKV0R+y X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR04MB6739.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(396003)(39840400004)(366004)(346002)(376002)(136003)(107886003)(4326008)(8936002)(36756003)(66556008)(8676002)(110136005)(6486002)(54906003)(66476007)(66946007)(2906002)(7416002)(26005)(86362001)(956004)(52116002)(6496006)(6666004)(478600001)(316002)(186003)(30864003)(16526019)(2616005)(5660300002)(559001)(579004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: wHrRKALBUkDLpHuXgLT4NDUT5IQFMrrEE2CJxj0gpx2xsCNenIAAPnjrBXc6AkNyo5ciaoIzRC0iPR1uLUonHhyiU4XnWYyN2drRHWSDsTcS//7O+KKUMbAQJWpituTMHYsp58hZW0846nO1a3Zwxx6GVqKrnVBBFOGtJbuRA6t6smwOdElYc5DEZL+zvVfvda8NWL7BTRS919prjPBRfjM7PIaEUNlTiPrW0H2ixNVD/fmEcT+GMxw7tHMiR177jVkrRq6oBtHeM8utwSEsaO2rCAqIbZ10obM4ZDf8n2+LEduhsGq755weVwq9JMy14DqhxkQzISjxMrls3/5K7Ry28r1pDM4cvL7YApZT8r2WyABfBpP4HPTsrcMTG/RIjvRkXGkNU6Hh5LDIOXiTNNb8Kg/6N/zWG52occRB5D+wHsKMOaSdqNQ0EHuYBUoHYqJ6QKz+o8icR4dC4LQZyvFnggIQvHkF8US5oUAYL1CcOflosyM0qTG1OXcBY7ZTnEW0kHZK3Gp/tdNyMc7DUq6dSiWGs+FUhlsnk53ex/LzH3PVWOg3ywQKW0pjl+PZiiK7SztcXq7eskxzAlWY7gU5A2gPIxjoPv5eFW1Mr/3ThwXpEyBWVpfWoHpaZXUTQFcfnDxqGNSfHOKaimgUZCbA0DsQLs+91RixqZNCLPRLpJ1dWTPLBjXwqFTa1EGQU86cw6lOo3E6et7G89snvZC+y9xnhJJHhkZzNoJ4Zl5j6zllT+m5xhIv2DqkUss+I9Be35yBNHDDUAWJPuP+dz3ih889F7/Qph3nWkLd/Vl1PL4Y56g2Z80Y4pmMympY X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 008ea6eb-54f5-4e2b-8ba7-08d7ece9ca5d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2020 09:35:16.8991 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b099b0b4-f26c-4cf5-9a0f-d5be9acab205 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6ZX6iUbvzrgRn3V78gZsLRwUn41+K/xh17tzS4NNqx7lCsQwUorRQWE4Q0YMirplbwGQ5gFepmdINNfGxxhUXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR04MB6625 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ANX7625 is an ultra-low power 4K Mobile HD Transmitter designed for portable device. It converts MIPI DSI/DPI to DisplayPort 1.3 4K. The ANX7625 can support both USB Type-C PD feature and MIPI DSI/DPI to DP feature. This driver only enabled MIPI DSI/DPI to DP feature. Signed-off-by: Xin Ji --- drivers/gpu/drm/bridge/Makefile | 2 +- drivers/gpu/drm/bridge/analogix/Kconfig | 8 + drivers/gpu/drm/bridge/analogix/Makefile | 1 + drivers/gpu/drm/bridge/analogix/anx7625.c | 1959 +++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 397 ++++++ 5 files changed, 2366 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.c create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.h diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 4934fcf..bcd388a 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -12,8 +12,8 @@ obj-$(CONFIG_DRM_SII9234) += sii9234.o obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o obj-$(CONFIG_DRM_TOSHIBA_TC358764) += tc358764.o obj-$(CONFIG_DRM_TOSHIBA_TC358767) += tc358767.o -obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/ obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o +obj-y += analogix/ obj-y += synopsys/ diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig index e930ff9..c772be2 100644 --- a/drivers/gpu/drm/bridge/analogix/Kconfig +++ b/drivers/gpu/drm/bridge/analogix/Kconfig @@ -2,3 +2,11 @@ config DRM_ANALOGIX_DP tristate depends on DRM + +config DRM_ANALOGIX_ANX7625 + tristate "Analogix Anx7625 MIPI to DP interface support" + depends on DRM + depends on OF + help + ANX7625 is an ultra-low power 4K mobile HD transmitter designed + for portable devices. It converts MIPI/DPI to DisplayPort1.3 4K. diff --git a/drivers/gpu/drm/bridge/analogix/Makefile b/drivers/gpu/drm/bridge/analogix/Makefile index fdbf3fd..b6c4a19 100644 --- a/drivers/gpu/drm/bridge/analogix/Makefile +++ b/drivers/gpu/drm/bridge/analogix/Makefile @@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_DRM_ANALOGIX_ANX7625) += anx7625.o analogix_dp-objs := analogix_dp_core.o analogix_dp_reg.o obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix_dp.o diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c new file mode 100644 index 0000000..eb7162e --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,1959 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright(c) 2020, Analogix Semiconductor. All rights reserved. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include