Stefan Reinauer | 00636b0 | 2012-04-04 00:08:51 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Stefan Reinauer | 00636b0 | 2012-04-04 00:08:51 +0200 | [diff] [blame] | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; version 2 of the License. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
Stefan Reinauer | 00636b0 | 2012-04-04 00:08:51 +0200 | [diff] [blame] | 13 | */ |
| 14 | |
Iru Cai | d7ee9dd | 2016-02-24 15:03:58 +0800 | [diff] [blame] | 15 | #ifndef NORTHBRIDGE_INTEL_SANDYBRIDGE_CHIP_H |
| 16 | #define NORTHBRIDGE_INTEL_SANDYBRIDGE_CHIP_H |
| 17 | |
Vladimir Serbinenko | a71bdc3 | 2014-08-30 00:35:39 +0200 | [diff] [blame] | 18 | #include <drivers/intel/gma/i915.h> |
| 19 | |
Stefan Reinauer | 00636b0 | 2012-04-04 00:08:51 +0200 | [diff] [blame] | 20 | /* |
| 21 | * Digital Port Hotplug Enable: |
Angel Pons | 7c49cb8 | 2020-03-16 23:17:32 +0100 | [diff] [blame] | 22 | * 0x04 = Enabled, 2ms short pulse |
Stefan Reinauer | 00636b0 | 2012-04-04 00:08:51 +0200 | [diff] [blame] | 23 | * 0x05 = Enabled, 4.5ms short pulse |
Angel Pons | 7c49cb8 | 2020-03-16 23:17:32 +0100 | [diff] [blame] | 24 | * 0x06 = Enabled, 6ms short pulse |
Stefan Reinauer | 00636b0 | 2012-04-04 00:08:51 +0200 | [diff] [blame] | 25 | * 0x07 = Enabled, 100ms short pulse |
| 26 | */ |
| 27 | struct northbridge_intel_sandybridge_config { |
| 28 | u8 gpu_dp_b_hotplug; /* Digital Port B Hotplug Config */ |
| 29 | u8 gpu_dp_c_hotplug; /* Digital Port C Hotplug Config */ |
| 30 | u8 gpu_dp_d_hotplug; /* Digital Port D Hotplug Config */ |
| 31 | |
| 32 | u8 gpu_panel_port_select; /* 0=LVDS 1=DP_B 2=DP_C 3=DP_D */ |
| 33 | u8 gpu_panel_power_cycle_delay; /* T4 time sequence */ |
| 34 | u16 gpu_panel_power_up_delay; /* T1+T2 time sequence */ |
| 35 | u16 gpu_panel_power_down_delay; /* T3 time sequence */ |
| 36 | u16 gpu_panel_power_backlight_on_delay; /* T5 time sequence */ |
| 37 | u16 gpu_panel_power_backlight_off_delay; /* Tx time sequence */ |
Duncan Laurie | dd585b8 | 2012-04-09 12:05:18 -0700 | [diff] [blame] | 38 | |
| 39 | u32 gpu_cpu_backlight; /* CPU Backlight PWM value */ |
| 40 | u32 gpu_pch_backlight; /* PCH Backlight PWM value */ |
Vladimir Serbinenko | 1783a3c | 2014-02-23 00:10:35 +0100 | [diff] [blame] | 41 | |
Alexandru Gagniuc | 8b2c8f1 | 2015-02-17 04:31:01 -0600 | [diff] [blame] | 42 | /* |
| 43 | * Maximum memory clock. |
| 44 | * For example 666 for DDR3-1333, or 800 for DDR3-1600 |
| 45 | */ |
| 46 | u16 max_mem_clock_mhz; |
| 47 | |
Vladimir Serbinenko | a71bdc3 | 2014-08-30 00:35:39 +0200 | [diff] [blame] | 48 | struct i915_gpu_controller_info gfx; |
Patrick Rudolph | 266a1f7 | 2016-06-09 18:13:34 +0200 | [diff] [blame] | 49 | |
| 50 | /* |
Angel Pons | 7c49cb8 | 2020-03-16 23:17:32 +0100 | [diff] [blame] | 51 | * Maximum PCI MMIO size in MiB. |
Patrick Rudolph | 266a1f7 | 2016-06-09 18:13:34 +0200 | [diff] [blame] | 52 | */ |
| 53 | u16 pci_mmio_size; |
Patrick Rudolph | 5709e03 | 2019-03-25 10:12:14 +0100 | [diff] [blame] | 54 | |
| 55 | /* Data for RAM init */ |
| 56 | |
| 57 | /* DIMM SPD address. Use 8bit notation where BIT0 is always zero. */ |
| 58 | u8 spd_addresses[4]; |
| 59 | |
| 60 | /* PEI data for RAM init and early silicon init */ |
| 61 | u8 ts_addresses[4]; |
| 62 | |
| 63 | bool ec_present; |
| 64 | bool ddr3lv_support; |
| 65 | |
Angel Pons | 7c49cb8 | 2020-03-16 23:17:32 +0100 | [diff] [blame] | 66 | /* |
| 67 | * N mode functionality. Leave this setting at 0. |
Patrick Rudolph | 5709e03 | 2019-03-25 10:12:14 +0100 | [diff] [blame] | 68 | * 0 Auto |
| 69 | * 1 1N |
| 70 | * 2 2N |
| 71 | */ |
| 72 | enum { |
| 73 | DDR_NMODE_AUTO = 0, |
| 74 | DDR_NMODE_1N, |
| 75 | DDR_NMODE_2N, |
| 76 | } nmode; |
| 77 | |
Angel Pons | 7c49cb8 | 2020-03-16 23:17:32 +0100 | [diff] [blame] | 78 | /* |
| 79 | * DDR refresh rate config. JEDEC Standard No.21-C Annex K allows for DIMM SPD data to |
| 80 | * specify whether double-rate is required for extended operating temperature range. |
| 81 | * |
| 82 | * 0 Enable double rate based upon temperature thresholds |
| 83 | * 1 Normal rate |
| 84 | * 2 Always enable double rate |
Patrick Rudolph | 5709e03 | 2019-03-25 10:12:14 +0100 | [diff] [blame] | 85 | */ |
| 86 | enum { |
| 87 | DDR_REFRESH_RATE_TEMP_THRES = 0, |
| 88 | DDR_REFRESH_REATE_NORMAL, |
| 89 | DDR_REFRESH_RATE_DOUBLE, |
| 90 | } ddr_refresh_rate_config; |
| 91 | |
| 92 | /* |
| 93 | * USB Port Configuration: |
| 94 | * [0] = enable |
| 95 | * [1] = overcurrent pin |
| 96 | * [2] = length |
| 97 | * |
Angel Pons | 7c49cb8 | 2020-03-16 23:17:32 +0100 | [diff] [blame] | 98 | * Ports 0-7 can be mapped to OC0-OC3 |
Patrick Rudolph | 5709e03 | 2019-03-25 10:12:14 +0100 | [diff] [blame] | 99 | * Ports 8-13 can be mapped to OC4-OC7 |
| 100 | * |
| 101 | * Port Length |
| 102 | * MOBILE: |
| 103 | * < 0x050 = Setting 1 (back panel, 1-5in, lowest tx amplitude) |
| 104 | * < 0x140 = Setting 2 (back panel, 5-14in, highest tx amplitude) |
| 105 | * DESKTOP: |
| 106 | * < 0x080 = Setting 1 (front/back panel, <8in, lowest tx amplitude) |
| 107 | * < 0x130 = Setting 2 (back panel, 8-13in, higher tx amplitude) |
| 108 | * < 0x150 = Setting 3 (back panel, 13-15in, highest tx amplitude) |
| 109 | */ |
| 110 | u16 usb_port_config[16][3]; |
| 111 | |
| 112 | struct { |
| 113 | /* 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto */ |
| 114 | u8 mode : 2; |
| 115 | /* 4 bit mask, 1: switchable, 0: not switchable */ |
| 116 | u8 hs_port_switch_mask : 4; |
| 117 | /* 0: No xHCI preOS driver, 1: xHCI preOS driver */ |
| 118 | u8 preboot_support : 1; |
| 119 | /* 0: Disable, 1: Enable */ |
| 120 | u8 xhci_streams : 1; |
| 121 | } usb3; |
Stefan Reinauer | 00636b0 | 2012-04-04 00:08:51 +0200 | [diff] [blame] | 122 | }; |
Iru Cai | d7ee9dd | 2016-02-24 15:03:58 +0800 | [diff] [blame] | 123 | |
| 124 | #endif /* NORTHBRIDGE_INTEL_SANDYBRIDGE_CHIP_H */ |