File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 led0 = &green_led;
5454 led1 = &blue_led;
5555 led2 = &red_led;
56+ rtc = &rtc;
5657 sw0 = &user_button;
5758 watchdog0 = &iwdg;
5859 };
9697 status = "okay";
9798};
9899
100+ &clk_lse {
101+ status = "okay";
102+ };
103+
99104&pll1 {
100105 clocks = <&clk_hse>;
101106 div-m = <3>;
@@ -343,3 +348,9 @@ csi_capture_port: &pipe_main {};
343348&iwdg {
344349 status = "okay";
345350};
351+
352+ &rtc {
353+ clocks = <&rcc STM32_CLOCK(APB4, 16)>,
354+ <&rcc STM32_SRC_LSE RTC_SEL(1)>;
355+ status = "okay";
356+ };
Original file line number Diff line number Diff line change 3030 aliases {
3131 led0 = &green_led_1;
3232 led1 = &red_led_2;
33+ rtc = &rtc;
3334 sw0 = &user_button;
3435 watchdog0 = &iwdg;
3536 };
126127 status = "okay";
127128};
128129
130+ &clk_lse {
131+ status = "okay";
132+ };
133+
129134&pll1 {
130135 clocks = <&clk_hse>;
131136 div-m = <3>;
@@ -577,3 +582,9 @@ zephyr_jpegenc: &jpeg {
577582&crc {
578583 status = "okay";
579584};
585+
586+ &rtc {
587+ clocks = <&rcc STM32_CLOCK(APB4, 16)>,
588+ <&rcc STM32_SRC_LSE RTC_SEL(1)>;
589+ status = "okay";
590+ };
Original file line number Diff line number Diff line change @@ -485,6 +485,11 @@ static int rtc_stm32_init(const struct device *dev)
485485
486486 int err = 0 ;
487487
488+ #if defined(CONFIG_SOC_SERIES_STM32N6X )
489+ /* STM32N6 needs backup domain access before configuring RTC clock */
490+ stm32_backup_domain_enable_access ();
491+ #endif /* CONFIG_SOC_SERIES_STM32N6X */
492+
488493 /* Enable RTC bus clock */
489494 if (clock_control_on (clk , (clock_control_subsys_t )& cfg -> pclken [0 ]) != 0 ) {
490495 LOG_ERR ("clock op failed\n" );
@@ -521,7 +526,9 @@ static int rtc_stm32_init(const struct device *dev)
521526 }
522527#endif /* CONFIG_SOC_SERIES_STM32WB0X */
523528
529+ #if !defined(CONFIG_SOC_SERIES_STM32N6X )
524530 stm32_backup_domain_enable_access ();
531+ #endif /* !CONFIG_SOC_SERIES_STM32N6X */
525532
526533#if DT_INST_CLOCKS_CELL_BY_IDX (0 , 1 , bus ) == STM32_SRC_HSE
527534 /* Must be configured before selecting the RTC clock source */
Original file line number Diff line number Diff line change 13511351 };
13521352 };
13531353
1354+ rtc: rtc@6004000 {
1355+ compatible = "st,stm32-rtc";
1356+ reg = <0x46004000 0x400>;
1357+ interrupts = <16 0>;
1358+ clocks = <&rcc STM32_CLOCK(APB4, 16)>;
1359+ alarms-count = <2>;
1360+ status = "disabled";
1361+ };
1362+
13541363 xspim: xspim@802b400 {
13551364 compatible = "st,stm32-xspim";
13561365 reg = <0x802b400 0x400>;
You can’t perform that action at this time.
0 commit comments