Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7711448ybc; Thu, 28 Nov 2019 23:40:04 -0800 (PST) X-Google-Smtp-Source: APXvYqyQukDKmW4BGOJOlQuqgdej5/yGc4Xha/AyFba4uhInMXVhLoS+UC0CsdGU0guy+V7zVrpT X-Received: by 2002:aa7:c74f:: with SMTP id c15mr6532201eds.304.1575013204615; Thu, 28 Nov 2019 23:40:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1575013204; cv=pass; d=google.com; s=arc-20160816; b=TWgrwoQcrLFuGf56oUOpONfJEmPs1BihT1cunmRW50tGUJdDg3lQ11ZMK+19h3gMjO I2bsCtLlU0wqk4OsaH2ASm3ETKmlIuODC04eeWI3Hjl0qOygHCxCKkUcr+OQGxkpL+9G Ce3aKGJ+1LQtkSJNxNAKnSEb/uAuAFzxMhtSFYjt+SmpWoPf0tf0RtFCiljuVUf9bucx EDDtCOrhTvsmzZblIbr4C4mgphtmha7Lo8IKbydylm/PNzT191ASh9QO6q8fOxsD9vmx 1Vfodr28L+ohN9NVPx65HICfOEPwlimV2tsg4bNCejXkPjQ8G2auym1ylesVhNGJKPqr Zn8A== 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=ccEjU4Go9gBHEZcrcru5Fj/zz6u81WrSa7H23C8yWUs=; b=ulcSBDw3be4xHwW2trl1iNZLgJProDAlgGjtz42jTEeZ+cJYvmMcLtMEfIyE2JHAyQ 1LEfHKLgu1RGJk+pToUJXEdidC4/Jnino2d0kX/DLqaItSGmRj4pxghY5Es5sLph4H2v ebxiqLiveMQ9zDJR/4gjOTmZvgRJY3hWuELReSJk1BUy24iVvn9Ns81ARLNe166VM+39 osEnmNt2a2VFCOtzgaf1lAvKhHFm8OjVf+LRw5lsI/I08hNoE9waCeiFsUMAx41TV3gd BV0AveD6EwgshposaK0vnBgjX/sH1AzJea6ADx5LuntNq8UawCcsIsHwS2EzgnWKlZfl FfwQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b="hwPHEk/+"; 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 sd11si13712378ejb.368.2019.11.28.23.39.39; Thu, 28 Nov 2019 23:40:04 -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="hwPHEk/+"; 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 S1726780AbfK2HiN (ORCPT + 99 others); Fri, 29 Nov 2019 02:38:13 -0500 Received: from mail-eopbgr730138.outbound.protection.outlook.com ([40.107.73.138]:38067 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726360AbfK2HiN (ORCPT ); Fri, 29 Nov 2019 02:38:13 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aAXFNtndEnSPUMvC5dVFXtopV/h0SvyXy/CbzqyswXcgTsy3Kb/661TNf3f8n1gPHz7eCcZZG3Yb97abrTvZIZfnVo5ofZOhNYKzvBuJ7N0l/20cEfgpQiwT324UNV86BJCErrsurz+P5y+cvSl9xwAWgf+be56ea/l9NhptHpdsOm9GdF4+Q07mm7dS/+ypo26CpjN+jVHr4iz5Bqc/0UI01C+Gd2eYZnJoR7ne+OWiWFmtbFlB+BUgFaNOUZ8u34Quwzwt8gMR6grYxTYzHZQkmwMTnPofyMLaIgJmg8CI4hs6nflM1jurcPBm6TzxmEC1ym87QrBHaC6xDzxCAw== 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=ccEjU4Go9gBHEZcrcru5Fj/zz6u81WrSa7H23C8yWUs=; b=QbJCWBfErrvhAN4r8AtoG+4mXLWcM1kckduQg2UUnLjvGX6r9/qnrvhhy7lTcKvkLwB4FjcTLM0Rp9ajZeOcF+y67wYE84NzBpDGGlQ22FeeCcm+tPJ4EHs7nlATt8SVjJs9XrJ5H1wvIk3Vy1TCafRAnl/3GdEIowOfndmHZwMTlprX2EvSYk28XHcEFJB0WvFtFKDvkxZ5C4WR9kFtK7hkQdUxtAu7Llc9lRxyMwdHX79I7MgSNsEHCldKd/EMDdrzJVjkHw4BvYrjK5Cwbj1Ykx0bWO1jEhODJ+nNPWVXorYJrDQgLeZPCjCf1GA9qvyi1vMIs9Bywj0WXvXB4g== 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=ccEjU4Go9gBHEZcrcru5Fj/zz6u81WrSa7H23C8yWUs=; b=hwPHEk/+dYbtmoVZ+k1YTB2MOQPF55aKgFAkC8LpGw0c3waT0O2JV1as7OQhxtxhbg7LSgnpRpqWMQwRz5yYq2Y/7WkLkRpLNEFrNZ+IrTJcRmcTK5qtaiZb70rzyV4HoDH07de4GvfLfQbF9JAn2NUifTpvC1iGmf+sqb6STcY= Received: from SN6PR04MB4543.namprd04.prod.outlook.com (52.135.120.29) by SN6PR04MB4606.namprd04.prod.outlook.com (52.135.120.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.19; Fri, 29 Nov 2019 07:35:10 +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.2495.014; Fri, 29 Nov 2019 07:35:10 +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 v6 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Topic: [PATCH v6 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Index: AQHVpoeHgiMtFa2mg0uI4bX9jPxvXg== Date: Fri, 29 Nov 2019 07:35:10 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2P15301CA0022.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::32) 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: 27c58f31-5946-450e-2459-08d7749ea9eb x-ms-traffictypediagnostic: SN6PR04MB4606: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-forefront-prvs: 0236114672 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(366004)(346002)(39850400004)(396003)(136003)(189003)(199004)(76176011)(6512007)(478600001)(36756003)(5660300002)(25786009)(107886003)(6486002)(256004)(6506007)(14444005)(446003)(186003)(5024004)(2501003)(8936002)(561924002)(11346002)(30864003)(4326008)(2616005)(99286004)(86362001)(81156014)(81166006)(8676002)(52116002)(110136005)(2906002)(7416002)(66476007)(64756008)(3846002)(54906003)(305945005)(66946007)(66446008)(102836004)(66066001)(71190400001)(6436002)(316002)(6116002)(14454004)(66556008)(386003)(118296001)(26005)(7736002)(71200400001)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR04MB4606;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: 1nxFIQwQWa8GGnURv0DSDDzKEVCtlIFGhAlt4q5MnLFRHHepUOBCzbTVkgq21Xe8Lo91OfjwXeRwWSh2d0WWoTywqb/2sR6Akj1FUNgQoWHWZ2C+1CMLZYFLPZldWn+pjI6oL3AY+QVPZE7EXkQuK5L8nrxcQbEDwWAfixrz8LkganLBjw4ZECD8XP7xzeUJ9Wb1rbi08hP2XHDigyLwIUP0ircPGMeBvm4puDhoPNLYym8fxC6j6wQleEeWv4v9f8gAPmbak5cQW37ZGOJk6NC4H0Yj/2N7DwX0J4hX2J+uqHfHdDtOnVRXeQ/1M6aIOxt+e0YWEfe7eQQ1V9tlUdHQkRqiji2SlOe8HI+/YVqx2rTCdjvDQ+c4938mn4wJ5cTngC/l9edW4bNU0NUCvQQhLDeCwSpQSoKZ6/jnP7WMi5O/cwkCoCqXQWToS65r Content-Type: text/plain; charset="us-ascii" Content-ID: <1472822FFFA36544B68A4B5D16507A01@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27c58f31-5946-450e-2459-08d7749ea9eb X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2019 07:35:10.6345 (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: jt/8WXV/d7pI5T4uphwNUNZtLSLrjOtzQkaRfSf7AH7alHgW+JIZOAEL3TuE3iZxxPbNuAxu054DoLTqkNHGNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB4606 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 | 2045 +++++++++++++++++++++++++= ++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 406 ++++++ 5 files changed, 2459 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..737f4a3 --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,2045 @@ +// 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