From patchwork Sat Jun 11 14:14:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 581190 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7886C43334 for ; Sat, 11 Jun 2022 14:13:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233994AbiFKONM (ORCPT ); Sat, 11 Jun 2022 10:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233965AbiFKOND (ORCPT ); Sat, 11 Jun 2022 10:13:03 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70081.outbound.protection.outlook.com [40.107.7.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F61B64D1E; Sat, 11 Jun 2022 07:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c/BKE545qdqG/MR5LceaqEqRSTZcUkiZupdpizdan9wErP43qQ7vo+w4kAR4TuIi0kuLIEVBvg3Mp0s2G/CHdftrq0zXdziJtvZKSW+YymBX3ah4ZVMe0G0f9TeViOsZO0wyfYPWbNSnd9jqdTcfthRDRYufREW/cQllpoDOpD2ImWoMPDmkOPr/bN7ptjKBsfDv7uXO8JC4s6FW8bu5LN+oWDrOAxWPyibz63jtpe7iuLiQH+sp+F+zoB0jQaDRjl5omoMhTdxyXUeM5ebfvKoYHlE7/j/dFueGcN5TfL1emw/JLVAyWDNxwMGlYBm6GIolxv5ia2a83U9Lys66vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5DnUWEOsEtka9J39JoFas6+F/5dT8mgaVhBQ4SY40aI=; b=UeJZ7Zxi2l31w1Xs5EnBNNK4Xu4V4ZvDxxoaA/UddfJypCfbKjlmmbFXu5kQE5bO5i7yGocAYygodnBr6uIFZ5WkYO7ATNhgAktdqj+CxTVRmxsk7kMYxCgXICpatFsJJg1Tc28VOiq7aI8NmBfl3X0d/92aY9TcpucLcoF8wlpsfVdnQWfT/YtRVAJpweL+3wYLa2aanQtS4c7qDGRgdh6mZfaCVLDKvUd9jI9OLIBSc5Fs8RrFYGH3rKeLCjXHld1eSBAzAz0zWUoS5v6dcMo/ViuKmuuy7nhfWDCQ45aiiOmdq/3ii8U8vbTo9bAeNWpDVUNp5GLy0k0RYkMkHQ== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5DnUWEOsEtka9J39JoFas6+F/5dT8mgaVhBQ4SY40aI=; b=n+NtSiullbXSoL9m4mHilo7GlDVcrC84ptONP75mKCQiZ1MOpBq7sqRPcuEwu8MrVyNg8Hx0ObInLWUrbQ0UI8VuccAaRkaz8ZYcpO9ZsiZPln8qqg9vbQR9vH+96hGdztw0QJgh/umeiI+ByJdPf4D40vm/E0TeGC7Bb8MFayI= 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 DB8PR04MB6347.eurprd04.prod.outlook.com (2603:10a6:10:107::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Sat, 11 Jun 2022 14:12:59 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502%7]) with mapi id 15.20.5332.016; Sat, 11 Jun 2022 14:12:59 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: andrzej.hajda@intel.com, narmstrong@baylibre.com, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, lee.jones@linaro.org, mchehab@kernel.org, marcel.ziswiler@toradex.com, Laurent Pinchart Subject: [PATCH v9 01/14] media: uapi: Add some RGB bus formats for i.MX8qm/qxp pixel combiner Date: Sat, 11 Jun 2022 22:14:08 +0800 Message-Id: <20220611141421.718743-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220611141421.718743-1-victor.liu@nxp.com> References: <20220611141421.718743-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR03CA0118.apcprd03.prod.outlook.com (2603:1096:4:91::22) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a5f5d974-98dc-4869-a0d1-08da4bb47d40 X-MS-TrafficTypeDiagnostic: DB8PR04MB6347:EE_ X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WrIQIxmxArCwBZCwdEcLn67GaMlGAFphSeiHnqpIkaGT5sVd4gsfqws/L9IAQGS/FROW3YQerGxSw7AKu6v4EeUReL7WNU7ZFTSoLIUK9TJGcpUNsPmhplrmLf1WDfqdByNnMMqwSAH7E1Xu8zBy021vCIf06/wOJJrmdAlxEy0gPAXInwZetEvEI+JEooMKQFy4IOzgw3MglhaBp5Ywubmpd/IQc/gGMhKbT58Z6a10oqq1tshI/ieK70JqmkfIDPkiErmjjYMR9WTKZZ1KIyGa70VKJ/ezRFxZQ13acUbkkxsyngDjWTHvHKmF5HIDAOqtNOHUXFEWp8/7HQEhXlWymrpXchZ0Cr9sedzMIT028aPRiDuayUkxleSuP2ubF0IvwuXXB4L4UEb3KYFeCBHwz9bJnl8eJbYIoH+SORKw2AV4eByORA+/hs2iXKTzD49urbYHiJyuahvBk0R1a8+x6UGimdBgv+If7Z43jiQ1T4/p/jI+vBnUbuvLB+p/Bg0rzwZn52Vu+Aln79/BK6JDC6hxJ2HOWwjEsoc7Uig+r6Jv+Wl137xdzLGkz2u9Sr3/0l9cKmo/LVIE5qJ3rmCmklQTIVwzcjDsjez8kpQC22chKtxUYjwBkfhngi9D1d2TkvxkUR965mMNHar8BcazybY7BZRBFSkQoXejmbLvmEQ+Pi3aiQd7lXYBRk08E1HsicTxmzR3C0rdUpFw0Q== 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:(13230016)(4636009)(366004)(5660300002)(66556008)(66476007)(66946007)(1076003)(4326008)(8676002)(86362001)(316002)(186003)(8936002)(2616005)(7416002)(36756003)(83380400001)(52116002)(38350700002)(38100700002)(6512007)(26005)(6506007)(6666004)(508600001)(6486002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /jerfXVpOOSCVnzIOTo6dAnc/AFiL/bLQYY6JqKXVkVkX3vHnKnoM8CKTLH4eFEAPMe7zEiKZ0E9bTMaVpZeRXxWENQnQWkNyS6jFOsvnusaVt95Q3Vbwsnuv6KXHErnMDHx3Es6s4iIlorb0vxZWvMxVShH9q/uy9xwJbq5ZJ6OyMC2PxdZwJlWQ/VsybnTRnwhYNKeOkwr/hHgSJ5iwj6E/dSjVJKI1s3e59Hdc9tojAsS+Ys7fS6gNlf1qOrJdKUADa1bPVGciJorSGCbkmYpXbxZEiDq2SP3huD0mUROlnSRmgaGNxpMdO5lKcxm2Wcht+kqmfBsOZ8muhWpBKFEDTGw5/cSW8ZayGPY7QjxVDlqV82Q/vaHx5CJi2PXdyYqdBRoK+J+N/Yrx20NWZj3EUTUAnhARnq0tANGX/VsxRewmy+c3KW+lnSfVBlOuHY0iz5ZH2cuggwjlxpi4wUrHePYk0gE4iQ24lneNv0G/9fQlteVb/gOAh+g4AiFJ0fERLSxxZIYa0yYS6ddeZonQsR2BBC2uKLrDN2nUB128sKqG9TjKyx7/RZXifOUasJRZpSwJrAECkfg+4ugbgAyFpBrqRmmtTb4ygV61RH/qD/s1PvB5upFX7Or0y7DsGVj6/Kd4rlQmiqZw6d9tvGcBYtUVmQ7uzGP8qQvQMHDeKVy/MydtKLVJ3OzoQQFAaWrZthOCGowKqXYKpzuITP2LH74CKdAdw55bc0qlXAwQvrQaHZirHB9V/gOp+u0xzZ9mbgar5cVmxLuaY9SiaHaAYwrGROevJc8upYUHrEGpnT7uuo8EmVcjTyT2MRxLYquqjBBe3Ydzhv5O6iAMXo+a4rr6gTWLUzoXrzdQmnsf+ckhDQbd0SjZdtlmnY1hHjh/q1i+utpfB/4fzyY3NKOoBJ7Fzhm946+DrKMOySbkJmEXwyTPp25fJfAoPNmSJWN1RfD+R8S4IVSrRRYO8Cr+b4YcMwjpiovK8c4mwKHjpTShWP7WKpikTdyc/ekN11UGaaUwbUB+W34MaV4PFDJGRTOTO5HkY+vmYWhXUDQhV0LawIh0p0sWLJtSDeZGzU//XarV8vGilPuOdmgozWKzVSzwRPPGRcIGj/4tRIRHvWQJ5a3BsuDIZEqbMnoQOqCSebo2NTkjVF4O+PUdIlmUoMJ5wM9k8MZ7xkZsxprqspoVH20XkI3lnfMSL2SkFjfQp5Sxzp5TnZpF0sRa1m+hKTBURwqpZw8qwcWdPD/r6qrOwfRqmV0uhP5cnzoZnEHb+B5JJunKYiXY3yQ1qnTDGKkGB5NnTYh3/zECtuH9oxSnZ+B99hES5ddObwhbPc0D39DwTYgIitdAs8zirIbPRM0a1EXwkffAnqVryp1OEEkLieVcMUSQM9STaXDZy/GMgZQtH33r396ON+zaLoxD4Fy5DpGSyEbTNLt4LZaqsfjbFAhk3RcY7E7hMbzi2E0Ve45J70yh5UF5nb1kCiQD+rRly2o4Ud7aMcIUutz2VGIvi7IpcUQxlQrOa268AeMVPJHbw6ixhfj/8CrOnB/mJ0VEL31FcXVE6i687/3RKbg2+88oUAZ/R3JmUMfeXJO5FRI8zlQ8EAIPTu5EwVZ7AI75/WslMfpmkDI1pJPR46LMIOs6KLluOgY1Kzw4g1CdgVZKi+IiHwbymb5VNvZeJ6gZCtJtv2brAInDbf1VIhcwQ8Nc9Z2kIj+ZMLaPrJdTx5/2/PSskUetT6Y+A== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5f5d974-98dc-4869-a0d1-08da4bb47d40 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2022 14:12:59.5492 (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: 5EwC2w73LetbJSynptDlwRW/Ee4lBlV7KyP5NGYXZauLDM/Qd5yXR+AF1lJODq9Du8zY+G+I26wmxhneNyNXMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6347 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds RGB666_1X30_CPADLO, RGB888_1X30_CPADLO, RGB666_1X36_CPADLO and RGB888_1X36_CPADLO bus formats used by i.MX8qm/qxp pixel combiner. The RGB pixels with padding low per component are transmitted on a 30-bit input bus(10-bit per component) from a display controller or a 36-bit output bus(12-bit per component) to a pixel link. Reviewed-by: Robert Foss Reviewed-by: Laurent Pinchart Signed-off-by: Liu Ying --- v8->v9: * No change. v7->v8: * No change. v6->v7: * No change. v5->v6: * Add Laurent's R-b tag. v4->v5: * Add Robert's R-b tag. v3->v4: * No change. v2->v3: * No change. v1->v2: * No change. include/uapi/linux/media-bus-format.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index 0dfc11ee243a..ec3323dbb927 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 0x101e */ +/* RGB - next is 0x1022 */ #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 @@ -59,9 +59,13 @@ #define MEDIA_BUS_FMT_RGB888_3X8_DELTA 0x101d #define MEDIA_BUS_FMT_RGB888_1X7X4_SPWG 0x1011 #define MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA 0x1012 +#define MEDIA_BUS_FMT_RGB666_1X30_CPADLO 0x101e +#define MEDIA_BUS_FMT_RGB888_1X30_CPADLO 0x101f #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_RGB666_1X36_CPADLO 0x1020 +#define MEDIA_BUS_FMT_RGB888_1X36_CPADLO 0x1021 #define MEDIA_BUS_FMT_RGB121212_1X36 0x1019 #define MEDIA_BUS_FMT_RGB161616_1X48 0x101a From patchwork Sat Jun 11 14:14:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 581189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78020C43334 for ; Sat, 11 Jun 2022 14:13:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234143AbiFKONU (ORCPT ); Sat, 11 Jun 2022 10:13:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234098AbiFKONS (ORCPT ); Sat, 11 Jun 2022 10:13:18 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70059.outbound.protection.outlook.com [40.107.7.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBCD864D1E; Sat, 11 Jun 2022 07:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GKGN44ZMM4pCpEYZ0dMnIfslqw5GB1SrZaj3nZuV5HQsGOVpmUCZQjpt0Hzp9SPlAOeq1PC8Fd2bX7OLB6za+jwvCeNbAHSuVkEqK/hAvQcz66vq6mHXoYUSTyQnNPNY3bx9TAGB7xaPAgv2rN38y7sUyHMwWefZvAorz9Jn2MtErtKjNHWiuvXIHtJ1fuQQm+O7kxg7HG5HqPqmCtUQQnAjFyupLoFRiCtkHciAHco7UycGCgZUFNMg5SlGy+l5bpTlMuLbq79MwbIUaZiRqfateSXClb326zsDWXoKkhQwHScbwL3GGsCCG4xNyg2SiaIBs4fesxkTjTTQ/LEVNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e1BfWpm32TObyNwHhWqJTBk5kH+meizE/V6mBV39rBk=; b=RYdqpqE46T1H8z0IuzuMcU/v5MQv2bmbTNtcqRlv5aL4YczWjXTg2o6k8jl/WrAd8MZCXQ6Mgjdt29k6stId3hhpyTTIPUsYxZWFWM/pCDMRmUqEOLEmQbdykZAak8d6nS8Nqau7eM/X6VF1/lH4EdHNYxvdv02znF0JdzzsK0c5W2XgQ5oTgCAGMNTt2nLY6h5cK8d/ecDgkqPZwGNjZfd0conbAOo+RrS6Ah4EsguT1MKsjP5MgwJ4hd/JyOejsDa1CZbz50lxI2X3HUR0RuQM2hA+QYU1alULl7XQydcQ88QHxfyu0a3Upt8Tmonn3s/RqxtdaGU5bDWsKoQkKg== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e1BfWpm32TObyNwHhWqJTBk5kH+meizE/V6mBV39rBk=; b=UivQj9+IGAigSsbW617IxwmyDJZNc7K31r2yGEZrqog2ZE9rQlXvGwBAjSIp8h/l0YbFFhdBC+mqTASa3fTo8F9Ox7MKdGvfuHrL+TBF5x9+nHz328JYbVDAUJ85pOz9l0sr00W1JHekkrDOCMgVGWrLrwRxAuGSmqdBW6inu50= 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 DB8PR04MB6347.eurprd04.prod.outlook.com (2603:10a6:10:107::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Sat, 11 Jun 2022 14:13:12 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502%7]) with mapi id 15.20.5332.016; Sat, 11 Jun 2022 14:13:12 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: andrzej.hajda@intel.com, narmstrong@baylibre.com, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, lee.jones@linaro.org, mchehab@kernel.org, marcel.ziswiler@toradex.com, Rob Herring Subject: [PATCH v9 03/14] dt-bindings: display: bridge: Add i.MX8qm/qxp pixel combiner binding Date: Sat, 11 Jun 2022 22:14:10 +0800 Message-Id: <20220611141421.718743-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220611141421.718743-1-victor.liu@nxp.com> References: <20220611141421.718743-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR03CA0118.apcprd03.prod.outlook.com (2603:1096:4:91::22) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c2d03f43-f249-40a8-7bdb-08da4bb484db X-MS-TrafficTypeDiagnostic: DB8PR04MB6347:EE_ X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 69R4CRbMkFRGJHSwmyjjLfuOtglPpqXEVVeQYX3HV7+mkCZD1i6r2yKcHKeLuCx5xoBM1LkyPa2/+9hWc53oMrawqvPBdIAqI3tDDb6l2fyjxI/YXGkYLRG5mJLJk503hW1OHkO5uCELxivUfjQfv2LXyiHB33u37FERM1v037xzzQvgGFD29F6YS6KSLoxjZx4U7UxT0YSfpxODQmnjKau/MOwgEEoooWSz4FylmjRrLsFu3Ob/ny4xpLqqctZHWCOcn6u6EwVxzDxuMGdlxwfT5E8Pzt3yl0vdMgKK/pcwTbjFI9/6aWb4I6N9wQC1vGZkCRaps48zuEuQpQt3h/8dLXShiOzKZD+QCh1j8Xm4D3kkVOpomMCnzzmvP0jPOH40YnXUe92opqXyFZCKF54QeElFeskd+c9bxsvrf1oEbEn+a6J8W9gafNpUZ3g0Smyw2uvta0Z8bWBWTU3ehWUJmphlNV8onh9zfYxkgcW6n1QM5m2hRSq6wLnqHmUsqIP9lsdb171g9CKMDjaDXtlYq94U+qbFGpeVUlFeipTXgSD+BrL4rpDZHjokuaHBzOQ4xPk+JMmW9wJ4zHM3cIkx3D6NAP0qCRtR86B/Qeftib5jNa+DEY2XBapXI4wsPumrXUDzfILdUBqGTzpQXl+kqBSXh0eT2THACoYrtR2NjdW8OXEdV7H4vkQB+jqz/xXStspuUn3lPBP6VwxkYwm0hHmqrjXQ0+z5HsZstng0jo3BNIcy3/aUDuCZsFy1QCxPg5+8ZGi24sqBjrJeZJntaPF7xKzR2m2HSiOO8w3R2SmZEySdnNH3TjtxoyoxK7RTbI8E95pQO0ZgH+usww== 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:(13230016)(4636009)(366004)(5660300002)(66556008)(66476007)(66946007)(1076003)(4326008)(8676002)(86362001)(316002)(186003)(8936002)(2616005)(7416002)(36756003)(83380400001)(52116002)(38350700002)(38100700002)(6512007)(26005)(966005)(6506007)(508600001)(6486002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vFbO2yMtbQ+mqweMAIRGjaJor6HF6oCfkxsRV5U8++DkIGJmRRHbiAvDFbmVy63n4x4Y7S2TedO5m6aPW/vaGitkQrN7YuGACFJB7otDS8LHl83b7onqDmyEctp1bIifHP25ghM6GcDbhzDof+0DpgnkRlmxz4eOtFTFp2c/E5S9crOCsdp0EAoH0IgQ2svn7OAgEJaqTZBox9R3VY13tk2Glxvjgkt7qiWWvGTjs7vI4aJvCVDrptX406ZJL+2cbjSLm3f40zLl+d3NYOYDinXjdCxpdaQk9fxdNLLV8Gi/mDB08o9g3bgo9j9QHl947V/OGs+9HKzbdv6z1sdQy7lvP1thKHi119fMAEw8v4wGITWazyxg2hrNm0Fj6K1xiB4JD5WugGjAv4Ai7i5jambpEdsi/XqunTGV/D9I5PlhOJ/3oxEbpmzZec54LmcQN6800N3JWp6FY+FfKO+0mxaUcKfDhIVz9gOKL2EUkKLVWL+tqBZp5Jfyi194Cwki+jeY8Kp6vl7g8Ya4MwV0Xmw9mPSjZZxkGkVEDZuHdb5N2k6d6a8EGHVwdOHS5S1ks9acByIal/BTeLT0nAjtmcFcG65cO1R9Py9N9c2vj+HNfj+9DF9666cQ2oDc3l7TxmdS1+JoP4OeHJqxaPEvz4Otpisprl05fOeLymcUhjsCju2K5sq3ceYYAEgK11Kicos1z4VTYeOuDUp1JYelPAuOYviFaKXi/oKV/ytHTGk7Yt+HFnnqZjQl13Ros/dW5WNepfmn1xHVZF2HD2wCxeoWytqnIeLPAZ0h63+x+NDyJHmJQ8OlWHNzZqys+CTMELYcFFX4SokaDDiHetZ51z8k6HBTA3ULVktEMbH+jsxvIQCvQdGe5Ah9rer0SvlMt2/mlBPBCJJLIcFA13dh2g+9klBwPvcAJeAJmpzNiJnf/NgyJBsj2bjIPr9grgl+ef+yROFRsB1nsHcLjuRAcolCEwB2drzuh5CrtkJUhmCMxd+GuTMC0jxLG3wp5QGHE6pZIqYapi6ZfsSl+hEJkQITdm6Bh43w4GQIJbi3nzdp4bIe19JlJzWmHmrIL+rFi9PWhoRiTfxlRkdyzjaDhwSqHefonEKlqQwpHf0mHKsrzM7LDAx9zcxIIE1FsbKs56I3XDKsMzypP1WrwnGV0g7gwBMv5oIKQi1ClaKoRbJNH0qbyyqPWuchTXhJDIYv5Owq5Zw7B2Y5pBtqDqem5Lf8kNcKwf/k2OS30EXy7lK1vCeLVYks5kd30V/+L2bTP2E/7axf4g7Y3ecpktOg6aKQl8ZVMf1vZT4TaSbvFhpO7wYIez30hWwRpwfB8jc3J3ioeoJ6Kxch50eLuNAwX55anbzIM5gCxAtyXAgfeFk6CHAL5oB8OavI8iD4vQv+BwL9Vj/pfKdFaZg8OVNPTtwd6WKeBMONhHiswnwkMoV3TUQefanFEOT13wZ2EqeTiVcYWUYZh35iU4lh7ZR4lilMHnSWOyaFE7BTVxBAXXoGk+VVSRTpElAn0XWcEqezt86vZAMvZ/2O5aJ7h+4rGDGMQCqLD7YR62XuqHq8jbgq+D4cFArdI+m2Uf075xMr3v2CzcAS4VbFS1+P5Y/t2TxrmUOqz/vHfCnStAvj5GNQT11a9jO/ybxhbF4fMoTmkN8qRlZT8Z8tN5YDj4HgbVa5HTtn7K0swMdvjlomp7reUEmTCJgvraP1n/TMNQ2kRSqXzcJIetd82gbQYFtvqg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2d03f43-f249-40a8-7bdb-08da4bb484db X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2022 14:13:12.3862 (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: F7WWj6DHAsLcnC9CGvg/i2MUAdYBYfAKTy8D2SuUANu5q9Kz0DmeBAI1BW3j9WJjyqG8YSDJaci+VUrdvv+GdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6347 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds bindings for i.MX8qm/qxp pixel combiner. Reviewed-by: Rob Herring Signed-off-by: Liu Ying --- v8->v9: * No change. v7->v8: * No change. v6->v7: * No change. v5->v6: * No change. v4->v5: * No change. v3->v4: * No change. v2->v3: * Add Rob's R-b tag. v1->v2: * Use graph schema. (Laurent) * Use enum instead of oneOf + const for the reg property of pixel combiner channels. (Rob) .../bridge/fsl,imx8qxp-pixel-combiner.yaml | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-combiner.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-combiner.yaml b/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-combiner.yaml new file mode 100644 index 000000000000..50bae2122183 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-combiner.yaml @@ -0,0 +1,144 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/fsl,imx8qxp-pixel-combiner.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qm/qxp Pixel Combiner + +maintainers: + - Liu Ying + +description: | + The Freescale i.MX8qm/qxp Pixel Combiner takes two output streams from a + single display controller and manipulates the two streams to support a number + of modes(bypass, pixel combine, YUV444 to YUV422, split_RGB) configured as + either one screen, two screens, or virtual screens. The pixel combiner is + also responsible for generating some of the control signals for the pixel link + output channel. + +properties: + compatible: + enum: + - fsl,imx8qm-pixel-combiner + - fsl,imx8qxp-pixel-combiner + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: apb + + power-domains: + maxItems: 1 + +patternProperties: + "^channel@[0-1]$": + type: object + description: Represents a display stream of pixel combiner. + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + reg: + description: The display stream index. + enum: [ 0, 1 ] + + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Input endpoint of the display stream. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Output endpoint of the display stream. + + required: + - "#address-cells" + - "#size-cells" + - reg + - port@0 + - port@1 + + additionalProperties: false + +required: + - compatible + - "#address-cells" + - "#size-cells" + - reg + - clocks + - clock-names + - power-domains + +additionalProperties: false + +examples: + - | + #include + #include + pixel-combiner@56020000 { + compatible = "fsl,imx8qxp-pixel-combiner"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x56020000 0x10000>; + clocks = <&dc0_pixel_combiner_lpcg IMX_LPCG_CLK_4>; + clock-names = "apb"; + power-domains = <&pd IMX_SC_R_DC_0>; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + port@0 { + reg = <0>; + + dc0_pixel_combiner_ch0_dc0_dpu_disp0: endpoint { + remote-endpoint = <&dc0_dpu_disp0_dc0_pixel_combiner_ch0>; + }; + }; + + port@1 { + reg = <1>; + + dc0_pixel_combiner_ch0_dc0_pixel_link0: endpoint { + remote-endpoint = <&dc0_pixel_link0_dc0_pixel_combiner_ch0>; + }; + }; + }; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + port@0 { + reg = <0>; + + dc0_pixel_combiner_ch1_dc0_dpu_disp1: endpoint { + remote-endpoint = <&dc0_dpu_disp1_dc0_pixel_combiner_ch1>; + }; + }; + + port@1 { + reg = <1>; + + dc0_pixel_combiner_ch1_dc0_pixel_link1: endpoint { + remote-endpoint = <&dc0_pixel_link1_dc0_pixel_combiner_ch1>; + }; + }; + }; + }; From patchwork Sat Jun 11 14:14:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 581184 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58EAFCCA47E for ; Sat, 11 Jun 2022 14:15:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234237AbiFKOP0 (ORCPT ); Sat, 11 Jun 2022 10:15:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234681AbiFKONX (ORCPT ); Sat, 11 Jun 2022 10:13:23 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70074.outbound.protection.outlook.com [40.107.7.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B83F5403CF; Sat, 11 Jun 2022 07:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MAE/Iwchmjer9KAAeJHqtiAr6mf/W8+yn1nJSlun05+Jo0A1JTxE8YrtrilRWSQC+w/qS6aM0JwOSBxIUiBIKGSQwPw0Xw7So0S7TJv/heJ5C7m4NfgCe2OCUtVUFL8LDsNt88Ifi/YBsMt/GTbNo51lx9iFYsnAXtxhfxJ1nSlBsLeNEEEqssEGDVHOjVSw/oyYOy8Ln0bet7HMfrI8d2VgRK1mpqL/yIhKQfTZiurx2KlYDyfhuUbn0HA+vF4O83uWF4DpMB28VY9vmNIFT6ZgsElEqOdebqqoqMxhdY5aHDFvbW/+uXf6Y40EmzQAu/C8K/6C0RC/pBXMD/pmzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=j0IbIvxeaH5gt9hya9F+OOaqffXJf4kP1nnlR/O0hFw=; b=mMzVUtQzuPAaTmBO+xev0qI6zNvU5qJZEReteAuXCQoOUf0iqf5DHYQV4FTQfY9tIej5KkzynUDkJnF/P7n/7PzQ87GVoc9AuDiBsueOVZgVUkxeLRPARlydeF8Upnnb+expdiBd8LrgTB3uBzPDqVv5IX5a3xqwAqImhmQdz7Iq7iiGx9s8hstZpWlMV09FQPem4EZ0mIy1g6lnb1OGZmLmcjifXhIynYILevy9gc9M1eYg/kvPpb5CVJ/mGSji9fmHN4a/gqtrtSskkQHm2rxOjnjiB0Vip+GChd7vYLcZ/1PjOy9CfAH5lUGiK3vEIKAfaSQ9mCvzw+mXc298hA== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j0IbIvxeaH5gt9hya9F+OOaqffXJf4kP1nnlR/O0hFw=; b=gM5K8cQyi7HybufttxXLWve/PGwl5do3obY10S58k73ogbSM+BtGAlTtlz8AMq7bWb25AAfeaZecoS5H1H9FFeYwVxwOnPukH4hckGUKrHcrR5qu/hpKkn3zb9XOvUEkW+rcMeCElDkoZjpIwrauaRajMl++mOs++07QMtgrmlU= 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 DB8PR04MB6347.eurprd04.prod.outlook.com (2603:10a6:10:107::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Sat, 11 Jun 2022 14:13:18 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502%7]) with mapi id 15.20.5332.016; Sat, 11 Jun 2022 14:13:18 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: andrzej.hajda@intel.com, narmstrong@baylibre.com, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, lee.jones@linaro.org, mchehab@kernel.org, marcel.ziswiler@toradex.com Subject: [PATCH v9 04/14] drm/bridge: imx: Add i.MX8qm/qxp pixel combiner support Date: Sat, 11 Jun 2022 22:14:11 +0800 Message-Id: <20220611141421.718743-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220611141421.718743-1-victor.liu@nxp.com> References: <20220611141421.718743-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR03CA0118.apcprd03.prod.outlook.com (2603:1096:4:91::22) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6491c68a-7f00-45e8-438e-08da4bb48893 X-MS-TrafficTypeDiagnostic: DB8PR04MB6347:EE_ X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7ELrVNKzLiQms8FJuKYfjcLxvLc8mNDu5OOzHFDWcN25n4fUz00SdzjXV6TK+xVo+fjKsQCnKkipbC1jIOBj7TGoCK1kkG+jIXc7fiC89/3aukDOOzfZTExq/OuuOUIzC8qQVTbjLoXQlBhZkMMTRfCYe75smg0H5G7mV1DEO9IZuKI7r3QwiYYqZu1cfCtGTGP5tlbPcnt9dsq3WiMktWdD7ca9L9pCDS7C3K6xnmU6x4lq31eFF1WtcNnjdSG5a5Kys1Hob6RS3xoX9Ub8G5w0eJ8DKy9eiHbfrAM8pL/7ik+ldzpOWYUdbF2IS7V/Si5FJX3waOW9YCihVbzBuUk4Nb98tMEbrVRu7k7C2rN0PrjMPL2Y+L8mIYMQpOlOIHfI6TdhxNXPaKu5AdfGh0FqI6SN33nRunWWhKciKj5P4GtnFpK6ql2RrZK2Cs54tjaqYarfpC/j2JSSkKh+h4jreDwFKSOicyVKwCUWas0fgCx3nQvoOG5G/eQmiifPgdKbxInEICJSfL/Wr1Lpk0yPYSNwfN4L5FE//fZJgdJoZENuaoM64FagtXbJ6Y+0b29bTWqhDbo0g/7mGjG3M67MEdwTxGssUJMy5mBpoxIq5eNgZnuhE4bW+jzrtC1liqfy8QiWrVUxEGKoVbpyzgGEoHxY+4tFJOcPGEXLq7+vjKWWwgi4GzYV+QyIwdfw5yZpwZ7G9dcdp8moxgNMtQ== 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:(13230016)(4636009)(366004)(5660300002)(66556008)(66476007)(66946007)(1076003)(4326008)(8676002)(86362001)(316002)(186003)(8936002)(2616005)(7416002)(30864003)(36756003)(83380400001)(52116002)(38350700002)(38100700002)(6512007)(26005)(6506007)(6666004)(508600001)(6486002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: r8+qIEJfCqzyOUX14Dj/c5VMZmbjRexIRw6XuCMvix6zBtqTqfFyp1vFV6F+OCwypnuYTty13Iu+BKUfhMW74dWStgQZ17LdDug3sYUMkK5suTHaxPyCQ2jsfonXSHKVPL9cJ51sL3aFfv93MULrGqfcaLQk2CI315PLvprwqOuGZcYmsi09optW9zwzwmS5aTmLvre0fIWSKXMvLbQ2PjCVswxTmlrIQNlZipOEeHCAunZIdml3IyEfDAEQ/FgoM9fISDx81+AUKafSuwfNYBZ8LKEv6NE/w7yLG7gybgXQ8MCI/hMu4f2xZ3I+rhe5UlhTG7ZLglqOsM9CQ9XnZVqDU0NrNjxclj6Bz+BX1lI7EffyBE024zrPmwYsDFCO0TjXGZgDzWd60yRaEyfuXLyqbt/qoUE+6oPiTtivTEpeP2NXsymTEPyZDzRUHBxOQGdHjaovrYPGEjLFAb+9a6FHmzTCxKu9U8QZADHaPuHFr99IAQS8gm0YUPRNcpc3qP5QvEJhwKWp+v3hmSm2Aqemtw8qAFkR3IY8mbF0Xc1Gy7Q75MxNMeVjU7jYGX/8vKRxi3inBCf5M2HLkPyfOicJ4/YfNPpY3UCepM4HHkMDbtIITK3yE/wMgIfL4QORwQtf8rQV7iQ7hPiaQcCpgxSojW3xnUpGvVQFupCh/2vX0aV1sZ/QYWh7BWn1nV/aEEuii4EVZLymkvrkR8RIw6pd32rRAoUx1Q2VHWFfM4X7W5/6VcmkZjSiZYE8zz+HAY5TsgM1MD5kQNur19ClJ8TZfuLcZSVxXfD+r7gDtqkp0QhYsXDSbrJ4upxG0pBFHS83D/+KSIQ5rNzQCWvuVGL8HrJPPyarHjouRpNdrp0f8jE3NMhGWJhekGbJsC81BaOjbw3oQSyjxEocO8QepVJT+zqJpmYcu3/qVYiCd++6FHmb/slfv3b3KUeNXcRpoJZxRsMThxIheFkBQFE2XkPdwJWSeMwrf5lOAma5yhrfiOsMKB2TkiokLqrev6mtCZezqqGphwR8Fmtm5RJYfH8Tdj650vyYHv1yYsrRF5IyvGMgWwZLmv/RSp8APnKwmSdRo+DIuxfw6KIU6T8S2JZV2zy6E2JU27PDTlUghi8lzaSJ4C7FtkKAj+/HykCkaAQV7+WJ2kSik/s52CBkZFSFdCt94yT88MMFC5aSadpGhJKGt++xRDRkW5V0O4lOGBbMPCItNLRcdhnOcTZAV39BJtADh5Llh9rRSuLp418aI5jMiY8wR6yU3d8nRrUFpGCsom9nDX9cee0VlVR787x1B/s6c/3vihGKo1dgEf8PP0ecDz0LdtYbPZVXH6UDrCtJRnHdYlbGWUw6k/xPdMGOTENzdLTF0G51InYPGpk79QA9bMAIH4s3p3DOCwffkt7kggkDUBeq7slfvarczghZ0CnsnezJzJ5XLa5ZCBsqA2QXsN0cZOkUvsyel9EzX9jg2SNzP7oBvnMIwn6WgrfqJTVM0pWWUlDlSBhwgsWV8EYhXPLhekj96UPhuNHczBektptnMEdyDVKAmdW0klXCzOKlRhGDT3FzROZfXjdCO7SVPN4l206OfFA80kLHLKd8/teA3tVVRg9wA8+J1q2Six6ZXVma44Eaxb6mrGRkWyBeS6/eLUiS+BeDYXSweNK79eeW4yRczn62Qhi7voqQVhcOAho1pXEZZzaZ2oAvBYZbHjWySYx0ksHWjcnnSuxZ5/T8DYPR1FJRwKWVWg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6491c68a-7f00-45e8-438e-08da4bb48893 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2022 14:13:18.6082 (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: QlJ5LqogWC6mQQMyvthkr2mnHYMJur9nhhf8QHNleZtQLenh5fzddfMPBCM5JdW/1pF32riDDvIqApr+HFbETQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6347 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds a drm bridge driver for i.MX8qm/qxp pixel combiner. The pixel combiner takes two output streams from a single display controller and manipulates the two streams to support a number of modes(bypass, pixel combine, YUV444 to YUV422, split_RGB) configured as either one screen, two screens, or virtual screens. The pixel combiner is also responsible for generating some of the control signals for the pixel link output channel. For now, the driver only supports the bypass mode. Reviewed-by: Robert Foss Tested-by: Marcel Ziswiler # Colibri iMX8X, LT170410-2WHC, LP156WF1 Signed-off-by: Liu Ying --- Robert, I keep your R-b tag from v5. Let me know if you want me to drop it, as v7 contains a fix for checkpatch complaints. Marcel, as the fix is trivial, I add your T-b tag. Let me know if you want me to drop it. v8->v9: * No change. v7->v8: * No change. v6->v7: * Fix 'Alignment should match open parenthesis' complaints from 'checkpatch.pl --strict'. * Add Marcel's T-b tag. v5->v6: * No change. v4->v5: * Drop the 'PC_BUF_PARA_REG' register definition. (Robert) * Add Robert's R-b tag. v3->v4: * No change. v2->v3: * No change. v1->v2: * No change. drivers/gpu/drm/bridge/Kconfig | 2 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/imx/Kconfig | 8 + drivers/gpu/drm/bridge/imx/Makefile | 1 + .../drm/bridge/imx/imx8qxp-pixel-combiner.c | 448 ++++++++++++++++++ 5 files changed, 460 insertions(+) create mode 100644 drivers/gpu/drm/bridge/imx/Kconfig create mode 100644 drivers/gpu/drm/bridge/imx/Makefile create mode 100644 drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 307b135da2f6..236a1342a390 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -366,6 +366,8 @@ source "drivers/gpu/drm/bridge/adv7511/Kconfig" source "drivers/gpu/drm/bridge/cadence/Kconfig" +source "drivers/gpu/drm/bridge/imx/Kconfig" + source "drivers/gpu/drm/bridge/synopsys/Kconfig" endmenu diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index f6c0a95de549..d15c86e14243 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -35,4 +35,5 @@ obj-$(CONFIG_DRM_ITE_IT66121) += ite-it66121.o obj-y += analogix/ obj-y += cadence/ +obj-y += imx/ obj-y += synopsys/ diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig new file mode 100644 index 000000000000..f1c91b6814a5 --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -0,0 +1,8 @@ +config DRM_IMX8QXP_PIXEL_COMBINER + tristate "Freescale i.MX8QM/QXP pixel combiner" + depends on OF + depends on COMMON_CLK + select DRM_KMS_HELPER + help + Choose this to enable pixel combiner found in + Freescale i.MX8qm/qxp processors. diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/imx/Makefile new file mode 100644 index 000000000000..7d7c8d674bf0 --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_DRM_IMX8QXP_PIXEL_COMBINER) += imx8qxp-pixel-combiner.o diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c new file mode 100644 index 000000000000..86ae98a211b4 --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c @@ -0,0 +1,448 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* + * Copyright 2020 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define PC_CTRL_REG 0x0 +#define PC_COMBINE_ENABLE BIT(0) +#define PC_DISP_BYPASS(n) BIT(1 + 21 * (n)) +#define PC_DISP_HSYNC_POLARITY(n) BIT(2 + 11 * (n)) +#define PC_DISP_HSYNC_POLARITY_POS(n) DISP_HSYNC_POLARITY(n) +#define PC_DISP_VSYNC_POLARITY(n) BIT(3 + 11 * (n)) +#define PC_DISP_VSYNC_POLARITY_POS(n) DISP_VSYNC_POLARITY(n) +#define PC_DISP_DVALID_POLARITY(n) BIT(4 + 11 * (n)) +#define PC_DISP_DVALID_POLARITY_POS(n) DISP_DVALID_POLARITY(n) +#define PC_VSYNC_MASK_ENABLE BIT(5) +#define PC_SKIP_MODE BIT(6) +#define PC_SKIP_NUMBER_MASK GENMASK(12, 7) +#define PC_SKIP_NUMBER(n) FIELD_PREP(PC_SKIP_NUMBER_MASK, (n)) +#define PC_DISP0_PIX_DATA_FORMAT_MASK GENMASK(18, 16) +#define PC_DISP0_PIX_DATA_FORMAT(fmt) \ + FIELD_PREP(PC_DISP0_PIX_DATA_FORMAT_MASK, (fmt)) +#define PC_DISP1_PIX_DATA_FORMAT_MASK GENMASK(21, 19) +#define PC_DISP1_PIX_DATA_FORMAT(fmt) \ + FIELD_PREP(PC_DISP1_PIX_DATA_FORMAT_MASK, (fmt)) + +#define PC_SW_RESET_REG 0x20 +#define PC_SW_RESET_N BIT(0) +#define PC_DISP_SW_RESET_N(n) BIT(1 + (n)) +#define PC_FULL_RESET_N (PC_SW_RESET_N | \ + PC_DISP_SW_RESET_N(0) | \ + PC_DISP_SW_RESET_N(1)) + +#define PC_REG_SET 0x4 +#define PC_REG_CLR 0x8 + +#define DRIVER_NAME "imx8qxp-pixel-combiner" + +enum imx8qxp_pc_pix_data_format { + RGB, + YUV444, + YUV422, + SPLIT_RGB, +}; + +struct imx8qxp_pc_channel { + struct drm_bridge bridge; + struct drm_bridge *next_bridge; + struct imx8qxp_pc *pc; + unsigned int stream_id; + bool is_available; +}; + +struct imx8qxp_pc { + struct device *dev; + struct imx8qxp_pc_channel ch[2]; + struct clk *clk_apb; + void __iomem *base; +}; + +static inline u32 imx8qxp_pc_read(struct imx8qxp_pc *pc, unsigned int offset) +{ + return readl(pc->base + offset); +} + +static inline void +imx8qxp_pc_write(struct imx8qxp_pc *pc, unsigned int offset, u32 value) +{ + writel(value, pc->base + offset); +} + +static inline void +imx8qxp_pc_write_set(struct imx8qxp_pc *pc, unsigned int offset, u32 value) +{ + imx8qxp_pc_write(pc, offset + PC_REG_SET, value); +} + +static inline void +imx8qxp_pc_write_clr(struct imx8qxp_pc *pc, unsigned int offset, u32 value) +{ + imx8qxp_pc_write(pc, offset + PC_REG_CLR, value); +} + +static enum drm_mode_status +imx8qxp_pc_bridge_mode_valid(struct drm_bridge *bridge, + const struct drm_display_info *info, + const struct drm_display_mode *mode) +{ + if (mode->hdisplay > 2560) + return MODE_BAD_HVALUE; + + return MODE_OK; +} + +static int imx8qxp_pc_bridge_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) +{ + struct imx8qxp_pc_channel *ch = bridge->driver_private; + struct imx8qxp_pc *pc = ch->pc; + + if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)) { + DRM_DEV_ERROR(pc->dev, + "do not support creating a drm_connector\n"); + return -EINVAL; + } + + if (!bridge->encoder) { + DRM_DEV_ERROR(pc->dev, "missing encoder\n"); + return -ENODEV; + } + + return drm_bridge_attach(bridge->encoder, + ch->next_bridge, bridge, + DRM_BRIDGE_ATTACH_NO_CONNECTOR); +} + +static void +imx8qxp_pc_bridge_mode_set(struct drm_bridge *bridge, + const struct drm_display_mode *mode, + const struct drm_display_mode *adjusted_mode) +{ + struct imx8qxp_pc_channel *ch = bridge->driver_private; + struct imx8qxp_pc *pc = ch->pc; + u32 val; + int ret; + + ret = pm_runtime_get_sync(pc->dev); + if (ret < 0) + DRM_DEV_ERROR(pc->dev, + "failed to get runtime PM sync: %d\n", ret); + + ret = clk_prepare_enable(pc->clk_apb); + if (ret) + DRM_DEV_ERROR(pc->dev, "%s: failed to enable apb clock: %d\n", + __func__, ret); + + /* HSYNC to pixel link is active low. */ + imx8qxp_pc_write_clr(pc, PC_CTRL_REG, + PC_DISP_HSYNC_POLARITY(ch->stream_id)); + + /* VSYNC to pixel link is active low. */ + imx8qxp_pc_write_clr(pc, PC_CTRL_REG, + PC_DISP_VSYNC_POLARITY(ch->stream_id)); + + /* Data enable to pixel link is active high. */ + imx8qxp_pc_write_set(pc, PC_CTRL_REG, + PC_DISP_DVALID_POLARITY(ch->stream_id)); + + /* Mask the first frame output which may be incomplete. */ + imx8qxp_pc_write_set(pc, PC_CTRL_REG, PC_VSYNC_MASK_ENABLE); + + /* Only support RGB currently. */ + val = imx8qxp_pc_read(pc, PC_CTRL_REG); + if (ch->stream_id == 0) { + val &= ~PC_DISP0_PIX_DATA_FORMAT_MASK; + val |= PC_DISP0_PIX_DATA_FORMAT(RGB); + } else { + val &= ~PC_DISP1_PIX_DATA_FORMAT_MASK; + val |= PC_DISP1_PIX_DATA_FORMAT(RGB); + } + imx8qxp_pc_write(pc, PC_CTRL_REG, val); + + /* Only support bypass mode currently. */ + imx8qxp_pc_write_set(pc, PC_CTRL_REG, PC_DISP_BYPASS(ch->stream_id)); + + clk_disable_unprepare(pc->clk_apb); +} + +static void +imx8qxp_pc_bridge_atomic_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) +{ + struct imx8qxp_pc_channel *ch = bridge->driver_private; + struct imx8qxp_pc *pc = ch->pc; + int ret; + + ret = pm_runtime_put(pc->dev); + if (ret < 0) + DRM_DEV_ERROR(pc->dev, "failed to put runtime PM: %d\n", ret); +} + +static const u32 imx8qxp_pc_bus_output_fmts[] = { + MEDIA_BUS_FMT_RGB888_1X36_CPADLO, + MEDIA_BUS_FMT_RGB666_1X36_CPADLO, +}; + +static bool imx8qxp_pc_bus_output_fmt_supported(u32 fmt) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(imx8qxp_pc_bus_output_fmts); i++) { + if (imx8qxp_pc_bus_output_fmts[i] == fmt) + return true; + } + + return false; +} + +static u32 * +imx8qxp_pc_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) +{ + u32 *input_fmts; + + if (!imx8qxp_pc_bus_output_fmt_supported(output_fmt)) + return NULL; + + *num_input_fmts = 1; + + input_fmts = kmalloc(sizeof(*input_fmts), GFP_KERNEL); + if (!input_fmts) + return NULL; + + switch (output_fmt) { + case MEDIA_BUS_FMT_RGB888_1X36_CPADLO: + input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X30_CPADLO; + break; + case MEDIA_BUS_FMT_RGB666_1X36_CPADLO: + input_fmts[0] = MEDIA_BUS_FMT_RGB666_1X30_CPADLO; + break; + default: + kfree(input_fmts); + input_fmts = NULL; + break; + } + + return input_fmts; +} + +static u32 * +imx8qxp_pc_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state, + unsigned int *num_output_fmts) +{ + *num_output_fmts = ARRAY_SIZE(imx8qxp_pc_bus_output_fmts); + return kmemdup(imx8qxp_pc_bus_output_fmts, + sizeof(imx8qxp_pc_bus_output_fmts), GFP_KERNEL); +} + +static const struct drm_bridge_funcs imx8qxp_pc_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, + .mode_valid = imx8qxp_pc_bridge_mode_valid, + .attach = imx8qxp_pc_bridge_attach, + .mode_set = imx8qxp_pc_bridge_mode_set, + .atomic_disable = imx8qxp_pc_bridge_atomic_disable, + .atomic_get_input_bus_fmts = + imx8qxp_pc_bridge_atomic_get_input_bus_fmts, + .atomic_get_output_bus_fmts = + imx8qxp_pc_bridge_atomic_get_output_bus_fmts, +}; + +static int imx8qxp_pc_bridge_probe(struct platform_device *pdev) +{ + struct imx8qxp_pc *pc; + struct imx8qxp_pc_channel *ch; + struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; + struct device_node *child, *remote; + u32 i; + int ret; + + pc = devm_kzalloc(dev, sizeof(*pc), GFP_KERNEL); + if (!pc) + return -ENOMEM; + + pc->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pc->base)) + return PTR_ERR(pc->base); + + pc->dev = dev; + + pc->clk_apb = devm_clk_get(dev, "apb"); + if (IS_ERR(pc->clk_apb)) { + ret = PTR_ERR(pc->clk_apb); + if (ret != -EPROBE_DEFER) + DRM_DEV_ERROR(dev, "failed to get apb clock: %d\n", ret); + return ret; + } + + platform_set_drvdata(pdev, pc); + pm_runtime_enable(dev); + + for_each_available_child_of_node(np, child) { + ret = of_property_read_u32(child, "reg", &i); + if (ret || i > 1) { + ret = -EINVAL; + DRM_DEV_ERROR(dev, + "invalid channel(%u) node address\n", i); + goto free_child; + } + + ch = &pc->ch[i]; + ch->pc = pc; + ch->stream_id = i; + + remote = of_graph_get_remote_node(child, 1, 0); + if (!remote) { + ret = -ENODEV; + DRM_DEV_ERROR(dev, + "channel%u failed to get port1's remote node: %d\n", + i, ret); + goto free_child; + } + + ch->next_bridge = of_drm_find_bridge(remote); + if (!ch->next_bridge) { + of_node_put(remote); + ret = -EPROBE_DEFER; + DRM_DEV_DEBUG_DRIVER(dev, + "channel%u failed to find next bridge: %d\n", + i, ret); + goto free_child; + } + + of_node_put(remote); + + ch->bridge.driver_private = ch; + ch->bridge.funcs = &imx8qxp_pc_bridge_funcs; + ch->bridge.of_node = child; + ch->is_available = true; + + drm_bridge_add(&ch->bridge); + } + + return 0; + +free_child: + of_node_put(child); + + if (i == 1 && pc->ch[0].next_bridge) + drm_bridge_remove(&pc->ch[0].bridge); + + pm_runtime_disable(dev); + return ret; +} + +static int imx8qxp_pc_bridge_remove(struct platform_device *pdev) +{ + struct imx8qxp_pc *pc = platform_get_drvdata(pdev); + struct imx8qxp_pc_channel *ch; + int i; + + for (i = 0; i < 2; i++) { + ch = &pc->ch[i]; + + if (!ch->is_available) + continue; + + drm_bridge_remove(&ch->bridge); + ch->is_available = false; + } + + pm_runtime_disable(&pdev->dev); + + return 0; +} + +static int __maybe_unused imx8qxp_pc_runtime_suspend(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct imx8qxp_pc *pc = platform_get_drvdata(pdev); + int ret; + + ret = clk_prepare_enable(pc->clk_apb); + if (ret) + DRM_DEV_ERROR(pc->dev, "%s: failed to enable apb clock: %d\n", + __func__, ret); + + /* Disable pixel combiner by full reset. */ + imx8qxp_pc_write_clr(pc, PC_SW_RESET_REG, PC_FULL_RESET_N); + + clk_disable_unprepare(pc->clk_apb); + + /* Ensure the reset takes effect. */ + usleep_range(10, 20); + + return ret; +} + +static int __maybe_unused imx8qxp_pc_runtime_resume(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct imx8qxp_pc *pc = platform_get_drvdata(pdev); + int ret; + + ret = clk_prepare_enable(pc->clk_apb); + if (ret) { + DRM_DEV_ERROR(pc->dev, "%s: failed to enable apb clock: %d\n", + __func__, ret); + return ret; + } + + /* out of reset */ + imx8qxp_pc_write_set(pc, PC_SW_RESET_REG, PC_FULL_RESET_N); + + clk_disable_unprepare(pc->clk_apb); + + return ret; +} + +static const struct dev_pm_ops imx8qxp_pc_pm_ops = { + SET_RUNTIME_PM_OPS(imx8qxp_pc_runtime_suspend, + imx8qxp_pc_runtime_resume, NULL) +}; + +static const struct of_device_id imx8qxp_pc_dt_ids[] = { + { .compatible = "fsl,imx8qm-pixel-combiner", }, + { .compatible = "fsl,imx8qxp-pixel-combiner", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, imx8qxp_pc_dt_ids); + +static struct platform_driver imx8qxp_pc_bridge_driver = { + .probe = imx8qxp_pc_bridge_probe, + .remove = imx8qxp_pc_bridge_remove, + .driver = { + .pm = &imx8qxp_pc_pm_ops, + .name = DRIVER_NAME, + .of_match_table = imx8qxp_pc_dt_ids, + }, +}; +module_platform_driver(imx8qxp_pc_bridge_driver); + +MODULE_DESCRIPTION("i.MX8QM/QXP pixel combiner bridge driver"); +MODULE_AUTHOR("Liu Ying "); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRIVER_NAME); From patchwork Sat Jun 11 14:14:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 581188 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB97FCCA47C for ; Sat, 11 Jun 2022 14:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235075AbiFKONw (ORCPT ); Sat, 11 Jun 2022 10:13:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235389AbiFKONm (ORCPT ); Sat, 11 Jun 2022 10:13:42 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70050.outbound.protection.outlook.com [40.107.7.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D3094754D; Sat, 11 Jun 2022 07:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hyId5QxWH0y12LNXBVirka+pGFiWgshoXayu7Gy7tQ+i2trkZsIjDTjbmEDeoHwWoCPWFTqHVCB3UNuRblVgNvw77AuiS7HunIx3NDS5udqQnL2N77pzbb/z8stA68iL3pTSlmxPsjeeJpeZNlPhMraq8s6G91lPGCdGWzHs1N0Calmcnbwd/BaLWAeoqN2rTFlj099r18x+6RbPnaRVwgmFKi8p+n/0D3/BRW1KyK+N+H/zSxEpn7OdZlH+7es6T11b7J5bVmyfH+s0Hi/5h+xX9YGABejvYi48fjVQD+2kW4f47MdtG3ySvud3yJjeFWhRIriuaTiuHwR8arYWDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=g/0pOCAE6KiSH8FeMTDOJZD4jYaFoaD2kRh+MtNrlaA=; b=GFpvMLhUY+FqPHdPa14kCqgdEO80G/pFqf2l8kbn5MfjfHD81iimhRCYWPoKMrBTdyCcTIDfQQPl2RbbbaQD1O+eo9bp2PiHH+nP03ec5xoZM4fl/eSopEl4fI6LiNuk/f2JYBLBE+2ed4vUdXXuk4VYudabwnG/G221Y7ur+Xx85fu7Q08NDkXM5YJhPb1da4AhZJ3XzoCXo9xb1xPWRQlXbH8UPR7PYvbjStKmGI1cEuqFW7JY6cw0gsCEi/jRaLzHrdvzXVwT3Bk1jdBOtEFdE/19z3ogUJD9ylu6Xgi+A2OdwuZn7bo26PQX+v/5olHxA7qP/tyWRyP52mZfWQ== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g/0pOCAE6KiSH8FeMTDOJZD4jYaFoaD2kRh+MtNrlaA=; b=BjjKy4TV6APTwtOWYFKhH+0cVS7KIkAy2So/saGPBFyC7cDRX4lFc52In3+5E+IlHfEGodNSBN7+LvMaWVMBOFOMclzbUCMkPIPl2P4Eq+GXvCM02Go/dUwEM0aaHBtqOmbAghtW8uZ7E3qUEY8ggJFgGHH9lX7A6m5bi3ShvCo= 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 DB8PR04MB6347.eurprd04.prod.outlook.com (2603:10a6:10:107::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Sat, 11 Jun 2022 14:13:37 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502%7]) with mapi id 15.20.5332.016; Sat, 11 Jun 2022 14:13:37 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: andrzej.hajda@intel.com, narmstrong@baylibre.com, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, lee.jones@linaro.org, mchehab@kernel.org, marcel.ziswiler@toradex.com, Rob Herring Subject: [PATCH v9 07/14] dt-bindings: display: bridge: Add i.MX8qxp pixel link to DPI binding Date: Sat, 11 Jun 2022 22:14:14 +0800 Message-Id: <20220611141421.718743-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220611141421.718743-1-victor.liu@nxp.com> References: <20220611141421.718743-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR03CA0118.apcprd03.prod.outlook.com (2603:1096:4:91::22) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: be87a9b6-d69b-4bee-76c1-08da4bb493bd X-MS-TrafficTypeDiagnostic: DB8PR04MB6347:EE_ X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F43BbUTtYc90wBntw/VyEJexy8UBgTvE4PrwhS9oeTr1Qy3vWNE0stpEtccrls9pLKMgdk0fQ6umRY+FRxnJsK/whalYtGTQczaJeoGmEP2yBrJCMnc5WghUL51+HXIyOb9K7lG7u4J/gX/ix55iIif1qmsBDNyGeAoGTeMi0mEWx/065Gc5ZmX7TiLEXjwC/XQ/xCr2F3iaUUe3Zi3r1xNpFzEbDKSUrUvivEhdPPRCwVY9UrDGmUjbql8Hk6xNQeECsHadAiTMELGqAMlYqhzqJOdmRoN+WZ93qq0+s3M3MRaS6O43aNQxLbpjGZK3TF2VibptKYthR+tRpef6J/noQpkUCU3E6QpBQOrxvHI3FfXl2xDoOETXQVG9PG5ve7i7eXkIJ11zhazqI373YJpJxxjkChDwBmB5GCn67d1B88vRVn20/4pyIG7pjgBYVi1OQNPy2jsjmjTwEcIsTI9rsgj+lh5TqeMr6c9TCc70oiJ1mYU9mJtPKH27vEBQrPrr+IvQGrEdNrQyKx+tKHN4csQZo/Y5XzZmKICLB9aDoOw83h8XULVh2fKDfXu1x3C/ON3qKBe0M71PAQ86+fPtM2dJXrOB9xElk35QqaD27hZ4cHPICLLMM3WRzektqKU6fq5o/DQ6F5C4S6dh0T/7+kuUHol63P12ONGm/uDFh0CJXZGQ+5mKZsmVDJFc8sqSRmIgLIUqPfeqBnxLh4yOiU36BLZbnrnF5s2/jatMZ7xJvgMHxr4CMSjmYNgwBJVsntScI1WwlpYbtB1TxIEvWAWryFvxw4KTGcURrYAXkLWJr+GcdU9c061Q8EmH 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:(13230016)(4636009)(366004)(5660300002)(66556008)(66476007)(66946007)(1076003)(4326008)(8676002)(86362001)(316002)(186003)(8936002)(2616005)(7416002)(36756003)(52116002)(38350700002)(38100700002)(6512007)(26005)(966005)(6506007)(6666004)(508600001)(6486002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?La/CssBBBXPXjariYLO68RvJT12r?= =?utf-8?q?w6erAi2iBFe4N16GGvB2yRHj+O/jSJSGEymGNoXKItqSEtTFToTCByJFToOHBeOF9?= =?utf-8?q?fz5r3kaY9GyQPJUKkP2lCToiJmIPXlif869V9GsYruG46ju/iIIXWIY4kQHSRupvc?= =?utf-8?q?l3WS+xD3r0233p+tq3gl4DtYVjBdri++Qkr0ToZnhSgvB9C2tJzsal1t1tzRe622W?= =?utf-8?q?3DNb4LyDWXH03nlDAfIGtQFDxqVr4jjmBSAFxNYYoO/ddLWEgMHZrrmwVnmFFdByH?= =?utf-8?q?F8imfOM+AWaop9c8vjEP+eTFQh68UbHRlcoAnkKwiM27F1eQ6jO/PFvfim7zPv7zv?= =?utf-8?q?WnA784kwGtXLs6g9/nUbwTuEDv2w0/m1d0UaSUEeet7128emgX0Y8U15RLk6si9Dd?= =?utf-8?q?SLylydx3+9tGpo4zmPdKicg2usvcMzl0GhAizwZlWjzxbK+J41cD0rwhX42EzhG/1?= =?utf-8?q?uaT/i6TuEgfeSb79x5iFyxo7vsk0wq9q4DXE+8U6Swkn0LV+NVw+7UPquc44CJuba?= =?utf-8?q?K5h2qDB2j2HU/OV5wuVkn7sSOKjNa62Yxz6zQJn7RXc6uxFhZZ+Rggwkevaordu5t?= =?utf-8?q?iFqJYm11AJLDD8gS2dL8+Ixzv597d43S8qtCidVHCrx19GKziavu4hN0NpCuNm1Sg?= =?utf-8?q?eLQrlpGT5JBpQjZIFUsD4YL9Fe3WAivmsBhRCrGIfL72MPIfYgQDK8d0qwNRGW267?= =?utf-8?q?Kb+6qh55NpMJKW2b/K0eZv1cNiX4+1LB1KHSbKwa9CjNtpKZqN5aVkqeTQ7s7+xW2?= =?utf-8?q?sIySkxZb4zPOh9Zd0+mm4A+wpvnElQvmK9Sr5syrSkC8RfQKPovtwqT2W7QmiA1zQ?= =?utf-8?q?++eNtvvdjkNg4QIGgm63ZS8ICBjDQb6sroHYbD9Ju9sOS8MQEWcDagt7jflK+q7vV?= =?utf-8?q?8yWKcdMEov07avcXSpqcYSK6HNH/NytjyJw25/Eu91Bx3i6AWHpmT3nppcZVJPAxr?= =?utf-8?q?K3NfEk9PeaTfGQ/9EgE0v/oNMk0MuzN+uCNjSlhZtOYGTMnjAlB7pQtFvbjvegjAI?= =?utf-8?q?AO2GJDQ6BTvaf7tpjTHj4UPiQbQegfZ7Bk4yBphEy2iO4iATPCtrurzL8qVmliXk6?= =?utf-8?q?f1+n4WnggPaCwwvUKSi/vbj24mlYD+8E7osAsszGjPGo8QhaqLEpNKvl0duB7xh9b?= =?utf-8?q?fPruQ8wV8oLdt3aNscF1PYx0b7axVlRKwVE1hqkwH4LO05QUIC3GKZUabxSBrK5bX?= =?utf-8?q?JkQwSQeJCuMcVmup5tO6FRI2XwtgJJomhlIrsGLkp4QmJKrAbI6z547u7KXsuZM1k?= =?utf-8?q?dxtOWYQ3vjl2A1N5UXEfqqtcZppKurUJ9UBDG3ukhXF71UAPxe//1KO4fBPGU/tKg?= =?utf-8?q?GvLWXRuf7gtz0Edi3EgqTWCURdqgF/vKLMr7HDOUbGhd7z4ezU1Ev8lrz4SkQtgw9?= =?utf-8?q?m8+DZpKmfX2np/LQxaBrd1yaO/pgw7YnMO0KNv3UxvRMAb8t4rBU41F9fEd/JItBx?= =?utf-8?q?BBDQIn8beOQY3mP84bh6AAkcLCmQr45REQtGQMyai4BRygjwRv/jium2DD/yQoap9?= =?utf-8?q?XU4zKhRo9pTlf+N2YkxdlM8ATbgwduZZuGtwe93uQeCdYyYDHRVfl5M1Ok9VTe02I?= =?utf-8?q?Qmm2Rcyjyb0qGsv66WpJr8XA62lfI6dM8LXNEHwX4J1s08bpgl7CgK2VgTzaSV381?= =?utf-8?q?Hwk7yBT0EVxDr0pOz4sFhuB1COGPtSeA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: be87a9b6-d69b-4bee-76c1-08da4bb493bd X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2022 14:13:37.4336 (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: vAXYnWj6bcFhTeEMkKLXL738RRvrBw6C6JiZRtESI6EFH0dfyqMZ4UXIvlhZwqRYjLOCBLmxLGoB8rRk+bNR3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6347 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds bindings for i.MX8qxp pixel link to DPI(PXL2DPI). Reviewed-by: Rob Herring Signed-off-by: Liu Ying --- v8->v9: * No change. v7->v8: * No change. v6->v7: * No change. v5->v6: * Add Rob's R-b tag. v4->v5: * No change. v3->v4: * Add 'fsl,sc-resource' property. (Rob) v2->v3: * Drop 'fsl,syscon' property. (Rob) * Mention the CSR module controls PXL2DPI. v1->v2: * Use graph schema. (Laurent) .../display/bridge/fsl,imx8qxp-pxl2dpi.yaml | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pxl2dpi.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pxl2dpi.yaml b/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pxl2dpi.yaml new file mode 100644 index 000000000000..e4e77fad05f1 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pxl2dpi.yaml @@ -0,0 +1,108 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/fsl,imx8qxp-pxl2dpi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Pixel Link to Display Pixel Interface + +maintainers: + - Liu Ying + +description: | + The Freescale i.MX8qxp Pixel Link to Display Pixel Interface(PXL2DPI) + interfaces the pixel link 36-bit data output and the DSI controller’s + MIPI-DPI 24-bit data input, and inputs of LVDS Display Bridge(LDB) module + used in LVDS mode, to remap the pixel color codings between those modules. + This module is purely combinatorial. + + The i.MX8qxp PXL2DPI is controlled by Control and Status Registers(CSR) module. + The CSR module, as a system controller, contains the PXL2DPI's configuration + register. + +properties: + compatible: + const: fsl,imx8qxp-pxl2dpi + + fsl,sc-resource: + $ref: /schemas/types.yaml#/definitions/uint32 + description: The SCU resource ID associated with this PXL2DPI instance. + + power-domains: + maxItems: 1 + + fsl,companion-pxl2dpi: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + A phandle which points to companion PXL2DPI which is used by downstream + LVDS Display Bridge(LDB) in split mode. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: The PXL2DPI input port node from pixel link. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: The PXL2DPI output port node to downstream bridge. + + required: + - port@0 + - port@1 + +required: + - compatible + - fsl,sc-resource + - power-domains + - ports + +additionalProperties: false + +examples: + - | + #include + pxl2dpi { + compatible = "fsl,imx8qxp-pxl2dpi"; + fsl,sc-resource = ; + power-domains = <&pd IMX_SC_R_MIPI_0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + mipi_lvds_0_pxl2dpi_dc_pixel_link0: endpoint@0 { + reg = <0>; + remote-endpoint = <&dc_pixel_link0_mipi_lvds_0_pxl2dpi>; + }; + + mipi_lvds_0_pxl2dpi_dc_pixel_link1: endpoint@1 { + reg = <1>; + remote-endpoint = <&dc_pixel_link1_mipi_lvds_0_pxl2dpi>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds_0_ldb_ch0_mipi_lvds_0_pxl2dpi>; + }; + + mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch1: endpoint@1 { + reg = <1>; + remote-endpoint = <&mipi_lvds_0_ldb_ch1_mipi_lvds_0_pxl2dpi>; + }; + }; + }; + }; From patchwork Sat Jun 11 14:14:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 581187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6D80C433EF for ; Sat, 11 Jun 2022 14:14:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235097AbiFKOOI (ORCPT ); Sat, 11 Jun 2022 10:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235740AbiFKOOF (ORCPT ); Sat, 11 Jun 2022 10:14:05 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70072.outbound.protection.outlook.com [40.107.7.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B82AE65413; Sat, 11 Jun 2022 07:13:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ms/ALPDcKIIzIIxGSyIAiubvRn+b7hEMr1qir2st4liLUT1rqP85Hl+JIO+dT/4rolQX8+4xVowZvB6nKuDkYYSVUjHVr5tGFSq2PSDQnNBL7IAhv2bMsrcwUK9qE+IdM6pC1mudLf9xvsvpqkXu5OAMkfWjFDDTXN4fmuiRHAuRLpDrvrI852ehcNUXkNBiRna9bkSsDJvzJgLml89GSs0gaoTB6T0gO5FDodzYqFPNVtz4vzAvpN1hew0qIaq7vRsAbMa9K0AUSfIDcXfNW8s/OIwgindasH+py/yvRI4JNlQAsLbPmXUkLwPYzTjcyz+49w1dhoczccJxw74RlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8nzwiaILeTGvvZlpFW2CN9yrCZ0Qr8QEleqjeVGUrwA=; b=NWw/+YLumMpmgsIAOx3LfHA9TtcOh3obRRC94l1HxdjRnnTOO3NF04ECzLqpWPg0m4s7wisll6PxIeMPX9y2uxtJYNP3D1CqYDlhf2q7738PNj8hqYWDNdXuF6byZ9Ls4Az6tMLpx7TEVKYUbcSaeduU7TA86q32w7W9dJP7sIQtYlbqxpykSLMnfPJ7WMirJkXUgitq0Jpx7yje0dGgfUEd6B06lmt5iZ7f7yWV0pGxKoH8FyQADw6DLm5NefyQBxzovDjAoCZPZhd8eEMcunrBE7JtNMsTu7EnPurOOYkDT9yiTGTZszEbQc8LLXB8gVoZ1SrbImfVg90pLjQIQw== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8nzwiaILeTGvvZlpFW2CN9yrCZ0Qr8QEleqjeVGUrwA=; b=NAnvQJtx2EZeCNfK537uXaCBjKVWHWtiJ61Xgh4XhiELjg/esb8WjP/pYeaJd1vy5mHrgVqS1MjCLySCrLxPUGy5iODPUJVC4TWUrWLe4Ye8vkYrlqeSojZdT/yx0qet/r3bW9pGOxpUCUVbmcE8cz5a4b3cL4ypSh0oZd3R8Ow= 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 DB8PR04MB6347.eurprd04.prod.outlook.com (2603:10a6:10:107::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Sat, 11 Jun 2022 14:13:56 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502%7]) with mapi id 15.20.5332.016; Sat, 11 Jun 2022 14:13:56 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: andrzej.hajda@intel.com, narmstrong@baylibre.com, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, lee.jones@linaro.org, mchehab@kernel.org, marcel.ziswiler@toradex.com, Rob Herring Subject: [PATCH v9 10/14] dt-bindings: display: bridge: Add i.MX8qm/qxp LVDS display bridge binding Date: Sat, 11 Jun 2022 22:14:17 +0800 Message-Id: <20220611141421.718743-11-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220611141421.718743-1-victor.liu@nxp.com> References: <20220611141421.718743-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR03CA0118.apcprd03.prod.outlook.com (2603:1096:4:91::22) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3eea83e0-6be7-436e-c0b6-08da4bb49f35 X-MS-TrafficTypeDiagnostic: DB8PR04MB6347:EE_ X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CaJkSJ57R7TU/wwc6H5ZNNQTPHkC8mH9ifl45Uhtr47rosOYouTt6nNl2s750cmm6+xcdQymQJfGDD/udui/tt44QWcPewFYQSeT0XuB46YVddWF6rL63crm/pOQTN5jZrFifam86r5DpPOCaLHspOQuCXqaa2MYFRzYExgn9rSVPL2+NFwUciO0e4VU2ye896ttqK8VUfqhAScpHaV9ZaGaPXpdovx5lJRW+sNnNzAX1s2uoj5yy1WKW3iCtk2NKV6jw8fJixidbaMPrHVRtj9wRom4Ov6Af8eSOdHeXIJpo+ZT2Il3b7xPwqaN/WHqF/4eMIWcJjkocQJRKCRH0WIUDpUp1M0XAQh/EUBW8u00Tb1ECULpEQDi1sMeDKF4DPRiseZ0Dmvjdvs6E5mkhT7vPBkEVxcpkJTSo3ipZ9Y+imXNSyHDE2Bq2tNJOfoxVMi3kX4+J+m8Yulj0dXSxipWkR0ZiQ4kN7iGPQEQj1VLo+wmZCnQ+eGVENLBkJ20IUq0of2gLfJgF9FH7CjDmcWOp8nWAhhloH/XjPtUDfCScvP2Ro1N69suPCCROMXVReLQBXTcVprjo3hSQ82zw1+nNVkdrXXJjdut2kjLwUHivGyFmZFiIfWNpkQHLE967Y9nWFuRtbCITo7cBtPFbyfgmTdbpGhuhPheCQ3+6lV5+jqR2pHoL/p0WxCkKgNdwMrgeU5Qdu/5fcaKvLVVVJ9CqfRtSh3dDh1dw6uQYfaREUNkok28WkLxeRkyavF3GriKYVhLLpPpssOY00xG8b2RLn7Rtok0YI1ymd7CbeZtm4zeS2I3nmvror/PMzcykLcZVP56DNiWmF1HRq5++w== 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:(13230016)(4636009)(366004)(5660300002)(66556008)(66476007)(66946007)(1076003)(4326008)(8676002)(86362001)(316002)(186003)(8936002)(2616005)(7416002)(36756003)(83380400001)(52116002)(38350700002)(38100700002)(6512007)(26005)(966005)(6506007)(6666004)(508600001)(6486002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ol73s/IT6oB+3pjlGf27h873W0uOQwOhrDVg4cWvPIdnFnrB3rB6wrXERURb96SqG8Rw1YXxGsiGQtyZG2/CPwrmyOHltuh3KwwKsxkpMGu+v4n10ewt6AcvZI/Ln4Q7JlmWpJnyVHq7PNVQGV4e2TSOaSpTCYNyGFNn8D3tTwP1dWqJGR4GQIbKO8nfAoSIcBl1yq2N4nwnYw9p6UIoIJGiBSaY2G39xawNvxIjdcGMB/mr/gi2/L17otH7VMWESWZ9mz5XIME9rGkLaArNVEmLa9JOW+IVYDF2QecFSRWihI+4ZwCPxsq3tEEBpkpwrJuEHmiMszE1t4G1wq9SsaFXxr+43Wr0YXIJePxOu7nzs6kI0gAkqMDUZ82PM9V2/gy1+cxorUiGAWnMdeQ1qt83fa0aGh0wuykMkn9oAQqMlX1jYE+QjMmQkO32tThXKIewMRiadgGYK6vPsVTJPbhv5ViPe0oDN7ZAy/ipiyD3mE8XuZtptGRrbm3C6mgszCqhAhLEA6iwg14YedKUvNMV8N1fX5R5hcV1UkbqbETLxETLgRyyt+MXXDvIMQPoL8Y53yz2qP0c1pA5T8GHsrkxlB5I/t1MGdOs7Z8o3I3OlSK6DzSteCIMfY7pR7rbh8LE14FNJfPidTe12WUUER2/hSNovSq446p3s3SvXUKXgcrofTdSzf/Bec4bMLmQKGKJ3umwoFnw9oz5KOgYXqRMdib6cTn0EKLx+Zbrhbylo0QzgrEdiC9nXcykJvzZFmQE6TM4BaPE8kVlNZHlqESLEvtjjkbQKny/hAG7gMF6n9dir4vPAVEsbe/6VEZYLFd33e8q0Wrc/tnGLndrqBQcX299Si4rX6vc7ItP8LacUNEOsxyrF+P/KfcU1lHmfAs3X6btZoulsfqgyI2CAycjZaUYAXShLh0NhqWRgagIadk4/aGC9VoKKtel2kEXuAnoO2MHmds07Mpltd2HNJULAixLA6fIFB0GSDlXAfv371s0odz6kct7QY9Cy+lqYqAtEZ52tL1UuUPnS8jTYL4nIiRqIGpkKOzSZYI8MnlYMxQQqE8ZJ1t0NG2XNEiLuT16TQFxGqzoOExTbdBBKYs0mrW2QV9JdTgYTSHAvC04WYmjbgA+LGlILndEr5BMRO+NjZBwwUseAr0omzw8t3e32uk69IybCPKYpJWOy4G7v74i3U7l0KNyAwWMRt+nSxeGR42RK+/zjQ2iV7iA9xNmlsdEBWzjGFusiIhLsxp2wkC3W/bmsZmqc3p7l0Ieocx1cIuTjeb8lKBvkxih0+mB9jLSpaUmuLG5lHZehoQf3lJAVXWGXJ7O2f7hKBcd5Tbe6V90T1qBNKlCCsM47R2WYc5yL2CCLezP7W4VZuUTJFW/KFl/y/iVEOVT1+1hZzA+D2n/Iy6GQLA9sz+51NiMi4jBL3Ob3DKLUaAQ8BpHOtX6QjQb0J8waq0DsXdjpzWEcTQcrqGHaw7k/pEAyTXQUjeqKpvbrWVTG/VI0Q6Z54HVDaahzyCQpcunn++9Csi/J/O+ukAWRFVuc2DnDKjhqO7EmMavyc4h8vNintZgVC8ku1bD5qzA3DCP3KtDeZTR4l4vvljaYJVMoJIFiHhCC4PHaGLA2XAsUvYdP7hkR5xLY0kSkSzP7ZteR4OYH+DbHp4xw3Ugqx2ZyidShHzVvJLZ5jK4vlientxcm4ppSHU+SV6vZhxrhkj0zpcqMQ04sKU8/u8lXVRUUA0VKQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3eea83e0-6be7-436e-c0b6-08da4bb49f35 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2022 14:13:56.5049 (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: uXMzfFTHkM5zpUf0edWbbFXdY/8hgsHthNy/z/+unB6XmAZJt+lqK7cQHaLLeodkdaR0OxKvEtWR80CMxdUsoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6347 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds bindings for i.MX8qm/qxp LVDS display bridge(LDB). Reviewed-by: Rob Herring Signed-off-by: Liu Ying --- v8->v9: * No change. v7->v8: * No change. v6->v7: * No change. v5->v6: * No change. v4->v5: * No change. v3->v4: * Add Rob's R-b tag. v2->v3: * Drop 'fsl,syscon' property. (Rob) * Mention the CSR module controls LDB. v1->v2: * Use graph schema. (Laurent) * Side note i.MX8qxp LDB official name 'pixel mapper'. (Laurent) .../display/bridge/fsl,imx8qxp-ldb.yaml | 173 ++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml b/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml new file mode 100644 index 000000000000..94543006f5de --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml @@ -0,0 +1,173 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/fsl,imx8qxp-ldb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qm/qxp LVDS Display Bridge + +maintainers: + - Liu Ying + +description: | + The Freescale i.MX8qm/qxp LVDS Display Bridge(LDB) has two channels. + + The i.MX8qm/qxp LDB is controlled by Control and Status Registers(CSR) module. + The CSR module, as a system controller, contains the LDB's configuration + registers. + + For i.MX8qxp LDB, each channel supports up to 24bpp parallel input color + format and can map the input to VESA or JEIDA standards. The two channels + cannot be used simultaneously, that is to say, the user should pick one of + them to use. Two LDB channels from two LDB instances can work together in + LDB split mode to support a dual link LVDS display. The channel indexes + have to be different. Channel0 outputs odd pixels and channel1 outputs + even pixels. + + For i.MX8qm LDB, each channel additionally supports up to 30bpp parallel + input color format. The two channels can be used simultaneously, either + in dual mode or split mode. In dual mode, the two channels output identical + data. In split mode, channel0 outputs odd pixels and channel1 outputs even + pixels. + + A side note is that i.MX8qm/qxp LDB is officially called pixel mapper in + the SoC reference manuals. The pixel mapper uses logic of LDBs embedded in + i.MX6qdl/sx SoCs, i.e., it is essentially based on them. To keep the naming + consistency, this binding calls it LDB. + +properties: + compatible: + enum: + - fsl,imx8qm-ldb + - fsl,imx8qxp-ldb + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + clocks: + items: + - description: pixel clock + - description: bypass clock + + clock-names: + items: + - const: pixel + - const: bypass + + power-domains: + maxItems: 1 + + fsl,companion-ldb: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + A phandle which points to companion LDB which is used in LDB split mode. + +patternProperties: + "^channel@[0-1]$": + type: object + description: Represents a channel of LDB. + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + reg: + description: The channel index. + enum: [ 0, 1 ] + + phys: + description: A phandle to the phy module representing the LVDS PHY. + maxItems: 1 + + phy-names: + const: lvds_phy + + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Input port of the channel. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Output port of the channel. + + required: + - "#address-cells" + - "#size-cells" + - reg + - phys + - phy-names + + additionalProperties: false + +required: + - compatible + - "#address-cells" + - "#size-cells" + - clocks + - clock-names + - power-domains + - channel@0 + - channel@1 + +allOf: + - if: + properties: + compatible: + contains: + const: fsl,imx8qm-ldb + then: + properties: + fsl,companion-ldb: false + +additionalProperties: false + +examples: + - | + #include + ldb { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx8qxp-ldb"; + clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_MISC2>, + <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_BYPASS>; + clock-names = "pixel", "bypass"; + power-domains = <&pd IMX_SC_R_LVDS_0>; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + phys = <&mipi_lvds_0_phy>; + phy-names = "lvds_phy"; + + port@0 { + reg = <0>; + + mipi_lvds_0_ldb_ch0_mipi_lvds_0_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch0>; + }; + }; + }; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + phys = <&mipi_lvds_0_phy>; + phy-names = "lvds_phy"; + + port@0 { + reg = <0>; + + mipi_lvds_0_ldb_ch1_mipi_lvds_0_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch1>; + }; + }; + }; + }; From patchwork Sat Jun 11 14:14:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 581186 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD6BFC43334 for ; Sat, 11 Jun 2022 14:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233841AbiFKOOn (ORCPT ); Sat, 11 Jun 2022 10:14:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235862AbiFKOOS (ORCPT ); Sat, 11 Jun 2022 10:14:18 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80082.outbound.protection.outlook.com [40.107.8.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0867165D0C; Sat, 11 Jun 2022 07:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eSoQguPjksahxvxU3xqUaIj8mpu85CG+oUK5tmcVTZJquY1vopFkblbHnPdmSH9vNmO6BgIGB5Ad653+bfbh9w/xsHJkHUU8S483A3BE//x3QuRxzATGCu5td62YoMM74E+8D8br6RQUhZY8elaFAHn0upWuZWoUBtvmLESFaGaR4pOUNuPtjsjxDM06Elm0B68e2JncsXNbN8tkBiP8FLATLk98K348+UmQf07M0rmr5SPj9CrecXCmumrXA49m+Kb17qNZSfWRpWTDp1Z6SwzxjwjtNhuVaVxkO8sOzZr04g4foGjzhWrS2Uo+TRMy5nsYDd5UWQLDHdvwmil0pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/VzrsP8vH9QSHBeUaNRq288OiG2B2c45vYqRHTqZ398=; b=QHl+peH2QacYcJ+Zyu+au3VHi0q3J4HnGHCi2uX0dVNnDWs5qt1VYxtudccXY6svGKVodtIuJcFdd39sNSUrN0FCIEE7gKiws62iEOZ0uIMOOoE0PgLhDlGcs69FqorctDTlluf3PmioLBfYrNa4pA6O7S+38m/gqAi4hKwY4aJdVgmMagkjhKRr+EcGyt+iRtzbXVNeAcEuhvb/E4PzA5Wxy79Ra09oDFZxPtkZtCKoPVdXyU2f5IKxFwCE974lfFsDoSIPTlNdPrSdTJD2ZMjfhIoJjBhOO3iHjvwuYSZ+kNy/H666J3Q2Hp4NLjjBM0Lrn+JfDAhlvW/q60U7Fg== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/VzrsP8vH9QSHBeUaNRq288OiG2B2c45vYqRHTqZ398=; b=BreZUfhTgRvs6VyjmmuzWMrDf1tkqx8w5kmedmEizRQA8PlZ8MLohnc13WOJ05VLDM3+uxKd9R29xEoxS0gl7xmUV5BjsnZ3GQZHA0jJZIuZmtC34V0U9Q32pNUysFlTHS9sRDV4bQaCqAkxXOezf/+PupSL5jEsBrcUjCBJvMk= 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 DB9PR04MB8249.eurprd04.prod.outlook.com (2603:10a6:10:25c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.16; Sat, 11 Jun 2022 14:14:09 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502%7]) with mapi id 15.20.5332.016; Sat, 11 Jun 2022 14:14:09 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: andrzej.hajda@intel.com, narmstrong@baylibre.com, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, lee.jones@linaro.org, mchehab@kernel.org, marcel.ziswiler@toradex.com Subject: [PATCH v9 12/14] drm/bridge: imx: Add LDB support for i.MX8qm Date: Sat, 11 Jun 2022 22:14:19 +0800 Message-Id: <20220611141421.718743-13-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220611141421.718743-1-victor.liu@nxp.com> References: <20220611141421.718743-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR03CA0118.apcprd03.prod.outlook.com (2603:1096:4:91::22) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da5f6727-ab02-4c3e-ed5a-08da4bb4a694 X-MS-TrafficTypeDiagnostic: DB9PR04MB8249:EE_ X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eqqm5apIuuLQrYnWZxAbTDd7O3Js7Q8ejkOpZKP1FAE0ciUqry/32X9rpdTg1rctu9OaHW1Phq4W4jzeyPUGOogZXUXdF1jOu2b+YO0enK/sOd9hoVQFKsDFaT6eXdzODECU8R5GiAJTxqis6kkB/G8OsWhEO9L0LDfqH/4iZWDayw61PTe+WRZM/9PmFIefa3CH/9YFxWA9vKhmFbdKYtQVEFmOyHwh8ldl1Ll2eO7cban224s4+fQg+xj/EJxdYMnxbhoLM8tvqVB7xQUnuaZ6zfHv3VVEWT5VWVz3NNXho8rJbI58xT/N9l1FGgVghedF1MJyUCPIw3dm3n9zRIWmDFA0DJZKi7WsHKYIyEtMuskim4dTOjZprzZgITFE3sffIP04OripC4Ar6vJDbRFyLRPkmvDr9gd1PA8QNXORmc9G79xHfbTjjV1lkznqLj3fSRQkSvkGR5k/eXJ1Agm1zxTixAObUIgs8/Br63N8Pv5ZLqf5gUBeTAMMI6p1vEKCHxVJlug8Q+SLCczkGF6bU5lRYgew5ZNLIh+B4AOuEDOo5PTsihj2/0G5ri+fX4nfOIEt4gxzPCPOlePHxiqPjOfGK6F0bp0H9vxyGq4zkt40ZwS4vk8iI2dvnMg2eoFS0zL2SnfjiQGoYLBAXy8pRsP1XNeFw3BOTC8N/p0vE9YKdp4ktlNMXNoVNFwyJ2DMwe+VqOENl9WLGGlgFg== 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:(13230016)(4636009)(366004)(26005)(6512007)(38100700002)(38350700002)(83380400001)(86362001)(186003)(1076003)(2616005)(8936002)(316002)(5660300002)(66946007)(66556008)(66476007)(4326008)(8676002)(36756003)(30864003)(7416002)(2906002)(508600001)(6486002)(6506007)(6666004)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1QLr14SVAkTVjCrcaAuQrfDuo0YTxg3x43GyW2iLCiZsy+Jq7i1JlpejGfdd6s4mLPtlKM7hGVLfpPOZ4DCj65fzvVWi1aPM9nj7qnbiBhgKazb09nMCd6DOKfbFyzF4gsl1Ou23cy30zkouG/vHxoqsjTmEBGnbBYrUpEBbl3eGI80y3XTjDYdGU+L3CPQM3Tnn3ySCplXbxsxDHIGUCxfkePyYeZqMPcmB/pak8iJ1A/B6tN/q+g8Y0+KUgaUBKIwDtNCgovYRYsWdqos2HWrH12/qZZd2/5fXzmWn2asnbS/mER9SrHMtokxuWBsky9SrAOxXvv/x0U8Of4waU5U4HeeT7Yzb47F/iK4y1WjgeGjpx+m4JUPkSoQNGgbDtuHMrGVrHOpi4myjlGESMo7s0niBGVih3qeZLK5SmqiPcmRiwBYvs4oZberKdAbRsgNafOitSkQwdJboXgeuzEpxgPS1xmtTnezKBHVf5fEAEWeg9zXf9VfeYEB3sXl1F2uqa3S6a8DhOd3zFscBg5PHKnOz7gg4/b3u22XDLMxAew3dFN3gfex+m/TAAI7aBU5H4lR2QNhnGB5E5DdvMj+kQxg5hQm++BNSqgRuNB3qcUUE3YCgsTVKDzet7aYhsqsFdp+lANof0YDBtYS6JV5wiVJ2pgvtvDcwf/sVNDbTqN2QmoVXhPFxw+mIBko2cVSzdwpz4zpVCSlnO3/xrzQmUauxhwSB9iJlyQ7O5jP61/mRemBkOkgBfqIjbkKwYab3zL8eJfkoS8G5LPgNBJt8d4dg0ymFKxX9qYDNk53fQHx+5yQQeuhfQzIaRy3MjK8iaVX2uuYP2Fzx0ZtPLdd0ssq2qdSzrN8S8KJs0B0PhTjjDhGLkKypBJ78uKzt3Zgi7hz5xq0gIej0IAJKePnyeKebN/OQmPm+ikGgT7O9jb4JD3YrOLJ9ZZuRBZRhOtXg86TNWxhEWD0Rc8+igIWvL7xQK0jepMT5m0M2UixIyy0MG5AjDfVCI6qT6N9i6a5X+KjLB8gopTzqY9557wvqT3Hgu+y14AO6u5dAhOFSXsqjAZFxTulln1mGcyUdBZrqKoIkkjPSHe3JkzTzSXX/Wr+1NE/ip0qfrs09+0PDQOUIx5dTxZ5xTc/T+A/5yfzLJz1LjwzBT6opohLpBBV9DFG+UTjyKor3wFDgDXf7JG9TiWVjV6f08bSTNFsz5IEO+ILYxHQGlNY32RtvxXbI+KSEzqG+f1AgaWXZghb2AbCZSuQXD2D3p0Yuem4MrY8U1fXgeIF2oMzVK2B1EDdUwWH6EtgLroa2bzxEPPoFf8KiwuYNmvpAuOwJOC2exwcLZmy/xeS6+CK5NaWceVzqRsYy+++aedX9qD/XYd6zEvLXe33e69SdXm45yskqdxpvNca7JHHLhu3ilKL1ViFjvyJ7k0WQGtchiA/N60x94/Cv73rBCXwSOvZXEl2BpvmG6my+pdPlYwoEUchSaCV9GYac99R2P/NRUJXLrzKHdd+lRdPHLfaEhBtuCFtHrtRwPsQR9V54EBuIck/vqyyQ0NEt659eHS17Q/xzLaSoYQ5wJAHO1ZLwLu+Lme5MJgJ6yQrUiEcNiU5Lhao66OXR0iJW6ME9dcaE8Vre8daXjpJgUVNZl1B3xglPlY0G9gjuf3rV2fNj7jr5BGn497HFz7NLgLvDnVHkk823FWtRmmpAJYe+JcPZOZJjvBeCknkWQwc5lkNljX8V0ulWEw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: da5f6727-ab02-4c3e-ed5a-08da4bb4a694 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2022 14:14:08.9664 (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: VRYXwr7BEtMbezJXfU0FrCiw08K8NoVSiFqO8X9ABaXRtyrXNPt3hxzMlp/ceBhVnpuMQJ3wW1NkO5WWzC0EQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8249 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds a drm bridge driver for i.MX8qm LVDS display bridge(LDB) which is officially named as pixel mapper. The LDB has two channels. Each of them supports up to 30bpp parallel input color format and can map the input to VESA or JEIDA standards. The two channels can be used simultaneously, either in dual mode or split mode. In dual mode, the two channels output identical data. In split mode, channel0 outputs odd pixels and channel1 outputs even pixels. This patch supports the LDB single mode and split mode. Tested-by: Marcel Ziswiler # Colibri iMX8X, LT170410-2WHC, LP156WF1 Reviewed-by: Robert Foss Signed-off-by: Liu Ying --- Marcel, I add your T-b tag from v6, let me know if you want me to drop it, as the checkpatch fix in v7 is trivial. v8->v9: * No change. v7->v8: * No change. v6->v7: * Fix below complaints from 'checkpatch.pl --strict'. (Robert) - 'Prefer using the BIT macro' - 'Alignment should match open parenthesis' * Add Marcel's T-b tag. * Add Robert's R-b tag. v5->v6: * No change. v4->v5: * Link with the imx-ldb-helper object. (Robert) * Correspondingly, rename 'imx8qm-ldb.c' to 'imx8qm-ldb-drv.c'. v3->v4: * No change. v2->v3: * No change. v1->v2: * Drop unnecessary check for maximum available LDB channels. * Mention i.MX8qm LDB official name 'pixel mapper' in the bridge driver and Kconfig help message. drivers/gpu/drm/bridge/imx/Kconfig | 9 + drivers/gpu/drm/bridge/imx/Makefile | 3 + drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c | 587 ++++++++++++++++++++ 3 files changed, 599 insertions(+) create mode 100644 drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig index f33d67be54dc..212a7b0e64fd 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -1,3 +1,12 @@ +config DRM_IMX8QM_LDB + tristate "Freescale i.MX8QM LVDS display bridge" + depends on OF + depends on COMMON_CLK + select DRM_KMS_HELPER + help + Choose this to enable the internal LVDS Display Bridge(LDB) found in + Freescale i.MX8qm processor. Official name of LDB is pixel mapper. + config DRM_IMX8QXP_LDB tristate "Freescale i.MX8QXP LVDS display bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/imx/Makefile index 96d5d1e9659d..aa90ec8d5433 100644 --- a/drivers/gpu/drm/bridge/imx/Makefile +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -1,3 +1,6 @@ +imx8qm-ldb-objs := imx-ldb-helper.o imx8qm-ldb-drv.o +obj-$(CONFIG_DRM_IMX8QM_LDB) += imx8qm-ldb.o + imx8qxp-ldb-objs := imx-ldb-helper.o imx8qxp-ldb-drv.o obj-$(CONFIG_DRM_IMX8QXP_LDB) += imx8qxp-ldb.o diff --git a/drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c b/drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c new file mode 100644 index 000000000000..29f8f36f814e --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c @@ -0,0 +1,587 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* + * Copyright 2020 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "imx-ldb-helper.h" + +#define LDB_CH0_10BIT_EN BIT(22) +#define LDB_CH1_10BIT_EN BIT(23) +#define LDB_CH0_DATA_WIDTH_24BIT BIT(24) +#define LDB_CH1_DATA_WIDTH_24BIT BIT(26) +#define LDB_CH0_DATA_WIDTH_30BIT (2 << 24) +#define LDB_CH1_DATA_WIDTH_30BIT (2 << 26) + +#define SS_CTRL 0x20 +#define CH_HSYNC_M(id) BIT(0 + ((id) * 2)) +#define CH_VSYNC_M(id) BIT(1 + ((id) * 2)) +#define CH_PHSYNC(id) BIT(0 + ((id) * 2)) +#define CH_PVSYNC(id) BIT(1 + ((id) * 2)) + +#define DRIVER_NAME "imx8qm-ldb" + +struct imx8qm_ldb_channel { + struct ldb_channel base; + struct phy *phy; +}; + +struct imx8qm_ldb { + struct ldb base; + struct device *dev; + struct imx8qm_ldb_channel channel[MAX_LDB_CHAN_NUM]; + struct clk *clk_pixel; + struct clk *clk_bypass; + int active_chno; +}; + +static inline struct imx8qm_ldb_channel * +base_to_imx8qm_ldb_channel(struct ldb_channel *base) +{ + return container_of(base, struct imx8qm_ldb_channel, base); +} + +static inline struct imx8qm_ldb *base_to_imx8qm_ldb(struct ldb *base) +{ + return container_of(base, struct imx8qm_ldb, base); +} + +static void imx8qm_ldb_set_phy_cfg(struct imx8qm_ldb *imx8qm_ldb, + unsigned long di_clk, + bool is_split, bool is_slave, + struct phy_configure_opts_lvds *phy_cfg) +{ + phy_cfg->bits_per_lane_and_dclk_cycle = 7; + phy_cfg->lanes = 4; + phy_cfg->differential_clk_rate = is_split ? di_clk / 2 : di_clk; + phy_cfg->is_slave = is_slave; +} + +static int imx8qm_ldb_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) +{ + struct ldb_channel *ldb_ch = bridge->driver_private; + struct ldb *ldb = ldb_ch->ldb; + struct imx8qm_ldb_channel *imx8qm_ldb_ch = + base_to_imx8qm_ldb_channel(ldb_ch); + struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); + struct drm_display_mode *adj = &crtc_state->adjusted_mode; + unsigned long di_clk = adj->clock * 1000; + bool is_split = ldb_channel_is_split_link(ldb_ch); + union phy_configure_opts opts = { }; + struct phy_configure_opts_lvds *phy_cfg = &opts.lvds; + int ret; + + ret = ldb_bridge_atomic_check_helper(bridge, bridge_state, + crtc_state, conn_state); + if (ret) + return ret; + + imx8qm_ldb_set_phy_cfg(imx8qm_ldb, di_clk, is_split, false, phy_cfg); + ret = phy_validate(imx8qm_ldb_ch->phy, PHY_MODE_LVDS, 0, &opts); + if (ret < 0) { + DRM_DEV_DEBUG_DRIVER(imx8qm_ldb->dev, + "failed to validate PHY: %d\n", ret); + return ret; + } + + if (is_split) { + imx8qm_ldb_ch = + &imx8qm_ldb->channel[imx8qm_ldb->active_chno ^ 1]; + imx8qm_ldb_set_phy_cfg(imx8qm_ldb, di_clk, is_split, true, + phy_cfg); + ret = phy_validate(imx8qm_ldb_ch->phy, PHY_MODE_LVDS, 0, &opts); + if (ret < 0) { + DRM_DEV_DEBUG_DRIVER(imx8qm_ldb->dev, + "failed to validate slave PHY: %d\n", + ret); + return ret; + } + } + + return ret; +} + +static void +imx8qm_ldb_bridge_mode_set(struct drm_bridge *bridge, + const struct drm_display_mode *mode, + const struct drm_display_mode *adjusted_mode) +{ + struct ldb_channel *ldb_ch = bridge->driver_private; + struct ldb *ldb = ldb_ch->ldb; + struct imx8qm_ldb_channel *imx8qm_ldb_ch = + base_to_imx8qm_ldb_channel(ldb_ch); + struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); + struct device *dev = imx8qm_ldb->dev; + unsigned long di_clk = adjusted_mode->clock * 1000; + bool is_split = ldb_channel_is_split_link(ldb_ch); + union phy_configure_opts opts = { }; + struct phy_configure_opts_lvds *phy_cfg = &opts.lvds; + u32 chno = ldb_ch->chno; + int ret; + + ret = pm_runtime_get_sync(dev); + if (ret < 0) + DRM_DEV_ERROR(dev, "failed to get runtime PM sync: %d\n", ret); + + ret = phy_init(imx8qm_ldb_ch->phy); + if (ret < 0) + DRM_DEV_ERROR(dev, "failed to initialize PHY: %d\n", ret); + + clk_set_rate(imx8qm_ldb->clk_bypass, di_clk); + clk_set_rate(imx8qm_ldb->clk_pixel, di_clk); + + imx8qm_ldb_set_phy_cfg(imx8qm_ldb, di_clk, is_split, false, phy_cfg); + ret = phy_configure(imx8qm_ldb_ch->phy, &opts); + if (ret < 0) + DRM_DEV_ERROR(dev, "failed to configure PHY: %d\n", ret); + + if (is_split) { + imx8qm_ldb_ch = + &imx8qm_ldb->channel[imx8qm_ldb->active_chno ^ 1]; + imx8qm_ldb_set_phy_cfg(imx8qm_ldb, di_clk, is_split, true, + phy_cfg); + ret = phy_configure(imx8qm_ldb_ch->phy, &opts); + if (ret < 0) + DRM_DEV_ERROR(dev, "failed to configure slave PHY: %d\n", + ret); + } + + /* input VSYNC signal from pixel link is active low */ + if (ldb_ch->chno == 0 || is_split) + ldb->ldb_ctrl |= LDB_DI0_VS_POL_ACT_LOW; + if (ldb_ch->chno == 1 || is_split) + ldb->ldb_ctrl |= LDB_DI1_VS_POL_ACT_LOW; + + switch (ldb_ch->out_bus_format) { + case MEDIA_BUS_FMT_RGB666_1X7X3_SPWG: + break; + case MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA: + case MEDIA_BUS_FMT_RGB888_1X7X4_SPWG: + if (ldb_ch->chno == 0 || is_split) + ldb->ldb_ctrl |= LDB_CH0_DATA_WIDTH_24BIT; + if (ldb_ch->chno == 1 || is_split) + ldb->ldb_ctrl |= LDB_CH1_DATA_WIDTH_24BIT; + break; + } + + ldb_bridge_mode_set_helper(bridge, mode, adjusted_mode); + + if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC) + regmap_update_bits(ldb->regmap, SS_CTRL, CH_VSYNC_M(chno), 0); + else if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC) + regmap_update_bits(ldb->regmap, SS_CTRL, + CH_VSYNC_M(chno), CH_PVSYNC(chno)); + + if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) + regmap_update_bits(ldb->regmap, SS_CTRL, CH_HSYNC_M(chno), 0); + else if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) + regmap_update_bits(ldb->regmap, SS_CTRL, + CH_HSYNC_M(chno), CH_PHSYNC(chno)); +} + +static void +imx8qm_ldb_bridge_atomic_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) +{ + struct ldb_channel *ldb_ch = bridge->driver_private; + struct ldb *ldb = ldb_ch->ldb; + struct imx8qm_ldb_channel *imx8qm_ldb_ch = + base_to_imx8qm_ldb_channel(ldb_ch); + struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); + struct device *dev = imx8qm_ldb->dev; + bool is_split = ldb_channel_is_split_link(ldb_ch); + int ret; + + clk_prepare_enable(imx8qm_ldb->clk_pixel); + clk_prepare_enable(imx8qm_ldb->clk_bypass); + + /* both DI0 and DI1 connect with pixel link, so ok to use DI0 only */ + if (ldb_ch->chno == 0 || is_split) { + ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK; + ldb->ldb_ctrl |= LDB_CH0_MODE_EN_TO_DI0; + } + if (ldb_ch->chno == 1 || is_split) { + ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK; + ldb->ldb_ctrl |= LDB_CH1_MODE_EN_TO_DI0; + } + + if (is_split) { + ret = phy_power_on(imx8qm_ldb->channel[0].phy); + if (ret) + DRM_DEV_ERROR(dev, + "failed to power on channel0 PHY: %d\n", + ret); + + ret = phy_power_on(imx8qm_ldb->channel[1].phy); + if (ret) + DRM_DEV_ERROR(dev, + "failed to power on channel1 PHY: %d\n", + ret); + } else { + ret = phy_power_on(imx8qm_ldb_ch->phy); + if (ret) + DRM_DEV_ERROR(dev, "failed to power on PHY: %d\n", ret); + } + + ldb_bridge_enable_helper(bridge); +} + +static void +imx8qm_ldb_bridge_atomic_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) +{ + struct ldb_channel *ldb_ch = bridge->driver_private; + struct ldb *ldb = ldb_ch->ldb; + struct imx8qm_ldb_channel *imx8qm_ldb_ch = + base_to_imx8qm_ldb_channel(ldb_ch); + struct imx8qm_ldb *imx8qm_ldb = base_to_imx8qm_ldb(ldb); + struct device *dev = imx8qm_ldb->dev; + bool is_split = ldb_channel_is_split_link(ldb_ch); + int ret; + + ldb_bridge_disable_helper(bridge); + + if (is_split) { + ret = phy_power_off(imx8qm_ldb->channel[0].phy); + if (ret) + DRM_DEV_ERROR(dev, + "failed to power off channel0 PHY: %d\n", + ret); + ret = phy_power_off(imx8qm_ldb->channel[1].phy); + if (ret) + DRM_DEV_ERROR(dev, + "failed to power off channel1 PHY: %d\n", + ret); + } else { + ret = phy_power_off(imx8qm_ldb_ch->phy); + if (ret) + DRM_DEV_ERROR(dev, "failed to power off PHY: %d\n", ret); + } + + clk_disable_unprepare(imx8qm_ldb->clk_bypass); + clk_disable_unprepare(imx8qm_ldb->clk_pixel); + + ret = pm_runtime_put(dev); + if (ret < 0) + DRM_DEV_ERROR(dev, "failed to put runtime PM: %d\n", ret); +} + +static const u32 imx8qm_ldb_bus_output_fmts[] = { + MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, + MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, + MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, + MEDIA_BUS_FMT_FIXED, +}; + +static bool imx8qm_ldb_bus_output_fmt_supported(u32 fmt) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(imx8qm_ldb_bus_output_fmts); i++) { + if (imx8qm_ldb_bus_output_fmts[i] == fmt) + return true; + } + + return false; +} + +static u32 * +imx8qm_ldb_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 drm_display_info *di; + const struct drm_format_info *finfo; + u32 *input_fmts; + + if (!imx8qm_ldb_bus_output_fmt_supported(output_fmt)) + return NULL; + + *num_input_fmts = 1; + + input_fmts = kmalloc(sizeof(*input_fmts), GFP_KERNEL); + if (!input_fmts) + return NULL; + + switch (output_fmt) { + case MEDIA_BUS_FMT_FIXED: + di = &conn_state->connector->display_info; + + /* + * Look at the first bus format to determine input format. + * Default to MEDIA_BUS_FMT_RGB888_1X36_CPADLO, if no match. + */ + if (di->num_bus_formats) { + finfo = drm_format_info(di->bus_formats[0]); + + input_fmts[0] = finfo->depth == 18 ? + MEDIA_BUS_FMT_RGB666_1X36_CPADLO : + MEDIA_BUS_FMT_RGB888_1X36_CPADLO; + } else { + input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X36_CPADLO; + } + break; + case MEDIA_BUS_FMT_RGB666_1X7X3_SPWG: + input_fmts[0] = MEDIA_BUS_FMT_RGB666_1X36_CPADLO; + break; + case MEDIA_BUS_FMT_RGB888_1X7X4_SPWG: + case MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA: + input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X36_CPADLO; + break; + default: + kfree(input_fmts); + input_fmts = NULL; + break; + } + + return input_fmts; +} + +static u32 * +imx8qm_ldb_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state, + unsigned int *num_output_fmts) +{ + *num_output_fmts = ARRAY_SIZE(imx8qm_ldb_bus_output_fmts); + return kmemdup(imx8qm_ldb_bus_output_fmts, + sizeof(imx8qm_ldb_bus_output_fmts), GFP_KERNEL); +} + +static enum drm_mode_status +imx8qm_ldb_bridge_mode_valid(struct drm_bridge *bridge, + const struct drm_display_info *info, + const struct drm_display_mode *mode) +{ + struct ldb_channel *ldb_ch = bridge->driver_private; + bool is_single = ldb_channel_is_single_link(ldb_ch); + + if (mode->clock > 300000) + return MODE_CLOCK_HIGH; + + if (mode->clock > 150000 && is_single) + return MODE_CLOCK_HIGH; + + return MODE_OK; +} + +static const struct drm_bridge_funcs imx8qm_ldb_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, + .mode_valid = imx8qm_ldb_bridge_mode_valid, + .attach = ldb_bridge_attach_helper, + .atomic_check = imx8qm_ldb_bridge_atomic_check, + .mode_set = imx8qm_ldb_bridge_mode_set, + .atomic_enable = imx8qm_ldb_bridge_atomic_enable, + .atomic_disable = imx8qm_ldb_bridge_atomic_disable, + .atomic_get_input_bus_fmts = + imx8qm_ldb_bridge_atomic_get_input_bus_fmts, + .atomic_get_output_bus_fmts = + imx8qm_ldb_bridge_atomic_get_output_bus_fmts, +}; + +static int imx8qm_ldb_get_phy(struct imx8qm_ldb *imx8qm_ldb) +{ + struct imx8qm_ldb_channel *imx8qm_ldb_ch; + struct ldb_channel *ldb_ch; + struct device *dev = imx8qm_ldb->dev; + int i, ret; + + for (i = 0; i < MAX_LDB_CHAN_NUM; i++) { + imx8qm_ldb_ch = &imx8qm_ldb->channel[i]; + ldb_ch = &imx8qm_ldb_ch->base; + + if (!ldb_ch->is_available) + continue; + + imx8qm_ldb_ch->phy = devm_of_phy_get(dev, ldb_ch->np, + "lvds_phy"); + if (IS_ERR(imx8qm_ldb_ch->phy)) { + ret = PTR_ERR(imx8qm_ldb_ch->phy); + if (ret != -EPROBE_DEFER) + DRM_DEV_ERROR(dev, + "failed to get channel%d PHY: %d\n", + i, ret); + return ret; + } + } + + return 0; +} + +static int imx8qm_ldb_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct imx8qm_ldb *imx8qm_ldb; + struct imx8qm_ldb_channel *imx8qm_ldb_ch; + struct ldb *ldb; + struct ldb_channel *ldb_ch; + struct device_node *port1, *port2; + int pixel_order; + int ret, i; + + imx8qm_ldb = devm_kzalloc(dev, sizeof(*imx8qm_ldb), GFP_KERNEL); + if (!imx8qm_ldb) + return -ENOMEM; + + imx8qm_ldb->clk_pixel = devm_clk_get(dev, "pixel"); + if (IS_ERR(imx8qm_ldb->clk_pixel)) { + ret = PTR_ERR(imx8qm_ldb->clk_pixel); + if (ret != -EPROBE_DEFER) + DRM_DEV_ERROR(dev, + "failed to get pixel clock: %d\n", ret); + return ret; + } + + imx8qm_ldb->clk_bypass = devm_clk_get(dev, "bypass"); + if (IS_ERR(imx8qm_ldb->clk_bypass)) { + ret = PTR_ERR(imx8qm_ldb->clk_bypass); + if (ret != -EPROBE_DEFER) + DRM_DEV_ERROR(dev, + "failed to get bypass clock: %d\n", ret); + return ret; + } + + imx8qm_ldb->dev = dev; + + ldb = &imx8qm_ldb->base; + ldb->dev = dev; + ldb->ctrl_reg = 0xe0; + + for (i = 0; i < MAX_LDB_CHAN_NUM; i++) + ldb->channel[i] = &imx8qm_ldb->channel[i].base; + + ret = ldb_init_helper(ldb); + if (ret) + return ret; + + if (ldb->available_ch_cnt == 0) { + DRM_DEV_DEBUG_DRIVER(dev, "no available channel\n"); + return 0; + } + + if (ldb->available_ch_cnt == 2) { + port1 = of_graph_get_port_by_id(ldb->channel[0]->np, 1); + port2 = of_graph_get_port_by_id(ldb->channel[1]->np, 1); + pixel_order = + drm_of_lvds_get_dual_link_pixel_order(port1, port2); + of_node_put(port1); + of_node_put(port2); + + if (pixel_order != DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS) { + DRM_DEV_ERROR(dev, "invalid dual link pixel order: %d\n", + pixel_order); + return -EINVAL; + } + + imx8qm_ldb->active_chno = 0; + imx8qm_ldb_ch = &imx8qm_ldb->channel[0]; + ldb_ch = &imx8qm_ldb_ch->base; + ldb_ch->link_type = pixel_order; + } else { + for (i = 0; i < MAX_LDB_CHAN_NUM; i++) { + imx8qm_ldb_ch = &imx8qm_ldb->channel[i]; + ldb_ch = &imx8qm_ldb_ch->base; + + if (ldb_ch->is_available) { + imx8qm_ldb->active_chno = ldb_ch->chno; + break; + } + } + } + + ret = imx8qm_ldb_get_phy(imx8qm_ldb); + if (ret) + return ret; + + ret = ldb_find_next_bridge_helper(ldb); + if (ret) + return ret; + + platform_set_drvdata(pdev, imx8qm_ldb); + pm_runtime_enable(dev); + + ldb_add_bridge_helper(ldb, &imx8qm_ldb_bridge_funcs); + + return ret; +} + +static int imx8qm_ldb_remove(struct platform_device *pdev) +{ + struct imx8qm_ldb *imx8qm_ldb = platform_get_drvdata(pdev); + struct ldb *ldb = &imx8qm_ldb->base; + + ldb_remove_bridge_helper(ldb); + + pm_runtime_disable(&pdev->dev); + + return 0; +} + +static int __maybe_unused imx8qm_ldb_runtime_suspend(struct device *dev) +{ + return 0; +} + +static int __maybe_unused imx8qm_ldb_runtime_resume(struct device *dev) +{ + struct imx8qm_ldb *imx8qm_ldb = dev_get_drvdata(dev); + struct ldb *ldb = &imx8qm_ldb->base; + + /* disable LDB by resetting the control register to POR default */ + regmap_write(ldb->regmap, ldb->ctrl_reg, 0); + + return 0; +} + +static const struct dev_pm_ops imx8qm_ldb_pm_ops = { + SET_RUNTIME_PM_OPS(imx8qm_ldb_runtime_suspend, + imx8qm_ldb_runtime_resume, NULL) +}; + +static const struct of_device_id imx8qm_ldb_dt_ids[] = { + { .compatible = "fsl,imx8qm-ldb" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, imx8qm_ldb_dt_ids); + +static struct platform_driver imx8qm_ldb_driver = { + .probe = imx8qm_ldb_probe, + .remove = imx8qm_ldb_remove, + .driver = { + .pm = &imx8qm_ldb_pm_ops, + .name = DRIVER_NAME, + .of_match_table = imx8qm_ldb_dt_ids, + }, +}; +module_platform_driver(imx8qm_ldb_driver); + +MODULE_DESCRIPTION("i.MX8QM LVDS Display Bridge(LDB)/Pixel Mapper bridge driver"); +MODULE_AUTHOR("Liu Ying "); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRIVER_NAME); From patchwork Sat Jun 11 14:14:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 581185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CA40C43334 for ; Sat, 11 Jun 2022 14:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230379AbiFKOPW (ORCPT ); Sat, 11 Jun 2022 10:15:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232469AbiFKOOe (ORCPT ); Sat, 11 Jun 2022 10:14:34 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80082.outbound.protection.outlook.com [40.107.8.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E598663CC; Sat, 11 Jun 2022 07:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=naVHLAktfHOPpAhN1GnkMOu1vm7FNqau9XlYTjUbn0Llj3NacfRiG1b12kqkh8RQ+CDJVTAJ+LthPNj139sukUGvPhjaKl2Wt8uwttBheII/r62DO/G0rWTiSoRicfbc8JfxTOnYqkuBEnOtwvEVnxaiHlSiMaIB94Ddth1SckOQ8bFjNog0EioaaE0/SBsJkMkSdl0kZ9K2YtF/r7lkzKf0Uf/fbZ71qvrLjo4vWmHlWc6gVNCdXwfu++LedkPsvPcMAAFRkWEBleVhoioHSbpIp+Yhx5BlYEyMeJ9SNoP4/AjAf/Ge1Rh1ib+oPyKOwiqjv0+kflnAQc5p0v1hFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WtV/1O09gmCo6ebdaVoHXJHDZNvjIeOZqOMnUc4yXwU=; b=Fienni41feQGtzdQ2/EdceX+vqXfLnNdpk3vVHz0l7UQtmqoKOhO7M54OhS1tmwz1gHifcddQUZCR1Ux5L0Fv8zu7awFIzKvttJ2R4xRzsKBOO1tZ8DoMyXUs+Hmmbs7uxj0LO7fZpQjiMsXTNX7Ez62cGcyrY+H81vO6NWw9b7ZkLYqFym5GDMZz54wkeBhYhf3gK6ByeZwSX2rzUGPiEiRHGiimV3nyUm6SgE5MisEHwSWNZSiRXCTebSi/pkcjGGlDUC3AGvp5OoQYYfhH6dy62vIIUCgFcNzX8pgCJuY8cn55h/WogFyHHvYzyidsaYryajGCqBFJHrplJwhKw== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WtV/1O09gmCo6ebdaVoHXJHDZNvjIeOZqOMnUc4yXwU=; b=NGz4iNR3qZmFUDaLSjdzZeW/xXYeEfQ+W6VRxAiUdWDAR5FLLdC9us46HMNoSz4/mZtrOtVBLydhgftQPWTTeJF9PrecC1VoIxwvqxBEaeW1fetoWXD4B+lJSk3qPJwG6OCT+J896eE8BTRQmFTEkwr5ZRnfYaX3M6MQXSDDF5A= 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 DB9PR04MB8249.eurprd04.prod.outlook.com (2603:10a6:10:25c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.16; Sat, 11 Jun 2022 14:14:21 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502%7]) with mapi id 15.20.5332.016; Sat, 11 Jun 2022 14:14:21 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: andrzej.hajda@intel.com, narmstrong@baylibre.com, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, lee.jones@linaro.org, mchehab@kernel.org, marcel.ziswiler@toradex.com Subject: [PATCH v9 14/14] MAINTAINERS: add maintainer for DRM bridge drivers for i.MX SoCs Date: Sat, 11 Jun 2022 22:14:21 +0800 Message-Id: <20220611141421.718743-15-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220611141421.718743-1-victor.liu@nxp.com> References: <20220611141421.718743-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR03CA0118.apcprd03.prod.outlook.com (2603:1096:4:91::22) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d9150547-4bcb-47fe-2102-08da4bb4ae26 X-MS-TrafficTypeDiagnostic: DB9PR04MB8249:EE_ X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CF50Ud+phQMNjHnTn0+8ylRsIdzzR5Fj1QJf5KZ6t74qSgZnLH4fpjvAtquHZ9VSR7Rc62TZDuw7HCFm0FpLnwfokW6N3VXpHvUKVSqLEFdB/kYD9NK4su/kZTo4LUUXHsw/yHxQa3AnhdI27ARBQZNtzT7q0Upw8PupgEK4z0COsNOymmtgiA90Pk1mmCdQdiu0BBPb25aSn/OVguIfwIVgFuhhOdZebMOELDoK4BEFvir1raSvRLtDJTtea1e8u9WhbhWoVFUiY+NKgUorATe2hWrPL81WzP3IYcFZgxvw/F1jfufB6NZiX3bl55oTaYFVgBIbrUxTKz4tLURorRfeRqCBC1+MBVZYikgO0UXU+1ENYWvZHU9sRPK8AlFV9uD3DBFIA7/Qgb0gxhb5eAP+klHqkxTPwAWGSp6uf9D5a+iqbfKBqg6ZmuZl/JP2xv3DUDNwN6Y4CfLr6nkejEIvmkr+LuF2Tdcog9xjn7eBS0S5K0qwpCHf8oqA6Ufk+s1EQdOwEzfX9duZDw6qHatBTXslxxnuBzkCXQkGyPoiDXcBV8JuLyk+/I/Gaw4PfbblFChIZB8w9+ZCXypIa/XcZRMIAbc8TdwCPblKBq0WxaCK9vypCs6CrrvVGyJonN5xI+Q4qPuOl/41jHORM1wRCCnzAOT19/Ho9m7EGhLRMPe8ZsR8KbZA9Z8HC7nkUmf0eQm1XS0K707z1cfvxQ== 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:(13230016)(6029001)(4636009)(366004)(26005)(6512007)(38100700002)(38350700002)(86362001)(186003)(1076003)(2616005)(8936002)(316002)(5660300002)(66946007)(66556008)(66476007)(4326008)(8676002)(36756003)(7416002)(2906002)(508600001)(6486002)(6506007)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KftyKW1QiwHh75Lv4fu/vW5Ny6eRT6AWPnZom9EjAR/pgWPXbfhZBmySdz7ylo0PclYxB0MYprYn257UghmL5Wp2FKnvNE1rnzsmHJBHBTpLQRpi3LpwVsj9OzcWMVCcSbmAxBlfunZlkdCrsi5vVfMnkQ/729VOIRGJx+D4qYUbrsx6R978F72IOF5jE9ZfP+HOjKmwWGGP12CXUBa/aqGmPou3Ra0Jl9rApcfpLtpsRt7I680V7Tuu8lQTydlo/cqZxqRCbfmwCnJ/wY8Hm8innlmkXkvVSe4RWeatO2A3aAcs+3E18UDsEr/XGwpwe4Hr9ZZaQv+6AA1I69s7EWr2lcPC4WQuvCe0MNyeU7uJTXYf6UqqHmlJlpeQfnBoiLCCYBcWmJDYzUOmv+I7BhCMu8Z6kOp1MjR0xV21GqOScCRl3rPrc9bXW1PNOn1TBhRtNwqh2KT0wj9X/Rmgj7ddEvQIx45WKFsrigkn2v8pfTfwu65HOQd1C+kImkA0i9e9bK/VN2JqaeUlY1W9gehgKhZQ0NehuBF09iiamdq/UrmuOuhfK7GQIWC+Jci9aO37ZQhe5xFfPYk9p0jXITliLgY5G/WITPCd8Q1QU5AZmatz0VPkUYlB42g86JrVEJI/KYUGMTFnytfwvPYJ42rLYBIEbrT0/xtHGdZpCi9WMTFD+z9j4KXknLnCTpZWTEOQFiMxemgRZITUQfU9/LaNes+ZnPRE3DZxjC+LqQUlp+riDENoV5y6fl9TfOL8qCJ4aoMPX4WexZJRm0+fQjagMiDxbSajTe5OLTcg5gSfPzF7vvaMQpu7xfHHCJ/Y6Wd1jf+Or2suOxP3PZFxSMU5SFV7NXZQ9q6TzzddVYVcTr/oXzbbdFz3huBtR73L6Sa1lGVXAsC72MbEcol9d/RBGkL5qeMuFjGvqSmgPJMXFjJX1L55GESD0z1KPcjCXUcH+Tz50z46wIGrJ3AVrGgpgR9QwVnMbEUuYtb8SxoX6QwRkRq7P4BHYc1E9sqjl/38K5qelpSh6daFfTxMvXRuR+gDEVAICLAIKMYDD2+Oql69oAUHAY0YtwFz/JUGG2oYmrzaZNMYS4ZM4EmmH2/+3VJzw/rtaUI2QX3I7rnW/xlnm5DutJe3SQw1oFRTXH1YsrVehglwOPehRT3LVNp6l7NpT/bkSjzyhePg+pS1uIElT/hE7IiL2goTzTidMgBvgZavdjbjRhqSo7j53oB7O/4oiosvZ5r8Ag/gpFvXqk1trZdCjWCQaQKdyBdMuh9L9HKbprtXWnWgVOF8UB5XLfXiy+iPmCgjupfIWU6D1XIcDx9sOI3Wskhu3jvIX2l2iwf99dokYY631eonEa18aMGnXlf5NGYEKZ/wU0uP0dSuV4QtUdAGzVNSD2xExu1Sn/HgilWxuIcFjbZJz0gwqkje2BAKp3nMqdwmQ845xdaMs2RKyZC9DJvmL4K9K7ImQD9bKhrJy8nj9DKLsuPrkP/Lwcs+NnO1nTqGlNizwlXck90spFIuMwc64GSybXxSM/XWVuQcWJkF/kHUrhSXxIgG0RezHqGXFQQzDq/b1O0Z3VfehrI/fBS7dSSd057A//B99uB7y+mw1+aHSI1FhVa9kAmQsLTjew0pJUMigprrtLP036Ioeh9+Um9YFTXeG5Als2WcNVbldyKdO4jnfj4z/Ir9m7MoRHa4ryH2Pyu4VDypsyseO1Jrimm37s3iqDdu0cEUFmH75LsuzQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9150547-4bcb-47fe-2102-08da4bb4ae26 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2022 14:14:21.6933 (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: y5copZBv9C1EP+LY8IAN8mCuZlcHTvENtFz+htUatX1WmB5Au5BgnrIMWRtRiuXfXDzaN9hOYTxW5uoiWLJ8FA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8249 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add myself as the maintainer of DRM bridge drivers for i.MX SoCs. Reviewed-by: Robert Foss Signed-off-by: Liu Ying --- v8->v9: * No change. v7->v8: * No change. v6->v7: * Add Robert's R-b tag. v5->v6: * No change. v4->v5: * No change. v3->v4: * No change. v2->v3: * No change. v1->v2: * No change. MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a6d3bd9d2a8d..033d4e8b838b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6654,6 +6654,16 @@ F: Documentation/devicetree/bindings/display/imx/ F: drivers/gpu/drm/imx/ F: drivers/gpu/ipu-v3/ +DRM DRIVERS FOR FREESCALE IMX BRIDGE +M: Liu Ying +L: dri-devel@lists.freedesktop.org +S: Maintained +F: Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml +F: Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-combiner.yaml +F: Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-link.yaml +F: Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pxl2dpi.yaml +F: drivers/gpu/drm/bridge/imx/ + DRM DRIVERS FOR GMA500 (Poulsbo, Moorestown and derivative chipsets) M: Patrik Jakobsson L: dri-devel@lists.freedesktop.org