New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 608039 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

sweetberry support

Project Member Reported by nsanders@chromium.org, Apr 29 2016

Issue description

Add sweetberry (consumer hardware power measurement board) firmware support. 

This board has an stm32f446 mcu and INA231 current measurement. It supports data acquisition via USB.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/6fcd163da5169bfca36ab8c15cfd9d0624acae19

commit 6fcd163da5169bfca36ab8c15cfd9d0624acae19
Author: Nick Sanders <nsanders@chromium.org>
Date: Tue Jul 26 20:17:09 2016

stm32f446e-eval: add support for stm32f446

This adds basic support for the stm32f446.
This consists of:
* New DMA model for stm32f4
* New clock domain support.
* MCO oscillator gpio export support.
* Flash support for irregular blocks.

BUG= chromium:608039 
TEST=boots w/ correct clock, stm32f0 also boots.
BRANCH=None

Change-Id: I1c5cf6ddca09009c9dac60da8a3d0c5ceedfcf4d
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/363992
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>

[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/jtag-stm32f4.c
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/include/task.h
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/clock-stm32f0.c
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/uart.c
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/board/stm32f446e-eval/board.c
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/npcx/peci.c
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/build.mk
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/board/stm32f446e-eval/board.h
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/clock-f.c
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/board/stm32f446e-eval/gpio.inc
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/include/module_id.h
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/clock-f.h
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/include/config.h
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/registers.h
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/system.c
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/flash-stm32f4.c
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/clock-stm32f4.c
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/board/stm32f446e-eval/ec.tasklist
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/dma.c
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/gpio.c
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/util/flash_ec
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/gpio-stm32f4.c
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/board/stm32f446e-eval/build.mk
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/flash-f.c
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/dma-stm32f4.c
[modify] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/config_chip.h
[add] https://crrev.com/6fcd163da5169bfca36ab8c15cfd9d0624acae19/chip/stm32/config-stm32f446.h

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/cc68693cda0d520229971b73c116d434c48bdd65

commit cc68693cda0d520229971b73c116d434c48bdd65
Author: Nick Sanders <nsanders@chromium.org>
Date: Thu Aug 11 23:28:03 2016

sweetberry: add i2c support

stm32f446 has two types of i2c blocks, the traditional
stm i2c, and "fast mode plus" i2c, which need different drivers.

This commit adds both, muxed in i2c-stm32f4, as the ec
codebase doesn't really support multiple types of the same interface.

BUG= chromium:608039 
TEST=i2c works on all 4 channels
BRANCH=None

Change-Id: I6a9ac632f44142bd809ffee5782a192ae47af1f0
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/368358
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/cc68693cda0d520229971b73c116d434c48bdd65/board/stm32f446e-eval/gpio.inc
[add] https://crrev.com/cc68693cda0d520229971b73c116d434c48bdd65/chip/stm32/i2c-stm32f4.c
[modify] https://crrev.com/cc68693cda0d520229971b73c116d434c48bdd65/common/i2c.c
[modify] https://crrev.com/cc68693cda0d520229971b73c116d434c48bdd65/board/stm32f446e-eval/board.c
[modify] https://crrev.com/cc68693cda0d520229971b73c116d434c48bdd65/board/sweetberry/board.c
[modify] https://crrev.com/cc68693cda0d520229971b73c116d434c48bdd65/board/sweetberry/board.h
[modify] https://crrev.com/cc68693cda0d520229971b73c116d434c48bdd65/board/stm32f446e-eval/board.h

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/a4bfc663a3cd645b43963bb814269efe864f8d1e

commit a4bfc663a3cd645b43963bb814269efe864f8d1e
Author: Nick Sanders <nsanders@chromium.org>
Date: Wed Aug 03 02:35:44 2016

sweetberry: add dwc usb support

stm32f446 uses a synopsys designware USB block
rather than the typical ST one. This change adds driver support
for the new block, including usb console support.

BUG= chromium:608039 
TEST=usb console works
BRANCH=None

Change-Id: I0e143758ae0b5285f1c94ea2ec5aee159e22e00c
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/365448
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[add] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/chip/stm32/usb_dwc_console.c
[modify] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/include/usb_descriptor.h
[modify] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/board/sweetberry/board.h
[add] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/chip/stm32/usb_dwc_registers.h
[add] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/chip/stm32/usb_dwc_console.h
[modify] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/chip/stm32/usb_hw.h
[add] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/chip/stm32/usb_dwc_hw.h
[modify] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/board/stm32f446e-eval/board.c
[modify] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/board/sweetberry/board.c
[modify] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/include/config.h
[modify] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/chip/stm32/build.mk
[modify] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/board/stm32f446e-eval/board.h
[add] https://crrev.com/a4bfc663a3cd645b43963bb814269efe864f8d1e/chip/stm32/usb_dwc.c

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/c3aec01fb66f3f85a08ef697ffd8963eaca52471

commit c3aec01fb66f3f85a08ef697ffd8963eaca52471
Author: Nick Sanders <nsanders@chromium.org>
Date: Fri Sep 02 02:13:26 2016

sweetberry: remove superfluous gpios

Sweetberry specifies UART pins as GPIOs, however
this is not necessary for uart use. Let's remove these.

UART4 is also dup'd with sweetberry's signal gpios, which
is fixed with this CL.

BUG= chromium:608039 
TEST=boots
BRANCH=None

Change-Id: I81ee2351c0191ff5ec3d5fad37fe10866bf1ad32
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/380439
Reviewed-by: Bill Richardson <wfrichar@chromium.org>

[modify] https://crrev.com/c3aec01fb66f3f85a08ef697ffd8963eaca52471/board/sweetberry/gpio.inc

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7

commit f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7
Author: Nick Sanders <nsanders@chromium.org>
Date: Mon Aug 29 21:37:34 2016

sweetberry: add usb fw update

Port USB firmware update to stm32f4 dwc usb from st usb.
This includes usb dwc usb stream inplementation, generic
endpoint interfaces, and the sweetberry test case.

BUG= chromium:608039 
TEST=usb update works
BRANCH=None

Change-Id: Ia26e4f7e990ee64991468799c99b036f5f32190f
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/377520
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[add] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/chip/stm32/usb_dwc_stream.h
[modify] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/chip/stm32/usb-stream.h
[add] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/extra/usb_updater/sweetberry.json
[modify] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/chip/stm32/usb_dwc_registers.h
[add] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/chip/stm32/usb_dwc_stream.c
[modify] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/chip/stm32/usb_dwc_hw.h
[modify] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/chip/stm32/usb_dwc_console.c
[modify] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/board/sweetberry/board.c
[add] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/chip/stm32/usb_dwc_update.h
[modify] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/board/sweetberry/board.h
[modify] https://crrev.com/f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7/chip/stm32/usb_dwc.c

feature requirements for sweetberry:
* The timestamp column to be in milliseconds instead of seconds.
* Ability to sync sweetberry clock with the host's, as 64 bit timestamp
* Ability to have multiple sweetberries connected to the same host.
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/75b1ec6d78c65348f379b9ead6be17a5e18c16b2

commit 75b1ec6d78c65348f379b9ead6be17a5e18c16b2
Author: Nick Sanders <nsanders@chromium.org>
Date: Fri Oct 28 02:29:49 2016

usb_update: increase read timout for fw_update.py

sweetberry takes a bit longer to erase flash and seems to be timing
out. This fix gets sweetberry to update reliably.

BUG= chromium:608039 
TEST=update sweetberry firmware
BRANCH=None

Change-Id: I9a0cbeae3b7ce0e4b87840fe8bf24bb2e10777e9
Reviewed-on: https://chromium-review.googlesource.com/404710
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/75b1ec6d78c65348f379b9ead6be17a5e18c16b2/extra/usb_updater/fw_update.py

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/8bb2d9fbf0d0a8d6810a9f08dd0437cfa3745db2

commit 8bb2d9fbf0d0a8d6810a9f08dd0437cfa3745db2
Author: Nick Sanders <nsanders@chromium.org>
Date: Fri Oct 28 20:49:03 2016

usb_serial: add python console

console.py can access a Google USB serial endpoint
specified by vid:pid and serial number

BUG= chromium:608039 
TEST=open console to send and receive text.
BRANCH=None

Change-Id: I735692b7031d73506be2745a2cd5225bfcefd396
Reviewed-on: https://chromium-review.googlesource.com/405030
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>

[add] https://crrev.com/8bb2d9fbf0d0a8d6810a9f08dd0437cfa3745db2/extra/usb_serial/console.py

Project Member

Comment 11 by bugdroid1@chromium.org, Dec 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/ccff3365038c037741d274c6713f72f129766980

commit ccff3365038c037741d274c6713f72f129766980
Author: Nick Sanders <nsanders@chromium.org>
Date: Wed Nov 23 00:20:47 2016

sweetberry: add power logging tool

powerlog.py can access sweetberry and log power data.
Also included are marlin and kevin example board configs.

BUG= chromium:608039 
TEST=log power data
BRANCH=None

Change-Id: I0f868d95d17d86522dca045a227a824563f93cd0
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/413293
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/board/marlin/marlin.board
[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/board/marlin/marlin_all_B.scenario
[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/board.README
[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/board/kevin/kevin_all.scenario
[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/board/marlin/marlin_vbat.scenario
[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/board/kevin/kevin.board
[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/board/marlin/marlin_common.scenario
[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/board/marlin/marlin_all_A.scenario
[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/board/marlin/marlin_short.scenario
[add] https://crrev.com/ccff3365038c037741d274c6713f72f129766980/extra/usb_power/powerlog.py

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 27 2017

Labels: merge-merged-factory-reef-8811.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/dd1f0d94a008820643ea1d9adfc89bb3189c5618

commit dd1f0d94a008820643ea1d9adfc89bb3189c5618
Author: Nick Sanders <nsanders@chromium.org>
Date: Fri Oct 28 02:29:49 2016

usb_update: increase read timout for fw_update.py

sweetberry takes a bit longer to erase flash and seems to be timing
out. This fix gets sweetberry to update reliably.

BUG= chromium:608039 
TEST=update sweetberry firmware
BRANCH=None

Change-Id: I9a0cbeae3b7ce0e4b87840fe8bf24bb2e10777e9
Reviewed-on: https://chromium-review.googlesource.com/404710
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433578
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/dd1f0d94a008820643ea1d9adfc89bb3189c5618/extra/usb_updater/fw_update.py

Project Member

Comment 13 by bugdroid1@chromium.org, Jan 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/dd1f0d94a008820643ea1d9adfc89bb3189c5618

commit dd1f0d94a008820643ea1d9adfc89bb3189c5618
Author: Nick Sanders <nsanders@chromium.org>
Date: Fri Oct 28 02:29:49 2016

usb_update: increase read timout for fw_update.py

sweetberry takes a bit longer to erase flash and seems to be timing
out. This fix gets sweetberry to update reliably.

BUG= chromium:608039 
TEST=update sweetberry firmware
BRANCH=None

Change-Id: I9a0cbeae3b7ce0e4b87840fe8bf24bb2e10777e9
Reviewed-on: https://chromium-review.googlesource.com/404710
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433578
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/dd1f0d94a008820643ea1d9adfc89bb3189c5618/extra/usb_updater/fw_update.py

Project Member

Comment 14 by bugdroid1@chromium.org, Jul 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/9e1e58b62ab70edb54065412584e8b36fba1e71b

commit 9e1e58b62ab70edb54065412584e8b36fba1e71b
Author: Nick Sanders <nsanders@chromium.org>
Date: Tue Jul 25 05:54:04 2017

sweetberry: allow larger sense resistors

Currently sweetberry hits an integer truncation issue
at 2.4 ohm when uA per div goes below 1. We can use 100ths
of a uA as the current per div scale.

BRANCH=None
BUG= chromium:608039 
TEST=log from sweetberry with 10 ohm config.

Signed-off-by: Nick Sanders <nsanders@chromium.org>

Change-Id: I9e9216230329483fd0bfcb44ce23cd15bae864b3
Reviewed-on: https://chromium-review.googlesource.com/577051
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>

[modify] https://crrev.com/9e1e58b62ab70edb54065412584e8b36fba1e71b/chip/stm32/usb_power.c

Project Member

Comment 15 by bugdroid1@chromium.org, Aug 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/493b97412408c7580d3530c9190790117c181193

commit 493b97412408c7580d3530c9190790117c181193
Author: Nick Sanders <nsanders@chromium.org>
Date: Wed Aug 23 04:34:43 2017

sweetberry: modify powerlog.py to support multiple devices

powerlog.py can now take -A serialA -B serialB to collect data
from both left and right sweetberries simultaneously.

Also, the Spower class has been modified to allow API usage
rather than console only usage.

BRANCH=None
BUG= chromium:608039 
TEST=log from both sweetberries on marlin

Signed-off-by: Nick Sanders <nsanders@chromium.org>
Change-Id: Iaeaddad223f35f0e5cad1549b85fa3f7e4d5e1c7
Reviewed-on: https://chromium-review.googlesource.com/422496
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/493b97412408c7580d3530c9190790117c181193/extra/usb_power/powerlog.py

Status: Fixed (was: Untriaged)
Sweetberry generally works

Sign in to add a comment