Message ID | 20211216163439.139579-5-jacopo+renesas@jmondi.org (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | arm64: dts: renesas: Enable MAX9286 on Eagle and Condor | expand |
Quoting Jacopo Mondi (2021-12-16 16:34:36) > Enable the MAX9286 GMSL deserializers on Condor-V3H board. > > Connected cameras should be defined in a device-tree overlay or included > after these definitions. > > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> This looks good to me. It now enables the CSI2s, and the max9286 will have no children. Will this create a completed media graph that simply has no cameras connected? Or will the max9286 return a failure if there are no devices attached. I could look this up I guess, but I'm only curious of what potential side effects there are of having a now successfully probed CSI2 receiver/VIN but without any cameras. Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> > --- > .../boot/dts/renesas/r8a77980-condor.dts | 193 ++++++++++++++++++ > 1 file changed, 193 insertions(+) > > diff --git a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts > index 3d6d10c82f48..2eb2b852ddca 100644 > --- a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts > +++ b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts > @@ -6,6 +6,8 @@ > * Copyright (C) 2018 Cogent Embedded, Inc. > */ > > +#include <dt-bindings/gpio/gpio.h> > + > /dts-v1/; > #include "r8a77980.dtsi" > #include <dt-bindings/gpio/gpio.h> > @@ -108,6 +110,34 @@ channel0 { > }; > }; > > +&csi40 { > + status = "okay"; > + > + ports { > + port@0 { > + csi40_in: endpoint { > + clock-lanes = <0>; > + data-lanes = <1 2 3 4>; > + remote-endpoint = <&max9286_out0>; > + }; > + }; > + }; > +}; > + > +&csi41 { > + status = "okay"; > + > + ports { > + port@0 { > + csi41_in: endpoint { > + clock-lanes = <0>; > + data-lanes = <1 2 3 4>; > + remote-endpoint = <&max9286_out1>; > + }; > + }; > + }; > +}; > + > &du { > clocks = <&cpg CPG_MOD 724>, > <&x1_clk>; > @@ -200,6 +230,164 @@ adv7511_out: endpoint { > }; > }; > > +&i2c1 { > + pinctrl-0 = <&i2c1_pins>; > + pinctrl-names = "default"; > + > + status = "okay"; > + clock-frequency = <400000>; > + > + gmsl0: gmsl-deserializer@48 { > + compatible = "maxim,max9286"; > + reg = <0x48>; > + > + maxim,gpio-poc = <0 GPIO_ACTIVE_LOW>; > + enable-gpios = <&io_expander0 0 GPIO_ACTIVE_HIGH>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + }; > + > + port@1 { > + reg = <1>; > + }; > + > + port@2 { > + reg = <2>; > + }; > + > + port@3 { > + reg = <3>; > + }; > + > + port@4 { > + reg = <4>; > + max9286_out0: endpoint { > + clock-lanes = <0>; > + data-lanes = <1 2 3 4>; > + remote-endpoint = <&csi40_in>; > + }; > + }; > + }; > + > + i2c-mux { > + #address-cells = <1>; > + #size-cells = <0>; > + > + i2c@0 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0>; > + > + status = "disabled"; > + }; > + > + i2c@1 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <1>; > + > + status = "disabled"; > + }; > + > + i2c@2 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <2>; > + > + status = "disabled"; > + }; > + > + i2c@3 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <3>; > + > + status = "disabled"; > + }; > + }; > + }; > + > + gmsl1: gmsl-deserializer@4a { > + compatible = "maxim,max9286"; > + reg = <0x4a>; > + > + maxim,gpio-poc = <0 GPIO_ACTIVE_LOW>; > + enable-gpios = <&io_expander1 0 GPIO_ACTIVE_HIGH>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + }; > + > + port@1 { > + reg = <1>; > + }; > + > + port@2 { > + reg = <2>; > + }; > + > + port@3 { > + reg = <3>; > + }; > + > + port@4 { > + reg = <4>; > + max9286_out1: endpoint { > + clock-lanes = <0>; > + data-lanes = <1 2 3 4>; > + remote-endpoint = <&csi41_in>; > + }; > + }; > + }; > + > + i2c-mux { > + #address-cells = <1>; > + #size-cells = <0>; > + > + i2c@0 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0>; > + > + status = "disabled"; > + }; > + > + i2c@1 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <1>; > + > + status = "disabled"; > + }; > + > + i2c@2 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <2>; > + > + status = "disabled"; > + }; > + > + i2c@3 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <3>; > + > + status = "disabled"; > + }; > + }; > + }; > +}; > + > &lvds0 { > status = "okay"; > > @@ -256,6 +444,11 @@ i2c0_pins: i2c0 { > function = "i2c0"; > }; > > + i2c1_pins: i2c1 { > + groups = "i2c1"; > + function = "i2c1"; > + }; > + > mmc_pins: mmc { > groups = "mmc_data8", "mmc_ctrl", "mmc_ds"; > function = "mmc"; > -- > 2.33.1 >
Hi Jacopo, On Thu, Dec 16, 2021 at 5:34 PM Jacopo Mondi <jacopo+renesas@jmondi.org> wrote: > Enable the MAX9286 GMSL deserializers on Condor-V3H board. > > Connected cameras should be defined in a device-tree overlay or included > after these definitions. > > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Thanks for your patch! > --- a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts > +++ b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts > @@ -6,6 +6,8 @@ > * Copyright (C) 2018 Cogent Embedded, Inc. > */ > > +#include <dt-bindings/gpio/gpio.h> Already included below. > + > /dts-v1/; > #include "r8a77980.dtsi" > #include <dt-bindings/gpio/gpio.h> I can fix that while applying, but I'm interested in hearing the answer to Kieran's question first. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, Kieran, On Thu, Jan 20, 2022 at 10:14:34AM +0100, Geert Uytterhoeven wrote: > Hi Jacopo, > > On Thu, Dec 16, 2021 at 5:34 PM Jacopo Mondi <jacopo+renesas@jmondi.org> wrote: > > Enable the MAX9286 GMSL deserializers on Condor-V3H board. > > > > Connected cameras should be defined in a device-tree overlay or included > > after these definitions. > > > > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> > > Thanks for your patch! > > > --- a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts > > +++ b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts > > @@ -6,6 +6,8 @@ > > * Copyright (C) 2018 Cogent Embedded, Inc. > > */ > > > > +#include <dt-bindings/gpio/gpio.h> > > Already included below. > > > + > > /dts-v1/; > > #include "r8a77980.dtsi" > > #include <dt-bindings/gpio/gpio.h> > > I can fix that while applying, but I'm interested in hearing the answer > to Kieran's question first. I can confirm that without including "gmsl-cameras.dtsi" no media graph is registered. This is expected as the VINs and GSML device nodes are enabled in the .dtsi only #ifdef GMSL_0 &vin0 { status = "okay"; }; &vin1 { status = "okay"; }; &vin2 { status = "okay"; }; &vin3 { status = "okay"; }; &gmsl0 { status = "okay"; ... I think that's the expected behavior, isn't it ? Thanks j > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
diff --git a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts index 3d6d10c82f48..2eb2b852ddca 100644 --- a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts +++ b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts @@ -6,6 +6,8 @@ * Copyright (C) 2018 Cogent Embedded, Inc. */ +#include <dt-bindings/gpio/gpio.h> + /dts-v1/; #include "r8a77980.dtsi" #include <dt-bindings/gpio/gpio.h> @@ -108,6 +110,34 @@ channel0 { }; }; +&csi40 { + status = "okay"; + + ports { + port@0 { + csi40_in: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&max9286_out0>; + }; + }; + }; +}; + +&csi41 { + status = "okay"; + + ports { + port@0 { + csi41_in: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&max9286_out1>; + }; + }; + }; +}; + &du { clocks = <&cpg CPG_MOD 724>, <&x1_clk>; @@ -200,6 +230,164 @@ adv7511_out: endpoint { }; }; +&i2c1 { + pinctrl-0 = <&i2c1_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; + + gmsl0: gmsl-deserializer@48 { + compatible = "maxim,max9286"; + reg = <0x48>; + + maxim,gpio-poc = <0 GPIO_ACTIVE_LOW>; + enable-gpios = <&io_expander0 0 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + }; + + port@2 { + reg = <2>; + }; + + port@3 { + reg = <3>; + }; + + port@4 { + reg = <4>; + max9286_out0: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&csi40_in>; + }; + }; + }; + + i2c-mux { + #address-cells = <1>; + #size-cells = <0>; + + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + status = "disabled"; + }; + + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + status = "disabled"; + }; + + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + + status = "disabled"; + }; + + i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + + status = "disabled"; + }; + }; + }; + + gmsl1: gmsl-deserializer@4a { + compatible = "maxim,max9286"; + reg = <0x4a>; + + maxim,gpio-poc = <0 GPIO_ACTIVE_LOW>; + enable-gpios = <&io_expander1 0 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + }; + + port@2 { + reg = <2>; + }; + + port@3 { + reg = <3>; + }; + + port@4 { + reg = <4>; + max9286_out1: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&csi41_in>; + }; + }; + }; + + i2c-mux { + #address-cells = <1>; + #size-cells = <0>; + + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + status = "disabled"; + }; + + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + status = "disabled"; + }; + + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + + status = "disabled"; + }; + + i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + + status = "disabled"; + }; + }; + }; +}; + &lvds0 { status = "okay"; @@ -256,6 +444,11 @@ i2c0_pins: i2c0 { function = "i2c0"; }; + i2c1_pins: i2c1 { + groups = "i2c1"; + function = "i2c1"; + }; + mmc_pins: mmc { groups = "mmc_data8", "mmc_ctrl", "mmc_ds"; function = "mmc";
Enable the MAX9286 GMSL deserializers on Condor-V3H board. Connected cameras should be defined in a device-tree overlay or included after these definitions. Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> --- .../boot/dts/renesas/r8a77980-condor.dts | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+)