Pinebook Linux Power-Down Procedure
#3
Greetings,

In this segment I have captured the OS shutdown to :  target shutdown ( look for it in the log below );  beginning with the OS unmounting of the Local File Systems (the critical piece of shutdown )!

After this line:

                [  OK  ] Reached target Shutdown.                                              

...  we see the power down console messages ( usually never seen by human eyes ) and a long string of messages beginning with this line:

                 [48025.784817] Power down.   ( look for "hello boot0 starting" )                                                   

... and culminating in this line ultimately if the hardware actually powers OFF :

                 [      8.036]power off set power off vol to default                                                    

Lowly humans get to see a brief  battery charging icon on the screen at this point ( boot0 arisc uboot ).


Its amazing what we can learn about the system ( hardware and software ) by studying the serial console logs !






Code:
[  OK  ] Stopped target Local File Systems.                                    
        Unmounting /run/user/1000...                                          
        Unmounting /boot...                                                    
[  OK  ] Removed slice system-systemd\x2dbacklight.slice.                      
[  OK  ] Unmounted /run/user/1000.                                              
[  OK  ] Unmounted /boot.                                                      
[  OK  ] Stopped File System Check on /dev/mmcblk0p1.                          
[  OK  ] Removed slice system-systemd\x2dfsck.slice.                            
[  OK  ] Reached target Unmount All Filesystems.                                
[  OK  ] Stopped target Local File Systems (Pre).                              
[  OK  ] Stopped Create Static Device Nodes in /dev.                            
[  OK  ] Stopped Remount Root and Kernel File Systems.                          
[  OK  ] Reached target Shutdown.                                              
[48025.784817] Power down.                                                      
INFO:    PSCI Affinity Map:                                                    
INFO:      AffInst: Level 2, MPID 0x0, State ON                                
INFO:      AffInst: Level 1, MPID 0x0, State ON                                
INFO:      AffInst: Level 0, MPID 0x0, State ON                                
INFO:      AffInst: Level 0, MPID 0x1, State OFF                                
INFO:      AffInst: Level 0, MPID 0x2, State OFF          


            ( console messages stop here if the pinebook is unplugged )

                     
HELLO! BOOT0 is starting!                                                      
boot0 commit : 045061a8bb2580cb3fa02e301f52a015040c158f                        
                                                                               
boot0 version : 4.0.0                                                          
set pll start                                                                  
set pll end                                                                    
rtc[0] value = 0x00000000                                                      
rtc[1] value = 0x00000000                                                      
rtc[2] value = 0x00000000                                                      
rtc[3] value = 0x0000a101                                                      
rtc[4] value = 0x00000000                                                      
rtc[5] value = 0x00000000                                                      
DRAM driver version: V1.1                                                      
start ddr type auto scan mode                                                  
rsb_send_initseq: rsb clk 400Khz -> 3Mhz                                        
PMU: AXP81X                                                                    
ddr voltage = 1280 mv                                                          
DRAM init OK                                                                    
lpddr3 try success                                                              
DRAM Type = 7 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)                                
DRAM clk = 408 MHz                                                              
DRAM zq value: 003939b9                                                        
DRAM dual rank full DQ gate training OK                                        
DRAM size = 2048 MB                                                            
DRAM init ok                                                                    
dram size =2048                                                                
card boot number = 2, boot0 copy = 0                                            
card no is 2                                                                    
sdcard 2 line count 8                                                          
[mmc]: mmc driver ver 2015-05-08 20:06                                          
[mmc]: Wrong media type 0x00000000                                              
[mmc]: ***Try SD card 2***                                                      
[mmc]: mmc 2 cmd 8 timeout, err 00000100                                        
[mmc]: mmc 2 cmd 8 err 00000100                                                
[mmc]: mmc 2 send if cond failed                                                
[mmc]: mmc 2 cmd 55 timeout, err 00000100                                      
[mmc]: mmc 2 cmd 55 err 00000100                                                
[mmc]: mmc 2 send app cmd failed                                                
[mmc]: ***Try MMC card 2***                                                    
[mmc]: MMC 5.0                                                                  
[mmc]: HSDDR52/DDR50 8 bit                                                      
[mmc]: 50000000 Hz                                                              
[mmc]: 14800 MB                                                                
[mmc]: ***SD/MMC 2 init OK!!!***                                                
sdcard 2 init ok                                                                
The size of uboot is 000f8000.                                                  
sum=dda0f53d                                                                    
src_sum=dda0f53d                                                                
0x00000002 0x00000000                                                          
0x00000000 0x00000000                                                          
0x00000000 0x00000000                                                          
0x00000000 0x00000000                                                          
0x00000000 0x00000000                                                          
Succeed in loading uboot from sdmmc flash.                                      
boot0: start load other image                                                  
boot0: Loading BL3-1                                                            
Loading file 0 at address 0x40000000,size 0x0000a400 success                    
boot0: Loading scp                                                              
Loading file 2 at address 0x00040000,size 0x00019c00 success                    
set arisc reset to de-assert state                                              
Ready to disable icache.                                                        
é  Configuring SPC Controller                                                  
NOTICE:  BL3-1: v1.0(debug):864ef11                                            
NOTICE:  BL3-1: Built : 21:59:22, May  8 2017                                  
INFO:    BL3-1: Initializing runtime services                                  
INFO:    BL3-1: Preparing for EL3 exit to normal world                          
INFO:    BL3-1: Next image address = 0x4a000000                                
INFO:    BL3-1: Next image spsr = 0x1d3                                        
                                                                               
                                                                               
U-Boot 2014.07-00014-gc616876 (May 30 2017 - 18:44:41) Allwinner Technology    
                                                                               
uboot commit : c616876a3e07117d9bf1a5fdadbc7e7c233c4f34                        
                                                                               
rsb: secure monitor exist                                                      
[      0.433]pmbus:   ready                                                    
[      0.436][ARISC] :arisc initialize                                          
[      0.969][ARISC] :arisc_dvfs_cfg_vf_table: support only one vf_table        
[SCP] :sunxi-arisc driver begin startup 2                                      
[SCP] :arisc_para size:1a8                                                      
[SCP] :arisc version: [v0.1.76]                                                
[SCP] :sunxi-arisc driver v1.10 is starting                                    
[      1.162][ARISC] :sunxi-arisc driver startup succeeded                      
[      1.214]PMU: AXP81X                                                        
[      1.216]PMU: AXP81X found                                                  
bat_vol=4180, ratio=100                                                        
[      1.224]PMU: dcdc2 1100                                                    
[      1.227]PMU: cpux 1008 Mhz,AXI=336 Mhz                                    
PLL6=600 Mhz,AHB1=200 Mhz, APB1=100Mhz AHB2=300Mhz MBus=400Mhz                  
device_type = 3253, onoff=1                                                    
dcdc1_vol = 3300, onoff=1                                                      
dcdc2_vol = 1100, onoff=1                                                      
dcdc6_vol = 1100, onoff=1                                                      
aldo1_vol = 2800, onoff=0                                                      
aldo2_vol = 1800, onoff=1                                                      
aldo3_vol = 3000, onoff=1                                                      
dldo1_vol = 3300, onoff=0                                                      
dldo2_vol = 2500, onoff=0                                                      
dldo3_vol = 2800, onoff=0                                                      
dldo4_vol = 3300, onoff=1                                                      
eldo1_vol = 1800, onoff=1                                                      
eldo2_vol = 1800, onoff=0                                                      
eldo3_vol = 1800, onoff=0                                                      
fldo1_vol = 1200, onoff=0                                                      
fldo2_vol = 1100, onoff=1                                                      
gpio0_vol = 3100, onoff=1                                                      
vbus not exist                                                                  
normal dc exist, limit to dc                                                    
run key detect                                                                  
no key found                                                                    
no uart input                                                                  
DRAM:  2 GiB                                                                    
fdt addr: 0xb6eb99c0                                                            
Relocation Offset is: 75f0c000                                                  
In:    serial                                                                  
Out:   serial                                                                  
Err:   serial                                                                  
gic: sec monitor mode                                                          
[      1.588]start                                                              
drv_disp_init                                                                  
init_clocks: finish init_clocks.                                                
fdt_get_one_gpio lcd0.lcd_gpio_2 fail                                          
fdt_get_one_gpio lcd0.lcd_gpio_3 fail                                          
fdt_get_one_gpio lcd0.lcd_gpio_scl fail                                        
fdt_get_one_gpio lcd0.lcd_gpio_sda fail                                        
pwm_request: reg = 0x1c21400.pchip->pwm = 0                                    
reg_busy_offset=0, reg_busy_shift = 0, reg_enable_offset = 0                    
request pwm success, pwm = 0!                                                  
sunxi_pwm_config: reg_shift = 0, reg_width = 4, prescale temp = 20, pres=0      
PWM _TEST: duty_ns=976562, period_ns=5000000, freq=200, per_scal=1, period_reg=3
enable power vcc-hdmi-33, ret=0                                                
drv_disp_init finish                                                            
boot_disp.output_disp=0                                                        
boot_disp.output_type=1                                                        
boot_disp.output_mode=4                                                        
fetch script data boot_disp.auto_hpd fail                                      
disp0 device type(1) enable                                                    
disp 0, clk: pll(560000000),clk(560000000),dclk(80000000) dsi_rate(560000000)  
    clk real:pll(556875000),clk(556875000),dclk(79553571) dsi_rate(0)          
enable power vcc-mipi, ret=0                                                    
enable power vcc-hsic-12, ret=0                                                
enable power vcc-lvds, ret=0                                                    
enable power vcc-pd, ret=0                                                      
[      3.178]end                                                                
workmode = 0,storage type = 2                                                  
[      3.183]MMC:        2                                                      
[mmc]: mmc driver ver 2015-06-03 13:50:00                                      
[      3.194]                                                                  
lcd_edp_tx_rate=2,                                                              
lcd_edp_tx_lane=1,                                                              
lcd_edp_colordepth=1,                                                          
lcd_model_name=2                                                                
[      3.204]ANX9807 Chip found                                                
[      3.310]..................................clock is detected.              
[      3.339]..................................clock is stable.                
sunxi_pwm_config: reg_shift = 0, reg_width = 4, prescale temp = 70, pres=0      
PWM _TEST: duty_ns=996094, period_ns=5000000, freq=200, per_scal=1, period_reg=7
sunxi_pwm_config: reg_shift = 0, reg_width = 4, prescale temp = 70, pres=0      
PWM _TEST: duty_ns=996094, period_ns=5000000, freq=200, per_scal=1, period_reg=7
[mmc]: get sdc_ex_dly_used 2, use auto tuning sdly                              
[mmc]: card2 io is 1.8V.                                                        
SUNXI SD/MMC: 2                                                                
[mmc]: start mmc_calibrate_delay_unit, don't access device...                  
[mmc]: delay chain cal done, sample: 200(ps)                                    
[mmc]: delay chain cal done, ds: 200(ps)                                        
[mmc]: media type 0x0                                                          
[mmc]: Wrong media type 0x0                                                    
[mmc]: ************Try SD card 2************                                    
[mmc]: mmc 2 cmd 8 timeout, err 100                                            
[mmc]: smc 2 err, cmd 8,  RTO                                                  
[mmc]: mmc 2 close bus gating and reset                                        
[mmc]: mmc 2 mmc cmd 8 err 0x00000100                                          
[mmc]: mmc send if cond failed                                                  
[mmc]: mmc 2 cmd 55 timeout, err 100                                            
[mmc]: smc 2 err, cmd 55,  RTO                                                  
[mmc]: mmc 2 close bus gating and reset                                        
[mmc]: mmc 2 mmc cmd 55 err 0x00000100                                          
[mmc]: send app cmd failed                                                      
[mmc]: ************Try MMC card 2************                                  
[mmc]: mmc don't support HS400                                                  
[mmc]: host caps: 0xef                                                          
[mmc]: MID 000088 PSN 0feb0460                                                  
[mmc]: PNM NCard  -- 0x4e-43-61-72-64                                          
[mmc]: PRV 4.3                                                                  
[mmc]: MDT m-8 y-2016                                                          
[mmc]: MMC v5.0                                                                
[mmc]: speed mode     : HSSDR52/SDR25                                          
[mmc]: clock          : 50000000 Hz                                            
[mmc]: bus_width      : 8 bit                                                  
[mmc]: user capacity  : 14800 MB                                                
[mmc]: boot capacity  : 4096 KB                                                
[mmc]: rpmb capacity  : 4096 KB                                                
[mmc]: ************SD/MMC 2 init OK!!!************                              
[mmc]: ========best spd md: 3-HS200/SDR104, freq: 5-200000000                  
[mmc]: erase_grp_size      : 0x400WrBlk*0x200=0x80000 Byte                      
[mmc]: secure_feature      : 0x55                                              
[mmc]: secure_removal_type : 0x9                                                
[mmc]: EOL Info(Rev blks): Normal                                              
[mmc]: Wear out(type A): 0%-10% life time used                                  
[mmc]: Wear out(type B): 0%-10% life time used                                  
[      4.128]sunxi flash init ok                                                
[mmc]: MMC Device 0 not found                                                  
** Bad device mmc 0 **                                                          
Using default environment                                                      
                                                                               
--------fastboot partitions--------                                            
mbr not exist                                                                  
base bootcmd=run mmcbootcmd                                                    
bootcmd set setargs_mmc                                                        
key 0                                                                          
recovery key high 12, low 10                                                    
fastboot key high 6, low 4                                                      
no misc partition is found                                                      
to be run cmd=run mmcbootcmd                                                    
update dtb dram start                                                          
update dtb dram  end                                                            
serial is: 8400503443181809058e                                                
check for ANX9807                                                              
found ANX9807 chip                                                              
Pine64 model: pine64-pinebook                                                  
PowerBus = 2(0: not exist 1:vBus 2:acBus 3:vBus&acBus)                          
pre charge mode                                                                
sunxi_bmp_charger_display                                                      
[mmc]: Has init                                                                
[      4.754]---drivers/mmc/mmc.c 2733 mmc_init                                
reading bat\battery_charge.bmp                                                  
89334 bytes read in 7 ms (12.2 MiB/s)                                          
bmp file buffer: 0x41000000, bmp_info.buffer: 47400000                          
fetch script data boot_disp.output_full fail                                    
screen_id =0, screen_width =1366, screen_height =768                            
frame buffer address 47400036                                                  
set next system normal                                                          
drv_disp_exit                                                                  
[mmc]: mmc exit start                                                          
[mmc]: start mmc_calibrate_delay_unit, don't access device...                  
[mmc]: delay chain cal done, sample: 185(ps)                                    
[mmc]: delay chain cal done, ds: 192(ps)                                        
[mmc]: mmc 2 exit ok                                                            
[      8.036]power off                                                          
set power off vol to default                                                    


At this point the hardware has successfully powered down , and if the Pinebook is plugged in charging begins !


Shy
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )


Messages In This Thread
RE: Pinebook Linux Power-Down Procedure - by MarkHaysHarris777 - 08-26-2017, 01:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  DietPi OS for Pinebook MichaIng 3 5,326 03-11-2024, 05:02 PM
Last Post: oxoocoffee
  Slarm64 on Pinebook [Slackware Arm - 64 bit] KRT 46 60,550 09-26-2023, 03:18 PM
Last Post: mara
  Broke pinebook GUI, what to do, fix or install new? acruhl 2 877 07-13-2023, 05:43 PM
Last Post: acruhl
  Orignal PineBook jwp1000 1 677 07-10-2023, 07:44 AM
Last Post: tophneal
  Pinebook no longer boots rjtanner 12 3,546 04-13-2023, 01:09 PM
Last Post: tophneal
  Stock Debian on original Pinebook moonwalkers 1 3,205 01-29-2022, 10:37 PM
Last Post: cel
  Write image to eMMC - Pinebook 11.6" irongarment 4 3,807 01-04-2022, 09:22 PM
Last Post: irongarment
  E: The repository 'http://pinebook.kde.org.uk bionic Release' no longer has a Release pixelpaperyarn 3 5,205 05-07-2021, 10:20 AM
Last Post: tophneal
  pinebook.kde.org.uk no longer has release file?? supermassive 1 3,789 01-20-2021, 11:18 AM
Last Post: tophneal
Question Ran apt update on my Pinebook.. ford442 0 2,788 12-25-2020, 04:40 PM
Last Post: ford442

Forum Jump:


Users browsing this thread: 1 Guest(s)