1202d10d312bb240c0865c9fc8dc9b0bb9354432
[openwrt/staging/linusw.git] /
1 From 89af5d7df7f548744bd675d96295c0f45e24b31f Mon Sep 17 00:00:00 2001
2 From: Markus Proeller <markus.proeller@pieye.org>
3 Date: Thu, 10 Oct 2019 19:13:02 +0200
4 Subject: [PATCH] dtoverlays: Add an overlay for the Infineon IRS1125
5
6 The Infineon IRS1125 is a CSI2 time of flight depth sensor
7 which has a suitable V4L2 subdevice driver.
8
9 Add an overlay for configuring it.
10
11 Signed-off-by: Markus Proeller <markus.proeller@pieye.org>
12 ---
13 arch/arm/boot/dts/overlays/Makefile | 1 +
14 arch/arm/boot/dts/overlays/README | 12 +++
15 .../arm/boot/dts/overlays/irs1125-overlay.dts | 97 +++++++++++++++++++
16 3 files changed, 110 insertions(+)
17 create mode 100644 arch/arm/boot/dts/overlays/irs1125-overlay.dts
18
19 --- a/arch/arm/boot/dts/overlays/Makefile
20 +++ b/arch/arm/boot/dts/overlays/Makefile
21 @@ -83,6 +83,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
22 iqaudio-dac.dtbo \
23 iqaudio-dacplus.dtbo \
24 iqaudio-digi-wm8804-audio.dtbo \
25 + irs1125.dtbo \
26 jedec-spi-nor.dtbo \
27 justboom-dac.dtbo \
28 justboom-digi.dtbo \
29 --- a/arch/arm/boot/dts/overlays/README
30 +++ b/arch/arm/boot/dts/overlays/README
31 @@ -1347,6 +1347,18 @@ Params: card_name Override
32 dai stream name.
33
34
35 +Name: irs1125
36 +Info: Infineon irs1125 TOF camera module.
37 + Uses Unicam 1, which is the standard camera connector on most Pi
38 + variants.
39 +Load: dtoverlay=irs1125,<param>=<val>
40 +Params: i2c_pins_0_1 Use pins 0&1 for the I2C instead of 44&45.
41 + Useful on Compute Modules.
42 +
43 + i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
44 + This is required for Pi B+, 2, 0, and 0W.
45 +
46 +
47 Name: jedec-spi-nor
48 Info: Adds support for JEDEC-compliant SPI NOR flash devices. (Note: The
49 "jedec,spi-nor" kernel driver was formerly known as "m25p80".)
50 --- /dev/null
51 +++ b/arch/arm/boot/dts/overlays/irs1125-overlay.dts
52 @@ -0,0 +1,97 @@
53 +// SPDX-License-Identifier: GPL-2.0-only
54 +// Definitions for IRS1125 camera module on VC I2C bus
55 +/dts-v1/;
56 +/plugin/;
57 +
58 +/{
59 + compatible = "brcm,bcm2835";
60 +
61 + fragment@0 {
62 + target = <&i2c_vc>;
63 + __overlay__ {
64 + #address-cells = <1>;
65 + #size-cells = <0>;
66 + status = "okay";
67 +
68 + irs1125: irs1125@3D {
69 + compatible = "infineon,irs1125";
70 + reg = <0x3D>;
71 + status = "okay";
72 +
73 + pwdn-gpios = <&gpio 5 0>;
74 + clocks = <&irs1125_clk>;
75 +
76 + irs1125_clk: camera-clk {
77 + compatible = "fixed-clock";
78 + #clock-cells = <0>;
79 + clock-frequency = <26000000>;
80 + };
81 +
82 + port {
83 + irs1125_0: endpoint {
84 + remote-endpoint = <&csi1_ep>;
85 + clock-lanes = <0>;
86 + data-lanes = <1 2>;
87 + clock-noncontinuous;
88 + link-frequencies =
89 + /bits/ 64 <297000000>;
90 + };
91 + };
92 + };
93 + };
94 + };
95 +
96 + fragment@1 {
97 + target = <&csi1>;
98 + __overlay__ {
99 + status = "okay";
100 +
101 + port {
102 + csi1_ep: endpoint {
103 + remote-endpoint = <&irs1125_0>;
104 + };
105 + };
106 + };
107 + };
108 +
109 + fragment@2 {
110 + target = <&i2c0_pins>;
111 + __dormant__ {
112 + brcm,pins = <28 29>;
113 + brcm,function = <4>; /* alt0 */
114 + };
115 + };
116 + fragment@3 {
117 + target = <&i2c0_pins>;
118 + __overlay__ {
119 + brcm,pins = <44 45>;
120 + brcm,function = <5>; /* alt1 */
121 + };
122 + };
123 + fragment@4 {
124 + target = <&i2c0_pins>;
125 + __dormant__ {
126 + brcm,pins = <0 1>;
127 + brcm,function = <4>; /* alt0 */
128 + };
129 + };
130 + fragment@5 {
131 + target = <&i2c_vc>;
132 + __overlay__ {
133 + status = "okay";
134 + };
135 + };
136 +
137 + fragment@6 {
138 + target-path="/__overrides__";
139 + __overlay__ {
140 + cam0-pwdn-ctrl = <&irs1125>,"pwdn-gpios:0";
141 + cam0-pwdn = <&irs1125>,"pwdn-gpios:4";
142 + };
143 + };
144 +
145 + __overrides__ {
146 + i2c_pins_0_1 = <0>,"-2-3+4";
147 + i2c_pins_28_29 = <0>,"+2-3-4";
148 + };
149 +};