Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp343264ybp; Thu, 10 Oct 2019 19:29:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxoYVghNBt8frBC8U4coO/m0DjtlYtO1uPzhfyxEXHXNomruGrSfXy0eGihGoIHBgbIExV8 X-Received: by 2002:a17:906:7e49:: with SMTP id z9mr11262353ejr.315.1570760965491; Thu, 10 Oct 2019 19:29:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1570760965; cv=pass; d=google.com; s=arc-20160816; b=bM85XzCn+h/5YZBu+1m0CcRzY/gHwKJSeJCw7rimyTZTWoo0BzctAYwiTesg/mQ5yO YeWEC74tqlEWjBCQNq67Blo8C/s7iyrlw2vsW7noue2XutgYKC4wcpCtyE3ZgFAeq5QV Z82/FtX3TubBh/Q1aC9Jhwdn542211PCJ8BydenJwlki/+fP10WugLC07cVhT2giX5CN SuDSUBzKrTUNknt6ZsPsBwErPAKVVqLdaIZqoKxuc/jVI3ph/d55iP1StszvCVcgDzJu RQTJaDYZe9KiVNQksi3qmcLiU6IUk0JDo+ydcT6Jmb5949VX0NGhgIEj8UfmhMNCW8Hi 8h4w== 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=B8MirEbiwvyRC0mO4omnIdGAEwjX4cV9hqXh17Fmzq0=; b=wHdDFlD+lfE8+CyQyvE5BeHEnfyK3wDbZrXAfraAv5DcMTNqu3v09sCPPC17dAvxe4 bxNLa4Ntg3e87ukhqEE4gv+l+HKlaAKzFCFmnx622D9EAA02r2j8PyrX6VKSfAxy+LvV Nx/M830BwY0pQO7PvzV5sMrc6H9JfjjDeDeJlTvPzdKCISgvfHNVeFW7cnmszE7QQcRl D5S9Hy+x/4VQziqVVA1136SCGWHhakIre9brmE9TqJ1uwe0mzVq1FqBXhTCZHyCl4aZ8 VOTFibMsxCIwPTUcTM1CLpY/RoTIl4c4Dk4114QrZPLL1Jr/HDNrLeI7++Reetlg6LRI 1gOw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=lC703Bxf; 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 t9si4238251ejr.29.2019.10.10.19.29.00; Thu, 10 Oct 2019 19:29:25 -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=lC703Bxf; 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 S1727907AbfJKC0J (ORCPT + 99 others); Thu, 10 Oct 2019 22:26:09 -0400 Received: from mail-eopbgr810094.outbound.protection.outlook.com ([40.107.81.94]:36843 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727518AbfJKC0J (ORCPT ); Thu, 10 Oct 2019 22:26:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nxey0HG+7llmoDjhZIg+QwZJHGMXq9JlMGCvIJno5L5m32Snq/q+K+JWiTx2GwgVnCM+Iv5YsZohlTmNgrk2tbqv/SB77SIlKj/HJkOALTorAXuEeQGDR8s4PJJ3A7cVfci5X7mNwcb5IIKyCRTSeX1MBmcik44J4X76nlwOcYyBouYm1vOiJZ+n6KVD2WumnKE7zqjnLDTIzPWk7Acems/Tj8AA6yZa1HDOu945NQ3JOx6SSRqt2lGbG0f71FKoN37yO/tPZ9WiqjM/CSMsTdwGE6vTsoId9br9J8YYidDFFbQNqIJaslkQh/HLRmbr1yM99KjnmnzX5DSj7gtndw== 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=B8MirEbiwvyRC0mO4omnIdGAEwjX4cV9hqXh17Fmzq0=; b=HFQFR0Y5QTjuO3KK7ceEpdp/YDYvz97ZSOIKpqW2LxqALAUYsxGpH0AgKRv6Ke3oeqvLgg6oA7/SQRpw8kFs6DMGjKVx8Ebx0DU6DkiimtqrKbp0+LVXC3bSBILGt6CKlUWGjks96Zcw53TJxNA3I6PqKwuHWieH9+GSg912HGn6m6gTxT81Q3LzQqlgYQ3xiWjp1tCTCcI+Fi6Q4d9FIxjiv3PupUfkrg8mPMq0xe5BOZoGEY/jm0/lgstB5RnxTgiwGASDSUQlcN7Gxj/k6eUwEGvo2SvMgzBkGeMz/fq/17BYJqI6yHlhK9io600vws4dJZBaWyJy2HUgn6cdNg== 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=B8MirEbiwvyRC0mO4omnIdGAEwjX4cV9hqXh17Fmzq0=; b=lC703BxfemiZKWNkSErgEzqOonkdPuDpVFhoDchyseDwJIFiwhgwqm7CLUUHfIfGBB69rSSpsIjBqiuD8pvHymwrjMflt72meA02woPcHqOtNT9i1M35aGG4OJr3xiG69tm2TCbb64l/+N5I0JFuo4cwj3Axy//yIArSF29kcVY= Received: from BL0PR04MB4532.namprd04.prod.outlook.com (10.167.181.144) by BL0PR04MB4721.namprd04.prod.outlook.com (10.167.181.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Fri, 11 Oct 2019 02:23:12 +0000 Received: from BL0PR04MB4532.namprd04.prod.outlook.com ([fe80::c184:37a4:7e6e:aa42]) by BL0PR04MB4532.namprd04.prod.outlook.com ([fe80::c184:37a4:7e6e:aa42%7]) with mapi id 15.20.2347.016; Fri, 11 Oct 2019 02:23:12 +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: AQHVf9rU6QPuswue9k6EbvArDMI+HQ== Date: Fri, 11 Oct 2019 02:23:11 +0000 Message-ID: <55295c49503a963f3417b917fd7163feb26ed0b6.1570760115.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: HK2PR02CA0158.apcprd02.prod.outlook.com (2603:1096:201:1f::18) To BL0PR04MB4532.namprd04.prod.outlook.com (2603:10b6:208:4f::16) 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: 607539fd-f104-4c69-dd0e-08d74df1f610 x-ms-traffictypediagnostic: BL0PR04MB4721: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 0187F3EA14 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(136003)(366004)(39850400004)(376002)(346002)(189003)(199004)(305945005)(81156014)(30864003)(64756008)(66446008)(6486002)(107886003)(81166006)(6436002)(7736002)(66066001)(8936002)(66946007)(8676002)(66556008)(4326008)(3846002)(25786009)(66476007)(14454004)(86362001)(6116002)(76176011)(256004)(14444005)(5024004)(52116002)(26005)(2501003)(386003)(118296001)(6506007)(478600001)(7416002)(6512007)(446003)(102836004)(99286004)(561924002)(110136005)(486006)(476003)(316002)(54906003)(2616005)(11346002)(186003)(71190400001)(36756003)(71200400001)(5660300002)(2906002)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR04MB4721;H:BL0PR04MB4532.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: /O7o450BH95bgeikCE6ForG7Zbic/ZKhPCjdZbCZOhygF+Y3NSs0j2BG7M9G8rPzhxdOJ0SMiAlzcXtH7HorAvZk3MH4VRnN+s3vstjrrlThDn2aVNTabqRzB8xAcAoRj6m2Qoc4MXaDd23de9+vhih27hXSsNbhaCJdy9gilqeJknRsNZSuCli4oXZLhfs3TMGnUCZDO89DljkP2xrf9y9DZndwJydL7uy9Puj3UV/3emUTOA7l9Ec9FN+c3WFs+AIgZsdOmyxmk0+O8j2F+82M+dHnBAiJPEfCxa0s5rLbXCz8SnKmq+qM2R1faXk0KNm2msvvzs5nhyvB0QiSiu5VMDUQNnPEOS0tLV8nwiecQcivNU+4LSMGaFIxUURR8ylgnDsPnNF0HZqyy423tOFbbzRVJcNTzxE4FFXmI/c= Content-Type: text/plain; charset="us-ascii" Content-ID: <0A55B4CE6C17B84C90D1C6A32B0D3A3E@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 607539fd-f104-4c69-dd0e-08d74df1f610 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2019 02:23:11.9174 (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: bVfUy+K7scV/44AjMYBylqBxgr57Q4Y+ut4xoC59tL6FFOmpEOiFTNWyKbi9HG9KkQ2Yjf2bDMX0ZEIYUGGdlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR04MB4721 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 | 2153 +++++++++++++++++++++++++= ++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 406 ++++++ 5 files changed, 2567 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..96adf3b --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,2153 @@ +// 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