Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5530100ybp; Tue, 15 Oct 2019 00:39:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqytE8Q1G/sOxiIVxWy+x4poDX3R+7RMKLp7+1YFvSARI2pBSIi10iHEzKJHx7C7fTJXZ6Io X-Received: by 2002:a17:906:6a8e:: with SMTP id p14mr32631898ejr.137.1571125145914; Tue, 15 Oct 2019 00:39:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1571125145; cv=pass; d=google.com; s=arc-20160816; b=WG/+79W+iUGReV6DQ4FEumvHbWQB8B/siFAJPZ4zVbaQgwnGlbzchiuePTNv3v/gt/ jiIX8mKMJ3u3/t8K5BfKZie3MJBr2D7YMcQHWb2hLx6Rvgxqme5uj+voWjF8lcTMRqIG sb39EiBdfd9rY6qUcsTTzu2zZ8KoF1R0lj7HW45jAOP7I+wv+aV1V6d40Y0FgWjr/qao V/nx05hqC3n/mw9HOW7dL7z4UTQHLvOfOORFfLwAHUFMzxZr2uxgPh8r1AIVdJvt8P4K ovUG5lFDUivoeecVVhvuqlMcmyccMVGJGHf2dE2Y8OQYVNVfDc07jmB3tHzwHX6lrVLa dV+A== 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=3UoPq8SWhWfUpB7d7KdB1GuwdKvGMPVJacXzluwjtJs=; b=GHXALeUiqC3JaFL6OdjxqGSxUMYqNOdVB1sgdrVPthpcOENGqA8NM1bbcClMB6vmXP hkIb4PeK6zXGgUKPWa7SHnzc7xFvabQlIH73yQrlYERshbZHzb73EI03p9fZXRUq8FYv 9p8/2YRZOVtpU/54XJa1H70MmHTaQFmM+muvdk3RcNLEK30Ax3Ix++XDCoPetffglQre TbijH5L9AF67NC4OIChnZaWwjWn73baZjUEP4SC5Yp1ZlF3NRKoyhFuTV9AXaQ7tX7B3 FHXovp3OnIhTRj1YMvNHvZ9voChSfrWWKGdo0YhU/5D8O+tcLWEkHxW9aHXy5NOPxqdX HeIg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=Mcu8C0cy; 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 j21si12885288edr.376.2019.10.15.00.38.40; Tue, 15 Oct 2019 00:39:05 -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=Mcu8C0cy; 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 S1727987AbfJOHfe (ORCPT + 99 others); Tue, 15 Oct 2019 03:35:34 -0400 Received: from mail-eopbgr750098.outbound.protection.outlook.com ([40.107.75.98]:28342 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725890AbfJOHfe (ORCPT ); Tue, 15 Oct 2019 03:35:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DROJmSs7MEEz5sRK6EEOk4C0zJ4QwnvHIRWcZ57K0sH76/9fZ11rvYj4iwTgm19TSVF+puxg2Gd8qFB+KsN5B1Jsk1NksvzmzTVVB/ODsJOLSJ7y+lA7z/+kQ9evfJbqhvUHlnmqleRDPcO+yk0ju3ChYvwYiRbVGe9FRQIMZAzYFUhfwS1TMDGw+PlE9VGRLzJ+iQDpzqQ7HHfuDx4Ot1hY/Zr/OkhNsyf/lG0sNylQT26cC9c2zJqpb161oGS6bPVfPtsrwPFa3+WwOVhGf9+L7APDsRbxqz4wZw2Lv3cHSp931w1CDLNf4yaiXttndc8F77/ngDrU7x3zB4AcIA== 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=3UoPq8SWhWfUpB7d7KdB1GuwdKvGMPVJacXzluwjtJs=; b=WR2bdU0e21AUtC/bF6Mhq7O3uDWMEyCXYnTktvwcLggrGVvmy45nHaI0psxCjPvP03fieZjFg//9blS8YaM4RtrBikUmbWIQU/UqIu3h5u9wLq6oT7lR4tgGZvOznuMqegkiTnFJ8p2nHi5DkaLgt9iBF32Z0YEjunlnZfLU96T61Ovc1qMqLzn48P0moB/tbrJKW7gKvW5gfK09kn5Pt7+qOslTBUklOMAt4OPhqvRwr2CcShcGUCEq0X+kIshxhMSQdLHAst2zw0iEYEAapqJXLdRzSkSjXFZSbtPM4II7R1OPEgkU+WD/hhUJvdg+UOdWwg3gw8wGMTqYLHtiGQ== 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=3UoPq8SWhWfUpB7d7KdB1GuwdKvGMPVJacXzluwjtJs=; b=Mcu8C0cye3z19k4IERoMzYJ9uAhpmgNCQs57Eep6NMujx3/lzfw23OYgaxi4Ts9+zOP9nj00rcj/g5kNCxaV0IrOjEyObxAPGyrXvyrs7bwe/MBT7/kORKupD3El588MtRT2lDau4CBtJe3ijMXGZpqXXKH6qFvZVeFRc6DWKVE= Received: from SN6PR04MB4543.namprd04.prod.outlook.com (52.135.120.29) by SN6PR04MB4254.namprd04.prod.outlook.com (52.135.71.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Tue, 15 Oct 2019 07:35:16 +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.023; Tue, 15 Oct 2019 07:35:16 +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 v3 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Topic: [PATCH v3 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Index: AQHVgysWa3izoa2pAEuUov9xHSM/iA== Date: Tue, 15 Oct 2019 07:35:16 +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: AM0PR01CA0120.eurprd01.prod.exchangelabs.com (2603:10a6:208:168::25) 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: 4322f3a9-bfb0-45dc-50bd-08d751423869 x-ms-traffictypediagnostic: SN6PR04MB4254: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 01917B1794 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(39840400004)(136003)(346002)(396003)(376002)(189003)(199004)(102836004)(2501003)(4326008)(2906002)(6436002)(6116002)(3846002)(66066001)(30864003)(5660300002)(476003)(446003)(25786009)(2616005)(6512007)(11346002)(486006)(26005)(6486002)(478600001)(107886003)(186003)(71200400001)(71190400001)(36756003)(316002)(256004)(305945005)(14444005)(5024004)(561924002)(14454004)(66446008)(64756008)(66946007)(66476007)(66556008)(7736002)(118296001)(52116002)(8936002)(8676002)(81156014)(81166006)(110136005)(99286004)(7416002)(86362001)(386003)(76176011)(6506007)(54906003)(559001)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR04MB4254;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: V6QiDk2C638M1A8NTxqpsvhW6LB53qL4F2Pys3NCJIkN2pF1qllhjRho78T6w/J2fJNFY/p+prZKGJmMZrpCszhIpnPsKsGe1V66/dxfrqXjnXgzcREs4hqTph1xJyqp37M/65pZuFf5x7TiSoWwZ7c6Bk7a7hQvf90gNDlgASKakvT4EtNbTT6hrgJKD5wp/jlvMBf3Tq14LtLZtvvc7GxSAcgCugHL4SCuDAaX+1dGZSC44Xo4Du2IzbQzPnmWske1Z34frZHMlvoqN/CP6BFl1qSaduSK73NA/Div8WwU8NwLOVLZcLhJh9mvlM1PBpO1PhVMx5c5v4cz83uLU8yjUuKGQBmtQsjvks/W1xQwdNAnqvRnv9MUyidmh+GTt0br1Rg9hkfvuDcmx/oJ1h9dE2ecaqdVSA7BpdcQl/Y= Content-Type: text/plain; charset="us-ascii" Content-ID: <6A4838F4FE7C1548B672FD0C2FB519E3@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4322f3a9-bfb0-45dc-50bd-08d751423869 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2019 07:35:16.2236 (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: Y0O+Z2IgNBH9Q7zQBFOUhM70bbJvp6SNfTC/SxEjn95LNMv8z2pn8NOLzf/2NBcQmuzp1PFsxDQMgavZRqJkGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB4254 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 | 2159 +++++++++++++++++++++++++= ++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 406 ++++++ 5 files changed, 2573 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..7adb79f --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,2159 @@ +// 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