summaryrefslogtreecommitdiff
path: root/zephyr/projects/trogdor/lazor
Commit message (Collapse)AuthorAgeFilesLines
* zephyr: lazor: Enable the last two charger optionsSimon Glass2021-04-031-0/+2
| | | | | | | | | | | | | | | Enable these options to hopefully reach parity with ECOS in this area. BUG=b:183296099 BRANCH=none TEST=build for lazor (no test yet) Change-Id: I04539d7eb258cf71ff462f210a4070c506565b1f Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789806 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lazor: Add support for the ccd_mode_odl interruptSimon Glass2021-04-031-1/+4
| | | | | | | | | | | | | | | | | | This is used on lazor so add it to the map. BUG=b:183296099 BRANCH=none TEST=with another CL, build for lazor and check that the init compile compiles Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I981b36b738b7429416a3dcadc5c9d79fad4e6749 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789804 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: lazor: Add various charger featuresSimon Glass2021-04-031-3/+18
| | | | | | | | | | | | | | | | | Enable various charger features to bring this board closer to parity with the ECOS build. ADC is needed also to support PCON. BUG=b:183296099 BRANCH=none TEST=build for lazor and check the various options in in /tmp/z/trog/build-ro/zephyr/.config Change-Id: I013f6033a5f115ab75cd9aadd2ef6f03008594e5 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2788841 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: Add support for setting charger sense-resistorsSimon Glass2021-04-011-0/+2
| | | | | | | | | | | | | | | | | We need a different value for lazor, so move this to Kconfig. We may at some point move this to device tree. BUG=b:183296099, b:175881762 BRANCH=none TEST=with other CLs, build zephyr for lazor and see that the option is present build config for volteer and make sure it has not changed Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I7b5fa6a03ba24028006f6a1a8516e9244308fe76 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2788833 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Set up USB-A chargingSimon Glass2021-03-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | There is a hidden warning in the current build: zephyr/shim/include/zephyr_gpio_signal.h:14:32: warning: excess elements in array initializer 14 | #define GPIO_SIGNAL(id) DT_CAT(GPIO_, id) ... board/lazor/usbc_config.c:158:2: note: in expansion of macro 'GPIO_EN_USB_A_5V' 158 | GPIO_EN_USB_A_ The root cause is that CONFIG_PLATFORM_EC_USB_A_PORT_COUNT is set to 0. Set it to 1 to match the ECOS board setting. BUG=b:183296099 BRANCH=none TEST=build zephyr for lazor and see the warning is gone Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I8d54d87b28d170ddbdff5c2f0a4bab4ad3a91584 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789801 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: lazor: enable SHIJun Lin2021-03-311-0/+3
| | | | | | | | | | | | | BUG=b:182600858 BRANCH=none TEST=AP-EC host commands communication is functional. Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: Ic9b75f1bea988a0cc6ef8193490daea475caa34e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2786889 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lazor: enable volume buttons and simulation commandWai-Hong Tam2021-03-302-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the volume button GPIOs. Enable the configs of volume buttons and simulation command. BRANCH=None BUG=b:182398910 TEST=Tested on Lazor. Checked the volume buttons working in Chrome. And tested the "button" command": uart:~$ button vup 200 uart:~$ [25.412800 Button 'Volume Up' was pressed] [25.415200 buttons: 2] [25.418200 HC 0x67] [25.448600 HC 0x25] +++(++)[25.612800 Button 'Volume Up' was released] [25.615400 buttons: 0] [25.617700 HC 0x67] [25.634800 HC 0x25] +++(++)button vdown 200 uart:~$ [33.391100 Button 'Volume Down' was pressed] [33.393600 buttons: 4] [33.397100 HC 0x67] [33.591500 Button 'Volume Down' was released] [33.594100 buttons: 0] [33.597400 HC 0x67] Change-Id: I2e1fbe30ed704fa57d49377fea344e0aa52c5741 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2792695 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lazor: enable memory mapped switchesWai-Hong Tam2021-03-251-1/+1
| | | | | | | | | | | | | | | | | Enable the CONFIG_PLATFORM_EC_SWITCH. BRANCH=None BUG=b:183445211 TEST=Tested on Lazor. The following errors didn't show on depthcharge: error, assuming lid is open error, assuming lid is open error, assuming lid is open ... Change-Id: I8f1b6fc8772bb47cc98d559772ab6029fb6e0742 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2787595 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lazor: enable the display backlight based on the lid switchWai-Hong Tam2021-03-252-1/+2
| | | | | | | | | | | | | | | Enable the CONFIG_PLATFORM_EC_BACKLIGHT_LID. BRANCH=None BUG=b:183445211 TEST=Tested on Lazor. Display backligh ON when booting AP. Change-Id: I4a70c418b0250f77d626ad1387ac94e530c3e065 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2787467 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lazor: enable RTCWai-Hong Tam2021-03-251-0/+4
| | | | | | | | | | | | | | | | | | | | Enable PLATFORM_EC_RTC and PLATFORM_EC_CONSOLE_CMD_RTC. BRANCH=None BUG=b:182398910 TEST=Tested on Lazor. The RTC counted. Can set it. uart:~$ rtc RTC: 0x605ccb65 (1616694117.00 s) uart:~$ rtc RTC: 0x605ccb93 (1616694163.00 s) uart:~$ rtc set 12345 RTC: 0x00003039 (12345.00 s) Change-Id: Iecd67ea279508aaa28c81b6d28b7aa2e118023b2 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2787084 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: Enable link time optimization for board filesKeith Short2021-03-241-3/+3
| | | | | | | | | | | | | | | | | | | Move the baseboard and board files into the zephyr_ec library to take advantage of the LTO compiler option enabled for the zephyr_ec library. On Volteer, this reduces the image size by 832 bytes. Total LTO saving is just over 10,000 bytes. BUG=none BRANCH=none TEST=zmake testall TEST=boot zephry-ec on Volteer, verify AP boots Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I2f3aa7f6c400a5b5cd1b346fcf52160b834e66a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776218 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lazor: Connect up the USB interruptsSimon Glass2021-03-241-1/+6
| | | | | | | | | | | | | | | Now that all the code is accessible to zephyr, connect up the interrupt handlers so that events are dealt with. BUG=b:183296099 BRANCH=none TEST=build zephyr for lazor Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ie4790ae85efb7e63fb472d3081c4288f16b31c1f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2777647 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lazor: Add initial USC-C config into the buildSimon Glass2021-03-243-2/+57
| | | | | | | | | | | | | | | | | | Add this file into the zephyr build along with the required CONFIG options and device tree additions, so we can make a start on bringing up USB-C and charging functionality. Add all the required GPIOs here as well, so that things will work when we move the code over in the following CLs. BUG=b:183296099 BRANCH=none TEST=build zephyr for lazor Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I8c4f54664d2d18b44ed8992e61e7b2f694f04f93 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2777642 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lazor: Add supported batteriesSimon Glass2021-03-242-0/+31
| | | | | | | | | | | | | | | Lazor supports five different batteries. Add these to the binding and create a new file to hold the battery information, as we do with GPIOs. BUG=b:183296099 BRANCH=none TEST=build zephyr for lazor Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ie8eac2ed08577e28d63a8119c8ced3bf825e165a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2777636 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lazor: enable keyboard supportWai-Hong Tam2021-03-242-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the keyboard scanlines and the inverted KSO2 GPIO. Enable the keyboard-related configs. Some warning of "MKBP not cleared" or "MKBP FIFO being full" will be showed as the SHI driver is not ready. The MKBP FIFO won't be dequeued. BRANCH=None BUG=b:183445211 TEST=Tested on Lazor by pressing keys, including KSO2. uart:~$ ksstate on [26.075200 KB debounced : -- -- -- -- -- -- -- -- -- -- -- -- --] [26.079600 KB debouncing: -- -- -- -- -- -- -- -- -- -- -- -- --] Keyboard scan disable mask: 0x00000000 Keyboard scan state printing on uart:~$ [29.269700 KB state: -- 02 -- -- -- -- -- -- -- -- -- -- --] [29.392000 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --] [30.244000 KB state: -- -- 01 -- -- -- -- -- -- -- -- -- --] [30.274000 MKBP not cleared within threshold, toggling.] [30.359600 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --] [31.278800 MKBP not cleared within threshold, toggling.] [31.872900 KB state: -- -- 08 -- -- -- -- -- -- -- -- -- --] [32.005100 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --] [33.060500 KB state: -- -- 04 -- -- -- -- -- -- -- -- -- --] [33.189500 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --] [34.065100 MKBP not cleared within threshold, toggling.] [34.454100 KB state: -- -- 02 -- -- -- -- -- -- -- -- -- --] [34.556600 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --] [35.069300 MKBP not cleared within threshold, toggling.] [37.356900 KB state: -- -- -- -- 08 -- -- -- -- -- -- -- --] [37.452900 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --] [38.361500 MKBP not cleared within threshold, toggling.] [39.365800 MKBP not cleared within threshold, toggling.] Change-Id: I02390e85f9454d5c93cd54d333d2e242e0c54911 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2782368 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: enable MKBP protocolWai-Hong Tam2021-03-242-0/+5
| | | | | | | | | | | | | | | | | Enable MKBP protocol. Lazor uses GPIO to interrupt the AP. So far, it just sends an interrupt to AP. Since the SHI driver is not ready, when AP sends the host command to EC, EC won't respond. BRANCH=None BUG=b:183445211 TEST=Built the image correctly. With the following CLs, tested the keyboard working on Lazor. Change-Id: Idc32926d4b187ce6f4a95158a26647ad1cea36e3 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2782367 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: enable PLATFORM_EC_PWM_DISPLIGHTWai-Hong Tam2021-03-241-0/+1
| | | | | | | | | | | | | | | | | | | In Lazor, the display backlight is controlled by the EC chipset. The kernel driver talks to EC over host command. Enable PLATFORM_EC_PWM_DISPLIGHT such that the kernel driver knows the PWM channel for the display backlight. Can't test it yet as the host command interface is not ready. BUG=b:182398910 BRANCH=None TEST=zmake testall Change-Id: I755ccabc7d27ff028a0b5f23df4b345f1bf8ca01 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2779748 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: enable PWMWai-Hong Tam2021-03-222-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable PWM. Lazor uses PWM 3 and 5 for keyboard backlight and display backlight. The display backlight can't be tested yet. The EN pin of the LED driver IC is connected to an AND gate. One of its input is an AP's GPIO. Since the AP power sequence is not ready yet, the IC is disabled. BUG=b:182398910 BRANCH=None TEST=Tested on Lazor: uart:~$ gpioset EN_PP5000_A 1 uart:~$ pwmduty PWM channels: 0: disabled 1: disabled uart:~$ pwmduty 0 50 # The keyboard backlight is on Setting channel 0 to 50 0: 50% uart:~$ pwmduty 0 30 Setting channel 0 to 30 0: 30% uart:~$ pwmduty 0 100 Setting channel 0 to 100 0: 100% uart:~$ pwmduty 0 -1 0: disabled Change-Id: I73dca658b54fd6d4bd7668e85d60dff915faf671 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776215 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lazor: enable power sequencingJack Rosenthal2021-03-222-6/+29
| | | | | | | | | | | | | | | | | | | | Enable SC7180 power sequencing code. Currently, depthcharge starts and then times out on some host commands, and the AP issues a reboot. We're going to need the SPI host interface up and going in Zephyr to get any further, so may as well submit this for now. BUG=b:183054226 BRANCH=none TEST=used serial firmware to verify that depthcharge starts, times out on some host commands, and then reboots Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I860088360480946b644fd1bb276a29266c57c614 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774368 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: lazor: enable switchcapJack Rosenthal2021-03-223-1/+19
| | | | | | | | | | | | | | | Enable switchcap and SKU code from board directory, which is a dependency of power sequencing code. BUG=b:183054226 BRANCH=none TEST=observe uart prints from switchcap init and sku init Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I6cd0cff071410d45e1478da04c6422fa346f34c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774367 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: lazor: enable ADCWai-Hong Tam2021-03-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable ADC. Lazor uses ADC_0 channel 1, 2, and 3. The channel 1 is scaled down VBUS through a 1/10 voltage divider. The zephyr driver returns the exact voltage, which is VBUS * 1/10. The channel 2 is AMON_BMON voltage which is not enabled until the charger task is setup. The channel 3 is PSYS voltage which is zero. PSYS monitoring is not enabled unless the process is in S0. BUG=b:182398910 BRANCH=None TEST=Tested on Lazor: uart: ~$ adc ADC_VBUS = 500 mV ADC_AMON_BMON = 13 mV ADC_PSYS = 0 mV Change-Id: Ie45da85e24ee4a568da2542192a053d6abdd2cfc Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774078 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lazor: enable I2CWai-Hong Tam2021-03-172-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable I2C. Lazor uses the I2C buses 0, 1, 2, 3, 5, and 7. Bus 3 is for WLC but no WLC connected. So leave it disabled. BUG=b:182398910 BRANCH=None TEST=Tested on Lazor: uart:~$ i2c scan I2C_0_PORT_0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- 09 -- 0b -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 5f 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- 3 devices found on I2C_0_PORT_0 uart:~$ i2c scan I2C_1_PORT_0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- 08 09 0a 0b 0c 0d 0e 0f 10: 10 11 12 13 14 15 16 17 -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- 17 devices found on I2C_1_PORT_0 uart:~$ i2c scan I2C_2_PORT_0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- 08 09 0a 0b 0c 0d 0e 0f 10: 10 11 12 13 14 15 16 17 -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- 17 devices found on I2C_2_PORT_0 uart:~$ i2c scan I2C_3_PORT_0 I2C: Device driver I2C_3_PORT_0 not found. uart:~$ i2c scan I2C_5_PORT_0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 5f 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- 1 devices found on I2C_5_PORT_0 uart:~$ i2c scan I2C_7_PORT_0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- 1 devices found on I2C_7_PORT_0 Signed-off-by: Wai-Hong Tam <waihong@google.com> Change-Id: Ia2159bbe040f5308661911cf0dd5236d71b50484 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2765153 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lazor: enable board version using GPIOJack Rosenthal2021-03-112-1/+7
| | | | | | | | | | | | | | | Lazor uses the Board ID pins to select the board version. Create the appropriate definitions in gpio_map.h and enable. BUG=b:102398910 BRANCH=none TEST=run "version" command, board version is 3 as expected for DVT Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ib2730e3fa6be01c1eacb2b986be72cd334b7ec76 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752343 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: add AP Kconfig options for Qualcomm SC7180Jack Rosenthal2021-03-111-0/+3
| | | | | | | | | | | | | | Add Kconfig options to enable support for Qualcomm SC7180 CPU. BUG=b:182398910 BRANCH=none TEST=compile for lazor Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ie3cf6b316f12af589cba3f2386a9d28d0d9c43ce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748279 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lazor: enable external power presence detection via GPIOJack Rosenthal2021-03-112-3/+6
| | | | | | | | | | | | | | | Enable the extpower_gpio.c module and connect the corresponding GPIOs and interrupts. BUG=b:182398910 BRANCH=none TEST=observe host mmap change when connecting/disconnecting AC Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I6a25b859f26b5959871c5a2d948103f23aa13396 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749428 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: enable power buttonJack Rosenthal2021-03-112-2/+6
| | | | | | | | | | | | | | Enable the power button module and interrupt. BUG=b:182398910 BRANCH=none TEST=push power button, see UART print Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I7e3d1cdf30e49d5179e746c941b51772f50b5c80 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749426 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: enable lid switchJack Rosenthal2021-03-112-1/+4
| | | | | | | | | | | | | | Enable the lid switch GPIO and module. BUG=b:182398910 BRANCH=none TEST=open and close lid, observe UART prints Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I541eea9e6329aed5d89676c7f3937c7d73868535 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749425 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: enable PLATFORM_EC_HOSTCMDJack Rosenthal2021-03-111-1/+3
| | | | | | | | | | | | | | | | | | Enable host command support. This only enables the host command common code, which can currently compile. Further work may be required to get SPS interface with AP up and going. BUG=b:182398910 BRANCH=none TEST=flash on lazor, hcdebug command is present Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I82114fe63d962072339b466450f0820038992020 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749424 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: populate gpiosJack Rosenthal2021-03-112-2/+310
| | | | | | | | | | | | | | | | | | Populate named-gpios dts from boards/lazor/gpio.inc. For the most part, util/gpios_to_zephyr_dts.c was used to generate this code. See the instructions in that file if you need to replicate this CL for another project. BUG=b:182398910 BRANCH=none TEST="gpioget" on lazor Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I195f428a5d1849e159f4468e57459a83571a133e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749768 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: add support for trogdor/lazorJack Rosenthal2021-03-116-0/+95
Initial bringup for Lazor, featuring just a UART console, flash access, and basic commands. I structured the directories to look a little more like what we discussed in last week's meeting (putting the Zephyr "board" directory to be common to the baseboard, and putting variants under a directory categorized by baseboard). I hope we can go back to volteer/delbin and re-adopt this layout there too, as it's much cleaner and leads to less repeated code. BUG=b:182398910 BRANCH=none TEST=flash on lazor, test out UART and basic commands ("gettime", "flashinfo", etc.) Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I411c47e9b9563d78349abbeebf71223ae41748a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749765 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>