[PATCH RFC v3 0/6] iio: add Open Sensor Fusion OSF0 UART driver
From: Jinseob Kim
Date: Fri May 29 2026 - 08:15:45 EST
This RFC series adds an Industrial I/O driver for Open Sensor Fusion
OSF0 UART devices.
Open Sensor Fusion is an open hardware project for sensor aggregation
devices and Linux IIO host support. OSF0 is not a general standard; it is
the current wire format used by this project and by the RFC driver in this
series. The first concrete hardware target is OSF GREEN, an STM32F405-based
sensor aggregation board that streams sensor samples to a Linux host.
Project links:
https://www.opensensorfusion.org/
https://github.com/opensensorfusion
https://github.com/opensensorfusion/opensensorfusion-linux
The driver receives OSF0 frames over a serdev UART, validates the stream,
decodes capability and sample frames, and registers IIO devices for the
supported sensor types. The current RFC driver covers the device-to-host
path used for accelerometer, gyroscope, magnetometer, and temperature
samples.
Changes since v2:
* Reworked the binding around the concrete OSF GREEN hardware target.
* Changed the compatible from opensensorfusion,osf-uart to
opensensorfusion,osf-green.
* Renamed the binding file to opensensorfusion,osf-green.yaml.
* Updated the example node name to generic sensor.
* Added serial-peripheral-props.yaml and unevaluatedProperties: false.
* Added public project links and clarified that OSF0 is not a general
standard.
* Separated the OSF0 wire format from the subset currently supported by
this RFC driver.
* Clarified SENSOR_SAMPLE as a 16-byte payload header followed by
4 * channel_count bytes of s32 channel data.
* Clarified device-side timestamp limitations.
* Spelled out Attitude and Heading Reference System (AHRS).
* Added sensor_type, sample_format, channel_count, reserved-field, and
payload length overflow validation.
* Changed reserved fields to validate-only handling.
* Fixed IIO_BUFFER / IIO_KFIFO_BUF dependency handling.
* Added channel_count checks before pushing samples to IIO buffers.
* Added locking for cached latest samples.
* Removed explicit linux-iio and devicetree list entries from
MAINTAINERS.
* Folded MAINTAINERS updates into the patches that add the corresponding
files.
* Addressed Sashiko feedback from v2.
The runtime smoke test used for the previous revision was performed with an
OSF GREEN prototype connected to a Raspberry Pi 4 over UART/serdev. This v3
series was also checked with dt_binding_check, checkpatch, and a W=1 target
build in the local full-tree environment.
Jinseob Kim (6):
dt-bindings: iio: add OSF GREEN sensor aggregation device
Documentation: iio: add Open Sensor Fusion protocol v0 reference
iio: osf: add protocol v0 decoding
iio: osf: add stream parser
iio: osf: add UART serdev transport
iio: osf: register IIO devices from capabilities
.../iio/imu/opensensorfusion,osf-green.yaml | 43 +++
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
.../iio/open-sensor-fusion-protocol-v0.rst | 308 ++++++++++++++++++
MAINTAINERS | 13 +
drivers/iio/Kconfig | 1 +
drivers/iio/Makefile | 1 +
drivers/iio/opensensorfusion/Kconfig | 14 +
drivers/iio/opensensorfusion/Makefile | 6 +
drivers/iio/opensensorfusion/osf_core.c | 305 +++++++++++++++++
drivers/iio/opensensorfusion/osf_core.h | 70 ++++
drivers/iio/opensensorfusion/osf_iio.c | 285 ++++++++++++++++
drivers/iio/opensensorfusion/osf_iio.h | 22 ++
drivers/iio/opensensorfusion/osf_protocol.c | 247 ++++++++++++++
drivers/iio/opensensorfusion/osf_protocol.h | 95 ++++++
drivers/iio/opensensorfusion/osf_serdev.c | 111 +++++++
drivers/iio/opensensorfusion/osf_stream.c | 207 ++++++++++++
drivers/iio/opensensorfusion/osf_stream.h | 31 ++
17 files changed, 1761 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/imu/opensensorfusion,osf-green.yaml
create mode 100644 Documentation/iio/open-sensor-fusion-protocol-v0.rst
create mode 100644 drivers/iio/opensensorfusion/Kconfig
create mode 100644 drivers/iio/opensensorfusion/Makefile
create mode 100644 drivers/iio/opensensorfusion/osf_core.c
create mode 100644 drivers/iio/opensensorfusion/osf_core.h
create mode 100644 drivers/iio/opensensorfusion/osf_iio.c
create mode 100644 drivers/iio/opensensorfusion/osf_iio.h
create mode 100644 drivers/iio/opensensorfusion/osf_protocol.c
create mode 100644 drivers/iio/opensensorfusion/osf_protocol.h
create mode 100644 drivers/iio/opensensorfusion/osf_serdev.c
create mode 100644 drivers/iio/opensensorfusion/osf_stream.c
create mode 100644 drivers/iio/opensensorfusion/osf_stream.h
--
2.43.0