1/* 2 * Copyright (c) 2018 AJ Palmer 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/f7/stm32f756Xg.dtsi> 9#include <st/f7/stm32f756zgtx-pinctrl.dtsi> 10#include "arduino_r3_connector.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/* 14 * WARNING: The pin PA7 will conflict on selection of SPI_1 and ETH_STM32_HAL. 15 * If you require both peripherals, and you do not need Arduino Uno v3 16 * compatibility, the pin PB5 (also on ST Zio connector) can be used 17 * for the SPI_1 MOSI signal. 18 */ 19 20/ { 21 model = "STMicroelectronics STM32F756ZG-NUCLEO board"; 22 compatible = "st,stm32f756zg-nucleo"; 23 24 chosen { 25 zephyr,console = &usart3; 26 zephyr,shell-uart = &usart3; 27 zephyr,sram = &sram0; 28 zephyr,flash = &flash0; 29 zephyr,code-partition = &slot0_partition; 30 zephyr,dtcm = &dtcm; 31 }; 32 33 leds: leds { 34 compatible = "gpio-leds"; 35 green_led: led_0 { 36 gpios = <&gpiob 0 GPIO_ACTIVE_HIGH>; 37 label = "User LD1"; 38 }; 39 blue_led: led_1 { 40 gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; 41 label = "User LD2"; 42 }; 43 red_led: led_2 { 44 gpios = <&gpiob 14 GPIO_ACTIVE_HIGH>; 45 label = "User LD3"; 46 }; 47 }; 48 49 gpio_keys { 50 compatible = "gpio-keys"; 51 user_button: button_0 { 52 label = "User"; 53 gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; 54 zephyr,code = <INPUT_KEY_0>; 55 }; 56 }; 57 58 aliases { 59 led0 = &green_led; 60 led1 = &blue_led; 61 led2 = &red_led; 62 sw0 = &user_button; 63 }; 64}; 65 66&clk_hse { 67 hse-bypass; 68 clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ 69 status = "okay"; 70}; 71 72&pll { 73 div-m = <4>; 74 mul-n = <216>; 75 div-p = <2>; 76 div-q = <9>; 77 clocks = <&clk_hse>; 78 status = "okay"; 79}; 80 81&rcc { 82 clocks = <&pll>; 83 clock-frequency = <DT_FREQ_M(216)>; 84 ahb-prescaler = <1>; 85 apb1-prescaler = <4>; 86 apb2-prescaler = <2>; 87}; 88 89&usart2 { 90 pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6 91 &usart2_rts_pd4 &usart2_cts_pd3>; 92 pinctrl-names = "default"; 93 current-speed = <115200>; 94 status = "okay"; 95}; 96 97&usart3 { 98 pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; 99 pinctrl-names = "default"; 100 current-speed = <115200>; 101 status = "okay"; 102}; 103 104&usart6 { 105 pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; 106 pinctrl-names = "default"; 107 current-speed = <115200>; 108 status = "okay"; 109}; 110 111zephyr_udc0: &usbotg_fs { 112 pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; 113 pinctrl-names = "default"; 114 status = "okay"; 115}; 116 117&i2c1 { 118 pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; 119 pinctrl-names = "default"; 120 status = "okay"; 121 clock-frequency = <I2C_BITRATE_FAST>; 122}; 123 124&timers1 { 125 st,prescaler = <10000>; 126 status = "okay"; 127 128 pwm1: pwm { 129 status = "okay"; 130 pinctrl-0 = <&tim1_ch3_pe13>; 131 pinctrl-names = "default"; 132 }; 133}; 134 135&spi1 { 136 pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 137 pinctrl-names = "default"; 138 cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 139 status = "okay"; 140}; 141 142&mac { 143 status = "okay"; 144 pinctrl-0 = <ð_mdc_pc1 145 ð_rxd0_pc4 146 ð_rxd1_pc5 147 ð_ref_clk_pa1 148 ð_mdio_pa2 149 ð_crs_dv_pa7 150 ð_tx_en_pg11 151 ð_txd0_pg13 152 ð_txd1_pb13>; 153 pinctrl-names = "default"; 154}; 155 156&flash0 { 157 partitions { 158 compatible = "fixed-partitions"; 159 #address-cells = <1>; 160 #size-cells = <1>; 161 162 /* 163 * 256KB for bootloader. This is too large but 164 * there is no way to make the part smaller. 165 */ 166 boot_partition: partition@0 { 167 label = "mcuboot"; 168 reg = <0x00000000 DT_SIZE_K(256)>; 169 read-only; 170 }; 171 172 /* application image slot: 256KB */ 173 slot0_partition: partition@40000 { 174 label = "image-0"; 175 reg = <0x00040000 DT_SIZE_K(256)>; 176 }; 177 178 /* backup slot: 256KB */ 179 slot1_partition: partition@80000 { 180 label = "image-1"; 181 reg = <0x00080000 DT_SIZE_K(256)>; 182 }; 183 184 /* scratch slot: 256KB */ 185 scratch_partition: partition@C0000 { 186 label = "image-scratch"; 187 reg = <0x000C0000 DT_SIZE_K(256)>; 188 }; 189 190 }; 191}; 192