All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/7] imx: blk-ctrl: Add interconnect for i.MX8MP
@ 2022-07-03  9:14 ` Peng Fan (OSS)
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

V3:
 Move adding NoC node patch to i.MX8MP ICC driver patchset
 Per Lucas's comments, warn once when icc bulk get not return probe defer and continue.

V2:
 Use a low bandwidth value instead INT_MAX
 Minor fix to move fsl,imx8mp.h out to dts patch, not driver patch
 Add A-b tag from DT maintainer

i.MX8MP NoC settings is invalid after related power domain up. So
need to set valid values after power domain up.

This patchset is to bind interconnect for each entry in blk ctrl.

This patchset is not include DVFS DDRC feature.

A repo created here: https://github.com/MrVan/linux/tree/imx8mp-interconnect

Peng Fan (7):
  dt-bindings: soc: imx: add interconnect property for i.MX8MP media blk
    ctrl
  dt-bindings: soc: imx: add interconnect property for i.MX8MP hdmi blk
    ctrl
  dt-bindings: soc: imx: add interconnect property for i.MX8MP hsio blk
    ctrl
  soc: imx: add icc paths for i.MX8MP media blk ctrl
  soc: imx: add icc paths for i.MX8MP hsio/hdmi blk ctrl
  arm64: dts: imx8mp: add interconnects for media blk ctrl
  arm64: dts: imx8mp: add interconnect for hsio blk ctrl

 .../soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml     |  9 +++++
 .../soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml     | 10 +++++
 .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml    | 14 +++++++
 arch/arm64/boot/dts/freescale/imx8mp.dtsi     | 17 ++++++++
 drivers/soc/imx/imx8m-blk-ctrl.c              | 39 +++++++++++++++++++
 drivers/soc/imx/imx8mp-blk-ctrl.c             | 35 +++++++++++++++++
 6 files changed, 124 insertions(+)

-- 
2.25.1


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

* [PATCH V3 0/7] imx: blk-ctrl: Add interconnect for i.MX8MP
@ 2022-07-03  9:14 ` Peng Fan (OSS)
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

V3:
 Move adding NoC node patch to i.MX8MP ICC driver patchset
 Per Lucas's comments, warn once when icc bulk get not return probe defer and continue.

V2:
 Use a low bandwidth value instead INT_MAX
 Minor fix to move fsl,imx8mp.h out to dts patch, not driver patch
 Add A-b tag from DT maintainer

i.MX8MP NoC settings is invalid after related power domain up. So
need to set valid values after power domain up.

This patchset is to bind interconnect for each entry in blk ctrl.

This patchset is not include DVFS DDRC feature.

A repo created here: https://github.com/MrVan/linux/tree/imx8mp-interconnect

Peng Fan (7):
  dt-bindings: soc: imx: add interconnect property for i.MX8MP media blk
    ctrl
  dt-bindings: soc: imx: add interconnect property for i.MX8MP hdmi blk
    ctrl
  dt-bindings: soc: imx: add interconnect property for i.MX8MP hsio blk
    ctrl
  soc: imx: add icc paths for i.MX8MP media blk ctrl
  soc: imx: add icc paths for i.MX8MP hsio/hdmi blk ctrl
  arm64: dts: imx8mp: add interconnects for media blk ctrl
  arm64: dts: imx8mp: add interconnect for hsio blk ctrl

 .../soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml     |  9 +++++
 .../soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml     | 10 +++++
 .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml    | 14 +++++++
 arch/arm64/boot/dts/freescale/imx8mp.dtsi     | 17 ++++++++
 drivers/soc/imx/imx8m-blk-ctrl.c              | 39 +++++++++++++++++++
 drivers/soc/imx/imx8mp-blk-ctrl.c             | 35 +++++++++++++++++
 6 files changed, 124 insertions(+)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V3 1/7] dt-bindings: soc: imx: add interconnect property for i.MX8MP media blk ctrl
  2022-07-03  9:14 ` Peng Fan (OSS)
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  -1 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan, Krzysztof Kozlowski

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for i.MX8MP mediamix blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml         | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
index b246d8386ba4..dadb6108e321 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
@@ -64,6 +64,20 @@ properties:
       - const: isp
       - const: phy
 
+  interconnects:
+    maxItems: 8
+
+  interconnect-names:
+    items:
+      - const: lcdif-rd
+      - const: lcdif-wr
+      - const: isi0
+      - const: isi1
+      - const: isi2
+      - const: isp0
+      - const: isp1
+      - const: dwe
+
 required:
   - compatible
   - reg
-- 
2.25.1


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

* [PATCH V3 1/7] dt-bindings: soc: imx: add interconnect property for i.MX8MP media blk ctrl
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan, Krzysztof Kozlowski

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for i.MX8MP mediamix blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../soc/imx/fsl,imx8mp-media-blk-ctrl.yaml         | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
index b246d8386ba4..dadb6108e321 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-media-blk-ctrl.yaml
@@ -64,6 +64,20 @@ properties:
       - const: isp
       - const: phy
 
+  interconnects:
+    maxItems: 8
+
+  interconnect-names:
+    items:
+      - const: lcdif-rd
+      - const: lcdif-wr
+      - const: isi0
+      - const: isi1
+      - const: isi2
+      - const: isp0
+      - const: isp1
+      - const: dwe
+
 required:
   - compatible
   - reg
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V3 2/7] dt-bindings: soc: imx: add interconnect property for i.MX8MP hdmi blk ctrl
  2022-07-03  9:14 ` Peng Fan (OSS)
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  -1 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan, Krzysztof Kozlowski

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for i.MX8MP hdmi blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml       | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml
index 563e1d0e327f..1be4ce2a45e8 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml
@@ -52,6 +52,15 @@ properties:
       - const: ref_266m
       - const: ref_24m
 
+  interconnects:
+    maxItems: 3
+
+  interconnect-names:
+    items:
+      - const: hrv
+      - const: lcdif-hdmi
+      - const: hdcp
+
 required:
   - compatible
   - reg
-- 
2.25.1


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

* [PATCH V3 2/7] dt-bindings: soc: imx: add interconnect property for i.MX8MP hdmi blk ctrl
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan, Krzysztof Kozlowski

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for i.MX8MP hdmi blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml       | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml
index 563e1d0e327f..1be4ce2a45e8 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml
@@ -52,6 +52,15 @@ properties:
       - const: ref_266m
       - const: ref_24m
 
+  interconnects:
+    maxItems: 3
+
+  interconnect-names:
+    items:
+      - const: hrv
+      - const: lcdif-hdmi
+      - const: hdcp
+
 required:
   - compatible
   - reg
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V3 3/7] dt-bindings: soc: imx: add interconnect property for i.MX8MP hsio blk ctrl
  2022-07-03  9:14 ` Peng Fan (OSS)
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  -1 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan, Krzysztof Kozlowski

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for i.MX8MP hsio blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml     | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml
index c1e29d94f40e..c29181a9745b 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml
@@ -48,6 +48,16 @@ properties:
       - const: usb
       - const: pcie
 
+  interconnects:
+    maxItems: 4
+
+  interconnect-names:
+    items:
+      - const: noc-pcie
+      - const: usb1
+      - const: usb2
+      - const: pcie
+
 required:
   - compatible
   - reg
-- 
2.25.1


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

* [PATCH V3 3/7] dt-bindings: soc: imx: add interconnect property for i.MX8MP hsio blk ctrl
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan, Krzysztof Kozlowski

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for i.MX8MP hsio blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml     | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml
index c1e29d94f40e..c29181a9745b 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hsio-blk-ctrl.yaml
@@ -48,6 +48,16 @@ properties:
       - const: usb
       - const: pcie
 
+  interconnects:
+    maxItems: 4
+
+  interconnect-names:
+    items:
+      - const: noc-pcie
+      - const: usb1
+      - const: usb2
+      - const: pcie
+
 required:
   - compatible
   - reg
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V3 4/7] soc: imx: add icc paths for i.MX8MP media blk ctrl
  2022-07-03  9:14 ` Peng Fan (OSS)
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  -1 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add interconnect paths for i.MX8MP media blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/soc/imx/imx8m-blk-ctrl.c | 39 ++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index dff7529268e4..9b0f81dc292b 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -5,6 +5,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/interconnect.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
@@ -37,6 +38,8 @@ struct imx8m_blk_ctrl_domain_data {
 	const char *name;
 	const char * const *clk_names;
 	int num_clks;
+	const char * const *path_names;
+	int num_paths;
 	const char *gpc_name;
 	u32 rst_mask;
 	u32 clk_mask;
@@ -52,13 +55,16 @@ struct imx8m_blk_ctrl_domain_data {
 };
 
 #define DOMAIN_MAX_CLKS 4
+#define DOMAIN_MAX_PATHS 4
 
 struct imx8m_blk_ctrl_domain {
 	struct generic_pm_domain genpd;
 	const struct imx8m_blk_ctrl_domain_data *data;
 	struct clk_bulk_data clks[DOMAIN_MAX_CLKS];
+	struct icc_bulk_data paths[DOMAIN_MAX_PATHS];
 	struct device *power_dev;
 	struct imx8m_blk_ctrl *bc;
+	int num_paths;
 };
 
 struct imx8m_blk_ctrl_data {
@@ -117,6 +123,10 @@ static int imx8m_blk_ctrl_power_on(struct generic_pm_domain *genpd)
 	if (data->mipi_phy_rst_mask)
 		regmap_set_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_phy_rst_mask);
 
+	ret = icc_bulk_set_bw(domain->num_paths, domain->paths);
+	if (ret)
+		dev_err(bc->dev, "failed to set icc bw\n");
+
 	/* disable upstream clocks */
 	clk_bulk_disable_unprepare(data->num_clks, domain->clks);
 
@@ -224,10 +234,29 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
 		int j;
 
 		domain->data = data;
+		domain->num_paths = data->num_paths;
 
 		for (j = 0; j < data->num_clks; j++)
 			domain->clks[j].id = data->clk_names[j];
 
+		for (j = 0; j < data->num_paths; j++) {
+			domain->paths[j].name = data->path_names[j];
+			/* Fake value for now, just let ICC could configure NoC mode/priority */
+			domain->paths[j].avg_bw = 1;
+			domain->paths[j].peak_bw = 1;
+		}
+
+		ret = devm_of_icc_bulk_get(dev, data->num_paths, domain->paths);
+		if (ret) {
+			if (ret != -EPROBE_DEFER) {
+				dev_warn_once(dev, "Could not get interconnect paths, NoC will stay unconfigured!\n");
+				domain->num_paths = 0;
+			} else {
+				dev_err_probe(dev, ret, "failed to get noc entries\n");
+				goto cleanup_pds;
+			}
+		}
+
 		ret = devm_clk_bulk_get(dev, data->num_clks, domain->clks);
 		if (ret) {
 			dev_err_probe(dev, ret, "failed to get clock\n");
@@ -650,6 +679,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "lcdif1",
 		.rst_mask = BIT(4) | BIT(5) | BIT(23),
 		.clk_mask = BIT(4) | BIT(5) | BIT(23),
+		.path_names = (const char *[]){"lcdif-rd", "lcdif-wr"},
+		.num_paths = 2,
 	},
 	[IMX8MP_MEDIABLK_PD_ISI] = {
 		.name = "mediablk-isi",
@@ -658,6 +689,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "isi",
 		.rst_mask = BIT(6) | BIT(7),
 		.clk_mask = BIT(6) | BIT(7),
+		.path_names = (const char *[]){"isi0", "isi1", "isi2"},
+		.num_paths = 3,
 	},
 	[IMX8MP_MEDIABLK_PD_MIPI_CSI2_2] = {
 		.name = "mediablk-mipi-csi2-2",
@@ -675,6 +708,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "lcdif2",
 		.rst_mask = BIT(11) | BIT(12) | BIT(24),
 		.clk_mask = BIT(11) | BIT(12) | BIT(24),
+		.path_names = (const char *[]){"lcdif-rd", "lcdif-wr"},
+		.num_paths = 2,
 	},
 	[IMX8MP_MEDIABLK_PD_ISP] = {
 		.name = "mediablk-isp",
@@ -683,6 +718,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "isp",
 		.rst_mask = BIT(16) | BIT(17) | BIT(18),
 		.clk_mask = BIT(16) | BIT(17) | BIT(18),
+		.path_names = (const char *[]){"isp0", "isp1"},
+		.num_paths = 2,
 	},
 	[IMX8MP_MEDIABLK_PD_DWE] = {
 		.name = "mediablk-dwe",
@@ -691,6 +728,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "dwe",
 		.rst_mask = BIT(19) | BIT(20) | BIT(21),
 		.clk_mask = BIT(19) | BIT(20) | BIT(21),
+		.path_names = (const char *[]){"dwe"},
+		.num_paths = 1,
 	},
 	[IMX8MP_MEDIABLK_PD_MIPI_DSI_2] = {
 		.name = "mediablk-mipi-dsi-2",
-- 
2.25.1


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

* [PATCH V3 4/7] soc: imx: add icc paths for i.MX8MP media blk ctrl
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add interconnect paths for i.MX8MP media blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/soc/imx/imx8m-blk-ctrl.c | 39 ++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index dff7529268e4..9b0f81dc292b 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -5,6 +5,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/interconnect.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
@@ -37,6 +38,8 @@ struct imx8m_blk_ctrl_domain_data {
 	const char *name;
 	const char * const *clk_names;
 	int num_clks;
+	const char * const *path_names;
+	int num_paths;
 	const char *gpc_name;
 	u32 rst_mask;
 	u32 clk_mask;
@@ -52,13 +55,16 @@ struct imx8m_blk_ctrl_domain_data {
 };
 
 #define DOMAIN_MAX_CLKS 4
+#define DOMAIN_MAX_PATHS 4
 
 struct imx8m_blk_ctrl_domain {
 	struct generic_pm_domain genpd;
 	const struct imx8m_blk_ctrl_domain_data *data;
 	struct clk_bulk_data clks[DOMAIN_MAX_CLKS];
+	struct icc_bulk_data paths[DOMAIN_MAX_PATHS];
 	struct device *power_dev;
 	struct imx8m_blk_ctrl *bc;
+	int num_paths;
 };
 
 struct imx8m_blk_ctrl_data {
@@ -117,6 +123,10 @@ static int imx8m_blk_ctrl_power_on(struct generic_pm_domain *genpd)
 	if (data->mipi_phy_rst_mask)
 		regmap_set_bits(bc->regmap, BLK_MIPI_RESET_DIV, data->mipi_phy_rst_mask);
 
+	ret = icc_bulk_set_bw(domain->num_paths, domain->paths);
+	if (ret)
+		dev_err(bc->dev, "failed to set icc bw\n");
+
 	/* disable upstream clocks */
 	clk_bulk_disable_unprepare(data->num_clks, domain->clks);
 
@@ -224,10 +234,29 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
 		int j;
 
 		domain->data = data;
+		domain->num_paths = data->num_paths;
 
 		for (j = 0; j < data->num_clks; j++)
 			domain->clks[j].id = data->clk_names[j];
 
+		for (j = 0; j < data->num_paths; j++) {
+			domain->paths[j].name = data->path_names[j];
+			/* Fake value for now, just let ICC could configure NoC mode/priority */
+			domain->paths[j].avg_bw = 1;
+			domain->paths[j].peak_bw = 1;
+		}
+
+		ret = devm_of_icc_bulk_get(dev, data->num_paths, domain->paths);
+		if (ret) {
+			if (ret != -EPROBE_DEFER) {
+				dev_warn_once(dev, "Could not get interconnect paths, NoC will stay unconfigured!\n");
+				domain->num_paths = 0;
+			} else {
+				dev_err_probe(dev, ret, "failed to get noc entries\n");
+				goto cleanup_pds;
+			}
+		}
+
 		ret = devm_clk_bulk_get(dev, data->num_clks, domain->clks);
 		if (ret) {
 			dev_err_probe(dev, ret, "failed to get clock\n");
@@ -650,6 +679,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "lcdif1",
 		.rst_mask = BIT(4) | BIT(5) | BIT(23),
 		.clk_mask = BIT(4) | BIT(5) | BIT(23),
+		.path_names = (const char *[]){"lcdif-rd", "lcdif-wr"},
+		.num_paths = 2,
 	},
 	[IMX8MP_MEDIABLK_PD_ISI] = {
 		.name = "mediablk-isi",
@@ -658,6 +689,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "isi",
 		.rst_mask = BIT(6) | BIT(7),
 		.clk_mask = BIT(6) | BIT(7),
+		.path_names = (const char *[]){"isi0", "isi1", "isi2"},
+		.num_paths = 3,
 	},
 	[IMX8MP_MEDIABLK_PD_MIPI_CSI2_2] = {
 		.name = "mediablk-mipi-csi2-2",
@@ -675,6 +708,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "lcdif2",
 		.rst_mask = BIT(11) | BIT(12) | BIT(24),
 		.clk_mask = BIT(11) | BIT(12) | BIT(24),
+		.path_names = (const char *[]){"lcdif-rd", "lcdif-wr"},
+		.num_paths = 2,
 	},
 	[IMX8MP_MEDIABLK_PD_ISP] = {
 		.name = "mediablk-isp",
@@ -683,6 +718,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "isp",
 		.rst_mask = BIT(16) | BIT(17) | BIT(18),
 		.clk_mask = BIT(16) | BIT(17) | BIT(18),
+		.path_names = (const char *[]){"isp0", "isp1"},
+		.num_paths = 2,
 	},
 	[IMX8MP_MEDIABLK_PD_DWE] = {
 		.name = "mediablk-dwe",
@@ -691,6 +728,8 @@ static const struct imx8m_blk_ctrl_domain_data imx8mp_media_blk_ctl_domain_data[
 		.gpc_name = "dwe",
 		.rst_mask = BIT(19) | BIT(20) | BIT(21),
 		.clk_mask = BIT(19) | BIT(20) | BIT(21),
+		.path_names = (const char *[]){"dwe"},
+		.num_paths = 1,
 	},
 	[IMX8MP_MEDIABLK_PD_MIPI_DSI_2] = {
 		.name = "mediablk-mipi-dsi-2",
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V3 5/7] soc: imx: add icc paths for i.MX8MP hsio/hdmi blk ctrl
  2022-07-03  9:14 ` Peng Fan (OSS)
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  -1 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add interconnect paths for i.MX8MP hsio/hdmi blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/soc/imx/imx8mp-blk-ctrl.c | 35 +++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
index 4ca2ede6871b..6f983adcb47c 100644
--- a/drivers/soc/imx/imx8mp-blk-ctrl.c
+++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
@@ -6,6 +6,7 @@
 
 #include <linux/clk.h>
 #include <linux/device.h>
+#include <linux/interconnect.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
@@ -36,17 +37,22 @@ struct imx8mp_blk_ctrl_domain_data {
 	const char *name;
 	const char * const *clk_names;
 	int num_clks;
+	const char * const *path_names;
+	int num_paths;
 	const char *gpc_name;
 };
 
 #define DOMAIN_MAX_CLKS 2
+#define DOMAIN_MAX_PATHS 3
 
 struct imx8mp_blk_ctrl_domain {
 	struct generic_pm_domain genpd;
 	const struct imx8mp_blk_ctrl_domain_data *data;
 	struct clk_bulk_data clks[DOMAIN_MAX_CLKS];
+	struct icc_bulk_data paths[DOMAIN_MAX_PATHS];
 	struct device *power_dev;
 	struct imx8mp_blk_ctrl *bc;
+	int num_paths;
 	int id;
 };
 
@@ -144,6 +150,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hsio_domain_data[] = {
 		.clk_names = (const char *[]){ "usb" },
 		.num_clks = 1,
 		.gpc_name = "usb",
+		.path_names = (const char *[]){"usb1", "usb2"},
+		.num_paths = 2,
 	},
 	[IMX8MP_HSIOBLK_PD_USB_PHY1] = {
 		.name = "hsioblk-usb-phy1",
@@ -158,6 +166,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hsio_domain_data[] = {
 		.clk_names = (const char *[]){ "pcie" },
 		.num_clks = 1,
 		.gpc_name = "pcie",
+		.path_names = (const char *[]){"noc-pcie", "pcie"},
+		.num_paths = 2,
 	},
 	[IMX8MP_HSIOBLK_PD_PCIE_PHY] = {
 		.name = "hsioblk-pcie-phy",
@@ -322,6 +332,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = {
 		.clk_names = (const char *[]){ "axi", "apb" },
 		.num_clks = 2,
 		.gpc_name = "lcdif",
+		.path_names = (const char *[]){"lcdif-hdmi"},
+		.num_paths = 1,
 	},
 	[IMX8MP_HDMIBLK_PD_PAI] = {
 		.name = "hdmiblk-pai",
@@ -395,6 +407,10 @@ static int imx8mp_blk_ctrl_power_on(struct generic_pm_domain *genpd)
 		goto clk_disable;
 	}
 
+	ret = icc_bulk_set_bw(domain->num_paths, domain->paths);
+	if (ret)
+		dev_err(bc->dev, "failed to set icc bw\n");
+
 	clk_bulk_disable_unprepare(data->num_clks, domain->clks);
 
 	return 0;
@@ -510,10 +526,29 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
 		int j;
 
 		domain->data = data;
+		domain->num_paths = data->num_paths;
 
 		for (j = 0; j < data->num_clks; j++)
 			domain->clks[j].id = data->clk_names[j];
 
+		for (j = 0; j < data->num_paths; j++) {
+			domain->paths[j].name = data->path_names[j];
+			/* Fake value for now, just let ICC could configure NoC mode/priority */
+			domain->paths[j].avg_bw = 1;
+			domain->paths[j].peak_bw = 1;
+		}
+
+		ret = devm_of_icc_bulk_get(dev, data->num_paths, domain->paths);
+		if (ret) {
+			if (ret != -EPROBE_DEFER) {
+				dev_warn_once(dev, "Could not get interconnect paths, NoC will stay unconfigured!\n");
+				domain->num_paths = 0;
+			} else {
+				dev_err_probe(dev, ret, "failed to get noc entries\n");
+				goto cleanup_pds;
+			}
+		}
+
 		ret = devm_clk_bulk_get(dev, data->num_clks, domain->clks);
 		if (ret) {
 			dev_err_probe(dev, ret, "failed to get clock\n");
-- 
2.25.1


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

* [PATCH V3 5/7] soc: imx: add icc paths for i.MX8MP hsio/hdmi blk ctrl
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add interconnect paths for i.MX8MP hsio/hdmi blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/soc/imx/imx8mp-blk-ctrl.c | 35 +++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
index 4ca2ede6871b..6f983adcb47c 100644
--- a/drivers/soc/imx/imx8mp-blk-ctrl.c
+++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
@@ -6,6 +6,7 @@
 
 #include <linux/clk.h>
 #include <linux/device.h>
+#include <linux/interconnect.h>
 #include <linux/module.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
@@ -36,17 +37,22 @@ struct imx8mp_blk_ctrl_domain_data {
 	const char *name;
 	const char * const *clk_names;
 	int num_clks;
+	const char * const *path_names;
+	int num_paths;
 	const char *gpc_name;
 };
 
 #define DOMAIN_MAX_CLKS 2
+#define DOMAIN_MAX_PATHS 3
 
 struct imx8mp_blk_ctrl_domain {
 	struct generic_pm_domain genpd;
 	const struct imx8mp_blk_ctrl_domain_data *data;
 	struct clk_bulk_data clks[DOMAIN_MAX_CLKS];
+	struct icc_bulk_data paths[DOMAIN_MAX_PATHS];
 	struct device *power_dev;
 	struct imx8mp_blk_ctrl *bc;
+	int num_paths;
 	int id;
 };
 
@@ -144,6 +150,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hsio_domain_data[] = {
 		.clk_names = (const char *[]){ "usb" },
 		.num_clks = 1,
 		.gpc_name = "usb",
+		.path_names = (const char *[]){"usb1", "usb2"},
+		.num_paths = 2,
 	},
 	[IMX8MP_HSIOBLK_PD_USB_PHY1] = {
 		.name = "hsioblk-usb-phy1",
@@ -158,6 +166,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hsio_domain_data[] = {
 		.clk_names = (const char *[]){ "pcie" },
 		.num_clks = 1,
 		.gpc_name = "pcie",
+		.path_names = (const char *[]){"noc-pcie", "pcie"},
+		.num_paths = 2,
 	},
 	[IMX8MP_HSIOBLK_PD_PCIE_PHY] = {
 		.name = "hsioblk-pcie-phy",
@@ -322,6 +332,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = {
 		.clk_names = (const char *[]){ "axi", "apb" },
 		.num_clks = 2,
 		.gpc_name = "lcdif",
+		.path_names = (const char *[]){"lcdif-hdmi"},
+		.num_paths = 1,
 	},
 	[IMX8MP_HDMIBLK_PD_PAI] = {
 		.name = "hdmiblk-pai",
@@ -395,6 +407,10 @@ static int imx8mp_blk_ctrl_power_on(struct generic_pm_domain *genpd)
 		goto clk_disable;
 	}
 
+	ret = icc_bulk_set_bw(domain->num_paths, domain->paths);
+	if (ret)
+		dev_err(bc->dev, "failed to set icc bw\n");
+
 	clk_bulk_disable_unprepare(data->num_clks, domain->clks);
 
 	return 0;
@@ -510,10 +526,29 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
 		int j;
 
 		domain->data = data;
+		domain->num_paths = data->num_paths;
 
 		for (j = 0; j < data->num_clks; j++)
 			domain->clks[j].id = data->clk_names[j];
 
+		for (j = 0; j < data->num_paths; j++) {
+			domain->paths[j].name = data->path_names[j];
+			/* Fake value for now, just let ICC could configure NoC mode/priority */
+			domain->paths[j].avg_bw = 1;
+			domain->paths[j].peak_bw = 1;
+		}
+
+		ret = devm_of_icc_bulk_get(dev, data->num_paths, domain->paths);
+		if (ret) {
+			if (ret != -EPROBE_DEFER) {
+				dev_warn_once(dev, "Could not get interconnect paths, NoC will stay unconfigured!\n");
+				domain->num_paths = 0;
+			} else {
+				dev_err_probe(dev, ret, "failed to get noc entries\n");
+				goto cleanup_pds;
+			}
+		}
+
 		ret = devm_clk_bulk_get(dev, data->num_clks, domain->clks);
 		if (ret) {
 			dev_err_probe(dev, ret, "failed to get clock\n");
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V3 6/7] arm64: dts: imx8mp: add interconnects for media blk ctrl
  2022-07-03  9:14 ` Peng Fan (OSS)
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  -1 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for media blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 13a2ee77d3c6..08bd57742294 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1066,6 +1066,18 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
 						     "lcdif1", "isi", "mipi-csi2",
 						     "lcdif2", "isp", "dwe",
 						     "mipi-dsi2";
+				interconnects =
+					<&noc IMX8MP_ICM_LCDIF_RD &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_LCDIF_WR &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISI0 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISI1 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISI2 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISP0 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISP1 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_DWE &noc IMX8MP_ICN_MEDIA>;
+				interconnect-names = "lcdif-rd", "lcdif-wr", "isi0",
+						     "isi1", "isi2", "isp0", "isp1",
+						     "dwe";
 				clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>,
 					 <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
 					 <&clk IMX8MP_CLK_MEDIA_CAM1_PIX_ROOT>,
-- 
2.25.1


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

* [PATCH V3 6/7] arm64: dts: imx8mp: add interconnects for media blk ctrl
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for media blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 13a2ee77d3c6..08bd57742294 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1066,6 +1066,18 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
 						     "lcdif1", "isi", "mipi-csi2",
 						     "lcdif2", "isp", "dwe",
 						     "mipi-dsi2";
+				interconnects =
+					<&noc IMX8MP_ICM_LCDIF_RD &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_LCDIF_WR &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISI0 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISI1 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISI2 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISP0 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_ISP1 &noc IMX8MP_ICN_MEDIA>,
+					<&noc IMX8MP_ICM_DWE &noc IMX8MP_ICN_MEDIA>;
+				interconnect-names = "lcdif-rd", "lcdif-wr", "isi0",
+						     "isi1", "isi2", "isp0", "isp1",
+						     "dwe";
 				clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>,
 					 <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
 					 <&clk IMX8MP_CLK_MEDIA_CAM1_PIX_ROOT>,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2022-07-03  9:14 ` Peng Fan (OSS)
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  -1 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for hsio blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 08bd57742294..9cceeeeb26be 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1109,6 +1109,11 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
 						<&pgc_hsiomix>, <&pgc_pcie_phy>;
 				power-domain-names = "bus", "usb", "usb-phy1",
 						     "usb-phy2", "pcie", "pcie-phy";
+				interconnects = <&noc IMX8MP_ICM_NOC_PCIE &noc IMX8MP_ICN_HSIO>,
+						<&noc IMX8MP_ICM_USB1 &noc IMX8MP_ICN_HSIO>,
+						<&noc IMX8MP_ICM_USB2 &noc IMX8MP_ICN_HSIO>,
+						<&noc IMX8MP_ICM_PCIE &noc IMX8MP_ICN_HSIO>;
+				interconnect-names = "noc-pcie", "usb1", "usb2", "pcie";
 				#power-domain-cells = <1>;
 			};
 		};
-- 
2.25.1


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

* [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2022-07-03  9:14   ` Peng Fan (OSS)
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan (OSS) @ 2022-07-03  9:14 UTC (permalink / raw)
  To: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173
  Cc: kernel, linux-pm, devicetree, linux-arm-kernel, linux-kernel,
	linux-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

Add interconnect property for hsio blk ctrl

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 08bd57742294..9cceeeeb26be 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1109,6 +1109,11 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
 						<&pgc_hsiomix>, <&pgc_pcie_phy>;
 				power-domain-names = "bus", "usb", "usb-phy1",
 						     "usb-phy2", "pcie", "pcie-phy";
+				interconnects = <&noc IMX8MP_ICM_NOC_PCIE &noc IMX8MP_ICN_HSIO>,
+						<&noc IMX8MP_ICM_USB1 &noc IMX8MP_ICN_HSIO>,
+						<&noc IMX8MP_ICM_USB2 &noc IMX8MP_ICN_HSIO>,
+						<&noc IMX8MP_ICM_PCIE &noc IMX8MP_ICN_HSIO>;
+				interconnect-names = "noc-pcie", "usb1", "usb2", "pcie";
 				#power-domain-cells = <1>;
 			};
 		};
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 6/7] arm64: dts: imx8mp: add interconnects for media blk ctrl
  2022-07-03  9:14   ` Peng Fan (OSS)
@ 2022-07-07 11:38     ` Marco Felsch
  -1 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2022-07-07 11:38 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173,
	devicetree, Peng Fan, linux-pm, linux-kernel, linux-imx, kernel,
	linux-arm-kernel

Hi,

thanks for your patch and the work on this.

On 22-07-03, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add interconnect property for media blk ctrl
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index 13a2ee77d3c6..08bd57742294 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi

Can you please add:

#include <dt-bindings/interconnect/fsl,imx8mp.h>

else this won't compile.

Regards,
  Marco

> @@ -1066,6 +1066,18 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
>  						     "lcdif1", "isi", "mipi-csi2",
>  						     "lcdif2", "isp", "dwe",
>  						     "mipi-dsi2";
> +				interconnects =
> +					<&noc IMX8MP_ICM_LCDIF_RD &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_LCDIF_WR &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISI0 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISI1 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISI2 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISP0 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISP1 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_DWE &noc IMX8MP_ICN_MEDIA>;
> +				interconnect-names = "lcdif-rd", "lcdif-wr", "isi0",
> +						     "isi1", "isi2", "isp0", "isp1",
> +						     "dwe";
>  				clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>,
>  					 <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
>  					 <&clk IMX8MP_CLK_MEDIA_CAM1_PIX_ROOT>,
> -- 
> 2.25.1
> 
> 
> 

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

* Re: [PATCH V3 6/7] arm64: dts: imx8mp: add interconnects for media blk ctrl
@ 2022-07-07 11:38     ` Marco Felsch
  0 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2022-07-07 11:38 UTC (permalink / raw)
  To: Peng Fan (OSS)
  Cc: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173,
	devicetree, Peng Fan, linux-pm, linux-kernel, linux-imx, kernel,
	linux-arm-kernel

Hi,

thanks for your patch and the work on this.

On 22-07-03, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add interconnect property for media blk ctrl
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index 13a2ee77d3c6..08bd57742294 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi

Can you please add:

#include <dt-bindings/interconnect/fsl,imx8mp.h>

else this won't compile.

Regards,
  Marco

> @@ -1066,6 +1066,18 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
>  						     "lcdif1", "isi", "mipi-csi2",
>  						     "lcdif2", "isp", "dwe",
>  						     "mipi-dsi2";
> +				interconnects =
> +					<&noc IMX8MP_ICM_LCDIF_RD &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_LCDIF_WR &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISI0 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISI1 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISI2 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISP0 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_ISP1 &noc IMX8MP_ICN_MEDIA>,
> +					<&noc IMX8MP_ICM_DWE &noc IMX8MP_ICN_MEDIA>;
> +				interconnect-names = "lcdif-rd", "lcdif-wr", "isi0",
> +						     "isi1", "isi2", "isp0", "isp1",
> +						     "dwe";
>  				clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>,
>  					 <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
>  					 <&clk IMX8MP_CLK_MEDIA_CAM1_PIX_ROOT>,
> -- 
> 2.25.1
> 
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 6/7] arm64: dts: imx8mp: add interconnects for media blk ctrl
  2022-07-07 11:38     ` Marco Felsch
@ 2022-07-08  0:06       ` Peng Fan
  -1 siblings, 0 replies; 50+ messages in thread
From: Peng Fan @ 2022-07-08  0:06 UTC (permalink / raw)
  To: Marco Felsch
  Cc: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173,
	devicetree, Peng Fan, linux-pm, linux-kernel, linux-imx, kernel,
	linux-arm-kernel



On 7/7/2022 7:38 PM, Marco Felsch wrote:
> Hi,
> 
> thanks for your patch and the work on this.
> 
> On 22-07-03, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> Add interconnect property for media blk ctrl
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>>   arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>> index 13a2ee77d3c6..08bd57742294 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> 
> Can you please add:
> 
> #include <dt-bindings/interconnect/fsl,imx8mp.h>
> 
> else this won't compile.

oh, ICC maintainer asked me to drop this header when adding
NoC node, and I need to add this header when there
is user. Here it is, I will add it and post a V4.

Thanks,
Peng.

> 
> Regards,
>    Marco
> 
>> @@ -1066,6 +1066,18 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
>>   						     "lcdif1", "isi", "mipi-csi2",
>>   						     "lcdif2", "isp", "dwe",
>>   						     "mipi-dsi2";
>> +				interconnects =
>> +					<&noc IMX8MP_ICM_LCDIF_RD &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_LCDIF_WR &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISI0 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISI1 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISI2 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISP0 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISP1 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_DWE &noc IMX8MP_ICN_MEDIA>;
>> +				interconnect-names = "lcdif-rd", "lcdif-wr", "isi0",
>> +						     "isi1", "isi2", "isp0", "isp1",
>> +						     "dwe";
>>   				clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>,
>>   					 <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
>>   					 <&clk IMX8MP_CLK_MEDIA_CAM1_PIX_ROOT>,
>> -- 
>> 2.25.1
>>
>>
>>

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

* Re: [PATCH V3 6/7] arm64: dts: imx8mp: add interconnects for media blk ctrl
@ 2022-07-08  0:06       ` Peng Fan
  0 siblings, 0 replies; 50+ messages in thread
From: Peng Fan @ 2022-07-08  0:06 UTC (permalink / raw)
  To: Marco Felsch
  Cc: djakov, shawnguo, s.hauer, festevam, robh+dt,
	krzysztof.kozlowski+dt, abelvesa, abailon, l.stach,
	laurent.pinchart, marex, paul.elder, Markus.Niebel, aford173,
	devicetree, Peng Fan, linux-pm, linux-kernel, linux-imx, kernel,
	linux-arm-kernel



On 7/7/2022 7:38 PM, Marco Felsch wrote:
> Hi,
> 
> thanks for your patch and the work on this.
> 
> On 22-07-03, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> Add interconnect property for media blk ctrl
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>>   arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>> index 13a2ee77d3c6..08bd57742294 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> 
> Can you please add:
> 
> #include <dt-bindings/interconnect/fsl,imx8mp.h>
> 
> else this won't compile.

oh, ICC maintainer asked me to drop this header when adding
NoC node, and I need to add this header when there
is user. Here it is, I will add it and post a V4.

Thanks,
Peng.

> 
> Regards,
>    Marco
> 
>> @@ -1066,6 +1066,18 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
>>   						     "lcdif1", "isi", "mipi-csi2",
>>   						     "lcdif2", "isp", "dwe",
>>   						     "mipi-dsi2";
>> +				interconnects =
>> +					<&noc IMX8MP_ICM_LCDIF_RD &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_LCDIF_WR &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISI0 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISI1 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISI2 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISP0 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_ISP1 &noc IMX8MP_ICN_MEDIA>,
>> +					<&noc IMX8MP_ICM_DWE &noc IMX8MP_ICN_MEDIA>;
>> +				interconnect-names = "lcdif-rd", "lcdif-wr", "isi0",
>> +						     "isi1", "isi2", "isp0", "isp1",
>> +						     "dwe";
>>   				clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>,
>>   					 <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
>>   					 <&clk IMX8MP_CLK_MEDIA_CAM1_PIX_ROOT>,
>> -- 
>> 2.25.1
>>
>>
>>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2022-07-03  9:14   ` Peng Fan (OSS)
@ 2023-03-27  4:50     ` Greg Ungerer
  -1 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-27  4:50 UTC (permalink / raw)
  To: peng.fan
  Cc: Markus.Niebel, abailon, abelvesa, aford173, devicetree, djakov,
	festevam, kernel, krzysztof.kozlowski+dt, l.stach,
	laurent.pinchart, linux-arm-kernel, linux-imx, linux-kernel,
	linux-pm, marex, paul.elder, peng.fan, robh+dt, s.hauer,
	shawnguo, gerg

On 2/3/22 17:13, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add interconnect property for hsio blk ctrl
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
 > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++
 > 1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index 08bd57742294..9cceeeeb26be 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -1109,6 +1109,11 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
>  						<&pgc_hsiomix>, <&pgc_pcie_phy>;
>  				power-domain-names = "bus", "usb", "usb-phy1",
>  						     "usb-phy2", "pcie", "pcie-phy";
> +				interconnects = <&noc IMX8MP_ICM_NOC_PCIE &noc IMX8MP_ICN_HSIO>,
> +						<&noc IMX8MP_ICM_USB1 &noc IMX8MP_ICN_HSIO>,
> +						<&noc IMX8MP_ICM_USB2 &noc IMX8MP_ICN_HSIO>,
> +						<&noc IMX8MP_ICM_PCIE &noc IMX8MP_ICN_HSIO>;
> +				interconnect-names = "noc-pcie", "usb1", "usb2", "pcie";
>  				#power-domain-cells = <1>;
>  			};
>  		};

This change completely breaks USB for me on a new iMX8mp platform I am
working with. Before this change normal USB probe looks good:

    xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
    xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6d hci version 0x110 quirks 0x0000000000010010
    xhci-hcd xhci-hcd.0.auto: irq 206, io mem 0x38100000
    xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
    xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.03
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: xHCI Host Controller
    usb usb1: Manufacturer: Linux 6.3.0-rc4-dirty xhci-hcd
    ....

But after this commit is applied, no USB probe messages at all.

USB worked fine in 6.0 for me, but when I switched up to 6.1 USB was broken,
I bisected to this as being the offending commit. This is still broken for me
in todays 6.3-rc4. If I revert this change (and only this change) USB works
again.

Any thoughts on why this breaks USB?

Regards
greg



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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-27  4:50     ` Greg Ungerer
  0 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-27  4:50 UTC (permalink / raw)
  To: peng.fan
  Cc: Markus.Niebel, abailon, abelvesa, aford173, devicetree, djakov,
	festevam, kernel, krzysztof.kozlowski+dt, l.stach,
	laurent.pinchart, linux-arm-kernel, linux-imx, linux-kernel,
	linux-pm, marex, paul.elder, peng.fan, robh+dt, s.hauer,
	shawnguo, gerg

On 2/3/22 17:13, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add interconnect property for hsio blk ctrl
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
 > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++
 > 1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index 08bd57742294..9cceeeeb26be 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -1109,6 +1109,11 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
>  						<&pgc_hsiomix>, <&pgc_pcie_phy>;
>  				power-domain-names = "bus", "usb", "usb-phy1",
>  						     "usb-phy2", "pcie", "pcie-phy";
> +				interconnects = <&noc IMX8MP_ICM_NOC_PCIE &noc IMX8MP_ICN_HSIO>,
> +						<&noc IMX8MP_ICM_USB1 &noc IMX8MP_ICN_HSIO>,
> +						<&noc IMX8MP_ICM_USB2 &noc IMX8MP_ICN_HSIO>,
> +						<&noc IMX8MP_ICM_PCIE &noc IMX8MP_ICN_HSIO>;
> +				interconnect-names = "noc-pcie", "usb1", "usb2", "pcie";
>  				#power-domain-cells = <1>;
>  			};
>  		};

This change completely breaks USB for me on a new iMX8mp platform I am
working with. Before this change normal USB probe looks good:

    xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
    xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6d hci version 0x110 quirks 0x0000000000010010
    xhci-hcd xhci-hcd.0.auto: irq 206, io mem 0x38100000
    xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
    xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.03
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: xHCI Host Controller
    usb usb1: Manufacturer: Linux 6.3.0-rc4-dirty xhci-hcd
    ....

But after this commit is applied, no USB probe messages at all.

USB worked fine in 6.0 for me, but when I switched up to 6.1 USB was broken,
I bisected to this as being the offending commit. This is still broken for me
in todays 6.3-rc4. If I revert this change (and only this change) USB works
again.

Any thoughts on why this breaks USB?

Regards
greg



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-27  4:50     ` Greg Ungerer
@ 2023-03-27  6:27       ` Alexander Stein
  -1 siblings, 0 replies; 50+ messages in thread
From: Alexander Stein @ 2023-03-27  6:27 UTC (permalink / raw)
  To: peng.fan, linux-arm-kernel
  Cc: Markus.Niebel, abailon, abelvesa, aford173, devicetree, djakov,
	festevam, kernel, krzysztof.kozlowski+dt, l.stach,
	laurent.pinchart, linux-arm-kernel, linux-imx, linux-kernel,
	linux-pm, marex, paul.elder, peng.fan, robh+dt, s.hauer,
	shawnguo, gerg, Greg Ungerer

Hi Greg,

Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
> On 2/3/22 17:13, Peng Fan wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> > 
> > Add interconnect property for hsio blk ctrl
> > 
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> > 
>  > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++
>  > 1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
> > 08bd57742294..9cceeeeb26be 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > @@ -1109,6 +1109,11 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
> > 
> >  						<&pgc_hsiomix>, 
<&pgc_pcie_phy>;
> >  				
> >  				power-domain-names = "bus", "usb", 
"usb-phy1",
> >  				
> >  						     "usb-phy2", 
"pcie", "pcie-phy";
> > 
> > +				interconnects = <&noc 
IMX8MP_ICM_NOC_PCIE &noc IMX8MP_ICN_HSIO>,
> > +						<&noc 
IMX8MP_ICM_USB1 &noc IMX8MP_ICN_HSIO>,
> > +						<&noc 
IMX8MP_ICM_USB2 &noc IMX8MP_ICN_HSIO>,
> > +						<&noc 
IMX8MP_ICM_PCIE &noc IMX8MP_ICN_HSIO>;
> > +				interconnect-names = "noc-pcie", 
"usb1", "usb2", "pcie";
> > 
> >  				#power-domain-cells = <1>;
> >  			
> >  			};
> >  		
> >  		};
> 
> This change completely breaks USB for me on a new iMX8mp platform I am
> working with. Before this change normal USB probe looks good:
> 
>     xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
>     xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
>     xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6d hci version 0x110 quirks
> 0x0000000000010010 xhci-hcd xhci-hcd.0.auto: irq 206, io mem 0x38100000
>     xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
>     xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
>     xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
>     usb usb1: New USB device found, idVendor=1d6b, idProduct=0002,
> bcdDevice= 6.03 usb usb1: New USB device strings: Mfr=3, Product=2,
> SerialNumber=1 usb usb1: Product: xHCI Host Controller
>     usb usb1: Manufacturer: Linux 6.3.0-rc4-dirty xhci-hcd
>     ....
> 
> But after this commit is applied, no USB probe messages at all.
> 
> USB worked fine in 6.0 for me, but when I switched up to 6.1 USB was broken,
> I bisected to this as being the offending commit. This is still broken for
> me in todays 6.3-rc4. If I revert this change (and only this change) USB
> works again.
> 
> Any thoughts on why this breaks USB?

Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?

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] 50+ messages in thread

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-27  6:27       ` Alexander Stein
  0 siblings, 0 replies; 50+ messages in thread
From: Alexander Stein @ 2023-03-27  6:27 UTC (permalink / raw)
  To: peng.fan, linux-arm-kernel
  Cc: Markus.Niebel, abailon, abelvesa, aford173, devicetree, djakov,
	festevam, kernel, krzysztof.kozlowski+dt, l.stach,
	laurent.pinchart, linux-arm-kernel, linux-imx, linux-kernel,
	linux-pm, marex, paul.elder, peng.fan, robh+dt, s.hauer,
	shawnguo, gerg, Greg Ungerer

Hi Greg,

Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
> On 2/3/22 17:13, Peng Fan wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> > 
> > Add interconnect property for hsio blk ctrl
> > 
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> > 
>  > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++
>  > 1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
> > 08bd57742294..9cceeeeb26be 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > @@ -1109,6 +1109,11 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
> > 
> >  						<&pgc_hsiomix>, 
<&pgc_pcie_phy>;
> >  				
> >  				power-domain-names = "bus", "usb", 
"usb-phy1",
> >  				
> >  						     "usb-phy2", 
"pcie", "pcie-phy";
> > 
> > +				interconnects = <&noc 
IMX8MP_ICM_NOC_PCIE &noc IMX8MP_ICN_HSIO>,
> > +						<&noc 
IMX8MP_ICM_USB1 &noc IMX8MP_ICN_HSIO>,
> > +						<&noc 
IMX8MP_ICM_USB2 &noc IMX8MP_ICN_HSIO>,
> > +						<&noc 
IMX8MP_ICM_PCIE &noc IMX8MP_ICN_HSIO>;
> > +				interconnect-names = "noc-pcie", 
"usb1", "usb2", "pcie";
> > 
> >  				#power-domain-cells = <1>;
> >  			
> >  			};
> >  		
> >  		};
> 
> This change completely breaks USB for me on a new iMX8mp platform I am
> working with. Before this change normal USB probe looks good:
> 
>     xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
>     xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
>     xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6d hci version 0x110 quirks
> 0x0000000000010010 xhci-hcd xhci-hcd.0.auto: irq 206, io mem 0x38100000
>     xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
>     xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
>     xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
>     usb usb1: New USB device found, idVendor=1d6b, idProduct=0002,
> bcdDevice= 6.03 usb usb1: New USB device strings: Mfr=3, Product=2,
> SerialNumber=1 usb usb1: Product: xHCI Host Controller
>     usb usb1: Manufacturer: Linux 6.3.0-rc4-dirty xhci-hcd
>     ....
> 
> But after this commit is applied, no USB probe messages at all.
> 
> USB worked fine in 6.0 for me, but when I switched up to 6.1 USB was broken,
> I bisected to this as being the offending commit. This is still broken for
> me in todays 6.3-rc4. If I revert this change (and only this change) USB
> works again.
> 
> Any thoughts on why this breaks USB?

Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?

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/



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-27  6:27       ` Alexander Stein
@ 2023-03-27  7:16         ` Ahmad Fatoum
  -1 siblings, 0 replies; 50+ messages in thread
From: Ahmad Fatoum @ 2023-03-27  7:16 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: peng.fan, laurent.pinchart, krzysztof.kozlowski+dt, festevam,
	abelvesa, marex, Markus.Niebel, paul.elder, gerg, linux-imx,
	devicetree, linux-pm, s.hauer, robh+dt, aford173, linux-kernel,
	kernel, djakov, l.stach, shawnguo, abailon, Alexander Stein,
	Peng Fan (OSS),
	linux-arm-kernel

Hello Greg,

On 27.03.23 08:27, Alexander Stein wrote:
> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>> Any thoughts on why this breaks USB?
> 
> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?

And if that's the case, did you check /sys/kernel/debug/devices_deferred
to see if there was any indication that this is the reason?

If you didn't find any hint there, you might want to place a
dev_err_probe with a suitable message at the place where -EPROBE_DEFER
was returned.

Cheers,
Ahmad

> 
> Best regards,
> Alexander
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-27  7:16         ` Ahmad Fatoum
  0 siblings, 0 replies; 50+ messages in thread
From: Ahmad Fatoum @ 2023-03-27  7:16 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: peng.fan, laurent.pinchart, krzysztof.kozlowski+dt, festevam,
	abelvesa, marex, Markus.Niebel, paul.elder, gerg, linux-imx,
	devicetree, linux-pm, s.hauer, robh+dt, aford173, linux-kernel,
	kernel, djakov, l.stach, shawnguo, abailon, Alexander Stein,
	Peng Fan (OSS),
	linux-arm-kernel

Hello Greg,

On 27.03.23 08:27, Alexander Stein wrote:
> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>> Any thoughts on why this breaks USB?
> 
> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?

And if that's the case, did you check /sys/kernel/debug/devices_deferred
to see if there was any indication that this is the reason?

If you didn't find any hint there, you might want to place a
dev_err_probe with a suitable message at the place where -EPROBE_DEFER
was returned.

Cheers,
Ahmad

> 
> Best regards,
> Alexander
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-27  6:27       ` Alexander Stein
@ 2023-03-27  7:51         ` Greg Ungerer
  -1 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-27  7:51 UTC (permalink / raw)
  To: Alexander Stein, peng.fan, linux-arm-kernel
  Cc: Markus.Niebel, abailon, abelvesa, aford173, devicetree, djakov,
	festevam, kernel, krzysztof.kozlowski+dt, l.stach,
	laurent.pinchart, linux-imx, linux-kernel, linux-pm, marex,
	paul.elder, peng.fan, robh+dt, s.hauer, shawnguo, Greg Ungerer

Hi Alexander,

On 27/3/23 16:27, Alexander Stein wrote:
> Hi Greg,
> 
> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>> On 2/3/22 17:13, Peng Fan wrote:
>>> From: Peng Fan <peng.fan@nxp.com>
>>>
>>> Add interconnect property for hsio blk ctrl
>>>
>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>>> ---
>>>
>>   > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++
>>   > 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
>>> 08bd57742294..9cceeeeb26be 100644
>>> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> @@ -1109,6 +1109,11 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
>>>
>>>   						<&pgc_hsiomix>,
> <&pgc_pcie_phy>;
>>>   				
>>>   				power-domain-names = "bus", "usb",
> "usb-phy1",
>>>   				
>>>   						     "usb-phy2",
> "pcie", "pcie-phy";
>>>
>>> +				interconnects = <&noc
> IMX8MP_ICM_NOC_PCIE &noc IMX8MP_ICN_HSIO>,
>>> +						<&noc
> IMX8MP_ICM_USB1 &noc IMX8MP_ICN_HSIO>,
>>> +						<&noc
> IMX8MP_ICM_USB2 &noc IMX8MP_ICN_HSIO>,
>>> +						<&noc
> IMX8MP_ICM_PCIE &noc IMX8MP_ICN_HSIO>;
>>> +				interconnect-names = "noc-pcie",
> "usb1", "usb2", "pcie";
>>>
>>>   				#power-domain-cells = <1>;
>>>   			
>>>   			};
>>>   		
>>>   		};
>>
>> This change completely breaks USB for me on a new iMX8mp platform I am
>> working with. Before this change normal USB probe looks good:
>>
>>      xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
>>      xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
>>      xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6d hci version 0x110 quirks
>> 0x0000000000010010 xhci-hcd xhci-hcd.0.auto: irq 206, io mem 0x38100000
>>      xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
>>      xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
>>      xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
>>      usb usb1: New USB device found, idVendor=1d6b, idProduct=0002,
>> bcdDevice= 6.03 usb usb1: New USB device strings: Mfr=3, Product=2,
>> SerialNumber=1 usb usb1: Product: xHCI Host Controller
>>      usb usb1: Manufacturer: Linux 6.3.0-rc4-dirty xhci-hcd
>>      ....
>>
>> But after this commit is applied, no USB probe messages at all.
>>
>> USB worked fine in 6.0 for me, but when I switched up to 6.1 USB was broken,
>> I bisected to this as being the offending commit. This is still broken for
>> me in todays 6.3-rc4. If I revert this change (and only this change) USB
>> works again.
>>
>> Any thoughts on why this breaks USB?
> 
> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?

No, it is enabled. From my config:

     CONFIG_INTERCONNECT=y
     CONFIG_INTERCONNECT_IMX=y
     # CONFIG_INTERCONNECT_IMX8MM is not set
     # CONFIG_INTERCONNECT_IMX8MN is not set
     # CONFIG_INTERCONNECT_IMX8MQ is not set
     CONFIG_INTERCONNECT_IMX8MP=y

Regards
Greg


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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-27  7:51         ` Greg Ungerer
  0 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-27  7:51 UTC (permalink / raw)
  To: Alexander Stein, peng.fan, linux-arm-kernel
  Cc: Markus.Niebel, abailon, abelvesa, aford173, devicetree, djakov,
	festevam, kernel, krzysztof.kozlowski+dt, l.stach,
	laurent.pinchart, linux-imx, linux-kernel, linux-pm, marex,
	paul.elder, peng.fan, robh+dt, s.hauer, shawnguo, Greg Ungerer

Hi Alexander,

On 27/3/23 16:27, Alexander Stein wrote:
> Hi Greg,
> 
> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>> On 2/3/22 17:13, Peng Fan wrote:
>>> From: Peng Fan <peng.fan@nxp.com>
>>>
>>> Add interconnect property for hsio blk ctrl
>>>
>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>>> ---
>>>
>>   > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 +++++
>>   > 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
>>> 08bd57742294..9cceeeeb26be 100644
>>> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> @@ -1109,6 +1109,11 @@ hsio_blk_ctrl: blk-ctrl@32f10000 {
>>>
>>>   						<&pgc_hsiomix>,
> <&pgc_pcie_phy>;
>>>   				
>>>   				power-domain-names = "bus", "usb",
> "usb-phy1",
>>>   				
>>>   						     "usb-phy2",
> "pcie", "pcie-phy";
>>>
>>> +				interconnects = <&noc
> IMX8MP_ICM_NOC_PCIE &noc IMX8MP_ICN_HSIO>,
>>> +						<&noc
> IMX8MP_ICM_USB1 &noc IMX8MP_ICN_HSIO>,
>>> +						<&noc
> IMX8MP_ICM_USB2 &noc IMX8MP_ICN_HSIO>,
>>> +						<&noc
> IMX8MP_ICM_PCIE &noc IMX8MP_ICN_HSIO>;
>>> +				interconnect-names = "noc-pcie",
> "usb1", "usb2", "pcie";
>>>
>>>   				#power-domain-cells = <1>;
>>>   			
>>>   			};
>>>   		
>>>   		};
>>
>> This change completely breaks USB for me on a new iMX8mp platform I am
>> working with. Before this change normal USB probe looks good:
>>
>>      xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
>>      xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
>>      xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe6d hci version 0x110 quirks
>> 0x0000000000010010 xhci-hcd xhci-hcd.0.auto: irq 206, io mem 0x38100000
>>      xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
>>      xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
>>      xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
>>      usb usb1: New USB device found, idVendor=1d6b, idProduct=0002,
>> bcdDevice= 6.03 usb usb1: New USB device strings: Mfr=3, Product=2,
>> SerialNumber=1 usb usb1: Product: xHCI Host Controller
>>      usb usb1: Manufacturer: Linux 6.3.0-rc4-dirty xhci-hcd
>>      ....
>>
>> But after this commit is applied, no USB probe messages at all.
>>
>> USB worked fine in 6.0 for me, but when I switched up to 6.1 USB was broken,
>> I bisected to this as being the offending commit. This is still broken for
>> me in todays 6.3-rc4. If I revert this change (and only this change) USB
>> works again.
>>
>> Any thoughts on why this breaks USB?
> 
> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?

No, it is enabled. From my config:

     CONFIG_INTERCONNECT=y
     CONFIG_INTERCONNECT_IMX=y
     # CONFIG_INTERCONNECT_IMX8MM is not set
     # CONFIG_INTERCONNECT_IMX8MN is not set
     # CONFIG_INTERCONNECT_IMX8MQ is not set
     CONFIG_INTERCONNECT_IMX8MP=y

Regards
Greg


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-27  7:16         ` Ahmad Fatoum
@ 2023-03-27  8:07           ` Greg Ungerer
  -1 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-27  8:07 UTC (permalink / raw)
  To: Ahmad Fatoum
  Cc: peng.fan, laurent.pinchart, krzysztof.kozlowski+dt, festevam,
	abelvesa, marex, Markus.Niebel, paul.elder, gerg, linux-imx,
	devicetree, linux-pm, s.hauer, robh+dt, aford173, linux-kernel,
	kernel, djakov, l.stach, shawnguo, abailon, Alexander Stein,
	Peng Fan (OSS),
	linux-arm-kernel

Hi Ahmad,

On 27/3/23 17:16, Ahmad Fatoum wrote:
> On 27.03.23 08:27, Alexander Stein wrote:
>> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>>> Any thoughts on why this breaks USB?
>>
>> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
> 
> And if that's the case, did you check /sys/kernel/debug/devices_deferred
> to see if there was any indication that this is the reason?

Yeah, it does:

     # cat /sys/kernel/debug/devices_deferred
     32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
     32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
     32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
     381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
     382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
     imx-pgc-domain.11	
     imx-pgc-domain.12	
     imx-pgc-domain.13	
     38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
     32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries

As far as I can tell blk-ctrl should be good:

     #
     # i.MX SoC drivers
     #
     CONFIG_IMX_GPCV2_PM_DOMAINS=y
     CONFIG_SOC_IMX8M=y
     # CONFIG_SOC_IMX9 is not set
     CONFIG_IMX8M_BLK_CTRL=y
     # end of i.MX SoC drivers


> If you didn't find any hint there, you might want to place a
> dev_err_probe with a suitable message at the place where -EPROBE_DEFER
> was returned.

I will try that.

Thanks
Greg



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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-27  8:07           ` Greg Ungerer
  0 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-27  8:07 UTC (permalink / raw)
  To: Ahmad Fatoum
  Cc: peng.fan, laurent.pinchart, krzysztof.kozlowski+dt, festevam,
	abelvesa, marex, Markus.Niebel, paul.elder, gerg, linux-imx,
	devicetree, linux-pm, s.hauer, robh+dt, aford173, linux-kernel,
	kernel, djakov, l.stach, shawnguo, abailon, Alexander Stein,
	Peng Fan (OSS),
	linux-arm-kernel

Hi Ahmad,

On 27/3/23 17:16, Ahmad Fatoum wrote:
> On 27.03.23 08:27, Alexander Stein wrote:
>> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>>> Any thoughts on why this breaks USB?
>>
>> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
> 
> And if that's the case, did you check /sys/kernel/debug/devices_deferred
> to see if there was any indication that this is the reason?

Yeah, it does:

     # cat /sys/kernel/debug/devices_deferred
     32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
     32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
     32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
     381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
     382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
     imx-pgc-domain.11	
     imx-pgc-domain.12	
     imx-pgc-domain.13	
     38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
     32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries

As far as I can tell blk-ctrl should be good:

     #
     # i.MX SoC drivers
     #
     CONFIG_IMX_GPCV2_PM_DOMAINS=y
     CONFIG_SOC_IMX8M=y
     # CONFIG_SOC_IMX9 is not set
     CONFIG_IMX8M_BLK_CTRL=y
     # end of i.MX SoC drivers


> If you didn't find any hint there, you might want to place a
> dev_err_probe with a suitable message at the place where -EPROBE_DEFER
> was returned.

I will try that.

Thanks
Greg



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-27  8:07           ` Greg Ungerer
@ 2023-03-28  7:33             ` Marco Felsch
  -1 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2023-03-28  7:33 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: Ahmad Fatoum, peng.fan, Alexander Stein, abailon,
	krzysztof.kozlowski+dt, festevam, abelvesa, marex, Markus.Niebel,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	linux-kernel, kernel, djakov, l.stach, shawnguo,
	laurent.pinchart

Hi Greg,

On 23-03-27, Greg Ungerer wrote:
> Hi Ahmad,
> 
> On 27/3/23 17:16, Ahmad Fatoum wrote:
> > On 27.03.23 08:27, Alexander Stein wrote:
> > > Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
> > > > Any thoughts on why this breaks USB?
> > > 
> > > Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
> > 
> > And if that's the case, did you check /sys/kernel/debug/devices_deferred
> > to see if there was any indication that this is the reason?
> 
> Yeah, it does:
> 
>     # cat /sys/kernel/debug/devices_deferred
>     32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
>     32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
>     32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
>     381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>     382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>     imx-pgc-domain.11	
>     imx-pgc-domain.12	
>     imx-pgc-domain.13	
>     38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
>     32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
> 
> As far as I can tell blk-ctrl should be good:
> 
>     #
>     # i.MX SoC drivers
>     #
>     CONFIG_IMX_GPCV2_PM_DOMAINS=y
>     CONFIG_SOC_IMX8M=y
>     # CONFIG_SOC_IMX9 is not set
>     CONFIG_IMX8M_BLK_CTRL=y
>     # end of i.MX SoC drivers
> 
> 
> > If you didn't find any hint there, you might want to place a
> > dev_err_probe with a suitable message at the place where -EPROBE_DEFER
> > was returned.
> 
> I will try that.

Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
noc/interconnect driver. This could also the problem for you vpu issue.

Regards,
  Marco


> 
> Thanks
> Greg
> 
> 
> 
> 

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-28  7:33             ` Marco Felsch
  0 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2023-03-28  7:33 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: Ahmad Fatoum, peng.fan, Alexander Stein, abailon,
	krzysztof.kozlowski+dt, festevam, abelvesa, marex, Markus.Niebel,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	linux-kernel, kernel, djakov, l.stach, shawnguo,
	laurent.pinchart

Hi Greg,

On 23-03-27, Greg Ungerer wrote:
> Hi Ahmad,
> 
> On 27/3/23 17:16, Ahmad Fatoum wrote:
> > On 27.03.23 08:27, Alexander Stein wrote:
> > > Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
> > > > Any thoughts on why this breaks USB?
> > > 
> > > Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
> > 
> > And if that's the case, did you check /sys/kernel/debug/devices_deferred
> > to see if there was any indication that this is the reason?
> 
> Yeah, it does:
> 
>     # cat /sys/kernel/debug/devices_deferred
>     32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
>     32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
>     32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
>     381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>     382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>     imx-pgc-domain.11	
>     imx-pgc-domain.12	
>     imx-pgc-domain.13	
>     38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
>     32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
> 
> As far as I can tell blk-ctrl should be good:
> 
>     #
>     # i.MX SoC drivers
>     #
>     CONFIG_IMX_GPCV2_PM_DOMAINS=y
>     CONFIG_SOC_IMX8M=y
>     # CONFIG_SOC_IMX9 is not set
>     CONFIG_IMX8M_BLK_CTRL=y
>     # end of i.MX SoC drivers
> 
> 
> > If you didn't find any hint there, you might want to place a
> > dev_err_probe with a suitable message at the place where -EPROBE_DEFER
> > was returned.
> 
> I will try that.

Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
noc/interconnect driver. This could also the problem for you vpu issue.

Regards,
  Marco


> 
> Thanks
> Greg
> 
> 
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-28  7:33             ` Marco Felsch
@ 2023-03-28 12:58               ` Greg Ungerer
  -1 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-28 12:58 UTC (permalink / raw)
  To: Marco Felsch
  Cc: Ahmad Fatoum, peng.fan, Alexander Stein, abailon,
	krzysztof.kozlowski+dt, festevam, abelvesa, marex, Markus.Niebel,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	linux-kernel, kernel, djakov, l.stach, shawnguo,
	laurent.pinchart

Hi Marco,

On 28/3/23 17:33, Marco Felsch wrote:
> Hi Greg,
> 
> On 23-03-27, Greg Ungerer wrote:
>> Hi Ahmad,
>>
>> On 27/3/23 17:16, Ahmad Fatoum wrote:
>>> On 27.03.23 08:27, Alexander Stein wrote:
>>>> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>>>>> Any thoughts on why this breaks USB?
>>>>
>>>> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
>>>
>>> And if that's the case, did you check /sys/kernel/debug/devices_deferred
>>> to see if there was any indication that this is the reason?
>>
>> Yeah, it does:
>>
>>      # cat /sys/kernel/debug/devices_deferred
>>      32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
>>      32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
>>      32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
>>      381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>>      382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>>      imx-pgc-domain.11	
>>      imx-pgc-domain.12	
>>      imx-pgc-domain.13	
>>      38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
>>      32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
>>
>> As far as I can tell blk-ctrl should be good:
>>
>>      #
>>      # i.MX SoC drivers
>>      #
>>      CONFIG_IMX_GPCV2_PM_DOMAINS=y
>>      CONFIG_SOC_IMX8M=y
>>      # CONFIG_SOC_IMX9 is not set
>>      CONFIG_IMX8M_BLK_CTRL=y
>>      # end of i.MX SoC drivers
>>
>>
>>> If you didn't find any hint there, you might want to place a
>>> dev_err_probe with a suitable message at the place where -EPROBE_DEFER
>>> was returned.
>>
>> I will try that.
> 
> Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
> noc/interconnect driver. This could also the problem for you vpu issue.

I do not have that enabled. Enabling that fixes the USB probing.
So that is good, thanks.

It doesn't fix the other problem I mentioned with the vpu pgc nodes though.
I do get some extra messages now with this enabled and the 6.1 kernel:

     imx-pgc imx-pgc-domain.8: failed to command PGC
     imx-pgc imx-pgc-domain.8: failed to command PGC
     imx8m-blk-ctrl 38330000.blk-ctrl: deferred probe timeout, ignoring dependency
     imx8m-blk-ctrl 38330000.blk-ctrl: error -110: failed to attach power domain "g1"
     imx8m-blk-ctrl: probe of 38330000.blk-ctrl failed with error -110

Regards
Greg



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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-28 12:58               ` Greg Ungerer
  0 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-28 12:58 UTC (permalink / raw)
  To: Marco Felsch
  Cc: Ahmad Fatoum, peng.fan, Alexander Stein, abailon,
	krzysztof.kozlowski+dt, festevam, abelvesa, marex, Markus.Niebel,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	linux-kernel, kernel, djakov, l.stach, shawnguo,
	laurent.pinchart

Hi Marco,

On 28/3/23 17:33, Marco Felsch wrote:
> Hi Greg,
> 
> On 23-03-27, Greg Ungerer wrote:
>> Hi Ahmad,
>>
>> On 27/3/23 17:16, Ahmad Fatoum wrote:
>>> On 27.03.23 08:27, Alexander Stein wrote:
>>>> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>>>>> Any thoughts on why this breaks USB?
>>>>
>>>> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
>>>
>>> And if that's the case, did you check /sys/kernel/debug/devices_deferred
>>> to see if there was any indication that this is the reason?
>>
>> Yeah, it does:
>>
>>      # cat /sys/kernel/debug/devices_deferred
>>      32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
>>      32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
>>      32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
>>      381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>>      382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>>      imx-pgc-domain.11	
>>      imx-pgc-domain.12	
>>      imx-pgc-domain.13	
>>      38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
>>      32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
>>
>> As far as I can tell blk-ctrl should be good:
>>
>>      #
>>      # i.MX SoC drivers
>>      #
>>      CONFIG_IMX_GPCV2_PM_DOMAINS=y
>>      CONFIG_SOC_IMX8M=y
>>      # CONFIG_SOC_IMX9 is not set
>>      CONFIG_IMX8M_BLK_CTRL=y
>>      # end of i.MX SoC drivers
>>
>>
>>> If you didn't find any hint there, you might want to place a
>>> dev_err_probe with a suitable message at the place where -EPROBE_DEFER
>>> was returned.
>>
>> I will try that.
> 
> Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
> noc/interconnect driver. This could also the problem for you vpu issue.

I do not have that enabled. Enabling that fixes the USB probing.
So that is good, thanks.

It doesn't fix the other problem I mentioned with the vpu pgc nodes though.
I do get some extra messages now with this enabled and the 6.1 kernel:

     imx-pgc imx-pgc-domain.8: failed to command PGC
     imx-pgc imx-pgc-domain.8: failed to command PGC
     imx8m-blk-ctrl 38330000.blk-ctrl: deferred probe timeout, ignoring dependency
     imx8m-blk-ctrl 38330000.blk-ctrl: error -110: failed to attach power domain "g1"
     imx8m-blk-ctrl: probe of 38330000.blk-ctrl failed with error -110

Regards
Greg



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-28 12:58               ` Greg Ungerer
@ 2023-03-28 13:42                 ` Marco Felsch
  -1 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2023-03-28 13:42 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: Ahmad Fatoum, peng.fan, Alexander Stein, abailon,
	krzysztof.kozlowski+dt, festevam, abelvesa, marex, Markus.Niebel,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	linux-kernel, kernel, djakov, l.stach, shawnguo,
	laurent.pinchart

Hi Greg,

On 23-03-28, Greg Ungerer wrote:
> Hi Marco,
> 
> On 28/3/23 17:33, Marco Felsch wrote:
> > Hi Greg,
> > 
> > On 23-03-27, Greg Ungerer wrote:
> > > Hi Ahmad,
> > > 
> > > On 27/3/23 17:16, Ahmad Fatoum wrote:
> > > > On 27.03.23 08:27, Alexander Stein wrote:
> > > > > Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
> > > > > > Any thoughts on why this breaks USB?
> > > > > 
> > > > > Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
> > > > 
> > > > And if that's the case, did you check /sys/kernel/debug/devices_deferred
> > > > to see if there was any indication that this is the reason?
> > > 
> > > Yeah, it does:
> > > 
> > >      # cat /sys/kernel/debug/devices_deferred
> > >      32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
> > >      32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
> > >      32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
> > >      381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
> > >      382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
> > >      imx-pgc-domain.11	
> > >      imx-pgc-domain.12	
> > >      imx-pgc-domain.13	
> > >      38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
> > >      32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
> > > 
> > > As far as I can tell blk-ctrl should be good:
> > > 
> > >      #
> > >      # i.MX SoC drivers
> > >      #
> > >      CONFIG_IMX_GPCV2_PM_DOMAINS=y
> > >      CONFIG_SOC_IMX8M=y
> > >      # CONFIG_SOC_IMX9 is not set
> > >      CONFIG_IMX8M_BLK_CTRL=y
> > >      # end of i.MX SoC drivers
> > > 
> > > 
> > > > If you didn't find any hint there, you might want to place a
> > > > dev_err_probe with a suitable message at the place where -EPROBE_DEFER
> > > > was returned.
> > > 
> > > I will try that.
> > 
> > Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
> > noc/interconnect driver. This could also the problem for you vpu issue.
> 
> I do not have that enabled. Enabling that fixes the USB probing.
> So that is good, thanks.
> 
> It doesn't fix the other problem I mentioned with the vpu pgc nodes though.
> I do get some extra messages now with this enabled and the 6.1 kernel:
> 
>     imx-pgc imx-pgc-domain.8: failed to command PGC
>     imx-pgc imx-pgc-domain.8: failed to command PGC
>     imx8m-blk-ctrl 38330000.blk-ctrl: deferred probe timeout, ignoring dependency
>     imx8m-blk-ctrl 38330000.blk-ctrl: error -110: failed to attach power domain "g1"
>     imx8m-blk-ctrl: probe of 38330000.blk-ctrl failed with error -110

Okay, this seems more like a "real" issue not related to some missing
drivers. I followed the code and found a poll within the
imx_pgc_power_up() in gpcv2.c. Power-domain 8 is the vpumix domain which
is used as power-domain for the g1 power-domain. My assumption is that
this poll does run into the timeout. Maybe Peng can support you here
since I didn't had the time for to test the VPUs yet and he did the
integration patches.

Just ignore the errors if you don't use the VPUs or disable the
blk-ctrl@38330000 node via status = "disabled".

Regards,
  Marco

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-28 13:42                 ` Marco Felsch
  0 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2023-03-28 13:42 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: Ahmad Fatoum, peng.fan, Alexander Stein, abailon,
	krzysztof.kozlowski+dt, festevam, abelvesa, marex, Markus.Niebel,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	linux-kernel, kernel, djakov, l.stach, shawnguo,
	laurent.pinchart

Hi Greg,

On 23-03-28, Greg Ungerer wrote:
> Hi Marco,
> 
> On 28/3/23 17:33, Marco Felsch wrote:
> > Hi Greg,
> > 
> > On 23-03-27, Greg Ungerer wrote:
> > > Hi Ahmad,
> > > 
> > > On 27/3/23 17:16, Ahmad Fatoum wrote:
> > > > On 27.03.23 08:27, Alexander Stein wrote:
> > > > > Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
> > > > > > Any thoughts on why this breaks USB?
> > > > > 
> > > > > Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
> > > > 
> > > > And if that's the case, did you check /sys/kernel/debug/devices_deferred
> > > > to see if there was any indication that this is the reason?
> > > 
> > > Yeah, it does:
> > > 
> > >      # cat /sys/kernel/debug/devices_deferred
> > >      32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
> > >      32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
> > >      32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
> > >      381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
> > >      382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
> > >      imx-pgc-domain.11	
> > >      imx-pgc-domain.12	
> > >      imx-pgc-domain.13	
> > >      38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
> > >      32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
> > > 
> > > As far as I can tell blk-ctrl should be good:
> > > 
> > >      #
> > >      # i.MX SoC drivers
> > >      #
> > >      CONFIG_IMX_GPCV2_PM_DOMAINS=y
> > >      CONFIG_SOC_IMX8M=y
> > >      # CONFIG_SOC_IMX9 is not set
> > >      CONFIG_IMX8M_BLK_CTRL=y
> > >      # end of i.MX SoC drivers
> > > 
> > > 
> > > > If you didn't find any hint there, you might want to place a
> > > > dev_err_probe with a suitable message at the place where -EPROBE_DEFER
> > > > was returned.
> > > 
> > > I will try that.
> > 
> > Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
> > noc/interconnect driver. This could also the problem for you vpu issue.
> 
> I do not have that enabled. Enabling that fixes the USB probing.
> So that is good, thanks.
> 
> It doesn't fix the other problem I mentioned with the vpu pgc nodes though.
> I do get some extra messages now with this enabled and the 6.1 kernel:
> 
>     imx-pgc imx-pgc-domain.8: failed to command PGC
>     imx-pgc imx-pgc-domain.8: failed to command PGC
>     imx8m-blk-ctrl 38330000.blk-ctrl: deferred probe timeout, ignoring dependency
>     imx8m-blk-ctrl 38330000.blk-ctrl: error -110: failed to attach power domain "g1"
>     imx8m-blk-ctrl: probe of 38330000.blk-ctrl failed with error -110

Okay, this seems more like a "real" issue not related to some missing
drivers. I followed the code and found a poll within the
imx_pgc_power_up() in gpcv2.c. Power-domain 8 is the vpumix domain which
is used as power-domain for the g1 power-domain. My assumption is that
this poll does run into the timeout. Maybe Peng can support you here
since I didn't had the time for to test the VPUs yet and he did the
integration patches.

Just ignore the errors if you don't use the VPUs or disable the
blk-ctrl@38330000 node via status = "disabled".

Regards,
  Marco

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-28 13:42                 ` Marco Felsch
@ 2023-03-28 13:51                   ` Marco Felsch
  -1 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2023-03-28 13:51 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Markus.Niebel, Ahmad Fatoum,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

On 23-03-28, Marco Felsch wrote:
> Hi Greg,
> 
> On 23-03-28, Greg Ungerer wrote:
> > Hi Marco,
> > 
> > On 28/3/23 17:33, Marco Felsch wrote:
> > > Hi Greg,
> > > 
> > > On 23-03-27, Greg Ungerer wrote:
> > > > Hi Ahmad,
> > > > 
> > > > On 27/3/23 17:16, Ahmad Fatoum wrote:
> > > > > On 27.03.23 08:27, Alexander Stein wrote:
> > > > > > Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
> > > > > > > Any thoughts on why this breaks USB?
> > > > > > 
> > > > > > Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
> > > > > 
> > > > > And if that's the case, did you check /sys/kernel/debug/devices_deferred
> > > > > to see if there was any indication that this is the reason?
> > > > 
> > > > Yeah, it does:
> > > > 
> > > >      # cat /sys/kernel/debug/devices_deferred
> > > >      32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
> > > >      32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
> > > >      32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
> > > >      381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
> > > >      382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
> > > >      imx-pgc-domain.11	
> > > >      imx-pgc-domain.12	
> > > >      imx-pgc-domain.13	
> > > >      38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
> > > >      32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
> > > > 
> > > > As far as I can tell blk-ctrl should be good:
> > > > 
> > > >      #
> > > >      # i.MX SoC drivers
> > > >      #
> > > >      CONFIG_IMX_GPCV2_PM_DOMAINS=y
> > > >      CONFIG_SOC_IMX8M=y
> > > >      # CONFIG_SOC_IMX9 is not set
> > > >      CONFIG_IMX8M_BLK_CTRL=y
> > > >      # end of i.MX SoC drivers
> > > > 
> > > > 
> > > > > If you didn't find any hint there, you might want to place a
> > > > > dev_err_probe with a suitable message at the place where -EPROBE_DEFER
> > > > > was returned.
> > > > 
> > > > I will try that.
> > > 
> > > Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
> > > noc/interconnect driver. This could also the problem for you vpu issue.
> > 
> > I do not have that enabled. Enabling that fixes the USB probing.
> > So that is good, thanks.
> > 
> > It doesn't fix the other problem I mentioned with the vpu pgc nodes though.
> > I do get some extra messages now with this enabled and the 6.1 kernel:
> > 
> >     imx-pgc imx-pgc-domain.8: failed to command PGC
> >     imx-pgc imx-pgc-domain.8: failed to command PGC
> >     imx8m-blk-ctrl 38330000.blk-ctrl: deferred probe timeout, ignoring dependency
> >     imx8m-blk-ctrl 38330000.blk-ctrl: error -110: failed to attach power domain "g1"
> >     imx8m-blk-ctrl: probe of 38330000.blk-ctrl failed with error -110
> 
> Okay, this seems more like a "real" issue not related to some missing
> drivers. I followed the code and found a poll within the
> imx_pgc_power_up() in gpcv2.c. Power-domain 8 is the vpumix domain which
> is used as power-domain for the g1 power-domain. My assumption is that
> this poll does run into the timeout. Maybe Peng can support you here
> since I didn't had the time for to test the VPUs yet and he did the
> integration patches.
> 
> Just ignore the errors if you don't use the VPUs or disable the
> blk-ctrl@38330000 node via status = "disabled".

I forgot to ask: Does your i.MX8MP have a VPU? There are i.MX8MP devices
(don't know the name) which don't have support for certain IPs. If this
is the case the bootloader will fixup your devicetree by disable the
corresponding nodes, we call this feature-controller:

https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mp.dtsi

As you can see the imx8mp.dtsi is missing the feature bits for the VPU
but you can check the i.mx8mm.dtsi. Here you can see that barebox will
check the availability of the vpu:

https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mm.dtsi

Regards,
  Marco

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-28 13:51                   ` Marco Felsch
  0 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2023-03-28 13:51 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Markus.Niebel, Ahmad Fatoum,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

On 23-03-28, Marco Felsch wrote:
> Hi Greg,
> 
> On 23-03-28, Greg Ungerer wrote:
> > Hi Marco,
> > 
> > On 28/3/23 17:33, Marco Felsch wrote:
> > > Hi Greg,
> > > 
> > > On 23-03-27, Greg Ungerer wrote:
> > > > Hi Ahmad,
> > > > 
> > > > On 27/3/23 17:16, Ahmad Fatoum wrote:
> > > > > On 27.03.23 08:27, Alexander Stein wrote:
> > > > > > Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
> > > > > > > Any thoughts on why this breaks USB?
> > > > > > 
> > > > > > Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
> > > > > 
> > > > > And if that's the case, did you check /sys/kernel/debug/devices_deferred
> > > > > to see if there was any indication that this is the reason?
> > > > 
> > > > Yeah, it does:
> > > > 
> > > >      # cat /sys/kernel/debug/devices_deferred
> > > >      32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
> > > >      32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
> > > >      32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
> > > >      381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
> > > >      382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
> > > >      imx-pgc-domain.11	
> > > >      imx-pgc-domain.12	
> > > >      imx-pgc-domain.13	
> > > >      38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
> > > >      32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
> > > > 
> > > > As far as I can tell blk-ctrl should be good:
> > > > 
> > > >      #
> > > >      # i.MX SoC drivers
> > > >      #
> > > >      CONFIG_IMX_GPCV2_PM_DOMAINS=y
> > > >      CONFIG_SOC_IMX8M=y
> > > >      # CONFIG_SOC_IMX9 is not set
> > > >      CONFIG_IMX8M_BLK_CTRL=y
> > > >      # end of i.MX SoC drivers
> > > > 
> > > > 
> > > > > If you didn't find any hint there, you might want to place a
> > > > > dev_err_probe with a suitable message at the place where -EPROBE_DEFER
> > > > > was returned.
> > > > 
> > > > I will try that.
> > > 
> > > Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
> > > noc/interconnect driver. This could also the problem for you vpu issue.
> > 
> > I do not have that enabled. Enabling that fixes the USB probing.
> > So that is good, thanks.
> > 
> > It doesn't fix the other problem I mentioned with the vpu pgc nodes though.
> > I do get some extra messages now with this enabled and the 6.1 kernel:
> > 
> >     imx-pgc imx-pgc-domain.8: failed to command PGC
> >     imx-pgc imx-pgc-domain.8: failed to command PGC
> >     imx8m-blk-ctrl 38330000.blk-ctrl: deferred probe timeout, ignoring dependency
> >     imx8m-blk-ctrl 38330000.blk-ctrl: error -110: failed to attach power domain "g1"
> >     imx8m-blk-ctrl: probe of 38330000.blk-ctrl failed with error -110
> 
> Okay, this seems more like a "real" issue not related to some missing
> drivers. I followed the code and found a poll within the
> imx_pgc_power_up() in gpcv2.c. Power-domain 8 is the vpumix domain which
> is used as power-domain for the g1 power-domain. My assumption is that
> this poll does run into the timeout. Maybe Peng can support you here
> since I didn't had the time for to test the VPUs yet and he did the
> integration patches.
> 
> Just ignore the errors if you don't use the VPUs or disable the
> blk-ctrl@38330000 node via status = "disabled".

I forgot to ask: Does your i.MX8MP have a VPU? There are i.MX8MP devices
(don't know the name) which don't have support for certain IPs. If this
is the case the bootloader will fixup your devicetree by disable the
corresponding nodes, we call this feature-controller:

https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mp.dtsi

As you can see the imx8mp.dtsi is missing the feature bits for the VPU
but you can check the i.mx8mm.dtsi. Here you can see that barebox will
check the availability of the vpu:

https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mm.dtsi

Regards,
  Marco

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-28 13:51                   ` Marco Felsch
@ 2023-03-28 14:34                     ` Greg Ungerer
  -1 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-28 14:34 UTC (permalink / raw)
  To: Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Markus.Niebel, Ahmad Fatoum,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

Hi Marco,

On 28/3/23 23:51, Marco Felsch wrote:
> On 23-03-28, Marco Felsch wrote:
>> Hi Greg,
>>
>> On 23-03-28, Greg Ungerer wrote:
>>> Hi Marco,
>>>
>>> On 28/3/23 17:33, Marco Felsch wrote:
>>>> Hi Greg,
>>>>
>>>> On 23-03-27, Greg Ungerer wrote:
>>>>> Hi Ahmad,
>>>>>
>>>>> On 27/3/23 17:16, Ahmad Fatoum wrote:
>>>>>> On 27.03.23 08:27, Alexander Stein wrote:
>>>>>>> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>>>>>>>> Any thoughts on why this breaks USB?
>>>>>>>
>>>>>>> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
>>>>>>
>>>>>> And if that's the case, did you check /sys/kernel/debug/devices_deferred
>>>>>> to see if there was any indication that this is the reason?
>>>>>
>>>>> Yeah, it does:
>>>>>
>>>>>       # cat /sys/kernel/debug/devices_deferred
>>>>>       32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
>>>>>       32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
>>>>>       32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
>>>>>       381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>>>>>       382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>>>>>       imx-pgc-domain.11	
>>>>>       imx-pgc-domain.12	
>>>>>       imx-pgc-domain.13	
>>>>>       38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
>>>>>       32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
>>>>>
>>>>> As far as I can tell blk-ctrl should be good:
>>>>>
>>>>>       #
>>>>>       # i.MX SoC drivers
>>>>>       #
>>>>>       CONFIG_IMX_GPCV2_PM_DOMAINS=y
>>>>>       CONFIG_SOC_IMX8M=y
>>>>>       # CONFIG_SOC_IMX9 is not set
>>>>>       CONFIG_IMX8M_BLK_CTRL=y
>>>>>       # end of i.MX SoC drivers
>>>>>
>>>>>
>>>>>> If you didn't find any hint there, you might want to place a
>>>>>> dev_err_probe with a suitable message at the place where -EPROBE_DEFER
>>>>>> was returned.
>>>>>
>>>>> I will try that.
>>>>
>>>> Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
>>>> noc/interconnect driver. This could also the problem for you vpu issue.
>>>
>>> I do not have that enabled. Enabling that fixes the USB probing.
>>> So that is good, thanks.
>>>
>>> It doesn't fix the other problem I mentioned with the vpu pgc nodes though.
>>> I do get some extra messages now with this enabled and the 6.1 kernel:
>>>
>>>      imx-pgc imx-pgc-domain.8: failed to command PGC
>>>      imx-pgc imx-pgc-domain.8: failed to command PGC
>>>      imx8m-blk-ctrl 38330000.blk-ctrl: deferred probe timeout, ignoring dependency
>>>      imx8m-blk-ctrl 38330000.blk-ctrl: error -110: failed to attach power domain "g1"
>>>      imx8m-blk-ctrl: probe of 38330000.blk-ctrl failed with error -110
>>
>> Okay, this seems more like a "real" issue not related to some missing
>> drivers. I followed the code and found a poll within the
>> imx_pgc_power_up() in gpcv2.c. Power-domain 8 is the vpumix domain which
>> is used as power-domain for the g1 power-domain. My assumption is that
>> this poll does run into the timeout. Maybe Peng can support you here
>> since I didn't had the time for to test the VPUs yet and he did the
>> integration patches.
>>
>> Just ignore the errors if you don't use the VPUs or disable the
>> blk-ctrl@38330000 node via status = "disabled".
> 
> I forgot to ask: Does your i.MX8MP have a VPU? There are i.MX8MP devices
> (don't know the name) which don't have support for certain IPs. If this

The hardware platform I have is using the MIMX8ML4CVNKZAB "i.MX 8M Plus QuadLite"
(https://www.nxp.com/part/MIMX8ML4CVNKZAB#/) which does not have the hardware
video encode/decoder module (like the "i.MX 8M Plus Quad" parts).


> is the case the bootloader will fixup your devicetree by disable the
> corresponding nodes, we call this feature-controller:
> 
> https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mp.dtsi
> 
> As you can see the imx8mp.dtsi is missing the feature bits for the VPU
> but you can check the i.mx8mm.dtsi. Here you can see that barebox will
> check the availability of the vpu:
> 
> https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mm.dtsi

Ok, thanks, I'll take a look.

Regards
Greg



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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-28 14:34                     ` Greg Ungerer
  0 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-28 14:34 UTC (permalink / raw)
  To: Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Markus.Niebel, Ahmad Fatoum,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

Hi Marco,

On 28/3/23 23:51, Marco Felsch wrote:
> On 23-03-28, Marco Felsch wrote:
>> Hi Greg,
>>
>> On 23-03-28, Greg Ungerer wrote:
>>> Hi Marco,
>>>
>>> On 28/3/23 17:33, Marco Felsch wrote:
>>>> Hi Greg,
>>>>
>>>> On 23-03-27, Greg Ungerer wrote:
>>>>> Hi Ahmad,
>>>>>
>>>>> On 27/3/23 17:16, Ahmad Fatoum wrote:
>>>>>> On 27.03.23 08:27, Alexander Stein wrote:
>>>>>>> Am Montag, 27. März 2023, 06:50:37 CEST schrieb Greg Ungerer:
>>>>>>>> Any thoughts on why this breaks USB?
>>>>>>>
>>>>>>> Maybe you are missing CONFIG_INTERCONNECT_IMX8MP?
>>>>>>
>>>>>> And if that's the case, did you check /sys/kernel/debug/devices_deferred
>>>>>> to see if there was any indication that this is the reason?
>>>>>
>>>>> Yeah, it does:
>>>>>
>>>>>       # cat /sys/kernel/debug/devices_deferred
>>>>>       32f10100.usb	platform: supplier 32f10000.blk-ctrl not ready
>>>>>       32f10108.usb	platform: supplier 32f10000.blk-ctrl not ready
>>>>>       32ec0000.blk-ctrl	imx8m-blk-ctrl: failed to get noc entries
>>>>>       381f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>>>>>       382f0040.usb-phy	platform: supplier 32f10000.blk-ctrl not ready
>>>>>       imx-pgc-domain.11	
>>>>>       imx-pgc-domain.12	
>>>>>       imx-pgc-domain.13	
>>>>>       38330000.blk-ctrl	platform: supplier imx-pgc-domain.11 not ready
>>>>>       32f10000.blk-ctrl	imx8mp-blk-ctrl: failed to get noc entries
>>>>>
>>>>> As far as I can tell blk-ctrl should be good:
>>>>>
>>>>>       #
>>>>>       # i.MX SoC drivers
>>>>>       #
>>>>>       CONFIG_IMX_GPCV2_PM_DOMAINS=y
>>>>>       CONFIG_SOC_IMX8M=y
>>>>>       # CONFIG_SOC_IMX9 is not set
>>>>>       CONFIG_IMX8M_BLK_CTRL=y
>>>>>       # end of i.MX SoC drivers
>>>>>
>>>>>
>>>>>> If you didn't find any hint there, you might want to place a
>>>>>> dev_err_probe with a suitable message at the place where -EPROBE_DEFER
>>>>>> was returned.
>>>>>
>>>>> I will try that.
>>>>
>>>> Can you check that CONFIG_ARM_IMX_BUS_DEVFREQ is enabled? This is the
>>>> noc/interconnect driver. This could also the problem for you vpu issue.
>>>
>>> I do not have that enabled. Enabling that fixes the USB probing.
>>> So that is good, thanks.
>>>
>>> It doesn't fix the other problem I mentioned with the vpu pgc nodes though.
>>> I do get some extra messages now with this enabled and the 6.1 kernel:
>>>
>>>      imx-pgc imx-pgc-domain.8: failed to command PGC
>>>      imx-pgc imx-pgc-domain.8: failed to command PGC
>>>      imx8m-blk-ctrl 38330000.blk-ctrl: deferred probe timeout, ignoring dependency
>>>      imx8m-blk-ctrl 38330000.blk-ctrl: error -110: failed to attach power domain "g1"
>>>      imx8m-blk-ctrl: probe of 38330000.blk-ctrl failed with error -110
>>
>> Okay, this seems more like a "real" issue not related to some missing
>> drivers. I followed the code and found a poll within the
>> imx_pgc_power_up() in gpcv2.c. Power-domain 8 is the vpumix domain which
>> is used as power-domain for the g1 power-domain. My assumption is that
>> this poll does run into the timeout. Maybe Peng can support you here
>> since I didn't had the time for to test the VPUs yet and he did the
>> integration patches.
>>
>> Just ignore the errors if you don't use the VPUs or disable the
>> blk-ctrl@38330000 node via status = "disabled".
> 
> I forgot to ask: Does your i.MX8MP have a VPU? There are i.MX8MP devices
> (don't know the name) which don't have support for certain IPs. If this

The hardware platform I have is using the MIMX8ML4CVNKZAB "i.MX 8M Plus QuadLite"
(https://www.nxp.com/part/MIMX8ML4CVNKZAB#/) which does not have the hardware
video encode/decoder module (like the "i.MX 8M Plus Quad" parts).


> is the case the bootloader will fixup your devicetree by disable the
> corresponding nodes, we call this feature-controller:
> 
> https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mp.dtsi
> 
> As you can see the imx8mp.dtsi is missing the feature bits for the VPU
> but you can check the i.mx8mm.dtsi. Here you can see that barebox will
> check the availability of the vpu:
> 
> https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mm.dtsi

Ok, thanks, I'll take a look.

Regards
Greg



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-28 14:34                     ` Greg Ungerer
@ 2023-03-28 15:11                       ` Marco Felsch
  -1 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2023-03-28 15:11 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Markus.Niebel, Ahmad Fatoum,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

Hi Greg,

On 23-03-29, Greg Ungerer wrote:
> Hi Marco,

...

> > I forgot to ask: Does your i.MX8MP have a VPU? There are i.MX8MP devices
> > (don't know the name) which don't have support for certain IPs. If this
> 
> The hardware platform I have is using the MIMX8ML4CVNKZAB "i.MX 8M Plus QuadLite"
> (https://www.nxp.com/part/MIMX8ML4CVNKZAB#/) which does not have the hardware
> video encode/decoder module (like the "i.MX 8M Plus Quad" parts).

and that's the problem :) You need to update your bootloader to a
version which support disabling the VPU nodes else you will always see
the errors.

> > is the case the bootloader will fixup your devicetree by disable the
> > corresponding nodes, we call this feature-controller:
> > 
> > https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mp.dtsi
> > 
> > As you can see the imx8mp.dtsi is missing the feature bits for the VPU
> > but you can check the i.mx8mm.dtsi. Here you can see that barebox will
> > check the availability of the vpu:
> > 
> > https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mm.dtsi
> 
> Ok, thanks, I'll take a look.

Patches are welcome if you use barebox :)

Regards,
  Marco

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-28 15:11                       ` Marco Felsch
  0 siblings, 0 replies; 50+ messages in thread
From: Marco Felsch @ 2023-03-28 15:11 UTC (permalink / raw)
  To: Greg Ungerer
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Markus.Niebel, Ahmad Fatoum,
	paul.elder, gerg, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

Hi Greg,

On 23-03-29, Greg Ungerer wrote:
> Hi Marco,

...

> > I forgot to ask: Does your i.MX8MP have a VPU? There are i.MX8MP devices
> > (don't know the name) which don't have support for certain IPs. If this
> 
> The hardware platform I have is using the MIMX8ML4CVNKZAB "i.MX 8M Plus QuadLite"
> (https://www.nxp.com/part/MIMX8ML4CVNKZAB#/) which does not have the hardware
> video encode/decoder module (like the "i.MX 8M Plus Quad" parts).

and that's the problem :) You need to update your bootloader to a
version which support disabling the VPU nodes else you will always see
the errors.

> > is the case the bootloader will fixup your devicetree by disable the
> > corresponding nodes, we call this feature-controller:
> > 
> > https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mp.dtsi
> > 
> > As you can see the imx8mp.dtsi is missing the feature bits for the VPU
> > but you can check the i.mx8mm.dtsi. Here you can see that barebox will
> > check the availability of the vpu:
> > 
> > https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/imx8mm.dtsi
> 
> Ok, thanks, I'll take a look.

Patches are welcome if you use barebox :)

Regards,
  Marco

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-28 15:11                       ` Marco Felsch
@ 2023-03-31  5:55                         ` Greg Ungerer
  -1 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-31  5:55 UTC (permalink / raw)
  To: Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Markus.Niebel, Ahmad Fatoum,
	paul.elder, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

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

Hi Marco,

On 29/3/23 01:11, Marco Felsch wrote:
> Hi Greg,
> 
> On 23-03-29, Greg Ungerer wrote:
>> Hi Marco,
> 
> ...
> 
>>> I forgot to ask: Does your i.MX8MP have a VPU? There are i.MX8MP devices
>>> (don't know the name) which don't have support for certain IPs. If this
>>
>> The hardware platform I have is using the MIMX8ML4CVNKZAB "i.MX 8M Plus QuadLite"
>> (https://www.nxp.com/part/MIMX8ML4CVNKZAB#/) which does not have the hardware
>> video encode/decoder module (like the "i.MX 8M Plus Quad" parts).
> 
> and that's the problem :) You need to update your bootloader to a
> version which support disabling the VPU nodes else you will always see
> the errors.

I agree this is the problem, I don't agree that the boot loader is the
only place to fix this :-)  I should be able to generate a working devicetree
blob from the kernel that is good, and ready to use no runtime changes
required I figure.

It is not overly difficult to break out the vpu nodes and have them
only included when you have a board that has the iMX8MP-quad with the
VPU hardware blocks.

Example patch attached.

Regards
Greg

[-- Attachment #2: 0001-arm64-dts-imx8mp-separate-out-VPU-nodes.patch --]
[-- Type: text/x-patch, Size: 11867 bytes --]

From c2e6af08d090216aae8c9f992a9e64014147be9f Mon Sep 17 00:00:00 2001
From: Greg Ungerer <gerg@linux-m68k.org>
Date: Fri, 31 Mar 2023 15:47:55 +1000
Subject: [PATCH] arm64: dts: imx8mp: separate out VPU nodes

The VPU hardware module is not included in all variants of the imx8mp SoC.
It will cause errors trying to initialize when not present:

    imx-pgc imx-pgc-domain.8: failed to command PGC

Break out the VPU nodes into a new dtsi file so that only platforms
that need them include them. Platforms with the "lite" version of
the imx8mp don't need to include it.

Signed-off-by: Greg Ungerer <gerg@kernel.org>
---
 .../boot/dts/freescale/imx8mp-beacon-kit.dts  |  1 +
 .../dts/freescale/imx8mp-debix-model-a.dts    |  1 +
 .../boot/dts/freescale/imx8mp-dhcom-som.dtsi  |  1 +
 arch/arm64/boot/dts/freescale/imx8mp-evk.dts  |  1 +
 .../freescale/imx8mp-icore-mx8mp-edimm2.2.dts |  1 +
 .../boot/dts/freescale/imx8mp-msc-sm2s.dtsi   |  1 +
 .../dts/freescale/imx8mp-phycore-som.dtsi     |  1 +
 .../boot/dts/freescale/imx8mp-tqma8mpql.dtsi  |  1 +
 .../dts/freescale/imx8mp-venice-gw74xx.dts    |  1 +
 .../boot/dts/freescale/imx8mp-verdin.dtsi     |  1 +
 arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi | 80 +++++++++++++++++++
 arch/arm64/boot/dts/freescale/imx8mp.dtsi     | 77 ------------------
 12 files changed, 90 insertions(+), 77 deletions(-)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
index cdae45a48c2c..a8dde370476f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
@@ -8,6 +8,7 @@
 #include <dt-bindings/usb/pd.h>
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 #include "imx8mp-beacon-som.dtsi"
 
 / {
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts b/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts
index 2876d18f2a38..19b780594957 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts
@@ -11,6 +11,7 @@
 #include <dt-bindings/usb/pd.h>
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "Polyhex Debix Model A i.MX8MPlus board";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi
index 9cdd4234c4ca..7383222f628a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi
@@ -4,6 +4,7 @@
  */
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "DH electronics i.MX8M Plus DHCOM SoM";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
index 7816853162b3..5a146e7fa9d2 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
@@ -7,6 +7,7 @@
 
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "NXP i.MX8MPlus EVK board";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dts b/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dts
index a02b31c42db4..d7a621938720 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dts
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 #include "imx8mp-icore-mx8mp.dtsi"
 #include <dt-bindings/usb/pd.h>
 
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s.dtsi
index 5dbec71747c3..1d3bb17ac92a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s.dtsi
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 #include <dt-bindings/net/ti-dp83867.h>
 
 / {
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi
index ecc4bce6db97..12ed5402a4b4 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi
@@ -6,6 +6,7 @@
 
 #include <dt-bindings/net/ti-dp83867.h>
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "PHYTEC phyCORE-i.MX8MP";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi
index ebc29a950ba9..e3db32505d0b 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi
@@ -5,6 +5,7 @@
  */
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "TQ-Systems i.MX8MPlus TQMa8MPxL";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts b/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts
index eb51d648359b..c4552da30789 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts
@@ -11,6 +11,7 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "Gateworks Venice GW74xx i.MX8MP board";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi
index 0dd6180a8e39..100b3ea2bd4d 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 #include <dt-bindings/pwm/pwm.h>
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	chosen {
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi
new file mode 100644
index 000000000000..3ca1bdf6262c
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2019 NXP
+ */
+
+&gpc {
+	pgc {
+		pgc_vpumix: power-domain@19 {
+			#power-domain-cells = <0>;
+			reg = <IMX8MP_POWER_DOMAIN_VPUMIX>;
+			clocks =<&clk IMX8MP_CLK_VPU_ROOT>;
+		};
+
+		pgc_vpu_g1: power-domain@20 {
+			#power-domain-cells = <0>;
+			power-domains = <&pgc_vpumix>;
+			reg = <IMX8MP_POWER_DOMAIN_VPU_G1>;
+			clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
+		};
+
+		pgc_vpu_g2: power-domain@21 {
+			#power-domain-cells = <0>;
+			power-domains = <&pgc_vpumix>;
+			reg = <IMX8MP_POWER_DOMAIN_VPU_G2>;
+			clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
+		};
+
+		pgc_vpu_vc8000e: power-domain@22 {
+			#power-domain-cells = <0>;
+			power-domains = <&pgc_vpumix>;
+			reg = <IMX8MP_POWER_DOMAIN_VPU_VC8000E>;
+			clocks = <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
+		};
+	};
+};
+
+&soc {
+	vpu_g1: video-codec@38300000 {
+		compatible = "nxp,imx8mm-vpu-g1";
+		reg = <0x38300000 0x10000>;
+		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
+		assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
+		assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+		assigned-clock-rates = <600000000>;
+		power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
+	};
+
+	vpu_g2: video-codec@38310000 {
+		compatible = "nxp,imx8mq-vpu-g2";
+		reg = <0x38310000 0x10000>;
+		interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
+		assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
+		assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>;
+		assigned-clock-rates = <500000000>;
+		power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
+	};
+
+	vpumix_blk_ctrl: blk-ctrl@38330000 {
+		compatible = "fsl,imx8mp-vpu-blk-ctrl", "syscon";
+		reg = <0x38330000 0x100>;
+		#power-domain-cells = <1>;
+		power-domains = <&pgc_vpumix>, <&pgc_vpu_g1>,
+				<&pgc_vpu_g2>, <&pgc_vpu_vc8000e>;
+		power-domain-names = "bus", "g1", "g2", "vc8000e";
+		clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>,
+			 <&clk IMX8MP_CLK_VPU_G2_ROOT>,
+			 <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
+		clock-names = "g1", "g2", "vc8000e";
+		assigned-clocks = <&clk IMX8MP_CLK_VPU_BUS>, <&clk IMX8MP_VPU_PLL>;
+		assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+		assigned-clock-rates = <600000000>, <600000000>;
+		interconnects = <&noc IMX8MP_ICM_VPU_G1 &noc IMX8MP_ICN_VIDEO>,
+				<&noc IMX8MP_ICM_VPU_G2 &noc IMX8MP_ICN_VIDEO>,
+				<&noc IMX8MP_ICM_VPU_H1 &noc IMX8MP_ICN_VIDEO>;
+		interconnect-names = "g1", "g2", "vc8000e";
+	};
+};
+
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 2dd60e3252f3..e35409db3240 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -625,41 +625,6 @@ pgc_ispdwp: power-domain@18 {
 						reg = <IMX8MP_POWER_DOMAIN_MEDIAMIX_ISPDWP>;
 						clocks = <&clk IMX8MP_CLK_MEDIA_ISP_ROOT>;
 					};
-
-					pgc_vpumix: power-domain@19 {
-						#power-domain-cells = <0>;
-						reg = <IMX8MP_POWER_DOMAIN_VPUMIX>;
-						clocks =<&clk IMX8MP_CLK_VPU_ROOT>;
-					};
-
-					pgc_vpu_g1: power-domain@20 {
-						#power-domain-cells = <0>;
-						power-domains = <&pgc_vpumix>;
-						reg = <IMX8MP_POWER_DOMAIN_VPU_G1>;
-						clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
-					};
-
-					pgc_vpu_g2: power-domain@21 {
-						#power-domain-cells = <0>;
-						power-domains = <&pgc_vpumix>;
-						reg = <IMX8MP_POWER_DOMAIN_VPU_G2>;
-						clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
-					};
-
-					pgc_vpu_vc8000e: power-domain@22 {
-						#power-domain-cells = <0>;
-						power-domains = <&pgc_vpumix>;
-						reg = <IMX8MP_POWER_DOMAIN_VPU_VC8000E>;
-						clocks = <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
-					};
-
-					pgc_mlmix: power-domain@24 {
-						#power-domain-cells = <0>;
-						reg = <IMX8MP_POWER_DOMAIN_MLMIX>;
-						clocks = <&clk IMX8MP_CLK_ML_AXI>,
-							 <&clk IMX8MP_CLK_ML_AHB>,
-							 <&clk IMX8MP_CLK_NPU_ROOT>;
-					};
 				};
 			};
 		};
@@ -1340,48 +1305,6 @@ gpu2d: gpu@38008000 {
 			power-domains = <&pgc_gpu2d>;
 		};
 
-		vpu_g1: video-codec@38300000 {
-			compatible = "nxp,imx8mm-vpu-g1";
-			reg = <0x38300000 0x10000>;
-			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
-			assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
-			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
-			assigned-clock-rates = <600000000>;
-			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
-		};
-
-		vpu_g2: video-codec@38310000 {
-			compatible = "nxp,imx8mq-vpu-g2";
-			reg = <0x38310000 0x10000>;
-			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
-			assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
-			assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>;
-			assigned-clock-rates = <500000000>;
-			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
-		};
-
-		vpumix_blk_ctrl: blk-ctrl@38330000 {
-			compatible = "fsl,imx8mp-vpu-blk-ctrl", "syscon";
-			reg = <0x38330000 0x100>;
-			#power-domain-cells = <1>;
-			power-domains = <&pgc_vpumix>, <&pgc_vpu_g1>,
-					<&pgc_vpu_g2>, <&pgc_vpu_vc8000e>;
-			power-domain-names = "bus", "g1", "g2", "vc8000e";
-			clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>,
-				 <&clk IMX8MP_CLK_VPU_G2_ROOT>,
-				 <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
-			clock-names = "g1", "g2", "vc8000e";
-			assigned-clocks = <&clk IMX8MP_CLK_VPU_BUS>, <&clk IMX8MP_VPU_PLL>;
-			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
-			assigned-clock-rates = <600000000>, <600000000>;
-			interconnects = <&noc IMX8MP_ICM_VPU_G1 &noc IMX8MP_ICN_VIDEO>,
-					<&noc IMX8MP_ICM_VPU_G2 &noc IMX8MP_ICN_VIDEO>,
-					<&noc IMX8MP_ICM_VPU_H1 &noc IMX8MP_ICN_VIDEO>;
-			interconnect-names = "g1", "g2", "vc8000e";
-		};
-
 		gic: interrupt-controller@38800000 {
 			compatible = "arm,gic-v3";
 			reg = <0x38800000 0x10000>,
-- 
2.25.1


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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-31  5:55                         ` Greg Ungerer
  0 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-31  5:55 UTC (permalink / raw)
  To: Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Markus.Niebel, Ahmad Fatoum,
	paul.elder, linux-imx, devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

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

Hi Marco,

On 29/3/23 01:11, Marco Felsch wrote:
> Hi Greg,
> 
> On 23-03-29, Greg Ungerer wrote:
>> Hi Marco,
> 
> ...
> 
>>> I forgot to ask: Does your i.MX8MP have a VPU? There are i.MX8MP devices
>>> (don't know the name) which don't have support for certain IPs. If this
>>
>> The hardware platform I have is using the MIMX8ML4CVNKZAB "i.MX 8M Plus QuadLite"
>> (https://www.nxp.com/part/MIMX8ML4CVNKZAB#/) which does not have the hardware
>> video encode/decoder module (like the "i.MX 8M Plus Quad" parts).
> 
> and that's the problem :) You need to update your bootloader to a
> version which support disabling the VPU nodes else you will always see
> the errors.

I agree this is the problem, I don't agree that the boot loader is the
only place to fix this :-)  I should be able to generate a working devicetree
blob from the kernel that is good, and ready to use no runtime changes
required I figure.

It is not overly difficult to break out the vpu nodes and have them
only included when you have a board that has the iMX8MP-quad with the
VPU hardware blocks.

Example patch attached.

Regards
Greg

[-- Attachment #2: 0001-arm64-dts-imx8mp-separate-out-VPU-nodes.patch --]
[-- Type: text/x-patch, Size: 11867 bytes --]

From c2e6af08d090216aae8c9f992a9e64014147be9f Mon Sep 17 00:00:00 2001
From: Greg Ungerer <gerg@linux-m68k.org>
Date: Fri, 31 Mar 2023 15:47:55 +1000
Subject: [PATCH] arm64: dts: imx8mp: separate out VPU nodes

The VPU hardware module is not included in all variants of the imx8mp SoC.
It will cause errors trying to initialize when not present:

    imx-pgc imx-pgc-domain.8: failed to command PGC

Break out the VPU nodes into a new dtsi file so that only platforms
that need them include them. Platforms with the "lite" version of
the imx8mp don't need to include it.

Signed-off-by: Greg Ungerer <gerg@kernel.org>
---
 .../boot/dts/freescale/imx8mp-beacon-kit.dts  |  1 +
 .../dts/freescale/imx8mp-debix-model-a.dts    |  1 +
 .../boot/dts/freescale/imx8mp-dhcom-som.dtsi  |  1 +
 arch/arm64/boot/dts/freescale/imx8mp-evk.dts  |  1 +
 .../freescale/imx8mp-icore-mx8mp-edimm2.2.dts |  1 +
 .../boot/dts/freescale/imx8mp-msc-sm2s.dtsi   |  1 +
 .../dts/freescale/imx8mp-phycore-som.dtsi     |  1 +
 .../boot/dts/freescale/imx8mp-tqma8mpql.dtsi  |  1 +
 .../dts/freescale/imx8mp-venice-gw74xx.dts    |  1 +
 .../boot/dts/freescale/imx8mp-verdin.dtsi     |  1 +
 arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi | 80 +++++++++++++++++++
 arch/arm64/boot/dts/freescale/imx8mp.dtsi     | 77 ------------------
 12 files changed, 90 insertions(+), 77 deletions(-)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
index cdae45a48c2c..a8dde370476f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
@@ -8,6 +8,7 @@
 #include <dt-bindings/usb/pd.h>
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 #include "imx8mp-beacon-som.dtsi"
 
 / {
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts b/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts
index 2876d18f2a38..19b780594957 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts
@@ -11,6 +11,7 @@
 #include <dt-bindings/usb/pd.h>
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "Polyhex Debix Model A i.MX8MPlus board";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi
index 9cdd4234c4ca..7383222f628a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi
@@ -4,6 +4,7 @@
  */
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "DH electronics i.MX8M Plus DHCOM SoM";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
index 7816853162b3..5a146e7fa9d2 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
@@ -7,6 +7,7 @@
 
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "NXP i.MX8MPlus EVK board";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dts b/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dts
index a02b31c42db4..d7a621938720 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-icore-mx8mp-edimm2.2.dts
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 #include "imx8mp-icore-mx8mp.dtsi"
 #include <dt-bindings/usb/pd.h>
 
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s.dtsi
index 5dbec71747c3..1d3bb17ac92a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-msc-sm2s.dtsi
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 #include <dt-bindings/net/ti-dp83867.h>
 
 / {
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi
index ecc4bce6db97..12ed5402a4b4 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi
@@ -6,6 +6,7 @@
 
 #include <dt-bindings/net/ti-dp83867.h>
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "PHYTEC phyCORE-i.MX8MP";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi
index ebc29a950ba9..e3db32505d0b 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql.dtsi
@@ -5,6 +5,7 @@
  */
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "TQ-Systems i.MX8MPlus TQMa8MPxL";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts b/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts
index eb51d648359b..c4552da30789 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74xx.dts
@@ -11,6 +11,7 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	model = "Gateworks Venice GW74xx i.MX8MP board";
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi
index 0dd6180a8e39..100b3ea2bd4d 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi
@@ -6,6 +6,7 @@
 #include <dt-bindings/phy/phy-imx8-pcie.h>
 #include <dt-bindings/pwm/pwm.h>
 #include "imx8mp.dtsi"
+#include "imx8mp-vpu.dtsi"
 
 / {
 	chosen {
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi
new file mode 100644
index 000000000000..3ca1bdf6262c
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-vpu.dtsi
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2019 NXP
+ */
+
+&gpc {
+	pgc {
+		pgc_vpumix: power-domain@19 {
+			#power-domain-cells = <0>;
+			reg = <IMX8MP_POWER_DOMAIN_VPUMIX>;
+			clocks =<&clk IMX8MP_CLK_VPU_ROOT>;
+		};
+
+		pgc_vpu_g1: power-domain@20 {
+			#power-domain-cells = <0>;
+			power-domains = <&pgc_vpumix>;
+			reg = <IMX8MP_POWER_DOMAIN_VPU_G1>;
+			clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
+		};
+
+		pgc_vpu_g2: power-domain@21 {
+			#power-domain-cells = <0>;
+			power-domains = <&pgc_vpumix>;
+			reg = <IMX8MP_POWER_DOMAIN_VPU_G2>;
+			clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
+		};
+
+		pgc_vpu_vc8000e: power-domain@22 {
+			#power-domain-cells = <0>;
+			power-domains = <&pgc_vpumix>;
+			reg = <IMX8MP_POWER_DOMAIN_VPU_VC8000E>;
+			clocks = <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
+		};
+	};
+};
+
+&soc {
+	vpu_g1: video-codec@38300000 {
+		compatible = "nxp,imx8mm-vpu-g1";
+		reg = <0x38300000 0x10000>;
+		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
+		assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
+		assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+		assigned-clock-rates = <600000000>;
+		power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
+	};
+
+	vpu_g2: video-codec@38310000 {
+		compatible = "nxp,imx8mq-vpu-g2";
+		reg = <0x38310000 0x10000>;
+		interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
+		assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
+		assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>;
+		assigned-clock-rates = <500000000>;
+		power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
+	};
+
+	vpumix_blk_ctrl: blk-ctrl@38330000 {
+		compatible = "fsl,imx8mp-vpu-blk-ctrl", "syscon";
+		reg = <0x38330000 0x100>;
+		#power-domain-cells = <1>;
+		power-domains = <&pgc_vpumix>, <&pgc_vpu_g1>,
+				<&pgc_vpu_g2>, <&pgc_vpu_vc8000e>;
+		power-domain-names = "bus", "g1", "g2", "vc8000e";
+		clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>,
+			 <&clk IMX8MP_CLK_VPU_G2_ROOT>,
+			 <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
+		clock-names = "g1", "g2", "vc8000e";
+		assigned-clocks = <&clk IMX8MP_CLK_VPU_BUS>, <&clk IMX8MP_VPU_PLL>;
+		assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
+		assigned-clock-rates = <600000000>, <600000000>;
+		interconnects = <&noc IMX8MP_ICM_VPU_G1 &noc IMX8MP_ICN_VIDEO>,
+				<&noc IMX8MP_ICM_VPU_G2 &noc IMX8MP_ICN_VIDEO>,
+				<&noc IMX8MP_ICM_VPU_H1 &noc IMX8MP_ICN_VIDEO>;
+		interconnect-names = "g1", "g2", "vc8000e";
+	};
+};
+
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 2dd60e3252f3..e35409db3240 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -625,41 +625,6 @@ pgc_ispdwp: power-domain@18 {
 						reg = <IMX8MP_POWER_DOMAIN_MEDIAMIX_ISPDWP>;
 						clocks = <&clk IMX8MP_CLK_MEDIA_ISP_ROOT>;
 					};
-
-					pgc_vpumix: power-domain@19 {
-						#power-domain-cells = <0>;
-						reg = <IMX8MP_POWER_DOMAIN_VPUMIX>;
-						clocks =<&clk IMX8MP_CLK_VPU_ROOT>;
-					};
-
-					pgc_vpu_g1: power-domain@20 {
-						#power-domain-cells = <0>;
-						power-domains = <&pgc_vpumix>;
-						reg = <IMX8MP_POWER_DOMAIN_VPU_G1>;
-						clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
-					};
-
-					pgc_vpu_g2: power-domain@21 {
-						#power-domain-cells = <0>;
-						power-domains = <&pgc_vpumix>;
-						reg = <IMX8MP_POWER_DOMAIN_VPU_G2>;
-						clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
-					};
-
-					pgc_vpu_vc8000e: power-domain@22 {
-						#power-domain-cells = <0>;
-						power-domains = <&pgc_vpumix>;
-						reg = <IMX8MP_POWER_DOMAIN_VPU_VC8000E>;
-						clocks = <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
-					};
-
-					pgc_mlmix: power-domain@24 {
-						#power-domain-cells = <0>;
-						reg = <IMX8MP_POWER_DOMAIN_MLMIX>;
-						clocks = <&clk IMX8MP_CLK_ML_AXI>,
-							 <&clk IMX8MP_CLK_ML_AHB>,
-							 <&clk IMX8MP_CLK_NPU_ROOT>;
-					};
 				};
 			};
 		};
@@ -1340,48 +1305,6 @@ gpu2d: gpu@38008000 {
 			power-domains = <&pgc_gpu2d>;
 		};
 
-		vpu_g1: video-codec@38300000 {
-			compatible = "nxp,imx8mm-vpu-g1";
-			reg = <0x38300000 0x10000>;
-			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
-			assigned-clocks = <&clk IMX8MP_CLK_VPU_G1>;
-			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
-			assigned-clock-rates = <600000000>;
-			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G1>;
-		};
-
-		vpu_g2: video-codec@38310000 {
-			compatible = "nxp,imx8mq-vpu-g2";
-			reg = <0x38310000 0x10000>;
-			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
-			assigned-clocks = <&clk IMX8MP_CLK_VPU_G2>;
-			assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>;
-			assigned-clock-rates = <500000000>;
-			power-domains = <&vpumix_blk_ctrl IMX8MP_VPUBLK_PD_G2>;
-		};
-
-		vpumix_blk_ctrl: blk-ctrl@38330000 {
-			compatible = "fsl,imx8mp-vpu-blk-ctrl", "syscon";
-			reg = <0x38330000 0x100>;
-			#power-domain-cells = <1>;
-			power-domains = <&pgc_vpumix>, <&pgc_vpu_g1>,
-					<&pgc_vpu_g2>, <&pgc_vpu_vc8000e>;
-			power-domain-names = "bus", "g1", "g2", "vc8000e";
-			clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>,
-				 <&clk IMX8MP_CLK_VPU_G2_ROOT>,
-				 <&clk IMX8MP_CLK_VPU_VC8KE_ROOT>;
-			clock-names = "g1", "g2", "vc8000e";
-			assigned-clocks = <&clk IMX8MP_CLK_VPU_BUS>, <&clk IMX8MP_VPU_PLL>;
-			assigned-clock-parents = <&clk IMX8MP_VPU_PLL_OUT>;
-			assigned-clock-rates = <600000000>, <600000000>;
-			interconnects = <&noc IMX8MP_ICM_VPU_G1 &noc IMX8MP_ICN_VIDEO>,
-					<&noc IMX8MP_ICM_VPU_G2 &noc IMX8MP_ICN_VIDEO>,
-					<&noc IMX8MP_ICM_VPU_H1 &noc IMX8MP_ICN_VIDEO>;
-			interconnect-names = "g1", "g2", "vc8000e";
-		};
-
 		gic: interrupt-controller@38800000 {
 			compatible = "arm,gic-v3";
 			reg = <0x38800000 0x10000>,
-- 
2.25.1


[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-31  5:55                         ` Greg Ungerer
@ 2023-03-31  7:45                           ` Markus Niebel
  -1 siblings, 0 replies; 50+ messages in thread
From: Markus Niebel @ 2023-03-31  7:45 UTC (permalink / raw)
  To: Greg Ungerer, Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Ahmad Fatoum, paul.elder, linux-imx,
	devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

Hi Greg,

Am Freitag, dem 31.03.2023 um 15:55 +1000 schrieb Greg Ungerer:
> Hi Marco,
> 
> On 29/3/23 01:11, Marco Felsch wrote:
> > Hi Greg,
> > 
> > On 23-03-29, Greg Ungerer wrote:
> > > Hi Marco,
> > 
> > ...
> > 
> > > > I forgot to ask: Does your i.MX8MP have a VPU? There are
> > > > i.MX8MP devices
> > > > (don't know the name) which don't have support for certain IPs.
> > > > If this
> > > 
> > > The hardware platform I have is using the MIMX8ML4CVNKZAB "i.MX
> > > 8M Plus QuadLite"
> > > (https://www.nxp.com/part/MIMX8ML4CVNKZAB#/) which does not have
> > > the hardware
> > > video encode/decoder module (like the "i.MX 8M Plus Quad" parts).
> > 
> > and that's the problem :) You need to update your bootloader to a
> > version which support disabling the VPU nodes else you will always
> > see
> > the errors.
> 
> I agree this is the problem, I don't agree that the boot loader is
> the
> only place to fix this :-)  I should be able to generate a working
> devicetree
> blob from the kernel that is good, and ready to use no runtime
> changes
> required I figure.
> 

Just to point out: the approach of run time fixing in boot loader is
used for the other i.MX8M SOC, too. If you know exactly what SOC type
is assembled, you could disable non available IP in the board part of
your tree.

> It is not overly difficult to break out the vpu nodes and have them
> only included when you have a board that has the iMX8MP-quad with the
> VPU hardware blocks.
> 

Depending on the SOC type there is more to look for than the VPU: core
count, ISP, NPU - just to mention a few. Current approach allows to
keep a single tree for all types.

Regards, Markus

-- 
-- 
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] 50+ messages in thread

* Re: Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-31  7:45                           ` Markus Niebel
  0 siblings, 0 replies; 50+ messages in thread
From: Markus Niebel @ 2023-03-31  7:45 UTC (permalink / raw)
  To: Greg Ungerer, Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, Ahmad Fatoum, paul.elder, linux-imx,
	devicetree, Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

Hi Greg,

Am Freitag, dem 31.03.2023 um 15:55 +1000 schrieb Greg Ungerer:
> Hi Marco,
> 
> On 29/3/23 01:11, Marco Felsch wrote:
> > Hi Greg,
> > 
> > On 23-03-29, Greg Ungerer wrote:
> > > Hi Marco,
> > 
> > ...
> > 
> > > > I forgot to ask: Does your i.MX8MP have a VPU? There are
> > > > i.MX8MP devices
> > > > (don't know the name) which don't have support for certain IPs.
> > > > If this
> > > 
> > > The hardware platform I have is using the MIMX8ML4CVNKZAB "i.MX
> > > 8M Plus QuadLite"
> > > (https://www.nxp.com/part/MIMX8ML4CVNKZAB#/) which does not have
> > > the hardware
> > > video encode/decoder module (like the "i.MX 8M Plus Quad" parts).
> > 
> > and that's the problem :) You need to update your bootloader to a
> > version which support disabling the VPU nodes else you will always
> > see
> > the errors.
> 
> I agree this is the problem, I don't agree that the boot loader is
> the
> only place to fix this :-)  I should be able to generate a working
> devicetree
> blob from the kernel that is good, and ready to use no runtime
> changes
> required I figure.
> 

Just to point out: the approach of run time fixing in boot loader is
used for the other i.MX8M SOC, too. If you know exactly what SOC type
is assembled, you could disable non available IP in the board part of
your tree.

> It is not overly difficult to break out the vpu nodes and have them
> only included when you have a board that has the iMX8MP-quad with the
> VPU hardware blocks.
> 

Depending on the SOC type there is more to look for than the VPU: core
count, ISP, NPU - just to mention a few. Current approach allows to
keep a single tree for all types.

Regards, Markus

-- 
-- 
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/


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-31  7:45                           ` Markus Niebel
@ 2023-03-31  8:11                             ` Ahmad Fatoum
  -1 siblings, 0 replies; 50+ messages in thread
From: Ahmad Fatoum @ 2023-03-31  8:11 UTC (permalink / raw)
  To: Markus Niebel, Greg Ungerer, Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, paul.elder, linux-imx, devicetree,
	Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

On 31.03.23 09:45, Markus Niebel wrote:
> Am Freitag, dem 31.03.2023 um 15:55 +1000 schrieb Greg Ungerer:
>> On 29/3/23 01:11, Marco Felsch wrote:
>>> On 23-03-29, Greg Ungerer wrote:
>> I agree this is the problem, I don't agree that the boot loader is
>> the
>> only place to fix this :-)  I should be able to generate a working
>> devicetree
>> blob from the kernel that is good, and ready to use no runtime
>> changes
>> required I figure.
>>
> 
> Just to point out: the approach of run time fixing in boot loader is
> used for the other i.MX8M SOC, too. If you know exactly what SOC type
> is assembled, you could disable non available IP in the board part of
> your tree.
> 
>> It is not overly difficult to break out the vpu nodes and have them
>> only included when you have a board that has the iMX8MP-quad with the
>> VPU hardware blocks.

This breaks out-of-tree DTs that include imx8mp.dtsi. Logic should be the
other way round: imx8mp.dtsi is full-featured SoC and any new includes
strip away, not add nodes.

> Depending on the SOC type there is more to look for than the VPU: core
> count, ISP, NPU - just to mention a few. Current approach allows to
> keep a single tree for all types.

+1.

@Greg, does your board always ship with an i.MX8MPLite? If so, just
disable VPUs in your board DT.

If it ships with either VPUs available or not and you don't want to do
bootloader fixups, you may want to check out Kbuild's ability to apply
DT overlays at build time. This would give you separate DTs for each
variant while not having an extra file for every combination.

Cheers,
Ahmad


> 
> Regards, Markus
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-31  8:11                             ` Ahmad Fatoum
  0 siblings, 0 replies; 50+ messages in thread
From: Ahmad Fatoum @ 2023-03-31  8:11 UTC (permalink / raw)
  To: Markus Niebel, Greg Ungerer, Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, paul.elder, linux-imx, devicetree,
	Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach

On 31.03.23 09:45, Markus Niebel wrote:
> Am Freitag, dem 31.03.2023 um 15:55 +1000 schrieb Greg Ungerer:
>> On 29/3/23 01:11, Marco Felsch wrote:
>>> On 23-03-29, Greg Ungerer wrote:
>> I agree this is the problem, I don't agree that the boot loader is
>> the
>> only place to fix this :-)  I should be able to generate a working
>> devicetree
>> blob from the kernel that is good, and ready to use no runtime
>> changes
>> required I figure.
>>
> 
> Just to point out: the approach of run time fixing in boot loader is
> used for the other i.MX8M SOC, too. If you know exactly what SOC type
> is assembled, you could disable non available IP in the board part of
> your tree.
> 
>> It is not overly difficult to break out the vpu nodes and have them
>> only included when you have a board that has the iMX8MP-quad with the
>> VPU hardware blocks.

This breaks out-of-tree DTs that include imx8mp.dtsi. Logic should be the
other way round: imx8mp.dtsi is full-featured SoC and any new includes
strip away, not add nodes.

> Depending on the SOC type there is more to look for than the VPU: core
> count, ISP, NPU - just to mention a few. Current approach allows to
> keep a single tree for all types.

+1.

@Greg, does your board always ship with an i.MX8MPLite? If so, just
disable VPUs in your board DT.

If it ships with either VPUs available or not and you don't want to do
bootloader fixups, you may want to check out Kbuild's ability to apply
DT overlays at build time. This would give you separate DTs for each
variant while not having an extra file for every combination.

Cheers,
Ahmad


> 
> Regards, Markus
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
  2023-03-31  8:11                             ` Ahmad Fatoum
@ 2023-03-31 15:09                               ` Greg Ungerer
  -1 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-31 15:09 UTC (permalink / raw)
  To: Ahmad Fatoum, Markus Niebel, Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, paul.elder, linux-imx, devicetree,
	Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach



On 31/3/23 18:11, Ahmad Fatoum wrote:
> On 31.03.23 09:45, Markus Niebel wrote:
>> Am Freitag, dem 31.03.2023 um 15:55 +1000 schrieb Greg Ungerer:
>>> On 29/3/23 01:11, Marco Felsch wrote:
>>>> On 23-03-29, Greg Ungerer wrote:
>>> I agree this is the problem, I don't agree that the boot loader is
>>> the
>>> only place to fix this :-)  I should be able to generate a working
>>> devicetree
>>> blob from the kernel that is good, and ready to use no runtime
>>> changes
>>> required I figure.
>>>
>>
>> Just to point out: the approach of run time fixing in boot loader is
>> used for the other i.MX8M SOC, too. If you know exactly what SOC type
>> is assembled, you could disable non available IP in the board part of
>> your tree.
>>
>>> It is not overly difficult to break out the vpu nodes and have them
>>> only included when you have a board that has the iMX8MP-quad with the
>>> VPU hardware blocks.
> 
> This breaks out-of-tree DTs that include imx8mp.dtsi. Logic should be the
> other way round: imx8mp.dtsi is full-featured SoC and any new includes
> strip away, not add nodes.
> 
>> Depending on the SOC type there is more to look for than the VPU: core
>> count, ISP, NPU - just to mention a few. Current approach allows to
>> keep a single tree for all types.
> 
> +1.
> 
> @Greg, does your board always ship with an i.MX8MPLite? If so, just
> disable VPUs in your board DT.

Yes, it will only ever have the Lite. That is why I only want
to generate a devicetree blob without the VPU nodes.

Regards
Greg


> If it ships with either VPUs available or not and you don't want to do
> bootloader fixups, you may want to check out Kbuild's ability to apply
> DT overlays at build time. This would give you separate DTs for each
> variant while not having an extra file for every combination.
> 
> Cheers,
> Ahmad
> 
> 
>>
>> Regards, Markus
>>
> 

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

* Re: [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio blk ctrl
@ 2023-03-31 15:09                               ` Greg Ungerer
  0 siblings, 0 replies; 50+ messages in thread
From: Greg Ungerer @ 2023-03-31 15:09 UTC (permalink / raw)
  To: Ahmad Fatoum, Markus Niebel, Marco Felsch
  Cc: peng.fan, Alexander Stein, abailon, krzysztof.kozlowski+dt,
	festevam, abelvesa, marex, paul.elder, linux-imx, devicetree,
	Peng Fan (OSS),
	linux-pm, s.hauer, robh+dt, aford173, linux-arm-kernel,
	laurent.pinchart, linux-kernel, kernel, djakov, shawnguo,
	l.stach



On 31/3/23 18:11, Ahmad Fatoum wrote:
> On 31.03.23 09:45, Markus Niebel wrote:
>> Am Freitag, dem 31.03.2023 um 15:55 +1000 schrieb Greg Ungerer:
>>> On 29/3/23 01:11, Marco Felsch wrote:
>>>> On 23-03-29, Greg Ungerer wrote:
>>> I agree this is the problem, I don't agree that the boot loader is
>>> the
>>> only place to fix this :-)  I should be able to generate a working
>>> devicetree
>>> blob from the kernel that is good, and ready to use no runtime
>>> changes
>>> required I figure.
>>>
>>
>> Just to point out: the approach of run time fixing in boot loader is
>> used for the other i.MX8M SOC, too. If you know exactly what SOC type
>> is assembled, you could disable non available IP in the board part of
>> your tree.
>>
>>> It is not overly difficult to break out the vpu nodes and have them
>>> only included when you have a board that has the iMX8MP-quad with the
>>> VPU hardware blocks.
> 
> This breaks out-of-tree DTs that include imx8mp.dtsi. Logic should be the
> other way round: imx8mp.dtsi is full-featured SoC and any new includes
> strip away, not add nodes.
> 
>> Depending on the SOC type there is more to look for than the VPU: core
>> count, ISP, NPU - just to mention a few. Current approach allows to
>> keep a single tree for all types.
> 
> +1.
> 
> @Greg, does your board always ship with an i.MX8MPLite? If so, just
> disable VPUs in your board DT.

Yes, it will only ever have the Lite. That is why I only want
to generate a devicetree blob without the VPU nodes.

Regards
Greg


> If it ships with either VPUs available or not and you don't want to do
> bootloader fixups, you may want to check out Kbuild's ability to apply
> DT overlays at build time. This would give you separate DTs for each
> variant while not having an extra file for every combination.
> 
> Cheers,
> Ahmad
> 
> 
>>
>> Regards, Markus
>>
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-03-31 15:10 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-03  9:14 [PATCH V3 0/7] imx: blk-ctrl: Add interconnect for i.MX8MP Peng Fan (OSS)
2022-07-03  9:14 ` Peng Fan (OSS)
2022-07-03  9:14 ` [PATCH V3 1/7] dt-bindings: soc: imx: add interconnect property for i.MX8MP media blk ctrl Peng Fan (OSS)
2022-07-03  9:14   ` Peng Fan (OSS)
2022-07-03  9:14 ` [PATCH V3 2/7] dt-bindings: soc: imx: add interconnect property for i.MX8MP hdmi " Peng Fan (OSS)
2022-07-03  9:14   ` Peng Fan (OSS)
2022-07-03  9:14 ` [PATCH V3 3/7] dt-bindings: soc: imx: add interconnect property for i.MX8MP hsio " Peng Fan (OSS)
2022-07-03  9:14   ` Peng Fan (OSS)
2022-07-03  9:14 ` [PATCH V3 4/7] soc: imx: add icc paths for i.MX8MP media " Peng Fan (OSS)
2022-07-03  9:14   ` Peng Fan (OSS)
2022-07-03  9:14 ` [PATCH V3 5/7] soc: imx: add icc paths for i.MX8MP hsio/hdmi " Peng Fan (OSS)
2022-07-03  9:14   ` Peng Fan (OSS)
2022-07-03  9:14 ` [PATCH V3 6/7] arm64: dts: imx8mp: add interconnects for media " Peng Fan (OSS)
2022-07-03  9:14   ` Peng Fan (OSS)
2022-07-07 11:38   ` Marco Felsch
2022-07-07 11:38     ` Marco Felsch
2022-07-08  0:06     ` Peng Fan
2022-07-08  0:06       ` Peng Fan
2022-07-03  9:14 ` [PATCH V3 7/7] arm64: dts: imx8mp: add interconnect for hsio " Peng Fan (OSS)
2022-07-03  9:14   ` Peng Fan (OSS)
2023-03-27  4:50   ` Greg Ungerer
2023-03-27  4:50     ` Greg Ungerer
2023-03-27  6:27     ` Alexander Stein
2023-03-27  6:27       ` Alexander Stein
2023-03-27  7:16       ` Ahmad Fatoum
2023-03-27  7:16         ` Ahmad Fatoum
2023-03-27  8:07         ` Greg Ungerer
2023-03-27  8:07           ` Greg Ungerer
2023-03-28  7:33           ` Marco Felsch
2023-03-28  7:33             ` Marco Felsch
2023-03-28 12:58             ` Greg Ungerer
2023-03-28 12:58               ` Greg Ungerer
2023-03-28 13:42               ` Marco Felsch
2023-03-28 13:42                 ` Marco Felsch
2023-03-28 13:51                 ` Marco Felsch
2023-03-28 13:51                   ` Marco Felsch
2023-03-28 14:34                   ` Greg Ungerer
2023-03-28 14:34                     ` Greg Ungerer
2023-03-28 15:11                     ` Marco Felsch
2023-03-28 15:11                       ` Marco Felsch
2023-03-31  5:55                       ` Greg Ungerer
2023-03-31  5:55                         ` Greg Ungerer
2023-03-31  7:45                         ` Markus Niebel
2023-03-31  7:45                           ` Markus Niebel
2023-03-31  8:11                           ` Ahmad Fatoum
2023-03-31  8:11                             ` Ahmad Fatoum
2023-03-31 15:09                             ` Greg Ungerer
2023-03-31 15:09                               ` Greg Ungerer
2023-03-27  7:51       ` Greg Ungerer
2023-03-27  7:51         ` Greg Ungerer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.