18c2ecf20Sopenharmony_ci* Broadcom's IPROC Touchscreen Controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci- compatible: must be "brcm,iproc-touchscreen"
58c2ecf20Sopenharmony_ci- ts_syscon: handler of syscon node defining physical base
68c2ecf20Sopenharmony_ci  address of the controller and length of memory mapped region.
78c2ecf20Sopenharmony_ci  If this property is selected please make sure MFD_SYSCON config
88c2ecf20Sopenharmony_ci  is enabled in the defconfig file.
98c2ecf20Sopenharmony_ci- clocks:  The clock provided by the SOC to driver the tsc
108c2ecf20Sopenharmony_ci- clock-names:  name for the clock
118c2ecf20Sopenharmony_ci- interrupts: The touchscreen controller's interrupt
128c2ecf20Sopenharmony_ci- address-cells: Specify the number of u32 entries needed in child nodes.
138c2ecf20Sopenharmony_ci  Should set to 1.
148c2ecf20Sopenharmony_ci- size-cells: Specify number of u32 entries needed to specify child nodes size
158c2ecf20Sopenharmony_ci  in reg property. Should set to 1.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciOptional properties:
188c2ecf20Sopenharmony_ci- scanning_period: Time between scans. Each step is 1024 us.  Valid 1-256.
198c2ecf20Sopenharmony_ci- debounce_timeout: Each step is 512 us.  Valid 0-255
208c2ecf20Sopenharmony_ci- settling_timeout: The settling duration (in ms) is the amount of time
218c2ecf20Sopenharmony_ci                    the tsc waits to allow the voltage to settle after
228c2ecf20Sopenharmony_ci                    turning on the drivers in detection mode.
238c2ecf20Sopenharmony_ci                    Valid values: 0-11
248c2ecf20Sopenharmony_ci                    0 =  0.008 ms
258c2ecf20Sopenharmony_ci                    1 =  0.01 ms
268c2ecf20Sopenharmony_ci                    2 =  0.02 ms
278c2ecf20Sopenharmony_ci                    3 =  0.04 ms
288c2ecf20Sopenharmony_ci                    4 =  0.08 ms
298c2ecf20Sopenharmony_ci                    5 =  0.16 ms
308c2ecf20Sopenharmony_ci                    6 =  0.32 ms
318c2ecf20Sopenharmony_ci                    7 =  0.64 ms
328c2ecf20Sopenharmony_ci                    8 =  1.28 ms
338c2ecf20Sopenharmony_ci                    9 =  2.56 ms
348c2ecf20Sopenharmony_ci                   10 =  5.12 ms
358c2ecf20Sopenharmony_ci                   11 = 10.24 ms
368c2ecf20Sopenharmony_ci- touch_timeout: The continuous number of scan periods in which touch is
378c2ecf20Sopenharmony_ci                not detected before the controller returns to idle state.
388c2ecf20Sopenharmony_ci                Valid values 0-255.
398c2ecf20Sopenharmony_ci- average_data: Number of data samples which are averaged before a final
408c2ecf20Sopenharmony_ci                data point is placed into the FIFO
418c2ecf20Sopenharmony_ci                Valid values 0-7
428c2ecf20Sopenharmony_ci                0 =   1 sample
438c2ecf20Sopenharmony_ci                1 =   2 samples
448c2ecf20Sopenharmony_ci                2 =   4 samples
458c2ecf20Sopenharmony_ci                3 =   8 samples
468c2ecf20Sopenharmony_ci                4 =  16 samples
478c2ecf20Sopenharmony_ci                5 =  32 samples
488c2ecf20Sopenharmony_ci                6 =  64 samples
498c2ecf20Sopenharmony_ci                7 = 128 samples
508c2ecf20Sopenharmony_ci- fifo_threshold: Interrupt is generated whenever the number of fifo
518c2ecf20Sopenharmony_ci                entries exceeds this value
528c2ecf20Sopenharmony_ci                Valid values 0-31
538c2ecf20Sopenharmony_ci- touchscreen-size-x: horizontal resolution of touchscreen (in pixels)
548c2ecf20Sopenharmony_ci- touchscreen-size-y: vertical resolution of touchscreen (in pixels)
558c2ecf20Sopenharmony_ci- touchscreen-fuzz-x: horizontal noise value of the absolute input
568c2ecf20Sopenharmony_ci                      device (in pixels)
578c2ecf20Sopenharmony_ci- touchscreen-fuzz-y: vertical noise value of the absolute input
588c2ecf20Sopenharmony_ci                      device (in pixels)
598c2ecf20Sopenharmony_ci- touchscreen-inverted-x: X axis is inverted (boolean)
608c2ecf20Sopenharmony_ci- touchscreen-inverted-y: Y axis is inverted (boolean)
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ciExample: An example of touchscreen node
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci	ts_adc_syscon: ts_adc_syscon@180a6000 {
658c2ecf20Sopenharmony_ci		compatible = "brcm,iproc-ts-adc-syscon","syscon";
668c2ecf20Sopenharmony_ci		reg = <0x180a6000 0xc30>;
678c2ecf20Sopenharmony_ci	};
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci	touchscreen: touchscreen@180a6000 {
708c2ecf20Sopenharmony_ci		compatible = "brcm,iproc-touchscreen";
718c2ecf20Sopenharmony_ci		#address-cells = <1>;
728c2ecf20Sopenharmony_ci		#size-cells = <1>;
738c2ecf20Sopenharmony_ci		ts_syscon = <&ts_adc_syscon>;
748c2ecf20Sopenharmony_ci		clocks = <&adc_clk>;
758c2ecf20Sopenharmony_ci		clock-names = "tsc_clk";
768c2ecf20Sopenharmony_ci		interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci		scanning_period = <5>;
798c2ecf20Sopenharmony_ci		debounce_timeout = <40>;
808c2ecf20Sopenharmony_ci		settling_timeout = <7>;
818c2ecf20Sopenharmony_ci		touch_timeout = <10>;
828c2ecf20Sopenharmony_ci		average_data = <5>;
838c2ecf20Sopenharmony_ci		fifo_threshold = <1>;
848c2ecf20Sopenharmony_ci		/* Touchscreen is rotated 180 degrees. */
858c2ecf20Sopenharmony_ci		touchscreen-inverted-x;
868c2ecf20Sopenharmony_ci		touchscreen-inverted-y;
878c2ecf20Sopenharmony_ci	};
88