Skip to content

Commit

Permalink
soc: nxp_adsp_mimx8m: Switch to using IRQ_STEER driver
Browse files Browse the repository at this point in the history
This commit adds the changes necessary for using the IRQ_STEER
driver on the nxp_adsp_mimx8m SoC.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
  • Loading branch information
LaurentiuM1234 committed Sep 18, 2023
1 parent 5d408b0 commit 99c015a
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 21 deletions.
10 changes: 10 additions & 0 deletions boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,13 @@ CONFIG_UART_CONSOLE=y

# enable pin controller
CONFIG_PINCTRL=y

# multi-level interrupt configuration
CONFIG_MULTI_LEVEL_INTERRUPTS=y
CONFIG_2ND_LEVEL_INTERRUPTS=y
CONFIG_2ND_LVL_ISR_TBL_OFFSET=32
CONFIG_MAX_IRQ_PER_AGGREGATOR=64
CONFIG_NUM_2ND_LEVEL_AGGREGATORS=3
CONFIG_2ND_LVL_INTR_00_OFFSET=19
CONFIG_2ND_LVL_INTR_01_OFFSET=20
CONFIG_2ND_LVL_INTR_02_OFFSET=21
10 changes: 1 addition & 9 deletions dts/bindings/interrupt-controller/nxp,irqsteer-intc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,4 @@ description: i.MX DSP interrupt controller

compatible: "nxp,irqsteer-intc"

include: [interrupt-controller.yaml, base.yaml]

properties:
"#interrupt-cells":
const: 2

interrupt-cells:
- irq
- priority
include: [base.yaml]
50 changes: 44 additions & 6 deletions dts/xtensa/nxp/nxp_imx8m.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
device_type = "cpu";
compatible = "cdns,tensilica-xtensa-lx6";
reg = <0>;

#address-cells = <1>;
#size-cells = <0>;

clic: interrupt-controller@0 {
compatible = "cdns,xtensa-core-intc";
reg = <0>;
interrupt-controller;
#interrupt-cells = <3>;
};
};
};

Expand All @@ -33,12 +43,39 @@
};

soc {
interrupt-parent = <&irqsteer>;

irqsteer: interrupt-controller {
irqsteer: interrupt-controller@30a80000 {
compatible = "nxp,irqsteer-intc";
interrupt-controller;
#interrupt-cells = <2>;
reg = <0x30a80000 DT_SIZE_K(64)>;

#size-cells = <0>;
#address-cells = <1>;

chan0: interrupt-controller@0 {
compatible = "nxp,irqsteer-channel";
reg = <0>;
interrupt-controller;
#interrupt-cells = <1>;
interrupts-extended = <&clic 19 0 0>;
interrupt-channel = <0>;
};

chan1: interrupt-controller@1 {
compatible = "nxp,irqsteer-channel";
reg = <1>;
interrupt-controller;
#interrupt-cells = <1>;
interrupts-extended = <&clic 20 0 0>;
interrupt-channel = <1>;
};

chan2: interrupt-controller@2 {
compatible = "nxp,irqsteer-channel";
reg = <2>;
interrupt-controller;
#interrupt-cells = <1>;
interrupts-extended = <&clic 21 0 0>;
interrupt-channel = <2>;
};
};

ccm: ccm@30380000 {
Expand Down Expand Up @@ -71,7 +108,8 @@
mailbox0: mailbox@30e70000 {
compatible = "nxp,imx-mu-rev2";
reg = <0x30e70000 0x10000>;
interrupts = <7 0>;
interrupt-parent = <&clic>;
interrupts = <7 0 0>;
rdc = <0>;
status = "disabled";
};
Expand Down
7 changes: 7 additions & 0 deletions soc/xtensa/nxp_adsp/common/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(soc);

/* TODO: this is only temporary. Shall be removed when all i.MX8
* SoCs are changed to using the IRQ_STEER driver.
*/
#ifndef CONFIG_SOC_SERIES_NXP_IMX8M

void z_soc_irq_enable(uint32_t irq)
{
/*
Expand All @@ -45,3 +50,5 @@ int z_soc_irq_is_enabled(unsigned int irq)

return ret;
}

#endif /* CONFIG_SOC_SERIES_NXP_IMX8M */
6 changes: 0 additions & 6 deletions soc/xtensa/nxp_adsp/imx8m/Kconfig.defconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ config SYS_CLOCK_TICKS_PER_SEC
config KERNEL_ENTRY
default "__start"

config MULTI_LEVEL_INTERRUPTS
default n

config 2ND_LEVEL_INTERRUPTS
default n

config DYNAMIC_INTERRUPTS
default y

Expand Down

0 comments on commit 99c015a

Please sign in to comment.