Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -24139,6 +24139,13 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git
F: drivers/memstick/
F: include/linux/memstick.h

SONY STARVIS 2 SENSOR DRIVER
M: Jai Luthra <jai.luthra@ideasonboard.com>
L: linux-media@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml
F: drivers/media/i2c/sony-starvis2.c

SONY VAIO CONTROL DEVICE DRIVER
M: Mattia Dongili <malattia@linux.it>
L: platform-driver-x86@vger.kernel.org
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
imx500.dtbo \
imx500-pi5.dtbo \
imx519.dtbo \
imx662.dtbo \
imx708.dtbo \
interludeaudio-analog.dtbo \
interludeaudio-digital.dtbo \
Expand Down Expand Up @@ -317,6 +318,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
ssd1327-spi.dtbo \
ssd1331-spi.dtbo \
ssd1351-spi.dtbo \
starvis2.dtbo \
sunfounder-pipower3.dtbo \
sunfounder-pironman5.dtbo \
superaudioboard.dtbo \
Expand Down
66 changes: 66 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -3278,6 +3278,39 @@ Params: rotation Mounting rotation of the camera sensor (0 or
but vcm=off will disable.


Name: imx662
Info: Sony imx662 camera module.
Uses Unicam 1, which is the standard camera connector on most Pi
variants.
Load: dtoverlay=imx662,<param>
Params: 4lane Enable 4 CSI2 data lanes (default is for 2 lane
operation), which requires a Pi5 or CM.
clock-frequency Sets the clock frequency to match that used on
the board.
Valid values are 24, 27, 37.125, 72, or
74.25MHz.
The default is 24MHz.
link-frequency Confgures the link frequency to be used. Note
that the permitted values vary based on
clock-frequency and number of lanes.
The default is 445.5MHz for 891Mbit/s.
all-link-frequencies Define all permitted link frequencies to allow
for user selection of the preferred rate.
Does NOT include 1188Mbit/s as that is not
reliable.
orientation Sensor orientation (0 = front, 1 = rear,
2 = external, default external)
rotation Mounting rotation of the camera sensor (0 or
180, default 0)
media-controller Configure use of Media Controller API for
configuring the sensor (default on)
cam0 Adopt the default configuration for CAM0 on a
Compute Module (CSI0, i2c_vc, and cam0_reg).
vcm Enable ad5398 VCM associated with the sensor.
compatible Allows overriding of the compatible if automatic
detection at probe is undesirable.


Name: imx708
Info: Sony IMX708 camera module.
Uses Unicam 1, which is the standard camera connector on most Pi
Expand Down Expand Up @@ -5477,6 +5510,39 @@ Params: speed SPI bus speed (default 4500000)
reset_pin GPIO pin for RESET (default 25)


Name: starvis2
Info: Sony Starvis2 camera module.
Uses Unicam 1, which is the standard camera connector on most Pi
variants.
Load: dtoverlay=starvis2,<param>
Params: 4lane Enable 4 CSI2 data lanes (default is for 2 lane
operation), which requires a Pi5 or CM.
clock-frequency Sets the clock frequency to match that used on
the board.
Valid values are 24, 27, 37.125, 72, or
74.25MHz.
The default is 24MHz.
link-frequency Confgures the link frequency to be used. Note
that the permitted values vary based on
clock-frequency and number of lanes.
The default is 445.5MHz for 891Mbit/s.
all-link-frequencies Define all permitted link frequencies to allow
for user selection of the preferred rate.
Does NOT include 1188Mbit/s as that is not
reliable.
orientation Sensor orientation (0 = front, 1 = rear,
2 = external, default external)
rotation Mounting rotation of the camera sensor (0 or
180, default 0)
media-controller Configure use of Media Controller API for
configuring the sensor (default on)
cam0 Adopt the default configuration for CAM0 on a
Compute Module (CSI0, i2c_vc, and cam0_reg).
vcm Enable ad5398 VCM associated with the sensor.
compatible Allows overriding of the compatible if automatic
detection at probe is undesirable.


Name: sunfounder-pipower3
Info: Overlay for SunFounder PiPower 3
Load: dtoverlay=sunfounder-pipower3,<param>=<val>
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/imx662-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "starvis2-overlay.dts"
136 changes: 136 additions & 0 deletions arch/arm/boot/dts/overlays/starvis2-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for a Sony Starvis2 camera module on VC I2C bus
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>

/{
compatible = "brcm,bcm2835";

fragment@0 {
target = <&i2c0if>;
__overlay__ {
status = "okay";
};
};

clk_frag: fragment@1 {
target = <&cam1_clk>;
clk: __overlay__ {
status = "okay";
clock-frequency = <24000000>;
};
};

fragment@2 {
target = <&i2c0mux>;
__overlay__ {
status = "okay";
};
};

reg_frag: fragment@3 {
target = <&cam1_reg>;
cam_reg: __overlay__ {
startup-delay-us = <300000>;
};
};

i2c_frag: fragment@100 {
target = <&i2c_csi_dsi>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

#include "starvis2.dtsi"

vcm: ad5398@c {
compatible = "adi,ad5398";
reg = <0x0c>;
status = "disabled";
VANA-supply = <&cam1_reg>;
};
};
};

csi_frag: fragment@101 {
target = <&csi1>;
csi: __overlay__ {
status = "okay";

port {
csi_ep: endpoint {
remote-endpoint = <&cam_endpoint>;
clock-lanes = <0>;
data-lanes = <1 2>;
clock-noncontinuous;
};
};
};
};

fragment@102 {
target = <&csi1>;
__dormant__ {
compatible = "brcm,bcm2835-unicam-legacy";
};
};

fragment@201 {
target = <&csi_ep>;
__dormant__ {
data-lanes = <1 2 3 4>;
};
};

fragment@202 {
target = <&cam_endpoint>;
__dormant__ {
data-lanes = <1 2 3 4>;
};
};

fragment@203 {
target = <&cam_endpoint>;
__dormant__ {
link-frequencies = /bits/ 64
<1039500000
891000000
720000000
594000000
445500000
360000000
297000000>;
};
};

__overrides__ {
rotation = <&cam_node>,"rotation:0";
orientation = <&cam_node>,"orientation:0";
media-controller = <0>,"!102";
cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
<&csi_frag>, "target:0=",<&csi0>,
<&clk_frag>, "target:0=",<&cam0_clk>,
<&cam_node>, "clocks:0=",<&cam0_clk>,
<&reg_frag>, "target:0=",<&cam0_reg>,
<&cam_node>, "avdd-supply:0=",<&cam0_reg>,
<&vcm>, "VANA-supply:0=", <&cam0_reg>;
vcm = <&vcm>, "status=okay",
<&cam_node>,"lens-focus:0=", <&vcm>;
4lane = <0>, "+201+202";
clock-frequency = <&clk>,"clock-frequency:0";
link-frequency = <&cam_endpoint>,"link-frequencies#0";
all-link-frequencies = <0>, "+203";
compatible = <&cam_node>,"compatible";
};
};

&cam_node {
status = "okay";
};

&cam_endpoint {
remote-endpoint = <&csi_ep>;
};
26 changes: 26 additions & 0 deletions arch/arm/boot/dts/overlays/starvis2.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Fragment that configures a Sony Starvis 2 image sensor

cam_node: starvis2@1a {
compatible = "sony,starvis2";
reg = <0x1a>;
status = "disabled";

clocks = <&cam1_clk>;

avdd-supply = <&cam1_reg>; /* 2.8v */
dvdd-supply = <&cam_dummy_reg>; /* 1.8v */
ovdd-supply = <&cam_dummy_reg>;/* 1.2v */

rotation = <180>;
orientation = <2>;

port {
cam_endpoint: endpoint {
clock-lanes = <0>;
data-lanes = <1 2>;
clock-noncontinuous;
link-frequencies =
/bits/ 64 <594000000>;
};
};
};
1 change: 1 addition & 0 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ CONFIG_VIDEO_OV64A40=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m
CONFIG_VIDEO_OV9282=m
CONFIG_VIDEO_SONY_STARVIS2=m
CONFIG_VIDEO_VD55G1=m
CONFIG_VIDEO_VD56G3=m
CONFIG_VIDEO_AD5398=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@ CONFIG_VIDEO_OV64A40=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m
CONFIG_VIDEO_OV9282=m
CONFIG_VIDEO_SONY_STARVIS2=m
CONFIG_VIDEO_VD55G1=m
CONFIG_VIDEO_VD56G3=m
CONFIG_VIDEO_AD5398=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ CONFIG_VIDEO_OV64A40=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m
CONFIG_VIDEO_OV9282=m
CONFIG_VIDEO_SONY_STARVIS2=m
CONFIG_VIDEO_VD55G1=m
CONFIG_VIDEO_VD56G3=m
CONFIG_VIDEO_AD5398=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2711_rt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,7 @@ CONFIG_VIDEO_OV64A40=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m
CONFIG_VIDEO_OV9282=m
CONFIG_VIDEO_SONY_STARVIS2=m
CONFIG_VIDEO_VD55G1=m
CONFIG_VIDEO_VD56G3=m
CONFIG_VIDEO_AD5398=m
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/bcm2712_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ CONFIG_VIDEO_OV64A40=m
CONFIG_VIDEO_OV7251=m
CONFIG_VIDEO_OV7640=m
CONFIG_VIDEO_OV9282=m
CONFIG_VIDEO_SONY_STARVIS2=m
CONFIG_VIDEO_VD55G1=m
CONFIG_VIDEO_VD56G3=m
CONFIG_VIDEO_AD5398=m
Expand Down
19 changes: 19 additions & 0 deletions drivers/media/i2c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ config VIDEO_IMX708
To compile this driver as a module, choose M here: the
module will be called imx708.

config VIDEO_IMX678
tristate "Sony IMX678 sensor support"
select VIDEO_SONY_STARVIS2
help
This is a Video4Linux2 sensor driver for the Sony
IMX678 camera. This sensor is now supported by the common
Sony Starvis 2 sensor driver.

config VIDEO_MAX9271_LIB
tristate

Expand Down Expand Up @@ -842,6 +850,17 @@ config VIDEO_S5K6A3
This is a V4L2 sensor driver for Samsung S5K6A3 raw
camera sensor.

config VIDEO_SONY_STARVIS2
tristate "Sony Starvis 2 sensor support"
depends on GPIOLIB
select V4L2_CCI_I2C
help
This is a Video4Linux2 sensor driver for the Sony Starvis
2 image sensors.

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

config VIDEO_VD55G1
tristate "ST VD55G1 sensor support"
select V4L2_CCI_I2C
Expand Down
1 change: 1 addition & 0 deletions drivers/media/i2c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o
obj-$(CONFIG_VIDEO_SAA717X) += saa717x.o
obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o
obj-$(CONFIG_VIDEO_SONY_BTF_MPX) += sony-btf-mpx.o
obj-$(CONFIG_VIDEO_SONY_STARVIS2) += sony-starvis2.o
obj-$(CONFIG_VIDEO_ST_MIPID02) += st-mipid02.o
obj-$(CONFIG_VIDEO_TC358743) += tc358743.o
obj-$(CONFIG_VIDEO_TC358746) += tc358746.o
Expand Down
Loading
Loading