1/* 2 * Copyright (c) 2017 Clage GmbH 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/f0/stm32f072Xb.dtsi> 9#include <st/f0/stm32f072r(8-b)tx-pinctrl.dtsi> 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "STMicroelectronics STM32F072B-DISCO board"; 14 compatible = "st,stm32f072b-disco"; 15 16 chosen { 17 zephyr,console = &usart1; 18 zephyr,shell-uart = &usart1; 19 zephyr,sram = &sram0; 20 zephyr,flash = &flash0; 21 zephyr,canbus = &can1; 22 }; 23 24 leds { 25 compatible = "gpio-leds"; 26 27 red_up_led_3: led_3 { 28 gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>; 29 label = "User LD3"; 30 }; 31 32 yellow_left_4: led_4 { 33 gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>; 34 label = "User LD4"; 35 }; 36 37 green_right_led_5: led_5 { 38 gpios = <&gpioc 9 GPIO_ACTIVE_HIGH>; 39 label = "User LD5"; 40 }; 41 42 blue_low_led_6: led_6 { 43 gpios = <&gpioc 7 GPIO_ACTIVE_HIGH>; 44 label = "User LD6"; 45 }; 46 }; 47 48 gpio_keys { 49 compatible = "gpio-keys"; 50 51 user_button: button { 52 label = "User"; 53 gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; 54 zephyr,code = <INPUT_KEY_0>; 55 }; 56 }; 57 58 pwmleds: pwmleds { 59 compatible = "pwm-leds"; 60 status = "disabled"; 61 62 red_pwm_led: red_pwm_led { 63 pwms = <&pwm3 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 64 }; 65 }; 66 67 aliases { 68 led0 = &red_up_led_3; 69 led1 = &yellow_left_4; 70 led2 = &green_right_led_5; 71 led3 = &blue_low_led_6; 72 pwm-led0 = &red_pwm_led; 73 sw0 = &user_button; 74 watchdog0 = &iwdg; 75 }; 76}; 77 78&clk_hsi { 79 status = "okay"; 80}; 81 82&pll { 83 prediv = <1>; 84 mul = <6>; 85 clocks = <&clk_hsi>; 86 status = "okay"; 87}; 88 89&rcc { 90 clocks = <&pll>; 91 clock-frequency = <DT_FREQ_M(48)>; 92 ahb-prescaler = <1>; 93 apb1-prescaler = <1>; 94}; 95 96&usart1 { 97 pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; 98 pinctrl-names = "default"; 99 current-speed = <115200>; 100 status = "okay"; 101}; 102 103&i2c1 { 104 pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; 105 pinctrl-names = "default"; 106 status = "okay"; 107 clock-frequency = <I2C_BITRATE_FAST>; 108}; 109 110&i2c2 { 111 pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; 112 pinctrl-names = "default"; 113 status = "okay"; 114 clock-frequency = <I2C_BITRATE_FAST>; 115}; 116 117&spi1 { 118 pinctrl-0 = <&spi1_sck_pb3 &spi1_miso_pb4 &spi1_mosi_pb5>; 119 pinctrl-names = "default"; 120 status = "okay"; 121}; 122 123&can1 { 124 pinctrl-0 = <&can_rx_pb8 &can_tx_pb9>; 125 pinctrl-names = "default"; 126 status = "okay"; 127}; 128 129&iwdg { 130 status = "okay"; 131}; 132 133&timers3 { 134 st,prescaler = <10000>; 135 status = "okay"; 136 137 pwm3: pwm { 138 status = "okay"; 139 pinctrl-0 = <&tim3_ch1_pc6>; 140 pinctrl-names = "default"; 141 }; 142}; 143