Skip to content
Draft
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
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -25652,6 +25652,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
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,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
33 changes: 33 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -5464,6 +5464,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: addr Set I2C address of sensor. Valid values are
0x10, 0x1a, 0x36 and 0x37. Default is 0x1a.
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.


Name: sunfounder-pipower3
Info: Overlay for SunFounder PiPower 3
Load: dtoverlay=sunfounder-pipower3,<param>=<val>
Expand Down
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 @@ -941,6 +941,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 @@ -934,6 +934,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 @@ -1046,6 +1046,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 @@ -1043,6 +1043,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 @@ -1048,6 +1048,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
20 changes: 14 additions & 6 deletions drivers/media/i2c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,11 @@ config VIDEO_IMX519

config VIDEO_IMX678
tristate "Sony IMX678 sensor support"
depends on GPIOLIB
select V4L2_CCI_I2C
select VIDEO_SONY_STARVIS2
help
This is a Video4Linux2 sensor driver for the Sony
IMX678 camera.

To compile this driver as a module, choose M here: the
module will be called imx678.
IMX678 camera. This sensor is now supported by the common
Sony Starvis 2 sensor driver.

config VIDEO_IMX708
tristate "Sony IMX708 sensor support"
Expand Down Expand Up @@ -922,6 +919,17 @@ config VIDEO_S5KJN1
To compile this driver as a module, choose M here: the
module will be called s5kjn1.

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_T4KA3
tristate "Toshiba T4KA3 sensor support"
depends on ACPI || COMPILE_TEST
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/i2c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ 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_IMX678) += imx678.o
obj-$(CONFIG_VIDEO_IMX471) += imx471.o
obj-$(CONFIG_VIDEO_IMX708) += imx708.o
obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o
Expand Down Expand Up @@ -152,6 +151,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_T4KA3) += t4ka3.o
obj-$(CONFIG_VIDEO_TC358743) += tc358743.o
Expand Down
Loading
Loading