Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Created December 22, 2022 03:20
Show Gist options
  • Save lupyuen/df50aa74b33b39069e89eefda5957423 to your computer and use it in GitHub Desktop.
Save lupyuen/df50aa74b33b39069e89eefda5957423 to your computer and use it in GitHub Desktop.
NuttX Kernel PinePhone Reduced Serial Bus Tested OK with Logging Disabled. See https://lupyuen.github.io/articles/de3
DRAM: 2048 MiB
Trying to boot from MMC1
NOTICE: BL31: v2.2(release):v2.2-904-gf9ea3a629
NOTICE: BL31: Built : 15:32:12, Apr 9 2020
NOTICE: BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE: BL31: Found U-Boot DTB at 0x4064410, model: PinePhone
NOTICE: PSCI: System suspend is unavailable
U-Boot 2020.07 (Nov 08 2020 - 00:15:12 +0100)
DRAM: 2 GiB
MMC: Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment
starting USB...
No working controllers found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
653 bytes read in 4 ms (159.2 KiB/s)
## Executing script at 4fc00000
gpio: pin 114 (gpio 114) value is 1
180040 bytes read in 12 ms (14.3 MiB/s)
Uncompressed size: 20049920 = 0x131F000
36162 bytes read in 5 ms (6.9 MiB/s)
1078500 bytes read in 50 ms (20.6 MiB/s)
## Flattened Device Tree blob at 4fa00000
Booting using the fdt blob at 0x4fa00000
Loading Ramdisk to 49ef8000, end 49fff4e4 ... OK
Loading Device Tree to 0000000049eec000, end 0000000049ef7d41 ... OK
Starting kernel ...
- Ready to Boot CPU
- Boot from EL2
- Boot from EL1
- Boot to C runtime for OS Initialize
nsh: sysinit: fopen failed: 2
nsh: mkfatfs: command not found
NuttShell (NSH) NuttX-11.0.0-pinephone
nsh>
nsh>
nsh> uname -a
NuttX 11.0.0-pinephone 64a54d2-dirty Dec 21 2022 21:48:25 arm64 pinephone
nsh>
nsh> hello 0
pinephone-nuttx/render.zig: hello_main
backlight_enable: start, percent=90
Configure PL10 for PWM
*0x1f02c04: clear 0x700, set 0x200
*0x1f02c04 = 0x77277
Disable R_PWM
*0x1f03800: clear 0x40, set 0x0
*0x1f03800 = 0x0
Configure R_PWM Period
*0x1f03804 = 0x4af0437
Enable R_PWM
*0x1f03800 = 0x5f
Configure PH10 for Output
*0x1c20900: clear 0x700, set 0x100
*0x1c20900 = 0x7177
Set PH10 to High
*0x1c2090c: clear 0x400, set 0x400
*0x1c2090c = 0x400
backlight_enable: end
Wait for power supply and power-on init
panel_reset: start
Configure PD23 for Output
*0x1c20874: clear 0x70000000, set 0x10000000
*0x1c20874 = 0x17711177
Set PD23 to High
*0x1c2087c: clear 0x800000, set 0x800000
*0x1c2087c = 0x800000
wait for initialization
panel_reset: end
nsh>
nsh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment