aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0813-dt-dtoverlays-Fix-up-base-DT-and-overlays-for-update.patch
blob: edfca1ed67a1a377642da9a000337f8f772bd52b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
From 7a1905f969cfa2e303f5e74efee56dbd0523e5bb Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Tue, 23 Jun 2020 15:41:42 +0100
Subject: [PATCH] dt/dtoverlays: Fix up base DT and overlays for
 updated Unicam driver

The upstreamed Unicam driver uses a dt property to denote how many
lanes are supported by the receiver peripheral, independent of
the number of lanes that the sensor wants to use. It also doesn't
check the remote endpoint config for the number of lanes as that
isn't the accepted way of doing things.

Update the base DT for the brcm,num-data-lanes property, and the
overlays to define the desired number of lanes at both ends of
the link.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 arch/arm/boot/dts/bcm2711-rpi-cm4.dts           |  3 ++-
 arch/arm/boot/dts/bcm283x-rpi-csi0-2lane.dtsi   |  6 +-----
 arch/arm/boot/dts/bcm283x-rpi-csi1-2lane.dtsi   |  6 +-----
 arch/arm/boot/dts/bcm283x-rpi-csi1-4lane.dtsi   |  6 +-----
 arch/arm/boot/dts/overlays/adv7282m-overlay.dts |  1 +
 arch/arm/boot/dts/overlays/imx477-overlay.dts   |  1 +
 arch/arm/boot/dts/overlays/irs1125-overlay.dts  |  2 ++
 arch/arm/boot/dts/overlays/ov5647-overlay.dts   |  1 +
 arch/arm/boot/dts/overlays/tc358743-overlay.dts | 16 +++++++++++++++-
 9 files changed, 25 insertions(+), 17 deletions(-)

--- a/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dts
@@ -203,7 +203,8 @@
 };
 
 #include "bcm2711-rpi.dtsi"
-#include "bcm283x-rpi-csi1-2lane.dtsi"
+#include "bcm283x-rpi-csi0-2lane.dtsi"
+#include "bcm283x-rpi-csi1-4lane.dtsi"
 #include "bcm283x-rpi-i2c0mux_0_44.dtsi"
 
 /delete-node/ &emmc2;
--- a/arch/arm/boot/dts/bcm283x-rpi-csi0-2lane.dtsi
+++ b/arch/arm/boot/dts/bcm283x-rpi-csi0-2lane.dtsi
@@ -1,8 +1,4 @@
 // SPDX-License-Identifier: GPL-2.0-only
 &csi0 {
-	port {
-		endpoint {
-			data-lanes = <1 2>;
-		};
-	};
+	brcm,num-data-lanes = <2>;
 };
--- a/arch/arm/boot/dts/bcm283x-rpi-csi1-2lane.dtsi
+++ b/arch/arm/boot/dts/bcm283x-rpi-csi1-2lane.dtsi
@@ -1,8 +1,4 @@
 // SPDX-License-Identifier: GPL-2.0-only
 &csi1 {
-	port {
-		endpoint {
-			data-lanes = <1 2>;
-		};
-	};
+	brcm,num-data-lanes = <2>;
 };
--- a/arch/arm/boot/dts/bcm283x-rpi-csi1-4lane.dtsi
+++ b/arch/arm/boot/dts/bcm283x-rpi-csi1-4lane.dtsi
@@ -1,8 +1,4 @@
 // SPDX-License-Identifier: GPL-2.0-only
 &csi1 {
-	port {
-		endpoint {
-			data-lanes = <1 2 3 4>;
-		};
-	};
+	brcm,num-data-lanes = <4>;
 };
--- a/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
+++ b/arch/arm/boot/dts/overlays/adv7282m-overlay.dts
@@ -40,6 +40,7 @@
 			port {
 				csi1_ep: endpoint {
 					remote-endpoint = <&adv728x_0>;
+					data-lanes = <1>;
 				};
 			};
 		};
--- a/arch/arm/boot/dts/overlays/imx477-overlay.dts
+++ b/arch/arm/boot/dts/overlays/imx477-overlay.dts
@@ -49,6 +49,7 @@
 			port {
 				csi1_ep: endpoint {
 					remote-endpoint = <&imx477_0>;
+					data-lanes = <1 2>;
 				};
 			};
 		};
--- a/arch/arm/boot/dts/overlays/irs1125-overlay.dts
+++ b/arch/arm/boot/dts/overlays/irs1125-overlay.dts
@@ -43,6 +43,8 @@
 			port {
 				csi1_ep: endpoint {
 					remote-endpoint = <&irs1125_0>;
+					data-lanes = <1 2>;
+					clock-noncontinuous;
 				};
 			};
 		};
--- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
+++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
@@ -43,6 +43,7 @@
 			port {
 				csi1_ep: endpoint {
 					remote-endpoint = <&ov5647_0>;
+					data-lanes = <1 2>;
 				};
 			};
 		};
--- a/arch/arm/boot/dts/overlays/tc358743-overlay.dts
+++ b/arch/arm/boot/dts/overlays/tc358743-overlay.dts
@@ -86,8 +86,22 @@
 		};
 	};
 
+	fragment@7 {
+		target = <&csi1_ep>;
+		__overlay__ {
+			data-lanes = <1 2>;
+		};
+	};
+
+	fragment@8 {
+		target = <&csi1_ep>;
+		__dormant__ {
+			data-lanes = <1 2 3 4>;
+		};
+	};
+
 	__overrides__ {
-		4lane = <0>, "-2+3";
+		4lane = <0>, "-2+3-7+8";
 		link-frequency = <&tc358743>,"link-frequencies#0";
 	};
 };