| /kernel/linux/linux-5.10/drivers/spi/ |
| D | Makefile | 3 # Makefile for kernel SPI drivers. 10 obj-$(CONFIG_SPI_MASTER) += spi.o 11 obj-$(CONFIG_SPI_MEM) += spi-mem.o 12 obj-$(CONFIG_SPI_MUX) += spi-mux.o 14 obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o 16 # SPI master controller drivers (bus) 17 obj-$(CONFIG_SPI_ALTERA) += spi-altera.o 18 obj-$(CONFIG_SPI_AR934X) += spi-ar934x.o 19 obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o 20 obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o [all …]
|
| D | Kconfig | 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 15 SPI is widely used by microcontrollers to talk with sensors, 18 MMC and SD cards can be accessed using SPI protocol; and for 19 DataFlash cards used in MMC sockets, SPI must always be used. 21 SPI is one of a family of similar protocols using a four wire 26 if SPI [all …]
|
| D | spi-stm32.c | 3 // STMicroelectronics STM32 SPI Controller driver (master mode only) 19 #include <linux/spi/spi.h> 23 /* STM32F4 SPI registers */ 72 /* STM32F4 SPI Baud Rate min/max divisor */ 76 /* STM32H7 SPI registers */ 153 /* STM32H7 SPI Master Baud Rate min/max divisor */ 157 /* STM32H7 SPI Communication mode */ 163 /* SPI Communication type */ 179 * struct stm32_spi_reg - stm32 SPI register & bitfield desc 192 * @en: enable register and SPI enable bit [all …]
|
| D | spi-lantiq-ssc.c | 19 #include <linux/spi/spi.h> 155 int (*cfg_irq)(struct platform_device *pdev, struct lantiq_ssc_spi *spi); 188 static u32 lantiq_ssc_readl(const struct lantiq_ssc_spi *spi, u32 reg) in lantiq_ssc_readl() argument 190 return __raw_readl(spi->regbase + reg); in lantiq_ssc_readl() 193 static void lantiq_ssc_writel(const struct lantiq_ssc_spi *spi, u32 val, in lantiq_ssc_writel() argument 196 __raw_writel(val, spi->regbase + reg); in lantiq_ssc_writel() 199 static void lantiq_ssc_maskl(const struct lantiq_ssc_spi *spi, u32 clr, in lantiq_ssc_maskl() argument 202 u32 val = __raw_readl(spi->regbase + reg); in lantiq_ssc_maskl() 206 __raw_writel(val, spi->regbase + reg); in lantiq_ssc_maskl() 209 static unsigned int tx_fifo_level(const struct lantiq_ssc_spi *spi) in tx_fifo_level() argument [all …]
|
| D | spi-mux.c | 3 // General Purpose SPI multiplexer 10 #include <linux/spi/spi.h> 17 * This driver supports a MUX on an SPI bus. This can be useful when you need 21 * The driver will create an additional SPI controller. Devices added under the 27 * @spi: pointer to the device struct attached to the parent 28 * spi controller 36 * downstream spi devices 39 struct spi_device *spi; member 49 static int spi_mux_select(struct spi_device *spi) in spi_mux_select() argument 51 struct spi_mux_priv *priv = spi_controller_get_devdata(spi->controller); in spi_mux_select() [all …]
|
| D | spi-sifive.c | 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 */ 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() 109 static void sifive_spi_init(struct sifive_spi *spi) in sifive_spi_init() argument 112 sifive_spi_write(spi, SIFIVE_SPI_REG_IE, 0); in sifive_spi_init() [all …]
|
| /kernel/linux/linux-4.19/drivers/spi/ |
| D | Makefile | 3 # Makefile for kernel SPI drivers. 10 obj-$(CONFIG_SPI_MASTER) += spi.o 11 obj-$(CONFIG_SPI_MEM) += spi-mem.o 13 obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o 15 # SPI master controller drivers (bus) 16 obj-$(CONFIG_SPI_ALTERA) += spi-altera.o 17 obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o 18 obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o 19 obj-$(CONFIG_SPI_ATH79) += spi-ath79.o 20 obj-$(CONFIG_SPI_AU1550) += spi-au1550.o [all …]
|
| D | Kconfig | 2 # SPI driver configuration 4 menuconfig SPI config 5 bool "SPI support" 9 protocol. Chips that support SPI can have data transfer rates 11 controller and a chipselect. Most SPI slaves don't support 14 SPI is widely used by microcontrollers to talk with sensors, 17 MMC and SD cards can be accessed using SPI protocol; and for 18 DataFlash cards used in MMC sockets, SPI must always be used. 20 SPI is one of a family of similar protocols using a four wire 25 if SPI [all …]
|
| D | spi-stm32.c | 2 * STMicroelectronics STM32 SPI Controller driver (master mode only) 32 #include <linux/spi/spi.h> 36 /* STM32 SPI registers */ 113 /* SPI Master Baud Rate min/max divisor */ 117 /* SPI Communication mode */ 126 * struct stm32_spi - private data of the SPI controller 130 * @clk: hw kernel clock feeding the SPI clock generator 131 * @clk_rate: rate of the hw kernel clock feeding the SPI clock generator 132 * @rst: SPI controller reset line 134 * @irq: SPI controller interrupt line [all …]
|
| D | spi-lantiq-ssc.c | 23 #include <linux/spi/spi.h> 193 static u32 lantiq_ssc_readl(const struct lantiq_ssc_spi *spi, u32 reg) in lantiq_ssc_readl() argument 195 return __raw_readl(spi->regbase + reg); in lantiq_ssc_readl() 198 static void lantiq_ssc_writel(const struct lantiq_ssc_spi *spi, u32 val, in lantiq_ssc_writel() argument 201 __raw_writel(val, spi->regbase + reg); in lantiq_ssc_writel() 204 static void lantiq_ssc_maskl(const struct lantiq_ssc_spi *spi, u32 clr, in lantiq_ssc_maskl() argument 207 u32 val = __raw_readl(spi->regbase + reg); in lantiq_ssc_maskl() 211 __raw_writel(val, spi->regbase + reg); in lantiq_ssc_maskl() 214 static unsigned int tx_fifo_level(const struct lantiq_ssc_spi *spi) in tx_fifo_level() argument 216 u32 fstat = lantiq_ssc_readl(spi, LTQ_SPI_FSTAT); in tx_fifo_level() [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/pi433/ |
| D | rf69.c | 3 * abstraction of the spi interface of HopeRf rf69 radio module 17 #include <linux/spi/spi.h> 27 static u8 rf69_read_reg(struct spi_device *spi, u8 addr) in rf69_read_reg() argument 31 retval = spi_w8r8(spi, addr); in rf69_read_reg() 40 dev_dbg(&spi->dev, "read 0x%x FAILED\n", addr); in rf69_read_reg() 42 dev_dbg(&spi->dev, "read 0x%x from reg 0x%x\n", retval, addr); in rf69_read_reg() 48 static int rf69_write_reg(struct spi_device *spi, u8 addr, u8 value) in rf69_write_reg() argument 56 retval = spi_write(spi, &buffer, 2); in rf69_write_reg() 65 dev_dbg(&spi->dev, "write 0x%x to 0x%x FAILED\n", value, addr); in rf69_write_reg() 67 dev_dbg(&spi->dev, "wrote 0x%x to reg 0x%x\n", value, addr); in rf69_write_reg() [all …]
|
| D | rf69.h | 20 int rf69_set_mode(struct spi_device *spi, enum mode mode); 21 int rf69_set_data_mode(struct spi_device *spi, u8 data_mode); 22 int rf69_set_modulation(struct spi_device *spi, enum modulation modulation); 23 int rf69_set_modulation_shaping(struct spi_device *spi, 25 int rf69_set_bit_rate(struct spi_device *spi, u16 bit_rate); 26 int rf69_set_deviation(struct spi_device *spi, u32 deviation); 27 int rf69_set_frequency(struct spi_device *spi, u32 frequency); 28 int rf69_enable_amplifier(struct spi_device *spi, u8 amplifier_mask); 29 int rf69_disable_amplifier(struct spi_device *spi, u8 amplifier_mask); 30 int rf69_set_output_power_level(struct spi_device *spi, u8 power_level); [all …]
|
| /kernel/linux/linux-4.19/drivers/staging/pi433/ |
| D | rf69.c | 3 * abstraction of the spi interface of HopeRf rf69 radio module 27 #include <linux/spi/spi.h> 37 static u8 rf69_read_reg(struct spi_device *spi, u8 addr) in rf69_read_reg() argument 41 retval = spi_w8r8(spi, addr); in rf69_read_reg() 50 dev_dbg(&spi->dev, "read 0x%x FAILED\n", addr); in rf69_read_reg() 52 dev_dbg(&spi->dev, "read 0x%x from reg 0x%x\n", retval, addr); in rf69_read_reg() 58 static int rf69_write_reg(struct spi_device *spi, u8 addr, u8 value) in rf69_write_reg() argument 66 retval = spi_write(spi, &buffer, 2); in rf69_write_reg() 75 dev_dbg(&spi->dev, "write 0x%x to 0x%x FAILED\n", value, addr); in rf69_write_reg() 77 dev_dbg(&spi->dev, "wrote 0x%x to reg 0x%x\n", value, addr); in rf69_write_reg() [all …]
|
| D | rf69.h | 30 int rf69_set_mode(struct spi_device *spi, enum mode mode); 31 int rf69_set_data_mode(struct spi_device *spi, u8 data_mode); 32 int rf69_set_modulation(struct spi_device *spi, enum modulation modulation); 33 int rf69_set_modulation_shaping(struct spi_device *spi, 35 int rf69_set_bit_rate(struct spi_device *spi, u16 bit_rate); 36 int rf69_set_deviation(struct spi_device *spi, u32 deviation); 37 int rf69_set_frequency(struct spi_device *spi, u32 frequency); 38 int rf69_enable_amplifier(struct spi_device *spi, u8 amplifier_mask); 39 int rf69_disable_amplifier(struct spi_device *spi, u8 amplifier_mask); 40 int rf69_set_output_power_level(struct spi_device *spi, u8 power_level); [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/greybus/ |
| D | spilib.c | 3 * Greybus SPI library 14 #include <linux/spi/spi.h> 45 static struct spi_master *get_master_from_spi(struct gb_spilib *spi) in get_master_from_spi() argument 47 return gb_connection_get_data(spi->connection); in get_master_from_spi() 95 static void clean_xfer_state(struct gb_spilib *spi) in clean_xfer_state() argument 97 spi->first_xfer = NULL; in clean_xfer_state() 98 spi->last_xfer = NULL; in clean_xfer_state() 99 spi->rx_xfer_offset = 0; in clean_xfer_state() 100 spi->tx_xfer_offset = 0; in clean_xfer_state() 101 spi->last_xfer_size = 0; in clean_xfer_state() [all …]
|
| /kernel/linux/linux-4.19/drivers/staging/greybus/ |
| D | spilib.c | 3 * Greybus SPI library 13 #include <linux/spi/spi.h> 45 static struct spi_master *get_master_from_spi(struct gb_spilib *spi) in get_master_from_spi() argument 47 return gb_connection_get_data(spi->connection); in get_master_from_spi() 95 static void clean_xfer_state(struct gb_spilib *spi) in clean_xfer_state() argument 97 spi->first_xfer = NULL; in clean_xfer_state() 98 spi->last_xfer = NULL; in clean_xfer_state() 99 spi->rx_xfer_offset = 0; in clean_xfer_state() 100 spi->tx_xfer_offset = 0; in clean_xfer_state() 101 spi->last_xfer_size = 0; in clean_xfer_state() [all …]
|
| /kernel/linux/linux-5.10/drivers/video/backlight/ |
| D | ili922x.c | 7 * controller. The interface to the display is SPI and the display's 20 #include <linux/spi/spi.h> 105 * for the SPI transfer. According to the datasheet, the controller 110 * @s: pointer to an SPI device 139 struct spi_device *spi; member 146 * @spi: spi device 149 static int ili922x_read_status(struct spi_device *spi, u16 *rs) in ili922x_read_status() argument 162 CHECK_FREQ_REG(spi, &xfer); in ili922x_read_status() 176 ret = spi_sync(spi, &msg); in ili922x_read_status() 178 dev_dbg(&spi->dev, "Error sending SPI message 0x%x", ret); in ili922x_read_status() [all …]
|
| /kernel/linux/linux-4.19/drivers/video/backlight/ |
| D | ili922x.c | 11 * controller. The interface to the display is SPI and the display's 24 #include <linux/spi/spi.h> 109 * for the SPI transfer. According to the datasheet, the controller 141 struct spi_device *spi; member 148 * @spi: spi device 151 static int ili922x_read_status(struct spi_device *spi, u16 *rs) in ili922x_read_status() argument 164 CHECK_FREQ_REG(spi, &xfer); in ili922x_read_status() 178 ret = spi_sync(spi, &msg); in ili922x_read_status() 180 dev_dbg(&spi->dev, "Error sending SPI message 0x%x", ret); in ili922x_read_status() 190 * @spi: spi device [all …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/spi/ |
| D | spi-bus.txt | 1 SPI (Serial Peripheral Interface) busses 3 SPI busses can be described with a node for the SPI controller device 4 and a set of child nodes for each SPI slave on the bus. The system's SPI 5 controller may be described for use in SPI master mode or in SPI slave mode, 8 The SPI controller node requires the following properties: 9 - compatible - Name of SPI bus controller following generic names 12 In master mode, the SPI controller node requires the following additional 15 address on the SPI bus. 18 In slave mode, the SPI controller node requires one additional property: 19 - spi-slave - Empty property. [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/spi/ |
| D | brcm,spi-bcm-qspi.txt | 1 Broadcom SPI controller 3 The Broadcom SPI controller is a SPI master found on various SOCs, including 4 BRCMSTB (BCM7XXX), Cygnus, NSP and NS2. The Broadcom Master SPI hw IP consits 6 MSPI : SPI master controller can read and write to a SPI slave device 7 BSPI : Broadcom SPI in combination with the MSPI hw IP provides acceleration 14 use SPI protocol. 19 Must be <1>, as required by generic SPI binding. 22 Must be <0>, also as required by generic SPI binding. 26 "brcm,spi-brcmstb-qspi", "brcm,spi-bcm-qspi" : MSPI+BSPI on BRCMSTB SoCs 27 "brcm,spi-brcmstb-mspi", "brcm,spi-bcm-qspi" : Second Instance of MSPI [all …]
|
| /kernel/linux/linux-5.10/drivers/net/wan/ |
| D | slic_ds26522.c | 16 #include <linux/spi/spi.h> 37 static void slic_write(struct spi_device *spi, u16 addr, in slic_write() argument 48 /* write spi addr and value */ in slic_write() 49 spi_write(spi, &temp[0], SLIC_THREE_LEN); in slic_write() 52 static u8 slic_read(struct spi_device *spi, u16 addr) in slic_read() argument 61 spi_write_then_read(spi, &temp[0], SLIC_TWO_LEN, &data, in slic_read() 68 static bool get_slic_product_code(struct spi_device *spi) in get_slic_product_code() argument 72 device_id = slic_read(spi, DS26522_IDR_ADDR); in get_slic_product_code() 79 static void ds26522_e1_spec_config(struct spi_device *spi) in ds26522_e1_spec_config() argument 82 slic_write(spi, DS26522_RMMR_ADDR, DS26522_RMMR_E1); in ds26522_e1_spec_config() [all …]
|
| /kernel/linux/linux-4.19/drivers/net/wan/ |
| D | slic_ds26522.c | 20 #include <linux/spi/spi.h> 43 static void slic_write(struct spi_device *spi, u16 addr, in slic_write() argument 54 /* write spi addr and value */ in slic_write() 55 spi_write(spi, &temp[0], SLIC_THREE_LEN); in slic_write() 58 static u8 slic_read(struct spi_device *spi, u16 addr) in slic_read() argument 67 spi_write_then_read(spi, &temp[0], SLIC_TWO_LEN, &data, in slic_read() 74 static bool get_slic_product_code(struct spi_device *spi) in get_slic_product_code() argument 78 device_id = slic_read(spi, DS26522_IDR_ADDR); in get_slic_product_code() 85 static void ds26522_e1_spec_config(struct spi_device *spi) in ds26522_e1_spec_config() argument 88 slic_write(spi, DS26522_RMMR_ADDR, DS26522_RMMR_E1); in ds26522_e1_spec_config() [all …]
|
| /kernel/linux/linux-5.10/drivers/media/pci/netup_unidvb/ |
| D | netup_unidvb_spi.c | 5 * Internal SPI driver for NetUP Universal Dual DVB-CI 13 #include <linux/spi/spi.h> 14 #include <linux/spi/flash.h> 69 irqreturn_t netup_spi_interrupt(struct netup_spi *spi) in netup_spi_interrupt() argument 74 if (!spi) in netup_spi_interrupt() 77 spin_lock_irqsave(&spi->lock, flags); in netup_spi_interrupt() 78 reg = readw(&spi->regs->control_stat); in netup_spi_interrupt() 80 spin_unlock_irqrestore(&spi->lock, flags); in netup_spi_interrupt() 81 dev_dbg(&spi->master->dev, in netup_spi_interrupt() 85 writew(reg | NETUP_SPI_CTRL_IRQ, &spi->regs->control_stat); in netup_spi_interrupt() [all …]
|
| /kernel/linux/linux-4.19/drivers/mtd/spi-nor/ |
| D | Kconfig | 2 tristate "SPI-NOR device support" 5 This is the framework for the SPI NOR which can be used by the SPI 6 device drivers and the SPI-NOR device driver. 11 tristate "Mediatek MT81xx SPI NOR flash controller" 14 This enables access to SPI NOR flash, using MT81xx SPI NOR flash 15 controller. This controller does not support generic SPI BUS, it only 16 supports SPI NOR Flash. 33 tristate "Aspeed flash controllers in SPI mode" 38 in the Aspeed AST2500/AST2400 SoCs when attached to SPI NOR chips, 39 and support for the SPI flash memory controller (SPI) for [all …]
|
| /kernel/linux/linux-4.19/drivers/media/pci/netup_unidvb/ |
| D | netup_unidvb_spi.c | 4 * Internal SPI driver for NetUP Universal Dual DVB-CI 22 #include <linux/spi/spi.h> 23 #include <linux/spi/flash.h> 78 irqreturn_t netup_spi_interrupt(struct netup_spi *spi) in netup_spi_interrupt() argument 83 if (!spi) in netup_spi_interrupt() 86 spin_lock_irqsave(&spi->lock, flags); in netup_spi_interrupt() 87 reg = readw(&spi->regs->control_stat); in netup_spi_interrupt() 89 spin_unlock_irqrestore(&spi->lock, flags); in netup_spi_interrupt() 90 dev_dbg(&spi->master->dev, in netup_spi_interrupt() 94 writew(reg | NETUP_SPI_CTRL_IRQ, &spi->regs->control_stat); in netup_spi_interrupt() [all …]
|