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 @@ -24136,6 +24136,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
3 changes: 3 additions & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
imx500.dtbo \
imx500-pi5.dtbo \
imx519.dtbo \
imx662.dtbo \
imx675.dtbo \
imx678.dtbo \
imx708.dtbo \
interludeaudio-analog.dtbo \
interludeaudio-digital.dtbo \
Expand Down
87 changes: 87 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -3278,6 +3278,93 @@ 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 lanes. This requires a Compute
Module (1, 3, 4, or 5) or Pi 5.
clock-frequency Sets the clock frequency to match that used on
the board. Default 24MHz
mono Denote that the module is a mono sensor.
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 a VCM focus drive on the sensor.
link-frequency Link frequency to use in Hz. Valid values of
297000000, 360000000, 445500000,
594000000 (default), 720000000, 891000000,
1039500000, and 1188000000.
Values above 594000000 are unlikely to work on
Pi0-4, and above 720000000 are not guaranteed to
work on Pi5.


Name: imx675
Info: Sony IMX675 5Mpix Starvis 2 camera module.
Uses Unicam 1, which is the standard camera connector on most Pi
variants.
Load: dtoverlay=imx675,<param>
Params: 4lane Enable 4 CSI2 lanes. This requires a Compute
Module (1, 3, 4, or 5) or Pi 5.
clock-frequency Sets the clock frequency to match that used on
the board. Default 37.125MHz
mono Denote that the module is a mono sensor.
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).
link-frequency Link frequency to use in Hz. Valid values of
297000000, 360000000, 445500000,
594000000 (default), 720000000, 891000000,
1039500000, and 1188000000.
Values above 594000000 are unlikely to work on
Pi0-4, and above 720000000 are not guaranteed to
work on Pi5.


Name: imx678
Info: Sony IMX678 camera module.
Uses Unicam 1, which is the standard camera connector on most Pi
variants. By default this uses 4 CSI2 data lanes, so requires a
Compute Module or Pi5.
Load: dtoverlay=imx678,<param>
Params: addr Set I2C address of sensor. Valid values are
0x10, 0x1a, 0x36 and 0x37. Default is 0x1a.
2lane Enable 2 CSI2 data lanes (default is for 4 lane
operation)
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.
Note that the link frequencies permitted vary
based on the oscillator used.
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 360MHz for 720Mbit/s.
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: imx708
Info: Sony IMX708 camera module.
Uses Unicam 1, which is the standard camera connector on most Pi
Expand Down
121 changes: 121 additions & 0 deletions arch/arm/boot/dts/overlays/imx662-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for IMX662 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 "imx662.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>;
};
};

__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";
mono = <&cam_node>,"compatible=sony,imx662aamr";
};
};

&cam_node {
status = "okay";
};

&cam_endpoint {
remote-endpoint = <&csi_ep>;
};
31 changes: 31 additions & 0 deletions arch/arm/boot/dts/overlays/imx662.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Fragment that configures an imx662

cam_node: imx662@1a {
compatible = "sony,imx662-aaqr";
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
<720000000
594000000
445500000
360000000
297000000>;
};
};
};
101 changes: 101 additions & 0 deletions arch/arm/boot/dts/overlays/imx675-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// SPDX-License-Identifier: GPL-2.0-only
// Partial definitions for IMX675 camera module on VC I2C bus
/dts-v1/;
/plugin/;

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

/{
compatible = "brcm,bcm2835";

fragment@0 {
target = <&cam_endpoint>;
__overlay__ {
data-lanes = <1 2>;
};
};

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

fragment@2 {
target = <&csi_ep>;
__overlay__ {
data-lanes = <1 2>;
};
};

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

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

#include "imx675.dtsi"
};
};

csi_frag: fragment@11 {
target = <&csi1>;
csi: __overlay__ {
status = "okay";
brcm,media-controller;

port {
csi_ep: endpoint {
remote-endpoint = <&cam_endpoint>;
};
};
};
};

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

clk_frag: fragment@13 {
target = <&cam1_clk>;
cam_clk: __overlay__ {
status = "okay";
clock-frequency = <37125000>;
};
};

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

__overrides__ {
4lane = <0>, "-0+1-2+3";
clock-frequency = <&cam_clk>,"clock-frequency:0",
<&cam_node>,"clock-frequency:0";
rotation = <&cam_node>,"rotation:0";
orientation = <&cam_node>,"orientation:0";
media-controller = <&csi>,"brcm,media-controller?";
cam0 = <&i2c_frag>, "target:0=",<&i2c_vc>,
<&csi_frag>, "target:0=",<&csi0>,
<&clk_frag>, "target:0=",<&cam0_clk>,
<&cam_node>, "clocks:0=",<&cam0_clk>,
<&cam_node>, "vdda-supply:0=",<&cam0_reg>;
link-frequency = <&cam_endpoint>,"link-frequencies#0";
mono = <0>, "";
};
};
Loading
Loading