1/* 2 * Copyright (c) 2018 Centaur Analytics, Inc 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/l4/stm32l496Xg.dtsi> 9#include <st/l4/stm32l496z(e-g)tx-pinctrl.dtsi> 10#include "arduino_r3_connector.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "STMicroelectronics STM32L496ZG-NUCLEO board"; 15 compatible = "st,stm32l496zg-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_hsi { 72 status = "okay"; 73}; 74 75&pll { 76 div-m = <1>; 77 mul-n = <20>; 78 div-p = <7>; 79 div-q = <2>; 80 div-r = <4>; 81 clocks = <&clk_hsi>; 82 status = "okay"; 83}; 84 85&rcc { 86 clocks = <&pll>; 87 clock-frequency = <DT_FREQ_M(80)>; 88 ahb-prescaler = <1>; 89 apb1-prescaler = <1>; 90 apb2-prescaler = <1>; 91}; 92 93&usart2 { 94 pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; 95 pinctrl-names = "default"; 96 current-speed = <115200>; 97 status = "okay"; 98}; 99 100&usart3 { 101 pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; 102 pinctrl-names = "default"; 103 current-speed = <115200>; 104 status = "okay"; 105}; 106 107&lpuart1 { 108 pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>; 109 pinctrl-names = "default"; 110 current-speed = <115200>; 111 status = "okay"; 112}; 113 114&timers1 { 115 st,prescaler = <10000>; 116 status = "okay"; 117 118 pwm1: pwm { 119 status = "okay"; 120 pinctrl-0 = <&tim1_ch1_pe9 121 &tim1_ch2_pe11 122 &tim1_ch3_pe13>; 123 pinctrl-names = "default"; 124 }; 125}; 126 127&timers2 { 128 status = "okay"; 129 130 pwm2: pwm { 131 status = "okay"; 132 pinctrl-0 = <&tim2_ch1_pa0>; 133 pinctrl-names = "default"; 134 }; 135}; 136 137&timers15 { 138 st,prescaler = <10000>; 139 status = "okay"; 140 141 pwm15: pwm { 142 status = "okay"; 143 pinctrl-0 = <&tim15_ch1_pb14>; 144 pinctrl-names = "default"; 145 }; 146}; 147 148&i2c1 { 149 pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; 150 pinctrl-names = "default"; 151 status = "okay"; 152 clock-frequency = <I2C_BITRATE_FAST>; 153}; 154 155&spi1 { 156 pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; 157 pinctrl-names = "default"; 158 cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 159 status = "okay"; 160}; 161 162&rtc { 163 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 164 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 165 status = "okay"; 166}; 167 168&wwdg { 169 status = "okay"; 170}; 171