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

[Question] Clock ID (mailbox property interface) of EMMC2 #1179

Closed
lategoodbye opened this issue Jul 7, 2019 · 16 comments
Closed

[Question] Clock ID (mailbox property interface) of EMMC2 #1179

lategoodbye opened this issue Jul 7, 2019 · 16 comments

Comments

@lategoodbye
Copy link

Is the the clock of the EMMC2 interface on the Pi 4 accessible via mailbox property interface (at least "Get clock rate" 0x00030002)?
Which ID does the clock have?

@lategoodbye lategoodbye changed the title Clock ID (mailbox property interface) of EMMC2 [Question] Clock ID (mailbox property interface) of EMMC2 Jul 7, 2019
@popcornmix
Copy link
Contributor

Looks like it doesn't currently. Let me see if it can be added.

popcornmix added a commit that referenced this issue Jul 8, 2019
See: #1167

firmware: arm_loader: Support CLOCK_EMMC2 from GET_CLOCK_RATE
See: #1179

firmware: arm_loader: Force word alignment for the DTB
See: #1175

firmware: clock_2711: don't set reserved values for KA in PLL KAIP registers

firmware: Assorted minor fixes for tvservice -o
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Jul 8, 2019
See: raspberrypi/firmware#1167

firmware: arm_loader: Support CLOCK_EMMC2 from GET_CLOCK_RATE
See: raspberrypi/firmware#1179

firmware: arm_loader: Force word alignment for the DTB
See: raspberrypi/firmware#1175

firmware: clock_2711: don't set reserved values for KA in PLL KAIP registers

firmware: Assorted minor fixes for tvservice -o
@popcornmix
Copy link
Contributor

Latest rpi-update firmware has support for this. Use clock id=12 for emmc2.

@lategoodbye
Copy link
Author

@vianpl @agherzan I think this is a necessary puzzle piece for the u-boot sdhci-bcm2835 driver, which get the current clock rate via mailbox interface.

@agherzan
Copy link

agherzan commented Jul 9, 2019

That is definitely a good point @lategoodbye . Also in my case the dts was incorrectly using the old address for the SD card interface.

@agherzan
Copy link

agherzan commented Jul 9, 2019

@lategoodbye there is also another bit that might be missing. The kernel uses a 1.8 regulator for the emmc2 interface.

@lategoodbye
Copy link
Author

I'm not sure what you meant with old address of the SD card interface. The emmc2 is an additional interface (3rd), so we need to extend the driver with an additional compatible for the emmc2 interface. Yes, the 1.8 regulator new but not essential for booting.

@vianpl
Copy link

vianpl commented Jul 9, 2019

@mbgg might be interested

@agherzan
Copy link

agherzan commented Jul 9, 2019

@lategoodbye that's basically what I meant. I'll make the changes, test and push to the same branch.

@agherzan
Copy link

agherzan commented Jul 9, 2019

@popcornmix , can you also confirm the power device id?

@popcornmix
Copy link
Contributor

There is no separate power domain for emmc2. It will be powered as long as arm is running.

@agherzan
Copy link

agherzan commented Jul 9, 2019

Thanks @popcornmix . I asked because I thought my current issue is somehow related to that. What happens is that the arm hangs as soon as I reset sdhci (0x2F). I've checked the ioaddr and it is fe340000 and also the clock if used as being 12. Any brilliant ideas?

agherzan pushed a commit to agherzan/u-boot that referenced this issue Jul 12, 2019
This clock has a different mbox ID[1] so have this included in the
relevant header file.

[1] raspberrypi/firmware#1179

Signed-off-by: Andrei Gherzan <[email protected]>
agherzan pushed a commit to agherzan/u-boot that referenced this issue Jul 12, 2019
This clock has a different mbox ID[1] so have this included in the
relevant header file.

[1] raspberrypi/firmware#1179

Signed-off-by: Andrei Gherzan <[email protected]>
@lurch
Copy link
Contributor

lurch commented Jul 12, 2019

@agherzan
Copy link

@lurch Nice. Thanks.

@agherzan
Copy link

With some help from @mbgg https://github.com/agherzan/u-boot/tree/ag/rpi4 now contains support for both 32 and 64bit Raspberry Pi 4.

@pelwell
Copy link
Contributor

pelwell commented Jul 12, 2019

Nice work - congratulations!

agherzan pushed a commit to agherzan/u-boot that referenced this issue Jul 16, 2019
This clock has a different mbox ID[1] so have this included in the
relevant header file.

[1] raspberrypi/firmware#1179

Signed-off-by: Andrei Gherzan <[email protected]>
agherzan pushed a commit to agherzan/u-boot that referenced this issue Jul 16, 2019
This clock has a different mbox ID[1] so have this included in the
relevant header file.

[1] raspberrypi/firmware#1179

Signed-off-by: Andrei Gherzan <[email protected]>
agherzan pushed a commit to balena-os/u-boot that referenced this issue Jul 18, 2019
This clock has a different mbox ID[1] so have this included in the
relevant header file.

[1] raspberrypi/firmware#1179

Signed-off-by: Andrei Gherzan <[email protected]>
agherzan pushed a commit to balena-os/u-boot that referenced this issue Jul 18, 2019
This clock has a different mbox ID[1] so have this included in the
relevant header file.

[1] raspberrypi/firmware#1179

Signed-off-by: Andrei Gherzan <[email protected]>
agherzan pushed a commit to agherzan/u-boot that referenced this issue Jul 19, 2019
This clock has a different mbox ID[1] so have this included in the
relevant header file.

[1] raspberrypi/firmware#1179

Signed-off-by: Andrei Gherzan <[email protected]>
agherzan pushed a commit to balena-os/u-boot that referenced this issue Jul 19, 2019
This clock has a different mbox ID[1] so have this included in the
relevant header file.

[1] raspberrypi/firmware#1179

Signed-off-by: Andrei Gherzan <[email protected]>
@JamesH65
Copy link
Contributor

Closing this issue as questions answered/issue resolved.

TimothyEBaldwin pushed a commit to TimothyEBaldwin/RO_All_Commits that referenced this issue Sep 11, 2019
Firmware versions starting from 2019-07-08 feature an additional clock ID.
See raspberrypi/firmware#1179

Version 0.11. Tagged as 'BCMSupport-0_11'
TimothyEBaldwin pushed a commit to TimothyEBaldwin/RO_All_Commits that referenced this issue Sep 11, 2019
Firmware versions starting from 2019-07-08 feature an additional clock ID.
See raspberrypi/firmware#1179

Version 0.11. Tagged as 'BCMSupport-0_11'
TimothyEBaldwin pushed a commit to TimothyEBaldwin/RO_All_Commits that referenced this issue Jul 4, 2020
Firmware versions starting from 2019-07-08 feature an additional clock ID.
See raspberrypi/firmware#1179

Version 0.11. Tagged as 'BCMSupport-0_11'
TimothyEBaldwin pushed a commit to TimothyEBaldwin/RO_All_Commits that referenced this issue Jul 4, 2020
Firmware versions starting from 2019-07-08 feature an additional clock ID.
See raspberrypi/firmware#1179

Version 0.11. Tagged as 'BCMSupport-0_11'
TimothyEBaldwin pushed a commit to TimothyEBaldwin/RO_All_Commits that referenced this issue Jul 23, 2020
Firmware versions starting from 2019-07-08 feature an additional clock ID.
See raspberrypi/firmware#1179

Version 0.11. Tagged as 'BCMSupport-0_11'
TimothyEBaldwin pushed a commit to TimothyEBaldwin/RO_All_Commits that referenced this issue Jul 23, 2020
Firmware versions starting from 2019-07-08 feature an additional clock ID.
See raspberrypi/firmware#1179

Version 0.11. Tagged as 'BCMSupport-0_11'
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

No branches or pull requests

7 participants