From patchwork Mon Nov 4 03:27:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840995 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2062.outbound.protection.outlook.com [40.107.103.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A98A417C9B6; Mon, 4 Nov 2024 03:28:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690918; cv=fail; b=MjTNVWnHbJD9VkDYd4Vocqp1x/1u5Ct87SPkZgOgsL/fcbTrMR662fRGtK1yrGJfXZ1CuMrKJqwDQ66FqeWOBbpf0n9hiFtNVAKmW3QFec1NRY5rZhbteuDcxOLSu3v+Rx2rc8qL4HtVVa07s1Qd5Aq0+fHW6VXAPAU06/6+vHM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690918; c=relaxed/simple; bh=4ib1HHWLg4AJBR5hjFtGJeQYRUOlO6IDtylc4yr5Hxo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=oS69NN9JFV9a1WTjmy2VxJw/OnTpSDKjHDDTe2MrCF3eamO5JHbJ+90QKNlRjVIresQfRrY8AIz0fWd0jf1MOYAgFNswF6F4Rxun48MbCYfX/8bQ0rtbNI8Y+hoSHuiR2q1wpp2Ggnwgj+eeAcad/srq6swKBS4eTuYFd2fxXeg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=F9S9r0NB; arc=fail smtp.client-ip=40.107.103.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="F9S9r0NB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=F5h55l2+0En03tovNWez4cwmPUhX9R9/w3xUNZXfM4oArgSXhZqoKqcWlSD60fTXXfkNT+/USWqZWBGQrJYLM37cBFxw5e3YDQVaAuH6Z3Fiwnre5++mWqEVKxJhcMrb3ApxY+f1fAC3lN6RCDrngyILKY3HyktxcsbO6srTkbZJk/+LpvPDsgJbEI5tISlu5bKoh9gNvo52hmhmvcmE1R+1PYQ/X7aA9xQfwlbXoSGsnvlTZE9mNsGE3yiIo+5j6TONJMOK+TfQ8mhYhniScxmYhCz/3P0D+mhI5M+qSx3eRzloX0VGHbaA2UNQtF6OOEUN+x6NJaNEQQ1vWGIcMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xK9QuciZD3bIE5z9vrb6bf25cs0xqPZ1iCmWd+HMrk0=; b=ccCI1JWrCIhkPbClBjtj+F5PXf7WCagAlzReCdLtNkKdSeo/PC4anoO2HfRqu6UWPV7t8qA6X+bFdv6frRzAhQ9QEvuCZoXXn+hFVguUudAFeo7uB5oRADRjVyF18SCW1EMmjSStmlfJtMQUAlFpOra1EPoSlEKOu3ipNfyjdg+fUG2QEgQKzpNth5B/0apR8B3ofl4bsRIw6mk+AnRLj7yk2cKI3yN4htM0elE0uEu6UfPKbn0drHWJbCeKYPVy0nNcKo6Knu5wBvdT4W2UISIufsG2tW8PxzWa7pkxTTNXlH6LwFca6iZClMbX2OIpJRn0XAVBL4OzPwMRw4YuAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xK9QuciZD3bIE5z9vrb6bf25cs0xqPZ1iCmWd+HMrk0=; b=F9S9r0NB1ZJyDnqEXtPnbVEbd+Q2cK5Lcn9ofbf0bdEi/bkX19JP18knxmznX2oY0Q0jXhKTLZnJVjche+iuTn1vcL4Xomybwy9032tGNGeV+qoUqxb6hl5/Fwqk36eZDXte7tHs+/AuvURHWFz/FtagedOc4j63XnKtCNHFy7qVclDGx6szUAW92p4nXdguSvRFbpznJs1aTOoVwvj8OTczuei+1hL8PPonO0NXEML3OwRxMeF0Hw7eps25fCWmwpdPqK0AFAsBXG8l+c5XiOsEdCPZrEvrT+1Z1P1MrHLCoKU7BPj1Q+uRqcJHm/RoVC8/yQWl0tXG+XV/x2J6yQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:28:33 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:28:33 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 01/13] arm64: dts: imx8mp-skov-revb-mi1010ait-1cp1: Set "media_disp2_pix" clock rate to 70MHz Date: Mon, 4 Nov 2024 11:27:54 +0800 Message-Id: <20241104032806.611890-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d8f2ebf-1ee6-4ac0-dd60-08dcfc80c2dd X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: m0dv3yPBRBSGBtzZUFeJlgZznAaqQLq67QRn2iSF6HFjwCHhssp+ptprLktKivlZ4zyx5/9DUvseAU4mUrZaUJ1Axw7rvzuxaNOMYXFMnJZH1txvgKE4XcIQgr3CvvXiL8YHNeiBtwI8xKKP5amus4cRFF09dPSP1ZHKui2XVkBqyhhRl5HjclRFkHOUk6tXY0OFQsbAJsg9B/OPqB8ffQwb8FsbMcgqaMzi9i0neStE6VComnV1zXEzBzkWGJT/TQ8sP16ljXKIT27KeadZ0EZQWS/TSmbAEBoAc651ncQTfIYDclPJi1MWiz+3+T/kJscIa8lHacT54f899xy2C41mYByLmWeszx2o8oP8yDBB99okwzTcAzudSAYdVqJVI2aK12I+d87LQtrLuk69jO5Mr76LmxTB9suUPuhyJPISLXYTOK/8l+MRhsxKX6p2u09X/haZxsxk6WQS9E3OmyiKzkFQNAaug4Q2ijojNa3VP+nls1cQsysVygDJJIqtx4bqEpzTI/1C9yvkkUAlUPFg1EC3nOMLUzgpfIZ4c3C3AZaqG4MzlURVGfAq1YwJk2Fb5k5ie3MBHxiBo7LGwr9AfqPZg0rljmHk1ZzK6eQ+bal3owa26O304s6wq4TIomTsv6AU6UD3wCBoA0yzynWdKMuA8Zpy/dTWYDocUNqAb71XsEb3f3QhJ+4m1HqLT7GPSnXs9BXYqow8ZLF/DmCIp4k7fFYCr4T2mawwc0M5wFwgn+cWBN2iE4wzJMSuAzWU5zz0tx3GFFitfhQispgKEt2D16v7zTdUUZqsKsd+K2uEa5u/vL0km3ivyzrV0/4h+M8IhevJfcTPGFkBomQ7vJDMhYkaGBhBJ3phmgSv93Vl51Ke4kHZkhkU5CQg2UOgASGETpQ8/tixYAHwOZePM2evBnwm/nZzR2w0ZNFKPsFo7aQbrH0DG2Z/Mf5irNeQjyVmo4X2JC2JLcgwvLz45Xsdpr3uYo7aGkwEP/1LvXP6UxUhOzelgscFzPb/eZnYpckZDxJAN5fIrJoKt6tGXCBzidcoSj0A0jvlAkzlUWb55+Z5Y1/OIck7YXDPDn6ifQjEuG3iBTFZmE79+Ke9Rj0o5JHyg2RU2m/lclmi2GagZNEflCqBAMYwVZr5otL7mS7UvaIu4ZpGOZe/IjqXePJUpq8ykGddlB2jJEkzm+eh1+HcG1uVhyILk95XBWC8Q+dehKwFoUvwse2rJ2/TniA/JGehkSj93FD/aRZ/09g2YI7lPndpdlYDEIW5viIH/k9HLkJKhAX4FfUdMpxshtKtK1dN1U5xP4HbYdvsg31CabGqQU5bUM4X9QF4t4tL707xkT98iCmTb9QTwkGaIPMvXZKZHEOqNmv38Mw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RHQ+EUWJv0XQxhJt5AUSa7VCcq7v4CWheFAqbTkrIbSzSepC9SvS3Q6bNClizwNYkxdnT2d56+WKAVyz1jj4vc6dRim05AuhfqiGvboteb3aj4gPZVxGPX3EnYe5L9d8joNAwfQoNFR1zLpExkdi3fO+IOCJaWRuIIJHzKWws+8u8A+ayxk3Ywc0hTnOfDz/mZjnIYYVtq2aPwOw2r6/iMvJY5ZREs9sOvD1m2YECKCA89IjITlvoTfBy92Je2rpeXDxnevlLOf/rQk1UvFbcQUYJqKNX5DypW+AiAYRO5mlVeid5ZU6zSTtm/hW0E+A+BmBd/rvKVToWjdzMPh4qLQx2uYyunRu85ghT8gh1h7HXMRFqgI0PKPUHi+iGMZ5PpQWAXDXCyIAyn5j6bwlZ6q4ylf023wTvFbtX7SaaEpij0q8hNrG+PDNJz+fijP5yYM5h/0sDNiQoj5pErD1aI6jTH/nSB3k4GZbO33OXaYGHY5TiRv8KRDICx+2J2Vz4wU9OAqySh++iA1zcgLNvSwQRGOU/iVmx9bP9rKzoDLMHHhTjbY3NPVk9U0tsKw9bhEayElR75wyBNOR+5T/r1vqc9+T3DQL0XOMX4OMzsA2fkGHCGwND9jgzn17Mzwn9sGkx1aOjnesG1QelSVNLBiPKmwuxT3MvrRfQMbVuX6qcqr5O5S5gOL3x5vyxfaBxrnp+lqFAXoYvL4p8HQxxT7lqZNfSoUAU5wuBPCarAgPOLQfTDEwW+T5EIkcd2ShRJSGGPGdyiSrfUC+mMWgZh9M5FB+ZNZoS3YmoVmemcEjUemUcjyaXVPhnLQIuWz4SGM95obfAqR8jxhUAbi2l0/2aRNZv7M6aPPidy7zuXVLhCsJ1yoWhRhyibPookGgIGC3Km7mmProfsFk2tzZQMTTVGE4Rr9cRpj5KtJ7ZghHqmM4mi8GpqwBg0zCLokrcORYz4LfhCVIPFJTSavfmMeb0LULbX8rzleqktr8QwFu5xH2ydH1XrajUdBRNH2ZTsl1GcDYtthpXQ7g/ZnyhEix5k7af2+aT5QNoMqQQPlKRoUG/lwizDDxa2A20zFrpICv1vPU5zGVjMTnygZ0ocrImxl4rfyQ7xF7UbsEOGaSjqfXQBNepAci19Jmj1BzoXt66TMrJ/MLuj6MZxmmZ68NZ4HE1Eel3MBXyZDeCyPbtnaYBN/fl4pGEI0nSZ5sjTcL7SgClNZnkImw4Sd8q9SDnoKg6sSm2JmxgiYCTdiL3m6A4FbJRQY4BKgAhfdrXMWB4rocjmBA+v6EsJydjDqy4YVqrukQ9FgqxG47fd0JgU5UYWaXjHemztjW+tqM7lLYztg0txIYP7P6RdJpNyLPNF0yy8MaWYjuPKEiGyM4cGtuV2QfDH6ydRvsjbkcdJHWXbo6DYc0g9J4XYedCCn+3QvKpGVl4aOYpyuRpCRqIumFQ+5Qic1tVeFNSQIDIGcrymtN/gBp0Oqm4s9ez/pNyADrk0k3JkRFUklsUQAQQ+R84h+/3G2xLksXAYe61A60K3qQImSCZMi9LxAZKFwcSUPHIttCZ7xMlQF3itT0PS+FNsgIMMOH++gcejNF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d8f2ebf-1ee6-4ac0-dd60-08dcfc80c2dd X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:28:33.7547 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d3XsKJj/oe1nwK0TjhuR2TY47z90EaT3Si3ZJtaG+zmXJvXC4gaeAbPRhjwAioQ0ic9NC7dEzY/db46dQlp0kA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 The LVDS panel "multi-inno,mi1010ait-1cp" used on this platform has a typical pixel clock rate of 70MHz. Set "media_disp2_pix" clock rate to that rate, instead of the original 68.9MHz. The LVDS serial clock is controlled by "media_ldb" clock. It should run at 490MHz(7-fold the pixel clock rate due to single LVDS link). Set "video_pll1" clock rate and "media_ldb" to 490MHz to achieve that. This should be able to suppress this LDB driver warning: [ 17.206644] fsl-ldb 32ec0000.blk-ctrl:bridge@5c: Configured LDB clock (70000000 Hz) does not match requested LVDS clock: 490000000 Hz This also makes the display mode used by the panel pass mode validation against pixel clock rate and "media_ldb" clock rate in a certain display driver. Signed-off-by: Liu Ying --- v5: * No change. v4: * No change. v3: * New patch. .../dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts b/arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts index 30962922b361..2c75da5f064f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts @@ -52,7 +52,7 @@ &lcdif2 { &lvds_bridge { /* IMX8MP_CLK_MEDIA_LDB = IMX8MP_CLK_MEDIA_DISP2_PIX * 7 */ - assigned-clock-rates = <482300000>; + assigned-clock-rates = <490000000>; status = "okay"; ports { @@ -70,10 +70,10 @@ &media_blk_ctrl { */ assigned-clock-rates = <500000000>, <200000000>, <0>, /* IMX8MP_CLK_MEDIA_DISP2_PIX = pixelclk of lvds panel */ - <68900000>, + <70000000>, <500000000>, - /* IMX8MP_VIDEO_PLL1 = IMX8MP_CLK_MEDIA_LDB * 2 */ - <964600000>; + /* IMX8MP_VIDEO_PLL1 = IMX8MP_CLK_MEDIA_LDB */ + <490000000>; }; &pwm4 { From patchwork Mon Nov 4 03:27:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840679 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2074.outbound.protection.outlook.com [40.107.104.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7275C166315; Mon, 4 Nov 2024 03:28:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690929; cv=fail; b=fLxcjVAYQGsJ3qqDpht5zddSmHAgeH6Wlebv+BjIxmlqf8puwYkKHDSmf8rcSVJyoekx9agp2Q4NSK0wzfRrRBVG4L8ABAXbp+U1mxivdMefmPOG0iTlDURfrdx/cgCt5Fm0KEmekByHt6gN1GoHfNEYG3PJtWBu3STv4ndx2GI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690929; c=relaxed/simple; bh=6SLKOd7Wq/kBPAqHuqZDA52KmjZ9Tya88L+LK64jGbo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=hO56xW3dkniJSGp5OqgpQju1nZEY30AG3ATCX1jsAMz0PSaLWPxau9yLh0JmPcWxhElXD1aRAUhAej237i0DMYoCWbU/2+k1kcNVDKR5JpRGTbI0a69SAsKtJIl1dPl/LXXyp0If5XGwJmxZf7yF4Ua0HDs4x0u5kQxqw8SWXxk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Wnjsf2Ih; arc=fail smtp.client-ip=40.107.104.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Wnjsf2Ih" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IBJjshO1C9FHls8YNEspUNeFPZ67qfAiCJGp4UQsqq86y1k/VE0IIDG3QCP9peLGnGpluUwSYVnTUFmovk3S61owGxu+vfxZjIBwNdgddCO9e3tn8lnbobHAooww8sq9apt6rpFPhKRCypsbjFFMKwVkImYRVpVGBqheWIk9yhvGU5nfS4oyJ5LqxrnuJHEsmBvAP3oiwgVHF59efY9Obhf+lXADWKw6IFSqE7B98d2kNpuRGp6eFfm/ZMNatodGQtp0Bu6DoR3eAYM3iXLMQUOcYYSGq5Gp/1EW+rXEaKJsc1rY95XW6MSEY+AuVqhQZ2jEQfQB6uVMrvPaSorlIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iTwgJoGZ+i2vyWhZFpIrNU1QoxR72zxmrVW0muOCozw=; b=eKb7JZ5aO4THq45nqIhanRVrjoZuxrZb0CESV9ks1974GlRqHaO3heXDbCPeHm9oub4vZoSMlo4U9I2EORZflbNBJcSTmCqgg+Tr6BoYFQIr5feaxl9QugeKlRYsTsf+5NHoaoWb/klQKzoZvLUXuw2odbt6p+L9MtchXjlpuQ8FhN/BkdpJit3KRultE3+xWQN7TTvl15/NvtZEA3NybMbJqu9qDj1n0E03ZjzrWE3/BYvZVepFMQkyPCl6QLLtLYMiI1sFyjbOvkAZiQCHnReho4xAlot8l27o2wRFskeCElqapUPoS1+Rj+cPsb0q2gUP9jPyWndpbprkcQLxnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iTwgJoGZ+i2vyWhZFpIrNU1QoxR72zxmrVW0muOCozw=; b=Wnjsf2IhWxy4J6wNnFo88YM86EkoS6yTagCsw7ZWwCaQrMqgu4OZLeBckntM+vqH4dE9LazNvh9sd9dcN62FK4UDEx8FdBA2BNZJMQknIrrtesbj9RSG+sWqQQLkBoLpHWDtWeyvNdypRMm+12rlcL0FmtUf9PWqye0+LarKsm8o9TDepKvN4XywTkGYlRImuvavTPCMt+Z99A42dsWHOteUmgqan32RpJLiAGZDvglmAa09OeLKQf4dg2M4q0JuG3Ucf8XN89IafAAfhbP/EdjDOAnyy9PtrDDiZTNBcizWcEHIJJutt/HrA3ORhSkO/HHmhvQNuAus1SzwHJEevg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:28:44 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:28:44 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 02/13] drm/bridge: fsl-ldb: Get the next non-panel bridge Date: Mon, 4 Nov 2024 11:27:55 +0800 Message-Id: <20241104032806.611890-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 1678932c-e7a4-4160-b5c8-08dcfc80c96e X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: MCoYZ46bGsAf+EvtPQhXwsn2RZoft9WffGQE2JctZeItd/sSeACT//4PuOs91bgZrlVKelZUOxKImWhbeJERGMgEheKVjJtAyI0af6dln0YNU5HKsczcMWlNIXc8CI24bJaTv1eaQaVQFyWzJCUPx/2cvvShQ4v91fu2zKJqansUkzO0G1xRYbrBNkLFQ49Yq3GrN+nIWfEYafBOZrWeg4LVbRcOz/7hxsJ5dLryYeqwWKO5X5DK5AsnsWjge0mlyGKO19c9aRH1cR7sJGzM+P4/uLc76zfGAoBhf7yKZHoW8Tm5JsCc0x5+qiiOKPKhE7vgRQFpgj0Crj/09WsjsuuVYfZo2XbYoLR0CPRo+Em+8KOb7ybMpat1j8bZWHHuRHXjQ02Yq/sQb+BiKO4U1VhQnef9W0ECDTGKqdu85sPjxtktUQ6w1w9oCimCWwgrFkdRZcY5o5yFDCFMjak2NYxodculE1yyaAJzqAAoU1JkVCanBqSb0rpOqXBVTKzpTQYk88sdUBjod7Vb/NG5JdvLs81yKr9J2l5XRl1/o3/NiZkxC+4tmJRyv29p+j7GdUJ3R3iOVoq99sZ78MPUuhygKd2v7PxtpWBu5xi0Pwt1BnX41i2OhUar6uVZ7RBgS4fEGN+pRqsCmGr1mWySgzeoDdc+94OeHcX9h6ucdFJSZfFEnMpBTu9c3FSNvLh7botvec+/EZxwoyQvZzSYs/9keh1ARZxyluLlfj8c4+ucFfeLv+zc+Rfppv9VUJzZMS3Bx/N/a2rns7OYpL37SqgcFksbZkpKSegWUdyx9caAtu0ZcUFlmD6ksk2floyXyG7J5ywWl9DRUfV0b3GGAwxbD39/5uj+hnLL6ElTdYPxGy3/9cwsJunQTsHyynvzPlPvJK3/jMx23LcdmPe1aqr9mOQ2HMSbKTaGDGYF0A6Cz2mgu3tWn2Lt1LOIxoYlth2nqJNrAmNCx0F9KaGy1UokJIlMaXTwY/Bl+kyjtXG25WA6xfrgJiA54DyOiROb+Xz+J/qIVLFWhSEj4FvkrKCJUqd5tkQe1+bRzMpGmaSTY/ECZ7K0c3lcp538mHcYOX42MdnqHi9n+SIc+UGoF6Cj5GVsCTOp4pz9gPJModYf2/Vj9+wRf5b6JZgshRY0djx9k6c2lhi4+PJqI5eECV3p0nugVG1o5rfIKoFwNX7gnTlf+yxdoV5VD8y+ktEA8PusvjfLsIA/CXrEhp5KkcNvPasEL6k2BbJXfr32BUGQj714g0qxuQGnpyYPs99qY8BqaajQ6CcczfKHEE+ZeA6ayBuwGGxqvJWwKkTM/MQmu1I7fF67UhWuPKXimSfvT/83HLpi3aDheKDiDuaaYbnikFyEPQL8xqdWEkS8D/c= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pepQn57oFNOBlYH8erVwELSSWWWmYPrcJruOFtt0AsXX73eanoz2k2YjaMNC1kAQJ1oTXEsz1eRESUHGdAVDAaDepOtCU3Q9J1Hbq7GE103YabADzXw5XLFUaZZfE/JVT2KLj1GhlMAAFnUSIxX6+DjG688sBFTe4Vbod5t+gmgI/R0CvW7y27qjTIwoVH4VdhVRXN7BiDDZMBdWgWkxffjnkFVNqqe4lxA61tjOG8dfaswYEUW+zjdQ6oTrxijBdbhBBbqR889NXyzZ9ngoojma19JKu4e0hdNagGvL48IcCpiAcK3AMSo1ze0l9Nj/p+YSPxR00SjisguLwT8rIWnNPJ2h2StJjpTprhU+tontmQBG4BWVSNo8nYnTazGcNxfBkY8Emk/JCBCgoDZ6nQQMGvtMbSnTxIjvCQPG3kjxwDTKOS85+1KHOTLesTr6ein3kx83qtkeLTPWtCNgQvr1H0TlCHzI+Zs723GKibvEVmweZ7i4oxEMjSuhaW1y9yc0xyruAc+Ht+3YhgBHMT4rz6blfD29clGkSOlydEQGId3tThpITNMfy7bwOGaxkyyfzQdZm3lafGBzofWu0c8tH59hxTXiwAnmYSyfjeO0YaQ27TP8WgtokPAJikCrILgkmCpgjPeoo2099qBZbY6cTz11G1fZ2ONmg8xkK6Zfjk8XjF4l/r5kCYt/SkpDBEcHfhqAyGF4rf2me/rYAkEe1l8sSzRdlrwbkhbaRvz9EjRjX24gbO6DUdCop51Mux9zDDXSDuIxuWnDzW83t3e1ybg0lcYEG2P+KhMyn2flmOdtf/WV9zPN/I3kiNwvcniB3KLGy4BkD+NkMUZlgVImYu5Kw8AzT+/kjfugbbzpsMUEhTmLaw4GoO78vHLzSbJ6xneebWNh0bGZBSNyUoZQ0zrTSZwB5JgAdXWqZfOtqbblNbsZg6z05WV4WvGBo4spoy8MoG8M53se+We9JIUcUZp74h9QEPGv1ru+9h0PCLD8CKGttHrtjFNrTx2EjDKj++yUAAJG6e3caVF7p5pKjrzCStpEHyYlArk9uOJxDIYN8xyJPdeWeXQHt8EF9PqAW4mqZHwMRLgdD8wLLC6mOPS7NvfllU0JqpMmuT67FbI4/aH8M7fKF1jIoy86EFfRBQUmddkz9aenv1GbBSo+fpXXkn9eIE/mX8JMs1DMvPg79iphsrq34g73xVE+sm27TMDe7QY+uUBHrTRnUZ3ehGICoFQN0/brFpDaQrvSv06lLi8gr6qH10kmhHd8j7jAx+0n+DQ0zDor1kxq+ATrEkLtO6G8zr6FY8/sA1ydmf8W+guEibeycYqF/ochkg9u4v57doQ+4qyMinxi4r/q3TWDRJuMxEJo6goR3nl7Rrourz84QYG3ORvmS1dHroSfABTGbFDek/gVHP4/TPnvoIgDBwtqmKlpe6pzipIaeH+ayRtlPlIaz4XPXOK7zc3mQ2lJ/X9zducQJ7WtP/KjW24Gh2JPsf/B8WVLC82XsU9xM44e8fBmYEkUmH54bYuw6zOcpK5YWCR4Bg0sNMZ9kw4MGgtX4TG2OvRtFLkagddGn2TVYm0nR9W3wkUH X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1678932c-e7a4-4160-b5c8-08dcfc80c96e X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:28:44.7922 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fJ3N4aHXW02eJ9WuPvRyoB/arzw+2+u3bbHVzoY3Nf+rnrJVk2VpKPW38sLo8LRJAxsCjsbKxwka0cvN6/aHSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 The next bridge in bridge chain could be a panel bridge or a non-panel bridge. Use devm_drm_of_get_bridge() to replace the combination function calls of of_drm_find_panel() and devm_drm_panel_bridge_add() to get either a panel bridge or a non-panel bridge, instead of getting a panel bridge only. Signed-off-by: Liu Ying Reviewed-by: Dmitry Baryshkov --- v5: * No change. v4: * No change. v3: * Collect Dmitry' R-b tag. v2: * No change. drivers/gpu/drm/bridge/fsl-ldb.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/bridge/fsl-ldb.c b/drivers/gpu/drm/bridge/fsl-ldb.c index 0e4bac7dd04f..b559f3e0bef6 100644 --- a/drivers/gpu/drm/bridge/fsl-ldb.c +++ b/drivers/gpu/drm/bridge/fsl-ldb.c @@ -15,7 +15,6 @@ #include #include #include -#include #define LDB_CTRL_CH0_ENABLE BIT(0) #define LDB_CTRL_CH0_DI_SELECT BIT(1) @@ -86,7 +85,7 @@ static const struct fsl_ldb_devdata fsl_ldb_devdata[] = { struct fsl_ldb { struct device *dev; struct drm_bridge bridge; - struct drm_bridge *panel_bridge; + struct drm_bridge *next_bridge; struct clk *clk; struct regmap *regmap; const struct fsl_ldb_devdata *devdata; @@ -117,7 +116,7 @@ static int fsl_ldb_attach(struct drm_bridge *bridge, { struct fsl_ldb *fsl_ldb = to_fsl_ldb(bridge); - return drm_bridge_attach(bridge->encoder, fsl_ldb->panel_bridge, + return drm_bridge_attach(bridge->encoder, fsl_ldb->next_bridge, bridge, flags); } @@ -292,9 +291,7 @@ static const struct drm_bridge_funcs funcs = { static int fsl_ldb_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *panel_node; struct device_node *remote1, *remote2; - struct drm_panel *panel; struct fsl_ldb *fsl_ldb; int dual_link; @@ -318,33 +315,27 @@ static int fsl_ldb_probe(struct platform_device *pdev) if (IS_ERR(fsl_ldb->regmap)) return PTR_ERR(fsl_ldb->regmap); - /* Locate the remote ports and the panel node */ + /* Locate the remote ports. */ remote1 = of_graph_get_remote_node(dev->of_node, 1, 0); remote2 = of_graph_get_remote_node(dev->of_node, 2, 0); fsl_ldb->ch0_enabled = (remote1 != NULL); fsl_ldb->ch1_enabled = (remote2 != NULL); - panel_node = of_node_get(remote1 ? remote1 : remote2); of_node_put(remote1); of_node_put(remote2); - if (!fsl_ldb->ch0_enabled && !fsl_ldb->ch1_enabled) { - of_node_put(panel_node); - return dev_err_probe(dev, -ENXIO, "No panel node found"); - } + if (!fsl_ldb->ch0_enabled && !fsl_ldb->ch1_enabled) + return dev_err_probe(dev, -ENXIO, "No next bridge node found"); dev_dbg(dev, "Using %s\n", fsl_ldb_is_dual(fsl_ldb) ? "dual-link mode" : fsl_ldb->ch0_enabled ? "channel 0" : "channel 1"); - panel = of_drm_find_panel(panel_node); - of_node_put(panel_node); - if (IS_ERR(panel)) - return PTR_ERR(panel); - - fsl_ldb->panel_bridge = devm_drm_panel_bridge_add(dev, panel); - if (IS_ERR(fsl_ldb->panel_bridge)) - return PTR_ERR(fsl_ldb->panel_bridge); - + fsl_ldb->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, + fsl_ldb->ch0_enabled ? 1 : 2, + 0); + if (IS_ERR(fsl_ldb->next_bridge)) + return dev_err_probe(dev, PTR_ERR(fsl_ldb->next_bridge), + "failed to get next bridge\n"); if (fsl_ldb_is_dual(fsl_ldb)) { struct device_node *port1, *port2; From patchwork Mon Nov 4 03:27:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840994 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2042.outbound.protection.outlook.com [40.107.104.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63F9E17FAC2; Mon, 4 Nov 2024 03:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690940; cv=fail; b=J1rimH4HtIyHJf+SsDOZjHv0624xiNMxVMtJzLIvsjKo4zvUaGVxvuaXfz9dV4bRGr0+rglx1V9h8iK4ej0Pnq9c2Oxu1PBVhySIzaMjdMJthvBNwxgeo3AI69sAjhICAqG4F74m8YDMOAIU3cBLImcb9Xlobyad/1rQUYXNo74= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690940; c=relaxed/simple; bh=Q9Vtsz8rvxZ7fS0ubHaHo4vtd53ozqu2kiQkOoDZ/Aw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=bn8OrU9baEO05ZiLgvEjv1gSSfU+Eqmnw6XgoyOiR0cwA60g6RpgGbL0fqMzAFSMfXxgSeuyODXbtgklreBgwldCQ9y1kwX04SajkoZBxNjfAvPHq72xHRav3dox1A8abB9xxClK/+Lt81/j7mYg4LxWER1Wb6AtA0ReqFOqdhk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=BzHLl5Ac; arc=fail smtp.client-ip=40.107.104.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="BzHLl5Ac" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=craCX7O25P99hQbyM1Sqsm+Yd/ZZ7xdZwLX0x3oxuKkF9RCmKcQ05ym68297Pn/NvDhiJEKROsIT0oaBuNSfpA+k1BEql49LQvHVyinkIyRNFtuH1HJnqsj7CELJD17ExuswO+P60xBkOdpL1NyQszYvKPrv/jOzFZQOeldy4JalK8K/A7hOsLvjL7/WuDfv4rpyAUYL8noN5ju3eVCI7du/r86N0JmGzZptL06ay4DhCaAtarG6fp3HYWai7Yrgyp79dgBgWt3OKO+JgO0Eltk8FzfaXI654OGCoxly82eBZ+eCMprqZ6SjNeQuOJ3T5O6LRv84PiG7CzPMrW1ijA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5wzuYfHAB/fAnW+5qZ02m/Gz0jUvIP6voowq0JnbWD8=; b=ClAA3IT90WuEeSrfEP/pgHNEcufwUQVZEmfnifL0Lx3RpIP1EF/A7wovduYW53+opyD1xXV3asuzYn02vcLhjPo9p5FySvO/eBB79fKCPssK6qhsd3LyxafMPMC8RzEpgLvDq2ttCqStYZeS9hv+KQcb6CQgXrkN+0p1l6ktFzC7WFH8hcpg61ntGW6ovyHCMUvEXbPm1HIEFrrbPDtMHiASg6fWEAUfBVOrOYEjvbfS3wmUXCOQ+M48dSgDUStA/WbcH/9CbO4DLD+AXXMTi8ldJe5bgWvTUeGCHkWVV3NQrto/IYr469cCGfXy5ilzhosL0VXJpgwWE06/pq5TRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5wzuYfHAB/fAnW+5qZ02m/Gz0jUvIP6voowq0JnbWD8=; b=BzHLl5Ac1OotNb6TnrIZghcbcQRQaAVL/wA1oT5eu1m0HUGogfwcDvLlhfH4w66qNqQqmHvYQzPxSq6F5mff8M+VOzxN4rYZHbptOC5UlbasxTyRdr5QqzGREmi8VDNuNqkZlPTZgOQXgnhV7Sr9lBKYn2yz7P/lknjC4m0fsABEs+3S2LvyZ1hKh4aibDoengfRCoxz6+G35tI6YMHpgzbTdxf4dOMpenzdU3kFb2Z7PRivpoET1OfuqnCesiUoEtHf45pe63aKFKYU7CApXTTOcGAcurYI4PdklC99iXBoYi7hw6LBQd0BXTdl4J9+RO/oQVzy7CUEQO5lyWdJ1Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:28:55 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:28:55 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 03/13] drm/bridge: fsl-ldb: Use clk_round_rate() to validate "ldb" clock rate Date: Mon, 4 Nov 2024 11:27:56 +0800 Message-Id: <20241104032806.611890-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 27766e03-015c-43e7-cde9-08dcfc80cfd6 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: ukf1BBH2szBsdF4EToK1HPsakg8kdbODHrt7j3RNIDMRW6RkooLguKDY8zYXsxbxnD7dYq6EUMR+Pk7EKdYWKMmQ8IvXquA8olHZQt6cnuxFIvXPZ5FCb5SsvAtobSW2laUPZy2B5CZRNnFVt5uIyl17s8A2vOz0v80vUtBNusQILwlk/6LVfODmANIBzxkSz0deR5zqiYf+/yziDXSGus/FHpG1lpXAGptAhWHhkXDQGMc5tcXSDrXghOoLDCV+jQzDP3YfM/hm5JDTUpggm/htR4qFZAaebagVmdi8S3q3jsIIGeg2oPBL39m//sZEbrp5RGgJVb7p6n+47y9YM/Hy3/97M8XQmLtV8cjw4Cj1WkV8UqGEGAhJtOOGpaMOF/Qs+yn+Spk8SkOn7/OkzKUrQQcUJpfAPwl+dOS6knrnJmeXvhww19JZaFJPMhjtSmSsWwfSK1R85O7Dv0xGlzYsftNLNj+PqxK+t5VWddqsxVMuPWNWYDEF48fnoWdr64i1jMjIuA19zvHU0jGkThvXIGJpBf3fW/qPR9seD9KtYusjSWLqGgIefQk0GiZ3A9s4L9ZpI2Mve2iMiU1cxOtZM44gS5X3yPhg5mNhSZPNP4cprj6Ew/ONs79fu9jJjEgcsAompDp9WC2EEDIOStsd7Y9AfFJUl0JaM3B5NUyV87KgjKEDVBh4hqzX7Dp13UQp74H4wUZB2/ZJgeIVKq/xTXvmhHdSN3Vnw3fhDsGSoCITWGWLCipRPY/1ymAB1cmKIxJCGZOEEdumPeP6N2C4iLrXCjNRcqCK1qmZV2ncDevzQjDlM+i6JN73THkLSmV03cCfUx2H41gIk7s/YLQO/ktB8DlyeRpeSeCUuYR0laliNuM+7yC83qjvP9lixqPI9cpGU0bYt2h6WMbiqfIgSOOk1apTiNnrhFMm4tBrVLCnqj3j2KYa8y2HJHfKEGXX0kJkVCpwTL6GVIY0MSJzjbA10jdu1iS+AxYa3Kzf8wZZuxtpNrclRaoD3gBKVAY8jF6WWnO283KCNJ1sFpOPcB1ydTEyzn+Bne1bREVbfaPGzq8jhkaL8WzV5rgQju9bgAM/06Szj6O7VIkEkgiZ5HMl8wE/hAJHj0DV8a/bH33iO0qlLu0h0wMWCAkv5k9B8GC+Gt4TeSEFdvgWktd3B2FG9zk7PdcrhJE2VrgBLhuFJinYmp+9Sn/3bBrKGRyxFS/9NHAte8cC85vPkrHFcWFjSXabEv4xo4pGlzU1ZNAngIFTb+KyreGQ2nsppQWT/6jgNsht19tdV3VwOjGwWkWNrpTw+XoP9gXNwYwdBFjBkTiacBAYfKO4fgo5cCRL5JefQwGgAUygcN3+g8GooArCvSocms0KSoEZT3q1xMVwoYq85YvowwUjDP9Z X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +u5T4q8vn8YfEkHi5lqeUy65Kiaq4amr2kzaJeCxn6mS0zwd6RoucSnEh6fuERXehFjW9QpeLvCSCMF1kuI90+0CP+fnp8LsiSMyLSlClWtMmoJYZ264T4nOLnzI8QqX+aJt8NF0XFtjZzQrxWUYDXis/3rX/QC5L23ifa9AuuBBT84OXVKJGLa62rSPfFEzVAkn5tJfiroOPzIbPlvbIRuV8+8No3dRn81CL1zesO7F3INHvU2KkA8jQRvhyQnEmCF2kaMXvXZwNM4foVna91Bh9rTq5wEFh3WeJ7pMBzHKySdk6y68+OEAOAThkYMRYvvpoNeU+Jz0rxxq940501z0tLBicx1bLHu8Yxr3W0fAJkG7WVKddGr6dKCDhZKaBm6898Bwz5jeMW3uzNzyJcqvI4588tBkt3M8D9yX6HdOzTbJS7G+ACQMK0KpB+aUeCc/3KsUMullgDGJ8Opl0MJQYf0eHe0Cz8B4Kd9uQDS6h/456BjonhvATtVGz2tLINM8/dRrR0Od9ebpHgVYm6mwHJl/uIi+JZAvOYFpRNBhF0t8+IbuHtfLOj8YyozbXKOVZ7JFzjl7elIWsL5ZI+Y+HohFBktTA7HMWf41k/fA+Ou4v947aHLtmyxpwQ1ZLsCaN50CCBc2EwbgYg7FdHrNIIYv1YNktIr13y2BuIfwPbo17zX7wHB+PjGV0qKSU6hYGrUK4eApUUwsg8HhDmDP/yCORXGbJORy5BR6B2lt86aNjNFRjOaUoZS382+EX0pgwqP6BTARamqcDwUxiR6ZJqHYax/rsllxlVOD9vBOrg1lQT70c6pi1IVqEx/Z5CD4aE5z7XXbCtj/dAfKCI0rLaDqLTSB70PpYqhC7wRh9nooiUN7CzVhDfNu1pYvrMtlXJysC2Svj+77WjY/rNc8/2QjmE298EYUC88peYpjGRscpWWeRz8CYZnavtM8K6P209QuKicnATfSPpkNpBGXqQn/pizNJ6/eYa+FzAnW0Kyp3rrI58lhHXKy9fb85xnCZVJa6D5n9ZeWEoEinZ3kD7v2zhqij8jxaFfU2yhU4Oy4JxtqCJxwG4sKFUrC5PVLvsS1IjiaDxTnni6t8uEOI+So1k/p/kBxJ0kH5+XpDtxzWxt8SM4VhaC8ATvjsFLQjCaGBaL8LFP+hXx/oJKm8ycUG9UTWFq+bi1ezcEBuoWic64mvzD94i6Ki2YxY+bGY+Iq0iI9ai3uGvtxw1GGnofg6jbGN2ZKfTyV/imk+OWZ9UN64N5eRRKFjxc4breoGhQi5m/HdREsfkXiQpX6BaMdfpcWQgcLBtq2HreMQrDIqnYfBqHVTqQG8pXOJcSdcfdphFoFtHjNr2p6biF8kac+sA2NZyKdOUmF71U8E3SO9Ic+cyOwCk8aHobEgcZh3KIar3ZafY1LzGbPr+P3wptV9pT3JeIJQcnSBSwsRX6/SADSytBl1/Mtn6T6fZVtRm+BTo86zeQxMs7zyrChKA6niqt6E2Gex0Pcq71IdeGHaQ7BNDGFJInhNM5CcPJ4coNesJPaArn0vmM7UMFJwPQ070z6X0tfwAjnu07dPdfPi5mopnddENhdkeai X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27766e03-015c-43e7-cde9-08dcfc80cfd6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:28:55.4808 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4PTwBDjZPd748WPoiHWzqa6XvwB/TZKBwbWJJbSHXdRypr+mQudfcHHpSqr3C0P+ZKoUH/ApZRbGib43unOyoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 Multiple display modes could be read from a display device's EDID. Use clk_round_rate() to validate the "ldb" clock rate for each mode in drm_bridge_funcs::mode_valid() to filter unsupported modes out. Also, since this driver doesn't directly reference pixel clock, use clk_round_rate() to validate the pixel clock rate against the "ldb" clock if the "ldb" clock and the pixel clock are sibling in clock tree. This is not done in display controller driver because drm_crtc_helper_funcs::mode_valid() may not decide to do the validation or not if multiple encoders are connected to the CRTC, e.g., i.MX93 LCDIF may connect with MIPI DSI controller, LDB and parallel display output simultaneously. Signed-off-by: Liu Ying --- Note that this patch depends on a patch in shawnguo/imx/fixes: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20241017031146.157996-1-marex@denx.de/ v5: * No change. v4: * No change. v3: * No change. v2: * Add more comments in fsl-ldb.c and commit message about pixel clock rate validation. (Maxime) drivers/gpu/drm/bridge/fsl-ldb.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/gpu/drm/bridge/fsl-ldb.c b/drivers/gpu/drm/bridge/fsl-ldb.c index b559f3e0bef6..77afc169f0d3 100644 --- a/drivers/gpu/drm/bridge/fsl-ldb.c +++ b/drivers/gpu/drm/bridge/fsl-ldb.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -64,6 +65,7 @@ struct fsl_ldb_devdata { u32 lvds_ctrl; bool lvds_en_bit; bool single_ctrl_reg; + bool ldb_clk_pixel_clk_sibling; }; static const struct fsl_ldb_devdata fsl_ldb_devdata[] = { @@ -74,11 +76,13 @@ static const struct fsl_ldb_devdata fsl_ldb_devdata[] = { [IMX8MP_LDB] = { .ldb_ctrl = 0x5c, .lvds_ctrl = 0x128, + .ldb_clk_pixel_clk_sibling = true, }, [IMX93_LDB] = { .ldb_ctrl = 0x20, .lvds_ctrl = 0x24, .lvds_en_bit = true, + .ldb_clk_pixel_clk_sibling = true, }, }; @@ -269,11 +273,31 @@ fsl_ldb_mode_valid(struct drm_bridge *bridge, const struct drm_display_info *info, const struct drm_display_mode *mode) { + unsigned long link_freq, pclk_rate, rounded_pclk_rate; struct fsl_ldb *fsl_ldb = to_fsl_ldb(bridge); if (mode->clock > (fsl_ldb_is_dual(fsl_ldb) ? 160000 : 80000)) return MODE_CLOCK_HIGH; + /* Validate "ldb" clock rate. */ + link_freq = fsl_ldb_link_frequency(fsl_ldb, mode->clock); + if (link_freq != clk_round_rate(fsl_ldb->clk, link_freq)) + return MODE_NOCLOCK; + + /* + * Since this driver doesn't directly reference pixel clock and + * display controller driver cannot validate pixel clock due to + * multiple types of encoders connected, use "ldb" clock to + * validate pixel clock rate, if the two clocks are sibling. + */ + if (fsl_ldb->devdata->ldb_clk_pixel_clk_sibling) { + pclk_rate = mode->clock * HZ_PER_KHZ; + + rounded_pclk_rate = clk_round_rate(fsl_ldb->clk, pclk_rate); + if (rounded_pclk_rate != pclk_rate) + return MODE_NOCLOCK; + } + return MODE_OK; } From patchwork Mon Nov 4 03:27:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840678 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2082.outbound.protection.outlook.com [40.107.105.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E986176AD8; Mon, 4 Nov 2024 03:29:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690951; cv=fail; b=LUCBDbG2AL6rR/TAxDda6O6xEFoFLE193gbDco3qzfPO43Ly9hhuAPpYcB6omNjfuOIrp1iJvQDdDqVOra8het5hfaiiSA8WTEBJYKu+Rme7a6eo3pvfQ+xTTGOaI+QP/ww1qysvfodoYGEJzvak8HcssGzwopZNrtCpypi8VLY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690951; c=relaxed/simple; bh=Gb4Ued52IGeXEbv6CQF0a3QoO7OAy4SWLbA2ZXXRIgA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Gje9k/KzagIGOHtn5kz44nG82UiEehJEZNFwtq2ZHtcmmw33NURy5cWZ5SmSlWNiu17vTuyxnnps0AHs1tIQOdKAMJAZRH9/gD1/aq0zy+drFM0k/iniX5K8jJJ+SqKB4I4LZBNOBsl6EM7/+A17PgIqebkccT3bPtxMFWG38lY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=REVl1M+x; arc=fail smtp.client-ip=40.107.105.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="REVl1M+x" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x2q0tSE9F8lWSVUwVubrRQr42ZUsFdiMhVV4IoeYlKeDe4ca2qyKVeJXaqaalQrB8avaxo+pnHO7aqHKRNVYApbkOPsgeMBxKwnibPFhkppRaTfOLZckvHgagLXBVRJiYrYoBboc1IIuiI304XddzmhN9TiG71ywiRMWkxLP0hQC5K33yjOUztakCEIs4fulTU+RE8knNtcRkfQ2nJgjT5/j8Yd9xsG89R1g+wYSyXtRxHo9WsB4Z7w5q0WKWwTlPcgmoFLZyOpRy+RlkLHY8aIcE4Jna9F+QhdbZ4+jJiGkrZ3Iv38DHQnWZmyeN4bKsJf0XzWCmwhSs3jk/+HsHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bOJ6hUZBUjjiafj1p+dZhh6hiR6sWQVveCsXDuD/myo=; b=xC5Z8/ru0zVnAtS+qMI3h3DRoAab/tcmHC3wPO1S2E02gfH0hRipRovzCVNIWAIpiGFEwfvJ1hzXXPzgql9wclqEoWb/yLOAnjnsVF+i7jAZ+faqZejWd2rO/Wxal9a/aBIw2DyaV2jHagsUjI+6rX+blbgmkaoKyr7VAXTsu/EbzTwRuNZ2tXXilPeujymQrVbjRKe7oj+5bdePh6IF2YzHYit43CDls5bvgLgYaF/Ou5iJWTvMtDNcHwmNaYnPEwtsbHrZqG2aDCzyg7DTXbO7tC3UnXv37wTqR7apax7pkyx6oZNUCePyMvpHhmKD4x25uNyUUIMvtuL66mn9fQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bOJ6hUZBUjjiafj1p+dZhh6hiR6sWQVveCsXDuD/myo=; b=REVl1M+xgeBcxZBNJ+GXV8EUwR6eoLa6f3W7yGOI/JTxcFtlI1zbQ6b10Rm8yx90qZ5TGcEmlJsuN5/XYctWUBiAac3u78O6BUO2CiPiJNXmYO4+zxIxyXh+xJI7c1X5S6pn+Hi6wPy3ChNYWdojUoiQ1soov3o7DvSwrU/jKqGKJNpszQQzg01srNflB+JO/m/kEcB3mCp3GzQoQdea4foyvb/lkG+Nunke5yGz+e9UBojo83D4wTqi19g5otRXui/ZmckNS8P1rpxIOFTlACOIwxxgTd1izH8DixeKzktkgYjWFcRRb41Jn+ZshGWAn60Dy3oF+yY6yJtJ/fLd7A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:29:06 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:29:06 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 04/13] media: uapi: Add MEDIA_BUS_FMT_RGB101010_1X7X5_{SPWG, JEIDA} Date: Mon, 4 Nov 2024 11:27:57 +0800 Message-Id: <20241104032806.611890-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f09f0ef-0c4e-458a-ed85-08dcfc80d640 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: J2DY6qMQmXbVe2uND5UAn8A5hnmOkAUSuMgNXCuBwmmT+LM9/K0MsG/nZAo5h/xJLtXM9R6P3hcqydFV8Q0ln/aKuu6T8EGuJYxQ315EmhZBIgYnrAv3eQOyet8QlQfqL4puJ8BJNdZ1dl99ahJsoYCplbl9/nFetNfO86Y4KxvGwXOU0p2tZbR6DntcuQ+a5hjXXkX+CKQ1/MyDKH7FZwbkkeIY0Yd6/MM3wz+AqsFYMCJA2zVZ18nM5lFS+wHDyV6nedYM/WhHZhyXVctjxeV8nrsrngYPZ9wkWKiTgNQM/Eo+F+Oo1IzBnZbkcASRbmUVKWe1UB/A6P+z+1T4SHM1Ajkt46cLUKwL1gSjJis67z1/Qy1yaY4zw58LOJXzKbfwlOK6rt8uOgaapsW0FkhR9sJVkxd1ho84VbADPjxnB5Q0qF9iCBr1szFElW6JkZVhg/7coi8UJMXoLt8kyfiE0X8wdy8cLIXp7ZxUShsMEgvJ3mePLiR0E1+e4uzSpIBehadsiSVJi7Vi2J05XKuBIc6WwERw9MP9vOGo9vRi9y7t8ng05Oom4LfSVqSJ8OX7tgBk7424p5S/rayCACw947OzXW10tEFwbyTomiCHnORo/TiRfBkz75CYyWz+nQ3XVhaWOJFmB5hgX+fBP5XVxUfEmaIAVms6EdLDoyu9FpsvDZSzjmBwpM1DzK0VZ3GOfFAbCRktXDMHvFaatTUFW8dyA8k4ebNLekNxxJC/XVusIBMQ6qSP9lnGyDuOuqt7Q7Zld5cfU4Wd4OvpTGAksIrr9xGCFZuhqLGO03401PbePUfkiJ2E+cy5MyA7SdSvsoe/CoTdpJM2YXPuse9m13TfPEKIud+UxW3rajBjPZndppJz69WsdaIjYmRW09YKb/s8ci+m6bx+b/FBkxWYy6NFQU0Y7KzFZTug9CVfuDMmUowGpfwGZDF03r+JTumFiveNXOWGlINy1+9dki51CL+/Vv9aNuutJ+qSgM88MSDxKgy7vfI5aZLBxZv8i2NFP74MAahi9kxusr0RXeBMf8fC1QLImOPSK9SKj6ONdBNwwg48kqogqc+51L7yExJY+pnUa7UPCI+4HD4ubOiwaQZexYSuYZ2GBk+uQQhB51nvPVk4v0+g9qwLX/RPxyeHULyKzdjzDVyuZLfVjlhjjMPChBDhC5GacWvbCaOYE8KQoQLCeEZJ7+AzhcKznFueEDBkiII7HSgDTWhQ862FIsmDadzKto6E6jq1HKFC2gXT9QX0trI9yQuQSxA+0Sm2pD8dXlICByHK4ihECxLb7eBvmesCIwpZ0E3oKCXzTxRs1p3sLgbOJkcZ4fMLLML/yApl1nl+VC79+a7k/pMCerXZUvKOPj5TFO4PGTA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RwHgj1lsG/XkmQXxBUxEECcTLGPkUCgaxPV0CU3QFH4Wv9Mq1FoRiyLPk7UcCy7EbVkG55/AMHuMvf6HPlVmJF5O0x8irZoFWRR0WNQErh2me/kCZJcuirZEdZPU34oDngIA5Z2u33sx4KmRFahL7rzZg3lYJG6S/a+XKJnr7Ttum0rNMQueFJRkNUCuiPGiCiYa8u/jIlifsS/hOn/a3yMjLf8yagjOYVUD4dM1oaqNcrN9XH4HX3HH92rRDwrcMbTbOV0XSGCTqlswzUzhrwxZB3JuQteR1Ku1hMZdG9M52Zj9qH+hCvfRdWMf4Q2h72j3h6+LjqG5yOCe6Q5BIB/d69DWFutBP79CRwQ8FvTiL3JzP2SE6648/xd9NI3Zp6jeOvQzhPM6pVJM+HuBqrzbSVfOt1EZ3vf4u5a74/ESGbbrMM/xa/A7LZN5aQFZtuO07XB/Y/Nl5q8wWl/2qUmrAWXXUSlk82W4/Too6JBC0NgbIXA20JVjFsvwTN58iOzpAAecuCT3F/myCBcNdlkrSvRMwGtSDe1OyobHIi3DPqaNmZcrlStbgWVnLwMc9TG1OTyvMMNAEAwfTyKNMFOmI/9sw9fvAJ1Mx8CbRabaySvrIJluEAPqtReHnEoMaeOrFz3pNVFQolZQ+EnBfVb1uMriVEmQMIwE8BdPCbcMulUpyCmtBrLBPrMtGxt5lpHWwTEbQMeUSO96kbNihfpp55AeD4EbudFyx3/OsjgqVwW20qRxivJmCtACTHA3J0Tj9Rdk6cdf7pQxonVN7m37LFJEY/Ej9v8nHvyL/j4PYUjpGYVQ/s0F9vdaSkijdSSEvkqaRd6aUZC/9AwpjkNF/RR67NGBz4p0c860FAk/XQ0tMdk4L9lVF5lkhviYr2yHYNN2Xy/CZOan0zl+e55BEwzaifQu8XuQ2c7eMJnc43MqL3ipjercHh3D/up0VaUsBldWYQvS5lTodnbnB30Rzmos6z2AWpB/CMkre+fPndk/5rTNbj7vtSCutdGMb8Wt6qiEaVizHwN9dFZdtTbdHaBXOs/i4ZFIX1K8ksVHsq+T5ppOLmLzzqCYioSJsi+zKYM7J9fnIDge9HhLrfl27q8g1aDBW0XuvJ3rvMvVq3fVKVIVx3AskkHilF8C+obO+YFdXlKiuRC4dNja+JKL5iAYfaW4vPocWqNEB/vO2jyBbG1vmvG/WPNMHIInq7YE1IacP1LQHrymRu+0EG3JNZLQ1fcZ+gk20A9gAuKkhmtwuo8N/KuTHMOZW8H1a3wuYdNeyHLwfKIv2gdVXgEYvnZDKPWmtzo2LcOzQoTscBD55qE536TWzskR0bVgvIyXFj2eHmfy8fhNY5NMdmyBo9c/cJh+jCODNykR8KThuzX+2EJeG0y+oDZqJr2ipy3mbJb70PN8RJzeDmbpTzX589H7nlN4igdttetDTT3mTknB9TF5txkMrUTbVIkbNNfELiicygcUjl9hHGUD9tl5paNLdHN0FyxsT4HTzXsg9OoLHrq+h1/tV48wCNubeeCeiKfMvqsNAfT7NlZvup0SAHrDzOcx0nhm1LthCwr5xAF6PPViLmesnbV5EQBQ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f09f0ef-0c4e-458a-ed85-08dcfc80d640 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:29:06.4193 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SoWushPs1X6U6s+JvI3DJoe1jXM+nvoklNX6qwiN/BIh0jHTf94OyK754OIy+e08I7w70G04FPW1pgMRMh42Og== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 Add two media bus formats that identify 30-bit RGB pixels transmitted by a LVDS link with five differential data pairs, serialized into 7 time slots, using standard SPWG/VESA or JEIDA data mapping. Signed-off-by: Liu Ying Reviewed-by: Laurent Pinchart --- v5: * No change. v4: * No change. v3: * New patch. .../media/v4l/subdev-formats.rst | 156 +++++++++++++++++- include/uapi/linux/media-bus-format.h | 4 +- 2 files changed, 157 insertions(+), 3 deletions(-) diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst index d2a6cd2e1eb2..2a94371448dc 100644 --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst @@ -2225,7 +2225,7 @@ The following table list existing packed 48bit wide RGB formats. \endgroup On LVDS buses, usually each sample is transferred serialized in seven -time slots per pixel clock, on three (18-bit) or four (24-bit) +time slots per pixel clock, on three (18-bit) or four (24-bit) or five (30-bit) differential data pairs at the same time. The remaining bits are used for control signals as defined by SPWG/PSWG/VESA or JEIDA standards. The 24-bit RGB format serialized in seven time slots on four lanes using @@ -2246,11 +2246,12 @@ JEIDA defined bit mapping will be named - Code - - - - :cspan:`3` Data organization + - :cspan:`4` Data organization * - - - Timeslot - Lane + - 4 - 3 - 2 - 1 @@ -2262,6 +2263,7 @@ JEIDA defined bit mapping will be named - 0 - - + - - d - b\ :sub:`1` - g\ :sub:`0` @@ -2270,6 +2272,7 @@ JEIDA defined bit mapping will be named - 1 - - + - - d - b\ :sub:`0` - r\ :sub:`5` @@ -2278,6 +2281,7 @@ JEIDA defined bit mapping will be named - 2 - - + - - d - g\ :sub:`5` - r\ :sub:`4` @@ -2286,6 +2290,7 @@ JEIDA defined bit mapping will be named - 3 - - + - - b\ :sub:`5` - g\ :sub:`4` - r\ :sub:`3` @@ -2294,6 +2299,7 @@ JEIDA defined bit mapping will be named - 4 - - + - - b\ :sub:`4` - g\ :sub:`3` - r\ :sub:`2` @@ -2302,6 +2308,7 @@ JEIDA defined bit mapping will be named - 5 - - + - - b\ :sub:`3` - g\ :sub:`2` - r\ :sub:`1` @@ -2310,6 +2317,7 @@ JEIDA defined bit mapping will be named - 6 - - + - - b\ :sub:`2` - g\ :sub:`1` - r\ :sub:`0` @@ -2319,6 +2327,7 @@ JEIDA defined bit mapping will be named - 0x1011 - 0 - + - - d - d - b\ :sub:`1` @@ -2327,6 +2336,7 @@ JEIDA defined bit mapping will be named - - 1 - + - - b\ :sub:`7` - d - b\ :sub:`0` @@ -2335,6 +2345,7 @@ JEIDA defined bit mapping will be named - - 2 - + - - b\ :sub:`6` - d - g\ :sub:`5` @@ -2343,6 +2354,7 @@ JEIDA defined bit mapping will be named - - 3 - + - - g\ :sub:`7` - b\ :sub:`5` - g\ :sub:`4` @@ -2351,6 +2363,7 @@ JEIDA defined bit mapping will be named - - 4 - + - - g\ :sub:`6` - b\ :sub:`4` - g\ :sub:`3` @@ -2359,6 +2372,7 @@ JEIDA defined bit mapping will be named - - 5 - + - - r\ :sub:`7` - b\ :sub:`3` - g\ :sub:`2` @@ -2367,6 +2381,7 @@ JEIDA defined bit mapping will be named - - 6 - + - - r\ :sub:`6` - b\ :sub:`2` - g\ :sub:`1` @@ -2377,6 +2392,7 @@ JEIDA defined bit mapping will be named - 0x1012 - 0 - + - - d - d - b\ :sub:`3` @@ -2385,6 +2401,7 @@ JEIDA defined bit mapping will be named - - 1 - + - - b\ :sub:`1` - d - b\ :sub:`2` @@ -2393,6 +2410,7 @@ JEIDA defined bit mapping will be named - - 2 - + - - b\ :sub:`0` - d - g\ :sub:`7` @@ -2401,6 +2419,7 @@ JEIDA defined bit mapping will be named - - 3 - + - - g\ :sub:`1` - b\ :sub:`7` - g\ :sub:`6` @@ -2409,6 +2428,7 @@ JEIDA defined bit mapping will be named - - 4 - + - - g\ :sub:`0` - b\ :sub:`6` - g\ :sub:`5` @@ -2417,6 +2437,7 @@ JEIDA defined bit mapping will be named - - 5 - + - - r\ :sub:`1` - b\ :sub:`5` - g\ :sub:`4` @@ -2425,10 +2446,141 @@ JEIDA defined bit mapping will be named - - 6 - + - + - r\ :sub:`0` + - b\ :sub:`4` + - g\ :sub:`3` + - r\ :sub:`2` + * .. _MEDIA-BUS-FMT-RGB101010-1X7X5-SPWG: + + - MEDIA_BUS_FMT_RGB101010_1X7X5_SPWG + - 0x1026 + - 0 + - + - d + - d + - d + - b\ :sub:`1` + - g\ :sub:`0` + * - + - + - 1 + - + - b\ :sub:`9` + - b\ :sub:`7` + - d + - b\ :sub:`0` + - r\ :sub:`5` + * - + - + - 2 + - + - b\ :sub:`8` + - b\ :sub:`6` + - d + - g\ :sub:`5` + - r\ :sub:`4` + * - + - + - 3 + - + - g\ :sub:`9` + - g\ :sub:`7` + - b\ :sub:`5` + - g\ :sub:`4` + - r\ :sub:`3` + * - + - + - 4 + - + - g\ :sub:`8` + - g\ :sub:`6` + - b\ :sub:`4` + - g\ :sub:`3` + - r\ :sub:`2` + * - + - + - 5 + - + - r\ :sub:`9` + - r\ :sub:`7` + - b\ :sub:`3` + - g\ :sub:`2` + - r\ :sub:`1` + * - + - + - 6 + - + - r\ :sub:`8` + - r\ :sub:`6` + - b\ :sub:`2` + - g\ :sub:`1` - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB101010-1X7X5-JEIDA: + + - MEDIA_BUS_FMT_RGB101010_1X7X5_JEIDA + - 0x1027 + - 0 + - + - d + - d + - d + - b\ :sub:`5` + - g\ :sub:`4` + * - + - + - 1 + - + - b\ :sub:`1` + - b\ :sub:`3` + - d - b\ :sub:`4` + - r\ :sub:`9` + * - + - + - 2 + - + - b\ :sub:`0` + - b\ :sub:`2` + - d + - g\ :sub:`9` + - r\ :sub:`8` + * - + - + - 3 + - + - g\ :sub:`1` - g\ :sub:`3` + - b\ :sub:`9` + - g\ :sub:`8` + - r\ :sub:`7` + * - + - + - 4 + - + - g\ :sub:`0` + - g\ :sub:`2` + - b\ :sub:`8` + - g\ :sub:`7` + - r\ :sub:`6` + * - + - + - 5 + - + - r\ :sub:`1` + - r\ :sub:`3` + - b\ :sub:`7` + - g\ :sub:`6` + - r\ :sub:`5` + * - + - + - 6 + - + - r\ :sub:`0` - r\ :sub:`2` + - b\ :sub:`6` + - g\ :sub:`5` + - r\ :sub:`4` .. raw:: latex diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index d4c1d991014b..ff62056feed5 100644 --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h @@ -34,7 +34,7 @@ #define MEDIA_BUS_FMT_FIXED 0x0001 -/* RGB - next is 0x1026 */ +/* RGB - next is 0x1028 */ #define MEDIA_BUS_FMT_RGB444_1X12 0x1016 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 @@ -68,6 +68,8 @@ #define MEDIA_BUS_FMT_ARGB8888_1X32 0x100d #define MEDIA_BUS_FMT_RGB888_1X32_PADHI 0x100f #define MEDIA_BUS_FMT_RGB101010_1X30 0x1018 +#define MEDIA_BUS_FMT_RGB101010_1X7X5_SPWG 0x1026 +#define MEDIA_BUS_FMT_RGB101010_1X7X5_JEIDA 0x1027 #define MEDIA_BUS_FMT_RGB666_1X36_CPADLO 0x1020 #define MEDIA_BUS_FMT_RGB888_1X36_CPADLO 0x1021 #define MEDIA_BUS_FMT_RGB121212_1X36 0x1019 From patchwork Mon Nov 4 03:27:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840993 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2047.outbound.protection.outlook.com [40.107.104.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF48A18A92E; Mon, 4 Nov 2024 03:29:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690961; cv=fail; b=jYgieRR14GXIX0HNC76bELXcWVcGuJsvA5oXc+bsOxk53aoi9/aI1bdHI5lWVGiaCQz0m26BpefKh/EthULgu9nfjavbsSM0IxY+1enySICarJC1OX9R14vMVnhDjMsHDm7P/BjUJihtPZztB0wdnk4Y5lucduhHmg4gLv5L8Bo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690961; c=relaxed/simple; bh=9p9MVML8v/POfGmmGOMrHKHSXBvIRy9YIR5p+PoCctI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=AGIaQ9fZspmgaKQY8B1KIAlGWaBADOjwXqS3VEM/ixMEAR0lc0ILQorsfrvLSBgBQoHLI8CyRMpJ43qyQIf+6/cH2NB1CLGjBOuieFVrP+v7mGSi17/TftWgeJ567N81d5pkQwR9of1dPE2yooB818sLRBtVsQdqcP5BC8/Frfk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=DBJ6qr7y; arc=fail smtp.client-ip=40.107.104.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="DBJ6qr7y" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xY+eH9CTRjcEvmJb6kA95Asb4sAO1yQIZsGCSwD/U0gIuDJCmWbmhWuK38EgfmzlVDLl/CPkicBcIJVQ2MkY4LOfuqZL3/Yo+ssDknI2Bt+Xg9y0A2A13re7FOsVRx62NS7tnM/cX5i4j1fis9yZd2CQZUwOcNzV3iX3nMnekOrMEKnAn4WJjLNuNqIMSzufK+rAEsxx4bHGBBP2xVcvPxtoecpyAeROcZNoaqHiaIjBVdV8RlAtzicBsVyJcUze60qoWX5HW8Psu0aHR7VeGwpw9pQ1aAtb2bPwtGYKDLiuk07505LDSWz4xjebTQ5XYPQplR8ho0rjxU/2eAyi0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JL0mXb0RyUjCaD9mY1QBYGt4lvdZd3+bt8lh5XEh3j0=; b=XKHA4DPRz7FLhuso4xIvvC0A3sNF5C3zXd6s7HGAoaFuDUTg5V1MQKWpW0y2llzvcECUVtFDX84PuHd35BdOsBXA6zJcC5KCMQtVcxk/h7O0h5t+rzg+Wy58pq0mxsqzCMjLSv0I6wLr6Xv4NDl00kp4DK+T/o8KIvW2okU3htU04aKyW87jQpFGp6JoQdr18JoQABBfGmzRYb5Wx+j+oKGjfoQzVqP9b6qU67gLJ4T6zH8fl2frPFX5qy7rzatpUU2/vQEvBk0OxLmz7+ORYBtuBrdxRGvWOH9Ko8ItENGaaitA5t0J40yEtlC7iw9rjHA2WsfSZc0LKYAARi1KvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JL0mXb0RyUjCaD9mY1QBYGt4lvdZd3+bt8lh5XEh3j0=; b=DBJ6qr7y1HaNiTYbdygyQ+vB4oZ7ka/bTcQR+qXZuUmUYh2XxBrBWydkjG3bNXImCmw/BeDxnk0yrqlwiH2hK+o6Xby8bP4P8PYXSdmKsPAhtQ70nBmFeOTZ7IU4QmuAMpBvekBTVuHUySpmN2x0cSvw2vDJs5BEujBeQDKNNx+QK+1sKtG464HYcDEgmpjFXiQGu3jaXXmtex8qqoUgP4EVdilupnOF5N0hCGt1mvs21mDVWI1BIYztNgm6uaAe2i57znKNd9ZLMO5SZ5M+/9p/ThYztqXm+SswGUnavGBuh5vwEngzNQxd8BcBSWKPaZ5lKkrB0J3dG3I5hbGcHA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:29:17 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:29:17 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 05/13] drm: of: Get MEDIA_BUS_FMT_RGB101010_1X7X5_{JEIDA, SPWG} LVDS data mappings Date: Mon, 4 Nov 2024 11:27:58 +0800 Message-Id: <20241104032806.611890-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 64ef8586-0fbb-421e-40dd-08dcfc80dcc6 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: DtHfB3m34MVaZSH86xEwIcE2S23D07wK0t0Y/R3C9uXk5Ms/9UvEnDe7RgyFewvd0AQ/j2uyjjhcnlSPc1VZlUxNLtwstxaZHpRzFwRDoawgDML0rFMa/7aEXpCs6ArMZ6nMU/qnjVS3xWDp0FALCmVoufclkP7TNFY7Pbh0KIVmOb8a1O2cXlnAJZ0pIqi9rCgfJrkq5iih0plLi2fVpaV8Bi0pQOh9n3014l7/jyN5lqwk71utYrHFapXn1QZWkIKJIQoWgBJ5hqf6w9YEY2Hf71gVbqElDGLF5zfdjaLL0A0KhCZwwXw5cTbya1u63JegwFEfSdN966iNGZbyPmP5gqXNXiNVOBqPJ2otcy85ljXKkmG5/p+PDnFjK1tu3oO+d+HDH7oDqzyNVYMzO69E2tqplR3BehAMCEpnil9jvtjrl79ouX3dbdufwhjGOEqrLjsvxz+Zp7983XYa6B0MRYVmVeH5cGCyq87YknEOuhB7GEuwn7Onv0fKjEU/g53Oba1EUOOayYuyTxlw1DyBhVj7HfkzIcHjl46JCcUrCImnzTzI+yv9iGbv5/AfnHLjTreixp4MyOG6nTuOhbuiKNIh2j2T34Prd7wch09uHSFyD+wIGsHpd9t+IGVC/VtFLqT2yI7UdJ3E0q5YuOa+P+XJSeFipRjzq5ExOoZz9G9zOKGEbP9qL3AgquHrgWhjSkEMYGiwXmmxqcb0nQtUYerkge+TKbIPJMv3e7848lOYm3TBKQ7SjS8fK8fz8FpdG3fTsxvZF3aCcfiQe+HWO1zoFUP5gAW2Gsfth0c5xFMlME+DZXJxaTlsdst1umCNAExf3EaEowLG06l2k6wXw7QGXs86d0IUKIgw2g9ysOAdOM+RS70pG1wa+HZOKTxZP4R2hmS4YvV0+2AJpBmeomry9DyOsbAMSbRrxO8TbVMM1Hea59JHrHY0yb/kePEiymKDZKi2HHP1vv5YtxFIs72Tu1n44VhA+NdCi3idDKQ26P1QNRVnOlkNsFOHCTr3tKopIFOXMQuDZzEAqsa4S2jRGCPatClyRjjGyPtE0ebv3oTumvDFTHDg3B+3HK7dlOtsdEgo1vDVXN89kBG/231MC7o3SWw0xmj54OZSZsXjoEbssBvKYXUAIM+N+em0vv1t17VY37Pzso1YAsZTTTVnLG8eKv1r9luX4v+SiPi7SJkU7WRD7rEXfggc9F64WNiewjKj2vyI9f1W9sy2aEnjMpLVJ3vXDBwu1vmuVew3Mj5VxKPyM0UASiXZOGXh4j6xtTQ4nTbFRre2CgonajO/lR+2Yia4iKEsJeAQmly64tYYjYufoTUkZ4Ej9CejDU3mGBTsiLjy5XU71LUOyhRFjUVVcie/dtzdbcQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +nz46/KhMKHCJPVYBm84Q2USbpnKFMa/vGU1F2Ik8oOU1/07BdWQv2gD0vpeKAuaAJqEgwyDnQHPxjxS5wcz/6wYsQ8k5nEy9d4OkzanyvcDQkJns+lXom4pKMgh7qgx/VRJyN6XbR+4dxmVo3lGyZ6BjXRl72Nq73OiyMD5LaC8QXJ4iyymEYdsZHbmQzR6QQBLXAbkwpmoqiBWc8f9jaNIyf5ZkFUN5uJe/BZzHgkRi3hq2OTZDrC/bnp+n/1SJUqKdMQglVo5CKetp4lyLgT7KI+UlXnRbbF4v7dj4A+m/O/Zr1C35mNbmRmcp9nBnF2g7udkvMlIJ9rPG2viTdGvjzQkfVrSk4rXvSFQ/pqLsZXq5Xakcrjq8JCv+CA61UPYGnGl6IYzMy9vy24birhunYx1HPlSetj0a9PY4ehGUf/VtDet6VzCJxmUJLkaorFTUgEtqURNad9d1zwz+8wzVWa6Fb5jVV9fBvH4omo35JEbrmzNt2QqREtLl/y8qUhxVgq/s2q2MTcPtMS4MlsuErAzZJNGy2MldkXkYZK4Xla4hNsGYwvdbX4LYd7ZZK7eTL0JOthrAvGweM5Qsab+39qg0HL8wkDHAgvXK8PC30Gtx0dz1KGhfbURsJK5CnUqz8EwvYrzP46GXaPS90GWidiR9FXSdOYwXDmuIUAO7t3qkJt9HX6UPh9neBwlQHdq4YH7/DeNilhnfsocDk93FkBC933fxLFq1w89TjlMAE//M7j8NAHc7wOyl/3CKEHvHsx+tgrF3G5OdS49QN4Od27JDTRJkAF14/Bt/HVNk9mlPhoJkt8JbEHhihJs+iibBsPSO2XCy7YhAhd1FS+pvuIx6SElUnTR03Jz+yVTPNNooWclkUz6NbbJH1WL6pi5PcDQJEFmXRo4pJiKBZZJh3Pe4qQBT9MqSxDR4PfhUPRPNjJb+diJ0XA4OxbAlNC3YUXi2LyZjEd2XA/XDts+jbstK8FNAGotCaYNHxIsleb+P79RjITsMCetvD5B5ooMypkASjHiYWWi5KIYGovOYKOkMpYN/OwN9EM5PiuQIajqPsskHOjfs9JVId8IKV3VIRb8DWwh0UOsOXfpBfAdYCNl5K9eMxojSHSMCPM6hEFDhbo/lMz2t2jRKqwMu12hkrx18oJ73jODzbE4v5A0nE610B7ctAkzcb88UU42Bf+vOOv/OM8KFWZoDAJkRha49VW62PcnaIL3mN8/5uRXbRC5YhkHMmR1PgFRrvWWRW2CIgXs192DnRpbb/o3vS3xersuqprMcm6yMDLhQYDZKWNtA35mg1ZEBMkVuPzoyDzRaycz+Bwx2lyOEAoPLtoyMhbOHPScGxc0QeEBcYrASq2EImNMuzNN1xo6NeILQGNFlhONZvpqJ+TE/C/vSWUSswa6s0WYDKycx1KxTsuK28GSbcI8NBjRKr2/q1L7VziCb16Yvz9uHyclJdlv+3TDrTc9IwISCxEeuCV1mGJE6XQHlSzM0LMSi9VLMkaIstUgH//5sUTVTztpxHSsxeI9Buw7LkSYcyd8XfZmoQ+GrFyn+FKUVOJ3i+2FutN3ym+mVf0QA9o/k6v9J/J2 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64ef8586-0fbb-421e-40dd-08dcfc80dcc6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:29:17.2486 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SDvq1XXfaZKvx2V/3OKpLZGYHKy2x6OBd2XVqGOYn8iUA0nIiJ/tHkn0tSQLkJJY9khTXUXbZMi8VuGOZR6V6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 Add MEDIA_BUS_FMT_RGB101010_1X7X5_{JEIDA,SPWG} support in drm_of_lvds_get_data_mapping() function implementation so that function callers may get the two LVDS data mappings. Signed-off-by: Liu Ying Reviewed-by: Dmitry Baryshkov --- v5: * No change. v4: * Collect Dmitry's R-b tag. v3: * New patch. drivers/gpu/drm/drm_of.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 177b600895d3..89863a35c731 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -410,7 +410,9 @@ EXPORT_SYMBOL_GPL(drm_of_lvds_get_dual_link_pixel_order); * Return: * * MEDIA_BUS_FMT_RGB666_1X7X3_SPWG - data-mapping is "jeida-18" * * MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA - data-mapping is "jeida-24" + * * MEDIA_BUS_FMT_RGB101010_1X7X5_JEIDA - data-mapping is "jeida-30" * * MEDIA_BUS_FMT_RGB888_1X7X4_SPWG - data-mapping is "vesa-24" + * * MEDIA_BUS_FMT_RGB101010_1X7X5_SPWG - data-mapping is "vesa-30" * * -EINVAL - the "data-mapping" property is unsupported * * -ENODEV - the "data-mapping" property is missing */ @@ -427,8 +429,12 @@ int drm_of_lvds_get_data_mapping(const struct device_node *port) return MEDIA_BUS_FMT_RGB666_1X7X3_SPWG; if (!strcmp(mapping, "jeida-24")) return MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA; + if (!strcmp(mapping, "jeida-30")) + return MEDIA_BUS_FMT_RGB101010_1X7X5_JEIDA; if (!strcmp(mapping, "vesa-24")) return MEDIA_BUS_FMT_RGB888_1X7X4_SPWG; + if (!strcmp(mapping, "vesa-30")) + return MEDIA_BUS_FMT_RGB101010_1X7X5_SPWG; return -EINVAL; } From patchwork Mon Nov 4 03:27:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840677 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2043.outbound.protection.outlook.com [40.107.104.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74A151779BD; Mon, 4 Nov 2024 03:29:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690972; cv=fail; b=CnrzxgZt/jAKb+DbW7Fmpf7u1pBaLGvstcYdlCK4bJVGxuhhjc4Wr2mhtE83rcPqoSx1E3cv+zDfh07FvZp0QBdtJ6iJYJcRqBmStRXHnJ1KgBfJriUWT/G+nDWXzVTaHRqBXpvFjftwy914IyJSdBE8HKKqecresnjFzYbVhic= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690972; c=relaxed/simple; bh=rMzwOBUOCORozMB8GXh3BfJfQc0sV2yk+ipH69QYRcU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ZWo3zGenIlC3vbzxR6lAoMd6MBU1bz78/kDTHb/y+CpdA133/PRz/kowOSZarUYUiRif37uGXuRFUutfOHwsYV/pdaJv4h7tCMRgvvgYjCNvD+26Q/gaRtJmzINbcn1kEG9N5PgfAKGmEApPp9oamAij/PQFK/ZjihtDHJaa2Ys= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=DtIW1Igx; arc=fail smtp.client-ip=40.107.104.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="DtIW1Igx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=duyIjiO27vUsNlxkeq7kVeNOVJ9Cs9KFrr+DrS6jeVh3Hui20rqF8aPYREOiu+Qx1Honpv5NVaSZ6sL005IApLjXijCMNnMnyk1TXGNmegANVsy88Vj39sbDO1JAXrwttrac46vAIGEnMuhOjkktDwQOpwFc3Qqmxwvg08/2YlhomJI6M+0hNB8ZEqIVQ3M1mA+ZKumMLxthOjPdxbiHsadd2D4sSlcMB3Oa6tmpB26Zr65fRW6FqFM6GpRTJgAq49jAXC3ieuHEng4k9u4MEPr9cBaqvDvzSDAvC38A54btQbdfiq9+d7l9AeDkurSG2i6eOHCdKsXDz4idUSiJWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MsWPVuWzx4acrPo+d3e3ScqqAvj1ZlBZhcv+5u4ZiZ0=; b=XasoBxibXe8xfvV5Opn092l1cdyOGG+6+WdH+ks7PWGaEpAC/ENDgj3SPgPTSy/A4+pwaPjaeeENVVG7OQmH8xZSaP+4IE3YImIXw+Q7BOOyZbqtaxG42Qk0Cv6zmuwH5265czAht9HU+9U7c3OjCiSe3ZQ/cJ1mWqbIC8NbijFmUIWArx0uEmOsnH8UZmbMYwYwz0WRfNlyKifKeYvleTIVT+eM2wBHbDFOlkYA+C72dRwfSvoEuIe/L2Kea24Ql6dIL/ITFoYN4rJYv5zGq0SIV+mUgPUCr0Il4KUUKkruvDPxer3WZJwcJLu2ocjTJZoasDiE+jc+V+iHBUr1YQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MsWPVuWzx4acrPo+d3e3ScqqAvj1ZlBZhcv+5u4ZiZ0=; b=DtIW1Igx+fdnLjSFnIc7aHuIufcC8wpnjiQ9/B7xUsn9AcAhU8+tQzxFqUubeeCBKhZvBYy3YjHN33lPh0a94cH7ZCRurlQPHYUkHb8QzV+stYtTF0HoXmCC5RbWqmDg5E+Bb5OobdvE804Argh9B1FjNhDW7CCKZgdkoz11hmIJb/r3G5bdM274uc/zsQc3ArKtFtWI+8CuPr57n4FYaR6N4R33YyUOaXA5md0fF1TOrGtC68ZliK442ASXH28pOE0RG3dq01vIUml9PFkUxbvKn9dOB/jt0qP0/g4XlEi8N9hwNJ5oyXiuCTO8KsstZ1lsO7DpnjjBRfRc5oniGw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:29:28 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:29:27 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 06/13] drm: of: Add drm_of_lvds_get_dual_link_pixel_order_sink() Date: Mon, 4 Nov 2024 11:27:59 +0800 Message-Id: <20241104032806.611890-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: ef29a1e9-5a8f-4cd9-dbc5-08dcfc80e32c X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: gmy/cFeQgOfT50vthat23vlyHQ7WnIjETcKofB7eVBpFdzLbYAYBcZ88QqzZye7/DJ/YEQ1T9D/Imm5fwYL2nTCERDLoSXD/BJrIYEzH6H0VE6Wyn8mCr/CtpRk86hq+SNmIEG7/yXFYWhp3ztII7v8zxYTAOKTxuqbwXpZHELftjHFjuqjdcr+ePnnaA17AKogFVlzfLIg6LlQYwiIMq8GqwwCMHHEcvjpyZ92oPeDPvMf+4oJgN/9zx23OgS8iNvJGYzSb9ur7seh4kmrV/CmgDY27JlPQebpwpu7IdK201LjBo5xU0CfSuum8rNiQlS8ULfvcu/WuxTQx404ZCxgFFt/3znEqkOwNDNzGV36xaZ8zZWo510s78MgzUvljJtpaz11xKj4R+w3m/AiQ1qQLphl94qkpzQe4p0GTI5RQakddF13y+HGyi6Y0iKQLvouO2XND4+J9w00jJm9/LQMN3d31XTDhnvM3qQyJNehz5S3uBc4MRs035fu8Yk14ksIXY0AZImb34DSprvxO9YmEgysamuA4gRxHDYmQpGsqA/4eRA7NeMddqryEHB5CWYIh0nIWSnyL+3mF3zvrHYXkm8l6K8ZCeI4qgi4ZnH5UJwSv7xHeHd/b9DblmdAbKOK6IuLUoBdqxkDoM4qWp5sYG/7XZJeRZJXDOIFAxsp4v5fcDZ9Bsd2BraVW5Kl+eBpqAY5rEORzOnVFg6BZU+d41MNtE302rDT4uYrl/xicrRa4mOyxYipxPYRds0s+f6OlYX/t2nAebHL40lcBQGhVBzKX5+WDaUjTLO8gmTQjECydgR4wLhQOPaIRQbGr7qyKroJQK94u4DN5asINpSZvs6GLjsAvmG7LyBHJjiRKPFR58yiGHVe39jm+iqngvH2faSpubH9Sz2mguzzdmtoUDYsLFUVEwGszAJ5BxunzGW2EdDObsfVzwuWra+uuXvnuEipkokttTocaWUJILMXBPhNghWlHqTEz5ItNXowpBGzueJJOwvtNgKQCx7fnHKBySn5I3Nm6zW8maWDNLMqgeczOmmISL7yarPExVl6mAo4F0O0BgcC5sEcjkAQxx5jGxaX7WoN0QrU88WpErDvrXQo7w6tuYOHFpSCi1w4FBGjugp0ONKA6FopjDXP+TSZ3KlNrNP6JkCqYNGeFY8krnvNDqx5gQw0tBImgtDgTnmQk3fh2OKgqAq2dZGQGja8AIrUJqd9r4dh1Ouq6Xyr7FY1gK+tKE3Ov9DlrCc0wkSzW65zUOz10EbHl3abeSkryJ5c+Z5BSXmFIntAj1nD/g2fSXJhjhTPGh6mWMvy9F/i6U5eXW1fERSbDflZ2D+eBOqYR54oPoLgg32qtlfEzVXwE/P+R67UEVrBoFgU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dtD65QG6JUSx02W0K3CNtAKALlmfpwhXRdD7LdDmU2QTmzN4Ypqo59z28UGvLoSOudM20jja1hIjHgjEkZByXVBWThO/nDA3GBe6ySEeDtHLRBvF5SBwHhuWSAhQaYfPiXMRbcomBNSfb04BrbnF/sBDYa3wOp8tTFEEnx6dv9YYxDkt8V9JZLdHMXJ1RS/MWpjcvEEwgWjdr37KpwRZatckc6PDGhc+g5ZyFBSGq3E5XcpWMfipxPm7SMle/YCGmcIPUs4RJ4QLlq3ypXFoOl3Eta/2KjGaRifJEHvf0Ns96niyGeq1glh50103aTaB+a16+LNHUA6XIj4R9kzh3le5woCF1l+UbJHR0QQUW8Zd0DuoJeTKi3LZy5P65zWD5refsPNX5FWs0kbTCwOW9lr71siOAExBVlCJQP+fcUfFm3nIrWU42oJ5/OZzkYuOIzf/eB0ZNVSfSwVzw0znlMo+u9I2TFgwJ/Cg9SpvtQheZ3foO+QseV6uz8i/TDoABooEsH6EEQR5B9MH3WW82rlaENkitXs7m+sivOwkO1V7RDvAi4ycTTtr7LM2GeUVFtj1FDSj0nrpaxq4Apg1nw/quNgf3hlt31sEKKQkIo0xPX8lLug9vWlyoDFA6HUm14JIcTIwiR45Q6CVZn6DcofjHYGwt+AnYoUZxcnnDzHQI3cI4pfldNmCMjrZbqiFT+mnXYn3lPYsMDyCllJr/iRDR7BsDQFm7Qi8mg6RoShWKx2Y6M4dEJ5Y2IG6lGqIvnjzWi7xGo8qI/FclFnzx4v6HYm5MZSlECdJTXl87KBsxz/VUxeUxBa9tW6DgM6kKSFy6nfOF0lefU8dl2JnIOQ+v+VCYTSP6BnOmf3XCBtd/ZYT2HIpRpK1KRnHUqIZ7iBXnnpIbgV/C53so6Jk5AtC9+q6Gs1B/0x/UpoO+ajv1ELVnZ0pBwpKDhrfLv8T+KpeeWvu0mpIXA2QAvs8k0MIwWcZR122Tn74Z6MgIr3YSCwyBUvi+D3/bO61Hbtwz2y01WX5QIMZ07tIrppGFcaoK+zNVNMgxw9a3v/z0tvIMg+OqytTyfvqz0KXIcOQ75i5mORX5LcDAaDO/7K4Zi3b5V8GBuf54yZpnt4wu2/uQIvQEhVJZhS7i2a7ggxuo0vjne65t6/37ayuBEtzcKI/LXDcLX3icmvQW7yB4neLRIjWEaAfKCIt53YTCsogQALt2ELD4HkSCy/1VoEqrQmUOeYCmA/SrI0MGqR9WOzN3SOTSfI9nMJr2+hdgtJfR+EbdgWkfXq96KkeHLv7pcL5ruEtctfAcCfLT6q1/zZbdl6TzC+lRiX9ke3vAwOpULIlYhGcEh5wkbSY8vnLJsgAMFjD7rqLO2lgMLGqqVWhhCLODwmCwkHoi3Z/ekepvsinHBs26xwl+/4tif0UJZ4DdfUKeAuvn7Vmc2V3dqx/h3hG+x/NbMKyKEs/iY45PTPFjwKwRhcvqtByRHnvPN4+BcFohwzUqFZW1ycETGMDwGiP1E2lbxl9r3dE1/9TN0MeAFblzJey+wdgfx6ZKCDVXp+y9G/v8nnqB9u9L5dK/tOC5VkgDvXEAtpBteOH X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef29a1e9-5a8f-4cd9-dbc5-08dcfc80e32c X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:29:27.8915 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Tbigp49h1fi36KEqLQXJKVQfGHBPeyWIGOUckKZ7oiZH5JMwtwMveKdNwbxUsKTqxjaBgd2fTFaUrixBuo+sog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 drm_of_lvds_get_dual_link_pixel_order() gets LVDS dual-link source pixel order. Similar to it, add it's counterpart function drm_of_lvds_get_dual_link_pixel_order_sink() to get LVDS dual-link sink pixel order. Suggested-by: Dmitry Baryshkov Signed-off-by: Liu Ying Reviewed-by: Dmitry Baryshkov --- v5: * No change. v4: * Collect Dmitry's R-b tag. v3: * New patch. (Dmitry) drivers/gpu/drm/drm_of.c | 76 ++++++++++++++++++++++++++++++++++------ include/drm/drm_of.h | 9 +++++ 2 files changed, 74 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 89863a35c731..5c2abc9eca9c 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -341,8 +341,23 @@ static int drm_of_lvds_get_remote_pixels_type( return pixels_type; } +static int __drm_of_lvds_get_dual_link_pixel_order(int p1_pt, int p2_pt) +{ + /* + * A valid dual-lVDS bus is found when one port is marked with + * "dual-lvds-even-pixels", and the other port is marked with + * "dual-lvds-odd-pixels", bail out if the markers are not right. + */ + if (p1_pt + p2_pt != DRM_OF_LVDS_EVEN + DRM_OF_LVDS_ODD) + return -EINVAL; + + return p1_pt == DRM_OF_LVDS_EVEN ? + DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS : + DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS; +} + /** - * drm_of_lvds_get_dual_link_pixel_order - Get LVDS dual-link pixel order + * drm_of_lvds_get_dual_link_pixel_order - Get LVDS dual-link source pixel order * @port1: First DT port node of the Dual-link LVDS source * @port2: Second DT port node of the Dual-link LVDS source * @@ -387,19 +402,58 @@ int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1, if (remote_p2_pt < 0) return remote_p2_pt; - /* - * A valid dual-lVDS bus is found when one remote port is marked with - * "dual-lvds-even-pixels", and the other remote port is marked with - * "dual-lvds-odd-pixels", bail out if the markers are not right. - */ - if (remote_p1_pt + remote_p2_pt != DRM_OF_LVDS_EVEN + DRM_OF_LVDS_ODD) + return __drm_of_lvds_get_dual_link_pixel_order(remote_p1_pt, remote_p2_pt); +} +EXPORT_SYMBOL_GPL(drm_of_lvds_get_dual_link_pixel_order); + +/** + * drm_of_lvds_get_dual_link_pixel_order_sink - Get LVDS dual-link sink pixel order + * @port1: First DT port node of the Dual-link LVDS sink + * @port2: Second DT port node of the Dual-link LVDS sink + * + * An LVDS dual-link connection is made of two links, with even pixels + * transitting on one link, and odd pixels on the other link. This function + * returns, for two ports of an LVDS dual-link sink, which port shall transmit + * the even and odd pixels, based on the requirements of the sink. + * + * The pixel order is determined from the dual-lvds-even-pixels and + * dual-lvds-odd-pixels properties in the sink's DT port nodes. If those + * properties are not present, or if their usage is not valid, this function + * returns -EINVAL. + * + * If either port is not connected, this function returns -EPIPE. + * + * @port1 and @port2 are typically DT sibling nodes, but may have different + * parents when, for instance, two separate LVDS decoders receive the even and + * odd pixels. + * + * Return: + * * DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS - @port1 receives even pixels and @port2 + * receives odd pixels + * * DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS - @port1 receives odd pixels and @port2 + * receives even pixels + * * -EINVAL - @port1 or @port2 are NULL + * * -EPIPE - when @port1 or @port2 are not connected + */ +int drm_of_lvds_get_dual_link_pixel_order_sink(struct device_node *port1, + struct device_node *port2) +{ + int sink_p1_pt, sink_p2_pt; + + if (!port1 || !port2) return -EINVAL; - return remote_p1_pt == DRM_OF_LVDS_EVEN ? - DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS : - DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS; + sink_p1_pt = drm_of_lvds_get_port_pixels_type(port1); + if (!sink_p1_pt) + return -EPIPE; + + sink_p2_pt = drm_of_lvds_get_port_pixels_type(port2); + if (!sink_p2_pt) + return -EPIPE; + + return __drm_of_lvds_get_dual_link_pixel_order(sink_p1_pt, sink_p2_pt); } -EXPORT_SYMBOL_GPL(drm_of_lvds_get_dual_link_pixel_order); +EXPORT_SYMBOL_GPL(drm_of_lvds_get_dual_link_pixel_order_sink); /** * drm_of_lvds_get_data_mapping - Get LVDS data mapping diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 02d1cdd7f798..7f0256dae3f1 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -52,6 +52,8 @@ int drm_of_find_panel_or_bridge(const struct device_node *np, struct drm_bridge **bridge); int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1, const struct device_node *port2); +int drm_of_lvds_get_dual_link_pixel_order_sink(struct device_node *port1, + struct device_node *port2); int drm_of_lvds_get_data_mapping(const struct device_node *port); int drm_of_get_data_lanes_count(const struct device_node *endpoint, const unsigned int min, const unsigned int max); @@ -109,6 +111,13 @@ drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1, return -EINVAL; } +static inline int +drm_of_lvds_get_dual_link_pixel_order_sink(struct device_node *port1, + struct device_node *port2) +{ + return -EINVAL; +} + static inline int drm_of_lvds_get_data_mapping(const struct device_node *port) { From patchwork Mon Nov 4 03:28:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840992 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2066.outbound.protection.outlook.com [40.107.103.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9308D17D8A9; Mon, 4 Nov 2024 03:29:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690983; cv=fail; b=u0ojbT9yBfm+oHZuIeLNZi2NSFPtFcoD5/JsXF19PBetPvu8gGqC66IranNcD52S/+7LIIQvXsefwK1Zu+Vn4mvV49vLBSqn+2zCUG0PtBSu+WdzAmCDZr4LmLAk7vsdpi+B619ACei3jOPj2g4siyyelA365VtLB2qMICfwzr8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690983; c=relaxed/simple; bh=KGBiFFTgtbyLIRUKU+pWfXo0tttQpRGUjvPPazVttsA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=OWywvf/qY1Jg7e0URBatHoxb52BxGjBT969tfIdMFi9sZhgxgOo2QozuiJu2Y1ILkSrvsjBfhjECbSHJcTm7hcDK1RvaHsqSDj6yatp639f4ggbpbZlMyu6sdd5cEvqQKj6Wb0C3xea4mFYOABTnGMK5tTqS69P3h2eDlAhUpr0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Oe4QOmlf; arc=fail smtp.client-ip=40.107.103.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Oe4QOmlf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lx+UuNAWeuGbuDSgSNRuRFnirQn4tKV+Qcbg/9CPz3LOk9mZpNAH6WcXjlyv8RLacocHt+r67Zdu4PvXp9PwysI058b71r0+tkoqfmobWv7aoxHK8coQbDolWPN9gZem1a7M0naaCg583oS97X2HgTWkwPBrZFs89TlMXxJeKdwxK2Td7c2VWfHfX9DEKdlqnI3kxwJ+Jdy/7AApgbcqSReSVrfNCMNVUL43J0vxppbM1BRdv0UshtzmjxZBWOtKgcTuTuwLEznTLVMIiDOnhcAOYTPPU12UKbIW6jzqRHu5zL/ZEo1DrLISTbxFJ+DFLekknLfqhI5paNJHXPplcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iBYb9b3yHPqkfA+6H7mw96HGKPaBZ7DvQfYniSyZpLc=; b=nD1RZyVNueXmFU3z5EzlyjcMDa1dtnTR6PhDJdaepVI2Rhw0WLp9XFyT9LbjR620ONfwL8Em0KR4JdpSN7oZ8IOaNQS7S3MkwZ20JXpXPGR3RkTKUPPPSfCWj7ZLbCMKjAxu3oPvXi3zLMp8McSVfGwzQRRS0Sajg5tTAH5FexmNkLoicoyeLiXm/833Y13uPPQ2ma8p2te1VDox8f1wpY01yod3gT3wFviGPgIpAq4RkJYDixY82TufX/ZZnP+5qL9+vjWf7lr11y/XL1xxCMyL//VlqgRSwgbebbvH3gEPiNXs+QBqt4aQuHfID+XXjF4f4YHSEAii2RgtKzeccw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iBYb9b3yHPqkfA+6H7mw96HGKPaBZ7DvQfYniSyZpLc=; b=Oe4QOmlfbM96Hmv4tSjT0Lwq4qtkbGRI9wYA4tnVEEcvrFTdAwNd0NrB9Eh1yxNYStV3eYNDJEEdpask1iELW7eQiF44DPYzpzWGnoAVBW0FhlMx3FNO66oaAORH6Hp/12pxwZfITGQUYZwtcGQMmy33Y2DSQIY5OzxQIO3pt/1ORxH5uqQWMWz0b8+20VPkn819VAlYnQjwpSyay30HWEtQYwnhxbslkJ4j8YTfokXX/jUZYQR7kc568bSTPma06hjrQ/6PgnuW9A8w5Zt/sB9Bl/ZMizoVbVjcAb+4LrhynxnWMPnpVPcV4MzCrI2aO6OMch5OeN0AUvoffFGzmA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:29:38 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:29:38 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com, Krzysztof Kozlowski Subject: [PATCH v5 07/13] dt-bindings: display: lvds-data-mapping: Add 30-bit RGB pixel data mappings Date: Mon, 4 Nov 2024 11:28:00 +0800 Message-Id: <20241104032806.611890-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: e30189ef-c115-422d-5add-08dcfc80e999 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: q/bPNCI/RR1OP6cFCIOGaXCFdVEiw6qOjfBNc/gfWEXwV3yeD0ciwi/S58TbG5EztmIC2JXAxzZp93cl6gjFVwBm3wePpuktFR99HoOeGxkZ3oPqZZcwjUrMuckaoqi1QuWA31S03cd039QP3UJk0zrs5efBfztk2nruzNfb08Y4m9Gw9dVuurY5JAdBTet9WIyp34D0CTvqZEmMr+Yo3mQsKJXB35AC+BR6ccGknmNgH6stDieTBcDKywmQI4nc3d3Z5qfbOxDjbVEruo8Hl70XRnJWcH5W3vY7UcQN0sttb4abL15vYoT9P3H2ILp6DSX7KWkyr09dZrgR6PmMcifjDKkSCmKaQvH8mjyRQXsDLIM9oi8C4PbbgXVHB+cfePelBSd9NuLNjq4bqydP/v68mpjGp6qQhOl3wDJqfHTRtDkVihXhYq3KkdJkbDJBQBpYEgSVzcLEiB/QVqvhDKm/ZSoaF12BCAyHFXK9llNC+7A1lxevLGTJfwd8/2MyUOehgrm/oNoJyKO1qC6yrUjfjCJx913CiVdrF9qZ5b+RmKzdKDZm4CgQegV+wxWucR8SKjYeZqoFxZuLd+AguaYD9B16QcNDRc8BJXfHfuSuy2y1XlpeM21ET1daVf6j3IzjljqDWUk+Ap4guIUujPj64WO0HSjS01uR4eGPCC2uolnJHEC5lf5aiWCD654yJCpNNsDSWT80CaFmtYYPOW6ISKh8NheuQnVPEGl2rm/eRLe65nOIHy2T0lgL88yOt0CFrxz2esFbq305c4Q8o16heyTOjc6TuNyypxPpOyqKsEUGYtMZkMNvvSi//m2cN3WDOpLOSS16gBcjIJXC3pzzbP2Lfu99dVmdZ4Lxig09Li5W2zFrD62sz1B+O1xoISPE3B+mLkAtreCHw+4HK9jBWAwHnu9nCNWP+58jfc7QJwTU4z7WL+0DW3rCA0U16jbsPvxlkkob1DvvSdtTMi56CsnGnavwGW8NckQDwzfij4j8mzLqwv4FG4O0vFDgiEZk7J0Txru9N4VEPCz4IbCl1xaKV5Bg6MHxCmOW4HNzTYV4i5HyTK3gUNdZFlptQQbswnKbypOHP91LkOdd5bi2irByreRTLNeLN1jeNFCeMnloTVetB1l8BAdfpg+tP/1fpjwG47jvx/JReFlGJaYcMB1LInUPvfJESkwACFYHo2t/x9OA7P150fsjw7nDJGs2n5WK7+YxDSrmQR/TPHhTiVYYmxzvMsEOthU3KjeFcy0BWq1ohjKJzqK1I6qXnXCiK3uetlyPqfR59iXUD2igvlwg0ycgi4VVNXu6lDcsqQXRjYXQIQ5/xXkh7kxJ2EaCpDTLxDx5p5aLNhomCJEypAp+coXILAHh/NqtJKI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bKS6kohl2UxPXUKE6nMBsWSBT3Weo0926wI3uENUcRGj0wzyUCfN/W0yxlzqvQUL/HbbBzHBBS/mjD6kWbvaRRUwmWEzrGKah8Ak9W76OxaLX5YsWIZvPjijvLpfswQrjNU5zgyUnmOv2IhYWTpbQS/m7zzaOsdkXH+KY4iutsVUKY9HgVx7m3vUWRpHDVDHBe06bPwP2URNKbtLpuh3tdEjzqt1caibr5Qvxm+DbQ6idqwRa093edYdb/y6YIDdCiA0tJyrQ2+ilxCH144mVENqjK3G/omN/Qlwm01AGB2Y4dFfA0mYtH/k4xAu819sqejEYwAdErxvqn6NNYnCwcQnOgirsemOHpGI1Z6uiwO6JILo/EcKQ32Io8yXnAygOlTk5hA2t6sW9VY/1wjvXBZcmX4lkxQLvkholjJmglbaqlPVFLVnoX1oCfxNkRwKjFdfx4QfKCkCZEt/FwuFCtHxXZaYqlOMm7fnuSJdKkLIIHOXCzVHRtIR1lLuDKzGbU1Q7b9wz7i1e/MprAB3czm7jxJ7DHC8R8mYMhMi2qa4e9szeaBakUUw0BNUlxMFhjKBx6lpXZT8hA+NeQDVw8Va87iQv420XHNKbPWHV4PD0ixya7VzhDLKJcpFdxFpagH7Z/BHFya2KRnfGn8ZedUUROHRokuA0hQN8h9DxQh+3P1Jn1T+Y/isITbCQ1iakCtWDEKudQ58DyyZZBVKkuUgT6BBc/znQRGTMWLht0DVFeYh3ZPtu8xCRvZpxVEk+T1LIrJlmhUp5n4mSVEyV/EFeLuTXcyHvpJrzXamrWNoprX85kWL8nyXN86XKXqIIe/veoLnkfvpcemgIyUBW7BT7kvgZn1uXtEfwKjNwqEC5Cs7MONiWW0onUlJNcOft9YeI6H1f0A3QAo0cJJm+Czq4LIBAYhOHNwot8o7xeBBzUOObOEfc21OUQ0tDelw87OObRApCZUGaPbRcRJaD52WUQvTIqnmdgefCL009Qqq6EZU4oy8nadeeEbArxqTnacFka2e8gPH4kccnZPoR/jo/5SMQ/SEgNThjLwMp+AzcRLMLtvYKxfv+EULs8KGLdHldkq4Wg48Cfh9sWQkRHgDr1o2peoRWSk+VYsC1KTKk+3PAPducg+/bWgbN4EIOemQU4Xg8qn5kVp643GUGXYHNGfoMXdxHHL27Q+9ZqglGAWTqqTWqWgS0WvwipnPwR4xjg6Id/S/AIjQWFweeOUR9Iy4TkDZvEl6QISrJdZUZDxpD1NeAxk0bNiVy0rGJ+N+TARQFHCncxmYJIem3Gdbj30CNZ7S03quOjjooMFyAhlUgCmGMDaujNae83kwONjKRhNWhrmXSVZDpNVn+fV9jxolfnkKadk+pfia6wEzWMhDU25RRrdLsR638GAlRFXmM4957QgOKXpb+kJrwRXN7P/GKuhFoADjsgF1gA+I+nTq3YKjzWbmP5w9psJV7Rm3ucm4Hs/D3GLIJ6iNIyULuQWGqqX7XyoY6i3Ernhb5GSP9/hGGzr5+0v8Yk50Wd+gMv81xF/CK6EtST7v0IH2zHIi8KnWQcoh58Vk+7Ci1OrBMzaVDzO3Z3Xp3hNj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e30189ef-c115-422d-5add-08dcfc80e999 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:29:38.6810 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hzxnfUuZjm6weLbepS9ycY8+QP7/VoFkJgc3HJf6cziHrWw9mWO3XVgDm0sxoHyUDC88b1/2+LYGzW7lD3evQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 Add "jeida-30" and "vesa-30" data mappings that are compatible with JEIDA and VESA respectively. Signed-off-by: Liu Ying Acked-by: Krzysztof Kozlowski --- v5: * No change. v4: * Collect Krzysztof's A-b tag. v3: * New patch. .../bindings/display/lvds-data-mapping.yaml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/devicetree/bindings/display/lvds-data-mapping.yaml b/Documentation/devicetree/bindings/display/lvds-data-mapping.yaml index d68982fe2e9b..ab842594feb9 100644 --- a/Documentation/devicetree/bindings/display/lvds-data-mapping.yaml +++ b/Documentation/devicetree/bindings/display/lvds-data-mapping.yaml @@ -26,12 +26,17 @@ description: | Device compatible with those specifications have been marketed under the FPD-Link and FlatLink brands. + This bindings also supports 30-bit data mapping compatible with JEIDA and + VESA. + properties: data-mapping: enum: - jeida-18 - jeida-24 + - jeida-30 - vesa-24 + - vesa-30 description: | The color signals mapping order. @@ -60,6 +65,19 @@ properties: DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B7__><__B6__><__B5__><__B4__>< DATA3 ><_CTL3_><__B1__><__B0__><__G1__><__G0__><__R1__><__R0__>< + - "jeida-30" - 30-bit data mapping compatible with JEIDA and VESA. Data + are transferred as follows on 5 LVDS lanes. + + Slot 0 1 2 3 4 5 6 + ________________ _________________ + Clock \_______________________/ + ______ ______ ______ ______ ______ ______ ______ + DATA0 ><__G4__><__R9__><__R8__><__R7__><__R6__><__R5__><__R4__>< + DATA1 ><__B5__><__B4__><__G9__><__G8__><__G7__><__G6__><__G5__>< + DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B9__><__B8__><__B7__><__B6__>< + DATA3 ><_CTL3_><__B3__><__B2__><__G3__><__G2__><__R3__><__R2__>< + DATA4 ><_CTL3_><__B1__><__B0__><__G1__><__G0__><__R1__><__R0__>< + - "vesa-24" - 24-bit data mapping compatible with the [VESA] specification. Data are transferred as follows on 4 LVDS lanes. @@ -72,6 +90,19 @@ properties: DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B5__><__B4__><__B3__><__B2__>< DATA3 ><_CTL3_><__B7__><__B6__><__G7__><__G6__><__R7__><__R6__>< + - "vesa-30" - 30-bit data mapping compatible with VESA. Data are + transferred as follows on 5 LVDS lanes. + + Slot 0 1 2 3 4 5 6 + ________________ _________________ + Clock \_______________________/ + ______ ______ ______ ______ ______ ______ ______ + DATA0 ><__G0__><__R5__><__R4__><__R3__><__R2__><__R1__><__R0__>< + DATA1 ><__B1__><__B0__><__G5__><__G4__><__G3__><__G2__><__G1__>< + DATA2 ><_CTL2_><_CTL1_><_CTL0_><__B5__><__B4__><__B3__><__B2__>< + DATA3 ><_CTL3_><__B7__><__B6__><__G7__><__G6__><__R7__><__R6__>< + DATA4 ><_CTL3_><__B9__><__B8__><__G9__><__G8__><__R9__><__R8__>< + Control signals are mapped as follows. CTL0: HSync From patchwork Mon Nov 4 03:28:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840676 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2065.outbound.protection.outlook.com [40.107.104.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58DF317B4E2; Mon, 4 Nov 2024 03:29:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690994; cv=fail; b=na8qO+q+iVhd2ppdDy7MQs9Hi9zpMrAYBBQljIqJT+rG5FzZvIB3no6UKWFBOB7Zy2Wo+akzpFy4t391gV7iV33MprWza0PeuSQWVPgQIuedJn02f18EtdKOS9ZvVMSvRuZ45nNdHCREOqOzG3m6mH/LW87is+p+fV7tm5ARC2M= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690994; c=relaxed/simple; bh=4LFClqEwfuLGz582Zid2qjPUi/FqJgVDL6xjhSQ3j4c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=H4jXqHjDIsW98y72U6gOZEimpWyYUlk0iwUIMatGuE7gWFOqH75Pk3uFPVzjy3x3NJ/ikP/wYsghcLeu3ySRJMTRoiaL90GX9qNXRAjrw/+3zU953Rp0p/M67a65L/gAWhwYYL5I9JWFSioRbdy7+r7cNWgwVzNZcHfyJXzu3co= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=WMdLn6pq; arc=fail smtp.client-ip=40.107.104.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="WMdLn6pq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Jg6tlSkG3kgeer/Xms0a5c7/zgUPRcJ+Xbic23S3oOeo+oHnSLBLuXPJUFx5gPpF1V4Ch+pZELFpm3aybHGrOdz919qE/lQdDuR5IJaUge/ImxKGIokaVO89Vz0NJmyrFP8UqI7EMIsAq6UiP1HL9JcABN6Fi/YJjw4Vr+Aktw7u5ooHLsml3B0y+mue07dCSZuXH1ThhTNRJEgQBlctUtEm8VAdlaJqXamokR9pFpvl/CnboXYvHTHY5uMksbGnFcNI8MAhci/rziCNkrRgScaPQKijRSLNvW3OIQCZe2geSt+nvBqVTw3gAbhVv68/AdSm84fkBxEzW6N+FU/I8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+gOBNbnJSnnxg836bf5WghF5VYpyYcxTCh3be4zUFvM=; b=yDF4+6giB7WUdTrH7jil3ak7gEqHW8Cd+8FqdDFgsMsbDZtUCpmW4dBGyyJ4pmY2MubJHmD4zJbK+O7mPqCtBLaEIzrhjRbCdpDnZzl4CARvfGlYN1VpauNliUNLgevK+b0IjhMchzYHAPRXDZBeaiJjZ9R3n2OP4Fn0kR3cczFxJBxdHauaujkQH/naOD/HcypuIj2LnydBw1dGykTK6gEQ9M+McT2NI0TDPHmAINwUJBwyV+LOScLqRERIXGbexGzXMbSm7yUfJjzsCujGHrjUlwMkGGtb6b/ddnUDRfsZCz6W6xucagyts5QKv5wV/ChgL26rsdtpa01wwcRYFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+gOBNbnJSnnxg836bf5WghF5VYpyYcxTCh3be4zUFvM=; b=WMdLn6pqxNwvZwlh1/fC3mvimvXm8Fe/VN/DNB3gmF4UuD/DlEgDqE2LU9Ww4buXcYOOJEkm6AAhx0qIuspeq6XuqGU4HOBuZudu9ttvzcgxJMaplkI+A/p1C8i6qhy7NZNNtQqd6Z7lm8u+2XUMHRfrvObRAO3BVwOj00+FdZ4IGBvJX4G4ePE4hJ8XvyMiq1kpidq00hIXgQpNoZ0PrsNIsNz24YiFlVCvsA0zfnMWkCSIMjhEiYJBGBXE6ySuUqL8keESjgp+BfPNvIfozVBVQm0TnKc5hdsq2YFd9ttAelcKb4kLIV1oDXd3u3NXrDfXDWV8eu5IYYlOZFg9aw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:29:49 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:29:49 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 08/13] dt-bindings: display: Document dual-link LVDS display common properties Date: Mon, 4 Nov 2024 11:28:01 +0800 Message-Id: <20241104032806.611890-9-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 1fa3452f-1654-4e08-5ece-08dcfc80effd X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 1S159AnWlgBAkVqHktkpjD9wIq7zdskMaU4VYZzJnUF7Y9pk7E45Ezo6fmjYlzhDIjJ6PuMB96GppVwcBFzCRI2Qn5Jbw8YkudECPho9omra4I5gknmc6ThideSj8uR4qWYiCieypYaOOOE9kB448UMaRsVrtJ+ntPicvh4gf/ywGIf1ASDqio+Kqqvx3YdiWKsk0C5JG8k/jf/5y3f6Rx9WWt1tvoY2TXC/N6hA/HEMJ3LpZ0X5F9fBg8aMfoObmDh+kPWeW+6WLcKj1Y6I/4cV6m4+lbE/CeGnCvpjNJ4xpCSm07W/8ZIDr5ZpYBJSKEw28x2fI4KCRaEBZVbooBXuFf+rOUXoDfYZlkiB5dSlIfCDrTCqz6e0StiMFwmTr0Ar6N3AIFDA0WiQxhkSYLirmg0GjRGhZTubkmSexgPQ5UyA4lRXSjDph93ZZwSxExD8YJiBIiWXW5QYKiYbzNECROo7YiV6mQt3ChMirafUKx35Ac6zpwrBaMTi2PPxwwJ5I4BHyCJu0Nm4WCwPIqlPXAltH0QotH9eA5MXWRrUSmyLemgCVeifCmcCbB7xGMAgqFJhPto0fabplGOG05on6weqk/Qw2TYT9IXqzq7Q6vUdjtQvdshboL+h8f44PvXIjLcO9TMhZGcZgN4Hd8pTKVYkvfY5R1m42HKNYahkLtgf063cDqFBlN4o08rCkFIt6R/WYHW3wEq3O7/8SQLMW13E8gwNk8pgchQxFulPrTNBPf6mcYDrpblO52OoaKcraEPrigVuajjHm0Yy6KnH5L73IpGOwg4ebtA4p61TcCSXOPWWEs5FR41kz0do++7Sigq87ORhcXXJyndsTgRUe8/856VPnn0bx/y7618S+oq5yLK+JdLcee9JruaM/g4vaW1hPGpILuAKn32CLMDLDeCR8RghmjjcQcvbbpUurx5glN/W6FRTt27DQ8BvdnJwDHchnn4yblg4Er/wAJbSnYeQuJfuzgGCTlAgzvLcy5IY4XMk0wCUJNZ0aQ+rbAJAZHcHE1TiqIPyuc/zAPGzoCzT0ikppA+zPA7GNcre4+ikIK4w65gRRHVDA+ewl0caoJjkuapxTfE8L0fKcMb5YSCW12WMlTnygWs9mzovdf6j5SR1H2mCb7sYnB997iSSoEohn1Y8VY/VvxJUjLc86jCiU1I9np+VI8QNXmexruD5CcxfJlmvOWOc32jDxPXHsyJN87ybMPKwwvAQj047hyOcoEga2PGBHb717Z133eeFQV12/9l8IezImblDQJJmL/inZBDgemPd1S2i/B2wf4+/RHVCgGgEcnWN7FPUgxywARBgBe4oNaPm10Kc X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: K+trcXKeeybs+qoykGGNb+cpnslx3JAzrowS2AykSe2Mfg27SIp2kh1ufXq0sENYkVkXVI2HtThmYTvn1gDTsXjsIDhafDiYQx7GJXJg1AS57oCxBHrnrmrfbBPZ+L8Q70uScw49K2Udg3ST8qO3pt8QmXXJS/JwnK7naAb36qG7ItdFkjSmXWOjwRtr2/wsj9YFou75hnrKxZBT/AVvKwG9GL7hRgh0OBcElz67Ruk7p3qEO1MxLHYVS3omJyqdiv1ZNCx/IRK88XvKx4FlXoM3kQcuIsq/AESk2b6j3g+1s4uyxYjCyhfqYk+KpYABe/VWc4mmqEVMmJ0h/y7wOb6SjGIwi40Jlp4qNsegmuo4knqEDHBJYxB4DbzxOcTBA8XebTapbqJN394uOuvYd43Pzo/Rv/XK67jAEEXwYOWmAPC5kXevoK/AFnGxuplVkOlC48YA5dnF6MOiiLjB3O58Z36cQ9NLgSFoocPWCbHxdBeSPwtQC9Rdp2fW1ZLt6M96QYaAyNQqmEbV9UGfmcTOoBHjvAun3gMpex82j+LvklX2tqEPgjacbyI2o+aKzBXY+EfPYB2/xN8X2PTgSUwz2Gg+V3LvTzWBxtJ9BQNcO3Fy9j/RSFCIPIc28AJEuCoGH3PBuqB1Moaqjl6JAJ+JfLI47xxwSxRYstgDmeTkz2N2QttcJJNVZgGv9jFPpPTKWwyvjE0ZigqH2Gn8j8ANJPXCarmtV8Urzhgg70mtuaS6GvN69nfbTz4oAekDWrPwKZeNViijh4v7Kp52OjrQlIJJahv6UVMs2NlG/PpPGpwxRivjy8G2wUSuZm9UcRZoxDvhIHXYEMuvCxcVxXJG3XbEMV/JdKGwkzAeKZy6LPkgIwR5CJmaqVW5zFI1AseizL7gNLBrUcxiCgJkAPVZF5H4rfAwPxyUjneVe6ZCmjikMshfcK3W5xWn2rudkfpLKexRtFph2J7sHFXwIm9M+r/KYmnw5VMCeQmRQ1KL8Kjs19+Qb/686f1VS+RGsiPe+YfuX+iPZZf4BTZDfRQ6C/JQy4GqHLrsjWY9X9RdMZGDEYWSJqn0V07xH4QdCGlhVP38/BR3qGefIzQsAETk1evjlbhFcnNxw0JgHD9RaaggdZ/Fu737D5YKuPDdrFtlwpMOgDUKeG4PbVywuRLsU/hsQDdope12kLvJhJS723tMCh6GVj7Twlp02k4X34ZAr4djl187FKLs6hdNAmIngxVXBcyPVvTA/7unzgpi/M6oF3mSm+y7qmR7ZNLFdeKUCRbvUQ83oIwNoGV1VqUEO+UVQSeMgjA1jYY24XlMvUJrG7YFDZI+2qYb1QZ/UO42DrhIhFTjFdJzhqF1VQi6zM9BHKLULvBj1hkThqfBK7q4hneI4xboNOLAslXbYsPc7zE/8rpDCUaoVA/TcEONA4c6X3hLla8Ri6psNnorzkDS64TRKbIPlB75bHY2e9UtlWxV2ggThYevuX37uju4QN1jYZ1Fc2FyYEqIG7nByAE2DowQOG///A4vbz37nfLB6S+6xIDeq5iThANNsa4nZSKkDKoaRaIMZae9KIlDxUCE3oUVgLQ/Mli1GuRK X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1fa3452f-1654-4e08-5ece-08dcfc80effd X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:29:49.4108 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3yD7tML5yLLNqcStZsGtjGXBAfosJ2T9Mk8VSl8OiMjwlZIc/HYgZiMuopAdg/sJ6D3rTBnAuHZ7G/juIv5s8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 Dual-link LVDS displays receive odd pixels and even pixels separately from dual LVDS links. One link receives odd pixels and the other receives even pixels. Some of those displays may also use only one LVDS link to receive all pixels, being odd and even agnostic. Document common properties for those displays by extending LVDS display common properties defined in lvds.yaml. Suggested-by: Dmitry Baryshkov Signed-off-by: Liu Ying --- v5: * Use patternProperties to define port@0 and port@1. (Biju) * Require port@0 or port@1. v4: * Squash change for advantech,idk-2121wr.yaml and panel-simple-lvds-dual-ports.yaml with lvds-dual-ports.yaml. (Rob) * Improve description in lvds-dual-ports.yaml. (Krzysztof) v3: * New patch. (Dmitry) .../bindings/display/lvds-dual-ports.yaml | 63 +++++++++++++++++++ .../display/panel/advantech,idk-2121wr.yaml | 14 +---- .../panel/panel-simple-lvds-dual-ports.yaml | 20 +----- 3 files changed, 65 insertions(+), 32 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/lvds-dual-ports.yaml diff --git a/Documentation/devicetree/bindings/display/lvds-dual-ports.yaml b/Documentation/devicetree/bindings/display/lvds-dual-ports.yaml new file mode 100644 index 000000000000..785701fe1590 --- /dev/null +++ b/Documentation/devicetree/bindings/display/lvds-dual-ports.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/lvds-dual-ports.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Dual-link LVDS Display Common Properties + +maintainers: + - Liu Ying + +description: | + Common properties for LVDS displays with dual LVDS links. Extend LVDS display + common properties defined in lvds.yaml. + + Dual-link LVDS displays receive odd pixels and even pixels separately from + the dual LVDS links. One link receives odd pixels and the other receives + even pixels. Some of those displays may also use only one LVDS link to + receive all pixels, being odd and even agnostic. + +allOf: + - $ref: lvds.yaml# + +properties: + ports: + $ref: /schemas/graph.yaml#/properties/ports + + patternProperties: + '^port@[01]$': + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: | + port@0 represents the first LVDS input link. + port@1 represents the second LVDS input link. + + properties: + dual-lvds-odd-pixels: + type: boolean + description: LVDS input link for odd pixels + + dual-lvds-even-pixels: + type: boolean + description: LVDS input link for even pixels + + oneOf: + - required: [dual-lvds-odd-pixels] + - required: [dual-lvds-even-pixels] + - properties: + dual-lvds-odd-pixels: false + dual-lvds-even-pixels: false + + anyOf: + - required: + - port@0 + - required: + - port@1 + +required: + - ports + +additionalProperties: true + +... diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml b/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml index 2e8dbdb5a3d5..05ca3b2385f8 100644 --- a/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml +++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml @@ -20,6 +20,7 @@ description: | dual-lvds-odd-pixels or dual-lvds-even-pixels). allOf: + - $ref: /schemas/display/lvds-dual-ports.yaml# - $ref: panel-common.yaml# properties: @@ -44,22 +45,10 @@ properties: properties: port@0: - $ref: /schemas/graph.yaml#/$defs/port-base - unevaluatedProperties: false - description: The sink for odd pixels. - properties: - dual-lvds-odd-pixels: true - required: - dual-lvds-odd-pixels port@1: - $ref: /schemas/graph.yaml#/$defs/port-base - unevaluatedProperties: false - description: The sink for even pixels. - properties: - dual-lvds-even-pixels: true - required: - dual-lvds-even-pixels @@ -75,7 +64,6 @@ required: - height-mm - data-mapping - panel-timing - - ports examples: - |+ diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple-lvds-dual-ports.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple-lvds-dual-ports.yaml index 10ed4b57232b..e80fc7006984 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-simple-lvds-dual-ports.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-simple-lvds-dual-ports.yaml @@ -22,6 +22,7 @@ description: | If the panel is more advanced a dedicated binding file is required. allOf: + - $ref: /schemas/display/lvds-dual-ports.yaml# - $ref: panel-common.yaml# properties: @@ -55,28 +56,10 @@ properties: properties: port@0: - $ref: /schemas/graph.yaml#/$defs/port-base - unevaluatedProperties: false - description: The first sink port. - - properties: - dual-lvds-odd-pixels: - type: boolean - description: The first sink port for odd pixels. - required: - dual-lvds-odd-pixels port@1: - $ref: /schemas/graph.yaml#/$defs/port-base - unevaluatedProperties: false - description: The second sink port. - - properties: - dual-lvds-even-pixels: - type: boolean - description: The second sink port for even pixels. - required: - dual-lvds-even-pixels @@ -88,7 +71,6 @@ unevaluatedProperties: false required: - compatible - - ports - power-supply examples: From patchwork Mon Nov 4 03:28:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840991 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2062.outbound.protection.outlook.com [40.107.104.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE23118E363; Mon, 4 Nov 2024 03:30:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691005; cv=fail; b=pggJ80MZE1F35fkJhb+9iOq7PzC5DOh6yPo6BWvBr7TYRnKdWKrhOqwqjwMBRNpAUOUjIfcxlM16JwQQ0VYZD8NKL/x+fZJ2Bqym0ovo2YD493eYttK4cu9uW++zQYIGlfqSpNCe/Fv3dc3FjRy3CPRn2wJutoDwFMAHGaVCw5g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691005; c=relaxed/simple; bh=nrOO9ux2Uj5reeQtMtpMkkd3oy54PGim2TxL1BzXoZE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=snFzQzqtPKgTlfInzq2ZwUQmalNmlkPREGVHK05Rr3yZ+3Fux5TBJfejdA2n29l9RwkrvOrRIkc5zYochQ1l8b/jP+8TcUHTbf02A/tGKCKn+Am4w0wswV7uFbuANU6sXkQuj/94V8Ma/7K+8e/of+NCZyiD23QUWQVxDKqNGDw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=SoOMsLnl; arc=fail smtp.client-ip=40.107.104.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="SoOMsLnl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ffhtI/UI8cu2FU4ywGwB+MYNAJ76FCdomddWkjLSjRwKBVheq8zWfmDq88WA7/nsTfbM5O29jkVnsllICUyexLVo/YKGt8OGEA6xwozaTOOKOaJEA6dlS+oo9HNUu+ar42t9QcVY3ItVxQJGKpva8Uz0nxevAnA7M+vriH6XZCdPbI2MG4/26ccqXoqzr5qJhbHCb5CQm1bZIvSXb1TO6zCwCXmqvaItRbjNwVupZmYUQAxJH76nZgIIGsKFK8ogFE9epcLvJIflDyOStuFQ3X4Zbds4Hsjpc2raFJU32BwNXVNf+mFzQfHcP9SMyBFTQIVvvWT2oAkQY3rvRkz1jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XxeX8pGRFBQb+YfN3m7GAR1TOgreB4/tlzwYsaXoYFw=; b=jtfHHw8AChT0yVGwVxu410Ajm82ixRNk0Y/F2CtQmDxN/bE7zi5bsMU3SN0jWXQ3X+F4JjEnZ2KALE24powHCLxcSXlENQbs6qYZ3Q9t1fnP8fVWmAwxpC5a88gHLy77t1FoYt5LUpuIp0ofxuSnNlkvExD7FD6oM+lCvXqZRASvpOxIE557CNki6QBM81Jm29BxlTZQurwyVagzqJQ9B/m1UTBHQBxbGl/kUP81/2RbaJBoejS3h5qhRbYpeSwTLaVpR1NkxFj/zOqq8gHWmdBcZ3ELmEpM8YTF3hquGQuD8g5YzG1EyPgyAAOlbhKf8QRxTTyB2Fo6bkLJhqlZ4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XxeX8pGRFBQb+YfN3m7GAR1TOgreB4/tlzwYsaXoYFw=; b=SoOMsLnlWAKBq6EJqsNV6MR1lhOPHb3CkZmCMnD2kl48KHh7A22/Wip8GB9IXw472lkEJyNgfsmL+3nDUGsdOQx6wMg7ClHjzMh8L20zJWaz3kiWeV/aIrsUg7C81fjmME5GbNXlpjMuvJFAY1wnkzoW/WBXzb7fGltAloUuDnEKaQx3RDO4Uzajf9rjenopReXhekVq4LMpYmBgqKLWslcCvKZHzirb5BSdpAeXI5+NxrF64mOUDT8jpsyo3Pcs9+/Td2Hjr2uQas9vcDODiZrRCfCYBc4aj52mnE0VYv7AUFaXdjteqROoYeUHpvcITXGdNiLfn18JIhyqJtVQFw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:30:00 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:30:00 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 09/13] dt-bindings: display: bridge: Add ITE IT6263 LVDS to HDMI converter Date: Mon, 4 Nov 2024 11:28:02 +0800 Message-Id: <20241104032806.611890-10-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: d6391948-b013-4923-3f13-08dcfc80f65b X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: oM0lv0kPURxU+d35bnN4WKRQjuqeZ1pE0JnB9bkibsIRbeirF9u0B7YWz6yquGHKM1UmCkkPFhTUcfMGB41qFnTzyy+HNCZBXbnUQmeYPOCYwzX1agbb4XgepoBnSuPtv1tyOZVSIWnxc/2r23jgpiZR4BFM35gdPMn/sl+bMQiEqvSwDvl7uS+7vLNa/LZrypWM7W/SwJSzB8ld/77L5idC8Q+aWyH9HcFP9Lot1YAqwH/xk1dfH89k+lvN6Tm3D0vOXv5ShKfWRXBt6Asi0jv5PLsRwmwMmd/QyEIHQgVazWqhKyjkGHAhcOdqOf9wjqUcabCPy3mmw1W8Ij3PzU5oG1CvBJXfmLQn4CDgDZV353Co9aCS5gzBPISM23e0T4kZsdxdVL4RiXTp0sfEHs3kDOE/VvNDLsK2lLq11qP365lwmT6t5z8vQan8Wmjv2LC2a9czil5kL1+74uIVkvzCcO+VIe4wlHJLB5EIZfVsdiuR+joFvx53MYiC9GZUYQuiZd3rH2nrPTJIqONuHag9yucVCUASCzs5hgYI8UQsOi1pXNm5objut2/5ol5LcgC2MDNC2XtcMuHIpJVkGRBSEH7UOoURl/i7B4iIcAYdCSJauRIh8bi2UjT6E0qA6Q4hyPNUBCEBK0ESdNQnHWUwsSs9zuwAK5cHtmn05Oylin1MmkUUFlcdyvRk2ljCF++60FfFhQxJqKX/2nSDYe+O2Opb+eRJVHxpviMLStjUM8od0OI/XxtBR4D7bnlFtXE5tNQZsu+WoQRzfKqhwwOlldqRHtRFEQoL+lumHu+ekkuXB+yG8tqO50AnNliPCf5cTrTBP1uP/1VPVPanYwUcq+llTHWYCaH+GZcXQGlNrAdAaUS2zRmhcJS+lzfuTaMh+jDfv0gplwYta+jxADM5VMg6PnBna+TRsddAcsROo2RC/lxysC713Fy2yh8MbQsrhQ3TorJEe4fAGfHsEacjLIlDTGegfBqEPK3eOYyR0eEXMBi7gqou4zEzARrhkfEPCYIdGEvKvApkgMxuENql2k5d7sQzSLLFWFRWiw0HOoSVhedp8Yy4HfFzJHzhpnqAvaHgX39q3RINM4wJVTTs54u078bwbFrP741TyF5GPeLcsLKDxJupjZeJxeuRtPKJMFf4IjPs7otCr9ccfCxSfG3uiKfqR2ih7NFLxiaN3yZ4u4IUhbzwdbvzh0ijfbM/UG/JUBrCqJrcRmdcsjtmksDRVcRL83RJfZM1lFLIh9viXwPBqE+xnznh7lrK2aiumfakNtOsdWWR3c4fvIBv+oGuLYKEi2AFYyk1x8ayNtaj3jAPio0/01JwpoK1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MYPcVY6bAQbfGVSPnzvIdJVpnb0/qtafvGqd5OpULRU1dvzqn/r1R2hK4TkKo+mArrumOyRZOrFCsUmAKsgPiEgmg7WQAkYxFll3YTt5MV4YsfG5Xe+XV2WNpOG6iZyd9yOOIqJfo1D5BWd3NagsVEeLjjK0P6qGFQ2s/PtVrvXnN/Mp5iEFUD0mZyF8Uq1LVqk7k/SDfBM9W+LAPqylAn/gRwOj3olR8qjxdBcggqk4vI+iQhT/Ht04YSWJs5etavTxiVJFEJyyvVdpXc5KBXpMStI76OJRZHsowkt5lDYbhwj1uSzYJ5oCKHxcbjDpz60tRH2MO2W1FndkrC53lZdzhdKhoA+GM9n+H65GITjPRv1T9u5ii0clDSxeV5GPm9M0FWuunOv/eCJ3LU9OgTu314kjx941Pxoc2+QGO/TZCrMCvDbPRjtPjd5bEwcFE/dhJ/Xy7QjkvOm6CmeI6WRu4tbp11tgL+8BEQvdyHz1b5iDBcVAVshIX2bh3COooJbTPwjYPWaIT+hsHGuIKvE80f2macN8qhyU7YahjXgD4okEWa77UDrqUEWicQKLfTWlxPQq7y8NlPXUjL2aOWUYk+lcRKFqA09BEscLGYr9ZwRqDMQn0KS6ok9UMuOCKKEGt/PJDuA7SJeggqplLCDZiqcVesC5e7cBy761+ecFDxB2xGCE+Fw00k5YhRMDvNPatKzlyTkur+9DA1DWiybXwdVIJvpgyvxBAnY7iAAv39kPvheP6z4G2T7pDWG5Fq8mzcfAArINweosb99cqw8fxh6N6Z75SHQBoQfUnRsLs2kp8SRKfzy/ODTfcky/5IZCVGR7UacJ8+psLdwAZUQ3QGTf9qPnArCwI9r1ZWJ4nvnpWlzjrPlKIX1wpheBFKTvFLq804rsYaKy4U+P3fBRDMvgn7gLtFTpstBo3O4PChA49H4Gp4CGwfAjKfs13AC1aksM4xYypJKpbHqSCxa0bkBbf18qVqLGCdrMs+IzHC1gA7OumoOif+71SwF1TCZlJecNvrGOqK+rc+TDgAGT65f8thB6UAjjPwa8Bp/KOwdDREYSKZnC/Gi+5upsYfmj5XWLsype+xlDqJbe8HuQSM99PcIjkZ4o4Kg8+BiTIEmFA5FCbVbfHIxTc9N6lDf7diGf3aDqXz/cVs3asjw/hrJPhsaOM7C7xit7iORjvxrwNccmes1cQzhBzqLXBFCrgOCOuETdRyPOpOEoLy8sJQzVQ3xha5ud1DNpPwKAjSlAiVt5za5Lu0vCeCI/6LhwKdkluQ30bvvIPCB5u8VxFgsgJksgk4cQYFDGOop8Xe//qC9ZXQ6ViWo3lM21K8amZpiioX3ndYPg+jHal8d06DsMTFEmB+Xkxbaa0NDExAxs+WcMq2cpCPYGfJuf/40ql5N2IoePM/T/G/0/D5PL+moSndYji2Xs46LIPbgCMgWJLIctl/w7crBA1LDtpG7sc7RBgAPAN5bhgWSMm+YsX7/mvbYesemCLgv5lZiLuvp1RFc/ASdLcyZbf6qogNB17SHuVb1zFn5rxhgi43F7zWsT/tcIdOit1zq9OGsJjIvGVP97bqXOAdBTh9C3 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6391948-b013-4923-3f13-08dcfc80f65b X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:30:00.1369 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5+fHRWfRlqIn+vBYnfnegMxxSko1eL0ysbb2AsbVVmN5Tc/0KkQbt3j+HryneY7W+RLXjQkyG1r5xDUdVAAhuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 Document ITE IT6263 LVDS to HDMI converter. Product link: https://www.ite.com.tw/en/product/cate1/IT6263 Signed-off-by: Liu Ying Reviewed-by: Biju Das Reviewed-by: Rob Herring (Arm) --- v5: * Collect Biju's and Rob's R-b tags. v4: * Require dual-lvds-odd-pixels or dual-lvds-even-pixels DT properties for port@1. * Drop "data-mirror: true"(30-bit LVDS data bit order is not reversed). v3: * Reference lvds-dual-ports.yaml. (Dmitry) * Add data-mapping DT property. (Dmitry, Biju) * Allow data-mirror. * Drop ite,lvds-link-num-data-lanes DT property. (Dmitry, Biju) v2: * Document number of LVDS link data lanes. (Biju) * Simplify ports property by dropping "oneOf". (Rob) .../bindings/display/bridge/ite,it6263.yaml | 250 ++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/ite,it6263.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it6263.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it6263.yaml new file mode 100644 index 000000000000..0a10e10d80ff --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6263.yaml @@ -0,0 +1,250 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/ite,it6263.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ITE IT6263 LVDS to HDMI converter + +maintainers: + - Liu Ying + +description: | + The IT6263 is a high-performance single-chip De-SSC(De-Spread Spectrum) LVDS + to HDMI converter. Combined with LVDS receiver and HDMI 1.4a transmitter, + the IT6263 supports LVDS input and HDMI 1.4 output by conversion function. + The built-in LVDS receiver can support single-link and dual-link LVDS inputs, + and the built-in HDMI transmitter is fully compliant with HDMI 1.4a/3D, HDCP + 1.2 and backward compatible with DVI 1.0 specification. + + The IT6263 also encodes and transmits up to 8 channels of I2S digital audio, + with sampling rate up to 192KHz and sample size up to 24 bits. In addition, + an S/PDIF input port takes in compressed audio of up to 192KHz frame rate. + + The newly supported High-Bit Rate(HBR) audio by HDMI specifications v1.3 is + provided by the IT6263 in two interfaces: the four I2S input ports or the + S/PDIF input port. With both interfaces the highest possible HBR frame rate + is supported at up to 768KHz. + +allOf: + - $ref: /schemas/display/lvds-dual-ports.yaml# + +properties: + compatible: + const: ite,it6263 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: audio master clock + + clock-names: + const: mclk + + data-mapping: + enum: + - jeida-18 + - jeida-24 + - jeida-30 + - vesa-24 + - vesa-30 + + reset-gpios: + maxItems: 1 + + ivdd-supply: + description: 1.8V digital logic power + + ovdd-supply: + description: 3.3V I/O pin power + + txavcc18-supply: + description: 1.8V HDMI analog frontend power + + txavcc33-supply: + description: 3.3V HDMI analog frontend power + + pvcc1-supply: + description: 1.8V HDMI frontend core PLL power + + pvcc2-supply: + description: 1.8V HDMI frontend filter PLL power + + avcc-supply: + description: 3.3V LVDS frontend power + + anvdd-supply: + description: 1.8V LVDS frontend analog power + + apvdd-supply: + description: 1.8V LVDS frontend PLL power + + "#sound-dai-cells": + const: 0 + + ite,i2s-audio-fifo-sources: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 4 + items: + enum: [0, 1, 2, 3] + description: + Each array element indicates the pin number of an I2S serial data input + line which is connected to an audio FIFO, from audio FIFO0 to FIFO3. + + ite,rl-channel-swap-audio-sources: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 4 + uniqueItems: true + items: + enum: [0, 1, 2, 3] + description: + Each array element indicates an audio source whose right channel and left + channel are swapped by this converter. For I2S, the element is the pin + number of an I2S serial data input line. For S/PDIF, the element is always + 0. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: true + + port@1: + oneOf: + - required: [dual-lvds-odd-pixels] + - required: [dual-lvds-even-pixels] + + port@2: + $ref: /schemas/graph.yaml#/properties/port + description: video port for the HDMI output + + port@3: + $ref: /schemas/graph.yaml#/properties/port + description: sound input port + + required: + - port@0 + - port@2 + +required: + - compatible + - reg + - data-mapping + - ivdd-supply + - ovdd-supply + - txavcc18-supply + - txavcc33-supply + - pvcc1-supply + - pvcc2-supply + - avcc-supply + - anvdd-supply + - apvdd-supply + +unevaluatedProperties: false + +examples: + - | + /* single-link LVDS input */ + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hdmi@4c { + compatible = "ite,it6263"; + reg = <0x4c>; + data-mapping = "jeida-24"; + reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + ivdd-supply = <®_buck5>; + ovdd-supply = <®_vext_3v3>; + txavcc18-supply = <®_buck5>; + txavcc33-supply = <®_vext_3v3>; + pvcc1-supply = <®_buck5>; + pvcc2-supply = <®_buck5>; + avcc-supply = <®_vext_3v3>; + anvdd-supply = <®_buck5>; + apvdd-supply = <®_buck5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + + port@2 { + reg = <2>; + + it6263_out: endpoint { + remote-endpoint = <&hdmi_in>; + }; + }; + }; + }; + }; + + - | + /* dual-link LVDS input */ + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hdmi@4c { + compatible = "ite,it6263"; + reg = <0x4c>; + data-mapping = "jeida-24"; + reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + ivdd-supply = <®_buck5>; + ovdd-supply = <®_vext_3v3>; + txavcc18-supply = <®_buck5>; + txavcc33-supply = <®_vext_3v3>; + pvcc1-supply = <®_buck5>; + pvcc2-supply = <®_buck5>; + avcc-supply = <®_vext_3v3>; + anvdd-supply = <®_buck5>; + apvdd-supply = <®_buck5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dual-lvds-odd-pixels; + + it6263_lvds_link1_dual: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + + port@1 { + reg = <1>; + dual-lvds-even-pixels; + + it6263_lvds_link2_dual: endpoint { + remote-endpoint = <&ldb_lvds_ch1>; + }; + }; + + port@2 { + reg = <2>; + + it6263_out_dual: endpoint { + remote-endpoint = <&hdmi_in>; + }; + }; + }; + }; + }; From patchwork Mon Nov 4 03:28:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840675 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2046.outbound.protection.outlook.com [40.107.104.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2880B665; Mon, 4 Nov 2024 03:30:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691016; cv=fail; b=rEdRIxU7C00xXW44fmyU+gskQ4Am82zyJNM1XLa2zA2dfh+TLz61q5SnMPBd1wdojQwtFOpPADljv2I23evRr+lxPCyMmgGpewEyvHsudnvB1TT1DmlPFGeliFnpNYkMWZITgffyzKNTYrvi2hFHSab8TyMlSZ0bUjYr1eaz3k4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691016; c=relaxed/simple; bh=XPRIsiZnGRuP5QkYSPxdicSTAb1UKwFDiME6No3Y+0E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=r1yGcIXvviF+KHaw7upGhOp4pag1Ngoe6pbB/7t7REC8abW539ONRjjyAoJSr8D9JpEd50GXvr9Zl9wNdeOPw/FgD3VlQG1mgHdzTW74lBOLyYpSuMsuL3OJ9onzw1fiswPS08HElIKtpR7GLrGBHfcnrJ9MeKXpVncUAvvuDoc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=YSG+WJQR; arc=fail smtp.client-ip=40.107.104.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="YSG+WJQR" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bsZPJxS5W/PsQJkUzBc5bxug84mkVQMYcLSpBnugPw2n1KDl2Qw6B6+EXpP1+9pekfygK8lCX56+Xx6PTPPudJehr1TL3rIobElBJPiHmdG9YBi7sNAvoiQk6SYU2iHpXSWMUfdsW+zJfw+1oulK65/eAi03O5iLvZcxiUS8BJvWWjILk5WZtXePhvwGe6kNckTF10XnxNITjHU5lafL6CdGTTaTpFokY6CfzAco/tedsJLc7D28qYo0PLV8JYa+i6Rsn2kWzVlwwn15N82a5fAO0tnhG45vqAfmrmsCN2p0CLd129Emyg65+vfsl2DgQL7bxrSAUjGvxB9kFRwdlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ohaPr9IExC+wv9/gn1GZDCyIaQKtOceCuIQJAumDKic=; b=Hzpcr5Cs5dMjKOfUS/brdyOd9TbWOjAnZE7I9I28ynRC9K8kRVRUcgC0FzRhFv2IQ2y7ewkf+5Z4Tft0pGJ0As7IJe/SC8qBRDRCpBRbwRTAmdRqDwUvbO3rCwOLWURuwupn7G/OiFfdFbfG19ZAKCPrGDORsYrAbsCN0XkOCLyZLp5x/oLXm1LuDOwdKWx6fLzbMQTrJboUnUPiwORvJcYerrfICNCxFLMjXlnhkUNI4LZJgiMFvHn0hW9ex7XEZRN8XRP1sQqE6HsEY9Yg1lKzVEJqCPLs/QDhbeKF5cXd1wcXNOSsMRAQQjk6EX2afW/+L2VQ7hB6BhD2hJv4lA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ohaPr9IExC+wv9/gn1GZDCyIaQKtOceCuIQJAumDKic=; b=YSG+WJQR3BBud86vfOrr7kWOrIkz9U9IPDdr6AEnUt5AIa9Y+Z9JlEY5FqaIBeRkX0mo5JHmBC/nnzhn91delgwvWkL/MhBpjowpeL3YzlJFMyubfcw5CdnkLIC2vlO0Tch9RJu4HpVNmV4txzlFvKFV0CmDkDt31YkN0/i3ttB1n4jHOzefxYAWSg/jX6oVNVpNDVVZ0w1xPNl1vNMMvgtGnIPQIOA5ogp+sI4PT63x2LtckM3ZID4Fl30vlEjD2EnBKs8wGZ1Te0IHUQZVABGcCNbKCqCPBuErBu6HhZsXxf+bS3VhJjy/mlEUj/1Au/9R6rrQfKk74bL3oxfyBQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:30:11 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:30:11 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 10/13] drm/bridge: Add ITE IT6263 LVDS to HDMI converter Date: Mon, 4 Nov 2024 11:28:03 +0800 Message-Id: <20241104032806.611890-11-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: d1190658-3e30-452c-ff84-08dcfc80fcc1 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: bpqwU6gawEL5hwHq+que5sb9+KT41nPPsExi9MQjW0sxoMwrzvkdf0TX+sYTNpW4gUsqaTRqhOCJKcbzcx65XJajYmr2nG8BFKSUwfJXSM2Y6ycbsZDD7ONo9Kn/SpomeRZaolItxahYBY5KaJYIfQx2BxLiHrAOS9v6eAOhjZT8/W0GbQenYV9vb97hfHyq7EX9DGClezV6mLcU4tqQ4FSzM3pDijaQ1oOl0uGDRhZFm2WT5HR3FMJ3R/rGh1vJdIjuQeOrslOygI16ZazGHdotE9yBe+N3WvXph/3rC1vXQSlm7TtzzkOc8WLSo+nmAruoNkVCggDln/Awk9RGSa5QNOKXM3ryQTucCzLWFC48g5QS9ptHrK/cIO+D1hHJ6DUH0rbLj6PojGmcdYN0G8WtiopbgfteVa8Ws0SBeDYhU4cpX+ewm3KOVqb9O2X2TLzarIHKsqbVqfkIOfKu76tl6dy5gxuS5s7VUG5fTzhj8ucup40tWZBTS1lIfFFPKz/ivW6s5Kqyww3SeyIT78pZZzyRbW/UeqA7eqkU7KVuAFiIOHdkZ6x+n+Hlb2RfGBhPBdmSgoOMcMyCmCzuiBy8Rni83MRyK6IgXXFLkiHnFLxz4MvxMLB7X0LUxSnuWCOl1+NdK3vO5DAA2gqApWKy7J29FymRi6mboldsdYzlbahj05v+WO3NNVx2J6lDK3ZaM6GW/LM4UDtBA5Coxi5dxl5rr2yXBLGYmMAQPTdE4LaKX2ZB9sBmbpRgVh+sTInKRCcavdnWi5Sb6wP9vc/O2NnUaa4JVURvl2kD2HOvNQnvOwldhO6ZPlBrjDMMAIs1vGqXZXItG5VW9w6leOMUo3wteKwSpTmwMadRh+3vF+eGuxzHCFwx3Oqiunlm/Olk+Ugdc0yTlrxKnTTEJFpgpHoo0/0l42z1SRtYU2EmIiz6Y5PpyENDJzwc3uJgEybrH2STQtrscYc1MfMtPaecszd2Mpu35c+K3eNnX5/dgibAcEtGkuXuEzJIjG7jEX5pFDPn/rgKZqorO8yWWZzHua9nqVeokN8xzwQUTFnie0FCZC3V5McQkFt/Ob1X/0Vm1Iu4NGPavkeczeUjGosxajNsDzWcD+R2ofl5JhYoxkaLSFKgZSXdTU93ykCO13Jk6wtca9yYZRapu/BTVSdNoWLyEbLfSa47J2qb9s+y1gR1EUCfjNk3i/K5CmW0bCzyL6cpH2yPzYuXKdNpCIjCRtkhTq3aNY0R6F3D6F5e2CeIou+ajf4yyflwvp0M/CtmMZDMIWur+0gvdgLqrvEBtqnIQvgKbdAZHCpZJfuwoLGK55bs2dgW8YFAA0xnOYQ1DbcIuwBaZc0XSQLgcehF5+LbGe1JNqxjRw8jXXvSZ8OXpgyt2yJ0avIcRocm X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uU734XZ/dIwoT93U9NSiMSy8b/FFNlRVk8GM2+xLImwgE18hAJxY5lSipUcAQYdkq7geENU5IvVLKQsvnx4bncEmU1xmk+l8Ly4V1xP9jwPPCg9siUMSkLcbYkYJTm/pL9aGPovuK54YgtQnVeGzgi067hUnqneYBTl7TQvd6QhftSVMBlfsSNXqWhIqffbMNBqIexRl8Iw669Z3EBU9PeL+adQp6CsgvWyOVQKDdpx6wXt7UCbeRezWwlzysEqqv7W+3lRU04tXkSQfxtJhxtp+tn1twr30ocZ3rTKZPbogHahlP6N74JLR1ThbhPg4GaR1jF7FzGSOLYSOCce+tefueskLehs5oFBbtED8qJQ+PeZ7a5ZmsCZ6cI9bgjWdn8RNjLFDtEiNiqlH9cpChHvgS82dvireYn4zkKcia5oDmTnU1wBvFx6oM3L/D0reJlS6jvh+IjouChze9Qgp3dbdYaR4i7XgR4Hk/d1Sx3OqNisP1J7zJRtM3OT9kkVjLmIgC7KS7G+dJV74yPEzKTWtUquYAWH0cVOvYPy6tPQkdoihlauE1AiXNOCqVPZ7XK6/ntskWaVTG1iFT6IhTEud2deggVi1dN1ceTUVMn0hyt1fS+jk+tIT6wRh8B9het1+MsmzmSvGjf4quXE6+sdDOTS6O0jp3PbzZtuSnRMkf7jQNWPla3sUCKwJG4JqbGtKZsMJmKAPmT3owZt1vw2n9r7F1l7lsjVqzzLK0UX5rjb4mUa4BU/gGIVOJoXhRxr01vyqlLN2Xv6xR0h6/22RKyVp8zSa4rsWVi7RNjL5kePYOaWJ6y+ln2f6M0QWd6esnZiYMYqNNITSUXQzRTzvHOZFhntlv577ZowuLRn/+oJK5t7EFpNLYKjSn+y61foArnquPPNcLzl6eHl3+1ZYGUw4asVGOAzsg+lEpLSSWExZVcGIdAHQyGEnZ+J0B7q5UJH+72f/1sNu/zB6g3dIui98+GDZl4sXIrDEzbOLajr1yM0QbLBdXRcrzNzBhlfZVFSPDsw6OE9qIxi9PWa46oAVay04Hv8Pc/RBSEAWsHBXWKE+GP2vErK0ix2Ib1eK0tLp0/O906FKnJuXKTCC0+HCoEUM+eqZdctcQ42/EHpxZhvttw4nFUelK+ORAHLuBHQUFHPcWLgReIcWjrrnLkYu+HPqppLRT9iGFQCexm7B6eksi+WGMkdWU8EGYecdwdRptRAlsxJxCBTnkFHsUcKKxB+I/CapqCos/Aqda53towvMXnEUMI+Oh5Z3oXyB6KsHPiCBgdGBeD7FkDe3NRMpTWtD0hUH3kSPx/20TgSLvaAeL5YYjwFvflTTZnn0SmYyTje25JMyd2qxpS3p+AJVDrwidrwzR8UjQ4hE9uaTf5bAYh9OrJ0xqHSOJtW5vhrPRUXkVAuDFbGfU1epP9CTRCwYB59OnPx1zQjL+heOZWY4dB/zy3RG4sZnXQWz+x/N7gYoCF4rO+iU4ISKCQoF37556+A6hNjUtWP51QNoKGNfgmmw7nzirT56uwS9eP44kqbDs2RyYE8+9aVQDi0mUzFQFThRTNzglRLu8MhSv6OZCS9r1VMy5Suo X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1190658-3e30-452c-ff84-08dcfc80fcc1 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:30:10.9313 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zhZpWfVSuiAKWQftHwJg1WJCNZsda/HmQettF9RFC7F3uwNKkDHooLDPq8tsitaDUyI00FM/LmwPnQWKX6LfuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 Add basic HDMI video output support. Currently, only RGB888 output pixel format is supported. At the LVDS input side, the driver supports single LVDS link and dual LVDS links with "jeida-24" LVDS mapping. Product link: https://www.ite.com.tw/en/product/cate1/IT6263 Signed-off-by: Liu Ying Reviewed-by: Biju Das Acked-by: Maxime Ripard Tested-by: Biju Das Reviewed-by: Dmitry Baryshkov --- v5: * Collect Biju's T-b tag and Dmitry's R-b tag. v4: * Use local variable reset_gpio in probe(). (Biju) * Move pixel clock rate validation from mode_valid callback to hdmi_tmds_char_rate_valid callback. (Maxime) * Document IT6263 video processing throughput constraints by adding comments. (Maxime) * Fix LVDS 8-bit color depth macro BIT8. * Drop 30-bit LVDS data bit order validation(30-bit LVDS data bit order is not reversed). * Collect Biju's R-b tag and Maxime's A-b tag. v3: * Use HDMI connector framework. (Maxime) * Control the missing HDMI_REG_AVI_INFOFRM_CTRL register. * Validate the maximal HDMI TMDS character rate. (Dmitry) * Get LVDS data mapping from data-mapping DT property. (Dmitry, Biju) * Validate 30bit LVDS data bit order by checking data-mirror DT property. * Use drm_of_lvds_get_dual_link_pixel_order_sink(). (Dmitry) * Initialize a bridge connector instead of open coding. (Dmitry) * Add a comment that IT6263 chip has no HPD IRQ support. (Dmitry) * Use devm_drm_bridge_add() instead of drm_bridge_add(). (Dmitry) * Fix a minor build warning reported by kernel test robot. v2: * Add AVI inforframe support. (Maxime) * Add DRM_MODE_CONNECTOR_HDMIA. (Biju) * Rename it6263_reset() to it6263_hw_reset(). (Biju) * Check number of LVDS link data lanes. (Biju) drivers/gpu/drm/bridge/Kconfig | 11 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ite-it6263.c | 898 ++++++++++++++++++++++++++++ 3 files changed, 910 insertions(+) create mode 100644 drivers/gpu/drm/bridge/ite-it6263.c diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 609f4d0ac93d..6b4664d91faa 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -90,6 +90,17 @@ config DRM_FSL_LDB help Support for i.MX8MP DPI-to-LVDS on-SoC encoder. +config DRM_ITE_IT6263 + tristate "ITE IT6263 LVDS/HDMI bridge" + depends on OF + select DRM_DISPLAY_HDMI_STATE_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR + select DRM_KMS_HELPER + select REGMAP_I2C + help + ITE IT6263 LVDS to HDMI bridge chip driver. + config DRM_ITE_IT6505 tristate "ITE IT6505 DisplayPort bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 3daf803ce80b..97304b429a53 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_CROS_EC_ANX7688) += cros-ec-anx7688.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o obj-$(CONFIG_DRM_FSL_LDB) += fsl-ldb.o +obj-$(CONFIG_DRM_ITE_IT6263) += ite-it6263.o obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o obj-$(CONFIG_DRM_LONTIUM_LT9211) += lontium-lt9211.o diff --git a/drivers/gpu/drm/bridge/ite-it6263.c b/drivers/gpu/drm/bridge/ite-it6263.c new file mode 100644 index 000000000000..cbabd4e20d3e --- /dev/null +++ b/drivers/gpu/drm/bridge/ite-it6263.c @@ -0,0 +1,898 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* ----------------------------------------------------------------------------- + * LVDS registers + */ + +/* LVDS software reset registers */ +#define LVDS_REG_05 0x05 +#define REG_SOFT_P_RST BIT(1) + +/* LVDS system configuration registers */ +/* 0x0b */ +#define LVDS_REG_0B 0x0b +#define REG_SSC_PCLK_RF BIT(0) +#define REG_LVDS_IN_SWAP BIT(1) + +/* LVDS test pattern gen control registers */ +/* 0x2c */ +#define LVDS_REG_2C 0x2c +#define REG_COL_DEP GENMASK(1, 0) +#define BIT8 FIELD_PREP(REG_COL_DEP, 1) +#define OUT_MAP BIT(4) +#define JEIDA 0 +#define REG_DESSC_ENB BIT(6) +#define DMODE BIT(7) +#define DISO BIT(7) +#define SISO 0 + +#define LVDS_REG_3C 0x3c +#define LVDS_REG_3F 0x3f +#define LVDS_REG_47 0x47 +#define LVDS_REG_48 0x48 +#define LVDS_REG_4F 0x4f +#define LVDS_REG_52 0x52 + +/* ----------------------------------------------------------------------------- + * HDMI registers are separated into three banks: + * 1) HDMI register common bank: 0x00 ~ 0x2f + */ + +/* HDMI genernal registers */ +#define HDMI_REG_SW_RST 0x04 +#define SOFTREF_RST BIT(5) +#define SOFTA_RST BIT(4) +#define SOFTV_RST BIT(3) +#define AUD_RST BIT(2) +#define HDCP_RST BIT(0) +#define HDMI_RST_ALL (SOFTREF_RST | SOFTA_RST | SOFTV_RST | \ + AUD_RST | HDCP_RST) + +#define HDMI_REG_SYS_STATUS 0x0e +#define HPDETECT BIT(6) +#define TXVIDSTABLE BIT(4) + +#define HDMI_REG_BANK_CTRL 0x0f +#define REG_BANK_SEL BIT(0) + +/* HDMI System DDC control registers */ +#define HDMI_REG_DDC_MASTER_CTRL 0x10 +#define MASTER_SEL_HOST BIT(0) + +#define HDMI_REG_DDC_HEADER 0x11 + +#define HDMI_REG_DDC_REQOFF 0x12 +#define HDMI_REG_DDC_REQCOUNT 0x13 +#define HDMI_REG_DDC_EDIDSEG 0x14 + +#define HDMI_REG_DDC_CMD 0x15 +#define DDC_CMD_EDID_READ 0x3 +#define DDC_CMD_FIFO_CLR 0x9 + +#define HDMI_REG_DDC_STATUS 0x16 +#define DDC_DONE BIT(7) +#define DDC_NOACK BIT(5) +#define DDC_WAITBUS BIT(4) +#define DDC_ARBILOSE BIT(3) +#define DDC_ERROR (DDC_NOACK | DDC_WAITBUS | DDC_ARBILOSE) + +#define HDMI_DDC_FIFO_BYTES 32 +#define HDMI_REG_DDC_READFIFO 0x17 +#define HDMI_REG_LVDS_PORT 0x1d /* LVDS input control I2C addr */ +#define HDMI_REG_LVDS_PORT_EN 0x1e +#define LVDS_INPUT_CTRL_I2C_ADDR 0x33 + +/* ----------------------------------------------------------------------------- + * 2) HDMI register bank0: 0x30 ~ 0xff + */ + +/* HDMI AFE registers */ +#define HDMI_REG_AFE_DRV_CTRL 0x61 +#define AFE_DRV_PWD BIT(5) +#define AFE_DRV_RST BIT(4) + +#define HDMI_REG_AFE_XP_CTRL 0x62 +#define AFE_XP_GAINBIT BIT(7) +#define AFE_XP_ER0 BIT(4) +#define AFE_XP_RESETB BIT(3) + +#define HDMI_REG_AFE_ISW_CTRL 0x63 + +#define HDMI_REG_AFE_IP_CTRL 0x64 +#define AFE_IP_GAINBIT BIT(7) +#define AFE_IP_ER0 BIT(3) +#define AFE_IP_RESETB BIT(2) + +/* HDMI input data format registers */ +#define HDMI_REG_INPUT_MODE 0x70 +#define IN_RGB 0x00 + +/* HDMI general control registers */ +#define HDMI_REG_HDMI_MODE 0xc0 +#define TX_HDMI_MODE BIT(0) + +#define HDMI_REG_GCP 0xc1 +#define AVMUTE BIT(0) +#define HDMI_COLOR_DEPTH GENMASK(6, 4) +#define HDMI_COLOR_DEPTH_24 FIELD_PREP(HDMI_COLOR_DEPTH, 4) + +#define HDMI_REG_PKT_GENERAL_CTRL 0xc6 +#define HDMI_REG_AVI_INFOFRM_CTRL 0xcd +#define ENABLE_PKT BIT(0) +#define REPEAT_PKT BIT(1) + +/* ----------------------------------------------------------------------------- + * 3) HDMI register bank1: 0x130 ~ 0x1ff (HDMI packet registers) + */ + +/* AVI packet registers */ +#define HDMI_REG_AVI_DB1 0x158 +#define HDMI_REG_AVI_DB2 0x159 +#define HDMI_REG_AVI_DB3 0x15a +#define HDMI_REG_AVI_DB4 0x15b +#define HDMI_REG_AVI_DB5 0x15c +#define HDMI_REG_AVI_CSUM 0x15d +#define HDMI_REG_AVI_DB6 0x15e +#define HDMI_REG_AVI_DB7 0x15f +#define HDMI_REG_AVI_DB8 0x160 +#define HDMI_REG_AVI_DB9 0x161 +#define HDMI_REG_AVI_DB10 0x162 +#define HDMI_REG_AVI_DB11 0x163 +#define HDMI_REG_AVI_DB12 0x164 +#define HDMI_REG_AVI_DB13 0x165 + +#define HDMI_AVI_DB_CHUNK1_SIZE (HDMI_REG_AVI_DB5 - HDMI_REG_AVI_DB1 + 1) +#define HDMI_AVI_DB_CHUNK2_SIZE (HDMI_REG_AVI_DB13 - HDMI_REG_AVI_DB6 + 1) + +/* IT6263 data sheet Rev0.8: LVDS RX supports input clock rate up to 150MHz. */ +#define MAX_PIXEL_CLOCK_KHZ 150000 + +/* IT6263 programming guide Ver0.90: PCLK_HIGH for TMDS clock over 80MHz. */ +#define HIGH_PIXEL_CLOCK_KHZ 80000 + +/* + * IT6263 data sheet Rev0.8: HDMI TX supports link speeds of up to 2.25Gbps + * (link clock rate of 225MHz). + */ +#define MAX_HDMI_TMDS_CHAR_RATE_HZ 225000000 + +struct it6263 { + struct device *dev; + struct i2c_client *hdmi_i2c; + struct i2c_client *lvds_i2c; + struct regmap *hdmi_regmap; + struct regmap *lvds_regmap; + struct drm_bridge bridge; + struct drm_bridge *next_bridge; + int lvds_data_mapping; + bool lvds_dual_link; + bool lvds_link12_swap; +}; + +static inline struct it6263 *bridge_to_it6263(struct drm_bridge *bridge) +{ + return container_of(bridge, struct it6263, bridge); +} + +static bool it6263_hdmi_writeable_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case HDMI_REG_SW_RST: + case HDMI_REG_BANK_CTRL: + case HDMI_REG_DDC_MASTER_CTRL: + case HDMI_REG_DDC_HEADER: + case HDMI_REG_DDC_REQOFF: + case HDMI_REG_DDC_REQCOUNT: + case HDMI_REG_DDC_EDIDSEG: + case HDMI_REG_DDC_CMD: + case HDMI_REG_LVDS_PORT: + case HDMI_REG_LVDS_PORT_EN: + case HDMI_REG_AFE_DRV_CTRL: + case HDMI_REG_AFE_XP_CTRL: + case HDMI_REG_AFE_ISW_CTRL: + case HDMI_REG_AFE_IP_CTRL: + case HDMI_REG_INPUT_MODE: + case HDMI_REG_HDMI_MODE: + case HDMI_REG_GCP: + case HDMI_REG_PKT_GENERAL_CTRL: + case HDMI_REG_AVI_INFOFRM_CTRL: + case HDMI_REG_AVI_DB1: + case HDMI_REG_AVI_DB2: + case HDMI_REG_AVI_DB3: + case HDMI_REG_AVI_DB4: + case HDMI_REG_AVI_DB5: + case HDMI_REG_AVI_CSUM: + case HDMI_REG_AVI_DB6: + case HDMI_REG_AVI_DB7: + case HDMI_REG_AVI_DB8: + case HDMI_REG_AVI_DB9: + case HDMI_REG_AVI_DB10: + case HDMI_REG_AVI_DB11: + case HDMI_REG_AVI_DB12: + case HDMI_REG_AVI_DB13: + return true; + default: + return false; + } +} + +static bool it6263_hdmi_readable_reg(struct device *dev, unsigned int reg) +{ + if (it6263_hdmi_writeable_reg(dev, reg)) + return true; + + switch (reg) { + case HDMI_REG_SYS_STATUS: + case HDMI_REG_DDC_STATUS: + case HDMI_REG_DDC_READFIFO: + return true; + default: + return false; + } +} + +static bool it6263_hdmi_volatile_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case HDMI_REG_SW_RST: + case HDMI_REG_SYS_STATUS: + case HDMI_REG_DDC_STATUS: + case HDMI_REG_DDC_READFIFO: + return true; + default: + return false; + } +} + +static const struct regmap_range_cfg it6263_hdmi_range_cfg = { + .range_min = 0x00, + .range_max = HDMI_REG_AVI_DB13, + .selector_reg = HDMI_REG_BANK_CTRL, + .selector_mask = REG_BANK_SEL, + .selector_shift = 0, + .window_start = 0x00, + .window_len = 0x100, +}; + +static const struct regmap_config it6263_hdmi_regmap_config = { + .name = "it6263-hdmi", + .reg_bits = 8, + .val_bits = 8, + .writeable_reg = it6263_hdmi_writeable_reg, + .readable_reg = it6263_hdmi_readable_reg, + .volatile_reg = it6263_hdmi_volatile_reg, + .max_register = HDMI_REG_AVI_DB13, + .ranges = &it6263_hdmi_range_cfg, + .num_ranges = 1, + .cache_type = REGCACHE_MAPLE, +}; + +static bool it6263_lvds_writeable_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case LVDS_REG_05: + case LVDS_REG_0B: + case LVDS_REG_2C: + case LVDS_REG_3C: + case LVDS_REG_3F: + case LVDS_REG_47: + case LVDS_REG_48: + case LVDS_REG_4F: + case LVDS_REG_52: + return true; + default: + return false; + } +} + +static bool it6263_lvds_readable_reg(struct device *dev, unsigned int reg) +{ + return it6263_lvds_writeable_reg(dev, reg); +} + +static bool it6263_lvds_volatile_reg(struct device *dev, unsigned int reg) +{ + return reg == LVDS_REG_05; +} + +static const struct regmap_config it6263_lvds_regmap_config = { + .name = "it6263-lvds", + .reg_bits = 8, + .val_bits = 8, + .writeable_reg = it6263_lvds_writeable_reg, + .readable_reg = it6263_lvds_readable_reg, + .volatile_reg = it6263_lvds_volatile_reg, + .max_register = LVDS_REG_52, + .cache_type = REGCACHE_MAPLE, +}; + +static const char * const it6263_supplies[] = { + "ivdd", "ovdd", "txavcc18", "txavcc33", "pvcc1", "pvcc2", + "avcc", "anvdd", "apvdd" +}; + +static int it6263_parse_dt(struct it6263 *it) +{ + struct device *dev = it->dev; + struct device_node *port0, *port1; + int ret = 0; + + it->lvds_data_mapping = drm_of_lvds_get_data_mapping(dev->of_node); + if (it->lvds_data_mapping < 0) { + dev_err(dev, "%pOF: invalid or missing %s DT property: %d\n", + dev->of_node, "data-mapping", it->lvds_data_mapping); + return it->lvds_data_mapping; + } + + it->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 2, 0); + if (IS_ERR(it->next_bridge)) + return dev_err_probe(dev, PTR_ERR(it->next_bridge), + "failed to get next bridge\n"); + + port0 = of_graph_get_port_by_id(dev->of_node, 0); + port1 = of_graph_get_port_by_id(dev->of_node, 1); + if (port0 && port1) { + int order; + + it->lvds_dual_link = true; + order = drm_of_lvds_get_dual_link_pixel_order_sink(port0, port1); + if (order < 0) { + dev_err(dev, + "failed to get dual link pixel order: %d\n", + order); + ret = order; + } else if (order == DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS) { + it->lvds_link12_swap = true; + } + } else if (port1) { + ret = -EINVAL; + dev_err(dev, "single input LVDS port1 is not supported\n"); + } else if (!port0) { + ret = -EINVAL; + dev_err(dev, "no input LVDS port\n"); + } + + of_node_put(port0); + of_node_put(port1); + + return ret; +} + +static inline void it6263_hw_reset(struct gpio_desc *reset_gpio) +{ + if (!reset_gpio) + return; + + gpiod_set_value_cansleep(reset_gpio, 0); + fsleep(1000); + gpiod_set_value_cansleep(reset_gpio, 1); + /* The chip maker says the low pulse should be at least 40ms. */ + fsleep(40000); + gpiod_set_value_cansleep(reset_gpio, 0); + /* addtional time to wait the high voltage to be stable */ + fsleep(5000); +} + +static inline int it6263_lvds_set_i2c_addr(struct it6263 *it) +{ + int ret; + + ret = regmap_write(it->hdmi_regmap, HDMI_REG_LVDS_PORT, + LVDS_INPUT_CTRL_I2C_ADDR << 1); + if (ret) + return ret; + + return regmap_write(it->hdmi_regmap, HDMI_REG_LVDS_PORT_EN, BIT(0)); +} + +static inline void it6263_lvds_reset(struct it6263 *it) +{ + /* AFE PLL reset */ + regmap_write_bits(it->lvds_regmap, LVDS_REG_3C, BIT(0), 0x0); + fsleep(1000); + regmap_write_bits(it->lvds_regmap, LVDS_REG_3C, BIT(0), BIT(0)); + + /* software pixel clock domain reset */ + regmap_write_bits(it->lvds_regmap, LVDS_REG_05, REG_SOFT_P_RST, + REG_SOFT_P_RST); + fsleep(1000); + regmap_write_bits(it->lvds_regmap, LVDS_REG_05, REG_SOFT_P_RST, 0x0); + fsleep(10000); +} + +static inline void it6263_lvds_set_interface(struct it6263 *it) +{ + /* color depth */ + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, REG_COL_DEP, BIT8); + /* output mapping */ + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, OUT_MAP, JEIDA); + + if (it->lvds_dual_link) { + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, DMODE, DISO); + regmap_write_bits(it->lvds_regmap, LVDS_REG_52, BIT(1), BIT(1)); + } else { + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, DMODE, SISO); + regmap_write_bits(it->lvds_regmap, LVDS_REG_52, BIT(1), 0); + } +} + +static inline void it6263_lvds_set_afe(struct it6263 *it) +{ + regmap_write(it->lvds_regmap, LVDS_REG_3C, 0xaa); + regmap_write(it->lvds_regmap, LVDS_REG_3F, 0x02); + regmap_write(it->lvds_regmap, LVDS_REG_47, 0xaa); + regmap_write(it->lvds_regmap, LVDS_REG_48, 0x02); + regmap_write(it->lvds_regmap, LVDS_REG_4F, 0x11); + + regmap_write_bits(it->lvds_regmap, LVDS_REG_0B, REG_SSC_PCLK_RF, + REG_SSC_PCLK_RF); + regmap_write_bits(it->lvds_regmap, LVDS_REG_3C, 0x07, 0); + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, REG_DESSC_ENB, + REG_DESSC_ENB); +} + +static inline void it6263_lvds_sys_cfg(struct it6263 *it) +{ + regmap_write_bits(it->lvds_regmap, LVDS_REG_0B, REG_LVDS_IN_SWAP, + it->lvds_link12_swap ? REG_LVDS_IN_SWAP : 0); +} + +static inline void it6263_lvds_config(struct it6263 *it) +{ + it6263_lvds_reset(it); + it6263_lvds_set_interface(it); + it6263_lvds_set_afe(it); + it6263_lvds_sys_cfg(it); +} + +static inline void it6263_hdmi_config(struct it6263 *it) +{ + regmap_write(it->hdmi_regmap, HDMI_REG_SW_RST, HDMI_RST_ALL); + regmap_write(it->hdmi_regmap, HDMI_REG_INPUT_MODE, IN_RGB); + regmap_write_bits(it->hdmi_regmap, HDMI_REG_GCP, HDMI_COLOR_DEPTH, + HDMI_COLOR_DEPTH_24); +} + +static enum drm_connector_status it6263_detect(struct it6263 *it) +{ + unsigned int val; + + regmap_read(it->hdmi_regmap, HDMI_REG_SYS_STATUS, &val); + if (val & HPDETECT) + return connector_status_connected; + else + return connector_status_disconnected; +} + +static int it6263_read_edid(void *data, u8 *buf, unsigned int block, size_t len) +{ + struct it6263 *it = data; + struct regmap *regmap = it->hdmi_regmap; + unsigned int start = (block % 2) * EDID_LENGTH; + unsigned int segment = block >> 1; + unsigned int count, val; + int ret; + + regmap_write(regmap, HDMI_REG_DDC_MASTER_CTRL, MASTER_SEL_HOST); + regmap_write(regmap, HDMI_REG_DDC_HEADER, DDC_ADDR << 1); + regmap_write(regmap, HDMI_REG_DDC_EDIDSEG, segment); + + while (len) { + /* clear DDC FIFO */ + regmap_write(regmap, HDMI_REG_DDC_CMD, DDC_CMD_FIFO_CLR); + + ret = regmap_read_poll_timeout(regmap, HDMI_REG_DDC_STATUS, + val, val & DDC_DONE, + 2000, 10000); + if (ret) { + dev_err(it->dev, "failed to clear DDC FIFO:%d\n", ret); + return ret; + } + + count = len > HDMI_DDC_FIFO_BYTES ? HDMI_DDC_FIFO_BYTES : len; + + /* fire the read command */ + regmap_write(regmap, HDMI_REG_DDC_REQOFF, start); + regmap_write(regmap, HDMI_REG_DDC_REQCOUNT, count); + regmap_write(regmap, HDMI_REG_DDC_CMD, DDC_CMD_EDID_READ); + + start += count; + len -= count; + + ret = regmap_read_poll_timeout(regmap, HDMI_REG_DDC_STATUS, val, + val & (DDC_DONE | DDC_ERROR), + 20000, 250000); + if (ret && !(val & DDC_ERROR)) { + dev_err(it->dev, "failed to read EDID:%d\n", ret); + return ret; + } + + if (val & DDC_ERROR) { + dev_err(it->dev, "DDC error\n"); + return -EIO; + } + + /* cache to buffer */ + for (; count > 0; count--) { + regmap_read(regmap, HDMI_REG_DDC_READFIFO, &val); + *(buf++) = val; + } + } + + return 0; +} + +static int it6263_bridge_atomic_check(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state) +{ + return drm_atomic_helper_connector_hdmi_check(conn_state->connector, + conn_state->state); +} + +static void +it6263_bridge_atomic_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) +{ + struct it6263 *it = bridge_to_it6263(bridge); + + regmap_write_bits(it->hdmi_regmap, HDMI_REG_GCP, AVMUTE, AVMUTE); + regmap_write(it->hdmi_regmap, HDMI_REG_PKT_GENERAL_CTRL, 0); + regmap_write(it->hdmi_regmap, HDMI_REG_AFE_DRV_CTRL, + AFE_DRV_RST | AFE_DRV_PWD); +} + +static void +it6263_bridge_atomic_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) +{ + struct drm_atomic_state *state = old_bridge_state->base.state; + struct it6263 *it = bridge_to_it6263(bridge); + const struct drm_crtc_state *crtc_state; + struct regmap *regmap = it->hdmi_regmap; + const struct drm_display_mode *mode; + struct drm_connector *connector; + bool is_stable = false; + struct drm_crtc *crtc; + unsigned int val; + bool pclk_high; + int i, ret; + + connector = drm_atomic_get_new_connector_for_encoder(state, + bridge->encoder); + crtc = drm_atomic_get_new_connector_state(state, connector)->crtc; + crtc_state = drm_atomic_get_new_crtc_state(state, crtc); + mode = &crtc_state->adjusted_mode; + + regmap_write(regmap, HDMI_REG_HDMI_MODE, TX_HDMI_MODE); + + drm_atomic_helper_connector_hdmi_update_infoframes(connector, state); + + /* HDMI AFE setup */ + pclk_high = mode->clock > HIGH_PIXEL_CLOCK_KHZ; + regmap_write(regmap, HDMI_REG_AFE_DRV_CTRL, AFE_DRV_RST); + if (pclk_high) + regmap_write(regmap, HDMI_REG_AFE_XP_CTRL, + AFE_XP_GAINBIT | AFE_XP_RESETB); + else + regmap_write(regmap, HDMI_REG_AFE_XP_CTRL, + AFE_XP_ER0 | AFE_XP_RESETB); + regmap_write(regmap, HDMI_REG_AFE_ISW_CTRL, 0x10); + if (pclk_high) + regmap_write(regmap, HDMI_REG_AFE_IP_CTRL, + AFE_IP_GAINBIT | AFE_IP_RESETB); + else + regmap_write(regmap, HDMI_REG_AFE_IP_CTRL, + AFE_IP_ER0 | AFE_IP_RESETB); + + /* HDMI software video reset */ + regmap_write_bits(regmap, HDMI_REG_SW_RST, SOFTV_RST, SOFTV_RST); + fsleep(1000); + regmap_write_bits(regmap, HDMI_REG_SW_RST, SOFTV_RST, 0); + + /* reconfigure LVDS and retry several times in case video is instable */ + for (i = 0; i < 3; i++) { + ret = regmap_read_poll_timeout(regmap, HDMI_REG_SYS_STATUS, val, + val & TXVIDSTABLE, + 20000, 500000); + if (!ret) { + is_stable = true; + break; + } + + it6263_lvds_config(it); + } + + if (!is_stable) + dev_warn(it->dev, "failed to wait for video stable\n"); + + /* HDMI AFE reset release and power up */ + regmap_write(regmap, HDMI_REG_AFE_DRV_CTRL, 0); + + regmap_write_bits(regmap, HDMI_REG_GCP, AVMUTE, 0); + + regmap_write(regmap, HDMI_REG_PKT_GENERAL_CTRL, ENABLE_PKT | REPEAT_PKT); +} + +static enum drm_mode_status +it6263_bridge_mode_valid(struct drm_bridge *bridge, + const struct drm_display_info *info, + const struct drm_display_mode *mode) +{ + unsigned long long rate; + + rate = drm_hdmi_compute_mode_clock(mode, 8, HDMI_COLORSPACE_RGB); + if (rate == 0) + return MODE_NOCLOCK; + + return bridge->funcs->hdmi_tmds_char_rate_valid(bridge, mode, rate); +} + +static int it6263_bridge_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) +{ + struct it6263 *it = bridge_to_it6263(bridge); + struct drm_connector *connector; + int ret; + + ret = drm_bridge_attach(bridge->encoder, it->next_bridge, bridge, + flags | DRM_BRIDGE_ATTACH_NO_CONNECTOR); + if (ret < 0) + return ret; + + if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) + return 0; + + connector = drm_bridge_connector_init(bridge->dev, bridge->encoder); + if (IS_ERR(connector)) { + ret = PTR_ERR(connector); + dev_err(it->dev, "failed to initialize bridge connector: %d\n", + ret); + return ret; + } + + drm_connector_attach_encoder(connector, bridge->encoder); + + return 0; +} + +static enum drm_connector_status it6263_bridge_detect(struct drm_bridge *bridge) +{ + struct it6263 *it = bridge_to_it6263(bridge); + + return it6263_detect(it); +} + +static const struct drm_edid * +it6263_bridge_edid_read(struct drm_bridge *bridge, + struct drm_connector *connector) +{ + struct it6263 *it = bridge_to_it6263(bridge); + + return drm_edid_read_custom(connector, it6263_read_edid, it); +} + +static u32 * +it6263_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state, + u32 output_fmt, + unsigned int *num_input_fmts) +{ + struct it6263 *it = bridge_to_it6263(bridge); + u32 *input_fmts; + + *num_input_fmts = 0; + + if (it->lvds_data_mapping != MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA) + return NULL; + + input_fmts = kmalloc(sizeof(*input_fmts), GFP_KERNEL); + if (!input_fmts) + return NULL; + + input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA; + *num_input_fmts = 1; + + return input_fmts; +} + +static enum drm_mode_status +it6263_hdmi_tmds_char_rate_valid(const struct drm_bridge *bridge, + const struct drm_display_mode *mode, + unsigned long long tmds_rate) +{ + if (mode->clock > MAX_PIXEL_CLOCK_KHZ) + return MODE_CLOCK_HIGH; + + if (tmds_rate > MAX_HDMI_TMDS_CHAR_RATE_HZ) + return MODE_CLOCK_HIGH; + + return MODE_OK; +} + +static int it6263_hdmi_clear_infoframe(struct drm_bridge *bridge, + enum hdmi_infoframe_type type) +{ + struct it6263 *it = bridge_to_it6263(bridge); + + if (type == HDMI_INFOFRAME_TYPE_AVI) + regmap_write(it->hdmi_regmap, HDMI_REG_AVI_INFOFRM_CTRL, 0); + else + dev_dbg(it->dev, "unsupported HDMI infoframe 0x%x\n", type); + + return 0; +} + +static int it6263_hdmi_write_infoframe(struct drm_bridge *bridge, + enum hdmi_infoframe_type type, + const u8 *buffer, size_t len) +{ + struct it6263 *it = bridge_to_it6263(bridge); + struct regmap *regmap = it->hdmi_regmap; + + if (type != HDMI_INFOFRAME_TYPE_AVI) { + dev_dbg(it->dev, "unsupported HDMI infoframe 0x%x\n", type); + return 0; + } + + /* write the first AVI infoframe data byte chunk(DB1-DB5) */ + regmap_bulk_write(regmap, HDMI_REG_AVI_DB1, + &buffer[HDMI_INFOFRAME_HEADER_SIZE], + HDMI_AVI_DB_CHUNK1_SIZE); + + /* write the second AVI infoframe data byte chunk(DB6-DB13) */ + regmap_bulk_write(regmap, HDMI_REG_AVI_DB6, + &buffer[HDMI_INFOFRAME_HEADER_SIZE + + HDMI_AVI_DB_CHUNK1_SIZE], + HDMI_AVI_DB_CHUNK2_SIZE); + + /* write checksum */ + regmap_write(regmap, HDMI_REG_AVI_CSUM, buffer[3]); + + regmap_write(regmap, HDMI_REG_AVI_INFOFRM_CTRL, ENABLE_PKT | REPEAT_PKT); + + return 0; +} + +static const struct drm_bridge_funcs it6263_bridge_funcs = { + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_reset = drm_atomic_helper_bridge_reset, + .attach = it6263_bridge_attach, + .mode_valid = it6263_bridge_mode_valid, + .atomic_disable = it6263_bridge_atomic_disable, + .atomic_enable = it6263_bridge_atomic_enable, + .atomic_check = it6263_bridge_atomic_check, + .detect = it6263_bridge_detect, + .edid_read = it6263_bridge_edid_read, + .atomic_get_input_bus_fmts = it6263_bridge_atomic_get_input_bus_fmts, + .hdmi_tmds_char_rate_valid = it6263_hdmi_tmds_char_rate_valid, + .hdmi_clear_infoframe = it6263_hdmi_clear_infoframe, + .hdmi_write_infoframe = it6263_hdmi_write_infoframe, +}; + +static int it6263_probe(struct i2c_client *client) +{ + struct device *dev = &client->dev; + struct gpio_desc *reset_gpio; + struct it6263 *it; + int ret; + + it = devm_kzalloc(dev, sizeof(*it), GFP_KERNEL); + if (!it) + return -ENOMEM; + + it->dev = dev; + it->hdmi_i2c = client; + + it->hdmi_regmap = devm_regmap_init_i2c(client, + &it6263_hdmi_regmap_config); + if (IS_ERR(it->hdmi_regmap)) + return dev_err_probe(dev, PTR_ERR(it->hdmi_regmap), + "failed to init I2C regmap for HDMI\n"); + + reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(reset_gpio)) + return dev_err_probe(dev, PTR_ERR(reset_gpio), + "failed to get reset gpio\n"); + + ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(it6263_supplies), + it6263_supplies); + if (ret) + return dev_err_probe(dev, ret, "failed to get power supplies\n"); + + ret = it6263_parse_dt(it); + if (ret) + return ret; + + it6263_hw_reset(reset_gpio); + + ret = it6263_lvds_set_i2c_addr(it); + if (ret) + return dev_err_probe(dev, ret, "failed to set I2C addr\n"); + + it->lvds_i2c = devm_i2c_new_dummy_device(dev, client->adapter, + LVDS_INPUT_CTRL_I2C_ADDR); + if (IS_ERR(it->lvds_i2c)) + dev_err_probe(it->dev, PTR_ERR(it->lvds_i2c), + "failed to allocate I2C device for LVDS\n"); + + it->lvds_regmap = devm_regmap_init_i2c(it->lvds_i2c, + &it6263_lvds_regmap_config); + if (IS_ERR(it->lvds_regmap)) + return dev_err_probe(dev, PTR_ERR(it->lvds_regmap), + "failed to init I2C regmap for LVDS\n"); + + it6263_lvds_config(it); + it6263_hdmi_config(it); + + i2c_set_clientdata(client, it); + + it->bridge.funcs = &it6263_bridge_funcs; + it->bridge.of_node = dev->of_node; + /* IT6263 chip doesn't support HPD interrupt. */ + it->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID | + DRM_BRIDGE_OP_HDMI; + it->bridge.type = DRM_MODE_CONNECTOR_HDMIA; + it->bridge.vendor = "ITE"; + it->bridge.product = "IT6263"; + + return devm_drm_bridge_add(dev, &it->bridge); +} + +static const struct of_device_id it6263_of_match[] = { + { .compatible = "ite,it6263", }, + { } +}; +MODULE_DEVICE_TABLE(of, it6263_of_match); + +static const struct i2c_device_id it6263_i2c_ids[] = { + { "it6263", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, it6263_i2c_ids); + +static struct i2c_driver it6263_driver = { + .probe = it6263_probe, + .driver = { + .name = "it6263", + .of_match_table = it6263_of_match, + }, + .id_table = it6263_i2c_ids, +}; +module_i2c_driver(it6263_driver); + +MODULE_DESCRIPTION("ITE Tech. Inc. IT6263 LVDS/HDMI bridge"); +MODULE_AUTHOR("Liu Ying "); +MODULE_LICENSE("GPL"); From patchwork Mon Nov 4 03:28:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840990 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2071.outbound.protection.outlook.com [40.107.104.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DE3A18A92E; Mon, 4 Nov 2024 03:30:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691027; cv=fail; b=INpSPLh7vEtAF2E2jg/dhaYCUFki/akFuh9g42YB+c1UESIDhKP6TISLrQwgeD/TjakWNuR3epAUeD+Vxlzrb2sBUxdB1h4ul8UmBEEwtYSADh2cfJzCBgte1L0H3E9RCv7E+KiuR61yjVZaHie3D7jmYN0jv5P4bZjBCQKtDKg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691027; c=relaxed/simple; bh=+tmlczOUj35HVjc3LFoh8Ne5jh0nurbL3rTNG9Hw7v0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=KExSjxjTKFH4zc9RIsvRjr2MSmFZvokBfy0JcI4tEMyQhToMN4klqbgk8EAZa/TPbncvcMQZOIueRFSBOtz/zef0ANgwjBCrCcCGDyfOPC57XIEKQbYMiU0NcRuNGBMKjAggQN84eEJ5V7OzQZoTmpXbRTvAXT5JN25S7OBMX3o= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=lL4uD74V; arc=fail smtp.client-ip=40.107.104.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="lL4uD74V" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LWmo/60Ug9Ks9rfDMxuHoEpHUYC0q10ZZqngUAphdH++8XHQAss43iDP1cY4Zwp877bZ20Uk5ztv8sjp0pm+vgUa318V+vuw/W5fskl4i3ctOthyxPTEPl+Y/b/QZk1PtNzioMn79S/J8J+0cMCzFUfjs2Me/1U5WyjwoT1mDrBBSbh25xm0cwJyKvIayK/9QHzpiU+ukRq27HXZQ5OLJRGIV9JHGn1YI6HEgsHtkL9nEtCVRK4ZAE4EzSiobl5Mxaexof6YWLivEdR/0Oe3u1siTlu+qWj+pukgqXmQdxIXvfLtfPD73I3iY+UaHMybABRbmADitUHgKFvC40uoAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cbJ9XbZuqLr25AYGYkFfYATwPGAgJkNgwwjJ/htPoUk=; b=S5pCXCe2OHZ0cwkDDWsfdjumfPi7n1I05fDBpfQctluivAXQJTpPTZlTTcKb5uXxy/Qp05kfKvwidhNqIz7iuZauedKUg+kFpp1sguQTCgo1DLe61QFe8+JYnJHn8u2N+lGtVpoV5Z89bzX+eMn/v8/HTkqlZ9selwTI6XvUX6ciDjMCgAe9AQ3Vz8jq15IaEVhf8zTSpNPy/Oa/46w2Fe3l8AL9+cIKWSSA1Y/l7UtiPcjihSsLCUCJ/eN29yO+H5FOj9eJU53OygTTWuewicmtP60R2tWo41RjHoXHsNlsRlMZclPSxP2y5S+mME2puBNB24l/gApbVrEzeFmGuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cbJ9XbZuqLr25AYGYkFfYATwPGAgJkNgwwjJ/htPoUk=; b=lL4uD74V/iUowqHIXJ1cllQujqcVAkz2gyN3BMTYFycKnvSKXIOB0CFIdjf74SRjKFBE+jTTkFURQBUTxrkh2QGtk45tFSrWYoHf8qS6r8h9b6rUrnZ/cXo5ujJcftwiCR4J5HnRedSGPXsc1yH5cCtkZOVshoHi3akx63TQEvO9MAdwh2aBfHBGBAMD5YGmcKGZ03e1POOX7X5YC30ve+BuRno+ZoaNLoRiIuXA0WpWsjFsNxdzKkIdLHRadtDGMSeYz4tHbvTlVKLvYl+jMc5Ubt4y3py2MdrqAFXKRGtaqLfDpjnBZP9R13CWLuweAnepT0SvydZvqBSXXwXGHQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:30:21 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:30:21 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 11/13] arm64: dts: imx8mp-evk: Add NXP LVDS to HDMI adapter cards Date: Mon, 4 Nov 2024 11:28:04 +0800 Message-Id: <20241104032806.611890-12-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 674ba1fc-1672-4763-062a-08dcfc81031d X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: c534rbdz4BFudq0f0TuprZwFbyctonM3o/IbJ//L67TKAE8QM+OWaVnRhr0IffOZsRfR3puDl/OG8eBQH5gm4LUmDdLOgOd6XiZNDU4dskQGQIndhsiAqt4yJXC5F19Ikg3fxgo/fnk78GFu6cUY02sHy6uRTxiUS03nMx3wSS2/M/9IVBVPaXg1VWgqqlt7+dORk1Y+7oz15QwHw+/VeeTgouM6ht+Y1XqygUuJORn9Aq4/n7bCe2gili0+rTjfrkYEzWvHNhtBaVCknEAyzxZZJaydFYeCbitFBbr81PI36MsLegKfCodmwJi4T5DbpsA86WsgS6NxPvkl39dbmIDa+EncalXyt7bxBsWAn6pp7yYNKUhKZCG+w34uWPU8wY+t03haWzBL79s3OlW+ZjrTFx1cfNP0PLlSqV4X/HHr+W7ymXD5EcfpX8APaTmFyZItzJpruyQUFw3ZTbI8qBQ36uWqjaXmjKBIxxxqrI/9JrOlePD+TYcfwtO4FpRZRYYiS5FM0k6MEw+dlXl5ZoMsm8NpW3Y5+UQe36eBlGQ2htsG9GNwGqFLchSd93tMpc3MG5TbpL8hTP3JauacXtm0hQn3KejPS162RDasUSRrvJTdlKBZ9GScgeCPuLeiCv8z7/Nahp0jiqdQetH8wzcGk/jIFRQo0AYKzg9SpPAeRKxLiO/WLsQr9QINFwSJ+IP7UXDyDdMq4YSsSSjdlYftv7GWmglH+8/dBD6GG+pvE4iZxQqexXQtXU2I0e51GfWTWZkUIjIUOyF3aPOWuqjX9+8tAj036Wj3dJCBgVjuXv863+OWOlgJxCIvQse1pGGT+BMAI2E+Hg1hYZ9fPWZ9OYoE6mxvtme9ELw+hlBnOyH/oa6EgWIjheW1wgBkkBzkba/yXSNCzdLavZQErBye+rVtUdRUfcPZNt+PoJdLDFwvBZO6TbtdSye6jLvjNZs4NbaKMxfotxM9pRGtrDdje4XCHOJrhiBpdk2DvI3UdQ9elLDnu9VgwX45QBIeXVNZUiF4zJGBNwKY2/xvorC6K+AtwN3YDeI5kxw8Kcnj66AFomNJZaGvhSBlTz3Q0XrbZCgcuFl54V9IVd8hZbwk4wE/6A/2b/6wGMVxOTzorkZ1MWk/H81YhyQDzd6WmvD+SDvYGdTYBqMNUpJYa0AQlrak2Bgl0KhcU8xZD2piDYCNCbclvTea40C9IJNYHU2lewl8mraSxNsBb9x3SGvI9RMvsoVZ85sVzEqwURjdXtsd5eZN53tJ0ViL8+HOqFGgpP7jjHbSKyaODLIPrednGAyjZPYsjM3C+b5qYKBsU2sanbz4hKW2F1sTOPZEwvzmttnbuki2BZdZfk7LTav8qU7ihuHI5P8PBbnwoR4Iw5/KkzjAxIb84oe0H+hX X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NkAaMsn+e00OTEl8saykWx36CFpFK1Idj3xXogFfSCLq0qzA3azvkcsRoyxPLFqxIpYM/A2ZDUFm1yTsHFLFAJJGEM56cSmPkrmv0pq/YJEodgwuj5zC+pH28/F3+0BhDaBjVn7o49e74tTe7Df3dxCG14EAt3eJeENsZUwsQ71WsGvqAshtViuDG8rUVLyiZmLuscXd/64NjQwGqVsrH30++2EqGhqiUeH3J5pk/45p1RXcNQYu4lvSkYeo7H+g5iPG3K5VsjQ73VAr/HxFO2aYybwQ7785RL9CIKBhy36X0l3WzJRbJcv6yaFJJePSOBe5LLzwMhrZQts2kaa9iP0HLHZzxtk/TzutdnNPny1RTApAGPouP4eEIW3W81ngB1g2nXqQxcfm098msDbiDspGEegrHpvgH1hZRvIjNVtuZ1aXRs9PnzL2Zw2UtKaU9/1nZ4JaZtyJtdWx0oBGT9jx/Q8H65jze9p9I7uVROcM7bIYKCCZcfUxhAuNqKO/s3qQHctJ7/hyF5HEP/YvNyoweaiigpIrlu0W0YITZTOxxTSQ42X9KRRHK6V2piOzWmwakxR6Lv4Zrv5gf9DIqWAId9VGQvpc0gcV8roPrZtqdsrOgV+vtA6+PowPszg0JoWpJNDJ+wVI0YX3v8XQeY5uRtnbwCCDomfTH23dzYDFzg0Wwbf4FYL6Gdr7hXksG9Ad3Ged5Jb4uuLRFmP2J6tRTGQELIXaqjNITKXdgSL0b9uqHqICZfDcOt83Txu81gBmYZBYDt29X3C1jIu7Qkld0ioWjcNSwqoPB9T7GkMCxiCK89ZVBBwQPOe1sIBhxnWTfOPUuYImj3CpNGJCFwoHh8M2PmkRRx9/mq0IzX/RO1l9IbBaRi4H+6NNfJ8jPf7QOKsS1OqKw1zhVAyUVGdo/zUj9TGMQT5IFS3FGYMz4gDsv+bccqU1O410SZKeKQgdKY1wWVe9PWteynskBRsj1TJaLxy8Em5oCh8zkr2oljt6K9M+UTiBhdVGXxG94dzdMpwlXafI8gytqqNHK4p9er8GWAijX1OrnQkHuppQu1oCm33eQBdQDT6LYOnX/kcre70dpdtkevkPct80jXXh3t0MBwOMpkbw5XCyoKUdDqhpyPyZaEo6tW1XSR1L3SKSnW0iUwPWuTVh6FfC4aGPr9WKNOfQWOgaeopPA8Vn4UzsHZSZaHd1wwKcNoEA+iNitc2YXZkZK3eiVew75edv9TpEhZ3UfqJIEMyAXuM+pCJ0XoqkAAdxoupSOuUMp1caUfGWUKA/GDfTVmbFIj6pxJ889Ylcds8R5Nw1xB/mtiFKT/sMIRY+4fSRXSYfruij+hVJ2Asldirctccv4eaZ6qBcWj8ooiCmbUKhuWni0lu3rrj4Pv9xdVRIscyXiiIZ1cg7I3uYxXC4RJDyGV1dwaag0TGFZOncGAMVdpg7jcRc7nOiUWRkETdOvPmmmw0ASPjpCToTrstHrhHUjIb/5LOHwah2vKDmneE6Pyjo0fGlNlU5yJpzrD8LU1MJe58XQ8IEfmNAWEpd/GBhAYGnHsNgtPVks9IYiu4r8KvMLvrc9bhgDjEnmFMAdKYn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 674ba1fc-1672-4763-062a-08dcfc81031d X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:30:21.5166 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TYsUnyeS1kHfIl5iisU7B2tnTe4VYryd6E8O4Ex9zQJoc/tBldDSKFB/atD8dGrJtLx7+58aL3Oq/ltf8jf8Aw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 One ITE IT6263 LVDS to HDMI converter is populated on NXP IMX-LVDS-HDMI and IMX-DLVDS-HDMI adapter cards. Card IMX-LVDS-HDMI supports single LVDS link(IT6263 link1). Card IMX-DLVDS-HDMI supports dual LVDS links(IT6263 link1 and link2). Only one card can be enabled with one i.MX8MP EVK. Add dedicated overlays to support the below four connections: 1) imx8mp-evk-lvds0-imx-lvds-hdmi.dtso: i.MX8MP EVK LVDS0 connector <=> LVDS adapter card J6(IT6263 link1) 2) imx8mp-evk-lvds1-imx-lvds-hdmi.dtso: i.MX8MP EVK LVDS1 connector <=> LVDS adapter card J6(IT6263 link1) 3) imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso: i.MX8MP EVK LVDS0 connector <=> DLVDS adapter card channel0(IT6263 link1) i.MX8MP EVK LVDS1 connector <=> DLVDS adapter card channel1(IT6263 link2) 4) imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso: i.MX8MP EVK LVDS1 connector <=> DLVDS adapter card channel0(IT6263 link1) i.MX8MP EVK LVDS0 connector <=> DLVDS adapter card channel1(IT6263 link2) Part links: https://www.nxp.com/part/IMX-LVDS-HDMI https://www.nxp.com/part/IMX-DLVDS-HDMI Signed-off-by: Liu Ying --- v5: * No change. v4: * Rebase this patch upon next-20241025 to resolve conflicts when apply. v3: * Use data-mapping DT property instead of ite,lvds-link-num-data-lanes. (Dmitry, Biju) v2: * Add ite,lvds-link-num-data-lanes properties. arch/arm64/boot/dts/freescale/Makefile | 8 ++++ .../imx8mp-evk-imx-lvds-hdmi-common.dtsi | 29 ++++++++++++ ...8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso | 44 +++++++++++++++++++ ...imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi | 43 ++++++++++++++++++ .../imx8mp-evk-lvds0-imx-lvds-hdmi.dtso | 28 ++++++++++++ ...8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso | 44 +++++++++++++++++++ ...imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi | 43 ++++++++++++++++++ .../imx8mp-evk-lvds1-imx-lvds-hdmi.dtso | 28 ++++++++++++ arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 6 +++ 9 files changed, 273 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-imx-lvds-hdmi-common.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi.dtso create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi.dtso diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile index 2a69b7ec6d6d..63b7259b1042 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -209,8 +209,16 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-ivy.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-mallow.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-yavia.dtb +imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0-dtbs += imx8mp-evk.dtb imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtbo +imx8mp-evk-lvds0-imx-lvds-hdmi-dtbs += imx8mp-evk.dtb imx8mp-evk-lvds0-imx-lvds-hdmi.dtbo +imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0-dtbs += imx8mp-evk.dtb imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtbo +imx8mp-evk-lvds1-imx-lvds-hdmi-dtbs += imx8mp-evk.dtb imx8mp-evk-lvds1-imx-lvds-hdmi.dtbo imx8mp-evk-mx8-dlvds-lcd1-dtbs += imx8mp-evk.dtb imx8mp-evk-mx8-dlvds-lcd1.dtbo imx8mp-evk-pcie-ep-dtbs += imx8mp-evk.dtb imx8mp-evk-pcie-ep.dtbo +dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtb +dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-lvds0-imx-lvds-hdmi.dtb +dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtb +dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-lvds1-imx-lvds-hdmi.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-mx8-dlvds-lcd1.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-pcie-ep.dtb diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-imx-lvds-hdmi-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-evk-imx-lvds-hdmi-common.dtsi new file mode 100644 index 000000000000..44b30e9b3fde --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-imx-lvds-hdmi-common.dtsi @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +/dts-v1/; +/plugin/; + +&{/} { + lvds-hdmi-connector { + compatible = "hdmi-connector"; + label = "J2"; + type = "a"; + + port { + lvds2hdmi_connector_in: endpoint { + remote-endpoint = <&it6263_out>; + }; + }; + }; +}; + +&lcdif2 { + status = "okay"; +}; + +&lvds_bridge { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso new file mode 100644 index 000000000000..4008d2fd36d6 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include "imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi" + +&it6263 { + ports { + port@0 { + reg = <0>; + dual-lvds-odd-pixels; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + + port@1 { + reg = <1>; + dual-lvds-even-pixels; + + it6263_lvds_link2: endpoint { + remote-endpoint = <&ldb_lvds_ch1>; + }; + }; + }; +}; + +&lvds_bridge { + ports { + port@1 { + ldb_lvds_ch0: endpoint { + remote-endpoint = <&it6263_lvds_link1>; + }; + }; + + port@2 { + ldb_lvds_ch1: endpoint { + remote-endpoint = <&it6263_lvds_link2>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi new file mode 100644 index 000000000000..6eae7477abf8 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include +#include "imx8mp-evk-imx-lvds-hdmi-common.dtsi" + +&i2c2 { + #address-cells = <1>; + #size-cells = <0>; + + it6263: hdmi@4c { + compatible = "ite,it6263"; + reg = <0x4c>; + data-mapping = "jeida-24"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lvds_en>; + reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + ivdd-supply = <®_buck5>; + ovdd-supply = <®_vext_3v3>; + txavcc18-supply = <®_buck5>; + txavcc33-supply = <®_vext_3v3>; + pvcc1-supply = <®_buck5>; + pvcc2-supply = <®_buck5>; + avcc-supply = <®_vext_3v3>; + anvdd-supply = <®_buck5>; + apvdd-supply = <®_buck5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@2 { + reg = <2>; + + it6263_out: endpoint { + remote-endpoint = <&lvds2hdmi_connector_in>; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi.dtso b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi.dtso new file mode 100644 index 000000000000..9e11f261ad13 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi.dtso @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include "imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi" + +&it6263 { + ports { + port@0 { + reg = <0>; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + }; +}; + +&lvds_bridge { + ports { + port@1 { + ldb_lvds_ch0: endpoint { + remote-endpoint = <&it6263_lvds_link1>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso new file mode 100644 index 000000000000..af2e73e36a1b --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include "imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi" + +&it6263 { + ports { + port@0 { + reg = <0>; + dual-lvds-even-pixels; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch1>; + }; + }; + + port@1 { + reg = <1>; + dual-lvds-odd-pixels; + + it6263_lvds_link2: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + }; +}; + +&lvds_bridge { + ports { + port@1 { + ldb_lvds_ch0: endpoint { + remote-endpoint = <&it6263_lvds_link2>; + }; + }; + + port@2 { + ldb_lvds_ch1: endpoint { + remote-endpoint = <&it6263_lvds_link1>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi new file mode 100644 index 000000000000..8cc9d361c2a4 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include +#include "imx8mp-evk-imx-lvds-hdmi-common.dtsi" + +&i2c3 { + #address-cells = <1>; + #size-cells = <0>; + + it6263: hdmi@4c { + compatible = "ite,it6263"; + reg = <0x4c>; + data-mapping = "jeida-24"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lvds_en>; + reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + ivdd-supply = <®_buck5>; + ovdd-supply = <®_vext_3v3>; + txavcc18-supply = <®_buck5>; + txavcc33-supply = <®_vext_3v3>; + pvcc1-supply = <®_buck5>; + pvcc2-supply = <®_buck5>; + avcc-supply = <®_vext_3v3>; + anvdd-supply = <®_buck5>; + apvdd-supply = <®_buck5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@2 { + reg = <2>; + + it6263_out: endpoint { + remote-endpoint = <&lvds2hdmi_connector_in>; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi.dtso b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi.dtso new file mode 100644 index 000000000000..527a893a71b2 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi.dtso @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include "imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi" + +&it6263 { + ports { + port@0 { + reg = <0>; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch1>; + }; + }; + }; +}; + +&lvds_bridge { + ports { + port@2 { + ldb_lvds_ch1: endpoint { + remote-endpoint = <&it6263_lvds_link1>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index d26930f1a9e9..68e12a752edd 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -938,6 +938,12 @@ MX8MP_IOMUXC_SPDIF_TX__I2C5_SCL 0x400001c2 >; }; + pinctrl_lvds_en: lvdsengrp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10 0x1c0 + >; + }; + pinctrl_pcie0: pcie0grp { fsl,pins = < MX8MP_IOMUXC_I2C4_SCL__PCIE_CLKREQ_B 0x60 /* open drain, pull up */ From patchwork Mon Nov 4 03:28:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840674 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2050.outbound.protection.outlook.com [40.107.104.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 390D719340B; Mon, 4 Nov 2024 03:30:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691037; cv=fail; b=YdfdCjUYcIBLeGuT63kWb3qsHc+7888iDYZoovMkIEDTUjTy4rgo9PrrteOSCaAaoTHMsPMbui7TH08pDgCDFW32f0tgNleaBwaNSC05zW3EON36wiYY6Ix5SXDyIdyjt9iLNIPXhvYpFCeeBP0uXd9mArDFFBebDrd7GViFTc4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691037; c=relaxed/simple; bh=DleJmShQiX3rT47sLTHgFTlEdUKY/1TDZvCKKZLKiP4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=eLKbuuBvrJ3iu4sk8hPNaAOj618jqNcwRkc+VB3XuCuFGlkFiPAcobZ0ELGPkNuU5sI/MAIFqPqudLe47PP4Z0JEc21xxQ5hj9VaS02E2wM1T21SK9uuL4QR0Eh1f6aBAY3KrUsnViz8D2mF/1SIoooXPMu8ub6Np609TkDpQkk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=CsILl/mF; arc=fail smtp.client-ip=40.107.104.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="CsILl/mF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wtA4IKEDK70cT+yB1T8NDVjZpqpHkCQkk3Ja9H98/1yUrWd9f3FAsVxNsRzry2G1TVQuP3o83dOQAls6R6Nl/bv2wWBTg/ffucEK967xYKHz+aQjN5ZmGOelDjhZaiaXKTTsKAVoklRdUoCKk0ibANjhja3u2WENnkhUfQDFX07kQ3ZVhcHQ068xSoePozaQWNhwzuwsgtoQ11IzlR240xYJl6l4Eu/QtNnODiCELnbGudHM03jbJN6kWbsP+sP2jOSIUijIkyGavzL4lpX67UOa8h+38eHlOPYEp95fx0nTm63Xh5YOtL9foRgwFjBTQnJy0ef0sKIFI4Ty09kY7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QIc+lX3OIioeIXuIEmaHftGv72E9ULzY1LMqyYKFO5o=; b=av9yQPaxZ1+761QczGQTTGHdyRxXjfXOk/v4vDHbS5ixqQ+9zOI2r63ZZcRZjeSf49Lv968SegWxeYiHCx+Rqif+vrbWyyFW66gNWF8VC09PyXdBOPvycFw/USyd5mYXxqw7NlW1jXM0pAd6NW4Xp+9ZUWk/7nsFpyZnOAYiCum9wJ5J57RR0yiumcCJLJouYkTt5B5aWHvsmNCl0qglbb0fOS3CcpfxjEldzI/NMAt4w6KEly6McKsJ1EOPeNDYMEdB8c08IWtlwf/d0tmDDO089EMQ2V1sM1ImX/Z0IvtWDsOhCLcvdP+TCVblYn3IYZI6/TRUyceEoKXPxRDO7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QIc+lX3OIioeIXuIEmaHftGv72E9ULzY1LMqyYKFO5o=; b=CsILl/mFaWYFw1wpP45Orcaxqck367i7cBeX2BgsPzEdFyfdWLZkC6qBxkQqRX3MNOLbnCSGOQsqIu1iDCTbroTPJ6vVl5vLJng1Vk6FQKCJuNSfxaOmmKpY7GqyZWVx5p3Bw+HxXwAdi0EWQlo0nAsApXjJUMXVWwp8ttl1BARspyDK3WaOxPfaILZvAtdZlXAJpaVLltl72HySmGFjAVGWg9RHXUbQoYQm1s8tfKlRh0xp9h3T1/sFEe6yqvfjFqLKDv3ANasMF3eC4deG5YWJwT1BthozW0LZQPBjy41We8Fp7ExNzvl4FNk5NqIblvZecxYUjfSjTUqicNiL3A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:30:32 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:30:32 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 12/13] arm64: defconfig: Enable ITE IT6263 driver Date: Mon, 4 Nov 2024 11:28:05 +0800 Message-Id: <20241104032806.611890-13-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 74ebfa18-1a92-4d5f-e732-08dcfc8109be X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: plQPRsFlGxj+ZSNZmBmoJfrrhgC8sVL/LfZm8ZP7lc2uJgNiZ4AzUTBeQTcNCos36U4VpbosPYVTuoEouQkQeIWwoZcWXxR+WWWNC7CR0Be5lS3wm2y9ZPwlXysmtZPiN7cFT7XcSNfnB9yh8F5pXCM6gSvoL3Xfg1SKgbqShSnBqfWvNFTMy5tulP1+DTq6Nu8hnp5VbTVxG1mhvVjuTJ2dsw1YTZKwEUY1ISDKynB0hBApprAtHx59xfJ9oOd0W9m64ZYX3Ke5btak1Z0oPRvc/+rXsB7EZ6nJkFrUsNT+cZYvQTmupF+vjCIoazbi0yX29gP0Sa7dPCHNYdvltFHJaxlwx/pprvwLGOY4pxxVZ23vJX0iUKqOTzoaPrtpmlhaakddn8vJn4wfys9e6+AFYjqe4gdjvxmZCzVgroUksN1hPZdxNNLn2HPyIzowIemwYpvHWfKCgkplDKk4xh5+sBzbB1uqXcOnALkUgHfJwhdR5oBZ8Atots5Q1sw0WoEuTcxXUxy7A/C3V5gOReS5DgNVvD5MW3blpfm3sxsQ29AfjI1rwca9RT1PpJUVceUKXHpUDIlPYeaNREDYlF/lEVM1gipaUXH6IvLSnaSjhfWKM+CbKmspb3a49BNfOUGxe5N1RhTueDFu7PE0RJjRBhChA9vF40mGP7Bpk3fPG8sFsiTxE4GaBv09UAu7zt1bC5QtvgeH6DdcH4Was6u48z3zY479Fk/RR9NANKVz8bYUhYsVcBGzLqm1und3um1+ti0ptAlL+DNIPHj/dqSiqrSn/WpFx7XWZN4B7F0j75/SsajjYXPkIkKIkYIWTu5Iq1sw6PGuxbJpUD+xK3YnSDzis5f9Q8xX7vaYUoPZzzq5chqbqMZr6D2aAmJKs6ZwTF1IYg4WOnPUn9KpEoME6Qt54uHHGVGkPTceWgY34H6oSIHgHOVkjH3DXEEmefc67Q8zKS1yAaXsIu99iOQzpgd6aMa+86jl4Gg/X+5e7MBpHbJwoLzYQqAAHTtqf6ref3epG5rmyLCy6BfaRiOuJZXSVnlWzMmVSYBQ5EXiptuviFE8gDUCz4P3unM4jXoyE+B6R8XWHJQwzciGwoZoX6X2YamwahHWdKfnjiaEvPiJbckbleGaWLTsjGI9n8xWmAkbwXfhzzUEimABkc2vrTm2w2PhlLNyh8eh8BRb2FC0X6J4EqCNnndoctS5pLgtFxHXc0xEW3hYEEJN5e7k6jrbTotk/m/VGmD88WwMaLOWHxjoF2RSaZEfycdt61P2iNO4hh/7CyT0m6RBDl9nQBNm7kYcjxDXQ+OSj2zftzt3m2M1vTEzinR5deCFbV9kU0nAMFO4Id4pongdr42fcOoHXK6Mi0czcory+F4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tobQimvUdbb6+CUCE5sgvvXuKPOn7kLIG3OJ0SRRetjuILt0UlSMb197khhg4Hq+SUPoLqu+nYvZbphfX6a1bVTwmRQhNvoBuOXNgM9StJdtPdxi/Z/mT6qL+c+KL5IUzzuFeAv1thbklj0Rw+EIpI4kmSSyD58E/DrY/Xh6O1BdXN/KGF/57UhOWzxxnG2/rVFzSL5NswRRAqosEw7JqZ+URllW9MjIiIhAoIPRNUDSMZSGJyzgu4oBaTz7wwXqngpEKZ//t2UoWj6EQZOGrJXRzLgBZtR8IaEu18gNJKrwlV2lBhK6YareEitxSBujtc+mreYKeAVPMnglj64ealrBi4RisbfH5O2I9ho/BCddGnPa/2jXwID1q8eJDAm65d6P4BgTSTuXPfLkUCX0Fqvw/srWiMHbMltcgOsf1doRPzkRm1FL50XeWD5aRt3vvNg94h5qS8eMjLOCgIsGfL5lalbXFMLJ8OXO35gupgT5dFSPldPI+2uAMJesSgSeOFB6K0ERW5oiRRUX/nBZMgvNIpkxv9YURpuynJmGDxnEot5/zozTaYvYgNPOXR4ODO4RcldaP85yQWdzQ8vQrHK2Rwi4Rg7u4SwNRzfFmBXnihqurhWvekT+PJ79vdZf0Mzy0WrIXFm1zy5pUOyqqqtTaVrfYuOQlSli/1jg+De1aTbuVeplJmRsbLHp9VdmK4fcsfHFwBpqivsTLbseNrHm7RbQEij8EPYQQCEq0U30/P88Wfxt+f1IwVI6sRk5w2oa3b93BGA31q90Q07JQDtyzcnhLVPtkk26vY49xP7WD9xS0IdO9McPRRbHIIsZy1gQR9MmIyTt5VecpUarStNKrSWUfLb9C4AKkgroaFqkndSFghcjvwDc6b4vUSHASnhzUVZ2qL4/mwTfXTbHSg94Zyie2yYNlg5GmJiyYPXBOfPsz/NP3IaJSYIAB8zjhlMLmBzdWHjbcuNmTOfXYa9lZqyrXR/nz+rsK11o6uCbDSfHpVzSKC6B06KGLzMXCjiN36oyQN8ZrWIwnPvHE4cuhWE0e12mYRQs8ezxFEV+XaBEAqNh5wArma9ysUQ0fKMsusSA5RSBZserfr4kaaSAYlJKKi/n9kJAsO3RQB8AohkQtg8jgytBOw59Yzovkg3+QhT0qv7OOQjiXBXypgEohrXekCLQ3DwfNp7jCwpx5UZ3MT8hu3bG1ZqagEFFmSsOw3WGIBsIAQLgNhsy3Wub6eyedEUVE8usEYmzlNfj95vkXEN0Fp0R/b2zJyX8UxE+hgXTtLHidRXzw2d9P7Uoykjga/F4KncVRRhou6q68761e+0dGPdAuVKU2jsy8gYi9GV1Hnel/argHSXU7c8J52+wFvbo4+75+0uQ7ABqZxSx+LKLegV4340uCNaD1HSwM0qbJoTx1Y/pFVYpIrc6gG8kBcS8KLiHFEgnVynFR9dSremiYCJNfGqx9imPdheZ6qVlRnd5vUvz0Pa9xevwAX8W9bf7RPhRMQLv80XlX/8GSeNbjtCf7mRIOJ/7eYnYORtXEUdd78ecnNxE9mNhsPwtoIZF94eK4j9R+2L0cGTvKYxawTPzCy+YRIi5 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74ebfa18-1a92-4d5f-e732-08dcfc8109be X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:30:32.7130 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UkQ8tMAWp/AqDhPzuCKWP4Q5W3hKNlsvRrD+pibbrhGxgy4j3EpgHSw7FEw+0APcAryXG/sNRPANTX46Expe6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 ITE IT6263 LVDS to HDMI converter is populated on NXP IMX-LVDS-HDMI and IMX-DLVDS-HDMI adapter cards. The adapter cards can connect to i.MX8MP EVK base board to support video output through HDMI connectors. Build the ITE IT6263 driver as a module. Signed-off-by: Liu Ying --- v5: * No change. v4: * No change. v3: * No change. v2: * No change. arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 0fad83642034..949aa0b392c0 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -900,6 +900,7 @@ CONFIG_DRM_PANEL_SITRONIX_ST7703=m CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m CONFIG_DRM_PANEL_VISIONOX_VTDR6130=m CONFIG_DRM_FSL_LDB=m +CONFIG_DRM_ITE_IT6263=m CONFIG_DRM_LONTIUM_LT8912B=m CONFIG_DRM_LONTIUM_LT9611=m CONFIG_DRM_LONTIUM_LT9611UXC=m From patchwork Mon Nov 4 03:28:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 840989 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2081.outbound.protection.outlook.com [40.107.104.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E4B51632D7; Mon, 4 Nov 2024 03:30:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691047; cv=fail; b=MjB4HuBP096IufyT9DLaJQBNKhLkvf2JLA6al0KOZ9akIIVKrOd3P0voMt8J0hFT47C4vPp2je+3GuqrCx3SLXB3dsy3MJLoBNEICBpknBI+p2/spCEFc8Mk/FgsZGvk/4MaN91eHCS7NrZBR7lbSmnf+5bIc6n0bi8UpxFjPE4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730691047; c=relaxed/simple; bh=Is4ogdSiy1iKTraIRNwA95mKXPSWAloOPSJ2ZGG49NY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=NoaNSFXtLi0MoYWTTyrsLhx1nIOnlZIHucGVtAG89vYYu4lVVAMtJ5s+4df0Q0XEPNtwKu/N/mD8aJf6HeMCYrVXtO4zf3ictR+9mXuULqZFudwpFI3mdahbQxeqQGACBu7cA4LWr4x+eTBm/0LSLva82jJsUWio9D3WuJWX8dI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Yu5wrLuJ; arc=fail smtp.client-ip=40.107.104.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Yu5wrLuJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=F0/3Of2G+4EInXA2Nt0Uog2BcuTHuAIoGR7c1uP+hSlgJxhW+bsVG9hUZI4Wc8hz7hESkpjGme4m43GETtU7gN3amTMfPhJAyVhKZZ2xYHo65u5mxU2/xkxQocVInmjF+Z1Dtu8kq5VLUpt6nRzoTxgwpxaUlgrOKHxSxjP+drVOnJC7XVDW9jCAPPvhYlQumiVD1BJ5IV9OuICnTYFEr0W8gDpHkGXbcZOpS3LO29ZRDvsuEgGKww/9oZ51ImTfkhj0AEQSZfBbQbfOLyxV4Knz7TnTPxUWQ77X2fPPjPurDCetiS/BlkVQt/R9RoPImumJEubUPmDkpZnr3TS+UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pMf3jixDKljFvNe09UwCShlLP4xcduUdFvy9xIa7FHw=; b=oLQevIZGC5Jk6S85QUcoh8GS7jkeDrEi++yz5joY8y4V/fgux0ApeNRrqdWafuTPga0EM6Pdtf74idYGgX1n/uyxEBHkcUTsqPl/3sKaKiq8mVuQ7pr0o56+h4PyRogZ+2Nxrhzy48OydheW1LsbMb5dWmeEOnEPeBiSIlHsBL7pIdFayCRSkbCaC5mXCJATWYoBH3oHW6S0/0UjT7uu9EliMbx63ujbMdtmUllOas0p/Htb4g4ybN/06BnOhu2ZpvXuQYA/x+jNzmcw0xI6Jw4ROwu4t7Re1n1ccV1BDwI6wHx1Oj/umEfQ6qe4nf1n4pwOiOYGU2uRP+SIZ4Zflg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pMf3jixDKljFvNe09UwCShlLP4xcduUdFvy9xIa7FHw=; b=Yu5wrLuJxROEwYZWhMZLBnkvLpemX83uyivvn0BbNft2Ofit+XcuAofhTkXUQ5TTSY0Wh16ARbl4sRyVKD0xFRzDVxKz3MK5PbcIQSJbocyN0uxJfFBFN0QBkzosF2y00iTJG5J0Du3FXwnQWQQ9SxRrYdRcHCFy2d6lb4eRyZoS05QlT/8QKf8v/j5vgp6hvxgV5MbleLTLAvX0HvEPDm6pBU1TzcpvuR4YngNvZ9IteOZnsXB4ls1dNjrzvSk/NMXWaRDn4PESkZefXVN42A28vzAnDcOhvfx6sYVkpPV43vbhND4NgRlyaDnH/+fqjxT7HMTmTGCgPwp7ihSyaA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:30:43 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:30:43 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 13/13] MAINTAINERS: Add maintainer for ITE IT6263 driver Date: Mon, 4 Nov 2024 11:28:06 +0800 Message-Id: <20241104032806.611890-14-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 59cd2c0f-dd53-4b86-0bfd-08dcfc811033 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: PWCbGwpDiSEFJB1w90yTAGE39vV4zUFOM0cT2cueSDD9/ReJUzvhCMNp/TjkXC8J36K6CpvStUJU+YAv2CPbRA8dbIRyPy8vl0g5bemmkWggsGC8Wi2E6ijMcekTvP2hN9y5iFVd5UX/bIIRijBhYbaQqr1tlVhhob60WpdJYm8ZnthyFv/HksAd8gNxG2BQ4O87BmRiULIEhRUdVFAEzy2Oop/WL89/CuZLNPF4CSSVnqH/e+HwEnjZrM/lG4GiqJMqZwLRe1Ir1Jn2BIk8xcrGXahlompGygiS5CsU2bLXLxz7SYY1ihQQ6aqVd/aLa/fQu/ym5dl/whrgvy4Jr8v39ldMQs+GTNRQt62mEYthbX1OfG6xYwOrq0BzU1llDZ978vGHo8wJJ5tChlTVDAx5NB6dgQeL0du7520EjpAtTsFYYbCMpA+aPrjbRvK6m37Ugv65itP8lcInV1dLGmTssP6A/g6/82AmI8EWtgMbrNVQbmAVBK8f17xRVx1BjTEJa+otmR5B7bum6pmjW6utYxeyhuZi4c/sqoRiv2osRiVjhI5xCsOSHDKfWagic0ZAAU9adDfjzvkn+jjJQYCMx9d0NS3Xn28H6/qF9vQxOSi36tZrHgI6aGVO9iF42lJKrAXCo1k0yoYBVUvhL5BUhN1wn1v0SNABfhtzzHFJ6EzI9JnKXQ7qe+Y1Xbz3KPvOgpoN2c9ALapUwGePR1Yv8/za9wM/Ofp9K27jJWWPFuQy7Go8P5hkWe+3ijePWO25OXpun4Dysdbn7+9c5bmfS2rO5vpnUwfJkFHFY/mjRxUzYedhf/Ko+mT+Fbix/NY14ZihIbgnmczEG6HZiAmZEZHWjEmIGnLqXFAVZdCABoMVLiR7uYMUvY4JHqBLY3ca39aSzJ+0EFcNMzj7re9Ejua91HTFKSfthaTao3CJT1y+kCTKlP8UEgrsDo+9P5v+ejeaxsRpimohxu9IW52YA8v9JFx1nAnRXZM9YITrkjYz83Hla14cwD/TOt6IwTcCfjjoE4dcZeiwi96mokSDxdWjtvr9saKtWaaX0UbgpHQyDSDzZwzLmJ5xgH+ahwWY/Xf2u3rcRw9pra3+x6HxsssLxoIANJZ0FRqfIRynCU5GcxToZThqGlffQ40VN0qaDMcf3oloTXJYM49TD4eUMTyLQpD2pOX7mn2NcM2cQRcUaGyPPJ7gmOSfVj/a8yPDFY1lb3C0abPzQ1ZeUoZCmfAB+6Zk/6M5Nr1BFqsjEk4t52ladcinwBmtqyohflJx9Xzes6sWBr811wnS8/pkCofnm+iESHp69jK++CEQahXvDqudMdSLfDHlvFt8 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jJ4R+Mb7gWyMMTLMZ90yRhevTy7eEf/Wx/lXLbcv5B6hOQyfJYGXASrn6TkFwOhECBq/cF9t9eq4BPItJJ7kuw2iBBDV8XTYFmLoiPpV+iM1VZbxtqQr6t3yAJRzOmS/zrskYQFac9O9iouH1vH/r8NwmKoXY41/yAgzb1Zs1kwuQi35srEZ1xUG4MKVpeO/BB7TJySnldNPP2Tq71xNG/iLLEteLFwEVKOn5hxWKmcl+P1Zc4FSW3qDgTGBFBDxL2mmLlltm/BYmHQr46vdsYC4x1zwZM5f+gsZWKYPcPmJ9Xw1UpNLh1ErniMWGGLGeMHDBUXwM25Vh280KTvyKHlhmbUbAj8jLbcfEVICvE2W+8IjjGv79pwIKCVcALiiN9GuzgB5YVuaa8MT3i1Hnb4dyeW1xsKayFyDeDG2R5dP5NYlXaP/xluEJnYD0iTWCzX9EfRHN0Vj/Ip3Zf0hN1yvby29jdyXfPPaJfUyD6zPK3hltbM8LgEaWAAIckB42F5hfL4AJocbnCgrdcjy5pITIUIcdaCwm0S91VbA4eV7DGYP6xLq/HWy4s2JTYM7jLVpi8ksz//WZ6ZZxC/WFKoNJSzt3DtvaY+nxboAnsAroIN7jCqzeKPnovSBN8AFML/D4W9gtsouMwwKt2VfYRoZMUkUOprI4xY+OtPn1/ng+LmFEjv77LKXfeApejwXvDE4Fj/n+IQUf3mrv9HuhKzQDszzw+rHwXRe1FKxnLZDh4xuErDdueuI3zEnG+kKHz3MV9ypc3nS9V+PEpD/rjefDKsDHcU8TGDKnIoYGqJNmmYfKTLvIoyvAxQuiYlLFyH6m+pz9G0ISD0KaBqu5ucY8ycpEFgNqFkUvFxJmmVIqiuqM7iXNRQPF7GA4kn2CsQCuIgVo+TNPEjXSjJOHzaPocXuLnfjhLovwQAh2ggeDJ0eugwD9g6wWxDbWwsZAM1sZAk3AW0eZmbDViTz3h2yZFHfk/NXV2bbq0abyclRDb4sebGrWb9Gf/02TQRs2NZE8yb/TDb/KnWQ316V7eV+kyw3omq4EG+v0Rt9He51HqZ67T5YyYjtWg08hB6KdFl/25/2p2y3kpbvGQwBAnz7Zyvrj6lp14bIPeRhdWlRdLSZTpCNUSHTD0BeS2bExSWX1FUwDz1zIkgKlxYWELCAFHB7RL1qRuZ6apFw+gk1QYMuA2AndAEwrn2gLZ/utt5Gq5z2piYAGQNYI1p8noM0rm9/jyVf1wOtmoVV+QeTgDnXAzPpW6tmVPOFgZKcqYbRq7fqD71nv7C4CqlBh5MWFweYATKtyEa+ADC72WP29fKM2Kd3osmsbzAG3RH4p/Z9Ooh2kHRMXoACBlifYG3+PFKjk0sknFsIu5Ce8z3AagfDJw6Rfm7JG4qcy5UmCI3S/hsMXG6wNcNo9IR0Xm94J+22mKDIBiaTilB/E+plmZPdHA1pOlOyOcS6kQNRY7cPNoO+y7wbXvzHYmB0x9fwYazX4VjoDgE0bqw1hHIkQ1CPIgFe608ubDZltcHzc4Jn2UfPkzwFFJLfd5A6O35V11+1MbLJ7cgNVflPiZuKymIfGqAzbRIHU/8vxru8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59cd2c0f-dd53-4b86-0bfd-08dcfc811033 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:30:43.5160 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eSH9KIv0FYKS5q5H4lECaKxhMlpSbP4I3AsOnpkiDyqcWPvxRyWNhX2fHVeWyNxW85tRfH/suht/uzNOPLE1rA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 Add myself as the maintainer of ITE IT6263 LVDS TO HDMI BRIDGE DRIVER. Signed-off-by: Liu Ying Acked-by: Dmitry Baryshkov --- v5: * Add Dmitry's A-b tag. v4: * No change. v3: * No change. v2: * New patch. (Maxime) MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5f34d168b041..63200174ee65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12223,6 +12223,14 @@ W: https://linuxtv.org Q: http://patchwork.linuxtv.org/project/linux-media/list/ F: drivers/media/tuners/it913x* +ITE IT6263 LVDS TO HDMI BRIDGE DRIVER +M: Liu Ying +L: dri-devel@lists.freedesktop.org +S: Maintained +T: git https://gitlab.freedesktop.org/drm/misc/kernel.git +F: Documentation/devicetree/bindings/display/bridge/ite,it6263.yaml +F: drivers/gpu/drm/bridge/ite-it6263.c + ITE IT66121 HDMI BRIDGE DRIVER M: Phong LE M: Neil Armstrong