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 red_up_led_3: led_3 { 27 gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>; 28 label = "User LD3"; 29 }; 30 yellow_left_4: led_4 { 31 gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>; 32 label = "User LD4"; 33 }; 34 green_right_led_5: led_5 { 35 gpios = <&gpioc 9 GPIO_ACTIVE_HIGH>; 36 label = "User LD5"; 37 }; 38 blue_low_led_6: led_6 { 39 gpios = <&gpioc 7 GPIO_ACTIVE_HIGH>; 40 label = "User LD6"; 41 }; 42 }; 43 44 gpio_keys { 45 compatible = "gpio-keys"; 46 user_button: button { 47 label = "User"; 48 gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; 49 zephyr,code = <INPUT_KEY_0>; 50 }; 51 }; 52 53 pwmleds: pwmleds { 54 compatible = "pwm-leds"; 55 status = "disabled"; 56 57 red_pwm_led: red_pwm_led { 58 pwms = <&pwm3 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 59 }; 60 }; 61 62 aliases { 63 led0 = &red_up_led_3; 64 led1 = &yellow_left_4; 65 led2 = &green_right_led_5; 66 led3 = &blue_low_led_6; 67 pwm-led0 = &red_pwm_led; 68 sw0 = &user_button; 69 watchdog0 = &iwdg; 70 }; 71}; 72 73&clk_hsi { 74 status = "okay"; 75}; 76 77&pll { 78 prediv = <1>; 79 mul = <6>; 80 clocks = <&clk_hsi>; 81 status = "okay"; 82}; 83 84&rcc { 85 clocks = <&pll>; 86 clock-frequency = <DT_FREQ_M(48)>; 87 ahb-prescaler = <1>; 88 apb1-prescaler = <1>; 89}; 90 91&usart1 { 92 pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; 93 pinctrl-names = "default"; 94 current-speed = <115200>; 95 status = "okay"; 96}; 97 98&i2c1 { 99 pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; 100 pinctrl-names = "default"; 101 status = "okay"; 102 clock-frequency = <I2C_BITRATE_FAST>; 103}; 104 105&i2c2 { 106 pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; 107 pinctrl-names = "default"; 108 status = "okay"; 109 clock-frequency = <I2C_BITRATE_FAST>; 110}; 111 112&spi1 { 113 pinctrl-0 = <&spi1_sck_pb3 &spi1_miso_pb4 &spi1_mosi_pb5>; 114 pinctrl-names = "default"; 115 status = "okay"; 116}; 117 118&can1 { 119 pinctrl-0 = <&can_rx_pb8 &can_tx_pb9>; 120 pinctrl-names = "default"; 121 status = "okay"; 122}; 123 124&iwdg { 125 status = "okay"; 126}; 127 128&timers3 { 129 st,prescaler = <10000>; 130 status = "okay"; 131 132 pwm3: pwm { 133 status = "okay"; 134 pinctrl-0 = <&tim3_ch1_pc6>; 135 pinctrl-names = "default"; 136 }; 137}; 138