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

TODO: Add support for PinePhone Allwinner A64 USB #26

Closed
wants to merge 246 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
246 commits
Select commit Hold shift + click to select a range
881f1ce
Add pinephone-nuttx-usb
lupyuen Mar 6, 2023
f85629d
Add EHCI
lupyuen Mar 6, 2023
2f41ac2
Update doc
lupyuen Mar 6, 2023
87468a2
Rename imxrt to a64
lupyuen Mar 6, 2023
32ed806
PinePhone tested OK with LVGL Terminal before adding USB Driver
lupyuen Mar 7, 2023
5abff26
Update Makefile and bringup
lupyuen Mar 7, 2023
2f63e5a
Update doc
lupyuen Mar 7, 2023
7b1b4d2
Update USB
lupyuen Mar 7, 2023
31dd14f
Fixing build
lupyuen Mar 7, 2023
58a1474
Fixing build
lupyuen Mar 7, 2023
29ddf88
Fixing build
lupyuen Mar 7, 2023
f6f8269
Fixing build
lupyuen Mar 7, 2023
fbe8b9f
Fixing build
lupyuen Mar 7, 2023
1f88c46
Fixing build
lupyuen Mar 7, 2023
5d6fab1
Fixing build
lupyuen Mar 7, 2023
4e66c94
Fixing build
lupyuen Mar 7, 2023
3b9b905
Copy usbotg from imxrt
lupyuen Mar 7, 2023
1f82c7d
Rename imxrt to a64
lupyuen Mar 7, 2023
bcb4787
Fixing build
lupyuen Mar 7, 2023
6621cad
Fixing build
lupyuen Mar 7, 2023
52a5bb4
Fixing build
lupyuen Mar 7, 2023
3680e24
Fixing build
lupyuen Mar 7, 2023
4d922be
Fixing build
lupyuen Mar 7, 2023
d8e017e
Fixing build
lupyuen Mar 7, 2023
7ecdef6
Fixing build
lupyuen Mar 7, 2023
6fee63f
Fixing build
lupyuen Mar 7, 2023
5a16e55
Build OK yay!
lupyuen Mar 7, 2023
71639c2
Build OK yay!
lupyuen Mar 8, 2023
ccb7475
Build OK yay!
lupyuen Mar 8, 2023
d19dcfd
Assertion failed : at file: chip/a64_ehci.c:4996
lupyuen Mar 8, 2023
1e4d07c
Fixing struct size
lupyuen Mar 8, 2023
ed3e25f
Assertion failed : at file: chip/a64_ehci.c:5008
lupyuen Mar 8, 2023
9b9c17c
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 8, 2023
6721841
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 8, 2023
650af60
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 8, 2023
de7ba22
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 8, 2023
0f13abd
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 9, 2023
442ec81
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 9, 2023
af90f7f
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 9, 2023
3708d3c
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 9, 2023
fa083c4
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 9, 2023
ded0d2b
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 9, 2023
885f9d5
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 9, 2023
157fce5
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 9, 2023
ad6068b
Timed out waiting for HCHalted. USBSTS: 000000
lupyuen Mar 9, 2023
19ce72a
Update doc
lupyuen Mar 10, 2023
7de54bb
Update doc
lupyuen Mar 10, 2023
4447db6
Update doc
lupyuen Mar 10, 2023
59da85d
Update doc
lupyuen Mar 10, 2023
54168c5
Update doc
lupyuen Mar 10, 2023
3d02614
Update doc
lupyuen Mar 10, 2023
07a9997
Update doc
lupyuen Mar 12, 2023
687c67a
Update doc
lupyuen Mar 12, 2023
cfabff2
Update doc
lupyuen Mar 13, 2023
4117297
Update doc
lupyuen Mar 14, 2023
7608cfd
Update doc
lupyuen Mar 15, 2023
f4a6ad0
Update doc
lupyuen Mar 16, 2023
63d3c6b
Update doc
lupyuen Mar 16, 2023
7152c15
Update doc
lupyuen Mar 17, 2023
8b28d18
Update doc
lupyuen Mar 17, 2023
50b93db
Update doc
lupyuen Mar 18, 2023
3e638dd
Update doc
lupyuen Mar 18, 2023
511c4f9
Update doc
lupyuen Mar 18, 2023
653204b
Update doc
lupyuen Mar 18, 2023
1e6fd31
Update doc
lupyuen Mar 18, 2023
b80216b
Update doc
lupyuen Mar 18, 2023
479aa85
Update doc
lupyuen Mar 18, 2023
c063d94
Update doc
lupyuen Mar 18, 2023
b77dd77
Update doc
lupyuen Mar 18, 2023
57991db
Update doc
lupyuen Mar 18, 2023
14087cf
Update doc
lupyuen Mar 19, 2023
794e571
Update doc
lupyuen Mar 19, 2023
1c3894c
Update doc
lupyuen Mar 19, 2023
24b015a
Update doc
lupyuen Mar 19, 2023
98f985a
Update doc
lupyuen Mar 20, 2023
cb3c9e5
Update doc
lupyuen Mar 20, 2023
8309344
Update doc
lupyuen Mar 20, 2023
7dae52e
Update doc
lupyuen Mar 20, 2023
163d1f3
Update doc
lupyuen Mar 20, 2023
d24834a
Update doc
lupyuen Mar 20, 2023
4492f9d
Update doc
lupyuen Mar 20, 2023
dddf402
Update doc
lupyuen Mar 20, 2023
2638631
Update doc
lupyuen Mar 20, 2023
72e0d1b
Adding USB Clock and Reset
lupyuen Mar 20, 2023
a3007d0
Adding USB Clock and Reset
lupyuen Mar 20, 2023
3d3f277
Adding USB Clock and Reset
lupyuen Mar 20, 2023
083d364
Adding USB Clock and Reset
lupyuen Mar 20, 2023
5c0e6f5
Adding USB Clock and Reset
lupyuen Mar 20, 2023
cc7d177
Adding USB Clock and Reset
lupyuen Mar 20, 2023
eaa05fa
Adding USB Clock and Reset
lupyuen Mar 20, 2023
eb85dcd
Adding USB Clock and Reset
lupyuen Mar 20, 2023
90f0eed
Init USB Controller OK yay!
lupyuen Mar 20, 2023
a4bd353
Init USB Controller OK yay!
lupyuen Mar 20, 2023
3c2696c
Update doc
lupyuen Mar 20, 2023
0e75aea
Update doc
lupyuen Mar 20, 2023
926f5da
Update doc
lupyuen Mar 21, 2023
cd7d884
Update doc
lupyuen Mar 21, 2023
3587455
Clean up
lupyuen Mar 24, 2023
a324a6a
Testing CDC ACM
lupyuen Mar 24, 2023
285feae
Testing CDC ACM
lupyuen Mar 24, 2023
09e5e14
"ls" crashes
lupyuen Mar 25, 2023
323e902
"ls" crashes
lupyuen Mar 25, 2023
610ee65
"ls" crashes
lupyuen Mar 25, 2023
732eb9a
"ls" crashes
lupyuen Mar 26, 2023
1b8da84
"ls" crashes
lupyuen Mar 26, 2023
f10f59f
"ls" crashes
lupyuen Mar 26, 2023
b3e8bf5
"ls" is OK
lupyuen Mar 26, 2023
1403f6e
"ls" crashes when "Number of low-priority worker threads" is 2
lupyuen Mar 26, 2023
554f8f5
"ls" crashes when "Number of low-priority worker threads" is 2
lupyuen Mar 26, 2023
563af57
"ls" crashes when "Number of low-priority worker threads" is 2
lupyuen Mar 26, 2023
d172f6e
"ls" crashes when "Number of low-priority worker threads" is 2
lupyuen Mar 26, 2023
71f73e5
Update doc
lupyuen Mar 26, 2023
5c38469
Update doc
lupyuen Mar 27, 2023
337775c
Update doc
lupyuen Mar 27, 2023
8ce377a
Update doc
lupyuen Mar 28, 2023
44b0b26
Update doc
lupyuen Mar 28, 2023
3b2b25c
"ls" crashes when USB Hub Support is enabled
lupyuen Mar 28, 2023
0e2a080
"ls" crashes when USB Hub Support is enabled
lupyuen Mar 28, 2023
fd2dd17
Update doc
lupyuen Mar 28, 2023
150b975
Update doc
lupyuen Mar 28, 2023
f746bb2
Update doc
lupyuen Mar 28, 2023
f668875
Update doc
lupyuen Mar 28, 2023
4ba8266
Update doc
lupyuen Mar 28, 2023
fff1401
Update doc
lupyuen Mar 28, 2023
6f7b672
Update doc
lupyuen Mar 28, 2023
4893477
Update doc
lupyuen Mar 29, 2023
1482705
Update doc
lupyuen Mar 29, 2023
244a47a
Update doc
lupyuen Mar 29, 2023
8fb7a00
Update doc
lupyuen Mar 29, 2023
1be225f
Update doc
lupyuen Mar 29, 2023
6dda1af
Update doc
lupyuen Mar 29, 2023
4b0a492
Update doc
lupyuen Mar 29, 2023
18f0433
Update doc
lupyuen Mar 30, 2023
774e4ad
Update doc
lupyuen Mar 30, 2023
a536dca
EHCI Waiter not running
lupyuen Mar 30, 2023
c5fe5cd
EHCI Waiter not running
lupyuen Mar 30, 2023
0f39368
EHCI Waiter not running
lupyuen Mar 30, 2023
b4b5a7a
a64_wait waits for USB device
lupyuen Mar 30, 2023
7fdf22f
Workaround for garbled console output
lupyuen Mar 30, 2023
f00a9f8
Update doc
lupyuen Mar 30, 2023
8d0351a
Update doc
lupyuen Mar 30, 2023
0042e82
Workaround for garbled console output
lupyuen Mar 30, 2023
91516c7
Workaround for garbled console output
lupyuen Mar 30, 2023
f75b7a2
Update doc
lupyuen Mar 31, 2023
388de3e
Handle USB interruptsHandle interrupts
lupyuen Mar 31, 2023
a9fa630
Update doc
lupyuen Mar 31, 2023
499bbb8
Update doc
lupyuen Mar 31, 2023
2404699
USB Interrupt Handler not triggered
lupyuen Mar 31, 2023
2d977f0
USB Interrupt Handler not triggered
lupyuen Mar 31, 2023
8996a5b
USB Interrupt Handler not triggered
lupyuen Apr 1, 2023
868df67
USB Interrupt Handler not triggered
lupyuen Apr 1, 2023
77895ed
USB Interrupt Handler not triggered
lupyuen Apr 1, 2023
fc4a58f
Power on LTE Modem
lupyuen Apr 2, 2023
e991b77
Power on LTE Modem
lupyuen Apr 2, 2023
8a07d92
Power on LTE Modem
lupyuen Apr 2, 2023
dd838c6
Power on LTE Modem
lupyuen Apr 2, 2023
2efa24d
Power on LTE Modem
lupyuen Apr 2, 2023
c7d7c9a
Power on LTE Modem
lupyuen Apr 2, 2023
061d413
Power on LTE Modem
lupyuen Apr 3, 2023
2c09696
Power on LTE Modem
lupyuen Apr 3, 2023
e05019e
Interrupt not triggered
lupyuen Apr 3, 2023
1231e85
Interrupt not triggered with PL7 set to Low
lupyuen Apr 3, 2023
a8db5c5
Set PL7 to High
lupyuen Apr 3, 2023
f19d13f
Test PIO Output with LEDs
lupyuen Apr 3, 2023
554c5ab
Check status
lupyuen Apr 3, 2023
c62a810
Status changes from 0 to 1
lupyuen Apr 3, 2023
771d60b
Set PWR_BAT (PL7) to Low
lupyuen Apr 3, 2023
7e2eab3
Status changes from 0 to 1
lupyuen Apr 3, 2023
1d396ec
Set PWR_BAT (PL7) to High
lupyuen Apr 3, 2023
f0d4b83
Don't set PWR_BAT (PL7). Status stays at 0
lupyuen Apr 3, 2023
c99af20
Set PWR_BAT (PL7) and wait 1 sec
lupyuen Apr 3, 2023
f8e9d9c
Clean up
lupyuen Apr 3, 2023
d5113fc
Update doc
lupyuen Apr 3, 2023
4ba8b15
Update doc
lupyuen Apr 3, 2023
926a4c1
Update doc
lupyuen Apr 3, 2023
6462ea6
Update doc
lupyuen Apr 3, 2023
b6241bd
Power on DCDC1 for LTE Modem
lupyuen Apr 4, 2023
a579d9e
Power on DCDC1 for LTE Modem
lupyuen Apr 4, 2023
b6e5dc1
Power on DCDC1. Status is still 1
lupyuen Apr 4, 2023
0216f69
Power on DCDC1. Status is still 1
lupyuen Apr 4, 2023
b77bc0d
Update doc
lupyuen Apr 4, 2023
a4f8b8b
Update doc
lupyuen Apr 4, 2023
2bf234f
Update doc
lupyuen Apr 4, 2023
34dc681
Update doc
lupyuen Apr 4, 2023
166e955
Update doc
lupyuen Apr 4, 2023
09d4b49
Update doc
lupyuen Apr 5, 2023
50fedd1
Update doc
lupyuen Apr 5, 2023
edeef70
Update doc
lupyuen Apr 5, 2023
3708d58
Set PWRKEY to High - Low - High
lupyuen Apr 9, 2023
47a2763
Still no connect
lupyuen Apr 10, 2023
a2cf705
Update doc
lupyuen Apr 12, 2023
d29976c
Update doc
lupyuen Apr 14, 2023
c0b32fb
Update doc
lupyuen Apr 14, 2023
c7f83b6
Update doc
lupyuen Apr 17, 2023
7f26ca2
Adding UART config from Allwinner A1X
lupyuen Apr 17, 2023
a35d4a4
Adding UART config from Allwinner A1X
lupyuen Apr 17, 2023
8c983f4
Adding UART config from Allwinner A1X
lupyuen Apr 17, 2023
3bcebcf
Build OK
lupyuen Apr 17, 2023
20632bd
up_setup disables console
lupyuen Apr 17, 2023
42cef22
Oops working OK actually
lupyuen Apr 17, 2023
132afc7
Serial OK but output laggy
lupyuen Apr 17, 2023
b93b8ad
Fixing output lag
lupyuen Apr 17, 2023
26f5604
Fixing output lag
lupyuen Apr 17, 2023
43fb2a5
Copy interrupt handler from A1X UART
lupyuen Apr 17, 2023
a7d71d2
Console OK now yay!
lupyuen Apr 17, 2023
a60d858
Clean up
lupyuen Apr 17, 2023
18079ba
Update doc
lupyuen Apr 17, 2023
565c7f0
Clean up
lupyuen Apr 17, 2023
31e4ae6
Adding UART3
lupyuen Apr 17, 2023
6c63212
Adding UART3
lupyuen Apr 17, 2023
989f39e
Adding UART3
lupyuen Apr 17, 2023
054667b
Adding UART3
lupyuen Apr 17, 2023
281c425
Adding UART3
lupyuen Apr 18, 2023
d86457d
Adding UART3
lupyuen Apr 18, 2023
acb0b73
Adding UART3
lupyuen Apr 18, 2023
9d62fdf
Adding UART3
lupyuen Apr 18, 2023
b5bbe87
Adding UART3
lupyuen Apr 18, 2023
fd424da
Adding UART3
lupyuen Apr 18, 2023
641af6f
PIO not set correctly
lupyuen Apr 18, 2023
a0a2db8
PIO not set correctly
lupyuen Apr 18, 2023
6a8e699
PIO not set correctly
lupyuen Apr 18, 2023
4a43b66
PIO not set correctly
lupyuen Apr 18, 2023
d863c31
Duh PIO is OK
lupyuen Apr 18, 2023
fedad42
Moved init modem to bringup. /dev/ttyS1 starts OK
lupyuen Apr 18, 2023
3bf3a86
Set baud rate incorrect for UART0
lupyuen Apr 19, 2023
83566af
Set baud OK
lupyuen Apr 19, 2023
525ae7c
Copy UART Receive from A1X
lupyuen Apr 21, 2023
3fb9ca0
Skip LED
lupyuen Apr 21, 2023
7152775
Adding DTR, CTS, RTS
lupyuen Apr 21, 2023
2088baa
Still garbage after adding DTR, CTS, RTS
lupyuen Apr 21, 2023
0c76edd
Update doc
lupyuen Apr 21, 2023
2801bb2
Still garbage after adding DTR, CTS, RTS
lupyuen Apr 21, 2023
c72cb3c
Testing PL7 VBAT set to Low. UART3 does not respond
lupyuen Apr 22, 2023
4a92bf0
Restore PL7 VBAT
lupyuen Apr 22, 2023
e299209
Increase PWRKEY delays to 2 seconds
lupyuen Apr 22, 2023
dfba887
UART3 responds OK yay!
lupyuen Apr 22, 2023
fbfe96e
Clean up
lupyuen Apr 22, 2023
5da7fb0
Clean up
lupyuen Apr 22, 2023
40608f5
Remove DCDC1. Still OK
lupyuen Apr 22, 2023
ad9522e
Clean up
lupyuen Apr 22, 2023
3a23466
Poll status for 1 minute
lupyuen Apr 23, 2023
1377b03
Wait for status 0
lupyuen Apr 23, 2023
bb1ef61
Clean up
lupyuen Apr 23, 2023
12c691e
LTE Modem works OK with UART3 on NuttX yay!
lupyuen Apr 23, 2023
c101799
LTE Modem works OK with UART3 on NuttX yay!
lupyuen Apr 23, 2023
734b3a7
LTE Modem works OK with UART3 on NuttX yay!
lupyuen Apr 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "arch/arm64/src/a64/pinephone-nuttx-usb"]
path = arch/arm64/src/a64/pinephone-nuttx-usb
url = https://github.com/lupyuen/pinephone-nuttx-usb
9 changes: 9 additions & 0 deletions arch/arm64/src/a64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ config A64_TWI2
---help---
Select to enable support for TWI2.

# TODO: Rename OTG
config A64_USBOTG
bool "USB EHCI"
default n
select USBHOST_HAVE_ASYNCH if USBHOST
select USBHOST_ASYNCH
---help---
Select to enable support for USB EHCI.

endmenu # Allwinner A64 Peripheral Selection

endif # ARCH_CHIP_A64
3 changes: 3 additions & 0 deletions arch/arm64/src/a64/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ CHIP_CSRCS += a64_tcon0.c
endif

CHIP_ASRCS = a64_lowputc.S

# TODO: USB Source Files
CHIP_CSRCS += a64_ehci.c a64_usbhost.c
1 change: 1 addition & 0 deletions arch/arm64/src/a64/a64_ehci.c
1 change: 1 addition & 0 deletions arch/arm64/src/a64/a64_ehci.h
1 change: 1 addition & 0 deletions arch/arm64/src/a64/a64_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ int a64_pio_config(pio_pinset_t cfgset)
value = (cfgset & PIO_MODE_MASK) >> PIO_MODE_SHIFT;
shift = (pin & 7) << 2;

_info("port=%d, pin=%d, ext=%d, cfgaddr=0x%x, value=%d, shift=%d\n", port, pin, ext, cfgaddr, value, shift);////
regval = getreg32(cfgaddr);
regval &= ~(7 << shift);
regval |= (value << shift);
Expand Down
Loading