From patchwork Mon Sep 30 05:28:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13815399 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08D7ACF6491 for ; Mon, 30 Sep 2024 05:34:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yVd0E0lyRBXWkmvGhlNxKECFxaodydKKIACJ94ljdFA=; b=0ZLC74nJwvhkma/uOPBZPTIkn0 NWAonJX+8kdJtV/LNwvlxIIIQO1VgHVuiYQKe3zitn8izKNvPwlCncBv7X2DtvueZaoJUwELfEY9u v/g33gEIfqA6bS7QFIbOBrSZDXx1GMRtNna5J4PDtDPL2D8CuFUz843l051wX4/V38VmxHi916j7/ mXumrEE2FhhTITDS0JyDUjryzYRmYKMNfCMFfHdMr8Oc8bHo135fpHHRQ+7F0ovOLBegnjnIYmM3G n/o+1Jn0iS0e3/sJn0BibPoVhNSeNL/XSFHqbGd8JjXk0CXZbpJWncRipSJPJyR6fVbz8fRViFTgq digcuhpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sv93P-0000000Fz1j-0jmd; Mon, 30 Sep 2024 05:34:39 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sv8y2-0000000Fxuq-3RzU for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 05:29:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GImYgyKuhTe8vzDd78CVY7i6qkN4FcXmNqVhw5tjHzUGtGBPS5I2VYtl3XLJN6DBimsVv0edGAL/XWu7xiMzdYouxvubB4zurXaicTpVufQKtyEPzfGmaWxVV8AIs/1Hdy/b9/FxkP/6xQAypLYb1mbJfixDIre6RO0XJE1ghPMY6KninbnazMmVcm55kD2iKVdfs/oeycuqrDfAbHpo1DwfynFcvYoTgFCuFVDlKcIlub4CXBrBPD05D7i5byBeUobxvt5Jies17tdO9R6fSeZdpzKlqGt4DOipnco0G428Tv/EOYyG3bZL/WImjjVryGCs4dfJpuPmwhOysbgSJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yVd0E0lyRBXWkmvGhlNxKECFxaodydKKIACJ94ljdFA=; b=HZFCersSBqaptHVMzAy5tJL5pvqKrlIvW6MPOdRlyHcNTkGeXTuw+AAy5AFE0YyEHOvZU7ELTWxWirclCcKaKCZs3YVUkciQgH6eCyLHlj9Td2Jc71BMCcUdEYnMStWZeAoqx1n6FSKmuP9iPAwB3ctlQJJ2pXujnwp/lWHzKN/S0383eb0POMn4pTQ9lLC+xz69innzHhvCfaMvQr73tFsnL8tvadDN2Dhtde11sDxeTrjur08MSlzA8WTo8xgL6gvy5rUXdYq+mMA8x6rgOGM9yeaOfB5A4anivn6QC4fzxBsDi6f80Ocp0a9DiTwBD3H/d3/5BCPWa4qJpnHZyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yVd0E0lyRBXWkmvGhlNxKECFxaodydKKIACJ94ljdFA=; b=oSQHzNr6gO48Fuod6Uf8WVMWmfWFyWVNRWxA11ux0m50ftCfX7N+B4BlusuX4SCzxnToxlQYN3YGAXnYvXXwukjetRFr2amwC0NAFK/P671AajWqMFe/g9pQ8xvE328bBeUz5s7cztFQ77DFveiPv/qxDgrIxgU4fw5P966SRTRHWLPW1M2BEmQyRXW7sqBssXKfP5c2/7v2GvPj7OiZgDBx60ziv9JuFwttT7B7RS53wpLtBGjdnukuTUOxFWBFL0CAyv0/nvMHy7h7JPH+pVavVPH1kLqdiBd7GFNryVroKoYBKi7f2jMdAXaWiAxkH5GULTk5FiH2LIBD9zWPWg== 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 GV1PR04MB10536.eurprd04.prod.outlook.com (2603:10a6:150:208::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 05:29:02 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 05:29:02 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, o.rempel@pengutronix.de, y.moog@phytec.de Subject: [PATCH 1/8] arm64: dts: imx8mp-skov-revb-mi1010ait-1cp1: Add panel-timing node to panel node Date: Mon, 30 Sep 2024 13:28:56 +0800 Message-Id: <20240930052903.168881-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930052903.168881-1-victor.liu@nxp.com> References: <20240930052903.168881-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0015.apcprd06.prod.outlook.com (2603:1096:4:186::7) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10536:EE_ X-MS-Office365-Filtering-Correlation-Id: cd64f7ff-6021-45a9-dc34-08dce110cad4 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: KvS3BYDEV7DbxoGfa68yx9NSrYW/SjORgPIQEabVNTZMHXBxUiXJL6IHSetv9vIUu50NR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qfZsDmuTWV/QLihpgeAV1J/VM8hwvEGmx4+81h48jO8LhWsV3/Gj+ZgFAPolJnDJ9jlEf5dyfexakTM8oiHu/it54adoB0qjwQKfReIe2aYsdqIgSSncScSIejWzBghXop5JymEBR9oWCr8RGvqjpBbLy+QqEsxjw5bHL4+02lLReJZoIG7dgO7HkPm4zVJfiJgB7rZb8g82acgkONdiM9igAp7xBxUtFLdPg9CwFhwap/9VEa3E0Bo5eS9AQajfsGFlgEliVi9ckoxEGBFgU8gB6e0n/9mRgM0irLiLJCWdQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hplunFajrfo8kZN5EMgwfbWfl0/7ZQTQM8dGveJVbRaaptjUtqhB4BKY0IbvE2McOiMCJKgpe6ACIIEyqydYHnaS5x3ZS9a4CRuWNzwDkV45dTNmsljTxutuFlgM0yVwy+Km1DctDmcRoqvUHXCkp9fYDMP1dqUtOpyP2KAUCpeNzO6D5D2f6VOR0f3ZkbLL/LAHSDvJEU2KBw33BgwI3+rxzLOuz32Oyg5QuluM+D4oI2wFss3+V2gVilBq2NX+wNkwa0MzEeA+nXHJarj5vouOg8VYWK0d+QKRxq2d43N8yqAmcesDPLopf2exiKEppP1Q6PxKUEk0CgOjXHntnb1CClWXxK9t0jLgtR8XjM4RAkfiaXI203sf6KSxkL0L/v+/+GTF5Ys7PDZkaV0kKf+3HO9bJ9ibGB7QcA3nNn466hTjUoqUbRLpXlx/CxrcGn3qpcN2qgcrSgZY6itFoiluzgb4ZfGaCvyzvh0T7XUz0f23ZbW7z9BAug7iOw/306PYkv0ZvoxsjMQPbSFgLOtAGceP7hX/EJP7Zo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-CrossTenant-Network-Message-Id: cd64f7ff-6021-45a9-dc34-08dce110cad4 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 05:29:02.0892 (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: gqyfLewFpcRz8ABhAqlSEynp04enz9dsh2soKyOcT4KKKrJ88QKJq/lATY4UXT0zWF6S2maHOqFAPi8S+rfJhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10536 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240929_222907_114043_77480D4E X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a panel-timing node to panel node to override any fixed display modes written in a panel driver. This way, 68.9MHz clock frequency specified in panel-timing node may accommodate 7-fold 482.3MHz "media_ldb" clock which is derived from 964.6MHz "video_pll1" clock. The above clock frequencies align to the clock rates assigned in the lvds_bridge node and media_blk_ctrl node in this DT file. This should be able to suppress this LDB driver warning: [ 17.206644] fsl-ldb 32ec0000.blk-ctrl:bridge@5c: Configured LDB clock (70000000 Hz) does not match requested LVDS clock: 490000000 Hz This also makes the display mode used by the panel pass mode validation against pixel clock rate and "media_ldb" clock rate in a certain display driver. Fixes: 6d382d51d979 ("arm64: dts: freescale: Add SKOV IMX8MP CPU revB board") Signed-off-by: Liu Ying --- .../freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts b/arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts index 3c2efdc59bfa..4e9f76de7462 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-skov-revb-mi1010ait-1cp1.dts @@ -13,6 +13,21 @@ panel { backlight = <&backlight>; power-supply = <®_tft_vcom>; + panel-timing { + clock-frequency = <68900000>; + hactive = <1280>; + vactive = <800>; + hfront-porch = <30>; + hback-porch = <30>; + hsync-len = <10>; + vfront-porch = <5>; + vback-porch = <5>; + vsync-len = <5>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + }; + port { in_lvds0: endpoint { remote-endpoint = <&ldb_lvds_ch0>; From patchwork Mon Sep 30 05:28:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13815400 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6AC6BCF6491 for ; Mon, 30 Sep 2024 05:36:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A6KeBUQwv32IvFiTA3RGW5mVEKCvk1/S6gK9nyp9zL0=; b=MR84gdas6gnPKeqKIbvHNxgn3w hDY9Cqvh/4QROZEMUeVPCqrOIWc7P8zkZxwFWZ2L9FkiqMSKI3SDu4j+vJYqvic3AMBjBAwwCvUuh c5cA0mryWwSDITpkT3N0O7pexZEjyif2COLvfgpD8x0PNiHmNTiXSC8YayPFPb5REOxPRpBPlmFeS ZxtVwjsqIa3AiSJb6924qjHDN3Nyg6TtW+oYr6ZnxY/DCHiFWSMiy9JJOe3QCjEO6m5F4ADcqA9M6 YnHasdqf1xQzZgaSDYFZRDUWD0j2ycy+eMgcA1M68l6OkcX86BP3CNAUScEa/ReS3MusI39CDvYRA rI6Jj00Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sv94Z-0000000FzEL-2NOh; Mon, 30 Sep 2024 05:35:51 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sv8yD-0000000Fy0e-0E1E for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 05:29:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Fgq0fRxnurg5acVlmzAsD+bU3hswb4u1e609MK4BhlvdM9HjqowplRWzeaeBTcaviYOn6A2FHfavql3lLI1++lq610/iTtN2rAL9NkXiHPy6AGDiE6HdyQVsHwmK90q8Z2B+8CjLia0IDm9pDI/si2SMCSTPJ21LEnE2+/5FQ7Kt9aLK7A/GorpbPyF2XusWettZef87wz1I19ehKod6/Ijo8/LPjDaFiBJppsFgjbH4i2EyA4fTfZMDseDkVCspA+fp51tBagW2nAIhMgMesW8PxJy6BJx6lQHSlK6hBycOHljSVKVO46/WOwTBXjpINPFEcWtQ2cgLAVy+Tb/iEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=A6KeBUQwv32IvFiTA3RGW5mVEKCvk1/S6gK9nyp9zL0=; b=X5bhl6aIj4s+rHYA0on1YBM3SLIX0JtWX2W8RkwogvTuY0mNDOx+sFad7jz+oLw7TyT1DZJPZZ6h5BCJzB+hO5fxOtCqiS1vhf12z9Dz4iiygWGYkQeJmvTQe8BHtrN8KqVt/+b8aSojKWFLPu5kpLaSXzsBFXPLoXqltHZPpECM8f42nXlGlpQLyRTFPDJEVLa6w7lTGA/8yV9qKjT4l8AzuFZqZNxuQoPEmqJDY6LZAyxOez38GuxrnkIcWNqdoYmSFo/OedblSKmHLTySZ932wDJKSVm1zLIcgH+l5umjwO4XkHCDySZiLdsRJ65domWWJux6bO2eMCrdWl9/8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A6KeBUQwv32IvFiTA3RGW5mVEKCvk1/S6gK9nyp9zL0=; b=hMCk2ks2WY1Z1eaWjF4eGqhOtljn+BTxyAPcNfmMC3brBbg2fabGfgm+sJNcE92XLoo7iiY3kGESjnM7Gnblu2qLH/0HE3a8t/RDGkfrmCrbsn89n/kZBTu67i0HugffFJjF6Cs1VA99RX3H0rjoZ0LINZJxaOsWi318Tk0U3aXmGjb/ZRCmO4IUfEpX9rKJ22nggL3oalYjrU9fUFEq7L/JEBe3DpeiUXdRLcWAc6BbmvBqKtUsTZqVHFROuPt6XnvqnYZWVeOQOgLCVLJrdn2JXL3UgZ/todhbBnm+C5ALs4K3aX+MP5znwO50Ewi3bOtYP0Uc0M4n7jloYmztcQ== 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 GV1PR04MB10536.eurprd04.prod.outlook.com (2603:10a6:150:208::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 05:29:10 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 05:29:10 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, o.rempel@pengutronix.de, y.moog@phytec.de Subject: [PATCH 2/8] arm64: dts: imx8mp-phyboard-pollux-rdk: Add panel-timing node to panel-lvds node Date: Mon, 30 Sep 2024 13:28:57 +0800 Message-Id: <20240930052903.168881-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930052903.168881-1-victor.liu@nxp.com> References: <20240930052903.168881-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0015.apcprd06.prod.outlook.com (2603:1096:4:186::7) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10536:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a323e82-e9f9-4600-aa53-08dce110d00f X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: qo4xo2+cpz2huJ5jd8RzhX0TsQU9I69DU7UeYHTzrP4YGpatF7IerHWI0MbY0N2Ndt3c1UT/q6lY0qf5FNxbjelplFubxqBYYMN790vcxlgcWWdm+v0H9XlZBHHDDi83fiIIbxbYN4QjnQxZYu7RD14qgWEI3aFy/qGBItFvkQ6q9Pz1JM6/Q7litExIM+h9BiKQxsorAUqFnXzk51bvarQq9AyoyAJqF5aEIkF9QpquJaYpAEBEfj6rHvAscMiBFq9KWFmQnARrHsTZeV2tCN1xX18oY3D7HqXS1YWHINuXrgGNA+Vjm6Mph/2/ruSS+E0PU4sZ7duIY8fJNZdErzRcoeaCtyt8I25Qy2004gfS2oa92DwhDBU3hMADJiOdEMlU8HeQIlaD2UiQdRpYbtzSEetNgxy5y+NHzXD2DJws3FN8mDjqsjSp/FLhe5IUsZH9K8JWNREDAWM78uU8vfXo787R3AAWb9Jq4r6mXueFTK4M61ZPbiWMXMNa2x4SNyYyEsVdjNYWZBWGBbQBMDIRLFeTYbOBHXey1YKVAbvla7xdeSTIpdHMUnkb3gvNk24bJeyX6OLREJyUGn68BG0gJhr0iasz5oPZwqXI/5Bb1TPRXo04Qt+bVErE+GqhNYg6YgTltsfOf28aC4X2hgWbtEjUcJQkjOEQWfH93cBVw/A0HqHyF+ifuYaRpPTbIbeDAPodDAG9vHWkDRbzcTWf6P1pM5Ov1aDfZWkBNTJ+IV2unmkOedRSk+cIu3SlygLY5/JFESpEdN5RBJvk2bzIViZTIkcGAtQhaM6cs88Io0Y31DwiL9qUqGxgZyn1lZh+98WLuZ5XzZkR0aF1Fq9ydrsDf6vkB+0dyn1TG1AQ4PVv+PGiPCpwLO/RW9i0c8Yys+/B+dYykOQTbzcwV1rs5OxiYNulicOy7dseiOSaEEK60jw9153pT1LqMdBVGhErtTQ/EJNZSKil6VXNGq2Ghg+D4eUJ+Zyo7AaRffEXXTsK+yNK3l2lvs5P3LMdDkHClifLk5OhL8/hFh0fzmXY0Ak3FQTuTjt13KOmJzowHBD+5gKs2bzvxjUSOzC7isKNVmfAtLP2mLJp8jKi3cJYeLgNAxl4/bc0T5JASivfIOiLomglzDZEZflXc46qy4WEN+1809BjvHzpBRZOn2UzX/L4EDrqKYN2fbz+Hj36OH5CALwv/Umlwwtbg7pDiNJMsBwaQEAwgA1PUudr41p9ajemm8CVcl12lUI+gfpq02p2GcB0TOW3VivdncGrQpUgBhmhy+7Dsa0ATPDuoa4ElOLzdu+SsrCTwTaW4wwMFbbBJOr8aZxI1H5I2z0TYc47/k/Nft8oVhJske8/6kUkXMcvioqXOK31dduv2vWA6WoQ/NPr9niiWVwUAru/8HKHPwwPzPvDhrPuiJBhEg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: A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IzSoeUwLmsl8+F+90DLywZEGzlgvfknPWJwEubBd/4jGA/adKsz8VTpI/1f78y4PcqanYSL8XAxNHQrkAunGGdjbDUCnSXqa6xQTwZuwws5lexgHQFpCHeuuNpUidQPo0rRdWl1isH9Wh1KzYRgC9pfIR55+RiHzu6+JHGEFzKqHGwwG53NeQyxoAbGxlV7tBI3rMVmNe87jGR1m/wANeexKr9cILwN0xf4P5bugHn10Tr0vRxFutlchTWtjVl2OVkSV3i2ogzNrHgK8XvYIkJF7TxcfchdUPPRSG4dqeP0UEp7cx4PqCQRcKCE0aW8hcyHE8DntA5WunuNVgvGk1ChOAi50bgvaxQmf/d4RBp30r5z0IlJgXdn9lfz/OnRON1YhymYPFqoOTbkzcXmzbL807KfPKiiYDQfHn9TqU9r/Dm3AFWgD9RX9YMAdPdUWsj88pq6yG08WkbuKjpPQx8jhyQxQ10HyoLJkwZ8g2iuvO0e0yBKg1cUnHDMASv9p0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a323e82-e9f9-4600-aa53-08dce110d00f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 05:29:10.7943 (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: PjsMD9JQHWmSMtaN1zrE5Ng6mG3CH3edO8eFzkjEkMuz7Xbxs02sjkwiHnvesHuJM6Lc/iTR15DqE+Z62fW4rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10536 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240929_222917_118199_EC1CE3A2 X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a panel-timing node to panel-lvds node to override any fixed display modes written in a panel driver. This way, 74.25MHz clock frequency specified in panel-timing node may accommodate 7-fold 519.75MHz "media_ldb" clock which is derived from 1.0395GHz "video_pll1" clock. This should suppress this LDB driver warning: [ 17.923709] fsl-ldb 32ec0000.blk-ctrl:bridge@5c: Configured LDB clock (72400000 Hz) does not match requested LVDS clock: 506800000 Hz This also makes the display mode used by the panel pass mode validation against pixel clock rate and "media_ldb" clock rate in a certain display driver. Fixes: 326d86e197fc ("arm64: dts: imx8mp-phyboard-pollux-rdk: add etml panel support") Signed-off-by: Liu Ying --- .../dts/freescale/imx8mp-phyboard-pollux-rdk.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts b/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts index 50debe821c42..20cb5363cccb 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts @@ -37,6 +37,21 @@ panel1_lvds: panel-lvds { backlight = <&backlight_lvds>; power-supply = <®_vcc_3v3_sw>; + panel-timing { + clock-frequency = <74250000>; + hactive = <1280>; + vactive = <800>; + hfront-porch = <72>; + hback-porch = <86>; + hsync-len = <2>; + vfront-porch = <15>; + vback-porch = <21>; + vsync-len = <2>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + }; + port { panel1_in: endpoint { remote-endpoint = <&ldb_lvds_ch1>; From patchwork Mon Sep 30 05:28:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13815401 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7574CF6491 for ; Mon, 30 Sep 2024 05:37:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=f6Oji03SVoTMa3oYkLGr5ybi5qGJHtv1w5u6U78+rm0=; b=EehSwmt4ww9zIRTbhcUSkSivky nDRx2akccMa/78b5eBDepN8BAVmRMqUEZss+1KyaSWVQDOmPC17nFjbiTFwssRcc6lVVowSLDR2gp SKhqTjkELFei3Rp+0/8BNnJOmPbwsDxplAOqc5lIQ51WJQXIdOO6BqNe4mbyGCrcgSDhcdnqyaN2i 2L8ovMYkykJJq2HLFVWRAFGVJMiv+R9qvmHNgJAWMPKnL4+/ezBlCJrX3u/4vwi3a1yq29a1wjgrd tcxINvoi+K/Zaqq/JWbtKG3RRkHly0LhxKWfYy3IWwDi2Y8SpBNMU+dDSjsr2VilvJTvRZFum7vM0 CIK8x5+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sv95j-0000000FzKg-0mBY; Mon, 30 Sep 2024 05:37:03 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sv8yK-0000000Fy2W-1678 for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 05:29:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gE9b2wfaQ2ARL8XN5y/l9sa0m3lmwkcYv+LvD/R6cXOZALNU2jDnJKpaQS17szpblY1UQ4HyVVfTW6MGlh5fGXlioVd/Xgbu2zRx644/hPZ0PR98MRvFKkz9pDrLTllUuoYHct9GzxYa6y2CBQEybRXvN7oTpJFeBkerHu2Tw7BR2V4F2BYYNehiV3jhtq5LemFMNS4ShPW82PUwR0vMq8V7xTrQ6vdrOzLU4LU6A1QrMs77Yb1KkFxzr5zrJdcK3liU9Ian3JcwGzBUcYEMZE2q9roKxcKdKYvBxpYpV/fXbNwIbL33xvpYzr2eU+YfgpvV5Xo+T17NTxY2GhlGCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=f6Oji03SVoTMa3oYkLGr5ybi5qGJHtv1w5u6U78+rm0=; b=waUnPnJVr5m8ef4hLiUkxQz8FmrHzFAvIYz2OOrrXXmYgGsQKLhLme+JmlzNJ5KbpTjxrdCX1t/yI+KnPurtBP5uVOTe3mHpFgB+rxIw+kFDGTrqNRS3rkGccgMq0UygGOluJg3ivTneGvETht0EXDU/axW+cV46psL3g3LGtbvOQfD0IqdOZzcdd4MHXQAJgzJm7fHZaxfb3NiRDmcJ5sQUfXS8WhiYVC3NKgq+F85FEEp+cbqtWJyk7MdGrjDKB0vgGyiUhfF4K8aaRPlr0fo3L2+4mfkSHcFoiYpa6u0ltnG3TRgo5CyxVAS0eGpwjzSa4m9KlQBCQWSDytqCAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f6Oji03SVoTMa3oYkLGr5ybi5qGJHtv1w5u6U78+rm0=; b=mwyOwt7+39galNdwBqZv9V6nA1wjlsHvRltld/cQ3etxClTf6kwxbEvyLKMXnwiZlnCV9rlZPpW7jySviBDNRhV16ydUep5xs5HfjyYSmiYskbNjyYMDkXehr3OEc+qjRK71F5g2Z03EsBQY/gMtChmoKguEgc6B1dqrNZDQAmNfCxQtpzYwocchHXaI/urt+/0/9rgLZxVBpqnVdNcb8VXOkDCwe4SHv7+VhMB7mSjUs4riTArNyE0w0leJizfq6WeSyuzz2/sqXnZi5FXaGJFPu33o2k0XMqnG/8O87E/mcFT1/LW5GTBCcD5nzb6zU/0Gx47ETzCdjWJgILfRrQ== 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 GV1PR04MB10536.eurprd04.prod.outlook.com (2603:10a6:150:208::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 05:29:19 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 05:29:19 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, o.rempel@pengutronix.de, y.moog@phytec.de Subject: [PATCH 3/8] drm/bridge: fsl-ldb: Get the next non-panel bridge Date: Mon, 30 Sep 2024 13:28:58 +0800 Message-Id: <20240930052903.168881-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930052903.168881-1-victor.liu@nxp.com> References: <20240930052903.168881-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0015.apcprd06.prod.outlook.com (2603:1096:4:186::7) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10536:EE_ X-MS-Office365-Filtering-Correlation-Id: a3086a82-9146-4f74-c3a3-08dce110d508 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: daaSKI0bwNGz6wXcsluKvQ5CHNFzElhbasE76pDKx7yPQfhzmur3zilw6defq8UPDf/ZrzOhiLQrWl9uRrk+dh2L8nsLw0Wrg/B/OLhF9uH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m0ljmJLzrF4YKaEGWkN/y2sg49BoyPUTDurVjK6xX2+FR3bOIXpiT6Xbf1ptOqlPhmNCZmBO+nR/JSafofSOAH8ehD3Mn2nUOi98X421fDP0EAzEfVqGUk4SV4QGIK88R+xIjh2XEIdkhAAPOomL/+i0oMGKFcBolNISvyIuCFsUJF3+g/Eg0OwJH+YbzVAgFWyeRpe21iQmBXMfy5712vdceY5GVw9/B0A3ky3MEuLlmTvzzTUJUZGc+qg+kN0jw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: H2rHVBS49sSFI0srMLVyUATsLKbX5ri3GAOu8Qb8WNuU9lKZ7TRwF+qt7jPRwX7NBpQkftdXSTJQfpFPL4HHyDeW4/W4Sf7yyNnSvoDvr4jGRbl5L4pee49reDu8Eevwnjlwchmoak1OvNOrAMdwuiBWC3/mpHk52U0QhfRJ6g5hYTo8asy5k4vwHKuaf7NhEFhIZjPGJNSbJI9LH60TtHrl77SN6e5oxBYwoLmR1m3jftkX4k/AvXsejq8mP1SiQBlO2sRGFy19nX0426Fx1t/3a72QD6PXmmn9UGUa1hWEIS/TpAWsVv+7eYq/rzrVLfNZRU6/rkhqzwEYiI9aFeiBtt17+X89DlhbfFCW1jNTqYKsc27Xd0klS81/NEbpok4eamjfPZ4qBU+9uxvzvETQphtfD5wID1fIydtzlQtk+2G71tywi0NNnbjdziujmf5BKdo9/WWiZY5sz/AFihxpAN0y6N5sUm8+8GlXUHuSIvXlcQ9xlkIChGnMdGd92Xb9moQ6uvOSu0ml8y1RY91nNUKQhIcxlvhdKWCWzFD05qWOqeRC6Ghh/LcQZrKW7qthcmeAiD8FC2adbB9dk/ilc1PeLjiz4suq1BngFqAffzXVuVKot8ik28WX5QjE1Fdc3mP2TR7sKeeXjsIa3F15jY++Si1D3Rke5mvf3EtIfY7MKnis5TEGQ+NMfHN2khZer5WAhBxY8eCRXniWzziROKh/Yb8PNLCPAQ35eL7JJbN5RRrS+AFPGvOKQrooyz0oRfFm8tAzIbqYEbYPq2yoh2INENKYqi7UGJMUVNScqmVRjgkRR5DZGC3i0/ULKwcpZuXl8c9ELIipSf8r5Iz2mgswAovVr+OdpC0SwcIk71lCz60xFNDoba2y727SJnkpyZWVMNA5b7K2rjiOM6MWMl55JnekV/lDTLrxwvcYPXWdb5CRJeL79KAcMEk8s0fNy6TZ2Meo9/SaVn2v2yVGuHcTDPNdv46z9XWNcvbBrOWBaNFebTlaQ5D4+iYWSqW/KPUOfVsI7TXuw9OEmGR7mp/JcGp7EllLFHftYwg/+qURDxa+ZhbM524+72IPtvM6F3/wRC4FUslsGU3G8X5RKAp1CyJFeEYNYu3q6nBQY81RoNu50TrjfeXFuo8shgGeROVTAD4OIwy+6BOOwhDOfSJCGwUtE3/nl0YLT4uMSybl0LPhTgR1jD0G9StZhDHpQHprBvi+1einWMbxW01M8t1dTa/rDu6BI945ypyG7/NkCYgkop6JFZbvXFXc86Evre4OPcYdYxZ+b/r3jlweggtw7nPSBOBYhe56P0QcbLJcuNa5mlqpdllwS5hjBZbFI9tM/CRvpHkY9xmH9neHPH7lEPX052cLm+g1F8+C4RmqoeRISFvoDf3t5VEibBOm4tN8Q1mE5Qxo0SmHFIimSN6mzotNXGIrtnuxg3x6Knbzi8Fjfi4x6m2sLp5latUtLhkVATA81EnFhq+DlOBjL01cVmBGQ2nopydlmbP5mwsSVQAmuDxXPtAWhRdRAZep7GjK7xrczFdhbL5vUhMrJOhCXBOJ54bL+lsd4Xuve2dWLizbP6u9s8Q8CnaP X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3086a82-9146-4f74-c3a3-08dce110d508 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 05:29:19.1407 (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: 3hScZlPRph/Tqt2qM6qUMY5uAqgqqzOUwatvHWeNoyjSghEdxxcj7X26bQg7y2wyDHa0ydh2nZ67NEKbG9niMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10536 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240929_222924_321522_796F1FBF X-CRM114-Status: GOOD ( 17.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The next bridge in bridge chain could be a panel bridge or a non-panel bridge. Use devm_drm_of_get_bridge() to replace the combination function calls of of_drm_find_panel() and devm_drm_panel_bridge_add() to get either a panel bridge or a non-panel bridge, instead of getting a panel bridge only. Signed-off-by: Liu Ying --- drivers/gpu/drm/bridge/fsl-ldb.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/bridge/fsl-ldb.c b/drivers/gpu/drm/bridge/fsl-ldb.c index 0e4bac7dd04f..b559f3e0bef6 100644 --- a/drivers/gpu/drm/bridge/fsl-ldb.c +++ b/drivers/gpu/drm/bridge/fsl-ldb.c @@ -15,7 +15,6 @@ #include #include #include -#include #define LDB_CTRL_CH0_ENABLE BIT(0) #define LDB_CTRL_CH0_DI_SELECT BIT(1) @@ -86,7 +85,7 @@ static const struct fsl_ldb_devdata fsl_ldb_devdata[] = { struct fsl_ldb { struct device *dev; struct drm_bridge bridge; - struct drm_bridge *panel_bridge; + struct drm_bridge *next_bridge; struct clk *clk; struct regmap *regmap; const struct fsl_ldb_devdata *devdata; @@ -117,7 +116,7 @@ static int fsl_ldb_attach(struct drm_bridge *bridge, { struct fsl_ldb *fsl_ldb = to_fsl_ldb(bridge); - return drm_bridge_attach(bridge->encoder, fsl_ldb->panel_bridge, + return drm_bridge_attach(bridge->encoder, fsl_ldb->next_bridge, bridge, flags); } @@ -292,9 +291,7 @@ static const struct drm_bridge_funcs funcs = { static int fsl_ldb_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *panel_node; struct device_node *remote1, *remote2; - struct drm_panel *panel; struct fsl_ldb *fsl_ldb; int dual_link; @@ -318,33 +315,27 @@ static int fsl_ldb_probe(struct platform_device *pdev) if (IS_ERR(fsl_ldb->regmap)) return PTR_ERR(fsl_ldb->regmap); - /* Locate the remote ports and the panel node */ + /* Locate the remote ports. */ remote1 = of_graph_get_remote_node(dev->of_node, 1, 0); remote2 = of_graph_get_remote_node(dev->of_node, 2, 0); fsl_ldb->ch0_enabled = (remote1 != NULL); fsl_ldb->ch1_enabled = (remote2 != NULL); - panel_node = of_node_get(remote1 ? remote1 : remote2); of_node_put(remote1); of_node_put(remote2); - if (!fsl_ldb->ch0_enabled && !fsl_ldb->ch1_enabled) { - of_node_put(panel_node); - return dev_err_probe(dev, -ENXIO, "No panel node found"); - } + if (!fsl_ldb->ch0_enabled && !fsl_ldb->ch1_enabled) + return dev_err_probe(dev, -ENXIO, "No next bridge node found"); dev_dbg(dev, "Using %s\n", fsl_ldb_is_dual(fsl_ldb) ? "dual-link mode" : fsl_ldb->ch0_enabled ? "channel 0" : "channel 1"); - panel = of_drm_find_panel(panel_node); - of_node_put(panel_node); - if (IS_ERR(panel)) - return PTR_ERR(panel); - - fsl_ldb->panel_bridge = devm_drm_panel_bridge_add(dev, panel); - if (IS_ERR(fsl_ldb->panel_bridge)) - return PTR_ERR(fsl_ldb->panel_bridge); - + fsl_ldb->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, + fsl_ldb->ch0_enabled ? 1 : 2, + 0); + if (IS_ERR(fsl_ldb->next_bridge)) + return dev_err_probe(dev, PTR_ERR(fsl_ldb->next_bridge), + "failed to get next bridge\n"); if (fsl_ldb_is_dual(fsl_ldb)) { struct device_node *port1, *port2; From patchwork Mon Sep 30 05:28:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13815402 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 441CDCF6491 for ; Mon, 30 Sep 2024 05:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cHBqa3+OL2Qfk9ygLdKmIKmRg+wTlyOij3iu7z6WS50=; b=X+WbegRxgUEXhWLz0CskQ4Q2b+ vwmMV2wDsvQ03gnp8dt0FPdPddQnZ8qeOZ3eyrZRPLDrICrM1XBE3Nl1UWDiXP89YiKN5xV0PDk8U fjTftLHH+8sqFf0Czvq0mt9pCKjzMmQfto93xZ743kC92PC3qngdfxqOP7YXnlAT37QBOPjUF6JYM stBqPQBe5vuHMoLbYWtqXMPoKCtFGvk6fqLqnJ1ORmZQhzswTY5Bjhn2EkxfQ0XjhjLkhQhgOGaCr en5KumMH0QmQmaLyx8prGT5F74MRUyuxaLpJpU3D1s8vbRFuABoZSyYh9bQtrA3W29oE5cZ6Of2gl lhAGvqeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sv96s-0000000FzTC-2TOG; Mon, 30 Sep 2024 05:38:14 +0000 Received: from mail-westeuropeazlp170110003.outbound.protection.outlook.com ([2a01:111:f403:c201::3] helo=AS8PR04CU009.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sv8yR-0000000Fy5b-1REL for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 05:29:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ryqJzzlp50bJ/md9BIsoNP5+qA6TnwumRzM+Az/qykB5L/Yk/ZGKnjYB/4p9DBdWFLko3WWTcDG+CmfO1AgSvie8hpDYk7QQlJxcWS7BSxP9qMD1mtwDSFGOg0/5zGA502na11A7RzMNn6KCYnG46w7N0oyTzKVyKKpQZejZ84N/ulcgmL9f4Bb1s4yQhfM9QEMdIFZQRHaQ7hQcArwDaDTok/aoECuDqDFsWh6AXw05KNi1ITtZvQktN5pnwO1mgcWypyKb7DnK26MMTbaq8yLb/U0nA5D+jqWnDII5Hye8EyhOhpjyo/fWrB5lUZ/dm71rKKOuS9zLXYl+W0nwiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cHBqa3+OL2Qfk9ygLdKmIKmRg+wTlyOij3iu7z6WS50=; b=kA8uMS4AkWELPlETPG2+Z1DJam886Vc2m9agSKUdric6sx9vlYen/AWXiK+NgVofyc2hzkFEFZIXQ2RyCVMa5+HZnm9UFz8sCwh4pGiZW59CoihXrhj1b5uJxIaFdSm63CfPA0RC18wM3jSJPzYTcnuwD9hRdv9E8pXD8AyVxWzv6ouoIaYebNJRHbGacMR6aPVrmHRFMJ6eidUsa2/VCfMtRpNs7Bm0BaunA1Lx1vsR+Nx/5RvrsPJjeTkPQTuHkIqP7GMzE18fuSeSrX9i7RQAU1QBbiUSwVvoJCFzymemnSJisAikUPpb26DR5dnAmyQyqwwoskz5H2mGsbMOvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cHBqa3+OL2Qfk9ygLdKmIKmRg+wTlyOij3iu7z6WS50=; b=lvUrHre2YRlH0c76VtHEZftN7Xqb8V/ePjmUbTxfudNthNrVFsHq6UBWxUwIZ4avj0m9aXMPqKa7r/73qAjYKsF2W8jV3QDDVdHcGtvKTWchFUGWJ5lNGbsH4XjAu+xO+ZpzktawKTk6ydq9UlXCfdq3DqQD2J384avQiyJI/MBFHE6PEnuQXeXoLHrOC8STcavB17M/AA1QsatPNo/tnLeby2hs7svgquE2krnDzFkyZ4LoxdHRbWXIh8idIRwJI6D2CKq7wuR0lEUdEDnwBjjzuyYF6Jf6hOpneTU8SmQoZmLMEV+thRqWYPzUo9YFc/SNRRwpIgQsO2geWO/Mlg== 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 GV1PR04MB10536.eurprd04.prod.outlook.com (2603:10a6:150:208::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 05:29:27 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 05:29:27 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, o.rempel@pengutronix.de, y.moog@phytec.de Subject: [PATCH 4/8] drm/bridge: fsl-ldb: Use clk_round_rate() to validate "ldb" clock rate Date: Mon, 30 Sep 2024 13:28:59 +0800 Message-Id: <20240930052903.168881-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930052903.168881-1-victor.liu@nxp.com> References: <20240930052903.168881-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0015.apcprd06.prod.outlook.com (2603:1096:4:186::7) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10536:EE_ X-MS-Office365-Filtering-Correlation-Id: d3b65d07-1b42-49c8-3732-08dce110da04 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: zQxLsW+h7SYZR/xYzy8v27XPmcbnmH9KbVogVwsci3gzktY0JUkbE+dYm1WhZ2AHNImLAhj4j+d8Ughn9xALhVUK25VYl8saFNVYURWh4wEJnZRsMYLzt5dP0qpAisFR75qJu+Rk+pATzinx9idkFWCmHo9f3u+adeZg5Og94uicSYIZgPqnNRw6U36UKw0fZzqCNuUmb5+5oadF7Abya9SfnWd1mW7IrD8s9NiZggqtdKsjX50l5CMLosOe6LMokZhyrEM6mWs7ygW0oCG4ZWJtP/wCUGF6g+IHaNAPBG3r2goEEiXgn0nrWpqByllH9u5I1im6AfEfh0kqBtvzOwePh0E+L7cWe+wpro3CeOYFAuQEGi0Esv/fcpfpu8tcTj1rvZuTPYzEiNYHa0y3y9jW1pMyasjeNAfHejR0ftigxA1Fj4eXe0whOUAcBWy2s9SHCA6KiG41qRHhTvNpDMS4lHtoGKP/cfcgnc92kI/1uUcF/NbMbb8VR3JxasBZOg4o75CZbqa5mlcbUKlAJzpSHtSkTf/hy0A8v1KmoLKGtDHe22f4UBybRte1V1Umji4VUulPPG9PKUVX74WpDb+OYNoiJTrUtsgfxyqVIsOqNxbAyxbcn86I+h6zMsEszVfUf/7Y2bo9LvSDhFlsYhJEJK9R3BUbsiPK5xMdnvFxGwXePFxnQ0IMwB4Q2NqspoWHlNp1ZsdwPhO0ygJFrZVKPVmLXZuxx9RS2RIGECYwZfaQfOOu7j34FBGgo0iT8N5qFlYvntwDg7K1jx+aaj9imOAD+G/lSZ3hAts728tBIpXP17tTSfOjfzmI19dgAUYVaGjh6V2dACZcs2535X8KxUQD2VGpvCjFK+2+d8YuTeJWmn/V+KQSOFE1KtXzj0CIN8RCsGFriJi7NVBhZJpYnbmo+Uyd1V3rtAlA8UzkkhOjDYxXDON4qjVTKApDha7zxwDj0czRHwvvy/ZBvOtLP/IxChHpd4jXZvd9AQFvrCaRDOl0tbgPxKOY+2OMh3kw6rneIbPuzOkUT3IKLfbRcqr2c+xM9HXzaKi8Q4guaqzSrU1pSgPrKGvUHtOrsfNsDzm2mhOJu4ZjLFD3gqEH2h3pHvUPTqW8s5JNio+EBOymDHFKlRrZDxXRcYCiELDFRPUIr03Dg3ml92PoA8X2G5iIx6ReoDSrDU8/d0gja7s/SyWPY2rY9jgIhynl0h83ulI9V5PHvrJ2IIRnw8T7rDuv4BKIYGhWza8r2N7UCc+liP50C1gKuzp2lEGEtO4KEBEG3NAhBwwM8hjlYiwQgNMKRTT+QNHb0hSxLz+QP5KenTFNLpaH4AR8/gvro+j2AajZLf5TyQKu5WZr7PgjZE67FCfV3RTdiRm5d1iH/9tZJJZFzA/uz7b4nKWT/Dcr6ck73xdMu76x+9ZY3w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +1o8AakIeMmKB2N8hkOi1nbobbQ4c+Uv40jZGNooOIO8uhOgLQJ9m6wsl9Oob60rY8jrTtg/V8jJ/+pBsBrTI6ukPTYW3/GTjkVoCUMQv4wU0FcUu6R+YAKYy0WBqoS1yGXItJxReUp/cWqgUIP0H09rDRS4p+eXutrwLKnKEe69a3c++vi4lL22QOtH9E4n6ukS4d6Iie6OnH580bLb0lKNgBBXXrNaX5SvPeOlUBsG/MUrGBK6wzEgPUM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VpO90DTiYlhafu2t4amdxOfaCUjUm4vQlP0gAsjc5H2zRPUV+WUBV7qJAbqfVmNUY/sXXVhX0LN1/UaCf23WsgPvchOZ+0madLYsEFdw6RiFW7V3z5z1j/LwuTE2U+SPIwYmoWIQPBYCkgnEmZA8bZbf/QUvYANXSXrhg8eqJS+rYie9OsBYq9Ji0K8s3JNrMyxQDki8tOIPNaLCF5VVlrEXUovygrqTRwCFu/J8h7Ee6nlpymxWoO1BrFO2BZBn8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3b65d07-1b42-49c8-3732-08dce110da04 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 05:29:27.5818 (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: 5BfrBRs845fs/jtkbnCjVJ/GWnNEE3SmCJJmkhk4gNCFQB71qsD5hVAwF98FXTPy+aYd+nRWkE+oJ7YEihgF8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10536 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240929_222931_410937_E2386646 X-CRM114-Status: GOOD ( 17.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Multiple display modes could be read from a display device's EDID. Use clk_round_rate() to validate the "ldb" clock rate for each mode in drm_bridge_funcs::mode_valid() to filter unsupported modes out. Also, if the "ldb" clock and the pixel clock are sibling in clock tree, use clk_round_rate() to validate the pixel clock rate against the "ldb" clock. This is not done in display controller driver because drm_crtc_helper_funcs::mode_valid() may not decide to do the validation or not if multiple encoders are connected to the CRTC, e.g., i.MX93 LCDIF may connect with MIPI DSI controller, LDB and parallel display output simultaneously. Signed-off-by: Liu Ying --- drivers/gpu/drm/bridge/fsl-ldb.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpu/drm/bridge/fsl-ldb.c b/drivers/gpu/drm/bridge/fsl-ldb.c index b559f3e0bef6..ee8471c86617 100644 --- a/drivers/gpu/drm/bridge/fsl-ldb.c +++ b/drivers/gpu/drm/bridge/fsl-ldb.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -64,6 +65,7 @@ struct fsl_ldb_devdata { u32 lvds_ctrl; bool lvds_en_bit; bool single_ctrl_reg; + bool ldb_clk_pixel_clk_sibling; }; static const struct fsl_ldb_devdata fsl_ldb_devdata[] = { @@ -74,11 +76,13 @@ static const struct fsl_ldb_devdata fsl_ldb_devdata[] = { [IMX8MP_LDB] = { .ldb_ctrl = 0x5c, .lvds_ctrl = 0x128, + .ldb_clk_pixel_clk_sibling = true, }, [IMX93_LDB] = { .ldb_ctrl = 0x20, .lvds_ctrl = 0x24, .lvds_en_bit = true, + .ldb_clk_pixel_clk_sibling = true, }, }; @@ -269,11 +273,29 @@ fsl_ldb_mode_valid(struct drm_bridge *bridge, const struct drm_display_info *info, const struct drm_display_mode *mode) { + unsigned long link_freq, pclk_rate, rounded_pclk_rate; struct fsl_ldb *fsl_ldb = to_fsl_ldb(bridge); if (mode->clock > (fsl_ldb_is_dual(fsl_ldb) ? 160000 : 80000)) return MODE_CLOCK_HIGH; + /* Validate "ldb" clock rate. */ + link_freq = fsl_ldb_link_frequency(fsl_ldb, mode->clock); + if (link_freq != clk_round_rate(fsl_ldb->clk, link_freq)) + return MODE_NOCLOCK; + + /* + * Use "ldb" clock to validate pixel clock rate, + * if the two clocks are sibling. + */ + if (fsl_ldb->devdata->ldb_clk_pixel_clk_sibling) { + pclk_rate = mode->clock * HZ_PER_KHZ; + + rounded_pclk_rate = clk_round_rate(fsl_ldb->clk, pclk_rate); + if (rounded_pclk_rate != pclk_rate) + return MODE_NOCLOCK; + } + return MODE_OK; } From patchwork Mon Sep 30 05:29:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13815403 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E53A1CF6497 for ; Mon, 30 Sep 2024 05:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hT7Al3DtqnMMP2cs0aRtB5qJBO0kxfvL8uECLjeedu4=; b=zqTCZXW9ZzE26Zoh93pELQaMXy Bj5vw1xUFYxey0vJalALoxtnVnyznSjlKuf/BMOPKDbhtiCUT+pgYdAHJbEae0HjrDTWhTq1Y+jnE 6fDFbqtVNa+sxiP/Y7PUMwgjA1YwpzeFFhMMT4dtJYnklheej4nakCuBXlNgkpKr/EPAuU8nALQnb /7S89lPh4QS+lP5yWGRJxSpNuUBQa26ZSnP71ACWEb0KfxCWZRNMSTutCVkJA7RMgXBpHVG/e99oV rDgsHlbsozlg8eDRE52oWxCEz6oTRTV4pi+L+X0zQepjP7JBLIUWwDa5eu/9kMB62my+qJtaUxxKI hmoWMQkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sv985-0000000FzcS-0utc; Mon, 30 Sep 2024 05:39:29 +0000 Received: from mail-westeuropeazlp170110003.outbound.protection.outlook.com ([2a01:111:f403:c201::3] helo=AS8PR04CU009.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sv8yZ-0000000Fy7f-20ig for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 05:29:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bXU7zLlEKSHkc5rtKCoYHWp3zvI9kvGgtpSrRF7sjs5kCJZ9UUQLFizxw7DtCQ4Gn+gDKGerV1C9MSw9fkrf2GIrfQ2NA/oOmKY+X6u1aH78yRHhDJ9DjpGUg4j/yalaMubMhukheF2KZB2JT2UTbkfh0hH827mkjrTDE2IuxPf1+EtvfzBhO9l5ElhJ6lC0PhxQnQddkqj5oXKRrkmxMcZwS13YPrDwYbyAee/zgn4lrqOMrRCyfX2S8S3LvQfGpTpa+52a+8DOIlZNZteX7HTPovwD9aVZzWsp31siBdBMkPuIceMitQPYFrpgeLKu9SVKZOO/HqppaTaLfZNuzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hT7Al3DtqnMMP2cs0aRtB5qJBO0kxfvL8uECLjeedu4=; b=YYGr/5StyZnw2CO2EkCx1F+jxi43myWEOEsMSmPBkYnHAX8P9Pm4cPaK+aMQMPBsXlbh9vi78c3iosJHaCaEzjJg+FWD8i5hjdOUqFk4+tvY3UNk8PVSkM0+m0w7x/Tn3fqiWqDyzp+3MpCbjm8cURFvF7q1j+/JENVhbAsNH5cXYXjTRBv9mM/qxzJlfrIqmJggGy/PcNxQT/LO/GKqlAV5mFMwnZB759yxR5AujaF87xnz+gF/vRzpAcQpvlxI+qq+bRLWW+bqoYLvMcwAcdmn34PCBbG++SIeTbI+VeyHJLlsfXhqTeFempDMh7zL25hIi3wK6nOnbNvws2/+mw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hT7Al3DtqnMMP2cs0aRtB5qJBO0kxfvL8uECLjeedu4=; b=kCsI+avZT35FwLrdlygL3UYkN+cBKfHvqO0+iQW4inl5+j515Rrt8JDS2cqYeSeIvl62/NAdfixlxvpkLISIUOd1YaIU43YGmJ1dxdblOLU49F+DDskd5CfNHyayqFstqp1xSllBGcx9iGVU+wJazh6BNTslK1vwwiF5bdMfO02iTASU7Yt+WuWvJT1O8KwiDBEPWSKVzw9EIpC6GSV/jh7S0ZAdcXFDSqLUR6nqdtn6qQTdga4yKl4VUeXG1WGCoLYWH3XgLxpxQIB+b98iHQ3yPOlt9mOOYaWhrAltjwxKLLwkZ5hEfcEUh1qNaZ2np67+Vg0o5UeJVqmww5ranA== 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 GV1PR04MB10536.eurprd04.prod.outlook.com (2603:10a6:150:208::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 05:29:36 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 05:29:36 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, o.rempel@pengutronix.de, y.moog@phytec.de Subject: [PATCH 5/8] dt-bindings: display: bridge: Add ITE IT6263 LVDS to HDMI converter Date: Mon, 30 Sep 2024 13:29:00 +0800 Message-Id: <20240930052903.168881-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930052903.168881-1-victor.liu@nxp.com> References: <20240930052903.168881-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0015.apcprd06.prod.outlook.com (2603:1096:4:186::7) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10536:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a0678ad-9385-45ed-8a33-08dce110df0b X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: HHWAp5vUv8Ilb+ouyMhxOEPvkkso964+tCseag7xQLp6xkzOkbqT3D0zQc/ofh8Z9annYWZJpvGTySI1EL5lIsvWkxImAAxrC+61xNkVErtMmeJyUrw2oqjYgVUPoMPiD4Kng4nvMo2eUCg8a7N8m4Z/tFq3AQnBRSoSuFT+7HINHSRko4r1yCPPC6qr80d4ndd9UHd4sgfplMCjkYVcDfbEywkqWRAUq2RFHl0/aVvRZiXsggn10+ndLPHALv3Yq7mxGMLfDXsv2fML5qMUdaCAoQUhSr4QdPpsIjaIXgIZxvKsck8GQyV65+YaNnQpUlGEdree57qVPQ+3DaXTTq3we3P7TrGCe/OdZGJP6VynigbzRJ2XCzjWkuSEWBArzW0N+CDSMlXjrFnbZ42BBMgEd/Y96IfXDGdTOIG87VCh6qgbzGlfbcmzvrO+ERhVjEjZUjvu2tQ5ios5nsWE1qvGyyZ1wglwmG+PsVr16AQE6J6r9J3T8THruN+jfxrWupOBKRjHUyJfR89naToT1kK2EgcmKtlICB0myV01YVXMk0Angl7hLf5VtyCuuUjYtsW1F/k8/x4J4LBDyWNDjayWLWUDQ7ZEkhCWufp/+aiDX1wmNvXwEymG+2XKOg2xTRdqt6paEw6sBmga6O0h1wELMoIeDUli2fk5opdSL75KzJ1kB0FzKYysh8ie03qLMmF4o7o6fobV7nZVAFEQF/LZ/w4Sd5UB5KBu2zWyccNZ/Xp6+UC47eTf6Mezyrz31MkkKzD8Yj3rlazS4lLBgDgIQzy1KwX+ACVXviLSM78YRVffWijJ661KCGarRLRLscxm2ZPH48+KBEAde9A2XsGylGIDxy4AN+kH2sF1ewVEQSVQj0aYe9WOzekk0ADVGEq9L2zut/enJET0wx2+029R1OS0NJrXPzxsuZJSNnBOQwZpVO3RjeX783EhyGLFIpddQd5nhWOD641z4tcDNyO5xZN4lQA/B4u774WdpwBksJTa8PxAXN7W0WejjAapr4o+xfv/Uj8udfc/iy7/34LXCo/LZB6jRErroWDeH/FHWNQkUaNaLyeLTAx7ES8WRpJninxbP9r5HrfTbKFUkVFfBWLIdejrBpmvKHKw2bIMRlOL8Qnsc/YIp+8mw4loc2yaQeQAb8VzEscBNzJSJR7HTBm2ie4Fa9D2+nPk2AxC14bgAsa5Zpck7eaewQ3bsEiJIazKGaN8RJa+5Vks/zSyHB3MZwfHRB78qxcSsNmvKYNnVbiroooQ7C4vYu21E4F/hx3/UzVMW9107rFaIGg/7Jj44Rz0WcNd6s5IGV5oE0E1bsbhkpAqw5o5S77o/NaY6umRQr+AoVpC7vDIIEnVUi/OODSepmfl7Lly4Y0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: e5KdCJ34OMOO1zqlkBStZiGYpySBOqYRcOmP/9bniatIz/hDw+/0P+1MCuzwSxrDG16WrEWi8mmZRZIThRcove4/E+kb5gq3ro6oEMIHu01IxhWwhYWk43Q9S4Ca9pg5JP86W4qWwgEbzGX9daCWNC7p8Ra9F9FeuHkcGpbDx2ytEcWlf4iSQeihranqqNdDXLTPCCfRt7tvlD6hdtR5/Dn5RvCQx3mmZsntNalGCzkVylzX6wd6HcwcICyile6gMR3Ef/MBNVhJGpkSzDtoCI/DNAdvTYRn5IDpRAE2sYBJEAFGLmMPKFtfPWiZMnOLBK1+jFEOmSZGO0K6iI1BxGN9pkTyx/l+kdUd3g4vv15+7OWXnCSxRA1GyPu+YgYAG2/I/kl4e68/RnxSA3GD79dvdJV93q3h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vxX2HTQXOwyzDdlCuI8KmrCWRBnhrsV/qnO+DEs97kFNw0SF185AV6Nex4uZ8uC1tA8VXKMxgUov6IvQxnxpokgYaxRG7ZsdHkagzYO5W X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a0678ad-9385-45ed-8a33-08dce110df0b X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 05:29:35.9971 (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: IuUeqIICVOqkur4YQcInOZX4pNNPkXuUMeUcMsWPTw7iW4T8BJHieI+BXa6aLHa9RBSKe8Ad6Js9yFH4jGIDDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10536 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240929_222939_702867_9B876434 X-CRM114-Status: GOOD ( 14.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Document ITE IT6263 LVDS to HDMI converter. Product link: https://www.ite.com.tw/en/product/cate1/IT6263 Signed-off-by: Liu Ying --- .../bindings/display/bridge/ite,it6263.yaml | 310 ++++++++++++++++++ 1 file changed, 310 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/ite,it6263.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it6263.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it6263.yaml new file mode 100644 index 000000000000..97fb81e5bc4a --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6263.yaml @@ -0,0 +1,310 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/ite,it6263.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ITE IT6263 LVDS to HDMI converter + +maintainers: + - Liu Ying + +description: | + The IT6263 is a high-performance single-chip De-SSC(De-Spread Spectrum) LVDS + to HDMI converter. Combined with LVDS receiver and HDMI 1.4a transmitter, + the IT6263 supports LVDS input and HDMI 1.4 output by conversion function. + The built-in LVDS receiver can support single-link and dual-link LVDS inputs, + and the built-in HDMI transmitter is fully compliant with HDMI 1.4a/3D, HDCP + 1.2 and backward compatible with DVI 1.0 specification. + + The IT6263 also encodes and transmits up to 8 channels of I2S digital audio, + with sampling rate up to 192KHz and sample size up to 24 bits. In addition, + an S/PDIF input port takes in compressed audio of up to 192KHz frame rate. + + The newly supported High-Bit Rate(HBR) audio by HDMI specifications v1.3 is + provided by the IT6263 in two interfaces: the four I2S input ports or the + S/PDIF input port. With both interfaces the highest possible HBR frame rate + is supported at up to 768KHz. + +properties: + compatible: + const: ite,it6263 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: audio master clock + + clock-names: + const: mclk + + reset-gpios: + maxItems: 1 + + ivdd-supply: + description: 1.8V digital logic power + + ovdd-supply: + description: 3.3V I/O pin power + + txavcc18-supply: + description: 1.8V HDMI analog frontend power + + txavcc33-supply: + description: 3.3V HDMI analog frontend power + + pvcc1-supply: + description: 1.8V HDMI frontend core PLL power + + pvcc2-supply: + description: 1.8V HDMI frontend filter PLL power + + avcc-supply: + description: 3.3V LVDS frontend power + + anvdd-supply: + description: 1.8V LVDS frontend analog power + + apvdd-supply: + description: 1.8V LVDS frontend PLL power + + "#sound-dai-cells": + const: 0 + + ite,i2s-audio-fifo-sources: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 4 + items: + enum: [0, 1, 2, 3] + description: + Each array element indicates the pin number of an I2S serial data input + line which is connected to an audio FIFO, from audio FIFO0 to FIFO3. + + ite,rl-channel-swap-audio-sources: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 4 + uniqueItems: true + items: + enum: [0, 1, 2, 3] + description: + Each array element indicates an audio source whose right channel and left + channel are swapped by this converter. For I2S, the element is the pin + number of an I2S serial data input line. For S/PDIF, the element is always + 0. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + oneOf: + - properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: the first LVDS input link + + port@1: false + + port@2: + $ref: /schemas/graph.yaml#/properties/port + description: video port for the HDMI output + + port@3: + $ref: /schemas/graph.yaml#/properties/port + description: sound input port + + required: + - port@0 + - port@2 + + - properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: the first LVDS input link + + properties: + dual-lvds-odd-pixels: + type: boolean + description: the first sink port for odd pixels + + dual-lvds-even-pixels: + type: boolean + description: the first sink port for even pixels + + oneOf: + - required: [dual-lvds-odd-pixels] + - required: [dual-lvds-even-pixels] + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: the second LVDS input link + + properties: + dual-lvds-even-pixels: + type: boolean + description: the second sink port for even pixels + + dual-lvds-odd-pixels: + type: boolean + description: the second sink port for odd pixels + + oneOf: + - required: [dual-lvds-even-pixels] + - required: [dual-lvds-odd-pixels] + + port@2: + $ref: /schemas/graph.yaml#/properties/port + description: video port for the HDMI output + + port@3: + $ref: /schemas/graph.yaml#/properties/port + description: sound input port + + required: + - port@0 + - port@1 + - port@2 + + allOf: + - if: + properties: + port@0: + required: + - dual-lvds-odd-pixels + then: + properties: + port@1: + properties: + dual-lvds-odd-pixels: false + + - if: + properties: + port@0: + required: + - dual-lvds-even-pixels + then: + properties: + port@1: + properties: + dual-lvds-even-pixels: false + +required: + - compatible + - reg + - ivdd-supply + - ovdd-supply + - txavcc18-supply + - txavcc33-supply + - pvcc1-supply + - pvcc2-supply + - avcc-supply + - anvdd-supply + - apvdd-supply + - ports + +additionalProperties: false + +examples: + - | + /* single-link LVDS input */ + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hdmi@4c { + compatible = "ite,it6263"; + reg = <0x4c>; + reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + ivdd-supply = <®_buck5>; + ovdd-supply = <®_vext_3v3>; + txavcc18-supply = <®_buck5>; + txavcc33-supply = <®_vext_3v3>; + pvcc1-supply = <®_buck5>; + pvcc2-supply = <®_buck5>; + avcc-supply = <®_vext_3v3>; + anvdd-supply = <®_buck5>; + apvdd-supply = <®_buck5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + + port@2 { + reg = <2>; + + it6263_out: endpoint { + remote-endpoint = <&hdmi_in>; + }; + }; + }; + }; + }; + + - | + /* dual-link LVDS input */ + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hdmi@4c { + compatible = "ite,it6263"; + reg = <0x4c>; + reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + ivdd-supply = <®_buck5>; + ovdd-supply = <®_vext_3v3>; + txavcc18-supply = <®_buck5>; + txavcc33-supply = <®_vext_3v3>; + pvcc1-supply = <®_buck5>; + pvcc2-supply = <®_buck5>; + avcc-supply = <®_vext_3v3>; + anvdd-supply = <®_buck5>; + apvdd-supply = <®_buck5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dual-lvds-odd-pixels; + + it6263_lvds_link1_dual: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + + port@1 { + reg = <1>; + dual-lvds-even-pixels; + + it6263_lvds_link2_dual: endpoint { + remote-endpoint = <&ldb_lvds_ch1>; + }; + }; + + port@2 { + reg = <2>; + + it6263_out_dual: endpoint { + remote-endpoint = <&hdmi_in>; + }; + }; + }; + }; + }; From patchwork Mon Sep 30 05:29:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13815405 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05723CF6491 for ; Mon, 30 Sep 2024 05:40:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=y4dsoD/QCIXCyIvDUCNrT+J1XxiZ4ehhcSQPBBWHOwE=; b=f0dzIrAFTTeyPKLtGGhlu+oRko mXDZveyNuxrHY7HdLwzZbIdwwTPwGnvyDpj2S0cK+M49NFCWDAC+QvQWht1wi9eA6eRrglSxWj6/T l6y0ZOMmj3cagLWXTaM3BH5pWM9qHHh77LnWrxCQBk8lmiyF9lVFMzlFv2sl+/nOcUXJrN91X6dWi 7YuuwyW7OqhZJv7ZYDCLiMqMTyTmBnko3lE1DUOuXJobvm5i9eRINvSMY7GqFmAWlkitlRhCZGiUD WxKL0rYwcmHEV12nKDQmEfuyVqb5prn3yPF1Z24iISMa2xhiyWPwhmgMvMXx5Z19+vGs2DrvnumoR C/eB953A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sv99F-0000000Fzl5-1t68; Mon, 30 Sep 2024 05:40:41 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sv8yk-0000000FyAt-0Y4k for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 05:29:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fmX5ju3A5ylrV0X664T6KUG7jJmeo2QYr+/bStftsbIG45rsMjb1Uj3sdqvwfL0iW56bH2uEpNS0p7RQzjsKIfstw1pseI8cD/Zk5TnV3qj4WLRydw9pcorJaWAj1VXtAuQzjGKrbRUaq/tWaoDIVOeK0+q6/2mAVn2ydVGGiQeojMrEW6yQxTZnqHssd3s4uKK8nWqnqtwJK1Qk3gMKhdGQiGVSJMBb7PJqsj7WodGsw7on44ErBYlyrxxNU4gs1UuioxEzgceSLESWMa8CDJv4D0z+s4zzDArJd9Hd51Js7ZqzT8/FX7FFyV9Vsd8FIc5xn1F3xfeMMF/DHbGFYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y4dsoD/QCIXCyIvDUCNrT+J1XxiZ4ehhcSQPBBWHOwE=; b=aYEQflmI0Wkj3nvEJ/uHcp5bIGBJnZWA1DMVYoH5LlUPMrTI/Qt3CdoezgT1d3fY/enTbDmlEqDnmZlY3gq1SmysLnzYIewQmuuzTy7ysSRYEM2oWEMzYzDzx5GYdcWlquzF70ey49/lCrx5p49UWNQcqAtKKsSR32350MSJ/SuiPnTRFCyyW59j5w2Ga8RDhBtzc0H7zEqOFI3hlAz4Z7J+t+lxeeYfh2rT5PqcukZP4TWqpf74Ms7c/FEU3gbvO2KJ4a4lGhcGuc8lPix3c7gJxFsefgJu9qYSmgA5efgcm23CHedwV71GZAe0wSySCfNJfxwujGnzlRQUTjy7Rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y4dsoD/QCIXCyIvDUCNrT+J1XxiZ4ehhcSQPBBWHOwE=; b=NgwXMm7rKu3iNLlcnHm6T/r1FoVyeq64IF1tzY65ugtzHvw8cjLxX6kIwAeS1XdC68wxqr3S5vUEyKlWCWuHISsMHIWQj/iM+oGiF7KQpXBCWaGgcmoXeTf77ALSaEkuszbF43kfwsy7kYddfur4tciefpBu00aspTje9K/uZ1pQaP2XjS+aYAov+xgrQ1qaPsykeN50dWHO6CHZRglAwoZTs7Hf1gvKA1XKwnJXgU16gs2HVTSZtj1Dg0NhvrHwRbn03Gt9hraW8jqDXLgxvW4/AKl2Y/MuT34Dh2v4tp5/mLiY+CsO9rGjy9tnEf2Rtt4KZbkiv4haGtlGVb88Jg== 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 GV1PR04MB10536.eurprd04.prod.outlook.com (2603:10a6:150:208::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 05:29:44 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 05:29:44 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, o.rempel@pengutronix.de, y.moog@phytec.de Subject: [PATCH 6/8] drm/bridge: Add ITE IT6263 LVDS to HDMI converter Date: Mon, 30 Sep 2024 13:29:01 +0800 Message-Id: <20240930052903.168881-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930052903.168881-1-victor.liu@nxp.com> References: <20240930052903.168881-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0015.apcprd06.prod.outlook.com (2603:1096:4:186::7) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10536:EE_ X-MS-Office365-Filtering-Correlation-Id: 119f4bd1-7f62-4686-e39a-08dce110e40e X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014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XGOE0++KAIoRAA1ijlsqCPkOMAlR5HKyVyRjITSxPeWRFcCcwK9Lb2MyOlewATuoxRzQWc9tklJRsrBmLbD/7rRRDiX8hE//qg5P5aku7DXccj8uq9MNASUQ2eS4dxsRwvS3cEdMZhQT1zo2iX0jDqb91ahnJLhWHtNZV7qTJpJGy0GDd62lokHi2twgdwDfeMu0IhG+4FsW6e1w5lVkQO9WE1OP3jOSl2Btbaf624MR3Vt3H6ImFAv5Edm+7doSNFdDcnC3bgR+0mw1bqQ66gmwHV/qpxHc9GKmh8YcBuOsWzQIKSb6WTSwDwlruZw83qdNW1ACab4mvS70QCHrLE6YBFZHUmxm0MwgxLc7k4udTErtCNf7e+7QbsmVo4Ei9bTU45xYL46qSBtnM6MjxQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MnV90eDm4iIiIbCytVKu0BQ4P/CDvC+RkLkVr2MNn4t2q7T9G9IS4IwzG9PL8cLOSXsrkOxYck70aLeFEPWEAKpojjjPzpZtZj+wW4A9YyvRLsu+lFw0j25Pbll6OtsPXyWdNWoelai4AR/ICEFd9OEKE6QYHPpm6yYhfYDK2kO11tUD1FjYEx3+fOcN5WHFljIyo1vH7aIRaDFvpzHE25ZdQ31bud3nwbn7RBXARbIFws4ZdstMu4gAGTsoi+eRQkO++v12CJP4+cOFxjobKWeldamycomhvu9Iz+o9cABY8R+uqOFfRBa/ZLzk5Y+KHOYTrzK8cOR2tm6OehwYKu/P3UYqqcU/xlGQxCRS4ACwb5O6ZgIkbC7hC22i+0vJN+Ecil2kLT/+we/d1Q7KYa52spV/oeH/IUDLNyQw7zvqtMqtDCxDncc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M+0+/EJc/cCCfdW6F+qztrsPRqa7WZtCJP5iGLQ0/N6BsrfqYuKYGN4+pkMotZKsixA0TY2ZXR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 119f4bd1-7f62-4686-e39a-08dce110e40e X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 05:29:44.4915 (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: timJ1n7MCy/NsdlT/Xk0Go+Z48RA3i3ZWur9Nwro1mo/N8vOLDPLHsYFO2/5FZXUBaEaCBD2dafmCR9JhRPBnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10536 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240929_222950_375916_9A71A31F X-CRM114-Status: GOOD ( 15.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add basic HDMI video output support. Currently, only RGB888 output pixel format is supported. At the LVDS input side, the driver supports single LVDS link and dual LVDS links with "jeida-24" LVDS mapping. Product link: https://www.ite.com.tw/en/product/cate1/IT6263 Signed-off-by: Liu Ying Tested-by: Biju Das --- drivers/gpu/drm/bridge/Kconfig | 8 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ite-it6263.c | 829 ++++++++++++++++++++++++++++ 3 files changed, 838 insertions(+) create mode 100644 drivers/gpu/drm/bridge/ite-it6263.c diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 3eb955333c80..93f99682a090 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -90,6 +90,14 @@ config DRM_FSL_LDB help Support for i.MX8MP DPI-to-LVDS on-SoC encoder. +config DRM_ITE_IT6263 + tristate "ITE IT6263 LVDS/HDMI bridge" + depends on OF + select DRM_KMS_HELPER + select REGMAP_I2C + help + ITE IT6263 LVDS to HDMI bridge chip driver. + config DRM_ITE_IT6505 tristate "ITE IT6505 DisplayPort bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 7df87b582dca..f3776dd473fd 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_CROS_EC_ANX7688) += cros-ec-anx7688.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o obj-$(CONFIG_DRM_FSL_LDB) += fsl-ldb.o +obj-$(CONFIG_DRM_ITE_IT6263) += ite-it6263.o obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o obj-$(CONFIG_DRM_LONTIUM_LT9211) += lontium-lt9211.o diff --git a/drivers/gpu/drm/bridge/ite-it6263.c b/drivers/gpu/drm/bridge/ite-it6263.c new file mode 100644 index 000000000000..886588497bc1 --- /dev/null +++ b/drivers/gpu/drm/bridge/ite-it6263.c @@ -0,0 +1,829 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* ----------------------------------------------------------------------------- + * LVDS registers + */ + +/* LVDS software reset registers */ +#define LVDS_REG_05 0x05 +#define REG_SOFT_P_RST BIT(1) + +/* LVDS system configuration registers */ +/* 0x0b */ +#define LVDS_REG_0B 0x0b +#define REG_SSC_PCLK_RF BIT(0) +#define REG_LVDS_IN_SWAP BIT(1) + +/* LVDS test pattern gen control registers */ +/* 0x2c */ +#define LVDS_REG_2C 0x2c +#define REG_COL_DEP GENMASK(1, 0) +#define BIT8 FIELD_PREP(REG_COL_DEP, 2) +#define OUT_MAP BIT(4) +#define JEIDA 0 +#define REG_DESSC_ENB BIT(6) +#define DMODE BIT(7) +#define DISO BIT(7) +#define SISO 0 + +#define LVDS_REG_3C 0x3c +#define LVDS_REG_3F 0x3f +#define LVDS_REG_47 0x47 +#define LVDS_REG_48 0x48 +#define LVDS_REG_4F 0x4f +#define LVDS_REG_52 0x52 + +/* ----------------------------------------------------------------------------- + * HDMI registers are separated into three banks: + * 1) HDMI register common bank: 0x00 ~ 0x2f + */ + +/* HDMI genernal registers */ +#define HDMI_REG_SW_RST 0x04 +#define SOFTREF_RST BIT(5) +#define SOFTA_RST BIT(4) +#define SOFTV_RST BIT(3) +#define AUD_RST BIT(2) +#define HDCP_RST BIT(0) +#define HDMI_RST_ALL (SOFTREF_RST | SOFTA_RST | SOFTV_RST | \ + AUD_RST | HDCP_RST) + +#define HDMI_REG_SYS_STATUS 0x0e +#define HPDETECT BIT(6) +#define TXVIDSTABLE BIT(4) + +#define HDMI_REG_BANK_CTRL 0x0f +#define REG_BANK_SEL BIT(0) + +/* HDMI System DDC control registers */ +#define HDMI_REG_DDC_MASTER_CTRL 0x10 +#define MASTER_SEL_HOST BIT(0) + +#define HDMI_REG_DDC_HEADER 0x11 + +#define HDMI_REG_DDC_REQOFF 0x12 +#define HDMI_REG_DDC_REQCOUNT 0x13 +#define HDMI_REG_DDC_EDIDSEG 0x14 + +#define HDMI_REG_DDC_CMD 0x15 +#define DDC_CMD_EDID_READ 0x3 +#define DDC_CMD_FIFO_CLR 0x9 + +#define HDMI_REG_DDC_STATUS 0x16 +#define DDC_DONE BIT(7) +#define DDC_NOACK BIT(5) +#define DDC_WAITBUS BIT(4) +#define DDC_ARBILOSE BIT(3) +#define DDC_ERROR (DDC_NOACK | DDC_WAITBUS | DDC_ARBILOSE) + +#define HDMI_DDC_FIFO_BYTES 32 +#define HDMI_REG_DDC_READFIFO 0x17 +#define HDMI_REG_LVDS_PORT 0x1d /* LVDS input control I2C addr */ +#define HDMI_REG_LVDS_PORT_EN 0x1e +#define LVDS_INPUT_CTRL_I2C_ADDR 0x33 + +/* ----------------------------------------------------------------------------- + * 2) HDMI register bank0: 0x30 ~ 0xff + */ + +/* HDMI AFE registers */ +#define HDMI_REG_AFE_DRV_CTRL 0x61 +#define AFE_DRV_PWD BIT(5) +#define AFE_DRV_RST BIT(4) + +#define HDMI_REG_AFE_XP_CTRL 0x62 +#define AFE_XP_GAINBIT BIT(7) +#define AFE_XP_ER0 BIT(4) +#define AFE_XP_RESETB BIT(3) + +#define HDMI_REG_AFE_ISW_CTRL 0x63 + +#define HDMI_REG_AFE_IP_CTRL 0x64 +#define AFE_IP_GAINBIT BIT(7) +#define AFE_IP_ER0 BIT(3) +#define AFE_IP_RESETB BIT(2) + +/* HDMI input data format registers */ +#define HDMI_REG_INPUT_MODE 0x70 +#define IN_RGB 0x00 + +/* HDMI general control registers */ +#define HDMI_REG_HDMI_MODE 0xc0 +#define TX_HDMI_MODE BIT(0) + +#define HDMI_REG_GCP 0xc1 +#define AVMUTE BIT(0) +#define HDMI_COLOR_DEPTH GENMASK(6, 4) +#define HDMI_COLOR_DEPTH_24 FIELD_PREP(HDMI_COLOR_DEPTH, 4) + +#define HDMI_REG_PKT_GENERAL_CTRL 0xc6 +#define ENABLE_PKT BIT(0) +#define REPEAT_PKT BIT(1) + +/* ----------------------------------------------------------------------------- + * 3) HDMI register bank1: 0x130 ~ 0x1ff (HDMI packet registers) + */ + +/* AVI packet registers */ +#define HDMI_REG_AVI_DB1 0x158 +#define AVI_DB1_COLOR_SPACE GENMASK(6, 5) +#define AVI_COLOR_SPACE_RGB FIELD_PREP(AVI_DB1_COLOR_SPACE, 0) + +#define MAX_PIXEL_CLOCK_KHZ 150000 +#define HIGH_PIXEL_CLOCK_KHZ 80000 + +struct it6263 { + struct device *dev; + struct i2c_client *hdmi_i2c; + struct i2c_client *lvds_i2c; + struct regmap *hdmi_regmap; + struct regmap *lvds_regmap; + struct drm_bridge bridge; + struct drm_bridge *next_bridge; + struct drm_connector connector; + struct gpio_desc *reset_gpio; + bool lvds_dual_link; + bool lvds_link12_swap; +}; + +static inline struct it6263 *bridge_to_it6263(struct drm_bridge *bridge) +{ + return container_of(bridge, struct it6263, bridge); +} + +static inline struct it6263 *connector_to_it6263(struct drm_connector *conn) +{ + return container_of(conn, struct it6263, connector); +} + +static bool it6263_hdmi_writeable_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case HDMI_REG_SW_RST: + case HDMI_REG_BANK_CTRL: + case HDMI_REG_DDC_MASTER_CTRL: + case HDMI_REG_DDC_HEADER: + case HDMI_REG_DDC_REQOFF: + case HDMI_REG_DDC_REQCOUNT: + case HDMI_REG_DDC_EDIDSEG: + case HDMI_REG_DDC_CMD: + case HDMI_REG_LVDS_PORT: + case HDMI_REG_LVDS_PORT_EN: + case HDMI_REG_AFE_DRV_CTRL: + case HDMI_REG_AFE_XP_CTRL: + case HDMI_REG_AFE_ISW_CTRL: + case HDMI_REG_AFE_IP_CTRL: + case HDMI_REG_INPUT_MODE: + case HDMI_REG_HDMI_MODE: + case HDMI_REG_GCP: + case HDMI_REG_PKT_GENERAL_CTRL: + case HDMI_REG_AVI_DB1: + return true; + default: + return false; + } +} + +static bool it6263_hdmi_readable_reg(struct device *dev, unsigned int reg) +{ + if (it6263_hdmi_writeable_reg(dev, reg)) + return true; + + switch (reg) { + case HDMI_REG_SYS_STATUS: + case HDMI_REG_DDC_STATUS: + case HDMI_REG_DDC_READFIFO: + return true; + default: + return false; + } +} + +static bool it6263_hdmi_volatile_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case HDMI_REG_SW_RST: + case HDMI_REG_SYS_STATUS: + case HDMI_REG_DDC_STATUS: + case HDMI_REG_DDC_READFIFO: + return true; + default: + return false; + } +} + +static const struct regmap_range_cfg it6263_hdmi_range_cfg = { + .range_min = 0x00, + .range_max = HDMI_REG_AVI_DB1, + .selector_reg = HDMI_REG_BANK_CTRL, + .selector_mask = REG_BANK_SEL, + .selector_shift = 0, + .window_start = 0x00, + .window_len = 0x100, +}; + +static const struct regmap_config it6263_hdmi_regmap_config = { + .name = "it6263-hdmi", + .reg_bits = 8, + .val_bits = 8, + .writeable_reg = it6263_hdmi_writeable_reg, + .readable_reg = it6263_hdmi_readable_reg, + .volatile_reg = it6263_hdmi_volatile_reg, + .max_register = HDMI_REG_AVI_DB1, + .ranges = &it6263_hdmi_range_cfg, + .num_ranges = 1, + .cache_type = REGCACHE_MAPLE, +}; + +static bool it6263_lvds_writeable_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case LVDS_REG_05: + case LVDS_REG_0B: + case LVDS_REG_2C: + case LVDS_REG_3C: + case LVDS_REG_3F: + case LVDS_REG_47: + case LVDS_REG_48: + case LVDS_REG_4F: + case LVDS_REG_52: + return true; + default: + return false; + } +} + +static bool it6263_lvds_readable_reg(struct device *dev, unsigned int reg) +{ + return it6263_lvds_writeable_reg(dev, reg); +} + +static bool it6263_lvds_volatile_reg(struct device *dev, unsigned int reg) +{ + return reg == LVDS_REG_05; +} + +static const struct regmap_config it6263_lvds_regmap_config = { + .name = "it6263-lvds", + .reg_bits = 8, + .val_bits = 8, + .writeable_reg = it6263_lvds_writeable_reg, + .readable_reg = it6263_lvds_readable_reg, + .volatile_reg = it6263_lvds_volatile_reg, + .max_register = LVDS_REG_52, + .cache_type = REGCACHE_MAPLE, +}; + +static const char * const it6263_supplies[] = { + "ivdd", "ovdd", "txavcc18", "txavcc33", "pvcc1", "pvcc2", + "avcc", "anvdd", "apvdd" +}; + +static int it6263_parse_dt(struct it6263 *it) +{ + struct device *dev = it->dev; + struct device_node *port0, *port1; + int ret = 0; + + it->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 2, 0); + if (IS_ERR(it->next_bridge)) + return dev_err_probe(dev, PTR_ERR(it->next_bridge), + "failed to get next bridge\n"); + + port0 = of_graph_get_port_by_id(dev->of_node, 0); + port1 = of_graph_get_port_by_id(dev->of_node, 1); + if (port0 && port1) { + if (of_property_read_bool(port0, "dual-lvds-even-pixels") && + of_property_read_bool(port1, "dual-lvds-odd-pixels")) { + it->lvds_dual_link = true; + it->lvds_link12_swap = true; + } else if (of_property_read_bool(port0, "dual-lvds-odd-pixels") && + of_property_read_bool(port1, "dual-lvds-even-pixels")) { + it->lvds_dual_link = true; + } + + if (!it->lvds_dual_link) { + dev_err(dev, + "failed to get LVDS dual link pixel order\n"); + ret = -EINVAL; + } + } else if (port1) { + ret = -EINVAL; + dev_err(dev, "single input LVDS port1 is not supported\n"); + } else if (!port0) { + ret = -EINVAL; + dev_err(dev, "no input LVDS port\n"); + } + + of_node_put(port0); + of_node_put(port1); + + return ret; +} + +static inline void it6263_reset(struct it6263 *it) +{ + if (!it->reset_gpio) + return; + + gpiod_set_value_cansleep(it->reset_gpio, 0); + fsleep(1000); + gpiod_set_value_cansleep(it->reset_gpio, 1); + /* The chip maker says the low pulse should be at least 40ms. */ + fsleep(40000); + gpiod_set_value_cansleep(it->reset_gpio, 0); + /* addtional time to wait the high voltage to be stable */ + fsleep(5000); +} + +static inline int it6263_lvds_set_i2c_addr(struct it6263 *it) +{ + int ret; + + ret = regmap_write(it->hdmi_regmap, HDMI_REG_LVDS_PORT, + LVDS_INPUT_CTRL_I2C_ADDR << 1); + if (ret) + return ret; + + return regmap_write(it->hdmi_regmap, HDMI_REG_LVDS_PORT_EN, BIT(0)); +} + +static inline void it6263_lvds_reset(struct it6263 *it) +{ + /* AFE PLL reset */ + regmap_write_bits(it->lvds_regmap, LVDS_REG_3C, BIT(0), 0x0); + fsleep(1000); + regmap_write_bits(it->lvds_regmap, LVDS_REG_3C, BIT(0), BIT(0)); + + /* software pixel clock domain reset */ + regmap_write_bits(it->lvds_regmap, LVDS_REG_05, REG_SOFT_P_RST, + REG_SOFT_P_RST); + fsleep(1000); + regmap_write_bits(it->lvds_regmap, LVDS_REG_05, REG_SOFT_P_RST, 0x0); + fsleep(10000); +} + +static inline void it6263_lvds_set_interface(struct it6263 *it) +{ + /* color depth */ + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, REG_COL_DEP, BIT8); + /* output mapping */ + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, OUT_MAP, JEIDA); + + if (it->lvds_dual_link) { + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, DMODE, DISO); + regmap_write_bits(it->lvds_regmap, LVDS_REG_52, BIT(1), BIT(1)); + } else { + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, DMODE, SISO); + regmap_write_bits(it->lvds_regmap, LVDS_REG_52, BIT(1), 0); + } +} + +static inline void it6263_lvds_set_afe(struct it6263 *it) +{ + regmap_write(it->lvds_regmap, LVDS_REG_3C, 0xaa); + regmap_write(it->lvds_regmap, LVDS_REG_3F, 0x02); + regmap_write(it->lvds_regmap, LVDS_REG_47, 0xaa); + regmap_write(it->lvds_regmap, LVDS_REG_48, 0x02); + regmap_write(it->lvds_regmap, LVDS_REG_4F, 0x11); + + regmap_write_bits(it->lvds_regmap, LVDS_REG_0B, REG_SSC_PCLK_RF, + REG_SSC_PCLK_RF); + regmap_write_bits(it->lvds_regmap, LVDS_REG_3C, 0x07, 0); + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, REG_DESSC_ENB, + REG_DESSC_ENB); +} + +static inline void it6263_lvds_sys_cfg(struct it6263 *it) +{ + regmap_write_bits(it->lvds_regmap, LVDS_REG_0B, REG_LVDS_IN_SWAP, + it->lvds_link12_swap ? REG_LVDS_IN_SWAP : 0); +} + +static inline void it6263_lvds_config(struct it6263 *it) +{ + it6263_lvds_reset(it); + it6263_lvds_set_interface(it); + it6263_lvds_set_afe(it); + it6263_lvds_sys_cfg(it); +} + +static inline void it6263_hdmi_config(struct it6263 *it) +{ + regmap_write(it->hdmi_regmap, HDMI_REG_SW_RST, HDMI_RST_ALL); + regmap_write(it->hdmi_regmap, HDMI_REG_INPUT_MODE, IN_RGB); + regmap_write_bits(it->hdmi_regmap, HDMI_REG_GCP, HDMI_COLOR_DEPTH, + HDMI_COLOR_DEPTH_24); + regmap_write_bits(it->hdmi_regmap, HDMI_REG_AVI_DB1, + AVI_DB1_COLOR_SPACE, AVI_COLOR_SPACE_RGB); +} + +static enum drm_connector_status it6263_detect(struct it6263 *it) +{ + unsigned int val; + + regmap_read(it->hdmi_regmap, HDMI_REG_SYS_STATUS, &val); + if (val & HPDETECT) + return connector_status_connected; + else + return connector_status_disconnected; +} + +static enum drm_connector_status +it6263_connector_detect(struct drm_connector *connector, bool force) +{ + struct it6263 *it = connector_to_it6263(connector); + + return it6263_detect(it); +} + +static const struct drm_connector_funcs it6263_connector_funcs = { + .detect = it6263_connector_detect, + .fill_modes = drm_helper_probe_single_connector_modes, + .destroy = drm_connector_cleanup, + .reset = drm_atomic_helper_connector_reset, + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, +}; + +static int it6263_read_edid(void *data, u8 *buf, unsigned int block, size_t len) +{ + struct it6263 *it = data; + struct regmap *regmap = it->hdmi_regmap; + unsigned int start = (block % 2) * EDID_LENGTH; + unsigned int segment = block >> 1; + unsigned int count, val; + int ret; + + regmap_write(regmap, HDMI_REG_DDC_MASTER_CTRL, MASTER_SEL_HOST); + regmap_write(regmap, HDMI_REG_DDC_HEADER, DDC_ADDR << 1); + regmap_write(regmap, HDMI_REG_DDC_EDIDSEG, segment); + + while (len) { + /* clear DDC FIFO */ + regmap_write(regmap, HDMI_REG_DDC_CMD, DDC_CMD_FIFO_CLR); + + ret = regmap_read_poll_timeout(regmap, HDMI_REG_DDC_STATUS, + val, val & DDC_DONE, + 2000, 10000); + if (ret) { + dev_err(it->dev, "failed to clear DDC FIFO:%d\n", ret); + return ret; + } + + count = len > HDMI_DDC_FIFO_BYTES ? HDMI_DDC_FIFO_BYTES : len; + + /* fire the read command */ + regmap_write(regmap, HDMI_REG_DDC_REQOFF, start); + regmap_write(regmap, HDMI_REG_DDC_REQCOUNT, count); + regmap_write(regmap, HDMI_REG_DDC_CMD, DDC_CMD_EDID_READ); + + start += count; + len -= count; + + ret = regmap_read_poll_timeout(regmap, HDMI_REG_DDC_STATUS, val, + val & (DDC_DONE | DDC_ERROR), + 20000, 250000); + if (ret && !(val & DDC_ERROR)) { + dev_err(it->dev, "failed to read EDID:%d\n", ret); + return ret; + } + + if (val & DDC_ERROR) { + dev_err(it->dev, "DDC error\n"); + return -EIO; + } + + /* cache to buffer */ + for (; count > 0; count--) { + regmap_read(regmap, HDMI_REG_DDC_READFIFO, &val); + *(buf++) = val; + } + } + + return 0; +} + +static int it6263_connector_get_modes(struct drm_connector *connector) +{ + struct it6263 *it = connector_to_it6263(connector); + const struct drm_edid *drm_edid; + int count; + + drm_edid = drm_edid_read_custom(connector, it6263_read_edid, it); + + drm_edid_connector_update(connector, drm_edid); + count = drm_edid_connector_add_modes(connector); + + drm_edid_free(drm_edid); + + return count; +} + +static const struct drm_connector_helper_funcs it6263_connector_helper_funcs = { + .get_modes = it6263_connector_get_modes, +}; + +static int it6263_bridge_atomic_check(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state) +{ + struct drm_display_mode *mode = &crtc_state->adjusted_mode; + + return mode->clock > MAX_PIXEL_CLOCK_KHZ ? -EINVAL : 0; +} + +static void +it6263_bridge_atomic_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) +{ + struct it6263 *it = bridge_to_it6263(bridge); + + regmap_write_bits(it->hdmi_regmap, HDMI_REG_GCP, AVMUTE, AVMUTE); + regmap_write(it->hdmi_regmap, HDMI_REG_PKT_GENERAL_CTRL, 0); + regmap_write(it->hdmi_regmap, HDMI_REG_AFE_DRV_CTRL, + AFE_DRV_RST | AFE_DRV_PWD); +} + +static void +it6263_bridge_atomic_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) +{ + struct drm_atomic_state *state = old_bridge_state->base.state; + struct it6263 *it = bridge_to_it6263(bridge); + const struct drm_crtc_state *crtc_state; + struct regmap *regmap = it->hdmi_regmap; + const struct drm_display_mode *mode; + struct drm_connector *connector; + bool is_stable = false; + struct drm_crtc *crtc; + unsigned int val; + bool pclk_high; + int i, ret; + + connector = drm_atomic_get_new_connector_for_encoder(state, + bridge->encoder); + crtc = drm_atomic_get_new_connector_state(state, connector)->crtc; + crtc_state = drm_atomic_get_new_crtc_state(state, crtc); + mode = &crtc_state->adjusted_mode; + + regmap_write(regmap, HDMI_REG_HDMI_MODE, TX_HDMI_MODE); + + /* HDMI AFE setup */ + pclk_high = mode->clock > HIGH_PIXEL_CLOCK_KHZ ? true : false; + regmap_write(regmap, HDMI_REG_AFE_DRV_CTRL, AFE_DRV_RST); + if (pclk_high) + regmap_write(regmap, HDMI_REG_AFE_XP_CTRL, + AFE_XP_GAINBIT | AFE_XP_RESETB); + else + regmap_write(regmap, HDMI_REG_AFE_XP_CTRL, + AFE_XP_ER0 | AFE_XP_RESETB); + regmap_write(regmap, HDMI_REG_AFE_ISW_CTRL, 0x10); + if (pclk_high) + regmap_write(regmap, HDMI_REG_AFE_IP_CTRL, + AFE_IP_GAINBIT | AFE_IP_RESETB); + else + regmap_write(regmap, HDMI_REG_AFE_IP_CTRL, + AFE_IP_ER0 | AFE_IP_RESETB); + + /* HDMI software video reset */ + regmap_write_bits(regmap, HDMI_REG_SW_RST, SOFTV_RST, SOFTV_RST); + fsleep(1000); + regmap_write_bits(regmap, HDMI_REG_SW_RST, SOFTV_RST, 0); + + /* reconfigure LVDS and retry several times in case video is instable */ + for (i = 0; i < 3; i++) { + ret = regmap_read_poll_timeout(regmap, HDMI_REG_SYS_STATUS, val, + val & TXVIDSTABLE, + 20000, 500000); + if (!ret) { + is_stable = true; + break; + } + + it6263_lvds_config(it); + } + + if (!is_stable) + dev_warn(it->dev, "failed to wait for video stable\n"); + + /* HDMI AFE reset release and power up */ + regmap_write(regmap, HDMI_REG_AFE_DRV_CTRL, 0); + + regmap_write_bits(regmap, HDMI_REG_GCP, AVMUTE, 0); + + regmap_write(regmap, HDMI_REG_PKT_GENERAL_CTRL, ENABLE_PKT | REPEAT_PKT); +} + +static enum drm_mode_status +it6263_bridge_mode_valid(struct drm_bridge *bridge, + const struct drm_display_info *info, + const struct drm_display_mode *mode) +{ + return mode->clock > MAX_PIXEL_CLOCK_KHZ ? MODE_CLOCK_HIGH : MODE_OK; +} + +static int it6263_bridge_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) +{ + struct it6263 *it = bridge_to_it6263(bridge); + int ret; + + ret = drm_bridge_attach(bridge->encoder, it->next_bridge, bridge, + flags | DRM_BRIDGE_ATTACH_NO_CONNECTOR); + if (ret < 0) + return ret; + + if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) + return 0; + + it->connector.polled = DRM_CONNECTOR_POLL_CONNECT | + DRM_CONNECTOR_POLL_DISCONNECT; + + ret = drm_connector_init(bridge->dev, &it->connector, + &it6263_connector_funcs, + DRM_MODE_CONNECTOR_HDMIA); + if (ret) + return ret; + + drm_connector_helper_add(&it->connector, + &it6263_connector_helper_funcs); + drm_connector_attach_encoder(&it->connector, bridge->encoder); + + return 0; +} + +static enum drm_connector_status it6263_bridge_detect(struct drm_bridge *bridge) +{ + struct it6263 *it = bridge_to_it6263(bridge); + + return it6263_detect(it); +} + +static const struct drm_edid * +it6263_bridge_edid_read(struct drm_bridge *bridge, + struct drm_connector *connector) +{ + struct it6263 *it = bridge_to_it6263(bridge); + + return drm_edid_read_custom(connector, it6263_read_edid, it); +} + +static u32 * +it6263_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state, + u32 output_fmt, + unsigned int *num_input_fmts) +{ + u32 *input_fmts; + + input_fmts = kmalloc(sizeof(*input_fmts), GFP_KERNEL); + if (!input_fmts) { + *num_input_fmts = 0; + return NULL; + } + + input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA; + *num_input_fmts = 1; + + return input_fmts; +} + +static const struct drm_bridge_funcs it6263_bridge_funcs = { + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_reset = drm_atomic_helper_bridge_reset, + .attach = it6263_bridge_attach, + .mode_valid = it6263_bridge_mode_valid, + .atomic_disable = it6263_bridge_atomic_disable, + .atomic_enable = it6263_bridge_atomic_enable, + .atomic_check = it6263_bridge_atomic_check, + .detect = it6263_bridge_detect, + .edid_read = it6263_bridge_edid_read, + .atomic_get_input_bus_fmts = it6263_bridge_atomic_get_input_bus_fmts, +}; + +static int it6263_probe(struct i2c_client *client) +{ + struct device *dev = &client->dev; + struct it6263 *it; + int ret; + + it = devm_kzalloc(dev, sizeof(*it), GFP_KERNEL); + if (!it) + return -ENOMEM; + + it->dev = dev; + it->hdmi_i2c = client; + + it->hdmi_regmap = devm_regmap_init_i2c(client, + &it6263_hdmi_regmap_config); + if (IS_ERR(it->hdmi_regmap)) + return dev_err_probe(dev, PTR_ERR(it->hdmi_regmap), + "failed to init I2C regmap for HDMI\n"); + + it->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(it->reset_gpio)) + return dev_err_probe(dev, PTR_ERR(it->reset_gpio), + "failed to get reset gpio\n"); + + ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(it6263_supplies), + it6263_supplies); + if (ret) + return dev_err_probe(dev, ret, "failed to get power supplies\n"); + + ret = it6263_parse_dt(it); + if (ret) + return ret; + + it6263_reset(it); + + ret = it6263_lvds_set_i2c_addr(it); + if (ret) + return dev_err_probe(dev, ret, "failed to set I2C addr\n"); + + it->lvds_i2c = devm_i2c_new_dummy_device(dev, client->adapter, + LVDS_INPUT_CTRL_I2C_ADDR); + if (IS_ERR(it->lvds_i2c)) + dev_err_probe(it->dev, PTR_ERR(it->lvds_i2c), + "failed to allocate I2C device for LVDS\n"); + + it->lvds_regmap = devm_regmap_init_i2c(it->lvds_i2c, + &it6263_lvds_regmap_config); + if (IS_ERR(it->lvds_regmap)) + return dev_err_probe(dev, PTR_ERR(it->lvds_regmap), + "failed to init I2C regmap for LVDS\n"); + + it6263_lvds_config(it); + it6263_hdmi_config(it); + + i2c_set_clientdata(client, it); + + it->bridge.funcs = &it6263_bridge_funcs; + it->bridge.of_node = dev->of_node; + it->bridge.ops = DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_DETECT; + drm_bridge_add(&it->bridge); + + return 0; +} + +static void it6263_remove(struct i2c_client *client) +{ + struct it6263 *it = i2c_get_clientdata(client); + + drm_bridge_remove(&it->bridge); +} + +static const struct of_device_id it6263_of_match[] = { + { .compatible = "ite,it6263", }, + { } +}; +MODULE_DEVICE_TABLE(of, it6263_of_match); + +static const struct i2c_device_id it6263_i2c_ids[] = { + { "it6263", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, it6263_i2c_ids); + +static struct i2c_driver it6263_driver = { + .probe = it6263_probe, + .remove = it6263_remove, + .driver = { + .name = "it6263", + .of_match_table = it6263_of_match, + }, + .id_table = it6263_i2c_ids, +}; +module_i2c_driver(it6263_driver); + +MODULE_DESCRIPTION("ITE Tech. Inc. IT6263 LVDS/HDMI bridge"); +MODULE_AUTHOR("Liu Ying "); +MODULE_LICENSE("GPL"); From patchwork Mon Sep 30 05:29:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13815406 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8DCFCF6491 for ; Mon, 30 Sep 2024 05:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WcYY8o3W4qjWey/1ydyJWgGTXEl4ZlHOsrKKk70NEw4=; b=SoZ/PUFsfa3ilwqV1Ddc0lepgT saAh4lhnwwC80jN6b9GmgatDqTLO7GrA1hNpXh/ccNUSULMLsBt4+2scEtQNfco1ff3jnqdaSMhGt SieFeD86aQI/ltQPQfe13lwUec+abzqxqdkXuyojvxbo9RzVKjv9hEtXXaxIxSf0k1srBWfGRO1ss u4bkOhBLUx2jjViygSJjwLLbGJQj+QC3rCIFVISWy8T2y10UcJuz5yl37dhdwusV6rR8uCfgQvJJo LGQ5sOwPIWAArxmetVK7BGfMTpWEYu99c2aN9u29wA0k4rzOvgL12Lw0k8QkhYbIpUsSK1o/UvdaW h0P1P7Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sv9AP-0000000FzqQ-0Pwp; Mon, 30 Sep 2024 05:41:53 +0000 Received: from mail-am6eur05on2062f.outbound.protection.outlook.com ([2a01:111:f403:2612::62f] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sv8yq-0000000FyDN-1rEs for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 05:29:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ltRFRpr99whJwZWy2gJB2OTLzVgprZHSBmu1ZCdMevEFBWmMEZgy3VVKfCf3Qf13d9QuQQJIlirkdD6ouIduKatoP4RLBt9JCueoVb/Kh5BDAXk+uZ2u1459heVVD7Nyg9aaoaL/tQ7ULS2yatWrAuANUh2nkn7D+QVk4HjLLNhNarLHAc0/oyIORRuRW0mfbTKvHnBWN0DuFAIjRNUQ3dfTj94v7cM6nakddk6EhB2XNs5OyI9h1044ZHq9atUhlcq9DrmXCVffGo1pT1iX4skt8HTVkI5ES6pxPCFQ6LwBL5WEp6eRSPRaQ9JYUDc5RxP/aGVLEANLM2MfUIbRmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WcYY8o3W4qjWey/1ydyJWgGTXEl4ZlHOsrKKk70NEw4=; b=t+wzEcbNKFiv5lybK8EMix2FCLdj52ndwzj30NjU1CRFFbrH6SH+QfQMB/CmubVP/UEb+TabHOpZVV9/ZqmS2ONXbC42V8WlYzm8Lo9FS/HBrNAbgaGdr6RhPD/YAnen0GThjqHKaV6Kg6dm79MzBL49m4G6WeVcg8fdwoG2S/V435mUK++fxK+fWwRCmynrvTjRLNGn9VmPjdj78q+WbZrfScKIcIiEUIoZsEk9X+68OUSMXWhIkYqWt9EAdIdEusahvJbP6QhSkcT3JZqz5SGsROBCM0ug5LMToGLofnVmhXAwvA3lYYK5FdVNE78wLk2exA4Cnciihn7X4EK2JA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WcYY8o3W4qjWey/1ydyJWgGTXEl4ZlHOsrKKk70NEw4=; b=IT6D6yTUNors2Q6v0aiyQaaFRNbO2xxccTgpnK/UiHJxS7UwRazJ8qcxU2+4YH6t8VRtBmzjNJWPTRUSTFfSl3nJ5zZ3mPtH3VfqILog6uYFRi9l74dU6RP0Ml3hAmPzkbw3zKT7q6QbnmZYjdhYMg8/6sZE4E6nUJxbHaKa3h5eJaYDEhtzwa9ftEQ1EK+QsslSDcILKQ0ZItYVqlUU5xXYtRUUhmh/KNHjdQm+1vphvuDBEcNCD2xJ5CTdIoGVUjH3vMT2oP3L0DgxRM9WKFTxQ/d3Y8o4uE8JFoqw1EO7ilIwivh0aXO2Rgol0okVhvbOtraAniOtcymBBajuqw== 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 AS8PR04MB9141.eurprd04.prod.outlook.com (2603:10a6:20b:448::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.24; Mon, 30 Sep 2024 05:29:52 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 05:29:52 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, o.rempel@pengutronix.de, y.moog@phytec.de Subject: [PATCH 7/8] arm64: dts: imx8mp-evk: Add NXP LVDS to HDMI adapter cards Date: Mon, 30 Sep 2024 13:29:02 +0800 Message-Id: <20240930052903.168881-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930052903.168881-1-victor.liu@nxp.com> References: <20240930052903.168881-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0015.apcprd06.prod.outlook.com (2603:1096:4:186::7) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB9141:EE_ X-MS-Office365-Filtering-Correlation-Id: c69b02f2-2f90-4a8e-cded-08dce110e922 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024|7416014|38350700014; X-Microsoft-Antispam-Message-Info: KYhQ1RzBDveODGPf3Wry5KTZikod967NvvxtxCJ6OzoFqaoLdbAFaPANvt2lyKTDEkw1Ad+ugmSoYiRMEE33nkRF9D1YG4yW0nPLr5+E1NyAKpKpFcwZxbzU0Z4d9naJ01qdvX8Pagrasz6xMfaXhxUd9uhcRSYO/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y/XErwR5VmSc/aBjkJ/VyIu2pe3nDSgNNeGFCG0KqOtAKGCaGlb8TdR3/jMsnYp4Unb+lD8pYSOUwHdYu+PiTUD8mzk/kcKuPfZbCzPG46XZ+FhxCp7Sh3DLw6DOMq0iW8okWoBwGmckobZrPOQpv/vYKFzO1qc9eEQDJc7TeRZWiLX8amOAMIJ6LtMhTfMJADwIl55uW2koVwqTUDvZQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(366016)(1800799024)(7416014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: noBd4zaCA2A0d7RDVovSHECjB9lmbvRFMxwxrvLnZGbY57HZXsoLXPPOYmujAhANQIWhx1ubWZwXSHTOC/Am+x+l7G3nv0HUrUg6sVJCKLTWxyeSoqEi1C2ftx84s+pdETQhYWiPC1Xxvzq5RknC9P86zDyjfohoGbt0HA+xlAdYx4HrqCTMWk5XHv4pxVg9C5XG/CBpur2BtYl8hfmlZsuV/gngwu0pe/FBjIgTLMyQEUJbuvrI+lVBTOHA/TgvrqiLeGa+B8F0Nlm0QVRqWOCAwCkU2AG94cvxfPrYpbpiBYydD2VnPfm4q+j2MKmYcRhvcbVRd/g2B2MNitUpDm+1qUYAo3UeI6Zqwc3HzFWr3IpZtONYIZ/LqwrE8piSnBnmW7erMnXmh+Ec3tNjzKSLxV/Ty+8eSqMri0COxE8NIjqMO8qdCoqWeU+yuCEfIk1M51RTfBBYfam7pQ3YpfW9joYZfCqLdgyv/7kArbnhxYQWepGmjj+XxSYPV5prI6CtnuvgR2n6qT9AOZCOFTNbxccLt6rp26eeECYkO4bNk3xd7wHGD0DnK33f0fTwdJZUoaJHhjAXKtBap0cMb2qXKTt4FJljGoUwx+4mBomMoWA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Source: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 05:29:52.8519 (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: my5wyxFlSlSWbCANggdXIPWElJsE/nk1c3gjFTkFaOVKKP3RzE1eZbKU040QyrFDO4nlDP1YcdAQuTRdmBOhMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9141 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240929_222956_674799_A8A9AD21 X-CRM114-Status: GOOD ( 15.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org One ITE IT6263 LVDS to HDMI converter is populated on NXP IMX-LVDS-HDMI and IMX-DLVDS-HDMI adapter cards. Card IMX-LVDS-HDMI supports single LVDS link(IT6263 link1). Card IMX-DLVDS-HDMI supports dual LVDS links(IT6263 link1 and link2). Only one card can be enabled with one i.MX8MP EVK. Add dedicated overlays to support the below four connections: 1) imx8mp-evk-lvds0-imx-lvds-hdmi.dtso: i.MX8MP EVK LVDS0 connector <=> LVDS adapter card J6(IT6263 link1) 2) imx8mp-evk-lvds1-imx-lvds-hdmi.dtso: i.MX8MP EVK LVDS1 connector <=> LVDS adapter card J6(IT6263 link1) 3) imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso: i.MX8MP EVK LVDS0 connector <=> DLVDS adapter card channel0(IT6263 link1) i.MX8MP EVK LVDS1 connector <=> DLVDS adapter card channel1(IT6263 link2) 4) imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso: i.MX8MP EVK LVDS1 connector <=> DLVDS adapter card channel0(IT6263 link1) i.MX8MP EVK LVDS0 connector <=> DLVDS adapter card channel1(IT6263 link2) Part links: https://www.nxp.com/part/IMX-LVDS-HDMI https://www.nxp.com/part/IMX-DLVDS-HDMI Signed-off-by: Liu Ying --- arch/arm64/boot/dts/freescale/Makefile | 8 ++++ .../imx8mp-evk-imx-lvds-hdmi-common.dtsi | 29 ++++++++++++ ...8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso | 44 +++++++++++++++++++ ...imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi | 42 ++++++++++++++++++ .../imx8mp-evk-lvds0-imx-lvds-hdmi.dtso | 28 ++++++++++++ ...8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso | 44 +++++++++++++++++++ ...imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi | 42 ++++++++++++++++++ .../imx8mp-evk-lvds1-imx-lvds-hdmi.dtso | 28 ++++++++++++ arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 6 +++ 9 files changed, 271 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-imx-lvds-hdmi-common.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi.dtso create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi.dtso diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile index 9d3df8b218a2..cc4333f49c2d 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -196,7 +196,15 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-dev.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-mallow.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-yavia.dtb +imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0-dtbs += imx8mp-evk.dtb imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtbo +imx8mp-evk-lvds0-imx-lvds-hdmi-dtbs += imx8mp-evk.dtb imx8mp-evk-lvds0-imx-lvds-hdmi.dtbo +imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0-dtbs += imx8mp-evk.dtb imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtbo +imx8mp-evk-lvds1-imx-lvds-hdmi-dtbs += imx8mp-evk.dtb imx8mp-evk-lvds1-imx-lvds-hdmi.dtbo imx8mp-evk-mx8-dlvds-lcd1-dtbs += imx8mp-evk.dtb imx8mp-evk-mx8-dlvds-lcd1.dtbo +dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtb +dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-lvds0-imx-lvds-hdmi.dtb +dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtb +dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-lvds1-imx-lvds-hdmi.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-mx8-dlvds-lcd1.dtb imx8mp-tqma8mpql-mba8mpxl-lvds-dtbs += imx8mp-tqma8mpql-mba8mpxl.dtb imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-imx-lvds-hdmi-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-evk-imx-lvds-hdmi-common.dtsi new file mode 100644 index 000000000000..44b30e9b3fde --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-imx-lvds-hdmi-common.dtsi @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +/dts-v1/; +/plugin/; + +&{/} { + lvds-hdmi-connector { + compatible = "hdmi-connector"; + label = "J2"; + type = "a"; + + port { + lvds2hdmi_connector_in: endpoint { + remote-endpoint = <&it6263_out>; + }; + }; + }; +}; + +&lcdif2 { + status = "okay"; +}; + +&lvds_bridge { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso new file mode 100644 index 000000000000..4008d2fd36d6 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include "imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi" + +&it6263 { + ports { + port@0 { + reg = <0>; + dual-lvds-odd-pixels; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + + port@1 { + reg = <1>; + dual-lvds-even-pixels; + + it6263_lvds_link2: endpoint { + remote-endpoint = <&ldb_lvds_ch1>; + }; + }; + }; +}; + +&lvds_bridge { + ports { + port@1 { + ldb_lvds_ch0: endpoint { + remote-endpoint = <&it6263_lvds_link1>; + }; + }; + + port@2 { + ldb_lvds_ch1: endpoint { + remote-endpoint = <&it6263_lvds_link2>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi new file mode 100644 index 000000000000..c276e084ac8a --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include +#include "imx8mp-evk-imx-lvds-hdmi-common.dtsi" + +&i2c2 { + #address-cells = <1>; + #size-cells = <0>; + + it6263: hdmi@4c { + compatible = "ite,it6263"; + reg = <0x4c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lvds_en>; + reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + ivdd-supply = <®_buck5>; + ovdd-supply = <®_vext_3v3>; + txavcc18-supply = <®_buck5>; + txavcc33-supply = <®_vext_3v3>; + pvcc1-supply = <®_buck5>; + pvcc2-supply = <®_buck5>; + avcc-supply = <®_vext_3v3>; + anvdd-supply = <®_buck5>; + apvdd-supply = <®_buck5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@2 { + reg = <2>; + + it6263_out: endpoint { + remote-endpoint = <&lvds2hdmi_connector_in>; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi.dtso b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi.dtso new file mode 100644 index 000000000000..9e11f261ad13 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-lvds-hdmi.dtso @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include "imx8mp-evk-lvds0-imx-lvds-hdmi-common.dtsi" + +&it6263 { + ports { + port@0 { + reg = <0>; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + }; +}; + +&lvds_bridge { + ports { + port@1 { + ldb_lvds_ch0: endpoint { + remote-endpoint = <&it6263_lvds_link1>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso new file mode 100644 index 000000000000..af2e73e36a1b --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-dlvds-hdmi-channel0.dtso @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include "imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi" + +&it6263 { + ports { + port@0 { + reg = <0>; + dual-lvds-even-pixels; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch1>; + }; + }; + + port@1 { + reg = <1>; + dual-lvds-odd-pixels; + + it6263_lvds_link2: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + }; +}; + +&lvds_bridge { + ports { + port@1 { + ldb_lvds_ch0: endpoint { + remote-endpoint = <&it6263_lvds_link2>; + }; + }; + + port@2 { + ldb_lvds_ch1: endpoint { + remote-endpoint = <&it6263_lvds_link1>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi new file mode 100644 index 000000000000..7fb38f417e6e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include +#include "imx8mp-evk-imx-lvds-hdmi-common.dtsi" + +&i2c3 { + #address-cells = <1>; + #size-cells = <0>; + + it6263: hdmi@4c { + compatible = "ite,it6263"; + reg = <0x4c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lvds_en>; + reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + ivdd-supply = <®_buck5>; + ovdd-supply = <®_vext_3v3>; + txavcc18-supply = <®_buck5>; + txavcc33-supply = <®_vext_3v3>; + pvcc1-supply = <®_buck5>; + pvcc2-supply = <®_buck5>; + avcc-supply = <®_vext_3v3>; + anvdd-supply = <®_buck5>; + apvdd-supply = <®_buck5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@2 { + reg = <2>; + + it6263_out: endpoint { + remote-endpoint = <&lvds2hdmi_connector_in>; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi.dtso b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi.dtso new file mode 100644 index 000000000000..527a893a71b2 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds1-imx-lvds-hdmi.dtso @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +#include "imx8mp-evk-lvds1-imx-lvds-hdmi-common.dtsi" + +&it6263 { + ports { + port@0 { + reg = <0>; + + it6263_lvds_link1: endpoint { + remote-endpoint = <&ldb_lvds_ch1>; + }; + }; + }; +}; + +&lvds_bridge { + ports { + port@2 { + ldb_lvds_ch1: endpoint { + remote-endpoint = <&it6263_lvds_link1>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index d26930f1a9e9..68e12a752edd 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -938,6 +938,12 @@ MX8MP_IOMUXC_SPDIF_TX__I2C5_SCL 0x400001c2 >; }; + pinctrl_lvds_en: lvdsengrp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10 0x1c0 + >; + }; + pinctrl_pcie0: pcie0grp { fsl,pins = < MX8MP_IOMUXC_I2C4_SCL__PCIE_CLKREQ_B 0x60 /* open drain, pull up */ From patchwork Mon Sep 30 05:29:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13815407 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2F2F8CF6497 for ; Mon, 30 Sep 2024 05:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5RUqrTNZbKimeOVTPjdQkQNCF4ikDMS01e5WkWjIIzE=; b=b7rsenUhm+jkQhhmwKiu5A/vhj 2oGBhRbVsY5oQM6CVA4Z3xIGIQWg/jWrMFR1XAOOSBrJOpLCy3eJ1/OI6TbwiVQiDPI7AXKIoKip/ q7dZPBXlm5zceIoV6r5Off6om8YzzCNUZL4UUYjBFzRkwU5s6HSKcXMPlddrkV1y9TZy2kUrgIr4L y/69/JRWhw2OXRSd/KhghDbEd47yK1dTgAZg+Wx6Bt46fQ/gSNTAbu/bx3FGtYiI5d5/kH9upMBTw 0YJnzd41ZDH7IVrf8WZo2IcBB+tHmHs43RusFZ0tH7dyvtMnFocWKfuZAuL6WGXjtDsH2rLCSqFsW Z1eAnoGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sv9BY-0000000G0Gm-2qBF; Mon, 30 Sep 2024 05:43:04 +0000 Received: from mail-am6eur05on20627.outbound.protection.outlook.com ([2a01:111:f403:2612::627] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sv8z0-0000000FyHd-1u3D for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 05:30:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=riIETv8+dE8a7un6iin2pUIpsVvUWQaAYSUzmS3wVkMz6FLJ94BZi05cs5668NQaxEdShUj+kyp2/zBG7IIUUsF2P/VUfjyT2O7s2ZXXLJTpE98WVo2xKWu30XvoLN7NKl8BAasTSJJ4Ts17tyD9vLokC9e+qs2+FsFYcHTk5kUkk0clGc77PSrvhir5W53a0IUAn6baD/6netnt+iNLbe0fOz8RuvjDkZJQjv7xgDZg5ENQf98zgQxTguJ7QlxShXgX7AcaLBWUVEUOEB5lNXSdwTsrz2GsoEkv10xwNeZpLjRX9PTpZzxhemDnKSuam7/PUHrHLLKg3Lt+WxwmjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5RUqrTNZbKimeOVTPjdQkQNCF4ikDMS01e5WkWjIIzE=; b=fVh+kxUy5GgiLBHENCTp2EIoz9nyKNjsFFR85cN9RSEm1eneCG64pfKrslQbVXNQAi0h8pHvczhSh3ZLIQ3sHsL1HAvDl/sKwIewEMNdybJM9mkD5fMS3P89ugFLNt9l2sqiwgKQf1YXquDTmtwXvdQFTxqJn1cP/f/D10wnp7YSCnu7tPVxsT37OLesBNX55EKBLbtiQbNprOoSh7D3gSDkQ35IXd7uMpkJisUPzM7+JnyK0yEWUztI8o1adiW8hTHHduFCZdKAKh9dHIPYZmEUNcnAjTOtHu3+zdfMeE72JhfvSAu9uSre9Zco8bmGRw9z92f/f9qVADuWGaIdJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5RUqrTNZbKimeOVTPjdQkQNCF4ikDMS01e5WkWjIIzE=; b=Bsdj+JrP3dKKhogFIcXrb/EkT57qSnybNmqq7CJ1QGmgfFFVm0UgWN/7eOgq/RELuE0VVzi6apf3bS9txXxe5JH1OmWBKt0QvM4eiOLS7xE9NY9RrNDX80pkNAW/bgir20LzLVC45LpbULoeaJlKtRl9vvEpmkxPBupxUSuFEUrzKaYkdEa1UFXGFHKGhvnMPMeXbiIPxonw3EPC3U5xjDisEUkR21lsSwS49tWa1h+pQ6HqeOhNISse4rrHDUojo9gfE0HTj+0bG0TJvkNI99W3Fnow4Z/T0/JJqlTSs5OrC/KGGtUhWA4qn06i0jV/ASPZRFuX34M3/nFYQ2hH7Q== 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 AS8PR04MB9141.eurprd04.prod.outlook.com (2603:10a6:20b:448::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.24; Mon, 30 Sep 2024 05:30:01 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 05:30:01 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, o.rempel@pengutronix.de, y.moog@phytec.de Subject: [PATCH 8/8] arm64: defconfig: Enable ITE IT6263 driver Date: Mon, 30 Sep 2024 13:29:03 +0800 Message-Id: <20240930052903.168881-9-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930052903.168881-1-victor.liu@nxp.com> References: <20240930052903.168881-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0015.apcprd06.prod.outlook.com (2603:1096:4:186::7) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB9141:EE_ X-MS-Office365-Filtering-Correlation-Id: cfb61ac6-a946-462e-9fc6-08dce110ee1e X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024|7416014|38350700014; X-Microsoft-Antispam-Message-Info: EJLG1dsHzCcTjaiWLrauQM8cKQGW1YMSxEAo9mVR0wD7hmAJKBrKittagn7OxCILRPeZfiRvpRDTPSJ/EJJmOHOENCpdupuTLEpcfb7OsxipbsxB06SoiOXjRkartq2DClEzGesWbW6rzCd2J/tsWs62Zlxbh46Pzc+7+XEIQ/Pv+2SVJm/e0wpjtv/qr3hphWpjUW/aeNcZIkvHMpTHMwyqw/m8ygW9SrN/+olXwU5pYTYgC0cYmV+JlVq2bNiGgId7EALsa6Ai/LRISAFHRQQUw/AlLeZIQ2Xj1UEMmWT++mI3E0WeDLBhIhspXYhopN4qtdlovqj2KMP83QsxPWepq4K/2YSrC5/kjF35LfV4JBBz4a/RO9hRH3Egxu8qL0H8pXGZncjMTrhM7Qd5XdtC2XL6/D4I03MdK0Jf9uY90owksLd5DnPAodGP/rDTMdG5x/Pf4kbuVUcz4QqjSUvc6y5r2fn5PIJDtllCAIp3tmrZG1fmGwRtPOUgOS0m9auRZfZn/c/EDsEezADCdGoF1/DECOMGrWGI0qVnwxmYKflJGvEjYtjlNCgDeTqbEX/m2fK85AeLjPOPlp/KIB3M20/RiqEuwk06LvksDcSPSeqiUZA9zN75gWFiY59EkaX0lgi0uUhUQoACjcLupqtZYk+PBQR2RKw3ZNFIkPeVARGp/ti4QZ6EY/z/Y/Xbtb6tnPH7GXWiaAlenmVGZ0gMiSxjCXgNbJdjUOHcyp/9pHeLwqNGkU+Wb4BjxvNZkRT6E52/pWBPZydyNIq/OXt3PjKaCGSiQej+vl/qRoRViP1uu5wdTZ8hKBhVLfDeMueMkimY6jaim5tn5hkujGYrAzepW/swkEiRswgahxvdVQtrheBPSyZi7STz77jvXyYfY0jRdceUp9pAlx9jBQcf5d0TDg2o+dtDJ42iJQtre3W4Or+mtPc40+WyuLblING5K5iNB4+JTJDhXLaBr40zNtEzW9UpXB2FXY7rWVksVJpAzrSmOYDIfhbBOSIQNxu1yl64UCIfRsBmjOz8WfOh4FCALNVTvIBtsBEDucPxzJ8BZ3u8VhlFU0r3j8HmD0lMHF0/jcSIPTObLRNVIzIKskDtz0HiVKkGfhS8EwwbezbbG88jM8lDQEUobyA7SveDkx7mz5+TVNiXkt1YpUFrQG9ynQDOfkoAQhsTJXN6dv3lk3EyKjp1XtMC2mvWVB4EvImfAlF87FKBBD8+YkufDzjbdRS3hicftz/7964eFj4dk4xsYR16VGZ/K6I+ikLZFzjCrUGpHq6qv7rc1bZCbG+GSJDKow4FDxGDN8Is/Iv4loTJxsfISUq3lO5Qhtd+XXG2sH3bfyQngJebiNE3ZPtGOm/E1IgCMRAe8AgTmvCGo79LFke7b9SZK9gwf6El8QzVp59ZuPiQn8GuuA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(366016)(1800799024)(7416014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LFTzD88T2Ve0/wdvT+mrDSoeA7YEO/L0SjB4o+ZriRjXD+7bmBQZbNibIPlspJH1VBptYO+aUOGk8Pa3K2bKCOYZPhiL5apRJwVHgmsHV/MkWJvtLf26t5FJzjjroTCUW0prgBSAKygrZgurhbgHn6wIR821DcIIDDQZU55DsHvBUZYbW6oMRLwfkfWcJZ3sj0uBnmqx1W4FLbvd1lywXhUscSy5bUqoM8KCbRbI3VMFr6VNZgExr5Zyc5jrbRtF6dAoFoNKI2KOl8M6QpZHdnqOAQ9IahoQSxw8fW2fBGmBI74vWhb9z1tSsRAHCAudm1n24XtKhGE+DNaGD6L/UwQX6jmQTE+n62kMOOs0paXFOVQSQIBj57Qjpns4eSZ+IbYv7V7jiPUV0ByJmo+/3HJxRrHP+JdAa9v2ga0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1p0w5RyX+Tk7FlImKOvz6VM2C5Uo63YP+DmjfdmIoq4NCGh/gYcHSRjsZgnYTa2yLwtavfzJqSYARU6EVK3nICwaUH9ibrO8zBGFv1c X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cfb61ac6-a946-462e-9fc6-08dce110ee1e X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 05:30:01.3684 (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: mJRNkwDKc/7zloWKwmgInf3XnzmhwVfuYcO6N5u/jWS7UGLPRMJlu5hlfOWYMxIuwOTw7ACFNxenulcecrnZGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9141 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240929_223006_554631_CAE59A0A X-CRM114-Status: UNSURE ( 9.70 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ITE IT6263 LVDS to HDMI converter is populated on NXP IMX-LVDS-HDMI and IMX-DLVDS-HDMI adapter cards. The adapter cards can connect to i.MX8MP EVK base board to support video output through HDMI connectors. Build the ITE IT6263 driver as a module. Signed-off-by: Liu Ying --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 5fdbfea7a5b2..d8a232e285d4 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -899,6 +899,7 @@ CONFIG_DRM_PANEL_SITRONIX_ST7703=m CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m CONFIG_DRM_PANEL_VISIONOX_VTDR6130=m CONFIG_DRM_FSL_LDB=m +CONFIG_DRM_ITE_IT6263=m CONFIG_DRM_LONTIUM_LT8912B=m CONFIG_DRM_LONTIUM_LT9611=m CONFIG_DRM_LONTIUM_LT9611UXC=m