summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml
blob: a5cf040ab4ea4fc5e23bbc73ce99d9607ab4744a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/atmel,lcdc-display.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip's LCDC Display

maintainers:
  - Nicolas Ferre <nicolas.ferre@microchip.com>
  - Dharma Balasubiramani <dharma.b@microchip.com>

description:
  The LCD Controller (LCDC) consists of logic for transferring LCD image data
  from an external display buffer to a TFT LCD panel. The LCDC has one display
  input buffer per layer that fetches pixels through the single bus host
  interface and a look-up table to allow palletized display configurations. The
  LCDC is programmable on a per layer basis, and supports different LCD
  resolutions, window sizes, image formats and pixel depths.

# We need a select here since this schema is applicable only for nodes with the
# following properties

select:
  anyOf:
    - required: [ 'atmel,dmacon' ]
    - required: [ 'atmel,lcdcon2' ]
    - required: [ 'atmel,guard-time' ]

properties:
  atmel,dmacon:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: dma controller configuration

  atmel,lcdcon2:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: lcd controller configuration

  atmel,guard-time:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: lcd guard time (Delay in frame periods)
    maximum: 127

  bits-per-pixel:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: lcd panel bit-depth.
    enum: [1, 2, 4, 8, 16, 24, 32]

  atmel,lcdcon-backlight:
    $ref: /schemas/types.yaml#/definitions/flag
    description: enable backlight

  atmel,lcdcon-backlight-inverted:
    $ref: /schemas/types.yaml#/definitions/flag
    description: invert backlight PWM polarity

  atmel,lcd-wiring-mode:
    $ref: /schemas/types.yaml#/definitions/string
    description: lcd wiring mode "RGB" or "BRG"
    enum:
      - RGB
      - BRG

  atmel,power-control-gpio:
    description: gpio to power on or off the LCD (as many as needed)
    maxItems: 1

  display-timings:
    $ref: panel/display-timings.yaml#

required:
  - atmel,dmacon
  - atmel,lcdcon2
  - atmel,guard-time
  - bits-per-pixel

additionalProperties: false

examples:
  - |
    display: panel {
      bits-per-pixel = <32>;
      atmel,lcdcon-backlight;
      atmel,dmacon = <0x1>;
      atmel,lcdcon2 = <0x80008002>;
      atmel,guard-time = <9>;
      atmel,lcd-wiring-mode = "RGB";

      display-timings {
        native-mode = <&timing0>;
        timing0: timing0 {
          clock-frequency = <9000000>;
          hactive = <480>;
          vactive = <272>;
          hback-porch = <1>;
          hfront-porch = <1>;
          vback-porch = <40>;
          vfront-porch = <1>;
          hsync-len = <45>;
          vsync-len = <1>;
        };
      };
    };