Skip to content

Commit 6d868e5

Browse files
fogzotfabiobaltieri
authored andcommitted
boards: opta: enable ethernet and RNG
Features enabled by this commit: * RNG * Ethernet port (shell sample works without changes) Also fixed flash addresses in docs and added the default mapping between inputs and GPIO pins. Signed-off-by: Federico Di Gregorio <fog@dndg.it>
1 parent d931f0b commit 6d868e5

File tree

5 files changed

+63
-4
lines changed

5 files changed

+63
-4
lines changed

boards/arduino/opta/Kconfig.defconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
if BOARD_ARDUINO_OPTA
66

7+
if NETWORKING
8+
9+
config NET_L2_ETHERNET
10+
default y
11+
12+
endif # NETWORKING
13+
714
if USB_DEVICE_STACK
815

916
config USB_DEVICE_PRODUCT

boards/arduino/opta/arduino_opta_stm32h747xx_m7.dts

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,28 @@
1717

1818
chosen {
1919
zephyr,console = &cdc_acm_uart0;
20+
zephyr,shell-uart = &cdc_acm_uart0;
21+
zephyr,cdc-acm-uart0 = &cdc_acm_uart0;
2022
zephyr,sram = &sram0;
2123
zephyr,flash = &flash0;
2224
zephyr,code-partition = &slot0_partition;
2325
};
26+
27+
ethernet_phy_en: ethernet_phy_en {
28+
compatible = "regulator-fixed";
29+
regulator-name = "ethernet-phy-reset-release";
30+
enable-gpios = <&gpioj 15 GPIO_ACTIVE_HIGH>;
31+
regulator-boot-on;
32+
status = "okay";
33+
};
34+
35+
sdram2: sdram@d0000000 {
36+
compatible = "zephyr,memory-region", "mmio-sram";
37+
device_type = "memory";
38+
reg = <0xd0000000 DT_SIZE_M(32)>;
39+
zephyr,memory-region = "SDRAM2";
40+
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM) )>;
41+
};
2442
};
2543

2644
zephyr_udc0: &usbotg_fs {
@@ -91,17 +109,36 @@ zephyr_udc0: &usbotg_fs {
91109
status = "disabled";
92110
};
93111

112+
&cdc_acm_uart0 {
113+
status = "okay";
114+
};
115+
94116
&mac {
95117
pinctrl-0 = <
96118
&eth_ref_clk_pa1
97-
&eth_mdio_pa2
98119
&eth_crs_dv_pa7
99-
&eth_mdc_pc1
100120
&eth_rxd0_pc4
101121
&eth_rxd1_pc5
102122
&eth_tx_en_pg11
103123
&eth_txd1_pg12
104124
&eth_txd0_pg13
105125
>;
106126
pinctrl-names = "default";
127+
status = "okay";
128+
};
129+
130+
&mdio {
131+
status = "okay";
132+
pinctrl-0 = <&eth_mdio_pa2 &eth_mdc_pc1>;
133+
pinctrl-names = "default";
134+
135+
ethernet-phy@0 {
136+
compatible = "ethernet-phy";
137+
reg = <0x00>;
138+
status = "okay";
139+
};
140+
};
141+
142+
&rng {
143+
status = "okay";
107144
};

boards/arduino/opta/arduino_opta_stm32h747xx_m7.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ram: 512
1010
flash: 768
1111
supported:
1212
- gpio
13+
- netif:eth
1314
testing:
1415
ignore_tags:
1516
- mpu

boards/arduino/opta/arduino_opta_stm32h747xx_m7_defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ CONFIG_UART_LINE_CTRL=y
3131

3232
# Enable USB Stack (needed for the console to work)
3333
CONFIG_USB_DEVICE_STACK=y
34+
35+
# Enable regulator (needed to enable eth)
36+
CONFIG_REGULATOR=y
37+
CONFIG_REGULATOR_FIXED=y

boards/arduino/opta/doc/index.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ supports the following hardware features:
6565
+-----------+------------+-------------------------------------+
6666
| USB | on-board | usb-fs |
6767
+-----------+------------+-------------------------------------+
68+
| ETHERNET | on-board | eth |
69+
+-----------+------------+-------------------------------------+
6870

6971
The ``arduino_opta/stm32h747xx/m4`` board target
7072
supports the following hardware features:
@@ -110,6 +112,14 @@ Default Zephyr Peripheral Mapping
110112
- Red "reset" LED: PH11
111113
- Blue LED: PE5
112114
- User button: PE4
115+
- Input 1 : PA0
116+
- Input 2 : PC2
117+
- Input 3 : PF12
118+
- Input 4 : PB0
119+
- Input 5 : PF10
120+
- Input 6 : PF8
121+
- Input 7 : PF6
122+
- Input 8 : PF4
113123
- Relay 1: PI6
114124
- Relay 2: PI5
115125
- Relay 3: PI7
@@ -163,8 +173,8 @@ Zephyr flash configuration has been set to be compatible with the
163173
partitioned as follows:
164174

165175
- 0x08000000-0x0803FFFF (256k) Arduino MCUboot-derived bootloader
166-
- 0x08040000-0x0817FFFF (768k) M7 application
167-
- 0x08040000-0x0817FFFF (512k) M4 application
176+
- 0x08040000-0x080FFFFF (768k) M7 application
177+
- 0x08180000-0x081FFFFF (512k) M4 application
168178

169179

170180
Flashing an application to ARDUINO OPTA M7

0 commit comments

Comments
 (0)