6b6bacca837c955f64ea6d73e9bed22c55d8de14
[openwrt/staging/dangole.git] /
1 From c325695bc45f687cb2b206d02c8d8e7f3c1ad0a1 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Thu, 23 Aug 2018 10:42:41 +0100
4 Subject: [PATCH 409/454] 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 | 36 +++++++++++++++++++
25 4 files changed, 55 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 @@ -12,13 +12,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 @@ -42,7 +42,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 @@ -70,6 +70,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,36 @@
99 +// Definitions for Analog Devices ADV728[0|1|2]-M video to CSI2 bridges on VC
100 +// I2C bus
101 +
102 +#include "adv7282m-overlay.dts"
103 +
104 +/{
105 + compatible = "brcm,bcm2708";
106 +
107 + // Fragment numbers deliberately high to avoid conflicts with the
108 + // included adv7282m overlay file.
109 +
110 + fragment@101 {
111 + target = <&adv728x>;
112 + __dormant__ {
113 + compatible = "adi,adv7280-m";
114 + };
115 + };
116 + fragment@102 {
117 + target = <&adv728x>;
118 + __dormant__ {
119 + compatible = "adi,adv7281-m";
120 + };
121 + };
122 + fragment@103 {
123 + target = <&adv728x>;
124 + __dormant__ {
125 + compatible = "adi,adv7281-ma";
126 + };
127 + };
128 +
129 + __overrides__ {
130 + adv7280m = <0>, "+101";
131 + adv7281m = <0>, "+102";
132 + adv7281ma = <0>, "+103";
133 + };
134 +};