summaryrefslogtreecommitdiff
path: root/driver/ioexpander
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-0514-2499/+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>
* IOEX: it8801: change the KSO mapping array to overridableTim Lin2021-09-132-3/+4
| | | | | | | | | | | | | | | KSO mapping array need to follow the different circuit design, so change this array to overridable. BUG=b:199337186 BRANCH=none TEST=make buildall -j4 Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I3ee0ceffbdb50cf9282cda6039c4a44ebe445bd0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3151045 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* IOEX: it8801: Enable GPIO based interruptsVijay Hiremath2021-09-102-26/+153
| | | | | | | | | | | | | | | | Added code to enable GPIO based interrupts on it8801 I/O Expander. BUG=b:197659347 BRANCH=none TEST=Tested on ADL-RVP able to get ISR triggered Change-Id: I7f5f460f48fc21e51bb93bede5a05da89b7dc807 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3076469 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Dino Li <Dino.Li@ite.com.tw> Commit-Queue: Keith Short <keithshort@chromium.org>
* it8801: Allow configurable option to use RAW KeyboardVijay Hiremath2021-09-101-1/+3
| | | | | | | | | | | | | | | | | | To avoid BOM stuffing options on RVP, it8801 discrete keyboard with I/O expander is added on RVP as an AIC in MECC1.1. This config allows MECC vendors to easily switch between RAW keyboard or discrete keyboard. BUG=b:197659347 BRANCH=none TEST=make buildall -j Change-Id: I3b55eff0f5a1582daf63fca955954b8a42c1b7b2 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115433 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Li Feng <li1.feng@intel.com>
* ioex: it8801: Support multiple I2C addressesVijay Hiremath2021-09-102-5/+6
| | | | | | | | | | | | | | | | | | | To avoid the I2C address contention between multiple I2C devices on same bus, added code to support multiple I2C addresses for it8801 I/O expander. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I6985973f9ae3ce91383d3b568a851169e6a308af Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115426 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Li Feng <li1.feng@intel.com>
* pca9675: Initialize the I/O pins at initVijay Hiremath2021-06-151-11/+17
| | | | | | | | | | | | | BUG=none BRANCH=none TEST=Tested on ADLRVP, all the I/O pins are at default state as in GPIO.inc Change-Id: Id1f19d500860749183b4eaed90685efda3bbc716 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2954729 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.com>
* COIL: Update IT8801 address commentDiana Z2021-06-081-1/+1
| | | | | | | | | | | | | | | Update the comment for the IT8801 i2c address to match new i2c conventions. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I868c9416a3b36396154df41f2e026691de75491c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2946314 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* IOEX_CCGXXF: Add 1.8V level GPIOs supportIurii2021-06-031-3/+18
| | | | | | | | | | | | | BUG=none BRANCH=none TEST=Tested voltage levels on CCGXX validation platform Change-Id: Ibc8f0dc05ac4351e96d9479a99227633742ec7bc Signed-off-by: Iurii Berezhanskyi <iurii.berezhanskyi@infineon.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2891837 Tested-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* I/O Expander: Add CCG6XX driverVijay Hiremath2021-05-051-0/+130
| | | | | | | | | | | | | | | Cypress CCGXXF PD has built-in I/O Expander, added driver to enable GPIO functionality. BUG=none BRANCH=none TEST=Tested on ADLRVP, ioexget & ioexset works as expected Change-Id: I8503178703ad166ac77e96d1990133c88169d23a Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2853143 Tested-by: Svyatoslav Paliy <svpaliy@gmail.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* pca9675: Add code to fit standard I/O expander functionalityVijay Hiremath2021-04-232-95/+88
| | | | | | | | | | | | | | | Added code so that PCA9675 I/O expander driver fits standard I/O expander functionality. BUG=b:169814014 BRANCH=none TEST=Manually tested on ADLRVP, ioexget & ioexset works Cq-Depend: chromium:2845014 Change-Id: I07957a3f1de9b70fc396d767e8cc3ac8884b9c2e Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2829985 Reviewed-by: caveh jalali <caveh@chromium.org>
* COIL: Rename ioexpander i2c address variableDiana Z2021-02-244-21/+21
| | | | | | | | | | | | | | Rename ioexpander i2c address to match current conventions and update any calling locations. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iddad457f73d0dd0167496b794c00e274f8985615 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2697855 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* tca64xxa: Add new ioexpander driver for TI TCA64xxA modulesMichał Barnaś2021-02-232-0/+251
| | | | | | | | | | | | | | | | | | | Add TI TCA64xxA (TCA6416A, TCA6424A) series driver that conforms to ioexpander_drv interface. Driver supports 16- and 24-bits versions and is configured by flags field in ioex_config (TCA64XXA_FLAG_VER_TCA6416A, TCA64XXA_FLAG_VER_TCA6424A). BUG=b:168385201 BRANCH=main TEST=Add 'CONFIG_IO_EXPANDER_TCA64XXA' to any board.h Execute make to any board, ioexpander/tca64xxa.c should be visible in compiled files list Signed-off-by: Michał Barnaś <mb@semihalf.com> Change-Id: I5ca27df3802d900c9967684403f29c33abd96f18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2700296 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* ioexpander: Fix interrupt handler signalEdward Hill2021-01-222-2/+2
| | | | | | | | | | | | | | | Fix ioexpander drivers to pass the correct signal (starting from IOEX_SIGNAL_START) to the interrupt handler. BUG=b:176517051 b:176696599 BRANCH=zork TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: If3c145a43dda66bbd95455c2ffd1591bfddf2958 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2643225 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
* Move tcpic.h header into include/driverSimon Glass2021-01-071-1/+1
| | | | | | | | | | | | | | | | | | This header cannot currently be accessed by Zephyr since it is in a driver directory, not an include directory. This header has quite a bit of public stuff in it, so it seems reasonable to consider everything public. Move the header file and update all users. BUG=b:175434113 BRANCH=none TEST=make buildall -j30 build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ibba37f47a06783fafb5095f853f2a68d92b6df87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607745
* IO-expander: Add driver support for PCA9675Name2020-10-262-0/+167
| | | | | | | | | | | | | BRANCH=None BUG=b:169551130 TEST=make buildall -j Change-Id: If565996850c5c75f3d425e2dc7f705b624ad4cc4 Signed-off-by: pandeyan <anshuman.pandey@intel.com> Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435172 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: Poornima Tom <poornima.tom@intel.com>
* it8801: fix the it8801_pwm_(set|get)_dutyZhuohao Lee2020-09-281-3/+3
| | | | | | | | | | | | | | | The value in PWMDCRi register is used to control the clock of the PWM. We only need to set the clock value to the register after normalized to the 255. BUG=b:162902808 BRANCH=firmware-kukui-12573.B TEST=`kblight <percentage>` is working correctly Change-Id: I6a0c012a06789eb8bbca6209a00b06ef34ee9c86 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431321 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Fennel: Modify it8801 keyboard backlight driver and Enable keyboard backlightMike Lee2020-09-242-9/+57
| | | | | | | | | | | | | | | | 1.Modify it8801 keyboard backlight driver code 2.Enable keyboard backlight setting with it8801 keyboard backlight driver BUG=b:162902808 BRANCH=firmware-kukui-12573.B TEST=Manual. Build and flash BIOS&EC on fennel board. Verify the keyboard backlight function. Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I73dd7ffc7b6ee80ed7ca39ac4d05afe65f666181 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2413675 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* ioexpander/it8801: to avoid causing cache to reset when EC is resettim2020-04-291-12/+22
| | | | | | | | | | | | | | | | In the initial state, we will read the value of SOVR and write it to the cache(it8801_gpio_sov[]) to avoid causing cache to reset when EC is reset. BUG=b:155050379 BRANCH=none TEST=make BOARD=kappa -j Signed-off-by: tim <tim2.lin@ite.corp-partner.google.com> Change-Id: Id6a881a39c3740dc9c412a854ca9708b3b20fe37 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2167123 Tested-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* ioexpander: set GPIO only when real setLu Zhang2020-04-271-1/+1
| | | | | | | | | | | | | | | | | | Ioexpander shouldn't change the GPIO level when EC doesn't set GPIO_HIGH or GPIO_LOW. BUG=b:154447176 BRANCH=none TEST=use ioexget command to see if this GPIO changes when jump rw. Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: Id49612557441036df574ebef961beb3ba1879aef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2167114 Tested-by: Paul Ma <magf@bitland.corp-partner.google.com> Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Paul Ma <magf@bitland.corp-partner.google.com> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Peichao Li <peichao.wang@bitland.corp-partner.google.com>
* nct38xx: Remove ioexpander_nct38xx.hEdward Hill2020-03-202-34/+1
| | | | | | | | | | | BUG=b:150349225 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I830196908012778254e7306ea6a53bb3e4e4258d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110547 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* pcal6408: add ioexpander driverPaul Ma2020-03-052-0/+396
| | | | | | | | | | | | | | | | Add NXP PCAL6408 io expander support. BUG=b:150385481 BRANCH=none TEST=Change dalboz board specific files and verify hdmi hpd status can be detected correctly. Other gpios can be initialized and can input or output correct value by console commands ioexget and ioexset. Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Change-Id: I94c63149bac4ecbac4078abfe375d3009c944079 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2082299 Reviewed-by: Edward Hill <ecgh@chromium.org>
* driver/ioexpander_it8801: add I/O expander driver for GPIOtim2020-02-172-17/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IT8801 is an I/O expander with the gpio. Add api compatible with ioexpander_drv so the main io expander framework can make use of the pins on the it8801. BUG=b/138352732, b/146996723 BRANCH=none TEST=Use gpio.inc to declare the gpio state. The console command #ioexget can get as follows: 0 O L IT8801_G0_00 1 O H IT8801_G0_03 1 O H IT8801_G0_04 0 O L IT8801_G0_06 0 O L IT8801_G0_07 1 O H ODR IT8801_G1_10 1 O H ODR IT8801_G1_11 1 O H ODR IT8801_G1_12 1 I H IT8801_G1_13 1 I H IT8801_G1_14 1 I H IT8801_G1_15 1 O H ODR IT8801_G2_20 1 O H ODR IT8801_G2_21 0 O L ODR IT8801_G2_22 0 O L ODR IT8801_G2_23 TEST=jacuzzi, juniper and kappa still compile TEST=keyboard scanning still works TEST=keyboard scanning now uses fewer i2c packets due to caching of GPIO23 Change-Id: I7ad89058ccd43b073d648e93877b86d6f187b5df Signed-off-by: tim <tim2.lin@ite.corp-partner.google.com> Signed-off-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1712887 Reviewed-by: David Huang <David.Huang@quantatw.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: David Huang <David.Huang@quantatw.com>
* jacuzzi: enable ledTing Shen2019-12-272-1/+145
| | | | | | | | | | | | | | | | | Implemented pwm module using it8801, and enable led_pwm on jacuzzi. BUG=b:135086465 TEST=1) verify the led status looks good (full=green, charging=blue) 2) enable CONFIG_CMD_LEDTEST and verify the color settings looks good. BRANCH=none Change-Id: Ifa682473c02fec98ae026e2502df775505d614d7 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1892381 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* cleanup: Segregate ioexpander related drivers in ioexpander folderVijay Hiremath2019-11-228-0/+1038
BUG=none BRANCH=none TEST=make buildall -j Change-Id: I7fe9ab23254dbd8515936d10ad6782305e76236c Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1925173 Reviewed-by: Jett Rink <jettrink@chromium.org>