162306a36Sopenharmony_ci* Broadcom's IPROC Touchscreen Controller
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciRequired properties:
462306a36Sopenharmony_ci- compatible: must be "brcm,iproc-touchscreen"
562306a36Sopenharmony_ci- ts_syscon: handler of syscon node defining physical base
662306a36Sopenharmony_ci  address of the controller and length of memory mapped region.
762306a36Sopenharmony_ci  If this property is selected please make sure MFD_SYSCON config
862306a36Sopenharmony_ci  is enabled in the defconfig file.
962306a36Sopenharmony_ci- clocks:  The clock provided by the SOC to driver the tsc
1062306a36Sopenharmony_ci- clock-names:  name for the clock
1162306a36Sopenharmony_ci- interrupts: The touchscreen controller's interrupt
1262306a36Sopenharmony_ci- address-cells: Specify the number of u32 entries needed in child nodes.
1362306a36Sopenharmony_ci  Should set to 1.
1462306a36Sopenharmony_ci- size-cells: Specify number of u32 entries needed to specify child nodes size
1562306a36Sopenharmony_ci  in reg property. Should set to 1.
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ciOptional properties:
1862306a36Sopenharmony_ci- scanning_period: Time between scans. Each step is 1024 us.  Valid 1-256.
1962306a36Sopenharmony_ci- debounce_timeout: Each step is 512 us.  Valid 0-255
2062306a36Sopenharmony_ci- settling_timeout: The settling duration (in ms) is the amount of time
2162306a36Sopenharmony_ci                    the tsc waits to allow the voltage to settle after
2262306a36Sopenharmony_ci                    turning on the drivers in detection mode.
2362306a36Sopenharmony_ci                    Valid values: 0-11
2462306a36Sopenharmony_ci                    0 =  0.008 ms
2562306a36Sopenharmony_ci                    1 =  0.01 ms
2662306a36Sopenharmony_ci                    2 =  0.02 ms
2762306a36Sopenharmony_ci                    3 =  0.04 ms
2862306a36Sopenharmony_ci                    4 =  0.08 ms
2962306a36Sopenharmony_ci                    5 =  0.16 ms
3062306a36Sopenharmony_ci                    6 =  0.32 ms
3162306a36Sopenharmony_ci                    7 =  0.64 ms
3262306a36Sopenharmony_ci                    8 =  1.28 ms
3362306a36Sopenharmony_ci                    9 =  2.56 ms
3462306a36Sopenharmony_ci                   10 =  5.12 ms
3562306a36Sopenharmony_ci                   11 = 10.24 ms
3662306a36Sopenharmony_ci- touch_timeout: The continuous number of scan periods in which touch is
3762306a36Sopenharmony_ci                not detected before the controller returns to idle state.
3862306a36Sopenharmony_ci                Valid values 0-255.
3962306a36Sopenharmony_ci- average_data: Number of data samples which are averaged before a final
4062306a36Sopenharmony_ci                data point is placed into the FIFO
4162306a36Sopenharmony_ci                Valid values 0-7
4262306a36Sopenharmony_ci                0 =   1 sample
4362306a36Sopenharmony_ci                1 =   2 samples
4462306a36Sopenharmony_ci                2 =   4 samples
4562306a36Sopenharmony_ci                3 =   8 samples
4662306a36Sopenharmony_ci                4 =  16 samples
4762306a36Sopenharmony_ci                5 =  32 samples
4862306a36Sopenharmony_ci                6 =  64 samples
4962306a36Sopenharmony_ci                7 = 128 samples
5062306a36Sopenharmony_ci- fifo_threshold: Interrupt is generated whenever the number of fifo
5162306a36Sopenharmony_ci                entries exceeds this value
5262306a36Sopenharmony_ci                Valid values 0-31
5362306a36Sopenharmony_ci- touchscreen-size-x: horizontal resolution of touchscreen (in pixels)
5462306a36Sopenharmony_ci- touchscreen-size-y: vertical resolution of touchscreen (in pixels)
5562306a36Sopenharmony_ci- touchscreen-fuzz-x: horizontal noise value of the absolute input
5662306a36Sopenharmony_ci                      device (in pixels)
5762306a36Sopenharmony_ci- touchscreen-fuzz-y: vertical noise value of the absolute input
5862306a36Sopenharmony_ci                      device (in pixels)
5962306a36Sopenharmony_ci- touchscreen-inverted-x: X axis is inverted (boolean)
6062306a36Sopenharmony_ci- touchscreen-inverted-y: Y axis is inverted (boolean)
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ciExample: An example of touchscreen node
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci	ts_adc_syscon: ts_adc_syscon@180a6000 {
6562306a36Sopenharmony_ci		compatible = "brcm,iproc-ts-adc-syscon","syscon";
6662306a36Sopenharmony_ci		reg = <0x180a6000 0xc30>;
6762306a36Sopenharmony_ci	};
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ci	touchscreen: touchscreen@180a6000 {
7062306a36Sopenharmony_ci		compatible = "brcm,iproc-touchscreen";
7162306a36Sopenharmony_ci		#address-cells = <1>;
7262306a36Sopenharmony_ci		#size-cells = <1>;
7362306a36Sopenharmony_ci		ts_syscon = <&ts_adc_syscon>;
7462306a36Sopenharmony_ci		clocks = <&adc_clk>;
7562306a36Sopenharmony_ci		clock-names = "tsc_clk";
7662306a36Sopenharmony_ci		interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci		scanning_period = <5>;
7962306a36Sopenharmony_ci		debounce_timeout = <40>;
8062306a36Sopenharmony_ci		settling_timeout = <7>;
8162306a36Sopenharmony_ci		touch_timeout = <10>;
8262306a36Sopenharmony_ci		average_data = <5>;
8362306a36Sopenharmony_ci		fifo_threshold = <1>;
8462306a36Sopenharmony_ci		/* Touchscreen is rotated 180 degrees. */
8562306a36Sopenharmony_ci		touchscreen-inverted-x;
8662306a36Sopenharmony_ci		touchscreen-inverted-y;
8762306a36Sopenharmony_ci	};
88