Skip to content
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 support for 2712D0 variant #5847

Merged
merged 8 commits into from
Jan 15, 2024

Conversation

popcornmix
Copy link
Collaborator

Get ready for forthcoming 2712D0 variant of processor, which purges some unused peripherals and has some register layout tweaks.


#define BIT_TO_REG(b) (((b) >> 5) << 2)
#define BIT_TO_SHIFT(b) ((b) & 0x1f)

#define MUX_BIT(mr,mb) (MUX_BIT_VALID + ((mr)*4)*8 + (mb)*4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the missing space that checkpatch is complaining about?

@@ -0,0 +1,109 @@
// SPDX-License-Identifier: GPL-2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole commit could be dropped now that we have the bcm2712d0 overlay, unless we're catering for upstream preferences.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was thinking it will be wanted in future for upstream.

@@ -24,8 +24,6 @@
#define spi6 _spi6
#define uart0 _uart0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit could go before the addition of the bcm2712d0 variant, to avoid modifying it.

pelwell and others added 8 commits January 12, 2024 16:00
There is no point describing hardware blocks in C0/1 that aren't also
in D0, so delete them.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
The bcm2712d0 overlay encapsulates the differences between BCM2712C0/1
and D0.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
BCM2712D0's sparse GPIO map revealed that it is not safe to treat
group_selector as the GPIO number - it is an index into the array of
pinctrl_pin_descs, and the "number" member says which GPIO it refers to.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
A non-zero mux bit number is used to detect a valid entry in the
pin_regs tables, but GPIO 0 (GPIO 1 on D0) is a valid GPIO with a mux
bit number of zero, so add a high-bit on all valid entries to
distinguish this from an uninitialised row in the table.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
2712D0 has a simpler colourspace conversion matrix block
so set that up.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
2712D0 has increased the fifo sizes of MAI_THR blocks,
resulting in adjusted bit offsets. Handle that.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
@popcornmix
Copy link
Collaborator Author

Updated to address comments.

Copy link
Contributor

@pelwell pelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice - thanks.

@6by9
Copy link
Contributor

6by9 commented Jan 12, 2024

As it's only the HVS that differs with D0, the flag could be in vc4_hvs instead of vc4_dev. It would also then be the compatible for the HVS that gets updated instead of the overall driver.
I'm not worrying about it for now, but will probably do that when upstreaming.

@pelwell pelwell merged commit 05598d0 into raspberrypi:rpi-6.6.y Jan 15, 2024
11 of 12 checks passed
@popcornmix popcornmix deleted the d0_bringup-6.6.y branch January 15, 2024 11:21
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jan 15, 2024
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants