116 lines
2.2 KiB
Plaintext
116 lines
2.2 KiB
Plaintext
/*
|
|
* Copyright (c) 2017 Arthur Sfez
|
|
*
|
|
* Based on stm32l496g_disco:
|
|
*
|
|
* Copyright (c) 2017 Linaro Limited
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/dts-v1/;
|
|
#include <st/l4/stm32l476Xg.dtsi>
|
|
#include <st/l4/stm32l476v(c-e-g)tx-pinctrl.dtsi>
|
|
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
|
|
|
/ {
|
|
model = "STMicroelectronics STM32L476G-DISCO board";
|
|
compatible = "st,stm32l476g-disco";
|
|
|
|
chosen {
|
|
zephyr,console = &usart2;
|
|
zephyr,shell-uart = &usart2;
|
|
zephyr,sram = &sram0;
|
|
zephyr,flash = &flash0;
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
green_led_4: led_4 {
|
|
gpios = <&gpiob 2 GPIO_ACTIVE_HIGH>;
|
|
label = "User LD4";
|
|
};
|
|
green_led_5: led_5 {
|
|
gpios = <&gpioe 8 GPIO_ACTIVE_HIGH>;
|
|
label = "User LD5";
|
|
};
|
|
};
|
|
|
|
gpio_keys {
|
|
compatible = "gpio-keys";
|
|
joy_center: joystick_center {
|
|
label = "joystick center";
|
|
gpios = <&gpioa 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
|
zephyr,code = <INPUT_KEY_ENTER>;
|
|
};
|
|
joy_down: joystick_down {
|
|
label = "joystick down";
|
|
gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
|
zephyr,code = <INPUT_KEY_DOWN>;
|
|
};
|
|
joy_up: joystick_up {
|
|
label = "joystick up";
|
|
gpios = <&gpioa 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
|
zephyr,code = <INPUT_KEY_UP>;
|
|
};
|
|
joy_left: joystick_left {
|
|
label = "joystick left";
|
|
gpios = <&gpioa 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
|
zephyr,code = <INPUT_KEY_LEFT>;
|
|
};
|
|
joy_right: joystick_right {
|
|
label = "joystick right";
|
|
gpios = <&gpioa 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
|
zephyr,code = <INPUT_KEY_RIGHT>;
|
|
};
|
|
};
|
|
|
|
aliases {
|
|
led0 = &green_led_4;
|
|
sw0 = &joy_center;
|
|
};
|
|
};
|
|
|
|
&clk_lsi {
|
|
status = "okay";
|
|
};
|
|
|
|
&clk_hsi {
|
|
status = "okay";
|
|
};
|
|
|
|
&pll {
|
|
div-m = <1>;
|
|
mul-n = <20>;
|
|
div-p = <7>;
|
|
div-q = <2>;
|
|
div-r = <4>;
|
|
clocks = <&clk_hsi>;
|
|
status = "okay";
|
|
};
|
|
|
|
&rcc {
|
|
clocks = <&pll>;
|
|
clock-frequency = <DT_FREQ_M(80)>;
|
|
ahb-prescaler = <1>;
|
|
apb1-prescaler = <1>;
|
|
apb2-prescaler = <1>;
|
|
};
|
|
|
|
&usart2 {
|
|
pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>;
|
|
pinctrl-names = "default";
|
|
current-speed = <115200>;
|
|
status = "okay";
|
|
};
|
|
|
|
&rtc {
|
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
|
|
<&rcc STM32_SRC_LSI RTC_SEL(2)>;
|
|
status = "okay";
|
|
|
|
backup_regs {
|
|
status = "okay";
|
|
};
|
|
};
|