Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media: i2c: Add ISX021 sensor driver #2538

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions Documentation/devicetree/bindings/media/i2c/sony,isx021.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/i2c/sony,isx021.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Sony 1/2.57-inch 2.51MP CMOS Digital Image Sensor

maintainers:
- Bogdan Togorean <[email protected]>

description: |
The Sony ISX021 is a 1/2.57-inch CMOS active pixel digital image sensor.
It is programmable through an I2C interface. Image data is sent through MIPI CSI-2,
through 2 or 4 lanes.

properties:
compatible:
const: sony,isx021

reg:
maxItems: 1

clocks:
description: Reference to the xclk clock.
maxItems: 1

reset-gpios:
description: GPIO descriptor for the reset pin.
maxItems: 1

dvdd-supply:
description: Chip digital IO regulator (1.8V).

port:
description: Video output port.
$ref: /schemas/graph.yaml#/$defs/port-base
additionalProperties: false

properties:
endpoint:
$ref: /schemas/media/video-interfaces.yaml#
additionalProperties: false

properties:
clock-lanes:
const: 0

data-lanes:
minItems: 1

remote-endpoint: true

required:
- data-lanes
- clock-lanes
required:
- endpoint

required:
- compatible
- reg
- clocks
- reset-gpios
- dvdd-supply
- port

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>

i2c0 {
#address-cells = <1>;
#size-cells = <0>;

camera-sensor@1a {
compatible = "sony,isx021";
reg = <0x1a>;
dvdd-supply = <&sw2_reg>;
reset-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
clocks = <&camera_clk>;

port {
isx021_ep: endpoint {
clock-lanes = <0>;
data-lanes = <1 2 3 4>;
remote-endpoint = <&csiphy0_ep>;
};
};
};
};
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -19445,6 +19445,13 @@ T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
F: drivers/media/i2c/imx412.c

SONY ISX021 SENSOR DRIVER
M: Bogdan Togorean <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/devicetree/bindings/media/i2c/sony,isx021.yaml
F: drivers/media/i2c/isx021.c

SONY MEMORYSTICK SUBSYSTEM
M: Maxim Levitsky <[email protected]>
M: Alex Dubov <[email protected]>
Expand Down
14 changes: 14 additions & 0 deletions drivers/media/i2c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,20 @@ config VIDEO_IMX412
To compile this driver as a module, choose M here: the
module will be called imx412.

config VIDEO_ISX021
tristate "Sony ISX021 sensor support"
depends on OF_GPIO
depends on I2C && VIDEO_DEV
select VIDEO_V4L2_SUBDEV_API
select MEDIA_CONTROLLER
select V4L2_FWNODE
help
This is a Video4Linux2 sensor driver for the Sony
ISX021 camera.

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

config VIDEO_MAX9271_LIB
tristate

Expand Down
1 change: 1 addition & 0 deletions drivers/media/i2c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ obj-$(CONFIG_VIDEO_IMX355) += imx355.o
obj-$(CONFIG_VIDEO_IMX412) += imx412.o
obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o
obj-$(CONFIG_VIDEO_ISL7998X) += isl7998x.o
obj-$(CONFIG_VIDEO_ISX021) += isx021.o
obj-$(CONFIG_VIDEO_KS0127) += ks0127.o
obj-$(CONFIG_VIDEO_LM3560) += lm3560.o
obj-$(CONFIG_VIDEO_LM3646) += lm3646.o
Expand Down
Loading