1*c66ec88fSEmmanuel VadotDevice-Tree bindings for Samsung SoC display controller (FIMD)
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotFIMD (Fully Interactive Mobile Display) is the Display Controller for the
4*c66ec88fSEmmanuel VadotSamsung series of SoCs which transfers the image data from a video memory
5*c66ec88fSEmmanuel Vadotbuffer to an external LCD interface.
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel VadotRequired properties:
8*c66ec88fSEmmanuel Vadot- compatible: value should be one of the following
9*c66ec88fSEmmanuel Vadot		"samsung,s3c2443-fimd"; /* for S3C24XX SoCs */
10*c66ec88fSEmmanuel Vadot		"samsung,s3c6400-fimd"; /* for S3C64XX SoCs */
11*c66ec88fSEmmanuel Vadot		"samsung,s5pv210-fimd"; /* for S5PV210 SoC */
12*c66ec88fSEmmanuel Vadot		"samsung,exynos3250-fimd"; /* for Exynos3250/3472 SoCs */
13*c66ec88fSEmmanuel Vadot		"samsung,exynos4210-fimd"; /* for Exynos4 SoCs */
14*c66ec88fSEmmanuel Vadot		"samsung,exynos5250-fimd"; /* for Exynos5250 SoCs */
15*c66ec88fSEmmanuel Vadot		"samsung,exynos5420-fimd"; /* for Exynos5420/5422/5800 SoCs */
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel Vadot- reg: physical base address and length of the FIMD registers set.
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel Vadot- interrupts: should contain a list of all FIMD IP block interrupts in the
20*c66ec88fSEmmanuel Vadot		 order: FIFO Level, VSYNC, LCD_SYSTEM. The interrupt specifier
21*c66ec88fSEmmanuel Vadot		 format depends on the interrupt controller used.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel Vadot- interrupt-names: should contain the interrupt names: "fifo", "vsync",
24*c66ec88fSEmmanuel Vadot	"lcd_sys", in the same order as they were listed in the interrupts
25*c66ec88fSEmmanuel Vadot        property.
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel Vadot- pinctrl-0: pin control group to be used for this controller.
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel Vadot- pinctrl-names: must contain a "default" entry.
30*c66ec88fSEmmanuel Vadot
31*c66ec88fSEmmanuel Vadot- clocks: must include clock specifiers corresponding to entries in the
32*c66ec88fSEmmanuel Vadot         clock-names property.
33*c66ec88fSEmmanuel Vadot
34*c66ec88fSEmmanuel Vadot- clock-names: list of clock names sorted in the same order as the clocks
35*c66ec88fSEmmanuel Vadot               property. Must contain "sclk_fimd" and "fimd".
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel VadotOptional Properties:
38*c66ec88fSEmmanuel Vadot- power-domains: a phandle to FIMD power domain node.
39*c66ec88fSEmmanuel Vadot- samsung,invert-vden: video enable signal is inverted
40*c66ec88fSEmmanuel Vadot- samsung,invert-vclk: video clock signal is inverted
41*c66ec88fSEmmanuel Vadot- display-timings: timing settings for FIMD, as described in document [1].
42*c66ec88fSEmmanuel Vadot		Can be used in case timings cannot be provided otherwise
43*c66ec88fSEmmanuel Vadot		or to override timings provided by the panel.
44*c66ec88fSEmmanuel Vadot- samsung,sysreg: handle to syscon used to control the system registers
45*c66ec88fSEmmanuel Vadot- i80-if-timings: timing configuration for lcd i80 interface support.
46*c66ec88fSEmmanuel Vadot  - cs-setup: clock cycles for the active period of address signal is enabled
47*c66ec88fSEmmanuel Vadot              until chip select is enabled.
48*c66ec88fSEmmanuel Vadot              If not specified, the default value(0) will be used.
49*c66ec88fSEmmanuel Vadot  - wr-setup: clock cycles for the active period of CS signal is enabled until
50*c66ec88fSEmmanuel Vadot              write signal is enabled.
51*c66ec88fSEmmanuel Vadot              If not specified, the default value(0) will be used.
52*c66ec88fSEmmanuel Vadot  - wr-active: clock cycles for the active period of CS is enabled.
53*c66ec88fSEmmanuel Vadot               If not specified, the default value(1) will be used.
54*c66ec88fSEmmanuel Vadot  - wr-hold: clock cycles for the active period of CS is disabled until write
55*c66ec88fSEmmanuel Vadot             signal is disabled.
56*c66ec88fSEmmanuel Vadot             If not specified, the default value(0) will be used.
57*c66ec88fSEmmanuel Vadot
58*c66ec88fSEmmanuel Vadot  The parameters are defined as:
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadot    VCLK(internal)  __|??????|_____|??????|_____|??????|_____|??????|_____|??
61*c66ec88fSEmmanuel Vadot                      :            :            :            :            :
62*c66ec88fSEmmanuel Vadot    Address Output  --:<XXXXXXXXXXX:XXXXXXXXXXXX:XXXXXXXXXXXX:XXXXXXXXXXXX:XX
63*c66ec88fSEmmanuel Vadot                      | cs-setup+1 |            :            :            :
64*c66ec88fSEmmanuel Vadot                      |<---------->|            :            :            :
65*c66ec88fSEmmanuel Vadot    Chip Select     ???????????????|____________:____________:____________|??
66*c66ec88fSEmmanuel Vadot                                   | wr-setup+1 |            | wr-hold+1  |
67*c66ec88fSEmmanuel Vadot                                   |<---------->|            |<---------->|
68*c66ec88fSEmmanuel Vadot    Write Enable    ????????????????????????????|____________|???????????????
69*c66ec88fSEmmanuel Vadot                                                | wr-active+1|
70*c66ec88fSEmmanuel Vadot                                                |<---------->|
71*c66ec88fSEmmanuel Vadot    Video Data      ----------------------------<XXXXXXXXXXXXXXXXXXXXXXXXX>--
72*c66ec88fSEmmanuel Vadot
73*c66ec88fSEmmanuel VadotThe device node can contain 'port' child nodes according to the bindings defined
74*c66ec88fSEmmanuel Vadotin [2]. The following are properties specific to those nodes:
75*c66ec88fSEmmanuel Vadot- reg: (required) port index, can be:
76*c66ec88fSEmmanuel Vadot		0 - for CAMIF0 input,
77*c66ec88fSEmmanuel Vadot		1 - for CAMIF1 input,
78*c66ec88fSEmmanuel Vadot		2 - for CAMIF2 input,
79*c66ec88fSEmmanuel Vadot		3 - for parallel output,
80*c66ec88fSEmmanuel Vadot		4 - for write-back interface
81*c66ec88fSEmmanuel Vadot
82*c66ec88fSEmmanuel Vadot[1]: Documentation/devicetree/bindings/display/panel/display-timing.txt
83*c66ec88fSEmmanuel Vadot[2]: Documentation/devicetree/bindings/media/video-interfaces.txt
84*c66ec88fSEmmanuel Vadot
85*c66ec88fSEmmanuel VadotExample:
86*c66ec88fSEmmanuel Vadot
87*c66ec88fSEmmanuel VadotSoC specific DT entry:
88*c66ec88fSEmmanuel Vadot
89*c66ec88fSEmmanuel Vadot	fimd@11c00000 {
90*c66ec88fSEmmanuel Vadot		compatible = "samsung,exynos4210-fimd";
91*c66ec88fSEmmanuel Vadot		interrupt-parent = <&combiner>;
92*c66ec88fSEmmanuel Vadot		reg = <0x11c00000 0x20000>;
93*c66ec88fSEmmanuel Vadot		interrupt-names = "fifo", "vsync", "lcd_sys";
94*c66ec88fSEmmanuel Vadot		interrupts = <11 0>, <11 1>, <11 2>;
95*c66ec88fSEmmanuel Vadot		clocks = <&clock 140>, <&clock 283>;
96*c66ec88fSEmmanuel Vadot		clock-names = "sclk_fimd", "fimd";
97*c66ec88fSEmmanuel Vadot		power-domains = <&pd_lcd0>;
98*c66ec88fSEmmanuel Vadot		status = "disabled";
99*c66ec88fSEmmanuel Vadot	};
100*c66ec88fSEmmanuel Vadot
101*c66ec88fSEmmanuel VadotBoard specific DT entry:
102*c66ec88fSEmmanuel Vadot
103*c66ec88fSEmmanuel Vadot	fimd@11c00000 {
104*c66ec88fSEmmanuel Vadot		pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>;
105*c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
106*c66ec88fSEmmanuel Vadot		status = "okay";
107*c66ec88fSEmmanuel Vadot	};
108