Home
last modified time | relevance | path

Searched +full:spi +full:- +full:device (Results 1 – 25 of 1081) sorted by relevance

12345678910>>...44

/openbmc/linux/drivers/staging/pi433/
H A Dpi433_if.c1 // SPDX-License-Identifier: GPL-2.0+
13 * HopeRf with a similar interace - e. g. RFM69HCW, RFM12, RFM95, ...
15 * Copyright (C) 2016 Wolf-Entwicklungen
16 * Marcus Wolf <linux@wolf-entwicklungen.de>
27 #include <linux/device.h>
39 #include <linux/spi/spi.h>
66 * rx config is device specific
67 * so we have just one rx config, ebedded in device struct
70 /* device handling related values */
73 struct device *dev;
[all …]
/openbmc/linux/Documentation/spi/
H A Dspidev.rst2 SPI userspace API
5 SPI devices have a limited userspace API, supporting basic half-duplex
6 read() and write() access to SPI slave devices. Using ioctl() requests,
7 full duplex transfers and device I/O configuration are also available.
15 #include <linux/spi/spidev.h>
19 * Prototyping in an environment that's not crash-prone; stray pointers
23 as SPI slaves, which you may need to change quite often.
30 DEVICE CREATION, DRIVER BINDING
33 The spidev driver contains lists of SPI devices that are supported for
36 The following are the SPI device tables supported by the spidev driver:
[all …]
H A Dspi-summary.rst2 Overview of Linux kernel SPI support
5 02-Feb-2012
7 What is SPI?
8 ------------
9 The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial
12 standardization body. SPI uses a master/slave configuration.
17 clocking modes through which data is exchanged; mode-0 and mode-3 are most
22 SPI masters use a fourth "chip select" line to activate a given SPI slave
23 device, so those three signal wires may be connected to several chips
24 in parallel. All SPI slaves support chipselects; they are usually active
[all …]
/openbmc/u-boot/doc/device-tree-bindings/spi/
H A Dspi-bus.txt1 SPI (Serial Peripheral Interface) busses
3 SPI busses can be described with a node for the SPI master device
4 and a set of child nodes for each SPI slave on the bus. For this
5 discussion, it is assumed that the system's SPI controller is in
6 SPI master mode. This binding does not describe SPI controllers
9 The SPI master node requires the following properties:
10 - #address-cells - number of cells required to define a chip select
11 address on the SPI bus.
12 - #size-cells - should be zero.
13 - compatible - name of SPI bus controller following generic names
[all …]
/openbmc/u-boot/include/
H A Dspi.h1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Common SPI Interface: Controller-specific definitions
14 /* SPI mode flags */
22 #define SPI_LSB_FIRST BIT(3) /* per-word bits-on-wire */
46 * struct dm_spi_platdata - platform data for all SPI slaves
48 * This describes a SPI slave, a child device of the SPI bus. To obtain this
50 * dev_get_parent_platdata(slave->dev).
52 * This data is immuatable. Each time the device is probed, @max_hz and @mode
55 * @cs: Chip select number (0..n-1)
57 * @mode: SPI mode to use for this device (see SPI mode flags)
[all …]
H A Dspi-mem.h1 /* SPDX-License-Identifier: GPL-2.0+ */
17 #include <spi.h>
61 * enum spi_mem_data_dir - describes the direction of a SPI memory data
63 * @SPI_MEM_DATA_IN: data coming from the SPI memory
64 * @SPI_MEM_DATA_OUT: data sent the SPI memory
72 * struct spi_mem_op - describes a SPI memory operation
111 /* buf.{in,out} must be DMA-able. */
129 * struct spi_mem - describes a SPI memory device
130 * @spi: the underlying SPI device
133 * Extra information that describe the SPI memory device and may be needed by
[all …]
/openbmc/linux/include/linux/spi/
H A Dspi.h1 /* SPDX-License-Identifier: GPL-2.0-or-later
12 #include <linux/device.h>
21 #include <uapi/linux/spi/spi.h>
33 * INTERFACES between SPI master-side drivers and SPI slave protocol handlers,
34 * and SPI infrastructure.
39 * struct spi_statistics - statistics for spi transfers
40 * @syncp: seqcount to protect members in this struct for per-cpu update
41 * on 32-bit systems
43 * @messages: number of spi-messages handled
54 * @bytes: number of bytes transferred to/from device
[all …]
H A Dspi-mem.h1 /* SPDX-License-Identifier: GPL-2.0+ */
14 #include <linux/spi/spi.h>
59 * enum spi_mem_data_dir - describes the direction of a SPI memory data
62 * @SPI_MEM_DATA_IN: data coming from the SPI memory
63 * @SPI_MEM_DATA_OUT: data sent to the SPI memory
72 * struct spi_mem_op - describes a SPI memory operation
74 * sent MSB-first.
96 * @data.buf.in: input buffer (must be DMA-able)
97 * @data.buf.out: output buffer (must be DMA-able)
146 * struct spi_mem_dirmap_info - Direct mapping information
[all …]
/openbmc/linux/drivers/spi/
H A Dspi-sifive.c1 // SPDX-License-Identifier: GPL-2.0
5 // SiFive SPI controller driver (master mode only)
15 #include <linux/spi/spi.h>
38 #define SIFIVE_SPI_REG_FCTRL 0x60 /* SPI flash interface control */
39 #define SIFIVE_SPI_REG_FFMT 0x64 /* SPI flash instruction format */
96 struct completion done; /* wake-up from interrupt */
99 static void sifive_spi_write(struct sifive_spi *spi, int offset, u32 value) in sifive_spi_write() argument
101 iowrite32(value, spi->regs + offset); in sifive_spi_write()
104 static u32 sifive_spi_read(struct sifive_spi *spi, int offset) in sifive_spi_read() argument
106 return ioread32(spi->regs + offset); in sifive_spi_read()
[all …]
H A Dspi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 // SPI init/core code
9 #include <linux/clk/clk-conf.h>
11 #include <linux/device.h>
13 #include <linux/dma-mapping.h>
34 #include <linux/spi/spi.h>
35 #include <linux/spi/spi-mem.h>
39 #include <trace/events/spi.h>
47 static void spidev_release(struct device *dev) in spidev_release()
49 struct spi_device *spi = to_spi_device(dev); in spidev_release() local
[all …]
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
3 # SPI driver configuration
5 menuconfig SPI config
6 bool "SPI support"
10 protocol. Chips that support SPI can have data transfer rates
12 controller and a chipselect. Most SPI slaves don't support
13 dynamic device discovery; some are even write-only or read-only.
15 SPI is widely used by microcontrollers to talk with sensors,
17 chips, analog to digital (and d-to-a) converters, and more.
18 MMC and SD cards can be accessed using SPI protocol; and for
[all …]
H A Dspi-mem.c1 // SPDX-License-Identifier: GPL-2.0+
11 #include <linux/spi/spi.h>
12 #include <linux/spi/spi-mem.h>
20 * spi_controller_dma_map_mem_op_data() - DMA-map the buffer attached to a
22 * @ctlr: the SPI controller requesting this dma_map()
24 * @sgt: a pointer to a non-initialized sg_table that will be filled by this
28 * This helper prepares everything for you and provides a ready-to-use
29 * sg_table. This function is not intended to be called from spi drivers.
30 * Only SPI controller drivers should use it.
32 * op->data.buf.{in,out} is DMA-able before calling this function.
[all …]
H A Dspi-orion.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Marvell Orion SPI controller driver
6 * Copyright (C) 2007-2008 Marvell Ltd.
14 #include <linux/spi/spi.h>
73 * have both is for managing the armada-370-spi case with old
74 * device tree
98 struct device *dev;
104 static int orion_spi_runtime_suspend(struct device *dev);
105 static int orion_spi_runtime_resume(struct device *dev);
110 return orion_spi->base + reg; in spi_reg()
[all …]
/openbmc/u-boot/include/linux/mtd/
H A Dspinand.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2016-2017 Micron Technology, Inc.
14 #include <linux/device.h>
17 #include <linux/spi/spi.h>
18 #include <linux/spi/spi-mem.h>
21 #include <spi.h>
22 #include <spi-mem.h>
27 * Standard SPI NAND flash operations
121 * Standard SPI NAND flash commands
152 * struct spinand_id - SPI NAND id structure
[all …]
/openbmc/linux/drivers/mtd/devices/
H A Dmtd_dataflash.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Atmel AT45xxx DataFlash MTD driver for lightweight SPI framework
6 * Copyright (C) 2003-2005 SAN People (Pty) Ltd
11 #include <linux/device.h>
17 #include <linux/spi/spi.h>
18 #include <linux/spi/flash.h>
24 * DataFlash is a kind of SPI flash. Most AT45 chips have two buffers in
28 * Sometimes DataFlash is packaged in MMC-format cards, although the
57 #define OP_MWRITE_BUFFER1 0x88 /* sector must be pre-erased */
58 #define OP_MWRITE_BUFFER2 0x89 /* sector must be pre-erased */
[all …]
/openbmc/linux/include/linux/mtd/
H A Dspinand.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2016-2017 Micron Technology, Inc.
13 #include <linux/device.h>
16 #include <linux/spi/spi.h>
17 #include <linux/spi/spi-mem.h>
20 * Standard SPI NAND flash operations
144 * Standard SPI NAND flash commands
180 * For reset, 5us/10us/500us if the device is respectively
182 * issue a RESET when the device is IDLE, 5us is selected for both initial
197 * struct spinand_id - SPI NAND id structure
[all …]
/openbmc/linux/Documentation/devicetree/bindings/spi/
H A Dspi-controller.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/spi/spi-controller.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: SPI Controller Common Properties
10 - Mark Brown <broonie@kernel.org>
13 SPI busses can be described with a node for the SPI controller device
14 and a set of child nodes for each SPI slave on the bus. The system SPI
15 controller may be described for use in SPI master mode or in SPI slave mode,
20 pattern: "^spi(@.*|-([0-9]|[1-9][0-9]+))?$"
[all …]
H A Dspi-peripheral-props.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/spi/spi-peripheral-props.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Peripheral-specific properties for a SPI bus.
10 Many SPI controllers need to add properties to peripheral devices. They could
11 be common properties like spi-max-frequency, spi-cpha, etc. or they could be
13 need to be defined in the peripheral node because they are per-peripheral and
19 - Mark Brown <broonie@kernel.org>
27 - minimum: 0
[all …]
/openbmc/openbmc/meta-ampere/meta-jefferson/recipes-ampere/platform/ampere-utils/
H A Dampere_flash_bios.sh8 # $device_sellect : 1 - Host Main SPI Nor
9 # 2 - Host Second SPI Nor
14 # BMC_GPIOW6_SPI0_PROGRAM_SEL (GPIO 182): 1 => BMC owns SPI bus for upgrading
15 # 0 => HOST owns SPI bus for upgrading
17 … BMC_GPIOW7_SPI0_BACKUP_SEL (GPIO 183) : 0 => to switch SPI0_CS0_FL1_L to secondary SPI Nor device
18 … 1 => to switch SPI0_CS0_FL0_L to primary SPI Nor device
24 # the changing of the device erasesize by nvparm
25 HOST_MTD=$(< /proc/mtd grep "pnor" | sed -n 's/^\(.*\):.*/\1/p')
26 if [ -n "$HOST_MTD" ];
28 echo 1e630000.spi > /sys/bus/platform/drivers/spi-aspeed-smc/unbind
[all …]
/openbmc/linux/drivers/iio/common/st_sensors/
H A Dst_sensors_spi.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * STMicroelectronics sensors spi library driver
5 * Copyright 2012-2013 STMicroelectronics Inc.
15 #include <linux/spi/spi.h>
33 * st_sensors_is_spi_3_wire() - check if SPI 3-wire mode has been selected
34 * @spi: spi device reference.
36 * Return: true if SPI 3-wire mode is selected, false otherwise.
38 static bool st_sensors_is_spi_3_wire(struct spi_device *spi) in st_sensors_is_spi_3_wire() argument
41 struct device *dev = &spi->dev; in st_sensors_is_spi_3_wire()
43 if (device_property_read_bool(dev, "spi-3wire")) in st_sensors_is_spi_3_wire()
[all …]
/openbmc/u-boot/arch/x86/include/asm/
H A Dmrccache.h1 /* SPDX-License-Identifier: GPL-2.0+ */
33 * mrccache_find_current() - find the latest MRC cache record
38 * @entry: Position and size of MRC cache in SPI flash
44 * mrccache_update() - update the MRC cache with a new record
49 * @sf: SPI flash to write to
50 * @entry: Position and size of MRC cache in SPI flash
52 * @return 0 if updated, -EEXIST if the record is the same as the latest
53 * record, -EINVAL if the record is not valid, other error if SPI write failed
59 * mrccache_reserve() - reserve MRC data on the stack
61 * This copies MRC data pointed by gd->arch.mrc_output to a new place on the
[all …]
/openbmc/u-boot/drivers/spi/
H A DKconfig1 menuconfig SPI config
2 bool "SPI Support"
4 if SPI
7 bool "Enable Driver Model for SPI drivers"
10 Enable driver model for SPI. The SPI slave interface
12 the SPI uclass. Drivers provide methods to access the SPI
14 include/spi.h. The existing spi_slave structure is attached
16 typically use driver-private data instead of extending the
20 bool "SPI memory extension"
22 Enable this option if you want to enable the SPI memory extension.
[all …]
/openbmc/linux/drivers/video/backlight/
H A Dili922x.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * This driver implements a lcd device for the ILITEK 922x display
7 * controller. The interface to the display is SPI and the display's
20 #include <linux/spi/spi.h>
73 * Device ID as found in the datasheet (supports 9221 and 9222)
89 * ----------------------------------
91 * ----------------------------------
94 * - START_RS_INDEX set the index register
95 * - START_RS_REG write/read registers/GRAM
97 * - START_RW_WRITE write
[all …]
/openbmc/linux/drivers/fpga/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
41 tristate "Altera FPGA Passive Serial over SPI"
42 depends on SPI
46 using the passive serial interface over SPI.
52 FPGA manager driver support for Arria-V, Cyclone-V, Stratix-V,
68 tristate "Xilinx Configuration over Slave Serial (SPI)"
69 depends on SPI
75 tristate "Lattice iCE40 SPI"
76 depends on OF && SPI
78 FPGA manager driver support for Lattice iCE40 FPGAs over SPI.
[all …]
/openbmc/openbmc/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-utils/
H A Dampere_flash_bios.sh8 # $device_sellect : 1 - Host Main SPI Nor
9 # 2 - Host Second SPI Nor
14 # BMC_GPIOW6_SPI0_PROGRAM_SEL (GPIO 182): 1 => BMC owns SPI bus for upgrading
15 # 0 => HOST owns SPI bus for upgrading
17 # BMC_GPIOW7_SPI0_BACKUP_SEL (GPIO 183) : 1 => to switch SPI_CS0_L to primary SPI Nor device
18 # 0 => to switch SPI_CS0_L to second SPI Nor device
25 # the changing of the device erasesize by nvparm
26 HOST_MTD=$(< /proc/mtd grep "pnor" | sed -n 's/^\(.*\):.*/\1/p')
27 if [ -n "$HOST_MTD" ];
29 echo 1e630000.spi > /sys/bus/platform/drivers/spi-aspeed-smc/unbind
[all …]

12345678910>>...44