xref: /openbmc/linux/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
1efdbd734SRob HerringDevice-Tree bindings for tilcdc DRM driver
2efdbd734SRob Herring
3efdbd734SRob HerringRequired properties:
4507b72b2SBartosz Golaszewski - compatible: value should be one of the following:
5507b72b2SBartosz Golaszewski    - "ti,am33xx-tilcdc" for AM335x based boards
6507b72b2SBartosz Golaszewski    - "ti,da850-tilcdc" for DA850/AM18x/OMAP-L138 based boards
7efdbd734SRob Herring - interrupts: the interrupt number
8efdbd734SRob Herring - reg: base address and size of the LCDC device
9efdbd734SRob Herring
10efdbd734SRob HerringRecommended properties:
11efdbd734SRob Herring - ti,hwmods: Name of the hwmod associated to the LCDC
12efdbd734SRob Herring
13efdbd734SRob HerringOptional properties:
14efdbd734SRob Herring - max-bandwidth: The maximum pixels per second that the memory
15efdbd734SRob Herring   interface / lcd controller combination can sustain
16efdbd734SRob Herring - max-width: The maximum horizontal pixel width supported by
17efdbd734SRob Herring   the lcd controller.
18efdbd734SRob Herring - max-pixelclock: The maximum pixel clock that can be supported
19efdbd734SRob Herring   by the lcd controller in KHz.
2034355ee0SJyri Sarha - blue-and-red-wiring: Recognized values "straight" or "crossed".
2134355ee0SJyri Sarha   This property deals with the LCDC revision 2 (found on AM335x)
2234355ee0SJyri Sarha   color errata [1].
23bcc5a6f5SJyri Sarha    - "straight" indicates normal wiring that supports RGB565,
24bcc5a6f5SJyri Sarha      BGR888, and XBGR8888 color formats.
25bcc5a6f5SJyri Sarha    - "crossed" indicates wiring that has blue and red wires
26bcc5a6f5SJyri Sarha      crossed. This setup supports BGR565, RGB888 and XRGB8888
27bcc5a6f5SJyri Sarha      formats.
28bcc5a6f5SJyri Sarha    - If the property is not present or its value is not recognized
29bcc5a6f5SJyri Sarha      the legacy mode is assumed. This configuration supports RGB565,
30bcc5a6f5SJyri Sarha      RGB888 and XRGB8888 formats. However, depending on wiring, the red
31bcc5a6f5SJyri Sarha      and blue colors are swapped in either 16 or 24-bit color modes.
32efdbd734SRob Herring
33efdbd734SRob HerringOptional nodes:
34efdbd734SRob Herring
35efdbd734SRob Herring - port/ports: to describe a connection to an external encoder. The
36efdbd734SRob Herring   binding follows Documentation/devicetree/bindings/graph.txt and
37cc55378cSEnric Balletbo i Serra   supports a single port with a single endpoint.
38efdbd734SRob Herring
3924b31ba0SJyri Sarha - See also Documentation/devicetree/bindings/display/tilcdc/panel.txt and
40480017f0SMauro Carvalho Chehab   Documentation/devicetree/bindings/display/bridge/ti,tfp410.yaml for connecting
4124b31ba0SJyri Sarha   tfp410 DVI encoder or lcd panel to lcdc
4224b31ba0SJyri Sarha
43bcc5a6f5SJyri Sarha[1] There is an errata about AM335x color wiring. For 16-bit color mode
44bcc5a6f5SJyri Sarha    the wires work as they should (LCD_DATA[0:4] is for Blue[3:7]),
45bcc5a6f5SJyri Sarha    but for 24 bit color modes the wiring of blue and red components is
46bcc5a6f5SJyri Sarha    crossed and LCD_DATA[0:4] is for Red[3:7] and LCD_DATA[11:15] is
47bcc5a6f5SJyri Sarha    for Blue[3-7]. For more details see section 3.1.1 in AM335x
48bcc5a6f5SJyri Sarha    Silicon Errata:
49a36c6691SAlexander A. Klimov    https://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360
50bcc5a6f5SJyri Sarha
51efdbd734SRob HerringExample:
52efdbd734SRob Herring
53efdbd734SRob Herring	fb: fb@4830e000 {
54507b72b2SBartosz Golaszewski		compatible = "ti,am33xx-tilcdc", "ti,da850-tilcdc";
55efdbd734SRob Herring		reg = <0x4830e000 0x1000>;
56efdbd734SRob Herring		interrupt-parent = <&intc>;
57efdbd734SRob Herring		interrupts = <36>;
58efdbd734SRob Herring		ti,hwmods = "lcdc";
59efdbd734SRob Herring
60bcc5a6f5SJyri Sarha		blue-and-red-wiring = "crossed";
61bcc5a6f5SJyri Sarha
62efdbd734SRob Herring		port {
63*e2266d37SGeert Uytterhoeven			lcdc_0: endpoint {
64efdbd734SRob Herring				remote-endpoint = <&hdmi_0>;
65efdbd734SRob Herring			};
66efdbd734SRob Herring		};
67efdbd734SRob Herring	};
68efdbd734SRob Herring
69efdbd734SRob Herring	tda19988: tda19988 {
70efdbd734SRob Herring		compatible = "nxp,tda998x";
71efdbd734SRob Herring		reg = <0x70>;
72efdbd734SRob Herring
73efdbd734SRob Herring		pinctrl-names = "default", "off";
74efdbd734SRob Herring		pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
75efdbd734SRob Herring		pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
76efdbd734SRob Herring
77efdbd734SRob Herring		port {
78*e2266d37SGeert Uytterhoeven			hdmi_0: endpoint {
79efdbd734SRob Herring				remote-endpoint = <&lcdc_0>;
80efdbd734SRob Herring			};
81efdbd734SRob Herring		};
82efdbd734SRob Herring	};
83