Page 1 of 1

How to work with peripherals of SOM1 (COM, SPI, I2C) using Linux?

Posted: Sat Jan 12, 2019 3:04 am
by ilden
Hello.

I have SAMA5D27 SOM1 EK. Followed the instructions in the section "Build From source code" in https://www.at91.com/linux4sam/bin/view ... EKMainPage. For ROOTFS used ubuntu-18.04.1-minimal-armhf-2018-07-30 from https://rcn-ee.com/rootfs/eewiki/minfs/.

I am very interested in how to work with peripherals of SOM1 (COM, SPI, I2C) using Linux? Is it possible or is it necessary to write drivers for them and what to do in the latter case?

Thank you very much for your attention.

Re: How to work with peripherals of SOM1 (COM, SPI, I2C) using Linux?

Posted: Tue Jan 15, 2019 12:24 am
by blue_z
ilden wrote: I have SAMA5D27 SOM1 EK. Followed the instructions in the section "Build From source code" in https://www.at91.com/linux4sam/bin/view ... EKMainPage. For ROOTFS used ubuntu-18.04.1-minimal-armhf-2018-07-30 from https://rcn-ee.com/rootfs/eewiki/minfs/.
Merging a Linux4SAM kernel with a Ubuntu rootfs is a misguided choice IMO, and may be flawed with regards to kernel loadable modules.

ilden wrote: I am very interested in how to work with peripherals of SOM1 (COM, SPI, I2C) using Linux?
There is no peripheral named COM. That's a port name from the IBM PC and MS-DOS.
SPI and I2C are interfaces for connecting additional devices to the SoC/SoM.

ilden wrote: Is it possible or is it necessary to write drivers for them and what to do in the latter case?
Devices attached to the system need drivers.
Linux4SAM has already provided Linux kernel drivers for USART devices and the SPI and I2C controllers.

Regards

Re: How to work with peripherals of SOM1 (COM, SPI, I2C) using Linux?

Posted: Tue Jan 15, 2019 2:27 am
by ilden
Thank you very much for your reply, blue_z.

Now I should focus on building Yocto/Poky ROOTFS from sources and go deep into learning the Linux4SAM kernel.

Re: How to work with peripherals of SOM1 (COM, SPI, I2C) using Linux?

Posted: Tue Jan 15, 2019 3:48 am
by blue_z
ilden wrote: Now I should focus on building Yocto/Poky ROOTFS from sources ...
Unless you have some specific requirements, IMO you probably would be better off using Buildroot rather than Yocto.
See https://lwn.net/Articles/682540/

Regards

Re: How to work with peripherals of SOM1 (COM, SPI, I2C) using Linux?

Posted: Tue Jan 15, 2019 6:05 am
by ilden
blue_z wrote: Unless you have some specific requirements, IMO you probably would be better off using Buildroot rather than Yocto.
See https://lwn.net/Articles/682540/
You gave me a good food for thought. Thank you again, blue_z.