summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/nyan_big/devicetree.cb
blob: 161b01687402cbe7799eb2180209a2599f1d5117 (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
##
##
##
## SPDX-License-Identifier: GPL-2.0-only

chip soc/nvidia/tegra124
	device cpu_cluster 0 on end
# N.B. We are not using the device tree in an effective way.
# We need to change this in future such that the on-SoC
# devices are 'chips', which will allow us to go at them
# in parallel. This is even easier on the ARM SoCs since there
# are no single-access resources such as the infamous
# 0xcf8/0xcfc registers found on PCs.
	register "display_controller" = "TEGRA_ARM_DISPLAYA"
	register "xres" = "1366"
	register "yres" = "768"

	# bits per pixel and color depth
	register "framebuffer_bits_per_pixel" = "16"
	register "color_depth" = "6"
	# "6" is defined as COLOR_DEPTH_B5G6R5 in dc_reg.h

	register "panel_bits_per_pixel" = "18"

	# With some help from the mainbaord designer
	register "backlight_en_gpio" = "GPIO(H2)"
	register "lvds_shutdown_gpio" = "0"
	register "backlight_vdd_gpio" = "GPIO(P2)"
	register "panel_vdd_gpio" = "0"
	register "pwm" = "1"

	# Various panel delay times
	register "vdd_delay_ms" = "200"
	register "pwm_to_bl_delay_ms" = "10"
	register "vdd_to_hpd_delay_ms" = "200"
	register "hpd_unplug_min_us" = "2000"
	register "hpd_plug_min_us" = "250"
	register "hpd_irq_min_us" = "250"

# How to compute these: xrandr --verbose will give you this:
#Detailed mode: Clock 285.250 MHz, 272 mm x 181 mm
#               2560 2608 2640 2720 hborder 0
#               1700 1703 1713 1749 vborder 0
#Then you can compute your values:
#H front porch = 2608 - 2560 = 48
#H sync = 2640 - 2608 = 32
#H back porch = 2720 - 2640 = 80
#V front porch = 1703 - 1700 = 3
#V sync = 1713 - 1703 = 10
#V back porch = 1749 - 1713 = 36
#href_to_sync and vref_to_sync are from the vendor
#this is just an example for a Pixel panel; other panels differ.
# Here is a peppy panel:
#  1366x768 (0x45)   76.4MHz -HSync -VSync *current +preferred
#        h: width  1366 start 1502 end 1532 total 1592
#        v: height  768 start  776 end  788 total  800
	register "href_to_sync" = "1"
	register "hfront_porch" = "136"
	register "hsync_width" = "30"
	register "hback_porch" = "60"

	register "vref_to_sync" = "1"
	register "vfront_porch" = "8"
	register "vsync_width" = "12"
	register "vback_porch" = "12"

	register "pixel_clock" = "76400000"

	# link configurations
	register "lane_count" = "1"
	register "enhanced_framing" = "1"
	register "link_bw" = "10"
	# "10" is defined as SOR_LINK_SPEED_G2_7 in sor.h

	register "drive_current" = "0x40404040"
	register "preemphasis" = "0x0f0f0f0f"
	register "postcursor" = "0"
end