How to add a power button to your N2

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Tue Apr 07, 2020 10:14 pm

Hi,

unfortunately I just broke my serial cable (the special one which goes on the white connector).

I have another serial cable connected to the 40-pin header (pins 6,8,10) but I fail to move the console to ttyS1, despite:

Code: Select all

setenv condev "console=ttyS1,115200n8"
/dev/ttyS1 does not exists :(

As per your other question:

Image

Thanks for your support

User avatar
mad_ady
Posts: 8138
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 566 times
Been thanked: 399 times
Contact:

Re: How to add a power button to your N2

Post by mad_ady » Tue Apr 07, 2020 11:07 pm

You would need to recompile uboot to view the messages on the other serial port, so that's difficult.
But if desperate, you can force dupont wires in the serial jack. You just need gnd and tx (the board's tx).

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Tue Apr 07, 2020 11:21 pm

Great advice! Why did I not think about it myself?

So.
During boot, I got a glimpse of:

Code: Select all

pwr_key=ffffffff
And when shutting down after having pressed the button:

Code: Select all

[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped target Swap.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
         Starting Power-Off...
[  109.610064@0] systemd-journald[2016]: Failed to send stream file descriptor to service manager: Connection refused
[  109.615510@0] systemd-journald[2016]: Failed to send stream file descriptor to service manager: Transport endpoint is not connected
[  109.627266@2] systemd-journald[2016]: Failed to send stream file descriptor to service manager: Transport endpoint is not connected
[  110.433835@0] reboot: Power down
bl31 reboot reason: 0x108
bl31 reboot reason: 0x108
system cmd  0.
bl30 get wakeup sources!
process command 00000006
bl30 enter suspend!
Little core clk suspend rate 1896000000
Big core clk suspend rate 1800000000
store restore gp0 pll
suspend_counter: 1
Enter ddr suspend
ddr suspend time: 15us
alarm=0S
process command 00000001
GPIOA_11/13 off
cec ver:2018/04/19
CEC cfg:0x0000
WAKEUP GPIO cfg:0x000001df
use vddee new table!
kern log_addr:0x00
cec T: 00
cec_triggle_tx:TX_ERROR
Set cec log_addr:0x10,ADDR0:10
But there's more!!
Don't know why, until now I missed this boot console log after having pressed the powerbutton again:

Code: Select all

use vddee new table!
exit_reason:0x0d
Enter ddr resume
ddr resume time: 121us
store restore gp0 pll
cfg15 3b00000
cfg15 d3b00000
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;
Does it mean something sensible?
Please remember, I'm running headless.

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Wed Apr 08, 2020 9:31 am

@XFer,
Thank you for your test and sharing detailed result.

Can you share the specification and product name of your SD card?
It looks there is a problem of sd card re-initialization in this case.

This line means S922X keeps trying to find an available boot storage but it doesn't detect anything.

Code: Select all

G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;
To narrow the root cause, can you try another SD card or eMMC module if you have another one?

And I will look through old history related to the similar issue of sd card reboot.

(** updated **)
We have a Samsung EVO-plus sd card, so we will try to reproduce it using the card, too.
These users thanked the author joy for the post:
odroid (Wed Apr 08, 2020 9:38 am)

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Wed Apr 08, 2020 10:14 am

XFer wrote:
Tue Apr 07, 2020 11:21 pm
And when shutting down after having pressed the button:

Code: Select all

[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped target Swap.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
         Starting Power-Off...
[  109.610064@0] systemd-journald[2016]: Failed to send stream file descriptor to service manager: Connection refused
[  109.615510@0] systemd-journald[2016]: Failed to send stream file descriptor to service manager: Transport endpoint is not connected
[  109.627266@2] systemd-journald[2016]: Failed to send stream file descriptor to service manager: Transport endpoint is not connected
[  110.433835@0] reboot: Power down
bl31 reboot reason: 0x108
bl31 reboot reason: 0x108
system cmd  0.
bl30 get wakeup sources!
process command 00000006
bl30 enter suspend!
Little core clk suspend rate 1896000000
Big core clk suspend rate 1800000000
store restore gp0 pll
suspend_counter: 1
Enter ddr suspend
ddr suspend time: 15us
alarm=0S
process command 00000001
GPIOA_11/13 off
cec ver:2018/04/19
CEC cfg:0x0000
WAKEUP GPIO cfg:0x000001df
use vddee new table!
kern log_addr:0x00
cec T: 00
cec_triggle_tx:TX_ERROR
Set cec log_addr:0x10,ADDR0:10
But there's more!!
Don't know why, until now I missed this boot console log after having pressed the powerbutton again:

Code: Select all

use vddee new table!
exit_reason:0x0d
Enter ddr resume
ddr resume time: 121us
store restore gp0 pll
cfg15 3b00000
cfg15 d3b00000
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;
Does it mean something sensible?
Please remember, I'm running headless.
I don't think it's sensible.
I haven't seen the issue so far. :roll:
You mean you have the following line even though you didn't push gpio button, right?

Code: Select all

use vddee new table!
exit_reason:0x0d
Enter ddr resume
ddr resume time: 121us
store restore gp0 pll
cfg15 3b00000
cfg15 d3b00000

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Wed Apr 08, 2020 4:54 pm

joy wrote:
Wed Apr 08, 2020 9:31 am
Can you share the specification and product name of your SD card?
It is a Samsung Evo+ 64 GB.
Please note it's the slightly older "Evo+", not the latest "Evo Plus".

Unfortunately I don't have a spare microSD at the moment (I have a bunch of other Odroids boards doing stuff :D ); I may order another one if you think that's the problem.

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Wed Apr 08, 2020 4:57 pm

joy wrote:
Wed Apr 08, 2020 10:14 am
You mean you have the following line even though you didn't push gpio button, right?

Code: Select all

use vddee new table!
exit_reason:0x0d
Enter ddr resume
ddr resume time: 121us
store restore gp0 pll
cfg15 3b00000
cfg15 d3b00000
I *did* press the gpio button.

As I wrote, there are 2 distinct log in my message:

First log: shutdown via power button.

Second log: powerup via power button (stuck without really booting).

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Wed Apr 08, 2020 8:25 pm

So, I managed to source an old Sandisk Ultra 32Gb and cloned the image (filesystem was 8 GB anyway).

This time the boot advances a bit more, but still locks after awhile (this time with the blue LED stuck lit):

Code: Select all

use vddee new table!
exit_reason:0x0d
Enter ddr resume
ddr resume time: 122us
store restore gp0 pll
cfg15 3b00000
cfg15 d3b00000
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.
bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

no sdio debug board detected
L0:00000000
L1:00000703
L2:0000c067
L3:14000020
B2:00402000
B1:e0f83180

TE: 336642

BL2 Built : 06:17:13, Jun 28 2019. g12b gf0505d7-dirty - qi.duan@droid13

Board ID = 4
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 00056b35
DDR driver_vesion: LPDDR4_PHY_V_0_1_14 build time: Jun 28 2019 06:17:09
board id: 4
Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from SD, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from SD, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
fastboot data load
fastboot data verify
verify result: 255
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SD, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from SD, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

R0_RxClkDly_Margin==94 ps 8
R0_TxDqDly_Margi==118 ps 10


R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0

 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001
2D training succeed
auto size-- 65535DDR cs0 size: 1024MB
DDR cs1 size: 1024MB
DMC_DDR_CTRL: 0060001bDDR size: 2048MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
 pre test  bdlr_100_average==416 bdlr_100_min==416 bdlr_100_max==416 bdlr_100_cur==416
 aft test  bdlr_100_average==416 bdlr_100_min==416 bdlr_100_max==416 bdlr_100_cur==416
non-sec scramble use zero key
ddr scramble enabled

100bdlr_step_size ps== 407
result report
boot times 1Enable ddr reg access
Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from SD, src: 0x0003c200, des: 0x0172c000, size: 0x00094c00, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
E30HDR
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3375-8f9c8a7 2019-01-24 10:44:46 guotai.shen@droid11-sz]
OPS=0x40
ring efuse init
chipver efuse init
29 0a 40 00 01 0a 18 00 00 0c 30 32 54 52 4d 50
[3.676121 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):ab8811b
NOTICE:  BL31: Built : 15:03:31, Feb 12 2019
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01-g3b8b5cb (Feb 17 2020 - 08:16:24)

DRAM:  2 GiB
Relocation Offset is: 76ef3000
spi_post_bind(spifc): req_seq = 0
register usb cfg[0][1] = 0000000077f84ad0
MMC:   aml_priv->desc_buf = 0x0000000073ee37c0
aml_priv->desc_buf = 0x0000000073ee5b00
SDIO Port C: 0, SDIO Port B: 1
card in
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 40000000
aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x72000
[mmc_startup] mmc refix success
[mmc_init] mmc init success
emmc/sd read error, cmd18, status=0x1ff200f
retry read, count: 5
emmc/sd read error, cmd18, status=0x1f0a00f
retry read, count: 4
emmc/sd read error, cmd18, status=0x1ff200f
retry read, count: 3
emmc/sd read error, cmd18, status=0x1ff200f
retry read, count: 2
emmc/sd read error, cmd18, status=0x1ff200f
retry read, count: 1
emmc/sd read error, cmd18, status=0x1ff200f
retry read error !!!
Using default environment

In:    serial
Out:   serial
Err:   serial
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: driver version: v20190313
vpu: detect chip type: 9
vpu: clk_level default: 7(666667000Hz), max: 7(666667000Hz)
vpu: clk_level = 7
vpu: vpu_power_on
vpu: set_vpu_clk
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: set_vpu_clk finish
vpu: vpu_module_init_config
vpp: vpp_init
vpp: g12a/b osd1 matrix rgb2yuv ..............
vpp: g12a/b osd2 matrix rgb2yuv..............
vpp: g12a/b osd3 matrix rgb2yuv..............
cvbs: cpuid:0x29
cvbs_config_hdmipll_g12a
cvbs_set_vid2_clk
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
** Unable to read file boot-logo.bmp **
movi: not registered partition name, logo
movi - Read/write command from/to SD/MMC for ODROID board

Usage:
movi <read|write> <partition|sector> <offset> <address> [<length>]
    - <read|write>  the command to access the storage
    - <offset>  the offset from the start of given partiton in lba
    - <address>  the memory address to load/store from/to the storage device
    - [<length>]  the size of the block to read/write in bytes
    - all parameters must be hexa-decimal only

[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]set initrd_high: 0x3d800000
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=5760, height=2160
[OSD]wait_vsync_wakeup exit
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1312]
rx version is 1.4 or below  div=10
Net:   dwmac.ff3f0000
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0
## Attempting fetch boot.ini in mmc:0...
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
## Executing script at 04000000
Wrong image format for "source" command
## Attempting fetch boot.scr in mmc:0...
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
## Executing script at 04000000
Wrong image format for "source" command
## Attempting fetch boot.ini in mmc:1...
reading boot.ini
5092 bytes read in 4 ms (1.2 MiB/s)
## Executing script at 04000000
HDMI cable is NOT connected
reading Image.gz
emmc/sd response timeout, cmd16, status=0xa1ff2800
Invalid FAT entry
3137536 bytes read in 182 ms (16.4 MiB/s)
reading meson64_odroidn2.dtb
It boots fine if I unplug/replug the DC cord.

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Fri Apr 10, 2020 10:08 am

XFer wrote:
Wed Apr 08, 2020 4:57 pm
joy wrote:
Wed Apr 08, 2020 10:14 am
You mean you have the following line even though you didn't push gpio button, right?

Code: Select all

use vddee new table!
exit_reason:0x0d
Enter ddr resume
ddr resume time: 121us
store restore gp0 pll
cfg15 3b00000
cfg15 d3b00000
I *did* press the gpio button.

As I wrote, there are 2 distinct log in my message:

First log: shutdown via power button.

Second log: powerup via power button (stuck without really booting).
Thanks for your confirmation.
I misunderstood it booted automatically without a key press action
and I was worried that there might be other problems especially on your N2 board itself, but there seems to be not.
I think this issue may be related to sd card operation condition after wake-up.

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Fri Apr 10, 2020 10:21 am

XFer wrote:
Wed Apr 08, 2020 4:54 pm
joy wrote:
Wed Apr 08, 2020 9:31 am
Can you share the specification and product name of your SD card?
It is a Samsung Evo+ 64 GB.
Please note it's the slightly older "Evo+", not the latest "Evo Plus".

Unfortunately I don't have a spare microSD at the moment (I have a bunch of other Odroids boards doing stuff :D ); I may order another one if you think that's the problem.
Hi @XFer,
I see.
We will find the same one and check it here, too.
XFer wrote:
Wed Apr 08, 2020 8:25 pm
So, I managed to source an old Sandisk Ultra 32Gb and cloned the image (filesystem was 8 GB anyway).

This time the boot advances a bit more, but still locks after awhile (this time with the blue LED stuck lit):

Code: Select all

use vddee new table!
exit_reason:0x0d
Enter ddr resume
ddr resume time: 122us
store restore gp0 pll
cfg15 3b00000
cfg15 d3b00000
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.
bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

no sdio debug board detected
L0:00000000
L1:00000703
L2:0000c067
L3:14000020
B2:00402000
B1:e0f83180

TE: 336642

BL2 Built : 06:17:13, Jun 28 2019. g12b gf0505d7-dirty - qi.duan@droid13

Board ID = 4
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 00056b35
DDR driver_vesion: LPDDR4_PHY_V_0_1_14 build time: Jun 28 2019 06:17:09
board id: 4
Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from SD, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from SD, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
fastboot data load
fastboot data verify
verify result: 255
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SD, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from SD, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

R0_RxClkDly_Margin==94 ps 8
R0_TxDqDly_Margi==118 ps 10


R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0

 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001
2D training succeed
auto size-- 65535DDR cs0 size: 1024MB
DDR cs1 size: 1024MB
DMC_DDR_CTRL: 0060001bDDR size: 2048MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
 pre test  bdlr_100_average==416 bdlr_100_min==416 bdlr_100_max==416 bdlr_100_cur==416
 aft test  bdlr_100_average==416 bdlr_100_min==416 bdlr_100_max==416 bdlr_100_cur==416
non-sec scramble use zero key
ddr scramble enabled

100bdlr_step_size ps== 407
result report
boot times 1Enable ddr reg access
Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from SD, src: 0x0003c200, des: 0x0172c000, size: 0x00094c00, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
E30HDR
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3375-8f9c8a7 2019-01-24 10:44:46 guotai.shen@droid11-sz]
OPS=0x40
ring efuse init
chipver efuse init
29 0a 40 00 01 0a 18 00 00 0c 30 32 54 52 4d 50
[3.676121 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):ab8811b
NOTICE:  BL31: Built : 15:03:31, Feb 12 2019
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01-g3b8b5cb (Feb 17 2020 - 08:16:24)

DRAM:  2 GiB
Relocation Offset is: 76ef3000
spi_post_bind(spifc): req_seq = 0
register usb cfg[0][1] = 0000000077f84ad0
MMC:   aml_priv->desc_buf = 0x0000000073ee37c0
aml_priv->desc_buf = 0x0000000073ee5b00
SDIO Port C: 0, SDIO Port B: 1
card in
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 40000000
aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x72000
[mmc_startup] mmc refix success
[mmc_init] mmc init success
emmc/sd read error, cmd18, status=0x1ff200f
retry read, count: 5
emmc/sd read error, cmd18, status=0x1f0a00f
retry read, count: 4
emmc/sd read error, cmd18, status=0x1ff200f
retry read, count: 3
emmc/sd read error, cmd18, status=0x1ff200f
retry read, count: 2
emmc/sd read error, cmd18, status=0x1ff200f
retry read, count: 1
emmc/sd read error, cmd18, status=0x1ff200f
retry read error !!!
Using default environment

In:    serial
Out:   serial
Err:   serial
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: driver version: v20190313
vpu: detect chip type: 9
vpu: clk_level default: 7(666667000Hz), max: 7(666667000Hz)
vpu: clk_level = 7
vpu: vpu_power_on
vpu: set_vpu_clk
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: set_vpu_clk finish
vpu: vpu_module_init_config
vpp: vpp_init
vpp: g12a/b osd1 matrix rgb2yuv ..............
vpp: g12a/b osd2 matrix rgb2yuv..............
vpp: g12a/b osd3 matrix rgb2yuv..............
cvbs: cpuid:0x29
cvbs_config_hdmipll_g12a
cvbs_set_vid2_clk
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
** Unable to read file boot-logo.bmp **
movi: not registered partition name, logo
movi - Read/write command from/to SD/MMC for ODROID board

Usage:
movi <read|write> <partition|sector> <offset> <address> [<length>]
    - <read|write>  the command to access the storage
    - <offset>  the offset from the start of given partiton in lba
    - <address>  the memory address to load/store from/to the storage device
    - [<length>]  the size of the block to read/write in bytes
    - all parameters must be hexa-decimal only

[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]set initrd_high: 0x3d800000
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=5760, height=2160
[OSD]wait_vsync_wakeup exit
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1312]
rx version is 1.4 or below  div=10
Net:   dwmac.ff3f0000
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0
## Attempting fetch boot.ini in mmc:0...
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
## Executing script at 04000000
Wrong image format for "source" command
## Attempting fetch boot.scr in mmc:0...
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
## Executing script at 04000000
Wrong image format for "source" command
## Attempting fetch boot.ini in mmc:1...
reading boot.ini
5092 bytes read in 4 ms (1.2 MiB/s)
## Executing script at 04000000
HDMI cable is NOT connected
reading Image.gz
emmc/sd response timeout, cmd16, status=0xa1ff2800
Invalid FAT entry
3137536 bytes read in 182 ms (16.4 MiB/s)
reading meson64_odroidn2.dtb
It boots fine if I unplug/replug the DC cord.
Thanks a lot for your test. :)
With the Sandisk Ultra 32Gb, card detection after poweroff/wakeup works OK and N2 proceeds booting.
But data looks broken.

Code: Select all

emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
.....
.....
emmc/sd response timeout, cmd16, status=0xa1ff2800
Invalid FAT entry
I think when you try "fatls mmc 0" on uboot console using the card, you couldn't get any file list in the sd card.

Can you install the original N2 minimal image again on the Sandisk card and test it?
Not using clone image.

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Fri Apr 10, 2020 5:45 pm

joy wrote:
Fri Apr 10, 2020 10:21 am
Can you install the original N2 minimal image again on the Sandisk card and test it?
Not using clone image.
Will do ASAP and report back.
Thanks for your support.

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Fri Apr 10, 2020 6:56 pm

Retested with Ubuntu Minimal flashed on the Sandisk 32GB as is.
I only edited boot.ini to add the gpiopower setting.
It works, both powerup and shutdown!

Now I have a couple of questions :)

1. Why, with the apparently broken Samsung uSD, everything works well if I boot by unplugging/replugging the DC power cord (and not with the power button)?
2. Since this old Sandisk is quite slow, may I assume there's problem with Samsung cards, but Sandisks are a safe bet (so I can purchase the latest and greatest Sandisk 64GB A2)?

Thanks!

For completeness:


Powerbutton shutdown log:

Code: Select all

[  OK  ] Stopped target Local File Systems.
         Unmounting /media/boot...
[  OK  ] Unmounted /media/boot.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
         Starting Power-Off...
[  136.879597@0] reboot: Power down
bl31 reboot reason: 0x108
bl31 reboot reason: 0x108
system cmd  0.
bl30 get wakeup sources!
process command 00000006
bl30 enter suspend!
Little core clk suspend rate 1896000000
Big core clk suspend rate 1800000000
store restore gp0 pll
suspend_counter: 1
Enter ddr suspend
ddr suspend time: 16us
alarm=0S
process command 00000001
GPIOA_11/13 off
cec ver:2018/04/19
CEC cfg:0x003f
WAKEUP GPIO cfg:0x000001df
use vddee new table!
cec reset
Set cec pinmux:0x11
kern log_addr:0x00
cec T: 00
cec_triggle_tx:TX_ERROR
Set cec log_addr:0x10,ADDR0:10
customer pwrkeys for IR is NULL, use defaults!
Powerbutton powerup log (full, lengthy):

Code: Select all

bl30 get wakeup sources!
process command 00000006
bl30 enter suspend!
Little core clk suspend rate 1896000000
Big core clk suspend rate 1800000000
store restore gp0 pll
suspend_counter: 1
Enter ddr suspend
ddr suspend time: 16us
alarm=0S
process command 00000001
GPIOA_11/13 off
cec ver:2018/04/19
CEC cfg:0x003f
WAKEUP GPIO cfg:0x000001df
use vddee new table!
cec reset
Set cec pinmux:0x11
kern log_addr:0x00
cec T: 00
cec_triggle_tx:TX_ERROR
Set cec log_addr:0x10,ADDR0:10
customer pwrkeys for IR is NULL, use defaults!
use vddee new table!
exit_reason:0x0d
Enter ddr resume
ddr resume time: 123us
store restore gp0 pll
cfg15 3b00000
cfg15 d3b00000
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.
bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

no sdio debug board detected
L0:00000000
L1:00000703
L2:0000c067
L3:14000020
B2:00402000
B1:e0f83180

TE: 135350

BL2 Built : 06:17:13, Jun 28 2019. g12b gf0505d7-dirty - qi.duan@droid13

Board ID = 4
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 000258ea
DDR driver_vesion: LPDDR4_PHY_V_0_1_14 build time: Jun 28 2019 06:17:09
board id: 4
Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from SD, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from SD, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
fastboot data load
fastboot data verify
verify result: 255
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SD, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from SD, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

R0_RxClkDly_Margin==82 ps 7
R0_TxDqDly_Margi==118 ps 10


R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0

 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001
2D training succeed
auto size-- 65535DDR cs0 size: 1024MB
DDR cs1 size: 1024MB
DMC_DDR_CTRL: 0060001bDDR size: 2048MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
 pre test  bdlr_100_average==416 bdlr_100_min==416 bdlr_100_max==416 bdlr_100_cur==416
 aft test  bdlr_100_average==416 bdlr_100_min==416 bdlr_100_max==416 bdlr_100_cur==416
non-sec scramble use zero key
ddr scramble enabled

100bdlr_step_size ps== 407
result report
boot times 1Enable ddr reg access
Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from SD, src: 0x0003c200, des: 0x0172c000, size: 0x00094c00, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
E30HDR
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3375-8f9c8a7 2019-01-24 10:44:46 guotai.shen@droid11-sz]
OPS=0x40
ring efuse init
chipver efuse init
29 0a 40 00 01 0a 18 00 00 0c 30 32 54 52 4d 50
[3.475248 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):ab8811b
NOTICE:  BL31: Built : 15:03:31, Feb 12 2019
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01-g3b8b5cb (Feb 17 2020 - 08:16:24)

DRAM:  2 GiB
Relocation Offset is: 76ef3000
spi_post_bind(spifc): req_seq = 0
register usb cfg[0][1] = 0000000077f84ad0
MMC:   aml_priv->desc_buf = 0x0000000073ee37c0
aml_priv->desc_buf = 0x0000000073ee5b00
SDIO Port C: 0, SDIO Port B: 1
card in
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 40000000
aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x12000
[mmc_startup] mmc refix success
[mmc_init] mmc init success
In:    serial
Out:   serial
Err:   serial
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: driver version: v20190313
vpu: detect chip type: 9
vpu: clk_level default: 7(666667000Hz), max: 7(666667000Hz)
vpu: clk_level = 7
vpu: vpu_power_on
vpu: set_vpu_clk
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: set_vpu_clk finish
vpu: vpu_module_init_config
vpp: vpp_init
vpp: g12a/b osd1 matrix rgb2yuv ..............
vpp: g12a/b osd2 matrix rgb2yuv..............
vpp: g12a/b osd3 matrix rgb2yuv..............
cvbs: cpuid:0x29
cvbs_config_hdmipll_g12a
cvbs_set_vid2_clk
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
** Unable to read file boot-logo.bmp **
movi: not registered partition name, logo
movi - Read/write command from/to SD/MMC for ODROID board

Usage:
movi <read|write> <partition|sector> <offset> <address> [<length>]
    - <read|write>  the command to access the storage
    - <offset>  the offset from the start of given partiton in lba
    - <address>  the memory address to load/store from/to the storage device
    - [<length>]  the size of the block to read/write in bytes
    - all parameters must be hexa-decimal only

[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]set initrd_high: 0x3d800000
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=5760, height=2160
[OSD]wait_vsync_wakeup exit
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1312]
rx version is 1.4 or below  div=10
Net:   dwmac.ff3f0000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01000
reading logo.bmp.gz
** Unable to read file logo.bmp.gz **
reading logo.bmp
** Unable to read file logo.bmp **
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1312]
rx version is 1.4 or below  div=10
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0
reading boot.ini
4975 bytes read in 3 ms (1.6 MiB/s)
## Executing script at 01000000
HDMI cable is NOT connected
reading Image.gz
8991688 bytes read in 493 ms (17.4 MiB/s)
reading meson64_odroidn2.dtb
69748 bytes read in 8 ms (8.3 MiB/s)
reading uInitrd
9192496 bytes read in 501 ms (17.5 MiB/s)
Uncompressed size: 24234496 = 0x171CA00
## Loading init Ramdisk from Legacy Image at 03700000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    9192432 Bytes = 8.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   reserving fdt memory region: addr=1000000 size=12000
   Loading Ramdisk to 3cf3b000, end 3d7ff3f0 ... OK
   Loading Device Tree to 000000001ffeb000, end 000000001ffff073 ... OK

Starting kernel ...

uboot time: 7817014 us
pwr_key=ffffffff
[    0.000000@0] Booting Linux on physical CPU 0x0
[    0.000000@0] Linux version 4.9.213-67 (root@builder_n2) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) ) #1 SMP PREEMPT Thu Feb 13 14:59:00 -03 2020
[    0.000000@0] Boot CPU: AArch64 Processor [410fd034]
[    0.000000@0] Machine model: Hardkernel ODROID-N2
[    0.000000@0] efi: Getting EFI parameters from FDT:
[    0.000000@0] efi: UEFI not found.
[    0.000000@0] OF: reserved mem: __reserved_mem_alloc_size, start:0x0000000005000000, end:0x0000000005400000, len:4 MiB
[    0.000000@0] Reserved memory: created CMA memory pool at 0x0000000005000000, size 4 MiB
[    0.000000@0] OF: reserved mem: initialized node linux,secmon, compatible id shared-dma-pool
[    0.000000@0] Reserved memory: created DMA memory pool at 0x0000000078000000, size 0 MiB
[    0.000000@0] OF: reserved mem: initialized node linux,ppmgr, compatible id shared-dma-pool
[    0.000000@0] OF: reserved mem: __reserved_mem_alloc_size, start:0x000000007f800000, end:0x0000000080000000, len:8 MiB
[    0.000000@0] OF: reserved mem: failed to allocate memory for node linux,meson-fb, size:8 MB
[    0.000000@0] Reserved memory: created CMA memory pool at 0x0000000070000000, size 128 MiB
[    0.000000@0] OF: reserved mem: initialized node linux,ion-dev, compatible id shared-dma-pool
[    0.000000@0] Reserved memory: created CMA memory pool at 0x000000006d800000, size 40 MiB
[    0.000000@0] OF: reserved mem: initialized node linux,di_cma, compatible id shared-dma-pool
[    0.000000@0] Reserved memory: created CMA memory pool at 0x000000005a400000, size 308 MiB
[    0.000000@0] OF: reserved mem: initialized node linux,codec_mm_cma, compatible id shared-dma-pool
[    0.000000@0] OF: reserved mem: initialized node linux,codec_mm_reserved, compatible id amlogic, codec-mm-reserved
[    0.000000@0] OF: reserved mem: invalid size property in 'linux,galcore' node.
[    0.000000@0] cma: Reserved 8 MiB at 0x0000000059c00000
[    0.000000@0] psci: probing for conduit method from DT.
[    0.000000@0] psci: PSCIv1.0 detected in firmware.
[    0.000000@0] psci: Using standard PSCI v0.2 function IDs
[    0.000000@0] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000@0] psci: SMC Calling Convention v1.1
[    0.000000@0] percpu: Embedded 21 pages/cpu s47896 r8192 d29928 u86016
[    0.000000@0] Detected VIPT I-cache on CPU0
[    0.000000@0] CPU features: enabling workaround for ARM erratum 845719
[    0.000000@0] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 483840
[    0.000000@0] Kernel command line: root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw console=ttyS0,115200n8  no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=1080p60hz cvbsmode=576cvbs max_freq_a53=1896 max_freq_a73=1800 maxcpus=6 voutmode=hdmi  disablehpd=false cvbscable=0 overscan=100  monitor_onoff=false logo=osd0,loaded hdmitx=cec3f gpiopower=479
[    0.000000@0] vout: get hdmimode: 1080p60hz
[    0.000000@0] vout: get cvbsmode: 576cvbs
[    0.000000@0] [get_max_freq_a53] - max_freq : 1896000
[    0.000000@0] [get_max_freq_a73] - max_freq : 1800000
[    0.000000@0] hdmitx: voutmode : 1
[    0.000000@0] fb: osd0
[    0.000000@0] fb: loaded
[    0.000000@0] hdmitx: HDMI hdmi_cec_func_config:0x3f
[    0.000000@0] gpio-keypad: gpiopower_setup gpiopower : 479
[    0.000000@0] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000@0] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000@0] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000@0] Memory: 1396444K/1966080K available (11772K kernel code, 1714K rwdata, 5272K rodata, 4864K init, 1352K bss, 69924K reserved, 499712K cma-reserved)
[    0.000000@0] Virtual kernel memory layout:
[    0.000000@0]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000@0]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000@0]       .text : 0xffffff8009080000 - 0xffffff8009c00000   ( 11776 KB)
[    0.000000@0]     .rodata : 0xffffff8009c00000 - 0xffffff800a130000   (  5312 KB)
[    0.000000@0]       .init : 0xffffff800a130000 - 0xffffff800a5f0000   (  4864 KB)
[    0.000000@0]       .data : 0xffffff800a5f0000 - 0xffffff800a79ca00   (  1715 KB)
[    0.000000@0]        .bss : 0xffffff800a79ca00 - 0xffffff800a8eeb7c   (  1353 KB)
[    0.000000@0]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000@0]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000@0]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000@0]               0xffffffbf00000000 - 0xffffffbf01e00000   (    30 MB actual)
[    0.000000@0]     memory  : 0xffffffc000000000 - 0xffffffc078000000   (  1920 MB)
[    0.000000@0] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
[    0.000000@0] Preemptible hierarchical RCU implementation.
[    0.000000@0]        Build-time adjustment of leaf fanout to 64.
[    0.000000@0]        RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=6.
[    0.000000@0] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=6
[    0.000000@0] NR_IRQS:64 nr_irqs:64 0
[    0.000000@0] GPIO-INTC: support to detect double-edge trigger signal
[    0.000000@0] g12a_aoclkc_init: register ao clk ok!
[    0.000000@0] Meson chip version = RevA (29:A - 40:0)
[    0.000000@0] meson_g12a_sdemmc_init: register amlogic sdemmc clk
[    0.000000@0] meson_g12a_sdemmc_init: register amlogic sdemmc clk
[    0.000000@0] meson_g12a_gpu_init: register meson gpu clk
[    0.000000@0] meson_g12a_media_init: register meson media clk
[    0.000000@0] meson_g12a_misc_init: register amlogic g12a misc clks
[    0.000000@0] meson_g12a_misc_init: done.
[    0.000000@0] g12a_clkc_init initialization complete
[    0.000000@0] arm_arch_timer: Architected cp15 timer(s) running at 24.00MHz (phys).
[    0.000000@0] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000004@0] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000038@0] meson_bc_timer: mclk->mux_reg =ffffff800800c190,mclk->reg =ffffff800800e194
[    0.000612@0] Console: colour dummy device 80x25
[    0.000628@0] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.000637@0] pid_max: default: 32768 minimum: 301
[    0.000726@0] Security Framework initialized
[    0.000733@0] SELinux:  Initializing.
[    0.000796@0] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000804@0] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.001363@0] ftrace: allocating 38471 entries in 151 pages
[    0.067764@0] sched-energy: Sched-energy-costs installed from DT
[    0.067776@0] CPU0: update cpu_capacity 631
[    0.067787@0] ASID allocator initialised with 65536 entries
[    0.113976@0] secmon: clear_range:5100000 200000
[    0.114110@0] EFI services will not be available.
[    0.159968@1] Detected VIPT I-cache on CPU1
[    0.160016@1] CPU1: update cpu_capacity 631
[    0.160019@1] CPU1: Booted secondary processor [410fd034]
[    0.192493@2] Detected VIPT I-cache on CPU2
[    0.192534@2] CPU2: update cpu_capacity 920
[    0.192536@2] CPU2: Booted secondary processor [410fd092]
[    0.224046@3] Detected VIPT I-cache on CPU3
[    0.224068@3] CPU3: update cpu_capacity 920
[    0.224070@3] CPU3: Booted secondary processor [410fd092]
[    0.256104@4] Detected VIPT I-cache on CPU4
[    0.256126@4] CPU4: update cpu_capacity 920
[    0.256128@4] CPU4: Booted secondary processor [410fd092]
[    0.288175@5] Detected VIPT I-cache on CPU5
[    0.288196@5] CPU5: update cpu_capacity 920
[    0.288198@5] CPU5: Booted secondary processor [410fd092]
[    0.288279@0] Brought up 6 CPUs
[    0.288317@0] SMP: Total of 6 processors activated.
[    0.288326@0] CPU features: detected feature: 32-bit EL0 Support
[    0.288442@0] CPU: All CPU(s) started at EL2
[    0.288477@0] alternatives: patching kernel code
[    0.289894@0] devtmpfs: initialized
[    0.304256@0] DMI not present or invalid.
[    0.304524@0] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.304541@0] futex hash table entries: 2048 (order: 5, 131072 bytes)
[    0.304751@0] pinctrl core: initialized pinctrl subsystem
[    0.305509@0] NET: Registered protocol family 16
[    0.306907@0] schedtune: init normalization constants...
[    0.306919@0] schedtune: CLUSTER[0-1]      min_pwr:     0 max_pwr:    42
[    0.306925@0] schedtune: CPU[0]            min_pwr:     0 max_pwr:   279
[    0.306930@0] schedtune: CPU[1]            min_pwr:     0 max_pwr:   279
[    0.306935@0] schedtune: CLUSTER[2-5]      min_pwr:     0 max_pwr:    64
[    0.306941@0] schedtune: CPU[2]            min_pwr:     0 max_pwr:   759
[    0.306946@0] schedtune: CPU[3]            min_pwr:     0 max_pwr:   759
[    0.306951@0] schedtune: CPU[4]            min_pwr:     0 max_pwr:   759
[    0.306956@0] schedtune: CPU[5]            min_pwr:     0 max_pwr:   759
[    0.306961@0] schedtune: SYSTEM            min_pwr:     0 max_pwr:  3700
[    0.306967@0] schedtune: using normalization constants mul: 459677581 sh1: 1 sh2: 11
[    0.306970@0] schedtune: verify normalization constants...
[    0.306975@0] schedtune: max_pwr/2^0: 3700 => norm_pwr:  1024
[    0.306979@0] schedtune: max_pwr/2^1: 1850 => norm_pwr:   512
[    0.306984@0] schedtune: max_pwr/2^2:  925 => norm_pwr:   256
[    0.306988@0] schedtune: max_pwr/2^3:  462 => norm_pwr:   127
[    0.306992@0] schedtune: max_pwr/2^4:  231 => norm_pwr:    63
[    0.306996@0] schedtune: max_pwr/2^5:  115 => norm_pwr:    31
[    0.307000@0] schedtune: configured to support global boosting only
[    0.316113@0] cpuidle: using governor menu
[    0.316220@0] register canvas platform driver
[    0.316255@0] register rdma platform driver
[    0.316281@0] aml_vdac_init: module init
[    0.317576@0] vdso: 2 pages (1 code @ ffffff8009c07000, 1 data @ ffffff800a5f5000)
[    0.317593@0] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.319065@0] DMA: preallocated 2048 KiB pool for atomic allocations
[    0.319266@0] clkmsr: clkmsr: driver init
[    0.319272@0] codec_mm_module_init
[    0.319301@0] media_configs_system_init
[    0.320254@0] pstore: using zlib compression
[    0.320710@0] console [pstore-1] enabled
[    0.320716@0] pstore: Registered ramoops as persistent store backend
[    0.320723@0] ramoops: attached 0x100000@0x7400000, ecc: 0/0
[    0.322457@0] aml_iomap: amlogic iomap probe done
[    0.322834@0] vpu: driver version: v20190329(8-g12b)
[    0.322849@0] vpu: load vpu_clk: 666666667Hz(7)
[    0.323036@0] vpu: clktree_init
[    0.323098@0] vpu: vpu_probe OK
[    0.327994@0] clkmsr: msr_clk_reg0=ffffff800837e004,msr_clk_reg2=ffffff800845100c
[    0.328013@0] clkmsr ffd18004.meson_clk_msr: failed to get msr ring reg0
[    0.331952@0] aml_vdac_probe:probe start.cpu_id:6,name:meson-g12ab-vdac
[    0.332148@0] aml_vdac_probe: ok
[    0.332373@0] canvas_probe reg=00000000ff638000,size=2000
[    0.332397@0] canvas maped reg_base =ffffff8008454000
[    0.338770@0] rdma_probe,cpu_type:1, ver:0, len:8
[    0.339015@0] rdma_register, rdma_table_addr ffffff8008475000 rdma_table_addr_phy 59e00000 reg_buf ffffffc056e98000
[    0.339029@0] rdma_register success, handle 1 table_size 32768
[    0.339035@0] set_rdma_handle video rdma handle = 1.
[    0.340004@0] aml_snd_reg_map[0], reg:ff640000, size:2000
[    0.340025@0] aml_snd_reg_map[1], reg:ff642000, size:2000
[    0.340036@0] aml_snd_reg_map[2], reg:ff64a000, size:2000
[    0.340047@0] aml_snd_reg_map[3], reg:ff656000, size:1800
[    0.340064@0] aml_snd_reg_map[4], reg:ffd01000, size:1000
[    0.340069@0] amlogic auge_snd_iomap probe done
[    0.342283@0] codec_mm codec_mm: assigned reserved memory node linux,codec_mm_cma
[    0.342407@0] codec_mm codec_mm: assigned reserved memory node linux,codec_mm_cma
[    0.342415@0] codec_mm_probe ok
[    0.343911@0] cvbs_out: cvbsout_probe, cpu_id:5,name:meson-g12b-cvbsout
[    0.343933@0] cvbs_out: clk path:0
[    0.343941@0] cvbs_out: cvbs trimming.1.v5: 0xa0, 0x0
[    0.344082@0] vout: vout1: register server: cvbs_vout_server
[    0.344088@0] cvbs_out: register cvbs module server ok
[    0.344094@0] vout: vout2: register server: cvbs_vout2_server
[    0.344100@0] cvbs_out: register cvbs module vout2 server ok
[    0.344108@0] cvbs_out: chrdev devno 264241152 for disp
[    0.344381@0] cvbs_out: create cdev cvbs
[    0.344394@0] cvbs_out: cvbsout_probe OK
[    0.462023@2] SCSI subsystem initialized
[    0.462184@2] usbcore: registered new interface driver usbfs
[    0.462222@2] usbcore: registered new interface driver hub
[    0.462304@2] usbcore: registered new device driver usb
[    0.462373@2] media: Linux media interface: v0.10
[    0.462400@2] Linux video capture interface: v2.00
[    0.462438@2] pps_core: LinuxPPS API ver. 1 registered
[    0.462443@2] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.462460@2] PTP clock support registered
[    0.462529@2] dmi: Firmware registration failed.
[    0.462801@3] secmon: reserve_mem_size:0x300000
[    0.462874@3] secmon secmon: assigned reserved memory node linux,secmon
[    0.463063@3] secmon: get page:ffffffbf00140000, 5000
[    0.463070@3] secmon: share in base: 0xffffffc0050fe000, share out base: 0xffffffc0050ff000
[    0.463076@3] secmon: phy_in_base: 0x50fe000, phy_out_base: 0x50ff000
[    0.463606@3] hdmitx: system: amhdmitx_probe start
[    0.463612@3] hdmitx: system: Ver: 20181019
[    0.463638@3] hdmitx: system: hdmitx_device.chip_type : 11
[    0.463664@3] hdmitx: system: not find product desc
[    0.463669@3] hdmitx: system: not find match pwr-ctl
[    0.463698@3] hdmitx: system: not find drm_amhdmitx
[    0.463717@3] hdmitx: system: hpd irq = 41
[    0.463806@3] hdmitx: system: hdcp22_tx_skp failed to probe
[    0.463812@3] hdmitx: system: hdcp22_tx_esm failed to probe
[    0.464107@3] vout: vout1: register server: hdmitx_vout_server
[    0.464115@3] vout: vout2: register server: hdmitx_vout2_server
[    0.464456@3] hdmitx: hdmitx20: Mapped PHY: 0xffd00000
[    0.464472@3] hdmitx: hdmitx20: Mapped PHY: 0xff634400
[    0.464483@3] hdmitx: hdmitx20: Mapped PHY: 0xff900000
[    0.464500@3] hdmitx: hdmitx20: Mapped PHY: 0xff800000
[    0.464507@3] hdmitx: hdmitx20: Mapped PHY: 0xff63c000
[    0.464513@3] hdmitx: hdmitx20: Mapped PHY: 0xffd00000
[    0.464519@3] hdmitx: hdmitx20: Mapped PHY: 0xff608000
[    0.464524@3] hdmitx: hdmitx20: Mapped PHY: 0xff600000
[    0.464531@3] hdmitx: hdmitx20: Mapped PHY: 0xffe01000
[    0.464541@3] hdmitx: hw: alread display in uboot 0x10
[    0.464564@3] hdmitx: hw: avmute set to 1
[    0.464618@3] hdmitx: system: amhdmitx_probe end
[    0.465094@3] vout: create vout attribute OK
[    0.465201@3] vout: vout_fops_create OK
[    0.465208@3] vout: vout1: register server: nulldisp_vout_server
[    0.465228@3] hdmitx: hdmitx_set_current_vmode[3659]
[    0.465234@3] hdmitx: system: recalc before 1080p60hz 60 1
[    0.465240@3] hdmitx: system: recalc after 1080p60hz 2997 50
[    0.465245@3] hdmitx: alread display in uboot
[    0.465249@3] vout: init mode 1080p60hz set ok
[    0.465304@3] vout: aml_tvout_mode_monitor
[    0.465316@3] vout: aml_vout_probe OK
[    0.465450@3] chip type:0x29
[    0.465738@3] Advanced Linux Sound Architecture Driver Initialized.
[    0.466332@3] NetLabel: Initializing
[    0.466340@3] NetLabel:  domain hash size = 128
[    0.466345@3] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.466378@3] NetLabel:  unlabeled traffic allowed by default
[    0.467463@3] clocksource: Switched to clocksource arch_sys_counter
[    0.506953@3] VFS: Disk quotas dquot_6.6.0
[    0.507012@3] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.513076@5] dtv_dmd:[amldtvdemod..]aml_dtvdemod_init.
[    0.513424@5] NET: Registered protocol family 2
[    0.513809@5] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.513903@5] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.514002@5] TCP: Hash tables configured (established 16384 bind 16384)
[    0.514052@5] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    0.514074@5] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    0.514187@5] NET: Registered protocol family 1
[    0.515724@2] Unpacking initramfs...
[    0.847988@3] Freeing initrd memory: 8976K
[    0.851022@3] hw perfevents: clusterb_enabled = 1
[    0.851033@3] hw perfevents: cpumasks 0x3, 0x3c
[    0.851058@3] hw perfevents: cluster A irq = 18
[    0.851084@3] hw perfevents: cluster B irq = 19
[    0.851135@3] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    0.852689@3] audit: initializing netlink subsys (disabled)
[    0.852733@3] audit: type=2000 audit(0.804:1): initialized
[    0.853250@3] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.858710@3] Registering sdcardfs 0.1
[    0.861893@2] NET: Registered protocol family 38
[    0.861906@2] Key type asymmetric registered
[    0.861913@2] Asymmetric key parser 'x509' registered
[    0.862040@2] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[    0.862048@2] io scheduler noop registered (default)
[    0.862054@2] io scheduler deadline registered
[    0.862148@2] io scheduler cfq registered
[    0.862445@2] pwm-gpio pwmgpio: 1 gpio pwms loaded
[    0.863042@2] meson-pwm ff802000.pwm: pwm pinmux : can't get pinctrl
[    0.863243@2] meson-pwm ffd1b000.pwm: pwm pinmux : can't get pinctrl
[    0.863798@3] random: fast init done
[    0.863829@3] random: crng init done
[    0.863993@2] gpiomem-aml ff634000.gpiomem: Initialised: Registers at 0xff634000
[    0.864061@2] [drm] Initialized
[    0.864112@2] mali ffe40000.bifrost: Continuing without Mali regulator control
[    0.864165@2] mali ffe40000.bifrost: max pp is 2
[    0.864173@2] mali ffe40000.bifrost: set min pp to default 1
[    0.864179@2] mali ffe40000.bifrost: min pp is 1
[    0.864185@2] mali ffe40000.bifrost: min clk  is 4
[    0.864199@2] mali ffe40000.bifrost: hiu io source  0xffffff80084d9000
[    0.864208@2] mali ffe40000.bifrost: hiu io source  0xffffff80084db000
[    0.864215@2] mali ffe40000.bifrost: num of pp used most of time 1
[    0.864221@2] mali ffe40000.bifrost: clock dvfs cfg table size is 6
[    0.864243@2] mali ffe40000.bifrost: max clk set 4
[    0.864248@2] mali ffe40000.bifrost: max clk  is 4
[    0.864254@2] mali ffe40000.bifrost: turbo clk set to 5
[    0.864260@2] mali ffe40000.bifrost: turbo clk  is 5
[    0.864266@2] mali ffe40000.bifrost: default clk set to 4
[    0.864272@2] mali ffe40000.bifrost: default clk  is 4
[    0.864281@2] mali ffe40000.bifrost: ====================0====================
[    0.864281@2] clk_freq= 285714285, clk_parent=fclk_div7, voltage=1150, keep_count=5, threshod=<100 190>, clk_sample=285
[    0.864291@2] mali ffe40000.bifrost: ====================1====================
[    0.864291@2] clk_freq= 400000000, clk_parent=fclk_div5, voltage=1150, keep_count=5, threshod=<152 207>, clk_sample=400
[    0.864301@2] mali ffe40000.bifrost: ====================2====================
[    0.864301@2] clk_freq= 500000000, clk_parent=fclk_div4, voltage=1150, keep_count=5, threshod=<180 220>, clk_sample=500
[    0.864311@2] mali ffe40000.bifrost: ====================3====================
[    0.864311@2] clk_freq= 666666666, clk_parent=fclk_div3, voltage=1150, keep_count=5, threshod=<210 236>, clk_sample=666
[    0.864321@2] mali ffe40000.bifrost: ====================4====================
[    0.864321@2] clk_freq= 800000000, clk_parent=fclk_div2p5, voltage=1150, keep_count=5, threshod=<230 255>, clk_sample=800
[    0.864330@2] mali ffe40000.bifrost: ====================5====================
[    0.864330@2] clk_freq= 800000000, clk_parent=fclk_div2p5, voltage=1150, keep_count=5, threshod=<230 255>, clk_sample=800
[    0.864337@2] mali ffe40000.bifrost: clock dvfs table size is 6
[    0.864412@2] mali_plat=ffffff800a67d6d8
[    0.864500@2] meson_gcooldev is null, no set min status
[    0.864506@2] gpu cooling register okay with err=0
[    0.864556@2] meson_gcooldev is null, no set min status
[    0.864561@2] gpu core cooling register okay with err=0
[    0.864584@2] shader_present=3, tiler_present=1, l2_present=1
[    0.864672@2] Mali_pwr_on:gpu_irq : 200
[    0.864872@2] mali ffe40000.bifrost: GPU identified as 0x2 arch 7.2.1 r0p0 status 0
[    0.865182@2] mali ffe40000.bifrost: Using coherency mode 0 set from dtb
[    0.865862@2] mali ffe40000.bifrost: Probed as mali0
[    0.866094@2] Unable to detect cache hierarchy for CPU 0
[    0.869266@2] loop: module loaded
[    0.869541@2] mtdoops: mtd device (mtddev=name/number) must be supplied
[    0.869839@2] libphy: Fixed MDIO Bus: probed
[    0.870373@2]  REG0:Addr = ffffff80084f1540
[    0.870386@2] Not set  cali_val for REG1
[    0.870642@2] meson6-dwmac ff3f0000.ethernet: no reset control found
[    0.870649@2] stmmac - user ID: 0x11, Synopsys ID: 0x37
[    0.870654@2]  Ring mode enabled
[    0.870659@2]  DMA HW capability register supported
[    0.870664@2]  Normal descriptors
[    0.870669@2]  RX Checksum Offload Engine supported
[    0.870674@2]        COE Type 2
[    0.870678@2]  TX Checksum insertion supported
[    0.870682@2]  Wake-Up On Lan supported
[    0.870711@2] eth%d: device MAC address 00:1e:06:42:27:53
[    0.870715@2]  Enable RX Mitigation via HW Watchdog Timer
[    0.876496@2] libphy: stmmac: probed
[    0.876509@2] eth%d: PHY ID 001cc916 at 0 IRQ POLL (stmmac-0:00) active
[    0.876516@2] eth%d: PHY ID 001cc916 at 7 IRQ POLL (stmmac-0:07)
[    0.877524@2] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.877532@2] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.877831@2] usbcore: registered new interface driver cdc_acm
[    0.877837@2] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    0.877868@2] usbcore: registered new interface driver uas
[    0.877905@2] usbcore: registered new interface driver usb-storage
[    0.877967@2] usbcore: registered new interface driver usbserial
[    0.877995@2] usbcore: registered new interface driver usbserial_generic
[    0.878019@2] usbserial: USB Serial support registered for generic
[    0.878252@2] mousedev: PS/2 mouse device common for all mice
[    0.878427@2] i2c /dev entries driver
[    0.878495@2] IR IRMP decoder handler initialized
[    0.880172@2] lirc_helper: wakeupkey 0xffffffff, protocol 0x1
[    0.881285@2] ledtrig-cpu: registered to indicate activity on CPUs
[    0.881521@2] hidraw: raw HID events driver (C) Jiri Kosina
[    0.881698@2] usbcore: registered new interface driver usbhid
[    0.881704@2] usbhid: USB HID core driver
[    0.882051@2] value of voltage_tolerance 0
[    0.882588@2] dvfs [meson_cpufreq_init] - cluster 0 freq 1992000
[    0.882602@2] cpu cpu0: meson_cpufreq_init: CPU 0 initialized
[    0.883421@2] value of voltage_tolerance 0
[    0.884037@2] dvfs [meson_cpufreq_init] - cluster 1 freq 1908000
[    0.884043@2] dvfs [meson_cpufreq_init] - cluster 1 freq 2004000
[    0.884067@2] cpu cpu2: meson_cpufreq_init: CPU 2 initialized
[    0.884087@2] cpufreq: cpufreq_online: CPU2: Running at unlisted freq: 999999 KHz
[    0.885929@2] cpufreq: cpufreq_online: CPU2: Unlisted initial frequency changed to: 1000000 KHz
[    0.887670@2] ff803000.serial: clock gate not found
[    0.887694@2] meson_uart ff803000.serial: ==uart0 reg addr = ffffff80084f7000
[    0.887716@2] ff803000.serial: ttyS0 at MMIO 0xff803000 (irq = 33, base_baud = 1500000) is a meson_uart
[    0.887726@2] meson_uart ff803000.serial: ttyS0 use xtal(24M) 24000000 change 0 to 115200
[    2.981096@2] console [ttyS0] enabled
[    2.985246@2] amlogic-new-usb2-v2 ffe09000.usb2phy: USB2 phy probe:phy_mem:0xffe09000, iomap phy_base:0xffffff80084f9000
[    2.995726@2] amlogic-new-usb3-v2 ffe09080.usb3phy: USB3 phy probe:phy_mem:0xffe09080, iomap phy_base:0xffffff80084fd080
[    3.007333@2] gpio-keypad ff800000.gpio_keypad: power key(116) registed.
[    3.013138@2] input: gpio_keypad as /devices/platform/ff800000.gpio_keypad/input/input0
[    3.021276@2] efusekeynum: 1
[    3.023918@2] efusekeyname:            uuid  offset:     0   size:    32
[    3.030391@2] efuse efuse: probe OK!
[    3.034589@2] ion_dev soc:ion_dev: assigned reserved memory node linux,ion-dev
[    3.041271@2] ge2d: ge2d_init_module
[    3.044704@2] ge2d: ge2d_dev major:236
[    3.048445@2] ge2d: clock source clk_ge2d_gate ffffffc056bff7c0
[    3.054255@2] ge2d: clock clk_ge2d source ffffffc05698a040
[    3.059705@2] ge2d: clock source clk_vapb_0 ffffffc05698a0c0
[    3.065333@2] ge2d: ge2d init clock is 500000000 HZ, VPU clock is 666666656 HZ
[    3.072578@2] ge2d: ge2d clock is 499 MHZ
[    3.076514@2] ge2d: find address resource
[    3.080500@2] ge2d: map io source 0x00000000ff940000,size=65536 to 0xffffff8008690000
[    3.088296@2] ge2d: reserved mem init failed
[    3.092542@2] ge2d: ge2d: pdev=ffffffc056e04800, irq=45, clk=ffffffc056bff7c0
[    3.099671@2] ge2d: ge2d start monitor
[    3.103401@3] ge2d: ge2d workqueue monitor start
[    3.103606@2] amvideom vsync irq: 46
[    3.103915@2] amvideocap_probe,amvideocap
[    3.103916@2] use cma buf.
[    3.104000@2] fb: osd_init_module
[    3.104135@2] fb: viu vsync irq: 46
[    3.104140@2] fb: viu2 vsync irq: 55
[    3.104183@2] 0x000000d8:Y=d8,U=0,V=0
[    3.104184@2] 0x000000d9:Y=d9,U=0,V=0
[    3.104185@2] 0x000000da:Y=da,U=0,V=0
[    3.104185@2] 0x000000db:Y=db,U=0,V=0
[    3.108054@2] fb: osd_rdma_init: rdma_table p=0x59e08000,op=0x59e08000 , v=0xffffff8008631000
[    3.108067@2] rdma_register, rdma_table_addr ffffff8008633000 rdma_table_addr_phy 59e09000 reg_buf ffffffc056f8c000
[    3.108069@2] rdma_register success, handle 2 table_size 4096
[    3.108070@2] fb: osd_rdma_init:osd rdma handle = 2.
[    3.108076@2] fb: mem_size: 0x800000
[    3.108076@2] fb: mem_size: 0x4b80000
[    3.108077@2] fb: mem_size: 0x100000
[    3.108077@2] fb: mem_size: 0x100000
[    3.108078@2] fb: mem_size: 0x800000
[    3.108106@2] fb: failed to init reserved memory
[    3.108112@2] fb: fb def : 1920 1080 1920 2160 32
[    3.108112@2] fb: init fbdev bpp is:32
[    3.203485@4] fb: malloc_osd_memory, cma:ffffff800a857ad0
[    3.203488@4] fb: malloc_osd_memory, 1288, base:0x0000000059c00000, size:8388608
[    3.203505@4] fb: use ion buffer for fb memory, fb_index=0
[    3.229172@4] meson-fb meson-fb: create ion_client ffffffc056ff00c0, handle=ffffffc056fcd880
[    3.229176@4] meson-fb meson-fb: ion memory(0): created fb at 0x0000000070000000, size 75 MiB
[    3.229178@4] fb: Frame buffer memory assigned at
[    3.229179@4] fb:  0, phy: 0x0000000070000000, vir:0xffffff800a8f4000, size=77312K
[    3.229179@4]
[    3.229181@4] fb: logo_index=0,fb_index=0
[    3.229182@4] fb: ---------------clear fb0 memory ffffff800a8f4000
[    3.247249@4] fb: osd[0] canvas.idx =0x40
[    3.247250@4] fb: osd[0] canvas.addr=0x70000000
[    3.247251@4] fb: osd[0] canvas.width=7680
[    3.247251@4] fb: osd[0] canvas.height=1080
[    3.247252@4] fb: osd[0] frame.width=1920
[    3.247253@4] fb: osd[0] frame.height=1080
[    3.247254@4] fb: osd[0] out_addr_id =0x1
[    3.296452@0] Console: switching to colour frame buffer device 240x67
[    3.414602@2] fb: osd[0] enable: 1 (swapper/0)
[    3.431683@2] fb: set osd0 reverse as NONE
[    3.447990@0] fb: osd probe OK
[    3.448240@0] hdmitx: hdcp: hdmitx_hdcp_init
[    3.449997@2] vout: vout2: create vout2 attribute OK
[    3.454727@0] vout: vout2: vout2_fops_create OK
[    3.459121@0] vout: vout2: register server: nulldisp_vout2_server
[    3.465232@0] vout: vout2: init mode null set ok
[    3.469892@2] vout: vout2: clktree_init
[    3.473625@2] vout: vout2: aml_vout2_probe OK
[    3.477967@2] DI: di_module_init ok.
[    3.481461@2] DI: di_module_init: major 509
[    3.485795@2] deinterlace deinterlace: assigned reserved memory node linux,di_cma
[    3.493078@2] DI: CMA size 0x2800000.
[    3.496729@2] pre_irq:70
[    3.499224@2] post_irq:71
[    3.501831@2] DI: di_probe allocate rdma channel 0.
[    3.506683@2] di_get_vpu_clkb: get clk vpu error.
[    3.511362@2] DI: vpu clkb <334000000, 667000000>
[    3.516059@2] DI:enable vpu clkb.
[    3.519332@2] 0x000000dc:Y=dc,U=0,V=0
[    3.522974@2] 0x000000dd:Y=dd,U=0,V=0
[    3.526614@2] 0x000000de:Y=de,U=0,V=0
[    3.530253@2] 0x000000df:Y=df,U=0,V=0
[    3.533894@2] 0x000000e0:Y=e0,U=0,V=0
[    3.537532@2] 0x000000e1:Y=e1,U=0,V=0
[    3.541171@2] 0x000000e2:Y=e2,U=0,V=0
[    3.544811@2] 0x000000e3:Y=e3,U=0,V=0
[    3.548451@2] 0x000000f0:Y=f0,U=0,V=0
[    3.552092@2] 0x000000f1:Y=f1,U=0,V=0
[    3.555733@2] 0x000000f2:Y=f2,U=0,V=0
[    3.559368@2] 0x000000f3:Y=f3,U=0,V=0
[    3.563011@2] 0x000000f4:Y=f4,U=0,V=0
[    3.566651@2] 0x000000f5:Y=f5,U=0,V=0
[    3.570292@2] 0x000000f6:Y=f6,U=0,V=0
[    3.573931@2] 0x000000f7:Y=f7,U=0,V=0
[    3.577573@2] 0x000000f8:Y=f8,U=0,V=0
[    3.581212@2] 0x000000f9:Y=f9,U=0,V=0
[    3.584851@2] 0x000000fa:Y=fa,U=0,V=0
[    3.588491@2] 0x000000fb:Y=fb,U=0,V=0
[    3.592130@2] 0x000000fc:Y=fc,U=0,V=0
[    3.595771@2] 0x000000fd:Y=fd,U=0,V=0
[    3.599409@2] 0x000000fe:Y=fe,U=0,V=0
[    3.603051@2] 0x000000ff:Y=ff,U=0,V=0
[    3.606691@2] 0x0000003a:Y=3a,U=0,V=0
[    3.610332@2] DI: support multi decoding 254~255~58.
[    3.615350@2] DI: di_probe:Di use HRTIMER
[    3.619322@2] di_probe:ok
[    3.621893@2] vdin_drv_init: major 508
[    3.625670@2] vdin_drv_init: vdin driver init done
[    3.630356@2] [viuin..]viuin_init_module viuin module init
[    3.635921@2] [viuin..]viuin_probe probe ok.
[    3.640245@2] [RX]-hdmirx: hdmirx_init.
[    3.643874@2] ESM HLD: Initializing...
[    3.647656@2] tvin_afe: tvafe_drv_init: major 506
[    3.652397@2] tvin_afe: tvafe_drv_init.
[    3.656161@2] tvafe_vbi: vbi: vbi_init.
[    3.659974@2] amlvid:info: amlvideo_init called[    3.664240@2] amlvid:info: amlvideo_create_instance called
[    3.669704@2] amlvid:info: v4l2_dev.name=:amlvideo-000
[    3.674871@2] amlvideo-000: V4L2 device registered as video10
[    3.680540@2] amlvid:info: amlvideo_create_instance called
[    3.685999@2] amlvid:info: v4l2_dev.name=:amlvideo-001
[    3.691156@2] amlvideo-001: V4L2 device registered as video23
[    3.696890@2] PPMGRDRV: warn: ppmgr module init func called
[    3.702420@2] PPMGRDRV: err: ppmgr_driver_probe called
[    3.707528@2] Reserved memory: failed to init DMA memory pool at 0x0000000078000000, size 0 MiB
[    3.716158@2] PPMGRDRV: info: ppmgr_dev major:504
[    3.721085@2] ionvideo-000: V4L2 device registered as video13
[    3.726611@2] ionvideo-001: V4L2 device registered as video14
[    3.732327@2] ionvideo-002: V4L2 device registered as video15
[    3.738042@2] ionvideo-003: V4L2 device registered as video16
[    3.743764@2] ionvideo-004: V4L2 device registered as video17
[    3.749493@2] ionvideo-005: V4L2 device registered as video18
[    3.755201@2] ionvideo-006: V4L2 device registered as video19
[    3.760924@2] ionvideo-007: V4L2 device registered as video20
[    3.766642@2] ionvideo-008: V4L2 device registered as video21
[    3.772314@2] ionvid: info: Video Technology Magazine Ion Video
[    3.778211@2] ionvid: info: Capture Board ver 1.0 successfully loaded
[    3.784766@2] videosync_create_instance dev_s ffffffc054b55000,dev_s->dev ffffffc054b4a600
[    3.792858@2] videosync_create_instance reg videosync.0
[    3.798087@2] aml_vecm_init:module init
[    3.798089@3] videosync_thread started
[    3.805666@2]
[    3.805666@2]  VECM probe start
[    3.810481@2] Can't find  wb_sel.
[    3.813655@2] hdr:Can't find  cfg_en_osd_100.
[    3.817989@2] Can't find  tx_op_color_primary.
[    3.822411@2] amlogic, vecm[    3.825006@2] vlock dt support: 1
[    3.828302@2] vlock dt new_fsm: 0
[    3.831592@2] vlock dt hwver: 0
[    3.834708@2] vlock dt phlock_en: 0
[    3.838182@2] Can't find  vlock_en.
[    3.841645@2] Can't find  vlock_mode.
[    3.845285@2] Can't find  vlock_pll_m_limit.
[    3.849535@2] Can't find  vlock_line_limit.
[    3.853708@2] param_config vlock_en:1
[    3.857340@2] vlock_status_init vlock_en:0
[    3.861405@2] aml_vecm_probe: ok
[    3.864683@2] reg base = ffffff800863b000
[    3.869004@2] meson-mmc: mmc driver version: 3.02, 2017-05-15: New Emmc Host Controller
[    3.877079@2] meson-mmc: >>>>>>>>hostbase ffffff8008687000, dmode
[    3.882889@2] meson-mmc: actual_clock :400000, HHI_nand: 0x80
[    3.888453@2] meson-mmc: [meson_mmc_clk_set_rate_v3] after clock: 0x1000033c
[    3.935471@2] meson-mmc: meson_mmc_probe() : success!
[    3.940596@3] meson-mmc: >>>>>>>>hostbase ffffff80086a1000, dmode
[    3.941145@3] meson-mmc: gpio_cd = 1ca
[    3.947980@0] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    3.951443@0] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    3.958209@3] meson-mmc: meson_mmc_irq_thread_v3 600 emmc: cmd:1
[    3.964191@3] meson-mmc: meson_mmc_irq_thread_v3() 616: set 1st retry!
[    3.970694@3] meson-mmc: retry cmd 1 the 3-th time(s)
[    3.976700@0] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    3.982294@0] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    3.989061@3] meson-mmc: meson_mmc_irq_thread_v3 600 emmc: cmd:1
[    3.989101@0] meson-mmc: meson_mmc_probe() : success!
[    3.990299@0] amlogic mtd driver init
[    3.990943@0] cectx ff80023c.aocec: cec driver date:Ver 2019/3/25
[    3.990943@0]
[    4.011419@3] meson-mmc: retry cmd 1 the 2-th time(s)
[    4.011525@4] cectx ff80023c.aocec: compatible:amlogic, aocec-g12a
[    4.011527@4] cectx ff80023c.aocec: cecb_ver:0x1
[    4.011528@4] cectx ff80023c.aocec: line_reg:0x1
[    4.011529@4] cectx ff80023c.aocec: line_bit:0x3
[    4.011531@4] cectx ff80023c.aocec: ee_to_ao:0x1
[    4.011600@4] input: cec_input as /devices/virtual/input/input1
[    4.011655@4] cectx ff80023c.aocec: not find 'port_num'
[    4.011657@4] cectx ff80023c.aocec: using cec:1
[    4.011670@4] cectx ff80023c.aocec: no hdmirx regs
[    4.011672@4] cectx ff80023c.aocec: no hhi regs
[    4.011676@4] cectx ff80023c.aocec: not find 'output'
[    4.013113@4] cectx ff80023c.aocec: irq cnt:2
[    4.013243@5] cectx ff80023c.aocec: wakeup_reason:0xd
[    4.013286@5] cectx ff80023c.aocec: cev val1: 0x0;val2: 0x0
[    4.013288@5] cectx ff80023c.aocec: aml_cec_probe success end
[    4.013455@5] unifykey: storage in base: 0xffffffc005000000
[    4.013456@5] unifykey: storage out base: 0xffffffc005040000
[    4.013457@5] unifykey: storage block base: 0xffffffc005080000
[    4.013458@5] unifykey: probe done!
[    4.013612@5] unifykey: aml_unifykeys_init done!
[    4.013639@5] meson ts init
[    4.013665@5] tsensor id: 0
[    4.013728@5] tsensor trim info: 0xfa00800c!
[    4.013730@5] tsensor hireboot: 0xc0ff2a80
[    4.013758@5] meson ts init
[    4.013767@5] tsensor id: 1
[    4.013805@5] tsensor trim info: 0xfa008009!
[    4.013806@5] tsensor hireboot: 0xc0ff2a80
[    4.013868@5] audio_dsp: [dsp]register dsp to char divece(257)
[    4.013958@4] amaudio: amaudio: driver amaudio init!
[    4.014101@4] amaudio: amaudio_init - amaudio: driver amaudio succuess!
[    4.014283@4] sysled: module init
[    4.014382@4] meson_wdt ffd0f0d0.watchdog: start watchdog
[    4.014384@4] meson_wdt ffd0f0d0.watchdog: creat work queue for watch dog
[    4.014501@5] meson_wdt ffd0f0d0.watchdog: AML Watchdog Timer probed done
[    4.014825@4] meson-saradc ff809000.saradc: set delay per tick to <1ms> by default.
[    4.014827@4] meson-saradc ff809000.saradc: set ticks per period to <1> by default.
[    4.015262@5] dmc_monitor_probe
[    4.015556@5] defendkey ff630218.defendkey: Reserved memory is not enough!
[    4.015561@5] defendkey: probe of ff630218.defendkey failed with error -22
[    4.015837@2] usbcore: registered new interface driver snd-usb-audio
[    4.016344@2] aml_codec_T9015 ff632000.t9015: aml_T9015_audio_codec_probe
[    4.016393@2] T9015 acodec used by auge, tdmout:2
[    4.016990@2] Error: Driver 'spdif-dit' is already registered, aborting...
[    4.017173@2] asoc debug: aml_audio_controller_probe-116
[    4.017854@2] asoc-aml-card auge_sound: aml_card_probe, parse error -517
[    4.017855@2] aml_card_probe error ret:-517
[    4.017994@2] aml_tdm_platform_probe, tdm ID = 2, lane_cnt = 4
[    4.018002@2] TDM id 2 i2s2hdmi:0
[    4.018006@2] snd_tdm ff642000.audiobus:tdmc: lane_mask_out = 1, lane_oe_mask_out = 0
[    4.018142@2] snd_tdm ff642000.audiobus:tdmc: aml_tdm_get_pins error!
[    4.018143@2] No channel mask node Channel_Mask
[    4.018623@2] hdmitx: audio: aout notify format CT_PCM
[    4.018630@2] aml_spdif_platform_probe, register soc platform
[    4.018693@2] aml_spdif_platform_probe, register soc platform
[    4.018958@2] audio_ddr_mngr: 0, irqs toddr 34, frddr 37
[    4.018959@2] audio_ddr_mngr: 1, irqs toddr 35, frddr 38
[    4.018960@2] audio_ddr_mngr: 2, irqs toddr 36, frddr 39
[    4.019067@2] audiolocker_platform_probe
[    4.019703@2] Register vad
[    4.019817@2] Netfilter messages via NETLINK v0.30.
[    4.019881@2] Initializing XFRM netlink socket
[    4.019888@2] NET: Registered protocol family 17
[    4.019904@2] Key type dns_resolver registered
[    4.020377@2] Registered swp emulation handler
[    4.022594@2] Registered cp15_barrier emulation handler
[    4.022601@2] Registered setend emulation handler
[    4.022850@5] registered taskstats version 1
[    4.191518@0] meson-mmc: card IN
[    4.191520@0] meson-mmc: normal card in
[    4.231515@5] aml_dai_spdif_probe
[    4.231520@5] aml_dai_spdif_probe
[    4.233766@5] asoc-aml-card auge_sound: dit-hifi <-> SPDIF-B mapping ok
[    4.233790@5] master_mode(1), binv(1), finv(1) out_skew(2), in_skew(3)
[    4.234032@5] asoc-aml-card auge_sound: T9015-audio-hifi <-> TDM-C mapping ok
[    4.234205@5] asoc-aml-card auge_sound: dit-hifi <-> SPDIF mapping ok
[    4.234728@5] snd_card_add_kcontrols card:ffffffc056b0f018
[    4.234732@5] effect_v2 is not init
[    4.234734@5] Failed to add VAD controls
[    4.234746@5] eq/drc v1 function enable
[    4.259496@5] add line-out mute controls
[    4.259845@2] dwc3 ff500000.dwc3: Configuration mismatch. dr_mode forced to host
[    4.262437@2] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    4.262445@2] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    4.262614@2] usb: xhci: determined sg_tablesize: 4294967295
[    4.262615@2] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228fe6c hci version 0x110 quirks 0x20010010
[    4.262634@2] xhci-hcd xhci-hcd.0.auto: irq 23, io mem 0xff500000
[    4.262697@2] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    4.262699@2] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.262701@2] usb usb1: Product: xHCI Host Controller
[    4.262703@2] usb usb1: Manufacturer: Linux 4.9.213-67 xhci-hcd
[    4.262704@2] usb usb1: SerialNumber: xhci-hcd.0.auto
[    4.262916@2] hub 1-0:1.0: USB hub found
[    4.262927@2] hub 1-0:1.0: 2 ports detected
[    4.263061@2] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    4.263065@2] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    4.263088@2] usb: xhci: determined sg_tablesize: 4294967295
[    4.263088@2] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.263120@2] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    4.263122@2] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    4.263124@2] usb usb2: Product: xHCI Host Controller
[    4.263125@2] usb usb2: Manufacturer: Linux 4.9.213-67 xhci-hcd
[    4.263126@2] usb usb2: SerialNumber: xhci-hcd.0.auto
[    4.263299@2] hub 2-0:1.0: USB hub found
[    4.263308@2] hub 2-0:1.0: 1 port detected
[    4.263543@2] hctosys: unable to open rtc device (rtc0)
[    4.263726@2] dwc_otg: usb0: type: 2 speed: 0, config: 0, dma: 0, id: 0, phy: ffe09000, ctrl: 0
[    4.363841@2] dwc_otg: Core Release: 3.30a
[    4.363843@2] dwc_otg: Setting default values for core params
[    4.363849@2] dwc_otg: curmode: 0, host_only: 0
[    4.375980@2] dwc_otg: Using Buffer DMA mode
[    4.375983@2] dwc_otg: OTG VER PARAM: 1, OTG VER FLAG: 1
[    4.375984@2] dwc_otg: Working on port type = SLAVE
[    4.375986@2] dwc_otg: Dedicated Tx FIFOs mode
[    4.377257@2] meson_cdev probe
[    4.377300@2] meson_cdev index: 0
[    4.377377@2] meson_cdev index: 1
[    4.377420@2] thermal: no cluster id, cpucore as one cooldev
[    4.377433@2] meson_cdev index: 2
[    4.377435@2] cpucore_cooling_register, max_cpu_core_num:6
[    4.377437@2] cpucore_cooling_register, clutser[1] core num:4
[    4.377438@2] cpucore_cooling_register, clutser[0] core num:2
[    4.377484@2] meson_cdev index: 3
[    4.377496@2] meson_cdev index: 4
[    4.377519@2] find tzd id: 0
[    4.377618@2] find tzd id: 0
[    4.377697@2] find tzd id: 0
[    4.377739@2] meson_cdev probe done
[    4.377799@2] gxbb_pm: enter meson_pm_probe!
[    4.377812@2] gxbb_pm: meson_pm_probe done
[    4.377968@2] ALSA device list:
[    4.377969@2]   #0: AML-AUGESOUND
[    4.543477@2] amlogic-new-usb2-v2 ffe09000.usb2phy: ---Set port(0) tuning for host cf(xhci_hub_control)--
[    4.599462@    4.698317@2] meson_uart ff803000.serial: ttyS0 use xtal(24M) 24000000 change 115200 to 115200
[    4.699177@0] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.699180@0] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.699192@0] meson-mmc: meson_mmc_irq_thread_v3 600 emmc: cmd:1
[    4.699194@0] meson-mmc: retry cmd 1 the 1-th time(s)
[    4.702184@0] meson-mmc: emmc: resp_timeout,vstat:0x9dff0800,virqc:3fff
[    4.702185@0] meson-mmc: emmc: err: wait for desc write back, bus_fsm:0x7
[    4.702194@0] meson-mmc: meson_mmc_irq_thread_v3 600 emmc: cmd:1
[    4.702196@0] meson-mmc: Command retried failed line:634, cmd:1
[    4.707834@2] meson-mmc: actual_clock :0, HHI_nand: 0x80
[    4.707836@2] meson-mmc: [meson_mmc_clk_set_rate_v3] after clock: 0x1000033c
[    4.715559@0] meson-mmc: actual_clock :400000, HHI_nand: 0x80
[    4.715561@0] meson-mmc: [meson_mmc_clk_set_rate_v3] after clock: 0x1000023c
[    4.777191@2] Freeing unused kernel memory: 4864K
[    4.781009@2] usb 1-1: New USB device found, idVendor=05e3, idProduct=0610
[    4.787384@2] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.794651@2] usb 1-1: Product: USB2.1 Hub
[    4.798722@2] usb 1-1: Manufacturer: GenesysLogic
Loading, please wait...
[    4.807375@2] hub 1-1:1.0: USB hub found
[    4.809710@2] hub 1-1:1.0: 4 ports detected
starting version 237
[    4.831685@0] meson-mmc: actual_clock :50000000, HHI_nand: 0x80
[    4.831960@0] meson-mmc: [meson_mmc_clk_set_rate_v3] after clock: 0x10000254
[    4.839224@0] sd: new high speed SDHC card at address aaaa
[    4.844555@0] sd: clock 50000000, 4-bit-bus-width
 [    4.851002@0] mmcblk1: sd:aaaa ACLCD 29.7 GiB
[    4.858118@0]  mmcblk1: p1 p2
[    4.899601@2] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    4.922082@2] usb 2-1: New USB device found, idVendor=05e3, idProduct=0620
[    4.923314@2] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.930628@2] usb 2-1: Product: USB3.1 Hub
[    4.936681@2] usb 2-1: Manufacturer: GenesysLogic
[    4.951361@2] hub 2-1:1.0: USB hub found
[    4.951808@2] hub 2-1:1.0: 4 ports detected
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.31.1
[/sbin/fsck.ext4 (1) -- /dev/mmcblk1p2] fsck.ext4 -y -C0 /dev/mmcblk1p2
e2fsck 1.44.1 (24-Mar-2018)
rootfs: clean, 84812/1941504 files, 845650/7758464 blocks
done.
[    5.350972@1] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
SELinux:  Could not open policy file <= /etc/selinux/targeted/policy/policy.31:  No such file or directory
[    5.937620@0] systemd[1]: System time before build time, advancing clock.
[    6.053763@0] NET: Registered protocol family 10
[    6.076815@0] ip_tables: (C) 2000-2006 Netfilter Core Team
[    6.083399@0] cgroup: cgroup2: unknown option "nsdelegate"
[    6.108304@0] systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    6.124798@0] systemd[1]: Detected architecture arm64.

Welcome to Ubuntu 18.04.4 LTS!

[    6.154328@0] systemd[1]: Set hostname to <odroid>.
[    6.458859@0] systemd[1]: File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[    6.470559@0] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[    6.655940@0] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[    6.672063@0] systemd[1]: Listening on Journal Audit Socket.
[  OK  ] Listening on Journal Audit Socket.
[    6.687741@0] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[    6.708034@0] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    6.723835@0] systemd[1]: Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on fsck to fsckd communication Socket.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Swap.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on Journal Socket.
         Mounting Kernel Debug File System...
         Starting Set the console keyboard layout...
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Reached target Slices.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Listening on Syslog Socket.
         Starting Create list of required st…ce nodes for the current kernel...
[    6.904839@1] EXT4-fs (mmcblk1p2): re-mounted. Opts: errors=remount-ro
[  OK  ] Reached target Remote File Systems.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
         Mounting POSIX Message Queue File System...
[  OK  ] Set up automount Arbitrary Executab…rmats File System Automount Point.
         Starting Load Kernel Modules...
[  OK  ] Listening on udev Control Socket.
[    6.996248@1] register clk_set_setting cpu[41]
[    6.999973@1] Registered firmware driver success.
[    7.000582@1] Try to load video/h264_multi.bin  ...
[    7.007698@1] firmware_codec firmware_vdec: Direct firmware load for video/h264_multi.bin failed with error -2
[    7.014598@1] Error : -2 can't load the video/h264_multi.bin.
[    7.020320@1] get data from fsys fail.
[    7.024015@1] invaild file type.
[    7.027552@2] Try to load video/h264.bin  ...
[    7.031588@2] firmware_codec firmware_vdec: Direct firmware load for video/h264.bin failed with error -2
[    7.041013@2] Error : -2 can't load the video/h264.bin.
[    7.046195@2] get data from fsys fail.
[    7.049924@2] invaild file type.
[    7.050217@2] Try to load video/h265.bin  ...
[    7.050236@2] firmware_codec firmware_vdec: Direct firmware load for video/h265.bin failed with error -2
[    7.050237@2] Error : -2 can't load the video/h265.bin.
[    7.050238@2] get data from fsys fail.
[    7.050238@2] invaild file type.
[    7.050549@2] Try to load video/h264_enc.bin  ...
[    7.056304@2] load firmware size : 76288, Name : video/h264_enc.bin.
[    7.056309@2] start to parse fw package.
[    7.056313@2] the package has 0 fws totally.
[    7.056314@2] the fw pack ver v0.0.0 is too lower.
[    7.056315@2] it may work abnormally so need to be update in time.
[    7.056693@2] Try to load video/video_ucode.bin  ...
[    7.106479@3] load firmware size : 768768, Name : video/video_ucode.bin.
[    7.106531@3] start to parse fw package.
[    7.106535@3] the package has 35 fws totally.
[    7.106664@3] the fw gxl_h264_multi.bin is not match.
[    7.106810@3] the fw gxl_vp9.bin is not match.
[    7.106895@3] the fw gxl_avs.bin is not match.
[    7.107075@3] the fw gxl_hevc.bin is not match.
[    7.107140@3] the fw gxl_vc1.bin is not match.
[    7.107235@3] the fw gxl_h264.bin is not match.
[    7.107829@3] the fw gxl_h264_mvc.bin is not match.
[    7.150855@5] Amlogic A/V streaming port init
[    7.151712@2] get gate demux control ok ffffffc0560a29c0
[    7.151721@2] get gate parser_top control ok ffffffc0560a2a40
[    7.151740@2] get gate vdec control ok ffffffc0560a2ac0
[    7.151743@2] get gate clk_81 control failed           (null)
[    7.151766@2] get gate clk_vdec_mux control ok ffffffc0560a2b40
[    7.151792@2] get gate clk_hcodec_mux control ok ffffffc0560a2bc0
[    7.151822@2] get gate clk_hevc_mux control ok ffffffc0560a2c40
[    7.151856@2] get gate clk_hevcb_mux control ok ffffffc0560a2cc0
[    7.151871@2] get gate ahbarb0 control ok ffffffc0560a2d40
[    7.151873@2] get gate asyncfifo control failed           (null)
[    7.176189@3] ammvdec_h264 module init
[    7.202734@3] amvdec_mmpeg4 module init
         Starting udev Coldplug all Devices...
         Starting Journal Service...
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Started Set the console keyboard layout.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Started Journal Service.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
         Starting Apply Kernel Variables...
         Mounting Kernel Configuration File System...
         Starting Create Static Device Nodes in /dev...
         Starting Load/Save Random Seed...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Load/Save Random Seed.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Reached target Sound Card.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[    8.394893@3] Fine tdm clk setting range (0~2000000), 12287994
[    8.395221@3] Fine spdif sysclk setting range(0~2000000), 6143997
[    8.402750@0] out of value, fixed it
[  OK  ] Found device /dev/disk/by-label/BOOT.
         Mounting /media/boot...
[  OK  ] Mounted /media/boot.
[  OK  ] Reached target Local File Systems.
         Starting Set console font and keymap...
         Starting Create Volatile Files and Directories...
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Network Name Resolution...
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Name Resolution.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started Deferred execution scheduler.
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
         Starting Login Service...
         Starting Save/Restore Sound Card State...
         Starting Modem Manager...
         Starting System Logging Service...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Login Service.
         Starting Network Manager...
         Starting Restore /etc/resolv.conf i…fore the ppp link was shut down...
         Starting WPA supplicant...
         Starting Dispatcher daemon for systemd-networkd...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Started Message of the Day.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Reached target Timers.
[  OK  ] Started System Logging Service.
[  OK  ] Started Restore /etc/resolv.conf if…before the ppp link was shut down.
[    9.702028@0] Fine tdm clk setting range (0~2000000), 12287994
[    9.704513@0] Fine spdif sysclk setting range(0~2000000), 6143997
[    9.708501@2] out of value, fixed it
[  OK  ] Started Save/Restore Sound Card State.
         Starting Authorization Manager...
[  OK  ] Started WPA supplicant.
[  OK  ] Started Authorization Manager.
[  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
         Starting LSB: set CPUFreq kernel parameters...
[  OK  ] Started LSB: set CPUFreq kernel parameters.
[  OK  ] Started Modem Manager.
         Starting Hostname Service...
[  OK  ] Started Hostname Service.
[  OK  ] Started Network Manager.
         Starting Network Manager Script Dispatcher Service...
[  OK  ] Reached target Network.
         Starting Permit User Sessions...
         Starting OpenBSD Secure Shell server...
         Starting /etc/rc.local Compatibility...
         Starting ODROID Specific System Tweaks...
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Network Manager Script Dispatcher Service.
         Starting Set console scheme...
[  OK  ] Started Set console scheme.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started Dispatcher daemon for systemd-networkd.

Ubuntu 18.04.4 LTS odroid ttyS0

odroid login:
Thanks so much for your support!

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Mon Apr 13, 2020 8:46 am

XFer wrote:
Fri Apr 10, 2020 6:56 pm
Retested with Ubuntu Minimal flashed on the Sandisk 32GB as is.
I only edited boot.ini to add the gpiopower setting.
It works, both powerup and shutdown!
Hi @XFer,
Thank you for your test!
Your test result is same with what I expected and it became an important basis. :)
We will keep checking MMC side.
XFer wrote:
Fri Apr 10, 2020 6:56 pm
1. Why, with the apparently broken Samsung uSD, everything works well if I boot by unplugging/replugging the DC power cord (and not with the power button)?
It looks this issue is related to abnormal mmc initialization after poweroff.
I mean your Samsung uSD is not broken,
but there must be some points to adjust mmc timing or reset procedure in N2 mmc driver or suspend logic of S922X to fit in the specific mmc card, Samsung EVO+.
I'm guessing that, after poweroff->wakeup, mmc controller on the sd card side doesn't response or can't operate but just stay hang because of a certain reason that is caused during power off sequence.
( After poweroff, S922X stays suspend stage. )
I think maybe you don't have this issue with "reboot", and also with the case of dc power off->on (as you said) because operation sequences are different.
The exact cause may need to be investigated further, so we will check it more with samsung EVO+ and then I will share the status here. :)
XFer wrote:
Fri Apr 10, 2020 6:56 pm
2. Since this old Sandisk is quite slow, may I assume there's problem with Samsung cards, but Sandisks are a safe bet (so I can purchase the latest and greatest Sandisk 64GB A2)?
We have a card of Samsung EVO+, so we're trying to reproduce this issue using the card,
and also will try to fix this issue soon, so I hope you can use your card.
Could you let us look into this issue for several days more?
Once there is any progress, I will share it here, too.

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Mon Apr 13, 2020 3:56 pm

Hi @XFer,
We've reproduced this issue using Samsung EVO+ 64GB.
One of our team member has fixed it.
Here is a kernel patch. ;)

Code: Select all

diff --git a/drivers/amlogic/reboot/reboot.c b/drivers/amlogic/reboot/reboot.c
index 2b8c2d6..21a91af 100644
--- a/drivers/amlogic/reboot/reboot.c
+++ b/drivers/amlogic/reboot/reboot.c
@@ -156,6 +156,9 @@
 
 static void do_aml_poweroff(void)
 {
+#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
+	odroid_card_reset();
+#endif
 	/* TODO: Add poweroff capability */
 	__invoke_psci_fn_smc(0x82000042, 1, 0, 0);
 	__invoke_psci_fn_smc(psci_function_id_poweroff,
( 0001_n2_kernel_add_usd_card_reset_in_poweroff.diff.zip )

As he said, it's related to mmc reset sequence during poweroff and
with some of uSD products that support UHS specification, this abnormal mmc operation can be shown in this case.

We will include this patch for a next release.
Before it, can you test it and confirm this patch fixes your issue?
If you don't have kernel build environment so you can't compile kernel, please let me know.
Then, I will provide a test image.
Attachments
0001_n2_kernel_add_usd_card_reset_in_poweroff.diff.zip
(523 Bytes) Downloaded 12 times
Last edited by joy on Thu Apr 30, 2020 9:40 am, edited 1 time in total.
These users thanked the author joy for the post:
XFer (Mon Apr 13, 2020 7:05 pm)

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Mon Apr 13, 2020 6:28 pm

Hello joy,

Great work!! Congratulations and thanks for the investigation and fix!

I don't have the kernel build environment; could you maybe provide a precompiled kernel image?

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Tue Apr 14, 2020 9:14 am

Hi @XFer,
A new kernel package has been released. :)
It includes the kernel patch, so you can test using the kernel version.
Could you update kernel package and check if it works at your side?

Code: Select all

$ sudo apt update -y && sudo apt upgrade -y
The version is 4.9.219-72.

Code: Select all

# uname -a
Linux odroid 4.9.219-72 #1 SMP PREEMPT Mon Apr 13 13:55:42 -03 2020 aarch64 aarch64 aarch64 GNU/Linux

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Tue Apr 14, 2020 6:36 pm

Thank you!
I am upgrading the kernel just now. I will test it on my Samsung card and report back.

XFer
Posts: 68
Joined: Wed Aug 19, 2015 7:09 pm
languages_spoken: english, italian
ODROIDs: C0, C1+, C2, N2
Has thanked: 6 times
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by XFer » Tue Apr 14, 2020 7:02 pm

I can confirm it works! ;)

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Tue Apr 14, 2020 7:40 pm

@XFer,
Thank you for your confirmation!
So glad to hear it works! :D

Melsiar
Posts: 6
Joined: Mon Apr 13, 2020 11:18 pm
languages_spoken: French
ODROIDs: Odroid-N2 4Go
Has thanked: 0
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by Melsiar » Sun Apr 19, 2020 8:12 pm

Hello, thank you for this really well done tutorial, I read, I think all the messages on this post. I connected a push button and a 3.6 volt led to another Gpio output than that indicated in the tutorial (I use output 18 of the GPIO). The push button works correctly, as does the LED. I can turn it on and off by software, but don't know how to generate the dtb file. Can someone help me?
Thank you

The photo of my electrical connections :

https://photos.app.goo.gl/WQ3vV4PRxx5mPsz6A

I put my scripts (see bottom of my message) when the computer starts and when it shuts down, it's not great. I would like my led to light up as soon as I press the power button

My scripts if it can be useful to someone :

To turn on the led,

root@odroid:~# cat pin_18_gpio_on.sh

Code: Select all

#!/bin/bash

echo "Mise à 1 (3,3 volts) du pin 18 du GPIO"
# Activation du pin 18
if [ ! -L "/sys/class/gpio/gpio477" ]; then
echo 477 > /sys/class/gpio/export;
fi

# Mise en mode sortie du pin 18
echo out > /sys/class/gpio/gpio477/direction
echo "Le pin 18 du GPIO avait pour valeur :"
cat /sys/class/gpio/gpio477/value

# Mise  à 1 de la sortie 18
echo 1 > /sys/class/gpio/gpio477/value
echo "à présent, la sortie 18 du GPIO est à : "
cat /sys/class/gpio/gpio477/value

exit 0
and for power off led,

root@odroid:~# cat pin_18_gpio_off.sh

Code: Select all

#!/bin/bash

echo "Mise à 1 (3,3 volts) du pin 18 du GPIO"
# Activation du pin 18 si pas fait
if [ ! -L "/sys/class/gpio/gpio477" ]; then
echo 477 > /sys/class/gpio/export;
fi

# Mise en mode sortie du pin 18
echo out > /sys/class/gpio/gpio477/direction
echo "Le pin 18 du GPIO avait pour valeur :"
cat /sys/class/gpio/gpio477/value

# Mise  à 1 de la sortie 18
echo 0 > /sys/class/gpio/gpio477/value
echo "à présent, la sortie 18 du GPIO est à : "
cat /sys/class/gpio/gpio477/value

exit 0

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Mon Apr 20, 2020 10:55 am

Hi @Melsia,
Let me check the way how to modify dtb on your N2 board using fdt* utilities.

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Mon Apr 20, 2020 11:52 am

@Melsia,

This is what I understood about your pin configuration.
- Heartbeat LED control using Pin#18, GPIOX.1

Code: Select all

- Button GPIO : N2 Pin #11 - GPIOX.3 (479)
- Button Active : N2 Pin #9 - GND
- LED Positive : N2 Pin #18 - GPIOX.1 (477)
- LED Negative : N2 Pin ??? - GND
Is this right?

If so, please try the following instruction.

1. Install device-tree-compiler
I think this package is already installed on hardkernel stock ubuntu image.

Code: Select all

$ sudo apt-get install device-tree-compiler
2. Backup your original dtb file

Code: Select all

# cp /media/boot/meson64_odroidn2.dtb /media/boot/meson64_odroidn2.dtb.backup
3. Check the current leds node
This value is current heartbeat led gpios with GPIOAO_11

Code: Select all

# fdtget /media/boot/meson64_odroidn2.dtb /leds/blueled gpios
24 11 0
4. Change the node
Now change gpios to GPIOX_1.

Code: Select all

# fdtput /media/boot/meson64_odroidn2.dtb /leds/blueled gpios 26 67 0
And confirm it.
You should have the values, 26 67 0.

Code: Select all

# fdtget /media/boot/meson64_odroidn2.dtb /leds/blueled gpios
26 67 0
5. System reboot
Then, do system reboot.

6. Check if button led is blinking periodically.
After reboot, the button led will be blinking and the original heartbeat led keeps just on (not blink).

As I checked this using my N2 board and a button led, it works.
Could you check it?

Melsiar
Posts: 6
Joined: Mon Apr 13, 2020 11:18 pm
languages_spoken: French
ODROIDs: Odroid-N2 4Go
Has thanked: 0
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by Melsiar » Sat Apr 25, 2020 7:04 pm

Hi @Joy, Thank you so much for your help, now it works! It was simple, I thought I had to build a new kernel :)
Could you give me an internet link relating to the use of fdtget fdtput commands with the N2?

Just a note for electronics, in the documentation, it is important to say that not all LEDs are the same. If the LED does not support a potential difference of 3.6v but less, it is essential to put in series with an LED a suitable resistance :). For example 100 ohm for a standard red led (1.2v / 20mA) Thank you again 1000 times for your help!
These users thanked the author Melsiar for the post (total 2):
odroid (Sun Apr 26, 2020 9:25 am) • joy (Wed Apr 29, 2020 12:21 pm)

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Wed Apr 29, 2020 12:21 pm

Hi @Melsiar,
Thank you for your confirmation!
Glad to hear it works now. :D
I will update the related to wiki page soon to change dtb by using fdt* utilities for other forum users.
Melsiar wrote:
Sat Apr 25, 2020 7:04 pm
Could you give me an internet link relating to the use of fdtget fdtput commands with the N2?
BTW, I didn't understand exactly what you meant, for this your comment. :roll:
Do you need a link of the previous my post?
viewtopic.php?f=180&t=33981&start=50#p289135
Melsiar wrote:
Sat Apr 25, 2020 7:04 pm
Just a note for electronics, in the documentation, it is important to say that not all LEDs are the same. If the LED does not support a potential difference of 3.6v but less, it is essential to put in series with an LED a suitable resistance :). For example 100 ohm for a standard red led (1.2v / 20mA) Thank you again 1000 times for your help!
Thank you for your valuable comment.
I will add the note on related wiki page. ;)

Melsiar
Posts: 6
Joined: Mon Apr 13, 2020 11:18 pm
languages_spoken: French
ODROIDs: Odroid-N2 4Go
Has thanked: 0
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by Melsiar » Thu Apr 30, 2020 8:37 pm

Hi @Joy,
Thank you for your precise and precious answer!

for : ( I didn't understand exactly what you meant, for this your comment.) :
I do not understand what is used and how to find the numeric values ​​passed in arguments to the fdtput command.
For example, in my case I use Pin18 / GPIOX_1 (#) for the LED and GND output, which gives fdtput .... 26 67 0. How to relate these figures passed to the fdtput command and the output 18 of GPIO? And above all, what do these values ​​correspond to, I like to understand things :), that's why I ask questions.

thank you for your help

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Sat May 09, 2020 7:34 am

Melsiar wrote:
Thu Apr 30, 2020 8:37 pm

for : ( I didn't understand exactly what you meant, for this your comment.) :
I do not understand what is used and how to find the numeric values ​​passed in arguments to the fdtput command.
For example, in my case I use Pin18 / GPIOX_1 (#) for the LED and GND output, which gives fdtput .... 26 67 0. How to relate these figures passed to the fdtput command and the output 18 of GPIO? And above all, what do these values ​​correspond to, I like to understand things :), that's why I ask questions.
Hi @Melsiar,
Thanks for your reply.
Yes. I’m going to add more detailed descriptions about the parameters in the wiki page! :)

joy
Posts: 1276
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 125 times
Been thanked: 154 times
Contact:

Re: How to add a power button to your N2

Post by joy » Mon May 18, 2020 1:38 pm

Hi @Melsiar,
Sorry for this late response. I was involved in other works.
I've updated related wiki page.
https://wiki.odroid.com/odroid-n2/appli ... are_set-up
https://wiki.odroid.com/odroid-n2/appli ... and_fdtput

And here is some further description about "gpios" array.
I hope this information can help your understand. :)

There are three arguments in the array.

Code: Select all

  leds {
                compatible = "gpio-leds";
                blueled {
                        label = "blue:heartbeat";
                        gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "heartbeat";
                };
        };

Code: Select all

gpios = <&gpio_ao   GPIOAO_11    GPIO_ACTIVE_HIGH>;

Code: Select all

# fdtget /media/boot/meson64_odroidn2.dtb /leds/blueled gpios
24   11    0
[1] phandle number of gpio group
It can be one of '&gpio' or '&gpio_ao'.
- &gpio : 26
- &gpio_ao : 24

a. &gpio
Its phandle value is '26' (= 0x1a).

The group is defined here in pinctrl_periphs.
https://github.com/hardkernel/linux/blo ... .dtsi#L400

Code: Select all

	pinctrl_periphs: pinctrl@ff634480{
		compatible = "amlogic,meson-g12a-periphs-pinctrl";
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		gpio: banks@ff6346c0{
			reg = <0x0 0xff6346c0 0x0 0x40>,
				  <0x0 0xff6344e8 0x0 0x18>,
				  <0x0 0xff634520 0x0 0x18>,
				  <0x0 0xff634440 0x0 0x4c>,
				  <0x0 0xff634740 0x0 0x1c>;
			reg-names = "mux",
				"pull",
				"pull-enable",
				"gpio",
				"drive-strength";
			gpio-controller;
			#gpio-cells = <2>;
		};
	};
You can find its phandle at the device-tree node of pinctrl@ff634480 -> banks@ff6346c0,
and its phandle number is defined as 0x1a.
You can check the value like this.

Code: Select all

# hexdump /proc/device-tree/pinctrl\@ff634480/banks\@ff6346c0/phandle 
0000000 0000 1a00                              
0000004
b. &gpio_ao
Similar approach.
Its phandle value is '24' (= 0x18).

The gpio_ao group is defined here.
https://github.com/hardkernel/linux/blo ... .dtsi#L384
And its phandle number is....

Code: Select all

# hexdump /proc/device-tree/pinctrl\@ff800014/ao-bank\@ff800014/phandle 
0000000 0000 1800                              
0000004
[2] GPIO numbers
The numbers are defined in this header file.
There are two parts of GPIO_AO & GPIO group.
https://github.com/hardkernel/linux/blo ... 12a-gpio.h

For example, GPIOX_1 is "67".

Code: Select all

#define GPIOX_0		66
#define GPIOX_1		67
#define GPIOX_2		68
[3] GPIO level
This arguments should be one of GPIO_ACTIVE_HIGH ('0') or GPIO_ACTIVE_LOW ('1')
and the value is defined here.
https://github.com/hardkernel/linux/blo ... gpio.h#L13

Code: Select all

/* Bit 0 express polarity */
#define GPIO_ACTIVE_HIGH 0
#define GPIO_ACTIVE_LOW 1
In conclusion, if we need to use GPIOX_1, the gpios must be as following.

- in dts file.

Code: Select all

 leds {
                compatible = "gpio-leds";
                blueled {
                        label = "blue:heartbeat";
                        gpios = <&gpio GPIOX_1 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "heartbeat";
                };
        };
- using fdtget/fdtput utility.

Code: Select all

gpios = <&gpio GPIOX_1 GPIO_ACTIVE_HIGH>;

Code: Select all

gpios = <26  67  0>;
These users thanked the author joy for the post (total 2):
rooted (Mon May 18, 2020 2:34 pm) • paulcrawford (Mon May 18, 2020 9:30 pm)

Melsiar
Posts: 6
Joined: Mon Apr 13, 2020 11:18 pm
languages_spoken: French
ODROIDs: Odroid-N2 4Go
Has thanked: 0
Been thanked: 5 times
Contact:

Re: How to add a power button to your N2

Post by Melsiar » Thu May 21, 2020 4:46 pm

Hi Joy,
Thank you again a thousand times for the time you have spent explaining this clearly to me! It's really nice of you. I will try it out :)
See you soon

Image
These users thanked the author Melsiar for the post (total 2):
odroid (Thu May 21, 2020 4:48 pm) • joy (Tue May 26, 2020 9:39 am)

SBC
Posts: 5
Joined: Thu May 28, 2020 8:42 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: How to add a power button to your N2

Post by SBC » Sun May 31, 2020 2:47 am

Hi, will this work with the 64 bit version of android?

I'm not concerned about the flashing LED, I just want the facility to power down the N2 using a button. I've put the following into my Boot.ini but it doesnt work when I connect pins 9 and 11 together.

setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} monitor_onoff=${monitor_onoff} logo=osd0,loaded ${cec_enable}"

### in case of GPIOX.3 (Pin 11) of 2x20 pins connector
setenv gpiopower "479"
setenv bootargs ${bootargs} gpiopower=${gpiopower}

ttsolov
Posts: 14
Joined: Wed Jul 11, 2018 4:00 am
languages_spoken: english, russian
ODROIDs: XU4, N2
Location: California, USA
Has thanked: 3 times
Been thanked: 0
Contact:

Re: How to add a power button to your N2

Post by ttsolov » Fri Jul 03, 2020 2:22 am

SBC wrote:
Sun May 31, 2020 2:47 am
Hi, will this work with the 64 bit version of android?

I'm not concerned about the flashing LED, I just want the facility to power down the N2 using a button. I've put the following into my Boot.ini but it doesnt work when I connect pins 9 and 11 together.

setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} monitor_onoff=${monitor_onoff} logo=osd0,loaded ${cec_enable}"

### in case of GPIOX.3 (Pin 11) of 2x20 pins connector
setenv gpiopower "479"
setenv bootargs ${bootargs} gpiopower=${gpiopower}
I can confirm it's working ... though I don't see a drastic change in power consumption ~320mA (idle) vs ~230mA (suspend) with only touchscreen connected to USB.
Maybe someone can suggest more tweaks to lower the power consumption :)

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 1 guest