From patchwork Mon Feb 20 03:50:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 655581 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A008EC636D6 for ; Mon, 20 Feb 2023 03:51:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229479AbjBTDvL (ORCPT ); Sun, 19 Feb 2023 22:51:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229869AbjBTDvK (ORCPT ); Sun, 19 Feb 2023 22:51:10 -0500 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04D90C64F for ; Sun, 19 Feb 2023 19:51:07 -0800 (PST) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 4048885735; Mon, 20 Feb 2023 04:51:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676865066; bh=ngl75POfXoaFr0DsU7ilq1+ZyIVn5Y5fhueodP/P8M4=; h=From:To:Cc:Subject:Date:From; b=tcKVG/erB1j3RluroiluFV60Lhnr0jGjI/1rzShh0pMVB3OfVyHYS6JkEmtWU33lP 4VznQU3aLdFEQhcyq6GXjkfCa3BSVFvCHZI9UDJLuzDgQH+okqZReoBUXzPu7/EgOf mFs/wsdmVDDF/jAgl1LfHF5TpvZLgUOE438Lb/ftrHTEhAwl3B+ASNN6fj/pLCq0J6 5IM61Ftk/pY7MXqHj2GRVkxVrzel9acD+MQBVROrmIJ3YU34sgZ0RM/QfUasrGTu1x 7cbXxlxfXtaFkn+e9PGip5yPOqY9s9C3AEqmWMQkygQysozquzaG9WAXioma8rGUO6 H7ZzbKOnY/OFA== From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Alexander Stein , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , Lucas Stach , NXP Linux Team , Paul Elder , Peng Fan , Pengutronix Kernel Team , Richard Cochran , Richard Zhu , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org Subject: [PATCH v2 1/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name Date: Mon, 20 Feb 2023 04:50:48 +0100 Message-Id: <20230220035051.327847-1-marex@denx.de> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Align the block controller example node name with Linux imx8mp.dtsi . No functional change. Signed-off-by: Marek Vasut --- Cc: Alexander Stein Cc: Fabio Estevam Cc: Krzysztof Kozlowski Cc: Laurent Pinchart Cc: Lucas Stach Cc: NXP Linux Team Cc: Paul Elder Cc: Peng Fan Cc: Pengutronix Kernel Team Cc: Richard Cochran Cc: Richard Zhu Cc: Rob Herring Cc: Sascha Hauer Cc: Shawn Guo Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- V2: Adjust the label too --- .../devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml index dadb6108e3213..71deebe902d52 100644 --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml @@ -94,7 +94,7 @@ examples: #include #include - media_blk_ctl: blk-ctl@32ec0000 { + media_blk_ctrl: blk-ctrl@32ec0000 { compatible = "fsl,imx8mp-media-blk-ctrl", "syscon"; reg = <0x32ec0000 0x138>; power-domains = <&mediamix_pd>, <&mipi_phy1_pd>, <&mipi_phy1_pd>, From patchwork Mon Feb 20 03:50:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 655206 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EC69C64EC4 for ; Mon, 20 Feb 2023 03:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229869AbjBTDvM (ORCPT ); Sun, 19 Feb 2023 22:51:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjBTDvL (ORCPT ); Sun, 19 Feb 2023 22:51:11 -0500 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 774F7CC19 for ; Sun, 19 Feb 2023 19:51:08 -0800 (PST) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 1E4C3857B1; Mon, 20 Feb 2023 04:51:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676865066; bh=W03K4gdbkWC48LtOWeUAO3hYBdWo+YsosS1rO3v6flU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aWv53R5l7X/HxZN72qj6CYZlyFIqsu/+x63I8L12lU8oNijepnpMQyAqg0RD5NWJn 4H7LU2axz7z5NFCGjGA7gz48jE76g1YDoz3dJm8ZAA5xI4PBWVqaKyO27tMZ9IStfp ur2ivXSZrIW5brKCVRGg2wvLXBbm9F9g+eECgMyDh4tBU/Ppf6IFOABnov4U8bB89I k9hxRysbqcHuUpnlyBG3sR+n4v6Rr+r5QYa0JbeBXGIkznNBGoV9e4c2gjDYtrfFiy nmrYTN7UMi84QarZ6OcL/2EaMf1h2bP4sE5Ieao5uiiExHYpI6yo+zCP0Z2Julyf5K aGH9Vi5Dumq7w== From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Liu Ying , Alexander Stein , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , Lucas Stach , NXP Linux Team , Paul Elder , Peng Fan , Pengutronix Kernel Team , Richard Cochran , Richard Zhu , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org Subject: [PATCH v2 2/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB into DT example Date: Mon, 20 Feb 2023 04:50:49 +0100 Message-Id: <20230220035051.327847-2-marex@denx.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220035051.327847-1-marex@denx.de> References: <20230220035051.327847-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document the LDB bridge subnode and add the subnode into the example. For the subnode to work, the block control must scan its subnodes and bind drivers to them, do not misuse either simple-bus or simple-mfd here . Reviewed-by: Liu Ying Signed-off-by: Marek Vasut --- Cc: Alexander Stein Cc: Fabio Estevam Cc: Krzysztof Kozlowski Cc: Laurent Pinchart Cc: Lucas Stach Cc: NXP Linux Team Cc: Paul Elder Cc: Peng Fan Cc: Pengutronix Kernel Team Cc: Richard Cochran Cc: Richard Zhu Cc: Rob Herring Cc: Sascha Hauer Cc: Shawn Guo Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- V2: Add RB from Liu --- .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml index 71deebe902d52..61e6bc731bbb5 100644 --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml @@ -23,6 +23,12 @@ properties: reg: maxItems: 1 + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + '#power-domain-cells': const: 1 @@ -78,9 +84,16 @@ properties: - const: isp1 - const: dwe + bridge@5c: + type: object + $ref: /schemas/display/bridge/fsl,ldb.yaml# + unevaluatedProperties: false + required: - compatible - reg + - '#address-cells' + - '#size-cells' - '#power-domain-cells' - power-domains - power-domain-names @@ -114,5 +127,43 @@ examples: clock-names = "apb", "axi", "cam1", "cam2", "disp1", "disp2", "isp", "phy"; #power-domain-cells = <1>; + #address-cells = <1>; + #size-cells = <1>; + + bridge@5c { + compatible = "fsl,imx8mp-ldb"; + clocks = <&clk IMX8MP_CLK_MEDIA_LDB>; + clock-names = "ldb"; + reg = <0x5c 0x4>, <0x128 0x4>; + reg-names = "ldb", "lvds"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + ldb_from_lcdif2: endpoint { + remote-endpoint = <&lcdif2_to_ldb>; + }; + }; + + port@1 { + reg = <1>; + + ldb_lvds_ch0: endpoint { + remote-endpoint = <&ldb_to_lvdsx4panel>; + }; + }; + + port@2 { + reg = <2>; + + ldb_lvds_ch1: endpoint { + }; + }; + }; + }; }; ... From patchwork Mon Feb 20 03:50:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 655205 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FF1CC64EC4 for ; Mon, 20 Feb 2023 03:51:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230081AbjBTDvP (ORCPT ); Sun, 19 Feb 2023 22:51:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbjBTDvO (ORCPT ); Sun, 19 Feb 2023 22:51:14 -0500 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34EC1CA27 for ; Sun, 19 Feb 2023 19:51:10 -0800 (PST) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id E72DA857DC; Mon, 20 Feb 2023 04:51:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676865067; bh=BPUiVJ+7yinQifTeus3/lXFO6uiCyUkEUgB/v5vyxz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GS3FTU2yHEo+PpX6OUYgMtMHclPUWiC5zKwqbcGhtFn9jJfGKLUorX6zTTh7CfWSN mCblQl8BIoTuGpmAJMSprGVqa2nXF0VLXcXbofMLxMc1nwEXNhI+lHqkjaR3lL9MN/ h7H0QSpSCta2GvMQacD4/ET6Pu91pS+CWGPODejJGU3UCga/8NCza0yqJy8l2cGNSS 4rcn4ksY2Iq2yz/cVCnYZN+ySuAM1ut9phCK1zYz4NQH7CfGaN4RtsG/pjaVgZ9OU7 bNI8J/pdsmZ+GY/UFEPeC64QkkUNYQ6mKGC1+0LJWgKApPyok42la+e2LRz2TpJbNt yKl+GIp+QF4og== From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Alexander Stein , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , Lucas Stach , NXP Linux Team , Paul Elder , Peng Fan , Pengutronix Kernel Team , Richard Cochran , Richard Zhu , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org Subject: [PATCH v2 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them Date: Mon, 20 Feb 2023 04:50:50 +0100 Message-Id: <20230220035051.327847-3-marex@denx.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220035051.327847-1-marex@denx.de> References: <20230220035051.327847-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This particular block can have DT subnodes describing the LVDS LDB bridge. Instead of misusing simple-bus to scan for those nodes, do the scan within the driver. Fixes: 94e6197dadc9 ("arm64: dts: imx8mp: Add LCDIF2 & LDB nodes") Signed-off-by: Marek Vasut Reviewed-by: Liu Ying --- Cc: Alexander Stein Cc: Fabio Estevam Cc: Krzysztof Kozlowski Cc: Laurent Pinchart Cc: Lucas Stach Cc: NXP Linux Team Cc: Paul Elder Cc: Peng Fan Cc: Pengutronix Kernel Team Cc: Richard Cochran Cc: Richard Zhu Cc: Rob Herring Cc: Sascha Hauer Cc: Shawn Guo Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- V2: - Turn this into 3/4 - Warn and continue in case of error --- drivers/soc/imx/imx8m-blk-ctrl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c index 399cb85105a18..4f5736e612fb0 100644 --- a/drivers/soc/imx/imx8m-blk-ctrl.c +++ b/drivers/soc/imx/imx8m-blk-ctrl.c @@ -169,7 +169,9 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) { const struct imx8m_blk_ctrl_data *bc_data; struct device *dev = &pdev->dev; + struct platform_device *child; struct imx8m_blk_ctrl *bc; + struct device_node *np; void __iomem *base; int i, ret; @@ -310,6 +312,13 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) dev_set_drvdata(dev, bc); + for_each_child_of_node(dev->of_node, np) { + child = of_platform_device_create(np, NULL, dev); + if (child) + continue; + dev_warn(dev, "failed to create device for %pOF\n", np); + } + return 0; cleanup_provider: From patchwork Mon Feb 20 03:50:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 655580 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C6D1C05027 for ; Mon, 20 Feb 2023 03:51:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbjBTDvO (ORCPT ); Sun, 19 Feb 2023 22:51:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbjBTDvN (ORCPT ); Sun, 19 Feb 2023 22:51:13 -0500 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35C6ACA3F for ; Sun, 19 Feb 2023 19:51:10 -0800 (PST) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B16F183523; Mon, 20 Feb 2023 04:51:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676865068; bh=STShDkbyg+FCObrviEDoBeWdQURRnspQqawAlpmo1Xk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YK1dCWMY2T4lslEK+4hEMWJXT7yyXu61se4IjF9WjbPsBCxqgDjNf/C+P0+nR0H8p hTrmdAr0ZqM9FqI+oNy7LjYjXz8lHT1wPHtt0JZjeniRX0hOTXUMFGXncpgLnIb5Z4 lESngpG+yxxMWQ/Tv6txWS4hUSJo45c2uDQ+eGlakea+QLkausFOT9STEy76arLNzp seFXIAN1It/wAPgTCLSfergWj3DnfdMWzNlSTgD9/9NiOFWWQGUSUnpgaXPtpBKVZY Ysq0xIbEwRo0x9nB/XODgOdnW2vmj0lu5Ao3QEZ3D6FVVP9HYtXNdULoeJYzpyegUw y36YGvQHG8l1w== From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Alexander Stein , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , Lucas Stach , NXP Linux Team , Paul Elder , Peng Fan , Pengutronix Kernel Team , Richard Cochran , Richard Zhu , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org Subject: [PATCH v2 4/4] arm64: dts: imx8mp: Drop simple-bus from fsl,imx8mp-media-blk-ctrl Date: Mon, 20 Feb 2023 04:50:51 +0100 Message-Id: <20230220035051.327847-4-marex@denx.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230220035051.327847-1-marex@denx.de> References: <20230220035051.327847-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This block should not be compatible with simple-bus and misuse it that way. Instead, the driver should scan its subnodes and bind drivers to them. Fixes: 94e6197dadc9 ("arm64: dts: imx8mp: Add LCDIF2 & LDB nodes") Signed-off-by: Marek Vasut --- Cc: Alexander Stein Cc: Fabio Estevam Cc: Krzysztof Kozlowski Cc: Laurent Pinchart Cc: Lucas Stach Cc: NXP Linux Team Cc: Paul Elder Cc: Peng Fan Cc: Pengutronix Kernel Team Cc: Richard Cochran Cc: Richard Zhu Cc: Rob Herring Cc: Sascha Hauer Cc: Shawn Guo Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- V2: Turn this into 4/4 --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 2dd60e3252f35..ca8093ee4d0e4 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1151,7 +1151,7 @@ lcdif2_to_ldb: endpoint { media_blk_ctrl: blk-ctrl@32ec0000 { compatible = "fsl,imx8mp-media-blk-ctrl", - "simple-bus", "syscon"; + "syscon"; reg = <0x32ec0000 0x10000>; #address-cells = <1>; #size-cells = <1>;