diff --git a/tests/drivers/build_all/interrupt_controller/intc_plic/Kconfig b/tests/drivers/build_all/interrupt_controller/intc_plic/Kconfig new file mode 100644 index 000000000000000..801ad33c7c5ea9a --- /dev/null +++ b/tests/drivers/build_all/interrupt_controller/intc_plic/Kconfig @@ -0,0 +1,4 @@ +config NUM_IRQS + int "" + +source "Kconfig" diff --git a/tests/drivers/build_all/interrupt_controller/intc_plic/app.multi_instance.overlay b/tests/drivers/build_all/interrupt_controller/intc_plic/app.multi_instance.overlay new file mode 100644 index 000000000000000..0834eaa701336f4 --- /dev/null +++ b/tests/drivers/build_all/interrupt_controller/intc_plic/app.multi_instance.overlay @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2023 Meta + * + * SPDX-License-Identifier: Apache-2.0 + */ + + /{ + soc { + plic: interrupt-controller@c000000 { + has-multi-instance; + }; + + plic1: interrupt-controller@8000000 { + riscv,max-priority = <7>; + has-multi-instance; + riscv,ndev = < 0x35 >; + reg = <0x08000000 0x04000000>; + interrupts-extended = < + &hlic0 0x03 + &hlic1 0x03 + &hlic2 0x03 + &hlic3 0x03 + &hlic4 0x03 + &hlic5 0x03 + &hlic6 0x03 + &hlic7 0x03 + >; + interrupt-controller; + compatible = "sifive,plic-1.0.0"; + #address-cells = < 0x00 >; + #interrupt-cells = < 0x02 >; + }; + }; + + uart1: uart@10000100 { + interrupts = < 0x0a 1 >; + interrupt-parent = < &plic1 >; + clock-frequency = < 0x384000 >; + reg = < 0x10000100 0x100 >; + compatible = "ns16550"; + reg-shift = < 0 >; + }; +}; diff --git a/tests/drivers/build_all/interrupt_controller/intc_plic/testcase.yaml b/tests/drivers/build_all/interrupt_controller/intc_plic/testcase.yaml index e7f6fe963ecbb71..5d620a61d3e5a84 100644 --- a/tests/drivers/build_all/interrupt_controller/intc_plic/testcase.yaml +++ b/tests/drivers/build_all/interrupt_controller/intc_plic/testcase.yaml @@ -13,3 +13,13 @@ tests: drivers.interrupt_controller.intc_plic.edge_interrupt.build: extra_args: DTC_OVERLAY_FILE="./app.edge_interrupt.overlay" + drivers.interrupt_controller.intc_plic.multi_instance.build: + extra_args: + DTC_OVERLAY_FILE="./app.multi_instance.overlay" + extra_configs: + - CONFIG_NUM_IRQS=116 + - CONFIG_MULTI_LEVEL_INTERRUPTS=y + - CONFIG_DYNAMIC_INTERRUPTS=y + - CONFIG_NUM_2ND_LEVEL_AGGREGATORS=2 + - CONFIG_2ND_LVL_INTR_01_OFFSET=3 + - CONFIG_UART_INTERRUPT_DRIVEN=y