summaryrefslogtreecommitdiff
path: root/src/mainboard/system76/kbl-u/devicetree.cb
blob: 38578e06be1b84f5d2ff30983e69b5dc3f7c3cdf (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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# SPDX-License-Identifier: GPL-2.0-only

chip soc/intel/skylake
	# Send an extra VR mailbox command for the PS4 exit issue
	register "SendVrMbxCmd" = "2"

	# Power limit
	register "power_limits_config" = "{
		.tdp_pl1_override = 20,
		.tdp_pl2_override = 30,
	}"

	# Enable Enhanced Intel SpeedStep
	register "eist_enable" = "1"

	# Serial I/O
	register "SerialIoDevMode" = "{
		[PchSerialIoIndexUart2] = PchSerialIoSkipInit, // LPSS UART
	}"

	# Serial IRQ
	register "serirq_mode" = "SERIRQ_CONTINUOUS"

	# Power
	register "PmConfigSlpS3MinAssert" = "2"		# 50ms
	register "PmConfigSlpS4MinAssert" = "1"		# 1s
	register "PmConfigSlpSusMinAssert" = "3"	# 500ms
	register "PmConfigSlpAMinAssert" = "3"		# 2s

	# FSP Configuration
	register "SkipExtGfxScan" = "1"
	register "SaGv" = "SaGv_Enabled"

	# VR Settings Configuration for 4 Domains
	#+----------------+-----------+-----------+-------------+----------+
	#| Domain/Setting |     SA    |    IA     | GT Unsliced |    GT    |
	#+----------------+-----------+-----------+-------------+----------+
	#| Psi1Threshold  | 20A       | 20A       | 20A         | 20A      |
	#| Psi2Threshold  | 4A        | 5A        | 5A          | 5A       |
	#| Psi3Threshold  | 1A        | 1A        | 1A          | 1A       |
	#| Psi3Enable     | 1         | 1         | 1           | 1        |
	#| Psi4Enable     | 1         | 1         | 1           | 1        |
	#| ImonSlope      | 0         | 0         | 0           | 0        |
	#| ImonOffset     | 0         | 0         | 0           | 0        |
	#| IccMax         | 5A        | 64A       | 31A         | 31A      |
	#| VrVoltageLimit | 1.52V     | 1.52V     | 1.52V       | 1.52V    |
	#+----------------+-----------+-----------+-------------+----------+
	register "domain_vr_config[VR_SYSTEM_AGENT]" = "{
		.vr_config_enable = 1,
		.psi1threshold = VR_CFG_AMP(20),
		.psi2threshold = VR_CFG_AMP(4),
		.psi3threshold = VR_CFG_AMP(1),
		.psi3enable = 0,
		.psi4enable = 0,
		.imon_slope = 0x0,
		.imon_offset = 0x0,
		.icc_max = VR_CFG_AMP(5),
		.voltage_limit = 1520,
		.ac_loadline = 1030,
		.dc_loadline = 1030,
	}"

	register "domain_vr_config[VR_IA_CORE]" = "{
		.vr_config_enable = 1,
		.psi1threshold = VR_CFG_AMP(20),
		.psi2threshold = VR_CFG_AMP(5),
		.psi3threshold = VR_CFG_AMP(1),
		.psi3enable = 0,
		.psi4enable = 0,
		.imon_slope = 0x0,
		.imon_offset = 0x0,
		.icc_max = VR_CFG_AMP(64),
		.voltage_limit = 1520,
		.ac_loadline = 240,
		.dc_loadline = 240,
	}"

	register "domain_vr_config[VR_GT_UNSLICED]" = "{
		.vr_config_enable = 1,
		.psi1threshold = VR_CFG_AMP(20),
		.psi2threshold = VR_CFG_AMP(5),
		.psi3threshold = VR_CFG_AMP(1),
		.psi3enable = 0,
		.psi4enable = 0,
		.imon_slope = 0x0,
		.imon_offset = 0x0,
		.icc_max = VR_CFG_AMP(31),
		.voltage_limit = 1520,
		.ac_loadline = 310,
		.dc_loadline = 310,
	}"

	register "domain_vr_config[VR_GT_SLICED]" = "{
		.vr_config_enable = 1,
		.psi1threshold = VR_CFG_AMP(20),
		.psi2threshold = VR_CFG_AMP(5),
		.psi3threshold = VR_CFG_AMP(1),
		.psi3enable = 0,
		.psi4enable = 0,
		.imon_slope = 0x0,
		.imon_offset = 0x0,
		.icc_max = VR_CFG_AMP(31),
		.voltage_limit = 1520,
		.ac_loadline = 310,
		.dc_loadline = 310,
	}"

	device domain 0 on
		device ref system_agent on end
		device ref igpu on end
		device ref sa_thermal on end
		device ref south_xhci on
			register "usb2_ports" = "{
				[0] = USB2_PORT_MID(OC_SKIP),		/* Type-A port right */
				[1] = USB2_PORT_FLEX(OC_SKIP),		/* 3G / LTE */
				[2] = USB2_PORT_TYPE_C(OC_SKIP),	/* Type-C port right */
				[3] = USB2_PORT_FLEX(OC_SKIP),		/* Camera */
				[4] = USB2_PORT_FLEX(OC_SKIP),		/* Bluetooth */
				[6] = USB2_PORT_FLEX(OC_SKIP),		/* Type-A port left */
				[7] = USB2_PORT_TYPE_C(OC_SKIP),	/* Type-C port right */
			}"
			register "usb3_ports" = "{
				[0] = USB3_PORT_DEFAULT(OC_SKIP),	/* Type-A port right */
				[1] = USB3_PORT_DEFAULT(OC_SKIP),	/* 4G */
				[2] = USB3_PORT_DEFAULT(OC_SKIP),	/* Type C port right */
				[3] = USB3_PORT_DEFAULT(OC_SKIP),	/* Type-A port left */
			}"
		end
		device ref thermal on end
		device ref sata on
			register "SataSpeedLimit" = "2"
			register "SataPortsEnable" = "{
				[0] = 1,
				[2] = 1,
			}"
		end
		device ref pcie_rp1 on
			# Root port #1 x4 (TBT)
			register "PcieRpEnable[0]" = "1"
			register "PcieRpClkReqSupport[0]" = "1"
			register "PcieRpClkReqNumber[0]" = "4"
			register "PcieRpClkSrcNumber[0]" = "4"
			register "PcieRpAdvancedErrorReporting[0]" = "1"
			register "PcieRpLtrEnable[0]" = "1"
			register "PcieRpHotPlug[0]" = "1"
		end
		device ref pcie_rp5 on
			# Root port #5 x1 (LAN)
			register "PcieRpEnable[4]" = "1"
			register "PcieRpClkReqSupport[4]" = "1"
			register "PcieRpClkReqNumber[4]" = "3"
			register "PcieRpClkSrcNumber[4]" = "3"
			register "PcieRpAdvancedErrorReporting[4]" = "1"
			register "PcieRpLtrEnable[4]" = "1"
		end
		device ref pcie_rp6 on
			# Root port #6 x1 (WLAN)
			register "PcieRpEnable[5]" = "1"
			register "PcieRpClkReqSupport[5]" = "1"
			register "PcieRpClkReqNumber[5]" = "2"
			register "PcieRpClkSrcNumber[5]" = "2"
			register "PcieRpAdvancedErrorReporting[5]" = "1"
			register "PcieRpLtrEnable[5]" = "1"
		end
		device ref pcie_rp9 on
			# Root port #9 x4 (NVMe)
			register "PcieRpEnable[8]" = "1"
			register "PcieRpClkReqSupport[8]" = "1"
			register "PcieRpClkReqNumber[8]" = "5"
			register "PcieRpClkSrcNumber[8]" = "5"
			register "PcieRpAdvancedErrorReporting[8]" = "1"
			register "PcieRpLtrEnable[8]" = "1"
		end
		device ref lpc_espi on
			register "gen1_dec" = "0x000c0681"
			register "gen2_dec" = "0x000c1641"
			register "gen3_dec" = "0x00040069"
			chip drivers/pc80/tpm
				device pnp 0c31.0 on end
			end
		end
		device ref p2sb off end
		device ref pmc on
			register "gpe0_dw0" = "GPP_C"
			register "gpe0_dw1" = "GPP_D"
			register "gpe0_dw2" = "GPP_E"
		end
		device ref hda on end
		device ref smbus on end
		device ref fast_spi on end
	end
end