From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: linux-media@vger.kernel.org
Cc: Isaac Scott <isaac.scott@ideasonboard.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Dongcheng Yan <dongcheng.yan@intel.com>,
devicetree@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans Verkuil <hverkuil@kernel.org>,
Hans de Goede <johannes.goede@oss.qualcomm.com>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Mehdi Djait <mehdi.djait@linux.intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Jingjing Xiong <jingjing.xiong@intel.com>,
Svyatoslav Ryhel <clamor95@gmail.com>,
Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: [RFC PATCH v3 0/2] media: i2c: Add onsemi AR0234 camera sensor driver
Date: Fri, 6 Mar 2026 13:36:12 +0300 [thread overview]
Message-ID: <20260306103614.3208182-1-eagle.alexander923@gmail.com> (raw)
This series adds a driver for the onsemi AR0234 CMOS image sensor.
The AR0234 is a 1/2.6-inch global-shutter sensor with a 1940x1220
pixel array, capable of 1920x1200 resolution at up to 120 fps.
It supports MIPI CSI-2 output with 1 to 4 data lanes, raw Bayer
(8/10-bit) and monochrome formats, as well as DPCM 10->8 compression.
The driver has been tested with 2 and 4 lanes on an ARM64 Rockchip
RK3568 platform with a 27 MHz external clock. Both 8-bit and 10-bit
raw Bayer modes are functional.
Notes:
- 1-lane mode is currently disabled; attempts to use it produced no
valid image. Further investigation is needed.
- The driver uses a private streaming flag to protect cropping changes
during streaming. Is this the recommended approach, or should we
rely solely on the subdev state?
- The DPCM (10->8 compression) mode is included in the code but could
not be tested due to lack of suitable hardware; any testing help
would be appreciated.
Changes since v2:
- Added devicetree binding documentation for the onsemi AR0234 sensor.
- Added support for 8-bit raw Bayer output (verified working).
- Added DPCM 10->8 compression mode (untested, included for
completeness).
- Reworked mode handling: each mode now specifies input/output bpp,
DPCM flag, MIPI data type, and link frequency index.
- Reworked link frequency handling: the driver now accepts any valid
link frequencies from the device tree. It expects two frequencies -
one for 8-bit mode and one for 10-bit mode - but does not enforce
a fixed set; frequencies are validated by attempting PLL calculation.
This makes the driver compatible with a wider range of system
configurations.
- Updated ar0234_calculate_pll() to use a temporary structure and
update cached PLL only on success.
Changes since v1:
- Improved error handling: use cci_write() with &ret chaining for
sequential register writes, as suggested by Isaac Scott.
- Refactored format and cropping support:
Replaced static format list with dynamic cropping rectangle
(struct v4l2_rect crop).
Implemented get_selection and set_selection for V4L2_SEL_TGT_CROP,
allowing runtime selection of the active sensor area.
- Migrated to modern streaming model: replaced s_stream with
enable_streams/disable_streams using v4l2_subdev_s_stream_helper.
- Corrected blanking constants: replaced ambiguous AR0234_HBLANK_DEF
with AR0234_LINE_LENGTH_PCK_MIN; updated min/max ranges.
- Added ACPI match table (untested).
- Style fixes.
Any further comments or test results would be greatly appreciated.
Alexander Shiyan (2):
dt-bindings: media: i2c: Add onsemi AR0234 image sensor binding
media: i2c: Add onsemi AR0234 image sensor driver
.../bindings/media/i2c/onnn,ar0234.yaml | 109 ++
drivers/media/i2c/Kconfig | 12 +
drivers/media/i2c/Makefile | 1 +
drivers/media/i2c/ar0234.c | 1309 +++++++++++++++++
4 files changed, 1431 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/i2c/onnn,ar0234.yaml
create mode 100644 drivers/media/i2c/ar0234.c
--
2.52.0
next reply other threads:[~2026-03-06 10:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 10:36 Alexander Shiyan [this message]
2026-03-06 10:36 ` [RFC PATCH v3 1/2] dt-bindings: media: i2c: Add onsemi AR0234 image sensor binding Alexander Shiyan
2026-03-06 10:36 ` [RFC PATCH v3 2/2] media: i2c: Add onsemi AR0234 image sensor driver Alexander Shiyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260306103614.3208182-1-eagle.alexander923@gmail.com \
--to=eagle.alexander923@gmail.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=bryan.odonoghue@linaro.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=dongcheng.yan@intel.com \
--cc=hverkuil@kernel.org \
--cc=isaac.scott@ideasonboard.com \
--cc=jingjing.xiong@intel.com \
--cc=johannes.goede@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=vladimir.zapolskiy@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox