Pine64-LTS and UART ports

Kaya Saman kayasaman at optiplex-networks.com
Thu Jun 27 01:13:55 UTC 2019


On 6/25/19 4:24 PM, Kaya Saman wrote:
>
> On 6/25/19 7:27 AM, Emmanuel Vadot wrote:
>> On Mon, 24 Jun 2019 22:14:15 +0100
>> Kaya Saman <kayasaman at optiplex-networks.com> wrote:
>>
>>> On 6/24/19 10:02 PM, Sergey Manucharian wrote:
>>>> Excerpts from Kaya Saman's message from Mon 24-Jun-19 21:58:
>>>> [snip]
>>   DTS and DTSO needs to be pre-processed by cpp as they use #include
>> directives, you can have a look at sys/tools/fdt/make_dtb.sh and
>> make_dtbo.sh
>>   If you modify the DTS simply running make buildkernel will compile the
>> new one, just make sure to put it on the FAT32 partition in
>> dts/allwinner as we need it loaded by u-boot and it can't read ufs.
>>
>
> Thanks Emmanuel!
>
>
> I ran: make  -j4 buildkernel KERNCONF=PPSGENERIC
>
>
> Then installed with: make installkernel KERNCONF=PPSGENERIC
>
>
> The sun50i-a64-pine64.dts has the modification already suggested:
>
>
> /* On Pi-2 connector */
> &uart2 {
>         pinctrl-names = "default";
>         pinctrl-0 = <&uart2_pins>;
>         status = "okay";
> };
>
>
> Running: ls -l /boot/dtb/allwinner/
> total 140
> -r--r--r--  1 root  wheel  19976 Jun 25 16:11 sun50i-a64-nanopi-a64.dtb
> -r--r--r--  1 root  wheel  20528 Jun 25 16:11 sun50i-a64-olinuxino.dtb
> -r--r--r--  1 root  wheel  20677 Jun 25 16:11 sun50i-a64-pine64-plus.dtb
> -r--r--r--  1 root  wheel  20603 Jun 25 16:11 sun50i-a64-pine64.dtb
> -r--r--r--  1 root  wheel  20585 Jun 25 16:11 
> sun50i-a64-sopine-baseboard.dtb
> -r--r--r--  1 root  wheel  23227 Jun 25 16:11 sun50i-h5-orangepi-pc2.dtb
>
>
> The dtb files have been created and installed by the 'installkernel' 
> command.
>
>
> Unfortunately though nothing shows up in dmesg or /dev again outside 
> of the standard uart0?
>
>
> dmesg |grep uart
> uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 23 on simplebus0
> uart0: console (115384,n,8,1)
>
>
> Is there an additional step which needs to be done to get this to work?
>
>
> Regards,
>
>
> Kaya


I found the FAT32 partition that Emmanuel mentioned:

" just make sure to put it on the FAT32 partition in
dts/allwinner as we need it loaded by u-boot and it can't read ufs."


So after copying the overlays and allwinner files to 
/boot/msdos/dtb/overlays and /boot/msdos/dtb/allwinner I have at least 
some error messages:


Booting [/boot/kernel/kernel]...
Using DTB provided by EFI at 0x47ef8000.
Loading DTB overlays: 
'sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-uart2,sun50i-a64-uart4'
/boot/dtb/overlays/sun50i-a64-sid.dtbo size=0x1fd
/boot/dtb/overlays/sun50i-a64-ths.dtbo size=0x3e8
/boot/dtb/overlays/sun50i-a64-timer.dtbo size=0x175
/boot/dtb/overlays/sun50i-a64-uart2.dtbo size=0x123
/boot/dtb/overlays/sun50i-a64-uart4.dtbo size=0x123
applying DTB overlay '/boot/dtb/overlays/sun50i-a64-sid.dtbo'
applying DTB overlay '/boot/dtb/overlays/sun50i-a64-ths.dtbo'
failed to apply overlay: FDT_ERR_NOTFOUND
applying DTB overlay '/boot/dtb/overlays/sun50i-a64-timer.dtbo'
applying DTB overlay '/boot/dtb/overlays/sun50i-a64-uart2.dtbo'
failed to apply overlay: FDT_ERR_NOTFOUND
applying DTB overlay '/boot/dtb/overlays/sun50i-a64-uart4.dtbo'
failed to apply overlay: FDT_ERR_NOTFOUND
EHCI failed to shut down host controller.
---<<BOOT>>---



The file list:


ls -l  /boot/msdos/dtb/allwinner
total 140
-rwxr-xr-x  1 root  wheel  19976 Dec  7  2018 sun50i-a64-nanopi-a64.dtb
-rwxr-xr-x  1 root  wheel  20528 Dec  7  2018 sun50i-a64-olinuxino.dtb
-rwxr-xr-x  1 root  wheel  20685 Dec  7  2018 sun50i-a64-pine64-plus.dtb
-rwxr-xr-x  1 root  wheel  20603 Jun 27 01:54 sun50i-a64-pine64.dtb
-rwxr-xr-x  1 root  wheel  20585 Dec  7  2018 
sun50i-a64-sopine-baseboard.dtb
-rwxr-xr-x  1 root  wheel  23227 Dec  7  2018 sun50i-h5-orangepi-pc2.dtb


ls -l /boot/msdos/dtb/overlays/
total 20
-rwxr-xr-x  1 root  wheel   509 Dec  7  2018 sun50i-a64-sid.dtbo
-rwxr-xr-x  1 root  wheel  1000 Dec  7  2018 sun50i-a64-ths.dtbo
-rwxr-xr-x  1 root  wheel   373 Dec  7  2018 sun50i-a64-timer.dtbo
-rwxr-xr-x  1 root  wheel   291 Jun 27 01:50 sun50i-a64-uart2.dtbo
-rwxr-xr-x  1 root  wheel   291 Jun 27 01:50 sun50i-a64-uart4.dtbo



ls -l /boot/dtb/allwinner
total 140
-r--r--r--  1 root  wheel  19976 Jun 25 16:11 sun50i-a64-nanopi-a64.dtb
-r--r--r--  1 root  wheel  20528 Jun 25 16:11 sun50i-a64-olinuxino.dtb
-r--r--r--  1 root  wheel  20677 Jun 25 16:11 sun50i-a64-pine64-plus.dtb
-r--r--r--  1 root  wheel  20603 Jun 25 16:11 sun50i-a64-pine64.dtb
-r--r--r--  1 root  wheel  20585 Jun 25 16:11 
sun50i-a64-sopine-baseboard.dtb
-r--r--r--  1 root  wheel  23227 Jun 25 16:11 sun50i-h5-orangepi-pc2.dtb


ls -l /boot/dtb/overlays
total 20
-r--r--r--  1 root  wheel   509 Jun 25 16:11 sun50i-a64-sid.dtbo
-r--r--r--  1 root  wheel  1000 Jun 25 16:11 sun50i-a64-ths.dtbo
-r--r--r--  1 root  wheel   373 Jun 25 16:11 sun50i-a64-timer.dtbo
-r--r--r--  1 root  wheel   291 Jun 24 21:40 sun50i-a64-uart2.dtbo
-r--r--r--  1 root  wheel   291 Jun 24 21:12 sun50i-a64-uart4.dtbo


Even with uart2 and uart4 enabled in: sun50i-a64-pine64.dtb I still 
don't see anything outside of uart0 under dmesg.


What else could I try at this stage?


Regards,


Kaya



More information about the freebsd-arm mailing list