Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2125812ybp; Thu, 10 Oct 2019 02:38:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXZkfNXdHE9jE+7MgqO6HaRcoBbGk7WnQU/MqQGR5C022bamV630Jwm3E1iXX0NbuM5IMC X-Received: by 2002:a17:906:4c97:: with SMTP id q23mr6915769eju.78.1570700282636; Thu, 10 Oct 2019 02:38:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1570700282; cv=pass; d=google.com; s=arc-20160816; b=eihXHpbQc7AMj52+asyUA66brxkHeCTwHTy7pzUJAu+90rccZ6h/gZ0UtGfyQBp65U ct9UZJqKYS/O52SsT5M5Pd70xxTzzxrr/W9x4oV1Zz+4dF4DjwoulCCznxx9ciNgo7TJ EE3+QMu3mEa0rx7HJmUuHfqn0pAbkm4wor+k64QQjgdh5RKyWlQPvQQUliHx73RWKvN1 5Gmjj1b8YYxV4R8Er0nLEY/A14jSnOdx/SlBsFs5uorkIVMCAofPaJMx1VP45oAe7P7F yh4oDEu9T2M3NKSEscX7k2waJ32Cy6KVa7qAb8KqLzpFRRTRyYo7Gsh+AntKpb2CV0w7 EUig== 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=zIvLcLcWymh+jkhxKif3fDJOOH1kPP6nmHtUeryZ8Fw=; b=VDpuJVvO6+5pi3zAsae1bjjVoIPdD3Cqx7ffUU1KgtMmnU+LnLQE9QsxPhHW1YDgt4 gIYnaeWh3DxcjEOBXUyWNbQ9WH+2A7aLmV0F28erma6VQSMt9lbj84jjVEY1L6unczay WoSuk9CyCDefEf8DEX+jhKBMIUxzLCM0wCt4h9UoYnQDnwkxzyc0a2t9dgmH3DOffZJS m3dCLX9of+aG2k9woaF4HbqrsRV9pFNTWt+EAoqSs0Sxlojar/gtCJdujtdnqgG8G0Zc 7JkuKlj/xlKgCdp0PXHI50vNQWKr3m0j91zpasIzHQoqC9vJdcO8UrwN3Cqc4XHxRBge Pe6w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=OVS2EEA8; 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 z10si3032916edd.140.2019.10.10.02.37.38; Thu, 10 Oct 2019 02:38:02 -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=OVS2EEA8; 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 S2387899AbfJJJhV (ORCPT + 99 others); Thu, 10 Oct 2019 05:37:21 -0400 Received: from mail-eopbgr770092.outbound.protection.outlook.com ([40.107.77.92]:54422 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732041AbfJJJhU (ORCPT ); Thu, 10 Oct 2019 05:37:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WHu75lUFtY2vQ4491taTxzkThSuAFK8J28zCl8vCMlaynYtLxRFrXB5WHPQoWYO+zGhREdEmycGb5Oia9nS6dJh5Aem10CFctGQI98BNAQZQzyJXyvwGNRqjJ6YSQo5qtIvYcb8MaXdHzlDFhWs74Tm4zOhnIoy1IVvQ84ycwn33J3IIZT7AZ5jf6ARTGpTndXdu4Op4EayiIRYrstI7VrHcaH6l4B00ha+zFNzwUAZ9LsG7hX61mk+AqJ+N+LR4RdagQVJ6srM3+UyfuuaaFnS0YlrRbQ47tqY+ZCn5hBhM4huaL5Rkmdgh1X91p6fsyCJeseeOY/M6nZqgNNfmog== 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=zIvLcLcWymh+jkhxKif3fDJOOH1kPP6nmHtUeryZ8Fw=; b=FRSmRLviFwu3GnsdzJlpfql5vh3rrkeFAXhFeYmSD/sTyEpc9nQ/yq8DaxeeG+NQR6uyPxMloNFfF9aurZiUREwnen/mFi7bQSMX7ICMYv1rbAYCeIfkdSC3GgK43uP07CKMdMJHIiSWXITmIAPfR1b8IcJBvLmSMwo+Mb/hA8qgnptfrifALLftf52lcBiDk85yPLPMxi4E3QKXmPpTGzJqk8qeXXS1gNWuKtiENWEDtMuKM+LjNhb6609gT0tFaOPzF1jCfEsXaQdgdIf2BSNJZZX6LBdva4BGXKUvaBQRLr0UF7euk4XAZfCSWP5+KKW0Nk2LASWaUCuKu0UM/w== 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=zIvLcLcWymh+jkhxKif3fDJOOH1kPP6nmHtUeryZ8Fw=; b=OVS2EEA8DoeSuxmQKGoApYmLZ/T17jR94bWnoXdsIsXQhJsxM+y5O5bDP5R4IQMQPN1dM7cH1uKr3b+4YqesH/66CwHDHKN6+g5KIHhMuvLsG1bw0l0B0LiqZIPy97lFSEVDyqUHJ6VLePjXVsgGmvSKHxh95nwCOw05IbijQ2w= Received: from SN6PR04MB4543.namprd04.prod.outlook.com (52.135.120.29) by SN6PR04MB5374.namprd04.prod.outlook.com (20.178.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.18; Thu, 10 Oct 2019 09:34:19 +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; Thu, 10 Oct 2019 09:34:19 +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: AQHVf03kuqnh4EHv10CXhqHwc1i8Rw== Date: Thu, 10 Oct 2019 09:34:19 +0000 Message-ID: <43f48a7036e5a2991bd6bd8a7361107b27e48c54.1570699576.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: HK0PR04CA0007.apcprd04.prod.outlook.com (2603:1096:203:36::19) 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: 4363c4ab-2c42-4416-9e13-08d74d650608 x-ms-traffictypediagnostic: SN6PR04MB5374: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 018632C080 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39850400004)(366004)(136003)(346002)(376002)(199004)(189003)(99286004)(4326008)(71200400001)(71190400001)(6506007)(5024004)(14444005)(256004)(52116002)(386003)(76176011)(316002)(305945005)(2906002)(7736002)(186003)(102836004)(478600001)(25786009)(118296001)(26005)(561924002)(14454004)(66066001)(8676002)(446003)(11346002)(86362001)(6436002)(5660300002)(8936002)(2501003)(81166006)(81156014)(30864003)(6512007)(486006)(54906003)(110136005)(7416002)(6116002)(3846002)(2616005)(6486002)(476003)(66556008)(66946007)(66476007)(107886003)(64756008)(66446008)(36756003)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR04MB5374;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: PFOBLKBrDzWZN9xvjzLxBokUGjlbgzXSWfWy21nRblz9HaTc74c6GqczArbGzagUhmJnjqsq22nKrrFccgXrmLE870THysUZdLpJtE1EG2s7yTak7tp6d/+6TvTwn058Cxa9OsFM5rAnIahDCJS5t6fEjNZ3JRH4nYuhvwoNYaKfOhmHP7/nzieW0UNXGPnbTXfWUiJIa4iZnx2afv0B/KaRWaSjbVpTRxEOmYRxW2mMxLXybZuBAaaL3QqCXYnz+sj4tK5GUkE04Hila2V6zP6c2+bzHDMfN2sSHXQ95O9R/UVkZbRswdOzTlYrbJL0ZBJBQE7FLcmtSE3DYlXVNeKkXKBixusVcbh28Adfc5wqSnIXK6DIv/eHOMhkkL4K7XNtyiDv3msz+64J7dXdi8sWR/H32IRboGLXAVLnTfw= Content-Type: text/plain; charset="us-ascii" Content-ID: <4CCCCEA99B09C74B92732E4319F79411@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4363c4ab-2c42-4416-9e13-08d74d650608 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2019 09:34:19.6071 (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: iR5d0a/3B7fKRQTj55QkQRKQxTgA4hXSd5KYXHMUpWLEpl8XMD9lK0Bop/WfK8I+UUBqnc4jhvHVF7LOlqObww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB5374 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 | 2155 +++++++++++++++++++++++++= ++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 406 ++++++ 5 files changed, 2569 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..4328c4e --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,2155 @@ +// 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