Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp246061ybk; Thu, 14 May 2020 22:55:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyezL5vKiMYChZFEB1cvOzbxOQfw9ahY591dQ2tgFCZrkjkx1f0nvXzxr+6TEMN3tNEVMt8 X-Received: by 2002:aa7:da8b:: with SMTP id q11mr1212270eds.383.1589522113523; Thu, 14 May 2020 22:55:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589522113; cv=pass; d=google.com; s=arc-20160816; b=JXNTgIWDclnYJBihjaKZO2X9x15DduvSmFXF7A0nn0DqIgngTJZwLwH1L1Y98RAafE x2+qBZ5kuKFO74NZ+qmw5+18EzkFWwdhDrJotwniFYVVtnQ3NVMyK9UadQxe2ZQtbeQw 2IJuzdgWTM0gQG15rDUM+2ZKlskEQqAXJQAem5waTxFBuk3f818eTrGyLUJpiAWCO2HY +OkRqZAQnc2ek77Ic8Xb5n5GqpUSTcNourVA/1ku5aTqIo1gaQGXmrLvRndluiv1XOBS os48AkI4t76FFimvfDt/nkKYkyH+zehzOsRcSq+vGzIWIQfWh1w+Q1sexM+HvKjmkwF/ Kz2w== 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=xxV2wajnJ+55tWsLK+TNN4m78OP5GBPDmX6DMgYKSiYiloWLhi9bAUXbTzM5mVeiqk 8SugSFd0y6Z5BE+oacXzG/M6VO7Iq7/vqoRnniajfjrukTFBmmN6D3ynztJjGfKRCW/g 6LSQVHnDfZMhVoHj1uIrHocs3TcIS0QVw3bfIul2fQJOsTsiTUWXyBQ7jJdXcBPRpB7z 2ABwJVjbvR+LfH4kW1PLXGyJbvFfrFipIvbIdL1Y+syGk9MUrjeiXDYvDcqhvlgKx/td 3MCaLBUh+UC1msdoQl05w9XuwrZUFQ27tMGpIBgnkcWqvAKr8CFbEGAY7E7wxve0aRvo RQng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=vwQ8AaQy; 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 b6si532593edw.590.2020.05.14.22.54.48; Thu, 14 May 2020 22:55:13 -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=vwQ8AaQy; 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 S1726613AbgEOFwT (ORCPT + 99 others); Fri, 15 May 2020 01:52:19 -0400 Received: from mail-bn8nam11on2132.outbound.protection.outlook.com ([40.107.236.132]:46433 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725899AbgEOFwQ (ORCPT ); Fri, 15 May 2020 01:52:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LrSUXdWJdu16mnU1AcZk/IqpWwn7Qb8jyX/2shVI3AQWJ21X2VceCOe7oH3APiTsjAb167+kARo1PNTPokK7sDmSHCvi/C+8Flnhh0TooqWe4ZiYSv72CJej4LwPnJDTFo7iGf7aoAmlfVYKGGyBy7lOHMDtkGfMTVYGLfs7cC41uLC7PnTdVbivM85w78HwIJInN83rwAixknLnrUoluAcRa0QrmNpL8k9/isF+Z0PFap39+hwDIFJeKT1Ran3zA5lIYGW7fjP1kBk65gYZzSU/mLCXRMQC/iHyzF1+zpHmv551vfFyxXFMYkWMYOnJMImmvJBuuH037XoCPJdXBQ== 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=VHXu/UvgOd3ZGI2TFYGOCJQBjtzzs7dHjNyxxUJIdBvuNDSK2hjZrslKgFuZHnCYW6tvV9w7pyb0txJ0xuaWb7eK22lm4wN33msqsONKJAs8o1GNnFp67WdpGftMSWKvQ0vecKweR7OyqoWiNpMuuYf1NG9Svz2RGvfX3aJ0WcjK0Xt+Iet9htlKCqVCZTpnSlQdZ6DGDv3qBeNAWlhP8kYU5XU1zWfFDlm24fAE2cgtTwAl6OpYdQYVe634sb07LAnuSnZqFb+klV+vX3MXDDJ3wIVVUhbzLeQ8TWevMosYq6nEZsO66iYDtsxWM/1xZtdb+Y7cTBwq/HATkIIWyQ== 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=vwQ8AaQymO5XOSt6Yt15bN7AERKXjvo6R38CJ4mkodIu9RJRfempw/XALHQ3qw8KRtXDDVr8696G8vrhu7yIar296+0fVQCaC+7/CAe5ozMa6dq2Pk2QOb9FthkTsOHBOwAjeI1wYDi7Ea3LYnktOERiXyiYih5dvJKhTpnkogY= 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 BY5PR04MB7043.namprd04.prod.outlook.com (2603:10b6:a03:223::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20; Fri, 15 May 2020 05:50:29 +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.3000.022; Fri, 15 May 2020 05:50:29 +0000 Date: Fri, 15 May 2020 13:50:21 +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 v11 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Message-ID: <3946984ac1024b53b72c2eb39ee41967a2bf9c3d.1589511894.git.xji@analogixsemi.com> 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: HK0PR01CA0072.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::36) 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 HK0PR01CA0072.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.3000.24 via Frontend Transport; Fri, 15 May 2020 05:50:28 +0000 X-Originating-IP: [114.247.245.254] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58ad6517-6aae-4e35-c405-08d7f893df83 X-MS-TrafficTypeDiagnostic: BY5PR04MB7043: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-Forefront-PRVS: 04041A2886 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xKjl4It/iuGGkJMUCZgAPQVythiQId7EWJKuZo0VMezx048H7JpWEvJBzeQaE1n7l2MJEpB9uRjUTdcHbLN6nREXoZK5MKU8kcaMt8dFINTVQDxGYIIN7nhkXYaTWjOSZgodq5R1g1THDpuQA6qhqFo8mHlD6PWQ53laUk4hSPgIq7uS6qPDJu9XPqg6UIpxnG6AfZ60ck37cfjmHIb36CefP/1/U+kQ/K/KEqHMG+JekIYtipuGfrMYXFmTai93qANgShTwFPq5Jh8DuKdfSlhLHhDZO44eMW5TNtK3qt5KlPRWZWKVc9MfJjSS2c92wcXogvSyAw3IO3kigVQnmSDCOgMRisOe3VLZXHa1Bwk5ZDVo6qyjXdV7lQewD3Jfv1BAQi+2xmcu9Ov/2xbCOsRVtU+SvinSmItACt4Xrx6gKY9FPz2qGS2ufaDjJ9Rq 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:(39840400004)(346002)(136003)(366004)(376002)(396003)(16526019)(8676002)(956004)(107886003)(316002)(110136005)(54906003)(66476007)(4326008)(66556008)(66946007)(36756003)(6486002)(30864003)(186003)(478600001)(52116002)(2616005)(8936002)(6666004)(2906002)(86362001)(6496006)(7416002)(5660300002)(26005)(559001)(579004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: DF0cQ32m511FA4ULvTAFmFs1AI1j/YSygeBTPfzHsleZ0EXYr5jbA1a81zKkYlJ3KtVmAGebBRYZqMTtSZ6t1VlYPhfiEB9r/TA3ppDo7xXb4Cufv+tBVP6oaqvoVwXMasaDPaNYvR0gBfPOoqrCe0SjX6kVnf9T4J5p0swkQL9uxswqEZbS86SWwSlnB5Ah4ppIDHKmWTnbVcP+D/TBDs9FerBkZbMOvg3Km2Hv4UyN7y9+wkmsIY0uMnjE4WxaC34ZSsdJ2Umfw+oQ4rvoJS/kKGObECEuZQqIyG7IkFnJPCbjtPUKTy0AGIisQ5u9RbRAqL9RZjViCuzYqhRrG0MSoyC+UeKZfjg2TcbLKcD8YEvA+M1ryDns95PFKPjULmoD4WIQgWHMaYxEMcxoxYvp7EnAYhVNMKbGAZmWXuHFDiM8SJR1LGxDcW0MPodxl9Bmz7ogaSSUwsJ+05GooUSdNnLAoEFAqjJtv/5+aN8= X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58ad6517-6aae-4e35-c405-08d7f893df83 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 05:50:29.5954 (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: 1KoDew3M1umHD5JIByhn77WJM5w6xVn8jK1eN2lhISsJ/fKCd7rPDxFC8bAItskbrEDDF73F9Fag3WkP/CSKFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR04MB7043 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