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

implement mechanism to reset PMIC #8

Closed
xypron opened this issue May 8, 2021 · 10 comments
Closed

implement mechanism to reset PMIC #8

xypron opened this issue May 8, 2021 · 10 comments
Assignees

Comments

@xypron
Copy link
Collaborator

xypron commented May 8, 2021

In the device-tree we have a node with compatible gpio-restart.

                gpiorst:gpio-restart {
                        compatible = "gpio-restart";
                        gpios = <&gpio 63 GPIO_ACTIVE_HIGH>;
                };

Why is CONFIG_SYSRESET_GPIO not selected to make use of it?

@jonathangray
Copy link
Contributor

See starfive-tech/Fedora_on_StarFive#25
Despite the device tree and code in the U-Boot and OpenSBI branches it appears that reset only works when talking to the PMIC over I2C or pushing the button next to the USB-C power which is connected to the PMIC.

@pdp7
Copy link
Collaborator

pdp7 commented May 13, 2021

please see comment here from @MichaelZhuxx
starfive-tech/Fedora_on_StarFive#25 (comment)

@pdp7 pdp7 closed this as completed May 20, 2021
@xypron
Copy link
Collaborator Author

xypron commented May 20, 2021

This issue was about U-Boot. It is good that we found out how to make a reset work in Linux.
But we also want the reset command in U-Boot to work. So we shoudn't close this issue.

The best solution would be to implement the reset in OpenSBI.

@xypron xypron reopened this May 20, 2021
@pdp7
Copy link
Collaborator

pdp7 commented May 20, 2021

@xypron thank you for pointing that out and re-opening

@MichaelZhuxx
Copy link
Collaborator

@pdp7 yes, that's my concern in todays weekly meeting, we need merge its same way(tell the pmic to reset the whole system) from linux to u-boot. @tekkamanninja please try to fix it. then I can offically release a u-boot binary. thanks.

@xypron
Copy link
Collaborator Author

xypron commented May 20, 2021

@MichaelZhuxx
The system reset should only be implemented once and that is in OpenSBI. U-Boot and Linux should call the system reset extension. This just like ARM does with PSCI.

@MichaelZhuxx
Copy link
Collaborator

@xypron good point. I think that's the best way. @tekkamanninja what's your opinion?

@MichaelZhuxx
Copy link
Collaborator

starfive-tech/opensbi@b5facf9
yes, we have done same method in openSBI to enable the system reset by GPIO63. now we should implement it by I2C.

@pdp7 pdp7 changed the title Missing sysreset implement mechanism to reset SoC from u-boot or OpenSBI May 27, 2021
@pdp7
Copy link
Collaborator

pdp7 commented May 27, 2021

starfive-tech/opensbi@b5facf9
yes, we have done same method in openSBI to enable the system reset by GPIO63. now we should implement it by I2C.

Yes, the does seem ideal to implement restarting PMIC via I2C in OpenSBI so that SBI reset will work.

@pdp7 pdp7 changed the title implement mechanism to reset SoC from u-boot or OpenSBI implement mechanism to reset PMIC May 27, 2021
@pdp7
Copy link
Collaborator

pdp7 commented Jul 1, 2021

refer to starfive-tech/opensbi#5

@pdp7 pdp7 closed this as completed Jul 1, 2021
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

5 participants