Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3287875ybv; Mon, 24 Feb 2020 22:17:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzflTn3uOA58UrebsWEt5IayiDu60+cfP/lk/yWE0Yyulz5tiqeKtmohztsFq42dQUUo6e/ X-Received: by 2002:a9d:7a56:: with SMTP id z22mr40780434otm.201.1582611462918; Mon, 24 Feb 2020 22:17:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1582611462; cv=pass; d=google.com; s=arc-20160816; b=Xc1Ra8X3gQ41jdwG96VxPdpLRFBhMHFNba7q9cbcugD3MEbpaLaGmGiwLoWrMH/2yK Qu3oCruDONkA4XC8ne38e1gclbqZXWcfhjBc3CoPEwQttIsqxYThmLcBJ65OvVv1NvH/ AAfN4OuIHin5Dm8BCOBUATYNZD0j2tZYedrShcnTdpqc3tFm4CTVXD79dJwZJ8dhh/QX ZOkQezj1pbDqlnilj+JPNvD4N+0/xkx6lJAj/5bGct6u6ZkNgjdEIZ1HB1t87ERXZLun mceu7vPYH6qYbHvMoY4znYncrmIfgMvykAzeZGZySPPkHPTYSi3qYu7zkMMQ5d4tn/TV i+LQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GzTOVdUk/RBx1jLKVGJwSdFK37NB39GCZVTOAXMuAS4=; b=siViBUgO+1b27PDSR4300ef41vFDLTR1wutStd8SNfjlPN5tLfAlcvYriSVksa1Ui+ 8Rb00UmOE8vggv8s0FKDfF6qYnO3oI8aQBtLruOwvsqVKBELxBPL1is4kz3RHPFPcLlq 71kT6vPwfaW83Nd7WflLIP01YYojf5/l5qz7Jd5P8bVfMz49s5DMI9GnMUWoPjS4SQmC s/6I3Smea8iKEU+ieKABjG9t5Aogpa9wPegMaORQWXcgzOpRQAasmcrSm/OHWlM2oU1A 0BTDuQzyMBcqGzkgdaMDecKPvHLJ5TB20V+4p0iuGX8ZUb0XKnqEDwk/GAMg3PTq9kTp vu0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=dEUyyF66; 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 l6si6341251otk.134.2020.02.24.22.17.29; Mon, 24 Feb 2020 22:17:42 -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=dEUyyF66; 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 S1729004AbgBYGQb (ORCPT + 99 others); Tue, 25 Feb 2020 01:16:31 -0500 Received: from mail-co1nam11on2107.outbound.protection.outlook.com ([40.107.220.107]:30080 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725783AbgBYGQb (ORCPT ); Tue, 25 Feb 2020 01:16:31 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gPROpdgT8EhdpkNa5lCHi48uPa5PTFxGc0WaAO51HVUKPZqmgtiNS7DgNogtgAAL0ezhtuWi6dgdlWOnvrhuJpNeDIgdx7TWUx78zcii1mtWLqkniDaATpeV1JP+PAYpT//PtExhGID8S2Sru66tXwsCJR/XsSuYVo1A+jf2g+d3sKcmqqdcDc+oaNSIeSe0RRzZIM1Z6rMc4oQ+drUV62oqP+1bmXlW7fOGdG2ErXqMRuuoXFqiCUMEN6kSKFvjtJiOnzB9hQIVtlE21yTrfqSwWBgVib4s+5EtPIY1TvHFMQT/hts8IveYsVGqtky4sxbKOZs2APtcBgTBjb7E6g== 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=GzTOVdUk/RBx1jLKVGJwSdFK37NB39GCZVTOAXMuAS4=; b=H9kuoR3WJG3AXJE77PCLQFeLdgXKVheWAKQv64LlhgulLmC6896u6fyTtHYmftGy7TqP59KmB31soseLM9w6hhfHemmQg6Qnj0h3W7bl+8DU9FuAQ49cgKNPg0buUNBEqVcii1tBFw/zxlzDX0LuiISIKC+s9udiTWGkTuonZCPedjXGXLH46lUWUv5tisrkHI/jo80s5LNYW8GfeghljyX76JiNgIUsHYLeTIYrn2un57KGGNUi27o87LsnDAsYQ4Fy2pN/Wx6K1fwRpCix4DhZ4eypErV2dpmzrBvR46DvuA1XABa9cdMvJL1NkvKoHcZGBAGEZqCacU8V+xSqhg== 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=GzTOVdUk/RBx1jLKVGJwSdFK37NB39GCZVTOAXMuAS4=; b=dEUyyF66TPORm0VpzCmAx2yW/GbQRUynf9S/hBhRrY87JlZlq7nZQd1/Qal4RwQye93t/Nwo5SZvXJB6ToUz1Gw9SbliZ6KMCqZc63dRDrPPjjxJYhGGkTKe8c+sGEC9T95grDNoR4+dURYQ3Ky7MS33F0e4vLd00p0bk04CFWY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=xji@analogixsemi.com; Received: from SN6PR04MB4543.namprd04.prod.outlook.com (2603:10b6:805:a5::18) by SN6PR04MB5232.namprd04.prod.outlook.com (2603:10b6:805:f3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.22; Tue, 25 Feb 2020 06:15:37 +0000 Received: from SN6PR04MB4543.namprd04.prod.outlook.com ([fe80::9598:7ff:b397:ba56]) by SN6PR04MB4543.namprd04.prod.outlook.com ([fe80::9598:7ff:b397:ba56%7]) with mapi id 15.20.2750.021; Tue, 25 Feb 2020 06:15:37 +0000 Date: Tue, 25 Feb 2020 14:15:26 +0800 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 v7 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Message-ID: References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-ClientProxiedBy: HK2PR02CA0173.apcprd02.prod.outlook.com (2603:1096:201:1f::33) To SN6PR04MB4543.namprd04.prod.outlook.com (2603:10b6:805:a5::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xin-VirtualBox (114.247.245.254) by HK2PR02CA0173.apcprd02.prod.outlook.com (2603:1096:201:1f::33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.2750.18 via Frontend Transport; Tue, 25 Feb 2020 06:15:35 +0000 X-Originating-IP: [114.247.245.254] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: baa0cdbd-f0f1-4f8b-2a0d-08d7b9ba20e9 X-MS-TrafficTypeDiagnostic: SN6PR04MB5232: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-Forefront-PRVS: 0324C2C0E2 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(376002)(396003)(39840400004)(346002)(366004)(136003)(189003)(199004)(2616005)(52116002)(956004)(110136005)(54906003)(316002)(7416002)(6496006)(107886003)(6486002)(6666004)(26005)(16526019)(66556008)(66476007)(36756003)(66946007)(478600001)(4326008)(86362001)(2906002)(8936002)(81166006)(81156014)(30864003)(186003)(8676002)(5660300002)(559001)(579004);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR04MB5232;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: 0AGUr7zUFFglufSp6ENyfoULuiFyKCp1busCHMXpupNX3g1Rn/TROaq4ZHw8zDIbTct7SLjLLeASuDyhE1ySmYtrW1gMsbkujhUmOZeSutKsD6QXH+A009uN6AWy8ofhroPZX36qSOFz0GSIrDvMaFQ7yVk2s1ctBE9E2PKYpgJ4zrqQoEsKFngi7u9lEYWLaK2zSU2BeMOF1Vx+RGaIELpDeL5VQFwjrUb1dCy44ekutGh05eyHnLsReN4w+R+CwqO+WyAkZvACo8/5J72/Q71GL5DcZLr8Ij9xVJMKSmshowzZYpGO08Z6qClFU37jwdkf88iEc60eh9ymk5HS2eNPiJf9DsAsaAalJTz+gBiODHVu1dT5YcAAQmEt8jnIdUdg10o5nM7Be8+lMf0NP/HXy5eYnZu0oaeHsBEtvJkGYicBrcS1RChr6SF0F/pk X-MS-Exchange-AntiSpam-MessageData: OTHPdDqYP5krdFKFsEiy42AnUYfeVfI+b/mxQPJtR1VUS1Ji/9RK8VO9abLbfaMvlKJ2GgpT3Psg+WVdRJiF8lQu6MxiZ51hhaku8NcciUZI9dzFkQt3ILOZalRbwX2s0Sh0HRpC28rQeQvl72irPA== X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: baa0cdbd-f0f1-4f8b-2a0d-08d7b9ba20e9 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Feb 2020 06:15:37.2916 (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: GKO9TRGDIfHcBQiBZ+pjMzd6Jyo1xHdoK4b2TTgwRweCLCvAz0+I3EkkXyazqwVeZIxF+oTtzHXGF3Vs8By7WQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB5232 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 | 2172 +++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 410 ++++++ 5 files changed, 2590 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/Makefile index 4934fcf..bcd388a 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -12,8 +12,8 @@ obj-$(CONFIG_DRM_SII9234) += sii9234.o obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o obj-$(CONFIG_DRM_TOSHIBA_TC358764) += tc358764.o obj-$(CONFIG_DRM_TOSHIBA_TC358767) += tc358767.o -obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/ obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o +obj-y += analogix/ obj-y += synopsys/ diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/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/bridge/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) += anx7625.o analogix_dp-objs := analogix_dp_core.o analogix_dp_reg.o obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix_dp.o diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c new file mode 100644 index 0000000..90a693a --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,2172 @@ +// 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