make fdcan work (temporary fix!)

This commit is contained in:
saji 2024-03-31 13:44:33 -05:00
parent 606438a736
commit 4ea1463044

View file

@ -64,6 +64,7 @@
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,canbus = &fdcan1;
};
aliases {
led0 = &good_led;
@ -72,6 +73,19 @@
volt-sensor0 = &vref;
volt-sensor1 = &vbat;
};
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";
};
};
};
// &clk_lse {
@ -153,7 +167,7 @@ zephyr_udc0: &usb {
&spi1 {
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>;
pinctrl-names = "default";
cs-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>;
cs-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>, <&gpioc 4 GPIO_ACTIVE_LOW>;
status = "okay";
bme280@0 {
@ -161,6 +175,7 @@ zephyr_udc0: &usb {
reg = <0>;
spi-max-frequency = <DT_FREQ_M(1)>;
};
/* TODO: add LSM6DS3 may need custom driver */
};
&vref {
@ -179,4 +194,12 @@ zephyr_udc0: &usb {
status = "okay";
};
&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";
};