summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Clear OWNERS for factory/firmware branchfirmware-gandof-6301.155.BBrian Norris2021-09-102-10/+1
| | | | | | | | | | | | BUG=none TEST=none Change-Id: I0f03f432ada1064ffba9595be78ca7ab4d25ecd1 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3155175 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Owners-Override: Jora Jacobi <jora@google.com> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* Gandof: Add G781 HW trigger pointDavid Huang2015-07-306-3/+99
| | | | | | | | | | | | | | | | | | Add G781 HW protect function by setting ALARM point. ALARM trigger point : 77 degree C BRANCH=gandof BUG=chrome-os-partner:41633 TEST=Use G781 command through servo board to check temperature setting. Change-Id: I3be56a1063f550b96dbd1e5c0fe63adef7028279 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/288243 Reviewed-by: Shawn N <shawnn@chromium.org> Tested-by: Saurabh Madan <ssmadan@chromium.org> Commit-Queue: Saurabh Madan <ssmadan@chromium.org> Trybot-Ready: Saurabh Madan <ssmadan@chromium.org>
* Gandof: Modify fan start up condition.David Huang2015-07-241-7/+12
| | | | | | | | | | | | | | | | | | | Modify fan start up condition for fix fan RPM will always set to level one when set RPM to 0. BRANCH=gandof BUG=chrome-os-partner:41633 TEST=1.Enter OS and run heavy loading. 2.Wait fan in high speed RPM then close LID. 3.When fan stop, open LID immediately. 4.Check can hear fan load noise. Change-Id: I088dae4177c74a25b71f848c08034639ad8e7696 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/288198 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Saurabh Madan <ssmadan@chromium.org> Tested-by: Saurabh Madan <ssmadan@chromium.org>
* Gandof: Modify thermal tableDavid Huang2015-07-241-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify thermal table for Gandof on off RPM step0 0 step1 41 37 3800 step2 47 44 4200 step3 52 50 4500 step4 57 55 5100 step5 62 60 5400 step6 68 65 6400 step7 74 71 7100 ec warning point: 76 ec high point: 80 ec shutdown point: 100 BRANCH=gandof BUG=chrome-os-partner:41633 TEST=Use the hacked code to return the fake temperature, check all the steps with Gandof. The fan behavior works properly. Change-Id: I3f782e7b8cacb666bce7417711f6e7fa64b30fbb Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/288256 Reviewed-by: Saurabh Madan <ssmadan@chromium.org> Commit-Queue: Saurabh Madan <ssmadan@chromium.org> Tested-by: Saurabh Madan <ssmadan@chromium.org>
* Gandof: Add fan start up RPM from thermal table level one.David Huang2015-07-231-1/+5
| | | | | | | | | | | | | | | | | | | | If enter S3/S4/S5, fan will change to RPM 0. And after resume, EC give a start up RPM(Thermal table level one) to start fan from RPM 0. BRANCH=gandof BUG=chrome-os-partner:41633 TEST=1.Enter OS and run heavy loading. 2.Wait fan in high speed RPM then close LID. 3.When fan stop, open LID immediately. 4.Check can hear fan load noise. Change-Id: I75cba16ddece59c5d2cb5303246b1ea7ab53670b Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/287065 Commit-Queue: David Wu <david_wu@quantatw.com> Tested-by: David Wu <david_wu@quantatw.com> Reviewed-by: Mohammed Habibulla <moch@google.com>
* Gandof: Modify thermal tableDavid Huang2015-07-211-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify thermal table for Gandof on off RPM step0 0 step1 33 29 3800 step2 47 40 4200 step3 52 50 4500 step4 57 55 5100 step5 62 60 5400 step6 68 65 6400 step7 74 71 7100 ec warning point: 76 ec high point: 80 ec shutdown point: 100 BRANCH=gandof BUG=chrome-os-partner:41633 TEST=Use the hacked code to return the fake temperature, check all the steps with Gandof. The fan behavior works properly. Change-Id: Ie5085cf16ef887ce3cb1ed4197a7e1e5d6141553 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/286828 Commit-Queue: David Wu <david_wu@quantatw.com> Tested-by: David Wu <david_wu@quantatw.com> Reviewed-by: Bernie Thompson <bhthompson@chromium.org> Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Gandof: Update thermal tableDavid Huang2015-06-231-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update Thermal table for Ganndof. on off RPM step0 0 step1 33 29 3800 step2 37 35 4500 step3 45 41 4900 step4 53 49 5400 step5 60 57 6000 step6 69 62 7100 ec warning point: 76 ec high point: 80 ec shutdown point: 100 BRANCH=gandof BUG=chrome-os-partner:41633 TEST=Use the hacked code to return the fake temperature, check all the steps with Gandof. The fan behavior works properly. Signed-off-by: David Huang <David.Huang@quantatw.com> Change-Id: Ica40b562456c1bfc84792459aaea578dcfe4ba32 Reviewed-on: https://chromium-review.googlesource.com/281122 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: David Wu <david_wu@quantatw.com> Tested-by: David Wu <david_wu@quantatw.com>
* Gandof: Change charge input currentDavid Huang2015-06-111-1/+1
| | | | | | | | | | | | | Change charge input current limit to 2000mA. BRANCH=gandof BUG=chrome-os-partner:41307 TEST=Use "charger" via servo board to check I_in value is 2000. Change-Id: I8d05508fda1ad485a3fb20028187786cac6df23c Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/276576 Reviewed-by: Mohammed Habibulla <moch@google.com>
* Gandof: Update thermal tableDavid Huang2015-05-281-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update Thermal table v1 for Ganndof. on off RPM step0 0 step1 31 27 4200 step2 39 35 5000 step3 47 43 5700 step4 54 51 6400 step5 61 58 7100 ec warning point: 66 ec high point: 85 ec shutdown point: 100 BRANCH=gandof BUG=chrome-os-partner:40588 TEST=Use the hacked code to return the fake temperature, check all the steps with Gandof. The fan behavior works properly. Change-Id: I6c22b62ac13556a0a36edbe48f31e745bbbcde75 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/273091 Reviewed-by: David Wu <david_wu@quantatw.com> Reviewed-by: Mohammed Habibulla <moch@google.com> Commit-Queue: David Wu <david_wu@quantatw.com>
* lulu: Update thermal table.Grover Yen2015-05-281-6/+6
| | | | | | | | | | | | | | | | Update thermal settings according to "Meridian thermal table x01.xlsx" BUG=chrome-os-partner:40324 BRANCH=none TEST=Flash EC firmware and apply thermalget, thermalset command in console to confirm thermal/fan settings. Change-Id: Id72d035f31cc6043914059128ec67bcf72136a73 Signed-off-by: Grover Yen <Grover_Yen@wistron.com> Reviewed-on: https://chromium-review.googlesource.com/273107 Reviewed-by: Mohammed Habibulla <moch@google.com> Tested-by: Sean Chiang <sean_fs_chiang@wistron.com> Commit-Queue: Sean Chiang <sean_fs_chiang@wistron.com>
* Modify led battery color for gandofDavid Huang2015-05-263-4/+5
| | | | | | | | | | | | | | | | Modify led battery color green/orange for gandof. BRANCH=gandof BUG=chrome-os-partner:40035 TEST=Use "ectool led battery green/orange" "ectool led power white" to check Change-Id: I5ed43c181065fe89fd4b1e1bba2f880c5c5a224e Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/271723 Tested-by: Grace Kao <grace.kao@intel.com> Reviewed-by: Mohammed Habibulla <moch@google.com> Commit-Queue: David Wu <david_wu@quantatw.com>
* Modify battery cutoff commandDavid Huang2015-05-202-17/+2
| | | | | | | | | | | | | | | | | Modify battery cutoff command BRANCH=gandof BUG=chrome-os-partner:40077 TEST=Use "ectool batterycutoff at-shutdown" to check power off DC mode can't be power on. Change-Id: I0d670a4577f499a1a52f2969c625640c5b7c3856 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/272130 Tested-by: Grace Kao <grace.kao@intel.com> Reviewed-by: David Wu <david_wu@quantatw.com> Commit-Queue: David Wu <david_wu@quantatw.com> Reviewed-by: Mohammed Habibulla <moch@google.com>
* Modify for fix battery.c typoDavid Huang2015-05-131-1/+1
| | | | | | | | | | | | | | | Modify for fix battery.c typo BRANCH=gandof BUG=chrome-os-partner:39858 TEST=Use "make buildall -j" to check build pass. Change-Id: Ib10bde3368c0497cdd8126c4e7207dedc33d342c Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/270602 Reviewed-by: Mohammed Habibulla <moch@google.com> Commit-Queue: David Wu <david_wu@quantatw.com> Tested-by: David Wu <david_wu@quantatw.com>
* Modify LED color defineDavid Huang2015-05-131-32/+43
| | | | | | | | | | | | | | | Modify power LED and battery LED color define for fit gandof LED color. BRANCH=gandof BUG=chrome-os-partner:40035 TEST=Use "ectool led battery green/yellow" "ectool led power white" to check LED color. Change-Id: I87d1e61046d771d1cbe4ba26ee99f898eb1a182d Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/270291 Reviewed-by: Mohammed Habibulla <moch@google.com> Reviewed-by: Grace Kao <grace.kao@intel.com> Commit-Queue: Grace Kao <grace.kao@intel.com>
* Modify battery cutoff commandDavid Huang2015-05-122-32/+100
| | | | | | | | | | | | | | | | | Modify battery cutoff command and wake up command for gandof battery. BRANCH=gandof BUG=chrome-os-partner:39858 TEST=1. Insert cutoff battery and adapter. 2. Plug out adapter. 3. Check system shutdown or not. Change-Id: I574291de3558b66ca2bc6bbec264b4b7fea335b2 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/269610 Reviewed-by: Mohammed Habibulla <moch@google.com> Commit-Queue: David Wu <david_wu@quantatw.com> Tested-by: David Wu <david_wu@quantatw.com>
* Modify LED control for Power LEDDavid Huang2015-05-082-19/+32
| | | | | | | | | | | | | | Modify LED control for Power LED control is defferent with Battery LED. BRANCH=gandof BUG=chrome-os-partner:39860 TEST=Power on to check power LED and battery LED status. Change-Id: I71a43b513cdd05da9d8e207286a9b19ea56df931 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/269868 Reviewed-by: Mohammed Habibulla <moch@google.com> Commit-Queue: David Wu <david_wu@quantatw.com>
* Modify PWM_KBLIGHT define for support keyboard backlightDavid Huang2015-05-071-1/+1
| | | | | | | | | | | | | | | | | Modify PWM define for support keyboard backlight control. BRANCH=gandof BUG=chrome-os-partner:39874 TEST=Use "pwmduty" or "ectool pwmsetkblight" to set keyboard backight duty. Signed-off-by: David Huang <David.Huang@quantatw.com> Change-Id: Ie33c23c2a85e8cec65ed6c141396dfe834aa6d5f Reviewed-on: https://chromium-review.googlesource.com/269861 Reviewed-by: Mohammed Habibulla <moch@google.com> Commit-Queue: David Wu <david_wu@quantatw.com> Tested-by: David Wu <david_wu@quantatw.com>
* Gandof: Modify LED pin defineDavid Huang2015-05-061-3/+3
| | | | | | | | | | | | | | | Modify LED pin define for gandof. BRANCH=gandof BUG=chrome-os-partner:39860 TEST=Power on to check power LED and battery LED status. Change-Id: Ibb762f8724d0ced3ec3cd3a411c1a3984a096371 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/269620 Reviewed-by: Mohammed Habibulla <moch@google.com> Commit-Queue: David Wu <david_wu@quantatw.com> Tested-by: David Wu <david_wu@quantatw.com>
* Gandof: Fix USB 3.0 port no functionDavid Huang2015-05-052-1/+6
| | | | | | | | | | | | | | | Add USB control pin for Gandof. BRANCH=gandof BUG=chrome-os-partner:39641 TEST=Insert USB device to USB 3.0 port to check device function. Change-Id: I7e73fd5f086442da765a9d77d35717bff3b1b294 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/267645 Reviewed-by: Mohammed Habibulla <moch@google.com> Commit-Queue: David Wu <david_wu@quantatw.com> Tested-by: David Wu <david_wu@quantatw.com>
* Keep Wi-Fi radio during S3Harry Pan2015-04-302-2/+4
| | | | | | | | | | | | | | | | | Follow Chrome-OS lucid-sleep-requirements; as Wi-Fi need to be wake-up source, WLAN_DISABLE#1 (low-active) need to be high in S3. EC PJ4 (WLAN_DISABLE#1) controls 7260 W_DISABLE#1 BUG=chrome-os-partner:39288 BRANCH=none TEST=Check WLAN_DISABLE#1 (EC PJ4) being high when S3 Change-Id: I05638984d3151e53f1d1904f5cc05373776bb5a8 Reviewed-on: https://chromium-review.googlesource.com/267820 Reviewed-by: Mohammed Habibulla <moch@google.com> Reviewed-by: Eric Caruso <ejcaruso@chromium.org> Commit-Queue: Harry Pan <harry.pan@intel.com> Tested-by: Harry Pan <harry.pan@intel.com>
* Cid/Lulu: Keep bluetooth power during S3Harry Pan2015-04-282-0/+2
| | | | | | | | | | | | | | | | Follow Chrome-OS hardware requirement of wake source, BT controller need to remain powering-on. WLAN_EN controls overall BT/WLAN power enabling BUG=chrome-os-partner:39077 BRANCH=none TEST=Check WLAN_EN being high when S3 Change-Id: I96ec6fb5b4c20f45e1ae49d1679a8d447d637d2e Signed-off-by: Harry Pan <harry.pan@intel.com> Reviewed-on: https://chromium-review.googlesource.com/266830 Reviewed-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
* Gandof: Init boardDavid Huang2015-04-149-0/+757
| | | | | | | | | | | | | | | | Copy Yuna setting to init board. BUG=none BRANCH=gandof TEST=Run "make BOARD=gandof" and "make buildall -j" to build code and ec.bin can be generated. Change-Id: I5f6332a0af60fddce068fb8d59cd4a3420869da7 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/264247 Reviewed-by: Mohammed Habibulla <moch@google.com> Commit-Queue: David Wu <david_wu@quantatw.com> Tested-by: David Wu <david_wu@quantatw.com>
* lulu, cid : Change battery error LED behavior.Grover Yen2015-03-032-4/+8
| | | | | | | | | | | | | | | Change battery error LED behavior from "500ms on, 500ms off" to "1 second on, 3 seconds off" BUG=chrome-os-partner:35115 BRANCH=none TEST=Detach battery to simulate battery error and then confirm LED behavior. Change-Id: I16d469ca7ebe27a98a9c446951165827845f02c8 Signed-off-by: Grover Yen <Grover_Yen@wistron.com> Reviewed-on: https://chromium-review.googlesource.com/253987 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* lulu: Implement battery cut-off function.Grover Yen2015-02-251-3/+7
| | | | | | | | | | | | | Modify cut-off command to meet battery spec. BUG=chrome-os-partner:37028 BRANCH=none TEST=Apply "batterycutoff" command of ectool to confirm. Change-Id: I301555ea6709e3450e79f10e57a0ea4ca8276553 Signed-off-by: Grover Yen <Grover_Yen@wistron.com> Reviewed-on: https://chromium-review.googlesource.com/250232 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* cid: Implement battery cut-off function.Grover Yen2015-02-251-3/+7
| | | | | | | | | | | | | Modify cut-off command to meet battery spec. BUG=chrome-os-partner:37028 BRANCH=none TEST=Apply "batterycutoff" command of ectool to confirm. Change-Id: I09d60ac26edd52f266c4913dcd76e5dfc7841282 Signed-off-by: Grover Yen <Grover_Yen@wistron.com> Reviewed-on: https://chromium-review.googlesource.com/250227 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* lulu: Implement keyboard backlight control.Grover Yen2015-01-133-0/+18
| | | | | | | | | | | | | Apply PN6 for keyboard backlight. BUG=chrome-os-partner:35115 BRANCH=none TEST=make -j buildall, make -j tests Change-Id: Ie5b706f782c75854c44e104d88b7b3dd616bd1e0 Signed-off-by: Grover Yen <Grover_Yen@wistron.com> Reviewed-on: https://chromium-review.googlesource.com/238157 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* lulu: Implement LED control.Grover Yen2015-01-132-74/+29
| | | | | | | | | | | | | Implement LED control for lulu. BUG=chrome-os-partner:35115 BRANCH=none TEST=make -j buildall, make -j tests Change-Id: I792586118e18b74c42643a6dcfb1f66331c225cb Signed-off-by: Grover Yen <Grover_Yen@wistron.com> Reviewed-on: https://chromium-review.googlesource.com/238154 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* cid: Implement LED control.Grover Yen2015-01-132-74/+29
| | | | | | | | | | | | | Implement LED control for cid. BUG=chrome-os-partner:35115 BRANCH=none TEST=make -j buildall, make -j tests Change-Id: Ie86b2dd28c9c2d309d65bd09c16104e0d7817b6e Signed-off-by: Grover Yen <Grover_Yen@wistron.com> Reviewed-on: https://chromium-review.googlesource.com/238320 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* cid: Initial boardGrover Yen2015-01-078-0/+617
| | | | | | | | | | | | | Copy from auron with string changes. BUG=none BRANCH=none TEST=make -l buildall, make -j tests Change-Id: I1564891ecb8574e41104dced7700091708650d85 Signed-off-by: Grover Yen <Grover_Yen@wistron.com> Reviewed-on: https://chromium-review.googlesource.com/237979 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* lulu: Initial boardGrover Yen2015-01-078-0/+617
| | | | | | | | | | | | | Copy from auron with string changes. BUG=none BRANCH=none TEST=make -j buildall, make -j tests Change-Id: Ib9c894a7a06cd3840a66c448c49c848a8abc27b2 Signed-off-by: Grover Yen <Grover_Yen@wistron.com> Reviewed-on: https://chromium-review.googlesource.com/237686 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Auron, Paine, Yuna: Modify the Tj max temperatureHsu Henry2015-01-053-3/+3
| | | | | | | | | | | | | The Tj max of Broadwell should be 105C. BUG=chrome-os-partner:34114 BRANCH=auron, paine, yuna TEST="iotools rdmsr 0 0x1a2" return 0x690000, the Tj max should be 105C. Change-Id: I3fe0a7a219761e259fef3b2571169561e08eb140 Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/238131 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Paine, Yuna: Upate thermal table v0 12Hsu Henry2015-01-052-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | on off RPM step0 0 step1 38 33 3200 step2 45 40 3700 step3 52 47 4000 step4 56 51 4400 step5 58 53 4900 step6 70 65 5500 step7 95 90 6500 ec shutdown point: 105 Where the temperature scale is celsius degree. BUG=chrome-os-partner:34418 BRANCH=paine, yuna TEST=Use the hacked code to return the fake temperature, check all the steps with yuna. The fan behavior works properly. Change-Id: Ibd2faecd47799bb66d4fafdda76f3db27814062a Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/237641 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Paine, Yuna: Fan table implement.Hsu Henry2014-12-124-6/+140
| | | | | | | | | | | | | | | | | | | | | | | Yuna, Paine define the thermal table for fan. The table is below: on off RPM step0 0 step1 43 37 3200 step2 48 43 3700 step3 52 47 4000 step4 56 51 4400 step5 60 55 4900 step6 70 65 5500 step7 95 90 6500 Where the temperature scale is celsius degree. BUG=chrome-os-partner:34418 BRANCH=paine, yuna TEST=Use the hacked code to return the fake temperature, check all the steps with yuna. The fan behavior works properly. Change-Id: Id4f5957d63a81046539bc96a95e30b6b022803fe Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/233828 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Paine, Yuna: Add 10ms delay between SUSP_VR and RSMRST#Hsu Henry2014-12-081-0/+3
| | | | | | | | | | | | | BUG=chrome-os-partner:34411 BRANCH=Paine, Yuna TEST=The offset between the two signals is around 13ms by using oscilloscope to measure it. Change-Id: I69677165e5ddea81d02464f5fcdee343862a733b Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/233860 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Yuna: Update battery spec for 54Wh battery.Hsu Henry2014-12-051-2/+23
| | | | | | | | | | | | | | Update the parameter from the spec for 54Wh battery. Use bat_id pin separate the two battery. BUG=chrome-os-partner:32709 BRANCH=yuna TEST=none Change-Id: I7bd4c61f1d02652d1010a3efcb3f985fb66adaad Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/233116 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Yuna: Update battery spec for 48Wh battery.Hsu Henry2014-12-032-8/+8
| | | | | | | | | | | | | | | Update the parameter from the spec for 48Wh battery. Also add the bat_id pin to identify 48Wh and 54Wh battries if yuna need the 54Wh battery pack. BUG=chrome-os-partner:32709 BRANCH=yuna TEST=none Change-Id: I7a04bf2b8c8b099d5202b6fdf23cd89aae4fd744 Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/232173 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Paine: keyboard fix to support old and new reset IC.Hsu Henry2014-11-201-0/+12
| | | | | | | | | | | | | | | Paine use newer keyboard reset ic. Some workaround is needed for old machine with old reset ic. BUG=chrome-os-partner:33806 BRANCH=paine TEST=flash the ec, the keys "3, e, d, c , ..." work in CrOS with old machine. Change-Id: I9167a3b0977013123e776b1cb71004e69d7dbb5a Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/230981 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Paine: invert the keyboard column 2Hsu Henry2014-11-201-0/+1
| | | | | | | | | | | | | Paine use newer keyboard reset ic. The keyboard column 2 should be inverted. BUG=chrome-os-partner:33806 BRANCH=paine TEST=none Change-Id: I922f51efac8e2d0a4bb33c603f0acf263cdef40f Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/230980 Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* Paine, Yuna: Make the blink point same as UI.Hsu Henry2014-11-142-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the led behavior based on customer SPEC. Also change some point based on UI. The UI use percentage = remaining capacity / full charge capacity. display percentage = (percentage - shutdown factor) / (full factor - shutdown factor) where shutdown factor = 0.04 and full factor = 0.97 . If AC plug in, the UI percentage will be 100% when display percnetage large than 97%. The approximate value is calculated below. UI 100% => the percnetage 0.965*0.93+0.04 = 0.93745. Use 937‰. UI 10% => the percentage 0.104*0.93+0.04 = 0.13672. Use 137‰. UI 3% => the percentage 0.034*.93+0.04 = 0.07016. Use 71‰. BUG=chrome-os-partner:32802 BRANCH=paine, yuna TEST=See below. UI % AC battery led note 100 in blue <=10 out amber 1s on/3s off low battery <=3 out amber 1s on/1s off critical low battery Change-Id: Ieff72771dbe7f8e21950be1fbfd2392129dd1ed2 Signed-off-by: Henry Hsu <Henry.Hsu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/227416 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: Do not try to wake the battery after battery cut-offVic Yang2014-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the battery cut-off command is issued with external power present, the battery can end up in one of the following two states: 1. The battery stays responsive but is waiting for the external power to go away. 2. The battery decides to cut itself off right away. In case 1, we are already avoiding charging the battery again, so we're good. However, in case 2, the charge state machine mistakenly thinks the battery is dead and tries to revive it. Fix this by checking if the battery is cut off before starting to revive it. BRANCH=None BUG=chrome-os-partner:33372 TEST=Cut off the battery with external power connected. Wait for a while and then disconnect external power. Check the battery is sure cut off. Repeat for several times. Change-Id: I9d0194446a87a47ef5c0024607a267aee3566268 Original-Change-Id: Icf343b168a556a490bc1786802a8a6e230863a28 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/227521 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/229161 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: math: use CONFIG_FPU when using float.Gwendal Grignou2014-11-114-1/+17
| | | | | | | | | | | | | | | | | | ifdef code than needs CONFIG_FPU (acos and friends) BRANCH=ToT BUG=chrome-os-partner:32050 TEST=define CONFIG_FPU on host board and use it. Change-Id: I6bb6c280e6f8af882b52e95c1b01dd26e31d286e Original-Change-Id: I1c4ed16c23450bb4059d26044f4c1fe45b33674e Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/226414 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Sheng-liang Song <ssl@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/229170 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: core: Add subcommands to MOTION_SENSE_CMDGwendal Grignou2014-11-112-6/+56
| | | | | | | | | | | | | | | | | | These subcommands allow accessing sensor (accel+gyro) over i2c. BRANCH=ToT BUG=chrome-os-partner:31071 TEST=Compile. Change-Id: Ic19aac1b6f54ef844e242c5d19dfe63bf8e49d9d Original-Change-Id: Ic6c3e9bf9c23f369de9f540c50daab7f2e4582ee Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/225653 Reviewed-on: https://chromium-review.googlesource.com/229156 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: usb: fix undefined USB endpointsVincent Palatin2014-11-111-4/+8
| | | | | | | | | | | | | | | | | | | | | | | When calling the ep_undefined function, the linker was not considering it as a Thumb function and not setting the LSB in the address pointer. This was causing an exception at runtime. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=all BUG=none TEST=inspect assembly Change-Id: I176e584d36b61edd6efd6a6064482f67872be6e6 Original-Change-Id: I8f4d1e351081032e138f593f0b61294031fc09b1 Reviewed-on: https://chromium-review.googlesource.com/226093 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/229160 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: it8380dev: add pwm control moduleDino Li2014-11-118-22/+294
| | | | | | | | | | | | | | | | | | | | | 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: Ic5144c07743f859c280dbc08ec6b42eff6e661cc Original-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> Reviewed-on: https://chromium-review.googlesource.com/229109 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: MKBP event signalling implementationVic Yang2014-11-1111-1/+241
| | | | | | | | | | | | | | | | | | | | | | | | This implements a new API for EC modules to define MKBP event sources and send MKBP event to the AP. Also, a new host command EC_CMD_GET_NEXT_EVENT is added for the AP to query the pending MKBP events. Each event type may have custom event data sent along with the event. BRANCH=None BUG=chrome-os-partner:33194 TEST=Enable MKBP event on Ryu. Set a host event from EC console, run 'ectool nextevent', and see MKBP event 0x01 (HOST_EVENT) and the set host event. Change-Id: Ic3ceff8b5ff6f3d8df7b74b74d535112fe4c09fb Signed-off-by: Vic Yang <victoryang@chromium.org> Original-Change-Id: I28a1b7e826bcc102bbe39016c9bb3e37d125664c Reviewed-on: https://chromium-review.googlesource.com/224905 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/229107 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: EC: Ensure the udelay function waits at least the time indicated.Kenji Chen2014-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Udelay function might get delay less than the time indicated by the input parameter. udelay(4) sometimes get the tick like, 6->7->7-> 8->8->9->A and then the udelay return. But, the sampling point of 6 could be at the end of 6(close to 7) and the point of A could be right at the beginning of A(close to A). This function could get delay from (us - 1) to (us + 1). This change is to ensure the delay at least over the parameter, us. BRANCH=master BUG=None TEST=Build an EC FW iamge and run on Rambi to ensure at the time duration indicated by the parameter is elaspsed and satisfied. Signed-off-by: Kenji Chen <kenji.chen@intel.com> Original-Change-Id: I797f80c577d7e29e75a304aec1e02d2c750f8a23 Reviewed-on: https://chromium-review.googlesource.com/224660 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Mohammed Habibulla <moch@chromium.org> Change-Id: Iacd0485511e9e01325bd7b11943880ea067be795 Reviewed-on: https://chromium-review.googlesource.com/229154 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: EC:KBC: Wait until LPC host senses the IRQ and gets the character.Kenji Chen2014-11-111-1/+6
| | | | | | | | | | | | | | | | | | | BRANCH=master BUG=chrome-os-partner:29139 TEST=Buiid an EC FW image and run on Rambi to test if key loss is improved and any side effect somes with this change. Need more test units to confirm this. Signed-off-by: Kenji Chen <kenji.chen@intel.com> Original-Change-Id: I2399e33d2ca3defe8cd9b1f94ab0af1db7f84635 Reviewed-on: https://chromium-review.googlesource.com/225557 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Mohammed Habibulla <moch@chromium.org> Change-Id: Ia7acdbaec729f8ddff9228ebabbee716c012ba53 Reviewed-on: https://chromium-review.googlesource.com/229108 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: USB-console: Don't wait in interrupt contextsAnton Staaf2014-11-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the USB console code would wait for up to 30 ms for the USB packet buffer to become available for transmission, even if it was called from an interrupt context. This doesn't work because, even if we were OK with waiting this long in interrupt contexts, which we are not, we rightly assert that we are not in an interrupt context in task_wait_event, which usleep calls. This solution is a quick fix to only wait when not called from within an interrupt context. The correct solution is likely to decouple the printf code from directly calling the console driver code, instead we should place a queue between the driver and printf logic. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Enable USB console on discovery board and manually test. Change-Id: I8f6f820fefc970d84db2b637a1504193be4fd9ce Original-Change-Id: I5b6f7bbb77f75132c75935f8fda01e652a236ae0 Reviewed-on: https://chromium-review.googlesource.com/225867 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/229155 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: usb: allow reading descriptors larger than 64 bytesVincent Palatin2014-11-111-29/+50
| | | | | | | | | | | | | | | | | | | | | | | | | When a control transfer requests a descriptor larger than 64 bytes, we need to do several IN transfers to get the proper packet sequence : SETUP IN IN IN .. IN OUT(null) Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=samus BUG=chrome-os-partner:32652 TEST=set USB_STR_VERSION to "012345678901234567890123456789ABCDEF", then do "lsusb -v" on the host and check the USB transfers with the protocol analyzer. Change-Id: I5ddeede41bd39acf3619a620c7046c9fcad5bc7a Original-Change-Id: I6940095008cb2a34c6896b337c5eda4fa267adc1 Reviewed-on: https://chromium-review.googlesource.com/222700 Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/229151 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>
* CHERRY-PICK: usb: Groundwork for USB BOS & Billboard class descriptors.Todd Broch2014-11-114-3/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BOS (Binary Device Object Store) descriptor was added to the USB specification (3.0) to allow a richer set of device capability specific descriptors. The Billboard class is meant to expose (read-only) the status of USB devices capable of alternate mode functions. It's required to use the BOS descriptor type and at a high level looks like: - BOS Device Descriptor (5bytes) - Container ID Device Capability Descriptor (20bytes) - Billboard Device Capability Descriptor (44byte + 4 * numSVIDs) This CL adds: 1. Ability for Get Descriptor on BOS descriptors. Note hidden behind CONFIG_USB_BOS as these descriptors change USB device requirements to: - bcdUSB >= 0201 - no interface descriptors 2. structures for all BOS, Container & Billboard descriptor elements complete w/ CamelCase. BRANCH=none BUG=chrome-os-partner:32652 TEST=compiles with CONFIG_USB & CONFIG_USB_BOS enabled. Change-Id: I86c8ab80d16837b1eeb71cf83d3319da79682b08 Original-Change-Id: I1b24bc728f2ebba7d91840801d2ebe576e240e7c Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/221570 Reviewed-on: https://chromium-review.googlesource.com/229152 Reviewed-by: Mohammed Habibulla <moch@chromium.org> Commit-Queue: Mohammed Habibulla <moch@chromium.org> Tested-by: Mohammed Habibulla <moch@chromium.org>