perf/imx_ddr: Add i.MX8QM and pmu in DB (system interconnects)
Subsystems (4)
Frank Li
maintainerv2 cover perf/imx_ddr: Add i.MX8QM and pmu in DB (system interconnects)
dts: add soc specific compatible string for imx8qm, imx8qxp, imx8dxl in db. driver:
- did some cleanup
- add support for pmu in imx8dxl DB
binding:
- add compatible string for imx8qm, imx8qxp, imx8dxl in db
---
Changes in v2:
- fix binding file by move imx8qm/qxp/dxl under enum
- move clock-db-ipg clock into imx8dxl.dtsi
- Fix CHECK_DTBS warning caused in v1
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Frank Li (4):
dt-bindings: perf: fsl-imx-ddr: Add compatible string for i.MX8QM, i.MX8QXP and i.MX8DXL perf/imx_ddr: Move ida_alloc() from ddr_perf_init() to ddr_perf_probe() perf/imx_ddr: Get and enable optional clks
arm64: dts: imx8qm: add ddr perf device node
Jacky Bai (1):
arm64: dts: imx8dxl-ss-ddr: Add DB (system interconnects) pmu support for i.MX8DXL
Joakim Zhang (1):
perf/imx_ddr: Add support for PMU in DB (system interconnects)
.../devicetree/bindings/perf/fsl-imx-ddr.yaml | 29 ++++++- arch/arm64/boot/dts/freescale/imx8-ss-ddr.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8dxl-ss-ddr.dtsi | 22 ++++++ arch/arm64/boot/dts/freescale/imx8dxl.dtsi | 7 ++ arch/arm64/boot/dts/freescale/imx8qm-ss-ddr.dtsi | 19 +++++ arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 + drivers/perf/fsl_imx8_ddr_perf.c | 91 ++++++++++++++++++---- 7 files changed, 153 insertions(+), 19 deletions(-)
---
base-commit: c31b21db1c04ba719c3889a57873f0f7eff54670
change-id: 20251022-qm_dts-60145802537d
Best regards,
--
Frank Li <[email protected]>
Frank Li
maintainerPATCH v2 1/6 dt-bindings: perf: fsl-imx-ddr: Add compatible string for i.MX8QM, i.MX8QXP and i.MX8DXL
Add compatible string fsl,imx8qm-ddr-pmu, fsl,imx8qxp-ddr-pmu, which fallback to fsl,imx8-ddr-pmu and fsl,imx8dxl-db-pmu (for data bus fabric).
Add clocks, clock-names for fsl,imx8dxl-db-pmu and keep the same restriction for existing compatible strings.
---
changes in v2
- move fsl,imx8qm-ddr-pmu, fsl,imx8qxp-ddr-pmu under enum
--- .../devicetree/bindings/perf/fsl-imx-ddr.yaml | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml +28 -1
@@ -14,6 +14,7 @@ properties: oneOf: - enum: - fsl,imx8-ddr-pmu + - fsl,imx8dxl-db-pmu - fsl,imx8m-ddr-pmu - fsl,imx8mq-ddr-pmu - fsl,imx8mm-ddr-pmu
@@ -28,7 +29,10 @@ properties: - fsl,imx8mp-ddr-pmu - const: fsl,imx8m-ddr-pmu - items: - - const: fsl,imx8dxl-ddr-pmu + - enum: + - fsl,imx8dxl-ddr-pmu + - fsl,imx8qm-ddr-pmu + - fsl,imx8qxp-ddr-pmu - const: fsl,imx8-ddr-pmu - items: - enum:
@@ -43,6 +47,14 @@ properties: interrupts: maxItems: 1 + clocks: + maxItems: 2 + + clock-names: + items: + - const: ipg + - const: cnt + required: - compatible - reg
@@ -50,6 +62,21 @@ required: additionalProperties: false +allOf: + - if: + properties: + compatible: + contains: + const: fsl,imx8dxl-db-pmu + then: + required: + - clocks + - clock-names + else: + properties: + clocks: false + clock-names: false + examples: - | #include <dt-bindings/interrupt-controller/arm-gic.h>
Signature · 1 line
2.34.1
Re: [PATCH v2 1/6] dt-bindings: perf: fsl-imx-ddr: Add compatible string for i.MX8QM, i.MX8QXP and i.MX8DXL
Quoted 6 lines · Frank Li
Add compatible string fsl,imx8qm-ddr-pmu, fsl,imx8qxp-ddr-pmu, which fallback to fsl,imx8-ddr-pmu and fsl,imx8dxl-db-pmu (for data bus fabric).
Add clocks, clock-names for fsl,imx8dxl-db-pmu and keep the same restriction for existing compatible strings.
Quoted 8 lines
Signed-off-by Frank Li <[email protected]>---
changes in v2
- move fsl,imx8qm-ddr-pmu, fsl,imx8qxp-ddr-pmu under enum--- .../devicetree/bindings/perf/fsl-imx-ddr.yaml | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)
Frank Li
maintainerPATCH v2 2/6 perf/imx_ddr: Move ida_alloc() from ddr_perf_init() to ddr_perf_probe()
In reply to Frank LiMove ida_alloc() from helper ddr_perf_init() into ddr_perf_probe() to clarify why ida_free() must be called at the error path.
Add return value check for ida_alloc().
Rename label 'cpuhp_state_err' to 'idr_free' to make the code clearer, since two error paths now jump to this label.
--- drivers/perf/fsl_imx8_ddr_perf.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
drivers/perf/fsl_imx8_ddr_perf.c +12 -9
@@ -645,8 +645,8 @@ static void ddr_perf_pmu_disable(struct pmu *pmu) { } -static int ddr_perf_init (struct ddr_pmu *pmu,void __iomem *base, -struct device *dev) +static void ddr_perf_init (struct ddr_pmu *pmu,void __iomem *base, +struct device *dev) { *pmu = (struct ddr_pmu ) { .pmu = (struct pmu ) {
@@ -667,9 +667,6 @@ static int ddr_perf_init(struct ddr_pmu *pmu, void __iomem *base, .base = base, .dev = dev, }; - - pmu->id =ida_alloc (&ddr_ida,GFP_KERNEL ); -return pmu->id; }static irqreturn_t ddr_perf_irq_handler (int irq,void *p)
@@ -753,15 +750,21 @@ static int ddr_perf_probe(struct platform_device *pdev)if (!pmu)return -ENOMEM ; - num =ddr_perf_init (pmu, base, &pdev->dev); +ddr_perf_init (pmu, base, &pdev->dev);platform_set_drvdata (pdev, pmu); + num =ida_alloc (&ddr_ida,GFP_KERNEL ); +if (num <0 ) +return num; + + pmu->id = num; + name =devm_kasprintf (&pdev->dev,GFP_KERNEL ,DDR_PERF_DEV_NAME "%d" , num);if (!name) { ret = -ENOMEM ; - goto cpuhp_state_err; + goto idr_free; } pmu->devtype_data =of_device_get_match_data (&pdev->dev);
@@ -774,7 +777,7 @@ static int ddr_perf_probe(struct platform_device *pdev)if (ret <0 ) {dev_err (&pdev->dev,"cpuhp_setup_state_multi failed\n" ); - goto cpuhp_state_err; + goto idr_free; } pmu->cpuhp_state = ret;
@@ -821,7 +824,7 @@ static int ddr_perf_probe(struct platform_device *pdev)cpuhp_state_remove_instance_nocalls (pmu->cpuhp_state, &pmu->node); cpuhp_instance_err:cpuhp_remove_multi_state (pmu->cpuhp_state); -cpuhp_state_err: +idr_free:ida_free (&ddr_ida, pmu->id);dev_warn (&pdev->dev,"i.MX8 DDR Perf PMU failed (%d), disabled\n" , ret);return ret;
Signature · 1 line
2.34.1
Frank Li
maintainerPATCH v2 3/6 perf/imx_ddr: Get and enable optional clks
In reply to Frank LiGet and enable optional clks because fsl,imx8dxl-db-pmu have two clocks.
--- drivers/perf/fsl_imx8_ddr_perf.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/perf/fsl_imx8_ddr_perf.c +7 -0
@@ -5,6 +5,7 @@*/ #include <linux/bitfield.h> +#include <linux/clk.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h>
@@ -732,10 +733,12 @@ static int ddr_perf_offline_cpu(unsigned int cpu, struct hlist_node *node)static int ddr_perf_probe (struct platform_device *pdev) { +struct clk_bulk_data *clks;struct ddr_pmu *pmu;struct device_node *np;void __iomem *base;char *name; +int nclks;int num;int ret;int irq;
@@ -754,6 +757,10 @@ static int ddr_perf_probe(struct platform_device *pdev)platform_set_drvdata (pdev, pmu); + nclks =devm_clk_bulk_get_all_enabled (&pdev->dev, &clks); +if (nclks <0 ) +return dev_err_probe (&pdev->dev, nclks,"Failure get clks\n" ); + num =ida_alloc (&ddr_ida,GFP_KERNEL );if (num <0 )return num;
Signature · 1 line
2.34.1
Frank Li
maintainerPATCH v2 4/6 perf/imx_ddr: Add support for PMU in DB (system interconnects)
In reply to Frank LiFrom: Joakim Zhang <[email protected]>
There is a PMU in DB, which has the same function with PMU in DDR subsystem, the difference is PMU in DB only supports cycles, axid-read, axid-write events.
e.g.
perf stat -a -e imx8_db0/axid-read,axi_mask=0xMMMM,axi_id=0xDDDD,axi_port=0xPP,axi_channel=0xH/ cmd perf stat -a -e imx8_db0/axid-write,axi_mask=0xMMMM,axi_id=0xDDDD,axi_port=0xPP,axi_channel=0xH/ cmd
--- drivers/perf/fsl_imx8_ddr_perf.c | 65 ++++++++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 9 deletions(-)
drivers/perf/fsl_imx8_ddr_perf.c +56 -9
@@ -53,18 +53,27 @@#define to_ddr_pmu (p) container_of(p, struct ddr_pmu, pmu)#define DDR_PERF_DEV_NAME "imx8_ddr" +#define DB_PERF_DEV_NAME "imx8_db"#define DDR_CPUHP_CB_NAME DDR_PERF_DEV_NAME "_perf_pmu"static DEFINE_IDA (ddr_ida); +static DEFINE_IDA (db_ida);/* DDR Perf hardware feature */ #define DDR_CAP_AXI_ID_FILTER 0x1/* support AXI ID filter */ #define DDR_CAP_AXI_ID_FILTER_ENHANCED 0x3/* support enhanced AXI ID filter */ #define DDR_CAP_AXI_ID_PORT_CHANNEL_FILTER 0x4/* support AXI ID PORT CHANNEL filter */ +/* Perf type */ +enum fsl_ddr_type { +DDR_PERF_TYPE =0 ,/* ddr Perf (default) */ +DB_PERF_TYPE ,/* db Perf */ +}; +struct fsl_ddr_devtype_data {unsigned int quirks;/* quirks needed for different DDR Perf core */ const char *identifier;/* system PMU identifier for userspace */ +enum fsl_ddr_type type;/* types of Perf, ddr or db */ };static const struct fsl_ddr_devtype_data imx8_devtype_data;
@@ -98,6 +107,12 @@ static const struct fsl_ddr_devtype_data imx8dxl_devtype_data = { .identifier = "i.MX8DXL", }; +static const struct fsl_ddr_devtype_data imx8dxl_db_devtype_data = { + .quirks =DDR_CAP_AXI_ID_PORT_CHANNEL_FILTER , + .identifier ="i.MX8DXL" , + .type =DB_PERF_TYPE , +}; +static const struct of_device_id imx_ddr_pmu_dt_ids[] = { { .compatible ="fsl,imx8-ddr-pmu" , .data = &imx8_devtype_data}, { .compatible ="fsl,imx8m-ddr-pmu" , .data = &imx8m_devtype_data},
@@ -106,6 +121,7 @@ static const struct of_device_id imx_ddr_pmu_dt_ids[] = { { .compatible = "fsl,imx8mn-ddr-pmu", .data = &imx8mn_devtype_data}, { .compatible = "fsl,imx8mp-ddr-pmu", .data = &imx8mp_devtype_data}, { .compatible = "fsl,imx8dxl-ddr-pmu", .data = &imx8dxl_devtype_data}, + { .compatible = "fsl,imx8dxl-db-pmu", .data = &imx8dxl_db_devtype_data}, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, imx_ddr_pmu_dt_ids);
@@ -290,6 +306,18 @@ static const struct attribute_group ddr_perf_events_attr_group = { .attrs = ddr_perf_events_attrs, }; +static struct attribute *db_perf_events_attrs[] = { +IMX8_DDR_PMU_EVENT_ATTR (cycles,EVENT_CYCLES_ID ), +IMX8_DDR_PMU_EVENT_ATTR (axid-read,0x41 ), +IMX8_DDR_PMU_EVENT_ATTR (axid-write,0x42 ), +NULL , +}; + +static struct attribute_group db_perf_events_attr_group = { + .name ="events" , + .attrs = db_perf_events_attrs, +}; +PMU_FORMAT_ATTR (event,"config:0-7" );PMU_FORMAT_ATTR (axi_id,"config1:0-15" );PMU_FORMAT_ATTR (axi_mask,"config1:16-31" );
@@ -310,7 +338,7 @@ static const struct attribute_group ddr_perf_format_attr_group = { .attrs = ddr_perf_format_attrs, }; -static const struct attribute_group *attr_groups[] = { +static const struct attribute_group *ddr_attr_groups[] = { &ddr_perf_events_attr_group, &ddr_perf_format_attr_group, &ddr_perf_cpumask_attr_group,
@@ -319,6 +347,14 @@ static const struct attribute_group *attr_groups[] = { NULL, }; +static const struct attribute_group *db_attr_groups[] = { + &db_perf_events_attr_group, + &ddr_perf_format_attr_group, + &ddr_perf_cpumask_attr_group, + &ddr_perf_filter_cap_attr_group, +NULL , +}; +static bool ddr_perf_is_filtered (struct perf_event *event) {return event->attr.config ==0x41 || event->attr.config ==0x42 ;
@@ -655,7 +691,6 @@ static void ddr_perf_init(struct ddr_pmu *pmu, void __iomem *base, .parent = dev, .capabilities = PERF_PMU_CAP_NO_EXCLUDE, .task_ctx_nr = perf_invalid_context, - .attr_groups = attr_groups, .event_init = ddr_perf_event_init, .add = ddr_perf_event_add, .del = ddr_perf_event_del,
@@ -737,6 +772,7 @@ static int ddr_perf_probe(struct platform_device *pdev)struct ddr_pmu *pmu;struct device_node *np;void __iomem *base; +struct ida *ida;char *name;int nclks;int num;
@@ -761,21 +797,28 @@ static int ddr_perf_probe(struct platform_device *pdev)if (nclks <0 )return dev_err_probe (&pdev->dev, nclks,"Failure get clks\n" ); - num =ida_alloc (&ddr_ida,GFP_KERNEL ); + pmu->devtype_data =of_device_get_match_data (&pdev->dev); + + ida = pmu->devtype_data->type ==DDR_PERF_TYPE ? &ddr_ida : &db_ida; + num =ida_alloc (ida,GFP_KERNEL );if (num <0 )return num; pmu->id = num; - name =devm_kasprintf (&pdev->dev,GFP_KERNEL ,DDR_PERF_DEV_NAME "%d" , - num); +if (pmu->devtype_data->type ==DDR_PERF_TYPE ) { + pmu->pmu.attr_groups = ddr_attr_groups; + name =devm_kasprintf (&pdev->dev,GFP_KERNEL ,DDR_PERF_DEV_NAME "%d" , num); + }else { + pmu->pmu.attr_groups = db_attr_groups; + name =devm_kasprintf (&pdev->dev,GFP_KERNEL ,DB_PERF_DEV_NAME "%d" , num); + } +if (!name) { ret = -ENOMEM ; goto idr_free; } - pmu->devtype_data =of_device_get_match_data (&pdev->dev); - pmu->cpu =raw_smp_processor_id (); ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, DDR_CPUHP_CB_NAME,
@@ -832,7 +875,7 @@ static int ddr_perf_probe(struct platform_device *pdev) cpuhp_instance_err:cpuhp_remove_multi_state (pmu->cpuhp_state); idr_free: -ida_free (&ddr_ida, pmu->id); +ida_free (ida, pmu->id);dev_warn (&pdev->dev,"i.MX8 DDR Perf PMU failed (%d), disabled\n" , ret);return ret; }
@@ -846,7 +889,11 @@ static void ddr_perf_remove(struct platform_device *pdev)perf_pmu_unregister (&pmu->pmu); -ida_free (&ddr_ida, pmu->id); +if (pmu->devtype_data->type ==DDR_PERF_TYPE ) +ida_free (&ddr_ida, pmu->id); +else +ida_free (&db_ida, pmu->id); + }static struct platform_driver imx_ddr_pmu_driver = {
Signature · 1 line
2.34.1
Will Deacon
maintainerRe: [PATCH v2 4/6] perf/imx_ddr: Add support for PMU in DB (system interconnects)
Quoted 49 lines · Frank Li
From: Joakim Zhang <[email protected]>
There is a PMU in DB, which has the same function with PMU in DDR subsystem, the difference is PMU in DB only supports cycles, axid-read, axid-write events.
e.g.
perf stat -a -e imx8_db0/axid-read,axi_mask=0xMMMM,axi_id=0xDDDD,axi_port=0xPP,axi_channel=0xH/ cmd perf stat -a -e imx8_db0/axid-write,axi_mask=0xMMMM,axi_id=0xDDDD,axi_port=0xPP,axi_channel=0xH/ cmdSigned-off-by Joakim Zhang <[email protected]>Signed-off-by Frank Li <[email protected]>--- drivers/perf/fsl_imx8_ddr_perf.c | 65 ++++++++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 9 deletions(-)drivers/perf/fsl_imx8_ddr_perf.c +9
-0@@ -53,18 +53,27 @@#define to_ddr_pmu (p) container_of(p, struct ddr_pmu, pmu)#define DDR_PERF_DEV_NAME "imx8_ddr" +#define DB_PERF_DEV_NAME "imx8_db"#define DDR_CPUHP_CB_NAME DDR_PERF_DEV_NAME "_perf_pmu"static DEFINE_IDA (ddr_ida); +static DEFINE_IDA (db_ida);/* DDR Perf hardware feature */ #define DDR_CAP_AXI_ID_FILTER 0x1/* support AXI ID filter */ #define DDR_CAP_AXI_ID_FILTER_ENHANCED 0x3/* support enhanced AXI ID filter */ #define DDR_CAP_AXI_ID_PORT_CHANNEL_FILTER 0x4/* support AXI ID PORT CHANNEL filter */ +/* Perf type */ +enum fsl_ddr_type { +DDR_PERF_TYPE =0 ,/* ddr Perf (default) */ +DB_PERF_TYPE ,/* db Perf */ +}; +struct fsl_ddr_devtype_data {unsigned int quirks;/* quirks needed for different DDR Perf core */ const char *identifier;/* system PMU identifier for userspace */ +enum fsl_ddr_type type;/* types of Perf, ddr or db */ };static const struct fsl_ddr_devtype_data imx8_devtype_data;
drivers/perf/fsl_imx8_ddr_perf.c static const struct fsl_ddr_devtype_data imx8dxl_devtype_data = { · line 112
Quoted 6 lines
drivers/perf/fsl_imx8_ddr_perf.c +3
-0@@ -98,6 +107,12 @@ static const struct fsl_ddr_devtype_data imx8dxl_devtype_data = { .identifier = "i.MX8DXL", }; +static const struct fsl_ddr_devtype_data imx8dxl_db_devtype_data = { + .quirks =DDR_CAP_AXI_ID_PORT_CHANNEL_FILTER , + .identifier ="i.MX8DXL" ,
Is this identifier useful given that you don't add 'ddr_perf_identifier_attrs' here:
drivers/perf/fsl_imx8_ddr_perf.c static const struct attribute_group *attr_groups[] = { · line 356
Quoted 7 lines
drivers/perf/fsl_imx8_ddr_perf.c +7
-0+static const struct attribute_group *db_attr_groups[] = { + &db_perf_events_attr_group, + &ddr_perf_format_attr_group, + &ddr_perf_cpumask_attr_group, + &ddr_perf_filter_cap_attr_group, +NULL , +};
?
Perhaps it would be better if you avoided adding a new array of attribute groups and instead implemented the '.is_visible' callback for 'ddr_perf_events_attr_group'? That way, you avoid the duplication and you can hide everything except for the three events you want in the DB PMU.
Will
Frank Li
maintainerPATCH v2 5/6 arm64: dts: imx8qm: add ddr perf device node
In reply to Frank LiAdd ddr perf monitor device node for i.MX8QM. Change imx8-ss-ddr.dtsi's compatible string to fsl,imx8qxp-ddr-pmu. i.MX8QM overwrite to fsl,imx8qm-ddr-pmu. All fallback to fsl,imx8-ddr-pmu.
--- arch/arm64/boot/dts/freescale/imx8-ss-ddr.dtsi | 2 +- arch/arm64/boot/dts/freescale/imx8qm-ss-ddr.dtsi | 19 +++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8-ss-ddr.dtsi +1 -1
@@ -11,7 +11,7 @@ ddr_subsys: bus@5c000000 { ranges = <0x5c000000 0x0 0x5c000000 0x1000000>; ddr_pmu0: ddr-pmu@5c020000 { - compatible = "fsl,imx8-ddr-pmu"; + compatible = "fsl,imx8qxp-ddr-pmu", "fsl,imx8-ddr-pmu"; reg = <0x5c020000 0x10000>; interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>; };
arch/arm64/boot/dts/freescale/imx8qm-ss-ddr.dtsi new file +19 -0
@@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2025 NXP + * Dong Aisheng <[email protected]> + */ + +&ddr_pmu0 { + compatible = "fsl,imx8qm-ddr-pmu", "fsl,imx8-ddr-pmu"; + interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>; +}; + +&ddr_subsys { + ddr_pmu1: ddr-pmu@5c120000 { + compatible = "fsl,imx8qm-ddr-pmu", "fsl,imx8-ddr-pmu"; + reg = <0x5c120000 0x10000>; + interrupt-parent = <&gic>; + interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>; + }; +};
arch/arm64/boot/dts/freescale/imx8qm.dtsi +2 -0
@@ -635,6 +635,7 @@ vpu_dsp: dsp@556e8000 { #include "imx8-ss-img.dtsi" #include "imx8-ss-dma.dtsi" #include "imx8-ss-conn.dtsi" + #include "imx8-ss-ddr.dtsi" #include "imx8-ss-lsio.dtsi" #include "imx8-ss-hsio.dtsi" };
@@ -647,5 +648,6 @@ vpu_dsp: dsp@556e8000 { #include "imx8qm-ss-lvds.dtsi" #include "imx8qm-ss-mipi.dtsi" #include "imx8qm-ss-hsio.dtsi" +#include "imx8qm-ss-ddr.dtsi" /delete-node/ &dsp;
Signature · 1 line
2.34.1
Frank Li
maintainerPATCH v2 6/6 arm64: dts: imx8dxl-ss-ddr: Add DB (system interconnects) pmu support for i.MX8DXL
In reply to Frank LiFrom: Jacky Bai <[email protected]>
Add DB pmu related nodes. This pmu is in DB (system interconnects).
---
change in v2
- move clock-db-ipg to imx8dxl.dtsi
--- arch/arm64/boot/dts/freescale/imx8dxl-ss-ddr.dtsi | 22 ++++++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8dxl.dtsi | 7 +++++++ 2 files changed, 29 insertions(+)
arch/arm64/boot/dts/freescale/imx8dxl-ss-ddr.dtsi +22 -0
@@ -7,3 +7,25 @@ &ddr_pmu0 { compatible = "fsl,imx8dxl-ddr-pmu", "fsl,imx8-ddr-pmu"; interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; }; + +&ddr_subsys { + db_pmu0: db-pmu@5ca40000 { + compatible = "fsl,imx8dxl-db-pmu"; + reg = <0x5ca40000 0x10000>; + interrupt-parent = <&gic>; + interrupts = <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&db_pmu0_lpcg IMX_LPCG_CLK_4>, <&db_pmu0_lpcg IMX_LPCG_CLK_0>; + clock-names = "ipg", "cnt"; + }; + + db_pmu0_lpcg: clock-controller@5cae0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5cae0000 0x10000>; + #clock-cells = <1>; + clocks = <&db_ipg_clk>, <&db_ipg_clk>; + clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>; + clock-output-names = "perf_lpcg_cnt_clk", + "perf_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_PERF>; + }; +};
arch/arm64/boot/dts/freescale/imx8dxl.dtsi +7 -0
@@ -236,6 +236,13 @@ xtal24m: clock-xtal24m { clock-output-names = "xtal_24MHz"; }; + db_ipg_clk: clock-db-ipg { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <456000000>; + clock-output-names = "db_ipg_clk"; + }; + /* sorted in register address */ #include "imx8-ss-cm40.dtsi" #include "imx8-ss-adma.dtsi"
Signature · 1 line
2.34.1