-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge series "Support for Ingenic JZ47xx SPI controller" from Artur R…
…ojek <contact@artur-rojek.eu>: Hi, This patchset introduces support for SPI controllers found in the Ingenic JZ47xx family of SoCs. Of particular note, this allows to replace GPIO backed SPI on the MIPS Creator CI20 board. Mark: Checkpatch generates a `need consistent spacing around '*'` error on this patchset, however I believe this is a false positive due to it confusing a pointer with multiplication operator inside a macro. Rob: I refrained from adding SPI pin groups into the bindings, as I felt that would be enforcing a policy (SPI signals can be multiplexed on multiple pin groups on the board, per use case). Instead, I included an example pin configuration into the relevant commit description. Other controllers already present in ci20.dts do specify their pin groups, but I think this is bad practice. Do you have particular guidelines on this? Pavel: Feel free to add your Tested-by, if you still have your CI20 setup around :) I tested this driver with two SPI mode MMC/SD card readers and also with the spi-loopback test driver. Cheers, Artur Artur Rojek (2): SPI: add Ingenic JZ47xx driver. MIPS: JZ4780: CI20: DTS: add SPI controller config Paul Cercueil (1): dt-bindings: spi: Document Ingenic SPI controller bindings .../devicetree/bindings/spi/ingenic,spi.yaml | 72 +++ arch/mips/boot/dts/ingenic/ci20.dts | 9 +- arch/mips/boot/dts/ingenic/jz4780.dtsi | 44 +- drivers/spi/Kconfig | 9 + drivers/spi/Makefile | 1 + drivers/spi/spi-ingenic.c | 482 ++++++++++++++++++ 6 files changed, 602 insertions(+), 15 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/ingenic,spi.yaml create mode 100644 drivers/spi/spi-ingenic.c -- 2.33.0
- Loading branch information
Showing
6 changed files
with
602 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/spi/ingenic,spi.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Ingenic SoCs SPI controller devicetree bindings | ||
|
||
maintainers: | ||
- Artur Rojek <contact@artur-rojek.eu> | ||
- Paul Cercueil <paul@crapouillou.net> | ||
|
||
allOf: | ||
- $ref: /schemas/spi/spi-controller.yaml# | ||
|
||
properties: | ||
compatible: | ||
oneOf: | ||
- enum: | ||
- ingenic,jz4750-spi | ||
- ingenic,jz4780-spi | ||
- items: | ||
- enum: | ||
- ingenic,jz4760-spi | ||
- ingenic,jz4770-spi | ||
- const: ingenic,jz4750-spi | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
clocks: | ||
maxItems: 1 | ||
|
||
dmas: | ||
maxItems: 2 | ||
minItems: 2 | ||
|
||
dma-names: | ||
items: | ||
- const: rx | ||
- const: tx | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- interrupts | ||
- clocks | ||
- dmas | ||
- dma-names | ||
|
||
unevaluatedProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/clock/jz4770-cgu.h> | ||
spi@10043000 { | ||
compatible = "ingenic,jz4770-spi", "ingenic,jz4750-spi"; | ||
reg = <0x10043000 0x1c>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
interrupt-parent = <&intc>; | ||
interrupts = <8>; | ||
clocks = <&cgu JZ4770_CLK_SSI0>; | ||
dmas = <&dmac1 23 0xffffffff>, <&dmac1 22 0xffffffff>; | ||
dma-names = "rx", "tx"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.