RE: [PATCH v2 2/5] Documentation: Detail permitted DT properties for the imx6ul_tsc

2015-08-24 Thread Chen Bough


> -Original Message-
> From: Markus Pargmann [mailto:m...@pengutronix.de]
> Sent: Friday, August 21, 2015 5:27 PM
> To: Chen Haibo-B51421
> Cc: robh...@kernel.org; pawel.m...@arm.com; mark.rutl...@arm.com;
> ijc+devicet...@hellion.org.uk; ga...@codeaurora.org; shawn...@kernel.org;
> ker...@pengutronix.de; li...@arm.linux.org.uk; dmitry.torok...@gmail.com;
> devicetree@vger.kernel.org; sbran...@broadcom.com; a...@arndb.de;
> mche...@osg.samsung.com; christian.gmei...@gmail.com;
> scott@emc.com.tw; linux-ker...@vger.kernel.org; hdego...@redhat.com;
> jonat...@broadcom.com; benjamin.tissoi...@redhat.com;
> hans.verk...@cisco.com; had...@hadess.net; linux-in...@vger.kernel.org;
> ge...@linux-m68k.org; sebastien.szyman...@armadeus.com;
> mamli...@gmail.com; linux-arm-ker...@lists.infradead.org
> Subject: Re: [PATCH v2 2/5] Documentation: Detail permitted DT properties
> for the imx6ul_tsc
> 
> On Fri, Aug 21, 2015 at 08:30:16AM +, Chen Bough wrote:
> > Hi Markus,
> >
> > > -Original Message-
> > > From: Markus Pargmann [mailto:m...@pengutronix.de]
> > > Sent: Wednesday, August 19, 2015 1:55 PM
> > > To: Chen Haibo-B51421
> > > Cc: robh...@kernel.org; pawel.m...@arm.com; mark.rutl...@arm.com;
> > > ijc+devicet...@hellion.org.uk; ga...@codeaurora.org;
> > > ijc+shawn...@kernel.org;
> > > ker...@pengutronix.de; li...@arm.linux.org.uk;
> > > dmitry.torok...@gmail.com; devicetree@vger.kernel.org;
> > > sbran...@broadcom.com; a...@arndb.de; mche...@osg.samsung.com;
> > > christian.gmei...@gmail.com; scott@emc.com.tw;
> > > linux-ker...@vger.kernel.org; hdego...@redhat.com;
> > > jonat...@broadcom.com; benjamin.tissoi...@redhat.com;
> > > hans.verk...@cisco.com; had...@hadess.net;
> > > linux-in...@vger.kernel.org; ge...@linux-m68k.org;
> > > sebastien.szyman...@armadeus.com; mamli...@gmail.com;
> > > linux-arm-ker...@lists.infradead.org
> > > Subject: Re: [PATCH v2 2/5] Documentation: Detail permitted DT
> > > properties for the imx6ul_tsc
> > >
> > > Hi,
> > >
> > > On Tue, Jul 28, 2015 at 05:58:38PM +0800, Haibo Chen wrote:
> > > > Here we apply required documentation for the imx6ul touch screen
> > > > controller driver which describe available properties and how to
> > > > use them.
> > > >
> > > > Signed-off-by: Haibo Chen 
> > > > ---
> > > >  .../bindings/input/touchscreen/imx6ul_tsc.txt  | 36
> > > ++
> > > >  1 file changed, 36 insertions(+)
> > > >  create mode 100644
> > > > Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.t
> > > > xt
> > > > b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.t
> > > > xt
> > > > new file mode 100644
> > > > index 000..ac41c32
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_t
> > > > +++ sc.t
> > > > +++ xt
> > > > @@ -0,0 +1,36 @@
> > > > +* Freescale i.MX6UL Touch Controller
> > > > +
> > > > +Required properties:
> > > > +- compatible: must be "fsl,imx6ul-tsc".
> > > > +- reg: this touch controller address and the ADC2 address.
> > >
> > > This suggests that this driver is using a unit ADC2. Which also
> > > means that there are more than one ADC which are probably identical?
> > >
> > > Shouldn't these ADCs be properly described by their own device nodes
> > > instead of these two register ranges, two interrupts and two clocks?
> > >
> > > Is 'ADC2' usable without tsc? Then ADC1/ADC2 should perhaps get a
> > > proper IIO driver.
> >
> > For i.MX6UL, there are two ADC. ADC1 is a normal ADC, and ADC2 can
> > only works for TSC, the channels of ADC2 are connected to TSC
> > directly. TSC and ADC2 should work together as a touch screen
> controller.
> 
> But as I understand these are two different units. Wouldn't it be better
> to abstract it that way in the DT?

Since the ADC2 just work for TSC, no other use, why not bind ADC2 and TSC?
If separate, seems ADC2 can works as a normal ADC, but actually it can't.

Best regards,

Haibo

> 
> Best regards,
> 
> Markus
> 
> >
> > For ADC1, it share the driver vf610_adc.c (drivers/iio/adc/vf610_adc.c).
>

Re: [PATCH v2 2/5] Documentation: Detail permitted DT properties for the imx6ul_tsc

2015-08-21 Thread Markus Pargmann
On Fri, Aug 21, 2015 at 08:30:16AM +, Chen Bough wrote:
> Hi Markus,
> 
> > -Original Message-
> > From: Markus Pargmann [mailto:m...@pengutronix.de]
> > Sent: Wednesday, August 19, 2015 1:55 PM
> > To: Chen Haibo-B51421
> > Cc: robh...@kernel.org; pawel.m...@arm.com; mark.rutl...@arm.com;
> > ijc+devicet...@hellion.org.uk; ga...@codeaurora.org; shawn...@kernel.org;
> > ker...@pengutronix.de; li...@arm.linux.org.uk; dmitry.torok...@gmail.com;
> > devicetree@vger.kernel.org; sbran...@broadcom.com; a...@arndb.de;
> > mche...@osg.samsung.com; christian.gmei...@gmail.com;
> > scott@emc.com.tw; linux-ker...@vger.kernel.org; hdego...@redhat.com;
> > jonat...@broadcom.com; benjamin.tissoi...@redhat.com;
> > hans.verk...@cisco.com; had...@hadess.net; linux-in...@vger.kernel.org;
> > ge...@linux-m68k.org; sebastien.szyman...@armadeus.com;
> > mamli...@gmail.com; linux-arm-ker...@lists.infradead.org
> > Subject: Re: [PATCH v2 2/5] Documentation: Detail permitted DT properties
> > for the imx6ul_tsc
> > 
> > Hi,
> > 
> > On Tue, Jul 28, 2015 at 05:58:38PM +0800, Haibo Chen wrote:
> > > Here we apply required documentation for the imx6ul touch screen
> > > controller driver which describe available properties and how to use
> > > them.
> > >
> > > Signed-off-by: Haibo Chen 
> > > ---
> > >  .../bindings/input/touchscreen/imx6ul_tsc.txt  | 36
> > ++
> > >  1 file changed, 36 insertions(+)
> > >  create mode 100644
> > > Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> > > b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> > > new file mode 100644
> > > index 000..ac41c32
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.t
> > > +++ xt
> > > @@ -0,0 +1,36 @@
> > > +* Freescale i.MX6UL Touch Controller
> > > +
> > > +Required properties:
> > > +- compatible: must be "fsl,imx6ul-tsc".
> > > +- reg: this touch controller address and the ADC2 address.
> > 
> > This suggests that this driver is using a unit ADC2. Which also means
> > that there are more than one ADC which are probably identical?
> > 
> > Shouldn't these ADCs be properly described by their own device nodes
> > instead of these two register ranges, two interrupts and two clocks?
> > 
> > Is 'ADC2' usable without tsc? Then ADC1/ADC2 should perhaps get a proper
> > IIO driver.
> 
> For i.MX6UL, there are two ADC. ADC1 is a normal ADC, and ADC2 can only works 
> for
> TSC, the channels of ADC2 are connected to TSC directly. TSC and ADC2 should 
> work
> together as a touch screen controller. 

But as I understand these are two different units. Wouldn't it be better
to abstract it that way in the DT?

Best regards,

Markus

> 
> For ADC1, it share the driver vf610_adc.c (drivers/iio/adc/vf610_adc.c). 
> 
> Best Regards
> 
> Haibo 
>  
> > 
> > Unfortunately I don't have the reference manual to have a look how this
> > all works.
> > 
> > Best regards,
> > 
> > Markus
> > 
> > > +- interrupts: the interrupt of this touch controller and ADC2.
> > > +- clocks: the root clock of touch controller and ADC2.
> > > +- clock-names; must be "tsc" and "adc".
> > > +- xnur-gpio: the X- gpio this controller connect to.
> > > +  This xnur-gpio returns to high once the finger leave the touch
> > > +screen (The
> > > +  last touch event the touch controller capture).
> > > +
> > > +Optional properties:
> > > +- measure-delay-time: the value of measure delay time.
> > > +  Before X-axis or Y-axis measurement, the screen need some time
> > > +before
> > > +  even potential distribution ready.
> > > +  This value depends on the touch screen.
> > > +- pre-charge-time: the touch screen need some time to precharge.
> > > +  This value depends on the touch screen.
> > > +
> > > +Example:
> > > + tsc: tsc@0204 {
> > > + compatible = "fsl,imx6ul-tsc";
> > > + reg = <0x0204 0x4000>, <0x0219c000 0x4000>;
> > > + interrupts = ,
> > > +  ;
> > > + clocks = <&clks IMX6UL_CLK_IPG>,
> > > +

RE: [PATCH v2 2/5] Documentation: Detail permitted DT properties for the imx6ul_tsc

2015-08-21 Thread Chen Bough
Hi Markus,

> -Original Message-
> From: Markus Pargmann [mailto:m...@pengutronix.de]
> Sent: Wednesday, August 19, 2015 1:55 PM
> To: Chen Haibo-B51421
> Cc: robh...@kernel.org; pawel.m...@arm.com; mark.rutl...@arm.com;
> ijc+devicet...@hellion.org.uk; ga...@codeaurora.org; shawn...@kernel.org;
> ker...@pengutronix.de; li...@arm.linux.org.uk; dmitry.torok...@gmail.com;
> devicetree@vger.kernel.org; sbran...@broadcom.com; a...@arndb.de;
> mche...@osg.samsung.com; christian.gmei...@gmail.com;
> scott@emc.com.tw; linux-ker...@vger.kernel.org; hdego...@redhat.com;
> jonat...@broadcom.com; benjamin.tissoi...@redhat.com;
> hans.verk...@cisco.com; had...@hadess.net; linux-in...@vger.kernel.org;
> ge...@linux-m68k.org; sebastien.szyman...@armadeus.com;
> mamli...@gmail.com; linux-arm-ker...@lists.infradead.org
> Subject: Re: [PATCH v2 2/5] Documentation: Detail permitted DT properties
> for the imx6ul_tsc
> 
> Hi,
> 
> On Tue, Jul 28, 2015 at 05:58:38PM +0800, Haibo Chen wrote:
> > Here we apply required documentation for the imx6ul touch screen
> > controller driver which describe available properties and how to use
> > them.
> >
> > Signed-off-by: Haibo Chen 
> > ---
> >  .../bindings/input/touchscreen/imx6ul_tsc.txt  | 36
> ++
> >  1 file changed, 36 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> >
> > diff --git
> > a/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> > b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> > new file mode 100644
> > index 000..ac41c32
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.t
> > +++ xt
> > @@ -0,0 +1,36 @@
> > +* Freescale i.MX6UL Touch Controller
> > +
> > +Required properties:
> > +- compatible: must be "fsl,imx6ul-tsc".
> > +- reg: this touch controller address and the ADC2 address.
> 
> This suggests that this driver is using a unit ADC2. Which also means
> that there are more than one ADC which are probably identical?
> 
> Shouldn't these ADCs be properly described by their own device nodes
> instead of these two register ranges, two interrupts and two clocks?
> 
> Is 'ADC2' usable without tsc? Then ADC1/ADC2 should perhaps get a proper
> IIO driver.

For i.MX6UL, there are two ADC. ADC1 is a normal ADC, and ADC2 can only works 
for
TSC, the channels of ADC2 are connected to TSC directly. TSC and ADC2 should 
work
together as a touch screen controller. 

For ADC1, it share the driver vf610_adc.c (drivers/iio/adc/vf610_adc.c). 

Best Regards

Haibo 
 
> 
> Unfortunately I don't have the reference manual to have a look how this
> all works.
> 
> Best regards,
> 
> Markus
> 
> > +- interrupts: the interrupt of this touch controller and ADC2.
> > +- clocks: the root clock of touch controller and ADC2.
> > +- clock-names; must be "tsc" and "adc".
> > +- xnur-gpio: the X- gpio this controller connect to.
> > +  This xnur-gpio returns to high once the finger leave the touch
> > +screen (The
> > +  last touch event the touch controller capture).
> > +
> > +Optional properties:
> > +- measure-delay-time: the value of measure delay time.
> > +  Before X-axis or Y-axis measurement, the screen need some time
> > +before
> > +  even potential distribution ready.
> > +  This value depends on the touch screen.
> > +- pre-charge-time: the touch screen need some time to precharge.
> > +  This value depends on the touch screen.
> > +
> > +Example:
> > +   tsc: tsc@0204 {
> > +   compatible = "fsl,imx6ul-tsc";
> > +   reg = <0x0204 0x4000>, <0x0219c000 0x4000>;
> > +   interrupts = ,
> > +;
> > +   clocks = <&clks IMX6UL_CLK_IPG>,
> > +<&clks IMX6UL_CLK_ADC2>;
> > +   clock-names = "tsc", "adc";
> > +   pinctrl-names = "default";
> > +   pinctrl-0 = <&pinctrl_tsc>;
> > +   xnur-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
> > +   measure-delay-time = <0xfff>;
> > +   pre-charge-time = <0x>;
> > +   status = "okay";
> > +   };
> > --
> > 1.9.1
> >
> >
> >
> 
> --
> Pengutronix e.K.   |
> |
> Industrial Linux Solutions | http://www.pengutronix.de/
> |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0
> |
> Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917-
> |
N�r��yb�X��ǧv�^�)޺{.n�+���z��z��z)w*jg����ݢj/���z�ޖ��2�ޙ&�)ߡ�a�����G���h��j:+v���w��٥

Re: [PATCH v2 2/5] Documentation: Detail permitted DT properties for the imx6ul_tsc

2015-08-18 Thread Markus Pargmann
Hi,

On Tue, Jul 28, 2015 at 05:58:38PM +0800, Haibo Chen wrote:
> Here we apply required documentation for the imx6ul touch screen
> controller driver which describe available properties and how to
> use them.
> 
> Signed-off-by: Haibo Chen 
> ---
>  .../bindings/input/touchscreen/imx6ul_tsc.txt  | 36 
> ++
>  1 file changed, 36 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> 
> diff --git 
> a/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt 
> b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> new file mode 100644
> index 000..ac41c32
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
> @@ -0,0 +1,36 @@
> +* Freescale i.MX6UL Touch Controller
> +
> +Required properties:
> +- compatible: must be "fsl,imx6ul-tsc".
> +- reg: this touch controller address and the ADC2 address.

This suggests that this driver is using a unit ADC2. Which also means
that there are more than one ADC which are probably identical?

Shouldn't these ADCs be properly described by their own device nodes
instead of these two register ranges, two interrupts and two clocks?

Is 'ADC2' usable without tsc? Then ADC1/ADC2 should perhaps get a proper
IIO driver.

Unfortunately I don't have the reference manual to have a look how this
all works.

Best regards,

Markus

> +- interrupts: the interrupt of this touch controller and ADC2.
> +- clocks: the root clock of touch controller and ADC2.
> +- clock-names; must be "tsc" and "adc".
> +- xnur-gpio: the X- gpio this controller connect to.
> +  This xnur-gpio returns to high once the finger leave the touch screen (The
> +  last touch event the touch controller capture).
> +
> +Optional properties:
> +- measure-delay-time: the value of measure delay time.
> +  Before X-axis or Y-axis measurement, the screen need some time before
> +  even potential distribution ready.
> +  This value depends on the touch screen.
> +- pre-charge-time: the touch screen need some time to precharge.
> +  This value depends on the touch screen.
> +
> +Example:
> + tsc: tsc@0204 {
> + compatible = "fsl,imx6ul-tsc";
> + reg = <0x0204 0x4000>, <0x0219c000 0x4000>;
> + interrupts = ,
> +  ;
> + clocks = <&clks IMX6UL_CLK_IPG>,
> +  <&clks IMX6UL_CLK_ADC2>;
> + clock-names = "tsc", "adc";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_tsc>;
> + xnur-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
> + measure-delay-time = <0xfff>;
> + pre-charge-time = <0x>;
> + status = "okay";
> + };
> -- 
> 1.9.1
> 
> 
> 

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |


signature.asc
Description: Digital signature


[PATCH v2 2/5] Documentation: Detail permitted DT properties for the imx6ul_tsc

2015-07-28 Thread Haibo Chen
Here we apply required documentation for the imx6ul touch screen
controller driver which describe available properties and how to
use them.

Signed-off-by: Haibo Chen 
---
 .../bindings/input/touchscreen/imx6ul_tsc.txt  | 36 ++
 1 file changed, 36 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt

diff --git a/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt 
b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
new file mode 100644
index 000..ac41c32
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
@@ -0,0 +1,36 @@
+* Freescale i.MX6UL Touch Controller
+
+Required properties:
+- compatible: must be "fsl,imx6ul-tsc".
+- reg: this touch controller address and the ADC2 address.
+- interrupts: the interrupt of this touch controller and ADC2.
+- clocks: the root clock of touch controller and ADC2.
+- clock-names; must be "tsc" and "adc".
+- xnur-gpio: the X- gpio this controller connect to.
+  This xnur-gpio returns to high once the finger leave the touch screen (The
+  last touch event the touch controller capture).
+
+Optional properties:
+- measure-delay-time: the value of measure delay time.
+  Before X-axis or Y-axis measurement, the screen need some time before
+  even potential distribution ready.
+  This value depends on the touch screen.
+- pre-charge-time: the touch screen need some time to precharge.
+  This value depends on the touch screen.
+
+Example:
+   tsc: tsc@0204 {
+   compatible = "fsl,imx6ul-tsc";
+   reg = <0x0204 0x4000>, <0x0219c000 0x4000>;
+   interrupts = ,
+;
+   clocks = <&clks IMX6UL_CLK_IPG>,
+<&clks IMX6UL_CLK_ADC2>;
+   clock-names = "tsc", "adc";
+   pinctrl-names = "default";
+   pinctrl-0 = <&pinctrl_tsc>;
+   xnur-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+   measure-delay-time = <0xfff>;
+   pre-charge-time = <0x>;
+   status = "okay";
+   };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html