1/* 2 * Copyright (c) 2017 I-SENSE group of ICCS 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/f3/stm32f303Xc.dtsi> 9#include <st/f3/stm32f303v(b-c)tx-pinctrl.dtsi> 10 11/ { 12 model = "STMicroelectronics STM32F3DISCOVERY board"; 13 compatible = "st,stm32f3discovery"; 14 15 chosen { 16 zephyr,console = &usart1; 17 zephyr,shell-uart = &usart1; 18 zephyr,sram = &sram0; 19 zephyr,flash = &flash0; 20 zephyr,can-primary = &can1; 21 }; 22 23 leds { 24 compatible = "gpio-leds"; 25 red_led_3: led_3 { 26 gpios = <&gpioe 9 GPIO_ACTIVE_HIGH>; 27 label = "User LD3"; 28 }; 29 blue_led_4: led_4 { 30 gpios = <&gpioe 8 GPIO_ACTIVE_HIGH>; 31 label = "User LD4"; 32 }; 33 orange_led_5: led_5 { 34 gpios = <&gpioe 10 GPIO_ACTIVE_HIGH>; 35 label = "User LD5"; 36 }; 37 green_led_6: led_6 { 38 gpios = <&gpioe 15 GPIO_ACTIVE_HIGH>; 39 label = "User LD6"; 40 }; 41 green_led_7: led_7 { 42 gpios = <&gpioe 11 GPIO_ACTIVE_HIGH>; 43 label = "User LD7"; 44 }; 45 orange_led_8: led_8 { 46 gpios = <&gpioe 14 GPIO_ACTIVE_HIGH>; 47 label = "User LD8"; 48 }; 49 blue_led_9: led_9 { 50 gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>; 51 label = "User LD9"; 52 }; 53 red_led_10: led_10 { 54 gpios = <&gpioe 13 GPIO_ACTIVE_HIGH>; 55 label = "User LD10"; 56 }; 57 }; 58 59 gpio_keys { 60 compatible = "gpio-keys"; 61 user_button: button { 62 label = "User"; 63 gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; 64 }; 65 }; 66 67 aliases { 68 led0 = &green_led_6; 69 led1 = &green_led_7; 70 sw0 = &user_button; 71 }; 72}; 73 74&clk_hse { 75 hse-bypass; 76 clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ 77 status = "okay"; 78}; 79 80&pll { 81 prediv = <1>; 82 mul = <9>; 83 clocks = <&clk_hse>; 84 status = "okay"; 85}; 86 87&rcc { 88 clocks = <&pll>; 89 clock-frequency = <DT_FREQ_M(72)>; 90 ahb-prescaler = <1>; 91 apb1-prescaler = <2>; 92 apb2-prescaler = <1>; 93}; 94 95&usart1 { 96 pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5>; 97 current-speed = <115200>; 98 status = "okay"; 99}; 100 101&usart2 { 102 pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; 103 current-speed = <115200>; 104 status = "okay"; 105}; 106 107&i2c1 { 108 pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; 109 status = "okay"; 110 clock-frequency = <I2C_BITRATE_FAST>; 111 112 lsm303dlhc-magn@1e { 113 compatible = "st,lsm303dlhc-magn"; 114 reg = <0x1e>; 115 label = "LSM303DLHC-MAGN"; 116 }; 117 118 lsm303dlhc-accel@19 { 119 compatible = "st,lis2dh", "st,lsm303dlhc-accel"; 120 reg = <0x19>; 121 irq-gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>, 122 <&gpioe 5 GPIO_ACTIVE_HIGH>; 123 label = "LSM303DLHC-ACCEL"; 124 }; 125}; 126 127&i2c2 { 128 pinctrl-0 = <&i2c2_scl_pa9 &i2c2_sda_pa10>; 129 status = "okay"; 130 clock-frequency = <I2C_BITRATE_FAST>; 131}; 132 133&spi1 { 134 pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 135 &spi1_miso_pa6 &spi1_mosi_pa7>; 136 status = "okay"; 137}; 138 139&spi2 { 140 pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 141 &spi2_miso_pb14 &spi2_mosi_pb15>; 142 status = "okay"; 143}; 144 145zephyr_udc0: &usb { 146 pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; 147 status = "okay"; 148}; 149 150&rtc { 151 status = "okay"; 152}; 153 154&can1 { 155 pinctrl-0 = <&can_rx_pd0 &can_tx_pd1>; 156 status = "okay"; 157}; 158 159&flash0 { 160 161 partitions { 162 compatible = "fixed-partitions"; 163 #address-cells = <1>; 164 #size-cells = <1>; 165 166 /* Set 6Kb of storage at the end of the 256Kb of flash */ 167 storage_partition: partition@3e800 { 168 label = "storage"; 169 reg = <0x0003e800 0x00001800>; 170 }; 171 }; 172}; 173 174&iwdg { 175 status = "okay"; 176}; 177 178&timers1 { 179 status = "okay"; 180 pwm1: pwm { 181 status = "okay"; 182 st,prescaler = <10000>; 183 pinctrl-0 = <&tim1_ch1_pa8>; 184 }; 185}; 186 187&adc1 { 188 pinctrl-0 = <&adc1_in1_pa0>; 189 status = "okay"; 190}; 191 192&dac1 { 193 status = "okay"; 194 /* dac output pins(pa4,pa5,pa6) might conflict with spi1 pins */ 195 pinctrl-0 = <&dac_out1_pa4>; 196}; 197 198&dma1 { 199 status = "okay"; 200}; 201