|
@@ -2,7 +2,7 @@ args_mmc=setenv bootargs console=ttyS0,115200 panic=5 rootwait fbcon=map:10 fbco
|
|
|
baudrate=115200
|
|
|
bootcmd=run getbootpart; run check_keys; if test ${found} = 1; then setenv bootpart 1; fi; run args_mmc; run loadfdt; run loadimage; bootz ${loadaddr} - ${fdtaddr}
|
|
|
bootdelay=0
|
|
|
-check_keys=run set_pullups; setenv found 0; setenv timeout ${delay}; while test ${timeout} > 0; do run read_keys; if test ${keys} = f83f; then setenv found 1; setenv timeout 0; else setexpr timeout ${timeout} - 1; fi; done
|
|
|
+check_keys=run probe_i2c; run set_pullups; setenv found 0; setenv timeout ${delay}; while test ${timeout} > 0; do run read_keys; echo ${keys}; if test ${keys} = f83f; then setenv found 1; setenv timeout 0; else setexpr timeout ${timeout} - 1; fi; done
|
|
|
console=ttyS0,115200
|
|
|
delay=1
|
|
|
fdt_high=0xffffffff
|
|
@@ -11,8 +11,9 @@ getbootpart=part list mmc 0 -bootable bootpart
|
|
|
loadaddr=0x41000000
|
|
|
loadfdt=load mmc 0:${bootpart} ${fdtaddr} /boot/sun8i-v3s-funkey.dtb
|
|
|
loadimage=load mmc 0:${bootpart} ${loadaddr} /boot/zImage
|
|
|
-read_keys=i2c read 20 0 2 1c20500; setexpr.w keys *1c20500
|
|
|
-set_pullups=i2c mw 20 46 df; i2c mw 20 47 f8
|
|
|
+probe_i2c=if i2c probe 76; then setenv i2caddr 76; else setenv i2caddr 20; fi
|
|
|
+read_keys=i2c read ${i2caddr} 0 2 1c20500; setexpr.w keys *1c20500 \\& 0xf8ff
|
|
|
+set_pullups=i2c mw ${i2caddr} 46 df; i2c mw ${i2caddr} 47 f8
|
|
|
stderr=serial@01c28000
|
|
|
stdin=serial@01c28000
|
|
|
stdout=serial@01c28000
|