Hello,
I want to define SPI outputs as highdrive outputs in a overlay file.
I know how to do this in the code:
const nrf_gpio_pin_drive_t SpiPinDrive = NRF_GPIO_PIN_H0H1; nrf_gpio_reconfigure(NRF_GPIO_PIN_MAP(1, 12), NULL, NULL, NULL, &SpiPinDrive, NULL); // CS nrf_gpio_reconfigure(NRF_GPIO_PIN_MAP(1, 13), NULL, NULL, NULL, &SpiPinDrive, NULL); // CLK nrf_gpio_reconfigure(NRF_GPIO_PIN_MAP(1, 14), NULL, NULL, NULL, &SpiPinDrive, NULL); // MOSI
But I want to do this in this overlay file:
&pinctrl {
spi4_default: spi4_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>, // CLK: P1.13 - Pin 6
<NRF_PSEL(SPIM_MOSI, 1, 14)>, // MOSI: P1.14 - Pin 5
<NRF_PSEL(SPIM_MISO, 1, 15)>; // MISO: P1.15 - Pin 2
};
};
spi4_sleep: spi4_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>, // CLK: P1.13 - Pin 6
<NRF_PSEL(SPIM_MOSI, 1, 14)>, // MOSI: P1.14 - Pin 5
<NRF_PSEL(SPIM_MISO, 1, 15)>; // MISO: P1.15 - Pin 2
low-power-enable;
};
};
};
my_spi4: &spi4 {
compatible = "nordic,nrf-spim";
status = "okay";
pinctrl-0 = <&spi4_default>;
pinctrl-1 = <&spi4_sleep>;
cs-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; // CS: P 1.12 - Pin 1
m25p40: M25P40v@0 {
compatible = "jedec,spi-nor";
label = "M25P40";
reg = < 0 >;
spi-max-frequency = < 40000000 >;
size = < 0x4000000 >;
jedec-id = [ C2 20 13 ];
};
};
How do I have to modify the overlay file to achieve this ?
I am using SDK 2.0.0 & nRF5340-DK.
Thank you !
Best regards,
Georg

