Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1548108ybj; Wed, 6 May 2020 00:13:49 -0700 (PDT) X-Google-Smtp-Source: APiQypIpjSxP7lv+jW/mZrysRS82peNNxbkTRoHrFszUJmYbVugTtxi3IGZl8iE7hesjez8LJPnf X-Received: by 2002:a05:6402:286:: with SMTP id l6mr5750744edv.134.1588749229615; Wed, 06 May 2020 00:13:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588749229; cv=pass; d=google.com; s=arc-20160816; b=McHRzhjMKci4HCQX6Lcnew7iBwSiyk7waKGXGHHvJDhRpI+EyKC28OY6tKwqmqwi9C 8Q9BsN1dngfSdjyrsILxOWpRyu4ty/576u5fNX4SfW+HwX6n396KWCFfzL8B1dVtVfvI QgNkA3ZLtfrzOM3+tH+izH0eqcZjAUPpImvOOlfLr02WUQDDKEQzHe8IIg5BmuhHexQn oDu2621rX7b2LBiJAehJ/MW1AgGPhterdhaL+kL9aW597F6qDDtIGQ7xL+jijZzpIckG a6LhxjAe6bFig7zoia8z00H3+ZT11FJfrG8SjUj+k15hyVDm4ewp+skdJ3DyzcNxqqo8 VtJg== 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=CMgVr3+1K2MnNqwTBT19XwHAkF08wbIS21+PBGhr4A0=; b=grrn3BzJxGXvpxWBt4YwVjxHz+0aVYPYEUxNpX0rNu72WUN6iP2j6bkroGZEaL6uzy e2WS/pOnm+ZNdgYs8sWVmCV/V+I8j299Nm3xbw9r3bKMbU54Ge0yQUZ7BbXcVsl6VK2e nxqe2fK13SwO1WT1yTsG6Po1OsMzYHjmtHVNp5txjUo2nYFn5qJULVQA/MbOxq+mN4y0 8HHT+r1LGHYAbLROiIZoNgFXrGTNRr8Qnu7wIptgQDFn1w3L5hHlLMVhAXDHiTr6jE52 IT/hXOQL8DfryEN8XLCE9K0VntAlXGfmqOjZEElY+q9+7txjLQQXJ8OJOyd2eHIhkdxD FeNA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b="Bb8TXT/W"; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id v16si506678eda.515.2020.05.06.00.13.25; Wed, 06 May 2020 00:13:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b="Bb8TXT/W"; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728131AbgEFHKW (ORCPT + 99 others); Wed, 6 May 2020 03:10:22 -0400 Received: from mail-eopbgr690136.outbound.protection.outlook.com ([40.107.69.136]:41916 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725882AbgEFHKV (ORCPT ); Wed, 6 May 2020 03:10:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KNGXxLQOUEGxWi9WHVoF4Fn5bWUwn99mtxKj2YfHvj+Q9SwQs9z+EHUxAMtLwiQUA7uXYiTjGz/rNKDCDwPy1XuUfEBWSlaM7zXAC1L/cvPsu0rGG9ROc1bujFGvEOXa4ZLm8B0vU+xlx9unuSFqY1MtCcW4F0hZ0dK9ZxILuoX5jGIoUMKWnRmMN3Ga0afeOF2r55A4P2vReP8Or2O3rqlGeJ3+9cSBcA2DnX8gQweEQ9qpIq9bjxcjpDOZAAapIV/NgxM9syhVIduFChCTXZX7fwt62204rnnZgciUSVJLkF25qkbDhteQjfMDG/kSyfsX+ZkS6/OsbaXM/tp99Q== 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=CMgVr3+1K2MnNqwTBT19XwHAkF08wbIS21+PBGhr4A0=; b=n7UQhvNxYiciiTNhejZg2lbsU0m+YIQRX0Vxn9aFdVuzTYDfrB1v9GLr0nGz72NnUrUomW9BvYdMMerCY+nPnRueVsrDd7ju9VuLRA9z0M6lCjhlEWvgA3MpAYA/6jc5wgcWfPj+vOc8F/ueifIhpQ3jUxSqHpPOA3rg9ZMDh3vAjO106fLF1T+2sCeyG3UJGs7XF5GhPewVizXcWd0N0EEna6O0PMbjPbcbwHgjCCja0Rdws9w3RwMbrAMZO1BqG9lEVmqur56DMB+2eBCLOnhmOFl6FnBcEHunGqYmJpo7UrihfapunHwvH7AdKhZ89Dj2fDwXsZ7hWhl5U+kn6g== 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=CMgVr3+1K2MnNqwTBT19XwHAkF08wbIS21+PBGhr4A0=; b=Bb8TXT/W9i6NWEVrTKNT1uSnMgftn+2eDWnhajLPHDPhlnCZVUO2WoElPQnYVz05GHx7TdTIxfUEB/A3Yi4LGi7i2eY+Ysgd9IcSrmLfDT+xjymXMhuAjRftLsfGyxXbl+7wrGq+AZib//GSrg6nwQPWLaty4Et6hwm1vwkLsE4= Authentication-Results: analogixsemi.com; dkim=none (message not signed) header.d=none;analogixsemi.com; dmarc=none action=none header.from=analogixsemi.com; Received: from BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) by BY5PR04MB6755.namprd04.prod.outlook.com (2603:10b6:a03:22d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Wed, 6 May 2020 07:05:45 +0000 Received: from BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::4517:bcc8:a3bd:407f]) by BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::4517:bcc8:a3bd:407f%6]) with mapi id 15.20.2979.028; Wed, 6 May 2020 07:05:45 +0000 Date: Wed, 6 May 2020 15:05:39 +0800 From: Xin Ji To: devel@driverdev.osuosl.org, Laurent Pinchart , Andrzej Hajda , Nicolas Boichat , Sam Ravnborg 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 v10 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: HK2PR0401CA0014.apcprd04.prod.outlook.com (2603:1096:202:2::24) To BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xin-VirtualBox (114.247.245.254) by HK2PR0401CA0014.apcprd04.prod.outlook.com (2603:1096:202:2::24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.2979.27 via Frontend Transport; Wed, 6 May 2020 07:05:44 +0000 X-Originating-IP: [114.247.245.254] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 313ea7f8-4e88-4694-108a-08d7f18be5a1 X-MS-TrafficTypeDiagnostic: BY5PR04MB6755: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-Forefront-PRVS: 03950F25EC X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1rFZvZ/rzCT5RGssgW9f4N3CLMYYjPUbsD1Q+pnBbBt7cnaQV6/5+FTvoS4f2u6/xwAMqOv3GVfrZdpo4auL4PKDrLue3B/hEwFkeVCelsfnAvNsfF/2t/BBLdd2ilQ0Bw+Wb21wUNFRmgnWF7rRL+BB03Afj0qfFwA4anfyzrVX2nXuPepA5TReNmjyx5HDlIV9NiIvd4wwaO81mBu1PhQsuYCms3m+RAYu5nqKdxZKRaMHqSQfm8AccslkCzHfA1rWf5JldpBIko7vosh/gDxb3GwNnVR1YiXoQE1D2RpPRkiphpSC20CNpMOzevkKqtM7HDhd02kzY1a4Yssv0+7R3YomEnTw9aSPX53Xs0qKrLv7mstdQPkGbBuBIEfKKD7wFPkwYs7Vd36GJQm9hAlpcxX40xFcdrrptxF/yl/XpD9o9aDwmSyaMwstev3pcZNTQlZoCjf+eqTwoPzhTePt45znFqmXPwxB4+Nmteir4fJS4yNVPKZFlsc5OAxF4m0x2cICiH97jert582tGQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR04MB6739.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(396003)(346002)(39840400004)(136003)(376002)(366004)(33430700001)(7416002)(186003)(5660300002)(36756003)(478600001)(16526019)(8676002)(33440700001)(66946007)(66476007)(30864003)(316002)(66556008)(4326008)(54906003)(110136005)(52116002)(956004)(2616005)(86362001)(6666004)(8936002)(6486002)(6496006)(107886003)(26005)(2906002)(579004)(559001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: YThfgkvy/c9sELupeug+jY7ETOQPkV6fg4JJhvDyyH+lKA4knSpw94kG9BkUPYwajJAtHEYgHfGX1LetnFWjjAQkNLCNbEvsQK05GrRrRm0rAGsk7xksTfr/Sozh3Q5OkZIV3X/Se5cy3xXsTlgjY05SvBnTSNm5HMsd7yab+48YBFIDVdTyOSpTtH2f1iQTYkgTdh4N06AK7Y18VS/QoeqaM+aX807LqOvgaBtKJB6Syq8qlVwtfR8kVCCOLXDn8FogmyKRS3ukUtMsFLiOcFvsokcOK6eIeC8H5HvxiwRH8SlYbpi8Pf542+YUbzHSozfZCjcN+/XWW+VkHplA2ZzNj6OR025r+JJfi5WcWGcchGR/O4wcTERHCb9SVKFHUseqUx9RQk2e5XkLmrgofwx4HGvCPmkoI2IbvWq+uuB0RXvLvY8W3D+9AmLljIarnsHpBMSO8vt5NgiV+ONTkKM95DQoxxHJqoAlX2xLEme/enGxLDYJg9w8/n1yLaYWUy6e+Khyf5vz0R535H4taWI5UjL4RDCskMqSHP5ocbDxnTBxNq/1jtbZ7du6/IBtlYs4zA5kjtGJNad0JnF7UnY0pKU5JGuc1EbKpBbPMWbnZToSxYHt1vphJOgJPUxR/3wBDA2PsvrBqRniUFAyTNLxdX9dgEReAFocSNAZCWKzqwJtKXe1xmgPwpQKioJqUiTCRvj3VLC0+e9aatrZhya0UErzejPVDcDr+g0BsyputwCxk/cB+pwt7dnolPzuMUMX8/d2jVqyWfUFOkmrusRQgR4AtGn3tx2bUiivcn/pc779XsHyUDHNz1+086DK X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 313ea7f8-4e88-4694-108a-08d7f18be5a1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2020 07:05:45.6419 (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: Cr/YEQ5OzbEb2Hnw4M6htcCQ4dsI3mVH7yuB4bCKoWrdaTJ+GAWz58xmDFCXNeDgwZxhOQ/acN77+YaVYDDUjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR04MB6755 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 | 8 + drivers/gpu/drm/bridge/analogix/Makefile | 1 + drivers/gpu/drm/bridge/analogix/anx7625.c | 1961 +++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 397 ++++++ 5 files changed, 2368 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..c772be2 100644 --- a/drivers/gpu/drm/bridge/analogix/Kconfig +++ b/drivers/gpu/drm/bridge/analogix/Kconfig @@ -2,3 +2,11 @@ config DRM_ANALOGIX_DP tristate depends on DRM + +config DRM_ANALOGIX_ANX7625 + tristate "Analogix Anx7625 MIPI to DP interface support" + depends on DRM + depends on OF + 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..b6c4a19 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_DRM_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..2afa869 --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,1961 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright(c) 2020, 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