summaryrefslogtreecommitdiff
path: root/board/servo_v4p1/ina231s.h
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-051-59/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* Revert "servo_v4p1: Add driver for power management"Jan Dabros2021-02-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4f8c2db072fb4a8a99ccdc9fa557f122582f8173. servo_v4p1 uses charge_manager, however currently this is done improperly. Instead of HOST and ALT ports, CHG and DUT ports are registered withing framework, even though they are not used for charging servo platform itself. In order to implement power management, the most convenient (and clean) solution is to use charge_manager API. The plan is to make use of it, however first we need to address charge_manager problem mentioned above. This way we will avoid code duplication and custom drivers which duplicate existing generic implementation. For the time being, revert custom power management. After fix for charge_manager on servo_v4p1 is applied, will get back to this issue and re-apply power management features in new form. BUG=b:144776402 BRANCH=main TEST=build and flash servo_v4p1. After it boots, issue `ina 2` command. By default the Alert limit should be equal to 0, which means that now power restrictions are applied. Signed-off-by: Jan Dabros <jsd@semihalf.com> Change-Id: I8aea351331dd380fc13c5c6c43ea7dc3a29bd918 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2697070 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* servo_v4p1: Add driver for power managementJan Dabros2021-01-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the power source and loads, the servo_v4p1 may have insufficient wattage available. New driver gathers information about available inputs, monitors power consumed and sets alert when a threshold is crossed. For servo_v4p1 there are two main power sources - host USBC port and servo charger port. Host connection operates on 5V and may allow up to 500mA(USB2.0), 900mA(USB3.0), 1500mA(BC1.2 or USB-C) or 3000mA(USB-C). Servo charger port currently offers only standard USB-C wattage - 1500mA/5V or 3000mA/5V. There is a possibility that in future PD will be enabled on this port, thus enabling higher wattages. Algorithm queries host connection capabilities (including BC1.2) and servo charger port connection settings, with charger port being always a primary selection. INAXX chip is used to monitor level of consumed power and notification is send to the user, when threshold is reached. In future servod should be used as a channel for alerts notification. BUG=b:144776402 BRANCH=master TEST=Test various connections for input power to servo_v4p1 - USB2.0 host/cable, USB3.0, BC1.2 enabled/disabled, servo charger with different Rp/Rd settings, also hot plugging servo charger. Provide different loads to servo - pendrives, DUT connection and DisplayPort. Monitor power used by servo and loads (either by external power meter or compile-in INA_CMD). When threshold is reached, one should see "System full power threshold exceeded" on the servo console. Default threshold is set to 90% of power. For example on USB2.0 connection (500mA at max) and assuming 5V is provided to VCC rail, warning should appear when drawing 500mA * 9/10 = 450m. Keep in mind though that actual alert is configured on power over limit mode (not current), thus there may be some differences when there is no ideal 5V on a tested connection. Signed-off-by: Jan Dabros <jsd@semihalf.com> Change-Id: I1099192fa7475b51922e9dcb272f812d1547f311 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2592495 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* servo_v4p1: Add INA231S functionalitySam Hurst2020-07-011-0/+59
This functionality is only available in RO BRANCH=none BUG=b:146793000 TEST=make -j buildall Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I37f97e8e882a8a5948aeeb669ca39cc930e32d31 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2216406 Reviewed-by: Wai-Hong Tam <waihong@google.com>