2022-05-27 01:42:50 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022 Blues Inc.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/dts-v1/;
|
|
|
|
#include <st/l4/stm32l4r5Xi.dtsi>
|
2022-12-16 12:40:30 +08:00
|
|
|
#include <st/l4/stm32l4r5z(g-i)yx-pinctrl.dtsi>
|
2022-05-27 01:42:50 +08:00
|
|
|
#include "feather_connector.dtsi"
|
|
|
|
|
|
|
|
/ {
|
|
|
|
model = "Blues Wireless Swan board";
|
|
|
|
compatible = "blues,swan-r5";
|
|
|
|
|
|
|
|
chosen {
|
|
|
|
zephyr,console = &lpuart1;
|
|
|
|
zephyr,shell-uart = &lpuart1;
|
|
|
|
zephyr,sram = &sram0;
|
|
|
|
zephyr,flash = &flash0;
|
|
|
|
};
|
|
|
|
|
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
|
|
|
led0: led_0 {
|
|
|
|
gpios = <&gpioe 2 GPIO_ACTIVE_HIGH>;
|
|
|
|
label = "User LD1";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio_keys {
|
|
|
|
compatible = "gpio-keys";
|
|
|
|
user_button: button {
|
|
|
|
label = "User";
|
|
|
|
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-10-06 19:04:24 +08:00
|
|
|
|
2022-05-27 01:42:50 +08:00
|
|
|
zephyr,user {
|
2022-10-06 19:13:45 +08:00
|
|
|
dischrg-gpios = <&gpioe 6 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
|
2022-05-27 01:42:50 +08:00
|
|
|
};
|
|
|
|
|
2022-10-06 19:04:24 +08:00
|
|
|
supply-3v3 {
|
2022-11-29 22:42:14 +08:00
|
|
|
compatible = "regulator-fixed";
|
2022-10-06 19:04:24 +08:00
|
|
|
regulator-name = "supply-3v3";
|
|
|
|
enable-gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>;
|
|
|
|
regulator-boot-on;
|
|
|
|
};
|
|
|
|
|
2022-05-27 01:42:50 +08:00
|
|
|
aliases {
|
|
|
|
led0 = &led0;
|
|
|
|
sw0 = &user_button;
|
2023-05-15 05:54:05 +08:00
|
|
|
volt-sensor0 = &vref;
|
2022-05-27 01:42:50 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-09-07 15:13:35 +08:00
|
|
|
&clk_lsi {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2022-11-24 21:46:38 +08:00
|
|
|
&clk_hsi48 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2022-05-27 01:42:50 +08:00
|
|
|
&clk_hsi {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&pll {
|
|
|
|
div-m = <4>;
|
|
|
|
mul-n = <40>;
|
|
|
|
div-p = <7>;
|
|
|
|
div-q = <2>;
|
|
|
|
div-r = <2>;
|
|
|
|
clocks = <&clk_hsi>;
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&rcc {
|
|
|
|
clocks = <&pll>;
|
|
|
|
clock-frequency = <DT_FREQ_M(80)>;
|
|
|
|
ahb-prescaler = <1>;
|
|
|
|
apb1-prescaler = <1>;
|
|
|
|
apb2-prescaler = <1>;
|
|
|
|
};
|
|
|
|
|
|
|
|
&usart1 {
|
|
|
|
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
current-speed = <115200>;
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&usart2 {
|
|
|
|
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pd6>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
current-speed = <115200>;
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&usart3 {
|
|
|
|
pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
current-speed = <115200>;
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&lpuart1 {
|
|
|
|
pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
current-speed = <115200>;
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&i2c1 {
|
|
|
|
pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&i2c2 {
|
|
|
|
pinctrl-0 = <&i2c2_scl_pf1 &i2c2_sda_pf0>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&i2c3 {
|
|
|
|
pinctrl-0 = <&i2c3_scl_pc0 &i2c3_sda_pc9>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi1 {
|
|
|
|
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
cs-gpios = <&gpioa 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi2 {
|
|
|
|
pinctrl-0 = <&spi2_nss_pd0 &spi2_sck_pd1
|
|
|
|
&spi2_miso_pb14 &spi2_mosi_pb15>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi3 {
|
|
|
|
pinctrl-0 = <&spi3_nss_pa15 &spi3_sck_pc10
|
|
|
|
&spi3_miso_pc11 &spi3_mosi_pc12>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
zephyr_udc0: &usbotg_fs {
|
|
|
|
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12
|
|
|
|
&usb_otg_fs_id_pa10>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&timers2 {
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
pwm2: pwm {
|
|
|
|
status = "okay";
|
|
|
|
pinctrl-0 = <&tim2_ch1_pa0>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&rtc {
|
2022-09-07 15:13:35 +08:00
|
|
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
|
|
|
|
<&rcc STM32_SRC_LSI RTC_SEL(2)>;
|
2022-05-27 01:42:50 +08:00
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&flash0 {
|
|
|
|
partitions {
|
|
|
|
compatible = "fixed-partitions";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
|
|
|
|
|
|
|
/* Reserve last 16KiB for property storage */
|
|
|
|
storage_partition: partition@1FB000 {
|
|
|
|
label = "storage";
|
|
|
|
reg = <0x001FB000 0x00004000>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&adc1 {
|
|
|
|
pinctrl-0 = <&adc1_in6_pa1>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
status = "okay";
|
|
|
|
};
|
2023-05-15 05:54:05 +08:00
|
|
|
|
|
|
|
&vref {
|
|
|
|
status = "okay";
|
|
|
|
};
|