Skip to content

Commit cdf826d

Browse files
committed
Portenta H7: Add spis to overlay plus fix GPIOS
This is a partial fix for: arduino#68 the spis line was not in the zephyr,user { section of the ovleray file. I added it with one entry: spis = <&spi2>; Updated: the GPIO table, that only the LEDS should be defined with GPIO_ACTIVE_LOW.
1 parent 1645143 commit cdf826d

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

loader/boards/arduino_portenta_h7_m7.conf

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ CONFIG_LLEXT_HEAP_SIZE=128
2626

2727
#CONFIG_ADC=y
2828
#CONFIG_PWM=y
29+
CONFIG_SPI_ASYNC=y
30+
CONFIG_SPI_STM32_INTERRUPT=y
2931

3032
CONFIG_NET_CORE_LOG_LEVEL_DBG=y
3133

loader/boards/arduino_portenta_h7_m7.overlay

+26-16
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
status = "okay";
2626
};
2727

28+
&spi2 {
29+
status = "okay";
30+
pinctrl-0 = <&spi2_sck_pi1
31+
&spi2_miso_pc2 &spi2_mosi_pc3>;
32+
pinctrl-names = "default";
33+
};
34+
2835
&rng {
2936
status = "okay";
3037
};
@@ -66,22 +73,24 @@
6673

6774
/ {
6875
zephyr,user {
69-
digital-pin-gpios = <&gpioh 15 GPIO_ACTIVE_LOW>,
70-
<&gpiok 1 GPIO_ACTIVE_LOW>,
71-
<&gpioj 11 GPIO_ACTIVE_LOW>,
72-
<&gpiog 7 GPIO_ACTIVE_LOW>,
73-
<&gpioc 7 GPIO_ACTIVE_LOW>,
74-
<&gpioc 6 GPIO_ACTIVE_LOW>,
75-
<&gpioa 8 GPIO_ACTIVE_LOW>,
76-
<&gpioi 0 GPIO_ACTIVE_LOW>,
77-
<&gpioc 3 GPIO_ACTIVE_LOW>,
78-
<&gpioi 1 GPIO_ACTIVE_LOW>,
79-
<&gpioc 2 GPIO_ACTIVE_LOW>,
80-
<&gpioh 8 GPIO_ACTIVE_LOW>,
81-
<&gpioh 7 GPIO_ACTIVE_LOW>,
82-
<&gpioa 10 GPIO_ACTIVE_LOW>,
83-
<&gpioa 9 GPIO_ACTIVE_LOW>,
84-
<&gpiok 5 GPIO_ACTIVE_LOW>; // LEDR
76+
digital-pin-gpios = <&gpioh 15 0>,
77+
<&gpiok 1 0>,
78+
<&gpioj 11 0>,
79+
<&gpiog 7 0>,
80+
<&gpioc 7 0>,
81+
<&gpioc 6 0>,
82+
<&gpioa 8 0>,
83+
<&gpioi 0 0>,
84+
<&gpioc 3 0>,
85+
<&gpioi 1 0>,
86+
<&gpioc 2 0>,
87+
<&gpioh 8 0>,
88+
<&gpioh 7 0>,
89+
<&gpioa 10 0>,
90+
<&gpioa 9 0>,
91+
<&gpiok 5 GPIO_ACTIVE_LOW>, // LEDR
92+
<&gpiok 6 GPIO_ACTIVE_LOW>,
93+
<&gpiok 7 GPIO_ACTIVE_LOW>;
8594

8695
builtin-led-gpios = <&gpiok 5 GPIO_ACTIVE_LOW>,
8796
<&gpiok 6 GPIO_ACTIVE_LOW>,
@@ -90,5 +99,6 @@
9099
serials = <&cdc_acm_uart0>,<&usart6>, <&usart1>, <&uart4>;
91100
cdc-acm = <&cdc_acm_uart0>;
92101
i2cs = <&i2c4>;
102+
spis = <&spi2>;
93103
};
94104
};

0 commit comments

Comments
 (0)