/Linux-v6.1/Documentation/devicetree/bindings/spi/ |
D | icpdas-lp8841-spi-rtc.txt | 1 * ICP DAS LP-8841 SPI Controller for RTC 3 ICP DAS LP-8841 contains a DS-1302 RTC. RTC is connected to an IO 4 memory register, which acts as an SPI master device. 6 The device uses the standard MicroWire half-duplex transfer timing. 13 - #address-cells: should be 1 15 - #size-cells: should be 0 17 - compatible: should be "icpdas,lp8841-spi-rtc" 19 - reg: should provide IO memory address 21 Requirements to SPI slave nodes: 23 - There can be only one slave device. [all …]
|
D | spi-peripheral-props.yaml | 1 # 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 …]
|
/Linux-v6.1/Documentation/devicetree/bindings/rtc/ |
D | maxim-ds1302.txt | 1 * Maxim/Dallas Semiconductor DS-1302 RTC 5 The device uses the standard MicroWire half-duplex transfer timing. 12 - compatible : Should be "maxim,ds1302" 14 Required SPI properties: 16 - reg : Should be address of the device chip select within 19 - spi-max-frequency : DS-1302 has 500 kHz if powered at 2.2V, 22 - spi-3wire : The device has a shared signal IN/OUT line. 24 - spi-lsb-first : DS-1302 requires least significant bit first 27 - spi-cs-high: DS-1302 has active high chip select line. This is 32 spi@901c { [all …]
|
/Linux-v6.1/drivers/iio/adc/ |
D | max11100.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * Copyright (C) 2016-17 Renesas Electronics Corporation 7 * Copyright (C) 2016-17 Jacopo Mondi 14 #include <linux/spi/spi.h> 21 * LSB is the ADC single digital step 22 * 1 LSB = (vref_mv / 2 ^ 16) 24 * LSB is used to calculate analog voltage value 27 * Ain = (count * LSB) 33 struct spi_device *spi; member 55 ret = spi_read(state->spi, state->buffer, sizeof(state->buffer)); in max11100_read_single() [all …]
|
D | ad7280a.c | 1 // SPDX-License-Identifier: GPL-2.0 21 #include <linux/spi/spi.h> 128 #define AD7280A_NUM_CH (AD7280A_AUX_ADC_6_REG - \ 134 (c) - AD7280A_CELLS_PER_DEV) 142 /* 5-bit device address is sent LSB first */ 168 struct spi_device *spi; member 202 unsigned char crc = ad7280_calc_crc8(st->crc_tab, val >> 10); in ad7280_check_crc() 205 return -EIO; in ad7280_check_crc() 220 if (st->readback_delay_us < 50) in ad7280_delay() 221 udelay(st->readback_delay_us); in ad7280_delay() [all …]
|
D | ad7768-1.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Analog Devices AD7768-1 SPI ADC driver 17 #include <linux/spi/spi.h> 155 struct spi_device *spi; member 185 shift = 32 - (8 * len); in ad7768_spi_reg_read() 186 st->data.d8[0] = AD7768_RD_FLAG_MSK(addr); in ad7768_spi_reg_read() 188 ret = spi_write_then_read(st->spi, st->data.d8, 1, in ad7768_spi_reg_read() 189 &st->data.d32, len); in ad7768_spi_reg_read() 193 return (be32_to_cpu(st->data.d32) >> shift); in ad7768_spi_reg_read() 200 st->data.d8[0] = AD7768_WR_FLAG_MSK(addr); in ad7768_spi_reg_write() [all …]
|
/Linux-v6.1/tools/spi/ |
D | spidev_fdx.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include <linux/spi/spidev.h> 42 status -= 2; in do_read() 44 while (status-- > 0) in do_read() 75 for (bp = buf; len; len--) in do_msg() 82 __u8 lsb, bits; in dumpstat() local 86 perror("SPI rd_mode"); in dumpstat() 89 if (ioctl(fd, SPI_IOC_RD_LSB_FIRST, &lsb) < 0) { in dumpstat() 90 perror("SPI rd_lsb_fist"); in dumpstat() 94 perror("SPI bits_per_word"); in dumpstat() [all …]
|
D | spidev_test.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * SPI testing utility (using spidev driver) 8 * Cross-compile with cross-gcc -I/path/to/cross-kernel/include 24 #include <linux/spi/spidev.h> 71 while (length-- > 0) { in hex_dump() 91 * Unescape - process hexadecimal escape character 92 * converts shell input "\x23" -> 0x23 152 pabort("can't send spi message"); in transfer() 175 printf("Usage: %s [-DsbdlHOLC3vpNR24SI]\n", prog); in print_usage() 176 puts(" -D --device device to use (default /dev/spidev1.1)\n" in print_usage() [all …]
|
/Linux-v6.1/drivers/mfd/ |
D | ocelot-spi.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 3 * SPI core driver for the Ocelot chip family. 6 * SPI to the VSC7511, VSC7512, VSC7513 and VSC7514 chips. The main functions 7 * are to prepare the chip's SPI interface for a specific bus speed, and a host 11 * Copyright 2021-2022 Innovative Advantage Inc. 13 * Author: Colin Foster <colin.foster@in-advantage.com> 24 #include <linux/spi/spi.h> 63 * The SPI address must be big-endian, but we want the payload to match in ocelot_spi_initialize() 68 * 0b00: little-endian, MSB first in ocelot_spi_initialize() 72 * 0b01: big-endian, MSB first in ocelot_spi_initialize() [all …]
|
/Linux-v6.1/drivers/spi/ |
D | spi-lp8841-rtc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * SPI master driver for ICP DAS LP-8841 RTC 11 * Copyright (C) 2003 - 2007 Paul Mundt 19 #include <linux/spi/spi.h> 30 * REVISIT If there is support for SPI_3WIRE and SPI_LSB_FIRST in SPI 31 * GPIO driver, this SPI driver can be replaced by a simple GPIO driver 44 data->state |= SPI_LP8841_RTC_CLK; in setsck() 46 data->state &= ~SPI_LP8841_RTC_CLK; in setsck() 47 writeb(data->state, data->iomem); in setsck() 54 data->state |= SPI_LP8841_RTC_MOSI; in setmosi() [all …]
|
D | spi-fsl-spi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Freescale SPI controller driver. 10 * CPM SPI and QE buffer descriptors mode support: 19 #include <linux/dma-mapping.h> 33 #include <linux/spi/spi.h> 34 #include <linux/spi/spi_bitbang.h> 45 #include "spi-fsl-lib.h" 46 #include "spi-fsl-cpm.h" 47 #include "spi-fsl-spi.h" 66 .compatible = "fsl,spi", [all …]
|
D | spi-ppc4xx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * SPI_PPC4XX SPI controller driver. 9 * Based in part on drivers/spi/spi_s3c24xx.c 17 * The PPC4xx SPI controller has no FIFO so each sent/received byte will 20 * during SPI transfers by setting max_speed_hz via the device tree. 34 #include <linux/spi/spi.h> 35 #include <linux/spi/spi_bitbang.h> 39 #include <asm/dcr-regs.h> 41 /* bits in mode register - bit 0 is MSb */ 54 * SPI_PPC4XX_MODE_RD = 0 means "MSB first" - this is the normal mode [all …]
|
D | spi-pic32-sqi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * PIC32 Quad SPI controller driver. 10 #include <linux/dma-mapping.h> 18 #include <linux/spi/spi.h> 112 #define BD_DUAL BIT(22) /* Dual SPI */ 113 #define BD_QUAD BIT(23) /* Quad SPI */ 114 #define BD_LSBF BIT(25) /* LSB First */ 117 #define BD_CS_DEASSERT BIT(30) /* de-assert CS after current BD */ 121 * struct ring_desc - Representation of SQI ring descriptor 136 #define PESQI_BD_COUNT 256 /* max 64KB data per spi message */ [all …]
|
D | spi-fsl-espi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 18 #include <linux/spi/spi.h> 118 return ioread32be(espi->reg_base + offset); in fsl_espi_read_reg() 123 return ioread16be(espi->reg_base + offset); in fsl_espi_read_reg16() 128 return ioread8(espi->reg_base + offset); in fsl_espi_read_reg8() 134 iowrite32be(val, espi->reg_base + offset); in fsl_espi_write_reg() 140 iowrite16be(val, espi->reg_base + offset); in fsl_espi_write_reg16() 146 iowrite8(val, espi->reg_base + offset); in fsl_espi_write_reg8() 151 struct fsl_espi *espi = spi_master_get_devdata(m->spi->master); in fsl_espi_check_message() 152 struct spi_transfer *t, *first; in fsl_espi_check_message() local [all …]
|
D | spi-orion.c | 1 // 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> 74 * have both is for managing the armada-370-spi case with old 111 return orion_spi->base + reg; in spi_reg() 136 static int orion_spi_baudrate_set(struct spi_device *spi, unsigned int speed) in orion_spi_baudrate_set() argument 145 orion_spi = spi_master_get_devdata(spi->master); in orion_spi_baudrate_set() 146 devdata = orion_spi->devdata; in orion_spi_baudrate_set() 148 tclk_hz = clk_get_rate(orion_spi->clk); in orion_spi_baudrate_set() [all …]
|
/Linux-v6.1/Documentation/spi/ |
D | spidev.rst | 2 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, 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. 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: 38 - struct spi_device_id spidev_spi_ids[]: list of devices that can be 42 - struct of_device_id spidev_dt_ids[]: list of devices that can be [all …]
|
D | spi-summary.rst | 2 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 24 in parallel. All SPI slaves support chipselects; they are usually active 29 SPI slave functions are usually not interoperable between vendors [all …]
|
/Linux-v6.1/drivers/crypto/caam/ |
D | pdb.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 5 * Copyright 2008-2016 Freescale Semiconductor, Inc. 14 * PDB- IPSec ESP Header Modification Options 19 * Encap and Decap - Decrement TTL (Hop Limit) - Based on the value of the 27 * Decap - DiffServ Copy - Copy the IPv4 TOS or IPv6 Traffic Class byte 32 * Encap- Copy DF bit -if an IPv4 tunnel mode outer IP header is coming from 47 * PDB - IPSec ESP Encap/Decap Options 50 #define PDBOPTS_ESP_ARS32 0x40 /* 32-entry antireplay window */ 51 #define PDBOPTS_ESP_ARS128 0x80 /* 128-entry antireplay window */ 52 #define PDBOPTS_ESP_ARS64 0xc0 /* 64-entry antireplay window */ [all …]
|
/Linux-v6.1/drivers/clk/ |
D | clk-lmk04832.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * LMK04832 Ultra Low-Noise JESD204B Compliant Clock Jitter Cleaner 14 #include <linux/clk-provider.h> 22 #include <linux/spi/spi.h> 24 /* 0x000 - 0x00d System Functions */ 36 /* 0x100 - 0x137 Device Clock and SYSREF Clock Output Control */ 77 /* 0x138 - 0x145 SYSREF, SYNC, and Device Config */ 126 /* 0x146 - 0x14a CLKin Control */ 136 /* 0x14b - 0x152 Holdover */ 138 /* 0x153 - 0x15f PLL1 Configuration */ [all …]
|
/Linux-v6.1/drivers/fpga/ |
D | altera-ps-spi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Altera Passive Serial SPI Driver 9 * Manage Altera FPGA firmware that is loaded over SPI using the passive 18 #include <linux/fpga/fpga-mgr.h> 23 #include <linux/spi/spi.h> 43 struct spi_device *spi; member 82 { .compatible = "altr,fpga-passive-serial", .data = &c5_data }, 83 { .compatible = "altr,fpga-arria10-passive-serial", .data = &a10_data }, 90 struct altera_ps_conf *conf = mgr->priv; in altera_ps_state() 92 if (gpiod_get_value_cansleep(conf->status)) in altera_ps_state() [all …]
|
/Linux-v6.1/drivers/char/tpm/ |
D | tpm_tis_spi_cr50.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * This device driver implements a TCG PTP FIFO interface over SPI for chips 15 #include <linux/spi/spi.h> 23 * - can go to sleep not earlier than after CR50_SLEEP_DELAY_MSEC. 24 * - needs up to CR50_WAKE_START_DELAY_USEC to wake after sleep. 25 * - requires waiting for "ready" IRQ, if supported; or waiting for at least 27 * - waits for up to CR50_FLOW_CONTROL for flow control 'ready' indication. 69 cr50_phy->irq_confirmed = true; in cr50_spi_irq_handler() 70 complete(&cr50_phy->spi_phy.ready); in cr50_spi_irq_handler() 81 unsigned long allowed_access = phy->last_access + phy->access_delay; in cr50_ensure_access_delay() [all …]
|
/Linux-v6.1/include/linux/ |
D | regmap.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 49 * struct reg_default - Default value for a register. 63 * struct reg_sequence - An individual write from a sequence of writes. 86 * regmap_read_poll_timeout - Poll until a condition is met or a timeout occurs 93 * tight-loops). Should be less than ~20ms since usleep_range 94 * is used (see Documentation/timers/timers-howto.rst). 97 * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read 113 * regmap_read_poll_timeout_atomic - Poll until a condition is met or a timeout occurs 119 * @delay_us: Time to udelay between reads in us (0 tight-loops). 121 * (see Documentation/timers/timers-howto.rst). [all …]
|
/Linux-v6.1/drivers/net/wireless/ti/wlcore/ |
D | spi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2008-2009 Nokia Corporation 16 #include <linux/spi/spi.h> 52 ((WL1271_BUSY_WORD_LEN - 4) / sizeof(u32)) 64 /* Maximum number of SPI write chunks */ 70 .nvs_name = "ti-connectivity/wl127x-nvs.bin", 75 .nvs_name = "ti-connectivity/wl128x-nvs.bin", 80 .cfg_name = "ti-connectivity/wl18xx-conf.bin", 81 .nvs_name = "ti-connectivity/wl1271-nvs.bin", 92 struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent); in wl12xx_spi_reset() [all …]
|
/Linux-v6.1/drivers/iio/imu/ |
D | adis16475.c | 1 // SPDX-License-Identifier: GPL-2.0 24 #include <linux/spi/spi.h> 64 /* spi max speed in brust mode */ 132 struct adis16475 *st = file->private_data; in adis16475_show_firmware_revision() 138 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_REV, &rev); in adis16475_show_firmware_revision() 158 struct adis16475 *st = file->private_data; in adis16475_show_firmware_date() 164 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_Y, &year); in adis16475_show_firmware_date() 168 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_DM, &md); in adis16475_show_firmware_date() 172 len = snprintf(buf, sizeof(buf), "%.2x-%.2x-%.4x\n", md >> 8, md & 0xff, in adis16475_show_firmware_date() 191 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_SERIAL_NUM, &serial); in adis16475_show_serial_number() [all …]
|
/Linux-v6.1/drivers/mtd/spi-nor/ |
D | core.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 14 /* Standard SPI NOR flash operations. */ 152 /* Dual SPI */ 158 /* Quad SPI */ 164 /* Octal SPI */ 177 /* Quad SPI */ 182 /* Octal SPI */ 192 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type 198 * @opcode: the SPI command op code to erase the sector/block. 213 * struct spi_nor_erase_command - Used for non-uniform erases [all …]
|