Commit graph

8,545 commits

Author SHA1 Message Date
Gabe Black
b59efa435e exynos5250: Fix consts in the pwm code.
The code generally intended to make the pointer const instead of the thing it
pointed at, but it had const backwards. Sometimes both the pointer and the
data could be const, but sometimes there were writes where only the pointer
should be.

BUG=chrome-os-partner:19420
TEST=Built for snow.
BRANCH=None

Change-Id: Ifcd5495769b86b47d7b583cce63ed5c2158bec4e
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63775
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-30 18:50:26 -07:00
Martin Roth
274c9486c4 Remove PS/2 keyboard initialization on resume from S3
When we go through the resume path, there shouldn't ever be a need to
initialize the PS/2 keyboard.  The OS is going to reinitialize it
anyway, and it just slows the resume.

BUG=chrome-os-partner:20758
TEST=Verified Code flow in normal boot/S3 resume with print statements.
     Verified Keyboard was correctly disabled and flushed by booting
     to recovery mode screen while pressing keys on the integrated
     keyboard.
BRANCH=none

Change-Id: I48bdca2fa2cc0c965401d10fef75cadb09d2e1e9
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63648
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
2013-07-30 17:08:52 -07:00
Martin Roth
e5a986e539 Libpayload: Add keyboard-disble function.
Add a function to disable and clear the keyboard controller.

BUG=chrome-os-partner:20758
TEST=Verified Code flow in normal boot/S3 resume with print statements.
     Verified Keyboard was correctly disabled and flushed by booting
     to recovery mode screen while pressing keys on the integrated
     keyboard.
BRANCH=none

Change-Id: I3e1f011c3436fee5ce10993c6c26a3c8597c6fca
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63627
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
2013-07-30 17:08:51 -07:00
Stefan Reinauer
cc78ac7000 cbmem: fix userspace utility to work with dynamic CBMEM
This also adds an option -x/--hexdump to dump the whole
CBMEM area for debugging.

BRANCH=none
BUG=chrome-os-partner:18637
TEST=cbmem -l works on snow

Change-Id: I244955394c6a2199acf7af78ae4b8b0a6f3bfe33
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62287
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
2013-07-30 17:08:47 -07:00
Stefan Reinauer
5a1469d54b Enable CAR_MIGRATION on Exynos 5250 and 5420
... and move the Kconfig variable from cpu/x86/Kconfig to cpu/Kconfig
Despite calling romstage memory CAR in this case, the variables actually
do live in SRAM on the Exynos CPUs. However, in order to share as much
generic code as possible, we're using the same infrastructure here.

BRANCH=none
BUG=chrome-os-partner:18637
TEST=none

Change-Id: I85173c37099a25f3e55980e88120401826cdf29c
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62188
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
2013-07-30 17:08:47 -07:00
Stefan Reinauer
a4a8bf6329 libpayload: Add simple hexdump function
- prints hex and ascii
 - detects duplicate all zero lines

BUG=none
TEST=none
BRANCH=none

Change-Id: I084b3072bc05725b23c5c3ca0dbf1533f164a08c
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63660
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
2013-07-30 17:08:46 -07:00
Stefan Reinauer
c506852eaf Exynos 5420: Enable dynamic CBMEM
...  In order to do this, the graphics memory has to move into
the resource allocator and out of CBMEM.

BUG=chrome-os-partner:18637
BRANCH=none
TEST=none

Change-Id: I565c3d6dea747822fbabf6f3845232d4adfbf333
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63657
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2013-07-30 16:16:52 -07:00
Stefan Reinauer
3b3cd5db73 Add simple hexdump function
- prints hex and ascii
 - detects duplicate all zero lines

BUG=none
TEST=none
BRANCH=none

Change-Id: I557fed34f0f50ae256a019cf893004a0d6cbff7c
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62655
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
2013-07-30 15:25:06 -07:00
Stefan Reinauer
787b2834db Exynos 5250: Enable dynamic CBMEM
...  In order to do this, the graphics memory has to move into
the resource allocator and out of CBMEM.

BUG=chrome-os-partner:18637
BRANCH=none
TEST=none

Change-Id: I7396da4a7068404b0d2e4d308becab4dd6ea59bb
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/59326
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2013-07-30 15:24:33 -07:00
Gabe Black
7cac12aeac pit: Add missing elements to the edid data structure.
When the edid data structure changed a while ago, it caused hangs on snow
which were fixed by adding those missing members. Unfortunately we didn't
realize that pit needed the same fix.

BUG=chrome-os-partner:19420
TEST=Built and booted into recovery mode on pit. Saw that the video code no
longer hangs during initialization.
BRANCH=None

Change-Id: I81780b8135b99b2e24af723e703b9befff7b5ef0
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63646
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
2013-07-30 14:26:20 -07:00
Stefan Reinauer
fa004acf8c Rename cpu/x86/car.h to arch/early_variables.h
and add an ARMv7 version.

Signed-off-by: Stefan Reinauer <reinauer@google.com>

BUG=chrome-os-partner:18637
TEST=no functional change
BRANCH=none

Change-Id: I13d9194235bf03e3cceb862c791572f89196b65b
Reviewed-on: https://gerrit.chromium.org/gerrit/59293
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
2013-07-30 13:40:23 -07:00
Aaron Durbin
d846fd0e9b lynxpoint: don't return value for void function
set_gpio() has a void return. Don't return a value from it.

BUG=None
BRANCH=None
TEST=Quick build.

Change-Id: Ib30eaac9cc645f47702093958b698bcfdcd64b9e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63599
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-07-29 11:07:37 -07:00
Aaron Durbin
fbaf9d7801 tpm: provide explicit tpm register access
An issue was observed using a specific vendor's TPM in that it
chokes on access to registers that are not explicitly defined in the
PC client specification. The previous driver used generic access
functions for reading and writing registers. However, issues come
to play when reading from the status register. It read it as a 32-bit
value, but that read address 0x1b which is not defined in the spec.

Instead of using generic access functions for the tpm registers
provide explicit ones. To that end provide more high level wrapper
functions to perform the semantic access required.

BUG=chrome-os-partner:20565
BRANCH=None
TEST=Built and booted on bolt. TPM access works through coreboot.

Change-Id: I781b31723f819e1387d7aa25512c83780ea0877f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63243
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-07-26 12:16:17 -07:00
Gabe Black
010bdf714c arm: libpayload: Include stdint.h in cache.h.
The cache.h header uses standard int types but doesn't include stdint.h itself.

BUG=chrome-os-partner:19420
TEST=Built for pit.
BRANCH=None

Change-Id: If470978164b0cd1f05c27c2c8eda365133cc47ff
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63190
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-25 10:27:33 -07:00
Gabe Black
9362545695 pit: Bump the EC SPI bus speed up to 5 MHz.
That speed is used with U-Boot instead of the more conservative 500 KHz.

BUG=chrome-os-partner:19420
TEST=Built and booted on pit.
BRANCH=None

Change-Id: Ie9d79db3b52b88c1f3bfec1745634ae6bdc9f4ee
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63193
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-25 10:27:32 -07:00
Gabe Black
63fe4d864d exynos5420: Fix some clock settings.
Some registers and bit fields were wrong, but the difference is mostly
academic since the code that uses them are never called.

BUG=chrome-os-partner:19420
TEST=Built and booted on pit.
BRANCH=None

Change-Id: I0ce5e1529cdda1a4973765af8c31b79130b1111c
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63189
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-25 10:27:32 -07:00
Gabe Black
c581a18416 exynos5420: Fix the clock divisor mask.
The divisor mask had been set to 0xff, but the bitfield is 4 bits wide.

BUG=chrome-os-partner:19420
TEST=Built and booted into RW on pit. A hang still prevents booting, but the
EC RW was updated successfully.
BRANCH=None

Change-Id: Id8a205c80ca2fb0b6f0d86a0c3be4bba9527c0b5
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63188
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-25 10:27:31 -07:00
Shawn Nematbakhsh
21aa183c8f peppy: Drive WLAN_DISABLE_L / BT_ON low in S3 and S5.
When the board is in S3 and S5 the WLAN_DISABLE_L signal
can leak power into the WLAN power well since the GPIO
controlling WLAN_DISABLE_L is in the suspend well. Therefore,
drive WLAN_DISABLE_L low to avoid the power leak.

This is a clone of a Falco change:
I1a0df80dd47fdbd535aca7a9d49253794c480606.

BUG=chrome-os-partner:21291.
TEST=Manual. WLAN continues to work in S0.

Change-Id: I625dfbb228d1f293b880a52dfe552842d55a17d1
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63220
Reviewed-by: Dave Parker <dparker@chromium.org>
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2013-07-24 13:07:13 -07:00
Furquan Shaikh
e39e7a722b Added structure members x_mm and y_mm to edid decoding.
Change-Id: I9a628cec4da127a3f072d9611259dad99dfa9d29
Reviewed-on: https://gerrit.chromium.org/gerrit/63125
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2013-07-23 19:02:23 -07:00
Furquan Shaikh
f2bb755567 Patch to fill in link_m and link_n values based on the EDID detailed timing values for
pixel_clock and link_clock.

Two undocumented registers 0x6f040 and 0x6f044 correspond to link_m and link_n respectively.
Other two undocumented registers 0x6f030 and 0x6f034 correspond to data_m and data_n respectively.

Calculations are based on the intel_link_compute_m_n from linux kernel.

Currently, the value for 0x6f030 does not come up right with our calculations. Hence, set to
hard-coded value.

Change-Id: I40ff411729d0a61759164c3c1098504973f9cf5e
Reviewed-on: https://gerrit.chromium.org/gerrit/62915
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2013-07-23 19:02:22 -07:00
Ronald G. Minnich
864ff7ca1a Slippy: remove unneeded code in i915io.c
This code is left over from what the VBIOS did; It is redundant.

BUG=None
TEST=Build and boot on falco (equivalent to slippy)
BRANCH=None

Change-Id: I321c867c81ec8b4d5e10f8b51b872cecb3082d97
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62290
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2013-07-23 19:02:22 -07:00
Julius Werner
48ad49d922 libpayload: Increase USB EHCI transfer timeout
The EHCI driver defines a maximum transfer timeout of two seconds. The
comments state that during tests the maximum amount of required transfer
time was for the SCSI TEST_UNIT_READY command on certain devices. We
have now observed a USB device (Patriot Memory 13fe:3100) that can NAK
this command for slightly more than two seconds. It will also completely
fail if the timeout hits, since it gets confused by the subsequent CSW
retry/recovery mechanism and starts producing babble errors. This patch
increases the timeout to three seconds to circumvent this problem.

BUG=chrome-os-partner:20988
TEST=Boot a Falco from a red-black RageXT USB stick.

Change-Id: I3c4fef468fb16eacc5a487d76d025a78fb450e27
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63095
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
2013-07-23 16:06:30 -07:00
Duncan Laurie
f29bca96ac haswell: Update microcode revision
CPUID 306C3 Haswell MOB C-0 microcode to 12h
CPUID 40651 Haswell ULT C-0 microcode to 15h

BUG=chrome-os-partner:21271
BRANCH=falco
TEST=manual: build and boot on falco and check microcode revision

localhost ~ # grep microcode /proc/cpuinfo
microcode       : 0x15
microcode       : 0x15

Change-Id: Ibdfe2b8ef0969b1ccc6dd1642a9fc352b5d11f27
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63045
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-23 11:14:18 -07:00
Duncan Laurie
49ce8835b1 slippy/falco/peppy: update ACPI C-state settings
Since these boards do not support C10 we should not bother
advertising that state in the ACPI _CST.

Instead use this map:

ACPI(C1) = MWAIT(C1E)
ACPI(C2) = MWAIT(C3)
ACPI(C3) = MWAIT(C7S)

BUG=chrome-os-partner:21215
BRANCH=falco
TEST=manual: emerge-falco chromeos-coreboot-falco

Change-Id: I37eb02bf9555c74e957316a1ba9778eb2b6ee128
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62898
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2013-07-22 23:13:51 -07:00
Duncan Laurie
c5c48a7b37 lynxpoint: Avoid any ME device communication in S3 path
The management engine is occasionally hanging the system on resume
when it is accessed.  Since we actually don't need to do anything
with it on resume it can be disabled early in the resume path and
avoid assigning resources just to remove them later.

BUG=chrome-os-partner:19980
BRANCH=falco
TEST=manual: suspend/resume on falco and check /sys/firmware/log
to ensure that device 00:16.0 is disabled early and that no
resources are probed or assigned and that the device init path
does not execute.

Change-Id: I35573681e3a1d43d816d24954842cbe9c61f3484
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62897
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-22 23:13:51 -07:00
Duncan Laurie
da4291d26f lynxpoint me: add support for mbp clear wait in finalize step
The management engine is slow, requiring at least 500ms between
when the Dram Init Done message is sent (right after memory training)
to when the MBP will report that it is successfully cleared and
that the ME can finally be sent the EOP message.

Currently this is adding 100-150ms to the boot time.  If we defer
waiting for the MBP Clear indicator until the finalize step we
can gain back that lost time.

BUG=chrome-os-partner:19933
BRANCH=falco
TEST=manual: boot on falco with SMI debugging enabled to
ensure that the ME is locked down in the finalize step:

Finalizing Coreboot
SMI# #0
SMI_STS: PM1 APM
ME: MBP cleared
ME: mkhi_end_of_post
ME: END OF POST message successful (0)

Change-Id: Icab4c8c8e00eea67bed5e8154d91a1eb48a492d1
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62633
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-22 15:29:00 -07:00
Duncan Laurie
45aff350ca lynxpoint xhci: Add ACPI D0/D3 workarounds
There are specific programming requirements for the usb3 ports
on all LynxPoint chipsets when transitioning to D0 or D3.

LynxPoint-LP has additional workaround steps needed involving
resetting the disconnected ports when transitioning to D0.

The workarounds are implemented in ACPI code so the controller
can transition properly into D3 at runtime.

BUG=chrome-os-partner:19975
BRANCH=falco
TEST=manual: 10000 suspend/resume cycles on falco devices

Change-Id: I3b428562f48c9cb250b97779a3b2753ed4f81509
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62632
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-22 15:29:00 -07:00
Duncan Laurie
df445366d0 Revert "lynxpoint: Move ME lock down to ramstage"
This reverts commit ff81f50f0e.

Deferring this step until the finalize stage will allow us
to defer waiting for the MBP clear indicator and speeding
up the boot.

BUG=chrome-os-partner:19933
BRANCH=falco
TEST=manual: emerge-falco chromeos-coreboot-falco

Change-Id: Ib8edffd06689e72875830cd68b5aedb7ac3b0559
Reviewed-on: https://gerrit.chromium.org/gerrit/62631
Tested-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Duncan Laurie <dlaurie@chromium.org>
2013-07-22 15:28:59 -07:00
Duncan Laurie
4e72de6221 lynxpoint: power management setup tweak
Updated from 161 ref code

BUG=chrome-os-partner:20972
BRANCH=falco
TEST=emerge-falco chromeos-coreboot-falco

Change-Id: I3e07935fec1df21f14d97d165792fe54bf9e474c
Reviewed-on: https://gerrit.chromium.org/gerrit/62128
Tested-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Duncan Laurie <dlaurie@chromium.org>
2013-07-19 12:36:10 -07:00
Hung-Te Lin
9338a35699 armv7: Remove SYS_TEXT_BASE config.
SYS_TEXT_BASE is not used by any one. To prevent confusion when changing memory
layout, remove it from current configurations.

BUG=none
TEST=emerge-peach_pit chromeos-coreboot-peach_pit
BRANCH=none

Change-Id: I15012b864bbb9c12003843b9b24ea64c91f4578b
Reviewed-on: https://gerrit.chromium.org/gerrit/61853
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2013-07-15 18:09:16 -07:00
Ronald G. Minnich
15abf49885 SLIPPY: final changes for FUI
The intel_ddi.c change I thought should be in but I don't see it. It just adds two functions back
that we need.

There are two new files for slippy annotated with comments about how it needs to evolve.

That said, this code has been tested on 3 different panels. Both dev and non-dev usages work.

physbase initialization to static value removed.

Moved spin calls to intel_dp_*

BUG=None
TEST=build and boot do MAINBOARD_DO_NATIVE_VGA_INIT enabled. Test in both dev and normal, with 3 different panels.
BRANCH=None

Change-Id: I0480af45c21c7dedcaff7e8be729f0eb554ec78a
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/61136
Commit-Queue: Ronald G. Minnich <rminnich@chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Tested-by: Ronald G. Minnich <rminnich@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
2013-07-15 14:11:12 -07:00
Shawn Nematbakhsh
d1a49946ad peppy: Duplicate SPD data for 2GB configurations.
Peppy SPD table has 4GB configurations followed by 2GB configurations.
Current implementation does remapping to point 2GB configuration to the
same SPD index as the 4GB. This is different than Falco, which simply
duplicates the SPD data for all configurations. To simplify probing in
mosys, copy the Falco implementation of duplicating SPD data.

BUG=chrome-os-partner:20891.
TEST="mosys memory spd print all" on 2GB Falco, verify data is correct.
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>

Change-Id: Idb185a437f3cf4f40d2dae1ae59c30235df8f489
Reviewed-on: https://gerrit.chromium.org/gerrit/61847
Reviewed-by: Dave Parker <dparker@chromium.org>
Reviewed-by: Jay Kim <yongjaek@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
2013-07-15 14:10:42 -07:00
Duncan Laurie
6577d1932a chromeos: Check for recovery reason code in shared data
When using RW firmware path the proper recovery reason can
be retrieved from the shared data region.  This will result
in the actual reason being logged instead of the default
"recovery button pressed" reason.

BUG=chrome-os-partner:20788
BRANCH=falco
TEST=manual:

1) build and boot on falco
2) crossystem recovery_request=193
3) reboot into recovery mode, check reason with <TAB>
4) reboot back into chromeos
5) check event log entry for previous recovery mode:

25 | 2013-07-15 10:34:23 | Chrome OS Recovery Mode | Test from User Mode

Change-Id: I6f9dfed501f06881e9cf4392724ad28b97521305
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61906
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-15 14:10:41 -07:00
Duncan Laurie
3decedc014 haswell boards: Use PECI temp sensor id 0
The EC temperature sensors were renumbered and now PECI
is at index 0.

BUG=chrome-os-partner:20432
BRANCH=falco
TEST=manual:

1) boot on falco
2) check /sys/class/thermal/thermal_zone0/temp
3) check 'temps' on ec console

Change-Id: Idde1457c42c80850b5b8ac22781060ed9b224d13
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61896
2013-07-15 14:10:41 -07:00
Duncan Laurie
df59a6774a falco: Enable RTD2132 spread spectrum at 1.0%
This may need further tuning but will start at 1.0%.

BUG=chrome-os-partner:20924
BRANCH=falco
TEST=manual: boot on falco and check /sys/firmware/log

localhost ~ # grep RTD2132 /sys/firmware/log
RTD2132: Enable 1.0% Spread Spectrum
I2C: 01:35 (Realtek RTD2132 LVDS Bridge)

Change-Id: I96e1c14dbc6a7bfaf1c8deb1806c48bf2fd3e32a
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61895
2013-07-15 14:10:40 -07:00
Duncan Laurie
4b9531b258 rtd2132: Add driver for Realtek RTD2132 LVDS bridge
This driver allows the mainboard to enable spread spectrum
clocking at 0.5%, 1.0%, and 1.5% with devicetree settings.

BUG=chrome-os-partner:20924
BRANCH=falco
TEST=emerge-falco chromeos-coreboot-falco

Change-Id: I59c61e67aa8e951fd9904ad951deb6d0ba29669e
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61894
2013-07-15 14:10:40 -07:00
Duncan Laurie
c53acb9fad lynxpoint: Add LPT-LP device id and smbus_write_byte
This is needed for SMBUS drivers to write to devices.
It was copied from existing intel southbridge driver.

BUG=chrome-os-partner:20924
BRANCH=falco
TEST=emerge-falco chromeos-coreboot-falco

Change-Id: Id0ce2393b2946a9c741413bca563a1a4dc0a4f5e
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61893
2013-07-15 14:10:39 -07:00
Ronald G. Minnich
d41811f7bb Pit: set PWM to external on Parade
The PWM is controlled externally from the APU.

BUG=None
TEST=It builds.
BRANCH=None

Change-Id: Ia5130d7616991a78dfde44043a60a32cee4f145c
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/61513
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Ronald G. Minnich <rminnich@chromium.org>
Tested-by: Ronald G. Minnich <rminnich@chromium.org>
2013-07-12 16:49:18 -07:00
Ronald G. Minnich
e406d34d80 Pit: move parade writes to mainboard.c
What gets written into the parade is highly mainboard-dependent.
So the parade_writes array needs to be there.

BUG=None
TEST=build it, then ship it.
BRANCH=None

Change-Id: Ia382d9bf1929e67b7c14d7a09f5461b71866a16b
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/61486
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Ronald G. Minnich <rminnich@chromium.org>
Tested-by: Ronald G. Minnich <rminnich@chromium.org>
2013-07-12 16:49:17 -07:00
Aaron Durbin
704a400fa9 bolt: make the gpio interrupts edge sensitive
The drivers in the kernel expect the devices using gpios
to generate interrupts to be edge sensitive. Make it so.

BUG=None
BRANCH=None
TEST=Built and booted. Devices continue to work.

Change-Id: I920ef621682d33ba081f737e97f0239f903db2f7
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61678
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-07-12 15:52:30 -07:00
Duncan Laurie
84addac9c6 slippy/falco/peppy: make GPIO interrupts be edge triggered
The drivers are designed to work with an edge triggered interrupt.

BUG=chrome-os-partner:20811
BRANCH=none
TEST=manual: ensure trackpad still works and cyapa interrupt
rate when holding a finger on the trackpad is lower.

Change-Id: I35a121ecfb6409bb9049f4d1e034185bb3bb7557
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61664
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-12 10:37:47 -07:00
Gabe Black
1865fd5525 ARM: Some Kconfig variables were missed when moving the HAVE_ARCH_*s.
BUG=None
TEST=Built and booted on Snow.
BRANCH=None

Change-Id: I0f27bca119a248e22b06b7343ddc6a4cb85f68a0
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/61532
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-11 04:26:09 -07:00
Ronald G. Minnich
c7915de81b EXYNOS5250: be less chatty at critical moments
The 5250 DRAM code is *really* chatty. That's not a great
idea in time critical code, and DRAM init is generally
very sensitive about such things.

Finally, for those things that are errors, print them
at an error level, not a debug level.

BUG=chrome-os-partner:19420
BRANCH=none
TEST=not yet

Change-Id: Ifa86b019dfd5f8ae6c8a1da2a35b5d0808dc3623
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/60100
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Ronald G. Minnich <rminnich@chromium.org>
Tested-by: Ronald G. Minnich <rminnich@chromium.org>
2013-07-10 15:31:25 -07:00
Aaron Durbin
eed7631a9d falco: drive WLAN_DISABLE_L low in S3 and S5
When the board is in S3 and S5 the WLAN_DISABLE_L signal
can leak power into the WLAN power well since the GPIO
controlling WLAN_DISABLE_L is in the suspend well. Therefore,
drive WLAN_DISABLE_L low to avoid the power leak.

BUG=chrome-os-partner:20793
BRANCH=None
TEST=Manual. Checked the WLAN_DISABLE_L signal on wlan connector in both S3 and
     S5. It is driven to ground. WLAN continues to work in S0.

Change-Id: I1a0df80dd47fdbd535aca7a9d49253794c480606
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61421
2013-07-10 12:10:00 -07:00
Hung-Te Lin
6c5a4f9b5f exynos5250: Correct DDR3 Phy-reset value names.
The name "LPDDR3PHY_CTRL_PHY_RESET_OFF" is not appropriate because the real
phy-reset is a low-active pin, so "off(0)" will trigger "start to reset".

To prevent confusion, we should rename the constants to "RESET_ENABLE" and
"RESET_DISABLE".

BUG=none
TEST=emerge-daisy chromeos-coreboot-snow
BRANCH=none

Change-Id: Iccba5ef3a2e992f877dea90741f0308c161758c9
Reviewed-on: https://gerrit.chromium.org/gerrit/61081
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
2013-07-10 11:16:42 -07:00
Duncan Laurie
832119bf1a haswell: Fix up GPU power management setup
New/more magic values from latest ref code.

BUG=chrome-os-partner:20772
BRANCH=none
TEST=manual: emerge-falco chromeos-coreboot-falco

Change-Id: Ia2655333b4daca86c2f2a76f5edcd55cdaf3f851
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61334
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-10 11:16:26 -07:00
Duncan Laurie
89db26b6da haswell: Export functions for CPU family+model and stepping
These are needed to enable workarounds/features on specific
CPU types and stepping.  The older northbridge function and
defines from sandybridge/ivybridge are removed.

BUG=chrome-os-partner:20772
BRANCH=none
TEST=emerge-falco chromeos-coreboot-falco

Change-Id: I80370f53590a5caa914ec8cf0095c3177a8b5c89
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61333
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-10 11:16:26 -07:00
Hung-Te Lin
28a634857b exynos5420: Setup clocks for MMC bus controller.
To configure source clocks on Exynos 5420 for MMC drivers.
Some registers are different from the 5250. FSYS now has two parts
and MMC uses FSYS2. The MMC block uses MPLL as the clock source.
The "high-speed" MMC interface runs as 52MHz, so divider is set
accordingly.

Also, the MMC driver has changed from MSHCI (Mobile Storage Host Controller
Interface) to DWMCI (DesignWare MMC Controller Interface).

BUG=chrome-os-partner:19420
BRANCH=none
TEST=emerge-peach_pit chromeos-coreboot-peach_pit

Change-Id: I9ba9cf43e2f2dcd9da747888c0c7676bd545177b
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/60858
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2013-07-10 11:16:00 -07:00
Shawn Nematbakhsh
9d396873d4 peppy: Add backward-compatible RAM_ID table.
Make use of google_chromeec_get_board_version to determine board
version, and apply proper RAM_ID table to load correct SPD.

BUG=chrome-os-partner:20295.
TEST=Manual. Verify correct SPD files are loaded for 2 GB and 4 GB
boards on PROTO and EVT (simulated) boards.
BRANCH=None.

Change-Id: I6a2d54759cf2ce98bf53df0db396c6e09368c714
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61192
Reviewed-by: Dave Parker <dparker@chromium.org>
2013-07-09 18:56:33 -07:00
Martin Roth
1f8f32d816 Peppy: Update Realtek ALC283 verb table
Update peppy's verb tables for the Realtek ALC283 Audio Codec.

ALC283 Configuration:
Digital Mic - NID 12h: Disabled
Speakers    - NID 14h: Enabled
Mono out    - NID 17h: Disabled
Mic 1       - NID 18h: Disabled
Mic 2       - NID 19h: Headphone Jack
Line1       - NID 1Ah: Internal Mic
Line2       - NID 1Bh: Disabled
PCBEEP      - NID 1Dh: Enabled
SPDIF       - NID 1Eh: Disabled
HP-OUT      - NID 21h: Headphone Jack

Mic 1 doesn't seem to really be available, but the documentation
refers to NID 18h as MIC1, so it's being disabled as it's not
being used.  The onboard microphone has been moved to line 1.

I had my peppy modified to attach the mic to line1 and mic1 now
works with this patch.  Mic2 looks harder to rework, so I think
that will have to wait for the DVT boards.

BUG=chrome-os-partner:20180
TEST=Play audio through system speakers and headphones.
      Verify PC Beep at boot time through system speakers
      Record audio through system Mic & external Mic connector.

Change-Id: I7d6ce6b428806b6aed1d36e7e25302fa5ae14b21
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/58880
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
2013-07-09 18:00:49 -07:00