Commit graph

7,608 commits

Author SHA1 Message Date
Duncan Laurie
5d166a0c4d broadwell: Changes from 2.2.0 ref code
- The SATA CAP register setup was moved outside the refcode blob we run
so it needs to be set up by coreboot again...
- Slight tweak to fast ramp voltage for broadwell CPU

BUG=chrome-os-partner:25491
BRANCH=None
TEST=Build and boot on samus

Change-Id: I7bdc0811ad8f28ab0912972036dca59d229b0173
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214024
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-25 20:53:09 +00:00
Shawn Nematbakhsh
f72d453134 auron: Remove FUI code
Remove FUI-related code, as it seems not ready for production and makes
life easier with future integrations.

BUG=chrome-os-partner:31286
TEST=Compile only.
BRANCH=None.

Change-Id: Ie75cf13fe5b598a17f0b3a6ad458e55f9423125d
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213952
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-08-25 20:53:06 +00:00
Shawn Nematbakhsh
983c99b6d1 auron: Mainboard code cleanup
Remove unneeded configs + board version selection logic, and make minor
style changes.

BUG=chrome-os-partner:31286
TEST=Compile only.
BRANCH=None.

Change-Id: I715793a580e86d69a8c07fd2905b2336bd6b031f
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213951
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-08-25 20:52:42 +00:00
Shawn Nematbakhsh
a810efc777 auron: Initial mainboard commit
Cloned entirely from Peppy with only string / copyright date changes.

BUG=chrome-os-partner:31286
TEST=Compile only.
BRANCH=None.

Change-Id: Icf394bdcc44d02dfdaf0190aff6f5877d5cb461f
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213913
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-08-25 20:52:35 +00:00
Duncan Laurie
740ac0bb7e samus: Updates for EVT board
- Remove NFC GPIOs
- Change EC wake to GPIO27
- Enable wake on HOTWORD_DET_L_3V3
- Add new Hynix memory SKU

BUG=chrome-os-partner:31549
BRANCH=none
TEST=emerge-samus coreboot, cannot fully test until EVT

Change-Id: Ia25fc39f0b67c53305b3fd9150117d6a7867eb3a
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213796
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-25 20:52:31 +00:00
Duncan Laurie
9dc8e7ae61 samus: Switch to using broadwell platform ASL
Instead of providing a local copy use the chipset provided one.

BUG=chrome-os-partner:28234
BRANCH=none
TEST=build and boot on samus

Change-Id: I60dd9bbeefbf4298511abec54635c515fc9b1621
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213793
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-25 20:52:27 +00:00
Duncan Laurie
3e40cb804e broadwell: Add broadwell specific platform ASL
This can be shared between mainboards, they are still free
to override if needed.

BUG=chrome-os-partner:28234
BRANCH=none
TEST=build and boot on samus

Change-Id: I85fae6e254adcbda1c52410d5ba046f3f05b54c0
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213792
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-25 20:52:13 +00:00
David Hendricks
d088fc71b2 vboot: Introduce kconfig variable for VBNV backing storage
This introduces a new kconfig variable to select the VBNV backing
store explicitly instead of inferring it from CPU/SoC architecture.

x86 platforms have historically relied only on CMOS to store VBNV
variables, while ARM-based platforms have traditionally relied on
the EC. Neither of those solutions are going to scale well into
the future if/when CMOS disappears and we make ARM-based systems
without an EC.

BUG=chrome-os-partner:29546
BRANCH=none
TEST=compiled for nyan_blaze and samus

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I4a8dadfb6bb666baf1ed4bec98b29c145dc4a1e7
Reviewed-on: https://chromium-review.googlesource.com/213877
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
2014-08-25 04:52:51 +00:00
David Hendricks
45e0c4b9aa Trivial formatting fix
Vim picked up a missing newline at the end of the last line.

BUG=none
BRANCH=none
TEST=compilation didn't break for nyan_blaze and samus

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: Ifa859073b866fad859391e54a6ab0a6f258b5b38
Reviewed-on: https://chromium-review.googlesource.com/213876
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
2014-08-25 04:52:47 +00:00
Aaron Durbin
7394b271bf tegra132: refactor cpu startup code
In order to more easily bring up the 2nd core refactor
the cpu startup logic. A common 32bit_entry.S is compiled
both for romstage and ramstage to provide the common 32-bit
entry point.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and booted ryu to the kernel. Also, can get the 2nd
     core up out of reset.

Change-Id: Id810df95c53d3dc8b36d8bd21851d3b0006a8bc2
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213850
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-23 04:51:26 +00:00
Furquan Shaikh
e29fe77745 arm64: Make exceptions work
BUG=chrome-os-partner:31515
BRANCH=None
TEST=test_exception generates a page fault which is handled by the exception
handler and execution continues after eret from the exception

Change-Id: I29b7dabaece9b11a04ee3628d83513d30eb07b1d
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/213661
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-22 05:47:40 +00:00
Furquan Shaikh
a21d0a432e arm64: Initialize exception stack
Initialize the exception stack on stage_entry

BUG=chrome-os-partner:31515
BRANCH=None
TEST=Exception handling works fine

Change-Id: I0b6fb95c660c68fb47a30e905acb910b0e2eafea
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/213673
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-22 05:47:37 +00:00
Furquan Shaikh
131f9fca09 t132: Add exception stack top address
BUG=chrome-os-partner:31515
BRANCH=None
TEST=Exception handling for ryu works fine

Change-Id: I5b109d9eb692b9e4ef4bc1f6cf267420f50764da
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/213674
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-22 05:47:31 +00:00
Kane Chen
066c8c81df broadwell: fixed power gating enable for disabled sata port
The original code won't set power gating for disabled port correctly,
due to it must be set before Lock

BUG=chrome-os-partner:28234
BRANCH=None
TEST=build and boot on samus
     verify bit 24, 26 is set in RCBA(0x3a84) for samus
Signed-off-by: Kane Chen <kane.chen@intel.com>

Change-Id: Id78d391ac657665a972cb4fd1810df6304a5a6ab
Reviewed-on: https://chromium-review.googlesource.com/213561
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: Kane Chen <kane.chen@intel.com>
Commit-Queue: Kane Chen <kane.chen@intel.com>
2014-08-22 00:53:45 +00:00
Aaron Durbin
f4375a8e47 ryu: use named bus numbers instead of literals
Use the bus number enumerations from funit to make the
pad names and bus numbers consistent and clearer.

BUG=chrome-os-partner:31106
BRANCH=None
TEST=Built and booted to kernel.

Change-Id: I817a56e879ecc96474128d624dc46c12ebc5c7a8
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213492
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-22 00:52:33 +00:00
Aaron Durbin
b028e90650 tegra132: add enums for bus names
Instead of requiring the mainboards to know the magic
literals for the bus numbers provide an easier name to
number to handle all the weird ordering.

BUG=chrome-os-partner:31106
BRANCH=None
TEST=Built and booted on ryu.

Change-Id: Id4d773d3049a43b186711900c61935ba7f3562ce
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213491
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-22 00:52:30 +00:00
Daisuke Nojiri
29753b9c1d Nyans: replace cpu_reset with hard_reset
The existing cpu_reset does board-wide reset, thus, should be renamed.

BUG=none
BRANCH=none
TEST=Built firmware for Nyans. Ran faft on Blaze.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: I5dc4fa9bae328001a897a371d4f23632701f1dd9
Reviewed-on: https://chromium-review.googlesource.com/212982
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
2014-08-21 08:02:08 +00:00
Kane Chen
0fbb59e3c5 broadwell: sata updates from 2.1.0 ref code
fixed a coding error and sync sata configuration with ref code

BUG=chrome-os-partner:28234
BRANCH=None
TEST=build and boot on samus
     verify registers between samus and crb

Change-Id: I09dd80a9772ac82b841363a540c9b7a8689e04a9
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/213137
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-08-20 04:22:27 +00:00
Aaron Durbin
81bad0a530 tegra132: initialize GIC
This provides are barebones initialization for tegra132 GIC
on CPU0. It routes all interrupts to CPU0, moves them all
into group 1, and attempts to allow non-secure access for
all registers (doesn't appear to be implemented, though).

BUG=chrome-os-partner:31449
BRANCH=None
TEST=Built and booted past smp init in the kernel. Timers
     appear to be flowing now since jiffies are updated.

Change-Id: I69dd9ae53f259e876a9bc4b9d7f65330150d2990
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212795
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-20 04:15:29 +00:00
Aaron Durbin
1522a83bb5 tegra132: move page tables to trustzone region
In order to access secure device register space the cpu
needs to have the page tables marked as secure memory. In
addition the page tables need to live within secure memory
otherwise the accesses default to non-secure.

Therefore move the page tables to the trustzone region. Remove
the TTB_* config options as well as removing the TTB reservations
from coreboot's resource list.

BUG=chrome-os-partner:31355
BUG=chrome-os-partner:31356
BRANCH=None
CQ-DEPEND=CL:213140
TEST=Built and booted into kernel.

Change-Id: Ia4b9d07ef35500726ec5b289e059208b9f46d025
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213141
2014-08-19 22:29:30 +00:00
Tom Warren
29591a97fb ryu: Add pad/funit init for i2c6 (audio codec, etc.)
BUG=none
BRANCH=none
TEST=built ryu, booted to recovery mode OK
Ran TegraShell and could r/w I2C6 regs OK

Change-Id: Ic74e3518ab69ec7b1bc3bc4f637b7b38b85734c9
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/212926
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-19 02:59:22 +00:00
Tom Warren
0b4da98e20 tegra132: Add special I2C6 init
I2C6 has a special mux in the SOR/DC domain, so there's a ton
of devices that need to be clocked, SOR unpowergated, and then
the I2C6 muxing done in the DPAUX_HYBRID_PADCTL register.

BUG=none
BRANCH=none
TEST=none, built rush/ryu AOK

Change-Id: I4aaa74ef1b3009da621d1a2ef6f79de8ebf545e2
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/212887
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-19 02:56:20 +00:00
Tom Warren
4fd76a6d0d tegra132: separate/refactor clock enable/reset code
Added distinct functions for clock_enable and clock_clear_reset,
and rewrote clock_enable_clear_reset() to use them. Useful when
unpowergating SOR partition, for instance, where we need to
enable a bunch of periph clocks, unclamp SOR, then take all of
those periphs out of reset.

BUG=none
BRANCH=none
TEST=none, built rush/ryu OK.

Change-Id: I6fef5a72421cb4e3d7edb33a66f62b6e14865a32
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/212916
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-19 02:56:15 +00:00
Shawn Nematbakhsh
072c1b5c82 Baytrail: Update microcode to version 829
Version 829 of microcode.

BUG=chrome-os-partner:31378
TEST=Manual on Rambi. Check FW console log, verify that revision 829
microcode is loaded. Also, verify that GCS register bit 1 isn't sticky.
BRANCH=None

Change-Id: Ieb207f5cc0854fe5f09639058160dfb6b8093cf1
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212833
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-18 23:16:18 +00:00
Furquan Shaikh
0ff2fc86c1 ryu: Initialize CNTFRQ in t132
BUG=chrome-os-partner:31356
BRANCH=None
TEST=Kernel boots with the changes required in depthcharge

Change-Id: If1c5850607174ab0f485ef41d47016056d9832cd
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/212730
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-18 23:16:12 +00:00
Tom Warren
69908f2489 tegra132: add I2C6 controller to funit library
BUG=None
BRANCH=None
TEST=Built rush and ryu, ran on rush into recovery mode.

I2C6 is in the SOR domain, so a lot of further init is
needed before it can be used. A follow-on patch will do this.

Change-Id: I1160a182ee6e2b2b56479384efc6a9063590448f
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/212671
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-16 05:22:45 +00:00
Duncan Laurie
9110a42982 broadwell: Fix devslp enable to use correct register
This was a merge error when I was pulling in some of the
code into this file I put it after the read of CAP2 but
before it is modified and written back.  In the end the
DEVSLP bits are getting set/cleared that need to but the
other bits in the register may be wrong.  Also when enabling
devslp set the devslp-present bit in each enabled port.

Also remove much of the 0:1f.2@0x98 setup and the attempt
to write (the write once) CAP register that is already
being written in the reference code.

BUG=chrome-os-partner:28234
BRANCH=None
TEST=build and boot on samus

Change-Id: I467f3c15b9f4d4c814ba0ef8baf95739b4bc6662
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212308
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-15 17:55:30 +00:00
Aaron Durbin
e5412cfc14 ryu: enable external usb 2.0 port
BUG=chrome-os-partner:31293
BRANCH=None
TEST=Able to get sporadic USB communication in depthcharge on ryu.

Change-Id: Ic5402d18943c3cc8fb4556c47e587134633fbf72
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212333
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-14 22:42:27 +00:00
Aaron Durbin
5183c5081a tegra132: add usb initialization support to funit
Continuing down the path of easing mainboard maintenance
provide a way to bring up the USB 2.0 ports through funit.

BUG=chrome-os-partner:31251
BRANCH=None
TEST=With ryu patch was able to get same sporadic USB communication.

Change-Id: Iee5ca30b3c8b876a9cae7b91db096fef933a8412
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212332
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-14 22:42:22 +00:00
Furquan Shaikh
a26e07b58f rush: Add usb support for rush in coreboot
BUG=chrome-os-partner:31293
BRANCH=None
TEST=With non-cacheable memory region and dma range addition, booting from usb
reaches the same point as mmc.

Change-Id: I1083f8de2bfbe9a233d317b29b8fc56f47c7061d
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/211039
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-14 02:33:08 +00:00
Aaron Durbin
03b455aa9d tegra132: include what is actually used
The clk_rst.h file wasn't including files that had
functionality it was using resulting in broken builds
if just this file was included.

BUG=None
BRANCH=None
TEST=Built with just this file included -> no more errors.

Change-Id: I8dc0fcab363e1089587e6dc8ff04c2a76c5e364c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212331
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-14 02:29:47 +00:00
Aaron Durbin
4cbe74905b tegra132: provide more robust array bounds checking
Make sure the array size matches the number of supported
FUNITs. Also remove the FUNIT_NONE enumeration so that
there isn't an empty slot in the array at index 0.

BUG=chrome-os-partner:31251
BRANCH=None
TEST=Built when array wasn't large enough. Compiler threw an error.

Change-Id: I0bb37c51311d202729b7fb9731d6eec0a28dc040
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212330
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-14 02:29:44 +00:00
Aaron Durbin
c8f09e61e3 tegra132: add base addresses to funit structures
To provide easier access to the base addresses of the controllers
by funit identifier add the base addresses to the data structure.

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

Change-Id: Iff5564b250dcf2038252d54a4caec3df5f7f3de7
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212169
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-14 02:29:39 +00:00
Aaron Durbin
07954a231f tegra132: add more base addresses to address map
Provide consistently named base address enumerations as well
as provide some that were missing.

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

Change-Id: I75030598f7da7dacf8e8eff1d7427c5bf202814f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212168
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-14 02:29:35 +00:00
Aaron Durbin
f7adaf9697 tegra132: break out clock config in funit library
In order to prepare for USB initialization move the clock
configuration into a separate routine in the funit library.

BUG=chrome-os-partner:31251
BRANCH=None
TEST=Built and booted into recovery mode.

Change-Id: Iea6cd2fbe8369a91c06b15d94b63c409ae83124f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212167
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-14 02:26:46 +00:00
Aaron Durbin
358b78c1c4 tegra132: use pointers in funitcfg
Just use direct pointers to the registers in the pre-filled
data structures. In 64-bit the sizes increase, but it's small.
The fields now directly point to the correct register so no
need to do any arithmetic to identify the correct register.

BUG=chrome-os-partner:31251
BRANCH=None
TEST=Built and booted on ryu into recovery.

Change-Id: I186bf5d145437472126067960e62d7ed6a25f295
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212166
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-14 02:26:41 +00:00
Aaron Durbin
ebc04a1742 ryu: convert hardware initialization to funit API
Use the new funit API to do all the dirty work.

BUG=chrome-os-partner:29981
BRANCH=None
TEST=Built and ran through depthcharge and into recovery just like
     before.

Change-Id: Ief2d81c5569c33a90fc9458d741edef1dcbd8239
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212152
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-14 02:23:39 +00:00
Aaron Durbin
0cf78e310e tegra132: add i2c2 controller to funit library
BUG=chrome-os-partner:31251
BRANCH=None
TEST=Built and ran on ryu through depthcharge into recovery mode.

Change-Id: I76fa8f1c3469b049df7f5bf943701ce18deeb927
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212151
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-14 02:23:36 +00:00
Furquan Shaikh
b182651a1b rush: support for DMA region
Currently rush needs a DMA region in order to communicate with
USB devices. Therefore, add that region to the memory map.

BUG=chrome-os-partner:31293
BRANCH=None
TEST=With the changes for adding non-cacheable memory range and adding DMA
region, booting from USB reaches same point as MMC.

Change-Id: I6a465eaa77e0d5ab4d5fb22161e88e7a5fd9c4a8
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/212193
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-13 07:46:25 +00:00
Furquan Shaikh
12f12cb30a tegra: USB code cleanup
Pull out the common usb setup utmip functions from t124 into tegra usb.h. These
can be reused for t132 as well.

BUG=chrome-os-partner:31293
BRANCH=None
TEST=Compiles successfuily for nyan, big and blaze

Change-Id: I83f83bafad0f52ad651fe5989430f41142803f2b
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/211200
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-13 07:46:11 +00:00
Aaron Durbin
e933894795 ryu: support for DMA region
Currently ryu needs a DMA region in order to communicate with
USB devices. Therefore, add that region to the memory map.

BUG=chrome-os-partner:31293
BRANCH=None
TEST=With usb added am able to talk to a USB mass storage device
     albeit inconsistently.

Change-Id: I6b5c052ccaafce30705349e07639dffbb994901f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212162
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-13 05:24:21 +00:00
Aaron Durbin
8834256288 tegra132: allow mainboards to insert memory regions in address map
Depending on the needs of the mainboard certain regions of the address
map may need to be adjusted. Allow for that.

BUG=chrome-os-partner:31293
BRANCH=None
TEST=With ryu patches able to insert a non-cacheable memory region.

Change-Id: Iaa657bba98d36a60f2c1a5dfbb8ded4e3a53476f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212161
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-13 05:24:17 +00:00
Aaron Durbin
a5bc7ab170 arm64: handle non-cacheable normal memory
Non-cacheable normal memory is needed when one wants an easy way
to have a DMA region. That way all the reads and writes will be
picked up by the CPU and the device without any cache management
operations.

BUG=chrome-os-partner:31293
BRANCH=None
TEST=With a bevy of other patches can use a carved out DMA region
     for talking to USB.

Change-Id: I36b7fc276467fe3e9cec4d602652d6fa8098c133
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/212160
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-13 05:24:11 +00:00
jinkun.hong
d35d9fe7b5 coreboot: rk3288: add clock module
Call rkclk_init() in bootblock stage.
apll = 816MHz, gpll = 594MHz, cpll = 384MHz, dpll = 300MHz
arm clk = 816MHz, DDR clk = 300MHz, mpclk = 204MHz, m0clk = 408MHz
l2ramclk = 408MHz, atclk = 204MHz, pclk_dbg = 204MHz
aclk = 148.5MHz, hclk = 148.5MHz, pclk = 74.25MHz

BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: I97d953258039f6caa499cef4462be8f1a05ce2ab
Signed-off-by: jinkun.hong <jinkun.hong@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/209428
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
2014-08-13 02:50:48 +00:00
Aaron Durbin
6b0da6fa39 tegra132: fix carveout address calculation >= 4GiB
The high address field was being shifted in the wrong direction
resulting in the lower 12 bits of the upper address being dropped.

BUG=chrome-os-partner:30572
BRANCH=None
TEST=Was able to run on ryu and not hang while wiping memory.

Change-Id: I7bf173bb0373d2d25ce9014c80236fb55cc8e17e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/211941
Reviewed-by: Tom Warren <twarren@nvidia.com>
2014-08-12 23:14:08 +00:00
Furquan Shaikh
0618ea6828 rush: Convert rush initialization to use funitcfg api
Use funitcfg api for bootblock, romstage as well as ramstage
initialization in rush.

BUG=chrome-os-partner:31251
BRANCH=None
TEST=Compiles successfully and boots till last known good point.

Change-Id: I8f5801c1c214f05ef9d2ba976838605da2d8b914
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/211766
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-12 23:09:53 +00:00
Furquan Shaikh
9814f93a9f t132: Implement clock initialization api for functional units
This api provides a common interface to initialize various clock sources,
dividers as well as enabling the clock for various functional units.

BUG=chrome-os-partner:31251
BRANCH=None
TEST=Compiles successfully for rush and boots till last known good point.

Change-Id: I7abb193d6a9cfa448df1c48c346b4edbad802329
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/211765
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-12 23:09:49 +00:00
Duncan Laurie
20413f2eaf broadwell: Add small delay before Flex Ratio reboot
In order to prevent possible TPM lockout due to PLTRST assertion
shortly after powering up add a small delay before the reset.
This will affect cold power up only, reboot/resume/warmboot will
all have the flex ratio locked already so this reset is unneeded.

BUG=chrome-os-partner:29859
BRANCH=None
TEST=build and boot on samus.  I tried unsuccessfully to trigger the
TPM lockout, but I was not able to do that consistently without this
patch so it is unknown yet whether this is 100% effective.

Change-Id: Ief8c9261c0268b0f90a3022213ebd2b06633b481
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/211893
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-12 18:34:08 +00:00
Jimmy Zhang
2eb0cae0e3 t132: ryu: Correct how board id is retrieved
Two changes: 1. A44 ID straps use different gpio pins than nyan.
2. A44 uses tristate values instead two state values.

BUG=none
BRANCH=none
TEST=Built and tested on A44 board.

Change-Id: Ia2a4309d3b63b0a94d79465dd727b01fae01e1b9
Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/211753
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-12 02:50:19 +00:00
Kane Chen
6da6b4ffb3 broadwell: add support for smbios type17 in broadwell
This change also depends on mrc due to changes in pei_data.h
Report smbios type 17 for each memory

CQ-DEPEND=CL:210005
BUG=None
BRANCH=None
TEST=Compiles successfully
     See smbios type17 in OS by dmidecode

Change-Id: If83c99364726cd17c719a59ed8ac993736c63b9a
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/210399
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-08-12 02:40:44 +00:00