From patchwork Sat Feb 18 23:54:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 655223 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 C3B64C636CC for ; Sat, 18 Feb 2023 23:54:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229690AbjBRXye (ORCPT ); Sat, 18 Feb 2023 18:54:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjBRXye (ORCPT ); Sat, 18 Feb 2023 18:54:34 -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 B78DA14481 for ; Sat, 18 Feb 2023 15:54:32 -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 DFF3C844BF; Sun, 19 Feb 2023 00:54:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676764470; bh=0MGVvaDJGkoi9rWBqrDXoiJrbzvpxgcnPxOMKTRRg4E=; h=From:To:Cc:Subject:Date:From; b=zZBkgkTW6gW9m3CxuHvgCZDmUNUre9oE2noqDJ0fUzJvXWyHV9ubv99k09EV/OUa8 4mkSoc0krTXPD9C9y00qhCXKCBEsRSMxh/pTPqvJiYopdP+S2KL8/0gUF3h5ImGMmy dRNPERdMfd9Sv8++6WfkxaoX8bi6TmWjwp4ifCD4OIfsddxkvawwF2XfMlf77Y/tMr i0d+XinkAssXUHnEh+CplMSF6W6sY7GoSC+EThqopQl72slyTIEL80SqDwmuy80HyU 70UIFTnCcfbRa1+9cG9dPAnjAtGcn5EVX5Ux0oUKvSMMuY4wtvFpM1nBX7Mo3BhJfW feGHaB6C1cuYA== 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 1/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name Date: Sun, 19 Feb 2023 00:54:14 +0100 Message-Id: <20230218235417.173325-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 --- .../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..d4fb58979de19 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_ctl: 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 Sat Feb 18 23:54:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 654818 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 9ED89C61DA4 for ; Sat, 18 Feb 2023 23:54:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229763AbjBRXyk (ORCPT ); Sat, 18 Feb 2023 18:54:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjBRXyj (ORCPT ); Sat, 18 Feb 2023 18:54:39 -0500 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CFB8149BC for ; Sat, 18 Feb 2023 15:54:38 -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 BD4848514E; Sun, 19 Feb 2023 00:54:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676764476; bh=TfbYc9u5kYdUvMMpuaqYAN0o2SgpOZFVH+8PIDgKkAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EfZQ+vBekn3sQTbJIrRtgcrPgJvyf9FRoXRM0cXc9kbe5W4CvW6vLBzXqDG4T/19H r6haOHwLwb3y29oacojMJr+bOMcBHlZU25LB7h8OgIfbDGmo6+T/wRycwdPzPyAPpJ RvtiunSNc//WIPPDPAjpqDPUTwkUSmw63u4N0W8lYKFh9w8mB8dqXX4FCSHh/YFU/4 +j5VoarkeqihG5WKHBuTm/qW8NwhMiZwWSFi5W7P3hTPNHoBd20Staiqy+9ItD/Wen qMHs+ADSnBGWgYSIgSG+0ZIXu/8GVDcZxZ1H3oUs9PsqMhdm+hLpXPHuJk7IEeKXp2 EwH58giH0O7mA== 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 2/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB into DT example Date: Sun, 19 Feb 2023 00:54:15 +0100 Message-Id: <20230218235417.173325-2-marex@denx.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230218235417.173325-1-marex@denx.de> References: <20230218235417.173325-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 . 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 --- .../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 d4fb58979de19..08596756f78e4 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 Sat Feb 18 23:54:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 655222 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 1AF00C64EC4 for ; Sat, 18 Feb 2023 23:54:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229481AbjBRXyk (ORCPT ); Sat, 18 Feb 2023 18:54:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbjBRXyj (ORCPT ); Sat, 18 Feb 2023 18:54:39 -0500 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAB5D1448B for ; Sat, 18 Feb 2023 15:54:38 -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 A23B9857C1; Sun, 19 Feb 2023 00:54:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676764477; bh=VR1iuNS7iu3WNzo4H1knFsFrlUNKCed8RbEbBiIM02A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gcUBy0/vP4SVsfsS6qqB2p86sh5F7njDqkIikr7X7pJphaP7iOYO5eVOkmYrwHCZc 0v9yjn4LJEU4ARC+JNSvqHkusdQ/lxj1L1TyYSoImshILHoyOzhDNxgOAre3zh6EYo CFI6fGx2qd4X/Onne0DahM4mIaOzb2Be9ocfWf9wkfZSdhITw0ZJMIvYA+54iumMsc wgGJVMKneb4lFzMZZfSP5LxEVieQh0ZgZlN3D/B5X3WiCqyZtix9wHE1MDVDYTfumE Q+UBcRh6lm81cgRBvO69TgOArEv4Mc+Ka2ejc0JC05h1EVsjH8kE+g8WIL/ftwnVuG C+tNTOuw7diNg== 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 3/4] arm64: dts: imx8mp: Drop simple-bus from fsl,imx8mp-media-blk-ctrl Date: Sun, 19 Feb 2023 00:54:16 +0100 Message-Id: <20230218235417.173325-3-marex@denx.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230218235417.173325-1-marex@denx.de> References: <20230218235417.173325-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 --- 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>; From patchwork Sat Feb 18 23:54:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 654817 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 2A195C636CC for ; Sat, 18 Feb 2023 23:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229534AbjBRXyl (ORCPT ); Sat, 18 Feb 2023 18:54:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbjBRXyk (ORCPT ); Sat, 18 Feb 2023 18:54:40 -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 923B414481 for ; Sat, 18 Feb 2023 15:54:39 -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 72DC0844BF; Sun, 19 Feb 2023 00:54:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1676764478; bh=R1VU7Am6FA4a81oBqhTYkrVHvP0LM8OcXTLuwsN874A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SIDFTE9ncTDyWNADB/56rWvG25MBZSYcqfJtcei84C0mKzcmd+amxxkdRjvI0o5xx B9VBvr6a0HV94IzDpndxxN9lEzKFOe3HTQvvep33t2rUEmOKmEdF95CfdjnKrkwnZH 76Cb7uAw0xaOmOc3+Jewf6Uf8MenB59H2VZv1e9/paCyGsQXIcdtlYz1T3OZMdP/S+ FqVe857pqA2nv2fPGS9ks1mE02ggnmazUtKWUuBY7ZHuOjAx0LcYDq4oVU82E1yXJi 4H8B8WXOAD3+MoWj8AIqyPAEkQkvb7lM3H0uNgN65KEsPjJSnvahCaOYn6qe0K104w PbyqeIVMlDaEg== 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 4/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them Date: Sun, 19 Feb 2023 00:54:17 +0100 Message-Id: <20230218235417.173325-4-marex@denx.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230218235417.173325-1-marex@denx.de> References: <20230218235417.173325-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 --- 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 --- drivers/soc/imx/imx8m-blk-ctrl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c index 399cb85105a18..ab48f9dff4be5 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,15 @@ 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) + ret = -ENOMEM; + of_node_put(np); + if (ret) + goto cleanup_provider; + } + return 0; cleanup_provider: