Ronald G. Minnich | 4f78b18 | 2013-04-17 16:57:30 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2013 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | /* this file was for the most part machine generated, and in future |
| 20 | * will be all machine generated. Avoid editing. |
| 21 | */ |
| 22 | #include <console/console.h> |
Stefan Reinauer | f69a27b | 2015-01-06 13:08:23 -0800 | [diff] [blame^] | 23 | #include <drivers/intel/gma/i915.h> |
Ronald G. Minnich | 4f78b18 | 2013-04-17 16:57:30 -0700 | [diff] [blame] | 24 | |
| 25 | void graphics_register_reset(u32 aux_ctl, u32 aux_data, int verbose) |
| 26 | { |
| 27 | |
| 28 | io_i915_write32(0x80000000,0x45400); |
| 29 | io_i915_write32(0x00000000,_CURACNTR); |
| 30 | io_i915_write32((/* PIPEA */0x0<<24)|0x00000000,_DSPACNTR); |
| 31 | io_i915_write32(0x00000000,_DSPBCNTR); |
| 32 | io_i915_write32(0x80000000,CPU_VGACNTRL); |
| 33 | io_i915_write32(0x00000000,_DSPASIZE+0xc); |
| 34 | io_i915_write32(0x00000000,_DSPBSURF); |
| 35 | io_i915_write32(0x00000000,0x4f050); |
| 36 | io_i915_write32( DP_LINK_TRAIN_PAT_1 | DP_LINK_TRAIN_PAT_1_CPT | |
| 37 | DP_VOLTAGE_0_4 | DP_PRE_EMPHASIS_0 | DP_PORT_WIDTH_1 | |
| 38 | DP_PLL_FREQ_270MHZ | DP_SCRAMBLING_DISABLE_IRONLAKE | |
| 39 | DP_SYNC_VS_HIGH |0x00000091,DP_A); |
| 40 | io_i915_write32(0x00200090,_FDI_RXA_MISC); |
| 41 | io_i915_write32(0x0a000000,_FDI_RXA_MISC); |
| 42 | /* not yet documented anywhere that we can find. */ |
| 43 | io_i915_write32(0x00000070,0x46408); |
| 44 | io_i915_write32(0x04000000,0x42090); |
| 45 | io_i915_write32(0x40000000,0x4f050); |
| 46 | io_i915_write32(0x00000000,0x9840); |
| 47 | io_i915_write32(0xa4000000,0x42090); |
| 48 | io_i915_write32(0x00004000,0x42080); |
| 49 | io_i915_write32(0x00ffffff,0x64f80); |
| 50 | io_i915_write32(0x0007000e,0x64f84); |
| 51 | io_i915_write32(0x00d75fff,0x64f88); |
| 52 | io_i915_write32(0x000f000a,0x64f8c); |
| 53 | io_i915_write32(0x00c30fff,0x64f90); |
| 54 | io_i915_write32(0x00060006,0x64f94); |
| 55 | io_i915_write32(0x00aaafff,0x64f98); |
| 56 | io_i915_write32(0x001e0000,0x64f9c); |
| 57 | io_i915_write32(0x00ffffff,0x64fa0); |
| 58 | io_i915_write32(0x000f000a,0x64fa4); |
| 59 | io_i915_write32(0x00d75fff,0x64fa8); |
| 60 | io_i915_write32(0x00160004,0x64fac); |
| 61 | io_i915_write32(0x00c30fff,0x64fb0); |
| 62 | io_i915_write32(0x001e0000,0x64fb4); |
| 63 | io_i915_write32(0x00ffffff,0x64fb8); |
| 64 | io_i915_write32(0x00060006,0x64fbc); |
| 65 | io_i915_write32(0x00d75fff,0x64fc0); |
| 66 | io_i915_write32(0x001e0000,0x64fc4); |
| 67 | io_i915_write32(0x00ffffff,0x64e00); |
| 68 | io_i915_write32(0x0006000e,0x64e04); |
| 69 | io_i915_write32(0x00d75fff,0x64e08); |
| 70 | io_i915_write32(0x0005000a,0x64e0c); |
| 71 | io_i915_write32(0x00c30fff,0x64e10); |
| 72 | io_i915_write32(0x00040006,0x64e14); |
| 73 | io_i915_write32(0x80aaafff,0x64e18); |
| 74 | io_i915_write32(0x000b0000,0x64e1c); |
| 75 | io_i915_write32(0x00ffffff,0x64e20); |
| 76 | io_i915_write32(0x0005000a,0x64e24); |
| 77 | io_i915_write32(0x00d75fff,0x64e28); |
| 78 | io_i915_write32(0x000c0004,0x64e2c); |
| 79 | io_i915_write32(0x80c30fff,0x64e30); |
| 80 | io_i915_write32(0x000b0000,0x64e34); |
| 81 | io_i915_write32(0x00ffffff,0x64e38); |
| 82 | io_i915_write32(0x00040006,0x64e3c); |
| 83 | io_i915_write32(0x80d75fff,0x64e40); |
| 84 | io_i915_write32(0x000b0000,0x64e44); |
| 85 | /* end not yet documented. */ |
| 86 | io_i915_write32(0x10000000,SDEISR+0x30); |
| 87 | } |