Submit Search
Upload
SPI Drivers
•
5 likes
•
13,203 views
S
SysPlay eLearning Academy for You
Follow
Serial Peripheral Interface Drivers
Read less
Read more
Technology
Report
Share
Report
Share
1 of 20
Recommended
Spi drivers
Spi drivers
pradeep_tewani
Platform Drivers
Platform Drivers
SysPlay eLearning Academy for You
I2C Drivers
I2C Drivers
SysPlay eLearning Academy for You
Uboot startup sequence
Uboot startup sequence
Houcheng Lin
Linux device drivers
Linux device drivers
Abhishek Sagar
U Boot or Universal Bootloader
U Boot or Universal Bootloader
Satpal Parmar
BeagleBone Black Bootloaders
BeagleBone Black Bootloaders
SysPlay eLearning Academy for You
Block Drivers
Block Drivers
Anil Kumar Pugalia
Recommended
Spi drivers
Spi drivers
pradeep_tewani
Platform Drivers
Platform Drivers
SysPlay eLearning Academy for You
I2C Drivers
I2C Drivers
SysPlay eLearning Academy for You
Uboot startup sequence
Uboot startup sequence
Houcheng Lin
Linux device drivers
Linux device drivers
Abhishek Sagar
U Boot or Universal Bootloader
U Boot or Universal Bootloader
Satpal Parmar
BeagleBone Black Bootloaders
BeagleBone Black Bootloaders
SysPlay eLearning Academy for You
Block Drivers
Block Drivers
Anil Kumar Pugalia
Yocto - Embedded Linux Distribution Maker
Yocto - Embedded Linux Distribution Maker
Sherif Mousa
PCI Drivers
PCI Drivers
Anil Kumar Pugalia
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
Linaro
Linux Initialization Process (1)
Linux Initialization Process (1)
shimosawa
Linux I2C
Linux I2C
KaidenYu
Video Drivers
Video Drivers
Anil Kumar Pugalia
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
shimosawa
The linux networking architecture
The linux networking architecture
hugo lu
Arm device tree and linux device drivers
Arm device tree and linux device drivers
Houcheng Lin
Linux Porting
Linux Porting
Champ Yen
linux device driver
linux device driver
Rahul Batra
I2c drivers
I2c drivers
pradeep_tewani
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARM
Sherif Mousa
Toolchain
Toolchain
Anil Kumar Pugalia
Pcie drivers basics
Pcie drivers basics
Venkatesh Malla
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
Macpaul Lin
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
Divye Kapoor
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Anne Nicolas
Bootloaders
Bootloaders
Anil Kumar Pugalia
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
Linaro
Serial Drivers
Serial Drivers
SysPlay eLearning Academy for You
Network Drivers
Network Drivers
Anil Kumar Pugalia
More Related Content
What's hot
Yocto - Embedded Linux Distribution Maker
Yocto - Embedded Linux Distribution Maker
Sherif Mousa
PCI Drivers
PCI Drivers
Anil Kumar Pugalia
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
Linaro
Linux Initialization Process (1)
Linux Initialization Process (1)
shimosawa
Linux I2C
Linux I2C
KaidenYu
Video Drivers
Video Drivers
Anil Kumar Pugalia
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
shimosawa
The linux networking architecture
The linux networking architecture
hugo lu
Arm device tree and linux device drivers
Arm device tree and linux device drivers
Houcheng Lin
Linux Porting
Linux Porting
Champ Yen
linux device driver
linux device driver
Rahul Batra
I2c drivers
I2c drivers
pradeep_tewani
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARM
Sherif Mousa
Toolchain
Toolchain
Anil Kumar Pugalia
Pcie drivers basics
Pcie drivers basics
Venkatesh Malla
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
Macpaul Lin
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
Divye Kapoor
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Anne Nicolas
Bootloaders
Bootloaders
Anil Kumar Pugalia
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
Linaro
What's hot
(20)
Yocto - Embedded Linux Distribution Maker
Yocto - Embedded Linux Distribution Maker
PCI Drivers
PCI Drivers
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
Linux Initialization Process (1)
Linux Initialization Process (1)
Linux I2C
Linux I2C
Video Drivers
Video Drivers
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
The linux networking architecture
The linux networking architecture
Arm device tree and linux device drivers
Arm device tree and linux device drivers
Linux Porting
Linux Porting
linux device driver
linux device driver
I2c drivers
I2c drivers
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARM
Toolchain
Toolchain
Pcie drivers basics
Pcie drivers basics
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Kernel Recipes 2015: Representing device-tree peripherals in ACPI
Bootloaders
Bootloaders
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
Viewers also liked
Serial Drivers
Serial Drivers
SysPlay eLearning Academy for You
Network Drivers
Network Drivers
Anil Kumar Pugalia
Introduction to Linux Drivers
Introduction to Linux Drivers
Anil Kumar Pugalia
File System Modules
File System Modules
Anil Kumar Pugalia
Interrupts
Interrupts
Anil Kumar Pugalia
USB Drivers
USB Drivers
Anil Kumar Pugalia
References
References
Anil Kumar Pugalia
gcc and friends
gcc and friends
Anil Kumar Pugalia
Kernel Debugging & Profiling
Kernel Debugging & Profiling
Anil Kumar Pugalia
Embedded C
Embedded C
Anil Kumar Pugalia
Character Drivers
Character Drivers
Anil Kumar Pugalia
Kernel Programming
Kernel Programming
Anil Kumar Pugalia
Low-level Accesses
Low-level Accesses
Anil Kumar Pugalia
Audio Drivers
Audio Drivers
Anil Kumar Pugalia
BeagleBoard-xM Bootloaders
BeagleBoard-xM Bootloaders
SysPlay eLearning Academy for You
Linux Porting
Linux Porting
Anil Kumar Pugalia
File Systems
File Systems
Anil Kumar Pugalia
Viewers also liked
(17)
Serial Drivers
Serial Drivers
Network Drivers
Network Drivers
Introduction to Linux Drivers
Introduction to Linux Drivers
File System Modules
File System Modules
Interrupts
Interrupts
USB Drivers
USB Drivers
References
References
gcc and friends
gcc and friends
Kernel Debugging & Profiling
Kernel Debugging & Profiling
Embedded C
Embedded C
Character Drivers
Character Drivers
Kernel Programming
Kernel Programming
Low-level Accesses
Low-level Accesses
Audio Drivers
Audio Drivers
BeagleBoard-xM Bootloaders
BeagleBoard-xM Bootloaders
Linux Porting
Linux Porting
File Systems
File Systems
Similar to SPI Drivers
SPI Drivers
SPI Drivers
SysPlay eLearning Academy for You
Внутренняя архитектура IOS-XE: средства траблшутинга предачи трафика на ASR1k...
Внутренняя архитектура IOS-XE: средства траблшутинга предачи трафика на ASR1k...
Cisco Russia
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
jaxLondonConference
Embedded I/O Management
Embedded I/O Management
Anil Kumar Pugalia
Advanced Topics in IP Multicast Deployment
Advanced Topics in IP Multicast Deployment
Arrive Technologies, Inc.
PLNOG 13: P. Kupisiewicz, O. Pelerin: Make IOS-XE Troubleshooting Easy – Pack...
PLNOG 13: P. Kupisiewicz, O. Pelerin: Make IOS-XE Troubleshooting Easy – Pack...
PROIDEA
BeagleBone Black Bootloaders
BeagleBone Black Bootloaders
SysPlay eLearning Academy for You
Особенности архитектуры и траблшутинга маршрутизаторов серии ASR1000
Особенности архитектуры и траблшутинга маршрутизаторов серии ASR1000
Cisco Russia
Ae01 system overview
Ae01 system overview
confidencial
MIPI IP Modules for SoC Prototyping
MIPI IP Modules for SoC Prototyping
Arasan Chip Systems
OpenChain AutomotiveWG(OSS license tools()
OpenChain AutomotiveWG(OSS license tools()
Yuichi Kusakabe
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 Server
JomaSoft
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
Owen Wu
CCNA 2 Routing and Switching v5.0 Chapter 4
CCNA 2 Routing and Switching v5.0 Chapter 4
Nil Menon
CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 1
CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 1
Waqas Ahmed Nawaz
Meeting rooms are talking! are you listening?
Meeting rooms are talking! are you listening?
Cisco DevNet
1 familia simatic s7
1 familia simatic s7
Fercho Oe
Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017
Giacomo Vacca
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Alexandre Moneger
mbed Connect Asia 2016 Developing IoT devices with mbed OS 5
mbed Connect Asia 2016 Developing IoT devices with mbed OS 5
armmbed
Similar to SPI Drivers
(20)
SPI Drivers
SPI Drivers
Внутренняя архитектура IOS-XE: средства траблшутинга предачи трафика на ASR1k...
Внутренняя архитектура IOS-XE: средства траблшутинга предачи трафика на ASR1k...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Embedded I/O Management
Embedded I/O Management
Advanced Topics in IP Multicast Deployment
Advanced Topics in IP Multicast Deployment
PLNOG 13: P. Kupisiewicz, O. Pelerin: Make IOS-XE Troubleshooting Easy – Pack...
PLNOG 13: P. Kupisiewicz, O. Pelerin: Make IOS-XE Troubleshooting Easy – Pack...
BeagleBone Black Bootloaders
BeagleBone Black Bootloaders
Особенности архитектуры и траблшутинга маршрутизаторов серии ASR1000
Особенности архитектуры и траблшутинга маршрутизаторов серии ASR1000
Ae01 system overview
Ae01 system overview
MIPI IP Modules for SoC Prototyping
MIPI IP Modules for SoC Prototyping
OpenChain AutomotiveWG(OSS license tools()
OpenChain AutomotiveWG(OSS license tools()
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 Server
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
CCNA 2 Routing and Switching v5.0 Chapter 4
CCNA 2 Routing and Switching v5.0 Chapter 4
CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 1
CCNA (R & S) Module 03 - Routing & Switching Essentials - Chapter 1
Meeting rooms are talking! are you listening?
Meeting rooms are talking! are you listening?
1 familia simatic s7
1 familia simatic s7
Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
mbed Connect Asia 2016 Developing IoT devices with mbed OS 5
mbed Connect Asia 2016 Developing IoT devices with mbed OS 5
More from SysPlay eLearning Academy for You
Linux Internals Part - 3
Linux Internals Part - 3
SysPlay eLearning Academy for You
Linux Internals Part - 2
Linux Internals Part - 2
SysPlay eLearning Academy for You
Linux Internals Part - 1
Linux Internals Part - 1
SysPlay eLearning Academy for You
Kernel Timing Management
Kernel Timing Management
SysPlay eLearning Academy for You
Understanding the BBB
Understanding the BBB
SysPlay eLearning Academy for You
POSIX Threads
POSIX Threads
SysPlay eLearning Academy for You
Linux DMA Engine
Linux DMA Engine
SysPlay eLearning Academy for You
Cache Management
Cache Management
SysPlay eLearning Academy for You
Introduction to BeagleBone Black
Introduction to BeagleBone Black
SysPlay eLearning Academy for You
Introduction to BeagleBoard-xM
Introduction to BeagleBoard-xM
SysPlay eLearning Academy for You
BeagleBone Black Booting Process
BeagleBone Black Booting Process
SysPlay eLearning Academy for You
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
SysPlay eLearning Academy for You
Linux System
Linux System
SysPlay eLearning Academy for You
More from SysPlay eLearning Academy for You
(13)
Linux Internals Part - 3
Linux Internals Part - 3
Linux Internals Part - 2
Linux Internals Part - 2
Linux Internals Part - 1
Linux Internals Part - 1
Kernel Timing Management
Kernel Timing Management
Understanding the BBB
Understanding the BBB
POSIX Threads
POSIX Threads
Linux DMA Engine
Linux DMA Engine
Cache Management
Cache Management
Introduction to BeagleBone Black
Introduction to BeagleBone Black
Introduction to BeagleBoard-xM
Introduction to BeagleBoard-xM
BeagleBone Black Booting Process
BeagleBone Black Booting Process
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
Linux System
Linux System
Recently uploaded
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Sergiu Bodiu
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
charlottematthew16
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Fwdays
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Enterprise Knowledge
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Wonjun Hwang
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
The Digital Insurer
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
Recently uploaded
(20)
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
SPI Drivers
1.
© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. Serial Peripheral Interface (SPI) Drivers
2.
2© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. What to Expect? SPI Prologue SPI Framework SPI Framework Components SPI Client Driver
3.
3© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Prologue Suitable for small slow devices SPI is a 4-wire protocol unlike I2 C Apart from Serial Clock, Data Lines are 2 And an additional Chip Select
4.
4© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Protocol Memory Memory 0 1 2 3 5 6 7 0 1 2 3 5 6 7 SCLK MISO MOSI CS Master Slave
5.
5© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Character Driver Framework User Space /dev/spi0 cat, echo my_open() my_read() my_write() Char Driver Low Level SPI Driver spi_rw() test.c, s1.c App open(), read(), write()
6.
6© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. AM335X Registers Module Control Register For configuring the SPI interface Single / Multi channel, Master / Slave, Chip select pins Channel Configuration Register Used to configure the SPI channel (0-3) Clock Divider, FIFO for Rx / TX, Pins for TX / RX, DMA RX / TX, SPI Mode (Full Duplex, Half Duplex), Word Length, SPI Mode Channel Status Register Status information for channel (0–3) RX / TX FIFO Full / Empty Channel Control Register Enabling / Disabling the channel
7.
7© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. AM335X SPI APIs omap2_mcspi_set_enable(struct omap2_mcspi *, int enable) Enable / Disable the channel int mcspi_wait_for_reg_bit(void __iomem *reg, unsigned long bit) Wait for register bit to set
8.
8© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Framework spi.c – Implements the SPI core layer include/linux/spi/spi.h spidev.c – Provides the char interface for spi devices include/linux/spi/spidev.h spi-omap2-mcspi – Controller driver for omap based chips
9.
9© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Framework SPI Core driver/spi/spi.c mcp320x.c drivers/iio/adc SPI based ADC driver SPI Client Driver m25p80.c drivers/mtd/ SPI based Flash driver spi-omap2-mcspi.c omap SPI Adapter Driver atmel-spi.c Atmel SPI Adapter Driver spi-imx.c IMX SPI Adapter Driver spidev.c drivers/spi Char driver for SPI Industrial IO Framework rtc-ds1505.c drivers/rtc SPI based RTC driver MTD Framework RTC Framework Char Driver Framework spi-altera.c Altera SPI Adapter Driver
10.
10© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. Framework Components SPI Master Bus controller which handles the low level h/w transactions struct spi_master dev – device interface to this driver list – linked with global spi_master list Board specific bus number min_speed_hz max_speed_hz setup – updates the device mode and clock transfer – adds a message to the controller’s transfer queue cleanup – frees up controller specific state transfer_one_message – the subsystem calls the driver spi_register_master(spi_master)
11.
11© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. Framework Components ... SPI Device Represents the SPI Slave in the Kernel struct spi_device dev – device interface to this driver master – SPI controller used with the device max_speed_hz – Maximum clock rate to be used with this device mode – Defines how the data is clocked out and in bits_per_word controller_state – Controller’s runtime state controller_data – Board specific definitions for controller such as FIFO modalias – name of the driver to use with this device cs_gpio – gpio signal used for chip select line
12.
12© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Client Driver Host side protocol driver struct spi_driver probe – Binds the driver to SPI device remove – unbinds the driver from the SPI device id_table – List of SPI devices supported by this driver driver – name of this driver. This will be used to bind with SPI slaves
13.
13© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Client Driver ... Register probe() & remove() with SPI Core Optionally, register suspend() & resume() Header: <linux/spi/spi.h> API int spi_register_driver(struct spi_driver *); void spi_unregister_driver(struct spi_driver *); module_spi_driver() Device Access APIs spi_sync(struct spi_device *, struct spi_message *); spi_async(struct spi_device *, struct spi_message *);
14.
14© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Device Access /* struct spi_device *spi – obtained through probe */ struct spi_transfer xfer; struct spi_message sm; u8 *cmd_buf; int len; … /* Ready the cmd_buf & its len */ ... spi_message_init(&sm); xfer.tx_buf = cmd_buf; xfer.len = len; spi_message_add_tail(&xfer, &sm); spi_sync(spi, &sm); /* Blocking transfer request */ spi_transfer_del(&xfer);
15.
15© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Master Registration Flow
16.
16© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. spi_sync flow
17.
17© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. DTB changes for MCP3008 mcp3x0x@0 { compatible = "mcp3208"; reg = <0>; spi-max-frequency = <1000000>; };
18.
18© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. SPI Driver Example Driver: ADC (drivers/iio/adc/mcp320x.c) Path: <kernel_source>/drivers/spi Browse & Discuss
19.
19© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. What all have we learnt? SPI Prologue SPI Framework SPI Framework Components SPI Client Driver
20.
20© 2010-17 SysPlay
Workshops <workshop@sysplay.in> All Rights Reserved. Any Queries?