162306a36Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/input/touchscreen/zinitix,bt400.yaml#
562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
662306a36Sopenharmony_ci
762306a36Sopenharmony_cititle: Zinitix BT4xx and BT5xx series touchscreen controller
862306a36Sopenharmony_ci
962306a36Sopenharmony_cidescription: The Zinitix BT4xx and BT5xx series of touchscreen controllers
1062306a36Sopenharmony_ci  are Korea-produced touchscreens with embedded microcontrollers. The
1162306a36Sopenharmony_ci  BT4xx series was produced 2010-2013 and the BT5xx series 2013-2014.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_cimaintainers:
1462306a36Sopenharmony_ci  - Michael Srba <Michael.Srba@seznam.cz>
1562306a36Sopenharmony_ci  - Linus Walleij <linus.walleij@linaro.org>
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ciallOf:
1862306a36Sopenharmony_ci  - $ref: touchscreen.yaml#
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciproperties:
2162306a36Sopenharmony_ci  $nodename:
2262306a36Sopenharmony_ci    pattern: "^touchscreen(@.*)?$"
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci  compatible:
2562306a36Sopenharmony_ci    enum:
2662306a36Sopenharmony_ci      - zinitix,bt402
2762306a36Sopenharmony_ci      - zinitix,bt403
2862306a36Sopenharmony_ci      - zinitix,bt404
2962306a36Sopenharmony_ci      - zinitix,bt412
3062306a36Sopenharmony_ci      - zinitix,bt413
3162306a36Sopenharmony_ci      - zinitix,bt431
3262306a36Sopenharmony_ci      - zinitix,bt432
3362306a36Sopenharmony_ci      - zinitix,bt531
3462306a36Sopenharmony_ci      - zinitix,bt532
3562306a36Sopenharmony_ci      - zinitix,bt538
3662306a36Sopenharmony_ci      - zinitix,bt541
3762306a36Sopenharmony_ci      - zinitix,bt548
3862306a36Sopenharmony_ci      - zinitix,bt554
3962306a36Sopenharmony_ci      - zinitix,at100
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci  reg:
4262306a36Sopenharmony_ci    description: I2C address on the I2C bus
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci  clock-frequency:
4562306a36Sopenharmony_ci    description: I2C client clock frequency, defined for host when using
4662306a36Sopenharmony_ci      the device on the I2C bus
4762306a36Sopenharmony_ci    minimum: 0
4862306a36Sopenharmony_ci    maximum: 400000
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci  interrupts:
5162306a36Sopenharmony_ci    description: Interrupt to host
5262306a36Sopenharmony_ci    maxItems: 1
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci  vcca-supply:
5562306a36Sopenharmony_ci    description: Analog power supply regulator on the VCCA pin
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci  vdd-supply:
5862306a36Sopenharmony_ci    description: Digital power supply regulator on the VDD pin.
5962306a36Sopenharmony_ci      In older device trees this can be the accidental name for the analog
6062306a36Sopenharmony_ci      supply on the VCCA pin, and in that case the deprecated vddo-supply is
6162306a36Sopenharmony_ci      used for the digital power supply.
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci  vddo-supply:
6462306a36Sopenharmony_ci    description: Deprecated name for the digital power supply, use vdd-supply
6562306a36Sopenharmony_ci      as this reflects the real name of the pin. If this supply is present,
6662306a36Sopenharmony_ci      the vdd-supply represents VCCA instead of VDD. Implementers should first
6762306a36Sopenharmony_ci      check for this property, and if it is present assume that the vdd-supply
6862306a36Sopenharmony_ci      represents the analog supply.
6962306a36Sopenharmony_ci    deprecated: true
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci  reset-gpios:
7262306a36Sopenharmony_ci    description: Reset line for the touchscreen, should be tagged
7362306a36Sopenharmony_ci      as GPIO_ACTIVE_LOW
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci  zinitix,mode:
7662306a36Sopenharmony_ci    description: Mode of reporting touch points. Some modes may not work
7762306a36Sopenharmony_ci      with a particular ts firmware for unknown reasons. Available modes are
7862306a36Sopenharmony_ci      1 and 2. Mode 2 is the default and preferred.
7962306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
8062306a36Sopenharmony_ci    enum: [1, 2]
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci  touchscreen-size-x: true
8362306a36Sopenharmony_ci  touchscreen-size-y: true
8462306a36Sopenharmony_ci  touchscreen-fuzz-x: true
8562306a36Sopenharmony_ci  touchscreen-fuzz-y: true
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_ciadditionalProperties: false
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_cirequired:
9062306a36Sopenharmony_ci  - compatible
9162306a36Sopenharmony_ci  - reg
9262306a36Sopenharmony_ci  - interrupts
9362306a36Sopenharmony_ci  - touchscreen-size-x
9462306a36Sopenharmony_ci  - touchscreen-size-y
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ciexamples:
9762306a36Sopenharmony_ci  - |
9862306a36Sopenharmony_ci    #include <dt-bindings/interrupt-controller/irq.h>
9962306a36Sopenharmony_ci    #include <dt-bindings/gpio/gpio.h>
10062306a36Sopenharmony_ci    i2c {
10162306a36Sopenharmony_ci      #address-cells = <1>;
10262306a36Sopenharmony_ci      #size-cells = <0>;
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci      touchscreen@20 {
10562306a36Sopenharmony_ci        compatible = "zinitix,bt541";
10662306a36Sopenharmony_ci        reg = <0x20>;
10762306a36Sopenharmony_ci        interrupt-parent = <&gpio>;
10862306a36Sopenharmony_ci        interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
10962306a36Sopenharmony_ci        vcca-supply = <&reg_vcca_tsp>;
11062306a36Sopenharmony_ci        vdd-supply = <&reg_vdd_tsp>;
11162306a36Sopenharmony_ci        touchscreen-size-x = <540>;
11262306a36Sopenharmony_ci        touchscreen-size-y = <960>;
11362306a36Sopenharmony_ci        zinitix,mode = <2>;
11462306a36Sopenharmony_ci      };
11562306a36Sopenharmony_ci    };
116