From 34362d0c0f9a27c6eab62e59f83be11e4dfb617a Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 20 Oct 2022 23:06:56 +0200 Subject: mb/google/kahlee: use override devicetrees for variants This helps with deduplicating the identical parts of the variants' devicetrees. Signed-off-by: Felix Held Change-Id: Ie050c4624327b904e8cb0959b40421339e43f825 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68634 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/mainboard/google/kahlee/Kconfig | 5 +- .../google/kahlee/variants/aleena/devicetree.cb | 151 ----------------- .../google/kahlee/variants/aleena/overridetree.cb | 70 ++++++++ .../google/kahlee/variants/baseboard/devicetree.cb | 99 +++++++++++ .../google/kahlee/variants/careena/devicetree.cb | 171 ------------------- .../google/kahlee/variants/careena/overridetree.cb | 86 ++++++++++ .../google/kahlee/variants/grunt/devicetree.cb | 141 ---------------- .../google/kahlee/variants/grunt/overridetree.cb | 51 ++++++ .../google/kahlee/variants/liara/devicetree.cb | 151 ----------------- .../google/kahlee/variants/liara/overridetree.cb | 75 +++++++++ .../google/kahlee/variants/nuwani/devicetree.cb | 181 -------------------- .../google/kahlee/variants/nuwani/overridetree.cb | 109 ++++++++++++ .../google/kahlee/variants/treeya/devicetree.cb | 183 --------------------- .../google/kahlee/variants/treeya/overridetree.cb | 113 +++++++++++++ 14 files changed, 607 insertions(+), 979 deletions(-) delete mode 100644 src/mainboard/google/kahlee/variants/aleena/devicetree.cb create mode 100644 src/mainboard/google/kahlee/variants/aleena/overridetree.cb create mode 100644 src/mainboard/google/kahlee/variants/baseboard/devicetree.cb delete mode 100644 src/mainboard/google/kahlee/variants/careena/devicetree.cb create mode 100644 src/mainboard/google/kahlee/variants/careena/overridetree.cb delete mode 100644 src/mainboard/google/kahlee/variants/grunt/devicetree.cb create mode 100644 src/mainboard/google/kahlee/variants/grunt/overridetree.cb delete mode 100644 src/mainboard/google/kahlee/variants/liara/devicetree.cb create mode 100644 src/mainboard/google/kahlee/variants/liara/overridetree.cb delete mode 100644 src/mainboard/google/kahlee/variants/nuwani/devicetree.cb create mode 100644 src/mainboard/google/kahlee/variants/nuwani/overridetree.cb delete mode 100644 src/mainboard/google/kahlee/variants/treeya/devicetree.cb create mode 100644 src/mainboard/google/kahlee/variants/treeya/overridetree.cb (limited to 'src/mainboard') diff --git a/src/mainboard/google/kahlee/Kconfig b/src/mainboard/google/kahlee/Kconfig index 10524fe5e9..8c8486e652 100644 --- a/src/mainboard/google/kahlee/Kconfig +++ b/src/mainboard/google/kahlee/Kconfig @@ -64,7 +64,10 @@ config MAINBOARD_PART_NUMBER default "Treeya" if BOARD_GOOGLE_TREEYA config DEVICETREE - default "variants/\$(CONFIG_VARIANT_DIR)/devicetree.cb" + default "variants/baseboard/devicetree.cb" + +config OVERRIDE_DEVICETREE + default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb" config MAINBOARD_FAMILY string diff --git a/src/mainboard/google/kahlee/variants/aleena/devicetree.cb b/src/mainboard/google/kahlee/variants/aleena/devicetree.cb deleted file mode 100644 index 42c40170f0..0000000000 --- a/src/mainboard/google/kahlee/variants/aleena/devicetree.cb +++ /dev/null @@ -1,151 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -chip soc/amd/stoneyridge - register "spd_addr_lookup" = " - { - { {0xA0, 0x00} }, // socket 0 - Channel 0, slot 0 - }" - register "dram_clear_on_reset" = "DRAM_CONTENTS_KEEP" - register "uma_mode" = "UMAMODE_SPECIFIED_SIZE" - register "uma_size" = "32 * MiB" - register "stapm_percent" = "80" - register "stapm_time_ms" = "2500000" - register "stapm_power_mw" = "7800" - - # Enable I2C0 for audio, USB3 hub at 400kHz - register "i2c[0]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 95, - .fall_time_ns = 3, - }" - - # Enable I2C1 for H1 at 400kHz - register "i2c[1]" = "{ - .early_init = 1, - .speed = I2C_SPEED_FAST, - .rise_time_ns = 45, - .fall_time_ns = 4, - }" - - # Enable I2C2 for trackpad, pen at 400kHz - register "i2c[2]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 26, - .fall_time_ns = 11, - }" - - # Enable I2C3 for touchscreen at 400kHz - register "i2c[3]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 20, - .fall_time_ns = 19, - }" - - register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ - GPIO_I2C2_SCL | GPIO_I2C3_SCL" - - device domain 0 on - device ref iommu off end # IOMMU (Disabled for performance and battery) - device ref gfx on end - device ref gfx_hda on end - device ref gpp_bridge_1 on end # WLAN - device ref gpp_bridge_3 on - chip drivers/generic/bayhub - register "power_saving" = "1" - device pci 00.0 on end - end - end - device ref hda_bridge on end - device ref hda on end - device ref xhci on end - device ref ehci on end - device ref lpc_bridge on - chip ec/google/chromeec - device pnp 0c09.0 on end - end - end - device ref sdhci on end - end #domain - device ref i2c_0 on - chip drivers/generic/adau7002 - device generic 0.0 on end - end - chip drivers/i2c/da7219 - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_14)" - register "btn_cfg" = "50" - register "mic_det_thr" = "500" - register "jack_ins_deb" = "20" - register "jack_det_rate" = ""32ms_64ms"" - register "jack_rem_deb" = "1" - register "a_d_btn_thr" = "0xa" - register "d_b_btn_thr" = "0x16" - register "b_c_btn_thr" = "0x21" - register "c_mic_btn_thr" = "0x3e" - register "btn_avg" = "4" - register "adc_1bit_rpt" = "1" - register "micbias_lvl" = "2600" - register "mic_amp_in_sel" = ""diff"" - register "mclk_name" = ""oscout1"" - device i2c 1a on end - end - chip drivers/generic/max98357a - register "hid" = ""MX98357A"" - register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)" - register "sdmode_delay" = "5" - device generic 0.1 on end - end - end - device ref i2c_1 on - chip drivers/i2c/tpm - register "hid" = ""GOOG0005"" - register "desc" = ""Cr50 TPM"" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_9)" - device i2c 50 on end - end - end - device ref i2c_2 on - chip drivers/i2c/generic - register "hid" = ""ELAN0000"" - register "desc" = ""ELAN Touchpad"" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "wake" = "7" - register "detect" = "1" - device i2c 15 on end - end - chip drivers/i2c/hid - register "generic.hid" = ""PNP0C50"" - register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "generic.wake" = "7" - register "generic.detect" = "1" - register "hid_desc_reg_offset" = "0x20" - device i2c 2c on end - end - end - device ref i2c_3 on - chip drivers/i2c/generic - register "hid" = ""RAYD0001"" - register "desc" = ""Raydium Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 39 on end - end - chip drivers/i2c/generic - register "hid" = ""ELAN0001"" - register "desc" = ""ELAN Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 10 on end - end - end -end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/aleena/overridetree.cb b/src/mainboard/google/kahlee/variants/aleena/overridetree.cb new file mode 100644 index 0000000000..93ec1fa50b --- /dev/null +++ b/src/mainboard/google/kahlee/variants/aleena/overridetree.cb @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: GPL-2.0-only + +chip soc/amd/stoneyridge + register "stapm_percent" = "80" + register "stapm_time_ms" = "2500000" + register "stapm_power_mw" = "7800" + + # Enable I2C0 for audio, USB3 hub at 400kHz + register "i2c[0]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 95, + .fall_time_ns = 3, + }" + + # Enable I2C1 for H1 at 400kHz + register "i2c[1]" = "{ + .early_init = 1, + .speed = I2C_SPEED_FAST, + .rise_time_ns = 45, + .fall_time_ns = 4, + }" + + # Enable I2C2 for trackpad, pen at 400kHz + register "i2c[2]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 26, + .fall_time_ns = 11, + }" + + # Enable I2C3 for touchscreen at 400kHz + register "i2c[3]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 20, + .fall_time_ns = 19, + }" + + device ref i2c_2 on + chip drivers/i2c/generic + register "hid" = ""ELAN0000"" + register "desc" = ""ELAN Touchpad"" + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" + register "wake" = "7" + register "detect" = "1" + device i2c 15 on end + end + chip drivers/i2c/hid + register "generic.hid" = ""PNP0C50"" + register "generic.desc" = ""Synaptics Touchpad"" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" + register "generic.wake" = "7" + register "generic.detect" = "1" + register "hid_desc_reg_offset" = "0x20" + device i2c 2c on end + end + end + device ref i2c_3 on + chip drivers/i2c/generic + register "hid" = ""RAYD0001"" + register "desc" = ""Raydium Touchscreen"" + register "probed" = "1" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" + register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "reset_delay_ms" = "20" + register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "enable_delay_ms" = "1" + register "has_power_resource" = "1" + device i2c 39 on end + end + end +end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/baseboard/devicetree.cb b/src/mainboard/google/kahlee/variants/baseboard/devicetree.cb new file mode 100644 index 0000000000..e900acd4fe --- /dev/null +++ b/src/mainboard/google/kahlee/variants/baseboard/devicetree.cb @@ -0,0 +1,99 @@ + +# SPDX-License-Identifier: GPL-2.0-only + +chip soc/amd/stoneyridge + register "spd_addr_lookup" = " + { + { {0xA0, 0x00} }, // socket 0 - Channel 0, slot 0 + }" + register "dram_clear_on_reset" = "DRAM_CONTENTS_KEEP" + register "uma_mode" = "UMAMODE_SPECIFIED_SIZE" + register "uma_size" = "32 * MiB" + + register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ + GPIO_I2C2_SCL | GPIO_I2C3_SCL" + + device domain 0 on + device ref iommu off end # IOMMU (Disabled for performance and battery) + device ref gfx on end + device ref gfx_hda on end + device ref gpp_bridge_1 on end # WLAN + device ref gpp_bridge_3 on + chip drivers/generic/bayhub + register "power_saving" = "1" + device pci 00.0 on end + end + end + device ref hda_bridge on end + device ref hda on end + device ref xhci on end + device ref ehci on end + device ref lpc_bridge on + chip ec/google/chromeec + device pnp 0c09.0 on end + end + end + device ref sdhci on end + end #domain + + device ref i2c_0 on + chip drivers/generic/adau7002 + device generic 0.0 on end + end + chip drivers/i2c/da7219 + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_14)" + register "btn_cfg" = "50" + register "mic_det_thr" = "500" + register "jack_ins_deb" = "20" + register "jack_det_rate" = ""32ms_64ms"" + register "jack_rem_deb" = "1" + register "a_d_btn_thr" = "0xa" + register "d_b_btn_thr" = "0x16" + register "b_c_btn_thr" = "0x21" + register "c_mic_btn_thr" = "0x3e" + register "btn_avg" = "4" + register "adc_1bit_rpt" = "1" + register "micbias_lvl" = "2600" + register "mic_amp_in_sel" = ""diff"" + register "mclk_name" = ""oscout1"" + device i2c 1a on end + end + chip drivers/generic/max98357a + register "hid" = ""MX98357A"" + register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)" + register "sdmode_delay" = "5" + device generic 0.1 on end + end + end + device ref i2c_1 on + chip drivers/i2c/tpm + register "hid" = ""GOOG0005"" + register "desc" = ""Cr50 TPM"" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_9)" + device i2c 50 on end + end + end + device ref i2c_2 on + chip drivers/i2c/generic + register "hid" = ""ELAN0000"" + register "desc" = ""ELAN Touchpad"" + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" + register "wake" = "7" + device i2c 15 on end + end + end + device ref i2c_3 on + chip drivers/i2c/generic + register "hid" = ""ELAN0001"" + register "desc" = ""ELAN Touchscreen"" + register "probed" = "1" + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" + register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "reset_delay_ms" = "20" + register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "enable_delay_ms" = "1" + register "has_power_resource" = "1" + device i2c 10 on end + end + end +end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/careena/devicetree.cb b/src/mainboard/google/kahlee/variants/careena/devicetree.cb deleted file mode 100644 index ece74038b7..0000000000 --- a/src/mainboard/google/kahlee/variants/careena/devicetree.cb +++ /dev/null @@ -1,171 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -chip soc/amd/stoneyridge - register "spd_addr_lookup" = " - { - { {0xA0, 0x00} }, // socket 0 - Channel 0, slot 0 - }" - register "dram_clear_on_reset" = "DRAM_CONTENTS_KEEP" - register "uma_mode" = "UMAMODE_SPECIFIED_SIZE" - register "uma_size" = "32 * MiB" - register "stapm_percent" = "68" - register "stapm_time_ms" = "2500000" - register "stapm_power_mw" = "7800" - - # Enable I2C0 for audio, USB3 hub at 400kHz - register "i2c[0]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 58, - .fall_time_ns = 3, - }" - - # Enable I2C1 for H1 at 400kHz - register "i2c[1]" = "{ - .early_init = 1, - .speed = I2C_SPEED_FAST, - .rise_time_ns = 45, - .fall_time_ns = 4, - }" - - # Enable I2C2 for trackpad, pen at 400kHz - register "i2c[2]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 25, - .fall_time_ns = 11, - }" - - # Enable I2C3 for touchscreen at 400kHz - register "i2c[3]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 22, - .fall_time_ns = 19, - }" - - register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ - GPIO_I2C2_SCL | GPIO_I2C3_SCL" - - device domain 0 on - device ref iommu off end # IOMMU (Disabled for performance and battery) - device ref gfx on end - device ref gfx_hda on end - device ref gpp_bridge_1 on end # WLAN - device ref gpp_bridge_3 on - chip drivers/generic/bayhub - register "power_saving" = "1" - device pci 00.0 on end - end - end - device ref hda_bridge on end - device ref hda on end - device ref xhci on end - device ref ehci on end - device ref lpc_bridge on - chip ec/google/chromeec - device pnp 0c09.0 on end - end - end - device ref sdhci on end - end #domain - device ref i2c_0 on - chip drivers/generic/adau7002 - register "wakeup_delay" = "20" - device generic 0.0 on end - end - chip drivers/i2c/da7219 - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_14)" - register "btn_cfg" = "50" - register "mic_det_thr" = "500" - register "jack_ins_deb" = "20" - register "jack_det_rate" = ""32ms_64ms"" - register "jack_rem_deb" = "1" - register "a_d_btn_thr" = "0xa" - register "d_b_btn_thr" = "0x16" - register "b_c_btn_thr" = "0x21" - register "c_mic_btn_thr" = "0x3e" - register "btn_avg" = "4" - register "adc_1bit_rpt" = "1" - register "micbias_lvl" = "2600" - register "mic_amp_in_sel" = ""diff"" - register "mclk_name" = ""oscout1"" - device i2c 1a on end - end - chip drivers/i2c/generic - register "hid" = ""10EC5682"" - register "name" = ""RT58"" - register "uid" = "1" - register "desc" = ""Realtek RT5682"" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPIO_14)" - register "property_count" = "2" - register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" - register "property_list[0].name" = ""realtek,jd-src"" - register "property_list[0].integer" = "1" - register "property_list[1].type" = "ACPI_DP_TYPE_STRING" - register "property_list[1].name" = ""realtek,mclk-name"" - register "property_list[1].string" = ""oscout1"" - device i2c 1a on end - end - chip drivers/generic/max98357a - register "hid" = ""MX98357A"" - register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)" - register "sdmode_delay" = "5" - device generic 0.1 on end - end - end - device ref i2c_1 on - chip drivers/i2c/tpm - register "hid" = ""GOOG0005"" - register "desc" = ""Cr50 TPM"" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_9)" - device i2c 50 on end - end - end - device ref i2c_2 on - chip drivers/i2c/generic - register "hid" = ""ELAN0000"" - register "desc" = ""ELAN Touchpad"" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "wake" = "7" - device i2c 15 on end - end - end - device ref i2c_3 on - chip drivers/i2c/generic - register "hid" = ""RAYD0001"" - register "desc" = ""Raydium Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 39 on end - end - chip drivers/i2c/generic - register "hid" = ""ELAN0001"" - register "desc" = ""ELAN Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 10 on end - end - chip drivers/i2c/hid - register "generic.hid" = ""GTCH7503"" - register "generic.desc" = ""G2TOUCH Touchscreen"" - register "generic.probed" = "1" - register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "generic.reset_delay_ms" = "50" - register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "generic.enable_delay_ms" = "1" - register "generic.has_power_resource" = "1" - register "generic.disable_gpio_export_in_crs" = "1" - register "hid_desc_reg_offset" = "0x01" - device i2c 40 on end - end - end -end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/careena/overridetree.cb b/src/mainboard/google/kahlee/variants/careena/overridetree.cb new file mode 100644 index 0000000000..9e74990d00 --- /dev/null +++ b/src/mainboard/google/kahlee/variants/careena/overridetree.cb @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: GPL-2.0-only + +chip soc/amd/stoneyridge + register "stapm_percent" = "68" + register "stapm_time_ms" = "2500000" + register "stapm_power_mw" = "7800" + + # Enable I2C0 for audio, USB3 hub at 400kHz + register "i2c[0]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 58, + .fall_time_ns = 3, + }" + + # Enable I2C1 for H1 at 400kHz + register "i2c[1]" = "{ + .early_init = 1, + .speed = I2C_SPEED_FAST, + .rise_time_ns = 45, + .fall_time_ns = 4, + }" + + # Enable I2C2 for trackpad, pen at 400kHz + register "i2c[2]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 25, + .fall_time_ns = 11, + }" + + # Enable I2C3 for touchscreen at 400kHz + register "i2c[3]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 22, + .fall_time_ns = 19, + }" + + device ref i2c_0 on + chip drivers/generic/adau7002 + register "wakeup_delay" = "20" + device generic 0.0 on end + end + chip drivers/i2c/generic + register "hid" = ""10EC5682"" + register "name" = ""RT58"" + register "uid" = "1" + register "desc" = ""Realtek RT5682"" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPIO_14)" + register "property_count" = "2" + register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" + register "property_list[0].name" = ""realtek,jd-src"" + register "property_list[0].integer" = "1" + register "property_list[1].type" = "ACPI_DP_TYPE_STRING" + register "property_list[1].name" = ""realtek,mclk-name"" + register "property_list[1].string" = ""oscout1"" + device i2c 1a on end + end + end + device ref i2c_3 on + chip drivers/i2c/generic + register "hid" = ""RAYD0001"" + register "desc" = ""Raydium Touchscreen"" + register "probed" = "1" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" + register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "reset_delay_ms" = "20" + register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "enable_delay_ms" = "1" + register "has_power_resource" = "1" + device i2c 39 on end + end + chip drivers/i2c/hid + register "generic.hid" = ""GTCH7503"" + register "generic.desc" = ""G2TOUCH Touchscreen"" + register "generic.probed" = "1" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" + register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "generic.reset_delay_ms" = "50" + register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "generic.enable_delay_ms" = "1" + register "generic.has_power_resource" = "1" + register "generic.disable_gpio_export_in_crs" = "1" + register "hid_desc_reg_offset" = "0x01" + device i2c 40 on end + end + end +end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/grunt/devicetree.cb b/src/mainboard/google/kahlee/variants/grunt/devicetree.cb deleted file mode 100644 index a230e00ca7..0000000000 --- a/src/mainboard/google/kahlee/variants/grunt/devicetree.cb +++ /dev/null @@ -1,141 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -chip soc/amd/stoneyridge - register "spd_addr_lookup" = " - { - { {0xA0, 0x00} }, // socket 0 - Channel 0, slot 0 - }" - register "dram_clear_on_reset" = "DRAM_CONTENTS_KEEP" - register "uma_mode" = "UMAMODE_SPECIFIED_SIZE" - register "uma_size" = "32 * MiB" - register "stapm_percent" = "80" - register "stapm_time_ms" = "2500000" - register "stapm_power_mw" = "7800" - - # Enable I2C0 for audio, USB3 hub at 400kHz - register "i2c[0]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 95, - .fall_time_ns = 3, - }" - - # Enable I2C1 for H1 at 400kHz - register "i2c[1]" = "{ - .early_init = 1, - .speed = I2C_SPEED_FAST, - .rise_time_ns = 62, - .fall_time_ns = 2, - }" - - # Enable I2C2 for trackpad, pen at 400kHz - register "i2c[2]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 170, - .fall_time_ns = 91, - }" - - # Enable I2C3 for touchscreen at 400kHz - register "i2c[3]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 84, - .fall_time_ns = 50, - }" - - register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ - GPIO_I2C2_SCL | GPIO_I2C3_SCL" - - device domain 0 on - device ref iommu off end # IOMMU (Disabled for performance and battery) - device ref gfx on end - device ref gfx_hda on end - device ref gpp_bridge_1 on end # WLAN - device ref gpp_bridge_3 on - chip drivers/generic/bayhub - register "power_saving" = "1" - device pci 00.0 on end - end - end - device ref hda_bridge on end - device ref hda on end - device ref xhci on end - device ref ehci on end - device ref lpc_bridge on - chip ec/google/chromeec - device pnp 0c09.0 on end - end - end - device ref sdhci on end - end #domain - device ref i2c_0 on - chip drivers/generic/adau7002 - device generic 0.0 on end - end - chip drivers/i2c/da7219 - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_14)" - register "btn_cfg" = "50" - register "mic_det_thr" = "500" - register "jack_ins_deb" = "20" - register "jack_det_rate" = ""32ms_64ms"" - register "jack_rem_deb" = "1" - register "a_d_btn_thr" = "0xa" - register "d_b_btn_thr" = "0x16" - register "b_c_btn_thr" = "0x21" - register "c_mic_btn_thr" = "0x3e" - register "btn_avg" = "4" - register "adc_1bit_rpt" = "1" - register "micbias_lvl" = "2600" - register "mic_amp_in_sel" = ""diff"" - register "mclk_name" = ""oscout1"" - device i2c 1a on end - end - chip drivers/generic/max98357a - register "hid" = ""MX98357A"" - register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)" - register "sdmode_delay" = "5" - device generic 0.1 on end - end - end - device ref i2c_1 on - chip drivers/i2c/tpm - register "hid" = ""GOOG0005"" - register "desc" = ""Cr50 TPM"" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_9)" - device i2c 50 on end - end - end - device ref i2c_2 on - chip drivers/i2c/generic - register "hid" = ""ELAN0000"" - register "desc" = ""ELAN Touchpad"" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "wake" = "7" - device i2c 15 on end - end - end - device ref i2c_3 on - chip drivers/i2c/generic - register "hid" = ""RAYD0001"" - register "desc" = ""Raydium Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 39 on end - end - chip drivers/i2c/generic - register "hid" = ""ELAN0001"" - register "desc" = ""ELAN Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 10 on end - end - end -end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/grunt/overridetree.cb b/src/mainboard/google/kahlee/variants/grunt/overridetree.cb new file mode 100644 index 0000000000..d1e6c3e8f3 --- /dev/null +++ b/src/mainboard/google/kahlee/variants/grunt/overridetree.cb @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-2.0-only + +chip soc/amd/stoneyridge + register "stapm_percent" = "80" + register "stapm_time_ms" = "2500000" + register "stapm_power_mw" = "7800" + + # Enable I2C0 for audio, USB3 hub at 400kHz + register "i2c[0]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 95, + .fall_time_ns = 3, + }" + + # Enable I2C1 for H1 at 400kHz + register "i2c[1]" = "{ + .early_init = 1, + .speed = I2C_SPEED_FAST, + .rise_time_ns = 62, + .fall_time_ns = 2, + }" + + # Enable I2C2 for trackpad, pen at 400kHz + register "i2c[2]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 170, + .fall_time_ns = 91, + }" + + # Enable I2C3 for touchscreen at 400kHz + register "i2c[3]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 84, + .fall_time_ns = 50, + }" + + device ref i2c_3 on + chip drivers/i2c/generic + register "hid" = ""RAYD0001"" + register "desc" = ""Raydium Touchscreen"" + register "probed" = "1" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" + register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "reset_delay_ms" = "20" + register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "enable_delay_ms" = "1" + register "has_power_resource" = "1" + device i2c 39 on end + end + end +end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/liara/devicetree.cb b/src/mainboard/google/kahlee/variants/liara/devicetree.cb deleted file mode 100644 index 34c3fdeefc..0000000000 --- a/src/mainboard/google/kahlee/variants/liara/devicetree.cb +++ /dev/null @@ -1,151 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -chip soc/amd/stoneyridge - register "spd_addr_lookup" = " - { - { {0xA0, 0x00} }, // socket 0 - Channel 0, slot 0 - }" - register "dram_clear_on_reset" = "DRAM_CONTENTS_KEEP" - register "uma_mode" = "UMAMODE_SPECIFIED_SIZE" - register "uma_size" = "32 * MiB" - register "lvds_poseq_varybl_to_blon" = "0x5" # in 4ms - register "lvds_poseq_blon_to_varybl" = "0x5" # in 4ms - - # Enable I2C0 for audio, USB3 hub at 400kHz - register "i2c[0]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 85, - .fall_time_ns = 3, - }" - - # Enable I2C1 for H1 at 400kHz - register "i2c[1]" = "{ - .early_init = 1, - .speed = I2C_SPEED_FAST, - .rise_time_ns = 3, - .fall_time_ns = 2, - }" - - # Enable I2C2 for trackpad, pen at 400kHz - register "i2c[2]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 3, - .fall_time_ns = 2, - }" - - # Enable I2C3 for touchscreen at 400kHz - register "i2c[3]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 16, - .fall_time_ns = 8, - }" - - register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ - GPIO_I2C2_SCL | GPIO_I2C3_SCL" - - device domain 0 on - device ref iommu off end # IOMMU (Disabled for performance and battery) - device ref gfx on end - device ref gfx_hda on end - device ref gpp_bridge_1 on end # WLAN - device ref gpp_bridge_3 on - chip drivers/generic/bayhub - register "power_saving" = "1" - device pci 00.0 on end - end - end - device ref hda_bridge on end - device ref hda on end - device ref xhci on end - device ref ehci on end - device ref lpc_bridge on - chip ec/google/chromeec - device pnp 0c09.0 on end - end - end - device ref sdhci on end - end #domain - device ref i2c_0 on - chip drivers/generic/adau7002 - register "wakeup_delay" = "20" - device generic 0.0 on end - end - chip drivers/i2c/da7219 - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_14)" - register "btn_cfg" = "50" - register "mic_det_thr" = "500" - register "jack_ins_deb" = "20" - register "jack_det_rate" = ""32ms_64ms"" - register "jack_rem_deb" = "1" - register "a_d_btn_thr" = "0xa" - register "d_b_btn_thr" = "0x16" - register "b_c_btn_thr" = "0x21" - register "c_mic_btn_thr" = "0x3e" - register "btn_avg" = "4" - register "adc_1bit_rpt" = "1" - register "micbias_lvl" = "2600" - register "mic_amp_in_sel" = ""diff"" - register "mclk_name" = ""oscout1"" - device i2c 1a on end - end - chip drivers/generic/max98357a - register "hid" = ""MX98357A"" - register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)" - register "sdmode_delay" = "5" - device generic 0.1 on end - end - end - device ref i2c_1 on - chip drivers/i2c/tpm - register "hid" = ""GOOG0005"" - register "desc" = ""Cr50 TPM"" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_9)" - device i2c 50 on end - end - end - device ref i2c_2 on - chip drivers/i2c/generic - register "hid" = ""ELAN0000"" - register "desc" = ""ELAN Touchpad"" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "wake" = "7" - register "detect" = "1" - device i2c 15 on end - end - chip drivers/i2c/hid - register "generic.hid" = ""PNP0C50"" - register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "generic.wake" = "7" - register "generic.detect" = "1" - register "hid_desc_reg_offset" = "0x20" - device i2c 2c on end - end - end - device ref i2c_3 on - chip drivers/i2c/generic - register "hid" = ""RAYD0001"" - register "desc" = ""Raydium Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 39 on end - end - chip drivers/i2c/generic - register "hid" = ""ELAN0001"" - register "desc" = ""ELAN Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 10 on end - end - end -end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/liara/overridetree.cb b/src/mainboard/google/kahlee/variants/liara/overridetree.cb new file mode 100644 index 0000000000..a80229fe10 --- /dev/null +++ b/src/mainboard/google/kahlee/variants/liara/overridetree.cb @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: GPL-2.0-only + +chip soc/amd/stoneyridge + register "lvds_poseq_varybl_to_blon" = "0x5" # in 4ms + register "lvds_poseq_blon_to_varybl" = "0x5" # in 4ms + + # Enable I2C0 for audio, USB3 hub at 400kHz + register "i2c[0]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 85, + .fall_time_ns = 3, + }" + + # Enable I2C1 for H1 at 400kHz + register "i2c[1]" = "{ + .early_init = 1, + .speed = I2C_SPEED_FAST, + .rise_time_ns = 3, + .fall_time_ns = 2, + }" + + # Enable I2C2 for trackpad, pen at 400kHz + register "i2c[2]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 3, + .fall_time_ns = 2, + }" + + # Enable I2C3 for touchscreen at 400kHz + register "i2c[3]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 16, + .fall_time_ns = 8, + }" + + device ref i2c_0 on + chip drivers/generic/adau7002 + register "wakeup_delay" = "20" + device generic 0.0 on end + end + end + device ref i2c_2 on + chip drivers/i2c/generic + register "hid" = ""ELAN0000"" + register "desc" = ""ELAN Touchpad"" + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" + register "wake" = "7" + register "detect" = "1" + device i2c 15 on end + end + chip drivers/i2c/hid + register "generic.hid" = ""PNP0C50"" + register "generic.desc" = ""Synaptics Touchpad"" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" + register "generic.wake" = "7" + register "generic.detect" = "1" + register "hid_desc_reg_offset" = "0x20" + device i2c 2c on end + end + end + device ref i2c_3 on + chip drivers/i2c/generic + register "hid" = ""RAYD0001"" + register "desc" = ""Raydium Touchscreen"" + register "probed" = "1" + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" + register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "reset_delay_ms" = "20" + register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "enable_delay_ms" = "1" + register "has_power_resource" = "1" + device i2c 39 on end + end + end +end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/nuwani/devicetree.cb b/src/mainboard/google/kahlee/variants/nuwani/devicetree.cb deleted file mode 100644 index 894eb9df10..0000000000 --- a/src/mainboard/google/kahlee/variants/nuwani/devicetree.cb +++ /dev/null @@ -1,181 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -chip soc/amd/stoneyridge - register "spd_addr_lookup" = " - { - { {0xA0, 0x00} }, // socket 0 - Channel 0, slot 0 - }" - register "dram_clear_on_reset" = "DRAM_CONTENTS_KEEP" - register "uma_mode" = "UMAMODE_SPECIFIED_SIZE" - register "uma_size" = "32 * MiB" - register "stapm_percent" = "80" - register "stapm_time_ms" = "2000000" - register "stapm_power_mw" = "7800" - register "lvds_poseq_varybl_to_blon" = "0x5" - register "lvds_poseq_blon_to_varybl" = "0x5" - - # Enable I2C0 for audio, USB3 hub at 400kHz - register "i2c[0]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 95, - .fall_time_ns = 3, - }" - - # Enable I2C1 for H1 at 400kHz - register "i2c[1]" = "{ - .early_init = 1, - .speed = I2C_SPEED_FAST, - .rise_time_ns = 3, - .fall_time_ns = 2, - }" - - # Enable I2C2 for trackpad, pen at 400kHz - register "i2c[2]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 3, - .fall_time_ns = 2, - .data_hold_time_ns = 400, - }" - - # Enable I2C3 for touchscreen at 400kHz - register "i2c[3]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 16, - .fall_time_ns = 8, - }" - - register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ - GPIO_I2C2_SCL | GPIO_I2C3_SCL" - - device domain 0 on - device ref iommu off end # IOMMU (Disabled for performance and battery) - device ref gfx on end - device ref gfx_hda on end - device ref gpp_bridge_1 on end # WLAN - device ref gpp_bridge_3 on - chip drivers/generic/bayhub - register "power_saving" = "1" - register "vih_tuning_value" = "0x35" - device pci 00.0 on end - end - end - device ref hda_bridge on end - device ref hda on end - device ref xhci on end - device ref ehci on end - device ref lpc_bridge on - chip ec/google/chromeec - device pnp 0c09.0 on end - end - end - device ref sdhci on end - end #domain - device ref i2c_0 on - chip drivers/generic/adau7002 - device generic 0.0 on end - end - chip drivers/i2c/da7219 - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_14)" - register "btn_cfg" = "50" - register "mic_det_thr" = "500" - register "jack_ins_deb" = "20" - register "jack_det_rate" = ""32ms_64ms"" - register "jack_rem_deb" = "1" - register "a_d_btn_thr" = "0xa" - register "d_b_btn_thr" = "0x16" - register "b_c_btn_thr" = "0x21" - register "c_mic_btn_thr" = "0x3e" - register "btn_avg" = "4" - register "adc_1bit_rpt" = "1" - register "micbias_lvl" = "2600" - register "mic_amp_in_sel" = ""diff"" - register "mclk_name" = ""oscout1"" - device i2c 1a on end - end - chip drivers/generic/max98357a - register "hid" = ""MX98357A"" - register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)" - register "sdmode_delay" = "5" - device generic 0.1 on end - end - end - device ref i2c_1 on - chip drivers/i2c/tpm - register "hid" = ""GOOG0005"" - register "desc" = ""Cr50 TPM"" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_9)" - device i2c 50 on end - end - end - device ref i2c_2 on - chip drivers/i2c/generic - register "hid" = ""ELAN0000"" - register "desc" = ""ELAN Touchpad"" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "wake" = "7" - register "detect" = "1" - device i2c 15 on end - end - chip drivers/i2c/hid - register "generic.hid" = ""PNP0C50"" - register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "generic.wake" = "7" - register "generic.detect" = "1" - register "hid_desc_reg_offset" = "0x20" - device i2c 0x2c on end - end - end - device ref i2c_3 on - chip drivers/i2c/hid - register "generic.hid" = ""ELAN90FC"" - register "generic.desc" = ""ELAN Touchscreen"" - register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "generic.probed" = "1" - register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "generic.reset_delay_ms" = "20" - register "generic.has_power_resource" = "1" - register "generic.disable_gpio_export_in_crs" = "1" - register "hid_desc_reg_offset" = "0x01" - device i2c 10 on end - end - chip drivers/i2c/hid - register "generic.hid" = ""SYTS7817"" - register "generic.desc" = ""Synaptics Touchscreen"" - register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "generic.probed" = "1" - register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "generic.reset_delay_ms" = "45" - register "generic.has_power_resource" = "1" - register "generic.disable_gpio_export_in_crs" = "1" - register "hid_desc_reg_offset" = "0x20" - device i2c 20 on end - end - chip drivers/i2c/generic - register "hid" = ""RAYD0001"" - register "desc" = ""Raydium Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 39 on end - end - chip drivers/i2c/generic - register "hid" = ""ELAN0001"" - register "desc" = ""ELAN Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 10 on end - end - end -end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/nuwani/overridetree.cb b/src/mainboard/google/kahlee/variants/nuwani/overridetree.cb new file mode 100644 index 0000000000..2b4ef55192 --- /dev/null +++ b/src/mainboard/google/kahlee/variants/nuwani/overridetree.cb @@ -0,0 +1,109 @@ +# SPDX-License-Identifier: GPL-2.0-only + +chip soc/amd/stoneyridge + register "stapm_percent" = "80" + register "stapm_time_ms" = "2000000" + register "stapm_power_mw" = "7800" + register "lvds_poseq_varybl_to_blon" = "0x5" + register "lvds_poseq_blon_to_varybl" = "0x5" + + # Enable I2C0 for audio, USB3 hub at 400kHz + register "i2c[0]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 95, + .fall_time_ns = 3, + }" + + # Enable I2C1 for H1 at 400kHz + register "i2c[1]" = "{ + .early_init = 1, + .speed = I2C_SPEED_FAST, + .rise_time_ns = 3, + .fall_time_ns = 2, + }" + + # Enable I2C2 for trackpad, pen at 400kHz + register "i2c[2]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 3, + .fall_time_ns = 2, + .data_hold_time_ns = 400, + }" + + # Enable I2C3 for touchscreen at 400kHz + register "i2c[3]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 16, + .fall_time_ns = 8, + }" + + device domain 0 on + device ref gpp_bridge_3 on + chip drivers/generic/bayhub + register "power_saving" = "1" + register "vih_tuning_value" = "0x35" + device pci 00.0 on end + end + end + end #domain + + device ref i2c_2 on + chip drivers/i2c/generic + register "hid" = ""ELAN0000"" + register "desc" = ""ELAN Touchpad"" + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" + register "wake" = "7" + register "detect" = "1" + device i2c 15 on end + end + chip drivers/i2c/hid + register "generic.hid" = ""PNP0C50"" + register "generic.desc" = ""Synaptics Touchpad"" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" + register "generic.wake" = "7" + register "generic.detect" = "1" + register "hid_desc_reg_offset" = "0x20" + device i2c 0x2c on end + end + end + device ref i2c_3 on + chip drivers/i2c/hid + register "generic.hid" = ""ELAN90FC"" + register "generic.desc" = ""ELAN Touchscreen"" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" + register "generic.probed" = "1" + register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "generic.reset_delay_ms" = "20" + register "generic.has_power_resource" = "1" + register "generic.disable_gpio_export_in_crs" = "1" + register "hid_desc_reg_offset" = "0x01" + device i2c 10 on end + end + chip drivers/i2c/hid + register "generic.hid" = ""SYTS7817"" + register "generic.desc" = ""Synaptics Touchscreen"" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" + register "generic.probed" = "1" + register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "generic.reset_delay_ms" = "45" + register "generic.has_power_resource" = "1" + register "generic.disable_gpio_export_in_crs" = "1" + register "hid_desc_reg_offset" = "0x20" + device i2c 20 on end + end + chip drivers/i2c/generic + register "hid" = ""RAYD0001"" + register "desc" = ""Raydium Touchscreen"" + register "probed" = "1" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" + register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "reset_delay_ms" = "20" + register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "enable_delay_ms" = "1" + register "has_power_resource" = "1" + device i2c 39 on end + end + end +end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/treeya/devicetree.cb b/src/mainboard/google/kahlee/variants/treeya/devicetree.cb deleted file mode 100644 index e2f965a4c2..0000000000 --- a/src/mainboard/google/kahlee/variants/treeya/devicetree.cb +++ /dev/null @@ -1,183 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -chip soc/amd/stoneyridge - register "spd_addr_lookup" = " - { - { {0xA0, 0x00} }, // socket 0 - Channel 0, slot 0 - }" - register "dram_clear_on_reset" = "DRAM_CONTENTS_KEEP" - register "uma_mode" = "UMAMODE_SPECIFIED_SIZE" - register "uma_size" = "32 * MiB" - register "stapm_percent" = "80" - register "stapm_time_ms" = "2000000" - register "stapm_power_mw" = "7800" - register "lvds_poseq_varybl_to_blon" = "0x5" - register "lvds_poseq_blon_to_varybl" = "0x5" - - # Enable I2C0 for audio, USB3 hub at 400kHz - register "i2c[0]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 95, - .fall_time_ns = 3, - }" - - # Enable I2C1 for H1 at 400kHz - register "i2c[1]" = "{ - .early_init = 1, - .speed = I2C_SPEED_FAST, - .rise_time_ns = 3, - .fall_time_ns = 2, - }" - - # Enable I2C2 for trackpad, pen at 400kHz - register "i2c[2]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 3, - .fall_time_ns = 2, - .data_hold_time_ns = 400, - }" - - # Enable I2C3 for touchscreen at 400kHz - register "i2c[3]" = "{ - .speed = I2C_SPEED_FAST, - .rise_time_ns = 16, - .fall_time_ns = 8, - }" - - register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL | \ - GPIO_I2C2_SCL | GPIO_I2C3_SCL" - - device domain 0 on - device ref iommu off end # IOMMU (Disabled for performance and battery) - device ref gfx on end - device ref gfx_hda on end - device ref gpp_bridge_1 on end # WLAN - device ref gpp_bridge_3 on - chip drivers/generic/bayhub - register "power_saving" = "1" - register "vih_tuning_value" = "0x35" - device pci 00.0 on end - end - end - device ref hda_bridge on end - device ref hda on end - device ref xhci on end - device ref ehci on end - device ref lpc_bridge on - chip ec/google/chromeec - device pnp 0c09.0 on end - end - end - device ref sdhci on end - end #domain - device ref i2c_0 on - chip drivers/generic/adau7002 - device generic 0.0 on end - end - chip drivers/i2c/da7219 - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_14)" - register "btn_cfg" = "50" - register "mic_det_thr" = "500" - register "jack_ins_deb" = "20" - register "jack_det_rate" = ""32ms_64ms"" - register "jack_rem_deb" = "1" - register "a_d_btn_thr" = "0xa" - register "d_b_btn_thr" = "0x16" - register "b_c_btn_thr" = "0x21" - register "c_mic_btn_thr" = "0x3e" - register "btn_avg" = "4" - register "adc_1bit_rpt" = "1" - register "micbias_lvl" = "2600" - register "mic_amp_in_sel" = ""diff"" - register "mclk_name" = ""oscout1"" - device i2c 1a on end - end - chip drivers/i2c/generic - register "hid" = ""10EC5682"" - register "name" = ""RT58"" - register "uid" = "1" - register "desc" = ""Realtek RT5682"" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPIO_14)" - register "property_count" = "2" - register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" - register "property_list[0].name" = ""realtek,jd-src"" - register "property_list[0].integer" = "1" - register "property_list[1].type" = "ACPI_DP_TYPE_STRING" - register "property_list[1].name" = ""realtek,mclk-name"" - register "property_list[1].string" = ""oscout1"" - device i2c 1a on end - end - chip drivers/generic/max98357a - register "hid" = ""MX98357A"" - register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)" - register "sdmode_delay" = "5" - device generic 0.1 on end - end - end - device ref i2c_1 on - chip drivers/i2c/tpm - register "hid" = ""GOOG0005"" - register "desc" = ""Cr50 TPM"" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_9)" - device i2c 50 on end - end - end - device ref i2c_2 on - chip drivers/i2c/generic - register "hid" = ""ELAN0000"" - register "desc" = ""ELAN Touchpad"" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "wake" = "7" - register "detect" = "1" - device i2c 15 on end - end - chip drivers/i2c/hid - register "generic.hid" = ""PNP0C50"" - register "generic.desc" = ""Synaptics Touchpad"" - register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" - register "generic.wake" = "7" - register "generic.detect" = "1" - register "hid_desc_reg_offset" = "0x20" - device i2c 0x2c on end - end - end - device ref i2c_3 on - chip drivers/i2c/hid - register "generic.hid" = ""SYTS7817"" - register "generic.desc" = ""Synaptics Touchscreen"" - register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "generic.probed" = "1" - register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "generic.reset_delay_ms" = "45" - register "generic.has_power_resource" = "1" - register "generic.disable_gpio_export_in_crs" = "1" - register "hid_desc_reg_offset" = "0x20" - device i2c 20 on end - end - chip drivers/i2c/generic - register "hid" = ""RAYD0001"" - register "desc" = ""Raydium Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 39 on end - end - chip drivers/i2c/generic - register "hid" = ""ELAN0001"" - register "desc" = ""ELAN Touchscreen"" - register "probed" = "1" - register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" - register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" - register "reset_delay_ms" = "20" - register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" - register "enable_delay_ms" = "1" - register "has_power_resource" = "1" - device i2c 10 on end - end - end -end #chip soc/amd/stoneyridge diff --git a/src/mainboard/google/kahlee/variants/treeya/overridetree.cb b/src/mainboard/google/kahlee/variants/treeya/overridetree.cb new file mode 100644 index 0000000000..2b835ad2c9 --- /dev/null +++ b/src/mainboard/google/kahlee/variants/treeya/overridetree.cb @@ -0,0 +1,113 @@ +# SPDX-License-Identifier: GPL-2.0-only + +chip soc/amd/stoneyridge + register "stapm_percent" = "80" + register "stapm_time_ms" = "2000000" + register "stapm_power_mw" = "7800" + register "lvds_poseq_varybl_to_blon" = "0x5" + register "lvds_poseq_blon_to_varybl" = "0x5" + + # Enable I2C0 for audio, USB3 hub at 400kHz + register "i2c[0]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 95, + .fall_time_ns = 3, + }" + + # Enable I2C1 for H1 at 400kHz + register "i2c[1]" = "{ + .early_init = 1, + .speed = I2C_SPEED_FAST, + .rise_time_ns = 3, + .fall_time_ns = 2, + }" + + # Enable I2C2 for trackpad, pen at 400kHz + register "i2c[2]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 3, + .fall_time_ns = 2, + .data_hold_time_ns = 400, + }" + + # Enable I2C3 for touchscreen at 400kHz + register "i2c[3]" = "{ + .speed = I2C_SPEED_FAST, + .rise_time_ns = 16, + .fall_time_ns = 8, + }" + + device domain 0 on + device ref gpp_bridge_3 on + chip drivers/generic/bayhub + register "power_saving" = "1" + register "vih_tuning_value" = "0x35" + device pci 00.0 on end + end + end + end #domain + + device ref i2c_0 on + chip drivers/i2c/generic + register "hid" = ""10EC5682"" + register "name" = ""RT58"" + register "uid" = "1" + register "desc" = ""Realtek RT5682"" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPIO_14)" + register "property_count" = "2" + register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" + register "property_list[0].name" = ""realtek,jd-src"" + register "property_list[0].integer" = "1" + register "property_list[1].type" = "ACPI_DP_TYPE_STRING" + register "property_list[1].name" = ""realtek,mclk-name"" + register "property_list[1].string" = ""oscout1"" + device i2c 1a on end + end + end + device ref i2c_2 on + chip drivers/i2c/generic + register "hid" = ""ELAN0000"" + register "desc" = ""ELAN Touchpad"" + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" + register "wake" = "7" + register "detect" = "1" + device i2c 15 on end + end + chip drivers/i2c/hid + register "generic.hid" = ""PNP0C50"" + register "generic.desc" = ""Synaptics Touchpad"" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_5)" + register "generic.wake" = "7" + register "generic.detect" = "1" + register "hid_desc_reg_offset" = "0x20" + device i2c 0x2c on end + end + end + device ref i2c_3 on + chip drivers/i2c/hid + register "generic.hid" = ""SYTS7817"" + register "generic.desc" = ""Synaptics Touchscreen"" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_11)" + register "generic.probed" = "1" + register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "generic.reset_delay_ms" = "45" + register "generic.has_power_resource" = "1" + register "generic.disable_gpio_export_in_crs" = "1" + register "hid_desc_reg_offset" = "0x20" + device i2c 20 on end + end + chip drivers/i2c/generic + register "hid" = ""RAYD0001"" + register "desc" = ""Raydium Touchscreen"" + register "probed" = "1" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_11)" + register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_85)" + register "reset_delay_ms" = "20" + register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)" + register "enable_delay_ms" = "1" + register "has_power_resource" = "1" + device i2c 39 on end + end + end +end #chip soc/amd/stoneyridge -- cgit v1.2.3