Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp160995ybc; Mon, 11 Nov 2019 22:37:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyOiRDwW/i7XPvL22qbID+zLaLhBRvf+xyAipGNLBwitUKVPLcI1anxRiSYc6A75R5JPpBw X-Received: by 2002:a17:906:b74c:: with SMTP id fx12mr25116658ejb.324.1573540657780; Mon, 11 Nov 2019 22:37:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1573540657; cv=pass; d=google.com; s=arc-20160816; b=YF42YiMqEkx1J9M0a3XBharOc+9dQP4QK0I3RutzcIAMs/llW4R8otE1ufaUxESnaq nAs19uoMPNLYkrWup2oZAMBXcqD3Hqa574ADDX9s5ondp+tu+/DFukI8QT2SOFmV+KGY Gm+5HKL90U+tJ/yXG6csBRu9TliMWXnMd1F9Vh5KtbXU7ISAIrALYFjHa6a0+v5uIZLH PsN9Z3ttrhqeX6piJgmoPjmDf6+GEjL0bvLmPs2ZGwTHCoiHQTeCpCPvRC3c81e1iNat frWaQqNpAS7Gbh70N+LUMNRx1h5hbTxsnVTPczSXMIEci8FThxFfH4yW2mRUuznIT2YX 1dmg== 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=ZLuUVaLv7LDcJj2x2UXLB0KOnpurjlVzXbleErQs1DA=; b=djdWK7rlM3InSCuM/J4KcCQfJtDfaD+gWGozYppP5KytolDvQrJYLc/7f+7Tzebcmb 98IgtqeWWRK/MxxOFKAfhmgKhTBSrJrAB+p5QaKMrrhCQubVsNFJGIRqD6tT8rSTT0Dk 6ZG2p4TGTcBlmUUT0AgZPARioReLHh8G5LxLSeZFxLuhQpJ93ZAYYl+Na3FAO/5Pa5mM PNMn7Ww/1SAaukR1KFCcU2hUykRSkOCSVtA7gNRqbg2jlOP9E5Romc4pyd8SgnKgkKqM nuocFaZxduc3IXOusodOomPP1Q/7gHC87frKNcMplyOrbJZALOaS865Fue842AHCI0b2 biuw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=iD4v5BTs; 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 f5si12596823edf.232.2019.11.11.22.37.12; Mon, 11 Nov 2019 22:37:37 -0800 (PST) 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=iD4v5BTs; 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 S1726965AbfKLGet (ORCPT + 99 others); Tue, 12 Nov 2019 01:34:49 -0500 Received: from mail-eopbgr820115.outbound.protection.outlook.com ([40.107.82.115]:30743 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725801AbfKLGes (ORCPT ); Tue, 12 Nov 2019 01:34:48 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D6xvr6FuUMDRIjSTIJ62gAcSj+A6JQb0kaiTtYKa9CVtXQcW5ZPj2S60uFI95SjMOGoUTxBOxW2Zlqhbv4ELEec65nRyQX/fbSSk2MQDGpOz3N0ARc20JpZOU2S3cFMmU7Sek2COyaluEO9AXedfTPzgcXtv44e0xKbtkhm4Ga8YwB9H7wmo+gyuxWBUFJQp3+byk+spDBYGfjJd7pVpeyrIuVV1FW+Qq8LT1f1nDBskm9miCBdX8ivuILAhneD2dHsLTSbtvBouEZlZP8071zYtZX6Tc+KK6fCpUsN5F2k1KfPrylEvsQn9kAlvFVp/jAEmkTWlhR8ZQ9E1yX/TBA== 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=ZLuUVaLv7LDcJj2x2UXLB0KOnpurjlVzXbleErQs1DA=; b=hOt4qk0am3Lq1Mdj5bHhVSt1S/cQP0ZAgABies9EvTrEkvFmb89V5pK0V6w6/kdcBYvYq7vdv5OL6evM6HYlaF6E+jsfwvN4kiJiyq5qAdOWGnpNFstO0sqcDNITErp3Xs0HJkSZTZNwfQMfO3GRuXn7uvCg5tzW/YLcB2ins+Bj7VuWg3dHUq3rOzmKuXgo7nJEv0qSXPmprUqv6fTIYgfURwRDhHUrvmvnCy3pNtjs7Eq+/0PcD/+0MQnnzfoDP7eOoycX+EOL0Wuq7aqPRbeChgBdheUDWk9EJQ9pnNlKqQ20Cqtc0ccfP3O6h/eVEBj+/F8rU2zy5qgFAXHvUA== 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=ZLuUVaLv7LDcJj2x2UXLB0KOnpurjlVzXbleErQs1DA=; b=iD4v5BTsje+rkCPu0Y40r94Ohi0Rsl0V1ZAlOnVoBimTO/aP17a2daL5jyLXGiJRiCGuY+Zskh4eW3TD5lLe7GCYgTgCyq3cntHrJ9bSN8cIKpH7HNSq61mNIGRCWjPIYPBoHStceZzVihFPozfT2Qpl2gahsmkSEQLkemKMI6w= Received: from SN6PR04MB4543.namprd04.prod.outlook.com (52.135.120.29) by SN6PR04MB4288.namprd04.prod.outlook.com (52.135.72.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Tue, 12 Nov 2019 06:34:29 +0000 Received: from SN6PR04MB4543.namprd04.prod.outlook.com ([fe80::859:2d31:1f00:fa16]) by SN6PR04MB4543.namprd04.prod.outlook.com ([fe80::859:2d31:1f00:fa16%5]) with mapi id 15.20.2430.027; Tue, 12 Nov 2019 06:34:29 +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" , Pi-Hsun Shih , Sheng Pan Subject: [PATCH v5 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Topic: [PATCH v5 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Index: AQHVmSM8P/XgSIvH30W+Inp+6338qA== Date: Tue, 12 Nov 2019 06:34:28 +0000 Message-ID: <6596e3e7a802e80079525a94b66577ca3ff9281d.1573540100.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: HK0P153CA0034.APCP153.PROD.OUTLOOK.COM (2603:1096:203:17::22) 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: 22a29e9b-d54e-4996-a1b7-08d7673a5e53 x-ms-traffictypediagnostic: SN6PR04MB4288: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-forefront-prvs: 021975AE46 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(39840400004)(346002)(376002)(396003)(136003)(189003)(199004)(66066001)(26005)(4326008)(6506007)(6512007)(102836004)(6436002)(386003)(561924002)(2906002)(6486002)(30864003)(486006)(476003)(446003)(11346002)(2616005)(52116002)(76176011)(186003)(107886003)(118296001)(66446008)(64756008)(66556008)(66476007)(66946007)(86362001)(5024004)(14444005)(256004)(8936002)(99286004)(71200400001)(3846002)(71190400001)(25786009)(110136005)(7416002)(54906003)(5660300002)(2501003)(36756003)(81156014)(81166006)(478600001)(8676002)(305945005)(316002)(7736002)(6116002)(14454004)(579004)(559001)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR04MB4288;H:SN6PR04MB4543.namprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A: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: oQDTMK/DZlQw2KBrJKqpQA2z8S3B7ZWTUBT/KBa7F/ZEDI3CZv6l7RXxJQpxNejvAB14RW04euuQy0Ihln77dA7lD9ot1tdZkal5Aj3KViou2cGM6eh8A0zFYDD7Hnt52MxkOADlXOcE708G1h0efDyJA/3acOGJ0shqc08RQmHu17/fgHVFUXCNnKiD4K1GagqinPRmDTvq5ooAoteUFnWkveJcFod1M0M/52NhnI3jUvMqy2ShBDn9pYLsOAIwjUUvb72GFdP7HnP1Yf3QBgzokD2tmSOkZbmb6GTIqGRV+OHFwmznQMsYDfWgu8kkBUksIXDSOc6P34g+UT/dQtCFwV0IfgSae0VKU56KIyHHV+isZkZUPqCDWXOxU+jWU5UMKMvIN/KWLH9IFnRD3GGSBVp42s/ib8RPigLsKjp4ZaJa5wj0POzSnf0hEWtk Content-Type: text/plain; charset="us-ascii" Content-ID: <7017DAEE829F3940AD9AE877656D947E@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22a29e9b-d54e-4996-a1b7-08d7673a5e53 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Nov 2019 06:34:29.0064 (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: qiq/h0TspfY3aqP5WyAvtMDSohXUyVOTq4LVhTchYjRXeN0/bKsgFEukSjHXnXLAMA5eQJryJDgJVVujMdysgg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB4288 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 | 2044 +++++++++++++++++++++++++= ++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 406 ++++++ 5 files changed, 2458 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..6ac1e02 --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,2044 @@ +// 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