-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
board: Google Twinkie V2 #54286
board: Google Twinkie V2 #54286
Conversation
@@ -0,0 +1,195 @@ | |||
/* | |||
* Copyright 2022 The Chromium OS Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright 2023 The ChromiumOS Authors
- notice the year and no space in "ChromiumOS"
(Also elsewhere in this commit)
# Enable MPU | ||
CONFIG_ARM_MPU=y | ||
|
||
#CONFIG_USB_DEVICE_VID=18d1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this commented out?
samples/boards/google_pda/Kconfig
Outdated
@@ -0,0 +1,22 @@ | |||
# Private config options for eSPI sample app | |||
|
|||
# Copyright (c) 2019 Intel Corporation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intel?
/* Constants matching USB3 and USB PD definitions */ | ||
#define CRC32_INITIAL 0xFFFFFFFF | ||
|
||
/* Pre-computed values for polynom 0x04C11DB7 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can one re-compute these values?
} | ||
|
||
return crc; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zephyr already provides a CRC32 implementation: https://docs.zephyrproject.org/apidoc/latest/group__crc.html
Why does this need duplicated?
meas_vbus_c(&out); | ||
shell_print(shell, "current of vbus: %i", out); | ||
} | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take a look at the style guide ... else
must be cuddled. clang-format
can fix this automatically for you.
samples/boards/google_pda/src/view.c
Outdated
|
||
smf_set_initial(SMF_CTX(&view_obj), &view_states[SNOOP0]); | ||
|
||
while(1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the style guide, space is always required after while
.
clang-format
can fix this automatically for you.
samples/boards/google_pda/src/view.c
Outdated
ret = gpio_pin_configure_dt(&led2, GPIO_OUTPUT_ACTIVE); | ||
if (ret < 0) { | ||
return ret; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, this should be a loop
Hey @ualbertagreen, I don't really think that the application code belong to the https://github.com/zephyrproject-rtos/example-application/ also check out https://zmk.dev/docs/development/setup, their setup has shallow clone and module filtering which you may find useful: https://github.com/zmkfirmware/zmk/blob/main/app/west.yml |
662c73b
to
7f98968
Compare
6c0ebfd
to
726b291
Compare
17da79c
to
d31b74e
Compare
5907627
to
d1dec09
Compare
71119ac
to
43f7b4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I guess we are waiting for #54634 for the shut commit, should defo not be here.
In the meantime, the board should get some basic documentation as well, just realized it's missing, could you add some? (look for other boards as reference)
@fabiobaltieri @galak I've moved #54634 in here as a stacked PR to avoid potential confusion. They are still kept as separate commits with separate commit messages so everything's compartmentalized. I'll also add another commit stacked on top of this PR with a small app in |
9557d88
to
65cf6e8
Compare
Hi @fabiobaltieri @galak @jackrosenthal, the sensor PR has finally been merged. Could you take a look again at this PR. Just a reminder since it's been a while, this is the PR for the Twinkie V2 board and a sample code demonstrating its ability to snoop the usb-c lines. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience, just few nitpicks, mostly cosmetic.
Dropping Kumar blocker since the DT changes are gone.
fb10b29
to
0d74da1
Compare
Heya, I think you accidentally pushed some changes of the first commit into the second one. |
1a85ad1
to
de15ad6
Compare
Sorry about that, it should be fixed now. |
Yup no prob, happens to me all the time as well. There's still a couple of unresolved comments, all nitpicky, doule blank lines, odd property ordering etc, could you have a look at those? Happy with it after those. |
de15ad6
to
9924536
Compare
9924536
to
62977b0
Compare
This is a new board for the google Twinkie V2 tool. Signed-off-by: Jason Yuan <[email protected]>
sample firmware for Twinkie V2 that toggles the LED based on charging status. Signed-off-by: Jason Yuan <[email protected]>
344f18b
62977b0
to
344f18b
Compare
This is a new board for the google Twinkie V2 tool.
Signed-off-by: Jason Yuan [email protected]