-
-
Notifications
You must be signed in to change notification settings - Fork 130
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 pine h64 board #65
base: development
Are you sure you want to change the base?
Conversation
support/overlay/overlay.nix
Outdated
allwinnerH6 = aarch64.callPackage ../builders/allwinner-a64 { | ||
TF-A = aarch64.armTrustedFirmwareAllwinnerH6; | ||
}; | ||
|
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.
(You don't need to do anything about this...)
I'm rewriting the build setup for Tow-Boot using the modules system. So importing the A64 builder for H6 won't be a thing anymore in the future. So it's fine to add this right now even though I don't exactly like this :).
Using the modules system, it will be easier to configure complex build instructions.
+# CONFIG_CMD_FLASH is not set | ||
+# CONFIG_SPL_DOS_PARTITION is not set | ||
+# CONFIG_SPL_EFI_PARTITION is not set | ||
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-pine-h64-model-b" |
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.
(You don't need to do anything about this, this is a not for future readers wanting to know more about porting)
It is important that CONFIG_DEFAULT_DEVICE_TREE
matches the file names in the mainline kernel.
- https://github.com/torvalds/linux/blob/2a987e65025e2b79c6d453b78cb5985ac6e5eb26/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
- https://github.com/torvalds/linux/blob/2a987e65025e2b79c6d453b78cb5985ac6e5eb26/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts
This is because this config is used to seed the environment with the name of the dtb
file that should be loaded automatically with the different boot schemes.
Hi! 👋 A new face! And welcome. Looks good generally speaking. Are you going to look at SPI Flash for this PR? Other non-working features (e.g. HDMI) are more for upstream problems, assuming it's not just not configured. We need to upgrade the backing U-Boot version anyway, so it's not too much of a concern for now. It will need to be re-evaluated once udpated. |
I'm not sure what else needs to be done for enabling SPI. I'm planning to dive in a little deeper to see if I can fix this. The trivial approach of enabling the option in the Tow-Boot board description and patching the
while that is explicitely set through the Tow-Boot builder. The
|
Ooooof... In other words, how to make the SPI basically unusable :| AFAIUI Tow-Boot could be made to load from SPI, but that build wouldn't be able to interact with SPI once loaded. E.g. it wouldn't be able to save env, or update itself. I'm not sure this use case is already "supported" in U-Boot. E.g. SPL has I believe your issues here with enabling SPI were that it wasn't configured in the device tree. But that's a guess. Though it might be possible to add some sort of special casing to "unprobe" the MMC2 while reading/writing to SPI. This would require out of scope work, especially for this PR. |
Is it possible to reload the dts from inside u-boot? I'm thinking about something like
I don't think so. I'm running into build problems with SPI, but to my understanding u-boot sees device-tree as run-time config (like linux, unlike zephyr) and doesn't pull any data from it during build. |
e99eb2e
to
72ce96c
Compare
Patches I updated the PR description to give an overview. I'm currently not planning on doing anything about the missing HDMI support and the non working USB ports. Regarding the eMMC I can't test without a module. Since u-boot doesn't do mutlithreading I guess enabling both eMMC and SPI might actually work. If the drivers ensure the pinmuxing is configured before operating on the busses they should both work. |
Subject: [PATCH 2/4] sunxi: configs: add defconfig for pine H64 model B | ||
|
||
It almost identical to the defconfig for pine H64 model A with only | ||
the CONFIG_DEFUALT_DEVICE_TREE adapted. |
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.
the CONFIG_DEFUALT_DEVICE_TREE adapted. | |
the CONFIG_DEFAULT_DEVICE_TREE adapted. |
(Since you want to upstream, let's correct nits :))
The differences between the boards model A and model B are irrelevant | ||
inside u-boot, but the device-tree name is relevant as default for | ||
selecting the correct device-tree when booting linux. |
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.
(Nothing to do really)
I believe the "more correct" way to handle this would be like for the Pinephone, figure out a detectable difference between boards during early boot and setup accordingly.
I don't really know the H64. There may be nothing that can be detected for this. At least from the Linux dts, I don't really see anything.
This is useful for targets where there's no display support, rather than dig in the implementation details (e.g. withLogo).
Signed-off-by: Daniel Wagenknecht <dwagenk@mailbox.org>
Signed-off-by: Daniel Wagenknecht <dwagenk@mailbox.org>
Hey y'all, As this branch no longer cleanly applied to the HEAD of the development branch (and I was wanting Tow-Boot on my Pine H64), I took a stab at updating this. I have a branch at https://github.com/auchter/Tow-Boot/commits/auchter/pineh64 that should apply cleanly. The branch incorporates @dwagenk's patches against u-boot, but I rewrote the Nix stuff to deal with the changes in Tow-Boot since this PR was opened. I also cherry-picked two of @samueldr's commits into that branch from #155 to cleanly handle the lack of display support for the H64 in upstream u-boot. I chose to add a new board for each variant (H64A/H64B) with the H64B importing and overriding the configuration as appropriate. Like @dwagenk, I don't have an eMMC module to test with (nor do I have an H64A), but I was able to successfully boot both Let me know if you'd like me to open up a separate PR for this |
I personally wouldn't mind another PR, but let's also see if @dwagenk has anything to say, just in case, maybe you can cooperate for bringing the changes in. |
Hey. Don't have time to continue this for now. @auchter I added you as collaborator to my fork, so you should be able to modify the base-branch for this PR. |
72ce96c
to
34ee0e2
Compare
Thanks, @dwagenk! I've pushed my changes to the base branch, and also pushed a branch (dwagenk/add-pineH64-board-orig) to backup your original branch state for posterity. Looks like your pinmux fix landed in u-boot already, and someone else has added a Model B device tree, so we should be able to drop patches 1 and 3 once Tow-Boot updates the u-boot version used. I'll ping the mailing list this week to see if we can get the defconfig for model B merged as well. |
Just wanted to comment here, I tried @auchter's branch and was able to successfully build and install tow-boot to the SPI flash on my H64B here. And now my H64B can PXE boot without any SD card installed 🎉 |
This adds support for the pine H64 board, both the A and the B variant (which are almost identical). An adapted builder for the Arm-Trusted-Firmware for the Allwinner H6 SOC was also necessary.
https://wiki.pine64.org/index.php/PINE_H64
I tested the
shared.disk-image.img
with the B variant of the board.--- List updated ---
arch/arm/mach-sunxi/Kconfig
dependecy chainVIDEO_HDMI->VIDEO_SUNXI->!SUN50I_GEN_H6
)