dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name
Subsystems (2)
PATCH v4 1/4 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
--- .../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
@@ -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.1
PATCH v4 2/4 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
--- .../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
@@ -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 { + }; + }; + }; + }; }; ...
Signature · 1 line
2.39.1
Re: [PATCH v4 2/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB subnode into schema and example
Hi Marek,
thanks for the cleanup.
Am Donnerstag, 23. Februar 2023, 16:10:41 CET schrieb Marek Vasut:
Quoted 75 lines
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 Krzysztof Kozlowski <[email protected]>Reviewed-by Liu Ying <[email protected]>Signed-off-by Marek Vasut <[email protected]>---
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--- .../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.yamlb/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yamlindexa0f7c73510d04..f092916dc8594100644
---a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
+++b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yamlDocumentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +13
-0@@ -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";
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml examples: · line 138
Quoted 10 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +9
-0#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";
I remember that reg shall be stated right after compatible. Maybe this order should be used this example as well.
Despite that:
Quoted 31 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +29
-0+ + 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 · 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/
PATCH v4 3/4 soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
In reply to Marek VasutThis 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.
---
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
--- drivers/soc/imx/imx8m-blk-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/imx/imx8m-blk-ctrl.c +1 -1
@@ -310,7 +310,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)dev_set_drvdata (dev, bc); -return 0 ; +return devm_of_platform_populate (dev); cleanup_provider:of_genpd_del_provider (dev->of_node);
Signature · 1 line
2.39.1
Re: [PATCH v4 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
Am Donnerstag, dem 23.02.2023 um 16:10 +0100 schrieb Marek Vasut:
Quoted 38 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")Signed-off-by Marek Vasut <[email protected]>---
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: - Usedevm_of_platform_populate()
- Remove RB from Liu--- drivers/soc/imx/imx8m-blk-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/soc/imx/imx8m-blk-ctrl.c +0
-0
drivers/soc/imx/imx8m-blk-ctrl.c static int imx8m_blk_ctrl_probe(struct platform_device *pdev) · line 313
Quoted 5 lines
drivers/soc/imx/imx8m-blk-ctrl.c +1
-1@@ -310,7 +310,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)dev_set_drvdata (dev, bc); -return 0 ; +return devm_of_platform_populate (dev);
You need to handle the return value, not simply pass it through as the return value of the probe function. When devm_of_platform_populate fails you miss to clean up the genpd provider and detach from the power domains.
Regards,
Lucas
Quoted 3 lines
drivers/soc/imx/imx8m-blk-ctrl.c +0
-0cleanup_provider:of_genpd_del_provider (dev->of_node);
Re: [PATCH v4 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
On 2/24/23 10:08, Lucas Stach wrote:
Hi,
Quoted 8 lines
Quoted 8 lines
drivers/soc/imx/imx8m-blk-ctrl.c +0
-0@@ -310,7 +310,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)dev_set_drvdata (dev, bc);
Quoted 7 lines
drivers/soc/imx/imx8m-blk-ctrl.c static int imx8m_blk_ctrl_probe(struct platform_device *pdev) · line 313
Quoted 2 lines
drivers/soc/imx/imx8m-blk-ctrl.c +1
-1-return 0 ; +return devm_of_platform_populate (dev);You need to handle the return value, not simply pass it through as the return value of the probe function. When
devm_of_platform_populatefails you miss to clean up the genpd provider and detach from the power domains.
Hmmm, but then I cannot use the devm_ variant, can I ?
Re: [PATCH v4 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
Am Freitag, dem 24.02.2023 um 13:08 +0100 schrieb Marek Vasut:
Quoted 20 lines · Lucas Stach
Hi,
Quoted 8 lines
Quoted 8 lines
drivers/soc/imx/imx8m-blk-ctrl.c +0
-0@@ -310,7 +310,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)dev_set_drvdata (dev, bc);Quoted 7 lines
drivers/soc/imx/imx8m-blk-ctrl.c static int imx8m_blk_ctrl_probe(struct platform_device *pdev) · line 313
Quoted 2 lines
drivers/soc/imx/imx8m-blk-ctrl.c +1
-1-return 0 ; +return devm_of_platform_populate (dev);You need to handle the return value, not simply pass it through as the return value of the probe function. When
devm_of_platform_populatefails you miss to clean up the genpd provider and detach from the power domains.
Quoted 1 line
Hmmm, but then I cannot use the
devm_variant, can I ?
Why not? If everything works okay the devm will just take care of cleaning up the platform devices when the blk-ctrl is removed. If it fails you just need to roll back the non-devm parts of the blk-ctrl probe routine.
Regards,
Lucas
Re: [PATCH v4 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
Quoted 21 lines · Lucas Stach
Am Freitag, dem 24.02.2023 um 13:08 +0100 schrieb Marek Vasut:
Quoted 20 lines · Lucas Stach
Hi,
Quoted 15 lines
drivers/soc/imx/imx8m-blk-ctrl.c static int imx8m_blk_ctrl_probe(struct platform_device *pdev) · line 313
Quoted 10 lines
drivers/soc/imx/imx8m-blk-ctrl.c +1
-1@@ -310,7 +310,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)dev_set_drvdata (dev, bc); -return 0 ; +return devm_of_platform_populate (dev);You need to handle the return value, not simply pass it through as the return value of the probe function. When
devm_of_platform_populatefails you miss to clean up the genpd provider and detach from the power domains.
Quoted 6 lines
Quoted 1 line
Hmmm, but then I cannot use the
devm_variant, can I ?Why not? If everything works okay the devm will just take care of cleaning up the platform devices when the blk-ctrl is removed. If it fails you just need to roll back the non-devm parts of the blk-ctrl probe routine.
All right, I just sent a V5. Thanks for the clarification.
PATCH v4 4/4 arm64: dts: imx8mp: Drop simple-bus from fsl,imx8mp-media-blk-ctrl
In reply to Marek VasutThis 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.
---
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
--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mp.dtsi +1 -1
@@ -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.1
Re: [PATCH v4 4/4] arm64: dts: imx8mp: Drop simple-bus from fsl, imx8mp-media-blk-ctrl
Hi Marek,
thanks for the cleanup.
Am Donnerstag, 23. Februar 2023, 16:10:43 CET schrieb Marek Vasut:
Quoted 6 lines
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.
Reviewed-by Liu Ying <[email protected]>Fixes 94e6197dadc9 ("arm64: dts: imx8mp: Add LCDIF2 & LDB nodes")Signed-off-by Marek Vasut <[email protected]>
Also the whole series tested on imx8mp and imx93.
Quoted 31 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 4/4
V3: Add RB from Liu
V4: No change--- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm64/boot/dts/freescale/imx8mp.dtsiindex2dd60e3252f35..ca8093ee4d0e4100644
arch/arm64/boot/dts/freescale/imx8mp.dtsi lcdif2_to_ldb: endpoint { · line 1153
Quoted 3 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +0
-0@@ -1151,7 +1151,7 @@ lcdif2_to_ldb: endpoint { media_blk_ctrl: blk-ctrl@32ec0000 { compatible = "fsl,imx8mp-media-blk-
ctrl",
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mp.dtsi +1
-1- "simple-bus", "syscon"; + "syscon"; reg = <0x32ec0000 0x10000>; #address-cells = <1>; #size-cells = <1>;
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/
Hi Marek,
Am Donnerstag, 23. Februar 2023, 16:10:40 CET schrieb Marek Vasut:
Quoted 6 lines
Align the block controller example node name with Linux
imx8mp.dtsi. No functional change.Reviewed-by Liu Ying <[email protected]>Signed-off-by Marek Vasut <[email protected]>
Quoted 43 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: Adjust the label too
V3: - Add RB from Liu
- Drop the label
V4: Add AB from Krzysztof--- .../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.yamlb/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yamlindexdadb6108e3213..a0f7c73510d04100644
---a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
+++b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yamlDocumentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +1
-1@@ -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 · 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/