Skip to content

Commit f9d9e5b

Browse files
ubiedakartben
authored andcommitted
modules: afbr: Add basic functionality
- Add AFBR module as a HAL. - Platform layer to support running AFBR API using Zephyr. - Ability to instantiate on device-tree. - Samples in the module proving foundations works. - Zephyr Sensor API support, by introducing: - Read/Decode for SENSOR_CHAN_DISTANCE (1-D results). - Streaming mode for DATA_READY (1-D results). Signed-off-by: Luis Ubieda <[email protected]>
1 parent 85b6ff0 commit f9d9e5b

22 files changed

+1504
-0
lines changed

MAINTAINERS.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4950,6 +4950,18 @@ West:
49504950
labels:
49514951
- "platform: ADI"
49524952

4953+
"West project: hal_afbr":
4954+
status: maintained
4955+
maintainers:
4956+
- ubieda
4957+
- bperseghetti
4958+
collaborators:
4959+
- PetervdPerk-NXP
4960+
- jgoppert
4961+
files: []
4962+
labels:
4963+
- "platform: Broadcom"
4964+
49534965
"West project: hal_ambiq":
49544966
status: odd fixes
49554967
collaborators:

drivers/sensor/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ add_subdirectory(ams)
66
add_subdirectory(aosong)
77
add_subdirectory(asahi_kasei)
88
add_subdirectory(bosch)
9+
add_subdirectory(broadcom)
910
add_subdirectory(espressif)
1011
add_subdirectory(everlight)
1112
add_subdirectory(honeywell)

drivers/sensor/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ source "drivers/sensor/ams/Kconfig"
9292
source "drivers/sensor/aosong/Kconfig"
9393
source "drivers/sensor/asahi_kasei/Kconfig"
9494
source "drivers/sensor/bosch/Kconfig"
95+
source "drivers/sensor/broadcom/Kconfig"
9596
source "drivers/sensor/espressif/Kconfig"
9697
source "drivers/sensor/everlight/Kconfig"
9798
source "drivers/sensor/honeywell/Kconfig"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Croxel Inc.
2+
# Copyright (c) 2025 CogniPilot Foundation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
add_subdirectory_ifdef(CONFIG_AFBR_S50 afbr_s50)

drivers/sensor/broadcom/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Croxel Inc.
2+
# Copyright (c) 2025 CogniPilot Foundation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
source "drivers/sensor/broadcom/afbr_s50/Kconfig"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2025 Croxel Inc.
2+
# Copyright (c) 2025 CogniPilot Foundation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
zephyr_library()
6+
zephyr_library_sources(
7+
afbr_s50.c
8+
afbr_s50_decoder.c
9+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2025 Croxel Inc.
2+
# Copyright (c) 2025 CogniPilot Foundation
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config AFBR_S50
6+
bool "AFBR-S50 Time-of-Flight Sensor"
7+
default y
8+
depends on DT_HAS_BRCM_AFBR_S50_ENABLED
9+
select SENSOR_ASYNC_API
10+
select SPI
11+
select SPI_RTIO
12+
select RTIO_WORKQ
13+
select AFBR_LIB
14+
select PINCTRL
15+
select PINCTRL_NON_STATIC
16+
help
17+
Enable driver for the AFBR-S50 Time-of-Flight sensor.

0 commit comments

Comments
 (0)