devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] TQMa93xxLA/MBa93xxLA LVDS support
@ 2023-10-20 13:00 Alexander Stein
  2023-10-20 13:00 ` [PATCH 1/5] soc: imx: imx93-blk-ctrl: Scan subnodes and bind drivers to them Alexander Stein
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Alexander Stein @ 2023-10-20 13:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel, linux, linux-clk, linux-pm

Hi,

this series adds LVDS display support for TQMa93xxLA/MBa93xxLA.
It consists of two parts:
1. LVDS support for imx93
2. LVDS platform support for tqma9352-mba93xxla

Patch 1 is the imx93 equivalent of commit 9cb6d1b39a8f ("soc: imx:
  imx8m-blk-ctrl: Scan subnodes and bind drivers to them")
Patch 2 is the imx93 equivalent of commit 1cb0c87d27dc ("dt-bindings:
  soc: imx8mp-media-blk-ctrl: Add LDB subnode into schema and example")
Patch 3 is the imx93 equivalent of commit 94e6197dadc9 ("arm64: dts:
  imx8mp: Add LCDIF2 & LDB nodes")
Patch 4 adds a video PLL configuration for 477.4MHz
Patch 5 adds LVDS DT overlay for platform support

Patches 1-3 are self-contained from patches 4-5 and could be merged
independently.
Patch 4 is necessary to achieve a correct LVDS frequency supported by the
display.

Alexander Stein (5):
  soc: imx: imx93-blk-ctrl: Scan subnodes and bind drivers to them
  dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema
    and example
  arm64: dts: imx93: Add LCDIF & LDB nodes
  clk: imx: clk-fracn-gppll: Add 477.4MHz config for video pll
  arm64: dts: mba93xxla: Add LVDS overlay

 .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 44 +++++++++++
 arch/arm64/boot/dts/freescale/Makefile        |  3 +
 ...3-tqma9352-mba93xxla-lvds-tm070jvhg33.dtso | 45 +++++++++++
 .../freescale/imx93-tqma9352-mba93xxla.dts    | 27 +++++++
 arch/arm64/boot/dts/freescale/imx93.dtsi      | 76 +++++++++++++++++++
 drivers/clk/imx/clk-fracn-gppll.c             |  1 +
 drivers/pmdomain/imx/imx93-blk-ctrl.c         |  7 ++
 7 files changed, 203 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla-lvds-tm070jvhg33.dtso

-- 
2.34.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/5] soc: imx: imx93-blk-ctrl: Scan subnodes and bind drivers to them
  2023-10-20 13:00 [PATCH 0/5] TQMa93xxLA/MBa93xxLA LVDS support Alexander Stein
@ 2023-10-20 13:00 ` Alexander Stein
  2023-10-20 13:00 ` [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example Alexander Stein
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: Alexander Stein @ 2023-10-20 13:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel, linux, linux-clk, linux-pm

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.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/pmdomain/imx/imx93-blk-ctrl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/pmdomain/imx/imx93-blk-ctrl.c b/drivers/pmdomain/imx/imx93-blk-ctrl.c
index 40bd90f8b977..dbce40297078 100644
--- a/drivers/pmdomain/imx/imx93-blk-ctrl.c
+++ b/drivers/pmdomain/imx/imx93-blk-ctrl.c
@@ -7,6 +7,7 @@
 #include <linux/device.h>
 #include <linux/module.h>
 #include <linux/of.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>
 #include <linux/pm_runtime.h>
@@ -297,8 +298,14 @@ static int imx93_blk_ctrl_probe(struct platform_device *pdev)
 
 	dev_set_drvdata(dev, bc);
 
+	ret = devm_of_platform_populate(dev);
+	if (ret)
+		goto cleanup_provider;
+
 	return 0;
 
+cleanup_provider:
+	of_genpd_del_provider(dev->of_node);
 cleanup_pds:
 	for (i--; i >= 0; i--)
 		pm_genpd_remove(&bc->domains[i].genpd);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example
  2023-10-20 13:00 [PATCH 0/5] TQMa93xxLA/MBa93xxLA LVDS support Alexander Stein
  2023-10-20 13:00 ` [PATCH 1/5] soc: imx: imx93-blk-ctrl: Scan subnodes and bind drivers to them Alexander Stein
@ 2023-10-20 13:00 ` Alexander Stein
  2023-10-22 17:39   ` Conor Dooley
  2023-10-24 19:49   ` Rob Herring
  2023-10-20 13:00 ` [PATCH 3/5] arm64: dts: imx93: Add LCDIF & LDB nodes Alexander Stein
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 16+ messages in thread
From: Alexander Stein @ 2023-10-20 13:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel, linux, linux-clk, linux-pm

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: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 44 +++++++++++++++++++
 1 file changed, 44 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-ctrl.yaml
index b3554e7f9e76..5ba66dfb0e05 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
@@ -24,6 +24,12 @@ properties:
   reg:
     maxItems: 1
 
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
   '#power-domain-cells':
     const: 1
 
@@ -46,9 +52,16 @@ properties:
       - const: csi
       - const: dsi
 
+  bridge@20:
+    type: object
+    $ref: /schemas/display/bridge/fsl,ldb.yaml#
+    unevaluatedProperties: false
+
 required:
   - compatible
   - reg
+  - '#address-cells'
+  - '#size-cells'
   - power-domains
   - clocks
   - clock-names
@@ -77,4 +90,35 @@ examples:
                clock-names = "apb", "axi", "nic", "disp", "cam",
                              "pxp", "lcdif", "isi", "csi", "dsi";
       #power-domain-cells = <1>;
+      #address-cells = <1>;
+      #size-cells = <1>;
+
+      bridge@20 {
+          compatible = "fsl,imx93-ldb";
+          reg = <0x20 0x4>, <0x24 0x4>;
+          reg-names = "ldb", "lvds";
+          clocks = <&clk IMX93_CLK_LVDS_GATE>;
+          clock-names = "ldb";
+
+          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: endpoint {
+                      remote-endpoint = <&ldb_to_panel>;
+                  };
+              };
+          };
+        };
     };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/5] arm64: dts: imx93: Add LCDIF & LDB nodes
  2023-10-20 13:00 [PATCH 0/5] TQMa93xxLA/MBa93xxLA LVDS support Alexander Stein
  2023-10-20 13:00 ` [PATCH 1/5] soc: imx: imx93-blk-ctrl: Scan subnodes and bind drivers to them Alexander Stein
  2023-10-20 13:00 ` [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example Alexander Stein
@ 2023-10-20 13:00 ` Alexander Stein
  2023-10-20 13:00 ` [PATCH 4/5] clk: imx: clk-fracn-gppll: Add 477.4MHz config for video pll Alexander Stein
  2023-10-20 13:00 ` [PATCH 5/5] arm64: dts: mba93xxla: Add LVDS overlay Alexander Stein
  4 siblings, 0 replies; 16+ messages in thread
From: Alexander Stein @ 2023-10-20 13:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel, linux, linux-clk, linux-pm

LCDIF port 1 is directly attached to the LVDS Display Bridge (LDB).
Both need the same clock source (VIDEO_PLL1).

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 arch/arm64/boot/dts/freescale/imx93.dtsi | 76 ++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
index ceccf4766440..c0213850445d 100644
--- a/arch/arm64/boot/dts/freescale/imx93.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
@@ -1037,6 +1037,8 @@ s4muap: mailbox@47520000 {
 		media_blk_ctrl: system-controller@4ac10000 {
 			compatible = "fsl,imx93-media-blk-ctrl", "syscon";
 			reg = <0x4ac10000 0x10000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
 			power-domains = <&mediamix>;
 			clocks = <&clk IMX93_CLK_MEDIA_APB>,
 				 <&clk IMX93_CLK_MEDIA_AXI>,
@@ -1050,8 +1052,82 @@ media_blk_ctrl: system-controller@4ac10000 {
 				 <&clk IMX93_CLK_MIPI_DSI_GATE>;
 			clock-names = "apb", "axi", "nic", "disp", "cam",
 				      "pxp", "lcdif", "isi", "csi", "dsi";
+			assigned-clocks = <&clk IMX93_CLK_MEDIA_AXI>,
+					  <&clk IMX93_CLK_MEDIA_APB>,
+					  <&clk IMX93_CLK_VIDEO_PLL>,
+					  <&clk IMX93_CLK_MEDIA_DISP_PIX>;
+			assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1>,
+						 <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>,
+						 <&clk IMX93_CLK_24M>,
+						 <&clk IMX93_CLK_VIDEO_PLL>;
+			assigned-clock-rates = <400000000>, <133333333>;
 			#power-domain-cells = <1>;
 			status = "disabled";
+
+			lvds_bridge: bridge@20 {
+				compatible = "fsl,imx93-ldb";
+				reg = <0x20 0x4>, <0x24 0x4>;
+				reg-names = "ldb", "lvds";
+				clocks = <&clk IMX93_CLK_LVDS_GATE>;
+				clock-names = "ldb";
+				assigned-clocks = <&clk IMX93_CLK_MEDIA_LDB>;
+				assigned-clock-parents = <&clk IMX93_CLK_VIDEO_PLL>;
+				status = "disabled";
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+
+						ldb_from_lcdif: endpoint {
+							remote-endpoint = <&lcdif_to_ldb>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+
+						ldb_lvds: endpoint {
+						};
+					};
+				};
+			};
+		};
+
+		lcdif: display-controller@4ae30000 {
+			compatible = "fsl,imx93-lcdif";
+			reg = <0x4ae30000 0x23c>;
+			interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX93_CLK_MEDIA_DISP_PIX>,
+				 <&clk IMX93_CLK_LCDIF_GATE>,
+				 <&clk IMX93_CLK_MEDIA_AXI>;
+			clock-names = "pix", "axi", "disp_axi";
+			assigned-clocks = <&clk IMX93_CLK_VIDEO_PLL>,
+					  <&clk IMX93_CLK_MEDIA_DISP_PIX>;
+			assigned-clock-parents = <&clk IMX93_CLK_24M>,
+						 <&clk IMX93_CLK_VIDEO_PLL>;
+			power-domains = <&media_blk_ctrl IMX93_MEDIABLK_PD_LCDIF>;
+			status = "disabled";
+
+			port {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				lcdif_to_dsi: endpoint@0 {
+					reg = <0>;
+				};
+
+				lcdif_to_ldb: endpoint@1 {
+					reg = <1>;
+					remote-endpoint = <&ldb_from_lcdif>;
+				};
+
+				lcdif_to_dpi: endpoint@2 {
+					reg = <2>;
+				};
+			};
 		};
 
 		ddr-pmu@4e300dc0 {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/5] clk: imx: clk-fracn-gppll: Add 477.4MHz config for video pll
  2023-10-20 13:00 [PATCH 0/5] TQMa93xxLA/MBa93xxLA LVDS support Alexander Stein
                   ` (2 preceding siblings ...)
  2023-10-20 13:00 ` [PATCH 3/5] arm64: dts: imx93: Add LCDIF & LDB nodes Alexander Stein
@ 2023-10-20 13:00 ` Alexander Stein
  2023-10-20 14:20   ` Marco Felsch
  2023-10-20 13:00 ` [PATCH 5/5] arm64: dts: mba93xxla: Add LVDS overlay Alexander Stein
  4 siblings, 1 reply; 16+ messages in thread
From: Alexander Stein @ 2023-10-20 13:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel, linux, linux-clk, linux-pm

Add the 477.4MHz frequency support that will be used by video subsystem
on imx93.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/clk/imx/clk-fracn-gppll.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/imx/clk-fracn-gppll.c b/drivers/clk/imx/clk-fracn-gppll.c
index 44462ab50e51..deb03c6d16e9 100644
--- a/drivers/clk/imx/clk-fracn-gppll.c
+++ b/drivers/clk/imx/clk-fracn-gppll.c
@@ -84,6 +84,7 @@ static const struct imx_fracn_gppll_rate_table fracn_tbl[] = {
 	PLL_FRACN_GP(519750000U, 173, 25, 100, 1, 8),
 	PLL_FRACN_GP(498000000U, 166, 0, 1, 0, 8),
 	PLL_FRACN_GP(484000000U, 121, 0, 1, 0, 6),
+	PLL_FRACN_GP(477400000U, 119, 35, 100, 0, 6),
 	PLL_FRACN_GP(445333333U, 167, 0, 1, 0, 9),
 	PLL_FRACN_GP(400000000U, 200, 0, 1, 0, 12),
 	PLL_FRACN_GP(393216000U, 163, 84, 100, 0, 10),
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/5] arm64: dts: mba93xxla: Add LVDS overlay
  2023-10-20 13:00 [PATCH 0/5] TQMa93xxLA/MBa93xxLA LVDS support Alexander Stein
                   ` (3 preceding siblings ...)
  2023-10-20 13:00 ` [PATCH 4/5] clk: imx: clk-fracn-gppll: Add 477.4MHz config for video pll Alexander Stein
@ 2023-10-20 13:00 ` Alexander Stein
  4 siblings, 0 replies; 16+ messages in thread
From: Alexander Stein @ 2023-10-20 13:00 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel, linux, linux-clk, linux-pm

This adds the overlay for the Tinma TM070JVHG33 LVDS display.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 arch/arm64/boot/dts/freescale/Makefile        |  3 ++
 ...3-tqma9352-mba93xxla-lvds-tm070jvhg33.dtso | 45 +++++++++++++++++++
 .../freescale/imx93-tqma9352-mba93xxla.dts    | 27 +++++++++++
 3 files changed, 75 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla-lvds-tm070jvhg33.dtso

diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index ba70adc51bef..85802bc1639f 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -191,6 +191,9 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-11x11-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxca.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxla.dtb
 
+imx93-tqma9352-mba93xxla-lvds-tm070jvhg33-dtbs += imx93-tqma9352-mba93xxla.dtb imx93-tqma9352-mba93xxla-lvds-tm070jvhg33.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxla-lvds-tm070jvhg33.dtb
+
 imx8mm-venice-gw72xx-0x-imx219-dtbs	:= imx8mm-venice-gw72xx-0x.dtb imx8mm-venice-gw72xx-0x-imx219.dtbo
 imx8mm-venice-gw72xx-0x-rpidsi-dtbs	:= imx8mm-venice-gw72xx-0x.dtb imx8mm-venice-gw72xx-0x-rpidsi.dtbo
 imx8mm-venice-gw72xx-0x-rs232-rts-dtbs	:= imx8mm-venice-gw72xx-0x.dtb imx8mm-venice-gw72xx-0x-rs232-rts.dtbo
diff --git a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla-lvds-tm070jvhg33.dtso b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla-lvds-tm070jvhg33.dtso
new file mode 100644
index 000000000000..9eb24abca6bf
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla-lvds-tm070jvhg33.dtso
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2023 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+#include <dt-bindings/clock/imx93-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	compatible = "tq,imx93-tqma9352-mba93xxla",
+		     "tq,imx93-tqma9352", "fsl,imx93";
+};
+
+&backlight_lvds {
+	status = "okay";
+};
+
+&display {
+	compatible = "tianma,tm070jvhg33";
+	status = "okay";
+};
+
+&lcdif {
+	assigned-clocks = <&clk IMX93_CLK_VIDEO_PLL>,
+			  <&clk IMX93_CLK_MEDIA_DISP_PIX>;
+	assigned-clock-rates = <477400000>;
+	status = "okay";
+};
+
+&lvds_bridge {
+	status = "okay";
+};
+
+&media_blk_ctrl {
+	status = "okay";
+};
+
+&tpm5 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts
index f0d0bf84f6ba..84fdeaaaea44 100644
--- a/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dts
@@ -40,6 +40,23 @@ backlight_lvds: backlight {
 		status = "disabled";
 	};
 
+	display: display {
+		/*
+		 * Display is not fixed, so compatible has to be added from
+		 * DT overlay
+		 */
+		power-supply = <&reg_3v3>;
+		enable-gpios = <&expander2 1 GPIO_ACTIVE_HIGH>;
+		backlight = <&backlight_lvds>;
+		status = "disabled";
+
+		port {
+			panel_in_lvds0: endpoint {
+				remote-endpoint = <&ldb_lvds>;
+			};
+		};
+	};
+
 	clk_dp: clk-dp {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
@@ -420,6 +437,16 @@ &lpuart8 {
 	status = "okay";
 };
 
+&lvds_bridge {
+	ports {
+		port@1 {
+			ldb_lvds: endpoint {
+				remote-endpoint = <&panel_in_lvds0>;
+			};
+		};
+	};
+};
+
 &pcf85063 {
 	/* RTC_EVENT# is connected on MBa93xxLA */
 	pinctrl-names = "default";
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 4/5] clk: imx: clk-fracn-gppll: Add 477.4MHz config for video pll
  2023-10-20 13:00 ` [PATCH 4/5] clk: imx: clk-fracn-gppll: Add 477.4MHz config for video pll Alexander Stein
@ 2023-10-20 14:20   ` Marco Felsch
  2023-10-23 10:43     ` Alexander Stein
  0 siblings, 1 reply; 16+ messages in thread
From: Marco Felsch @ 2023-10-20 14:20 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut,
	devicetree, linux-pm, NXP Linux Team, Pengutronix Kernel Team,
	linux-clk, linux-arm-kernel, linux

Hi Alexander,

On 23-10-20, Alexander Stein wrote:
> Add the 477.4MHz frequency support that will be used by video subsystem
> on imx93.

albeit the change is fine, could we consider adding support to calc the
params dynamically?

Regards,
  Marco

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example
  2023-10-20 13:00 ` [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example Alexander Stein
@ 2023-10-22 17:39   ` Conor Dooley
  2023-10-23  6:27     ` Alexander Stein
  2023-10-24 19:49   ` Rob Herring
  1 sibling, 1 reply; 16+ messages in thread
From: Conor Dooley @ 2023-10-22 17:39 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut,
	Pengutronix Kernel Team, NXP Linux Team, devicetree,
	linux-arm-kernel, linux, linux-clk, linux-pm

[-- Attachment #1: Type: text/plain, Size: 2745 bytes --]

Yo,

On Fri, Oct 20, 2023 at 03:00:15PM +0200, Alexander Stein wrote:
> 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: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
>  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 44 +++++++++++++++++++
>  1 file changed, 44 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-ctrl.yaml
> index b3554e7f9e76..5ba66dfb0e05 100644
> --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> @@ -24,6 +24,12 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 1
> +
>    '#power-domain-cells':
>      const: 1
>  
> @@ -46,9 +52,16 @@ properties:
>        - const: csi
>        - const: dsi
>  
> +  bridge@20:
> +    type: object
> +    $ref: /schemas/display/bridge/fsl,ldb.yaml#
> +    unevaluatedProperties: false
> +
>  required:
>    - compatible
>    - reg

> +  - '#address-cells'
> +  - '#size-cells'

It seems to make little sense to me that these would become required
when the bridge is optional. Is it valid to have one of these
media-blk-ctrls without the ldb subnode?

>    - power-domains
>    - clocks
>    - clock-names
> @@ -77,4 +90,35 @@ examples:
>                 clock-names = "apb", "axi", "nic", "disp", "cam",
>                               "pxp", "lcdif", "isi", "csi", "dsi";
>        #power-domain-cells = <1>;
> +      #address-cells = <1>;
> +      #size-cells = <1>;
> +
> +      bridge@20 {
> +          compatible = "fsl,imx93-ldb";
> +          reg = <0x20 0x4>, <0x24 0x4>;
> +          reg-names = "ldb", "lvds";
> +          clocks = <&clk IMX93_CLK_LVDS_GATE>;
> +          clock-names = "ldb";
> +
> +          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: endpoint {
> +                      remote-endpoint = <&ldb_to_panel>;
> +                  };
> +              };
> +          };
> +        };
>      };
> -- 
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example
  2023-10-22 17:39   ` Conor Dooley
@ 2023-10-23  6:27     ` Alexander Stein
  2023-10-23 16:37       ` Conor Dooley
  0 siblings, 1 reply; 16+ messages in thread
From: Alexander Stein @ 2023-10-23  6:27 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut,
	Pengutronix Kernel Team, NXP Linux Team, devicetree,
	linux-arm-kernel, linux, linux-clk, linux-pm

Hi Conor,

Am Sonntag, 22. Oktober 2023, 19:39:12 CEST schrieb Conor Dooley:
> Yo,
> 
> On Fri, Oct 20, 2023 at 03:00:15PM +0200, Alexander Stein wrote:
> > 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: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> > 
> >  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 44 +++++++++++++++++++
> >  1 file changed, 44 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-ctrl.yaml
> > index b3554e7f9e76..5ba66dfb0e05 100644
> > ---
> > a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> > +++
> > b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml> 
> > @@ -24,6 +24,12 @@ properties:
> >    reg:
> >      maxItems: 1
> > 
> > +  '#address-cells':
> > +    const: 1
> > +
> > +  '#size-cells':
> > +    const: 1
> > +
> > 
> >    '#power-domain-cells':
> >      const: 1
> > 
> > @@ -46,9 +52,16 @@ properties:
> >        - const: csi
> >        - const: dsi
> > 
> > +  bridge@20:
> > +    type: object
> > +    $ref: /schemas/display/bridge/fsl,ldb.yaml#
> > +    unevaluatedProperties: false
> > +
> > 
> >  required:
> >    - compatible
> >    - reg
> > 
> > +  - '#address-cells'
> > +  - '#size-cells'
> 
> It seems to make little sense to me that these would become required
> when the bridge is optional. Is it valid to have one of these
> media-blk-ctrls without the ldb subnode?

fsl,imx93-media-blk-ctrl privides several power-domains (DSI, CSI, ISI, PXP 
and LCDIF), currently unused. This series introduces the usage for LCDIF power 
domain. LDB is the LVDS display bridge. So there are several power domains 
which don't requires the usage of ldb.
On the other hand I prefer consistency, so I opted to keep things similar to 
commit 1cb0c87d27dc. If it shall not be added here, it should be removed in 
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml as 
well.

Best regards,
Alexander

> 
> >    - power-domains
> >    - clocks
> >    - clock-names
> > 
> > @@ -77,4 +90,35 @@ examples:
> >                 clock-names = "apb", "axi", "nic", "disp", "cam",
> >                 
> >                               "pxp", "lcdif", "isi", "csi", "dsi";
> >        
> >        #power-domain-cells = <1>;
> > 
> > +      #address-cells = <1>;
> > +      #size-cells = <1>;
> > +
> > +      bridge@20 {
> > +          compatible = "fsl,imx93-ldb";
> > +          reg = <0x20 0x4>, <0x24 0x4>;
> > +          reg-names = "ldb", "lvds";
> > +          clocks = <&clk IMX93_CLK_LVDS_GATE>;
> > +          clock-names = "ldb";
> > +
> > +          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: endpoint {
> > +                      remote-endpoint = <&ldb_to_panel>;
> > +                  };
> > +              };
> > +          };
> > +        };
> > 
> >      };


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 4/5] clk: imx: clk-fracn-gppll: Add 477.4MHz config for video pll
  2023-10-20 14:20   ` Marco Felsch
@ 2023-10-23 10:43     ` Alexander Stein
  2023-10-23 12:33       ` Marco Felsch
  0 siblings, 1 reply; 16+ messages in thread
From: Alexander Stein @ 2023-10-23 10:43 UTC (permalink / raw)
  To: Marco Felsch
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut,
	devicetree, linux-pm, NXP Linux Team, Pengutronix Kernel Team,
	linux-clk, linux-arm-kernel, linux

Hi Marco,

Am Freitag, 20. Oktober 2023, 16:20:55 CEST schrieb Marco Felsch:
> Hi Alexander,
> 
> On 23-10-20, Alexander Stein wrote:
> > Add the 477.4MHz frequency support that will be used by video subsystem
> > on imx93.
> 
> albeit the change is fine, could we consider adding support to calc the
> params dynamically?

Agreed, I would prefer that as well: But unfortunately I will not be able to 
add dynamic calculation right now.

Best regards,
Alexander
-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 4/5] clk: imx: clk-fracn-gppll: Add 477.4MHz config for video pll
  2023-10-23 10:43     ` Alexander Stein
@ 2023-10-23 12:33       ` Marco Felsch
  0 siblings, 0 replies; 16+ messages in thread
From: Marco Felsch @ 2023-10-23 12:33 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut,
	devicetree, linux-pm, NXP Linux Team, Pengutronix Kernel Team,
	linux-clk, linux-arm-kernel, linux

On 23-10-23, Alexander Stein wrote:
> Hi Marco,
> 
> Am Freitag, 20. Oktober 2023, 16:20:55 CEST schrieb Marco Felsch:
> > Hi Alexander,
> > 
> > On 23-10-20, Alexander Stein wrote:
> > > Add the 477.4MHz frequency support that will be used by video subsystem
> > > on imx93.
> > 
> > albeit the change is fine, could we consider adding support to calc the
> > params dynamically?
> 
> Agreed, I would prefer that as well: But unfortunately I will not be able to 
> add dynamic calculation right now.

Okay, just wanted to ask if someone (maybe TQ) has the time to implement
and test it.

Regards,
  Marco

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example
  2023-10-23  6:27     ` Alexander Stein
@ 2023-10-23 16:37       ` Conor Dooley
  2023-10-24  6:30         ` Alexander Stein
  0 siblings, 1 reply; 16+ messages in thread
From: Conor Dooley @ 2023-10-23 16:37 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut,
	Pengutronix Kernel Team, NXP Linux Team, devicetree,
	linux-arm-kernel, linux, linux-clk, linux-pm

[-- Attachment #1: Type: text/plain, Size: 2737 bytes --]

On Mon, Oct 23, 2023 at 08:27:20AM +0200, Alexander Stein wrote:
> Am Sonntag, 22. Oktober 2023, 19:39:12 CEST schrieb Conor Dooley:
> > On Fri, Oct 20, 2023 at 03:00:15PM +0200, Alexander Stein wrote:
> > > 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: Alexander Stein <alexander.stein@ew.tq-group.com>
> > > ---
> > > 
> > >  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 44 +++++++++++++++++++
> > >  1 file changed, 44 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-ctrl.yaml
> > > index b3554e7f9e76..5ba66dfb0e05 100644
> > > ---
> > > a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> > > +++
> > > b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml> 
> > > @@ -24,6 +24,12 @@ properties:
> > >    reg:
> > >      maxItems: 1
> > > 
> > > +  '#address-cells':
> > > +    const: 1
> > > +
> > > +  '#size-cells':
> > > +    const: 1
> > > +
> > > 
> > >    '#power-domain-cells':
> > >      const: 1
> > > 
> > > @@ -46,9 +52,16 @@ properties:
> > >        - const: csi
> > >        - const: dsi
> > > 
> > > +  bridge@20:
> > > +    type: object
> > > +    $ref: /schemas/display/bridge/fsl,ldb.yaml#
> > > +    unevaluatedProperties: false
> > > +
> > > 
> > >  required:
> > >    - compatible
> > >    - reg
> > > 
> > > +  - '#address-cells'
> > > +  - '#size-cells'
> > 
> > It seems to make little sense to me that these would become required
> > when the bridge is optional. Is it valid to have one of these
> > media-blk-ctrls without the ldb subnode?
> 
> fsl,imx93-media-blk-ctrl privides several power-domains (DSI, CSI, ISI, PXP 
> and LCDIF), currently unused. This series introduces the usage for LCDIF power 
> domain. LDB is the LVDS display bridge. So there are several power domains 
> which don't requires the usage of ldb.
> On the other hand I prefer consistency, so I opted to keep things similar to 
> commit 1cb0c87d27dc. If it shall not be added here, it should be removed in 
> Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml as 
> well.

IIRC the tooling will complain if you have an enabled node containing
#address-cells and/or #size-cells but no child nodes, so making
#address-cells or #size-cells required will cause problems. Looks like
the only user has the child node, so it didn't crop up yet.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example
  2023-10-23 16:37       ` Conor Dooley
@ 2023-10-24  6:30         ` Alexander Stein
  2023-10-24  9:08           ` Conor Dooley
  0 siblings, 1 reply; 16+ messages in thread
From: Alexander Stein @ 2023-10-24  6:30 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut,
	Pengutronix Kernel Team, NXP Linux Team, devicetree,
	linux-arm-kernel, linux, linux-clk, linux-pm

Am Montag, 23. Oktober 2023, 18:37:29 CEST schrieb Conor Dooley:
> On Mon, Oct 23, 2023 at 08:27:20AM +0200, Alexander Stein wrote:
> > Am Sonntag, 22. Oktober 2023, 19:39:12 CEST schrieb Conor Dooley:
> > > On Fri, Oct 20, 2023 at 03:00:15PM +0200, Alexander Stein wrote:
> > > > 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: Alexander Stein <alexander.stein@ew.tq-group.com>
> > > > ---
> > > > 
> > > >  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 44
> > > >  +++++++++++++++++++
> > > >  1 file changed, 44 insertions(+)
> > > > 
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.y
> > > > aml
> > > > b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.y
> > > > aml
> > > > index b3554e7f9e76..5ba66dfb0e05 100644
> > > > ---
> > > > a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.y
> > > > aml
> > > > +++
> > > > b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.y
> > > > aml>
> > > > 
> > > > @@ -24,6 +24,12 @@ properties:
> > > >    reg:
> > > >      maxItems: 1
> > > > 
> > > > +  '#address-cells':
> > > > +    const: 1
> > > > +
> > > > +  '#size-cells':
> > > > +    const: 1
> > > > +
> > > > 
> > > >    '#power-domain-cells':
> > > >      const: 1
> > > > 
> > > > @@ -46,9 +52,16 @@ properties:
> > > >        - const: csi
> > > >        - const: dsi
> > > > 
> > > > +  bridge@20:
> > > > +    type: object
> > > > +    $ref: /schemas/display/bridge/fsl,ldb.yaml#
> > > > +    unevaluatedProperties: false
> > > > +
> > > > 
> > > >  required:
> > > >    - compatible
> > > >    - reg
> > > > 
> > > > +  - '#address-cells'
> > > > +  - '#size-cells'
> > > 
> > > It seems to make little sense to me that these would become required
> > > when the bridge is optional. Is it valid to have one of these
> > > media-blk-ctrls without the ldb subnode?
> > 
> > fsl,imx93-media-blk-ctrl privides several power-domains (DSI, CSI, ISI,
> > PXP
> > and LCDIF), currently unused. This series introduces the usage for LCDIF
> > power domain. LDB is the LVDS display bridge. So there are several power
> > domains which don't requires the usage of ldb.
> > On the other hand I prefer consistency, so I opted to keep things similar
> > to commit 1cb0c87d27dc. If it shall not be added here, it should be
> > removed in
> > Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
> > as well.
> 
> IIRC the tooling will complain if you have an enabled node containing
> #address-cells and/or #size-cells but no child nodes, so making
> #address-cells or #size-cells required will cause problems. Looks like
> the only user has the child node, so it didn't crop up yet.

I was not able to raise a warning with enabled media_blk_ctrl having #address-
cells/#size-cells being set but no subnode.
I don't have a strong opinion on this, but I prefer having both bindings as 
similar as possible.

best regards,
Alexander

-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example
  2023-10-24  6:30         ` Alexander Stein
@ 2023-10-24  9:08           ` Conor Dooley
  2024-01-11 13:26             ` Alexander Stein
  0 siblings, 1 reply; 16+ messages in thread
From: Conor Dooley @ 2023-10-24  9:08 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut,
	Pengutronix Kernel Team, NXP Linux Team, devicetree,
	linux-arm-kernel, linux, linux-clk, linux-pm

[-- Attachment #1: Type: text/plain, Size: 3600 bytes --]

On Tue, Oct 24, 2023 at 08:30:16AM +0200, Alexander Stein wrote:
> Am Montag, 23. Oktober 2023, 18:37:29 CEST schrieb Conor Dooley:
> > On Mon, Oct 23, 2023 at 08:27:20AM +0200, Alexander Stein wrote:
> > > Am Sonntag, 22. Oktober 2023, 19:39:12 CEST schrieb Conor Dooley:
> > > > On Fri, Oct 20, 2023 at 03:00:15PM +0200, Alexander Stein wrote:
> > > > > 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: Alexander Stein <alexander.stein@ew.tq-group.com>
> > > > > ---
> > > > > 
> > > > >  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 44
> > > > >  +++++++++++++++++++
> > > > >  1 file changed, 44 insertions(+)
> > > > > 
> > > > > diff --git
> > > > > a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.y
> > > > > aml
> > > > > b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.y
> > > > > aml
> > > > > index b3554e7f9e76..5ba66dfb0e05 100644
> > > > > ---
> > > > > a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.y
> > > > > aml
> > > > > +++
> > > > > b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.y
> > > > > aml>
> > > > > 
> > > > > @@ -24,6 +24,12 @@ properties:
> > > > >    reg:
> > > > >      maxItems: 1
> > > > > 
> > > > > +  '#address-cells':
> > > > > +    const: 1
> > > > > +
> > > > > +  '#size-cells':
> > > > > +    const: 1
> > > > > +
> > > > > 
> > > > >    '#power-domain-cells':
> > > > >      const: 1
> > > > > 
> > > > > @@ -46,9 +52,16 @@ properties:
> > > > >        - const: csi
> > > > >        - const: dsi
> > > > > 
> > > > > +  bridge@20:
> > > > > +    type: object
> > > > > +    $ref: /schemas/display/bridge/fsl,ldb.yaml#
> > > > > +    unevaluatedProperties: false
> > > > > +
> > > > > 
> > > > >  required:
> > > > >    - compatible
> > > > >    - reg
> > > > > 
> > > > > +  - '#address-cells'
> > > > > +  - '#size-cells'
> > > > 
> > > > It seems to make little sense to me that these would become required
> > > > when the bridge is optional. Is it valid to have one of these
> > > > media-blk-ctrls without the ldb subnode?
> > > 
> > > fsl,imx93-media-blk-ctrl privides several power-domains (DSI, CSI, ISI,
> > > PXP
> > > and LCDIF), currently unused. This series introduces the usage for LCDIF
> > > power domain. LDB is the LVDS display bridge. So there are several power
> > > domains which don't requires the usage of ldb.
> > > On the other hand I prefer consistency, so I opted to keep things similar
> > > to commit 1cb0c87d27dc. If it shall not be added here, it should be
> > > removed in
> > > Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
> > > as well.
> > 
> > IIRC the tooling will complain if you have an enabled node containing
> > #address-cells and/or #size-cells but no child nodes, so making
> > #address-cells or #size-cells required will cause problems. Looks like
> > the only user has the child node, so it didn't crop up yet.
> 
> I was not able to raise a warning with enabled media_blk_ctrl having #address-
> cells/#size-cells being set but no subnode.
> I don't have a strong opinion on this, but I prefer having both bindings as 
> similar as possible.

The complaint is from dtc, possibly only at W=1:
unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example
  2023-10-20 13:00 ` [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example Alexander Stein
  2023-10-22 17:39   ` Conor Dooley
@ 2023-10-24 19:49   ` Rob Herring
  1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring @ 2023-10-24 19:49 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Fabio Estevam, Abel Vesa, Peng Fan, Michael Turquette,
	Stephen Boyd, Ulf Hansson, Marek Vasut, Pengutronix Kernel Team,
	NXP Linux Team, devicetree, linux-arm-kernel, linux, linux-clk,
	linux-pm

On Fri, Oct 20, 2023 at 03:00:15PM +0200, Alexander Stein wrote:
> 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: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
>  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 44 +++++++++++++++++++
>  1 file changed, 44 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-ctrl.yaml
> index b3554e7f9e76..5ba66dfb0e05 100644
> --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
> @@ -24,6 +24,12 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 1
> +

Presumably the child nodes are MMIO? If so, missing 'ranges'.

>    '#power-domain-cells':
>      const: 1
>  
> @@ -46,9 +52,16 @@ properties:
>        - const: csi
>        - const: dsi
>  
> +  bridge@20:
> +    type: object
> +    $ref: /schemas/display/bridge/fsl,ldb.yaml#
> +    unevaluatedProperties: false

We do this style a lot, but another way to do child nodes is:

type: object
additionalProperties: true

properties:
  compatible:
    contains:
      const: fsl,imx93-ldb

This way avoids applying the fsl,ldb.yaml schema twice and ensures the 
right LDB compatible is used. 

Rob

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example
  2023-10-24  9:08           ` Conor Dooley
@ 2024-01-11 13:26             ` Alexander Stein
  0 siblings, 0 replies; 16+ messages in thread
From: Alexander Stein @ 2024-01-11 13:26 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Abel Vesa, Peng Fan,
	Michael Turquette, Stephen Boyd, Ulf Hansson, Marek Vasut,
	Pengutronix Kernel Team, NXP Linux Team, devicetree,
	linux-arm-kernel, linux, linux-clk, linux-pm

Hi Conor,

Am Dienstag, 24. Oktober 2023, 11:08:56 CET schrieb Conor Dooley:
> On Tue, Oct 24, 2023 at 08:30:16AM +0200, Alexander Stein wrote:
> > Am Montag, 23. Oktober 2023, 18:37:29 CEST schrieb Conor Dooley:
> > > On Mon, Oct 23, 2023 at 08:27:20AM +0200, Alexander Stein wrote:
> > > > Am Sonntag, 22. Oktober 2023, 19:39:12 CEST schrieb Conor Dooley:
> > > > > On Fri, Oct 20, 2023 at 03:00:15PM +0200, Alexander Stein wrote:
> > > > > > 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: Alexander Stein <alexander.stein@ew.tq-group.com>
> > > > > > ---
> > > > > > 
> > > > > >  .../soc/imx/fsl,imx93-media-blk-ctrl.yaml     | 44
> > > > > >  +++++++++++++++++++
> > > > > >  1 file changed, 44 insertions(+)
> > > > > > 
> > > > > > diff --git
> > > > > > a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ct
> > > > > > rl.y
> > > > > > aml
> > > > > > b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ct
> > > > > > rl.y
> > > > > > aml
> > > > > > index b3554e7f9e76..5ba66dfb0e05 100644
> > > > > > ---
> > > > > > a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ct
> > > > > > rl.y
> > > > > > aml
> > > > > > +++
> > > > > > b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ct
> > > > > > rl.y
> > > > > > aml>
> > > > > > 
> > > > > > @@ -24,6 +24,12 @@ properties:
> > > > > >    reg:
> > > > > >      maxItems: 1
> > > > > > 
> > > > > > +  '#address-cells':
> > > > > > +    const: 1
> > > > > > +
> > > > > > +  '#size-cells':
> > > > > > +    const: 1
> > > > > > +
> > > > > > 
> > > > > >    '#power-domain-cells':
> > > > > >      const: 1
> > > > > > 
> > > > > > @@ -46,9 +52,16 @@ properties:
> > > > > >        - const: csi
> > > > > >        - const: dsi
> > > > > > 
> > > > > > +  bridge@20:
> > > > > > +    type: object
> > > > > > +    $ref: /schemas/display/bridge/fsl,ldb.yaml#
> > > > > > +    unevaluatedProperties: false
> > > > > > +
> > > > > > 
> > > > > >  required:
> > > > > >    - compatible
> > > > > >    - reg
> > > > > > 
> > > > > > +  - '#address-cells'
> > > > > > +  - '#size-cells'
> > > > > 
> > > > > It seems to make little sense to me that these would become required
> > > > > when the bridge is optional. Is it valid to have one of these
> > > > > media-blk-ctrls without the ldb subnode?
> > > > 
> > > > fsl,imx93-media-blk-ctrl privides several power-domains (DSI, CSI,
> > > > ISI,
> > > > PXP
> > > > and LCDIF), currently unused. This series introduces the usage for
> > > > LCDIF
> > > > power domain. LDB is the LVDS display bridge. So there are several
> > > > power
> > > > domains which don't requires the usage of ldb.
> > > > On the other hand I prefer consistency, so I opted to keep things
> > > > similar
> > > > to commit 1cb0c87d27dc. If it shall not be added here, it should be
> > > > removed in
> > > > Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.ya
> > > > ml
> > > > as well.
> > > 
> > > IIRC the tooling will complain if you have an enabled node containing
> > > #address-cells and/or #size-cells but no child nodes, so making
> > > #address-cells or #size-cells required will cause problems. Looks like
> > > the only user has the child node, so it didn't crop up yet.
> > 
> > I was not able to raise a warning with enabled media_blk_ctrl having
> > #address- cells/#size-cells being set but no subnode.
> > I don't have a strong opinion on this, but I prefer having both bindings
> > as
> > similar as possible.
> 
> The complaint is from dtc, possibly only at W=1:
> unnecessary #address-cells/#size-cells without "ranges" or child "reg"
> property

I was still not able to trigger this. But anyway this binding is for i.MX93 
MEDIAMIX Block Control. There is exactly one of this instance in the SoC. So 
there is always the LVDS bridge included, thus the ldb subnode shall be added.
Given this IMHO #address-cells/#size-cells can be required.

Best regards,
Alexander
-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-01-11 13:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 13:00 [PATCH 0/5] TQMa93xxLA/MBa93xxLA LVDS support Alexander Stein
2023-10-20 13:00 ` [PATCH 1/5] soc: imx: imx93-blk-ctrl: Scan subnodes and bind drivers to them Alexander Stein
2023-10-20 13:00 ` [PATCH 2/5] dt-bindings: soc: imx93-media-blk-ctrl: Add LDB subnode into schema and example Alexander Stein
2023-10-22 17:39   ` Conor Dooley
2023-10-23  6:27     ` Alexander Stein
2023-10-23 16:37       ` Conor Dooley
2023-10-24  6:30         ` Alexander Stein
2023-10-24  9:08           ` Conor Dooley
2024-01-11 13:26             ` Alexander Stein
2023-10-24 19:49   ` Rob Herring
2023-10-20 13:00 ` [PATCH 3/5] arm64: dts: imx93: Add LCDIF & LDB nodes Alexander Stein
2023-10-20 13:00 ` [PATCH 4/5] clk: imx: clk-fracn-gppll: Add 477.4MHz config for video pll Alexander Stein
2023-10-20 14:20   ` Marco Felsch
2023-10-23 10:43     ` Alexander Stein
2023-10-23 12:33       ` Marco Felsch
2023-10-20 13:00 ` [PATCH 5/5] arm64: dts: mba93xxla: Add LVDS overlay Alexander Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).