1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

134 Commits

Author SHA1 Message Date
Marian Buschsieweke
b917807444
drivers/periph_timer: add periph_timer_query_freqs
Allow accessing supported timer frequencies with a dedicated API.
This API needs to be implemented per platform and is available with
the feature periph_timer_query_freqs.
2023-12-05 16:07:24 +01:00
Urs Gompper
97bde07e0d drivers/periph_common: add peripheral freqm to Kconfig 2023-11-23 20:53:15 +01:00
Gunar Schorcht
b73be0d546 drivers/sdmmc: add low-levl SD Host Controller implementation 2023-09-23 19:26:30 +02:00
Gunar Schorcht
bdfbe6f8a6 periph/sdmmc: add ADD_CMD12 feature in Kconfig 2023-09-14 10:01:14 +02:00
bors[bot]
2a4496b32a
Merge #19539 #19815 #19860 #19886
19539: drivers/periph_sdmmc: define a High-level SDIO/SD/MMC API and low-level SDMMC periperal driver interface r=benpicco a=gschorcht

### Contribution description

This PR provides a SDIO/SD/MMC Device API (SDMMC). It implements a SD host controller driver that provides a high-level functions using a low-level SDIO/SD/MMC peripheral driver for accessing

- MultiMediaCards (MMC) and Embedded MultiMediaCards (eMMC)
- SD Memory Cards (SD Cards) with Standard Capacity (SDSC), High Capacity (SDHC) or Extended Capacity (SDXC).

It supports:

- 1-bit, 4-bit and 8-bit data bus width
- Default Speed and High Speed
- Auto-CLK

The SDIO/SD/MMC device API (SDMMC) is divided into two parts:

1. The high-level API that implements the SD Host Controller driver and allows
   - to inititialize and identify different types of cards,
   - to access them either blockwise or bytewise,
   - to get information about the used card, and
   - to send single commands or application specific commands to the card.

2. The low-level SDIO/SD/MMC peripheral driver implements the low-level functions required by the high-level device API. It has to be implemented for each MCU.

### Limitations:

- Only one card per SDIO/SD/MMC device is supported.
- eMMCs specific features are not supported.
- UHS-I, UHS-II and UHS-III are not supported.

### Testing procedure

PR #19540, PR #19760 or PR #19786 is needed to test this PR.

### Issues/PRs references

Prerequisite for PR #19540
Prerequisite for PR #19760
Prerequisite for PR #19786

19815: cpu/sam0_common/periph/sdhc: busy waiting and clock fixes r=benpicco a=benpicco



19860: drivers/ft5x06: fix vendor ID for FT6xx6 and FTxxxx register addresses r=benpicco a=gschorcht

### Contribution description

This PR provides a fix of the vendor ID for FT6xx6 touch panel driver ICs and a fix of register addresses for FTxxxx.

According to the [Application Note for FT6x06 CTPM](https://cdn-shop.adafruit.com/datasheets/FT6x06_AN_public_ver0.1.3.pdf), the vendor ID of FT6x06 touch panel driver ICs is `0x11` instead of `0xcd`. Although there are no information found in the Web about the FT6x36, the FT6336U touch panel of a ESP32-S3 WT32 SC01 Plus is also working with `0x11` as vendor ID so that it seems that FT6x36 is also using `0x11` as vendor ID.

Figured out with a `stm32f723e-disco` board (revision D03). Without this PR, `tests/drivers/ft5x06` gives:
```
+------------Initializing------------+
[ft5x06] init: invalid vendor ID: '0x11' (expected: 0xcd)
[Error] Initialization failed
```
With this PR it works as expected.
```
+------------Initializing------------+
Initialization successful
main(): This is RIOT! (Version: 2023.10-devel-96-gbb9011-drivers/ft5x06_fix_vendor_id)
FT5x06 test application

+------------Initializing------------+
[ft5x06] init: configuring touchscreen interrupt
Initialization successful
1 touch detected
[ft5x06] read gesture_id '0x00'
Touch 1 - X: 151, Y:138
[ft5x06] read gesture_id '0x00'
```

Some background information found in the Web:

- According to the [STM32CubeF7](c20e6dd15b/Drivers/BSP/STM32F723E-Discovery/stm32f723e_discovery_ts.c (L24-L27)) the FRIDA LCD panel mounted on the `stm32f723e-disco` board either uses FT6x36 (prior revision D) or FT3x67 (revision D). However, the FT5x06 driver type for the card is defined as FT6x06, which does not seem correct: bb9011c3fb/boards/stm32f723e-disco/include/board.h (L59)
- According to the [STM32CubeF7](c20e6dd15b/Drivers/BSP/Components/ft6x06/ft6x06.h (L269-L270)), the vendor ID for FT6x36 should be `0xcd`. However, the FT6336U on ESP32-S3 WT32 SC01 Plus works with vendor ID `0x11`.
- The [Adafruit FT6206 library](95118cd983/Adafruit_FT6206.h (L28)) uses `0x11` as vendor id.
- The `stm32l496g-disco` board uses a FT6236 which has vendor ID `0xcd`.

So the information available on the web is confusing. Maybe, a better solution would be to accept `0x11` as well as `0xcd` as vendor ID for FT6xxx touch panels. Unfortunately, there are no documents available on the registers directly from FocalTech 😟 so it seems to be more speculation than knowledge.

### Testing procedure


### Issues/PRs references



19886: cpu/efm32: fix DAC configuration r=benpicco a=gschorcht

### Contribution description

The EFM32 MCU allows the reference voltage to be configured per DAC device, not per DAC channel. Also, the DAC reference voltage was defined in the configuration but not used anywhere.

At the moment we have only defined one board (`stwstk6220a`) that uses the DAC, so changing the configuration interface shouldn't be critical.

### Testing procedure

`tests/periph/dac` should still work for the `stwstk6220a`
```
BOARD=slwstk6220a make -j8 -C tests/periph/dac flash
```
I don't have a `stwstk6220a` board (EFM32 Series 0) so that I can't test it. I could only test it for the `sltb009a` board (EFM32 Series 1) with the change for VDAC in PR #19887.

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-08-23 16:55:09 +00:00
Gunar Schorcht
556ef5235c drivers: add periph_sdmmc support 2023-08-08 09:09:12 +02:00
Gunar Schorcht
37472d54c3 cpu/stm32/periph: add FMC support 2023-07-26 09:02:10 +02:00
MrKevinWeiss
adbf951481
cpu/rpx0xx: Fix kconfig model 2023-05-24 09:53:23 +02:00
bors[bot]
f3150120f7
Merge #17425
17425: cpu/rpx0xx: initial PIO support r=maribu a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@st.ovgu.de>
2023-05-23 07:02:45 +00:00
Fabian Hüßler
116c579cb5 cpu/rpx0xx: Add PIO I2C implementation 2023-05-23 08:49:37 +02:00
bors[bot]
8fc1187278
Merge #17830 #19635
17830: periph/timer: fix Kconfig menu title r=aabadie a=gschorcht

### Contribution description

This PR is a very small fix of inconsistent peripheral driver entry in `Kconfig` for `periph/timer`.

In Kconfig menu `(Top) → Drivers → Peripherals drivers` all entries start with the peripheral name in alphabetical order with only one exception, the timer entry. This entry is called `Configure timer peripheral driver`:
```
[ ] CPU unique ID
[ ] EEPROM peripheral driver
[ ] Flashpage peripheral driver  ----
[*] GPIO peripheral driver  --->
[ ] HWRNG peripheral driver
[ ] PWM peripheral driver
[*] Power Management (PM) peripheral driver
[*]     Auto initialize Power Management (PM) peripheral
[ ] Quadrature Decoder (QDEC) peripheral driver
[ ] RTC peripheral driver  ----
[ ] SPI peripheral driver  ----
[*] UART peripheral driver  --->
[*] Configure timer peripheral driver  --->
```
This is confusing and doesn't help to find the right entry. This PR
1. changes the entry to `Timer peripheral driver` and
2. corrects the alphabetical order.

### Testing procedure

Use command
```
TEST_KCONFIG=1 make -C tests/periph_timer menuconfig
```
and check the output. in menu `(Top) → Drivers → Peripherals drivers`. It should be with this PR:
```
[ ] CPU unique ID
[ ] EEPROM peripheral driver
[ ] Flashpage peripheral driver  ----
[*] GPIO peripheral driver  --->
[ ] HWRNG peripheral driver
[ ] PWM peripheral driver
[*] Power Management (PM) peripheral driver
[*]     Auto initialize Power Management (PM) peripheral
[ ] Quadrature Decoder (QDEC) peripheral driver
[ ] RTC peripheral driver  ----
[ ] SPI peripheral driver  ----
[*] Timer peripheral driver  --->
[*] UART peripheral driver  --->
```
### Issues/PRs references


19635: drivers/mrf24j40: cleanup function r=aabadie a=maribu

### Contribution description

`_set_csma_params()` spends some time to prepare a value in `uint8_t tmp`, which then is never used. Likely this is a leftover of moving code to `mrf24j40_set_csma_max_retries()`. This drops the leftover code.


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-20 18:43:44 +00:00
Fabian Hüßler
500d257a52 drivers/periph_common: Add PIO to periph init 2023-05-12 23:03:05 +02:00
Gunar Schorcht
9c306815c2 drivers/periph_common: add periph_usbdev_hs feature in Kconfig 2023-03-16 07:47:18 +01:00
bors[bot]
37b64912d4
Merge #19256
19256: pkg/tinyusb: add GD32VF103 support r=gschorcht a=gschorcht

### Contribution description

This PR provides the tinyUSB support for GD32VF103 and enables the `tinyusb_device` feature as well as `stdio_tinyusb_cdc_acm` for GD32VF103 boards.

### Testing procedure

```
BOARD=sipeeed-longan-nano make -C tests/shell flash term
```
should work

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-21 16:53:06 +00:00
Gunar Schorcht
31141a2350 drivers/periph_common: fix periph_usbdev_clk dependency in Kconfig
`periph_usbdev_clk` is just a pseudomodule that controls the clock selection which does not depend on full featured `periph_usbdev`.
2023-02-21 15:04:13 +01:00
bors[bot]
1c55118bd8
Merge #18257
18257: drivers/wdt: add periph_wdt_auto_start for early watchdog r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-13 21:09:07 +00:00
Joshua DeWeese
bbe9103944 drivers/periph_common/flashpage: fix silent error
This patch removes a test that silently hides failed writes to NULL.
Instead, assert is used to ensure that the address is not NULL.
2023-01-19 11:00:40 -05:00
Benjamin Valentin
b8a6988e79 drivers/wdt: add periph_wdt_auto_start for early watchdog
Add an option to enable the watchdog early to detect hangs during
initialisation.
2023-01-14 23:21:24 +01:00
Benjamin Valentin
092b235845 core/init: add early_init()
Add a function to initialize LEDs and UART in early boot.
2023-01-08 22:25:10 +01:00
Gunar Schorcht
41b0a3efae drivers/usbdev_synopsys_dwc2: add internal UTMI HS PHY support 2022-10-16 11:35:42 +02:00
Gunar Schorcht
78e24541e6 drivers/periph_usbdev: move Kconfig to a separate file 2022-10-09 11:48:58 +02:00
Gunar Schorcht
87cc47869d drivers: add feature/module periph_usbdev_hs_ulpi to use HS PHY 2022-10-06 06:26:22 +02:00
Gunar Schorcht
136827e6da pkg: add tinyUSB device/host stack as package 2022-09-30 19:05:51 +02:00
MrKevinWeiss
606402e848
drivers: Only select periph_gpio_ll_irq_unmask if needed 2022-08-16 10:57:25 +02:00
Marian Buschsieweke
23855e140e
drivers: Add periph/gpio_ll API
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: chrysn <chrysn@fsfe.org>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2022-04-22 08:39:04 +02:00
Marian Buschsieweke
697448e51c
drivers/periph_cpuid: Minor cleanup
Avoid use of `memcpy` altogether to work around false positive of
`-Warray-bounds` in newer GCC versions.
2022-04-11 12:01:57 +02:00
Fabian Hüßler
045d88df7c drivers/periph_common/cpuid: disable false positive warnings
The warnings appeared after the -fno-builtin compiler flag was removed (#17898),
but the code is looking fine and tests/periph_cpuid shows correct results.
2022-04-10 15:52:23 +02:00
Francisco
52f12e0734
Merge pull request #17711 from benpicco/periph_init_buttons
drivers/periph_common: add periph_init_buttons to init on-board buttons
2022-03-29 10:29:39 +02:00
Gunar Schorcht
4bdcc9385a periph/pwm: fix alphabetical order in Kconfig 2022-03-21 09:14:32 +01:00
Gunar Schorcht
2851d6c0e0 periph/timer: fix Kconfig menu title 2022-03-20 21:35:16 +01:00
chrysn
facb5e633f
Merge pull request #17436 from Ollrogge/reserve_flash
cpu: add flash_writable section to linker script
2022-03-17 21:44:32 +01:00
Ollrogge
41f961a197 periph/flashpage: Add _in_address_space feature 2022-03-17 19:45:54 +01:00
Benjamin Valentin
bf34cc6b17 drivers/periph_common: add periph_init_buttons to init on-board buttons 2022-02-26 22:45:46 +01:00
Fabian Hüßler
fa52f1e986 cpu/stm32: Consider VBAT on CPU init 2022-02-21 10:49:43 +01:00
Fabian Hüßler
33c2944076 cpu/stm32: add VBAT for stm32 2022-02-21 10:49:43 +01:00
Benjamin Valentin
982598a199 drivers/periph_common: add periph_init_leds to init all on-board LEDs 2022-02-18 14:35:43 +01:00
79df157727
sys: move rtc utility functions to their own module 2021-12-20 13:04:20 +01:00
749efa507d
drivers/periph_common: build periph module selectively 2021-12-20 13:04:20 +01:00
Leandro Lanzieri
bfdfbb1a48
cpu/esp32: model Kconfig 2021-12-10 18:54:07 +01:00
benpicco
e8cbf1ea90
Merge pull request #16681 from benpicco/drivers/dose-collision
drivers/dose: make use of UART collision detection feature
2021-12-08 20:48:28 +01:00
MrKevinWeiss
fba9cad987
periph/gpio: Model TAMPER_WAKE for kconfig 2021-11-29 09:12:28 +01:00
MrKevinWeiss
51f92fa816
drivers/periph_spi: Kconfig SPI_ON_QSPI model 2021-11-29 09:12:27 +01:00
Francisco Molina
3a4f30ec80 drivers/periph_common: add periph_uart_hw_fc 2021-11-26 10:39:40 +01:00
Leandro Lanzieri
7036388769
drivers/periph_common: add RTC ms module to Kconfig 2021-11-22 12:25:57 +01:00
Benjamin Valentin
669104d841 cpu/sam0_common: SPI: don't perform DMA transfer for small buffers
Setting up a DMA transfer can take longer than sending out a buffer
byte by byte if the buffer is small.

DMA only shows advantages for large buffers, using it for every transfer
will cause a net slowdown.

Since we did not come up with a good way to determine the treshold based
on the SPI frequency, just use a fixed buffer for now so that DMA can be
used without slowing things down overall.
2021-11-19 17:22:51 +01:00
Benjamin Valentin
f89d0c7c25 drivers/periph/uart: add periph_uart_collision feature 2021-11-10 15:57:45 +01:00
MrKevinWeiss
9b6a63a951
drivers/kconfig: simplify shared rtt/rtc hardware in kconfig 2021-10-14 11:28:46 +02:00
MrKevinWeiss
c7820cf7e5
*/rtt|rtc: Fix Kconfig modeling 2021-10-14 11:28:44 +02:00
MrKevinWeiss
0c5c657912
drivers/spi: Model Kconfig spi_gpio_mode 2021-10-14 11:28:43 +02:00
Benjamin Valentin
f903ec90d4 drivers/flashpage: flashpage_page() takes a const argument
All addresses to flashpage_page() must be in flash. Flash memory is
`const`, therefore this function must also take `const` pointers.
2021-08-27 14:08:25 +02:00