1/* 2 * Copyright (c) 2022 Tomislav Milkovic 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/l4/stm32l4a6Xg.dtsi> 9#include <st/l4/stm32l4a6zgtx-pinctrl.dtsi> 10#include "arduino_r3_connector.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "STMicroelectronics STM32L4A6ZG-NUCLEO board"; 15 compatible = "st,stm32l4a6zg-nucleo"; 16 17 chosen { 18 zephyr,console = &lpuart1; 19 zephyr,shell-uart = &lpuart1; 20 zephyr,sram = &sram0; 21 zephyr,flash = &flash0; 22 }; 23 24 leds: leds { 25 compatible = "gpio-leds"; 26 green_led_1: led_1 { 27 gpios = <&gpioc 7 GPIO_ACTIVE_HIGH>; 28 label = "User LD1"; 29 }; 30 blue_led_2: led_2 { 31 gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; 32 label = "User LD2"; 33 }; 34 red_led_3: led_3 { 35 gpios = <&gpiob 14 GPIO_ACTIVE_HIGH>; 36 label = "User LD3"; 37 }; 38 }; 39 40 pwmleds { 41 compatible = "pwm-leds"; 42 43 red_pwm_led: red_pwm_led { 44 pwms = <&pwm15 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 45 }; 46 }; 47 48 gpio_keys { 49 compatible = "gpio-keys"; 50 user_button: button { 51 label = "User Button"; 52 gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; 53 zephyr,code = <INPUT_KEY_0>; 54 }; 55 }; 56 57 aliases { 58 led0 = &green_led_1; 59 led1 = &blue_led_2; 60 led2 = &red_led_3; 61 pwm-led0 = &red_pwm_led; 62 sw0 = &user_button; 63 watchdog0 = &wwdg; 64 }; 65}; 66 67&clk_lsi { 68 status = "okay"; 69}; 70 71&clk_lse { 72 status = "okay"; 73}; 74 75&clk_hsi { 76 status = "okay"; 77}; 78 79&pll { 80 div-m = <1>; 81 mul-n = <20>; 82 div-q = <2>; 83 div-r = <4>; 84 clocks = <&clk_hsi>; 85 status = "okay"; 86}; 87 88&rcc { 89 clocks = <&pll>; 90 clock-frequency = <DT_FREQ_M(80)>; 91 ahb-prescaler = <1>; 92 apb1-prescaler = <1>; 93 apb2-prescaler = <1>; 94}; 95 96&usart3 { 97 pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; 98 pinctrl-names = "default"; 99 current-speed = <115200>; 100 status = "okay"; 101}; 102 103&lpuart1 { 104 pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>; 105 pinctrl-names = "default"; 106 current-speed = <115200>; 107 status = "okay"; 108}; 109 110&timers15 { 111 st,prescaler = <10000>; 112 status = "okay"; 113 114 pwm15: pwm { 115 status = "okay"; 116 pinctrl-0 = <&tim15_ch1_pb14>; 117 pinctrl-names = "default"; 118 }; 119}; 120 121&i2c1 { 122 pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; 123 pinctrl-names = "default"; 124 status = "okay"; 125 clock-frequency = <I2C_BITRATE_FAST>; 126}; 127 128&spi1 { 129 pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 130 pinctrl-names = "default"; 131 cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 132 status = "okay"; 133}; 134 135&rtc { 136 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 137 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 138 status = "okay"; 139}; 140 141&wwdg { 142 status = "okay"; 143}; 144 145&aes { 146 status = "okay"; 147}; 148