Merge tag 'spi-v6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi updates from Mark Brown:
 "This release is almost entirely new drivers, with a couple of small
  changes in generic code.

  The biggest individual update is a rename of the existing Microchip
  driver and the addition of a new driver for the silicon SPI controller
  in their PolarFire SoCs. The overlap between the soft IP supported by
  the current driver and this new one is regrettably all in the IP and
  not in the register interface offered to software.

   - Add a time offset parameter for offloads, allowing them to be
     defined in relation to each other. This is useful for IIO type
     applcations where you trigger an operation then read the result
     after a delay.

   - Add a tracepoint for flash exec_ops, bringing the flash support
     more in line with the debuggability of vanilla SPI.

   - Support for Airoha EN7523, Arduino MCUs, Aspeed AST2700, Microchip
     PolarFire SPI controllers, NXP i.MX51 ECSPI target mode, Qualcomm
     IPQ5414 and IPQ5332, Renesas RZ/T2H, RZ/V2N and RZ/2NH and SpacemiT
     K1 QuadSPI.

  There's also a small set of ASoC cleanups that I mistakenly applied to
  the SPI tree and then put more stuff on top of before it was brought
  to my attention, sorry about that"

* tag 'spi-v6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (80 commits)
  spi: microchip-core: Refactor FIFO read and write handlers
  spi: ch341: fix out-of-bounds memory access in ch341_transfer_one
  spi: microchip-core: Remove unneeded PM related macro
  spi: microchip-core: Use SPI_MODE_X_MASK
  spi: microchip-core: Utilise temporary variable for struct device
  spi: microchip-core: Replace dead code (-ENOMEM error message)
  spi: microchip-core: use min() instead of min_t()
  spi: dt-bindings: airoha: add compatible for EN7523
  spi: airoha-snfi: en7523: workaround flash damaging if UART_TXD was short to GND
  spi: dt-bindings: renesas,rzv2h-rspi: Document RZ/V2N SoC support
  spi: dt-bindings: renesas,rzv2h-rspi: Document RZ/V2N SoC support
  spi: microchip: Enable compile-testing for FPGA SPI controllers
  spi: Fix potential uninitialized variable in probe()
  spi: rzv2h-rspi: add support for RZ/T2H and RZ/N2H
  spi: dt-bindings: renesas,rzv2h-rspi: document RZ/T2H and RZ/N2H
  spi: rzv2h-rspi: add support for loopback mode
  spi: rzv2h-rspi: add support for variable transfer clock
  spi: rzv2h-rspi: add support for using PCLK for transfer clock
  spi: rzv2h-rspi: make transfer clock rate finding chip-specific
  spi: rzv2h-rspi: avoid recomputing transfer frequency
  ...
This commit is contained in:
Linus Torvalds
2025-12-04 11:24:24 -08:00
42 changed files with 2495 additions and 907 deletions
@@ -14,7 +14,12 @@ allOf:
properties:
compatible:
const: airoha,en7581-snand
oneOf:
- const: airoha,en7581-snand
- items:
- enum:
- airoha,en7523-snand
- const: airoha,en7581-snand
reg:
items:
@@ -12,7 +12,7 @@ maintainers:
description: |
This binding describes the Aspeed Static Memory Controllers (FMC and
SPI) of the AST2400, AST2500 and AST2600 SOCs.
SPI) of the AST2400, AST2500, AST2600 and AST2700 SOCs.
allOf:
- $ref: spi-controller.yaml#
@@ -20,6 +20,8 @@ allOf:
properties:
compatible:
enum:
- aspeed,ast2700-fmc
- aspeed,ast2700-spi
- aspeed,ast2600-fmc
- aspeed,ast2600-spi
- aspeed,ast2500-fmc
@@ -9,9 +9,6 @@ title: Freescale Quad Serial Peripheral Interface (QuadSPI)
maintainers:
- Han Xu <han.xu@nxp.com>
allOf:
- $ref: spi-controller.yaml#
properties:
compatible:
oneOf:
@@ -22,6 +19,7 @@ properties:
- fsl,imx6ul-qspi
- fsl,ls1021a-qspi
- fsl,ls2080a-qspi
- spacemit,k1-qspi
- items:
- enum:
- fsl,ls1043a-qspi
@@ -54,6 +52,11 @@ properties:
- const: qspi_en
- const: qspi
resets:
items:
- description: SoC QSPI reset
- description: SoC QSPI bus reset
required:
- compatible
- reg
@@ -62,6 +65,18 @@ required:
- clocks
- clock-names
allOf:
- $ref: spi-controller.yaml#
- if:
properties:
compatible:
not:
contains:
const: spacemit,k1-qspi
then:
properties:
resets: false
unevaluatedProperties: false
examples:
@@ -21,11 +21,13 @@ properties:
- microchip,mpfs-qspi
- microchip,pic64gx-qspi
- const: microchip,coreqspi-rtl-v2
- const: microchip,coreqspi-rtl-v2 # FPGA QSPI
- enum:
- microchip,coreqspi-rtl-v2 # FPGA QSPI
- microchip,corespi-rtl-v5 # FPGA CoreSPI
- microchip,mpfs-spi
- items:
- const: microchip,pic64gx-spi
- const: microchip,mpfs-spi
- const: microchip,mpfs-spi
reg:
maxItems: 1
@@ -39,6 +41,45 @@ properties:
clocks:
maxItems: 1
microchip,apb-datawidth:
description: APB bus data width in bits.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [8, 16, 32]
default: 8
microchip,frame-size:
description: |
Number of bits per SPI frame, as configured in Libero.
In Motorola and TI modes, this corresponds directly
to the requested frame size. For NSC mode this is set
to 9 + the required data frame size.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 4
maximum: 32
default: 8
microchip,protocol-configuration:
description: CoreSPI protocol selection. Determines operating mode
$ref: /schemas/types.yaml#/definitions/string
enum:
- motorola
- ti
- nsc
default: motorola
microchip,motorola-mode:
description: Motorola SPI mode selection
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
default: 3
microchip,ssel-active:
description: |
Keep SSEL asserted between frames when using the Motorola protocol.
When present, the controller keeps SSEL active across contiguous
transfers and deasserts only when the overall transfer completes.
type: boolean
required:
- compatible
- reg
@@ -71,6 +112,31 @@ allOf:
num-cs:
maximum: 1
- if:
properties:
compatible:
contains:
const: microchip,corespi-rtl-v5
then:
properties:
num-cs:
minimum: 1
maximum: 8
default: 8
fifo-depth:
minimum: 1
maximum: 32
default: 4
else:
properties:
microchip,apb-datawidth: false
microchip,frame-size: false
microchip,protocol-configuration: false
microchip,motorola-mode: false
microchip,ssel-active: false
unevaluatedProperties: false
examples:
@@ -1,36 +0,0 @@
Nuvoton NPCM Peripheral Serial Peripheral Interface(PSPI) controller driver
Nuvoton NPCM7xx SOC support two PSPI channels.
Required properties:
- compatible : "nuvoton,npcm750-pspi" for Poleg NPCM7XX.
"nuvoton,npcm845-pspi" for Arbel NPCM8XX.
- #address-cells : should be 1. see spi-bus.txt
- #size-cells : should be 0. see spi-bus.txt
- specifies physical base address and size of the register.
- interrupts : contain PSPI interrupt.
- clocks : phandle of PSPI reference clock.
- clock-names: Should be "clk_apb5".
- pinctrl-names : a pinctrl state named "default" must be defined.
- pinctrl-0 : phandle referencing pin configuration of the device.
- resets : phandle to the reset control for this device.
- cs-gpios: Specifies the gpio pins to be used for chipselects.
See: Documentation/devicetree/bindings/spi/spi-bus.txt
Optional properties:
- clock-frequency : Input clock frequency to the PSPI block in Hz.
Default is 25000000 Hz.
spi0: spi@f0200000 {
compatible = "nuvoton,npcm750-pspi";
reg = <0xf0200000 0x1000>;
pinctrl-names = "default";
pinctrl-0 = <&pspi1_pins>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk NPCM7XX_CLK_APB5>;
clock-names = "clk_apb5";
resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_PSPI1>
cs-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
};
@@ -0,0 +1,72 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/nuvoton,npcm-pspi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nuvoton NPCM Peripheral SPI (PSPI) Controller
maintainers:
- Tomer Maimon <tmaimon77@gmail.com>
allOf:
- $ref: spi-controller.yaml#
description:
Nuvoton NPCM Peripheral Serial Peripheral Interface (PSPI) controller.
Nuvoton NPCM7xx SOC supports two PSPI channels.
Nuvoton NPCM8xx SOC support one PSPI channel.
properties:
compatible:
enum:
- nuvoton,npcm750-pspi # Poleg NPCM7XX
- nuvoton,npcm845-pspi # Arbel NPCM8XX
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
description: PSPI reference clock.
clock-names:
items:
- const: clk_apb5
resets:
maxItems: 1
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- resets
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/nuvoton,npcm7xx-reset.h>
#include "dt-bindings/gpio/gpio.h"
spi0: spi@f0200000 {
compatible = "nuvoton,npcm750-pspi";
reg = <0xf0200000 0x1000>;
pinctrl-names = "default";
pinctrl-0 = <&pspi1_pins>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk NPCM7XX_CLK_APB5>;
clock-names = "clk_apb5";
resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_PSPI1>;
cs-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
};
@@ -25,6 +25,8 @@ properties:
- items:
- enum:
- qcom,ipq5018-snand
- qcom,ipq5332-snand
- qcom,ipq5424-snand
- const: qcom,ipq9574-snand
- const: qcom,ipq9574-snand
@@ -9,12 +9,18 @@ title: Renesas RZ/V2H(P) Renesas Serial Peripheral Interface (RSPI)
maintainers:
- Fabrizio Castro <fabrizio.castro.jz@renesas.com>
allOf:
- $ref: spi-controller.yaml#
properties:
compatible:
const: renesas,r9a09g057-rspi # RZ/V2H(P)
oneOf:
- enum:
- renesas,r9a09g057-rspi # RZ/V2H(P)
- renesas,r9a09g077-rspi # RZ/T2H
- items:
- const: renesas,r9a09g056-rspi # RZ/V2N
- const: renesas,r9a09g057-rspi
- items:
- const: renesas,r9a09g087-rspi # RZ/N2H
- const: renesas,r9a09g077-rspi # RZ/T2H
reg:
maxItems: 1
@@ -36,13 +42,12 @@ properties:
- const: tx
clocks:
minItems: 2
maxItems: 3
clock-names:
items:
- const: pclk
- const: pclk_sfr
- const: tclk
minItems: 2
maxItems: 3
resets:
maxItems: 2
@@ -62,12 +67,52 @@ required:
- interrupt-names
- clocks
- clock-names
- resets
- reset-names
- power-domains
- '#address-cells'
- '#size-cells'
allOf:
- $ref: spi-controller.yaml#
- if:
properties:
compatible:
contains:
enum:
- renesas,r9a09g057-rspi
then:
properties:
clocks:
minItems: 3
clock-names:
items:
- const: pclk
- const: pclk_sfr
- const: tclk
required:
- resets
- reset-names
- if:
properties:
compatible:
contains:
enum:
- renesas,r9a09g077-rspi
then:
properties:
clocks:
maxItems: 2
clock-names:
items:
- const: pclk
- const: pclkspi
resets: false
reset-names: false
unevaluatedProperties: false
examples:
@@ -153,7 +153,7 @@ properties:
provides an interface to override the native DWC SSI CS control.
patternProperties:
"^.*@[0-9a-f]+$":
"@[0-9a-f]+$":
type: object
additionalProperties: true
@@ -21,6 +21,7 @@ properties:
- enum:
- xlnx,zynqmp-spi-r1p6
- xlnx,versal-net-spi-r1p6
- cix,sky1-spi-r1p6
- const: cdns,spi-r1p6
reg:
@@ -111,7 +111,7 @@ properties:
- compatible
patternProperties:
"^.*@[0-9a-f]+$":
"@[0-9a-f]+$":
type: object
$ref: spi-peripheral-props.yaml
additionalProperties: true
@@ -53,6 +53,8 @@ properties:
- adi,lt7182s
# AMS iAQ-Core VOC Sensor
- ams,iaq-core
# Arduino microcontroller interface over SPI on UnoQ board
- arduino,unoq-mcu
# Temperature monitoring of Astera Labs PT5161L PCIe retimer
- asteralabs,pt5161l
# i2c h/w elliptic curve crypto module
+2 -1
View File
@@ -22247,7 +22247,7 @@ F: drivers/reset/reset-mpfs.c
F: drivers/rtc/rtc-mpfs.c
F: drivers/soc/microchip/mpfs-sys-controller.c
F: drivers/spi/spi-microchip-core-qspi.c
F: drivers/spi/spi-microchip-core.c
F: drivers/spi/spi-mpfs.c
F: drivers/usb/musb/mpfs.c
F: include/soc/microchip/mpfs.h
@@ -24385,6 +24385,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
F: Documentation/devicetree/bindings/spi/
F: Documentation/spi/
F: drivers/spi/
F: include/trace/events/spi*
F: include/linux/spi/
F: include/uapi/linux/spi/
F: tools/spi/
+21 -10
View File
@@ -435,7 +435,8 @@ config SPI_FSL_LPSPI
config SPI_FSL_QUADSPI
tristate "Freescale QSPI controller"
depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || \
ARCH_SPACEMIT || COMPILE_TEST
depends on HAS_IOMEM
help
This enables support for the Quad SPI controller in master mode.
@@ -706,15 +707,6 @@ config SPI_MESON_SPIFC
This enables master mode support for the SPIFC (SPI flash
controller) available in Amlogic Meson SoCs.
config SPI_MICROCHIP_CORE
tristate "Microchip FPGA SPI controllers"
depends on SPI_MASTER
help
This enables the SPI driver for Microchip FPGA SPI controllers.
Say Y or M here if you want to use the "hard" controllers on
PolarFire SoC.
If built as a module, it will be called spi-microchip-core.
config SPI_MICROCHIP_CORE_QSPI
tristate "Microchip FPGA QSPI controllers"
depends on SPI_MASTER
@@ -724,6 +716,15 @@ config SPI_MICROCHIP_CORE_QSPI
PolarFire SoC.
If built as a module, it will be called spi-microchip-core-qspi.
config SPI_MICROCHIP_CORE_SPI
tristate "Microchip FPGA CoreSPI controller"
depends on SPI_MASTER
help
This enables the SPI driver for Microchip FPGA CoreSPI controller.
Say Y or M here if you want to use the "soft" controllers on
PolarFire SoC.
If built as a module, it will be called spi-microchip-core-spi.
config SPI_MT65XX
tristate "MediaTek SPI controller"
depends on ARCH_MEDIATEK || COMPILE_TEST
@@ -871,6 +872,16 @@ config SPI_PL022
controller. If you have an embedded system with an AMBA(R)
bus and a PL022 controller, say Y or M here.
config SPI_POLARFIRE_SOC
tristate "Microchip FPGA SPI controllers"
depends on SPI_MASTER
depends on ARCH_MICROCHIP || COMPILE_TEST
help
This enables the SPI driver for Microchip FPGA SPI controllers.
Say Y or M here if you want to use the "hard" controllers on
PolarFire SoC.
If built as a module, it will be called spi-mpfs.
config SPI_PPC4xx
tristate "PPC4xx SPI Controller"
depends on PPC32 && 4xx
+2 -1
View File
@@ -86,8 +86,8 @@ obj-$(CONFIG_SPI_LOONGSON_PLATFORM) += spi-loongson-plat.o
obj-$(CONFIG_SPI_LP8841_RTC) += spi-lp8841-rtc.o
obj-$(CONFIG_SPI_MESON_SPICC) += spi-meson-spicc.o
obj-$(CONFIG_SPI_MESON_SPIFC) += spi-meson-spifc.o
obj-$(CONFIG_SPI_MICROCHIP_CORE) += spi-microchip-core.o
obj-$(CONFIG_SPI_MICROCHIP_CORE_QSPI) += spi-microchip-core-qspi.o
obj-$(CONFIG_SPI_MICROCHIP_CORE_SPI) += spi-microchip-core-spi.o
obj-$(CONFIG_SPI_MPC512x_PSC) += spi-mpc512x-psc.o
obj-$(CONFIG_SPI_MPC52xx_PSC) += spi-mpc52xx-psc.o
obj-$(CONFIG_SPI_MPC52xx) += spi-mpc52xx.o
@@ -97,6 +97,7 @@ obj-$(CONFIG_SPI_MTK_NOR) += spi-mtk-nor.o
obj-$(CONFIG_SPI_MTK_SNFI) += spi-mtk-snfi.o
obj-$(CONFIG_SPI_MXIC) += spi-mxic.o
obj-$(CONFIG_SPI_MXS) += spi-mxs.o
obj-$(CONFIG_SPI_POLARFIRE_SOC) += spi-mpfs.o
obj-$(CONFIG_SPI_WPCM_FIU) += spi-wpcm-fiu.o
obj-$(CONFIG_SPI_NPCM_FIU) += spi-npcm-fiu.o
obj-$(CONFIG_SPI_NPCM_PSPI) += spi-npcm-pspi.o
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -582,8 +582,8 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
host->auto_runtime_pm = true;
bs->msg_type_shift = bs->reg_offsets[SPI_MSG_TYPE_SHIFT];
bs->msg_ctl_width = bs->reg_offsets[SPI_MSG_CTL_WIDTH];
bs->tx_io = (u8 *)(bs->regs + bs->reg_offsets[SPI_MSG_DATA]);
bs->rx_io = (const u8 *)(bs->regs + bs->reg_offsets[SPI_RX_DATA]);
bs->tx_io = bs->regs + bs->reg_offsets[SPI_MSG_DATA];
bs->rx_io = bs->regs + bs->reg_offsets[SPI_RX_DATA];
/* Initialize hardware */
ret = clk_prepare_enable(bs->clk);
+93 -13
View File
@@ -109,6 +109,7 @@
* @rxbuf: Pointer to the RX buffer
* @tx_bytes: Number of bytes left to transfer
* @rx_bytes: Number of bytes requested
* @n_bytes: Number of bytes per word
* @dev_busy: Device busy flag
* @is_decoded_cs: Flag for decoder property set or not
* @tx_fifo_depth: Depth of the TX FIFO
@@ -120,16 +121,24 @@ struct cdns_spi {
struct clk *pclk;
unsigned int clk_rate;
u32 speed_hz;
const u8 *txbuf;
u8 *rxbuf;
const void *txbuf;
void *rxbuf;
int tx_bytes;
int rx_bytes;
u8 n_bytes;
u8 dev_busy;
u32 is_decoded_cs;
unsigned int tx_fifo_depth;
struct reset_control *rstc;
};
enum cdns_spi_frame_n_bytes {
CDNS_SPI_N_BYTES_NULL = 0,
CDNS_SPI_N_BYTES_U8 = 1,
CDNS_SPI_N_BYTES_U16 = 2,
CDNS_SPI_N_BYTES_U32 = 4
};
/* Macros for the SPI controller read/write */
static inline u32 cdns_spi_read(struct cdns_spi *xspi, u32 offset)
{
@@ -305,6 +314,78 @@ static int cdns_spi_setup_transfer(struct spi_device *spi,
return 0;
}
static u8 cdns_spi_n_bytes(struct spi_transfer *transfer)
{
if (transfer->bits_per_word <= 8)
return CDNS_SPI_N_BYTES_U8;
else if (transfer->bits_per_word <= 16)
return CDNS_SPI_N_BYTES_U16;
else
return CDNS_SPI_N_BYTES_U32;
}
static inline void cdns_spi_reader(struct cdns_spi *xspi)
{
u32 rxw = 0;
if (xspi->rxbuf && !IS_ALIGNED((uintptr_t)xspi->rxbuf, xspi->n_bytes)) {
pr_err("%s: rxbuf address is not aligned for %d bytes\n",
__func__, xspi->n_bytes);
return;
}
rxw = cdns_spi_read(xspi, CDNS_SPI_RXD);
if (xspi->rxbuf) {
switch (xspi->n_bytes) {
case CDNS_SPI_N_BYTES_U8:
*(u8 *)xspi->rxbuf = rxw;
break;
case CDNS_SPI_N_BYTES_U16:
*(u16 *)xspi->rxbuf = rxw;
break;
case CDNS_SPI_N_BYTES_U32:
*(u32 *)xspi->rxbuf = rxw;
break;
default:
pr_err("%s invalid n_bytes %d\n", __func__,
xspi->n_bytes);
return;
}
xspi->rxbuf = (u8 *)xspi->rxbuf + xspi->n_bytes;
}
}
static inline void cdns_spi_writer(struct cdns_spi *xspi)
{
u32 txw = 0;
if (xspi->txbuf && !IS_ALIGNED((uintptr_t)xspi->txbuf, xspi->n_bytes)) {
pr_err("%s: txbuf address is not aligned for %d bytes\n",
__func__, xspi->n_bytes);
return;
}
if (xspi->txbuf) {
switch (xspi->n_bytes) {
case CDNS_SPI_N_BYTES_U8:
txw = *(u8 *)xspi->txbuf;
break;
case CDNS_SPI_N_BYTES_U16:
txw = *(u16 *)xspi->txbuf;
break;
case CDNS_SPI_N_BYTES_U32:
txw = *(u32 *)xspi->txbuf;
break;
default:
pr_err("%s invalid n_bytes %d\n", __func__,
xspi->n_bytes);
return;
}
cdns_spi_write(xspi, CDNS_SPI_TXD, txw);
xspi->txbuf = (u8 *)xspi->txbuf + xspi->n_bytes;
}
}
/**
* cdns_spi_process_fifo - Fills the TX FIFO, and drain the RX FIFO
* @xspi: Pointer to the cdns_spi structure
@@ -321,23 +402,14 @@ static void cdns_spi_process_fifo(struct cdns_spi *xspi, int ntx, int nrx)
while (ntx || nrx) {
if (nrx) {
u8 data = cdns_spi_read(xspi, CDNS_SPI_RXD);
if (xspi->rxbuf)
*xspi->rxbuf++ = data;
cdns_spi_reader(xspi);
nrx--;
}
if (ntx) {
if (xspi->txbuf)
cdns_spi_write(xspi, CDNS_SPI_TXD, *xspi->txbuf++);
else
cdns_spi_write(xspi, CDNS_SPI_TXD, 0);
cdns_spi_writer(xspi);
ntx--;
}
}
}
@@ -454,6 +526,10 @@ static int cdns_transfer_one(struct spi_controller *ctlr,
if (cdns_spi_read(xspi, CDNS_SPI_ISR) & CDNS_SPI_IXR_TXFULL)
udelay(10);
xspi->n_bytes = cdns_spi_n_bytes(transfer);
xspi->tx_bytes = DIV_ROUND_UP(xspi->tx_bytes, xspi->n_bytes);
xspi->rx_bytes = DIV_ROUND_UP(xspi->rx_bytes, xspi->n_bytes);
cdns_spi_process_fifo(xspi, xspi->tx_fifo_depth, 0);
cdns_spi_write(xspi, CDNS_SPI_IER, CDNS_SPI_IXR_DEFAULT);
@@ -654,6 +730,9 @@ static int cdns_spi_probe(struct platform_device *pdev)
ctlr->mode_bits = SPI_CPOL | SPI_CPHA;
ctlr->bits_per_word_mask = SPI_BPW_MASK(8);
if (of_device_is_compatible(pdev->dev.of_node, "cix,sky1-spi-r1p6"))
ctlr->bits_per_word_mask |= SPI_BPW_MASK(16) | SPI_BPW_MASK(32);
if (!spi_controller_is_target(ctlr)) {
ctlr->mode_bits |= SPI_CS_HIGH;
ctlr->set_cs = cdns_spi_chipselect;
@@ -797,6 +876,7 @@ static const struct dev_pm_ops cdns_spi_dev_pm_ops = {
static const struct of_device_id cdns_spi_of_match[] = {
{ .compatible = "xlnx,zynq-spi-r1p6" },
{ .compatible = "cix,sky1-spi-r1p6" },
{ .compatible = "cdns,spi-r1p6" },
{ /* end of table */ }
};
+1 -1
View File
@@ -78,7 +78,7 @@ static int ch341_transfer_one(struct spi_controller *host,
ch341->tx_buf[0] = CH341A_CMD_SPI_STREAM;
memcpy(ch341->tx_buf + 1, trans->tx_buf, len);
memcpy(ch341->tx_buf + 1, trans->tx_buf, len - 1);
ret = usb_bulk_msg(ch341->udev, ch341->write_pipe, ch341->tx_buf, len,
NULL, CH341_DEFAULT_TIMEOUT);

Some files were not shown because too many files have changed in this diff Show More