Commit graph

8,585 commits

Author SHA1 Message Date
Ronald G. Minnich
c9fab9283a Snow: correctly disable trust zone hardware
The kernel assumes that trust zone is disabled.

BRANCH=None
TEST=Builds but I have no way to test
BUG=None

Change-Id: Ia8d6fa69adcb812a747d8b89eb77e57144423eaa
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64722
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Ronald G. Minnich <rminnich@chromium.org>
Tested-by: Ronald G. Minnich <rminnich@chromium.org>
2013-08-05 20:53:11 -07:00
Ronald G. Minnich
01f3da39d1 Pit: correctly initialize trust zone
This ensures that various trust zone things are reset,
which is important because the kernel assumes they are.

BUG=None
TEST=Build, boot, and we get a very nice chromeos screen
BRANCH=None

Change-Id: Ie02ea89885621f58a3ccc4f1729617208a264153
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64697
Tested-by: Ronald G. Minnich <rminnich@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
2013-08-05 20:53:09 -07:00
Stefan Reinauer
dc993ad29a config: Enable CBMEM console and timestamps for ARM devices
BRANCH=none
TEST=boot coreboot/depthcharge on snow, see cbmem console entry in
     coreboot table.
BUG=chrome-os-partner:18637

Change-Id: Ie45af74ccb18c75ed3cea9b2bc363c51be588fd9
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62190
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
2013-08-05 15:25:19 -07:00
Stefan Reinauer
c08ceca085 libpayload: Fix coreboot table area for ARM boards
BUG=chrome-os-partner:18637
BRANCH=none
TEST=boot on Snow, see depthcharge boot the system

Change-Id: I1f9e3ff795caa7f881ca4e9975258395ef6fee50
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62189
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
2013-08-05 13:38:46 -07:00
Stefan Reinauer
644c3265c7 Enable timestamps ARM boards' romstage
This is needed for timestamps to actually show up in
CBMEM.

Signed-off-by: Stefan Reinauer <reinauer@google.com>
BRANCH=none
TEST=cbmem -t shows timestamps
BUG=chrome-os-partner:18637

Change-Id: Ia6499cbb7c07d15b5c5210eb3911e494efbd5127
Reviewed-on: https://gerrit.chromium.org/gerrit/63992
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
2013-08-05 13:38:46 -07:00
Furquan Shaikh
b8af41d5b8 Patch to refactor code containing aux calls
Moved a lot of code from i915io.c to intel_dp.c with specific function calls

Change-Id: Ib2ed52b4f73ee0076e2dd68a26541e5bbe1366bc
Reviewed-on: https://gerrit.chromium.org/gerrit/63950
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2013-08-02 17:32:37 -07:00
Stefan Reinauer
dc673f9979 Fix timestamp output in cbmem utility on ARM
On ARM the timestamps are already in micro seconds, so
no need to convert them.

Signed-off-by: Stefan Reinauer <reinauer@google.com>
BUG=chrome-os-partner:18637
BRANCH=none
TEST=cbmem -t prints more reasonable timestamps.

Change-Id: If7363b0703e144bde62d9dab4ba845e1ace5bd18
Reviewed-on: https://gerrit.chromium.org/gerrit/63991
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
2013-08-02 16:44:39 -07:00
Stefan Reinauer
cc1a75e059 Timestamp implementation for ARMv7
Abstract the use of rdtsc() and make the timestamps
uint64_t in the generic code.

The ARM implementation uses the monotonic timer.

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

BRANCH=none
BUG=chrome-os-partner:18637
TEST=See cbmem print timestamps

Change-Id: Id377ba570094c44e6895ae75f8d6578c8865ea62
Reviewed-on: https://gerrit.chromium.org/gerrit/63793
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
2013-08-02 12:16:42 -07:00
Stefan Reinauer
570c72588a ARMv7: Fix location of CBMEM console in romstage
The CBMEM console pointer in romstage is actually a zero byte array.
This means CBMEM area has to live at the end of the allocations or
else CBMEM console will overwrite whatever comes after it.

BRANCH=none
BUG=chrome-os-partner:18637
TEST=cbmem -c prints console without nasty workaround

Change-Id: Icc59e982b724a2d396370c3a5abd8898e08baf26
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63997
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
2013-08-02 12:16:41 -07:00
David Hendricks
d60d2018d1 pit: update PMIC write sequence in romstage
This update the PMIC write sequence to be correct for newer board
revisions.

Signed-off-by: David Hendricks <dhendrix@chromium.org>

BUG=none
BRANCH=none
TEST=compile tested...

Change-Id: I2210b0d1945fb19c96a674c8fad1b0ff5a4a381e
Reviewed-on: https://gerrit.chromium.org/gerrit/64304
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
2013-08-01 23:07:16 -07:00
David Hendricks
f10511d4f5 max77802: update header
This adds #defines for BUCK2DVS1_1_2625V and BOOSTCTRL_OFF.

Signed-off-by: David Hendricks <dhendrix@chromium.org>

BUG=none
BRANCH=none
TEST=compile tested

Change-Id: I363c73ff4a645da53973767fa4bfa2c120394af6
Reviewed-on: https://gerrit.chromium.org/gerrit/64303
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
2013-08-01 23:07:16 -07:00
David Hendricks
a9a45cfea4 exynos5420: update set_cpu_id()
The current function seems to be outdated...

Signed-off-by: David Hendricks <dhendrix@chromium.org>

BUG=none
BRANCH=none
TEST=built and booted. Now we see "CPU:   S5P5420 @ 762MHz"
instead of "CPU:   S5PC420 @ 762MHz"

Change-Id: Ieb103a5fa62bda9a6b2cbd9a82fb4f72c5dd6466
Reviewed-on: https://gerrit.chromium.org/gerrit/64302
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
2013-08-01 23:07:15 -07:00
David Hendricks
a186eb1851 snow: TPS69050 -> TPS65090
This corrects a minor typo used for a part number.

Signed-off-by: David Hendricks <dhendrix@chromium.org>

BUG=none
BRANCH=none
TEST=compile tested

Change-Id: I8583cbfc3b4a6c3ad06419f5aab3ba7a8f685575
Reviewed-on: https://gerrit.chromium.org/gerrit/64301
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
2013-08-01 21:16:49 -07:00
Furquan Shaikh
001837b125 Slippy/Falco: Patch to fill in right values for PHSYNC and PVSYNC in transcoder flags
Depending upon the values decoded from edid, the function decides the appropriate bits to
be set in flags parameter (Important for fastboot to work correctly in kernel)

Change-Id: I3b0f914dc2b0fd887eb6a1f706f87b87c86ff856
Reviewed-on: https://gerrit.chromium.org/gerrit/64265
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2013-08-01 15:53:43 -07:00
Furquan Shaikh
f2010fc483 Patch to add cpu transcoder attribute to intel dp.
Also, used this attribute in the calculation of htotal and other registers
Added intel_dp_* functions for m,n registers and dimension register calculations

Change-Id: I99dd7156700d59b0b4c85e34c9aa1c6408c7f31a
Reviewed-on: https://gerrit.chromium.org/gerrit/64001
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2013-08-01 15:03:54 -07:00
Gabe Black
ca6a0bd21f kirby: pit: Fix up wakeup_need_reset.
In a previous commit the contents of wakeup_need_reset were removed because
the GPIO it referred to wasn't connected to anything on pit. I didn't realize
at that time that that could have been because we hadn't tried getting
suspend/resume working on pit and hadn't updated that file. On snow, the GPIO
is the recovery mode pin. This change updates pit to have the right GPIO,
kirby to read that GPIO, and makes the comments for both pit and kirby more
explicit and spells out the fact that this is the recovery mode GPIO.

Having a check here at all may still be a holdover from snow that isn't
applicable to pit or kirby, but since there is a parallel as far as the
recovery mode GPIO we might as well make them match while waiting for more
information.

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

Change-Id: Ic1f3f605a0fddf89e8f5668c7a8df30bdfb91d94
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64164
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-08-01 13:22:52 -07:00
Gabe Black
fdf541dffa pit: Get rid of the mostly unnecessary exynos5420.h.
Like on kirby, this header had a single constant in it that was actually used.
This change moves that constant inline and gets rid of the header file.

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

Change-Id: Ibe380396f72fddb121fb6ceb3cee24f1b9a85738
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64163
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-08-01 13:22:52 -07:00
Gabe Black
e2b31a0ac4 exynos5250: Add mct_start to the timer init blob in timer_monotonic_get.
A previous change removed init_timer from timer_monotonic_get because its old
implementation set up the PWM based timer which was going away. It would still
be a good idea to initialize the timer at that point, just not the pwm.

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

Change-Id: I4816710ec2c9d5ca53b704c6b9397bcfac183fdc
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64160
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-08-01 13:22:52 -07:00
Gabe Black
f6bbb601d9 exynos5420: Get rid of the PWM code like on the 5250.
The timer code was supposed to be using the mct, and also using the monotonic
timer infrastructure instead of the get_timer function. This change had been
made for the 5250 but not yet for the 5420.

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

Change-Id: I03a4fbb434f2346761f28fb6bd2218b526f2a4a2
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64159
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-08-01 13:22:52 -07:00
Gabe Black
b5319c331d exynos5420: Apply pwm const fix to the 5420 as well.
When the const was removed from write function arguments, a related bug in the
5250 code was fixed so that it would still compile. Unfortunately, that same
change needed to be made to the 5420.

BUG=chrome-os-partner:19420
TEST=Built for pit and saw the build succeed.
BRANCH=None

Change-Id: If15057c92422de91dc8e35dbd8b5c978bfae122a
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/64154
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-08-01 00:30:29 -07:00
Duncan Laurie
2ea982d881 falco: Enable EC controlled throttling
When the EC requests the host to throttle (for charging or thermal
related reasons) the package power consumption will be limited.

Right now this is set at 12W but that is somewhat arbitrary and may
need tuning.

1) define the THRT method in \_TZ scope for EC to call
2) enable SCI events for throttle start and stop
3) define the power limit at 12W and set it in NVS

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

1) Enable CONFIG_ACPI_DEBUG=y in the kernel

2) Enable the Debug object event in acpi module
acpi.debug_layer=0x7f acpi.debug_level=0x2f

3) Using EC console generate host event for throttle start
> hostevent set 0x20000

4) Check dmesg for throttle start events
ACPI: Execute Method [\_SB_.PCI0.LPCB.EC0_._Q12] (Node ffff8801002c5988)
[ACPI Debug]  String [0x12] "EC: THROTTLE START"
[ACPI Debug]  String [0x10] "Enable PL1 Limit"

5) Using EC console generate host event for throttle stop
> hostevent set 0x40000

6) Check dmesg for throttle stop events
ACPI: Execute Method [\_SB_.PCI0.LPCB.EC0_._Q13] (Node ffff8801002c59b0)
[ACPI Debug]  String [0x11] "EC: THROTTLE STOP"
[ACPI Debug]  String [0x11] "Disable PL1 Limit"

Change-Id: I39b53a5e8abc2892846bcd214a333fe204c6da9b
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63989
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-08-01 00:30:25 -07:00
Duncan Laurie
091e8cfa2b chromeec: Add event methods for EC requested throttle
Two new events possible from the EC for starting and stopping throttle.

These are handled in a per-board method that is defined under the
thermal zone.  This is not quite where I wanted it but the scoping
rules in ACPI don't let me have a defined external object in the
same scope.

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

Change-Id: I766f07b4365b29df3daa8e45e88f7c38c645c287
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63988
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-08-01 00:30:25 -07:00
Duncan Laurie
a3d4e65f58 falco: Drive GPIO59/LTE_DISABLE_L low on S3/S5
Try to prevent WWAN from causing spurious wakes.

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

Change-Id: Ifcc44063de0eb1634cab9dd244737071568e3455
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63987
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-08-01 00:30:25 -07:00
Gabe Black
52ce8a9a3d kirby: Clean some cruft from mainboard.c.
1. Kirby doesn't have a backlight enable GPIO on the AP since that's handled
entirely by the DP-to-LVDS bridge.
2. There is no tps65090 on the other side of the EC who's settings need to be
adjusted. If we need to turn on the LCD or backlight power manually, it will
have to be done in a different way.
3. The PMIC doesn't provide a 32KHz output for the audio codec.

BUG=None
TEST=Built for kirby.
BRANCH=None

Change-Id: Iadc5f3aec4818805edf3f2517da9e6fee87085dc
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63883
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-31 16:32:18 -07:00
Gabe Black
f44885673f kirby: Neutralize wakeup.c and delete the mostly unused exynos5420.h.
The function in wakeup.c isn't applicable on kirby. The only constant in
exynos5420.h that was used was the speed of the 4th i2c bus. Instead of having
a whole header file for that one constant used in one place, the constant is
just moved inline along with the comment it had in the header.

BUG=None
TEST=Built for kirby.
BRANCH=None

Change-Id: I5ad50c5eeaecbbf7865d76afb31a12d36c3371ee
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63882
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-31 16:32:17 -07:00
Gabe Black
10a3cdfaf3 libpayload: Add a config for peach_kirby.
BUG=None
TEST=With other changes, emerged libpayload for kirby.
BRANCH=None

Change-Id: I365a38a5621be1d42d2675d96acfdc133ec2d04d
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63876
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-31 16:32:17 -07:00
Gabe Black
d35122f057 Add a kirby board which is mostly a copy of pit.
BUG=None
TEST=Along with some other changes, emerged chromeos-coreboot-peach_kirby.
BRANCH=None

Change-Id: Ic78c65486816015f7574a13affc6e54acbbea73e
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63875
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-31 16:32:16 -07:00
Ronald G. Minnich
808ae59880 Pit: disable SYSMMU for graphics.
It's not needed and it's a potential problem source.

BUG=None
TEST=Build and boot and it works
BRANCH=None

Change-Id: Ic4cafe74e7fc3a9031d852895ad7fd5e5cd64d11
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62279
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
2013-07-31 15:40:23 -07:00
Duncan Laurie
4b1b33198d lynxpoint: XHCI: Advertise D3 as lowest wake state
The recommended value in docs is D2, but lynxpoint XHCI does not even
support D2 state which causes the kernel to think this device cannot
be used as a wake source:

kernel: xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
kernel: ACPI: Device does not support D2
kernel: xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI

Additionally this means the kernel will never put the device into D3
state by itself.  There is SMI code that will put the device into D3
before suspend so advertising D3 here should be correct.

With this change the kernel will put the controller into D3 on suspend
and back to D0 on resume, including executing the ACPI methods
for _PS0/_PS3 that contain chipset specific workarounds.

In addition add a _PSC method to directly return the D state from the
device registers.  With ALL USB devices removed the XHCI controller
goes into D3 state and the kernel can have a hard time determining
the state of the device at boot.

BUG=chrome-os-partner:21342
BRANCH=falco,peppy
TEST=emerge-falco chromeos-coreboot-falco

A kernel compiled with CONFIG_ACPI_DEBUG=y and module parameters
acpi.debug_layer=0x7f acpi.debug_level=0x2f can be used to see
what ACPI methods are executed:

kernel: xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
kernel: ACPI: Execute Method [\_SB_.PCI0.XHCI._PS3] (Node ffff8801000a7f50)
kernel: ACPI: Preparing to enter system sleep state S3
...
kernel: ACPI: Waking up from system sleep state S3
kernel: ACPI: Execute Method [\_SB_.PCI0.XHCI._PS0] (Node ffff8801000a7f28)
kernel: xhci_hcd 0000:00:14.0: power state changed by ACPI to D0

Change-Id: Ic64040eb4dd1947a1e2f0ee253a64be683e0ec70
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>

meld with s3d

Change-Id: Ic6789720c4efe661dcb03a4afce8d88115854472
Reviewed-on: https://gerrit.chromium.org/gerrit/63916
Tested-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Duncan Laurie <dlaurie@chromium.org>
2013-07-31 13:15:56 -07:00
Duncan Laurie
7c0e8045b6 lynxpoint: Fix issues with XHCI init
- Put the device into D0 and not D3 so memory bar is available
and the subsequent commands actually do something useful
- Remove set of 818Ch[7:0]=FFh (gone in ref code)
- Fix reg 0x40/0x44 mixup

BUG=chrome-os-partner:19975
BRANCH=falco,peppy
TEST=emerge-falco chromeos-coreboot-falco

Verify that expected bits are set:
localhost ~ # pci_read32 0 0x14 0 0x10
0xe0500004
localhost ~ # mmio_read32 0xe0508144
0x000003ff
localhost ~ # mmio_read32 0xe050816c
0x000f0038

Change-Id: I388398e8c7d11e538ca18dab55d8bbd9b88f17df
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63801
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-31 13:15:55 -07:00
Duncan Laurie
5d0b487815 lynxpoint: Route all USB ports to XHCI in finalize step
This commit adds a new Kconfig option for the LynxPoint
southbridge that will have coreboot route all of the USB
ports to the XHCI controller in the finalize step (i.e.
after the bootloader) and disable the EHCI controller(s).

Additionally when doing this the XHCI USB3 ports need
to be put into an expected state on resume in order to make
the kernel state machine happy.

Part of this could also be done in depthcharge but there
are also some resume-time steps required so it makes sense
to keep it all together in coreboot.

This can theoretically save ~100mW at runtime.

BUG=chrome-os-partner:21342
BRANCH=falco,peppy
CQ-DEPEND=CL:63800
TEST=emerge-falco chromeos-coreboot-falco

Verify that the EHCI controller is not found in Linux and
that booting from USB still works.

Change-Id: I3ddfecc0ab12a4302e6034ea8d13ccd8ea2a655d
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63802
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-31 13:15:55 -07:00
Duncan Laurie
2775738ea9 lynxpoint: Move USB SMI sleep code to separate USB files
Move this to the existing USB source files so they can share some
helper functions and keep the main smihandler code cleaner.

The XHCI sleep prepare code now implements the actual sleep
preparation steps from the ref code instead of the docs.

BUG=chrome-os-partner:19975
BRANCH=falco,peppy
CQ-DEPEND=CL:63802
TEST=emerge-falco chromeos-coreboot-falco

Change-Id: Ic90adbdaba947a6b53824e548c785b4fb3990ab5
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63800
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-31 13:15:55 -07:00
Duncan Laurie
2abf25d5f1 lynxpoint: Don't write to non-existent EHCI
The LynxPoint-LP chipset only has one EHCI controller so we should
not attempt to write into the second one that only exists on LynxPoint-H.

BUG=chrome-os-partner:21342
BRANCH=falco,peppy
TEST=emerge-falco chromeos-coreboot-falco

Change-Id: I1eae060c7f0a5873c9684e5abfeea5cb5895ab62
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63799
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-31 13:15:54 -07:00
Duncan Laurie
3a9f8c4a86 slippy/falco/peppy: Route USB to XHCI on resume
Turn on the pei_data flag that will instruct the reference code
binary to route all USB ports to the XHCI controller on resume and
disable the EHCI controller(s).

BUG=chrome-os-partner:21342
BRANCH=falco,peppy
TEST=emerge-falco chromeos-coreboot-falco

Change-Id: I2f2ed853a6d17f90ea524bc516f3e78079222739
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63798
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-31 13:15:54 -07:00
Duncan Laurie
594298a124 haswell: Add pei_data field for USB routing
The linux kernel will unconditionally route all USB
ports to the XCHI controller at boot.  The EHCI controller
can then be disabled, and it should be left disabled
by the reference code when this is done.

However not all OS may do this unconditional route,
so provide an option to the reference code binary to
enable this behavior.

BUG=chrome-os-partner:21342
BRANCH=falco,peppy
CQ-DEPEND=CL:*41929
TEST=emerge-falco chromeos-coreboot-falco

Change-Id: Iedf5af54182bf109cd1119c1999e46300665d41e
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63797
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-31 13:15:53 -07:00
Furquan Shaikh
6291e54244 Patch to calculate transcoder flags based on pipe config.
Works fine with all three panels with the change of 6 bits per color.

Change-Id: Ia47d152e62d1879150d8cf9a6657b62007ef5c0e
Reviewed-on: https://gerrit.chromium.org/gerrit/63762
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2013-07-31 12:33:20 -07:00
Gabe Black
e75fbadde3 exynos5250: Get rid of the PWM timer code we shouldn't be using anymore.
This code was left over from U-Boot and was superceded by the MCT.

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

Change-Id: Ia85e3b7281dcdd4740238dddd0dfc6f0ba2c94da
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63778
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-31 12:33:06 -07:00
Gabe Black
1e18d98b9a ARM: Don't use const pointers with the write functions.
This functions are by definition changing the data pointed to by their
arguments, so they shouldn't by const.

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

Change-Id: Id29b3f76526aba463f8bb744f53101327f9c7bde
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63777
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-31 12:33:06 -07:00
Gabe Black
9d955a3a90 arm: Remove __image_copy_end from the ARM linker script.
That symbol isn't used by anything and doesn't appear in other linker scripts.

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

Change-Id: Iab54ecb3be2e262d7674ef8ee7ed13ea2e5b56f3
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/63776
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-07-31 12:33:05 -07:00
Duncan Laurie
2b94099847 haswell boards: fix SATA interrupt in ACPI
SATA is routed to PIRQG which should be interrupt 22
and not interrupt 21.  The kernel uses MSI with this
device so this is only seen when booting with pci=nomsi

BUG=none
BRANCH=falco,peppy
TEST=manual: boot kernel with pci=nomsi

Change-Id: Ic90ca2c561fc4c53ec1d395c05872222c65ff98a
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63796
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-07-31 12:32:39 -07:00
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