summaryrefslogtreecommitdiff
path: root/src/mainboard/google/guybrush/variants/dewatt/overridetree.cb
blob: f6177006afc38c0edc0334486fc9477209e9f3e0 (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
193
194
195
196
197
198
199
# SPDX-License-Identifier: GPL-2.0-or-later

chip soc/amd/cezanne
	device domain 0 on
		device ref gpp_bridge_1 off end # no SD
		device ref gpp_bridge_2 off end # no WWAN
		device ref gpp_bridge_a on  # Internal GPP Bridge 0 to Bus A
			device ref acp on
				chip drivers/amd/i2s_machine_dev
					register "hid" = ""AMDI5619""
					device generic 0.0 hidden end
				end
			end # Audio
		end
	end # domain

	register "slow_ppt_limit_mW"         = "25000"
	register "fast_ppt_limit_mW"         = "30000"
	register "slow_ppt_time_constant_s"  = "5"
	register "stapm_time_constant_s"     = "275"
	register "sustained_power_limit_mW"  = "15000"
	register "thermctl_limit_degreeC"    = "100"

	#Update values based on final stardust SDLE test report.
	register "telemetry_vddcrvddfull_scale_current_mA" = "91573" #mA
	register "telemetry_vddcrvddoffset" =  "620"
	register "telemetry_vddcrsocfull_scale_current_mA" = "30829" #mA
	register "telemetry_vddcrsocoffset" =  "235"

	# Enable STT support
	register "stt_control" = "1"
	register "stt_pcb_sensor_count" = "2"
	register "stt_min_limit" = "15000"
	register "stt_m1" = "0x022B"
	register "stt_m2" = "0x117"
	register "stt_m3" = "0"
	register "stt_m4" = "0"
	register "stt_m5" = "0"
	register "stt_m6" = "0"
	register "stt_c_apu" = "0xBA4"
	register "stt_c_gpu" = "0"
	register "stt_c_hs2" = "0"
	register "stt_alpha_apu" = "0x199A"
	register "stt_alpha_gpu" = "0"
	register "stt_alpha_hs2" = "0"
	register "stt_skin_temp_apu" = "0x2D00"
	register "stt_skin_temp_gpu" = "0"
	register "stt_skin_temp_hs2" = "0"
	register "stt_error_coeff" = "0x21"
	register "stt_error_rate_coefficient" = "0x2666"

	#USB 2/3 phy config
	register "usb_phy" = "{
		/* Left USB C0 Port */
		.Usb2PhyPort[0] = {
			.compdstune = 3,
			.sqrxtune = 3,
			.txfslstune = 3,
			.txpreempamptune = 3,
			.txpreemppulsetune = 0,
			.txrisetune = 1,
			.txvreftune = 6,
			.txhsxvtune = 3,
			.txrestune = 1,
		},
		/* Left USB A0 Port */
		.Usb2PhyPort[1] = {
			.compdstune = 3,
			.sqrxtune = 3,
			.txfslstune = 3,
			.txpreempamptune = 3,
			.txpreemppulsetune = 0,
			.txrisetune = 1,
			.txvreftune = 6,
			.txhsxvtune = 3,
			.txrestune = 1,
		},
		/* Right USB C1 Port */
		.Usb2PhyPort[4] = {
			.compdstune = 3,
			.sqrxtune = 3,
			.txfslstune = 3,
			.txpreempamptune = 3,
			.txpreemppulsetune = 0,
			.txrisetune = 1,
			.txvreftune = 6,
			.txhsxvtune = 3,
			.txrestune = 1,
		},
		/* Left USB C0 Port */
		.Usb3PhyPort[0] = {
			.tx_term_ctrl=3,
			.rx_term_ctrl=3,
			.tx_vboost_lvl_en=1,
			.tx_vboost_lvl=5,
		},
		/* Left USB A0 Port */
		.Usb3PhyPort[1] = {
			.tx_term_ctrl=3,
			.rx_term_ctrl=3,
			.tx_vboost_lvl_en=1,
			.tx_vboost_lvl=5,
		},
	}"

        # general purpose PCIe clock output configuration
        register "gpp_clk_config[1]" = "GPP_CLK_OFF"
        register "gpp_clk_config[2]" = "GPP_CLK_OFF"

	# I2C Config
	#+-------------------+---------------------------+
	#| Field             |  Value                    |
	#+-------------------+---------------------------+
	#| I2C0              | Trackpad                  |
	#| I2C1              | Touchscreen               |
	#| I2C2              | Speaker, Codec, P-SAR     |
	#| I2C3              | H1/D2 TPM                 |
	#+-------------------+---------------------------+
	register "i2c[0]" = "{
		.speed = I2C_SPEED_FAST,
	}"

	register "i2c[1]" = "{
		.speed = I2C_SPEED_FAST,
	}"

	register "i2c[2]" = "{
		.speed = I2C_SPEED_FAST,
	}"

	register "i2c[3]" = "{
		.speed = I2C_SPEED_FAST,
		.early_init = true,
	}"

	device ref i2c_0 on
		chip drivers/i2c/generic
			register "hid" = ""ELAN0000""
			register "desc" = ""ELAN Touchpad""
			register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_9)"
			register "wake" = "GEVENT_22"
			register "detect" = "1"
			device i2c 15 on end
		end
		chip drivers/i2c/hid
			register "generic.hid" = ""SYNA0000""
			register "generic.cid" = ""ACPI0C50""
			register "generic.desc" = ""Synaptics Touchpad""
			register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_9)"
			register "generic.wake" = "GEVENT_22"
			register "generic.detect" = "1"
			register "hid_desc_reg_offset" = "0x20"
			device i2c 2c on end
		end
	end # I2C0
	device ref i2c_1 on
		chip drivers/i2c/hid
			register "generic.hid" = ""ELAN6918""
			register "generic.desc" = ""ELAN Touchscreen""
			register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_89)"
			register "generic.detect" = "1"
			register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPIO_121)"
			register "generic.reset_delay_ms" = "20"
			register "generic.reset_off_delay_ms" = "2"
			register "generic.stop_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPIO_120)"
			register "generic.stop_off_delay_ms" = "2"
			register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_68)"
			register "generic.enable_delay_ms" = "1"
			register "generic.has_power_resource" = "1"
			register "hid_desc_reg_offset" = "0x01"
			device i2c 10 on end
		end
	end # I2C1
	device ref i2c_2 on
		chip drivers/i2c/generic
			register "hid" = ""RTL5682""
			register "name" = ""RT58""
			register "desc" = ""Realtek RT5682""
			register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPIO_90)"
			register "property_count" = "1"
			register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER"
			register "property_list[0].name" = ""realtek,jd-src""
			register "property_list[0].integer" = "1"
			device i2c 1a on end
		end
		chip drivers/i2c/generic
			register "hid" = ""10EC1019""
			register "desc" = ""Realtek SPK AMP R""
			register "uid" = "0"
			device i2c 29 on end
		end
		chip drivers/i2c/generic
			register "hid" = ""10EC1019""
			register "desc" = ""Realtek SPK AMP L""
			register "uid" = "1"
			device i2c 2a on end
		end
	end # I2C2
end	# chip soc/amd/cezanne