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

206 lines
3.9 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
// gps_en: gps_en {
// gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>;
// label = "GPS power enable";
// };
};
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 {
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
2024-03-31 18:44:33 +00:00
zephyr,canbus = &fdcan1;
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-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";
// };
&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";
gnss: gnss-nmea-generic {
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";
};
&sdmmc1 {
status = "okay";
pinctrl-0 = <&sdmmc1_d0_pc8
&sdmmc1_d1_pc9
&sdmmc1_d2_pc10
&sdmmc1_d3_pc11
&sdmmc1_ck_pc12
&sdmmc1_cmd_pd2>;
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>;
spi-max-frequency = <DT_FREQ_M(1)>;
};
2024-03-31 18:44:33 +00:00
/* TODO: add LSM6DS3 may need custom driver */
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";
};