Commit graph

9,093 commits

Author SHA1 Message Date
Ronald G. Minnich
032b8a0c9f tegra: get rid of struct members that are not used
First step in cleanup is to at least get rid of junk
we don't need.

BUG=None
TEST=Builds and boots to dev screen
BRANCH=None

Change-Id: I0a31995f0de481e27805cbcec4cdbc905ee00d9e
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/176023
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
2013-11-07 04:41:05 +00:00
Duncan Laurie
f95d2f0416 rambi: Fix eDP panel functionality
For some mysterious reason GPIO_S0_NC22 is making the eDP panel
go entirely white when it is configured with internal pullup.
Since these (supposedly XDP related) pins are unknown functionality
lets set them to GPIO_DEFAULT instead of GPIO_NC.

Additionally the VBIOS is being changed to issue int15 callback
to determine the boot graphics device.  If we list both LFP and EFP
then the dev/rec screens will show on the panel when HDMI is not
attached and otherwise will display on HDMI.

BUG=chrome-os-partner:23507
BRANCH=rambi
TEST=build and boot on rambi, see firmware/kernel screens on the panel
when HDMI is not attached, and firmware screens on the panel and
kernel screens on both when HDMI is attached.

Change-Id: Ieb05a591d63c4f8e09fa154eeb76004d32579508
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175952
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-06 23:29:06 +00:00
Gabe Black
cf68626942 Exynos5420: Fix up the i2c driver for use with the TPM driver
The TPM driver expects to call i2c_read with zero address length. The i2c
driver wasn't prepared to handle that particularly in the case of reads
because it expected to send an address before switching over to read mode for
the data. This change also fixes up the read and write calls to consistently
be read32 and write32 instead of readl and writel.

BUG=None
TEST=Saw the TPM initialized successfully in coreboot.
BRANCH=None

Change-Id: I33dee89b83d4cd9d3e1b90e84b40e761bb8d4de4
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175966
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
2013-11-06 22:30:07 +00:00
Aaron Durbin
03255c7bd8 baytrail: add support for S3 resume
Previously the only path through memory init and coreboot was
hardcoding S5. Therefore all S3 paths would not be taken. Allow
for S3 resume to work by enabling the proper control paths in
romstage.

BUG=chrome-os-partner:22867
BRANCH=None
TEST=While in kernel 'echo mem > /sys/power/state'. Board went
     into S3. Power button press resumed back into kernel.

Change-Id: I3cbae73223f0d71c74eb3d6b7c25d1b32318ab3e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175940
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-11-06 20:27:43 +00:00
Ronald G. Minnich
4e513196b0 tegra124: clean up tabbing; nyan: add a comment and setting to devicetree.cb
These are almost not worth their own CL but I did not want to clutter
up a later CL with them.

BUG=None
TEST=Build, boots, get graphics
BRANCH=None

Change-Id: I16489b767ce01addd522528889878bf5875d197e
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175889
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
2013-11-06 20:27:29 +00:00
Ronald G. Minnich
e98be569b0 tegra124: move dp.c from tegra to tegra124
This code has got just enough SOC special-cases in it that
it should be in tegra124. Also, long term, we hope to blow
the file into bits and disperse its functions into
display.c

BUG=None
TEST=Build, boot, see graphics
BRANCH=None

Change-Id: Ifda97b24eb678f9c4ff5a967e2a92ee2512c5081
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175830
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
2013-11-06 06:20:59 +00:00
Aaron Durbin
e32747242a libpayload: adjust max number of memranges
Rambi currently has more than 16 memory ranges. Because of
this libpayload is silently dropping them and the full amount
of memory is not being properly wiped. Correct this by bumping
the number of ranges to 32.

BUG=None
BRANCH=None
TEST=Built and booted rambi. Noted that the full amount of memory
     was being properly wiped.

Change-Id: Ida456decf2498cb1547c0ceef23df446a975606b
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175792
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
2013-11-06 05:19:11 +00:00
Aaron Durbin
6fa6ea40b8 bayleybay: fix build issue
The addition of irqroute.c to bayleybay's Makefile.inc was
accidentally omitted. Rectify this.

BUG=None
BRANCH=None
TEST=built bayleybay

Change-Id: I448438b36c3944854c1d63baeda4c9d8b34f16d0
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175780
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
2013-11-06 05:19:06 +00:00
Ronald G. Minnich
80402876b5 tegra124: more display PLL setup and clock hardcode removal.
Set up two new PLLs in the early clock code. Clear reset and enable
clocks using the standrd function called from mainboard_init. Remove
more hardcodes from display startup.

This should be the end of moving clock code around. Next step is to
remove all the display programming hardcodes for front porch, back porch,
etc. and use the settings from the coreboot device tree.

BUG=None
TEST=Build, boot, see graphics
BRANCH=None

Change-Id: I324e57f665bbd11c1d09fb4b9ec14646d0785e5f
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175732
Reviewed-by: Ronald Minnich <rminnich@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
2013-11-05 22:45:06 +00:00
Ronald G. Minnich
32dd9947a6 nyan: move clock setup for the display out of dca_init
We can use the mainboard clock startup for this.

This is Step 1. I'm doing this in pieces so bisect is
easy if needed.

BUG=None
TEST=build and boot and see dev mode graphics
BRANCH=None

Change-Id: Id6d5a06b550c44c983aed42c639145cf46e301ce
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175656
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
2013-11-05 22:45:00 +00:00
Aaron Durbin
586483d49e baytrail: fix up FADT
The FADT for baytrail had incorrect offsets leading to
the kernel spewing a huge mess of ACPI errors. Fix these offsets
to be initialized in the chipset code.

BUG=chrome-os-partner:23505
BRANCH=None
TEST=Built and booted into kernel on rambi. Login screen comes up.

Change-Id: I89fc2a4fd800ff01cedf89b51cfb1369aceb9f03
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175663
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-11-05 19:18:27 +00:00
Aaron Durbin
0eac4a8753 baytrail: interrupt routing support
This provides the initial support for interrupt routing
in bay trail. It includes both acpi changes and board changes
to ensure the interdependencies are met with the current ASL
code. The PIRQ routing is handled by the mainboard exporting
an irqroute.h header that describes the per device and PIRQ
PCI settings.

There are still a lot of ACPI errors in the kernel with this
change, though.

BUG=chrome-os-partner:23505
BRANCH=None
TEST=Built and booted rambi into kernel.

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: Id8a865a24fc8d49743c0b54efdb64aaef52fcd8e
Reviewed-on: https://chromium-review.googlesource.com/175700
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-11-05 19:18:23 +00:00
David Hendricks
873e6f9e95 tegra124: enable flow control for APBDMA in SPI driver
This enables flow control and sets the REQ_SEL field according
to the SPI bus.

Since REQ_SEL is just a constant that is associated with each
channel, a member is added to the tegra_spi_regs struct to hold
the appropriate value.

BUG=none
BRANCH=none
TEST=built and booted on Nyan
Signed-off-by: David Hendricks <dhendrix@chromium.org>

Change-Id: I037aee7e2d422e24a4cbcbc75280ec3c93d3e7bd
Reviewed-on: https://chromium-review.googlesource.com/175630
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
2013-11-05 04:36:41 +00:00
Duncan Laurie
92d551f851 baytrail: Add default _OSC method
This is needed to let the kernel know it can control everything
and not to disable features.

BUG=chrome-os-partner:23505
BRANCH=rambi
TEST=build and boot on rambi

Change-Id: I40ff15bb931a9be7c31509ec84489083b5af0a82
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175629
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-05 03:37:51 +00:00
Duncan Laurie
68997f4839 baytrail: Add root bus resource regions
Populate the PCI mmio region from NVS TOLM variable.
Other regions are fixed.

BUG=chrome-os-partner:23505
BRANCH=rambi
TEST=build and boot on rambi

Change-Id: Iec8352b0464ad850a76bd1706c028628c477731d
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175628
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-05 03:37:47 +00:00
Duncan Laurie
91562125c9 baytrail: Add MCFG table to ACPI
This adds the PCI configuration region table to baytrail.

BUG=chrome-os-partner:23505
BRANCH=rambi
TEST=build and boot on rambi

Change-Id: I0d975709a4a18d0f1c5e24581c9fd2190fe2996b
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175627
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-05 03:37:45 +00:00
Duncan Laurie
c04eb63898 baytrail: Clean up NVS region
There is a lot of NVS allocated to things that are not really
used.  Most of these are removed and some are moved around.
Thermals are expected to be handled with DPTF so I've removed
that bit of code but have not yet cleaned up the thermal zone.

I left in the SIO BARs since I think we will need those still
even though they may need work still.

BUG=chrome-os-partner:23505
BRANCH=rambi
TEST=build and boot on rambi

Change-Id: Id16ee67e6b3709a303c001afd72947147f938127
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175626
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-05 03:37:41 +00:00
Duncan Laurie
71f792b4ff baytrail: Add function to read top of low memory
The top of low memory is also the start of the region where
PCIe resources are allocated.  This needs to be passed in
ACPI but is only readable from IOSF.

BUG=chrome-os-partner:23505
BRANCH=rambi
TEST=build and boot on rambi

Change-Id: Iad95335f72dc3e35b837bedb8d52d388c861a330
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175625
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-05 03:37:37 +00:00
Duncan Laurie
5105e01b32 baytrail: Add reserved MMIO regions to ACPI
Add a length define for all the reserved MMIO regions and
use them in the ACPI code to reserve the regions there.

Add a region for the "abort page" documented in the EDS.

BUG=chrome-os-partner:23505
BRANCH=rambi
TEST=build and boot on rambi

Change-Id: I2060dca0636a2fdc0533ddd0826f94add2c272c3
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175624
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-05 03:37:33 +00:00
David Hendricks
1a0a900f2d tegra124: Clean up some #defines for DMA
This shortens the grostesquely huge APBDMACHAN_* defines by
removing unecessary prefixes. Names of fields which appeared at
the end of these huge #defines are preserved as they are
presented in the manual, so searching for them is still easy.

The goal is to make it so that we can actually use the #defines
without the code becoming a hideous, line-broken mess. As they were,
the #defines made code so ugly that it actually became less readable.

Additionally, a couple trivial issues were found and fixed:
- Removes duplicate AHB bus width #defines
- Removes a non-sensical #define that seems to be a result of an
  incompleted copy+paste job.

BUG=none
BRANCH=none
TEST=built and booted on Nyan
Signed-off-by: David Hendricks <dhendrix@chromium.org>

Change-Id: I72195ff08ef51bb645a1e1ae5a11346998a12635
Reviewed-on: https://chromium-review.googlesource.com/175631
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
2013-11-05 02:33:08 +00:00
Ronald G. Minnich
b8eb6ab4cd tegra124: add clock support code for graphics.
Add a graphics_clock function which is where we intend to do all clock
graphics init. This is modeled on how we are doing the UART clock; keep
it all in one place, not spread everywhere. Add sor_clock_{start,stop}
functions. We must start and stop the SOR clocks beore we mess with the
plldp.

BUG=None
TEST=This code builds and boots and shows graphics and depth charge screen.
BRANCH=None

Change-Id: Ida4a73f9020e5542f16d2ab0793fb2116156d562
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175162
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
2013-11-05 02:32:48 +00:00
Ronald G. Minnich
df4c515d73 tegra124: add the _x clocks to clock_enable_clear_reset
These need to be supported for graphics.

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

Change-Id: Ie02cbd3012b320bb59be9e0fb899c09000f29a1b
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175539
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
2013-11-04 23:15:52 +00:00
Duncan Laurie
afefe43b96 baytrail: Fix XHCI problems and re-enable
- a few clock gating bits were set improperly and was preventing
the system from transitioning out of S0 state.
- the XHCCI registers were not getting the top byte set properly
which includes things like DMA write request size and request
boundary crossing control.  This was causing memory corruption.

BUG=chrome-os-partner:23635
BRANCH=rambi
TEST=build and boot kernel from USB on rambi with XHCI driver

Change-Id: I8e8135a793dfbaa1f163766702e3a8f19bba9703
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175558
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-04 23:15:45 +00:00
Duncan Laurie
588c6623ec baytrail: Reserve memory between ASEG and 1MB and for ramoops
Low system tables are in this region, and it is probably safer
to keep ASEG reserved.

Also keep the region used by ramoops from being used by the OS
and from being cleared by developer mode boots.

Lots more work needed to make the ACPI tables fully functional.

BUG=chrome-os-partner:23505
BRANCH=rambi
TEST=boot on rambi and see that the kernel finds RSDP and uses ACPI

Change-Id: I4f7064d3cff14a3ecf15b194a1f20c1fa9d5e134
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175554
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-04 23:15:34 +00:00
Duncan Laurie
fcf3950c0a rambi: Enable USB boot with EHCI controller
This adds the EHCI driver back to libpayload and configures
the devicetree to route ports to EHCI.

This is hopefully just temporary until the issues with XHCI
can be worked out.

BUG=chrome-os-partner:23635
BRANCH=rambi
TEST=build and boot from USB on rambi

Change-Id: I0549661f5e5fd83477f4839a05e7e21175b24b64
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175513
2013-11-04 04:32:50 +00:00
Duncan Laurie
fa5f1f517c baytrail: Add EHCI initialization
This adds required steps to initialize the EHCI controller
on the baytrail platform.

BUG=chrome-os-partner:23635
BRANCH=rambi
TEST=build and boot from USB on rambi

Change-Id: I3a5487791e2305616036d4550e260a178c0e1c4d
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175512
2013-11-04 04:32:46 +00:00
Duncan Laurie
cfc480404c baytrail: Add XHCI initialization
This adds required steps to initialize the XHCI controller
on the baytrail platform.

Actually using XHCI is causing lots of bad behavior including
apparent memory corruption.

BUG=chrome-os-partner:23635
BRANCH=rambi
TEST=build and boot on rambi

Change-Id: Ic43e04f4b47e107ec3bb0c387a9fc72c3cae0271
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175511
2013-11-04 04:32:43 +00:00
Ronald G. Minnich
8d4d61be7d Fix the reg_script stuff to not be used in ARM builds and not break them.
The reg_script stuff only makes sense for those platforms that
need it: ARM V8 and all x86. Have its usage controlled by a config variable.

BUG=None
TEST=the broken nyan build is fixed.
BRANCH=None

Change-Id: Iad54773f412e2d829e68b98fd845cd72ae408ee1
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175530
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-11-02 01:07:13 +00:00
Aaron Durbin
6a9bd07c48 baytrail: add audio clock workaround for LPE
Apparently the LPE device needs a 25MHz clock. Provide
the work around to enable this clock.

BUG=chrome-os-partner:23791
BRANCH=None
TEST=Built and booted. Confirmed setting being applied.

Change-Id: Ibff5563436b3025eb8b61ffee3302bd2da872b39
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175493
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-11-02 00:08:48 +00:00
Aaron Durbin
1d7341bb6a baytrail: add ccu iosf access functions
The clock control unit needs to be accessed to configure
some of the devices properly. Therefore. provide a way
to access the CCU.

BUG=chrome-os-partner:23791
BRANCH=None
TEST=Built.

Change-Id: I30ed06e6aef81ee99c6d7ab3cbe8f83818b8dee5
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175492
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-11-02 00:08:45 +00:00
Aaron Durbin
d8cc529c5a baytrail: HDA function disable workaround
Parts of the audio path are common between the HDA and LPE.
However, those parts are power-controlled by the D-state of
the HDA device. Therefore, one cannot put the HDA into D3Hot
because those audio paths will be shutdown.

BUG=chrome-os-partner:22871
BRANCH=None
TEST=Built and booted through depthcharge. Disabling HDA still
     causes a shutdown when performing warm reset, however I
     was able to verify the magic sequence was being performed.

Change-Id: I3b01356d85a4b7b902bd896b8eb9e7bc509fcc42
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175491
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-11-02 00:08:41 +00:00
Aaron Durbin
7034936b15 baytrail: allow function disable on TXE
Previously it was not known how to put the TXE pci device
into D3Hot. It's been disseminated that this is not a requirement
for disabling the TXE pci device in the function disable register.
Therefore, allow this by returning 0 from place_device_in_d3hot().

BUG=chrome-os-partner:22871
BRANCH=None
TEST=Temporarily set TXE to be disabled. Noted FUNC_DIS was being
     set accordingly.

Change-Id: Ibf537bf8ba718859591dc89bdf41e57c1ea9d836
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175490
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-11-02 00:08:37 +00:00
Duncan Laurie
b575832440 baytrail: Switch graphics init to use reg_script
This is an example consumer of the register script handler.

BUG=chrome-os-partner:23507
BRANCH=rambi
TEST=build and boot on rambi and see recovery screen

Change-Id: I4954a5defd0a345b179819b9f6bb15ea340a6715
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175214
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
Tested-by: Aaron Durbin <adurbin@chromium.org>
2013-11-01 20:07:20 +00:00
Duncan Laurie
49150a1494 Add a generic register script handler
This is based on the RCBA configuration setup from haswell.
It handles PCI, BARs, IO, MMIO, and baytrail-specific IOSF.
I did not extend it to handle MSR yet but that would be another
potential register type.

There are a number of approaches to this kind of thing, but in the
end they have a lot of switch statements and a mass of #defines.
I'm not particularly set on any of the details so comments welcome.

BUG=chrome-os-partner:23635
BRANCH=rambi
TEST=emerge-rambi chromeos-coreboot-rambi

Change-Id: Ib873936ecf20fc996a8feeb72b9d04ddb523211f
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175206
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
Tested-by: Aaron Durbin <adurbin@chromium.org>
2013-11-01 20:07:16 +00:00
Aaron Durbin
f3803cbe6a baytrail: use common code for iosf accessors
The same sequence is used regardless of the port
being read or written. Therefore, use the same
implementation for reading or writing to a port.

BUG=None
BRANCH=None
TEST=Built and booted through depthcharge. Dev and recovery
     screens still work. Nothing bizarre in console output.

Change-Id: I1a64b54b50472fa7d601e199653eb4a76accf910
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175441
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-11-01 18:12:06 +00:00
Aaron Durbin
c25afd90fb baytrail: add lpss iosf functions and regs
The low power subsystem devices have a lot of their
configuration done in the IOSF sideband message space.
Add support for these access methods.

BUG=chrome-os-partner:23790
BRANCH=None
TEST=Built and booted through depthcharge.

Change-Id: I0dd52b952a16ef1280c29301164db041ee87f636
Signed-off-by: Aaron Durbin <adurbin@chromum.org>
Reviewed-on: https://chromium-review.googlesource.com/175440
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2013-11-01 18:12:02 +00:00
Duncan Laurie
c081a73115 baytrail: Fix EHCI function number and XHCI typo
BUG=chrome-os-partner:23635
BRANCH=rambi
TEST=successfully disable EHCI controller in devicetree.cb

Change-Id: I8a22e25a9f7c263d2a6debf0cd1606cb0f6f7645
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175403
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-11-01 17:13:04 +00:00
David James
49e5a1c3e3 COMMIT-QUEUE.ini: Add documentation.
BUG=chromium:285940
TEST=none

Change-Id: I90ee8999ed8b5234b622ea02bfe580068aaff01e
Reviewed-on: https://chromium-review.googlesource.com/175327
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2013-11-01 14:08:42 +00:00
Ronald G. Minnich
967193d598 tegra124: fix incorrect struct member in clk_rst.h
BUG=None
TEST=Builds and boots
BRANCH=None

Change-Id: I59209fe23cd74fbe74ef3f8de771e6a4cff7ab31
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175270
Tested-by: Ronald Minnich <rminnich@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
2013-10-31 23:02:22 +00:00
Ronald G. Minnich
3f8a844bd2 tegra124: add CLK_X definitions
BUG=None
TEST=builds
BRANCH=None

Change-Id: I163730e45cc18f125e32a1b4c5a685b3a1861486
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/175220
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2013-10-31 23:02:19 +00:00
Duncan Laurie
5bb4bc59e3 samus: GPIO updates for Proto1b
Move NFC_INT to GPIO9
Swap CODEC_INT to GPIO46 and WLAN_DISABLE_L to GPIO42
Swap ACCEL_INT to GPIO45 and PP1800_CODEC_EN to GPIO43
Enable PP1800_CODEC_EN, CODEC_LDOENA, CODEC_RESET_L

BUG=chrome-os-partner:23752
BRANCH=samus
TEST=emerge-samus chromeos-coreboot-samus

Change-Id: I5547d34f1b7953808375aa5fe5e0a9640ae7e05e
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175291
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-10-31 20:52:03 +00:00
Aaron Durbin
aa3d1be6aa baytrail: increment boot count for elog
The elog boot counter in cmos was not being initialized
nor incremented. Start doing that in romstage. Since S3
resume is not detected yet the increment is unconditional.

BUG=None
BRANCH=None
TEST=Built and booted through depthcharge multiple times. Noted
     output such as 'Boot Count incremented to 4'.

Change-Id: Ic585d4ad4b3af086e0067e28fe0f35c02979bbd2
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174717
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-10-31 18:43:29 +00:00
Aaron Durbin
6eae0c8f40 baytrail: add GNVS to cbmem and set acpi_slp_type
The ACPI code was previously complaining about not being able
to find the GNVS area: 'ACPI: Could not find CBMEM GNVS'. Fix
this by adding GNVS area early in start up. This is also the
appropriate place to set the acpi_slp_type variable to indicate
an S3 resume or not.

BUG=chrome-os-partner:22867
BUG=chrome-os-partner:23505
BRANCH=None
TEST=Built and booted through depthcharge. Noted cbmem has 'ACPI GNVS'
     entry.

Change-Id: Ifbca3dd390ebe573730ee204ca4c2f19626dd6b1
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174647
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-10-31 18:43:26 +00:00
Aaron Durbin
3148928957 baytrail: fix uninitialized acpi structures
The callers of the following functions assume the storage
area provided by the pointers is initialized. That's not the
case as these were just place holders.
- void acpi_create_intel_hpet(acpi_hpet_t * hpet);
- void acpi_create_serialio_ssdt(acpi_header_t *ssdt);

To fix this properly initialize the hpet entry, and just remove
the serialio_ssdt function entirely.

BUG=chrome-os-partner:23505
BRANCH=None
TEST=Built and booted through depthcharge on rambi. Noted no more
     ACPI errors relating to invalid length.

Change-Id: If56ab033562ef2d755e9c9de42f507c95d291aba
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174716
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2013-10-31 18:43:22 +00:00
Duncan Laurie
775eb8bd06 baytrail: Add IOSF functions for USBPHY and USHPHY
These are needed for USB2 and USB3 PHY init sequences.

BUG=chrome-os-partner:23635
BRANCH=rambi
TEST=emerge-rambi chromeos-coreboot-rambi

Change-Id: Id284d882034e15eceeaa910b8b73bc0d8d895199
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175227
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-10-31 18:42:57 +00:00
Duncan Laurie
7f1613c59c rambi: Enable internal keyboard
The EC LPC init function needs to run to enable the internal keyboard.

I needed this to confirm that it is just USB keyboards that are causing
all sorts of issues.

BUG=chrome-os-partner:23635
BRANCH=rambi
TEST=boot to recovery screen and hit tab

Change-Id: Iea0fc66ba62ea7da71ef83c26e25ae32bef102bd
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175207
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-10-31 18:42:53 +00:00
Julius Werner
c8f086711c tegra124: Set Tx FIFO threshold value to recommended setting
This is essentially a direct port of CL:174505. It sets the EHCI
controllers Tx FIFO threshold setting to the recommended value for HOST
mode, which seems to help prevent FIFO underruns between the memory/AHB
and the host controller. This is necessary to get larger OUT transfers
to work, but there are still a few more general clock changes
concerning other AHB problems needed before they will really be usable.

BUG=None
TEST=None

Change-Id: I12783ba0a986678715d42e3d798756fa3d1ad690
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175200
Reviewed-by: Gabe Black <gabeblack@chromium.org>
2013-10-31 17:38:24 +00:00
Shawn Nematbakhsh
aaa3f1c908 rambi: Enable SATA port
Enable first SATA port in Rambi device tree.

BUG=chrome-os-partner:23643
TEST=TEST=Manual, in dev mode. Verify on rambi that SATA disk is
detected, and kernel is found + booted.

Change-Id: Ic0cb5f9ff17ca0f6cc7941f203b9338df200811d
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174916
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-10-30 23:10:25 +00:00
Shawn Nematbakhsh
4c34415bb7 baytrail: Add SATA driver
Add SATA driver for baytrail platform.

BUG=chrome-os-partner:23643
TEST=Manual, in dev mode. Verify on rambi that SATA disk is detected, and
kernel is found + booted.

Change-Id: I5c13e03203c8f26d233c7d10af8ff6812c460578
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174914
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-10-30 23:10:18 +00:00
David James
1ad894c129 Ignore failures in HWTest and VMTest in the commit queue.
Right now, firmware changes are rejected if the HWTest or VMTest
stages fail. This is unnecessary as firmware changes are very unlikely
to break these stages.

BUG=chromium:285940
TEST=Run it with my CL to ignore HWTest and VMTest

Change-Id: I4910b45df4c0a53f7d198f8f48454921d0198d7f
Reviewed-on: https://chromium-review.googlesource.com/175016
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Matt Tennant <mtennant@chromium.org>
2013-10-30 21:52:16 +00:00