First - I haven't been able to find an example of how to configure and use "nordic,nrf-spis" in NCS. If one exists that would probably help.
I configure SPI like this in devicetree (moved to using pinctrl to avoid warnings on pindefinitions - and it seems smart although I haven't fully grasped it yet):
&pinctrl {
spi0_default: spi0_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 18)>,
<NRF_PSEL(SPIM_MISO, 0, 14)>,
<NRF_PSEL(SPIM_MOSI, 0, 16)>;
};
};
spi0_sleep: spi0_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 18)>,
<NRF_PSEL(SPIM_MISO, 0, 14)>,
<NRF_PSEL(SPIM_MOSI, 0, 16)>;
low-power-enable;
};
};
};
&spi0 {
compatible = "nordic,nrf-spis";
status = "okay";
cs-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
a: spi-dev-a@0 {
reg = <0>;
};
pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep";
def-char = <0xFF>;
};
However, I can not figure out how to access the DTC info from the code to set the pins in "nrfx_spis_config_t".
For the moment I repeat the PIN numbers in my code - obviously not what I want.
rgds Tage