Skip to contentSkip to conversation

dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name

PATCH Applied Marek Vasut 4 participants 9 messages Feb 27, 2023 – Mar 14, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/5 dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name

Align the block controller example node name with Linux imx8mp.dtsi . No functional change.

---
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
V2: Adjust the label too
V3: - Add RB from Liu
- Drop the label
V4: Add AB from Krzysztof
V5: Add RB/TB from Alexander

---
 .../devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +1 -1
index dadb6108e3213..a0f7c73510d04 100644
@@ -94,7 +94,7 @@ examples:
     #include <dt-bindings/clock/imx8mp-clock.h>
     #include <dt-bindings/power/imx8mp-power.h>
 
-    media_blk_ctl: blk-ctl@32ec0000 {
+    blk-ctrl@32ec0000 {
         compatible = "fsl,imx8mp-media-blk-ctrl", "syscon";
         reg = <0x32ec0000 0x138>;
         power-domains = <&mediamix_pd>, <&mipi_phy1_pd>, <&mipi_phy1_pd>,
Signature · 1 line
2.39.2
#1 lore raw

PATCH v5 2/5 dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB subnode into schema and example

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.

---
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
V2: Add RB from Liu
V3: - Update commit subject and drop space before fullstop.
- Add RB from Krzysztof
V4: No change
V5: - Reorder clock and reg properties in example
- Add AB/TB from Alexander

---
 .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml    | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +51 -0
index a0f7c73510d04..ea9aa876ed130 100644
@@ -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";
+            reg = <0x5c 0x4>, <0x128 0x4>;
+            reg-names = "ldb", "lvds";
+            clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
+            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_ch0: endpoint {
+                        remote-endpoint = <&ldb_to_lvdsx4panel>;
+                    };
+                };
+
+                port@2 {
+                    reg = <2>;
+
+                    ldb_lvds_ch1: endpoint {
+                    };
+                };
+            };
+        };
     };
 ...
Signature · 1 line
2.39.2
#2 lore raw

PATCH v5 3/5 soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them

In reply to Marek Vasut

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")

---
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
V2: - Turn this into 3/4
- Warn and continue in case of error
V3: Add RB from Liu
V4: - Use devm_of_platform_populate()
- Remove RB from Liu
V5: - Handle devm_of_platform_populate() return value correctly
- Add TB from Alexander

---
 drivers/soc/imx/imx8m-blk-ctrl.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/soc/imx/imx8m-blk-ctrl.c +4 -0
index 399cb85105a18..8bee7280303c5 100644
@@ -310,6 +310,10 @@ static int imx8m_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:
Signature · 1 line
2.39.2
Reviewed-by on v5 3/5
#3 lore raw

Re: [PATCH v5 3/5] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them

Am Montag, dem 27.02.2023 um 16:54 +0100 schrieb Marek Vasut:

Quoted 7 lines

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")
Quoted 44 lines

---
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
V2: - Turn this into 3/4
- Warn and continue in case of error
V3: Add RB from Liu
V4: - Use devm_of_platform_populate()
- Remove RB from Liu
V5: - Handle devm_of_platform_populate() return value correctly
- Add TB from Alexander

---
 drivers/soc/imx/imx8m-blk-ctrl.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/soc/imx/imx8m-blk-ctrl.c +4 -0
index 399cb85105a18..8bee7280303c5 100644
@@ -310,6 +310,10 @@ static int imx8m_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:
#4 lore raw

PATCH v5 4/5 arm64: dts: imx8mp: Drop simple-bus from fsl,imx8mp-media-blk-ctrl

In reply to Marek Vasut

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")

---
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
V2: Turn this into 4/4
V3: Add RB from Liu
V4: No change
V5: Add RB/TB from Alexander

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +1 -1
index 2dd60e3252f35..ca8093ee4d0e4 100644
@@ -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>;
Signature · 1 line
2.39.2
#5 lore raw

PATCH v5 5/5 arm64: dts: imx8mp: Reorder clock and reg properties

In reply to Marek Vasut

Align the clock and reg properties order with example bindings and the rest of the imx8mp.dtsi . No functional change.

---
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
V5: New patch

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +2 -2
index ca8093ee4d0e4..524b4ccfcc553 100644
@@ -1202,10 +1202,10 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
 
 				lvds_bridge: bridge@5c {
 					compatible = "fsl,imx8mp-ldb";
-					clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
-					clock-names = "ldb";
 					reg = <0x5c 0x4>, <0x128 0x4>;
 					reg-names = "ldb", "lvds";
+					clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
+					clock-names = "ldb";
 					assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
 					assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>;
 					status = "disabled";
Signature · 1 line
2.39.2
Reviewed-by on v5 5/5
#6 lore raw

Re: [PATCH v5 5/5] arm64: dts: imx8mp: Reorder clock and reg properties

Am Montag, dem 27.02.2023 um 16:54 +0100 schrieb Marek Vasut:

Quoted 4 lines

Align the clock and reg properties order with example bindings and the rest of the imx8mp.dtsi . No functional change.

Quoted 40 lines

---
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
V5: New patch

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +2 -2
index ca8093ee4d0e4..524b4ccfcc553 100644
@@ -1202,10 +1202,10 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
 
 				lvds_bridge: bridge@5c {
 					compatible = "fsl,imx8mp-ldb";
-					clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
-					clock-names = "ldb";
 					reg = <0x5c 0x4>, <0x128 0x4>;
 					reg-names = "ldb", "lvds";
+					clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
+					clock-names = "ldb";
 					assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
 					assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>;
 					status = "disabled";
Reviewed-by on v5 5/5
#7 lore raw

Re: [PATCH v5 5/5] arm64: dts: imx8mp: Reorder clock and reg properties

In reply to Marek Vasut

Am Montag, 27. Februar 2023, 16:54:23 CET schrieb Marek Vasut:

Quoted 4 lines

Align the clock and reg properties order with example bindings and the rest of the imx8mp.dtsi . No functional change.

Quoted 29 lines

---
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
V5: New patch

---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
ca8093ee4d0e4..524b4ccfcc553 100644

arch/arm64/boot/dts/freescale/imx8mp.dtsi media_blk_ctrl: blk-ctrl@32ec0000 { · line 1204

Quoted 3 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +0 -0
@@ -1202,10 +1202,10 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
 
 				lvds_bridge: bridge@5c {
 					compatible = "fsl,imx8mp-

ldb";

arch/arm64/boot/dts/freescale/imx8mp.dtsi media_blk_ctrl: blk-ctrl@32ec0000 { · line 1205

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mp.dtsi +0 -1
-					clocks = <&clk 

IMX8MP_CLK_MEDIA_LDB>;

arch/arm64/boot/dts/freescale/imx8mp.dtsi media_blk_ctrl: blk-ctrl@32ec0000 { · line 1205

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +0 -1
-					clock-names = "ldb";
 					reg = <0x5c 0x4>, <0x128 

0x4>;

arch/arm64/boot/dts/freescale/imx8mp.dtsi media_blk_ctrl: blk-ctrl@32ec0000 { · line 1207

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +1 -0
 					reg-names = "ldb", "lvds";
+					clocks = <&clk 

IMX8MP_CLK_MEDIA_LDB>;

arch/arm64/boot/dts/freescale/imx8mp.dtsi media_blk_ctrl: blk-ctrl@32ec0000 { · line 1209

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +1 -0
+					clock-names = "ldb";
 					assigned-clocks = <&clk 

IMX8MP_CLK_MEDIA_LDB>;

arch/arm64/boot/dts/freescale/imx8mp.dtsi media_blk_ctrl: blk-ctrl@32ec0000 { · line 1210

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mp.dtsi +0 -0
 					assigned-clock-parents = 

<&clk IMX8MP_VIDEO_PLL1_OUT>;

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mp.dtsi +0 -0
 					status = "disabled";
Signature · 4 lines
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/