Chao Gui | d171e7f | 2022-10-06 13:27:46 -0700 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-or-later |
Frank Wu | 593ac8d | 2022-12-06 17:22:55 +0800 | [diff] [blame] | 2 | fw_config |
| 3 | field FP 0 |
| 4 | option FP_ABSENT 0 |
| 5 | option FP_PRESENT 1 |
| 6 | end |
| 7 | field STYLUS 1 |
| 8 | option STYLUS_ABSENT 0 |
| 9 | option STYLUS_PRESENT 1 |
| 10 | end |
| 11 | end |
Chao Gui | d171e7f | 2022-10-06 13:27:46 -0700 | [diff] [blame] | 12 | |
| 13 | chip soc/amd/mendocino |
Chris.Wang | 174d263 | 2022-12-13 15:11:30 +0800 | [diff] [blame] | 14 | |
Rex Chou | 134d740 | 2022-12-19 10:54:35 +0800 | [diff] [blame] | 15 | register "i2c[0]" = "{ |
| 16 | .speed = I2C_SPEED_FAST, |
| 17 | .speed_config[0] = { |
| 18 | .speed = I2C_SPEED_FAST, |
| 19 | .scl_hcnt = 120, |
Rex Chou | a16da93 | 2023-01-19 17:44:30 +0800 | [diff] [blame] | 20 | .scl_lcnt = 220, |
| 21 | .sda_hold = 90, |
Rex Chou | 134d740 | 2022-12-19 10:54:35 +0800 | [diff] [blame] | 22 | } |
| 23 | }" |
| 24 | |
Frank Wu | 749daf3 | 2022-10-17 16:59:05 +0800 | [diff] [blame] | 25 | device domain 0 on |
Frank Wu | febcc02 | 2023-01-16 13:36:52 +0800 | [diff] [blame] | 26 | |
| 27 | register "dxio_tx_vboost_enable" = "1" |
| 28 | |
Frank Wu | 749daf3 | 2022-10-17 16:59:05 +0800 | [diff] [blame] | 29 | device ref gpp_bridge_a on # Internal GPP Bridge 0 to Bus A |
| 30 | device ref xhci_1 on # XHCI1 controller |
| 31 | chip drivers/usb/acpi |
| 32 | device ref xhci_1_root_hub on # XHCI1 root hub |
| 33 | chip drivers/usb/acpi |
| 34 | device ref usb3_port3 on # USB 3.1 port3 |
| 35 | chip drivers/usb/acpi |
| 36 | register "desc" = ""USB3 Type-A Port A1 (DB)"" |
| 37 | register "type" = "UPC_TYPE_USB3_A" |
| 38 | register "use_custom_pld" = "true" |
| 39 | register "custom_pld" = "ACPI_PLD_TYPE_A(RIGHT, CENTER, ACPI_PLD_GROUP(3, 1))" |
| 40 | device usb 3.2 on end |
| 41 | end |
| 42 | end # USB 3.1 port3 |
| 43 | end |
| 44 | chip drivers/usb/acpi |
| 45 | device ref usb2_port3 on # USB 2 port3 |
| 46 | chip drivers/usb/acpi |
| 47 | register "desc" = ""USB2 Type-A Port A1 (DB)"" |
| 48 | register "type" = "UPC_TYPE_USB3_A" |
| 49 | register "use_custom_pld" = "true" |
| 50 | register "custom_pld" = "ACPI_PLD_TYPE_A(RIGHT, CENTER, ACPI_PLD_GROUP(3, 1))" |
| 51 | device usb 2.2 on end |
| 52 | end |
| 53 | end # USB 2 port3 |
| 54 | end |
| 55 | end # XHCI1 root hub |
| 56 | end |
| 57 | end # XHCI1 controller |
| 58 | end # Internal GPP Bridge 0 to Bus A |
| 59 | end # domain |
| 60 | |
| 61 | device ref i2c_0 on |
| 62 | chip drivers/i2c/generic |
| 63 | register "hid" = ""ELAN0000"" |
| 64 | register "desc" = ""ELAN Touchpad"" |
| 65 | register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_40)" |
| 66 | register "wake" = "GEVENT_20" |
| 67 | register "detect" = "1" |
| 68 | device i2c 15 on end |
| 69 | end |
| 70 | end # I2C0 |
| 71 | device ref i2c_1 on |
| 72 | chip drivers/i2c/hid |
| 73 | register "generic.hid" = ""ELAN9008"" |
| 74 | register "generic.desc" = ""ELAN Touchscreen"" |
| 75 | register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_29)" |
Matt DeVillier | 22683fa | 2022-10-31 09:46:39 -0500 | [diff] [blame] | 76 | register "generic.detect" = "1" |
Frank Wu | 749daf3 | 2022-10-17 16:59:05 +0800 | [diff] [blame] | 77 | register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_131)" |
| 78 | register "generic.enable_delay_ms" = "1" |
| 79 | register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPIO_136)" |
| 80 | register "generic.reset_off_delay_ms" = "2" |
| 81 | register "generic.reset_delay_ms" = "20" |
| 82 | register "generic.stop_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPIO_76)" |
Frank Wu | 71b4e29 | 2023-02-16 16:40:15 +0800 | [diff] [blame] | 83 | register "generic.stop_delay_ms" = "150" |
Frank Wu | 749daf3 | 2022-10-17 16:59:05 +0800 | [diff] [blame] | 84 | register "generic.stop_off_delay_ms" = "2" |
| 85 | register "generic.has_power_resource" = "1" |
| 86 | register "hid_desc_reg_offset" = "0x01" |
| 87 | device i2c 10 on end |
| 88 | end |
| 89 | chip drivers/generic/gpio_keys |
| 90 | register "name" = ""PENH"" |
| 91 | register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_LOW(GPIO_3)" |
| 92 | register "key.dev_name" = ""EJCT"" |
| 93 | register "key.wakeup_event_action" = "EV_ACT_DEASSERTED" |
| 94 | register "key.linux_code" = "SW_PEN_INSERTED" |
| 95 | register "key.linux_input_type" = "EV_SW" |
| 96 | register "key.label" = ""pen_eject"" |
| 97 | register "key.debounce_interval" = "100" |
| 98 | register "key.wakeup_route" = "WAKEUP_ROUTE_GPIO_IRQ" |
Frank Wu | 593ac8d | 2022-12-06 17:22:55 +0800 | [diff] [blame] | 99 | device generic 0 on |
| 100 | probe STYLUS STYLUS_PRESENT |
| 101 | end |
Frank Wu | 749daf3 | 2022-10-17 16:59:05 +0800 | [diff] [blame] | 102 | end |
| 103 | end # I2C1 |
| 104 | device ref i2c_2 on |
| 105 | chip drivers/i2c/generic |
| 106 | register "hid" = ""RTL5682"" |
| 107 | register "name" = ""RT58"" |
| 108 | register "desc" = ""Realtek RT5682"" |
| 109 | register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPIO_90)" |
| 110 | register "property_count" = "1" |
| 111 | register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" |
| 112 | register "property_list[0].name" = ""realtek,jd-src"" |
| 113 | register "property_list[0].integer" = "1" |
| 114 | device i2c 1a on end |
| 115 | end |
| 116 | chip drivers/i2c/generic |
| 117 | register "hid" = ""10EC1019"" |
| 118 | register "desc" = ""Realtek SPK AMP R"" |
| 119 | register "uid" = "1" |
| 120 | device i2c 29 on end |
| 121 | end |
| 122 | chip drivers/i2c/generic |
| 123 | register "hid" = ""10EC1019"" |
| 124 | register "desc" = ""Realtek SPK AMP L"" |
| 125 | register "uid" = "2" |
| 126 | register "probed" = "1" |
| 127 | device i2c 2a on end |
| 128 | end |
| 129 | end # I2C2 |
| 130 | |
| 131 | device ref uart_1 on |
| 132 | chip drivers/uart/acpi |
| 133 | register "name" = ""CRFP"" |
| 134 | register "desc" = ""Fingerprint Reader"" |
| 135 | register "hid" = "ACPI_DT_NAMESPACE_HID" |
| 136 | register "compat_string" = ""google,cros-ec-uart"" |
| 137 | register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_24)" |
| 138 | register "wake" = "GEVENT_15" |
| 139 | register "uart" = "ACPI_UART_RAW_DEVICE(3000000, 64)" |
| 140 | register "has_power_resource" = "1" |
| 141 | register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPIO_12)" |
| 142 | register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_4)" |
| 143 | register "enable_delay_ms" = "3" |
Frank Wu | 593ac8d | 2022-12-06 17:22:55 +0800 | [diff] [blame] | 144 | device generic 0 alias fpmcu on |
| 145 | probe FP FP_PRESENT |
| 146 | end |
Frank Wu | 749daf3 | 2022-10-17 16:59:05 +0800 | [diff] [blame] | 147 | end |
| 148 | end # UART1 |
| 149 | |
Frank Wu | 29863f6 | 2023-02-17 15:09:06 +0800 | [diff] [blame] | 150 | # Set Package Power Parameters |
| 151 | register "thermctl_limit_degreeC" = "90" |
| 152 | |
| 153 | # STT settings |
| 154 | register "stt_control" = "1" |
| 155 | register "stt_pcb_sensor_count" = "2" |
Frank Wu | 23c77ef | 2023-03-13 10:14:55 +0800 | [diff] [blame^] | 156 | register "stt_error_coeff" = "0x38" |
| 157 | register "stt_error_rate_coefficient" = "0xbfb" |
| 158 | register "stt_min_limit" = "15500" |
| 159 | register "stt_skin_temp_apu" = "0x2b33" |
Frank Wu | 29863f6 | 2023-02-17 15:09:06 +0800 | [diff] [blame] | 160 | |
| 161 | # STT default mode |
Frank Wu | 23c77ef | 2023-03-13 10:14:55 +0800 | [diff] [blame^] | 162 | register "stt_m1" = "0x20c" |
| 163 | register "stt_m2" = "0x302" |
| 164 | register "stt_c_apu" = "0xf7e9" |
| 165 | register "stt_alpha_apu" = "0x199a" |
Frank Wu | 29863f6 | 2023-02-17 15:09:06 +0800 | [diff] [blame] | 166 | |
| 167 | # STT tablet mode |
| 168 | register "stt_m1_tablet" = "0x208" |
| 169 | register "stt_m2_tablet" = "0x1f5" |
| 170 | register "stt_c_apu_tablet" = "0xa2" |
| 171 | register "stt_alpha_apu_tablet" = "0x199a" |
| 172 | |
Chao Gui | d171e7f | 2022-10-06 13:27:46 -0700 | [diff] [blame] | 173 | end # chip soc/amd/mendocino |