Enabling spidev on ls1046a-frwy with lsdk

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Enabling spidev on ls1046a-frwy with lsdk

2,414 次查看
abe1
Contributor I

Hi,

I intent to use ls1046a-frwy with LSDK 2004. How do I enable /dev/spidev to access a SPI slave device through mikrobus connection?

thanks,

A.B.

标签 (1)
标记 (1)
0 项奖励
回复
10 回复数

2,207 次查看
Pavel
NXP Employee
NXP Employee

Create sdb1 and sdb2 partitions on your SD card and start flex-installer command again.

Have a great day,
Pavel Chubakov

0 项奖励
回复

2,207 次查看
pratikp
Contributor I

Hi Pavel,

I was facing the same issue like:

Installing ./build/images/rootfs_lsdk2004_ubuntu_main_arm64_202005202224.tgz to /dev/sdb1, waiting ...

Install ./build/images/rootfs_lsdk2004_ubuntu_main_arm64_202005202224.tgz in /dev/sdb1 [Done]

lsblk: /dev/sdb2: not a block device

I tried your suggestion; It seems to be not working. can you please help me to solve this?

Regards,

Pratik

0 项奖励
回复

2,207 次查看
Pavel
NXP Employee
NXP Employee

Test your writing using the following command  host PC under Linux:

sudo dd if=firmware_ls1046afrwy_uboot_sdboot.img  of=/dev/sdb bs=512 seek=8

Have a great day,
Pavel Chubakov

0 项奖励
回复

2,207 次查看
abe1
Contributor I

Hi Pavel.

The 'dd' command writes just fine to the SD device. There is a problem however with the 'flex-installer' script (or other components) under LSDK version 2004.

regard,

A.B.

0 项奖励
回复

2,207 次查看
Pavel
NXP Employee
NXP Employee

Usually the following commands are used for writing .img file to SD card for booting:

under u-boot on the LS1046-frwy board:

=> tftp a0000000 firmware_ls1046afrwy_uboot_sdboot.img

=> mmc write a0000000 8 1fff8

 

or on host PC under Linux:

sudo dd if=firmware_ls1046afrwy_uboot_sdboot.img  of=/dev/sdb bs=512 seek=8

 

Do you use similar commands for SD writing?

Have a great day,
Pavel Chubakov

0 项奖励
回复

2,207 次查看
abe1
Contributor I

The error is generated when running 'flex-installer' when used with 'flexbuild_lsdk2004'

as it shows below:

flex-installer -b ./build/images/bootpartition_LS_arm64_lts_5.4_202005202155.tgz -r ./build/images/rootfs_lsdk2004_ubuntu_main_arm64_202005202224.tgz   -f ./build/images/firmware_ls1046afrwy_uboot_sdboot.img -d /dev/sdb

Error: Error opening /dev/sdb: Permission denied

101974+1 records in

101974+1 records out

52210896 bytes (52 MB, 50 MiB) copied, 8.31494 s, 6.3 MB/s

Program ./build/images/firmware_ls1046afrwy_uboot_sdboot.img into /dev/sdb startblock=8     [Done]

Cleaning the existing data in /dev/sdb2

Installing ./build/images/bootpartition_LS_arm64_lts_5.4_202005202155.tgz to /dev/sdb2, waiting ...

Install ./build/images/bootpartition_LS_arm64_lts_5.4_202005202155.tgz in /dev/sdb2     [Done]

NOTICE: Appears /mnt/sdb1 contains the existing data

Are you sure to drop the data in /mnt/sdb1 partition to proceed now? [y/n] y

Cleaning data in /mnt/sdb1

Installing ./build/images/rootfs_lsdk2004_ubuntu_main_arm64_202005202224.tgz to /dev/sdb1, waiting ...

Install ./build/images/rootfs_lsdk2004_ubuntu_main_arm64_202005202224.tgz in /dev/sdb1     [Done]

lsblk: /dev/sdb2: not a block device

0 项奖励
回复

2,207 次查看
Pavel
NXP Employee
NXP Employee

Is there problem for using kernel menu?

Is there problem for changing the fsl-ls1012a.dtsi file and kernel building?

Have a great day,
Pavel Chubakov

0 项奖励
回复

2,207 次查看
abe1
Contributor I

There is a problem when installing firmware, boot and root images from the local builds to any SD under LSDK 2004, previous LSDK versions are fine.

0 项奖励
回复

2,207 次查看
Pavel
NXP Employee
NXP Employee

Enable spidev using kernel menu:

> Device Drivers

                > SPI support

                               <*>   User mode SPI device driver support 

 

See the following NXP Community for sdpidev definition in .dts file:

https://community.nxp.com/message/1212506

Have a great day,
Pavel Chubakov

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

2,207 次查看
abe1
Contributor I

Hi Pavel,

Thank you, that worked in LSDK 1909. I was not able however to deploy the kernel changes successfully using LSDK 2004.

Regards,

A.B.

0 项奖励
回复