boards: frdm_mcxa166, frdm_mcxa276: add watchdog support

1. enable watchdog support
2. verified tests/drivers/watchdog/wdt_basic_api

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
This commit is contained in:
Peter Wang 2025-04-14 18:06:59 +08:00 committed by Benjamin Cabé
commit d14c9c4d47
8 changed files with 38 additions and 0 deletions

View file

@ -153,6 +153,11 @@ void board_early_init_hook(void)
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(edma0)) #if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(edma0))
RESET_ReleasePeripheralReset(kDMA0_RST_SHIFT_RSTn); RESET_ReleasePeripheralReset(kDMA0_RST_SHIFT_RSTn);
#endif #endif
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wwdt0))
CLOCK_SetClockDiv(kCLOCK_DivWWDT0, 1u);
#endif
/* Set SystemCoreClock variable. */ /* Set SystemCoreClock variable. */
SystemCoreClock = CLOCK_INIT_CORE_CLOCK; SystemCoreClock = CLOCK_INIT_CORE_CLOCK;
} }

View file

@ -20,6 +20,7 @@
led2 = &red_led; led2 = &red_led;
sw0 = &user_button_2; sw0 = &user_button_2;
sw1 = &user_button_3; sw1 = &user_button_3;
watchdog0 = &wwdt0;
}; };
chosen { chosen {
@ -140,3 +141,7 @@
}; };
}; };
}; };
&wwdt0 {
status = "okay";
};

View file

@ -17,4 +17,5 @@ supported:
- gpio - gpio
- uart - uart
- flash - flash
- watchdog
vendor: nxp vendor: nxp

View file

@ -153,6 +153,11 @@ void board_early_init_hook(void)
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(edma0)) #if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(edma0))
RESET_ReleasePeripheralReset(kDMA0_RST_SHIFT_RSTn); RESET_ReleasePeripheralReset(kDMA0_RST_SHIFT_RSTn);
#endif #endif
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wwdt0))
CLOCK_SetClockDiv(kCLOCK_DivWWDT0, 1u);
#endif
/* Set SystemCoreClock variable. */ /* Set SystemCoreClock variable. */
SystemCoreClock = CLOCK_INIT_CORE_CLOCK; SystemCoreClock = CLOCK_INIT_CORE_CLOCK;
} }

View file

@ -20,6 +20,7 @@
led2 = &red_led; led2 = &red_led;
sw0 = &user_button_2; sw0 = &user_button_2;
sw1 = &user_button_3; sw1 = &user_button_3;
watchdog0 = &wwdt0;
}; };
chosen { chosen {
@ -140,3 +141,7 @@
}; };
}; };
}; };
&wwdt0 {
status = "okay";
};

View file

@ -17,4 +17,5 @@ supported:
- gpio - gpio
- uart - uart
- flash - flash
- watchdog
vendor: nxp vendor: nxp

View file

@ -214,6 +214,14 @@
no-error-irq; no-error-irq;
status = "disabled"; status = "disabled";
}; };
wwdt0: watchdog@4000c000 {
compatible = "nxp,lpc-wwdt";
reg = <0x4000c000 0x1000>;
interrupts = <60 0>;
status = "disabled";
clk-divider = <1>;
};
}; };
}; };

View file

@ -214,6 +214,14 @@
no-error-irq; no-error-irq;
status = "disabled"; status = "disabled";
}; };
wwdt0: watchdog@4000c000 {
compatible = "nxp,lpc-wwdt";
reg = <0x4000c000 0x1000>;
interrupts = <60 0>;
status = "disabled";
clk-divider = <1>;
};
}; };
}; };