From patchwork Mon Oct 28 02:37:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852893 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2083.outbound.protection.outlook.com [40.107.105.83]) (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 336FC14A088 for ; Mon, 28 Oct 2024 02:37:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083082; cv=fail; b=SsNKr+8VMOC27FBjgLEjSf79gbERAVD2zgjV/YD6/uOJGJhI7i4I5SpjoWzNW9Y2n5fuxABnNGTL1RVQrtEYtQRTkCw9Sa/tOhXTFMhK33djg+RpZWB75AWy56Kf/bzx4CafvaxRE+/N5FokVK1XBwVZQFIuITyGwvjUhRhPuIM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083082; c=relaxed/simple; bh=+tZs6WOmzdvsViyCZSalO9uwNZaweGP/xueYEi2TAx8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=MZj2ofm9BAkPbJTdsCMklFLF1mz22maCWoWpQgXmI7D8vc0Y7U7Jhsjk+zRvvrLN6+nKPZIJ+rR51FekJsjb8e9mZZ85Dxzq4y2ZpLXjIb0HM3bH6CS+zwASZhOA1MO3BfThrRSz3KD/S2ngooWKarOyBQotK82YVT8DopvSv60= 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=Hc+yp6EB; arc=fail smtp.client-ip=40.107.105.83 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="Hc+yp6EB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UuGidjX492DCgy5OhsSvC0UdfdprYbXWe6jSzk9BOHsUC0fe2093gl8/7sbbCBmu4sQukyhjfgxX/GyxyGoaDxXH9ssldm8p9/0EW7pUsA42TcwOXgM27i2Cg06GHsL3X4zhF92hhlVFpy6dboqoSLtIGHY63pBcLPuU0O5ERDGVgNruIzTLathzChRBhB307KE2Er7Bq1PscwfoZZB2yQNEtPzRsfFjAkTdqZQY019p0Wl6/wiRz+7S/gqyGDn9BHam7yOMY8yyFdWDy/GCb9UlwnUvn0FhIsrEyw/j8tluV+CX3SE+jc64hwObXP161D0WL0wm5tOPMwm7fZaTWg== 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=q5MlxF+iOvQYNaGKgfap1AYx0PBdE+afeQkEdLBjw/k=; b=C4v8otplVPWr+xtdXeyb6STBOapqAuToClEjwlVzP9J/Vm0lkme2UJWIpt/0IsmIVe/fWqICKjB7N7+PkIM7iTArxgk9ZRzIWoHo9n4CCFF+v+aU5SdDlqsXg4HrwcjF5fr0Ycl8GhU23dwVmdPA8xcBM4yY/IyMEezS+f4EQhuG2gDeBVE/BBR22nyJLSY5AGnLcLnqQipK5H8/9yN2Qgj7vhz/LMXJtVw52hf3QdPzdjOLXVeHRkuG64scGkUDJA46oiq1VbjNjCzj5zrGqesYcZohyJYbYrLOpyoHSY68F3wnG9LFbDgtKtZEOJRdrcRtOemfsdAi1MjnbJZ3PA== 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=q5MlxF+iOvQYNaGKgfap1AYx0PBdE+afeQkEdLBjw/k=; b=Hc+yp6EB9GqnCUoCz5Ya/BnwSdRH1BmdOFSccBCErbV/YGgrQKTbGgclvGDTaoaJ2BVxLpbRMHt+w6+U8Mld5u4z+cSK1K01Tvc/TZxtS3nVY/L1g8mfl93BFqh6Wy1IQci4D/5PlNqrDo0oH+R7NMovKXQ3zVJsQU9Z8YQ/Ve6+Wt77cx+POJ6UnpSrcoT9G/QcD2d93zeZzv3sh9C8Ykhk/FQdugudKjAwQdVFtjqbR9ibQHIGBzfV3P5iE2lQPsPXRBGGld7KMQh51ZEY3pfw9t6Lg+imySFXMiNfIMCSnaU03TZMDPcSb9HiR+IHwHWtke5xIqoxJ4LFQuAjqQ== 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 28 Oct 2024 02:37: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.8093.021; Mon, 28 Oct 2024 02:37: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 v4 01/13] arm64: dts: imx8mp-skov-revb-mi1010ait-1cp1: Set "media_disp2_pix" clock rate to 70MHz Date: Mon, 28 Oct 2024 10:37:28 +0800 Message-Id: <20241028023740.19732-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: f454bb6a-cee3-45f2-2968-08dcf6f98736 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|52116014|366016|376014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: +YM2LQ2m3j9KuHpFHI2aWBzRFvmf1M4OGTuagDjyJSEp2f12nk84lx8JEsIaLla3AaFZarHWNv2iOC5VcdDrv57nie40/q7OyhdvcFNynubryR/ctQEUJtiN8ftzwwjOB56Udu16Z5HFMGGXtioYT2JSRARPm8clc61pu0N+PPyECT0Z4t8XqcyYYV1ouqAkokEWENtQAFT1IO8LPUxFty/aaDgyHklzNfRHRihWfEiZFgCJx5NpIu8Q1SPzNxRlLjN8xiMTRVKHgXN2crg12bcWHEXS00UwkDomQhmNQQ92fi6sRFAZflwg+3qtFl9GGNBVKfFbBlua61JobBw9s1morH4oHhMj9y9rHb6CBk6JNHj1Ci4ss/Ukzlc+prEQoq5//rPP9FyWyiv8DphFUaknnxwk8J3g674dtGtr/ktAOIazsRVGqWQrN+h49YILHuJnuzOirXkenC14m7ez+ve2GZtHQE31ln/5VRW9ZgvxjRaJEJm536dy1cO7L/sLEeqjuB1C8NFaG1EJUEHhRCdw48MIlbmbgoMJHGDwrSffvev9zJjbDcWqZm9CKC1wVTa9TA1PxazdGFiTLN7Nof2foq6e6IGPmPQYN3EUmeKQlK5QHCBiz4O+TJwctYtYZJnlbmSiSG89hdy3ARb9C+nZfRW4Kpo4reCJ2JNFYSDmvGIwVAP/VjwX0cLjaHxi/Bz4QZxxXW95VWwA+5w62VWdU0H9glqZrIkvAdlduz6tXlv2KcUquSJ5MDQRl4+k707aS6GX6Df8D5XD83pVeMht6iBSUuA2QpcUnHl9M798aUCoiICVRRi1Bo31aB7GmCdSx+ti8nICS8dZy5Sav2+RqWWqN0y8Nj+VlZX8ZytVdiybxHaYYo7cbc4VqWehwdVh1mokGMyc/bpiOzjcE9PCC+bcnV/C19Y9t/ZC+YTJu0Bpw3yDBwmuqv1HIISNHgCdVEmU+E3VDLIpY2icPRpddMvqxlbXk9mqcM9tvB8DtbMsE5laHpLw18rjKXUTznod/8hBdEhwlsGaelt+C2CBWwaHMYbSm/zMPGm5sPTeTqxEkMJwiXn33hzZBonnM1Lq/MFPL8M8Z2k95HugB0q44gGdusLDl8SvJK1eyrNfj0ds8Gt6TXbEVTcKnCCUfnLzHKgavch6y045GTfJK89P+tVrSpX0SXF92Htt6lE0H9xNcmGFGHQXGzPX4hF5quUvtIqSLighvEgOaQBvZXeWW8OqC6R3EyflVYLIDIBDaVw86ViMtu9BusKPpOdkEhKwpsJYTnYIu9U0A3bhnjW5mffSemlMviaryBAqTAJck9hMalAcP/vR2r8QxMpg5r+sLUKj30XLpgmDHSBDf1zHlDYg4ti9Qrh2CZB31N0= 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)(52116014)(366016)(376014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 37NlHQhFS26Vmhye5UtUJnary9SlEll9pTSSfFjQ9VKyNgtz8SbNKKGt1/DCbVhV0t3GL/VQn9ubttoEg0VmRthR/Bd8S0cH8D6lVeVjNTLELLBRrWAYXLPBVtA8csZRjabaJYbRd/WRZ49YFZkP02tmjaXgQ34l3HLHg4myGYJ7MjJwJTxAR7AGKS1njTkHGw92U632Od58YuOxFeqm2Usyb+NzwiD9mOMx1ItT/0Y4zhxK0PYMw6fELrQaTDWCyYByCoWa7kfGWoLiruP5ASC8aCoK2u6+2aPKGB+WeANRZ0CHACIYdiThh/KuEzVMSAINKkbmni7RzP3NVozWpO3YoUlkS97r1SaPtwGYVyMP6RnzGuz2Ohih8llW/x3vKLGaeVmCEIN8++h1fGCQV+FMA2hLNM8KyeyPRWsb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VYzNiCU2Ly7kD3QgMgZR+qX1CuH1lugKjltTkq6jnEnazHiN2vnBgUjvZQs/Hwl+NGfxx6kjBoGJnHqIfbEXkKzuniacebiUIm33LOj4j X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f454bb6a-cee3-45f2-2968-08dcf6f98736 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:37:55.8163 (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: Lf1231Aze39Pz7TGpBd2YUz6oJdt/XoBI5VxDFZWQGONi1+TUM+GsQzZWSGePEZ6i1Pwafe3CAFeRW5NE+Mp4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 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 --- 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 Oct 28 02:37:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852894 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2088.outbound.protection.outlook.com [40.107.105.88]) (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 0F8B917C228 for ; Mon, 28 Oct 2024 02:38:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083092; cv=fail; b=LW4/C54yIssD47BBBKhaqSO8fye23VB6zIJtYHG/ZNJ95CE48HqhtDhwr9emwSluXtMM/ABE75Euh8bEcb5WIBHQfJkhnp7e7eWQkViQch0WrnYn53E1i9WEMi+EyTmaK+58KojT9GVeXLnpPfdAsfItihLJ9teQbkGYH6Pdydk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083092; c=relaxed/simple; bh=/qm8vBUlfn+4SweCmmZhnTzE0Ha0X35H31EeM5dk6sg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Sd+2INmArcybp5C7R8WJh7X12dAivGBWMGeNpQUSXKugAee3USGkpflHQRPHaZlSP2hYlaOG/hM1t1yqm9S4apCQ9TM/zKN1NkY35sI112Gua1lmkxTmAn0JHhhwt9cH64dFWs01WRKkb9i81lvqN+CPqmEYRduYaH0uyMgJ/4I= 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=Z4DZHDbm; arc=fail smtp.client-ip=40.107.105.88 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="Z4DZHDbm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LkmmNqnrMJsAmsyUMtHRfkk1DZLFediNdpGiI2NmgMWedsRA6MuVxEFGGYh/ygFznG7/hRMBfWPVH9Ft4Xtfhp7hinMBBYuaStrYsS0HF8/q3P/KYR/K18Iy1eFDnTmySE+WzyJz1er/M/uPhPEKVCI/hCD3B3r2g1cnfyzrDYNbA2djQff2qXj+8WEpRg1xuqFYQCKMY0Td1ckkA2KFIx2843n1wnSXJQN9KKU8ZuDC1nSp1hTIttSWdKpYMnQsDoQ/v+XbPoCSru3xLCPzPcW1Xnc+oAuJEuP0aFQ1X41Rbm4d28sg8r8qdxy5v8o9vI7cSrbDte6w/2i2QO+PYA== 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=80GGRNXShcCvSh4DnyJ6W7Q1AJkg3b1u5qHMDQvouXg=; b=PpvwNjQvkrjjR0tL9b65ps9YZ/9jv91U+2A3wpsfAiwxc7dSvRhhGhj1tDV2hOKocr4TKyP2EdVQTXtumzQUQTfSfQ7EXxRaHWEmy0JN6fPPyfEbMxu+R4Q3k3OTJtoVfOsToHEjVSvkImAqKnBILlSUW9u/sGL5Zzqtn7OYNmR5aDDUeDt/4Ba70fVIOT7bje1znLGp7fMnywZLiDW7IcStOnoLKQJbxBD2mDUge5+QpLnQ5wl450KuX/SGPVUCmC5yHQxut6v+EhXsdFITh+di380sfimrdibawczbXfl0hvpKfBqN8ihWTg71ee6R4Sdgr/Hh9NfDDfmW3UMcFw== 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=80GGRNXShcCvSh4DnyJ6W7Q1AJkg3b1u5qHMDQvouXg=; b=Z4DZHDbmef7TRl85488kGhcZSMau3WHdv1MGvdZy/9cqrU/LP1Rg4RgtvrJLPhuupKkssLaEdWVWLW8xLpT6eXWK04XPh3WewJ4tMbcNjajEBK3Q8WQSKPppS3fsQ+Tu1BAzvcge397fVLWqppR0wc4D/Nf/tYkAAMrV+J6RGixxuCtwubbVZ79BvYBCw0okDeEInHSRifHA5hOk9hUr/SCNP00K/GUGi6rVAeYfy1CjJ8yl6Az6J2lMDVObpORaDkPhsSgfXOSUOWokb2Mys7lEtuHKrGD4s+1POlr7iIl4GncE1d1tjQYCCndU3XsI0cfK5yQjpVbO16dYMS5BCw== 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 28 Oct 2024 02:38:07 +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.8093.021; Mon, 28 Oct 2024 02:38: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 v4 02/13] drm/bridge: fsl-ldb: Get the next non-panel bridge Date: Mon, 28 Oct 2024 10:37:29 +0800 Message-Id: <20241028023740.19732-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: 15cf510f-e7ff-4e98-f15c-08dcf6f98dbc 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|52116014|366016|376014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: U+Ct5ZiZjE0Dt8Xh+dLJcxAMGENglNZ7B71NKuAyL6ERUjP4/25EsGbGh4wb0erdxPEZa4K55ROmzMtwjsoRi8gzIFajVIug2qleop9Nnnv6EifkygANkqoK6s/WrujEBoHMRDnrrKqkxYa58r+WrAQdHyMOcYguwIKo/rKZu4W+2paD0AbFFIGBqlMLyfRb5lzevrcPlATyUsBHTrC26E0SY7+yLRXUQUEW8gR9iLrHh3SU/SzccNC5Lc1HlL5FwlSRR7qLEoXgqmtyesKVrQnMujpCmyGaUaQjEuLUgwHrVVGHv5NDDS2Jl5zYRlbcqFOylqFKzftnQxHqgOa/i9xrnnq4zLAiHw6GpVr5HAQoTGA8DdZuNhDL9xHPfXqoAdD8SC1XwbjLie+VySNsOS/HTVOSNGUNYnqeejUX4aJjF25d4Axzv61pniHIzQTG2SRdmlN/tGF7C5TdPfhwpEBqOQsnDzQJqQBoPmv/lrqp0RvTNepnmRXUNHuq63aG3ifLr3hFkG9iUhW6pBcvf91larb9gxGBfQAYZIT1Zc5o+yIitAJroitB/WsCfb++MQyHCL7D8f1ATTq+jwBTIaY3qSNACY91ovpAKsdz/OCsk12pS2qdb/mx08mggYPI+KJmGVYX5SVryQVrqzWOfOiLN0kfxdcpz60pA3hcOzqFE8gVt/axxFSNxOMrVg9Pq64vb2i8BLRhNR2I06SsnlSQMQWG/KJ/DnnfDDGphw5ChfuCq3kGOnSGV28iTFhUUmc7XhdTdk9NpJAkOe2/1wqngMDlV+V+HLokn/esZFQS7eS5YkXIYgImNAfn+29Ua68Q/gZgisG8qpug16SDB/66+KHcmWuG/mv4IS47tB+hbJ+FKuiMWjNAnRKew3htoCmc+zoAadnZz1lnCCRa0VVWfoZZ6Nhx996l7SeMPBz1s4ftzfu/4VF8+eNgvJGRmCwbeH91ZLHjft+bp2FvqX9kw75XEv4cUre5VXvdEs+AjU8ekDM8QPSzxLO+SSpBx5tt1R74y7gXPi2XlpSBEEnrbE4RnclFIY7cVnElYFnkwgbyRuE0H2vfn6hnHVGst/rYTF6ICyzW2huRrIVvEWG6RpZLQFDkxfeYTLzDvG7p5tS1x6dSk7sWMsiptPSSqssyVhchQ3NHXop5Ys7SnwQezvMK2sfpFUo297THm06SiH9eiKyek9ktHbRjQZajQpJeE/guRHhaydKKUxreVH6G3NWCfoXjySfyGVgoMC3ETSO9niH6zDZMdg+/lTpRZBqaiirmlYM06TqNbbtDtBG5mkY610WyUvdlt3s9ckAfS5oI8WRlqpguoK03xmlFkVnvOc+vLbRm7AxRoV7CjYiLEf3DvGwQQzPAHoq4AoI= 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)(52116014)(366016)(376014)(7416014)(1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JuRwtYWoKAQaNPxudNfSIHUH5f15yHQ9Fof3/aK+Q7IaKWOi7xZjRYP2AlmmkNU9TN5GppffCzZtguGniWgBKO9/ycghcSnGX5YlM1v9NzuE9ZTAQ+/OEabUJwEvLc764zPvKPtQ7OZqbUXPMS5m5j6mRY8+oxFGRkp2SEZ8aOJ4pvE1jmDMjw0+o4ftC91DEGEgTN2F5bc0eWqZbLhxbnHNG48ohewy90bteIW6hHdc449ASTAeMCa2F0eSq+dmPfzcYUqOgCC/MbLYEgRqcuANrrgsrOR3V+1Fgnqu69cnbHLW2g3XvJqImx57ONJlZrI37j2RW77eNehepwJaHLg7godA2FweKV47jBcCjUTyDOY85S76f1YzBLhWBrNZVNaXAqOutAjqRjD8iLmXzdtORrWIXZKyDQEJO5H7eFLni8SNTBPdBjwhvSK+9uIBAnODCzLEpfxr81ehG2QAnx1aIl/u7bK8EcS/h89GXSqo7e5mjtC81eRClgg22apKiNEUo1BsR40Suyq2SiEbAubZFg952UV7VwDCU8SIKb114IW3gFxaZMSoiXM17W2pudXBtU/yUAVsFYUHk1KB3iv96wq X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15cf510f-e7ff-4e98-f15c-08dcf6f98dbc X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:38:06.9190 (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: KotahZB0yN28abIh1eX+bmjqQuA0pM4tCBz8mdxWL2aPSbhCZYa1d4ASvQ9g7hk8/L7ZlLw5ATNpQio2vjEIqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 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 --- 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 Oct 28 02:37:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852895 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 88B0C16CD35 for ; Mon, 28 Oct 2024 02:38:20 +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=1730083105; cv=fail; b=eJ/Rd7JclanocNTbA/vYuw5zBsu5DOI/5IwlPfKZHfbq7/put2S4cSV5mvcLIWmbyhwUyBIL0D2/teysXvsDOFQKiU4yEI0olQI9THms2ejm/lA0R04cEY5E2H4a1iqsMTXdE7AVuvHU1LTS0DPwuDwqI/Ho6/DBCFvQU30VT9g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083105; c=relaxed/simple; bh=yqcSfG8ccvfT9T6/Tzco8GZ2CzgS+LzVWni+213Degs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=JjfEGxuV0Y8K3rtZoDeFs7gjU2LCfKS0W0CZ8MVCBZyj6HEHGZBilYYhpMHSmS/GRgN18Ki/Ek4dfQHTgyW2I2ZweT5Rh7fhwL+AbrU0eFhRYjLkfHrN48KmBMSIGfHBeHrNwHNeWpEwoKR61ImTQoPYKbc9BuN/UGJAHxWzN3g= 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=K4xhjv6Z; 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="K4xhjv6Z" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ecMiu/Fb9G1DgjjdvbOsTtzNbySpm2cisP8e2QWHUT0K8EDcqoHRezkCewQUQhVOLxPXh7Jwsa9TnC650Y7e+9RZaztQTEHjFc78T5fj/tIGWaHCAUbXOA1lT2Gp3m3KWY/8o41e9Kzu91M6GuZcR4kkQ1w0JnefGes3TD1IOIgoUoFKRLBShy2mofhRIA2f3TpT/0YfFkMFnCzr/ZPujPqp/mM1NrF3MGMMtaa0bdZKXdlk3rggOrF6DDpOmUSYX/TJ3YSqvucBT8XasCUbLTxXS9ngVZG4CC6XffPb8mjUWDvLgC6XaV0/wgzy9be7bdSSc2csEwEbN022LzQAFw== 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=7DIKaBFUvBNNGmCNNHQkW6OqrKpkUbgClg8+0tYRXPU=; b=BteOtD3qv0j3QZuKq3Kosv1XZttcogt03YryUiFOa8vNmVwycP/cVYJYNmTN/kCR+NE14F8KyfQq3lXyjH57m63FjQncK/70XNtnLVsB7fqn3d0zyJM72RKb++qoDCMMNvplN+0igJwgz27DYlBaEPjpj9YTG83V2EonbIYHvPQonRYm7JKGWsyL0RxiNmURhN4VktnxKOVyWsF+Auv5+1786rWpa1TV+fQtDkZn9OmzIMpIEPpYl6f2TFEKCAScPLos63jvGakiMXCyfQMrYjDNKL+UYe2ZxX8ZWNCVTHztpRymVCbdhg8K1OnFc2xquBg99ABzB6QGWSmfwH5CQQ== 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=7DIKaBFUvBNNGmCNNHQkW6OqrKpkUbgClg8+0tYRXPU=; b=K4xhjv6ZJrzU8+Dyge4+upHqN6tIU0QrO41vZE057+E8ketS7sEYrmj8rqaGjTRdzcfccz4Gk3+QvjssjprSPJlXlx2JremLBvM+oXRCFLqJU8gBj6joORrNoPjADXiSijY2us14wIAMO+tjLNeoxobzh5QqDregvXROu3sB4TsNBKnccKZOKGQRUoiBPDNLq2T4GgF/veKqMfKaowdgxDpGLOSyCE1Z9NIpHaNtoHy8uAezx0do4WZrcCC/Q1bmz6zZmDMwwrduUs2lyz/DEPLr6k3ACY6RnZrYBqutpictOv0V8NDdWmbRAJI1DGaeXRp+LJvDcoJSsDO4FX15aA== 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 28 Oct 2024 02:38: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.8093.021; Mon, 28 Oct 2024 02:38: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 v4 03/13] drm/bridge: fsl-ldb: Use clk_round_rate() to validate "ldb" clock rate Date: Mon, 28 Oct 2024 10:37:30 +0800 Message-Id: <20241028023740.19732-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: 14ba5015-7576-458a-cedc-08dcf6f9943b 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|52116014|366016|376014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: Z1cRrJV+vjJhCchtsbC03RPw8c7SQHXJy0QttyR6CaGavmdgPOo1/EQz18IRobZvIVOBRBlOoW3lU7cc9mKAXq2yAxPdbehQH/1SHASswG+SeqKtBR9TvkrKUXpqQ3lJMNJd/RYAGmRJ92vr8/YvaJH3DDtk3dVxSKH8iI8lzwJHQ75TC9mPH0BoSmIwHmmxek+NH/xypf3A8T7SchAPApq5SyfV5NIGCj9JYl4btpRY/YY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sc2TO6StBtjrAy/jXNuboOi+5Ubjg+9grcunqJEStKmxDWEXkc7CCPyvub/rDr3yxe5My/FwP9iqomhustT5tTx 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)(52116014)(366016)(376014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: i8uq2WbQeXARl57rl/f1mUJ4d5qkZoGxB6r002tT3UBbspP3a13asw2H7We4zqVqBXRXbQJ705pq0dxMOQaK46DPXfBXPPBRQ71Ga9rt78I8UTwrF+knfU9lITPN8sIyl8LmWzALlLVtK/QLDB8w2cE8cNvJ4RS+yoyp0Kdh90mnJuItiuBYgaSbYplBsXaUbtNcxOzZ7Osuv7nwelVf3II7KczbfA/9gpr1QpwKwGoXIWlxelfNd/pRqyyLR+kTNPxj4Cho0mGgCEbKlbMErFJe/tGBzExhzfNAkLfg3cnEkGMOTCuqqYbbMWLQzhcqhoiAbbni2q2jdl9ArtwNxDqoVgkQtPVAMgvN9wP/vhILa8xQMVTHY6D1O7Zj0pbtVCQBXeVS7H99rkYAEEkqWvYJMH83jnl474oaG6ZOYzOp6pvKmXjRAJTpaR+rxsOJr4qg6/yXUxRHCv2Gje/unq1LjUoMVv7ATE2mJm1MvfVWsMKePDy4SqvAyHI3C9jN6OQvGoBXKCQn0+jSNFq8bNKIN8pj14mrW2IdMSjD+cEsV5ZWq+b9jgNllFJ96EYoRmaXsdmcXJqYJuyn/Yv9hFVyOtkiHXT/HzOJmmsmmiaOZ8P/q5QI6TxntVT7oLce8TZvEfHxtIDWZ7B+3bS+clKAoeZsE+uiYQnk/1fNgT7wcnBi2VZwa2yfh+POW+eoEFOnTq9qEK2B3Jgwb/L9jAVuJ7tqb4t8DzN+Q6e6Teln66ZVPyfUqRq7dsQXXgicuti1DIM90ipdRsNmlg/goJWcHCH5b23oaE3pJpFFviEVfxuLEbZayhOGSDCoY8Hx8Rs8HihHg28h0Fu5cpR/bq4IJemG8roOGoRxk3Xo1fDzGCjKJfY1Jg9pyd5Ool0mSTMk1BfVxDMXIpjEeBdk6zcVRbvHGz2bfe/IOlqvMOgKACAQzhCRg+hfOto1jUxWkcHN5lhmHYig15uzmYbr0knae88FfhMsOvjRjwpMIgq3dn/hc7mOH52bMsYS+P1FEe5IQLcRiyiZnvWdejyGNYeVtjeZ9MY6my1i+L7xwKEEc04AgsPLmNEMqZyH3Rj0LmqG2f76REVMy/iNKJgmhwVFUadJF3hRCkied/D7TTmhqgXcA89yG6pnFwoB9AbE3WryNHcsnWxoAJP667jVZkrEqzzSLprianbnF0PTrxgbcqWkl2jK4xeUf7Rq/QKOtG2kIcijgreja2ghDPk6QNRjvXVPz7MFDDtJkk14kftd8Aik5PR3iRjXNaa3GxCjrggp/ETOjjeSxMxWUgMXkjZp++LH7rvYk0qV9QVilTFGuy9FgBqVDBv3W6539fy6L9AsFmQG/H1rNfUiGvOI54L6/Grjx/sWfQxqe9LkGCviO8M+R/VbxWCiYxMgrHtRAOYwaeIJgLoMShZZ0pOeL+1cAHFsQvqrjkebXVp8uv8b6o46rZcc0tOehbolI1/jD52/4d3N4eZLdrPZbSih+35NYfhBP8Bneds31NAmQFCOfR8rCbNMa7mcT3sn4L6C7XL/ONPXZ5WuIPjj06c7OYJCz2AZ4ZGA6havGjIVRZuIe/EGPXGPYJqD4ySq0QJ1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14ba5015-7576-458a-cedc-08dcf6f9943b X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:38:17.6095 (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: UwbNlO4nj6CZ0bUGrokFisihhELNsUCnFtD6Jg/uiihaSVrZ2x5+W0EMoed3jSjK/mxzGvqXE2k9+qe5Ro5yvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 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/ 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 Oct 28 02:37:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852896 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2064.outbound.protection.outlook.com [40.107.105.64]) (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 5DE0D17BEAD for ; Mon, 28 Oct 2024 02:38:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083115; cv=fail; b=Lg6eauCUyvmiJHCShZ5AofvGCZsSLMszYYuCANz+kcVYdMi6z8imWEgeKZWHlBZsNctVSLq9wRAVyo6LLJE6L+tcciBBJz9UMdiUGvFlrsApMadDvummG2jz6WWWvee0g5kKyYSPI6+j1OfKiqSByKXH+0ykCtHoAeg6gXfJVLs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083115; c=relaxed/simple; bh=tjWdg+jyjaMH/1SMHvvdd5jl7Ej4qK5gkY0rxsUBGq8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=a9AooXAaweIrkbBLgX8ojw5hZ7u00vX5OgFKAJWP12JQ6vVS4NR/907dWYtsrmtQcLMWdXdYQW81bTrd/2mc397CLi9Yc1R9ZAqqSp8N/0QWBpJcNw1JEEWTrgvnTVK/CwMM1aJoVk7thmzO9KAnw/9SIFHn+MqZvnqsCeYd1Ds= 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=QwlTV6aC; arc=fail smtp.client-ip=40.107.105.64 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="QwlTV6aC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=plsLCHPd8gNMg5HOIjSLqn3BG5lyxYimWFrCP78yIy1Q1nTEbBT2Wf424tyS9JB4iG8KmGAQGMMyX4vEhg2DEJHRVy/12xXZWtdOnzWVfJyC9O4H9AEFEh0rqxFyWBHle3Zfa8fKt1XPzHS9qqkeb7IJYTiX1xIcaVWavazbCCms3qx23OWrZqG2Cc8HklSoG5YZj5sTLUP1Ji+RgCd2V9bSY5957tuEYPVdbY21baJI9fjJxz0nN61ysx9hfQ4R3DO/PjukKPSRdFJCisBPBRN5qLijkTy5upYtupGBjxA2VBPZZdJEMNbf4n4zfFHTHJGiCPtrAJ8Vh0KXbHnHEg== 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=gsHYWnqsqCYo2zUAlKCSCDTGJk3v3JgbNMR2isutsQI=; b=KL8lvf9AeHuzP23/VwHYQaJAfs4Itd8yX+NTN/z2S1I2escCDyWcpeC6b5Ta3hMTpGNPPUvpGPcDVpT37wRZ0VEoTBAUx4KJPfcypo6CH4TK4Ce7QROUX/T26wdUSBXjpcOI+CnnZd+vuBvQPcJw12kn5TqyPO3O1YsV6aejiF4+lHB5El2OnPzQsKgOY5hHcv3M0t9TBC8SLKKYUiACzsCLAmuk92JaADaWdTb86sjlLW4BkWqVmfotilIvz9tgBibcgxeKf1r1rPr270hotzQDHW56rBb8mJ81U9PHgqBYhY+Kvk3Q1Il5dZ9LFXWIKnSl6VFuGI9AlBYW14xRDw== 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=gsHYWnqsqCYo2zUAlKCSCDTGJk3v3JgbNMR2isutsQI=; b=QwlTV6aCRP+FB2S94zI2+x3eYokS9RETGSGsowyeSgbTHekaaSMhdCAUaNSzqLlBLwfW09JnTFPeTbIaZ8EGBNDVkZ8nAqxtROWQ8Th0WgTt0wh0t2DSYikwyEFOMNqdkafxTBveTxRjeP3xajNvW0UN3Ow4D5HQNuTyPZflw8BUV3OjF7AhCehzmb0kGFQZzkvXvN/bDB2hlD1DBCM2U0jhH3IgF2okzXMNA3jermB9J3kn1KCO9toAFod5M4skWdzrybkn4QHNYy5NK42frSiRNg7Vrt0Bi0yIt9ODUWfo7gh9/WrlYjHP9/tLB9i2nkK5WJrI1sgt0A0jnM3Qzw== 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 28 Oct 2024 02:38:29 +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.8093.021; Mon, 28 Oct 2024 02:38:28 +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 v4 04/13] media: uapi: Add MEDIA_BUS_FMT_RGB101010_1X7X5_{SPWG, JEIDA} Date: Mon, 28 Oct 2024 10:37:31 +0800 Message-Id: <20241028023740.19732-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: 88aaa3af-ee95-481e-d5c7-08dcf6f99aed 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|52116014|366016|376014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: ExaN8Tqeq0OWXZ0K+DOaYEWXQbESiA7uNwYG+w4fotvfIT2y5fzrdc6r1Ftz0xp6xE9ZJVQkhbCAmv33wjMrc6dkuNxTaUq8fbjfiTyA/qxzn1soIo2hBZiW+EPcSGS5c7nxwPD7tqNCwk1L7xc5r/WRVEQPDSK0qX50ctUvVRMwugBYVtDQOyVk7j2B9To5/3rFWo2HAk4FBFvLGZr6yakwp1QIXBTDsRj+qx7A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soKY4Ta157GKlzVw48wxlHdRaTJfcNDyn7rJAkwgGmnnYSkzPFobruyfdttnmgRhR/j1e5hmaEjQ6rZTUs= 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)(52116014)(366016)(376014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0TNWN9m45/z4xmS74AhvTtkCzC+cf4pG+PG3dhUFAhRrkfjm7VaF/DnWsxg04aZ/h0MQPLa2eLwCSYrThOtPSyMsfLuQoUYl0ZzFsAab0qFgbGb7XOrIk/pojhdFsTjHwwkLk5x6Eq4LbUA5LzlN7lDBnGo1o0JYbgViMVFpW7V5mdiD5ovCLb6elrfKdp0cyiGkKW9MZve1YzxYXXD79/1WaN86yj68g0LCKOeVxY622xS1ndQUF+DZxkI1a5xZi6Yxi866zEfCG0Wsv1oj6ydc9zyPtbV6zqcJ0yNYPoXA4XILoHBICY7h0tgoFv4cgbynXLWj3EEDTyQFV9lC1CvyzOlxQMr3jMq4TQScSh7JqArB8yJs291jfdrHbki4K/u8WhNef9hxBbUNIdCH0Q2ThcCTB0+P3r7C6fCncrrkVSoDQzOwQ9Au+gQxqB80AyM6xb0TdSftwUxFTe0fEvqPYeKYhmXYSjhFnCDp/mWxKP9Rl5gsuwQFDc6nJ2TXr1FsLgVI4wHuyuSBLviEYJRI6nGr1bGwsD93pCQla6/H14KYDM/ZBDS76mRPXFO9xpo0WM8Uu+lGZETC1yErMXw5S3PR1ukc8F7FCu4pmRtH6GGAxSOy8Cp/JzG1NfZ/5xMrrTqrJtJeHbRFeqpmkZbaSooKkpxwA3Glx9IprkVaKBB1Jp07kUmqOrPOWTVQvJY+o7oYcK+vQZKVj/tcncsT7oaHGpt9uUYttZFvnxgWtzulT049mwq8jQg8gVfx3eJaYaEgfoBPlB7i1qsYckTCXolkW9G/q6n+XF6jAA+aGvEb+DRKL5148t8uB90oqsD63txukLKoAuYo3DTtYuCLSUeGDG0hGSl6LPE0LgAFAlpqxTytb4EtodwpqLlnlPA9eKvhLUnCQFcDKuQlHf6MbNnOl95gr3Yi2BY2oipWB6QAfNDqFWAQyBCqbL4iLkfX//TypvmkZBWVrHt9RdkaWqtRQnPOVMF3MxGDLIQwwHKW+vJaov+JynZ+Y/ZJKvXhZGPm2bQMNv3futm6PaNhrT3MyJbQ6MUruXwmg3bz5wyrfmmrpzLeSgrZmviqaXBmLGcr+tpZtfSk6EhMEiKx1YGpyUJg5H4bWckrQ5oCSge9jall66c/QLLRnb2R9V451yLekUjh9PHhX9fJqy0afB27xjS9rWc4I9/LLAMfEq2H6RwSLNkOFjM5xJRu58rwFuNULBuaGRLGq3ZOEEKrs8JXUsnsd/MlBrYv7jGRqMUH0B2EXDVp1pFAgsbffg4/Y4t5/SE8XNr5HPNeS00pYQqbp7XN8ifHkgZThatTHXMIsUPRBaENrdjSLA5asCp9g9sMI+utQQXiz1s1togyGKEoYMy4NjgJB0cSeT5pWOZHuPvi9UZv8JRgTERoFROoOtrUx6o/4PUG+g79guCILeKOr6xV2ACJLF1T38T0BfiBvOgG+wZXGiV6+rOvIfaEvTX/BvB21miGA3Jfxc9qhTnALXqWq0QjKCyIrOzcfcbvcvVTyz5COKPG/SQcXWlFADfD1jAk5AFOnICWwZ2xrLpq5X0IfsutfyBjHPq4f/AO1Hakrgmd6hbxXEsT X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88aaa3af-ee95-481e-d5c7-08dcf6f99aed X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:38:28.8840 (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: 9ZmyM1497oX4cVTfitf6HF4JJ44HJ1FB1P8oSYS9zgl6BrOH11eZs/skRr6l3tySL+FjE/Fh5+G3+Uh8gCixtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 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 Acked-by: Sakari Ailus --- 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 Oct 28 02:37:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852897 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2057.outbound.protection.outlook.com [40.107.104.57]) (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 6940316F8F5 for ; Mon, 28 Oct 2024 02:38:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083124; cv=fail; b=fjp9L2wIh+a4GhlPL26p3Tv6RCOPn8Y8BF8ZZwF4XUfiBCSZdWHspZT52K8QkOY/IGicsKjhJH13szJgX7fv2YXyhkntpJQL+OB/6fkVwwPsHQ5Q5yVBN6nCpz4lBxPv6upuu7lt3xMOrbS3w/CCoeJpAdG9lVkPh3XWUIKXrE8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083124; c=relaxed/simple; bh=5qOc6mPLwo04wvx0E6VHJ2fj5AXo5a2VcBwRzgEoHZY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=qIFCcnUqn9WEDP8JTy1IJDlM9AVWCLxqAPTwtP6hwKl4z876cdray0xTF0imJUtQN+Ub9/RPX0/08DONz6ktEN+soy/yzrNljriLKQO5+qrQFkixmfeIg0MpsG22gbrzH0U5Fqar50vv2695PvKwzxfPts4lsB/gzOLgq8TFlRc= 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=d8V+ySEz; arc=fail smtp.client-ip=40.107.104.57 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="d8V+ySEz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cgXDD2mfJp6LScNLjeTss2uzM3fBHe8k2uGR4rSxIDddrc8m3v97UQ5Rt15FO1ltRkjbdioc6v/aibl9qRlBgWlh0YOSe6QPhG/uskY1g4q4uUIfc78/oBckIbwsX1A62vV0LCYIfq7IwaXnxkc+Ltb8PrupVcPhWW0TcFylLA9eoV+S0RF+XVVCGADBGXz3qvJuqKQiW5ognM9w0zigStUrKUhE2EW2G0S5L5B5R70elGniviuYx67GBE+LpXduaHqNZBZKs5pf2Uq7P0jcrjm+uqsEwym/ITmQH6u8xZWlDFOPa2Nqh0lzEG8vku/x4NpoDD49Gzv0h+a9xJ6HJw== 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=6d5NTKq+gipI9Re75HN7DkDjM7Rb0h876R4t0pleRes=; b=H1U4aOqJ4OFbbPyxeEFMKE9ticYERdR+qbj/iGhYoVLBmtatfA+fc5sCtOEtq7xRXX0PcuP1Az4R65GdsJEKqqgMlddMwLx2jqG8QOxl39RCfacQSCzvVy21Gk79+Cxf266tIoUovgvQ241GPjgUC3sLRxMEeFE8rCMTfbgrBkIxHkhdZXsl8K+B2aQNYDDggJbg3rGIE/ed387kRbLQ0onTFTrPH7ZASKzOUoyAjkbBb1uniFtLv98UjlOU/b+8a/XILWUBPWUiR/aAa7DAy72nWOCkccswqWtVmBi5tvJX9zT7+UtcSTHGUnnZF0SWNHB6kEHIdZ9/SHLr8mhNUw== 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=6d5NTKq+gipI9Re75HN7DkDjM7Rb0h876R4t0pleRes=; b=d8V+ySEzkwmg++ZwUK+TBvr7T1P5Ug8lCKt/Q6N+kYm3HL7a2epyl+PyzoI+9ukS0clgefn2g4dBj4eztW1QlpzfOslEa9h+G46Aq/OHk5bvtLS/90Z4O3vR8lXYD3Wvss+9ulzDlVCoXezHNIUpgdNdFudVCYdcvnOWYn97+GYDWEPWlWeyKRbRcfTzLadW0bFBd0BnmtKD6Owgrh7Odc+eLdkccA8n3wVyu5andUZKHaLXR7xQnmvOlTAUC2S3Ulqb76qakQMSw/WL3jGTgN5SpdM+q6VYcnqOH21DfD8raJzd5t/PkoU0UQKfPu6r7Jxjhs4vwfmnY8165WBH/A== 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 28 Oct 2024 02:38:39 +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.8093.021; Mon, 28 Oct 2024 02:38:39 +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 v4 05/13] drm: of: Get MEDIA_BUS_FMT_RGB101010_1X7X5_{JEIDA, SPWG} LVDS data mappings Date: Mon, 28 Oct 2024 10:37:32 +0800 Message-Id: <20241028023740.19732-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f457e3b-b91f-4286-25e2-08dcf6f9a17f 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|52116014|366016|376014|7416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wlE/KS7H7RBjrVGOG4IfS5iZ/DY7drUc0XeH72OCvChaCS9HEK19NwqReE7gaB25LCF+AyZuH1tr7pc1lFibYpnYR8PtJq56JeiZlcXF2i7jQIrH8VrCqfWtmpPs9NhmbEkQh/FYzqSoMHhbxs7EvsSc85U2oKf1TNVjjh3Pay82iZaQz8P30eJ6sWGiboKe+UrqIvPtKBNxZtHgp+omqI9OLb+t+/DmZ2EB7HMw9mKNy+v6EsbGyTKqU2oa/DNAjcH02CFv3WhkQfDFbAZxMAQdV6ZA8a1eJirlcf5/+TrzjyjioWYxK68Mfn9qw9ILf9tM/bY= 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)(52116014)(366016)(376014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VNFWqoreLKNDPlGFGyWBMnlmbvaps34UErfzuMAe68xj+tU3Hwb9xSmCJkJADl09/0qo7ivi9B9LABIUcu5TgykZFr23NHOedNxN6+nqIBNSnnQ1TamZu/XVb2SpmnVPy9FBEEd+vpfWh/isVhILPmwWjRruc/ebdD+JYQmSOJq31xbQ2R8bHMd1wKWbHgx6Saoak758TGbq2wst7iJE39CBWZdzW3r9Tt2qXGDdCQ+QzleuFoV8xnN0UHPz26M5E1Q6KSaIl/L7vpWS9wIeR3O3e1QmpiyldLgfjcih+sBpsqTo+Ox7bGbmM/nh54NqyGzMybrqBjRkrtUaAr2HFxYy7BHP/1tIagolXyHlVgGWGgKmf24nalnVqn2HGQ4gope3807qEXSMY9ApwrlvtkYlOYmlc8r1NAGuvKXAKiZgjy40Po9NLPxe8Kxal0ODrGGOOKsOWK5xhcB9dIxjppoWngfmCl9aV28Xkc0TBZVyCK4bGDB4lv2/iShJU/f5VBEqPUIr+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-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f457e3b-b91f-4286-25e2-08dcf6f9a17f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:38:39.8318 (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: 1VQrqcD8vgoTdIzJ99DQbVfnE/mi/YTZNlyJAHKciMhMEZA8CEz3ZkGcyjRlXvJtWlW8Gaq0t6bQdC7+FzISxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 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 --- 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 Oct 28 02:37:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852898 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2055.outbound.protection.outlook.com [40.107.105.55]) (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 7568817BB21 for ; Mon, 28 Oct 2024 02:38:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083136; cv=fail; b=NHqJSSN8zOvzEcowVTAH7kQM+gzoYMQVbK0yvqTI/647krhHMO0FIf8Ak4INvlj0cTtAvgc9JsA+5wTGj8+w7ZuABeZao+fVvZa1b88LbjZlFYy2qpvveikD9XDACOOl8EVdHNO7xqMwjp+5tkYzemgY7vUEnWVxPmJJBI3Bv0E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083136; c=relaxed/simple; bh=Ln8oFP9cDEZfscX7z1t9ml/lkjLgjX1kstT0iiM1Hgo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=c4pPlZE54IiGEfFng6yby5cq4ZSHLRvOdaiSNpCA799n8cSNvwIl/dVvmACMHMSCH0Qfhy3bg5OSX+CNnInRR4Uq7SbG+KWHhZTLweS/iybrE5LoW/Cm8nv9vu5AbeJeAq4SiViIAaWYr9jGF2AF8AJ7Lfs5q1P+4ucpzlnrdvk= 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=CLxiW5tw; arc=fail smtp.client-ip=40.107.105.55 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="CLxiW5tw" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZaxlzsChkBjLbXnJuquEo8avMtFLXibPcVjwPydY7wNItqJKsgKk4eq01yvG0kFVVXwbbaxHXFhFoQ9ncZA5hIoGnGMH+FLuFCs8Nl8Wl+XYWjioV6UGksUZMFVDvwmpF8wIYgIMw8UtJ1fyPPXAe6rrcIZKVeEpiKIEs9WIlRM1QPJ+N4pXhuxn38dXQS7MbG2XBBQL2g+2lnr7uTtDR5A/0CMQdQke97aXN7eGQ6zGFbVYvENlgI3sJOOCVma0yKsf7q/64cVmnMZpqdhXJt9MQKFYT156lQadmcSghYylncG7PTIS5b9cjf77Xt3zDphATwg/vcd0YdSer8pRTw== 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=1yLZRLw4FnE8Zv26lfSLgELbjXxmALHeRVy0E7hJNX0=; b=jnLpj6aXYXSx/iGAZBeUnfdK5CagnpfymKGws7SbglMsfXjxhDB3moH+RDs8IkNBiNnZ74yDHnwmOP+yLwFiNjLf3bzelMWhWB+68CtzsRcQeOQw7B5YqhkPHEbtlY6tl3Ci4eQ8lSBTYvO15kSfSPOTxMVsy863pHBh5mc1amRVCIveZtr/5d1bc2rD40s+QW6GMXzFf3zgN9FqGrykexTqVjoKc8ATIcFxaj8DK64sr0e5AJFk7D7spcDxc0Yp8nwXJzgYYGjkeesC9AijbKfps1MsrJrYYp+3n3AVHHo5cGqjWNk0rZSRA43eRjsIayarZz+5qhlzkKNoViNvGw== 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=1yLZRLw4FnE8Zv26lfSLgELbjXxmALHeRVy0E7hJNX0=; b=CLxiW5tw3LfZQISna1h4Owa97327nGyGyHc0O6TXhkuyyhVjO0SyGGYF5qIMSgIlmTQWwylk2qwRwYsitbGFI6QJAVKTwwDx0kVcfnDbk3Y9GGrOHFmMA8jfuDWUJSHpsTBSsqolPKEqHA3fJwdOtVhhGCYjTCNCHA11knB0TN/zvVGfg0P4eiV9lYiuNrbGNbG8jblpCHmHUrdRdBVgKmGx+BIjyKQWPQNq2BEcpXEEiLp4fxly+SL/mqC79a1QEv3pddznzpGNIYiRLRVqqmwNTybSnwMKrlpw8dLzXY116KClRHayS5FhhUdZyOrw3+VXkZbvXtM9WbuvjV5k0Q== 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 28 Oct 2024 02:38:50 +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.8093.021; Mon, 28 Oct 2024 02:38:50 +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 v4 06/13] drm: of: Add drm_of_lvds_get_dual_link_pixel_order_sink() Date: Mon, 28 Oct 2024 10:37:33 +0800 Message-Id: <20241028023740.19732-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: 14787fdc-05bf-4596-72a1-08dcf6f9a7de 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|52116014|366016|376014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: TyLhFT0PD1P3aimuJ6AZ7YUertE+lqpACczFFY/BuYibTIk+Zmg2LvnNXef8cSjZ0WXQKxCNd2tr2dniK3nlLC/fRbjtqvNIZ/BbenyW6SW2G2o8bUGObDNuTOpxvQsRWfy375PXS5SzFN/UII0B1OMlIOfc+zrNSpPHGje9QvlOuEGNoa1bazRPTDAsvElsl5nnb3uEKh6+TWCUBFCuNRAgXxbe5NhGvNKh4sm12up3Yj8C/oYB7rZaLwEWs3uirQJFZeYFW/XP9G66Q8p1LOwlTIhFHH475GJU0gcyUeTcQKNyjuedQOZK+YJy8Fc54gaaPkSZT0I/Sj9+xTzmhPQ91rcIbU9Rr4raEkoyeZSU/2VfbxAz1tbrd67M9RVrTIO9X9wd0A09aAAXa+ELaely7EqEG+wgbONX/m7BJBgTsHzEUqsq+1NEDsPaktiD9z7f+lQ+MGOB4guLGv5lCLQm9SBED/j9jYIXBgx7b5Qj7FxFu9tvhWRNhcsLjLm4F3qGMil7QnVHCkFmpbEIVOjk/VnTy3hF3Go26t0QIryKqaeqGyrQtkF4YezXQN38Y1ewm4KRrArwXqt5rPWL3IrHLj1mhhT2Hp9I7dJk+b4istOMY9BePY+xRf4jSvSYxkhwx/c7Bi54IlKhzqEPP2qlZbhg4KTAb+ATNaYhgdng5yD7y03+JkHTltfeLUYUIP0Gp/TbhhtF92qFckSd6RS05c78fvHeWwN1mBR0+iUxLA43W3ftCVsx+G90WtMA+5fDUNaQjCySVeuHlixsmShn0ynr+gARWpadH76ndAfQq+LHyk+vL3bfiSY/lCiQ4iy7RtRDzmat5QHurGAi6UPA5xG0z7EIi+u4tQlfOp/DLHM/clbDksv3zjItaR3iLkIuPnzQmBhG1jgDVtiRXkfoCWucxYgIF76wrWY75Yo7NGRlINdL7mEw4PNiESUiz9rp3SGmDrE+VVg46gN6lWSxoauCHJXpaZMfdGFEnncBrjDkBcWj6zQ5b8Cxn85Qjy596MmuCX1BPeuIkLZ9IRP/2VkyJirNJvC8Ui7PXtaqsnAHys9ky6zwwzopJtsW/8FR7kBKvHhl2L03sYgVezT5x4p7QWpDp6imxFWbvvB81Q3MWsyiDBEt7xWIuuwSOwcmvx9cHJmHIK36Lurwqb1991XuQO76EjbHl5H5yKOqVCZbjO42RRbL9wXm5xVIWYlkilGFwL2RpOOqCXvtkrLpRZe46Bs3N0RO2PElsFgCyHfzGHLCT9menAc32MjVXyxn4SLGpVp1YCbbNwI2mUjXQXcnVBJyn5Hne/YPAW9lVG//XH2wRqSWRwKnYdag3U5jj5DhXFFa7/dKVKOKzerT4eC5m8ZTLh32f4G5Qg4= 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)(52116014)(366016)(376014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sNrer2qlaJMrwUV19CjpgzWxpB/9qntI2PBxgTb3AsmtoXbl0euZU9JR93iI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LZ8dHmHm+S5mTe8TsL5CAI7cNKeytT+DlWT8MmpUnOM9onZbC0bY4XiIfJYqCcERaeGs9qyJmHUIX/+ceufGrQw8+dtZsnfZLCqacflqfWD4b46PerXAZgiJywMZd6AMBpNrQvvmScEKncIdDgws2nZ26oEY99DrxLT/m7Wd0tVDiFVit4qQ26+AkTDCEmF56qSEnXIrlP8CPj+OFyUMWn1XzW2oMUC7kV0kHI9O0T8pK5pBXiGtHW1CpPPUD3rFP/B6LCjzRfsc0qPEAimML1i23V+sI6g1uH3m6zIq/B2oKY25FBDf8Gbx86n0tLRO6iRH9TidFa4A2DhUtwppoT/xHjsruC+kTOiMaVcYApPZgdPDqrQSCqtiG92JAcnr/ohZv1ci7Qp1OtBUhu48zLDpmaVz9+rI0jTOPB98e5tvbEpeHjjxExilyhBrLD6MZeUmuEo472b6FfV1F X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14787fdc-05bf-4596-72a1-08dcf6f9a7de X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:38:50.5888 (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: 8Gv0Baqi4ozFq52r7Bnb2Kw9UUZRNj8CR1uMTmEmwPcS1fvYaLUa6GX9/i6WfBfV1665GpNPYzueomWZ62xk/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 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 --- 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 Oct 28 02:37:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852899 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2082.outbound.protection.outlook.com [40.107.104.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 78F6318C35A for ; Mon, 28 Oct 2024 02:39:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083146; cv=fail; b=GV/DzWvVehqxhHn3c9mUU5qJeQC7J0J6jTrKeHLU4Bp4GkT04VCTrLMZBQaQ4Zj90qQTvcdid+PbsIX5F1VUH7M2BVlSfrvBsbpJdeAcBXRpkh6Ay7lQoZcGvAYTWV8wQ/nbUCwvvKzenf0L/x/7gJ43oukEUDro986nClepJhM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083146; c=relaxed/simple; bh=Bo3nZ88JSljZ0RfQsHWsm2cN0ufMcZ29XpSKdPjwnGU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Ih0ljWGwZMB6ZBnoWzguZyX0+FFUlPZnV+VUNV5SCMrImyzq5s0Dtf9aCkhN31EfYAWt+x3lQds2axVHv18LlwNRuhqUqxSR1wYzphl3bbe829o7Fbt1bfeNLawHo5n2IK631o05lbpWJyza0arddh56+7p5JA4IB6gIE//UoRM= 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=FPi8D3yE; arc=fail smtp.client-ip=40.107.104.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="FPi8D3yE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mRvTYU18YS1Wv/fnmYfxPIqiKyyXXOkeyheknGGJ5ISH6fa3C6VUCkCUyFKN2aUH3H8CMSIQNO+aS5U9XVzIzPq0GfC8ejUdO7zCMp6fePAM+iaSvZEZmHusomxCBD/ooJeFfGzVx1TZaGOhd7pZKudrNVlcHt+G2/aIYDQ4lyWc90pEUHk5c06Kscj128Fp8H7mL8/1nyMLIfzk2p12uUej2RH+YEQjw2zRCglVL6j7NrmPHpblQBa7wB1q+PKA6gZjb2OhBK0MOF9uPLtoO+0vacYjYoCN070oeJFfOS7KAW9TDIJHG5slZzVH2gGrybZwBbCdQ08CFVisfIiWOQ== 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=y2JpN6ppELfOvef0lZ0Y7goaV2Ww3X/mKcfanTS1mn0=; b=DGqetsVqz3uRl21fx/fopwL2V2chfY0I5xNmfScL0zjmipM13q9BXXhBCM2JzufYdnT3/3atVDoOlG3TppqNRshpnSoNq9TMNRQp4QVgp0xagO4tPxU/HZk8Km2pToBr7lGpUlfuX2zTGb7UKUu/nAen8d9Kb4Rw/65Cb6csgxgvcSDW9BHhsTTQL++AL9ZZISY1M2VCLlrBKVnFoY+Z4o9AYLhDWnsnNXsZzVTSseOjuS+kCPsMDJFhRGex8gBC0sxKR6SXATx+1Q2MSa0aIsM5vNzupIwASPbHZwFAqcGBRN1wwOvmzyw8mwbH7D31eXuWlLBDEV7/LlDx+H1tmw== 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=y2JpN6ppELfOvef0lZ0Y7goaV2Ww3X/mKcfanTS1mn0=; b=FPi8D3yEsHpEA/sGZe+oMZZ7awljH9lPCHX6zCegnNAT7Cm4jfVKX6fJbYQtCYWP0O541ASDrUR9cdgfJm8YJuxdNN9wJoWniUJRS0jIipkinmpyNeFxMbr5lvRm1Bqv4At0kzKy3KvVWfhqg7ez5TftAxQpJY9GLjhSRrek1hxw2+SrkM8WllgNotP6Z63Dju8CljvCYZiEPdC5NBIxEjy2YTH0YJeXJWwzuZpsUb7ddMADITKvJtyVTiGuC3dU23gzrrP88fg1t3zzmIaMwjdyBznFEhLjW7iNPEVja41glhLyIdpQF+57iyW/OxQQ8pZQItdgVWifAsjO/hGwgQ== 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 28 Oct 2024 02:39:02 +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.8093.021; Mon, 28 Oct 2024 02:39:01 +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 v4 07/13] dt-bindings: display: lvds-data-mapping: Add 30-bit RGB pixel data mappings Date: Mon, 28 Oct 2024 10:37:34 +0800 Message-Id: <20241028023740.19732-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: 3fe36d55-a1ab-4580-fd85-08dcf6f9ae9d 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|52116014|366016|376014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: y/drqiiD1T34Ykf0EDBza5WchLEUIH1fKNvtvUIrsLDU1W96YoAMepXEcdAButEO/rYKxBa4fMcA5xuOYitnnZDaohPMtEUI5EObDqhGMfCPnDmy/QGA5GiTvDUFL9SuD9iLAy1S9UZuq2MNIQbiQ606y9GokxfEzd6/sGkLc3GruZUNZ9W83MBI0DvmwdcIJrNdQu+mGfsxuD8Audf08ce7I7hRqQ3D1VrdelZZLHCPowk8qJwJlpADEoGXW8wjY5ouj0OS+ReM7s3Z3uGECaCxNJ4ShcjH80EA1qntXGc5CXZi1hXfJVYKgoiDJgjy6ZZRWO3zvwo7llsgTVAIuoIATtdBMaL7RWZKaKfOWPQOXF4lmO1NKY3DkTzHPabNRwM0QLSm8gOTgCXvionshE5GDxjrlncszoqWmMdb33QLwgGO5MaN5mSWUpJebbBBFs940VNPqeDHX2MVf5vhARYQgyVAwq6FUabp2Wz6TY1k9Gf3YUveSQcrxIXuJaOCiCASKz74VerOQIXKL3pEkLZHK3+UZqf8dj1fexN7IDaOAMPOkX7yU0pE5g0eCfDVSrCJE9ulfUnVRrEThy+Noc0FxTRfzXKs/SLwk0VwiC6HKPDYX2JZbaeJMWVUd6PEhcAuE/8KAIV8u0ZpK7ILkkH9Us9QowyHDUL4EBegue1yMHXvcunfuRvMRI30lugeDOzKcacG5ED1lN4MkIwRe3aGUZIii9ucM2jqJCE7rKew5iBEcp+1ie8kTkCytbX2eG7WaDbcFMzYgxW5pu87cH7u+OlZxVZdNNmnONei95tgTYer41dJy867B7dwvRPh6dUfnQwAVdXJiztgKWhEUDKu54HM1vu9rBbha/W7iHuZDPyQiwAf2n7rvlRY9isyklWDFy9TG3Ukj2Lb7IFV1cejhcruV9EQ9CfqkcL6dMzvGpmWZieRMgAwtyFncp8kegCEllsG41sOINCi5Y7NUKZSgdiCFhf7laamBtFUzGdFU3o0VyK+U6G1yFyPcycREXDPBwV8IZeSDV8bEjRAd2G6q3+7tetAi3bmE+LpZfbzZJ9cnLo1wSsrTD1G91TYix5X8gL3FxQlsGSYNKBTehIjx3b7XOE8+8mOrQpReTBCyWVA3723yxvSI7EDteTIUJIwleSBa4Igt+3oo7OwWEXqpbcSJ2V8ZBVGK8dcilvl4Shc2auoj3XShRgzIDw7SyWrLG6PhGfFsWruRCdKaEBAaAfBWIMGFWFy10TKFwD/u2iu82FIEMza70EV+qdk5dvceIE2XImCyXWJoMLuVIYXzGIHTB/kVpI/YTuCmte2AQ3YFCkPDHRk/CAz7CuH1RDv6QlpBKEpFvJrSvgWclQ3gp54m6yQ25TeijDRzO8= 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)(52116014)(366016)(376014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: R+1NhvRh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id6khW2Z6LJW/HQcas5vMcPlkUmaZox6D6UnUFQluhUzPh/G9JRsnPUwYmte05QGJwszx9To2AbFhYiFhEWuL7dnMFeF0gwNKhy6ApnO+9M13IHaY8b3tBNeqVVc37IpHem0TWpRQxszZZAMVecLgHsVn8j4LxTyp2PckuHrIncIzIMXjgzFQChVgeOSx72blLU2zz86a7n3WWyNBAhaUlnsw2ibVSuUpCoxM9HEsASydffPcem5dTB6/uv6pHlV/xEcy1/KDOk2DPfyodGEkzQVJ4UMH4qsKd/OmPvax3aLtfMADoLHs4Q86nGk3cQ2XS4YgOLHnNd1L67w6J/1+QncsIK4A26vKoaaA5VDb4Ig2el3GllUbHXW88LVeGz7OzMumC/WHRZ2esKQYDSt9dFnggpu9BSLYhmsQF8GrZUXhtsVxXEyInFJvyDTZe5xqD0/0auQHfxHHnx+wugJiP9UOLEpVOcXcECPA2V1M2AUmBY8dkwItp+n8ERh32KkWudyv X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fe36d55-a1ab-4580-fd85-08dcf6f9ae9d X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:39:01.9335 (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: MTVihxhnGv5xp7Y8WwaMEzWAic8gYKI3PL3kfXlEEi2s2VzKRU8zCNvg3Mq7qpwgxE2o/g1Rqi6gs5lJlF5f3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 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 --- 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 Oct 28 02:37:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852900 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2056.outbound.protection.outlook.com [40.107.104.56]) (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 4D92917AE1D for ; Mon, 28 Oct 2024 02:39:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083157; cv=fail; b=EJ66pgiCIQFBurGEBHr6IaQLjvQvItI1qhYudiWUVlJ6tbu0s4IS0kVGGW8LdlAjJp5Ib87xRfziG4VVlOz10WzzRENtqeNMiVUcgZ19RhpkLbpyZKfDwuo3sfn7CujE/1eQHa77WzYN9O3JkQdnbbMLdGMJ+pmVrsi+if1cSUU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083157; c=relaxed/simple; bh=VL99a28XgZTfCdTP9ZHq00n0DpGzFUsuNpBezF4a9/Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=AlLhKx/c89gK/Ftit8IfxqBrdjFT+y9T09SaLElrCcMltRI1WMyLYOGdm+2ggvm4ZUA3fRdCTdPyv0tvPMthI2DW9CLOY7o02aOFOF9kqH7fc7RTZM/E6aTVFqNL+V5JZ/6Jp0UeXux8vmhgFtc9XGHXceNRWqIKCce1Hy3bclA= 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=NM0qdkse; arc=fail smtp.client-ip=40.107.104.56 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="NM0qdkse" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YNYOEkixx2r5yvrVG9LrjgFlD6uxwPP36u94O0f4EwZI9udH7VUjM09K7sTP4hdGNa4BJ5oh0HKx/N093kZqTWdNJKBGzPK5vk9gkYMgeIF5FEp5/PMRoqMMDm44/JNVKSMUVJWQwag8dTEnPi74pj/BO3Eee0wZGjUkV7pLmQ4w5emIt6v10JPelPnHex7j8KxFmzyg8jlRByjOg6gDbJfSl81tNBOk6symEx0MRE0o61nGjAOmxuyfGcqKC2Oo7JIucUhmBmrJvkGTIhN1JNn5h5365HXH83dPm+Xw9xfQ6mdw/y3uMWrmO64JeP+ZEiAKIsWiaoQXW8a8J4OEhQ== 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=X0MXb51dWLwzIYBv3HCuE9rQsm7JB2ox21JOfSc/9sE=; b=vmOREsrL5h6nUauAAbT8/QSedTVUAo9jtBRwtWpMl6TS273RWAhDHkLCWxiEvr4ZqjeJjWrSGfXCbdaoAXlwy7LL92q2W1AYlYR1d+hZ1oVLkf5QjcjIyw00PsuVLYHG9AGkOGu7lIjLhk+UKGA1cpNDw2BbH0U96ItG/qnGQUK/9m8eVLdfn6e6xEFpsTa1bSX25ANm+vT3SbOkD/pBbiwVgFTvbUCXFSwa9LYzH8k/eC8fYaFkMI1KsU9SN/vonNsdGhSKuFlWiifVn9bS8YuECaEf4Q5ye+1xVcqcl8OXDFMCTqtzTuLykJG+bZ8EHUIKXJAMs9ZW31dDeA7FIA== 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=X0MXb51dWLwzIYBv3HCuE9rQsm7JB2ox21JOfSc/9sE=; b=NM0qdkseoi1R1o89pqcLLz8EKMA75f4dtgmL/43pjEB6bpogUyhTmeOeVWlEnrmc+CZ3LVuDcrgePpOS9TS/ugU/zaQnxRCg+rc3xr6hn9J96hhAQ+yLijDTr1IWPOgmFfwJxs2FqgILX0DMdFsvgDn1A5mgYL4YR2iQ9gJnib1GquyPXB74xT43zxvuil5I3XLaP5OIdRpg5n9+U0F52dGOt98sLUePlH5+KN2mQGTjK9ZyWLWCUcqdJwjaSIeow9FIDK/bNR1iWmEPQ7NTPADW6rF9xAnOd0VARXiBXGleaIcdsCkv5gEzGV8DXuwyLH3f/P9CWY0CWy82hW6Q9g== 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 28 Oct 2024 02:39:12 +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.8093.021; Mon, 28 Oct 2024 02:39:12 +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 v4 08/13] dt-bindings: display: Document dual-link LVDS display common properties Date: Mon, 28 Oct 2024 10:37:35 +0800 Message-Id: <20241028023740.19732-9-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: 65c68bdf-4b61-429d-c027-08dcf6f9b519 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|52116014|366016|376014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: LwTcbiYLiMUHjWwYyXjepMDZj3eaUfQEq6xqVIRZwoT75WKpESSHjRqoGLlzmOpbmdiog4GXBoAayDUKn3o29bdMeM/Gj6P7wSbQyD5vltf3/fLNP23lyWL799EyD96ERlH3T+wRrDCXpEuIl1Csw79e0AloGOF5Z7pj9SoGQZlrOhGvLQ/AdDv3mbIcnay528UoUvo4jsDybkcKUjTFqCOCN659EOGoh5i0yfLU6+nsA7mWBiiHYPO0dVHsm084jW/U0ZTZNzF0oMhoM8slv+6RGDloYUnc06uQlWgy+qcCtpPul8SVRrgBo50LSvDzsd4vc8WrlthFq42DUXHMa0qDS7VKcyJ9w5no059ynTEiznMOrPW7kPP0HRmxl/IEkmvezDSpVyzXlFU0hcV7kScvmvVVKETA2+VI3wrbFbzUqMgoewL8cktiKdtBY7UogXtpMh6GnajXUs34RSGNCGnx7zJSu/q3r0b9acFEN3qBr7g8X1r9prbJuzs+WmeoC51XHRBvlNz1LHJCAu7oTHjpH8eLiJlPTDAbBYa6ubFHMlIh3gdn1iozxRHRpXd0sIvLlVFzCtOJ8iiTYYXun/y4t+CMKeuoZOzgYnu58q9V7VM2rWOot0qmxiINrbaiGGOz3tqVPn0+fc3YwlMSBz0+cLtVRF3Q80jVq9D4X7cSgV6bOWK8mbfU39aKHZyIseGtpI6AVENIVIfPY38EDPpirsHPeUdgudG6GE6gzPY/F7BAqQ1s4DNh0kEJKXzD0yl3MWAkiOGkw4VIWrOJ8Qboxcm1MInfKdCACuv1o6zy5NknU3BAcJa2E6YB7r8H2vTZJxxoHShog4LO4evcI8oEM1lSJU8Jhzl8ZyIFBBKzjexAhWfOFdJ3aqPTVIWUW7L0AzkusxW+XEW3WCxmct33+t8LrmsM/GkI3DBfj09O6HqXxy/ynbD+H+sOT+vcdV5Iem8hEguTifIkorR06VKrKOCVLJb9GSyQ2orIok5uTqspW0S4p205J8BzkfXA4nZjLK4UQPJ67kxZAim6ibdXi5O/NWsrdusdfmaqdbLwvLEwewZ+CVSlNTa14ZM9GIhZMSHyRPwOqIucj6ZDKhm3qNr//nSRKOF6vyWicBNKaVWmtzuyAOu4a6ctNS3EoRRGLYTjpVehFnDCA1hlNYStyGsX7R6g2w6CKNz5/1sgbAu5jU+6ur38NIAXViKe7O+JK6ElksCJdwi8gZ3r9+L/uXw+lP0/QkDm1EebMF6nBCWhAuuwelsWCUz+ECSMyO0cwuwDJjhEn8eZEFS7Y6Xlq/o3jsjG93f4gEXeI+th+QBZYJsNZSfggWONHkuz 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)(52116014)(366016)(376014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /GZBue8I3eGxfLT8uabOU2T1Y5P0sx8jmwTIVmycpxGh5jVkxzDJwBvFeDZ/sgvjv+C745sjoQB7J+TbbWpP4+cEB36AcShR+yNmPgE5MNV5xMNnsWWNvaRFle+P93n9J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JhmU/XlbaxqJIIzD/XfE0jR86/JQIRhL4m8CzuOgLB/Yi+W+rjz90V0SWNfxO/1MzchhIH/lkBhmn3rek1vVKBg5UqtYDUSoj5PyzxaMtBg0gnt/EP0LUU1A6b2wEiflxzxZj5+SlJVTyRDx+r3jkVG5uBGQDR6iTFaAEapSq63wzCtvaX33Om5NMzrjz3XTj4rzUTwPDR+BSk25J6Rth2Pa77m2ix29cKeE6dVMOGDcdggyrLeXVIKrKd7s3mncDi/fAzJ+ZYB3On9xW8Y8ZmIMn/qSrlpmXNKBWjNC7b6DN2PINtXIGN9FfeRWeJ/UV5sgL84tR22v7yvS9nTeJcOSjaeFuM944AHSNpgtsWf8dnSgwOYEpgvNDrV0GqwsM12L X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65c68bdf-4b61-429d-c027-08dcf6f9b519 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:39:12.7225 (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: CnoOGy2n8yFWd/lrXQQc61f8HYTiTCSduZbWmmib7cpEw051n1TjhM0tBFYB0RcgT+5vxXwpbKLvlmzi4rtV0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 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 --- 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 | 76 +++++++++++++++++++ .../display/panel/advantech,idk-2121wr.yaml | 14 +--- .../panel/panel-simple-lvds-dual-ports.yaml | 20 +---- 3 files changed, 78 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..5f7a30640404 --- /dev/null +++ b/Documentation/devicetree/bindings/display/lvds-dual-ports.yaml @@ -0,0 +1,76 @@ +# 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 + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: the first LVDS input link + + properties: + dual-lvds-odd-pixels: + type: boolean + description: the first LVDS input link for odd pixels + + dual-lvds-even-pixels: + type: boolean + description: the first 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 + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: the second LVDS input link + + properties: + dual-lvds-odd-pixels: + type: boolean + description: the second LVDS input link for odd pixels + + dual-lvds-even-pixels: + type: boolean + description: the second 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 + +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 Oct 28 02:37:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852901 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2081.outbound.protection.outlook.com [40.107.22.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 1645A189BAA for ; Mon, 28 Oct 2024 02:39:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083171; cv=fail; b=gCIKP245kJELZhS96BCUpuw1GGYNCiuBbOvX4JFQdTvkuEZeo85w2CoZVHlsqGw9xKqEpPwLkQ5QL1h23iayqg1dsTX7QwnCqypSxQ2HGw88ikVJOmEn6MBQW6ut8wRN/nt6DXQfkvP8U2t2uuoV9tUwdQpEtHzK6nWInAEtO1U= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083171; c=relaxed/simple; bh=EfF3jZOeT96Ja297DTrBQX0aY1LpGaPKuGjI+Kh6tro=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=CBbZcEmulpoA0/WIopDbTu9cABZ4XMf84YvBASC8MOrePlNQUukahXg2y0hTWrg9FBffQ0xIPq+8gBJg5iXeO0N1U/v/dwgAXREpWAR/MIzT2kV9Lq3YjZ6hcg6LJXJmQaqxsq/THvhwDCSOqILzA1pHEdsnWoBXcd605E7fUlQ= 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=H+Pw+XpA; arc=fail smtp.client-ip=40.107.22.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="H+Pw+XpA" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Cg+Is3jIVqE5r6XCc545amvgsv0FznjKsl9TrgBuQTf6TfGGA0Ch6C7Dl5dunvzQ5X6tdBfBvawb9b+B6WSi0o+f/N0GeWW88vTF/XSzvA6qxUUPxvYOrdfgORBeReLpBV4g52LOmMmLG8qWcO9HYQl9JAas1JEEAIwO99C6KG00ChLmZBNq+jbvK4yUEfoaCtDtGPLG906gNMF8L9hbEvgFvnFmo8apYV5PsrwoXNBEcLZdXyscrNl9NNUhoPtwbEdipRO/evwMICabuLlwUq9F/EL5OYL2MZvl9hwr+qHEtuAlp7A5/RHybLtenQDh4UDowTE4Ht4LLV5fLxPJzQ== 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=/+1a495inYw7VVLlNvDjNC6p6Qn+6KBgA9h3BNyVCvg=; b=UQXy5Fbhp6nNDjmjNaS65RsL//uiCEXQryygTJ9ySY2nGvzC0d2g2xLpnkuk6aMNsozZ5LOkWImw71jGpTbU4199xG3dkkIq9s9bHuyuaqbmM7khKBs9T2Qabg7jLMong6RpTEBojKYGI1JXr1a97KnmFb8ugV6MSDFx47MgXHeHHblW0ISKg7oUbu4DfS3dxBcWf+sYkM/K0IGIx4iGBjHdnNLFi/hefw+BLKX9SOJKEt6/ebyX2L56guv12n4SkdhvPLiP06mF6ySZx1O9rjb5FJLMATe357HH2q6YA3idFlt5SgFKObm8M5fTfISqZga+1C+HRMLz4KFQbAsJUA== 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=/+1a495inYw7VVLlNvDjNC6p6Qn+6KBgA9h3BNyVCvg=; b=H+Pw+XpA3Q0byhTe3nK8hVO7TWkVzvwlPMkfsMSQ34C0/An5Q2LVFE8iBoYvMGrJUJlYnOfsEcC30I7j9tVpluqdmIJshbzC6t8m02t6sVHg3vBsPJWRMDCoxzZPvNN+zh8ju7fHfbPTvp6wy58ABCH93rNhnNcgnb0VsIsAjwdAUrmK9kY5d3/7akre3Axbcga9/ih0kAHURvBeVtsk4anLHtRrrDVwjy82siaYqlJ7FodJhD7SW/ghv74V4uUhde1Wvt0ge26B847Lqml17dV8GqFmKJNoDzBU02T0wPNFUE4b1/HdGouQ9W7AxMn74y8mc0EPgf6IPQ7Naz4aHw== 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 DU2PR04MB8902.eurprd04.prod.outlook.com (2603:10a6:10:2e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.23; Mon, 28 Oct 2024 02:39:23 +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.8093.021; Mon, 28 Oct 2024 02:39:23 +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 v4 09/13] dt-bindings: display: bridge: Add ITE IT6263 LVDS to HDMI converter Date: Mon, 28 Oct 2024 10:37:36 +0800 Message-Id: <20241028023740.19732-10-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8902:EE_ X-MS-Office365-Filtering-Correlation-Id: e78e0f2b-0cdd-42b3-ec22-08dcf6f9bb7c 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|376014|1800799024|52116014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: EcY8nK3iJZeiDScnN0N1kSLr25hjrdHuCP7/lK/hJQVXMwAx8YoVkNkzTRSDmLZOxKZTtS/w5FKHWAXpIeGrBOXFhDwulzXJwi7KC0YTsHHFP7N7DqzQRlq8vdz4/5PdjqDnwiLC0Itpd8kvpgFbipbUxg+pgQh0IKzebmXLMAAYc648GEb283owK3+iudEhgcxY2+vFWHmLhBUnh7tAE9SEXamplNHVDqyR+WXdmwCoZ5f9uPerQfuPZqX5YXHZLqaEysnkdknmFA6qg+g+BEnfKQ8dNBjROwA06ZScYS3rwYLuZbbY+urR1uw+3wMRhmTVRjCpUDgzAcGmdh+KCvXfEeC3IcdfU9UZDa0W4vlXcwtWacvMGQoPEvsDWFZY9m0cclUmImfvTEt+1+b2VVa6c8eZM6HhOTJw+uEeCqAcQkBvk5Y9lpnumQirhSb/+wTeJkhYERfZ9sndPt+t1x8u8z7scnzPY2ezekOya67c6SNJBa4RJltjhhmsRqbr2+Z21tzrSxn0+vVI0WuyvPhLU6jTr1CK1M0wZseyKQJlZSm7cr95dXOovWTMCkokeoOo8wBfi6pFo/VG3DmAsQ2+cHNM3mgbr6CY4YcKr2XoLaOkgqqDStamRiuTwXEyYB4WWk0jbOHYPxMrY7gaX5x/XsujEAEyRdMF8By5/WVslAJe2NB7S27DogmdVfGIK4VxY67/chW3hSQf+kPxxHYghs5nclO9GbleGhVlEX3vIGWUkkY+BJqVnyZQeSpxEmsctDRKOtvRLsjJ0mb+niRjI1lG7H+beIW5yuvAL60iyDpjZDBFiaIMF7AatGbaXxJTPlhRFkPbQ88giiPNMvQCD4hW8mR+Hu2QYJssaay1gLBz5e+lw8IrNbKzk+JrMm47SvRk3r9ogdAL+qSb0dezwQinBo6Dkf65W75bhhDGdfwxdQp6h0SfD8wM6O6syAsj+vZ5RONbr6uIUCd/CdsTuoqemcBIJcPMbL9lP9HDNwKFZReuR0cYNAqecHq+RGtBpUIVnnlrFSJYPhReR9JweugxsCPUVG5ViKvliGcJCISPe80BicNlbk2hwJ8QWXNUQP9j/crMxdLHJTvP9LWWpZn3FMt97n8aoSafLuQ0JnqyLU7SwJGFx2De90Tjv8B0yS6Wz9pMmUA3kOtAADJD9ui6rF9uvJvpZBhiBACGxrYcTKONQ0xtmMFRv4yS+evMenrWB8APPRwFAWTW51UZMI4d4JfRLJrFimu48zlqqjOfnCdsBIMahsxgQv36C3CRo1fzTF55NYc5vvhyT+r4ipaXOpd25krQBpRLlmulGPWKEbZG9dCvW6+wxFG5 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)(376014)(1800799024)(52116014)(7416014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: H34y2JFIcY3337W7AHOgmVp/5byvwmY9dsc2690aP2JX3stB7dV1lapS2V0JPdoN3sc7CbJr4ozBhewZ6F8pIb0sx2ajPNzqh7gGN1wRT7wrNpdrYJCVKGWHp7IEqjLI09uVNTVeewUbKNk7sv1t6b5Cwj4s9AtNHlXWLInkCGi6bsxbM/+6fF6J/zSYyuHprgPD0SgENcKwPhuJgenpTh1Eav2L3kwe4PnLDEFxPZPDLo3zOvCAVOKwU04Sgp2u3vjSwknHeoAKPPtqng9+va1S7MvWCV26HzMcv+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ShC8Mi8fxaZTDFaXIR90lpUIp3UHlwcrR+sQMptsdNDwEj6OckmOJxKPlrQm4gzwZbXSpZuDzpqxZ+lZm4YCMWdcDrtaCKTqBMiWcoR0UGjYGDwv+/IL8GMyLh7b+egjLr5ygvv/eXoT7w2pUl4DYfp1wLJ7Sg2YbjcTeYhQTuNyJgXEDMhcLZdjBHmEJvra2mTa0v7XSB9quLdd+8w3+JxDOuFtQ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e78e0f2b-0cdd-42b3-ec22-08dcf6f9bb7c X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:39:23.5311 (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: BW/5ScHla16LaStCTDU3JFK8OLcMuNr/b53S1WyFbEswJfk9PvLUlpD+QjWWGRuEYfkmgY1TqZwpEPypyVf25Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8902 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) --- 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 Oct 28 02:37:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852902 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2084.outbound.protection.outlook.com [40.107.22.84]) (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 98AB518A92C for ; Mon, 28 Oct 2024 02:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.84 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083182; cv=fail; b=fFLvr3lVo38rjmbj2ogiUxIDoeUVt2MpIYX3bgS0N/0uBOF7QNJRAAxg5flv6ksHUgFro7MpbktQP7SyS/vhhe3ZMc2OFAat1Ir+S0D0d1PWXSTPo8CqPGO2ehXsFLv7bw/H9d+hB09T91hHQFHcbnkXOjtoThTYvmdFXNBeaR0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083182; c=relaxed/simple; bh=lZlqKSeivCpOdcEUQZF60R1AhoYQRWBizfnaAhL83AU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mlUmSlyXtY6Oo4WEjuZiuuW+gfCkT3BthGXm4kVUM5rsuSWMhbzN8+sqXmETnq4OFPvme7hnHaBTeJKqUGHTGnSruutE2swDht0P5vH1OcxwfFOSrzdC+xvJQ55BayuCDh5tUiKbTa6EN+xwh9kjzFp9pe99cXpLQo/M0/mA2wM= 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=li4Upbzr; arc=fail smtp.client-ip=40.107.22.84 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="li4Upbzr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=t4rCm1RL5Kkd8+MxE4X2+nVtG5GbnMyOk2htgBINp+FDgED6oIYfg1W7W1RzM4fbWq85XVQARTzFUreUElPtMCCUOQH8RK+2YnMVXC4Zroede2/pith5CBRE68pytWRUNzybYuNQccPbqQWziPiQpVIKMDoYWFXEtCTJMI06kZHZJeG+IxApGwrA4DGY9rcGT566RtEuOpPVFRsr2oobrUQp/TB9ErdPqQG6IpiT9CFUUAJpDtyvkMRPEqto3swc19BIGxwmXh2L+DldG+/otfYeThR0O2dv2lRwbeEhimq3fYTo8O3rgeE7TD7fPLs1f6pRzGP5LUnkyJLOWPW2iQ== 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=EGVWpd5PSPGxq/eBUA8rEoUQ99apsfiLbYrCU53eEyM=; b=YCFPGj2e3R8fiQ4Ty28G5tA7jZ7X3ORf1+SVID2VyTVhO0ovJ3V8HkbR58zx2v3X79pA0sgCRM+Az+9OfQlE7JYSNzXP+uVhZ4/uVLGo9vNxfZMqlVTRoPoGtO90h3WR6ZrK7FJgr0dgXsLk3a07wsxhBQ5YIEjAMdd4n9jNsERUAlgZwtJZDKlD1Wx6E+Rwa0IrJo8jv0x7IUif+4N+NJ9QMyq0Rv36YHZrjGaSGP8uqblYPZ+31QprjDPlWWOzldUR0InB2oc5eZAn40MA1Ktg2Z+V+gkbhPyAfsMFsS1ZcioWfTpBgN83S1VLrMAiHmLgmDGiBatSMSfchBAO8Q== 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=EGVWpd5PSPGxq/eBUA8rEoUQ99apsfiLbYrCU53eEyM=; b=li4UpbzrxpuzmOe3djqPAMl60a4VPQDnF4IVCwmGsoV3rj/q5/0rYU/wgKAtJYWnne7pe33/u1lAUl+ib/KIQ9nsAQDjus5E9LFyH/eADp0jHatCAxCuONRbMVH4MtkrSmD4UfM7W1DIpWhgn3L66frEgzu8FXbzIDyBC7pDyaxs6N2W6xLF6ucMxiA95T7pU3zTqntApX1SSM4FMRCFIgvT3aS+sIg0HMm4j1qtNafvfPgasJEnnm41HQYFQRPNqKY+gxw9/3Wy+DGoOzsQr3qUrl2+Q11+fZkyT82zdUEyQTjXev4azlZwc1xmS2U84VCjNL59KznRVYrNS5PceQ== 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 DU2PR04MB8902.eurprd04.prod.outlook.com (2603:10a6:10:2e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.23; Mon, 28 Oct 2024 02:39:34 +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.8093.021; Mon, 28 Oct 2024 02:39:34 +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 v4 10/13] drm/bridge: Add ITE IT6263 LVDS to HDMI converter Date: Mon, 28 Oct 2024 10:37:37 +0800 Message-Id: <20241028023740.19732-11-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8902:EE_ X-MS-Office365-Filtering-Correlation-Id: 49d56425-2532-46e4-3edc-08dcf6f9c205 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|376014|1800799024|52116014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: an5OjP68xPZTcj4KEXA1H9aOeVN61OPMDH1SK5fkixQH0b/YvrXbYfA1965l2Zd535+JFOQX+T9WmPGNP1cXXmvNI3GCcQgYTIWyseO9oXViHJHexJqJq6An3f8931zwcxcM1QdFjbAVxnT2Slw/GWck+4gmse4wZYzIrtfcZMwZfGitnKmA8MOAvRr0PXvBCJDIoV2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44dmXHCm6t+M1mzp7995VCZHzG30+Jox85vIVMf0KA5kPnARaN2akhafZ8tBu3ySXisO6JIfWSCOYQ8fW7F+kl2qH3SP6yWUKyFZSreD0EqMN2qQUcOB3kfVmzX8aWJgk5erSd 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)(376014)(1800799024)(52116014)(7416014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9vveObcLP5i9o3pqf2Dtf+8ylQW5zWbjKJGLU9YEbq4GHj94AlZJEEkVbsbBS58uWF0kAPoa76QwNZ8/BSGAVYUkVJGyR16iyCe8v1C55S2mR+WF6Of999MdmFCdBf0RJcFSvicmw6TZi4vktT7TOsg2Cu6wW0zrgoXLvwwLL3swrfiQWjBXxOJlm/ubiJ07YthcxzNuZU8XcjK3UnadNv0dkmV3cxHlxR0h16K0P+yWKrkdVeWvqOZkus5egKnHdXBHh5eauiQ2RQNck1sbXKPh0AP5D+pn7NdqbBH2yShJz8u+vDKISllip0GrJtlOkvffJwN4C8nX6CqjUDMTJ50iKYGC4DMllHd1m+7HOggvnQzlGDsw/7cD+A3NkwQyU2mOr67xmY952JBlG5uDxF7/tzXXyZkrshjVbsigxAMk+Qzyv2Fv7vb8Tzza50sTh9Lqt49RjEmAbHBbycC6TfTHYFoi/TD+x8BdvAdX8dKz1wmkCOCfmkb8DDHU6eWO3N/v7GycMRBtdN6MuwjzEzkTlTKzuebqQylE83hbwSTZAEE9Pew//gA2ADTWMQoDe36KQnG3DDObqypJRL6ue0sO8NNyrCiPVXnZcHV/3J13nzkVJSfdFhL/USFYfLrAwWItUWQWIAl+gzb51B9EbTOWGgETChJLpPvudBC4W/yxdkbeK67OMxvs9UF7/J5L0c/jPLIP9RuGqA0uIlTjOJnSPu4dy8N8mh9mYPiDd+m0IzXAU61YxAu7iG1WYAtYhD4QfcajOW87SISy6fJp+q43ERz08gg+rBhAL0VDGI6Q9YUgNvT6hizSDiMi1+T4SB+YojhYfPZkHaRryV7t4sXSjwSbT3fiOymyWFnJB1mpQa+bMoTby/5XoQRDBBw/teUUTmnfZH8vwOhFxRnArUUXFNinixKNx6GWfMGkb9zPhUdCdV4uJpSE0kby4LjemhocnUwuEVlgZGVtqEKuFBXO/XzrhcXvkAU3jIkPFw2LHx3WKfv8Gc9kvx4e4t6hZxohyRTFUJ6wuapqPpzvWGrD9byBwveKLyhWTxeEyKQlTIBAAGLk1NIGBfMP/tpeueZC55NlVu4gj3HxK2546sXMxGhGcl6AYay2xsyBsMGUIznfqZMKuIrystUWBvtQaYrMGelr07MTOZZGIlaMZ4Iz8TcGwA3VRAE62kwhC2wozYxLQwNTMGI6JXnyrxLxRoUkk6Nx/4tlQLQ4attK6MZYkwIs1L8DGKD8HDrjm8lozVaC2LFvTtPnkfd2+ygFCsX4A4DPOBVXP3IiPPsX9tsQxcDkCHV2Hb4JMaJD7U8pzEvgDRAKzGol7SZQVHui9fFRilb+ONvM47wWoNQEiQBXU3/WvxaRqhe5BGv6PnjOF+u1HW09DhPj9g3FreVkin2nXhMLFJlUnCFXkRfprV21IRJb6LY81TzI/eeYO+1w8rahrzxwjPxqvhXrHKxsnZwTxByub6j5YRcElErEOasM8JlvFQgRzkwZOR0h/S2EDrY0bxy8vmRo5fWNatO5XHQv7guAgUDE+kUU6hSTok09X5CU1icCewF+KkKwQmFbcSnoasfvEULdSDAwOmHn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49d56425-2532-46e4-3edc-08dcf6f9c205 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:39:34.5562 (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: TwpYwse5xcLfdyPpJeaKkFWSYohbgAUk+LL0Bl0Tm97xnebTwKs7oFPLV59S+FidSef652v9t5E5kEvH0Ymqog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8902 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 --- 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 Oct 28 02:37:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852903 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2058.outbound.protection.outlook.com [40.107.21.58]) (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 A27F018BC3F for ; Mon, 28 Oct 2024 02:39:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083192; cv=fail; b=ddujdBqyQrCo4ljzOxwyX/8iFgolMII04TRlE4nPNS3yJxqafyNors1h3E1uzImpUxlG3wjkWNdeEzIcwbQkFxLrmZndBH2HTdd+mv/0iS+Gsk1D32xb/HREssv6Tmad24SdsxjYAnidZrFTO/M0WNsg9fA96OSxJkhDo5jq6aA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083192; c=relaxed/simple; bh=K3omMv2G0IZ/ZfHXq6+8qoYzjvfLyMZv9f1tpVvZFZ8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=MCOoW85NApzKWOyRwREu7zPP52/oCYwpBg5J0ND2QAToH9SBu5hCVMSQOoQ+3j6qDdWDa7rxq7FSkC0VHpBF1SAMsLrFJWdWeGIRQVTF2GOCyXJqv6TV6dPWstMseXDWQg6XrZZYxXF1vspXu13llrfMshWdNaBgylpKgMPc1u8= 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=H6HCMOkg; arc=fail smtp.client-ip=40.107.21.58 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="H6HCMOkg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kmAlLmlmucKQI7UuuHruINtMmnl2OWwHtSMNudMfCiCZdyQAVH1KbK3qRsHAFEoE+sJJ9epeLkpCchKJIsyCDXs3JiNsg0GseBf5qFmiz96EsUuiml3MJH9lZ2dkNDE2uMIvTMRhF06IgEaePIg1nCJYF7PLhOB/WuGOwigTEtNVtYwwqn3UsGGuOAPFSFerQv+QLq5VRaHgiMLhI7A03uGoPYervr7UL7B53wRQovPLcbORsXlzVEqyULSaorSBTFHhM1gPnMCTSr6svuHy4U1PAmnYNsoLUW7KnO35vTbEku4PIVsnU3bhu9biVvcQXmVb1CbnhkNoP3P0Xgmx0Q== 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=mn2hy3RZD6OTVqGtLmgaaLgbAxI4KZZpISE2ZfRKKWo=; b=ImvhD+EmeWRP3PX43dc5FfWyvJnA9ZzLGia2uQSz5lIRK7eaiuIWoK6HF9VtN4SV8ZDonGAdtkKu7sOoEEboULZO3eVE4B+7lvGEYRBr+FcLtblebhC9rjK5IzDU6RaHBPjUajj9bGcDKYc8QjCMX3lT9ffCm6CE8SMoGQ4l3sBG3Zes+tOR6H8W4VNumssyZBkD/T/NEQHnlyMoVXVcG8OnPQ+m7Gbuv492foBL8uAEW+ln605oIT/Vyc5kr+KAeupO3hI78zAEzNWpS1hF3MP0s/2BMCegHxQsrPkPGykHQloDBAuNk5GZKcUJ2XVMHeZ3qRpXakMe964tMzXDJw== 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=mn2hy3RZD6OTVqGtLmgaaLgbAxI4KZZpISE2ZfRKKWo=; b=H6HCMOkgVg38CcfhLshUsmOW9JIYiVw/26FCVUs0BceCwHcpuI3pxNOAKzizLg5o3ZOGJPtGHBuVUTsifej3MmrI9gNio7fc1b/yav1/VwZUdAqaRyn13cheyj4pB2QW45cs15EkZ9KKhWyZ0ZlgKVLDvhhav/Iu08R0AGUU1f4FNIZD45Ki8LXw7LY8iO1gkM0/pvvYCh+JPL5/AcPy7SiwdrygTiXFtamTAOBAexITRk5E3EIXAEB/gIr5a3wB1o/FxGn+KyG+4OqX2CSw00A5pLWqgAGkTv3bo9PVC/celbLGZdv7PaLbC3Z2QcifBrJ7E08Lvi9KNFEs7IWzeA== 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 DU2PR04MB8902.eurprd04.prod.outlook.com (2603:10a6:10:2e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.23; Mon, 28 Oct 2024 02:39:46 +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.8093.021; Mon, 28 Oct 2024 02:39:45 +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 v4 11/13] arm64: dts: imx8mp-evk: Add NXP LVDS to HDMI adapter cards Date: Mon, 28 Oct 2024 10:37:38 +0800 Message-Id: <20241028023740.19732-12-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8902:EE_ X-MS-Office365-Filtering-Correlation-Id: 407550ec-97c0-42ba-0eac-08dcf6f9c8d6 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|376014|1800799024|52116014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: y+GPZhwjGqf926p6PDrTW1V3dBNRtjLN/k2D5E5V4h/fp7PGB1KYBJY9F8YT4gVLCBtMRwSwZTF2uoXgEMYAriSAZ9gX4ahwiVN+ay1lfEc90SjGashNr6/dI3y8pdD5XfE2rt3/1jkMDcMqgbdissW9+Vd0wuABjoFisnKrVZWV/21hAiL8aQyN1ZHQH7oDNvTBkmHBJjQzR3w4NfyeAM828EZo5PgQI5kosoADYec+h8VGAAneHHem2O0Vk5oXeZOwGLebgzdKee4nZfdY9O3uObKcpec1T/SYpfELvsY1Fe0vDKkxuGMaBkzduMNC68VJfV7SxQh4ZUGvC1vLpKBGxlKu+MI/u5J2B2/P0Wx/SPLZKgqfRfKdEAbv+5IwhZGY2HRbxwM3w43267ljOaM7U1xjHPLHsKONNajb56H0R7eUWGgYwLQRm/UrvkZ0yfa7MQJclJr4QNvdUDgNdVm/c8G2UETHP2Z6ymeySHN6H+1d+d0Q6G5SpKChPEC5NSM7dS8fjGHbac6Nb9oGaKmYZQsiUY0cUS83C1GAvW0BK86xvEgJ1iwmUxgao9Vh7TNx/J94myewIJJcsCeBs2UI1X4D0Iq8gWYj5NN8xdapA8Z4f3UobUZFJnENrq8DQgCIgvWruf7Cix6Cl9i4pKWkoRobpdQjhViV6De4x5lmrU6/qm69C3JOFM5dnemMLO0cnbmaHx/DR47rL6/bNoXJII0NbcfrXQwHz0LjPi5h3NQofXRcUbhM82Fq8sGx0efUsTKaCK33Fn/mddW2PJffTtVrd5F+e0Ro/UYXD4EummcgBWM6hAZMN86RtXmUDnX+MGoXAsLn4K2xYKWt9BXrjOlXGg0B3sEEk4h2B4EwpZlYt04iLX6FKaF2Cy0WNnktIy6SZ0utZQ98kU7wojCM+6KkYuNXb45XxKYAGOMRb4sUFi7gLU3MqZ/wnGo3o313cbcQhnSmoAR4tgGRBnkD2VxionRsHbf7eBv2U240JwmR5zNBr9HyAduj1FBhxRBNyz16fz5kgui8MH3qvuEitr5d5zshhBlEtklIxD1ITabGoy16uEZTZC1cVX2ZpX6hhSzWNf014K0SuzF/IwpPWcIEd8ypOL6wJph4jlOfmsx333WlECiRQRCDopOwoMAL32cJKEGPLu7KSrJYvc8aFjW2R9Skpe0FVSsEARdKi/hgZ9AmsuTvJPnLKvW8TdFPKFDli/5u+yDhdZ051H4oWVqGNxKj4I+ZJ193b3tfxEWoRpenLIZ/YujrSNC6scXDfVG0XWbbZAm1xfkni7lcbxizzFMgtkonUkqX/7jcKF8rDNV4Jyy3IjVI60eR2XLoi8uSj5mB72omNDJjq4NWZWOqAL2jZDaJ8xbHQVXRdvPpQS+4JllTxAyuQgql 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)(376014)(1800799024)(52116014)(7416014)(366016)(38350700014);DIR:OU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kk+FVwfCRAWWB9tthAwRbNjYOlVbF7ZvQuOJ/ZnTvxvsXeggzwxTIW5M91gCY3icaK55qGD4+xeBlWmp85cWYdhhv+JvRiTyeTh3Co9KEHu7ZSQ3OADbBAz2XKsNeEHU88TwksBU7kuJoSK5qWivGKThtU0+PfgaeRpSVfobkIbHqlWPkC7XMxiVhNHHvhCR5+gJQtHEt6By0mQq+N5aM5rZ6eIFaVsw412OMTOGpYoWLeSYbRzMC+aDU+DR6g/UB2P9KoQykUfzLK8+AUymL2tbEX68O5ColNN5SmJRDSkXKuZQMRvYNos8sJ2R5/kCg3kqItmpIBDt4v798VNTy6aSRJBn2BmknUtk8kp0xKLfMzcSiZUFpy1dsa2IfMiZVZi1yJKTQH5JMxmd5sWw6T95kBIDNgyCEHiDiyywtDLwmuNXP4j3xvQYY3r2fJkfWanLiW5jxK5fQ0V/pD4fDMeo2uJElxYf4O1CLDcSVEe54yvinWd93fEuhlICvUUynsKmDqJm90a9f+dY7DFZ0aaW1t7+xzJ3+EtrhYDgq6JfaNlXOMOrJYkYM9FEM+lINi4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 407550ec-97c0-42ba-0eac-08dcf6f9c8d6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:39:45.9010 (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: JnU09tT+q9qBeqHhPR9lr5EtTGCtTPDIOYspTalqu0krR/L4BkY9fxnQF8qT27v8giHhwpfWE19A4t38EWHc/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8902 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 --- 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 5c157529fb88..ec04d693c313 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -207,8 +207,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 Oct 28 02:37:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852904 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2040.outbound.protection.outlook.com [40.107.20.40]) (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 1ADBE18C01E for ; Mon, 28 Oct 2024 02:39:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083201; cv=fail; b=vDGVqbAH8c/Yqwj8r9Kk0erSZZYZFjqBQukIIho/jQwMBzEzRwhkB4jmJhkdjmG9dwGkEynp33ncC/1XCBW7X6+xbg2kXEPBfqju62/H9C7TwuFTd8U4xB8pQ0chAu3TQg0rsI92d0IdGNv/OAO8iRdF6uiaj4gptvl59Mqoi/0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083201; c=relaxed/simple; bh=3vApvOC7nmJ6il9tIdr6YRlc02f3NhM8PsqcFY4TWDs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=nhIBahmEr+ArzwkmBNNQy7ByzGOKKD5fNfJ8nHAh4W8MhBdbbN3WnGWoaIBtnqq1pFdlENK1fUahNx2iK20dsg6iWXFTbfEtEa5Lvpkv0wv7xMGg5aZ85eWcT6xNs5C+7JqExknzgThI/Lk/rX/a8qqRGHi2HwwpsIyRJbc5JnY= 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=QcvB2oGp; arc=fail smtp.client-ip=40.107.20.40 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="QcvB2oGp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nWfeb0zs1if/PLZGuzNrq28eWJxyigbRfwcroGMfTAdGftb09ZKSr8x19GvI5kiCYsCF4Vh6gxzXTUIkP9dz+hSfYxeoBB6iRhhhrk0k5RGS6Lsw4JnuyBNt1eVw+PthRMlZkQ5p8+By9DV0xaAFOGFTWMC603xKTK+brpYJOMN9g+ZCqvnElYnwHxeZGszVfZPnISUyPoXct4viXU01+amQQgU50qFjmDuzyITzUdVsoLjZ8b/U39wIQMUdOC7r8tvDJxQ0lXlW1Dz65+OGkS5k3K/5NciNCNLOmlTadlOiCFJj9Gic8P8HTFO5pVRlL5Uc1gnEiY3jpnuUgW+ipw== 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=k1aNMzvR63wk0dR/tTYseaG3xtqK1iO/pUpQ/LdzJFE=; b=TzxOSDVMD/4qVA2m17yuYiGgWLgKoPIYHeNWoOLNUsbEIa531qTzRRiK1pwnFAVSh8z3WGnzx+id3HKIzi2/Iu96RPtItviVxO96WTrRELh9u5lNeyP4Brr/H7mD26IrGzyIrTNGFSJzFCB3nX/BtM0YoeobGxY5gfdR0vsQ8WrQtu9o0A84/KyJVAxYDRhMLv8km++H5DPn6aaRqardYSmO+KqtxCTfdpmuhynu9HJfZQ6Mwa/ci/5828xqQu1P/bv/POTgy2sjrg/ZjYJ6qOM+oEdf4Q+/ZBaRCtxuOW7foh+EWVDgVOtdDz1JXPbupuN/LhcxEJp+pmdjkCMNvg== 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=k1aNMzvR63wk0dR/tTYseaG3xtqK1iO/pUpQ/LdzJFE=; b=QcvB2oGpXOkkSGq6PfuFRBIEqW9cL5zIzlGzXYJDmUlP8MGSbJEPIjipF6c70Jcqt3roWpnLPnf8VGCs4VOcdCKQa83OhtdGzP5Mx//ynIrJ70NJupVqOJ+DT8dG2V2nrTyPe1gnFL80WGAlwLQdwpb1sSdVV6DbMcEzDoEGxTUW+GtugBWyQgnl7ZJvWzq5v2XB5mEKyFM6mmKrjmOBHZJvGIez6v94bOsBK0BAWReYNsgiToeO4akd2oZM7IflN+lw3ktkaA9lTQZ5THpt8fqLCGxVJMmIY3PhlQskkxhdtfmIo4L+tI2cG6lOda25CjlNcHsZAaZjnhYcAIJURw== 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 DU2PR04MB8902.eurprd04.prod.outlook.com (2603:10a6:10:2e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.23; Mon, 28 Oct 2024 02:39:56 +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.8093.021; Mon, 28 Oct 2024 02:39:56 +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 v4 12/13] arm64: defconfig: Enable ITE IT6263 driver Date: Mon, 28 Oct 2024 10:37:39 +0800 Message-Id: <20241028023740.19732-13-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8902:EE_ X-MS-Office365-Filtering-Correlation-Id: 46d48386-26b3-433f-d243-08dcf6f9cf3a 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|376014|1800799024|52116014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: SAAWYHheIdaUAAC3icpF21het74HuykPG2zvHv5A/HhhdsliHIzpAz5ojXuFcuuqfCjycTGqEwkASwRZYhYGzwVF+2GpRrRY/W8TWk8Zn1go7k1AMegNOz1SGDcRJGl0SfZX3/1j8sMHvPPSXdDNUkRXcS2XBjGqea8IG+Y/+GPSzBXMoNKxddqChJyVtRtsV6SjqBcaTNJltoc0E9S1TMrwkRwqTZ2qq6Yme/N+Z+yBqBKKI+zKKM3ep3XK91VveUFUXn4oOWDDjzzuDgSERCwBotfISit3xszXNs5ksdK/l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fwg= 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)(376014)(1800799024)(52116014)(7416014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +wMM5FpIIaqze4VzlA5aKMKQbhS8NuK3hdGW4UDlD4Hf/Y76xzry6t1t0Idb5jU+kf82CRJ+llQYszRj/dX6KuJX5eOjWwDpEFE4ffIs0vTQ8hdTt1Ok56tgV73pjh0hGRj7xZXNVTF8DjXfHsZrTHPL1v9P5w9r8hRs1kZHrEwOIDMl75LZnuDALgES5QEXXsSH2OZ+IvcFOqLOFnHKXTh2yHsvAaxYhln2GaVKjnvaYA2GuyGRXh7m7Bkh5sb9D/jAGPAmEt03kEuhNiBYLQ90kjNoBCWGWtjvMlCdQtCG4Xp+Pl/7mS8AtMkNIx4HeLcpGNDW2/IIuXWDWQk8iFeJO5V533ixPYJXzLl/+SK1vcnc6e0GNR0j2jaBV4G3QHlxni+vCRxcEYUqvaPVNv32txV4CZ5InEEoiKVqolao4DUlyGqvmAwskzCCyDV1vSikJ9Hyb1Rr590rsjt5HF70Sm+NI4EtOb8AVxo219tAs+Nv6l21qNvmJW4MiOQZu6ipU3W5vTYxfnrdQkpLaaX2p+QLr5wxO6IDVfoAa5jcjTaIehnhbQyVOqZ3DJpmY0EWXIJ2J/9xttp2dhyNN1Ajf+WbVBCF1fQx7RNgZME1vo25yk0k80zewrgqoLSd6PrsMxPsXX1pwYNFynYKuBbrpeSnUCw4ZbDTMV5+2XJ43VqSp5QWuYNtKyFgR8DvTUVAHYJLkA7tG3ZD1NnnXkVSknSVpnGIcw3MLq4pG+M/IeCG2uAvmP7/hV4bG+R0COo2Ud97/+NOGOyLjlRFTjxSHD/QTDNCa39eD/H4MSTHKTEBDi1HZytesnhrPfShG4W/kW/oVw7iPhsICe2iWxr8Ai1j+zD3yiby06IkaMCZXsMrV0T+UKhoj4mq+u052Firw3ocz6cO5uq132OUOOeoqUP48YJE/dfYxpt4G2rqJReZ33efDhSL6cuqnZo0hdYCWvyvy5PbYhr06rKpx5aK7SYT/Odbop3irpvSiL1EmdlJUsnIdmipXCzBI2EvS09IEV70OxLb0WPpOS1pwThUKg9ABul1vBZ/4F9j9PX8Fifvb2o0n0ZgCbVnUgraI3atRRk67U/WM2f9/iNkBM4Jv5noACyV3pFalcGMyP5doLNzeEUmOSmQbtklsZ85DEbwjQIT+kN5iWKLzFd0znJ7eJJ3ips8o9n/sDErikic86nVTbZRnOzXSLMdMGuM326co+sZB2UgWJcDxFWUrToIFfmObMwVmmfXsVp760nbxd2KGd9DCmsVD5a1eoelQ/oF6LqX+Uq6UPd39tshxR1a81YEZDmTF2LUzCSO1GxJloEni5vGRQbzoinuQkQbiCFcylvu2uK47ujaLPg/7UT+n0VMqh0pXHBtzhj0N3SF6sFSEXNQWswdHvlXmbOTEAoflxzF2+8/779JSFW27qYMbeTuN01AxS+o2X+sCDVoeh8ehgzYlvdZefSf0rc5PkzrDvGliCncEiChG7tr90acCnQEP+d6KhotfVZPLyXk6Yw7yzh/2uhGPM4e/+5/Rg5kK7KYC9jYiQi1L+Ltg6z4dn1ycIPyf4R4Gkqox33602dHu7GvRsCLVk7Y3x1b X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46d48386-26b3-433f-d243-08dcf6f9cf3a X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:39:56.6281 (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: MDxRjUEuPZpnVyra9gVxnoRCPgR3qSnAUPxmlUs9gs0uTLtQ4WCdJh0ZR6VmMRZGCXJ8UI9k7UwcC+LMQE7WLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8902 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 --- 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 36b33b9f1704..d249df72e2bd 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -899,6 +899,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 Oct 28 02:37:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13852905 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2054.outbound.protection.outlook.com [40.107.20.54]) (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 9ACF2188CAE for ; Mon, 28 Oct 2024 02:40:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083212; cv=fail; b=eV43HSNr2IWeIHObv7pO2AwjInjmBZ89v32UX+ZG0Zxdk6jjueTPErpUiMCQxHcPytv+cwOpXkhYmikm0fcBnqa5U2XYMYe/3aFkhMLjEWMubu0ewMUVJTkVhLnj6ZbNU+YbpBM4GQYCJxY0qMmfy8kAE9aKdgySUHdhcMj3o+4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730083212; c=relaxed/simple; bh=AxAlWBnfAPQEQ/of9yY6JU0wEoOL6EKaAc3BOctsWeA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ScgJ+TPrc0zNIPENvFAN4zSlr9FXbvQg3ShosvSLc5aF1hkrRh7n994sVOaWvO22nYWJ1rgynzt//EmZMNMn2Bvua6nYhX4qpAT01Ow5khNJm822gQO2Mt5UvsDXoQPyd7QYIvdHqLhnm4xFCfgjHxNkH3xWo3OjexWk2wyaTLA= 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=Jq2m9+p4; arc=fail smtp.client-ip=40.107.20.54 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="Jq2m9+p4" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yanbDrmHjL2PEbCgZ4M6Gmgiu2bJ07gJQMpRZFqnvnQbXQJjDzQZZuss7rZvfa8zuK+7JhwAwVjZrcR78MfH8hZRARSMYh1WiU4sUcd4sDNVVimAyLuJNRKRHcaF7sDfZSIji1iMIofWWT5WqniKYteqogI5JJHP+pt102Mb+Jl4+wKKDpXAUe77Zr1U8x0FbmSx0tvoL36omxbOi1I34IHbxmLkBmDLQL4STWSNw33F52AXHX0BF5Gd7wWdkb3beOGRI3LiKdiy0a6EsE7IA0ivHk0jOwGOiuoPzB9JfGpRRwhWD1W/QTLTCZPs2p4IlTize3eCXYVYxVC3g7nkPw== 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=XvabejdP5d2t8qeomjDek/wNKCPuWSJS5dbffzfSZrQ=; b=wL3uGRvRLUjyZRPtlh8V+vj09lq8q1rUblgUnoYkzTI6RJYegNiqQ7BloUd2ucVWFc5ol5swDLBplsCkqhA2j7bF29t+8hHwHL27ORIchBkmLQhuCpkYgljcu/GVMEzKSUmDWsIMeWABTU9QycNo4Otnf5mv5Iswc7fxL5wVd+ArOKdEx/9hAnUE5tvUiu3kvL8MK31Ml1bVzQtyBE4/1FKijpsvQbB7K03sTsX0QI3V/ZBu35yByqfBDbvcQPpfdr73ITaugoU8Z+Lm2T8PE72JKrQ3DpVKzrKCtaBMkAXMERIYamz0Hy3251sULKV7lLpF0/5QNAhE5NsYVC+XFg== 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=XvabejdP5d2t8qeomjDek/wNKCPuWSJS5dbffzfSZrQ=; b=Jq2m9+p4+TKYiRSxvcYYPVZvqlqEpxnrpITu88TpKeJceUX8fosBWge29n1+m2kdbgcxTfQah5NN/QP4OLlRwP3Sd6uDdVQqceU59HUWjFzW8pO+C6IlTsoHtjklQSijGOG7HbXGqtgMly0ygCpByoahMydgzz8YdGEgda2JMR/XolrksQWfyLpSQzhyncQGKjq/s4bNohHvHmV+Xom5ZWfPi/UxWZkPZw5BXVWQicoQzWnzdN17W+fU5DEqp8fgWLrkLTgHQJ/G6CEwM1MEHmO17wlnYE6BBvMu9/eBvsUlKZmznUpvpwqKpnCT1bA9ouZfrgwDROylYzPnWHPivA== 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 DU2PR04MB8902.eurprd04.prod.outlook.com (2603:10a6:10:2e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.23; Mon, 28 Oct 2024 02:40:07 +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.8093.021; Mon, 28 Oct 2024 02:40:07 +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 v4 13/13] MAINTAINERS: Add maintainer for ITE IT6263 driver Date: Mon, 28 Oct 2024 10:37:40 +0800 Message-Id: <20241028023740.19732-14-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241028023740.19732-1-victor.liu@nxp.com> References: <20241028023740.19732-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DU2PR04MB8902:EE_ X-MS-Office365-Filtering-Correlation-Id: e54cf86a-d3ee-42a1-6c27-08dcf6f9d5dc 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|376014|1800799024|52116014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: e6nOeLo/DkIV7VMDj1tH8rGnq+M85c6AcwzUa1fSmUFSFRS5OpNWJ7Gv/+/Zi4zL7R6qJXRRy2bqGuwn9a88orRCpxn5+RIHTjkkgNROmRY0PqW21pP0O/gUg82fe8Fg4/xi0G3NH8jcASe15RnLiH3eInv5dfTNRsvPhBPJ0Q8Z/iQOU9EuSHfPPpoIkpzdvUsYlOU3Y+F60/2L+PgZob8Pp+U2baSOd0iwTa7saXzmy9GC4XVwgTb4fXdG3BQSk0UGkOluQiV3pPYJrT8Z7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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)(376014)(1800799024)(52116014)(7416014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pywjYZ6P0UuImojKk99az2CSgE9gFORQlfere24iew2zGU7ORp1pcPQNEwas66foyO/unAWcWpdymTfYkOEYOmKiQNTMuPq47BVQef6ZD+xrN7RsulXveWwPwPb4lCg95OZmS88p9hkoouae6yQ4qLHbCCuxhBiXRvj6H04Q3A7kvAgTEKFrb1XkSB859GQBA4BeWs94IJB0T93Zgb5nVi8fnPSa2BZvTbseTkoslkjkaRiRYAO6xe4acnef84RuM15ZY9zh7E8fsNBwu8uGsMfrVESXFHTa4uqSrvZsvIsKULNTDQV4wYKMk7+MGVby9s/FNVjxmvyNbeK0dFLvA1qnLDvpLIavA3jE2UvEh7JmJtwjyOTHIUCj0RFC2A6pr4aO9WFQ8qpg2iDr8YUtPjpcaMngsiuodh+5HjmCwX1a2Aw/3PE54LmqyHCLbDLHysrr9hGNXvUtcihk93JAfhD/gOr4tz+HsRTXXAL66Etkb379oGWePwOm1wckrQDrT99avnkidX591zQQSVRSGI06iJZgClwO7ZXSip79THuiLjUqYLye8tDGJ2A9FT3X3JQ49esKt9l4/7mM/MzYyk67wEdQAU+ysf/VgiNE4s35klSeKY2Y1W2y67AT+7LK/qLfGmCbbwZLUQNvHvf4kB9Yl22tCmCZdbRYC7LtFXX0sbUPTwrS1aNz5BHCrqxpgY6KxGINubCmYx38yntYLbJZX8M3QaOdoAlUCSbkWt2SVZppftW+bAvQRinbnCbbHttFHojOK6m2QTNFRgY1mMpQpDkl/zuHqHzM//AE9Jjh5pnhXEwQHyfX1rTDw52A8xqaIOMwChXTBtgP5Rz7SWzN8yok5ZYIh1CGXRZkU+FF37lr5rkPUkhBsPU6HWwHZauvFYNK7K6DWLnjl91Hf82+VQWIfRNexHfrC2Fwb4qId6Vvz4XktdRWRrHM4kVxHJzhRa4DEIXQyBo+maZTt2FoiiG2+RD372iSarMuhv3dzuTDCQc6tIAmWJ0CFP9gQDGzNId6cvMw4h06v246yH/eQUk20E4g/lj+hKZVJas/PmezKZTsZahO7pm+RgPqS7TUxd08+HZDhmc9D23V+v5kIzwFHVxpBnft60Rbl+7CW/kTDDcZGfdsrHhih16R+kmsDHXs3zhFDbPhrI9nop6sivWG5NljeAdW+FlSdk7gXf8bnfVLsPBH7o1ZpHSqO3MM+xMW7ieA07yCn7TKTfMCY/UU7LJNIC2q5T71N0FK2UEXv41QIEAsuqp+RFK8/89rLS4fU8EvI+f2SsNJ+t0/utsTztmRRvFJGnlW9VAB5ABqtFtM9XlcfMZ7koLRlPIN93muyCjmuK/8Zv0YQsTSD11lBhZCj3aVUqfgsz8qBFk41HDSY2aWRf2u6PqceOZvGQGe2vOxhM7TAbK+9chzWQ6xTripDG+24iZNG5CIPyNbhgUlxv60+krIBF9/aLzZrkvI+NXU/JXh5bFM4gFPyQGGgzNex1ERU+Y6bksfxTeLk+3JS7Nai5BccOEvWdWQ0mTAetHJIaESDGkg1IXden/cMCxksowWdcB1iu1fSoRn9ElLy9/b5ut31uLj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e54cf86a-d3ee-42a1-6c27-08dcf6f9d5dc X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2024 02:40:07.7947 (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: LFe2yZHf2jQO8L/VjjAhBekkwnVTNfzEbMREKwUL5I1OAlQqk5hMzAw+BXJk7j2nvIhCJopeB5Ra+3u0dzyKOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8902 Add myself as the maintainer of ITE IT6263 LVDS TO HDMI BRIDGE DRIVER. Signed-off-by: Liu Ying Acked-by: Dmitry Baryshkov --- v4: * No change. v3: * No change. v2: * New patch. (Maxime) MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a858224b59d5..615ba0e905af 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12234,6 +12234,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