* [PATCH 1/3] drm/mxsfb: Add an entry for "fsl,imx8mq-lcdif"
@ 2023-12-11 20:41 ` Fabio Estevam
0 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2023-12-11 20:41 UTC (permalink / raw)
To: marex
Cc: devicetree, conor+dt, Fabio Estevam, kernel, dri-devel, robh+dt,
krzysztof.kozlowski+dt, martink
From: Fabio Estevam <festevam@denx.de>
On i.MX6SX, the LCDIF has an associated power domain.
However, i.MX8MQ does not have an LCDIF power domain.
imx8mq.dtsi has the following compatible string:
compatible = "fsl,imx8mq-lcdif", "fsl,imx6sx-lcdif";
which causes the following dt-schema warning:
imx8mq-evk.dtb: lcd-controller@30320000: 'power-domains' is a required property
from schema $id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
To prevent this problem, add a specific fsl,imx8mq-lcdif entry in
the driver to properly handle such a power-domain requirement difference.
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index b483ef48216a..ac9ce3b45b38 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -340,6 +340,7 @@ static const struct of_device_id mxsfb_dt_ids[] = {
{ .compatible = "fsl,imx23-lcdif", .data = &mxsfb_devdata[MXSFB_V3], },
{ .compatible = "fsl,imx28-lcdif", .data = &mxsfb_devdata[MXSFB_V4], },
{ .compatible = "fsl,imx6sx-lcdif", .data = &mxsfb_devdata[MXSFB_V6], },
+ { .compatible = "fsl,imx8mq-lcdif", .data = &mxsfb_devdata[MXSFB_V6], },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, mxsfb_dt_ids);
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/3] dt-bindings: lcdif: Decouple imx8mq from imx6sx
2023-12-11 20:41 ` Fabio Estevam
@ 2023-12-11 20:41 ` Fabio Estevam
-1 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2023-12-11 20:41 UTC (permalink / raw)
To: marex
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, martink, kernel,
dri-devel, devicetree, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
On i.MX6SX, the LCDIF has an associated power domain.
i.MX8MQ does not have an LCDIF power domain, so allow passing only
"fsl,imx8mq-lcdif" as compatible string to fix the following
dt-schema warning:
imx8mq-evk.dtb: lcd-controller@30320000: 'power-domains' is a required property
from schema $id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Documentation/devicetree/bindings/display/fsl,lcdif.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
index 1c2be8d6f633..8969e56d4c98 100644
--- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
+++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
@@ -20,6 +20,7 @@ properties:
- fsl,imx23-lcdif
- fsl,imx28-lcdif
- fsl,imx6sx-lcdif
+ - fsl,imx8mq-lcdif
- fsl,imx8mp-lcdif
- fsl,imx93-lcdif
- items:
@@ -77,7 +78,9 @@ allOf:
properties:
compatible:
contains:
- const: fsl,imx6sx-lcdif
+ enum:
+ - fsl,imx6sx-lcdif
+ - fsl,imx8mq-lcdif
then:
properties:
clocks:
@@ -113,6 +116,7 @@ allOf:
enum:
- fsl,imx6sx-lcdif
- fsl,imx8mp-lcdif
+ - fsl,imx8mq-lcdif
- fsl,imx93-lcdif
then:
properties:
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/3] dt-bindings: lcdif: Decouple imx8mq from imx6sx
@ 2023-12-11 20:41 ` Fabio Estevam
0 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2023-12-11 20:41 UTC (permalink / raw)
To: marex
Cc: devicetree, conor+dt, Fabio Estevam, kernel, dri-devel, robh+dt,
krzysztof.kozlowski+dt, martink
From: Fabio Estevam <festevam@denx.de>
On i.MX6SX, the LCDIF has an associated power domain.
i.MX8MQ does not have an LCDIF power domain, so allow passing only
"fsl,imx8mq-lcdif" as compatible string to fix the following
dt-schema warning:
imx8mq-evk.dtb: lcd-controller@30320000: 'power-domains' is a required property
from schema $id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Documentation/devicetree/bindings/display/fsl,lcdif.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
index 1c2be8d6f633..8969e56d4c98 100644
--- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
+++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
@@ -20,6 +20,7 @@ properties:
- fsl,imx23-lcdif
- fsl,imx28-lcdif
- fsl,imx6sx-lcdif
+ - fsl,imx8mq-lcdif
- fsl,imx8mp-lcdif
- fsl,imx93-lcdif
- items:
@@ -77,7 +78,9 @@ allOf:
properties:
compatible:
contains:
- const: fsl,imx6sx-lcdif
+ enum:
+ - fsl,imx6sx-lcdif
+ - fsl,imx8mq-lcdif
then:
properties:
clocks:
@@ -113,6 +116,7 @@ allOf:
enum:
- fsl,imx6sx-lcdif
- fsl,imx8mp-lcdif
+ - fsl,imx8mq-lcdif
- fsl,imx93-lcdif
then:
properties:
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 2/3] dt-bindings: lcdif: Decouple imx8mq from imx6sx
2023-12-11 20:41 ` Fabio Estevam
@ 2023-12-12 16:52 ` Conor Dooley
-1 siblings, 0 replies; 11+ messages in thread
From: Conor Dooley @ 2023-12-12 16:52 UTC (permalink / raw)
To: Fabio Estevam
Cc: marex, robh+dt, krzysztof.kozlowski+dt, conor+dt, martink, kernel,
dri-devel, devicetree, Fabio Estevam
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
On Mon, Dec 11, 2023 at 05:41:37PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
>
> On i.MX6SX, the LCDIF has an associated power domain.
>
> i.MX8MQ does not have an LCDIF power domain, so allow passing only
> "fsl,imx8mq-lcdif" as compatible string to fix the following
> dt-schema warning:
>
> imx8mq-evk.dtb: lcd-controller@30320000: 'power-domains' is a required property
> from schema $id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] dt-bindings: lcdif: Decouple imx8mq from imx6sx
@ 2023-12-12 16:52 ` Conor Dooley
0 siblings, 0 replies; 11+ messages in thread
From: Conor Dooley @ 2023-12-12 16:52 UTC (permalink / raw)
To: Fabio Estevam
Cc: marex, devicetree, conor+dt, Fabio Estevam, kernel, dri-devel,
robh+dt, krzysztof.kozlowski+dt, martink
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
On Mon, Dec 11, 2023 at 05:41:37PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
>
> On i.MX6SX, the LCDIF has an associated power domain.
>
> i.MX8MQ does not have an LCDIF power domain, so allow passing only
> "fsl,imx8mq-lcdif" as compatible string to fix the following
> dt-schema warning:
>
> imx8mq-evk.dtb: lcd-controller@30320000: 'power-domains' is a required property
> from schema $id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/3] arm64: dts: imx8mq: Exclude "fsl,imx6sx-lcdif"
2023-12-11 20:41 ` Fabio Estevam
@ 2023-12-11 20:41 ` Fabio Estevam
-1 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2023-12-11 20:41 UTC (permalink / raw)
To: marex
Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, martink, kernel,
dri-devel, devicetree, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
On i.MX6SX, the LCDIF has an associated power domain.
i.MX8MQ does not have an LCDIF power domain, so pass only
"fsl,imx8mq-lcdif" as compatible string to fix the following
dt-schema warning:
imx8mq-evk.dtb: lcd-controller@30320000: 'power-domains' is a required property
from schema $id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index c6dc3ba0d43b..5d8365e4eb26 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -739,7 +739,7 @@ sdma2: dma-controller@302c0000 {
};
lcdif: lcd-controller@30320000 {
- compatible = "fsl,imx8mq-lcdif", "fsl,imx6sx-lcdif";
+ compatible = "fsl,imx8mq-lcdif";
reg = <0x30320000 0x10000>;
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MQ_CLK_LCDIF_PIXEL>,
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 3/3] arm64: dts: imx8mq: Exclude "fsl,imx6sx-lcdif"
@ 2023-12-11 20:41 ` Fabio Estevam
0 siblings, 0 replies; 11+ messages in thread
From: Fabio Estevam @ 2023-12-11 20:41 UTC (permalink / raw)
To: marex
Cc: devicetree, conor+dt, Fabio Estevam, kernel, dri-devel, robh+dt,
krzysztof.kozlowski+dt, martink
From: Fabio Estevam <festevam@denx.de>
On i.MX6SX, the LCDIF has an associated power domain.
i.MX8MQ does not have an LCDIF power domain, so pass only
"fsl,imx8mq-lcdif" as compatible string to fix the following
dt-schema warning:
imx8mq-evk.dtb: lcd-controller@30320000: 'power-domains' is a required property
from schema $id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index c6dc3ba0d43b..5d8365e4eb26 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -739,7 +739,7 @@ sdma2: dma-controller@302c0000 {
};
lcdif: lcd-controller@30320000 {
- compatible = "fsl,imx8mq-lcdif", "fsl,imx6sx-lcdif";
+ compatible = "fsl,imx8mq-lcdif";
reg = <0x30320000 0x10000>;
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MQ_CLK_LCDIF_PIXEL>,
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] drm/mxsfb: Add an entry for "fsl,imx8mq-lcdif"
2023-12-11 20:41 ` Fabio Estevam
` (2 preceding siblings ...)
(?)
@ 2023-12-12 18:19 ` Lucas Stach
2023-12-12 18:28 ` Fabio Estevam
-1 siblings, 1 reply; 11+ messages in thread
From: Lucas Stach @ 2023-12-12 18:19 UTC (permalink / raw)
To: Fabio Estevam, marex
Cc: devicetree, conor+dt, Fabio Estevam, kernel, dri-devel, robh+dt,
krzysztof.kozlowski+dt, martink
Hi Fabio,
Am Montag, dem 11.12.2023 um 17:41 -0300 schrieb Fabio Estevam:
> From: Fabio Estevam <festevam@denx.de>
>
> On i.MX6SX, the LCDIF has an associated power domain.
>
> However, i.MX8MQ does not have an LCDIF power domain.
>
> imx8mq.dtsi has the following compatible string:
>
> compatible = "fsl,imx8mq-lcdif", "fsl,imx6sx-lcdif";
>
> which causes the following dt-schema warning:
>
> imx8mq-evk.dtb: lcd-controller@30320000: 'power-domains' is a required property
> from schema $id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
>
> To prevent this problem, add a specific fsl,imx8mq-lcdif entry in
> the driver to properly handle such a power-domain requirement difference.
>
I don't really like this series. While we don't make any strong
guarantees in this way, it breaks booting older kernels with a new DT.
As this driver patch shows, there are no actual differences in the IP
block between i.MX6SX and i.MX8MQ, it's just the SoC integration that's
different, where in one SoC the controller is located in a power
domain, while it isn't in another.
To me this smells like making changes to parts that don't really care
about those differences. The thing that cares about the difference is
the DT schema validation and I feel like there must be a better way to
describe this in the schema than to patch both driver and DT just to
accommodate a SoC integration difference. Is there a way to make the
power-domain property not dependent on the IP block, but the machine
compatible?
Regards,
Lucas
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> drivers/gpu/drm/mxsfb/mxsfb_drv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> index b483ef48216a..ac9ce3b45b38 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> @@ -340,6 +340,7 @@ static const struct of_device_id mxsfb_dt_ids[] = {
> { .compatible = "fsl,imx23-lcdif", .data = &mxsfb_devdata[MXSFB_V3], },
> { .compatible = "fsl,imx28-lcdif", .data = &mxsfb_devdata[MXSFB_V4], },
> { .compatible = "fsl,imx6sx-lcdif", .data = &mxsfb_devdata[MXSFB_V6], },
> + { .compatible = "fsl,imx8mq-lcdif", .data = &mxsfb_devdata[MXSFB_V6], },
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, mxsfb_dt_ids);
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 1/3] drm/mxsfb: Add an entry for "fsl,imx8mq-lcdif"
2023-12-12 18:19 ` [PATCH 1/3] drm/mxsfb: Add an entry for "fsl,imx8mq-lcdif" Lucas Stach
@ 2023-12-12 18:28 ` Fabio Estevam
2023-12-13 9:02 ` Lucas Stach
0 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2023-12-12 18:28 UTC (permalink / raw)
To: Lucas Stach
Cc: marex, devicetree, conor+dt, Fabio Estevam, kernel, dri-devel,
robh+dt, krzysztof.kozlowski+dt, martink
Hi Lucas,
On Tue, Dec 12, 2023 at 3:19 PM Lucas Stach <l.stach@pengutronix.de> wrote:
> I don't really like this series. While we don't make any strong
> guarantees in this way, it breaks booting older kernels with a new DT.
I thought we needed only to guarantee that old DTs still run with
newer kernels, not the other way around.
> As this driver patch shows, there are no actual differences in the IP
> block between i.MX6SX and i.MX8MQ, it's just the SoC integration that's
> different, where in one SoC the controller is located in a power
> domain, while it isn't in another.
>
> To me this smells like making changes to parts that don't really care
> about those differences. The thing that cares about the difference is
> the DT schema validation and I feel like there must be a better way to
> describe this in the schema than to patch both driver and DT just to
> accommodate a SoC integration difference. Is there a way to make the
> power-domain property not dependent on the IP block, but the machine
> compatible?
Yes, this series is all about making dt-schema validation happy.
If there is a better alternative, I am all ears.
Rob, Krzysztof, Conor
Any suggestions?
Thanks
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] drm/mxsfb: Add an entry for "fsl,imx8mq-lcdif"
2023-12-12 18:28 ` Fabio Estevam
@ 2023-12-13 9:02 ` Lucas Stach
0 siblings, 0 replies; 11+ messages in thread
From: Lucas Stach @ 2023-12-13 9:02 UTC (permalink / raw)
To: Fabio Estevam
Cc: marex, devicetree, conor+dt, Fabio Estevam, kernel, dri-devel,
robh+dt, krzysztof.kozlowski+dt, martink
Hi Fabio,
Am Dienstag, dem 12.12.2023 um 15:28 -0300 schrieb Fabio Estevam:
> Hi Lucas,
>
> On Tue, Dec 12, 2023 at 3:19 PM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> > I don't really like this series. While we don't make any strong
> > guarantees in this way, it breaks booting older kernels with a new DT.
>
> I thought we needed only to guarantee that old DTs still run with
> newer kernels, not the other way around.
>
That's right. At least in the i.MX world we never made a strong
guarantee in that way.
Still we should not break it deliberately if there isn't a good reason
to do so. And I _feel_ that "DT schema isn't able to express the SoC
integration" isn't a good enough reason to break things.
But maybe there is a way to describe this in the DT schema, that we
aren't aware of yet. I'm not quite up-to-date with all the DT schema
stuff...
Regards,
Lucas
^ permalink raw reply [flat|nested] 11+ messages in thread