2017-05-09 14:29:01 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Linaro Limited
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/dts-v1/;
|
2018-09-27 08:21:55 -05:00
|
|
|
#include <st/l4/stm32l496Xg.dtsi>
|
2020-10-03 13:47:48 +02:00
|
|
|
#include <st/l4/stm32l496a(e-g)ix-pinctrl.dtsi>
|
2021-02-18 16:29:56 +01:00
|
|
|
#include "arduino_r3_connector.dtsi"
|
2017-05-09 14:29:01 +02:00
|
|
|
|
|
|
|
/ {
|
|
|
|
model = "STMicroelectronics STM32L496G-DISCO board";
|
2020-09-25 14:57:24 +02:00
|
|
|
compatible = "st,stm32l496g-disco";
|
2017-05-09 14:29:01 +02:00
|
|
|
|
|
|
|
chosen {
|
|
|
|
zephyr,console = &usart2;
|
2018-11-27 12:11:04 +01:00
|
|
|
zephyr,shell-uart = &usart2;
|
2017-05-09 14:29:01 +02:00
|
|
|
zephyr,sram = &sram0;
|
|
|
|
zephyr,flash = &flash0;
|
|
|
|
};
|
2017-11-24 10:08:03 +01:00
|
|
|
|
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
2018-09-18 19:45:43 +02:00
|
|
|
green_led_2: led_2 {
|
2019-10-03 18:30:21 +02:00
|
|
|
gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>;
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "User LD2";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio_keys {
|
|
|
|
compatible = "gpio-keys";
|
2018-09-18 08:44:58 -05:00
|
|
|
joy_sel: joystick_select {
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "joystick select";
|
2020-09-28 14:08:27 +02:00
|
|
|
gpios = <&gpioc 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
2017-11-24 10:08:03 +01:00
|
|
|
};
|
2018-09-18 08:44:58 -05:00
|
|
|
joy_down: joystick_down {
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "joystick down";
|
2020-09-28 14:08:27 +02:00
|
|
|
gpios = <&gpioi 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
2017-11-24 10:08:03 +01:00
|
|
|
};
|
2018-09-18 08:44:58 -05:00
|
|
|
joy_up: joystick_up {
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "joystick up";
|
2020-09-28 14:08:27 +02:00
|
|
|
gpios = <&gpioi 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
2017-11-24 10:08:03 +01:00
|
|
|
};
|
2018-09-18 08:44:58 -05:00
|
|
|
joy_left: joystick_left {
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "joystick left";
|
2020-09-28 14:08:27 +02:00
|
|
|
gpios = <&gpioi 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
2017-11-24 10:08:03 +01:00
|
|
|
};
|
2018-09-18 08:44:58 -05:00
|
|
|
joy_right: joystick_right {
|
2017-11-24 10:08:03 +01:00
|
|
|
label = "joystick right";
|
2020-09-28 14:08:27 +02:00
|
|
|
gpios = <&gpiof 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
|
2017-11-24 10:08:03 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
aliases {
|
|
|
|
led0 = &green_led_2;
|
|
|
|
sw0 = &joy_sel;
|
2021-02-18 16:29:56 +01:00
|
|
|
sw1 = &joy_down;
|
|
|
|
sw2 = &joy_right;
|
|
|
|
sw3 = &joy_up;
|
|
|
|
sw4 = &joy_left;
|
2017-11-24 10:08:03 +01:00
|
|
|
};
|
2017-05-09 14:29:01 +02:00
|
|
|
|
2021-02-18 16:29:56 +01:00
|
|
|
};
|
2018-09-13 16:51:40 +02:00
|
|
|
|
2021-04-30 10:25:04 +02:00
|
|
|
&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>;
|
|
|
|
};
|
|
|
|
|
2017-07-25 09:27:44 +02:00
|
|
|
&usart1 {
|
2020-10-06 13:41:51 +02:00
|
|
|
pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pg10>;
|
2021-09-07 16:38:13 +02:00
|
|
|
pinctrl-names = "default";
|
2017-07-25 09:27:44 +02:00
|
|
|
current-speed = <115200>;
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2017-07-25 09:27:44 +02:00
|
|
|
};
|
|
|
|
|
2017-05-09 14:29:01 +02:00
|
|
|
&usart2 {
|
2020-10-06 13:41:51 +02:00
|
|
|
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pd6>;
|
2021-09-07 16:38:13 +02:00
|
|
|
pinctrl-names = "default";
|
2017-05-09 14:29:01 +02:00
|
|
|
current-speed = <115200>;
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2017-05-09 14:29:01 +02:00
|
|
|
};
|
2018-02-28 22:20:00 +01:00
|
|
|
|
2018-09-13 16:51:40 +02:00
|
|
|
&lpuart1 {
|
2020-10-06 13:41:51 +02:00
|
|
|
pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>;
|
2021-09-07 16:38:13 +02:00
|
|
|
pinctrl-names = "default";
|
2018-09-13 16:51:40 +02:00
|
|
|
current-speed = <115200>;
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2018-09-13 16:51:40 +02:00
|
|
|
};
|
|
|
|
|
2018-02-28 22:20:00 +01:00
|
|
|
&timers2 {
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2018-02-28 22:20:00 +01:00
|
|
|
|
2020-05-01 16:13:37 +02:00
|
|
|
pwm2: pwm {
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2020-11-02 17:40:50 +01:00
|
|
|
pinctrl-0 = <&tim2_ch1_pa0>;
|
2021-11-08 11:48:51 +01:00
|
|
|
pinctrl-names = "default";
|
2018-02-28 22:20:00 +01:00
|
|
|
};
|
|
|
|
};
|
2018-06-19 16:21:36 +03:00
|
|
|
|
2018-09-13 16:51:40 +02:00
|
|
|
&i2c1 {
|
2020-10-12 17:53:50 +02:00
|
|
|
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb7>;
|
2021-11-08 10:59:17 +01:00
|
|
|
pinctrl-names = "default";
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2018-09-13 16:51:40 +02:00
|
|
|
clock-frequency = <I2C_BITRATE_FAST>;
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi1 {
|
2020-10-15 17:03:11 +02:00
|
|
|
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pb4 &spi1_mosi_pb5>;
|
2021-11-08 12:23:47 +01:00
|
|
|
pinctrl-names = "default";
|
2021-06-17 11:42:10 +02:00
|
|
|
cs-gpios = <&gpioa 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2018-09-13 16:51:40 +02:00
|
|
|
};
|
|
|
|
|
2018-06-19 16:21:36 +03:00
|
|
|
&rtc {
|
2019-06-14 19:31:16 +02:00
|
|
|
status = "okay";
|
2018-06-19 16:21:36 +03:00
|
|
|
};
|
2020-04-24 12:37:33 +02:00
|
|
|
|
|
|
|
&sdmmc1 {
|
2020-10-23 13:56:11 +02:00
|
|
|
pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9
|
|
|
|
&sdmmc1_d2_pc10 &sdmmc1_d3_pc11
|
|
|
|
&sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>;
|
2021-11-05 16:23:50 +01:00
|
|
|
pinctrl-names = "default";
|
2020-04-24 12:37:33 +02:00
|
|
|
status = "okay";
|
|
|
|
};
|
2021-06-23 23:07:34 +05:30
|
|
|
|
|
|
|
&adc1 {
|
|
|
|
pinctrl-0 = < &adc1_in2_pc1>;
|
2021-11-05 15:14:51 +01:00
|
|
|
pinctrl-names = "default";
|
2021-06-23 23:07:34 +05:30
|
|
|
status = "okay";
|
|
|
|
};
|