summaryrefslogtreecommitdiff
path: root/board/discovery
Commit message (Collapse)AuthorAgeFilesLines
* board: Sort header filesJeremy Bettis2022-12-011-0/+1
| | | | | | | | | | | | | | | | | | | | Sort all includes in board with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I6ad72b167cbb768a64c338fa633eb4bf5a401897 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4060360 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* tree: Remove CONFIG_STM_HWTIMER32Tom Hughes2022-11-111-2/+0
| | | | | | | | | | | | | | | | | | | | | CONFIG_STM_HWTIMER32 was used to choose between a 32-bit timer and 16-bit timer. The 16-bit timer code was removed in https://crrev.com/c/3388064, so we no longer need this config. Command used: git grep --name-only CONFIG_STM_HWTIMER |\ xargs sed -i '/CONFIG_STM_HWTIMER32/d' BRANCH=none BUG=b:214423235 TEST=make buildall -j Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I89da8915cd5a467975cd8f90e734ea2b11f18cb3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3388065 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Patryk Duda <patrykd@google.com>
* tree: Remove stm32/hwtimer.cTom Hughes2022-11-101-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | stm32/hwtimer.c simulates a 32-bit timer with two 16-bit timers. The only boards still using this file were "discovery" and "twinkie". "twinkie" is an STM32F072B, which has support for 32-bit timers (TIM2 and TIM3). See Section 18 "General-purpose Timers": https://www.st.com/resource/en/reference_manual/dm00031936-stm32f0x1-stm32f0x2-stm32f0x8-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf. "discovery" is an STM32L152RC, which is a "Category 3" product that has the 32-bit timer TIM5. See Section 17 "General-purpose Timers" and "Table 3. STM32L15xxx product categories": https://www.st.com/resource/en/reference_manual/cd00240193-stm32l100xx-stm32l151xx-stm32l152xx-and-stm32l162xx-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf. BRANCH=none BUG=b:214423235 TEST=make buildall -j Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I41b3a54bbbbce5d0dfee178b6fa87ff492646ce1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3388064 Reviewed-by: Patryk Duda <patrykd@google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* Update license boilerplate text in source code filesMike Frysinger2022-09-126-6/+6
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* board/discovery/board.c: Format with clang-formatJack Rosenthal2022-06-281-12/+5
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ifd2c693b109b4c4560d3ad73278720b94a783b54 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728248 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* LICENSE: remove unnecessary (c) after CopyrightTom Hughes2019-06-196-6/+6
| | | | | | | | | | | | | | | | Ran the following command: git grep -l 'Copyright (c)' | \ xargs sed -i 's/Copyright (c)/Copyright/g' BRANCH=none BUG=none TEST=make buildall -j Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* ec.tasklist: Consolidate duplicate commentsDaisuke Nojiri2019-04-081-11/+1
| | | | | | | | | | | | | | | | | | | | | | | It's simply a bad idea to describe a macro in multiple locations. It'll make it hard to change. It'll be difficult to keep all locations in sync. This patch replaces the comment duplicated in all ec.tasklist with a pointer to the CONFIG_TASK_LIST definition. The macro will be described in a single place (just like all/most other macros). Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=none BRANCH=none TEST=buildall Change-Id: Id658b9d68e742e4334c692b804d9c98c8de21313 Reviewed-on: https://chromium-review.googlesource.com/1551579 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* chip/stm32/usart: Add flags to usart_configNicolas Boichat2017-10-181-0/+1
| | | | | | | | | | | | | Allows setting TXINV/RXINV bits. BRANCH=none BUG=b:65697962 TEST=make BOARD=wand -j Change-Id: Ib1bb290cd9758c53b98c8fc1ca1a9369c8cff39e Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/694561 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Remove Makefile symlinks under board directoryDaisuke Nojiri2016-07-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | This feature is inconsistent. Not all boards have such a symlink (for a obvious reason). This feature is fragile. It's most likely not tested and going to be broken if not already. Developers won't like it if they have to test two different ways to build boards before submitting patches. This feature is not necessary. If you build EC in the standard way (e.g. make BOARD=samus), these symlinks are not needed. This feature is wasteful. Extra disk spaces are used and extra lines are added to Makefile (increasing code complexity slightly). BUG=chromium:626776 BRANCH=none TEST=make buildall Change-Id: Id5444284d773cb0e9225f39abd877441b8f61440 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/359321 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* cleanup: Add warning comment to gpio.inc filesBill Richardson2016-02-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | With commit e9883124ff16, a GPIO_INT macro was added. That change also required that all instances of GPIO_INT in a board's gpio.inc file come before any GPIO macros, or the interrupt handler wouldn't work properly. This CL just adds a warning comment about requirement to all gpio.inc files. BUG=chromium:471331 BRANCH=none TEST=make buildall, test image on Cr50 This is a change to comments only. There is no new behavior to verify, although I did run try out one new image just to be sure nothing stupid happened. Change-Id: I83f7819929a53bce3a8bae04d15b3ee3bda11738 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/329334 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* USART: Add DMA based receiverAnton Staaf2015-08-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | This DMA receiver uses a separate small circular buffer to DMA into. This allows the DMA transaction to be made circular, and thus it does not require the interrupt latency to be low enough to setup the next transfer before the next character comes in. Additional diagnostics output have been added to the usart_info console command to facilitate tuning of the FIFO size. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Verify DMA works by cross connecting two discovery boards Change-Id: Idcdf95a47fadf21ec2154f0c9128cd3586e568ec Reviewed-on: https://chromium-review.googlesource.com/292870 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Anton Staaf <robotboy@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org> Trybot-Ready: Anton Staaf <robotboy@chromium.org>
* USART: Add usart_info commandAnton Staaf2015-08-241-0/+1
| | | | | | | | | | | | | | | | | | | This optional console command is enabled with CONFIG_USART_INFO_COMMAND. It will display and clear dropped character and overrun counts for all configured USARTs. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Change-Id: Icf6061aaab2cda71e9d317455c897828b9daf844 Reviewed-on: https://chromium-review.googlesource.com/292770 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org> Trybot-Ready: Anton Staaf <robotboy@chromium.org>
* Discovery: Configure USART2 as a loopback deviceAnton Staaf2015-08-103-4/+51
| | | | | | | | | | | | | | | | | | | | | | This gives a test case for the USART driver on an STM32L. Eventually this will be a good place to test that even in a downclocked configuration the STM32L USART driver can handle 115200 without dropping characters. This also gives a convenient build test for the STM32L version of the USART driver. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Cross connect a Discovery and a Discovery-stm32f072 Change-Id: Ifb8dfc1179e8a0be84390d36e0bc3ff15f4f4685 Reviewed-on: https://chromium-review.googlesource.com/288979 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org> Trybot-Ready: Anton Staaf <robotboy@chromium.org>
* Discovery: Add OpenOCD configuration fileAnton Staaf2015-07-271-0/+19
| | | | | | | | | | | | | | | | | | | This allows the "make flash" command to work for the Discovery board. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j cd board/discovery make flash Change-Id: Ifa3c1eca58b80093b47a8fe25b47d29dba923d6b Reviewed-on: https://chromium-review.googlesource.com/287439 Trybot-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
* cleanup: fix all the header guardsBill Richardson2015-06-181-3/+3
| | | | | | | | | | | | | | | This unifies all the EC header files to use __CROS_EC_FILENAME_H as the include guard. Well, except for test/ util/ and extra/ which use __TEST_ __UTIL_ and __EXTRA_ prefixes respectively. BUG=chromium:496895 BRANCH=none TEST=make buildall -j Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Iea71b3a08bdec94a11239de810a2b2e152b15029 Reviewed-on: https://chromium-review.googlesource.com/278121 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* mec1322: Simplify GPIO listsSteven Jian2015-05-271-4/+4
| | | | | | | | | | | | | | | Our existing GPIO macros use port# / gpio#, but the concept of different GPIO ports does not exist on the mec1322. Therefore, add new GPIO macros for chips which do not have distinct GPIO ports. BUG=None BRANCH=None TEST=make buildall -j Change-Id: Ibda97c6563ad447d16dab39ecadab43ccb25174b Signed-off-by: Steven Jian <steven.jian@intel.com> Reviewed-on: https://chromium-review.googlesource.com/262841 Reviewed-by: Anton Staaf <robotboy@chromium.org>
* gpio: Refactor IRQ handler pointer out of gpio_listAseda Aboagye2015-04-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the gpio_info struct, we had a irq_handler pointer defined even though a majority of the GPIOs did not have irq handlers associated. By removing the irq_handler pointer out of the struct, we can save some space with some targets saving more than others. (For example, ~260 bytes for samus_pd). This change also brings about a new define: GPIO_INT(name, port, pin, flags, signal) And the existing GPIO macro has had the signal parameter removed since they were just NULL. GPIO(name, port, pin, flags) In each of the gpio.inc files, all the GPIOs with irq handlers must be defined at the top of the file. This is because their enum values from gpio_signal are used as the index to the gpio_irq_handlers table. BUG=chromium:471331 BRANCH=none TEST=Flashed ec to samus and samus_pd, verified lightbar tap, lid, power button, keyboard, charging, all still working. TEST=Moved a GPIO_INT declaration after a GPIO declaration and watched the build fail. TEST=make -j BOARD=peppy tests TEST=make -j BOARD=auron tests TEST=make -j BOARD=link tests Change-Id: Id6e261b0a3cd63223ca92f2e96a80c95e85cdefb Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/263973 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Trybot-Ready: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org>
* Makefile: Add support for per-board symlinks to top levelAnton Staaf2014-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Previously if you were working on a single board you had to add BOARD= to all of your make command lines. Now if you are in a board directory you can just use "make", or "make clean", or any other top level make command. This commit also adds support for a top level "make flash" command that can be used from the board directories as well. This command uses openocd and requires that the board provides an openocd-flash.cfg file. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=none TEST=(from a few board directories) make clean; make -j (from the discovery-stm32f072 directory) make flash Change-Id: Ie09a74881371169a2c3cd9cd9922f39f4873f1a6 Reviewed-on: https://chromium-review.googlesource.com/209669 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
* GPIO: Move definition of alternate functions to gpio.incAnton Staaf2014-07-172-6/+2
| | | | | | | | | | | | | | | | | | | | | This is a straightforward conversion of existing tables into X-Macro style definitions for the GPIO alternate functions. This change in itself, is not particularly powerful, but having all GPIO settings in a single file makes a board easier to understand. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=none TEST=make buildall -j Followed by manual testing of interrupt on change and UART functionality on STM32F0 based discovery board. Change-Id: Ib7f1f014f4bd289d7c0ac3100470ba2dc71ca579 Reviewed-on: https://chromium-review.googlesource.com/207987 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
* gpio: Replace duplication in gpio declarations with X-macro fileAnton Staaf2014-06-263-26/+19
| | | | | | | | | | | | | | | | | | | | | Previously each board.h and board.c contained an enum and an array for gpio definitons that had to be manually kept in sync, with no compiler assistance other than that their lengths matched. This change adds a single gpio.inc file that declares all gpio's that a board uses and is used as an X-macro include file to generate both the gpio_signal enum and the gpio_list array. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=none TEST=make buildall -j Change-Id: If9c9feca968619a59ff9f20701359bcb9374e4da Reviewed-on: https://chromium-review.googlesource.com/205354 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
* cleanup: Consolidate module IDs into a single shared enumRandall Spangler2013-10-251-6/+0
| | | | | | | | | | | | | | | | | | This is tidier than every board defining its own module_id enum, and encourages standard naming of modules. A subsequent CL will do more cleanup (standardizing on MODULE_LED instead of MODULE_POWER_LED and MODULE_LED_KIRBY), but it's easier to do that as a separate CL than part of this one. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms; pass unit tests Change-Id: If0fcef284fb3aa2fa145bc9ff3d1f3f2d25a2e47 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/174382 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* cleanup: Re-enable keyboard console channel for ARM boardsRandall Spangler2013-10-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Originally, the ARM boards printed the keyboard scan matrix whenever it changed. This generated a lot of output, so we filtered that at the console channel level. When we refactored the keyboard scan module, that changed so that the scan matrix was not printed by default, and the 'ksstate' debug command was used to enable printing it. But on ARM boards, 'ksstate on' wouldn't do anything without ALSO using 'chan -1' to turn the keyboard console channel back on. And without the scan matrix printing by default, there's no reason to keep the keyboard channel off by default. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all boards bang on keyboard on pit and don't see much debug output ksstate on now bang on keyboard and see matrix changes Change-Id: I554b42e7582d507530cdecad7b35df71ca0e634f Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/174373 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Correct the EC name in the build.mk comments for some boardsDavid Hendricks2013-10-171-1/+1
| | | | | | | | | | | | | | | | | | One of our partners was getting confused by the incorrect comments. Daisy, Snow and Pit use STM32xxxx parts with 128KB flash, but the comments indicated that they use 64KB parts. BUG=none BRANCH=none TEST=locally compiled Signed-off-by: David Hendricks <dhendrix@chromium.org> Change-Id: I13035ca9fb0e4cb05f46df250f6b9079a799dd64 Reviewed-on: https://chromium-review.googlesource.com/172663 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Tested-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: David Hendricks <dhendrix@chromium.org>
* basic support for STM32L-Discovery boardVincent Palatin2013-09-284-0/+129
| | | | | | | | | | | | | | | | | | Support for the basic development board built by STmicro with STM32L152 chip. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=none TEST=See that LEDs can be driven from the console, button can be read. With additional print statement, see that button hook is called. BRANCH=none Change-Id: I494ab525f17e08b57595ee49489ade63b3305f2a Reviewed-on: https://chromium-review.googlesource.com/170920 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Jeremy Thorpe <jeremyt@chromium.org> Tested-by: Jeremy Thorpe <jeremyt@chromium.org>
* remove deprecated stm32-based boardsVincent Palatin2012-05-024-159/+0
| | | | | | | | | | | We no longer support ADV EVT0 board and Discovery reference design. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=make BOARD=daisy && make BOARD=link Change-Id: I7eb81e5271c070b17f018ac9c14491f1804c0e08
* introducing chip variant for stm32 family [2/3]Vincent Palatin2012-05-011-0/+1
| | | | | | | | | | | | Add a parameter to define the chip variant and pass it to build/make processes. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:9057 TEST=make BOARD=daisy ; make BOARD=adv ; make BOARD=discovery Change-Id: I87b65b582ed5fc2cf5966446e15224ac15e328e9
* introducing chip variant for stm32 family [1/3]Vincent Palatin2012-05-012-4/+4
| | | | | | | | | | | | just rename STM32L to STM32. Most of the STM32L15x code is common with STM32F1xx. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:9057 TEST=make BOARD=daisy ; make BOARD=adv ; make BOARD=discovery Change-Id: I819eff5fcd23deff57f5f6dedcf37e6c421b96c2
* Fix test configurations build errorsVincent Palatin2012-04-251-0/+4
| | | | | | | | | | | | | fix small modularity issues to ensure we are able to compile all boards in "tests" configuration. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:8546 TEST=make BOARD=link tests && make BOARD=bds tests make BOARD=daisy tests && make BOARD=adv tests && make BOARD=discovery tests Change-Id: I9eed0195af6bfd3b47ef74e3cb27966c4365c345
* stm32l: set SYSCFGEN for boards using stm32lDavid Hendricks2012-04-251-0/+1
| | | | | | | | | | | | This sets the SYSCFGEN bit. Writes to external interrupt config registers (SYSCFG_EXTICRn) will not stick unless this is set. Signed-off-by: David Hendricks <dhendrix@chromium.org> BUG=none TEST=tested on daisy Change-Id: I9a92b424e9ac1f909206f89ed773248807619ab2
* stm32l: eliminate GPIO initialization done in keyboard codeDavid Hendricks2012-04-132-18/+48
| | | | | | | | | | | | | | | | | | This eliminates the GPIO init code from stm32l's version of keyboard_scan.c. It moves all initialization to board.c, and also eliminates the input/output arrays that were used to represent keyboard GPIOs earlier on. The keyboard code no longer needs board-specific GPIO knowledge. There were some minor nomenclature clean-ups along the way, but but there is still more clean-up to do in future CLs. Signed-off-by: David Hendricks <dhendrix@chromium.org> BUG=none TEST=tested on Daisy Change-Id: I27e92b10262e686111f20d8e3ed9e416db245355
* Add keyboard_scan for STM32David Hendricks2012-02-173-2/+24
| | | | | | | | | | | | | | | | | | | | | | This loosely ports the LM4 keyboard_scan code to STM32 Notable differences: - Keyboard GPIO layout is spread across multiple ports and is not contiguous in many places. Because of this, bitmasks are mostly generated on-the-fly instead of hard coded (IO is kept to a minimum) - Longer timeout when scanning columns (100us versus 20us) Also, some functions are stubbed out currently since they rely on other bits being implemented: - keyboard_state_changed() - keyboard_has_char() - keyboard_put_char() BUG=none TEST=Tested on STM32L-Discovery (monitoring keystrokes via UART) Change-Id: I84985879589e70688b2b29b288ab17037f7668b2
* stm32l: de-duplicate stubs used for all STM32L based boardsVincent Palatin2012-02-161-32/+0
| | | | | | | | | | | | Avoid duplicating in each board file, the stub functions replacing not implemented drivers on the STM32L platform. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=make BOARD=daisy && make BOARD=discovery Change-Id: I25cd949c31e53a90c39f623617c7d52517a3d205
* stm32l: implement gpio_set_alternate_functionVincent Palatin2012-02-161-8/+2
| | | | | | | | | | | | Allow to set easily the SoC pins to one of their native functions. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=on Discovery board, check the muxing of the USART pins is still working and we get traces. Change-Id: I6e83d2eea8986d814720ad4b2fef588908b99079
* Make i8042 independent of host <--> KBC bus.David Hendricks2012-02-152-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This CL attempts to abstract underlying bus from i8042 code. Nearly all i8042 logic is isolated already. This patch is intended to allow us to use i8042 logic for processing keys and commands on boards which do not necessarily use LPC as the host <--> KBC bus interface. This CL does the following: - Define KBC bus <--> host (kbc_host_bus) on a per-board basis in board.c. - Add generic wrappers in place of lpc_keyboard_* in i8042 code. - Define the behavior of generic wrappers in EC-specific keyboard sources. If board.c specifies LPC, then send via LPC. TODO: This needs to be tested on real hardware... Signed-off-by: David Hendricks <dhendrix@chromium.org> BUG=None TEST=Locally compiled for Link, BDS and Discovery. Change-Id: I9cabd514bd44fd6b508c26994eccc3011eedbc0f
* stm32l: set pin mux for USART1Vincent Palatin2012-02-151-0/+8
| | | | | | | | | | | | | When we are not running the ROM monitor first, we must set the pins used for USART1 (PA9/PA10) as alternate function. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=Run firmware on the discovery board not from the monitor and see the traces. Change-Id: I32be3d5a88a3e71828d081d74503722331a649b8
* stm32l: use USART1 as consoleVincent Palatin2012-02-081-1/+1
| | | | | | | | | | | | | The Daisy board will have the EC UART on the debug connector wired to USART1 (PA9/PA10 pins) Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=Run Discovery board with mini-servo attached to PA9/PA10 and see the traces. Change-Id: I97c59ba388fddb150ff6c76ec3317deedb567546
* stm32l: basic GPIO supportVincent Palatin2012-02-032-10/+18
| | | | | | | | | | | | No interrupt support yet. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=on Discovery EC console, using "gpioget" and "gpioset" commands check we can switch the LED and read the button state. Change-Id: I01294643d3df070a535dab5a6be02c296487fca5
* stm32l: add watchdog supportVincent Palatin2012-02-022-0/+7
| | | | | | | | | | | | | | | | | | Use the Independant WatchDog. The Window WatchDog would provide a nice early warning interrupt before actually rebooting but the max period (128 ms) is probably too short for our purpose. The full GPIO support and the reboot cause detection will be implemented in later steps. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=on Discovery board, do blocking waits of 500ms and 1500ms, and check the latter reboots the platform and the former does not. Change-Id: I26e4d8b26b733269b7811cc3b3a09daf98ea364a
* stm32l: add UART driverVincent Palatin2012-01-312-0/+14
| | | | | | | | | | | | simple UART driver to get the serial console on the USART3. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=run on Discovery board and check we get the first message on the UART and the console is echoing the characters. Change-Id: Id85999a5ddbd75804e9317a1b8c2fd4afb89eb38
* stm32l: initialize clocksVincent Palatin2012-01-301-0/+3
| | | | | | | | | | | | | Run from internal clock at 16Mhz, but enable PLL to get a better precision. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=run on discovery board and check software is still alive after clock initialization. Change-Id: I8425482825015adf96c30e67a9320d0df2f4f2b7
* add the skeleton for STM32L chip and discovery boardVincent Palatin2012-01-264-0/+97
All hardware drivers code is stubbed excepted a few configuration settings. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=make BOARD=discovery Change-Id: Ic9e88a0f51ab626679c8aeb6192272e66a3f79b8