/linux-6.14.4/drivers/spi/ |
D | Kconfig | 1 # 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, 16 eeprom and flash memory, codecs and various other controller 17 chips, analog to digital (and d-to-a) converters, and more. [all …]
|
D | spi-loongson-core.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 // Loongson SPI Support 14 #include <linux/spi/spi.h> 16 #include "spi-loongson.h" 18 static inline void loongson_spi_write_reg(struct loongson_spi *spi, unsigned char reg, in loongson_spi_write_reg() argument 21 writeb(data, spi->base + reg); in loongson_spi_write_reg() 24 static inline char loongson_spi_read_reg(struct loongson_spi *spi, unsigned char reg) in loongson_spi_read_reg() argument 26 return readb(spi->base + reg); in loongson_spi_read_reg() 29 static void loongson_spi_set_cs(struct spi_device *spi, bool en) in loongson_spi_set_cs() argument 32 unsigned char mask = (BIT(4) | BIT(0)) << spi_get_chipselect(spi, 0); in loongson_spi_set_cs() [all …]
|
D | spi-stm32.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // STMicroelectronics STM32 SPI Controller driver 5 // Copyright (C) 2017, STMicroelectronics - All Rights Reserved 21 #include <linux/spi/spi.h> 25 /* STM32F4/7 SPI registers */ 81 /* STM32F4 SPI Baud Rate min/max divisor */ 85 /* STM32H7 SPI registers */ 157 /* STM32MP25 SPI registers bit fields */ 171 /* STM32H7 SPI Master Baud Rate min/max divisor */ 175 /* STM32H7 SPI Communication mode */ [all …]
|
D | spi-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // General Purpose SPI multiplexer 10 #include <linux/spi/spi.h> 12 #define SPI_MUX_NO_CS ((unsigned int)-1) 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 22 * mux will be handled as 'chip selects' on this controller. 26 * struct spi_mux_priv - the basic spi_mux structure 27 * @spi: pointer to the device struct attached to the parent 28 * spi controller [all …]
|
D | spi-microchip-core.c | 1 // SPDX-License-Identifier: (GPL-2.0) 3 * Microchip CoreSPI SPI controller driver 5 * Copyright (c) 2018-2022 Microchip Technology Inc. and its subsidiaries 21 #include <linux/spi/spi.h> 107 u32 clk_gen; /* divider for spi output clock generated by the controller */ 116 static inline u32 mchp_corespi_read(struct mchp_corespi *spi, unsigned int reg) in mchp_corespi_read() argument 118 return readl(spi->regs + reg); in mchp_corespi_read() 121 static inline void mchp_corespi_write(struct mchp_corespi *spi, unsigned int reg, u32 val) in mchp_corespi_write() argument 123 writel(val, spi->regs + reg); in mchp_corespi_write() 126 static inline void mchp_corespi_disable(struct mchp_corespi *spi) in mchp_corespi_disable() argument [all …]
|
D | spi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 // SPI init/core code 9 #include <linux/clk/clk-conf.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> 49 struct spi_device *spi = to_spi_device(dev); in spidev_release() local 51 spi_controller_put(spi->controller); in spidev_release() 52 kfree(spi->driver_override); in spidev_release() [all …]
|
D | spi-bitbang.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Polling/bitbanging SPI host controller controller driver utilities 16 #include <linux/spi/spi.h> 17 #include <linux/spi/spi_bitbang.h> 22 /*----------------------------------------------------------------------*/ 25 * FIRST PART (OPTIONAL): word-at-a-time spi_transfer support. 26 * Use this for GPIO or shift-register level hardware APIs. 28 * spi_bitbang_cs is in spi_device->controller_state, which is unavailable 30 * used, though maybe they're called from controller-aware code. 32 * chipselect() and friends may use spi_device->controller_data and [all …]
|
D | spi-kspi2.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Driver for KEBA SPI host controller type 2 FPGA IP core 10 #include <linux/spi/spi.h> 42 #define KSPI2_SPEED_HZ_MIN(kspi) (kspi->base_speed_hz / 65536) 43 #define KSPI2_SPEED_HZ_MAX(kspi) (kspi->base_speed_hz / 2) 57 u32 base_speed_hz; /* SPI base clock frequency in HZ */ 70 * The SPI controller has an IN_USE bit for locking access to the in kspi2_inuse_lock() 71 * controller. This enables the use of the SPI controller by other none in kspi2_inuse_lock() 74 * If the SPI controller is free, then the first read returns in kspi2_inuse_lock() 75 * IN_USE == 0. After that the SPI controller is locked and further in kspi2_inuse_lock() [all …]
|
D | spi-qup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2008-2014, The Linux foundation. All rights reserved. 8 #include <linux/dma-mapping.h> 20 #include <linux/spi/spi.h> 118 #define SPI_MAX_XFER (SZ_64K - 64) 146 int w_size; /* bytes per SPI word */ 161 static int spi_qup_io_config(struct spi_device *spi, struct spi_transfer *xfer); 163 static inline bool spi_qup_is_flag_set(struct spi_qup *controller, u32 flag) in spi_qup_is_flag_set() argument 165 u32 opflag = readl_relaxed(controller->base + QUP_OPERATIONAL); in spi_qup_is_flag_set() 179 static inline unsigned int spi_qup_len(struct spi_qup *controller) in spi_qup_len() argument [all …]
|
D | spi-cadence.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Cadence SPI controller driver (host and target mode) 5 * Copyright (C) 2008 - 2014 Xilinx, Inc. 7 * based on Blackfin On-Chip SPI Driver (spi_bfin5xx.c) 22 #include <linux/spi/spi.h> 25 #define CDNS_SPI_NAME "cdns-spi" 42 * SPI Configuration Register bit Masks 45 * of the SPI controller 63 * SPI Configuration Register - Baud rate and target select 77 * SPI Interrupt Registers bit Masks [all …]
|
D | spi-davinci.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 16 #include <linux/dma-mapping.h> 18 #include <linux/spi/spi.h> 19 #include <linux/spi/spi_bitbang.h> 22 #include <linux/platform_data/spi-davinci.h> 88 /* SPI Controller registers */ 103 /* SPI Controller driver's private data. */ 136 if (dspi->rx) { in davinci_spi_rx_buf_u8() 137 u8 *rx = dspi->rx; in davinci_spi_rx_buf_u8() 139 dspi->rx = rx; in davinci_spi_rx_buf_u8() [all …]
|
D | spi-imx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 // Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. 11 #include <linux/dma-mapping.h> 25 #include <linux/spi/spi.h> 30 #include <linux/dma/imx-dma.h> 78 int (*prepare_transfer)(struct spi_imx_data *spi_imx, struct spi_device *spi, 98 struct spi_controller *controller; member 138 return d->devtype_data->devtype == IMX27_CSPI; in is_imx27_cspi() 143 return d->devtype_data->devtype == IMX35_CSPI; in is_imx35_cspi() 148 return d->devtype_data->devtype == IMX51_ECSPI; in is_imx51_ecspi() [all …]
|
/linux-6.14.4/Documentation/devicetree/bindings/spi/ |
D | snps,dw-apb-ssi.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 3 --- 4 $id: http://devicetree.org/schemas/spi/snps,dw-apb-ssi.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Mark Brown <[email protected]> 13 - $ref: spi-controller.yaml# 14 - if: 19 - mscc,ocelot-spi 20 - mscc,jaguar2-spi 25 - if: [all …]
|
D | brcm,spi-bcm-qspi.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Broadcom SPI controller 10 - Kamal Dasu <[email protected]> 11 - Rafał Miłecki <[email protected]> 14 The Broadcom SPI controller is a SPI master found on various SOCs, including 15 BRCMSTB (BCM7XXX), Cygnus, NSP and NS2. The Broadcom Master SPI hw IP consists 17 MSPI : SPI master controller can read and write to a SPI slave device [all …]
|
D | samsung,spi.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/spi/samsung,spi.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Samsung S3C/S5P/Exynos SoC SPI controller 10 - Krzysztof Kozlowski <[email protected]> 13 All the SPI controller nodes should be represented in the aliases node using 14 the following format 'spi{n}' where n is a unique number for the alias. 19 - enum: 20 - google,gs101-spi [all …]
|
D | brcm,bcm63xx-spi.yaml | 1 # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/spi/brcm,bcm63xx-spi.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Broadcom BCM6348/BCM6358 SPI controller 10 - Jonas Gorski <[email protected]> 13 Broadcom "Low Speed" SPI controller found in many older MIPS based Broadband 16 This controller has a limitation that can not keep the chip select line active 17 between the SPI transfers within the same SPI message. This can terminate the 18 transaction to some SPI devices prematurely. The issue can be worked around by [all …]
|
D | mediatek,spi-mtk-snfi.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/spi/mediatek,spi-mtk-snfi.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: SPI-NAND flash controller for MediaTek ARM SoCs 10 - Chuanhong Guo <[email protected]> 13 The Mediatek SPI-NAND flash controller is an extended version of 14 the Mediatek NAND flash controller. It can perform standard SPI 15 instructions with one continuous write and one read for up-to 0xa0 16 bytes. It also supports typical SPI-NAND page cache operations [all …]
|
D | mediatek,spi-mtk-nor.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/spi/mediatek,spi-mtk-nor.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Serial NOR flash controller for MediaTek ARM SoCs 10 - Bayi Cheng <[email protected]> 11 - Chuanhong Guo <[email protected]> 14 This spi controller support single, dual, or quad mode transfer for 15 SPI NOR flash. There should be only one spi slave device following 16 generic spi bindings. It's not recommended to use this controller [all …]
|
D | mediatek,spi-mt65xx.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/spi/mediatek,spi-mt65xx.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: SPI Bus controller for MediaTek ARM SoCs 10 - Leilk Liu <[email protected]> 13 - $ref: /schemas/spi/spi-controller.yaml# 18 - items: 19 - enum: 20 - mediatek,mt7629-spi [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 12 controller specific like delay in clock or data lines, etc. These properties 13 need to be defined in the peripheral node because they are per-peripheral and 14 there can be multiple peripherals attached to a controller. All those [all …]
|
D | spi-rockchip.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/spi/spi-rockchip.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Rockchip SPI Controller 10 The Rockchip SPI controller is used to interface with various devices such 11 as flash and display controllers using the SPI communication interface. 14 - $ref: spi-controller.yaml# 17 - Heiko Stuebner <[email protected]> 23 - const: rockchip,rk3036-spi [all …]
|
/linux-6.14.4/Documentation/spi/ |
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 host/target configuration. 17 clocking modes through which data is exchanged; mode-0 and mode-3 are most 22 SPI hosts use a fourth "chip select" line to activate a given SPI target 24 in parallel. All SPI targets support chipselects; they are usually active 29 SPI target functions are usually not interoperable between vendors [all …]
|
/linux-6.14.4/drivers/clk/qcom/ |
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 23 tristate "X1E80100 Camera Clock Controller" 27 Support for the camera clock controller on X1E80100 devices. 31 tristate "X1E80100 Display Clock Controller" 41 tristate "X1E80100 Global Clock Controller" 45 Support for the global clock controller on Qualcomm Technologies, Inc 47 Say Y if you want to use peripheral devices such as UART, SPI, I2C, 51 tristate "X1E80100 Graphics Clock Controller" 55 Support for the graphics clock controller on X1E80100 devices. 56 Say Y if you want to support graphics controller devices and [all …]
|
/linux-6.14.4/include/trace/events/ |
D | spi.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 #define TRACE_SYSTEM spi 13 TP_PROTO(struct spi_controller *controller), 15 TP_ARGS(controller), 22 __entry->bus_num = controller->bus_num; 25 TP_printk("spi%d", (int)__entry->bus_num) 31 TP_PROTO(struct spi_controller *controller), 33 TP_ARGS(controller) 39 TP_PROTO(struct spi_controller *controller), 41 TP_ARGS(controller) [all …]
|
/linux-6.14.4/include/linux/spi/ |
D | spi.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later 21 #include <uapi/linux/spi/spi.h> 23 /* Max no. of CS supported per spi device */ 36 * INTERFACES between SPI master-side drivers and SPI slave protocol handlers, 37 * and SPI infrastructure. 42 * struct spi_statistics - statistics for spi transfers 43 * @syncp: seqcount to protect members in this struct for per-cpu update 44 * on 32-bit systems 46 * @messages: number of spi-messages handled 95 u64_stats_update_begin(&__lstats->syncp); \ [all …]
|