diff mbox series

[RFC,5/5] arm64: dts: GMSL: Adapt to the use max9271 driver

Message ID 20210817072703.1167-6-jacopo+renesas@jmondi.org
State New
Headers show
Series [RFC,1/5] media: i2c: max9271: Rename max9271 library driver | expand

Commit Message

Jacopo Mondi Aug. 17, 2021, 7:27 a.m. UTC
Currently the whole RDACM20/21 camera module was handled by a single
driver and a single device node entry was required in DTS to describe
it.

With the introduction of the max9271 subdevice driver the camera module
is now described by two device nodes, one for the serializer and one for
the image sensor connected to it.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 arch/arm64/boot/dts/renesas/gmsl-cameras.dtsi | 34 ++++++++++++++++---
 .../arm64/boot/dts/renesas/r8a77970-eagle.dts |  6 ++--
 2 files changed, 32 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/gmsl-cameras.dtsi b/arch/arm64/boot/dts/renesas/gmsl-cameras.dtsi
index d45f072f8cdf..7d8f2e979134 100644
--- a/arch/arm64/boot/dts/renesas/gmsl-cameras.dtsi
+++ b/arch/arm64/boot/dts/renesas/gmsl-cameras.dtsi
@@ -131,13 +131,37 @@  i2c-mux {
 		i2c@0 {
 			status = "okay";
 
-			camera@51 {
-				compatible = GMSL_CAMERA_MODEL;
-				reg = <0x51>, <0x61>;
+			serializer@51 {
+				compatible = "maxim,max9271";
+				reg = <0x51>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						fakra_con0: endpoint {
+							remote-endpoint = <&max9286_in0>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						sensor_in0: endpoint {
+							remote-endpoint = <&sensor_out0>;
+						};
+					};
+				};
+			};
+
+			camera@61 {
+				compatible = "imi,rdacm20";
+				reg = <0x61>;
 
 				port {
-					fakra_con0: endpoint {
-						remote-endpoint = <&max9286_in0>;
+					sensor_out0: endpoint {
+						remote-endpoint = <&sensor_in0>;
 					};
 				};
 			};
diff --git a/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts b/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
index 96c807bf868c..22bb04914159 100644
--- a/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
@@ -388,7 +388,7 @@  &scif0 {
 /* FAKRA Overlay */
 #define GMSL_CAMERA_RDACM20
 #define GMSL_CAMERA_0
-#define GMSL_CAMERA_1
-#define GMSL_CAMERA_2
-#define GMSL_CAMERA_3
+//#define GMSL_CAMERA_1
+//#define GMSL_CAMERA_2
+//#define GMSL_CAMERA_3
 #include "gmsl-cameras.dtsi"