telem3-fw/boards/vendor/telem3/telem3.dts

240 lines
4.8 KiB
Plaintext
Raw Normal View History

2024-03-31 16:31:24 +00:00
/dts-v1/;
#include <st/l5/stm32l562Xe.dtsi>
#include <st/l5/stm32l562zetx-pinctrl.dtsi>
/ {
model = "Telem3";
compatible = "vendor,telem3";
#address-cells = <1>;
#size-cells = <1>;
leds {
compatible = "gpio-leds";
fault_led: led_d12 {
gpios = <&gpiod 12 GPIO_ACTIVE_HIGH>;
label = "Fault Indicator";
};
status_led0: led_d10 {
gpios = <&gpiod 10 GPIO_ACTIVE_HIGH>;
label = "Status 0 Indicator";
};
status_led1: led_d15 {
gpios = <&gpiod 15 GPIO_ACTIVE_HIGH>;
label = "Status 1 Indicator";
};
status_led2: led_d13 {
gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>;
label = "Status 2 Indicator";
};
status_led3: led_d11 {
gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
label = "Status 3 Indicator";
};
good_led: led_d14 {
gpios = <&gpiod 14 GPIO_ACTIVE_HIGH>;
label = "Good Indicator";
};
// TODO: should this really be here
2024-04-02 05:06:19 +00:00
gps_en: gps_en {
gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>;
label = "GPS power enable";
};
2024-03-31 16:31:24 +00:00
};
option_switches {
compatible = "gpio-keys";
option_0: opt_0 {
gpios = <&gpioe 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Switch Option 0";
};
option_1: opt_1 {
gpios = <&gpioe 14 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Switch Option 1";
};
option_2: opt_2 {
gpios = <&gpioe 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "Switch Option 2";
};
};
chosen {
2024-04-02 05:06:19 +00:00
zephyr,console = &cdc_acm_uart;
zephyr,shell-uart = &cdc_acm_uart;
2024-03-31 16:31:24 +00:00
zephyr,sram = &sram0;
zephyr,flash = &flash0;
2024-03-31 18:44:33 +00:00
zephyr,canbus = &fdcan1;
2024-04-02 05:06:19 +00:00
zephyr,sdmmc-disk = &sdmmc1;
2024-03-31 16:31:24 +00:00
};
aliases {
led0 = &good_led;
sw0 = &option_0;
die-temp0 = &die_temp;
volt-sensor0 = &vref;
volt-sensor1 = &vbat;
2024-04-02 05:06:19 +00:00
spi-flash0 = &spiflash0;
2024-03-31 16:31:24 +00:00
};
2024-03-31 18:44:33 +00:00
soc {
fdcan1: can@4000a400 {
compatible = "st,stm32-fdcan";
reg = <0x4000a400 0x400>, <0x4000ac00 0x350>;
reg-names = "m_can", "message_ram";
interrupts = <39 0>, <40 0>;
interrupt-names = "int0", "int1";
clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00000200>;
bosch,mram-cfg = <0x0 28 8 3 3 0 3 3>;
status = "disabled";
};
};
2024-03-31 16:31:24 +00:00
};
// &clk_lse {
// status = "okay";
// };
2024-04-02 05:06:19 +00:00
&clk_hsi48 {
status = "okay";
};
2024-03-31 16:31:24 +00:00
&clk_hse {
status = "okay";
clock-frequency = <DT_FREQ_M(8)>;
};
&pll {
// 96 MHz core, 48/24 elsewhere
div-m = <1>;
mul-n = <24>;
div-p = <7>;
div-q = <4>;
div-r = <2>;
status = "okay";
clocks = <&clk_hse>;
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(96)>;
ahb-prescaler = <1>;
apb1-prescaler = <4>;
apb2-prescaler = <4>;
};
// stm32_lp_tick_source: &lptim1 {
// clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>,
// <&rcc STM32_SRC_LSE LPTIM1_SEL(3)>;
// status = "okay";
// };
&usart1 {
current-speed = <115200>;
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
pinctrl-names = "default";
status = "okay";
};
&usart2 {
current-speed = <9600>;
pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>;
pinctrl-names = "default";
status = "okay";
2024-04-02 05:06:19 +00:00
gnss: l80_gps {
2024-03-31 16:31:24 +00:00
compatible = "gnss-nmea-generic";
};
};
&rng {
status = "okay";
};
&die_temp {
status = "okay";
};
zephyr_udc0: &usb {
pinctrl-0 = <&usb_dp_pa12 &usb_dm_pa11>;
pinctrl-names = "default";
status = "okay";
2024-04-02 05:06:19 +00:00
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
};
2024-03-31 16:31:24 +00:00
};
&sdmmc1 {
status = "okay";
pinctrl-0 = <&sdmmc1_d0_pc8
&sdmmc1_d1_pc9
&sdmmc1_d2_pc10
&sdmmc1_d3_pc11
&sdmmc1_ck_pc12
&sdmmc1_cmd_pd2>;
2024-04-02 05:06:19 +00:00
// bus-width = <4>;
2024-03-31 16:31:24 +00:00
pinctrl-names = "default";
};
&spi1 {
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>;
pinctrl-names = "default";
2024-03-31 18:44:33 +00:00
cs-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>, <&gpioc 4 GPIO_ACTIVE_LOW>;
2024-03-31 16:31:24 +00:00
status = "okay";
bme280@0 {
compatible = "bosch,bme280";
reg = <0>;
2024-04-02 20:18:15 +00:00
spi-max-frequency = <DT_FREQ_M(10)>;
status = "okay";
2024-03-31 16:31:24 +00:00
};
2024-03-31 18:44:33 +00:00
/* TODO: add LSM6DS3 may need custom driver */
2024-04-02 20:18:15 +00:00
lsm6ds3: lsm6dsl@1 {
compatible = "st,lsm6dsl";
reg = <1>;
irq-gpios = <&gpiob 0 GPIO_ACTIVE_HIGH>;
spi-max-frequency = <DT_FREQ_M(10)>;
status = "okay";
};
2024-03-31 16:31:24 +00:00
};
&vref {
status = "okay";
};
&vbat {
status = "okay";
};
&iwdg {
status = "okay";
};
&aes {
status = "okay";
};
2024-03-31 18:44:33 +00:00
&fdcan1 {
status = "okay";
clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00000200>,
<&rcc STM32_SRC_PLL_Q SAI2_SEL(0)>;
bus-speed = <125000>;
bus-speed-data = <125000>;
pinctrl-0 = <&fdcan1_tx_pd1 &fdcan1_rx_pd0>;
pinctrl-names = "default";
};
2024-04-02 05:06:19 +00:00
&octospi1 {
pinctrl-0 = <&octospi1_clk_pf10 &octospi1_ncs_pa2 \
&octospi1_io0_pf8 &octospi1_io1_pf9 &octospi1_io2_pf7
&octospi1_io3_pf6 &octospi1_io4_pc1 &octospi1_io5_pc2
&octospi1_io6_pc3 &octospi1_io7_pc0>;
pinctrl-names = "default";
status = "okay";
spiflash0: ospi-nor-flash@90000000 {
compatible = "st,stm32-ospi-nor";
reg = <0x90000000 DT_SIZE_M(16)>; /* 128 Mbits */
ospi-max-frequency = <80000000>;
spi-bus-width = <OSPI_QUAD_MODE>;
data-rate = <OSPI_DTR_TRANSFER>;
status = "okay";
};
2024-04-02 20:18:15 +00:00
};