aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/stm32h7.c
Commit message (Collapse)AuthorAgeFilesLines
* stm32: Enable VOS0 power mode on stm32h723 if frequency above 400MhzKevin O'Connor2025-04-281-11/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Don't try to set incorrect PWR->CR3 register on stm32h7Kevin O'Connor2025-04-281-5/+3
| | | | | | It's not valid to set BYPASS and LDOEN at the same time. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Set the PLL frequency equal to CONFIG_CLOCK_FREQ on stm32h723Kevin O'Connor2025-04-281-1/+1
| | | | | | | | There is no reason to use a higher internal PLL frequency. This change also makes it possible to enable higher clock frequencies on the stm32h723. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Avoid read-modify-write register updates in stm32h7 clock_setup()Kevin O'Connor2025-04-281-58/+39
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Use enable_pclock() in stm32h7 clock_setup()Kevin O'Connor2025-04-281-5/+4
| | | | | | | Use the helper functions to enable the peripheral clock instead of directly manipulating the clock enable bits. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32h7: Always clear AHB1ENR at startup on stm32h7Kevin O'Connor2025-04-281-5/+1
| | | | | | | Entirely clear the AHB1ENR register. There is no need to modify AHB1LPENR. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix pll_base on stm32h7 when using a clock other than 25MhzKevin O'Connor2025-04-191-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32h7: Restore the RCC set in the bootloader to the default value (#6092)BIGTREETECH2023-03-061-0/+6
| | | Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
* stm32: Move clock line mapping from stm32h7_adc.c to lookup_clock_line()Kevin O'Connor2023-01-171-0/+3
| | | | | | | Use the common lookup_clock_line() code to lookup the adc clock lines. This also enables resets on the adc1/adc2 hardware block. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Move dfu reboot logic to new dfu_reboot.c fileKevin O'Connor2022-12-181-28/+2
| | | | | | | Move the stm32 DFU reboot logic to a new dfu_reboot.c file. This simplifies the per-chip code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Just clean dcache instead of disabling on stm32h7 dfu rebootKevin O'Connor2022-12-161-2/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Rework usb_reboot_for_dfu_bootloader() so it works on stm32h723Kevin O'Connor2022-12-151-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: add STM32H723 supportbigtreetech2022-12-021-1/+6
| | | | | Signed-off-by: Chen.BJ from BigTreeTech chenbj@biqu3d.com Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Enable instruction and data cache on stm32h7D4SK2022-10-211-0/+3
| | | | Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
* stm32: add FDCAN support for STM32H743 (SKR-3 Series) (#5668)BIGTREETECH2022-08-231-2/+13
| | | Signed-off-by: Chen.BJ from BigTreeTech <chenbj@biqu3d.com>
* stm32: Use new CONFIG_USB to determine if USB needs to be configuredKevin O'Connor2022-08-161-2/+2
| | | | | | | | | | | | Introduce a CONFIG_USB build symbol that is set whenever CONFIG_USBSERIAL or CONFIG_USBCANBUS is set. Use that symbol during setup so that the USB controller is properly initialized for both usb serial and usb canbus bridge configurations. This fixes the clock configuration for usb canbus bridge mode on stm32f446. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Rename usb_request_bootloader() to bootloader_request()Kevin O'Connor2022-07-291-4/+5
| | | | | | | Rename this board API function to a more generic name. This is in preparation for calling the function from the canbus code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: stm32g0/h7 usb_dfu_bootloader support (#5596)BIGTREETECH2022-06-301-0/+32
| | | Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
* armcm_reset: Add a armcm_reset.h header file for try_request_canboot()Kevin O'Connor2022-06-041-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: call "try_request_canboot" for bootloader requestsEric Callahan2022-06-031-0/+1
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* stm32: Unify enable_pclock() codeKevin O'Connor2021-12-301-68/+27
| | | | | | | | | Unify the handling of the enable_pclock() and is_enabled_pclock() code across all stm32 chips. All chips will now perform a peripheral reset on enable_pclock() (this is a change for stm32f0 and stm32h7). The enable_pclock() code will now also disable irqs during the enable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix the GPIO register for stm32h7 (#5077)adelyser2021-12-291-3/+3
| | | Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
* stm32: Enable optimized gpio_clock_enable() function on stm32h7Kevin O'Connor2021-12-231-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Reorganize stm32h7.c into major code blocksKevin O'Connor2021-12-231-10/+21
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Remove USB boot stubs from stm32h7.cKevin O'Connor2021-12-231-8/+0
| | | | | | | The USB dfu bootloader wasn't enabled on stm32h7, so remove the copy-and-paste code stubs for it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add new gpioperiph.c file for gpio_peripheral() codeKevin O'Connor2021-12-231-26/+1
| | | | | | | | The gpio_peripheral() code is the same in stm32f0.c, stm32f4.c, and stm32h7.c. Move that function to a new gpioperiph.c file to avoid code duplication. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add USBOTG support to stm32h7adelyser2021-11-211-5/+40
| | | | | Signed-off-by: Aaron DeLyser <bluwolf@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add stm32h7 SPI support (#4850)adelyser2021-11-201-2/+6
| | | Signed-off-by: Aaron DeLyser <bluwolf@gmail.com>
* stm32: Add comments to configuration of OSPEEDR gpio speedKevin O'Connor2021-10-121-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add initial support for stm32h7D4SK2021-10-061-0/+231
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>