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

Full UART support for RPI #5676

Merged
merged 2 commits into from
Dec 8, 2021
Merged

Full UART support for RPI #5676

merged 2 commits into from
Dec 8, 2021

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Dec 7, 2021

This adds PL011 UART support which is more plentiful.

It also:

  • Fixes PI4 build by including .dtb files on the SD card.
  • Enables the activity LED as the status LED on PI4 and CM4 I/O.
  • Adds that LED as board.LED.

Fixes #5650 and progress on #5629

This adds PL011 UART support which is more plentiful.

It also:
* Fixes PI4 build by including .dtb files on the SD card.
* Enables the activity LED as the status LED on PI4 and CM4 I/O.
* Adds that LED as board.LED.

Fixes micropython#5650 and progress on micropython#5629
@tannewt tannewt requested a review from dhalbert December 7, 2021 02:44
@tannewt tannewt added broadcom Raspberry Pis with Broadcom chips busio labels Dec 7, 2021
@jerryneedell
Copy link
Collaborator

jerryneedell commented Dec 7, 2021

Built locally and tested on RPi 4B -- Boots to REPL!!

>>> no fb
Adafruit CircuitPython 7.2.0-alpha.0-39-g92a4261ad on 2021-12-06; Raspberry Pi 4B with bcm2711
Board ID:raspberrypi_pi4b

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 7.2.0-alpha.0-39-g92a4261ad on 2021-12-06; Raspberry Pi 4B with bcm2711
>>> 

dhalbert
dhalbert previously approved these changes Dec 7, 2021
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to @jerryneedell for testing. The logic looks good to me, but I did not test.

Good grief, 13k file changes everytime they change something?!
image

@jerryneedell
Copy link
Collaborator

jerryneedell commented Dec 7, 2021

FYI -- here is a dmesg output --- not seeing CIRCUTPY drive... not sure if it is expected ...

[Mon Dec  6 21:55:58 2021] usb 3-3.4.3: new full-speed USB device number 38 using xhci_hcd
[Mon Dec  6 21:55:58 2021] usb 3-3.4.3: New USB device found, idVendor=2e8a, idProduct=f001, bcdDevice= 1.00
[Mon Dec  6 21:55:58 2021] usb 3-3.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Mon Dec  6 21:55:58 2021] usb 3-3.4.3: Product: Raspberry Pi 4B
[Mon Dec  6 21:55:58 2021] usb 3-3.4.3: Manufacturer: Raspberry Pi
[Mon Dec  6 21:55:58 2021] usb 3-3.4.3: SerialNumber: 100000000A3D7CF5
[Mon Dec  6 21:55:58 2021] cdc_acm 3-3.4.3:1.0: ttyACM0: USB ACM device
[Mon Dec  6 21:55:58 2021] usb-storage 3-3.4.3:1.2: USB Mass Storage device detected
[Mon Dec  6 21:55:58 2021] scsi host8: usb-storage 3-3.4.3:1.2
[Mon Dec  6 21:55:58 2021] input: Raspberry Pi Raspberry Pi 4B Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.4/3-3.4.3/3-3.4.3:1.3/0003:2E8A:F001.0015/input/input60
[Mon Dec  6 21:55:58 2021] input: Raspberry Pi Raspberry Pi 4B Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.4/3-3.4.3/3-3.4.3:1.3/0003:2E8A:F001.0015/input/input61
[Mon Dec  6 21:55:58 2021] input: Raspberry Pi Raspberry Pi 4B Consumer Control as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.4/3-3.4.3/3-3.4.3:1.3/0003:2E8A:F001.0015/input/input62
[Mon Dec  6 21:55:58 2021] hid-generic 0003:2E8A:F001.0015: input,hidraw3: USB HID v1.11 Keyboard [Raspberry Pi Raspberry Pi 4B] on usb-0000:00:14.0-3.4.3/input3
[Mon Dec  6 21:55:59 2021] scsi host8: scsi scan: INQUIRY result too short (5), using 36
[Mon Dec  6 21:55:59 2021] scsi 8:0:0:0: Direct-Access     Raspberr Raspberry Pi 4B  1.0  PQ: 0 ANSI: 2
[Mon Dec  6 21:55:59 2021] sd 8:0:0:0: Attached scsi generic sg3 type 0
[Mon Dec  6 21:55:59 2021] sd 8:0:0:0: [sdd] 59840513 512-byte logical blocks: (30.6 GB/28.5 GiB)
[Mon Dec  6 21:55:59 2021] sd 8:0:0:0: [sdd] Write Protect is off
[Mon Dec  6 21:55:59 2021] sd 8:0:0:0: [sdd] Mode Sense: 03 00 00 00
[Mon Dec  6 21:55:59 2021] sd 8:0:0:0: [sdd] No Caching mode page found
[Mon Dec  6 21:55:59 2021] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[Mon Dec  6 21:55:59 2021]  sdd: sdd1
[Mon Dec  6 21:55:59 2021] sd 8:0:0:0: [sdd] Attached SCSI removable disk
[Mon Dec  6 21:56:04 2021] FAT-fs (sdd1): error, invalid access to FAT (entry 0x08202059)
[Mon Dec  6 21:56:04 2021] FAT-fs (sdd1): Filesystem has been set read-only

@jerryneedell
Copy link
Collaborator

WooHoo! I can even blink the LED

@jerryneedell
Copy link
Collaborator

Looks like something in this PR breaks the zero2w build...

@jerryneedell
Copy link
Collaborator

zero2w builds now -- thanks!

@tannewt tannewt requested a review from dhalbert December 8, 2021 00:17
@dhalbert dhalbert merged commit f09cd94 into adafruit:main Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broadcom Raspberry Pis with Broadcom chips busio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broadcom build for RPI 4B not booting
3 participants