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

pine64-pinephone-braveheart: implementation of Crust #188

Merged
merged 1 commit into from Dec 25, 2020

Conversation

fx-chun
Copy link
Member

@fx-chun fx-chun commented Jul 19, 2020

Closes #183.

A blob of the Crust firmware has been provided for testing purposes; the final PR will build the firmware from source.

Blockers:

Issues:

  • pinephone seems to immediately resume after suspend-to-RAM (not sure why?)
  • screen does not work

@fx-chun

This comment has been minimized.

@fx-chun
Copy link
Member Author

fx-chun commented Jul 19, 2020

Suspend problem has been isolated :) Some electrical spookyness...

The device was waking up immediately due to some spurious interrupts from the modem ring indicator while the modem was powered off. Powering the modem on through the GPIO (https://gitlab.com/postmarketOS/pmaports/-/blob/master/device/community/device-pine64-pinephone/eg25.initd) eliminated the interrupts and I was successfully able to get the device to sleep & wake up.

@samueldr
Copy link
Member

Until we have support for the modem, we may want to ensure it's powered off properly? Or would "powered off properly" still cause the same issue?

@fx-chun
Copy link
Member Author

fx-chun commented Jul 20, 2020

Until we have support for the modem, we may want to ensure it's powered off properly? Or would "powered off properly" still cause the same issue?

Added.

@samueldr
Copy link
Member

Oh, neat, outside the OS. The u-boot script changes were verified to fix the suspend issue?

This also, I guess, makes the state more correct at boot?

@fx-chun
Copy link
Member Author

fx-chun commented Jul 20, 2020

Oh, neat, outside the OS. The u-boot script changes were verified to fix the suspend issue?

I verified on my device, yes :) Suspends now work from boot with the addition.

This also, I guess, makes the state more correct at boot?

I think so; this way, we know that the modem is powered off at boot & so we can initialize it correctly later in userspace.

@fx-chun
Copy link
Member Author

fx-chun commented Jul 20, 2020

Not sure why the screen is not turning on... possibly an issue with the new device trees? Kernel config needs to be updated to 5.7 (CONFIG_DRM_PANEL_XINGBANGDA_XBD599 -> CONFIG_DRM_PANEL_SITRONIX_ST7703 according to https://forum.pine64.org/showthread.php?tid=10708)

@fx-chun
Copy link
Member Author

fx-chun commented Jul 20, 2020

Success! Device can now suspend-to-RAM and resume with the current state of this PR. It looks great!

@samueldr samueldr added the 4. type: upgrade Package upgrade label Jul 21, 2020
@samueldr samueldr added the 9. status: WIP The PR is not ready for merge, work in progress label Jul 28, 2020
@Qiangong2
Copy link

This still being worked on?

@fx-chun
Copy link
Member Author

fx-chun commented Aug 14, 2020

This still being worked on?

The branch builds and works properly in its current state. The only thing left really before being ready for merging is building Crust ourselves (the brach currently uses a prebuilt blob), which is dependent on OpenRISC 1000 support working in NixPkgs. You can see the relevant PR and blockers at NixOS/nixpkgs#93368.

@archseer
Copy link
Member

archseer commented Dec 8, 2020

NixOS/nixpkgs#93368 has landed :)

@fx-chun
Copy link
Member Author

fx-chun commented Dec 18, 2020

Will be looking into finishing this up this weekend!

@fx-chun fx-chun marked this pull request as ready for review December 22, 2020 22:33
@fx-chun fx-chun changed the title [WIP] pine64-pinephone-braveheart: implementation of Crust pine64-pinephone-braveheart: implementation of Crust Dec 22, 2020
@fx-chun
Copy link
Member Author

fx-chun commented Dec 22, 2020

Crust now packaged & works OK for me.

Copy link
Member

@samueldr samueldr left a comment

Choose a reason for hiding this comment

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

AFAICT it just works here too.

Some nitpicks. With those I guess you can also rebase them all into one commit, if it suits you.

Great work, and thanks!

overlay/crust-firmware/default.nix Outdated Show resolved Hide resolved
overlay/overlay.nix Outdated Show resolved Hide resolved
@samueldr samueldr removed the 9. status: WIP The PR is not ready for merge, work in progress label Dec 24, 2020
@fx-chun
Copy link
Member Author

fx-chun commented Dec 25, 2020

done!

@samueldr samueldr merged commit 1bad352 into NixOS:master Dec 25, 2020
@samueldr
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pine64-pinephone-braveheart: use Crust
4 participants