Dino Li
b61de792ef
it8380dev: modify sspi module
...
We need to modify SSPI module to fix compile fail
due to SPI flash common code changed.
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=console "spi_flashinfo" OK
Change-Id: I83bb645eff1e5874d849056df518eea92340c39e
Reviewed-on: https://chromium-review.googlesource.com/290089
Reviewed-by: Randall Spangler <rspangler@chromium.org >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
Tested-by: Dino Li <dino.li@ite.com.tw >
2015-08-04 19:21:52 +00:00
Dino Li
60e110acd1
it8380dev: add i2c control module
...
Add i2c control module for emulation board.
To rename CONFIG_ to CONFIG_IT83XX_ for IT83XX series configuration.
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=1. console command "i2cscan" found devices correctly.
2. console command "i2cxfer".
2-a. port2 + battery, i2cxfer r, r16, and rlen OK.
2-b. port1 + slave evb, i2cxfer r, r16, rlen, w, and w16 OK.
Change-Id: I67165f7dcdef538ba6dd03b47f1621a73cc68379
Reviewed-on: https://chromium-review.googlesource.com/263678
Reviewed-by: Alec Berg <alecaberg@chromium.org >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
Tested-by: Dino Li <dino.li@ite.com.tw >
2015-06-30 12:22:02 +00:00
Dino Li
d5c43a880c
it8380dev: add fan control module
...
1. pwm, add frequency select function for pwm channels.
2. timer, add external timer 3~8 apis.
3. add fan control module for emulation board.
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=console command "faninfo, fanset, fanduty, and fanauto"
fanset 3333
Setting fan 0 rpm target to 3333
faninfo
Actual: 3390 rpm
Target: 3333 rpm
Duty: 35%
Status: 1 (changing)
Mode: rpm
Auto: no
Enable: yes
faninfo
Actual: 3301 rpm
Target: 3333 rpm
Duty: 34%
Status: 2 (locked)
Mode: rpm
Auto: no
Enable: yes
fanduty 80
Setting fan 0 duty cycle to 80%
faninfo
Actual: 5952 rpm
Target: 3333 rpm
Duty: 80%
Status: 2 (locked)
Mode: duty
Auto: no
Enable: yes
faninfo
Actual: 5971 rpm
Target: 3333 rpm
Duty: 80%
Status: 2 (locked)
Mode: duty
Auto: no
Enable: yes
fanauto
faninfo
Actual: 3330 rpm
Target: 3333 rpm
Duty: 36%
Status: 2 (locked)
Mode: rpm
Auto: yes
Enable: yes
fanset 8000
Setting fan 0 rpm target to 8000
faninfo
Actual: 6793 rpm
Target: 8000 rpm
Duty: 100%
Status: 3 (frustrated)
Mode: rpm
Auto: no
Enable: yes
fanset 3456
Setting fan 0 rpm target to 3456
faninfo
Actual: 5053 rpm
Target: 3456 rpm
Duty: 56%
Status: 1 (changing)
Mode: rpm
Auto: no
Enable: yes
faninfo
Actual: 3440 rpm
Target: 3456 rpm
Duty: 34%
Status: 2 (locked)
Mode: rpm
Auto: no
Enable: yes
/* force stop the fan */
[87.035136 Fan 0 stalled!]
[87.035520 event set 0x00000400]
[88.035712 Fan 0 stalled!]
[89.036288 Fan 0 stalled!]
[90.036864 Fan 0 stalled!]
[91.037440 Fan 0 stalled!]
[92.038016 Fan 0 stalled!]
[93.038592 Fan 0 stalled!]
[94.039168 Fan 0 stalled!]
/* release */
faninfo
Actual: 3427 rpm
Target: 3456 rpm
Duty: 35%
Status: 2 (locked)
Mode: rpm
Auto: no
Enable: yes
Change-Id: Icbe1917902d033a8be42b8d834ffc6045d08b985
Reviewed-on: https://chromium-review.googlesource.com/266625
Reviewed-by: Randall Spangler <rspangler@chromium.org >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
Tested-by: Dino Li <dino.li@ite.com.tw >
2015-06-25 05:32:30 +00:00
Dino Li
c650a7391c
it8380dev: add peci control module
...
Add peci control module for emulation board.
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=1. console command "pecitemp" get CPU temperature normally.
2. console command "peci" manual test peci commands.
(GetDIB, GetTemp, RdPkgConfig, and WrPkgConfig)
Change-Id: I48b63a391adf04f159adca401acb369a6acc3799
Reviewed-on: https://chromium-review.googlesource.com/265171
Reviewed-by: Alec Berg <alecaberg@chromium.org >
Reviewed-by: Randall Spangler <rspangler@chromium.org >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
Tested-by: Dino Li <dino.li@ite.com.tw >
2015-06-24 04:19:42 +00:00
Dino Li
19424a6c91
it8380dev: add sspi control module
...
Add sspi control module for emulation board.
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=EVB + Winbond W25Q80 SPI ROM
To define CONFIG_SPI_FLASH, CONFIG_SPI_FLASH_SIZE, and
CONFIG_SPI_FLASH_W25X40
console "spi_flashinfo" can get SPI information
> spi_flashinfo
Manufacturer ID: ef
Device ID: 40 14
Unique ID: c8 60 84 a1 1f 6a 7f 2f
Capacity: 1024 MB
Change-Id: I6c4d4d977536484d47a2207ed80dd0ea08a7c8fd
Reviewed-on: https://chromium-review.googlesource.com/267403
Reviewed-by: Alec Berg <alecaberg@chromium.org >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
Tested-by: Dino Li <dino.li@ite.com.tw >
2015-06-23 01:53:46 +00:00
Bill Richardson
104f811e67
cleanup: fix all the header guards
...
This unifies all the EC header files to use __CROS_EC_FILENAME_H
as the include guard. Well, except for test/ util/ and extra/
which use __TEST_ __UTIL_ and __EXTRA_ prefixes respectively.
BUG=chromium:496895
BRANCH=none
TEST=make buildall -j
Signed-off-by: Bill Richardson <wfrichar@chromium.org >
Change-Id: Iea71b3a08bdec94a11239de810a2b2e152b15029
Reviewed-on: https://chromium-review.googlesource.com/278121
Reviewed-by: Randall Spangler <rspangler@chromium.org >
2015-06-18 19:07:00 +00:00
Dino Li
3eb04bb57e
it8380dev: add pmc control module
...
Add pmc(LPC ACPI) control module for emulation board.
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=1. 62h/66h port.
1-a. out 66h 80h, out 62h 00h, in 62h 02h
1-b. out 66h 81h, out 62h 01h, out 62h 55h
1-c. out 66h 80h, out 62h 01h, in 62h 55h
1-d. out 66h 80h, out 62h 02h, in 62h aah
2. H2RAM LPC I/O cycle 900h ~ 9FFh = DLM 0x8D900 ~ 0x8D9FF
and host read only.
3. 80h port, console command port80.
4. host command.
4-a. host request (LPC I/O 800h ~ 807h)
03 FD 00 00, 00 00 00 00
out 204h DAh, in 200h 00h
host response (LPC I/O 800h ~ 80Bh)
03 F7 00 00, 04 00 00 00, 02 00 00 00
4-b. host request
03 EE 01 00, 00 00 04 00, 01 02 03 04
out 204h DAh, in 200h 00h
host response
03 E5 00 00, 04 00 00 00, 05 05 05 05
Change-Id: I5c3bac66306dfba380548a74a64536ea606ddd3e
Reviewed-on: https://chromium-review.googlesource.com/269271
Reviewed-by: Vincent Palatin <vpalatin@chromium.org >
Tested-by: Dino Li <dino.li@ite.com.tw >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
2015-06-17 13:11:07 +00:00
Dino Li
2c3cf4d1a9
it8380dev: add KBC/KMSC module
...
1. DLM 16KB.
2. Add KBC/KMSC module for emulation board.
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=EVB + x86 MB can boot into DOS and keyboard works.
Change-Id: Ia5cc2d4f1733ce07879d410b0447b2d48e50cd95
Reviewed-on: https://chromium-review.googlesource.com/259923
Reviewed-by: Vincent Palatin <vpalatin@chromium.org >
Tested-by: Dino Li <dino.li@ite.com.tw >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
2015-03-22 03:13:58 +00:00
Dino Li
4d9dfa159b
it8380dev: add ec2i control module
...
Add EC2I control module for emulation board.
The EC2I bridge enables the EC to access the host controlled
module registers (e.g., host configuration module(PNPCFG) and SWUC)
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=EC2I read: Read a logical device page, the results are correctly.
EC2I write: Initialize PNPCFG success.
Change-Id: I900450d4a8c49182c438b69b5e738c12dc437fe4
Reviewed-on: https://chromium-review.googlesource.com/230410
Reviewed-by: Vincent Palatin <vpalatin@chromium.org >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
Tested-by: Dino Li <dino.li@ite.com.tw >
2014-12-23 01:50:25 +00:00
Dino Li
165cf6c881
it8380dev: add adc control module
...
Add adc control module for emulation board.
The ADC converts the input voltage signal ranging
from 0v to 3v into a 10-bit unsigned integer.
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=manual test.
1 - adc channel 1, 3, 5, and 7 to ground.
2 - adc channel 0 and 2 to 1.26v.
3 - adc channel 4 and 6 to 1.72v.
4 - condition, factor_mul = 3000, factor_div = 1024, and shift = 0.
5 - console "adc", result as following.
adc_ch0 = 1256
adc_ch1 = 0
adc_ch2 = 1256
adc_ch3 = 0
adc_ch4 = 1722
adc_ch5 = 0
adc_ch6 = 1725
adc_ch7 = 0
Change-Id: I72efd09c9f7dbff25c4f6fd4846c9b1c1e5637ca
Reviewed-on: https://chromium-review.googlesource.com/228092
Reviewed-by: Vincent Palatin <vpalatin@chromium.org >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
Tested-by: Dino Li <dino.li@ite.com.tw >
2014-12-19 09:17:27 +00:00
Dino Li
b5bd5ed20d
it8380dev: add pwm control module
...
Add pwm control module for emulation board.
Signed-off-by: Dino Li <dino.li@ite.com.tw >
BRANCH=none
BUG=none
TEST=console manual test, pwm channels output correctly.
Change-Id: I6eb1a9e4fdcb9279e9d0cbd67f7a92afed21c889
Reviewed-on: https://chromium-review.googlesource.com/223921
Reviewed-by: Vincent Palatin <vpalatin@chromium.org >
Commit-Queue: Dino Li <dino.li@ite.com.tw >
Tested-by: Dino Li <dino.li@ite.com.tw >
2014-10-29 03:29:17 +00:00
Anton Staaf
9ccfd4553e
gpio: Replace duplication in gpio declarations with X-macro file
...
Previously each board.h and board.c contained an enum and an array
for gpio definitons that had to be manually kept in sync, with no
compiler assistance other than that their lengths matched.
This change adds a single gpio.inc file that declares all gpio's
that a board uses and is used as an X-macro include file to
generate both the gpio_signal enum and the gpio_list array.
Signed-off-by: Anton Staaf <robotboy@chromium.org >
BRANCH=none
TEST=make buildall -j
Change-Id: If9c9feca968619a59ff9f20701359bcb9374e4da
Reviewed-on: https://chromium-review.googlesource.com/205354
Tested-by: Anton Staaf <robotboy@chromium.org >
Reviewed-by: Vincent Palatin <vpalatin@chromium.org >
Commit-Queue: Anton Staaf <robotboy@chromium.org >
2014-06-26 02:43:01 +00:00
Vincent Palatin
4cf4fcf1cb
ite: Add initial support for ITE IT8380 chip
...
Initial support for the ITE IT8380 chip with the following peripherals :
- 8250-like UART module.
- HW timer (with a 128-us tick period).
- GPIO with pins initialization and edge interrupt support.
other functions are stubbed.
- Clock : basic fixed frequency setup only.
It also add the dev board configuration as a test vehicle.
Signed-off-by: Alec Berg <alecaberg@chromium.org >
Signed-off-by: Vincent Palatin <vpalatin@chromium.org >
BRANCH=none
BUG=chrome-os-partner:23575
TEST=make BOARD=it8380dev
on IT8380 dev board, use the EC serial console, use gettime from
console.
Change-Id: Id4bf37d1beb21d1a4bee404c9a0bc500025fe787
Reviewed-on: https://chromium-review.googlesource.com/175481
Reviewed-by: Vincent Palatin <vpalatin@chromium.org >
Commit-Queue: Alec Berg <alecaberg@chromium.org >
Tested-by: Alec Berg <alecaberg@chromium.org >
2014-01-08 02:24:23 +00:00