Could we add an overlay “otg-device.dts” to fenix kernel so users can activate the device mode without changing the kvim3[l]_linux.dts. the following overlay has been tested and is working for me.
I want to point out that android u-boot built from khadas-vims-pie branch and flashed to EMMC would not load the overlays for VIM3L Linux booting from SD/USB. – u-boot log –
The reason is the bootscript(s) is looking for hostname=KVIM3L to set overlaydir to kvim3l.
The hostname in android u-boot is set to #define CONFIG_HOSTNAME arm_gxbb
whereas the hostname in u-boot-khadas-vims-v2015.01 is set to #define CONFIG_HOSTNAME KVIM3L
I think this block in the bootscript(s) should be revisited to support for various scenarios
setenv uboottype “vendor”;
if test “X${maxcpus}” = “X4”; then
if test “X${hostname}” = “XKVIM3L”; then
setenv khadas_board “VIM3L”;
setenv overlaydir “kvim3l”;
else
setenv khadas_board “VIM1”;
setenv overlaydir “kvim”;
fi;
else if test “X${maxcpus}” = “X8”; then
setenv khadas_board “VIM2”;
setenv overlaydir “kvim2”;
else if test “X${maxcpus}” = “X6”; then
setenv khadas_board “VIM3”;
setenv overlaydir “kvim3”;
fi;fi;fi;
For my purposes I just added setenv overlaydir "kvim3l" in the beginning of the bootscript.