dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB into DT example
Subsystems (2)
PATCH 1/1 dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB into DT example
Document the LDB bridge subnode and add the subnode into the example. For the subnode to work, the block control must be compatible with simple-mfd in addition to the existing compatibles.
--- .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +53 -1
@@ -18,11 +18,18 @@ properties: compatible: items: - const: fsl,imx8mp-media-blk-ctrl + - const: simple-mfd - const: syscon reg: maxItems: 1 + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + '#power-domain-cells': const: 1
@@ -64,9 +71,16 @@ properties: - const: isp - const: phy + 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
@@ -81,7 +95,7 @@ examples: #include <dt-bindings/power/imx8mp-power.h> media_blk_ctl: blk-ctl@32ec0000 { - compatible = "fsl,imx8mp-media-blk-ctrl", "syscon"; + compatible = "fsl,imx8mp-media-blk-ctrl", "simple-mfd", "syscon"; reg = <0x32ec0000 0x138>; power-domains = <&mediamix_pd>, <&mipi_phy1_pd>, <&mipi_phy1_pd>, <&mediamix_pd>, <&mediamix_pd>, <&mipi_phy2_pd>,
@@ -100,5 +114,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.35.1
Quoted 22 lines · Marek Vasut
Document the LDB bridge subnode and add the subnode into the example. For the subnode to work, the block control must be compatible with simple-mfd in addition to the existing compatibles.
Signed-off-by Marek Vasut <[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 Rob Herring <[email protected]>--- .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +0
-0
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml properties: · line 21
Quoted 4 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +1
-0@@ -18,11 +18,18 @@ properties: compatible: items: - const: fsl,imx8mp-media-blk-ctrl + - const: simple-mfd
Not really... simple-mfd means devices is really simple and you just use it to instantiate children. However this is not simple - it's a power domain controller with several clocks and power domains as input.
It's not a simple MFD, but a regular device.
Quoted 15 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +6
-0- const: syscon reg: maxItems: 1 + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + '#power-domain-cells': const: 1
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml properties: · line 76
Quoted 6 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +3
-0@@ -64,9 +71,16 @@ properties: - const: isp - const: phy + bridge@5c: + type: object + $ref: "/schemas/display/bridge/fsl,ldb.yaml#"
Skip the quotes, especially that it's inconsistent with others (').
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml properties: · line 78
Quoted 2 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +2
-0+ unevaluatedProperties: false +
Best regards,
Krzysztof
Quoted 32 lines · Krzysztof Kozlowski
Quoted 22 lines · Marek Vasut
Document the LDB bridge subnode and add the subnode into the example. For the subnode to work, the block control must be compatible with simple-mfd in addition to the existing compatibles.
Signed-off-by Marek Vasut <[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 Rob Herring <[email protected]>--- .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +0
-0Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml properties: · line 21
Quoted 4 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +1
-0@@ -18,11 +18,18 @@ properties: compatible: items: - const: fsl,imx8mp-media-blk-ctrl + - const: simple-mfdNot really... simple-mfd means devices is really simple and you just use it to instantiate children. However this is not simple - it's a power domain controller with several clocks and power domains as input.
Quoted 1 line
It's not a simple MFD, but a regular device.
I don't understand this comment. The LDB bridge is literally two registers with a few bits in this media block controller register area. Can you expand on why the simple-mfd is unsuitable and what should it be instead ?
Quoted 33 lines · Marek Vasut
Quoted 32 lines · Krzysztof Kozlowski
Quoted 22 lines · Marek Vasut
Document the LDB bridge subnode and add the subnode into the example. For the subnode to work, the block control must be compatible with simple-mfd in addition to the existing compatibles.
Signed-off-by Marek Vasut <[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 Rob Herring <[email protected]>--- .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +0
-0Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml properties: · line 21
Quoted 4 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +1
-0@@ -18,11 +18,18 @@ properties: compatible: items: - const: fsl,imx8mp-media-blk-ctrl + - const: simple-mfdNot really... simple-mfd means devices is really simple and you just use it to instantiate children. However this is not simple - it's a power domain controller with several clocks and power domains as input.
Quoted 6 lines
Quoted 1 line
It's not a simple MFD, but a regular device.
I don't understand this comment. The LDB bridge is literally two registers with a few bits in this media block controller register area. Can you expand on why the simple-mfd is unsuitable and what should it be instead ?
Looking at the bindings you have there 10 power domains, 10 input clocks and a domain provider. The driver is also not that simple which is another argument that this is not simple-mfd. Simply, it is not simple.
What I meant, is that probably you should populate children from the driver instead of adding simple-mfd compatible. Once you add simple-mfd, you cannot remove it and children cannot use anything from the parent.
Best regards,
Krzysztof
On 6/30/22 21:31, Krzysztof Kozlowski wrote:
Hi,
[...]
Quoted 21 lines
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml properties: · line 21
Quoted 9 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +1
-0@@ -18,11 +18,18 @@ properties: compatible: items: - const: fsl,imx8mp-media-blk-ctrl + - const: simple-mfdNot really... simple-mfd means devices is really simple and you just use it to instantiate children. However this is not simple - it's a power domain controller with several clocks and power domains as input.
Quoted 6 lines
Quoted 1 line
It's not a simple MFD, but a regular device.
I don't understand this comment. The LDB bridge is literally two registers with a few bits in this media block controller register area. Can you expand on why the simple-mfd is unsuitable and what should it be instead ?
Quoted 7 lines
Looking at the bindings you have there 10 power domains, 10 input clocks and a domain provider. The driver is also not that simple which is another argument that this is not simple-mfd. Simply, it is not simple.
What I meant, is that probably you should populate children from the driver instead of adding simple-mfd compatible. Once you add simple-mfd, you cannot remove it and children cannot use anything from the parent.
No, I don't think so.
The block controller provides those 10 power domains, those are separate things controlled by separate registers within the block control register space.
This LDB bridge are two more completely unrelated registers which have nothing to do with those power domains . They are just in the same register block because they had to put those registers somewhere. And they are mixed literally in the middle of the register block, because there was space it seems. Hence the simple-mfd is I think the right thing here.
Rob Herring
maintainerQuoted 41 lines · Marek Vasut
On 6/30/22 21:31, Krzysztof Kozlowski wrote:
Hi,
[...]
Quoted 21 lines
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml properties: · line 21
Quoted 9 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +1
-0@@ -18,11 +18,18 @@ properties: compatible: items: - const: fsl,imx8mp-media-blk-ctrl + - const: simple-mfdNot really... simple-mfd means devices is really simple and you just use it to instantiate children. However this is not simple - it's a power domain controller with several clocks and power domains as input.
Quoted 6 lines
Quoted 1 line
It's not a simple MFD, but a regular device.
I don't understand this comment. The LDB bridge is literally two registers with a few bits in this media block controller register area. Can you expand on why the simple-mfd is unsuitable and what should it be instead ?
Quoted 7 lines
Looking at the bindings you have there 10 power domains, 10 input clocks and a domain provider. The driver is also not that simple which is another argument that this is not simple-mfd. Simply, it is not simple.
What I meant, is that probably you should populate children from the driver instead of adding simple-mfd compatible. Once you add simple-mfd, you cannot remove it and children cannot use anything from the parent.
No, I don't think so.
The block controller provides those 10 power domains, those are separate things controlled by separate registers within the block control register space.
Quoted 5 lines
This LDB bridge are two more completely unrelated registers which have nothing to do with those power domains . They are just in the same register block because they had to put those registers somewhere. And they are mixed literally in the middle of the register block, because there was space it seems. Hence the simple-mfd is I think the right thing here.
Was 'simple-mfd' missing or LDB bridge wasn't a child node? I though this was a no functional change patch. Seems more than just update the example.
'simple-mfd' is saying the child has 0 dependence on the parent. IMO, 'syscon' contradicts that, but that's an all to common pattern. You are saying all the clocks (or any other resources) in the parent can be off and the LDB bridge is still functional.
Rob
Quoted 48 lines · Rob Herring
Quoted 41 lines · Marek Vasut
On 6/30/22 21:31, Krzysztof Kozlowski wrote:
Hi,
[...]
Quoted 21 lines
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml properties: · line 21
Quoted 9 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml +1
-0@@ -18,11 +18,18 @@ properties: compatible: items: - const: fsl,imx8mp-media-blk-ctrl + - const: simple-mfdNot really... simple-mfd means devices is really simple and you just use it to instantiate children. However this is not simple - it's a power domain controller with several clocks and power domains as input.
Quoted 6 lines
Quoted 1 line
It's not a simple MFD, but a regular device.
I don't understand this comment. The LDB bridge is literally two registers with a few bits in this media block controller register area. Can you expand on why the simple-mfd is unsuitable and what should it be instead ?
Quoted 7 lines
Looking at the bindings you have there 10 power domains, 10 input clocks and a domain provider. The driver is also not that simple which is another argument that this is not simple-mfd. Simply, it is not simple.
What I meant, is that probably you should populate children from the driver instead of adding simple-mfd compatible. Once you add simple-mfd, you cannot remove it and children cannot use anything from the parent.
No, I don't think so.
The block controller provides those 10 power domains, those are separate things controlled by separate registers within the block control register space.
Quoted 5 lines
This LDB bridge are two more completely unrelated registers which have nothing to do with those power domains . They are just in the same register block because they had to put those registers somewhere. And they are mixed literally in the middle of the register block, because there was space it seems. Hence the simple-mfd is I think the right thing here.
Quoted 3 lines
Was 'simple-mfd' missing or LDB bridge wasn't a child node? I though this was a no functional change patch. Seems more than just update the example.
In the local patch I have to imx8mp.dtsi , the simple-mfd had to be added for the ldb bridge child node to bind.
Quoted 4 lines
'simple-mfd' is saying the child has 0 dependence on the parent. IMO, 'syscon' contradicts that, but that's an all to common pattern. You are saying all the clocks (or any other resources) in the parent can be off and the LDB bridge is still functional.
The bridge itself should work even if the block control is clocked off. The block controller apb (register) clock have to be enabled only when accessing these two LDB registers, which should be handled by runtime PM. Or what am I missing here ?
Quoted 8 lines · Marek Vasut
In the local patch I have to
imx8mp.dtsi, the simple-mfd had to be added for the ldb bridge child node to bind.Quoted 4 lines
'simple-mfd' is saying the child has 0 dependence on the parent. IMO, 'syscon' contradicts that, but that's an all to common pattern. You are saying all the clocks (or any other resources) in the parent can be off and the LDB bridge is still functional.
Quoted 4 lines
The bridge itself should work even if the block control is clocked off. The block controller apb (register) clock have to be enabled only when accessing these two LDB registers, which should be handled by runtime PM. Or what am I missing here ?
If I understand correctly, you need the device's APB clocks to be enabled to use the child device? You have a dependency between child and parent, so it is not a simple-mfd.
Best regards,
Krzysztof
Quoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Marek Vasut
In the local patch I have to
imx8mp.dtsi, the simple-mfd had to be added for the ldb bridge child node to bind.Quoted 4 lines
'simple-mfd' is saying the child has 0 dependence on the parent. IMO, 'syscon' contradicts that, but that's an all to common pattern. You are saying all the clocks (or any other resources) in the parent can be off and the LDB bridge is still functional.
Quoted 8 lines
Quoted 4 lines
The bridge itself should work even if the block control is clocked off. The block controller apb (register) clock have to be enabled only when accessing these two LDB registers, which should be handled by runtime PM. Or what am I missing here ?
If I understand correctly, you need the device's APB clocks to be enabled to use the child device? You have a dependency between child and parent, so it is not a simple-mfd.
OK, then ... what is it ? Some sort of hint would be helpful.
Quoted 15 lines · Marek Vasut
Quoted 14 lines · Krzysztof Kozlowski
Quoted 12 lines · Marek Vasut
In the local patch I have to
imx8mp.dtsi, the simple-mfd had to be added for the ldb bridge child node to bind.Quoted 4 lines
'simple-mfd' is saying the child has 0 dependence on the parent. IMO, 'syscon' contradicts that, but that's an all to common pattern. You are saying all the clocks (or any other resources) in the parent can be off and the LDB bridge is still functional.
The bridge itself should work even if the block control is clocked off. The block controller apb (register) clock have to be enabled only when accessing these two LDB registers, which should be handled by runtime PM. Or what am I missing here ?
Quoted 5 lines
Quoted 3 lines
If I understand correctly, you need the device's APB clocks to be enabled to use the child device? You have a dependency between child and parent, so it is not a simple-mfd.
OK, then ... what is it ? Some sort of hint would be helpful.
I don't have the hardware manual to know what is it exactly. Some device which has its own bindings and fsl,imx8mp-media-blk-ctrl compatible.
You already received hint what should you do with that device.... "What I meant, is that probably you should populate children from the driver instead of adding simple-mfd compatible."
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Rob Herring
maintainerQuoted 13 lines · Marek Vasut
Document the LDB bridge subnode and add the subnode into the example. For the subnode to work, the block control must be compatible with simple-mfd in addition to the existing compatibles.
Signed-off-by Marek Vasut <[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 Rob Herring <[email protected]>
Quoted 4 lines
--- .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.example.dtb: blk-ctl@32ec0000: bridge@5c: 'reg', 'reg-names' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.example.dtb: blk-ctl@32ec0000: bridge@5c: Unevaluated properties are not allowed ('reg', 'reg-names' were unexpected)
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.example.dtb: bridge@5c: 'reg', 'reg-names' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/bridge/fsl,ldb.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit.