1/* 2 * Copyright (c) 2021 Matija Tudan 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/l4/stm32l433Xc.dtsi> 9#include <st/l4/stm32l433rctxp-pinctrl.dtsi> 10#include "arduino_r3_connector.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "STMicroelectronics STM32L433RC-P-NUCLEO board"; 15 compatible = "st,stm32l433rc-p-nucleo"; 16 17 chosen { 18 zephyr,console = &lpuart1; 19 zephyr,shell-uart = &lpuart1; 20 zephyr,sram = &sram0; 21 zephyr,flash = &flash0; 22 zephyr,canbus = &can1; 23 }; 24 25 leds: leds { 26 compatible = "gpio-leds"; 27 green_led: led_0 { 28 gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>; 29 label = "User LD4"; 30 }; 31 }; 32 33 gpio_keys { 34 compatible = "gpio-keys"; 35 user_button: button { 36 gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; 37 label = "User"; 38 zephyr,code = <INPUT_KEY_0>; 39 }; 40 }; 41 42 aliases { 43 led0 = &green_led; 44 sw0 = &user_button; 45 }; 46}; 47 48&clk_lsi { 49 status = "okay"; 50}; 51 52&clk_hsi { 53 status = "okay"; 54}; 55 56&pll { 57 div-m = <1>; 58 mul-n = <20>; 59 div-p = <7>; 60 div-q = <2>; 61 div-r = <4>; 62 clocks = <&clk_hsi>; 63 status = "okay"; 64}; 65 66&rcc { 67 clocks = <&pll>; 68 clock-frequency = <DT_FREQ_M(80)>; 69 ahb-prescaler = <1>; 70 apb1-prescaler = <1>; 71 apb2-prescaler = <1>; 72}; 73 74&lpuart1 { 75 pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>; 76 pinctrl-names = "default"; 77 current-speed = <115200>; 78 status = "okay"; 79}; 80 81&usart1 { 82 pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; 83 pinctrl-names = "default"; 84 current-speed = <115200>; 85}; 86 87&spi1 { 88 pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 89 &spi1_miso_pa6 &spi1_mosi_pa7>; 90 pinctrl-names = "default"; 91 status = "okay"; 92}; 93 94&spi2 { 95 pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; 96 pinctrl-names = "default"; 97 cs-gpios = <&gpioa 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 98 status = "okay"; 99}; 100 101&i2c1 { 102 pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; 103 pinctrl-names = "default"; 104 clock-frequency = <I2C_BITRATE_FAST>; 105 status = "okay"; 106}; 107 108&timers2 { 109 status = "okay"; 110 111 pwm2: pwm { 112 status = "okay"; 113 pinctrl-0 = <&tim2_ch1_pa0>; 114 pinctrl-names = "default"; 115 }; 116}; 117 118&can1 { 119 pinctrl-0 = <&can1_rx_pa11 &can1_tx_pa12>; 120 pinctrl-names = "default"; 121 bus-speed = <125000>; 122 status = "okay"; 123}; 124 125&rtc { 126 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 127 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 128 status = "okay"; 129}; 130 131&flash0 { 132 partitions { 133 compatible = "fixed-partitions"; 134 #address-cells = <1>; 135 #size-cells = <1>; 136 137 /* 138 * Reserve the final 16 KiB for file system partition 139 */ 140 storage_partition: partition@3c000 { 141 label = "storage"; 142 reg = <0x0003c000 DT_SIZE_K(16)>; 143 }; 144 }; 145}; 146