[01/19] dt-bindings: media: cal: update binding to use syscon
diff mbox series

Message ID 20191018153437.20614-2-bparrot@ti.com
State Changes Requested
Headers show
Series
  • media: ti-vpe: cal: maintenance
Related show

Checks

Context Check Description
robh/checkpatch success

Commit Message

Benoit Parrot Oct. 18, 2019, 3:34 p.m. UTC
Update Device Tree bindings for the CAL driver to use syscon to access
the phy config register instead of trying to map it directly.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
---
 Documentation/devicetree/bindings/media/ti-cal.txt | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

Comments

Rob Herring Oct. 29, 2019, 1:20 p.m. UTC | #1
On Fri, Oct 18, 2019 at 10:34:19AM -0500, Benoit Parrot wrote:
> Update Device Tree bindings for the CAL driver to use syscon to access
> the phy config register instead of trying to map it directly.
> 
> Signed-off-by: Benoit Parrot <bparrot@ti.com>
> ---
>  Documentation/devicetree/bindings/media/ti-cal.txt | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/ti-cal.txt b/Documentation/devicetree/bindings/media/ti-cal.txt
> index ae9b52f37576..782f801b12a9 100644
> --- a/Documentation/devicetree/bindings/media/ti-cal.txt
> +++ b/Documentation/devicetree/bindings/media/ti-cal.txt
> @@ -10,9 +10,14 @@ Required properties:
>  - compatible: must be "ti,dra72-cal"
>  - reg:	CAL Top level, Receiver Core #0, Receiver Core #1 and Camera RX
>  	control address space
> -- reg-names: cal_top, cal_rx_core0, cal_rx_core1, and camerrx_control
> +- reg-names: cal_top, cal_rx_core0, cal_rx_core1 and camerrx_control
>  	     registers
>  - interrupts: should contain IRQ line for the CAL;
> +- syscon-camerrx: phandle to the device control module and offset to the
> +		  control_camerarx_core register
> +		  This node is meant to replace the "camerrx_control" reg
> +		  entry above but "camerrx_control" is still handled
> +		  for backward compatibility.

Needs a vendor prefix and drop 'syscon'.

>  
>  CAL supports 2 camera port nodes on MIPI bus. Each CSI2 camera port nodes
>  should contain a 'port' child node with child 'endpoint' node. Please
> @@ -25,13 +30,12 @@ Example:
>  		ti,hwmods = "cal";
>  		reg = <0x4845B000 0x400>,
>  		      <0x4845B800 0x40>,
> -		      <0x4845B900 0x40>,
> -		      <0x4A002e94 0x4>;
> +		      <0x4845B900 0x40>;
>  		reg-names = "cal_top",
>  			    "cal_rx_core0",
> -			    "cal_rx_core1",
> -			    "camerrx_control";
> +			    "cal_rx_core1";
>  		interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
> +		syscon-camerrx = <&scm_conf 0xE94>;
>  		#address-cells = <1>;
>  		#size-cells = <0>;
>  
> -- 
> 2.17.1
>
Benoit Parrot Oct. 30, 2019, 1:39 p.m. UTC | #2
Rob Herring <robh@kernel.org> wrote on Tue [2019-Oct-29 08:20:09 -0500]:
> On Fri, Oct 18, 2019 at 10:34:19AM -0500, Benoit Parrot wrote:
> > Update Device Tree bindings for the CAL driver to use syscon to access
> > the phy config register instead of trying to map it directly.
> > 
> > Signed-off-by: Benoit Parrot <bparrot@ti.com>
> > ---
> >  Documentation/devicetree/bindings/media/ti-cal.txt | 14 +++++++++-----
> >  1 file changed, 9 insertions(+), 5 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/media/ti-cal.txt b/Documentation/devicetree/bindings/media/ti-cal.txt
> > index ae9b52f37576..782f801b12a9 100644
> > --- a/Documentation/devicetree/bindings/media/ti-cal.txt
> > +++ b/Documentation/devicetree/bindings/media/ti-cal.txt
> > @@ -10,9 +10,14 @@ Required properties:
> >  - compatible: must be "ti,dra72-cal"
> >  - reg:	CAL Top level, Receiver Core #0, Receiver Core #1 and Camera RX
> >  	control address space
> > -- reg-names: cal_top, cal_rx_core0, cal_rx_core1, and camerrx_control
> > +- reg-names: cal_top, cal_rx_core0, cal_rx_core1 and camerrx_control
> >  	     registers
> >  - interrupts: should contain IRQ line for the CAL;
> > +- syscon-camerrx: phandle to the device control module and offset to the
> > +		  control_camerarx_core register
> > +		  This node is meant to replace the "camerrx_control" reg
> > +		  entry above but "camerrx_control" is still handled
> > +		  for backward compatibility.
> 
> Needs a vendor prefix and drop 'syscon'.

Hmm, I had chosen this syntax based on previous examples.
But I can change it. How about "ti,camerrx_control"?

> 
> >  
> >  CAL supports 2 camera port nodes on MIPI bus. Each CSI2 camera port nodes
> >  should contain a 'port' child node with child 'endpoint' node. Please
> > @@ -25,13 +30,12 @@ Example:
> >  		ti,hwmods = "cal";
> >  		reg = <0x4845B000 0x400>,
> >  		      <0x4845B800 0x40>,
> > -		      <0x4845B900 0x40>,
> > -		      <0x4A002e94 0x4>;
> > +		      <0x4845B900 0x40>;
> >  		reg-names = "cal_top",
> >  			    "cal_rx_core0",
> > -			    "cal_rx_core1",
> > -			    "camerrx_control";
> > +			    "cal_rx_core1";
> >  		interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
> > +		syscon-camerrx = <&scm_conf 0xE94>;
> >  		#address-cells = <1>;
> >  		#size-cells = <0>;
> >  
> > -- 
> > 2.17.1
> >

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/media/ti-cal.txt b/Documentation/devicetree/bindings/media/ti-cal.txt
index ae9b52f37576..782f801b12a9 100644
--- a/Documentation/devicetree/bindings/media/ti-cal.txt
+++ b/Documentation/devicetree/bindings/media/ti-cal.txt
@@ -10,9 +10,14 @@  Required properties:
 - compatible: must be "ti,dra72-cal"
 - reg:	CAL Top level, Receiver Core #0, Receiver Core #1 and Camera RX
 	control address space
-- reg-names: cal_top, cal_rx_core0, cal_rx_core1, and camerrx_control
+- reg-names: cal_top, cal_rx_core0, cal_rx_core1 and camerrx_control
 	     registers
 - interrupts: should contain IRQ line for the CAL;
+- syscon-camerrx: phandle to the device control module and offset to the
+		  control_camerarx_core register
+		  This node is meant to replace the "camerrx_control" reg
+		  entry above but "camerrx_control" is still handled
+		  for backward compatibility.
 
 CAL supports 2 camera port nodes on MIPI bus. Each CSI2 camera port nodes
 should contain a 'port' child node with child 'endpoint' node. Please
@@ -25,13 +30,12 @@  Example:
 		ti,hwmods = "cal";
 		reg = <0x4845B000 0x400>,
 		      <0x4845B800 0x40>,
-		      <0x4845B900 0x40>,
-		      <0x4A002e94 0x4>;
+		      <0x4845B900 0x40>;
 		reg-names = "cal_top",
 			    "cal_rx_core0",
-			    "cal_rx_core1",
-			    "camerrx_control";
+			    "cal_rx_core1";
 		interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
+		syscon-camerrx = <&scm_conf 0xE94>;
 		#address-cells = <1>;
 		#size-cells = <0>;