636f1f7f7170566e6e79bab8240a6397c2f515f1
[openwrt/staging/thess.git] /
1 From 0ba44b9672e6e14eccc53069515c52c267f989f1 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Wed, 31 Oct 2018 15:02:18 +0000
4 Subject: [PATCH 205/782] dtoverlays: Add support for ADV7280-M, ADV7281-M and
5 ADV7281-MA chips.
6
7 The driver that supports the ADV7282-M also supports the ADV7280-M,
8 ADV7281-M, and ADV7281-MA.
9 The 7280-M exposes 8 analogue inputs. The 7281-M doesn't have the
10 I2P deinterlacing block. The 7281-MA has 8 inputs but no I2P.
11 Otherwise they are the same as ADV7282-M.
12
13 Adds a new overlay "adv728x" that includes the existing adv7282
14 overlay but adds several parameters to modify the behaviour.
15
16 Adds a new addr parameter to allow the I2C address to be changed.
17 (the chip has an address select pin to change between 0x20 and 0x21).
18
19 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
20 ---
21 arch/arm/boot/dts/overlays/Makefile | 1 +
22 arch/arm/boot/dts/overlays/README | 13 +++++++
23 .../boot/dts/overlays/adv7282m-overlay.dts | 9 +++--
24 .../boot/dts/overlays/adv728x-m-overlay.dts | 37 +++++++++++++++++++
25 4 files changed, 56 insertions(+), 4 deletions(-)
26 create mode 100644 arch/arm/boot/dts/overlays/adv728x-m-overlay.dts
27
28 --- a/arch/arm/boot/dts/overlays/Makefile
29 +++ b/arch/arm/boot/dts/overlays/Makefile
30 @@ -7,6 +7,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
31 ads1115.dtbo \
32 ads7846.dtbo \
33 adv7282m.dtbo \
34 + adv728x-m.dtbo \
35 akkordion-iqdacplus.dtbo \
36 allo-boss-dac-pcm512x-audio.dtbo \
37 allo-digione.dtbo \
38 --- a/arch/arm/boot/dts/overlays/README
39 +++ b/arch/arm/boot/dts/overlays/README
40 @@ -274,6 +274,19 @@ Info: Analog Devices ADV7282M analogue
41 Load: dtoverlay=adv7282m,<param>=<val>
42 Params: i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
43 This is required for Pi B+, 2, 0, and 0W.
44 + addr Overrides the I2C address (default 0x21)
45 +
46 +
47 +Name: adv728x-m
48 +Info: Analog Devices ADV728[0|1|2]-M analogue video to CSI2 bridges.
49 + This is a wrapper for adv7282m, and defaults to ADV7282M.
50 +Load: dtoverlay=adv728x-m,<param>=<val>
51 +Params: i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
52 + This is required for Pi B+, 2, 0, and 0W.
53 + addr Overrides the I2C address (default 0x21)
54 + adv7280m Select ADV7280-M.
55 + adv7281m Select ADV7281-M.
56 + adv7281ma Select ADV7281-MA.
57
58
59 Name: akkordion-iqdacplus
60 --- a/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
61 +++ b/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
62 @@ -13,13 +13,13 @@
63 #size-cells = <0>;
64 status = "okay";
65
66 - adv7282: adv7282@21 {
67 + adv728x: adv728x@21 {
68 compatible = "adi,adv7282-m";
69 reg = <0x21>;
70 status = "okay";
71 clock-frequency = <24000000>;
72 port {
73 - adv7282_0: endpoint {
74 + adv728x_0: endpoint {
75 remote-endpoint = <&csi1_ep>;
76 clock-lanes = <0>;
77 data-lanes = <1>;
78 @@ -43,7 +43,7 @@
79 #address-cells = <1>;
80 #size-cells = <0>;
81 csi1_ep: endpoint {
82 - remote-endpoint = <&adv7282_0>;
83 + remote-endpoint = <&adv728x_0>;
84 };
85 };
86 };
87 @@ -71,6 +71,7 @@
88 };
89
90 __overrides__ {
91 - i2c_pins_28_29 = <0>,"+2-3";
92 + i2c_pins_28_29 = <0>,"+2-3";
93 + addr = <&adv728x>,"reg:0";
94 };
95 };
96 --- /dev/null
97 +++ b/arch/arm/boot/dts/overlays/adv728x-m-overlay.dts
98 @@ -0,0 +1,37 @@
99 +// SPDX-License-Identifier: GPL-2.0-only
100 +// Definitions for Analog Devices ADV728[0|1|2]-M video to CSI2 bridges on VC
101 +// I2C bus
102 +
103 +#include "adv7282m-overlay.dts"
104 +
105 +/{
106 + compatible = "brcm,bcm2708";
107 +
108 + // Fragment numbers deliberately high to avoid conflicts with the
109 + // included adv7282m overlay file.
110 +
111 + fragment@101 {
112 + target = <&adv728x>;
113 + __dormant__ {
114 + compatible = "adi,adv7280-m";
115 + };
116 + };
117 + fragment@102 {
118 + target = <&adv728x>;
119 + __dormant__ {
120 + compatible = "adi,adv7281-m";
121 + };
122 + };
123 + fragment@103 {
124 + target = <&adv728x>;
125 + __dormant__ {
126 + compatible = "adi,adv7281-ma";
127 + };
128 + };
129 +
130 + __overrides__ {
131 + adv7280m = <0>, "+101";
132 + adv7281m = <0>, "+102";
133 + adv7281ma = <0>, "+103";
134 + };
135 +};