Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp678720ybp; Wed, 9 Oct 2019 02:29:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyazEBKjRf99yomQKPId+Eyp6J4gmZIzc9Catp5QUShIZv0W+bTno2zzMAhAGgvnARAo+nY X-Received: by 2002:a17:906:bfcb:: with SMTP id us11mr1794420ejb.299.1570613352117; Wed, 09 Oct 2019 02:29:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1570613352; cv=pass; d=google.com; s=arc-20160816; b=wQ9/29VEwiH2/1TVTmmRXRkzXEJIuP5dFo1GYKH+MYqg7Ag+J6fXdA7YUEXG+noiUM oWNxf2P1KBTZrmUrTbim3Rlut7NDM2k8aotkH2Tj+EjhCUNpDQ3V4mi175Lf2y23VR0x sPiUBbGpqfqLefyliY1tyOev5JnywVJNeBFx7Ly5kbrfz6vN7FKVJudaOAIvMgxAWVh2 DNBGoNBsn2ieui6EI/uv6HZ/pni1ZKmXNsunj30eQyb5ipnAfzFzCF5IcWUgISiS+ulL ymrBq0KJo+NXHP88s46145ffIUZLsptBUG74g6RC5PAZdD5J0+DdJ7yQ0PSzTSWJtOak ShnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=A+E2wNBkd9UoQf+XCtKEXfNeAj84Urn/Hjmraj/cMRc=; b=JwRgdivAZan/2dE+dL1c/GbcO2BNj2xa+VqbbsApRx2LX8IXuRiKXHCIWAp2xhHkcY RXojGm5DyKilSeRdZwCBPHx1g23Wl/tWSeNQKl0vnydeN+X306qp8w355C3/XZyjQJWb 5EoJDxcbZajg+8jyizU0yKY4R+DOOuqnmodXFx6cWyGOTaDKvR4Dg6Z+YmL73PzbSHk5 6JSpMlMbBAEUSzE2GJeV/d3lUPNdmAd+eGCSfAoNWnO+ED07+pJ3f8JoeQJndEF8q3dC pkjpevee+Xwp2A8gqmg1NIU9LTKW27csDYnbw5HEegdntEezsFfCozxc3Qi4/Qu5IYUG Q8eg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=HAhZ6NKf; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si978901eda.229.2019.10.09.02.28.47; Wed, 09 Oct 2019 02:29:12 -0700 (PDT) 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=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=HAhZ6NKf; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729896AbfJIJ2W (ORCPT + 99 others); Wed, 9 Oct 2019 05:28:22 -0400 Received: from mail-eopbgr690138.outbound.protection.outlook.com ([40.107.69.138]:4903 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727657AbfJIJ2V (ORCPT ); Wed, 9 Oct 2019 05:28:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eZpWI6lE/RqAHPDv2+gJnBlHh774l5OeDPD1M3JKmxYDUpbftQE+v9bVBkfwr2RM9pltwOig3deYBlUh8xtfYOWctXxZwjWeNMFFYJ9r+OD/Hhnunzp9SxKWn5exScKSbYF2USbVycA/XftU3cJ1W0OA5w6U4enlHWd0uS8Rb7psO/pWxR0q7nKMdPYf/04NN9aSquckxLdm/Kb85cDxDuqcqG7JOopRg75uwmVIa3ddsxJBJ5SEye4kfcWtaYQBwP5m3RNDUCJcRd8LmKptEQXmKs4aJzq5WnbHFq8SL7XdSvHZqErJZnkTPcgqdtVup33c0Yxpc2/kHKSb2iBLrg== 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=A+E2wNBkd9UoQf+XCtKEXfNeAj84Urn/Hjmraj/cMRc=; b=B2BvisL99Ddp3S05pkFSFSO8xxNI6SSpOl1mOfn1KG3Yqy97LEy3VHOgvUxpmwe+0VfpaQ69fdYyOTlhpL8lIqEtV3SzwktN4O09ThHTireoLQatNXtbxjvZPBkfJYnhAxWVwmg0COqA/ZAggsa8JJ+BXB3L07eOIXdNB/Pw7NrBMJduGgTOOvijrgFSuytEv7CvfNiu6Dla1No6dKC9n+YsffLiQBBbbbSNM1MkPXoeumq9W7sWeUh3ySERNOs0levPHEMv3LbPa/Hog9FvqIvYbQ8OClv3BIgmFkVSjVh2+cqlx3S354HBfs66xCsJDfCszKMB/CTHDK3C/8fmOg== 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=A+E2wNBkd9UoQf+XCtKEXfNeAj84Urn/Hjmraj/cMRc=; b=HAhZ6NKfXxlAo/7yGrimry/3zwzz08Y/WJVwDHn9uJF2c1SQ1YzWYbIOgO0QOGadW68qMpXweEQWu0yZwozNTNccCi6TdA19jHVezDjv0TgtSOET+2/c4Q3quYJCCravUmawJKoPKfQK8/cjCG4hqRfnmoal7i+JdPclLZiaik0= Received: from SN6PR04MB4543.namprd04.prod.outlook.com (52.135.120.29) by SN6PR04MB4189.namprd04.prod.outlook.com (52.135.71.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.24; Wed, 9 Oct 2019 09:28:02 +0000 Received: from SN6PR04MB4543.namprd04.prod.outlook.com ([fe80::c55e:6c70:adbb:cf87]) by SN6PR04MB4543.namprd04.prod.outlook.com ([fe80::c55e:6c70:adbb:cf87%5]) with mapi id 15.20.2347.016; Wed, 9 Oct 2019 09:28:02 +0000 From: Xin Ji To: "devel@driverdev.osuosl.org" , Laurent Pinchart , Andrzej Hajda 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" , Sheng Pan Subject: [PATCH v2 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Topic: [PATCH v2 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Index: AQHVfoPZsDTKCGgGvEaBZzoEPcILlw== Date: Wed, 9 Oct 2019 09:28:02 +0000 Message-ID: <6ad16e52cd7591d320001a842fc357d976006ef7.1570588741.git.xji@analogixsemi.com> References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR01CA0027.apcprd01.prod.exchangelabs.com (2603:1096:203:3e::15) To SN6PR04MB4543.namprd04.prod.outlook.com (2603:10b6:805:a8::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=xji@analogixsemi.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [114.247.245.252] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 41b51e75-75d8-468b-6ee5-08d74c9afb2e x-ms-traffictypediagnostic: SN6PR04MB4189: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 018577E36E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(376002)(39850400004)(346002)(396003)(136003)(199004)(189003)(478600001)(64756008)(66476007)(486006)(446003)(26005)(66946007)(66556008)(66446008)(2906002)(186003)(86362001)(11346002)(2616005)(476003)(52116002)(7736002)(66066001)(71200400001)(71190400001)(76176011)(99286004)(305945005)(54906003)(118296001)(6486002)(14444005)(5024004)(561924002)(6436002)(8676002)(30864003)(25786009)(7416002)(81156014)(81166006)(8936002)(107886003)(6512007)(102836004)(14454004)(316002)(5660300002)(386003)(6506007)(110136005)(3846002)(4326008)(6116002)(36756003)(2501003)(256004)(579004)(559001)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR04MB4189;H:SN6PR04MB4543.namprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: analogixsemi.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: alyqRrsA8pMWAiQ75GkBhEjnqGlfj9aFH9YcxLWZJzSGnE0PvZXxQAs7FA6dOKME03wDOWVVhcsa38TEZKBjCNncXJpqsmi717fycF3ieEjHZQbgpskFHIjKv57dkP9kxK9/H4DJ6TVU2sBzX4YKTPyUC7Hm5zwhRpjGv0FAz05ifr0/Nz2eZ9Goq7adJuDB5JJ60Fdj/Iltq1Glwv/ESIL+QImGR9mZf8Y9A14dck3RrqIGI0lPzfzFzdx+2D6682ZEI/FLwqskAqKWebI4Hg+RhHLeFKYktEYqBdbQ05xkGNxh55eUeekBiQsuJFstT/KgbFyc+qXXanU6O9R8Qqi5O4Jg9mTElXDU86YtoxthIbR1n38kfrwkCfGFWJfLbZbP2yQoHJyv1RIut5LFp+9SXNP8rCc/P1Nqdt7xHGU= Content-Type: text/plain; charset="us-ascii" Content-ID: <4AA4C0D0C532CA419FEEFFFC0A5D7B57@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 41b51e75-75d8-468b-6ee5-08d74c9afb2e X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2019 09:28:02.5629 (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: iIAczN4lLk3IErHrHp7E/YJCHQqe0Od6ffMBExfzhUiZnRd1IjHjseZ/z/ElpK/y8MyFE80CsFjOYG1kPwMdLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB4189 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 | 6 + drivers/gpu/drm/bridge/analogix/Makefile | 1 + drivers/gpu/drm/bridge/analogix/anx7625.c | 2132 +++++++++++++++++++++++++= ++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 405 ++++++ 5 files changed, 2545 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/Makef= ile index 4934fcf..bcd388a 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -12,8 +12,8 @@ obj-$(CONFIG_DRM_SII9234) +=3D sii9234.o obj-$(CONFIG_DRM_THINE_THC63LVD1024) +=3D thc63lvd1024.o obj-$(CONFIG_DRM_TOSHIBA_TC358764) +=3D tc358764.o obj-$(CONFIG_DRM_TOSHIBA_TC358767) +=3D tc358767.o -obj-$(CONFIG_DRM_ANALOGIX_DP) +=3D analogix/ obj-$(CONFIG_DRM_I2C_ADV7511) +=3D adv7511/ obj-$(CONFIG_DRM_TI_SN65DSI86) +=3D ti-sn65dsi86.o obj-$(CONFIG_DRM_TI_TFP410) +=3D ti-tfp410.o +obj-y +=3D analogix/ obj-y +=3D synopsys/ diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/brid= ge/analogix/Kconfig index e930ff9..b2f127e 100644 --- a/drivers/gpu/drm/bridge/analogix/Kconfig +++ b/drivers/gpu/drm/bridge/analogix/Kconfig @@ -2,3 +2,9 @@ config DRM_ANALOGIX_DP tristate depends on DRM + +config ANALOGIX_ANX7625 + tristate "Analogix MIPI to DP interface support" + 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/bri= dge/analogix/Makefile index fdbf3fd..8a52867 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_ANALOGIX_ANX7625) +=3D anx7625.o analogix_dp-objs :=3D analogix_dp_core.o analogix_dp_reg.o obj-$(CONFIG_DRM_ANALOGIX_DP) +=3D analogix_dp.o diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/br= idge/analogix/anx7625.c new file mode 100644 index 0000000..7bb4e17 --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,2132 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright(c) 2016, 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 + +#include