-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Raspberry Pi Pico smorgasboard of bugfixes and improvements #80707
Open
ajf58
wants to merge
8
commits into
zephyrproject-rtos:main
Choose a base branch
from
ajf58:bugfixes-for-rpi-pico
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+65
−98
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e161e17
dts: arm: Move rpi_pico under raspberrypi
ajf58 22e20f9
dts: arm: rp2040: Improve naming of included files
ajf58 c4cfe63
drivers: clock_control: rpi_pico: Correct bitfields during init
ajf58 cbf1a58
dts: bindings: clock: rpi_pico: Add default value matching the Pico SDK
ajf58 9964470
drivers: clock_control: rpi_pico: Make pinctrl-0 optional
ajf58 c359065
boards: rp2040: Lint whitespace in board.cmake files
ajf58 7f7c0c6
drivers: dma: rpi_pico: Correct handling of NULL filter_param
ajf58 6fce055
tests: drivers: dma: Increase test coverage for RP2040
ajf58 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,4 @@ | |
input-enable; | ||
}; | ||
}; | ||
|
||
clocks_default: clocks_default { | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,4 @@ | |
input-enable; | ||
}; | ||
}; | ||
|
||
clocks_default: clocks_default { | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2021 Yonatan Schachter | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_RESET_RP2040_RESET_H_ | ||
#define ZEPHYR_INCLUDE_DT_BINDINGS_RESET_RP2040_RESET_H_ | ||
|
||
#define RPI_PICO_RESETS_RESET_ADC 0 | ||
#define RPI_PICO_RESETS_RESET_BUSCTRL 1 | ||
#define RPI_PICO_RESETS_RESET_DMA 2 | ||
#define RPI_PICO_RESETS_RESET_I2C0 3 | ||
#define RPI_PICO_RESETS_RESET_I2C1 4 | ||
#define RPI_PICO_RESETS_RESET_IO_BANK0 5 | ||
#define RPI_PICO_RESETS_RESET_IO_QSPI 6 | ||
#define RPI_PICO_RESETS_RESET_JTAG 7 | ||
#define RPI_PICO_RESETS_RESET_PADS_BANK0 8 | ||
#define RPI_PICO_RESETS_RESET_PADS_QSPI 9 | ||
#define RPI_PICO_RESETS_RESET_PIO0 10 | ||
#define RPI_PICO_RESETS_RESET_PIO1 11 | ||
#define RPI_PICO_RESETS_RESET_PLL_SYS 12 | ||
#define RPI_PICO_RESETS_RESET_PLL_USB 13 | ||
#define RPI_PICO_RESETS_RESET_PWM 14 | ||
#define RPI_PICO_RESETS_RESET_RTC 15 | ||
#define RPI_PICO_RESETS_RESET_SPI0 16 | ||
#define RPI_PICO_RESETS_RESET_SPI1 17 | ||
#define RPI_PICO_RESETS_RESET_SYSCFG 18 | ||
#define RPI_PICO_RESETS_RESET_SYSINFO 19 | ||
#define RPI_PICO_RESETS_RESET_TBMAN 20 | ||
#define RPI_PICO_RESETS_RESET_TIMER 21 | ||
#define RPI_PICO_RESETS_RESET_UART0 22 | ||
#define RPI_PICO_RESETS_RESET_UART1 23 | ||
#define RPI_PICO_RESETS_RESET_USBCTRL 24 | ||
|
||
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_RESET_RP2040_RESET_H_ */ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright (c) 2024 Andrew Featherstone <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
tst_dma0: &dma { | ||
status = "okay"; | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Since this is set to 1 here, I would suggest removing
zephyr/dts/arm/raspberrypi/rpi_pico/rp2040.dtsi
Line 165 in 0954e44
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.
@ajf58 can you please address this comment.
Either by following the suggestion or reply why that's not a good idea in this case.
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.
@xudongzheng was the original author of this change, so they're kinda arguing with their past self here, with me as a proxy. So the full suite of options are:
startup-delay-multiplier
from rp2040.dtsi. This will effectively revert what @xudongzheng added in the first place.startup-delay-multiplier
from rp2040.dtsi and only add it to the in-tree boards where it is known to be needed, i.e. cross match against https://github.com/raspberrypi/pico-sdk/tree/master/src/boards/include/boards . This, IMHO is arguably what the original PR that introduced the delay should have done: it fixes things that are known to need this, and doesn't alter out-of-tree boards' behaviour.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.
Ever written code where you later discover this should probably have been done differently or at another location ?
I have done that many times.
Of course I cannot answer for @xudongzheng , but to me this looks like such a case, and when this PR broadly states
improvements
, then this seems to be one such improvement which can be taken in.Though I agree it more seems like something which should be a regular comment, and not a change request.
To me this also sounds like the ideal approach.
And as PR author you are free to decide if you want to include this change or not.
But thanks for replying to the comment, as that is the only way for others to know if it has been seen / considered.
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.
I'm not going to be extending the scope of this change beyond what it currently does, i.e. "prevent out-of-tree boards based that use this DTS binding requiring to define a parameter."
It's a remarkable coincidence that in the "future" (subsequent commits)[1] it means that if another SoC uses this same driver it won't have to keep defining something to be equal to one. Someone should make one of those and put it on some boards... maybe get a PR to put them in-tree.
The value is board, not SoC specific, and really shouldn't be in rp2040.dtsi whatsoever. @xudongzheng , perhaps you can raise an issue referencing back to your own PR with these suggestions? I don't have time to do that, nor to action it.
[1] or ~weeks in the past for those humans who measure their life like this.
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.
I have it in my internal RP2350 notes to follow up on
startup-delay-multiplier
with a PR if it's not resolved here. Making the clock configuration consistent with https://github.com/raspberrypi/pico-sdk/tree/master/src/boards/include/boards seems reasonable.The important part of #78200 is making the delay configurable, not so much what the default value is. I prefer 64, @soburi somewhere in #77368 mentioned preferring 1 to be consistent with the Pico SDK. I'm inclined to defer to his opinion as the maintainer.