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

sunxi-6.6: NextThing C.H.I.P (PocketChip) community support #7647

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

TheSnowfield
Copy link
Collaborator

@TheSnowfield TheSnowfield commented Jan 3, 2025

Description

Community support for PocketChip SD (MMC2 breakout)

How Has This Been Tested?

./compile.sh BOARD=pocketchip-sd BRANCH=current
Burn the image into the SD card, normally boot.

Work And Tested

  • NAND device MMC2 breakout
  • RGB display
  • TCA8418 keyboard
  • WLAN

Not Tested

  • Touch Screen

More

Snipaste_2025-01-04_03-44-30

I need a few days to wait for the new MMC2 breakout board because I used the wrong SD slot package of the PCB, causing the SD card install direction to conflict with an inductor which made it hard to install the SD card.
The current test board looks like this:
image

It uses Allwinner R8(A13) pin mux, to convert NAND to MMC2, avoiding the NAND boot problem.
image

@github-actions github-actions bot added size/large PR with 250 lines or more Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Jan 3, 2025
@The-going
Copy link
Contributor

@TheSnowfield Please add exactly the same changes to the series.armbian file.
Can you show the difference between the new boot script file and the one that was used as the basis?
As output the diff -u file1 file2 command

@TheSnowfield
Copy link
Collaborator Author

TheSnowfield commented Jan 4, 2025

@TheSnowfield Please add exactly the same changes to the series.armbian file. Can you show the difference between the new boot script file and the one that was used as the basis? As output the diff -u file1 file2 command

Sure, I only added two lines that set the default boot from the MMC2. If we have a better solution...

--- boot-sunxi.cmd      2025-01-04 02:52:47.576181416 +0800
+++ boot-sunxi-pocketchip-sd.cmd        2024-12-31 19:50:17.685512643 +0800
@@ -17,6 +17,10 @@
 setenv rootdev "/dev/mmcblk${devnum}p1"
 setenv earlycon "off"
 
+# Pocketchip SD only boot from mmc2
+setenv devtype "mmc"
+setenv mmc_bootdev "1"
+
 # Remember the default u-boot fdtfile
 setenv deffdt_file ${fdtfile}

@The-going
Copy link
Contributor

It seems to me that these changes that you have made are enough for the device to be downloadable.

 CONFIG_SYS_I2C_MVTWSI=y
 CONFIG_SYS_I2C_SLAVE=0x7f
 CONFIG_SYS_I2C_SPEED=400000
-# CONFIG_MMC is not set
+CONFIG_MMC=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_AXP_ALDO3_VOLT=3300
 CONFIG_AXP_ALDO4_VOLT=3300

But why doesn't this happen in your case with a standard script?

@TheSnowfield
Copy link
Collaborator Author

It seems to me that these changes that you have made are enough for the device to be downloadable.

 CONFIG_SYS_I2C_MVTWSI=y
 CONFIG_SYS_I2C_SLAVE=0x7f
 CONFIG_SYS_I2C_SPEED=400000
-# CONFIG_MMC is not set
+CONFIG_MMC=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_AXP_ALDO3_VOLT=3300
 CONFIG_AXP_ALDO4_VOLT=3300

But why doesn't this happen in your case with a standard script?

May I miss something? From my memory, I was always testing the u-boot via sunxi FEL rather than writing to the SD card... I know is not necessary to modify the boot script, but I'm confused either.
But anyway, I will figure it out later. I will test the boot with the standard boot script again...

@The-going
Copy link
Contributor

I will test the boot with the standard boot script again...

Try adding the debugging code directly to the boot script and compiling it to understand which variables u-boot has already set in the environment.
As echo "devnum=$devnum"

If the standard script crashes for some loading scenario, we have to fix it.

@TheSnowfield
Copy link
Collaborator Author

I will test the boot with the standard boot script again...

Try adding the debugging code directly to the boot script and compiling it to understand which variables u-boot has already set in the environment. As echo "devnum=$devnum"

If the standard script crashes for some loading scenario, we have to fix it.

Okay, I confirmed that was my mistake, I will remove the boot script changes.
Thanks for your help!

@igorpecovnik
Copy link
Member

igorpecovnik commented Jan 5, 2025

There was a huge merge on kernel configs, so more adjustments are needed. Sorry.

@TheSnowfield
Copy link
Collaborator Author

TheSnowfield commented Jan 5, 2025

There was a huge merge on kernel configs, so more adjustments are needed. Sorry.

Woa.. But never mind, Im gonna to rebase these changes..

@TheSnowfield TheSnowfield force-pushed the main branch 2 times, most recently from f297e71 to b7cd711 Compare January 5, 2025 16:00
@igorpecovnik igorpecovnik added Ready to merge Reviewed, tested and ready for merge 02 Milestone: First quarter release and removed Needs review Seeking for review labels Jan 7, 2025
@igorpecovnik igorpecovnik merged commit 968d1d1 into armbian:main Jan 7, 2025
11 checks passed
igorpecovnik added a commit that referenced this pull request Jan 7, 2025
igorpecovnik added a commit that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
02 Milestone: First quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/large PR with 250 lines or more
Development

Successfully merging this pull request may close these issues.

3 participants