Skip to content

Commit

Permalink
media: i2c: Add driver for Sony IMX500 sensor
Browse files Browse the repository at this point in the history
The Sony IMX500 is a stacked 1/2.3-inch CMOS digital image sensor and
inbuilt AI processor with an active array CNN (Convolutional Neural
Network) inference engine.  The native sensor size is 4056H x 3040V, and
the module also contains an in-built ISP for the CNN. The module is
programmable through an I2C interface with firmware and neural network
uploads being made over SPI. This driver supports imaging only.

Signed-off-by: Richard Oliver <[email protected]>

media: i2c: imx500: Inbuilt AI processor support

Add support for the IMX500's inbuilt AI processor. The IMX500 program
loader, AI processor firmware, DNN weights are accessed via the kernel's
firmware interface on 'open' and are transferred to the IMX500 over SPI.

Signed-off-by: Richard Oliver <[email protected]>

media: i2c: imx500: Enable LED during SPI transfers

The Raspberry Pi 'AI Camera' is equipped with an LED. Enable this LED
during SPI transfers to indicate to the end-user that progress is being
made during large tramsfers.

Signed-off-by: Richard Oliver <[email protected]>

drivers: media: imx500: Fixes for vblank control

Reduce the default/max framerate of the 2x2 binned mode to 30fps.
The current limit of 50fps can cause the sensor to produce corrupt
frames and cause missing framing events.

Also fixup the vblank control min/max/default/step paramters when
setting up.

Signed-off-by: Naushir Patuck <[email protected]>

drivers: media: imx500: Simplify the vblank control init

Set the VBLANK control minimum and default values to IMX500_VBLANK_MIN
unconditionally everywhere.

Remove the mode specific framerate_default parameter, it is now unused.

Signed-off-by: Naushir Patuck <[email protected]>
  • Loading branch information
roliver-rpi authored and popcornmix committed Jan 2, 2025
1 parent a2e05f6 commit 21c9bb7
Show file tree
Hide file tree
Showing 5 changed files with 2,859 additions and 0 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -21598,6 +21598,7 @@ L: [email protected]
S: Maintained
T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/sony,imx500.yaml
F: drivers/media/i2c/imx500.c

SONY IMX519 SENSOR DRIVER
M: Arducam Kernel Maintenance <[email protected]>
Expand Down
12 changes: 12 additions & 0 deletions drivers/media/i2c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,18 @@ config VIDEO_IMX477
To compile this driver as a module, choose M here: the
module will be called imx477.

config VIDEO_IMX500
tristate "Sony IMX500 sensor support"
depends on I2C && VIDEO_DEV
select VIDEO_V4L2_SUBDEV_API
select V4L2_CCI_I2C
help
This is a Video4Linux2 sensor driver for the Sony
IMX500 camera.

To compile this driver as a module, choose M here: the
module will be called IMX500.

config VIDEO_IMX519
tristate "Arducam IMX519 sensor support"
depends on I2C && VIDEO_DEV
Expand Down
1 change: 1 addition & 0 deletions drivers/media/i2c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ obj-$(CONFIG_VIDEO_IMX355) += imx355.o
obj-$(CONFIG_VIDEO_IMX412) += imx412.o
obj-$(CONFIG_VIDEO_IMX415) += imx415.o
obj-$(CONFIG_VIDEO_IMX477) += imx477.o
obj-$(CONFIG_VIDEO_IMX500) += imx500.o
obj-$(CONFIG_VIDEO_IMX519) += imx519.o
obj-$(CONFIG_VIDEO_IMX708) += imx708.o
obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o
Expand Down
Loading

0 comments on commit 21c9bb7

Please sign in to comment.