|
| 1 | +/* |
| 2 | + * Copyright (c) 2025 Blues |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +/dts-v1/; |
| 8 | +#include <st/l4/stm32l433Xc.dtsi> |
| 9 | +#include <st/l4/stm32l433c(b-c)ux-pinctrl.dtsi> |
| 10 | +#include "feather_connector.dtsi" |
| 11 | +#include <zephyr/dt-bindings/input/input-event-codes.h> |
| 12 | + |
| 13 | +/ { |
| 14 | + model = "Blues Cygnet"; |
| 15 | + compatible = "blues,cygnet"; |
| 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 | + |
| 27 | + user_led: led_0 { |
| 28 | + gpios = <&gpioa 8 GPIO_ACTIVE_HIGH>; |
| 29 | + label = "User LED"; |
| 30 | + }; |
| 31 | + }; |
| 32 | + |
| 33 | + gpio_keys { |
| 34 | + compatible = "gpio-keys"; |
| 35 | + |
| 36 | + user_button: button { |
| 37 | + gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; |
| 38 | + label = "User Button"; |
| 39 | + zephyr,code = <INPUT_KEY_0>; |
| 40 | + }; |
| 41 | + }; |
| 42 | + |
| 43 | + aliases { |
| 44 | + led0 = &user_led; |
| 45 | + sw0 = &user_button; |
| 46 | + }; |
| 47 | +}; |
| 48 | + |
| 49 | +&clk_lsi { |
| 50 | + status = "okay"; |
| 51 | +}; |
| 52 | + |
| 53 | +&clk_hsi { |
| 54 | + status = "okay"; |
| 55 | +}; |
| 56 | + |
| 57 | +&pll { |
| 58 | + div-m = <1>; |
| 59 | + mul-n = <20>; |
| 60 | + div-p = <7>; |
| 61 | + div-q = <2>; |
| 62 | + div-r = <4>; |
| 63 | + clocks = <&clk_hsi>; |
| 64 | + status = "okay"; |
| 65 | +}; |
| 66 | + |
| 67 | +&rcc { |
| 68 | + clocks = <&pll>; |
| 69 | + clock-frequency = <DT_FREQ_M(80)>; |
| 70 | + ahb-prescaler = <1>; |
| 71 | + apb1-prescaler = <1>; |
| 72 | + apb2-prescaler = <1>; |
| 73 | +}; |
| 74 | + |
| 75 | +&lpuart1 { |
| 76 | + pinctrl-0 = <&lpuart1_tx_pb11 &lpuart1_rx_pb10>; |
| 77 | + pinctrl-names = "default"; |
| 78 | + current-speed = <115200>; |
| 79 | + status = "okay"; |
| 80 | +}; |
| 81 | + |
| 82 | +&usart1 { |
| 83 | + pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; |
| 84 | + pinctrl-names = "default"; |
| 85 | + current-speed = <115200>; |
| 86 | +}; |
| 87 | + |
| 88 | +&spi1 { |
| 89 | + pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pb5>; |
| 90 | + pinctrl-names = "default"; |
| 91 | + cs-gpios = <&gpiob 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 92 | + status = "okay"; |
| 93 | +}; |
| 94 | + |
| 95 | +&i2c1 { |
| 96 | + pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; |
| 97 | + pinctrl-names = "default"; |
| 98 | + clock-frequency = <I2C_BITRATE_FAST>; |
| 99 | + status = "okay"; |
| 100 | +}; |
| 101 | + |
| 102 | +&timers2 { |
| 103 | + status = "okay"; |
| 104 | + |
| 105 | + pwm2: pwm { |
| 106 | + status = "okay"; |
| 107 | + pinctrl-0 = <&tim2_ch1_pa0>; |
| 108 | + pinctrl-names = "default"; |
| 109 | + }; |
| 110 | +}; |
| 111 | + |
| 112 | +&can1 { |
| 113 | + pinctrl-0 = <&can1_rx_pb8 &can1_tx_pb9>; |
| 114 | + pinctrl-names = "default"; |
| 115 | + status = "okay"; |
| 116 | +}; |
| 117 | + |
| 118 | +&rtc { |
| 119 | + clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, |
| 120 | + <&rcc STM32_SRC_LSI RTC_SEL(2)>; |
| 121 | + status = "okay"; |
| 122 | +}; |
| 123 | + |
| 124 | +&flash0 { |
| 125 | + |
| 126 | + partitions { |
| 127 | + compatible = "fixed-partitions"; |
| 128 | + #address-cells = <1>; |
| 129 | + #size-cells = <1>; |
| 130 | + |
| 131 | + /* |
| 132 | + * Reserve the final 16 KiB for file system partition |
| 133 | + */ |
| 134 | + storage_partition: partition@3c000 { |
| 135 | + label = "storage"; |
| 136 | + reg = <0x0003c000 DT_SIZE_K(16)>; |
| 137 | + }; |
| 138 | + }; |
| 139 | +}; |
0 commit comments