Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2566649ybz; Sun, 26 Apr 2020 23:22:23 -0700 (PDT) X-Google-Smtp-Source: APiQypJ/vylleL5qVluyzGOJpnyjH5hSGYMJN132+j4bvidKS5aP/EAGPuVy09TIU4oO2UzL+ev8 X-Received: by 2002:a17:906:7743:: with SMTP id o3mr18686906ejn.120.1587968543267; Sun, 26 Apr 2020 23:22:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587968543; cv=pass; d=google.com; s=arc-20160816; b=a/pukD7zSIGBet2lK5jhI/+nooGgqKm0BLsxrDTIkINpytDDwoSAXGgMPrjLC9sLI4 bP2W3WHAWs3yITi0eaZQxr0am/I+8qSxK9lnc+x0y2lw6q6sQwNGkDnp+KXJFVAV3Qfo uXyp4gPg8vMd8d+z7vfg95QOAIYzSvu5Ssfi5J+vA//oZmFJzjWcn+YqZRPLircxBNsN ZbAz9lvfI8B2/EsoykkhKXR1Yh47X2BkO7/kxnqOhnMZkx/H8hx4p4hLpa7jTP5hctJs asXvSEmYFGOdRtlbykUE2rUYSxaWVDtegrtsAEEkz/hY9hXt+F0HWLCn5dWfxQFoXVbg DyUg== 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=JrxZkFdmWYXq3jbikIQCDfowMLqAPuYJGXPCZYto1Gs=; b=PwHKTLuBhGpe90Avd0JDNq9lK+o0gQfNgAdJJkpoYKFqFjC/OfBnLgObZt3FgcCI0b DVv50jL/74lmMXekyb2EpDoc1k8SaZTiJ9Gi3Z7S8evLgZunGYMN5m/UDdjUsxLu5LUK Nk4XHaUbguiV3sGmG1kHpqWlGdDXGKmLlzTO7dBaIgaX2sWLuCqDVfrGBkpsxrUEsQQL 9o07bor/9fYWBHNe4yvmvFYFpb+WoJa8uvECkJBhwi9CnFdI+RxvqkaZX18jgyDRsgLH fMEG/QMl/yB1IcIGA2Y2UI+dc4aZ2gfD/87tF0vDsXRekNic8coCy0nZAXb9UyQ6WhBg LYyA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=phSy2zpE; 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 b17si668733ejd.452.2020.04.26.23.21.59; Sun, 26 Apr 2020 23:22:23 -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=phSy2zpE; 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 S1726543AbgD0GUo (ORCPT + 99 others); Mon, 27 Apr 2020 02:20:44 -0400 Received: from mail-eopbgr750117.outbound.protection.outlook.com ([40.107.75.117]:53999 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726231AbgD0GUn (ORCPT ); Mon, 27 Apr 2020 02:20:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hj1H2gxT66D07uu/ie5JuHMSFbMEDctgjDm02U16DSo+IitQOHR5mwlntU5aAcaAyaCOY1CgVjYW4ula6KJYkLw/mR8vPLXEzTOZ7nITFd3iK7NEVOALpUY/ovAM9NkIBM3Eq8njkUy1x9U6ztoZ1eeNBGe7/SGn0Atekc9NzTBOeRWFiRV8y98/n2vqGAUmBIdak+zg/rLBAnZmNSkCmpQfEAdU2nd0pVv/Bz8SZP/ZN64CNxVAiW/95HzoNAzMYko2f2oJwOIWOBiwdROMMVtJNlqwngh8jcTNTQXJgz4FAYRJCr1mb9MM7wFJwx1D1N0ZUBM5Ie4vMAUNtYeAwQ== 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=JrxZkFdmWYXq3jbikIQCDfowMLqAPuYJGXPCZYto1Gs=; b=blzxZHtvGAqqFJMSE7rLB24612KWj63DmuWuoaYtAWGqs3Xa6SRqVbmzdrCCHAZEF1Z+1s7jKjHRdwqMDbNxPtl9ypJwteLDi/LqPwT5dTcvlWZ713IZkHMhYl6UhgnKV+Ze4lE/MCZ+uCgZM/gReESviBRMwp33KTO1X0RXM8uVyNWsr2ytRNrLrWXxCHfZDgB2eYJNIommZWxz3Cs/6LEwbTJgeGdXuPpmPnWvool73Iy/E5tFVH15wptTq/WwqLkdzL/U9n8dTx68qnGfaFlLqqwAZmz6pXW92gaCo/Kbwnl4EEiRAmbl5t+dQbJdm7/b1XQf0sCE2fXzoq94uQ== 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=JrxZkFdmWYXq3jbikIQCDfowMLqAPuYJGXPCZYto1Gs=; b=phSy2zpEpcdtrE5y5JfwLwJpV350WHlwC+Bl/C6ZbTzPVnNF9Ve12BPulvVhclpy0GS5IqPyE24iHkj0Kp9nZCKozCQhOD5sIHwOd12UyhtAR7djtZ0uBQCTv90NHUujVl81dtyulckTz2DE6Y9cS5JyhFH1jktQRxcyQ4w1CaA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=xji@analogixsemi.com; Received: from BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) by BY5PR04MB6518.namprd04.prod.outlook.com (2603:10b6:a03:1d4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Mon, 27 Apr 2020 06:18:50 +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.2937.023; Mon, 27 Apr 2020 06:18:50 +0000 Date: Mon, 27 Apr 2020 14:18:44 +0800 From: Xin Ji To: devel@driverdev.osuosl.org, Laurent Pinchart , Andrzej Hajda , Nicolas Boichat 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 v8 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Message-ID: <4d14400b6c19f17c28267f6ebdbce9673333c05c.1587880280.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: HK0PR03CA0112.apcprd03.prod.outlook.com (2603:1096:203:b0::28) 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 HK0PR03CA0112.apcprd03.prod.outlook.com (2603:1096:203:b0::28) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.2937.13 via Frontend Transport; Mon, 27 Apr 2020 06:18:49 +0000 X-Originating-IP: [114.247.245.254] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22004257-8b34-4058-fe80-08d7ea72d9a7 X-MS-TrafficTypeDiagnostic: BY5PR04MB6518: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-Forefront-PRVS: 0386B406AA 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:(366004)(376002)(136003)(346002)(39840400004)(396003)(6486002)(81156014)(8936002)(5660300002)(36756003)(8676002)(26005)(2906002)(6496006)(52116002)(110136005)(54906003)(66476007)(66556008)(66946007)(30864003)(956004)(2616005)(7416002)(6666004)(4326008)(186003)(16526019)(478600001)(316002)(86362001)(107886003)(579004)(559001);DIR:OUT;SFP:1102; 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: y+QxD80ZNLTn5+9oTI0kbmTIBOZHx/2RlSpZjNP3nSlODO7dfvy0pCSwp5wll+SqBRqX1TfWLvJRtk5TnkqCI/rEF0v49Mzb/fVFBlIHST+x1kQ4yK6IXSkZ0om9r5Va+PuygJrblZW5NQ9DrKT1aic56OllzV6zCp+y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zT7fUvL3HFG9p8AqNta4bvx6xktvqcD5hBJoFc78m+jJmT9BcHKnTsN85By1KvLEjQkilhxO0/l2Y X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22004257-8b34-4058-fe80-08d7ea72d9a7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2020 06:18:50.1970 (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: jTV1z/+X8QfcXKtHr5e6T/XBzNQuMD0JTCqAfzbE1X3zGejm4Dkmo7hzHFQXDf2hWV7GnL27dX13rpTZ6qhNng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR04MB6518 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 | 2158 +++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/analogix/anx7625.h | 410 ++++++ 5 files changed, 2576 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..fff7a49 --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -0,0 +1,2158 @@ +// 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