Hello,
this series adds a .dtsi fragment that allow to describe and
enable GMSL cameras on the V3M Eagle board.
The .dtsi supports connecting the RDACM20 and RDACM21 cameras to the
FAKRA connectors installed on the board.
Tested on V3M Eagle with RDACM20 and RDACM21 (a series is pending submission
for the RDACM20 camera module to support operations on the Eagle board)
Thanks
j
Jacopo Mondi (1):
dt-bindings: media: max9286: Describe gpio-hog
Kieran Bingham (3):
arm64: dts: renesas: eagle: Enable MAX9286
arm64: dts: renesas: eagle: Add GMSL .dtsi
arm64: dts: renesas: eagle: Include eagle-gmsl
.../bindings/media/i2c/maxim,max9286.yaml | 9 +
arch/arm64/boot/dts/renesas/eagle-gmsl.dtsi | 186 ++++++++++++++++++
.../arm64/boot/dts/renesas/r8a77970-eagle.dts | 135 +++++++++++++
3 files changed, 330 insertions(+)
create mode 100644 arch/arm64/boot/dts/renesas/eagle-gmsl.dtsi
--
2.30.0
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
Enable the MAX9286 GMSL deserializer on the Eagle-V3M board.
Connected cameras should be defined in a device-tree overlay or included
after these definitions.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
.../arm64/boot/dts/renesas/r8a77970-eagle.dts | 132 ++++++++++++++++++
1 file changed, 132 insertions(+)
The MAX9286 GMSL deserializer features gpio controller capabilities,
as it provides 2 GPIO lines.
As establishing a regulator that uses one of the GPIO lines and
enabling/disabling it at run-time in the max9286 won't work due to
a circular dependency on the gpio-controller/regulator creation, allow
the usage of a gpio-hog for that purpose.
The usage of the gpio-hog is required in designs where the MAX9286
GPIO lines control the remote cameras power.
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
.../devicetree/bindings/media/i2c/maxim,max9286.yaml | 9 +++++++++
1 file changed, 9 insertions(+)
@@ -0,0 +1,186 @@+// SPDX-License-Identifier: GPL-2.0++/*+*DeviceTreeSource(overlay)fortheEagleV3MGMSLconnectors+*+*Copyright(C)2017IdeasonBoard<kieran.bingham@ideasonboard.com>+*Copyright(C)2021JacopoMondi<jacopo+renesas@jmondi.org>+*+*ThisoverlayallowsyoutodefineGMSLcamerasconnectedtotheFAKRA+*connectorsontheEagle-V3M(orcompatible)board.+*+*Thefollowingcamerasarecurrentlysupported:+*"imi,rdacm20"+*"imi,rdacm21"+*/++#include<dt-bindings/gpio/gpio.h>++/*+*Selectwhichcamerasareinuse:+*#defineEAGLE_CAMERA0_RDACM20+*#defineEAGLE_CAMERA0_RDACM21+*+*Thetwocameramodulesareconfiguredwithdifferentimageformats+*andcannotbemixed.+*/+#defineEAGLE_CAMERA0_RDACM20+#defineEAGLE_CAMERA1_RDACM20+#defineEAGLE_CAMERA2_RDACM20+#defineEAGLE_CAMERA3_RDACM20++/* Set the compatible string based on the camera model. */+#ifdefined(EAGLE_CAMERA0_RDACM21)||defined(EAGLE_CAMERA1_RDACM21)||\+defined(EAGLE_CAMERA2_RDACM21)||defined(EAGLE_CAMERA3_RDACM21)+#defineEAGLE_CAMERA_MODEL "imi,rdacm21"+#defineEAGLE_USE_RDACM21+#elifdefined(EAGLE_CAMERA0_RDACM20)||defined(EAGLE_CAMERA1_RDACM20)||\+defined(EAGLE_CAMERA2_RDACM20)||defined(EAGLE_CAMERA3_RDACM20)+#defineEAGLE_CAMERA_MODEL "imi,rdacm20"+#defineEAGLE_USE_RDACM20+#endif++/* Define which cameras are available. */+#ifdefined(EAGLE_CAMERA0_RDACM21)||defined(EAGLE_CAMERA0_RDACM20)+#defineEAGLE_USE_CAMERA_0+#endif++#ifdefined(EAGLE_CAMERA1_RDACM21)||defined(EAGLE_CAMERA1_RDACM20)+#defineEAGLE_USE_CAMERA_1+#endif++#ifdefined(EAGLE_CAMERA2_RDACM21)||defined(EAGLE_CAMERA2_RDACM20)+#defineEAGLE_USE_CAMERA_2+#endif++#ifdefined(EAGLE_CAMERA3_RDACM21)||defined(EAGLE_CAMERA3_RDACM20)+#defineEAGLE_USE_CAMERA_3+#endif++/* Define the endpoint links. */+#ifdefEAGLE_USE_CAMERA_0+&max9286_in0{+remote-endpoint=<&fakra_con0>;+};+#endif++#ifdefEAGLE_USE_CAMERA_1+&max9286_in1{+remote-endpoint=<&fakra_con1>;+};+#endif++#ifdefEAGLE_USE_CAMERA_2+&max9286_in2{+remote-endpoint=<&fakra_con2>;+};+#endif++#ifdefEAGLE_USE_CAMERA_3+&max9286_in3{+remote-endpoint=<&fakra_con3>;+};+#endif++/* Populate the GMSL i2c-mux bus with camera nodes. */+#ifdefined(EAGLE_USE_RDACM21)||defined(EAGLE_USE_RDACM20)++#ifdefEAGLE_USE_CAMERA_0+&vin0{+status="okay";+};+#endif++#ifdefEAGLE_USE_CAMERA_1+&vin1{+status="okay";+};+#endif++#ifdefEAGLE_USE_CAMERA_2+&vin2{+status="okay";+};+#endif++#ifdefEAGLE_USE_CAMERA_3+&vin3{+status="okay";+};+#endif++&gmsl{++status="okay";+maxim,reverse-channel-microvolt=<100000>;++i2c-mux{+#ifdefEAGLE_USE_CAMERA_0+i2c@0{+status="okay";++camera@51{+compatible=EAGLE_CAMERA_MODEL;+reg=<0x51>,<0x61>;++port{+fakra_con0:endpoint{+remote-endpoint=<&max9286_in0>;+};+};+};+};+#endif++#ifdefEAGLE_USE_CAMERA_1+i2c@1{+status="okay";++camera@52{+compatible=EAGLE_CAMERA_MODEL;+reg=<0x52>,<0x62>;++port{+fakra_con1:endpoint{+remote-endpoint=<&max9286_in1>;+};+};+};+};+#endif++#ifdefEAGLE_USE_CAMERA_2+i2c@2{+status="okay";++camera@53{+compatible=EAGLE_CAMERA_MODEL;+reg=<0x53>,<0x63>;++port{+fakra_con2:endpoint{+remote-endpoint=<&max9286_in2>;+};+};+};+};+#endif++#ifdefEAGLE_USE_CAMERA_3+i2c@3{+status="okay";++camera@54{+compatible=EAGLE_CAMERA_MODEL;+reg=<0x54>,<0x64>;++port{+fakra_con3:endpoint{+remote-endpoint=<&max9286_in3>;+};+};+};+};+#endif+};+};+#endif
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
Include the eagle-gmsl.dtsi to enable GMSL camera support on the
Eagle-V3M platform.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 3 +++
1 file changed, 3 insertions(+)
From: Rob Herring <robh@kernel.org> Date: 2021-03-05 21:51:52
On Mon, Feb 15, 2021 at 06:24:44PM +0100, Jacopo Mondi wrote:
quoted hunk
The MAX9286 GMSL deserializer features gpio controller capabilities,
as it provides 2 GPIO lines.
As establishing a regulator that uses one of the GPIO lines and
enabling/disabling it at run-time in the max9286 won't work due to
a circular dependency on the gpio-controller/regulator creation, allow
the usage of a gpio-hog for that purpose.
The usage of the gpio-hog is required in designs where the MAX9286
GPIO lines control the remote cameras power.
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
.../devicetree/bindings/media/i2c/maxim,max9286.yaml | 9 +++++++++
1 file changed, 9 insertions(+)
I don't think we want to document all the GPIO hogs, but rather have a
pattern we can check. IOW, having node name pattern we match on. I think
the core schemas has this now.