Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2188125ybx; Fri, 8 Nov 2019 01:04:05 -0800 (PST) X-Google-Smtp-Source: APXvYqxHBOQnM3HGe5CXTI3pG4JioakssKfdhd7hn/QGcFAU7v5NVX4TLk9i1Up47YqaKveknjF/ X-Received: by 2002:a17:906:4dd5:: with SMTP id f21mr7502009ejw.203.1573203845047; Fri, 08 Nov 2019 01:04:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1573203845; cv=pass; d=google.com; s=arc-20160816; b=tWSC/66+sUjRQjvsPQWCXdQZ4bd1jAgmCD6/sWe032jSIoZlfMs+Rx3hi03yfZz/CY vwRq8gAxfhjYQCWeFhY0TgaviQy9zJc0q4vkoG41O+rZayf+fuLItBqMmrIJ7ZQi3NPT dNFQRnH3hdhxuHUkv75Zs9ByS9rjNxlE6xSMEHpOS+y/3Ido7GUQYzO4RIlLNsZkLLlO E5d18MR629ni31Wuzj3cdIlAls9oBv9uGe94v03VPihR5wMeMeOXe+5zl8ljWcDHqGxC 92oJLpAUj+aDYfmP4/hhLUNMUguDkxdpcmakdktkJe3wBYLZtXl001TFWvPMxGwtUXf7 ntWg== 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=13lIclAied9cybafH8Vw+F4SFcCNKUfkONMKIjNTv9w=; b=GoY5obOOMPMG9xbAdhrwHBEPK/+XmBsyj5yHvOcfvDyn38JMaJwEd/ylZORv1rWU2g VJLmDx784Zs1SmqwERkSSyB/8JOEDMYVG6+UZfN0OWWCcW3jGb9uSgNZmB+bRXA5G9EC +xEQtwDIuXxEEMNBOC1f/K3S5O/MGg16Z1e8fCDwaCcqcTa4mJbuETwJrZvP5aFRras7 C00fUWPPiFNtYqHMHzp26qV6Z0oVvCWvLNNvn8YvtCdc3X777HZRzYZERTyoE1fSWekf CdlPoTPSjqgZ6VGa8z832bpMU8NKetp6q7kh5GqE33bH54gqqpxP9g8nAQnPXr6+MgE7 /l6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b="d9N/j3BW"; 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 mh20si3122827ejb.268.2019.11.08.01.03.39; Fri, 08 Nov 2019 01:04:05 -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="d9N/j3BW"; 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 S1730221AbfKHJCb (ORCPT + 99 others); Fri, 8 Nov 2019 04:02:31 -0500 Received: from mail-eopbgr820095.outbound.protection.outlook.com ([40.107.82.95]:3391 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728513AbfKHJCb (ORCPT ); Fri, 8 Nov 2019 04:02:31 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Va4jSScsf01E4hpCx1ELizWe2pi8i5AfplgAyOjzpi0hlCs0AuiAff8i08r/0vRWm2lFx0t743HFvfY9kouVa4rZeRjA24cvd3zO5WyyFWlTa7ovcXxnc7AyJAvo55xq1K1Ic3AyBZxODKolvejps2v8+U3/WrAviVnnQsPxKDXgpDRpbcnth/DJ5RsvNycfo6FIgpTHjCE9B53A+ChvjEeLSbuZp3FL6Wzk0OlqaN+NkEoK5sgZch9M+BlOR4186UpAFz9hzqPka1FFLrs19YziyBRCA7BgqlH4Ao1goa45Pds+6JsMq2dRx07f1UmIxudIh3auZyanF1BQxHk5Vw== 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=13lIclAied9cybafH8Vw+F4SFcCNKUfkONMKIjNTv9w=; b=dp7ME4KOY+ovVEJHuSogPUPcYiUzSWI7HXVGqVN1ZmgSZnRoAm+Abrd3yqOBEE+MB9WwhJ2hke7kDMs+i4RLS6+EnBzy44q6RRfKVqQCqnmzXVVCVQOXMJbKC6K4b+xcohqrmWQvcw14uLHoYWmBLsdg4Sq5SxKWcSRnXxQEk+6ps4c5yUYou7bpZC94VJ/zcAycvpZwpfKyaFRoqa4BSLpq6irXMAk16lFvHKw3Z3VBla3ShS0kPLUhPbCbikANMhavYYeQnGiYDTAiolC/AT3b692WW2LxS9uOFu2qnWzLPzmqxYOv7I1d7kePfOyIYMw0qc4NI3I+LjjywuaMDw== 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=13lIclAied9cybafH8Vw+F4SFcCNKUfkONMKIjNTv9w=; b=d9N/j3BWD32qqrrEHeT0MTTLmUCBUWsKtUqWajVTQ15LNgOg5BpKvLwULsoIQdtPqZZYCOmVtQWZneDBAKdKcMHUXEhEKViuKRIMNLgn/zXDv78vOMYdP9lReByKhr5WDZYO7ucLgjshMyPJbpzmge08l+26rv4rfXQSxZvfUtI= Received: from SN6PR04MB4543.namprd04.prod.outlook.com (52.135.120.29) by SN6PR04MB4942.namprd04.prod.outlook.com (52.135.114.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Fri, 8 Nov 2019 09:00:55 +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.023; Fri, 8 Nov 2019 09:00:55 +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 v4 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Topic: [PATCH v4 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Index: AQHVlhMHGVPC2UFePkmbe7dqtRsyKA== Date: Fri, 8 Nov 2019 09:00:54 +0000 Message-ID: <50adeb90035197deeb7a7cfe7b14954d29a741b0.1573203023.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: HK2PR02CA0184.apcprd02.prod.outlook.com (2603:1096:201:21::20) 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: 121e1626-7a41-4454-359f-08d7642a297a x-ms-traffictypediagnostic: SN6PR04MB4942: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-forefront-prvs: 0215D7173F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39850400004)(396003)(366004)(376002)(136003)(346002)(189003)(199004)(71200400001)(256004)(2501003)(486006)(8676002)(5024004)(54906003)(2906002)(6486002)(107886003)(6512007)(14444005)(11346002)(446003)(6436002)(2616005)(4326008)(476003)(25786009)(102836004)(66066001)(8936002)(26005)(118296001)(7416002)(30864003)(52116002)(7736002)(66446008)(66476007)(66556008)(66946007)(99286004)(316002)(5660300002)(86362001)(71190400001)(186003)(36756003)(305945005)(386003)(81166006)(561924002)(110136005)(81156014)(3846002)(6506007)(76176011)(14454004)(6116002)(64756008)(478600001)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR04MB4942;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: r2NrOiePEmM2d7jGnwYaUOT2gcG6ZgnVyXFYGgl68epffP3tFt8OCh1potOgTmiFvNyzTLu/pfqV8CwksSnGkfo88LjpB/OasGCY59bgSwzl1dPjpbNfMlszD/zk/3aXFooJnlavTMxbHWYFMJAnBZtsVRgXhgnRYx7H7CLS5Uzk/mZma29G95T9x5WaYfiUxz85OvcEcWg2ovH/aANqEou2cW/pAJoeg/dcqx6NEYpPai8pwL3n3+GmNQ1psWfTsWS5wGBvLsz+VfybF8tkgIOqschkhE/TOVq86lxo7fGXUd0BoFM43nXvG8gkxpEeuu4ldveyPnHLsUVQZbhfyMF0oOpST6KFWNNMAhg/orJQOwAtacXq8PBQaZDg1wIOrgmG1qcqFCH1mO0EAR22a09kX0pWHExz5nRMdleJGze4pwJ+fP735zfm3ISUiiXN Content-Type: text/plain; charset="us-ascii" Content-ID: <0C28BAFA2A9FAE428E0AF551B58C8755@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 121e1626-7a41-4454-359f-08d7642a297a X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Nov 2019 09:00:54.9380 (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: Im0YvTm1iO78DgkzPrcC4lHbsUo/MqeosRoEyDtdW0d4zwaMvgQYLV/fo/r9w5YyXpqm+9HNsuxdX7iaTcXw2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB4942 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 | 2042 +++++++++++++++++++++++++= ++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 406 ++++++ 5 files changed, 2456 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..ad73317 --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,2042 @@ +// 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