-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 support for lilygo_t_display_rp2040 board #6037
Conversation
erongd
commented
Feb 15, 2022
•
edited by tannewt
Loading
edited by tannewt
- Update VID/PID (task added by @dhalbert)
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.
Thank you for the PR! What usb VID and PID did you use? You can get them from Raspberry Pi as well: https://github.com/raspberrypi/usb-pid
I am not sure how to go about doing that. As I am not the vendor of the board, just got it from internet to use for my own purpose. I used the same VID as the lilygo board with esp32s2 so I assume that is the VID for Lilygo. PID I just made up one for testing purpose, I was hoping the team can help me assign one as the documentation says. Hope this helps. |
If the board maker has a USB PID, we request that they assign a VID for CircuitPython (and for UF2, if applicable). |
I am just a hobbyist playing with boards I acquired myself. I don't know how to go about getting this information from the Chinese manufacturer whom produced them. Any points would help me to get this moving along. |
it looks like they have a forum here (found by googling for lilygo) https://community.lilygo.cc/ |
I will try to give it a go. |
No luck with the community, it is not very active. I am not sure how to move forward from here. |
you could request it from raspberry pi on behalf of lilygo - we also recommend emailing a reply to your order, or email some of the addresses |
USB_VID = 0x303A | ||
USB_PID = 0x8008 |
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.
For the record:
A brand new device shows
$ lsusb
[...]
Bus 003 Device 104: ID 2e8a:000a Raspberry Pi PicoArduino
Boot mode
$ lsusb
[...]
Bus 003 Device 103: ID 2e8a:0003 Raspberry Pi RP2 Boot
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.
I will try to give it a go to request the PID from raspberry.
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.
I submitted the form mentioned on https://github.com/raspberrypi/usb-pid but not sure if it went through (aka. didn't get a confirmation).
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.
I did the same, no confirmation though. Let's see. Also in the mean time opened an issue on their official github repo to see if we got any luck.
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.
Here is the issue. Xinyuan-LilyGO/LILYGO-T-display-RP2040#5
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.
Would you suggest I change the value in mpconfigboard.mk to match the lsusb results? I don't think the esp32s2 one is using the factory value though.
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.
I would suggest to use USB_VID = "0x2E8A" (that's the Raspberry Pi foundation) and USB_PID = "0x000B" (that's Circuitpython firmware - according to https://github.com/raspberrypi/usb-pid ). On this page it states in the second sentence after "Use of the IDs" that "In general, the only reason to require one is because Windows uses the product ID to select a vendor-specific driver for a USB device." And from USB's perspective it is just connected to a rp2040, and gets some subfunctions like HID, usbstorage and serial. The pin definitions, possible leds and buttons and displays are all part of the circuitpython firmware, not the USB connection.
Further rationale:
Even the micro:bit just uses VID 0x0D28 (NXP) and PID 0x0204 (Arm Embed) for their connection. Actually, using 0x303A would not be correct, that is the VID for Expressif, but the MCU is not an esp32 but rp2040.
Interestingly, the standard rp2040 board is after the flash identified as VID 0x239A (Adafruit) and not as a Raspberry Pi Pico (0x2E8A) with circuitpython firmware (PID 0x000B)
I'm using the artifact from a7afd66 ( |
It works just fine on two of the boards I got, so I am not sure what is the problem. Do you have any error you get from serial or it's not booting at all? |
@fabaff BTW, I did not hear back from raspberry foundation at all on the PID request, did you get any response from them for your request? I am thinking to file the request again maybe they have system problems. |
Unfortunately no error or other indication about the problem. I guess it's a hardware issue with the display. The unit is working fine otherwise.
No, I didn't |
I got an answer from Raspberry Pi Limited regarding the PID. @erongd and LilyGo are CC in my response. In short, it looks like that they would like that the OEM manufacturer is requesting the PID. |
Unfortunatly not much pogress in Xinyuan-LilyGO/LILYGO-T-display-RP2040#5. Still waiting for the PID. |
Is there anyway to get this build artifact without setting up a local build chain? |
Build artifacts are here: https://github.com/adafruit/circuitpython/actions/runs/2032460774. Click on the lilygo "Details" link above, then click on "Summary", and then scroll down. |
As long as you don't work for LilyGo, I'm ok granting pid.codes PIDs for open source code (CP) on closed source hardware. https://pid.codes/ |
These have expired and are no longer downloadable, is there anyway to get this? It appears LilyGo won't provide a PID, @raspberrypi said LilyGo is the only one that can request it from them but they'd look into it. In the interim, I'm trying some way to flash circuitpython, even if unsupported, to this device. Thanks! |
Pushing an empty commit should trigger a rebuild.
It sounds like @tannewt is ok with granting PID codes in this case. I'm only looking at this because adafruit/circuitpython-org#913 has been waiting on this for almost a year now.
You could try compiling CircuitPython on your system. Perhaps just use an existing pid code just for your system. It doesn't appear to have uploaded anything to Amazon S3. |
@erongd @dhalbert @tannewt I would suggest to use USB_VID = "0x2E8A" (that's the Raspberry Pi foundation) and USB_PID = "0x000B" (that's Circuitpython firmware - according to https://github.com/raspberrypi/usb-pid ). On this page it states in the second sentence after "Use of the IDs" that "In general, the only reason to require one is because Windows uses the product ID to select a vendor-specific driver for a USB device." And from USB's perspective it is just connected to a rp2040, and gets some subfunctions like HID, usbstorage and serial. The pin definitions, possible leds and buttons and displays are all part of the circuitpython firmware, not the USB connection. Further rationale: Interestingly, the standard rp2040 board is after the flash identified as VID 0x239A (Adafruit) and not as a Raspberry Pi Pico (0x2E8A) with circuitpython firmware (PID 0x000B) |
This PID is for CircuitPython on the Pico explicitly. This is a different board. Please make a request on pid.codes if you haven't already. |
We're almost there! |
Thanks to @kreier and @tannewt we finally have a PID/VID that can be used for this device. @erongd Are you able to update your PR? PID: 0x2023 Reference: pidcodes/pidcodes.github.com#827 |
PR has been updated with the assigned VID/PID for CircuitPython. |
If anyone can let me know the right process to apply for VID/PID or can assign one. I can contribute the board definition for the Lilygo T-Display PICOC3 as well. That is the rp2040 board is the variant with the build-in wifi powered by ESP-C3 chip. The wifi part works with CircuitPython AT library support. |
I don't know why is the github build failing. It is working fine on my local build. Any points on how to fix it would be appreciated. |
Maybe @dhalbert can offer some insight? |
The use of displays has changed since that PR started a million years ago with a change to what the displays array type, see changes here that show how it's done now: d5b747b And github builds the merged version, so you might need to rebase your local branch on main to build against the same code. |
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.
I think the changes I put here should work to make it work and build with main.