Bug 251781

Summary: Baikal BE-M1000 ARM64 Cortex-A57 USB not working
Product: Base System Reporter: Serge Volkov <sv>
Component: armAssignee: freebsd-arm (Nobody) <freebsd-arm>
Status: New ---    
Severity: Affects Only Me CC: arrowd
Priority: ---    
Version: 12.2-RELEASE   
Hardware: arm64   
OS: Any   
Attachments:
Description Flags
Baikal DTS files
none
Baikal DTB file
none
dmesg.boot
none
messages
none
Verbose dmesg.boot none

Description Serge Volkov 2020-12-12 14:04:30 UTC
I have аn ITX mainboard with BE-M1000 SoC. This is an eight-core ARM Cortex-A57 processor. I tried to install the FreeBSD on this mainboard. I used the FreeBSD-12.2-RELEASE-arm64-aarch64-memstick.img. An attempt to install from USB flash drive was unsuccessful. The system does not find the boot device. I decided to try the installation from the SATA disk. This attempt was more successful. The system boots and the installer starts. But the USB keyboard doesn't work. I guessed that the system does not recognize USB ports.

I got the .dts files for this mainboard from Linux SDK and put them in the /usr/src/sys/gnu/dts/arm64/baikal/ on the working FreeBSD (amd64) system. Then I converted bm-mitx.dts to .dtb format:

cd /usr/src
make builddtb FDT_DTS_FILE="/usr/src/sys/gnu/dts/arm64/baikal/bm-mitx.dts"

I copied the resulting file bm-mitx.dtb to the installation flash drive into the directory /boot/dtb/. And added the following lines to the
/boot/loader.conf:

dtbfile_load="YES"
dtbfile_type="dtb"
dtbfile_name="bm-mitx.dtb"

I also allowed writing to the root partition. After that I tried to boot again.
During the booting, I saw that the file bm-mitx.dtb is being loaded.
But nothing has changed, the USB ports (USB keyboard) are not working.

Please help me to solve this problem. Or at least tell me where to look for a solution.

I have attached dmesg.boot and messages files. And also other files with information. If more information is needed, I will try to provide it.

Sofware development Kit (SDK) for Linux:
https://share.baikalelectronics.ru/index.php/s/dCJppmLt4MpeDAg

Datasheet:
https://www.baikalelectronics.ru/upload/iblock/5e0/BE_M1000-Preliminary-Datasheet-ENG.pdf
Comment 1 Serge Volkov 2020-12-12 14:05:17 UTC
Created attachment 220484 [details]
Baikal DTS files
Comment 2 Serge Volkov 2020-12-12 14:05:54 UTC
Created attachment 220485 [details]
Baikal DTB file
Comment 3 Serge Volkov 2020-12-12 14:06:27 UTC
Created attachment 220487 [details]
dmesg.boot
Comment 4 Serge Volkov 2020-12-12 14:06:47 UTC
Created attachment 220488 [details]
messages
Comment 5 Serge Volkov 2020-12-22 19:18:32 UTC
Created attachment 220824 [details]
Verbose dmesg.boot
Comment 6 Serge Volkov 2020-12-23 18:05:37 UTC
I found information from the BSDCan 2018 conference https://www.bsdcan.org/2018/schedule/events/935.en.html, from which it follows that first of all I need to develop a clocks driver for new ARM64 based SoC. But where can I find a more detailed description or FreeBSD API for this?