Skip to content

Commit 3d594a6

Browse files
committed
spi: spi-fsl-dspi: DSPI support for NXP S32G
Merge series from James Clark <james.clark@linaro.org>: DT and driver changes for DSPI on S32G platforms. First 3 commits are fixes for various edge cases which also apply to other platforms. Remaining commits add new S32G registers and device settings, some S32G specific fixes and then finally add the DT compatibles and binding docs. Tested in both host and target mode on S32G-VNP-RDB3 by transferring to an external device over spi1 using spidev_test.c
2 parents c459262 + 9a30e33 commit 3d594a6

3 files changed

Lines changed: 253 additions & 125 deletions

File tree

Documentation/devicetree/bindings/spi/fsl,dspi.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ properties:
2323
- fsl,ls2080a-dspi
2424
- fsl,ls2085a-dspi
2525
- fsl,lx2160a-dspi
26+
- nxp,s32g2-dspi
2627
- items:
2728
- enum:
2829
- fsl,ls1012a-dspi
@@ -37,6 +38,9 @@ properties:
3738
- items:
3839
- const: fsl,lx2160a-dspi
3940
- const: fsl,ls2085a-dspi
41+
- items:
42+
- const: nxp,s32g3-dspi
43+
- const: nxp,s32g2-dspi
4044

4145
reg:
4246
maxItems: 1
@@ -114,3 +118,17 @@ examples:
114118
spi-cs-hold-delay-ns = <50>;
115119
};
116120
};
121+
# S32G3 in target mode
122+
- |
123+
spi@401d4000 {
124+
compatible = "nxp,s32g3-dspi", "nxp,s32g2-dspi";
125+
reg = <0x401d4000 0x1000>;
126+
interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
127+
clocks = <&clks 26>;
128+
clock-names = "dspi";
129+
spi-num-chipselects = <8>;
130+
bus-num = <0>;
131+
dmas = <&edma0 0 7>, <&edma0 0 8>;
132+
dma-names = "tx", "rx";
133+
spi-slave;
134+
};

drivers/spi/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,10 @@ config SPI_FSL_SPI
647647
config SPI_FSL_DSPI
648648
tristate "Freescale DSPI controller"
649649
select REGMAP_MMIO
650-
depends on SOC_VF610 || SOC_LS1021A || ARCH_LAYERSCAPE || M5441x || COMPILE_TEST
650+
depends on ARCH_MXC || ARCH_NXP || M54541x || COMPILE_TEST
651651
help
652652
This enables support for the Freescale DSPI controller in master
653-
mode. VF610, LS1021A and ColdFire platforms uses the controller.
653+
mode. S32, VF610, LS1021A and ColdFire platforms uses the controller.
654654

655655
config SPI_FSL_ESPI
656656
tristate "Freescale eSPI controller"

0 commit comments

Comments
 (0)