2017-12-14 12:30:12 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Clage GmbH
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/dts-v1/;
|
2018-09-26 05:06:34 +02:00
|
|
|
#include <st/f0/stm32f072Xb.dtsi>
|
2020-10-06 14:26:04 +02:00
|
|
|
#include <st/f0/stm32f072r(8-b)tx-pinctrl.dtsi>
|
2023-08-03 12:52:22 +02:00
|
|
|
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
2017-12-14 12:30:12 +01:00
|
|
|
|
|
|
|
/ {
|
|
|
|
model = "STMicroelectronics STM32F072B-DISCO board";
|
2020-09-25 14:57:24 +02:00
|
|
|
compatible = "st,stm32f072b-disco";
|
2017-12-14 12:30:12 +01:00
|
|
|
|
|
|
|
chosen {
|
|
|
|
zephyr,console = &usart1;
|
2018-11-27 12:11:04 +01:00
|
|
|
zephyr,shell-uart = &usart1;
|
2017-12-14 12:30:12 +01:00
|
|
|
zephyr,sram = &sram0;
|
|
|
|
zephyr,flash = &flash0;
|
canbus: rename zephyr,can-primary chosen property to zephyr,canbus
Rename the Zephyr chosen property for specifying the default CAN bus
controller from "zephyr,can-primary" to "zephyr,canbus".
The "zephyr,can-primary" property name was selected in antipation of
adding support for redundant CAN networks, which we have yet to
add. Meanwhile, the "primary" term causes confusion for non-redundant
CAN bus configurations (and the "can" term doesn't match the name of the
Zephyr CAN bus subsystem).
The CAN in Automation (CiA) 302-6, which deals with CANopen network
redundancy, uses the terms "default interface" and "redundant
interface". If/when we add support for redundant CAN networks, the
"zephyr,canbus" chosen property can be supplemented with a
"zephyr,canbus-redundant" chosen property.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-11-02 16:49:04 +01:00
|
|
|
zephyr,canbus = &can1;
|
2017-12-14 12:30:12 +01:00
|
|
|
};
|
2017-11-24 10:08:03 +01:00
|
|
|
|
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
2018-09-18 19:45:43 +02:00
|
|
|
red_up_led_3: led_3 {
|
2019-10-03 18:30:21 +02:00
|
|
|
gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "User LD3";
|
|
|
|
};
|
2018-09-18 19:45:43 +02:00
|
|
|
yellow_left_4: led_4 {
|
2019-10-03 18:30:21 +02:00
|
|
|
gpios = <&gpioc 8 GPIO_ACTIVE_HIGH>;
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "User LD4";
|
|
|
|
};
|
2018-09-18 19:45:43 +02:00
|
|
|
green_right_led_5: led_5 {
|
2019-10-03 18:30:21 +02:00
|
|
|
gpios = <&gpioc 9 GPIO_ACTIVE_HIGH>;
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "User LD5";
|
|
|
|
};
|
2018-09-18 19:45:43 +02:00
|
|
|
blue_low_led_6: led_6 {
|
2019-10-03 18:30:21 +02:00
|
|
|
gpios = <&gpioc 7 GPIO_ACTIVE_HIGH>;
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "User LD6";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio_keys {
|
|
|
|
compatible = "gpio-keys";
|
2018-09-21 01:25:55 +02:00
|
|
|
user_button: button {
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "User";
|
2019-10-03 18:30:21 +02:00
|
|
|
gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
|
2023-08-03 12:52:22 +02:00
|
|
|
zephyr,code = <INPUT_KEY_0>;
|
2017-11-24 10:08:03 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-03-10 01:09:31 +01:00
|
|
|
pwmleds: pwmleds {
|
|
|
|
compatible = "pwm-leds";
|
|
|
|
status = "disabled";
|
|
|
|
|
|
|
|
red_pwm_led: red_pwm_led {
|
|
|
|
pwms = <&pwm3 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-11-24 10:08:03 +01:00
|
|
|
aliases {
|
|
|
|
led0 = &red_up_led_3;
|
|
|
|
led1 = &yellow_left_4;
|
|
|
|
led2 = &green_right_led_5;
|
|
|
|
led3 = &blue_low_led_6;
|
2023-03-10 01:09:31 +01:00
|
|
|
pwm-led0 = &red_pwm_led;
|
2017-11-24 10:08:03 +01:00
|
|
|
sw0 = &user_button;
|
2022-07-19 10:33:14 +02:00
|
|
|
watchdog0 = &iwdg;
|
2017-11-24 10:08:03 +01:00
|
|
|
};
|
2017-12-14 12:30:12 +01:00
|
|
|
};
|
|
|
|
|
2021-04-30 17:43:00 +02:00
|
|
|
&clk_hsi {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&pll {
|
|
|
|
prediv = <1>;
|
|
|
|
mul = <6>;
|
|
|
|
clocks = <&clk_hsi>;
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&rcc {
|
|
|
|
clocks = <&pll>;
|
|
|
|
clock-frequency = <DT_FREQ_M(48)>;
|
|
|
|
ahb-prescaler = <1>;
|
|
|
|
apb1-prescaler = <1>;
|
|
|
|
};
|
|
|
|
|
2017-12-14 12:30:12 +01:00
|
|
|
&usart1 {
|
2020-10-06 14:26:04 +02:00
|
|
|
pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>;
|
2021-09-07 16:38:13 +02:00
|
|
|
pinctrl-names = "default";
|
2017-12-14 12:30:12 +01:00
|
|
|
current-speed = <115200>;
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2017-12-14 12:30:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
&i2c1 {
|
2020-10-12 17:53:50 +02:00
|
|
|
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
|
2021-11-08 10:59:17 +01:00
|
|
|
pinctrl-names = "default";
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2017-12-14 12:30:12 +01:00
|
|
|
clock-frequency = <I2C_BITRATE_FAST>;
|
|
|
|
};
|
|
|
|
|
|
|
|
&i2c2 {
|
2020-10-12 17:53:50 +02:00
|
|
|
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
|
2021-11-08 10:59:17 +01:00
|
|
|
pinctrl-names = "default";
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2017-12-14 12:30:12 +01:00
|
|
|
clock-frequency = <I2C_BITRATE_FAST>;
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi1 {
|
2020-10-15 17:03:11 +02:00
|
|
|
pinctrl-0 = <&spi1_sck_pb3 &spi1_miso_pb4 &spi1_mosi_pb5>;
|
2021-11-08 12:23:47 +01:00
|
|
|
pinctrl-names = "default";
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2017-12-14 12:30:12 +01:00
|
|
|
};
|
2018-05-03 11:04:12 +02:00
|
|
|
|
|
|
|
&can1 {
|
2020-10-08 15:24:27 +02:00
|
|
|
pinctrl-0 = <&can_rx_pb8 &can_tx_pb9>;
|
2021-11-05 15:28:52 +01:00
|
|
|
pinctrl-names = "default";
|
2019-01-10 23:16:36 +01:00
|
|
|
bus-speed = <125000>;
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2018-05-03 11:04:12 +02:00
|
|
|
};
|
2019-02-01 16:12:50 +01:00
|
|
|
|
2019-04-04 09:46:31 +02:00
|
|
|
&iwdg {
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2019-02-01 16:12:50 +01:00
|
|
|
};
|
2023-03-10 01:09:31 +01:00
|
|
|
|
|
|
|
&timers3 {
|
|
|
|
st,prescaler = <10000>;
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
pwm3: pwm {
|
|
|
|
status = "okay";
|
|
|
|
pinctrl-0 = <&tim3_ch1_pc6>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
};
|
|
|
|
};
|