1 From 8ea13a43a77dfb45c836de2d6c747f630dd75275 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] dtoverlays: Add support for ADV7280-M, ADV7281-M and
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.
13 Adds a new overlay "adv728x" that includes the existing adv7282
14 overlay but adds several parameters to modify the behaviour.
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).
19 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
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
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) += \
35 akkordion-iqdacplus.dtbo \
36 allo-boss-dac-pcm512x-audio.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)
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.
59 Name: akkordion-iqdacplus
60 --- a/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
61 +++ b/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
66 - adv7282: adv7282@21 {
67 + adv728x: adv728x@21 {
68 compatible = "adi,adv7282-m";
71 clock-frequency = <24000000>;
73 - adv7282_0: endpoint {
74 + adv728x_0: endpoint {
75 remote-endpoint = <&csi1_ep>;
82 - remote-endpoint = <&adv7282_0>;
83 + remote-endpoint = <&adv728x_0>;
91 - i2c_pins_28_29 = <0>,"+2-3";
92 + i2c_pins_28_29 = <0>,"+2-3";
93 + addr = <&adv728x>,"reg:0";
97 +++ b/arch/arm/boot/dts/overlays/adv728x-m-overlay.dts
99 +// SPDX-License-Identifier: GPL-2.0-only
100 +// Definitions for Analog Devices ADV728[0|1|2]-M video to CSI2 bridges on VC
103 +#include "adv7282m-overlay.dts"
106 + compatible = "brcm,bcm2708";
108 + // Fragment numbers deliberately high to avoid conflicts with the
109 + // included adv7282m overlay file.
112 + target = <&adv728x>;
114 + compatible = "adi,adv7280-m";
118 + target = <&adv728x>;
120 + compatible = "adi,adv7281-m";
124 + target = <&adv728x>;
126 + compatible = "adi,adv7281-ma";
131 + adv7280m = <0>, "+101";
132 + adv7281m = <0>, "+102";
133 + adv7281ma = <0>, "+103";