summaryrefslogtreecommitdiff
path: root/board/rammus/board.h
Commit message (Collapse)AuthorAgeFilesLines
* rammus: Disable HC debug by defaultGwendal Grignou2022-02-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | Similar to commit 27e8d040b368 ("nocturne: Disable HC debug by default"). When sensors are in use, host queries EC often. BUG=b:205354460 TEST=compile. Apply change in rammus branch, check on DUT that host command messages are gone. BRANCH=rammus Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: Ia828428ab940a0c7faa627fa3655b4f7ce5cd9b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3456704 Reviewed-by: Ricardo Quesada <ricardoq@chromium.org> (cherry picked from commit d059ea64ba23dff66392677367cf70c26e20cf6a) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3466430 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Ricardo Quesada <ricardoq@chromium.org> Tested-by: Ricardo Quesada <ricardoq@chromium.org> Auto-Submit: Ricardo Quesada <ricardoq@chromium.org>
* rammus: gryo sensor add 2nd source ICM40608Michael5 Chen12021-09-281-0/+3
| | | | | | | | | | | | | | | | | | | gryo sensor add 2nd source icm40608 BUG=b:192817920 BRANCH=rammus TEST=make BOARD=rammus Set CBI SSFC 0x10 and using command "watch ectool motionsense lid_angle" for icm-40608. Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: If64ee373c0c63e074b11b8a37c9d67c70d409f40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3180700 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org> (cherry picked from commit 9fc70659ae9cc8350e8734471bcffb55b2580f74) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3189456 Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
* rammus: Add accelerometer 2nd source KX022.Michael5 Chen12021-09-131-0/+1
| | | | | | | | | | | | | | | | | | Add accelerometer 2nd source KX022. BUG=b:197005105 BRANCH=rammus TEST=make BOARD=rammus Using command "watch ectool motionsense lid_angle". Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: Iea7fee7766730a8c054217877abb76facb55976a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3102685 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org> (cherry picked from commit e7de2313be106dc09fdc2c67eda7c190be5fa3e4) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3156305
* rammus/shyvana: lower the maximum allowed ODR to 100HzEnrico Granata2019-07-181-0/+3
| | | | | | | | | | | | | | | | | | | | | Some tests are failing on Shyvana at the highest ODR. This is likely due to Shyvana not having a dedicated GPIO path for MKBP events, instead relying on the ACPI path which is known to have lower latency guarantees than we expect. Lowering the ODR allows the tests to pass more reliably. BUG=b:123477920 TEST=run failing CTS test cases on Shyvana Signed-off-by: Enrico Granata <egranata@chromium.org> Change-Id: I864b90f26017c382e48adf976ecf5d6500480037 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1440030 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Enrico Granata <egranata@chromium.org> Tested-by: Enrico Granata <egranata@chromium.org> Auto-Submit: Enrico Granata <egranata@chromium.org>
* rammus: Enabled/Disabled G-sensor by SKU IDmichael5 chen2019-04-181-0/+1
| | | | | | | | | | | | | | | | | | Disabled G-sensor function for Leona (SKU ID: 0x2863). BUG=b:129375329 BRANCH=firmware-rammus-11275 TEST=Manual On Leona, rotate the system and check system can not change to tablet mode. On Shyvana and Shyvana-m, check function is ok. Using EC console command accelinfo and accelrate to check sesnor status. Checking motion senor count. Change-Id: Ib97e9e872e7cbc8cd2513f695170c44547815a76 Signed-off-by: michael5 chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1559526 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
* rammus: Disable tight timestampsEnrico Granata2019-03-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | Rammus boards do not have a dedicated GPIO for MKBP events between EC and AP. On boards without this hardware support, the tight timestamps feature cannot be reliably supported due to issues with the performance of the ACPI SCI chain, compared to a dedicated interrupt. Disabling tight_timestamps restores legacy behavior that is known to fare better with sensors events over SCI. BUG=b:123700100 BRANCH=rammus TEST=tight_timestamps is 0, ran CtsSensorTestCases Change-Id: I459f2673abad7ff75ba9e8a844b7702dee1ef8c0 Signed-off-by: Enrico Granata <egranata@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1524667 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1524663
* rammus: fix incorrect power mode configuration for the USB Type-AZhuohao Lee2019-02-111-0/+2
| | | | | | | | | | | | | | | | | | | On Rammus, the power mode of the USB Type-A is CDP. However, the default configuration is SDP2. We don't meet any problem on previous setting because of missing CONFIG_USB_PORT_POWER_SMART_INVERTED. This patch fixes the incorrect CONFIG in board.h. BUG=none BRANCH=firmware-rammus-11275 TEST=make -j buildall connect phone to type-a port, CDP works Change-Id: I19a6f2c01faa452131fa036a28be2fc37ce06e58 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1424039 Reviewed-by: Jett Rink <jettrink@chromium.org> (cherry picked from commit 62118f0130fbd11c9f55c98988bede2cbaab7da4) Reviewed-on: https://chromium-review.googlesource.com/c/1460290
* rammus: Reduced keybaord backlight PWMmichael5 chen2019-01-171-0/+1
| | | | | | | | | | | | | | | Reduced keyboard backlight PWM to 80% by customer request. BUG=b:120813003 BRANCH=None TEST=Manual Flash EC FW and check keyboard backlight. Using tool ectool pwmgetduty kb get value 52428 (80%). Change-Id: I879c4900846f5c4dc2a2a44e39396b76f167c9fa Signed-off-by: michael5 chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/1400086 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* motion_lid: Use CONFIG_TABLET_MODEFurquan Shaikh2018-12-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change updates motion_lid driver to use CONFIG_TABLET_MODE to decide if device requires reporting of tablet mode. This basically makes the config options CONFIG_LID_ANGLE_INVALID_CHECK and CONFIG_LID_ANGLE_TABLET_MODE obsolete. Now that EC will always report tablet mode aligned with Chrome (at 180 degree), any device that supports tablet mode and uses motion lid driver will require this by default and should not require boards to individually select any special config options. Thus, it also gets rid of unused CONFIG_LID_ANGLE_TABLET_MODE and CONFIG_LID_ANGLE_INVALID_CHECK. BUG=b:120050761 BRANCH=octopus TEST=make -j buildall Change-Id: Ib73af66ca1c17d4033cf54f0b4b86bf41793f3a3 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1350470 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1379414 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Tested-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Commit-Queue: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
* tablet_mode: Introduce hall sensor specific handlingFurquan Shaikh2018-12-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change performs the following renaming: 1. CONFIG_TABLET_SWITCH -> CONFIG_HALL_SENSOR Indicates if a device has hall sensor 2. TABLET_MODE_GPIO_L -> HALL_SENSOR_GPIO_L Provides the interrupt line from hall sensor to EC. 3. tablet_mode_isr -> hall_sensor_isr Interrupt routine that gets control on hall sensor interrupt. 4. tablet_mode_init -> hall_sensor_init Init routine for initializing hall sensor interrupt. 5. tablet_switch_disable -> hall_sensor_disable Disable hall sensor interrupt and tablet mode sub-system. This is done to separate hall sensor interrupt from tablet mode handling. It is another step towards aligning tablet mode detection on EC with Chrome. Hall sensor interrupt occurs when the lid is in 360-degree flipped mode. If tablet mode is not already triggered by lid motion driver, then hall_sensor_isr will set tablet mode and take necessary actions to disable input peripherals. CQ-DEPEND=CL:1351518 BUG=b:120050761 BRANCH=octopus TEST=make -j buildall Change-Id: I5841f6875d538a624cb888bc048f252397ab457c Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1350469 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1379413 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Tested-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Commit-Queue: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
* rammus: reconfig the PS8751 i2c port according to the board versionZhuohao Lee2018-12-191-1/+3
| | | | | | | | | | | | | | | | | | | | On Shyvana, we found that if we put the Parade PS8751 and Analogix ANX3447 on the same i2c bus, the ANX3447 would be broken because of PS8751 i2c bus error. To avoid this kind of problem, we decided to separate the TCPC i2c bus starting from board version >= 2. The new assignment are ANX3447:i2c_0_0, PS8751:i2c_0_1. This patch also adds a new config CONFIG_USB_PD_TCPC_RUNTIME_CONFIG for enabling runtime switching the TCPC setting. BUG=b:118063849 BRANCH=firmware-rammus-11275 TEST=verified on DUT with board_version <= 1 verified on reworked DUT with board_version >= 2 Change-Id: I0bdc930c1a5e691239f5f5c256d380d0111eed91 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1379418
* rammus: Lock the ECZhuohao Lee2018-11-301-6/+1
| | | | | | | | | | | | | | | This patch removes the CONFIG_SYSTEM_UNLOCKED to lock the EC and adds the CONFIG_USB_PD_COMM_LOCKED to enable USB PD only when EC is in RW. BUG=b:111816190,b:119929973 BRANCH=master TEST=make buildall -j pass Change-Id: Id812a4036b9a72e60d72a67d4cf4541aa84d5940 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1355644 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* dptf: Get rid of CONFIG_DPTF_DEVICE_ORIENTATIONFurquan Shaikh2018-10-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_DPTF_DEVICE_ORIENTATION was added to indicate mode change to the host to allow it to read the tablet mode flag from shared EC memory and select the right DPTF table to load (if supported). However, this config seems unnecessary because of the following reasons: 1. Host sets SCI mask to indicate to the EC which events it wants to process. Thus, even if the EC sets mode change flag, it will not be notified to the host unless it supports mode change event. 2. Additionally, if host supports mode change event, but does not support multiple DPTF tables, then EC ACPI code takes care of ensuring that there is a thermal event handler present to reload tables. 3. CONFIG_DPTF_DEVICE_ORIENTATION was defined for almost all new x86 boards. BUG=b:117844490 BRANCH=None TEST=make -j buildall Change-Id: Ic4097ae047e2d559673a321da4df86514f902993 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1292359 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* rammus: Fix system can not charge when battery LED is ambermichael_chen2018-10-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | When battery full charge flag setting and battery discharge to 96%. The battery LED will bright amber and system can't charge. Modify CONFIG_BATTERY_LEVEL_NEAR_FULL from 97% to 94% to fix it. BUG=b:117438684 BRANCH=ToT TEST=Manual 1.Battery charge to full flag setting and remove AC. 2.Discharge the battery RSOC to 96% and plug-in AC. 3.Check battery LED is green. 4.Remove AC and discharge the battery RSOC to 93% and plug-in AC. 5.Check battery LED is amber and system is charge. Change-Id: Ibd80304c109eb452bc5eba98fee3837a1611efb7 Signed-off-by: michael_chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/1250583 Commit-Ready: michael chen <michael5_chen@pegatroncorp.com> Tested-by: michael chen <michael5_chen@pegatroncorp.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* rammus: Implement LED functionmichael_chen2018-09-211-4/+1
| | | | | | | | | | | | | | | | | | | Implement power and charge LED function. BUG=b:111815820 BRANCH=ToT TEST=Manual. Build and flash EC on rammus board. Verify power LED behavior under power on/off/suspend. Verify charge LED behavior under Battery full/charging/Error and DC only Change-Id: I8bed644554c4dab853085613ddcc9e3d3417b9c2 Signed-off-by: michael_chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/1198902 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: michael chen <michael5_chen@pegatroncorp.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* rammus: add CONFIG_BOARD_VERSION_CBI to enable board version queryZhuohao Lee2018-09-071-0/+1
| | | | | | | | | | | | | | | The board version is queried from the EEPROM. This patch adds CONFIG_BOARD_VERSION_CBI to enable the board version query via host command. BUG=none BRANCH=master TEST='mosys platform version' returns the correct value Change-Id: I87a591a00a4335031ee38eb3c0553f1be8c3b676 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1201222 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* rammus: decrease UART bufferJett Rink2018-08-311-1/+1
| | | | | | | | | | | | | | | We are running out of RAM space for rammus and the UART buffer does not need to be 4KB. 1KB is almost enough, so 2KB should be plenty. In the long term chromium:826592 will allow us to use even smaller buffers. BRANCH=none BUG=chromium:826592,b:112088135 TEST=builds and links with child CL stack Change-Id: I31bee3a8c5093e05dc5f27bcc99b8b19a8f022d5 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1200262 Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
* rammus: rammus: Modify TCPC port1 I2C bus to I2C0_0 from I2C0_1.michael_chen2018-08-311-1/+1
| | | | | | | | | | | | | | | | | Modify TCPC port 1 I2C bus to I2CC0_0 depend on hardware design. BUG=b:113238132 BRANCH=ToT TEST=verify Insert TypeC to PD port 1 and check TCPC Init ready. Using I2C command to check VID is ok. Change-Id: I91c9d616e1809e272215f07e87431d3e0f5fa319 Signed-off-by: michael_chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/1189663 Commit-Ready: michael chen <michael5_chen@pegatroncorp.com> Tested-by: michael chen <michael5_chen@pegatroncorp.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* Rammus: enable cbi for EEPROMZhuohao Lee2018-08-301-0/+4
| | | | | | | | | | | | | | Rammus uses EEPROM to store the device info like sku id, board version. This patch adds the cbi config for rammus. BUG=b:111815817 BRANCH=master TEST=ectool cbi set/get Change-Id: I776de02b66b8545a2998635a974933fadd1e4d7a Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1194547 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* rammus: revise the gpio.inc, board.h and board.cZhuohao Lee2018-07-311-16/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the proto schematics, revise the config 1. gpio.inc: - Correct some pins assignment - Remove unused pins - Add TABLET_MODE_L, PP3300_USB_PD, EC_BRD_ID_EN, LID_ACCEL_INT_L, TP_INT, TP_INT_EN 2. board.h: - Remove unused options/code - Add PWM related options/code to support kb light - Add TABLET_SWITCH because of GMR support - Add ANX3447 support 3. board.c: - Remove unused code - Add ANX3447 support - Add temp sensor, ambient and eMMC - Add PWM kb light BUG=b:111579280 BRANCH=master TEST=emerge-rammus chromeos-ec Change-Id: Idbb1755f53c45018305a2724a14232a7cdab9acc Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1149772 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* espi: Rename CONFIG_HOSTCMD_ESPI_VW_SIGNALS to ↵Furquan Shaikh2018-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | CONFIG_HOSTCMD_ESPI_VW_SLP_SIGNALS This change renames CONFIG_HOSTCMD_ESPI_VW_SIGNALS to CONFIG_HOSTCMD_ESPI_VW_SIGNALS in order to make it clear that this config option indicates that chipset sleep signals (SLP_S3 and SLP_S4) are tranmitted over virtual wires instead of physical lines with eSPI. BUG=b:111859300 BRANCH=None TEST=make -j buildall Change-Id: Iab4423abc9102164d4f43296a279c24355445341 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1151048 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* rammus: initial setup for ecZhuohao Lee2018-07-261-0/+259
The initial files are copied from nautilus and will be revised later. BUG=b:111579280 BRANCH=master TEST=emerge-rammus chromeos-ec Change-Id: Ic1312716ca0b2200ec2d396f9e1e8c1bbe226904 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1149771 Reviewed-by: Furquan Shaikh <furquan@chromium.org>