Skip to content

Commit

Permalink
fix(boards): nrf boards missing SPI in pinctrl and dtsi, requiring us…
Browse files Browse the repository at this point in the history
…ers to manually define in their shield definitions if they wanted to use SPI
  • Loading branch information
sadekbaroudi authored and petejohanson committed Apr 25, 2024
1 parent 16e92cf commit f4a070a
Show file tree
Hide file tree
Showing 18 changed files with 140 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@

pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_spi: &spi1 {};
pro_micro_serial: &uart0 {};
17 changes: 17 additions & 0 deletions app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,21 @@
low-power-enable;
};
};

spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
<NRF_PSEL(SPIM_MISO, 0, 3)>;
};
};

spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
<NRF_PSEL(SPIM_MISO, 0, 3)>;
low-power-enable;
};
};
};
7 changes: 7 additions & 0 deletions app/boards/arm/bluemicro840/bluemicro840_v1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@
pinctrl-names = "default", "sleep";
};

&spi1 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
Expand Down
2 changes: 1 addition & 1 deletion app/boards/arm/mikoto/arduino_pro_micro_pins.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@

pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_spi: &spi1 {};
pro_micro_serial: &uart0 {};
17 changes: 17 additions & 0 deletions app/boards/arm/mikoto/mikoto_520-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,21 @@
low-power-enable;
};
};

spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 2)>,
<NRF_PSEL(SPIM_MOSI, 0, 10)>,
<NRF_PSEL(SPIM_MISO, 1, 13)>;
};
};

spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 2)>,
<NRF_PSEL(SPIM_MOSI, 0, 10)>,
<NRF_PSEL(SPIM_MISO, 1, 13)>;
low-power-enable;
};
};
};
7 changes: 7 additions & 0 deletions app/boards/arm/mikoto/mikoto_520.dts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
pinctrl-names = "default", "sleep";
};

&spi1 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
Expand Down
2 changes: 1 addition & 1 deletion app/boards/arm/nice_nano/arduino_pro_micro_pins.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@

pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_spi: &spi1 {};
pro_micro_serial: &uart0 {};
17 changes: 17 additions & 0 deletions app/boards/arm/nice_nano/nice_nano-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,21 @@
low-power-enable;
};
};

spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 10)>,
<NRF_PSEL(SPIM_MISO, 1, 11)>;
};
};

spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 10)>,
<NRF_PSEL(SPIM_MISO, 1, 11)>;
low-power-enable;
};
};
};
7 changes: 7 additions & 0 deletions app/boards/arm/nice_nano/nice_nano.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
pinctrl-names = "default", "sleep";
};

&spi1 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
Expand Down
2 changes: 1 addition & 1 deletion app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@

pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_spi: &spi1 {};
pro_micro_serial: &uart0 {};
2 changes: 1 addition & 1 deletion app/boards/arm/nrfmicro/arduino_pro_micro_pins_52833.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@

pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_spi: &spi1 {};
pro_micro_serial: &uart0 {};
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@

pro_micro_d: &pro_micro {};
pro_micro_i2c: &i2c0 {};
pro_micro_spi: &spi0 {};
pro_micro_spi: &spi1 {};
pro_micro_serial: &uart0 {};
17 changes: 17 additions & 0 deletions app/boards/arm/nrfmicro/nrfmicro-flipped-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,21 @@
low-power-enable;
};
};

spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 9)>,
<NRF_PSEL(SPIM_MOSI, 0, 10)>,
<NRF_PSEL(SPIM_MISO, 1, 6)>;
};
};

spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 9)>,
<NRF_PSEL(SPIM_MOSI, 0, 10)>,
<NRF_PSEL(SPIM_MISO, 1, 6)>;
low-power-enable;
};
};
};
17 changes: 17 additions & 0 deletions app/boards/arm/nrfmicro/nrfmicro-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,21 @@
low-power-enable;
};
};

spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
<NRF_PSEL(SPIM_MISO, 0, 3)>;
};
};

spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
<NRF_PSEL(SPIM_MISO, 0, 3)>;
low-power-enable;
};
};
};
7 changes: 7 additions & 0 deletions app/boards/arm/nrfmicro/nrfmicro_11.dts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
pinctrl-names = "default", "sleep";
};

&spi1 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
Expand Down
7 changes: 7 additions & 0 deletions app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
pinctrl-names = "default", "sleep";
};

&spi1 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
Expand Down
7 changes: 7 additions & 0 deletions app/boards/arm/nrfmicro/nrfmicro_13.dts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
pinctrl-names = "default", "sleep";
};

&spi1 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
Expand Down
7 changes: 7 additions & 0 deletions app/boards/arm/nrfmicro/nrfmicro_13_52833.dts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
pinctrl-names = "default", "sleep";
};

&spi1 {
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
Expand Down

0 comments on commit f4a070a

Please sign in to comment.