-
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
Add initial support for the Raspberry Pi Pico 2 #77368
base: main
Are you sure you want to change the base?
Conversation
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
82e6a6f
to
161828a
Compare
@ajf58 |
161828a
to
b3ae76c
Compare
My suggestion. |
b3ae76c
to
83ab622
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.
Updates are OK. Though migration guide entry needed for the SoC symbol change
b4d5164
to
f5d043c
Compare
be3d6b9
to
384b0ee
Compare
@nordicjm where should this update go? Is under boards in doc/releases/migration-guide-4.0.rst correct? |
Yes |
Add initial support for the RP2350's DMA peripheral, allow tests under drivers/dma/loop_transfer to run on on the Raspberry Pi Pico 2, and update the board's documentation. Signed-off-by: Manuel Aebischer <[email protected]> Signed-off-by: Andrew Featherstone <[email protected]>
Avoid referring to Pico 2 (the name of a board). In this context, RPI_PICO is used to refer to the (Zephyr) `SOC_FAMILY` rather than the Pico 1 board. This clarifies common numerical values between the RP2040 and RP2350 SoC series, and enables existing DTS files to be used with RP2350-based boards with fewer changes. Remove the use of Zehpyr's `CONFIG_` macros from the device tree files, and replace them with `SOC_SERIES`-specific files. Update the driver implementation to conditionally include the correct file. Update documentation and samples to match. Signed-off-by: Andrew Featherstone <[email protected]>
From the API documentation, `dma_api_chan_filter`` can be given a value of NULL for `filter_param`. Match the behaviour of most implementations, and return true. This removes misleading error messages logged during tests (e.g. `test_tst_dma0_m2m_loop`). Signed-off-by: Andrew Featherstone <[email protected]>
Increase test coverage for Raspberry Pi's SoCs. Use the `socs` folder rather than `boards` to enable these tests to run on any boards with the same SoCs. Signed-off-by: Andrew Featherstone <[email protected]>
The RP2350's PWM peripheral is largely unchanged from the RP2040's, but the higher clock frequency means the long blink delay must be lower. Signed-off-by: Andrew Featherstone <[email protected]>
Assume that users want to run a dual Cortex-M33 on the Pico 2, and update various parts of the codebase to match. I expect the majority of the soc's definition will move from `dts/arm/raspberrypi` to `dts/common/raspberrypi` if/when support is added for the Hazard3 cores. Some parts of the codebase can cope without encoding the cluster in the filename (e.g. Twister seems to use the identifier in `boards/raspberrypi/rpi_pico2/rpi_pico2.yaml` rather than the filename itself), others can't (e.g. `rpi_pico2_m33_defconfig`) which itself is a form of <board>_<cpucluster>_defconfig and doesn't refer to the SoC. Despite this, some files have been given the verbose fully-specified name because this matches the current documentation. Update documentation to try to highlight the capabilities and limitations of the current support within Zephyr for the Pico 2 board and the underlying SoC. Update `.overlay` and `.conf` files in `samples/` and `tests/` to match the new requirement. Limited tested locally with no issues found. Signed-off-by: Andrew Featherstone <[email protected]>
b506648
to
c9567fb
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.
File name fettling has been done. Please note the commit message did (and still does) highlight that in several cases this wasn't required.
Since this is now not going into v4.0, I've also modified the relevant commit so that the documentation updates target v4.1's release notes.
Please note my comment regarding the squashing of rp2350: Define and implement a cpucluster of Cortex-M33s
. I'm not going to do that for the reasons I've already outlined above.
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2024 Andrew Featherstone <[email protected]> |
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.
Please can you mark this "conversation" as resolved? I don't think there's any more discussion to be had here.
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.
LGTM
This is clearly defined in the zephyr contribution guidelines, the exact point of which you have been made aware of earlier https://docs.zephyrproject.org/latest/contribute/guidelines.html#contribution-workflow
History has nothing to do with it, you're trying to claim if someone submits a PR with C code changes that do not compile, instead of fixing them in the original commit, they should add a new commit which fixes them on top of it to preserve the history, this makes absolutely no sense. |
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.
Squash requested changes into original commits
@nordicjm that's not at all what @ajf58 is saying (let alone "claiming"). Please, pretty please, refrain from telling people what they are saying "make no sense", especially if you're going into a straw man argument. The commit that's left "unsquashed" is transitioning from a working state to another working state, AFAICT, and reflecting changes along the lines of "initial support" --> "slightly improved initial support". That last commit would have likely been a different, follow-up, PR in other circumstances. |
The C part is applying the same logic here to code instead of a dts file. See #80707 (review)
Because we don't rebase history that has been merged, this has not been merged, you submit a clean PR which does what is needed, not add commits that you later fix up in the same PR, and this isn't even a zephyr this, this is a common sense thing with projects and git in general |
That is not how code review works here, or in Linux (which the process is inspired from), or I imagine in any other project with a maintainer structure. Fixups go in the commit that introduced a file, sure in other circumstances it would be fine, but this is not that and the fixup commit makes the stack incredibly hard to review and the whole PR evolution very VERY hard to follow, leading to this being delayed further. There's a reason why that's the process documented in the contribution guidelines. |
The commit content should not include the discussion process that led to this point, but rather revise it to a direct commit that reflects the final conclusion and commit it. I have sorted it out. Please check it out. (Need to clone the repository) There are some parts in the revision process that use my name, |
Do Not Merge @soburi 's branch.@kartben's comment is absolutely correct at #77368 (comment) . When @fabiobaltieri says:
There is no fixup commit. Again, kartben is absolutely spot on. This PR could have been merged as-is without the last commit. I don't endorse it, but it has to have my sign off because the "signed off by" process mandates it.
@soburi the branch you've created now really is wrong. At the very least:
No, absolutely not. You cannot take my work, break it, give it back to me, and expect me to fix it. |
Had a quick look at @soburi's branch and looks ok.
He's correctly squashed requested changes into the base commits
Have you ever actually used git before? This is what happens when you rebase, even if you make no changes, go and rebase and
Where? |
That's true. |
No one said my branch to merge.
Ok, of course, I'd welcome you to solve the problem your way. |
I share @fabiobaltieri 's concern. |
@ajf58 @nordicjm @fabiobaltieri @kartben Everyone, Thank you for joining this lengthy discussion. Now, the issue of rebasing commits has been raised, However, this "rebase and clean up the history before committing" is @kartben 's comment is correct, but I think It needs stronger evidence against the clearly written rules. So, my first hope is that this will be changed.
It would be better to fix it from the perspective of the community's standards. It would involve some compromise, but is this possible? > @nordicjm, @fabiobaltieri
If not, it needs to be fixed. However, as already mentioned, @ajf58 is also quite exhausted. Even if a fix is necessary, we must consider how to make it as easy for him as possible. Can we proceed with the following process?
It will be a burden for @ ajf58, but the rebase, force push, and clean-up of the history procedures are necessary if you commit to Zephyr, so I would like you to get used to it. First of all, I would like to hear your opinion. |
The rules are there in plain text for everyone to follow for the benefit of the project, no exceptions to these base rules (which are arguably rules for any git project in general, there's nothing zephyr specific about them) |
AFAICT commit granularity also has a lot to do with maintainers' preferences (just like commit message labels, which are definitely not consistent across all areas), and as @soburi has now approved the PR here many times, I think it's safe to say that they, as the maintainer of this area, can probably live with the way things are currently split. |
Sure listen, it's no big deal, we merge off process changes that miss proper review all the time, this is fine. But the platform maintainer (@soburi) thinks it should be squashed, the buildsystem collab (@nordicjm, without whom the whole board infrastructure would be an unmanageable dumpster fire, which is arguably a bigger problem for the project) thinks it should be squashed, the process says it should be squashed. I'd be fine going off process if the maintainer(s) agreed not do, but it's not the case. So my suggestion is, pretty please, squash the commit and move on. For the record, if this was Linux, that has a much better structured hierarchy pull request process, this would be a non-issue, the maintainer would have the option to take the patches in whatever form and massage them in shape in their working branch before opening a pull request themselves for integration, which is exactly what @soburi did. Also:
Amen. |
@nordicjm @kartben @fabiobaltieri Thank you for your opinion. It's a tough decision, but I will proceed with the following process. First of all, I would like to ask @ajf58 to deal with squash. If not, that is, if my request is not accepted, I will proceed with the approval as this PR is. @ajf58 is probably very exhausted and may not be in a situation to respond. |
There's a fairly well defined process for review dismissal by the assignee (https://docs.zephyrproject.org/latest/project/project_roles.html#assignee), it eventually resolves up to the technical escalation. More discussions, more meetings, more arguing about what is ultimately a rather simple feedback about following the process. Or you could squash the commit @ajf58. Anyway @soburi what I'm trying to say is that I appreciate and admire the strong stance to wrap this but I'd rather you not dismiss a non stale, non incorrect blocker as that may result into an endless series of process wg discussions about dmissial rules that I would have to endure. :-) |
https://builds.zephyrproject.io/zephyr/pr/77368/docs/boards/index.html#name=pico+2
This is a PR to add support for the Raspberry Pi Pico 2 board, and the RP2350 SoC. See also the discussion at #77329
This should not be merged currently, as it includes changes that will break the clock control driver for the RP2040.Dependencies
cc: @yonsch @soburi