From nobody Mon Dec 1 20:56:36 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBEE435975 for ; Mon, 1 Dec 2025 17:15:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764609359; cv=none; b=saoblPMTSbqLUiHZnxi5FXV55lZcuUfh+KeliMiCe5Z23//Gd8r0PUXSJpAWABn+mblZ9FQX/FNCO+mg6Lxm6tG9ydW0g+04hscoIAdlpNTEwwik992u2LxeEVRiEN7S9K96FtYh9pmX62Wg1XFtrvkyPfY6Y2vMYFTSPPCM5ns= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764609359; c=relaxed/simple; bh=+sG6akW1Oc6aATrAVrRM/hVL6nI7UY4b6QLKtvBNlkE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IoPpexPsm9mFp8/7QcQOwtK2e57iMuOyB4AKzh0oGLA4iSa+2n7NAH6c4NeCL7SkNTmtCqWvtxifGkkvmmw6a8mGkgWxQT06YmUWeUEqbRl8mG3NHBUcnryJ3YK+gXL+VFq6FByiacVOPti6XzWXGMG1NaM7TYqmcBWlbmZwG84= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vQ7Uw-0003DM-QG; Mon, 01 Dec 2025 18:15:38 +0100 From: Marco Felsch Date: Mon, 01 Dec 2025 18:15:20 +0100 Subject: [PATCH v6 1/3] dt-bindings: soc: imx93-media-blk-ctrl: Add PDFC subnode to schema and example Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251201-v6-18-topic-imx93-parallel-display-v6-1-7b056e1e5b1e@pengutronix.de> References: <20251201-v6-18-topic-imx93-parallel-display-v6-0-7b056e1e5b1e@pengutronix.de> In-Reply-To: <20251201-v6-18-topic-imx93-parallel-display-v6-0-7b056e1e5b1e@pengutronix.de> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Peng Fan , Liu Ying , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Marco Felsch X-Mailer: b4 0.14.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Liu Ying i.MX93 SoC mediamix blk-ctrl contains one DISPLAY_MUX register which configures parallel display format by using the "PARALLEL_DISP_FORMAT" field. Document the Parallel Display Format Configuration(PDFC) subnode and add the subnode to example. Signed-off-by: Liu Ying [m.felsch@pengutronix.de: port to v6.18-rc1] [m.felsch@pengutronix.de: add bus-width] Signed-off-by: Marco Felsch --- .../bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml | 92 ++++++++++++++++++= ++++ 1 file changed, 92 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-= ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-c= trl.yaml index 34aea58094e55365a2f9c86092f637e533f954ff..6e2d86d9341c75108b492bcbabc= 8a560d8e707cd 100644 --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.ya= ml +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.ya= ml @@ -26,6 +26,12 @@ properties: reg: maxItems: 1 =20 + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + '#power-domain-cells': const: 1 =20 @@ -40,6 +46,60 @@ properties: minItems: 8 maxItems: 10 =20 + bridge@60: + type: object + additionalProperties: false + + properties: + compatible: + const: nxp,imx93-pdfc + + reg: + maxItems: 1 + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Input port node to receive pixel data. + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: Output port node to downstream pixel data receive= rs. + + properties: + endpoint: + $ref: /schemas/graph.yaml#/$defs/endpoint-base + unevaluatedProperties: false + + properties: + bus-width: + enum: [ 16, 18, 24 ] + description: + Specify the physical parallel bus width. + + This property is optional if the display bus-width + matches the SoC bus-width, e.g. a 18-bit RGB666 (dis= play) + is connected and all 18-bit data lanes are muxed to = the + parallel-output pads. + + This property must be set to 18 to cut only the LSBs + instead of the MSBs in case a 24-bit RGB888 display = is + connected and only the lower 18-bit data lanes are m= uxed + to the parallel-output pads. + + required: + - port@0 + - port@1 + + required: + - compatible + - reg + - ports + allOf: - if: properties: @@ -81,9 +141,12 @@ allOf: - const: isi - const: csi - const: dsi + required: - compatible - reg + - '#address-cells' + - '#size-cells' - power-domains - clocks - clock-names @@ -112,4 +175,33 @@ examples: clock-names =3D "apb", "axi", "nic", "disp", "cam", "pxp", "lcdif", "isi", "csi", "dsi"; #power-domain-cells =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <1>; + + bridge@60 { + compatible =3D "nxp,imx93-pdfc"; + reg =3D <0x60 0x4>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + pdfc_from_lcdif: endpoint { + remote-endpoint =3D <&lcdif_to_pdfc>; + }; + }; + + port@1 { + reg =3D <1>; + + pdfc_to_panel: endpoint { + remote-endpoint =3D <&panel_from_pdfc>; + bus-width =3D <18>; + }; + }; + }; + }; }; --=20 2.47.3 From nobody Mon Dec 1 20:56:36 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 826F1334C30 for ; Mon, 1 Dec 2025 17:15:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764609365; cv=none; b=fatCsPs4mb8f0uCQvYalEApdPgPzRDH7/lmITlICQVijk4oB1kSMBz+6cnhrJiDOakYt6gdXueLIn8dWAFyeDPhSpW9Ugq8KP6o24XOpTlITg24IryBkysC5QHo0Y8pKTBhyBFg8s3d02WY1a+pajcNfArhBfi9hFzzkKQgoc20= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764609365; c=relaxed/simple; bh=0IyjvTJbJmAXDIdh7mO0vdYTrYh+j2tVx5K4OHi0Abs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UWMJEhW7WrymKeAE+yHiC84ZX3WICUmacVJQwYkLD9Z6k7zoPswrzXY5oTfc0tNz49xmP5wvhQoyASbfz5XXfP8giTXfIfKbbvNIIWSYQY3JLE/+afpVuH+VOitJ+4FglIwor9pKL8ebar2+nv4yNEYPeOkCgpAGYqk1nZES9UQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vQ7Uw-0003DM-Sm; Mon, 01 Dec 2025 18:15:38 +0100 From: Marco Felsch Date: Mon, 01 Dec 2025 18:15:21 +0100 Subject: [PATCH v6 2/3] drm/bridge: imx: Add i.MX93 parallel display format configuration support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251201-v6-18-topic-imx93-parallel-display-v6-2-7b056e1e5b1e@pengutronix.de> References: <20251201-v6-18-topic-imx93-parallel-display-v6-0-7b056e1e5b1e@pengutronix.de> In-Reply-To: <20251201-v6-18-topic-imx93-parallel-display-v6-0-7b056e1e5b1e@pengutronix.de> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Peng Fan , Liu Ying , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Marco Felsch X-Mailer: b4 0.14.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Liu Ying NXP i.MX93 mediamix blk-ctrl contains one DISPLAY_MUX register which configures parallel display format by using the "PARALLEL_DISP_FORMAT" field. Add a DRM bridge driver to support the display format configuration. Signed-off-by: Liu Ying [m.felsch@pengutronix.de: port to v6.18-rc1] [m.felsch@pengutronix.de: add review feedback (Alexander)] [m.felsch@pengutronix.de: fix to short Kconfig description (checkpath)] [m.felsch@pengutronix.de: use "GPL" instead of "GPL v2" (checkpatch)] [m.felsch@pengutronix.de: make use of reg property] [m.felsch@pengutronix.de: add bus-width support] Signed-off-by: Marco Felsch --- drivers/gpu/drm/bridge/imx/Kconfig | 11 ++ drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx93-pdfc.c | 225 ++++++++++++++++++++++++++++= ++++ 3 files changed, 237 insertions(+) diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/im= x/Kconfig index 9a480c6abb856276df9b71d23b39a43b3a9c542d..28fd7a00473a0ec50bf0ffb5d50= 972abc209ceec 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -88,4 +88,15 @@ config DRM_IMX93_MIPI_DSI Choose this to enable MIPI DSI controller found in Freescale i.MX93 processor. =20 +config DRM_IMX93_PARALLEL_DISP_FMT_CONFIG + tristate "NXP i.MX91/i.MX93 parallel display format configuration" + depends on OF + select DRM_KMS_HELPER + help + On i.MX93 and i.MX91 SoCs the parallel display format output is + controlled via the MEDIAMIX BLK-CTRL DISPLAY_MUX. + + Say 'Y' or 'M' if you use the parallel display output path on a + i.MX93 or i.MX91 SoC. + endif # ARCH_MXC || COMPILE_TEST diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/i= mx/Makefile index dd5d4858480663bade98bd58039d1cb6f8aa18da..f4ccc5cbef72a576443d5fecf66= 6b76dfba8aa94 100644 --- a/drivers/gpu/drm/bridge/imx/Makefile +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -8,3 +8,4 @@ obj-$(CONFIG_DRM_IMX8QXP_PIXEL_COMBINER) +=3D imx8qxp-pixel= -combiner.o obj-$(CONFIG_DRM_IMX8QXP_PIXEL_LINK) +=3D imx8qxp-pixel-link.o obj-$(CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI) +=3D imx8qxp-pxl2dpi.o obj-$(CONFIG_DRM_IMX93_MIPI_DSI) +=3D imx93-mipi-dsi.o +obj-$(CONFIG_DRM_IMX93_PARALLEL_DISP_FMT_CONFIG) +=3D imx93-pdfc.o diff --git a/drivers/gpu/drm/bridge/imx/imx93-pdfc.c b/drivers/gpu/drm/brid= ge/imx/imx93-pdfc.c new file mode 100644 index 0000000000000000000000000000000000000000..8923012108ab9794c74813c1c58= c1b4ab36cb5ae --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/imx93-pdfc.c @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* + * Copyright 2022-2025 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define PARALLEL_DISP_FORMAT GENMASK(10, 8) +#define FORMAT_RGB888_TO_RGB888 FIELD_PREP(PARALLEL_DISP_FORMAT, 0) +#define FORMAT_RGB888_TO_RGB666 FIELD_PREP(PARALLEL_DISP_FORMAT, 1) +#define FORMAT_RGB565_TO_RGB565 FIELD_PREP(PARALLEL_DISP_FORMAT, 2) + +struct imx93_pdfc { + struct drm_bridge bridge; + struct drm_bridge *next_bridge; + struct device *dev; + struct regmap *regmap; + u64 disp_mux_reg_off; + u32 phy_bus_width; +}; + +static int +imx93_pdfc_bridge_attach(struct drm_bridge *bridge, struct drm_encoder *en= coder, + enum drm_bridge_attach_flags flags) +{ + struct imx93_pdfc *pdfc =3D bridge->driver_private; + + return drm_bridge_attach(bridge->encoder, pdfc->next_bridge, bridge, flag= s); +} + +static void imx93_pdfc_bridge_atomic_enable(struct drm_bridge *bridge, + struct drm_atomic_state *state) +{ + struct imx93_pdfc *pdfc =3D bridge->driver_private; + const struct drm_bridge_state *bridge_state; + unsigned int mask =3D PARALLEL_DISP_FORMAT; + unsigned int val; + + bridge_state =3D drm_atomic_get_new_bridge_state(state, bridge); + + switch (bridge_state->output_bus_cfg.format) { + case MEDIA_BUS_FMT_RGB888_1X24: + val =3D FORMAT_RGB888_TO_RGB888; + if (pdfc->phy_bus_width =3D=3D 18) { + /* + * Can be valid if physical bus limitation exist, + * therefore use dev_dbg(). + */ + dev_dbg(pdfc->dev, "Truncate two LSBs from each color\n"); + val =3D FORMAT_RGB888_TO_RGB666; + } + break; + case MEDIA_BUS_FMT_RGB666_1X18: + val =3D FORMAT_RGB888_TO_RGB666; + break; + case MEDIA_BUS_FMT_RGB565_1X16: + val =3D FORMAT_RGB565_TO_RGB565; + break; + } + + regmap_update_bits(pdfc->regmap, pdfc->disp_mux_reg_off, mask, val); +} + +static const u32 imx93_pdfc_bus_output_fmts[] =3D { + MEDIA_BUS_FMT_RGB888_1X24, + MEDIA_BUS_FMT_RGB666_1X18, + MEDIA_BUS_FMT_RGB565_1X16, + MEDIA_BUS_FMT_FIXED +}; + +static bool imx93_pdfc_bus_output_fmt_supported(u32 fmt) +{ + int i; + + for (i =3D 0; i < ARRAY_SIZE(imx93_pdfc_bus_output_fmts); i++) { + if (imx93_pdfc_bus_output_fmts[i] =3D=3D fmt) + return true; + } + + return false; +} + +static u32 * +imx93_pdfc_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; + + *num_input_fmts =3D 0; + + if (!imx93_pdfc_bus_output_fmt_supported(output_fmt)) + return NULL; + + input_fmts =3D kmalloc(sizeof(*input_fmts), GFP_KERNEL); + if (!input_fmts) + return NULL; + + switch (output_fmt) { + case MEDIA_BUS_FMT_RGB888_1X24: + case MEDIA_BUS_FMT_RGB565_1X16: + input_fmts[0] =3D output_fmt; + break; + case MEDIA_BUS_FMT_RGB666_1X18: + case MEDIA_BUS_FMT_FIXED: + input_fmts[0] =3D MEDIA_BUS_FMT_RGB888_1X24; + break; + } + + *num_input_fmts =3D 1; + + return input_fmts; +} + +static int imx93_pdfc_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 imx93_pdfc *pdfc =3D bridge->driver_private; + + switch (bridge_state->output_bus_cfg.format) { + case MEDIA_BUS_FMT_RGB888_1X24: + case MEDIA_BUS_FMT_RGB666_1X18: + case MEDIA_BUS_FMT_RGB565_1X16: + return 0; + default: + dev_warn(pdfc->dev, "Unsupported output bus format: 0x%x\n", + bridge_state->output_bus_cfg.format); + return -EINVAL; + } +} + +static const struct drm_bridge_funcs funcs =3D { + .attach =3D imx93_pdfc_bridge_attach, + .atomic_enable =3D imx93_pdfc_bridge_atomic_enable, + .atomic_duplicate_state =3D drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state =3D drm_atomic_helper_bridge_destroy_state, + .atomic_get_input_bus_fmts =3D imx93_pdfc_bridge_atomic_get_input_bus_fmt= s, + .atomic_check =3D imx93_pdfc_bridge_atomic_check, + .atomic_reset =3D drm_atomic_helper_bridge_reset, +}; + +static int imx93_pdfc_bridge_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct imx93_pdfc *pdfc; + struct device_node *ep; + int err; + + pdfc =3D devm_drm_bridge_alloc(dev, struct imx93_pdfc, bridge, &funcs); + if (IS_ERR(pdfc)) + return PTR_ERR(pdfc); + + pdfc->regmap =3D syscon_node_to_regmap(dev->of_node->parent); + if (IS_ERR(pdfc->regmap)) + return dev_err_probe(dev, PTR_ERR(pdfc->regmap), + "failed to get regmap\n"); + + err =3D of_property_read_reg(dev->of_node, 0, &pdfc->disp_mux_reg_off, NU= LL); + if (err) + return dev_err_probe(dev, err, + "failed to get display-mux reg\n"); + + /* No limits per default */ + pdfc->phy_bus_width =3D 24; + + /* Get output ep (port1/endpoint0) */ + ep =3D of_graph_get_endpoint_by_regs(dev->of_node, 1, 0); + if (ep) { + err =3D of_property_read_u32(ep, "bus-width", &pdfc->phy_bus_width); + of_node_put(ep); + + /* bus-width is optional but it must have valid data if present */ + if (err && err !=3D -EINVAL) + return dev_err_probe(dev, err, + "failed to query bus-width\n"); + } + + pdfc->next_bridge =3D devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); + if (IS_ERR(pdfc->next_bridge)) + return dev_err_probe(dev, PTR_ERR(pdfc->next_bridge), + "failed to get next bridge\n"); + + pdfc->dev =3D dev; + pdfc->bridge.driver_private =3D pdfc; + pdfc->bridge.of_node =3D dev->of_node; + pdfc->bridge.type =3D DRM_MODE_CONNECTOR_DPI; + + return devm_drm_bridge_add(dev, &pdfc->bridge); +} + +static const struct of_device_id imx93_pdfc_dt_ids[] =3D { + { .compatible =3D "nxp,imx93-pdfc", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, imx93_pdfc_dt_ids); + +static struct platform_driver imx93_pdfc_bridge_driver =3D { + .probe =3D imx93_pdfc_bridge_probe, + .driver =3D { + .of_match_table =3D imx93_pdfc_dt_ids, + .name =3D "imx93_pdfc", + }, +}; +module_platform_driver(imx93_pdfc_bridge_driver); + +MODULE_DESCRIPTION("NXP i.MX93 parallel display format configuration drive= r"); +MODULE_AUTHOR("Liu Ying "); +MODULE_LICENSE("GPL"); --=20 2.47.3 From nobody Mon Dec 1 20:56:36 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65765335092 for ; Mon, 1 Dec 2025 17:15:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764609359; cv=none; b=scRhby96cesPv/Y4PPpFrbsaC70U6quZM5oXFvEkOC9CxJ1An6iI70yAboiFidyWgJYqNdjLhhX6piQcFMQ/fdkmzbPiusQAQFr9yaPvclRyXaDi0jwOD7j7a+Icb8SZ/KS+l1JJ1h/682XXFDJ65f0UMtSM8R0mL1J7w15ePNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764609359; c=relaxed/simple; bh=Hik9+zarGbIcSz4OSRFTsaTLuDpIYho2xAqwW24Pluk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cSH+558qPTOSbpRXZ/Aw7ALC91iwPV8N9WVpf143xfvX8f6eUUApnrMVPOlYa2k2tZyN5qsax9gWuRaF9RsnS+cUfx9L+7gzZVceFLp8CQns+RzX3gyUyIJjWse7XoFvDbLRGHmR1ns8qUB+ikTfDDzH1najPQti0etmsqGSzCU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vQ7Uw-0003DM-VR; Mon, 01 Dec 2025 18:15:38 +0100 From: Marco Felsch Date: Mon, 01 Dec 2025 18:15:22 +0100 Subject: [PATCH v6 3/3] arm64: dts: imx93: Add parallel display output nodes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251201-v6-18-topic-imx93-parallel-display-v6-3-7b056e1e5b1e@pengutronix.de> References: <20251201-v6-18-topic-imx93-parallel-display-v6-0-7b056e1e5b1e@pengutronix.de> In-Reply-To: <20251201-v6-18-topic-imx93-parallel-display-v6-0-7b056e1e5b1e@pengutronix.de> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Peng Fan , Liu Ying , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Marco Felsch X-Mailer: b4 0.14.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Add required OF nodes to support the i.MX93 parallel output (DPI) path. On the i.MX93 a single LCDIF is connected to three bridges: DPI, LVDS LDB and the MIPI-DSI whereas the i.MX91 support only the DPI bridge. Map endpoint@0 as DPI bridge output since the i.MX93 TRM (Figure 485. MEDIAMIX block diagram) doesn't mention any port-number <-> bridge combination. Set the MEDIA-AXI and MEDIA-APB clocks to the overdrive (OD) values since the i.MX93 and i.MX91 use the overdrive (OD) clk settings per default. Signed-off-by: Marco Felsch --- arch/arm64/boot/dts/freescale/imx91_93_common.dtsi | 57 ++++++++++++++++++= ++++ arch/arm64/boot/dts/freescale/imx93.dtsi | 12 +++++ 2 files changed, 69 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi b/arch/arm6= 4/boot/dts/freescale/imx91_93_common.dtsi index 52da571f26c4e8a2703e4476b5541fa7aca52f10..6dc01a76c68425bb65576712bfd= 98950d662bd38 100644 --- a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi +++ b/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi @@ -1122,8 +1122,65 @@ media_blk_ctrl: system-controller@4ac10000 { <&clk IMX93_CLK_MIPI_DSI_GATE>; clock-names =3D "apb", "axi", "nic", "disp", "cam", "pxp", "lcdif", "isi", "csi", "dsi"; + assigned-clocks =3D <&clk IMX93_CLK_MEDIA_AXI>, + <&clk IMX93_CLK_MEDIA_APB>, + <&clk IMX93_CLK_MEDIA_DISP_PIX>; + assigned-clock-parents =3D <&clk IMX93_CLK_SYS_PLL_PFD1>, + <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>, + <&clk IMX93_CLK_VIDEO_PLL>; + assigned-clock-rates =3D <400000000>, <133333333>; #power-domain-cells =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <1>; status =3D "disabled"; + + dpi_bridge: bridge@60 { + compatible =3D "nxp,imx93-pdfc"; + reg =3D <0x60 0x4>; + status =3D "disabled"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + dpi_from_lcdif: endpoint { + remote-endpoint =3D <&lcdif_to_dpi>; + }; + }; + + port@1 { + reg =3D <1>; + + dpi_to_panel: endpoint { + }; + }; + }; + }; + }; + + lcdif: display-controller@4ae30000 { + compatible =3D "fsl,imx93-lcdif"; + reg =3D <0x4ae30000 0x23c>; + interrupts =3D ; + clocks =3D <&clk IMX93_CLK_MEDIA_DISP_PIX>, + <&clk IMX93_CLK_LCDIF_GATE>, + <&clk IMX93_CLK_MEDIA_AXI>; + clock-names =3D "pix", "axi", "disp_axi"; + power-domains =3D <&media_blk_ctrl IMX93_MEDIABLK_PD_LCDIF>; + status =3D "disabled"; + + port { + #address-cells =3D <1>; + #size-cells =3D <0>; + + lcdif_to_dpi: endpoint@0 { + reg =3D <0>; + remote-endpoint =3D <&dpi_from_lcdif>; + }; + }; }; =20 usbotg1: usb@4c100000 { diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts= /freescale/imx93.dtsi index 7b27012dfcb564650882dc8c40e836e797b2fda1..5436b48b30e89eb1f939b398ce1= bf105abe7e34b 100644 --- a/arch/arm64/boot/dts/freescale/imx93.dtsi +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi @@ -150,6 +150,18 @@ l3_cache: l3-cache { }; }; =20 +&lcdif { + port { + lcdif_to_ldb: endpoint@1 { + reg =3D <1>; + }; + + lcdif_to_dsi: endpoint@2 { + reg =3D <2>; + }; + }; +}; + &src { mlmix: power-domain@44461800 { compatible =3D "fsl,imx93-src-slice"; --=20 2.47.3