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

add ams-osram image sensors. #6552

Open
wants to merge 1 commit into
base: rpi-6.6.y
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
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
i2s-gpio28-31.dtbo \
i2s-master-dac.dtbo \
ilitek251x.dtbo \
mira220.dtbo \
mira220color.dtbo \
mira050.dtbo \
mira050color.dtbo \
mira016.dtbo \
mira130.dtbo \
imx219.dtbo \
imx258.dtbo \
imx290.dtbo \
Expand Down
13 changes: 13 additions & 0 deletions arch/arm/boot/dts/overlays/mira016-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for MIRA016 camera module on VC I2C bus
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include "mira016_mono_color-overlay.dtsi"

&mira016 {
compatible = "ams,mira016";

Check failure on line 10 in arch/arm/boot/dts/overlays/mira016-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 10 in arch/arm/boot/dts/overlays/mira016-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
reg-name = "mira016";
};

118 changes: 118 additions & 0 deletions arch/arm/boot/dts/overlays/mira016_mono_color-overlay.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for MIRA016 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>;
__overlay__ {
status = "okay";
clock-frequency = <24000000>;
};
};

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

fragment@5 {
target = <&cam1_reg>;
__overlay__ {
status = "okay";
regulator-name = "mira016_vana";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};
};

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

mira016: mira016@36 {
// compatible = "ams,mira016";
// I2C addresses (7-bit address)
// The interface board uses 0x36 by default
// MIRA016CSP: 0x36; PMIC: 0x2D; INA3221: 0x40; LM2759: 0x53;
// dsPIC33EP32MC503: 0x0A
reg = <0x36>;
// reg-names = "mira016";
status = "okay";

//clocks = <&mira016_clk>;
clocks = <&cam1_clk>;
clock-names = "xclk";

// TODO(jalv): Add here camera supplies based on the
// TPS65912 pmic.
VANA-supply = <&cam1_reg>; /* 2.8v */
VDIG-supply = <&cam_dummy_reg>; /* 1.8v */
VDDL-supply = <&cam_dummy_reg>; /* 1.2v */

// FIXME(jalv): Make sure orientation is correct
rotation = <0>;
orientation = <2>;
skip-reg-upload = <0>;

port {
mira016_0: endpoint {
remote-endpoint = <&csi_ep>;
clock-lanes = <0>;
data-lanes = <1>;
// clock-noncontinuous; // mira016 reg seq use continuous clk

Check failure on line 80 in arch/arm/boot/dts/overlays/mira016_mono_color-overlay.dtsi

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 109 exceeds 100 columns
link-frequencies =
/bits/ 64 <456000000>;
};
};

Check failure on line 85 in arch/arm/boot/dts/overlays/mira016_mono_color-overlay.dtsi

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
};
};
};

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

port {
csi_ep: endpoint {
remote-endpoint = <&mira016_0>;
clock-lanes = <0>;
data-lanes = <1>;
// clock-noncontinuous; // mira016 reg seq use continous clk

Check failure on line 101 in arch/arm/boot/dts/overlays/mira016_mono_color-overlay.dtsi

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: 'continous' may be misspelled - perhaps 'continuous'?
};
};
};
};

__overrides__ {
rotation = <&mira016>,"rotation:0";
orientation = <&mira016>,"orientation:0";
skip-reg-upload = <&mira016>,"skip-reg-upload:0";
media-controller = <&csi>,"brcm,media-controller?";
cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
<&csi_frag>, "target:0=",<&csi0>,
<&clk_frag>, "target:0=",<&cam0_clk>,
<&mira016>, "clocks:0=",<&cam0_clk>,
<&mira016>, "VANA-supply:0=",<&cam0_reg>;
};
};
13 changes: 13 additions & 0 deletions arch/arm/boot/dts/overlays/mira050-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for MIRA050 camera module on VC I2C bus
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include "mira050_mono_color-overlay.dtsi"

&mira050 {
compatible = "ams,mira050";

Check failure on line 10 in arch/arm/boot/dts/overlays/mira050-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 10 in arch/arm/boot/dts/overlays/mira050-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
reg-name = "mira050";
};

118 changes: 118 additions & 0 deletions arch/arm/boot/dts/overlays/mira050_mono_color-overlay.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for MIRA050 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>;
__overlay__ {
status = "okay";
clock-frequency = <24000000>;
};
};

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

fragment@5 {
target = <&cam1_reg>;
__overlay__ {
status = "okay";
regulator-name = "mira050_vana";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};
};

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

mira050: mira050@36 {
// compatible = "ams,mira050";
// I2C addresses (7-bit address)
// The interface board uses 0x36 by default
// MIRA050CSP: 0x36; PMIC: 0x2D; INA3221: 0x40; LM2759: 0x53;
// dsPIC33EP32MC503: 0x0A
reg = <0x36>;
// reg-names = "mira050";
status = "okay";

//clocks = <&mira050_clk>;
clocks = <&cam1_clk>;
clock-names = "xclk";

// TODO(jalv): Add here camera supplies based on the
// TPS65912 pmic.
VANA-supply = <&cam1_reg>; /* 2.8v */
VDIG-supply = <&cam_dummy_reg>; /* 1.8v */
VDDL-supply = <&cam_dummy_reg>; /* 1.2v */

// FIXME(jalv): Make sure orientation is correct
rotation = <0>;
orientation = <2>;
skip-reg-upload = <0>;

port {
mira050_0: endpoint {
remote-endpoint = <&csi_ep>;
clock-lanes = <0>;
data-lanes = <1>;
clock-noncontinuous;
link-frequencies =
/bits/ 64 <456000000>;
};
};

Check failure on line 85 in arch/arm/boot/dts/overlays/mira050_mono_color-overlay.dtsi

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: trailing whitespace
};
};
};

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

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

__overrides__ {
rotation = <&mira050>,"rotation:0";
orientation = <&mira050>,"orientation:0";
skip-reg-upload = <&mira050>,"skip-reg-upload:0";
media-controller = <&csi>,"brcm,media-controller?";
cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
<&csi_frag>, "target:0=",<&csi0>,
<&clk_frag>, "target:0=",<&cam0_clk>,
<&mira050>, "clocks:0=",<&cam0_clk>,
<&mira050>, "VANA-supply:0=",<&cam0_reg>;
};
};
13 changes: 13 additions & 0 deletions arch/arm/boot/dts/overlays/mira050color-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for MIRA050 camera module on VC I2C bus
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include "mira050_mono_color-overlay.dtsi"

&mira050 {
compatible = "ams,mira050color";

Check failure on line 10 in arch/arm/boot/dts/overlays/mira050color-overlay.dts

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible
reg-name = "mira050color";
};

13 changes: 13 additions & 0 deletions arch/arm/boot/dts/overlays/mira130-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0-only
// Definitions for MIRA130 camera module on VC I2C bus
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include "mira130_mono_color-overlay.dtsi"

&mira130 {
compatible = "ams,mira130";
reg-name = "mira130";
};

Loading
Loading