How to define an interrupt pin for SPIM in devicetree

I'am working on nRF52840-DK and nRF9160-DK.

i'd like to add an interrupt pin for a SPIM device. (eg. in the following spi_dev:)

&spi3 {

compatible = "nordic,nrf-spim";
cs-gpios = <&gpio0 0xf GPIO_ACTIVE_LOW>;


spi_dev: spi-master@0 {
reg = <0>;


};
};

i'm not sure how to add the pin in devicetree and how to get the pin in c code by devicetree API.

are there any example codes?

Related