D1 Projects,
Given the comments from your first set of status, I'm wondering if I should schedule "office hours" at some cadence for us to all gather, talk about challenges, and discuss how to proceed. There would probably need to be 2 times so that we can handle geographic diversity.
Please share your thoughts on this. Would this be helpful?
-Jeff
--Jeff Scheel (he/him/his)
Linux Foundation, RISC-V Technical Program Manager --
You received this message because you are subscribed to the Google Groups "RISC-V Developer Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devboard-commun...@riscv.org.
whenever I use [Discord, Slack, and other email wanna-bes], no-one seems to understand the ability to create threads, instead just holding the entire chat in the main thread, making it harder to look backwards.
I actually owe Jeff an extended write-up on this, but my original post was titled "Nezha DOA or just comatose?" on September 23. It went to devboard-seed instead of devboard-community as the latter didn't exist (at least to me) until Sept. 30. I know it was accepted at the server because I got a response from Jeff to the personal PS at the bottom.
Allwinner did not properly configure the USB-C ports CC pins,
Robert,Glad you got the issue figured out. You'd think Allwinner would have learned from when a nearly identical issue occurred with the Raspberry Pi 4 (https://hackaday.com/2019/07/16/exploring-the-raspberry-pi-4-usb-c-issue-in-depth). The only difference is that with the Raspberry Pi, they used one resistor for both CC pins instead of one for each, while Allwinner did not attach anything to the CC pins at all.
" Good, compliant USB-A to C cables should work fine off 2-3A bricks. Most USB2 USB-C cables are not e-marked, so they’ll also work. You just can’t unplug a MacBook Pro from its supplied USB-C brick and cable, and use it "
I'm also behind the starting line, but that is more because I don't have a lot of experience with the Linux Kernel, and was trying to build from scratch (I thought
the kernel repo built a full Fedora system, not just the kernel). Was working on u-boot this week, but then my Laptop died,
xfel works. I compiled it for Windows. I was going to dump the NAND flash for examination, but see the above paragraph.
Running xfel jtag should enable the JTAG interface for the D1. JTAG is multiplexed with the SD card socket, so you need some sort of breakout to get access to it, (I know SparkFun sells some) and you won't be able to boot from an SD card.Also, there seems to be some mixed messages regarding JTAG comatability. Some Chinese language forums suggest that you need to by a C-SKY CK-Link
JTAG adapter, but the Ali T-Head website claims that the C906 supports the standard RISC-V JTAG spec and thus works with the Segger J-Link.
Additionally, I noticed when looking at the schematic, that there seems to be a few different JTAG lines, one of which goes to test pads, but the labelling suggests that is only for the DSP.
Sorry for not using quotes, they never work right for me.
I'm pretty confused that you did not get USB cables. I got 2 USB-A to USB-C cables, 2 power bricks, and a counterfeit FT232 serial adapter in mine. I would have thought that Allwinner would send everyone the same kit.
The schematic from Allwinner (which is what sunxi has as well), does not show that the CC resistors are unpopulated, but they do not exist at all. Allwinner did not bother to read the USB-C spec, or research other SBC that use USB-C. This might not be entirely accuratre though.
The schematic is labelled for hardware V1.0, while my Nezha says V1.1 on it.
I know there is at least one Allwinner employee in this group, since he emailed back and forth
However, Allwinner has a history of refusing to work with the open source communituy (they also like to violate the GPL,
they have a hiostory of very poor kernel support. (They tend to release the chip with a single modded kernel version, and then leave the community to figure
The adapter you linked to on SparkFun is for a full size SD card, but that is the sort of adapter I was talking about. A shocking number of Allwinner chips put JTAG and SDMMC on the same pins.
From what I have read, there is not any built-in JTAG debugger for the D1
. xfel jtag tells the D1 to disable the SDMMC bus and switch those pins over to JTAG. You would then run OpenOCD (which is what is mentioned on the sunxi page) on your development computer, with a JTAG adapter plugged into the the D1. You need a second processor to act as the JTAG debugger, (or a second CPU core, like on the RP2040) and as far as I can tell, there is not one on the Nezha for that. Maybe you could write some code to run on the HiFi DSP that is in the D1 to make it a debugger for the RISC-V Core, but I don't know for sure.
The example on the sunxi page appears to be connecting using a JATAG debuger from Sipeed (specifically https://www.seeedstudio.com/Sipeed-USB-JTAG-TTL-RISC-V-Debugger-ST-Link-V2-STM8-STM32-Simulator-p-2910.html).
If openOCD can connect to the D1, then that means that the C-SKY CK-Link is not required to connect to the D1. That Specific debugger is based on the FTDI 2232H (a fancier version of the FT232 UART Chip that essentially has hardware-accelerated bit-banging, and has two channels). I suspect that means that a Segger J-Link will work with the D1 as well. Segger does not have support for the D1, so we would need to create a custom configuration for it.
There are quite a few really nice FT2232H JTAG adapters on the market for dirt cheap. I have the ESP-PROG from Espressif since it breaks out the second channel as a UART port.
I realized that I have a spare monitor and a Raspberry Pi lying around, so I am going to try to use that to dump the NAND flash from my D1. It is pretty much unchanged from when I got the board, other me me disabling the blinking green LED since it was driving me nuts. Maybe we can figure out a bit more about how to interface with this thing from a flash dump.
>As a consumer, how to you defend yourself against such noncompliant
>implementations?
In their defence, we did volunteer to be the guinea pigs for this thing... in
any case so far the hardware bugs haven't been anywhere near as bad as the
ones the Pi had.
Peter.
The schematic is labelled for hardware V1.0, while my Nezha says V1.1 on it.D!_DEV_DDR3_16X2_V1_2
It's just a contract that you have to pull the SD card out of circuit to prevent the card from reacting to the JTAG signalling?
https://linux-sunxi.org/Allwinner_Nezha#JTAG implies it exists, but skates right over the physical details
Putting it on SD seems such a weird choice. It's odd enough that I've not heard of any board doing it. (That doesn't mean none such exist, of course. I'm learning a lot here!)
I think they're using the real FTDI part
I don't want to manage a bunch of wires and hubs for a serial port AND a JTAG port AND an FEL port AND power.
My GUESS is that the NAND will look like a PC partition table
The best place to record hardware-specific quirks seems to be this:
https://linux-sunxi.org/Allwinner_Nezha
The best place to record firmware/OS/software-specific quirks seems to
be this: https://fedoraproject.org/wiki/Architectures/RISC-V/Allwinner
[ CENSORED ] [ Unicode table flip ]
>I'm pretty confused that you did not get USB cables. I got 2 USB-A to USB-C
>cables, 2 power bricks, and a counterfeit FT232 serial adapter in mine. I
>would have thought that Allwinner would send everyone the same kit.
I finally got mine (it got caught up at the University when we went into
lockdown, which was then followed by the summer break), and can confirm that
it's a counterfeit FTDI cable. One giveaway is that it doesn't actually work,
after endless messing around with baud rates and whatnot in case the board had
somehow been set to something other than 115200 I tried it on another device
and it didn't work there either, while a genuine FTDI cable did. So first
thing is, toss the included cable and use a known-good one.
Now to figure out how to boot Fedora on it... is
fedora-riscv64-d1-developer-xfce-rawhide-Rawhide-20220104-012902.n.0-sda.raw.zst
the way to go?
Peter.