aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* stm32: add PB12/PB13 FDCAN2 support STM32G0B1bigtreetech2023-02-032-3/+8
| | | | | Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix CAN2 handling in can.cKevin O'Connor2023-01-171-13/+26
| | | | | | | Using the CAN2 interface still requires that CAN1 be enabled, and the filtering hardware is always on the CAN1 hardware block. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Increase sample time in stm32h7_adc.cKevin O'Connor2023-01-171-7/+10
| | | | | | | | The existing sample times are not long enough to reliably sample the internal temperature sensor. Longer sample times should also improve results with temperature sensors that have a higher inductance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Don't set boost nor linear calibration on stm32h723 adc3Kevin O'Connor2023-01-171-14/+14
| | | | | | Only adc1 and adc2 have these CR register bits on stm32h723. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Reduce read-modify-write of CR in stm32h7_adc.c initKevin O'Connor2023-01-171-21/+12
| | | | | | | | | | Prefer explicitly setting the CR hardware register to defined values during initialization. Also, prefer "#if CONFIG_MACH_STM32H7" over bit definitions to make it clear that the code applies only on stm32h7. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Don't use read-modify-write on ISR register in stm32h7_adc.cKevin O'Connor2023-01-171-3/+2
| | | | | | Bits are cleared in the ISR register by writing 1, not by masking. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: ADC timing rework and fixes in stm32h7_adc.cKevin O'Connor2023-01-171-34/+23
| | | | | | | | | | | | The stm32l412 doesn't have a PLLSAI1 clock and therefore the CKMODE should not be set to zero. The stm32h7 chips run the adc at 25mhz, so BOOST should be set to 0b10. Improve timing comments. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Move clock line mapping from stm32h7_adc.c to lookup_clock_line()Kevin O'Connor2023-01-174-17/+14
| | | | | | | 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: Simplify setting of adc_common fields in stm32h7_adc.cKevin O'Connor2023-01-171-12/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Use a consistent bank size of 20 across all chips in stm32h7_adc.cKevin O'Connor2023-01-171-3/+3
| | | | | | | Add a pad entry to adc_pins[] on stm32l4 so that it matches the other chips. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Simplify setting of 12bit mode on stm32h7 in stm32h7_adc.cKevin O'Connor2023-01-171-14/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: No need to use hardware oversampling in stm32h7_adc.cKevin O'Connor2023-01-171-25/+0
| | | | | | | | | Not all chips implement hardware oversampling. The software already implements oversampling, and additional hardware oversampling is unlikely to improve results. Remove the hardware oversampling to simplify the code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Simplify CFGR register setup in stm32h7_adc.cKevin O'Connor2023-01-171-10/+2
| | | | | | | | On all chips, the JQDIS bit is set and the CONT, RES, ALIGN bits are clear after a reset. There is no need to program the OVRMOD bit. Use the same logic across chips to help unify the adc implementation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: No need for LDORDY check in stm32h7_adc.cKevin O'Connor2023-01-171-17/+4
| | | | | | | | Not all chips have the LDORDY flag, while all chips will stabilize in 10us. There is no need for two different implementations as it is safe to wait 20us on all chips. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* linux: add -I attribute for user defined socket pathsStefan Dej2023-01-171-3/+7
| | | | Signed-off-by: Stefan Dej <meteyou@gmail.com>
* stm32: Reindent ifdefs in stm32f0_i2c.cKevin O'Connor2023-01-031-56/+55
| | | | | | A whitespace and comment change only - no functional changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Expand stm32g0 family (#5838)Alex Voinea2023-01-034-24/+61
| | | | | Add stm32g07x family support. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* stm32: Check for CONFIG_HAVE_BOOTLOADER_REQUEST in dfu_reboot.cKevin O'Connor2022-12-301-2/+2
| | | | | | | Support disabling dfu_reboot if HAVE_BOOTLOADER_REQUEST is disabled in the Kconfig rules. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: No need to define bootloader_request()Kevin O'Connor2022-12-301-6/+0
| | | | | | | Since avr does not define HAVE_BOOTLOADER_REQUEST it is not necessary to define the function. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canserial: Only call bootloader_request() if CONFIG_HAVE_BOOTLOADER_REQUESTKevin O'Connor2022-12-301-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Only call bootloader_request() if CONFIG_HAVE_BOOTLOADER_REQUESTKevin O'Connor2022-12-304-0/+5
| | | | | | | | | | Check for the build symbol prior to calling bootloader_request(). Enable the build symbol on rp2040, atsam, and atsamd chips. This also enables serial bootloader requsts on rp2040, atsam, and atsamd. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Include "misc.h" in stm32l4.c and stm32g4.cKevin O'Connor2022-12-302-0/+2
| | | | | | Include for bootloader_request() definition. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serial_irq: Rename SERIAL_BOOTLOADER_SIDECHANNEL to HAVE_BOOTLOADER_REQUESTKevin O'Connor2022-12-304-5/+5
| | | | | | | Rename the build symbol. This is in preparation for enabling HAVE_BOOTLOADER_REQUEST on usb and canbus. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: No need to specify "default n" in main Kconfig fileKevin O'Connor2022-12-301-10/+0
| | | | | | | A "bool" option already defaults to "n" so no need to state that explicitly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* scripts: support CanBoot on RP2040 in flash_usb.pyChris Lee2022-12-191-4/+5
| | | | Signed-off-by: Chris Lee <clee@mg8.org>
* stm32: Move dfu reboot logic to new dfu_reboot.c fileKevin O'Connor2022-12-1810-164/+84
| | | | | | | 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: Separate out USB DFU reboot logic in stm32l4.cKevin O'Connor2022-12-181-26/+43
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Separate out USB DFU reboot logic in stm32g4.cKevin O'Connor2022-12-181-21/+45
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* initial_pins: Add check to reduce compile time size when not in useKevin O'Connor2022-12-161-0/+2
| | | | | | | Add a check to the start of initial_pins_setup() to make it easier for gcc to optimize the code if it is not in use. 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>
* armcm_reset: Flush dcache before rebooting into canbootKevin O'Connor2022-12-161-8/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix usb build on stm32g0b0Kevin O'Connor2022-12-151-2/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix USB support on stm32g0b1Kevin O'Connor2022-12-151-1/+1
| | | | | | | | A typo in commit e33b41ab broke USB selection on stm32g0b1. Reported by @Pmant. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Fix stm32l4 buildKevin O'Connor2022-12-151-0/+1
| | | | | | | Commit c5d56f44 neglected to define ADCIN_BANK_SIZE in stm32h7_adc.c on stm32l4. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Minor changes to stm32g0b0 ifdefsKevin O'Connor2022-12-153-6/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32g0: add stm32g0b0 supportAlex Voinea2022-12-154-15/+32
| | | Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* 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>
* rp2040: Move watchdog code to new watchdog.c fileKevin O'Connor2022-12-143-27/+32
| | | | | | | Move the watchdog code to its own file so that it is easier to disable it for development builds. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_link: Rename CONFIG_FLASH_START to CONFIG_FLASH_APPLICATION_ADDRESSKevin O'Connor2022-12-1410-31/+45
| | | | | | Rename the build symbol name for better clarity on what it represents. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Fix lpc176x buildKevin O'Connor2022-12-142-2/+1
| | | | | | Fix build error introduced in commit 6ba2c3e1. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Rename canserial_send() to canbus_send()Kevin O'Connor2022-12-145-15/+13
| | | | | | | | Rename canserial_send() to canbus_send() and canserial_set_filter() to canbus_set_filter(). This makes it more clear where the code should reside. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* canbus: Rename canbus_send() to canhw_send()Kevin O'Connor2022-12-147-17/+17
| | | | | | | | Rename canbus_send() to canhw_send() and rename canbus_set_filter() to canhw_set_filter(). This makes it more clear where the code should reside. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rp2040: Fix copy-paste error in Kconfig commentKevin O'Connor2022-12-141-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Use "Bootloader offset" prompt in "make menuconfig"Kevin O'Connor2022-12-141-4/+17
| | | | | | | Use the same bootloader offset terminology that is used with other chips (eg, stm32). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Apply race fixes to stm32h7_adc.cKevin O'Connor2022-12-121-19/+18
| | | | | | | Improve handling of race conditions with hardware updates. This is the same changes applied to stm32f0_adc.c in commit 88325b6c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32g0: Do not disable SWD by accidentAlex Voinea2022-12-111-2/+5
| | | | | | Keep SWEN as 1 in FLASH->ACR register such that the SWD interface doesn't get disabled. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* stm32g4: Do not disable SWD by accidentAlex Voinea2022-12-111-1/+1
| | | | | | Keep SWEN as 1 in FLASH->ACR register such that the SWD interface doesn't get disabled. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* linux: add 'GPIOI' for linux process (#5926)BIGTREETECH2022-12-112-3/+4
| | | Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
* stm32: add STM32H723 supportbigtreetech2022-12-024-61/+113
| | | | | Signed-off-by: Chen.BJ from BigTreeTech chenbj@biqu3d.com Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32g4: implement build,usb,can,i2c,spi,serial,adc.Matt Baker2022-12-0210-19/+318
| | | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>