Wisley Chen | 4d58083 | 2020-06-09 19:44:27 +0800 | [diff] [blame] | 1 | chip soc/intel/jasperlake |
| 2 | |
Wisley Chen | 8b85e81 | 2020-06-30 22:13:06 +0800 | [diff] [blame] | 3 | # USB Port Configuration |
| 4 | register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # Camera |
| 5 | |
Wisley Chen | 4d58083 | 2020-06-09 19:44:27 +0800 | [diff] [blame] | 6 | # Intel Common SoC Config |
| 7 | #+-------------------+---------------------------+ |
| 8 | #| Field | Value | |
| 9 | #+-------------------+---------------------------+ |
| 10 | #| GSPI0 | cr50 TPM. Early init is | |
| 11 | #| | required to set up a BAR | |
| 12 | #| | for TPM communication | |
| 13 | #| | before memory is up | |
| 14 | #| I2C0 | Trackpad | |
| 15 | #| I2C1 | Digitizer | |
| 16 | #| I2C2 | Touchscreen | |
| 17 | #| I2C3 | Camera | |
| 18 | #| I2C4 | Audio | |
| 19 | #+-------------------+---------------------------+ |
| 20 | register "common_soc_config" = "{ |
| 21 | .gspi[0] = { |
| 22 | .speed_mhz = 1, |
| 23 | .early_init = 1, |
| 24 | }, |
| 25 | .i2c[0] = { |
| 26 | .speed = I2C_SPEED_FAST, |
Karthikeyan Ramasubramanian | 4d761db | 2020-09-03 12:02:27 -0600 | [diff] [blame] | 27 | .speed_config[0] = { |
| 28 | .speed = I2C_SPEED_FAST, |
| 29 | .scl_lcnt = 190, |
| 30 | .scl_hcnt = 100, |
| 31 | .sda_hold = 40, |
| 32 | } |
Wisley Chen | 4d58083 | 2020-06-09 19:44:27 +0800 | [diff] [blame] | 33 | }, |
| 34 | .i2c[1] = { |
| 35 | .speed = I2C_SPEED_FAST, |
| 36 | }, |
| 37 | .i2c[2] = { |
| 38 | .speed = I2C_SPEED_FAST, |
Karthikeyan Ramasubramanian | 4d761db | 2020-09-03 12:02:27 -0600 | [diff] [blame] | 39 | .speed_config[0] = { |
| 40 | .speed = I2C_SPEED_FAST, |
| 41 | .scl_lcnt = 190, |
| 42 | .scl_hcnt = 100, |
| 43 | .sda_hold = 40, |
| 44 | } |
Wisley Chen | 4d58083 | 2020-06-09 19:44:27 +0800 | [diff] [blame] | 45 | }, |
| 46 | .i2c[3] = { |
| 47 | .speed = I2C_SPEED_FAST, |
| 48 | }, |
| 49 | .i2c[4] = { |
| 50 | .speed = I2C_SPEED_FAST, |
Karthikeyan Ramasubramanian | 4d761db | 2020-09-03 12:02:27 -0600 | [diff] [blame] | 51 | .speed_config[0] = { |
| 52 | .speed = I2C_SPEED_FAST, |
| 53 | .scl_lcnt = 190, |
| 54 | .scl_hcnt = 100, |
| 55 | .sda_hold = 40, |
| 56 | } |
Wisley Chen | 4d58083 | 2020-06-09 19:44:27 +0800 | [diff] [blame] | 57 | }, |
| 58 | }" |
| 59 | |
Sumeet R Pawnikar | 4dfdce4 | 2020-08-03 22:29:39 +0530 | [diff] [blame] | 60 | register "power_limits_config" = "{ |
| 61 | .tdp_pl1_override = 6, |
Sumeet R Pawnikar | 426e07a | 2020-09-08 11:30:46 +0530 | [diff] [blame] | 62 | .tdp_pl2_override = 20, |
Sumeet R Pawnikar | 4dfdce4 | 2020-08-03 22:29:39 +0530 | [diff] [blame] | 63 | }" |
| 64 | |
| 65 | register "tcc_offset" = "20" # TCC of 85C |
Meera Ravindranath | 2ac88f2 | 2020-11-26 13:08:51 +0530 | [diff] [blame^] | 66 | register "ImonOffset" = "1400" # Imon Offset = 1.4 |
| 67 | register "ImonSlope" = "100" # Imon Slope = 1.0 |
Sumeet R Pawnikar | 4dfdce4 | 2020-08-03 22:29:39 +0530 | [diff] [blame] | 68 | |
Wisley Chen | 4d58083 | 2020-06-09 19:44:27 +0800 | [diff] [blame] | 69 | device domain 0 on |
Wisley Chen | 488bbe2 | 2020-08-31 18:07:02 +0800 | [diff] [blame] | 70 | device pci 05.0 on # IPU - MIPI Camera |
| 71 | chip drivers/intel/mipi_camera |
| 72 | register "acpi_uid" = "0x50000" |
| 73 | register "acpi_name" = ""IPU0"" |
| 74 | register "device_type" = "INTEL_ACPI_CAMERA_CIO2" |
| 75 | |
| 76 | register "cio2_num_ports" = "2" |
| 77 | register "cio2_lanes_used" = "{1,4}" |
| 78 | register "cio2_lane_endpoint[1]" = ""^I2C3.CAM1"" |
| 79 | register "cio2_prt[0]" = "0" |
| 80 | register "cio2_prt[1]" = "2" |
| 81 | device generic 0 on end |
| 82 | end |
| 83 | end |
| 84 | |
Sumeet R Pawnikar | 4dfdce4 | 2020-08-03 22:29:39 +0530 | [diff] [blame] | 85 | device pci 04.0 on |
| 86 | chip drivers/intel/dptf |
Sumeet R Pawnikar | 1447c43 | 2020-10-01 20:02:52 +0530 | [diff] [blame] | 87 | # Default DPTF Policy for all drawcia boards if not overridden |
Sumeet R Pawnikar | 4dfdce4 | 2020-08-03 22:29:39 +0530 | [diff] [blame] | 88 | register "options.tsr[0].desc" = ""Memory"" |
| 89 | register "options.tsr[1].desc" = ""Ambient"" |
| 90 | register "options.tsr[2].desc" = ""Charger"" |
| 91 | register "options.tsr[3].desc" = ""5V regulator"" |
| 92 | |
Sumeet R Pawnikar | 1447c43 | 2020-10-01 20:02:52 +0530 | [diff] [blame] | 93 | ## Passive Policy |
| 94 | register "policies.passive" = "{ |
| 95 | [0] = DPTF_PASSIVE(CPU, CPU, 80, 1000), |
| 96 | [1] = DPTF_PASSIVE(CPU, TEMP_SENSOR_0, 70, 4000), |
| 97 | [2] = DPTF_PASSIVE(CPU, TEMP_SENSOR_1, 51, 1000), |
| 98 | [3] = DPTF_PASSIVE(CHARGER, TEMP_SENSOR_2, 75, 5000), |
| 99 | [4] = DPTF_PASSIVE(CPU, TEMP_SENSOR_3, 60, 1000) |
| 100 | }" |
Sumeet R Pawnikar | 4dfdce4 | 2020-08-03 22:29:39 +0530 | [diff] [blame] | 101 | |
Sumeet R Pawnikar | 1447c43 | 2020-10-01 20:02:52 +0530 | [diff] [blame] | 102 | ## Critical Policy |
| 103 | register "policies.critical" = "{ |
| 104 | [0] = DPTF_CRITICAL(CPU, 119, SHUTDOWN), |
| 105 | [1] = DPTF_CRITICAL(TEMP_SENSOR_0, 115, SHUTDOWN), |
| 106 | [2] = DPTF_CRITICAL(TEMP_SENSOR_1, 115, SHUTDOWN), |
| 107 | [3] = DPTF_CRITICAL(TEMP_SENSOR_2, 115, SHUTDOWN), |
| 108 | [4] = DPTF_CRITICAL(TEMP_SENSOR_3, 115, SHUTDOWN) |
| 109 | }" |
Sumeet R Pawnikar | 4dfdce4 | 2020-08-03 22:29:39 +0530 | [diff] [blame] | 110 | |
Sumeet R Pawnikar | 1447c43 | 2020-10-01 20:02:52 +0530 | [diff] [blame] | 111 | register "controls.power_limits" = "{ |
| 112 | .pl1 = { |
Sumeet R Pawnikar | 7ea4372 | 2020-10-16 20:56:53 +0530 | [diff] [blame] | 113 | .min_power = 3800, |
| 114 | .max_power = 5800, |
Sumeet R Pawnikar | 1447c43 | 2020-10-01 20:02:52 +0530 | [diff] [blame] | 115 | .time_window_min = 1 * MSECS_PER_SEC, |
| 116 | .time_window_max = 1 * MSECS_PER_SEC, |
| 117 | .granularity = 200, |
| 118 | }, |
| 119 | .pl2 = { |
Sumeet R Pawnikar | 207ffb0 | 2020-11-03 09:41:06 +0530 | [diff] [blame] | 120 | .min_power = 20000, |
Sumeet R Pawnikar | 1447c43 | 2020-10-01 20:02:52 +0530 | [diff] [blame] | 121 | .max_power = 20000, |
| 122 | .time_window_min = 1 * MSECS_PER_SEC, |
| 123 | .time_window_max = 1 * MSECS_PER_SEC, |
| 124 | .granularity = 1000, |
| 125 | } |
| 126 | }" |
Sumeet R Pawnikar | 4dfdce4 | 2020-08-03 22:29:39 +0530 | [diff] [blame] | 127 | |
Sumeet R Pawnikar | e0ca33c | 2020-08-18 17:30:44 +0530 | [diff] [blame] | 128 | ## Charger Performance Control (Control, mA) |
Sumeet R Pawnikar | 1447c43 | 2020-10-01 20:02:52 +0530 | [diff] [blame] | 129 | register "controls.charger_perf" = "{ |
| 130 | [0] = { 255, 3000 }, |
| 131 | [1] = { 24, 1500 }, |
| 132 | [2] = { 16, 1000 }, |
| 133 | [3] = { 8, 500 } |
| 134 | }" |
Sumeet R Pawnikar | e0ca33c | 2020-08-18 17:30:44 +0530 | [diff] [blame] | 135 | |
Sumeet R Pawnikar | 4dfdce4 | 2020-08-03 22:29:39 +0530 | [diff] [blame] | 136 | device generic 0 on end |
| 137 | end |
| 138 | end # SA Thermal device |
Wisley Chen | 8b85e81 | 2020-06-30 22:13:06 +0800 | [diff] [blame] | 139 | device pci 14.0 on |
| 140 | chip drivers/usb/acpi |
| 141 | device usb 0.0 on |
| 142 | chip drivers/usb/acpi |
| 143 | register "desc" = ""Camera"" |
| 144 | register "type" = "UPC_TYPE_INTERNAL" |
| 145 | device usb 2.5 on end |
| 146 | end |
| 147 | end |
| 148 | end |
| 149 | end # USB xHCI |
Wisley Chen | 4d58083 | 2020-06-09 19:44:27 +0800 | [diff] [blame] | 150 | device pci 15.0 on |
Wisley Chen | b8fbf3f | 2020-06-30 20:59:38 +0800 | [diff] [blame] | 151 | chip drivers/i2c/generic |
| 152 | register "hid" = ""ELAN0000"" |
| 153 | register "desc" = ""ELAN Touchpad"" |
| 154 | register "irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_B3_IRQ)" |
| 155 | register "wake" = "GPE0_DW0_03" |
| 156 | register "probed" = "1" |
| 157 | device i2c 15 on end |
Wisley Chen | 4d58083 | 2020-06-09 19:44:27 +0800 | [diff] [blame] | 158 | end |
Wisley Chen | b8fbf3f | 2020-06-30 20:59:38 +0800 | [diff] [blame] | 159 | end #I2C 0 |
Wisley Chen | 742bccf | 2020-06-30 21:27:58 +0800 | [diff] [blame] | 160 | device pci 15.2 on |
| 161 | chip drivers/i2c/generic |
| 162 | register "hid" = ""ELAN0001"" |
| 163 | register "desc" = ""ELAN Touchscreen"" |
| 164 | register "irq" = "ACPI_IRQ_EDGE_LOW(GPP_D4_IRQ)" |
| 165 | register "probed" = "1" |
| 166 | register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D5)" |
| 167 | register "reset_delay_ms" = "20" |
| 168 | register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)" |
| 169 | register "enable_delay_ms" = "1" |
| 170 | register "has_power_resource" = "1" |
| 171 | device i2c 10 on end |
| 172 | end |
Wisley Chen | 10be338 | 2020-07-17 20:34:36 +0800 | [diff] [blame] | 173 | chip drivers/i2c/hid |
| 174 | register "generic.hid" = ""GTCH7503"" |
| 175 | register "generic.desc" = ""G2TOUCH Touchscreen"" |
Karthikeyan Ramasubramanian | a879200 | 2020-11-10 12:29:37 -0700 | [diff] [blame] | 176 | register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D4_IRQ)" |
Wisley Chen | 10be338 | 2020-07-17 20:34:36 +0800 | [diff] [blame] | 177 | register "generic.probed" = "1" |
| 178 | register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D5)" |
| 179 | register "generic.reset_delay_ms" = "50" |
| 180 | register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)" |
| 181 | register "generic.enable_delay_ms" = "1" |
| 182 | register "generic.has_power_resource" = "1" |
| 183 | register "generic.disable_gpio_export_in_crs" = "1" |
| 184 | register "hid_desc_reg_offset" = "0x01" |
| 185 | device i2c 40 on end |
| 186 | end |
Wisley Chen | 73f8986 | 2020-08-20 20:15:43 +0800 | [diff] [blame] | 187 | chip drivers/i2c/hid |
| 188 | register "generic.hid" = ""GDIX0000"" |
| 189 | register "generic.desc" = ""Goodix Touchscreen"" |
Karthikeyan Ramasubramanian | a879200 | 2020-11-10 12:29:37 -0700 | [diff] [blame] | 190 | register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D4_IRQ)" |
Wisley Chen | 73f8986 | 2020-08-20 20:15:43 +0800 | [diff] [blame] | 191 | register "generic.probed" = "1" |
| 192 | register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D5)" |
| 193 | register "generic.reset_delay_ms" = "120" |
| 194 | register "generic.reset_off_delay_ms" = "2" |
| 195 | register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)" |
| 196 | register "generic.enable_delay_ms" = "12" |
| 197 | register "generic.has_power_resource" = "1" |
| 198 | register "hid_desc_reg_offset" = "0x01" |
| 199 | device i2c 0x5d on end |
| 200 | end |
Wisley Chen | 64c363b | 2020-08-21 19:07:49 +0800 | [diff] [blame] | 201 | chip drivers/i2c/hid |
| 202 | register "generic.hid" = ""ELAN2513"" |
| 203 | register "generic.desc" = ""ELAN Touchscreen"" |
Karthikeyan Ramasubramanian | a879200 | 2020-11-10 12:29:37 -0700 | [diff] [blame] | 204 | register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D4_IRQ)" |
Wisley Chen | 64c363b | 2020-08-21 19:07:49 +0800 | [diff] [blame] | 205 | register "generic.probed" = "1" |
| 206 | register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D5)" |
| 207 | register "generic.reset_delay_ms" = "20" |
| 208 | register "generic.reset_off_delay_ms" = "2" |
| 209 | register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)" |
| 210 | register "generic.enable_delay_ms" = "10" |
| 211 | register "generic.stop_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_A11)" |
| 212 | register "generic.stop_delay_ms" = "130" |
| 213 | register "generic.has_power_resource" = "1" |
| 214 | register "hid_desc_reg_offset" = "0x01" |
| 215 | device i2c 15 on end |
| 216 | end |
Wisley Chen | 742bccf | 2020-06-30 21:27:58 +0800 | [diff] [blame] | 217 | end # I2C 2 |
Wisley Chen | 488bbe2 | 2020-08-31 18:07:02 +0800 | [diff] [blame] | 218 | device pci 15.3 on |
| 219 | chip drivers/intel/mipi_camera |
| 220 | register "acpi_hid" = ""OVTI8856"" |
| 221 | register "acpi_uid" = "0" |
| 222 | register "acpi_name" = ""CAM1"" |
| 223 | register "chip_name" = ""Ov 8856 Camera"" |
| 224 | register "device_type" = "INTEL_ACPI_CAMERA_SENSOR" |
| 225 | |
| 226 | register "ssdb.lanes_used" = "4" |
| 227 | register "ssdb.link_used" = "1" |
| 228 | register "ssdb.vcm_type" = "0x0C" |
| 229 | register "vcm_name" = ""VCM0"" |
| 230 | register "num_freq_entries" = "2" |
| 231 | register "link_freq[0]" = "360000000" |
| 232 | register "link_freq[1]" = "180000000" |
| 233 | register "remote_name" = ""IPU0"" |
| 234 | |
| 235 | register "has_power_resource" = "1" |
| 236 | #Controls |
| 237 | register "clk_panel.clks[0].clknum" = "1" #IMGCLKOUT_1 |
| 238 | register "clk_panel.clks[0].freq" = "1" #19.2 Mhz |
| 239 | |
| 240 | register "gpio_panel.gpio[0].gpio_num" = "GPP_D13" #power_enable_2p8 |
| 241 | register "gpio_panel.gpio[1].gpio_num" = "GPP_D14" #power_enable_1p2 |
| 242 | register "gpio_panel.gpio[2].gpio_num" = "GPP_D12" #reset |
| 243 | |
| 244 | #_ON |
| 245 | register "on_seq.ops_cnt" = "5" |
| 246 | register "on_seq.ops[0]" = "SEQ_OPS_CLK_ENABLE(0, 0)" |
| 247 | register "on_seq.ops[1]" = "SEQ_OPS_GPIO_ENABLE(0, 5)" |
| 248 | register "on_seq.ops[2]" = "SEQ_OPS_GPIO_ENABLE(1, 5)" |
| 249 | register "on_seq.ops[3]" = "SEQ_OPS_GPIO_DISABLE(2, 5)" |
| 250 | register "on_seq.ops[4]" = "SEQ_OPS_GPIO_ENABLE(2, 5)" |
| 251 | |
| 252 | #_OFF |
| 253 | register "off_seq.ops_cnt" = "4" |
| 254 | register "off_seq.ops[0]" = "SEQ_OPS_CLK_DISABLE(0, 0)" |
| 255 | register "off_seq.ops[1]" = "SEQ_OPS_GPIO_DISABLE(2, 0)" |
| 256 | register "off_seq.ops[2]" = "SEQ_OPS_GPIO_DISABLE(1, 0)" |
| 257 | register "off_seq.ops[3]" = "SEQ_OPS_GPIO_DISABLE(0, 0)" |
| 258 | |
| 259 | device i2c 36 on end |
| 260 | end |
| 261 | chip drivers/intel/mipi_camera |
| 262 | register "acpi_hid" = "ACPI_DT_NAMESPACE_HID" |
| 263 | register "acpi_uid" = "3" |
| 264 | register "acpi_name" = ""VCM0"" |
| 265 | register "chip_name" = ""DW AF DAC"" |
| 266 | register "device_type" = "INTEL_ACPI_CAMERA_VCM" |
| 267 | |
| 268 | register "pr0" = ""\\_SB.PCI0.I2C3.CAM1.PRIC"" |
| 269 | register "vcm_compat" = ""dongwoon,dw9714"" |
| 270 | |
| 271 | device i2c 0C on end |
| 272 | end |
| 273 | chip drivers/intel/mipi_camera |
| 274 | register "acpi_uid" = "1" |
| 275 | register "acpi_name" = ""NVM0"" |
| 276 | register "chip_name" = ""GT24C08"" |
| 277 | register "device_type" = "INTEL_ACPI_CAMERA_NVM" |
| 278 | |
Wisley Chen | 488bbe2 | 2020-08-31 18:07:02 +0800 | [diff] [blame] | 279 | register "nvm_size" = "0x0400" |
| 280 | register "nvm_pagesize" = "1" |
| 281 | register "nvm_readonly" = "1" |
| 282 | register "nvm_width" = "0x08" |
| 283 | register "nvm_compat" = ""atmel,24c08"" |
| 284 | |
| 285 | device i2c 50 on end |
| 286 | end |
| 287 | end # I2C 3 |
Wisley Chen | a339c36 | 2020-06-30 21:59:47 +0800 | [diff] [blame] | 288 | device pci 19.0 on |
| 289 | chip drivers/i2c/generic |
| 290 | register "hid" = ""10EC5682"" |
| 291 | register "name" = ""RT58"" |
| 292 | register "desc" = ""Headset Codec"" |
| 293 | register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_D16)" |
| 294 | # Set the jd_src to RT5668_JD1 for jack detection |
| 295 | register "property_count" = "1" |
| 296 | register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" |
| 297 | register "property_list[0].name" = ""realtek,jd-src"" |
| 298 | register "property_list[0].integer" = "1" |
| 299 | device i2c 1a on end |
| 300 | end |
| 301 | end #I2C 4 |
| 302 | device pci 1f.3 on |
| 303 | chip drivers/generic/max98357a |
| 304 | register "hid" = ""MX98360A"" |
| 305 | register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D17)" |
| 306 | device generic 0 on end |
| 307 | end |
| 308 | end # Intel HDA |
Wisley Chen | 4d58083 | 2020-06-09 19:44:27 +0800 | [diff] [blame] | 309 | end |
| 310 | end |