Skip to content

Commit 4fe6d47

Browse files
facchinmnashif
authored andcommitted
boards: arduino_nicla_vision: fix hardware information
The board shares many features with other Arduinos based on STM32H747 (like the HSE in bypass mode). Once #76542 is merged, PF1550 support should be added too to allow switching IO voltage from 3v3 to 1v8 Signed-off-by: Martino Facchin <[email protected]>
1 parent 585fb2a commit 4fe6d47

File tree

2 files changed

+63
-8
lines changed

2 files changed

+63
-8
lines changed

boards/arduino/nicla_vision/arduino_nicla_vision_stm32h747xx_m7.dts

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@
2525
zephyr,camera = &dcmi;
2626
};
2727

28-
sdram1: sdram@c0000000 {
29-
compatible = "zephyr,memory-region", "mmio-sram";
30-
device_type = "memory";
31-
reg = <0xc0000000 DT_SIZE_M(8)>;
32-
zephyr,memory-region = "SDRAM1";
33-
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM) )>;
34-
};
35-
3628
aliases {
3729
led0 = &red_led;
3830
led1 = &green_led;
@@ -46,10 +38,12 @@
4638

4739
&clk_hse {
4840
status = "okay";
41+
hse-bypass;
4942
clock-frequency = <DT_FREQ_M(25)>;
5043
};
5144

5245
&clk_lse {
46+
lse-bypass;
5347
status = "okay";
5448
};
5549

@@ -164,6 +158,37 @@
164158
};
165159
};
166160

161+
&quadspi {
162+
pinctrl-0 = <&quadspi_clk_pf10 &quadspi_bk1_ncs_pg6
163+
&quadspi_bk1_io0_pd11 &quadspi_bk1_io1_pf9
164+
&quadspi_bk1_io2_pe2 &quadspi_bk1_io3_pd13>;
165+
pinctrl-names = "default";
166+
status = "okay";
167+
168+
n25q128a1: qspi-nor-flash@90000000 {
169+
compatible = "st,stm32-qspi-nor";
170+
reg = <0x90000000 DT_SIZE_M(16)>; /* 128 Mbits */
171+
qspi-max-frequency = <72000000>;
172+
status = "okay";
173+
174+
partitions {
175+
compatible = "fixed-partitions";
176+
#address-cells = <1>;
177+
#size-cells = <1>;
178+
179+
slot1_partition: partition@0 {
180+
label = "image-1";
181+
reg = <0x00000000 DT_SIZE_M(1)>;
182+
};
183+
184+
storage_partition: partition@100000 {
185+
label = "storage";
186+
reg = <0x00100000 DT_SIZE_M(15)>;
187+
};
188+
};
189+
};
190+
};
191+
167192
&rng {
168193
status = "okay";
169194
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (c) 2024 DNDG srl
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/kernel.h>
7+
#include <zephyr/init.h>
8+
#include <stm32h7xx_ll_bus.h>
9+
#include <stm32h7xx_ll_gpio.h>
10+
11+
static int board_gpio_hse(void)
12+
{
13+
/* The external oscillator that drives the HSE clock should be enabled
14+
* by setting the GPIOH1 pin. This function is registered at priority
15+
* RE_KERNEL_1 to be executed before the standard STM clock
16+
* setup code.
17+
*/
18+
19+
LL_AHB4_GRP1_EnableClock(LL_AHB4_GRP1_PERIPH_GPIOH);
20+
21+
LL_GPIO_SetPinMode(GPIOH, LL_GPIO_PIN_1, LL_GPIO_MODE_OUTPUT);
22+
LL_GPIO_SetPinSpeed(GPIOH, LL_GPIO_PIN_1, LL_GPIO_SPEED_FREQ_LOW);
23+
LL_GPIO_SetPinOutputType(GPIOH, LL_GPIO_PIN_1, LL_GPIO_OUTPUT_PUSHPULL);
24+
LL_GPIO_SetPinPull(GPIOH, LL_GPIO_PIN_1, LL_GPIO_PULL_UP);
25+
LL_GPIO_SetOutputPin(GPIOH, LL_GPIO_PIN_1);
26+
27+
return 0;
28+
}
29+
30+
SYS_INIT(board_gpio_hse, PRE_KERNEL_1, 0);

0 commit comments

Comments
 (0)