Skip to content

Commit

Permalink
Pull request #1697: Linux: Kernel Drivers: SPI: Remove references to …
Browse files Browse the repository at this point in the history
…other platforms

Merge in PROCESSOR-SDK/processor-sdk-doc from ~A0498204/processor-sdk-doc:spi to master

* commit 'c0c67eb29caeec2602e9261bd9cd8e6fbcf5b254':
  Linux: Kernel Drivers: SPI: Fix code-block instances
  Linux: Kernel Drivers: SPI: Remove references to other platforms
  • Loading branch information
jmenti authored and cshilwant committed Mar 28, 2024
2 parents 38d07d3 + c0c67eb commit ff1c57a
Showing 1 changed file with 74 additions and 65 deletions.
139 changes: 74 additions & 65 deletions source/linux/Foundational_Components/Kernel/Kernel_Drivers/SPI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,47 @@ SPI
.. rubric:: **Introduction**
:name: introduction-linux-spi

- Serial interface

- Synchronous

- Master-slave configuration

- Data Exchange - DMA/PIO
- Serial interface
- Synchronous
- Master-slave configuration
- Data Exchange - DMA/PIO

.. rubric:: SOC Specific Information
:name: soc-specific-information

+--------------+-----------+
| SoC Family | Driver |
+==============+===========+
| AM335x | McSPI |
+--------------+-----------+
| AM437x | McSPI |
+--------------+-----------+
| DRA7x | McSPI |
+--------------+-----------+
| J721E | McSPI |
+--------------+-----------+
| J7200 | McSPI |
+--------------+-----------+
| J721S2 | McSPI |
+--------------+-----------+
| AM62X | McSPI |
+--------------+-----------+
| 66AK2Gx | McSPI |
+--------------+-----------+
| 66AK2Lx | Davinci |
+--------------+-----------+
| 66AK2Hx | Davinci |
+--------------+-----------+
| 66AK2E | Davinci |
+--------------+-----------+
.. ifconfig:: CONFIG_part_family in ('AM62X_family', 'AM62AX_family', 'AM64X_family', 'AM62PX_family')

+------------------------+-----------+
| SoC Family | Driver |
+========================+===========+
| |__PART_FAMILY_NAME__| | McSPI |
+------------------------+-----------+

.. ifconfig:: CONFIG_part_family not in ('AM62X_family', 'AM62AX_family', 'AM64X_family', 'AM62PX_family')

+--------------+-----------+
| SoC Family | Driver |
+==============+===========+
| AM335x | McSPI |
+--------------+-----------+
| AM437x | McSPI |
+--------------+-----------+
| DRA7x | McSPI |
+--------------+-----------+
| J721E | McSPI |
+--------------+-----------+
| J7200 | McSPI |
+--------------+-----------+
| J721S2 | McSPI |
+--------------+-----------+
| 66AK2Gx | McSPI |
+--------------+-----------+
| 66AK2Lx | Davinci |
+--------------+-----------+
| 66AK2Hx | Davinci |
+--------------+-----------+
| 66AK2E | Davinci |
+--------------+-----------+

.. rubric:: Features Not Supported
:name: SPI-features-not-supported
Expand All @@ -66,19 +71,21 @@ The specific peripheral driver to enable depends on the SoC being used.
.. rubric:: Enabling McSPI Driver
:name: enabling-mcspi-driver

.. code-block:: text
.. code-block:: kconfig
Device Drivers --->
[*] SPI support
[*] McSPI driver for OMAP
.. rubric:: Enabling DaVinci Driver
:name: enabling-davinci-driver
.. ifconfig:: CONFIG_part_family not in ('AM62X_family', 'AM62AX_family', 'AM64X_family', 'AM62PX_family')

.. code-block:: text
.. rubric:: Enabling DaVinci Driver
:name: enabling-davinci-driver

Device Drivers --->
[*] SPI support
.. code-block:: kconfig
Device Drivers --->
[*] SPI support
[*] Texas Instruments DaVinci/DA8x/OMAP-L/AM1x SoC SPI controller
.. rubric:: SPI Driver Usecases
Expand All @@ -90,32 +97,34 @@ drivers along with their documentation can be found within the kernel
sources. The below section attempts to provide information on SPI based
chips that are located on TI's evms.

.. rubric:: Flash Storage
:name: flash-storage
.. ifconfig:: CONFIG_part_family not in ('AM62X_family', 'AM62AX_family', 'AM64X_family', 'AM62PX_family')

.. rubric:: Flash Storage
:name: flash-storage

.. note::
This section is not to be confused with flash storage through
the QSPI/OSPI modules.
.. note::
This section is not to be confused with flash storage through
the QSPI/OSPI modules.

.. rubric:: Boards with SPI Flash
:name: boards-with-spi-flash
.. rubric:: Boards with SPI Flash
:name: boards-with-spi-flash

+------------------+--------------------+--------------+
| EVM | Part # | Flash Size |
+==================+====================+==============+
| AM335x ICE EVM | W25Q64 | 8 MB |
+------------------+--------------------+--------------+
| K2E EVM | N25Q128A11ESF40F | 16 MB |
+------------------+--------------------+--------------+
| K2HK EVM | N25Q128A11ESF40F | 16 MB |
+------------------+--------------------+--------------+
| K2L EVM | N25Q128A11ESF40F | 16 MB |
+------------------+--------------------+--------------+
+------------------+--------------------+--------------+
| EVM | Part # | Flash Size |
+==================+====================+==============+
| AM335x ICE EVM | W25Q64 | 8 MB |
+------------------+--------------------+--------------+
| K2E EVM | N25Q128A11ESF40F | 16 MB |
+------------------+--------------------+--------------+
| K2HK EVM | N25Q128A11ESF40F | 16 MB |
+------------------+--------------------+--------------+
| K2L EVM | N25Q128A11ESF40F | 16 MB |
+------------------+--------------------+--------------+

.. rubric:: Kernel Configuration
:name: kernel-configuration-1

.. code-block:: text
.. code-block:: kconfig
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
Expand All @@ -132,13 +141,13 @@ particular SPI NOR partition is simple. A user simply needs to view the
list of mtd devices along with its name. Below command will provide this
information:

.. code-block:: text
.. code-block:: console
cat /proc/mtd
An example of this output performed on the AM571x IDK EVM can be seen below.

.. code-block:: text
.. code-block:: console
dev: size erasesize name
mtd0: 00040000 00010000 "QSPI.SPL"
Expand All @@ -156,7 +165,7 @@ hex) are determined within the specific board's device tree file.

Erasing a NOR partition can be performed by using the below command:

.. code-block:: text
.. code-block:: console
flash_erase /dev/mtdX 0 0
Expand All @@ -171,7 +180,7 @@ The below step copies 8KiB from /dev/mtd2 partition (u-boot env) to
/dev/mtd4 partition and reads the 8KiB image from /dev/mtd4 to a file
and checks the md5sum. The md5sum of test.img and test1.img should be same.

.. code-block:: text
.. code-block:: console
cd /tmp
dd if=/dev/mtd2 of=test.img bs=8k count=1
Expand All @@ -189,15 +198,15 @@ simple means to send and receive SPI messages the spidev driver can be
used. Spidev provides a user space accessible means to communicate with
the SPI interface. Latest documentation regarding spidev driver can be
found
`here <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/spi/spidev>`__.
`here <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/spi/spidev.rst>`__.

Spidev allows users to interact with the spi interface in a variety of
programming languages that can communicate with kernel ioctls.

.. rubric:: Kernel Configuration
:name: kernel-configuration-2

.. code-block:: text
.. code-block:: kconfig
Device Drivers --->
[*] SPI support
Expand All @@ -209,7 +218,7 @@ Below is an example of the device tree settings a user would use to
enable the spidev driver. Like most drivers for a peripheral, the spidev
driver is listed as a subnode of the main SPI peripheral driver.

.. code-block:: text
.. code-block:: dts
&spi1 {
status = "okay";
Expand Down Expand Up @@ -243,7 +252,7 @@ show a C application interacting with the SPI peripheral.
the same overlay can be used with minor modifications to update for the PSIL
thread id.Run the following commands in u-boot console to load the overlays:

.. code-block:: text
.. code-block:: console
=> setenv name_overlays k3-j7200-mcspi-loopback.dtbo
=> boot
Expand Down

0 comments on commit ff1c57a

Please sign in to comment.