summaryrefslogtreecommitdiff
path: root/board/rammus/gpio.inc
Commit message (Collapse)AuthorAgeFilesLines
* tablet_mode: Introduce hall sensor specific handlingFurquan Shaikh2018-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Lock the ECZhuohao Lee2018-11-301-1/+0
| | | | | | | | | | | | | | | 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>
* rammus: Fix power leakagemichael_chen2018-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Modify PMIC and GPIO setting to fix power leakage. Dependent on EE request: 1. Init PMIC Discharge control register. 1.1. Discharge control register 1 (0x3C) = 0x00. 1.2. Discharge control register 2 (0x3D) = 0x55. 1.3. Discharge control register 3 (0x3E) = 0x44. 1.4. Discharge control register 4 (0x3F) = 0x04. 2. Remove gpio "TP_INT_CONN" GPIO_PULL_UP configuration. BUG=b:117194355 BRANCH=ToT TEST=Manual EE measure power and check it is improve. Change-Id: I8b0e5ff479fee0ebcc26e9e57073ec6b5fc8868f Signed-off-by: michael_chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/1253369 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 keyboard backlight enable controlmichael_chen2018-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | Implement keybaord backlight enable control Enable keyboard backlight when system from S3 to S0. Disable keyboard backlight when system from S0 to S3. BUG=None BRANCH=ToT TEST=Manual. When system power on, using console command kblight to check keyboard backlight. When system power off/suspend, check keyboard backlight. Change-Id: I9a69664eb0cbd41c16cc90d3698c6375ddc02d9c Signed-off-by: michael_chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/1198944 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>
* rammus: Fix PD port 0 reset control behaviormichael_chen2018-09-181-1/+1
| | | | | | | | | | | | | | | | | | Because the GPIO USB_PD_RST_C0_L is high active. When USB_PD_RST_C0_L is high, the PD port 0 i2c communication will fail. BUG=None BRANCH=ToT TEST=Manual. Using consol command "i2cxfer r16 0 0x52 0x00" to read TCPC port 0 VID is ok. Change-Id: I998669f85770672478a4c9131f7b5a767ffd6773 Signed-off-by: michael_chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/1198905 Commit-Ready: michael chen <michael5_chen@pegatroncorp.com> Tested-by: michael chen <michael5_chen@pegatroncorp.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* rammus: revise the gpio.inc, board.h and board.cZhuohao Lee2018-07-311-96/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+123
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>