Commit 33f033dc authored by Georgi Djakov's avatar Georgi Djakov
Browse files

Merge branch 'icc-imx8mp' into icc-next

This patchset is to support i.MX8MP NoC settings, i.MX8MP NoC initial
value after power up is invalid, need set a valid value after related
power domain up.

This patchset also includes two patch[1,2] during my development to enable
the ICC feature for i.MX8MP.

I not include ddrc DVFS in this patchset, ths patchset is only to
support NoC value mode/priority/ext_control being set to a valid value
that suggested by i.MX Chip Design Team. The value is same as NXP
downstream one inside Arm Trusted Firmware:
https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/i/gpc.c?h=lf_v2.4#n97

Link: https://lore.kernel.org/r/20220703091132.1412063-1-peng.fan@oss.nxp.com


Signed-off-by: default avatarGeorgi Djakov <djakov@kernel.org>
parents 2be9e847 9760660e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -26,14 +26,16 @@ properties:
    oneOf:
      - items:
          - enum:
              - fsl,imx8mn-nic
              - fsl,imx8mm-nic
              - fsl,imx8mn-nic
              - fsl,imx8mp-nic
              - fsl,imx8mq-nic
          - const: fsl,imx8m-nic
      - items:
          - enum:
              - fsl,imx8mn-noc
              - fsl,imx8mm-noc
              - fsl,imx8mn-noc
              - fsl,imx8mp-noc
              - fsl,imx8mq-noc
          - const: fsl,imx8m-noc
      - const: fsl,imx8m-nic
+1 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ static const struct of_device_id imx_bus_of_match[] = {
	{ .compatible = "fsl,imx8mq-noc", .data = "imx8mq-interconnect", },
	{ .compatible = "fsl,imx8mm-noc", .data = "imx8mm-interconnect", },
	{ .compatible = "fsl,imx8mn-noc", .data = "imx8mn-interconnect", },
	{ .compatible = "fsl,imx8mp-noc", .data = "imx8mp-interconnect", },
	{ .compatible = "fsl,imx8m-noc", },
	{ .compatible = "fsl,imx8m-nic", },
	{ /* sentinel */ },
+42 −0
Original line number Diff line number Diff line
@@ -115,3 +115,45 @@ void icc_bulk_disable(int num_paths, const struct icc_bulk_data *paths)
		icc_disable(paths[num_paths].path);
}
EXPORT_SYMBOL_GPL(icc_bulk_disable);

struct icc_bulk_devres {
	struct icc_bulk_data *paths;
	int num_paths;
};

static void devm_icc_bulk_release(struct device *dev, void *res)
{
	struct icc_bulk_devres *devres = res;

	icc_bulk_put(devres->num_paths, devres->paths);
}

/**
 * devm_of_icc_bulk_get() - resource managed of_icc_bulk_get
 * @dev: the device requesting the path
 * @num_paths: the number of icc_bulk_data
 * @paths: the table with the paths we want to get
 *
 * Returns 0 on success or negative errno otherwise.
 */
int devm_of_icc_bulk_get(struct device *dev, int num_paths, struct icc_bulk_data *paths)
{
	struct icc_bulk_devres *devres;
	int ret;

	devres = devres_alloc(devm_icc_bulk_release, sizeof(*devres), GFP_KERNEL);
	if (!devres)
		return -ENOMEM;

	ret = of_icc_bulk_get(dev, num_paths, paths);
	if (!ret) {
		devres->paths = paths;
		devres->num_paths = num_paths;
		devres_add(dev, devres);
	} else {
		devres_free(devres);
	}

	return ret;
}
EXPORT_SYMBOL_GPL(devm_of_icc_bulk_get);
+4 −0
Original line number Diff line number Diff line
@@ -15,3 +15,7 @@ config INTERCONNECT_IMX8MN
config INTERCONNECT_IMX8MQ
	tristate "i.MX8MQ interconnect driver"
	depends on INTERCONNECT_IMX

config INTERCONNECT_IMX8MP
	tristate "i.MX8MP interconnect driver"
	depends on INTERCONNECT_IMX
+2 −0
Original line number Diff line number Diff line
@@ -2,8 +2,10 @@ imx-interconnect-objs := imx.o
imx8mm-interconnect-objs       		:= imx8mm.o
imx8mq-interconnect-objs       		:= imx8mq.o
imx8mn-interconnect-objs       		:= imx8mn.o
imx8mp-interconnect-objs       		:= imx8mp.o

obj-$(CONFIG_INTERCONNECT_IMX)		+= imx-interconnect.o
obj-$(CONFIG_INTERCONNECT_IMX8MM)	+= imx8mm-interconnect.o
obj-$(CONFIG_INTERCONNECT_IMX8MQ)	+= imx8mq-interconnect.o
obj-$(CONFIG_INTERCONNECT_IMX8MN)	+= imx8mn-interconnect.o
obj-$(CONFIG_INTERCONNECT_IMX8MP)	+= imx8mp-interconnect.o
Loading