Commit a2a89b2e21dbb68c9302a174013a1fab3a8ef42b

Authored by Patrice Chotard
1 parent 248278d7f7

spi: stm32: Add Serial Peripheral Interface driver for STM32MP

Add SPI driver support for STM32MP SoCs family.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>

Showing 4 changed files with 625 additions and 0 deletions Inline Diff

1 Descriptions of section entries: 1 Descriptions of section entries:
2 2
3 P: Person (obsolete) 3 P: Person (obsolete)
4 M: Mail patches to: FullName <address@domain> 4 M: Mail patches to: FullName <address@domain>
5 R: Designated reviewer: FullName <address@domain> 5 R: Designated reviewer: FullName <address@domain>
6 These reviewers should be CCed on patches. 6 These reviewers should be CCed on patches.
7 L: Mailing list that is relevant to this area 7 L: Mailing list that is relevant to this area
8 W: Web-page with status/info 8 W: Web-page with status/info
9 Q: Patchwork web based patch tracking system site 9 Q: Patchwork web based patch tracking system site
10 T: SCM tree type and location. 10 T: SCM tree type and location.
11 Type is one of: git, hg, quilt, stgit, topgit 11 Type is one of: git, hg, quilt, stgit, topgit
12 S: Status, one of the following: 12 S: Status, one of the following:
13 Supported: Someone is actually paid to look after this. 13 Supported: Someone is actually paid to look after this.
14 Maintained: Someone actually looks after it. 14 Maintained: Someone actually looks after it.
15 Orphan: No current maintainer [but maybe you could take the 15 Orphan: No current maintainer [but maybe you could take the
16 role as you write your new code]. 16 role as you write your new code].
17 F: Files and directories with wildcard patterns. 17 F: Files and directories with wildcard patterns.
18 A trailing slash includes all files and subdirectory files. 18 A trailing slash includes all files and subdirectory files.
19 F: drivers/net/ all files in and below drivers/net 19 F: drivers/net/ all files in and below drivers/net
20 F: drivers/net/* all files in drivers/net, but not below 20 F: drivers/net/* all files in drivers/net, but not below
21 F: */net/* all files in "any top level directory"/net 21 F: */net/* all files in "any top level directory"/net
22 One pattern per line. Multiple F: lines acceptable. 22 One pattern per line. Multiple F: lines acceptable.
23 N: Files and directories with regex patterns. 23 N: Files and directories with regex patterns.
24 N: [^a-z]tegra all files whose path contains the word tegra 24 N: [^a-z]tegra all files whose path contains the word tegra
25 One pattern per line. Multiple N: lines acceptable. 25 One pattern per line. Multiple N: lines acceptable.
26 scripts/get_maintainer.pl has different behavior for files that 26 scripts/get_maintainer.pl has different behavior for files that
27 match F: pattern and matches of N: patterns. By default, 27 match F: pattern and matches of N: patterns. By default,
28 get_maintainer will not look at git log history when an F: pattern 28 get_maintainer will not look at git log history when an F: pattern
29 match occurs. When an N: match occurs, git log history is used 29 match occurs. When an N: match occurs, git log history is used
30 to also notify the people that have git commit signatures. 30 to also notify the people that have git commit signatures.
31 X: Files and directories that are NOT maintained, same rules as F: 31 X: Files and directories that are NOT maintained, same rules as F:
32 Files exclusions are tested before file matches. 32 Files exclusions are tested before file matches.
33 Can be useful for excluding a specific subdirectory, for instance: 33 Can be useful for excluding a specific subdirectory, for instance:
34 F: net/ 34 F: net/
35 X: net/ipv6/ 35 X: net/ipv6/
36 matches all files in and below net excluding net/ipv6/ 36 matches all files in and below net excluding net/ipv6/
37 K: Keyword perl extended regex pattern to match content in a 37 K: Keyword perl extended regex pattern to match content in a
38 patch or file. For instance: 38 patch or file. For instance:
39 K: of_get_profile 39 K: of_get_profile
40 matches patches or files that contain "of_get_profile" 40 matches patches or files that contain "of_get_profile"
41 K: \b(printk|pr_(info|err))\b 41 K: \b(printk|pr_(info|err))\b
42 matches patches or files that contain one or more of the words 42 matches patches or files that contain one or more of the words
43 printk, pr_info or pr_err 43 printk, pr_info or pr_err
44 One regex pattern per line. Multiple K: lines acceptable. 44 One regex pattern per line. Multiple K: lines acceptable.
45 45
46 Note: For the hard of thinking, this list is meant to remain in alphabetical 46 Note: For the hard of thinking, this list is meant to remain in alphabetical
47 order. If you could add yourselves to it in alphabetical order that would be 47 order. If you could add yourselves to it in alphabetical order that would be
48 so much easier [Ed] 48 so much easier [Ed]
49 49
50 Maintainers List (try to look for most precise areas first) 50 Maintainers List (try to look for most precise areas first)
51 51
52 ----------------------------------- 52 -----------------------------------
53 ARC 53 ARC
54 M: Alexey Brodkin <alexey.brodkin@synopsys.com> 54 M: Alexey Brodkin <alexey.brodkin@synopsys.com>
55 M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> 55 M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
56 S: Maintained 56 S: Maintained
57 L: uboot-snps-arc@synopsys.com 57 L: uboot-snps-arc@synopsys.com
58 T: git git://git.denx.de/u-boot-arc.git 58 T: git git://git.denx.de/u-boot-arc.git
59 F: arch/arc/ 59 F: arch/arc/
60 F: board/synopsys/ 60 F: board/synopsys/
61 61
62 ARC HSDK CGU CLOCK 62 ARC HSDK CGU CLOCK
63 M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> 63 M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
64 S: Maintained 64 S: Maintained
65 L: uboot-snps-arc@synopsys.com 65 L: uboot-snps-arc@synopsys.com
66 F: drivers/clk/clk-hsdk-cgu.c 66 F: drivers/clk/clk-hsdk-cgu.c
67 F: include/dt-bindings/clock/snps,hsdk-cgu.h 67 F: include/dt-bindings/clock/snps,hsdk-cgu.h
68 F: doc/device-tree-bindings/clock/snps,hsdk-cgu.txt 68 F: doc/device-tree-bindings/clock/snps,hsdk-cgu.txt
69 69
70 ARC HSDK CREG GPIO 70 ARC HSDK CREG GPIO
71 M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> 71 M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
72 S: Maintained 72 S: Maintained
73 L: uboot-snps-arc@synopsys.com 73 L: uboot-snps-arc@synopsys.com
74 F: doc/device-tree-bindings/gpio/snps,creg-gpio.txt 74 F: doc/device-tree-bindings/gpio/snps,creg-gpio.txt
75 F: drivers/gpio/hsdk-creg-gpio.c 75 F: drivers/gpio/hsdk-creg-gpio.c
76 76
77 ARC SYNOPSYS DW MMC EXTENSIONS 77 ARC SYNOPSYS DW MMC EXTENSIONS
78 M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> 78 M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
79 S: Maintained 79 S: Maintained
80 L: uboot-snps-arc@synopsys.com 80 L: uboot-snps-arc@synopsys.com
81 F: doc/device-tree-bindings/mmc/snps,dw-mmc.txt 81 F: doc/device-tree-bindings/mmc/snps,dw-mmc.txt
82 F: drivers/mmc/snps_dw_mmc.c 82 F: drivers/mmc/snps_dw_mmc.c
83 83
84 ARM 84 ARM
85 M: Albert Aribaud <albert.u.boot@aribaud.net> 85 M: Albert Aribaud <albert.u.boot@aribaud.net>
86 S: Maintained 86 S: Maintained
87 T: git git://git.denx.de/u-boot-arm.git 87 T: git git://git.denx.de/u-boot-arm.git
88 F: arch/arm/ 88 F: arch/arm/
89 F: cmd/arm/ 89 F: cmd/arm/
90 90
91 ARM ALTERA SOCFPGA 91 ARM ALTERA SOCFPGA
92 M: Marek Vasut <marex@denx.de> 92 M: Marek Vasut <marex@denx.de>
93 M: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> 93 M: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
94 S: Maintainted 94 S: Maintainted
95 T: git git://git.denx.de/u-boot-socfpga.git 95 T: git git://git.denx.de/u-boot-socfpga.git
96 F: arch/arm/mach-socfpga/ 96 F: arch/arm/mach-socfpga/
97 97
98 ARM AMLOGIC SOC SUPPORT 98 ARM AMLOGIC SOC SUPPORT
99 M: Neil Armstrong <narmstrong@baylibre.com> 99 M: Neil Armstrong <narmstrong@baylibre.com>
100 S: Maintained 100 S: Maintained
101 L: u-boot-amlogic@groups.io 101 L: u-boot-amlogic@groups.io
102 T: git git://git.denx.de/u-boot-amlogic.git 102 T: git git://git.denx.de/u-boot-amlogic.git
103 F: arch/arm/mach-meson/ 103 F: arch/arm/mach-meson/
104 F: arch/arm/include/asm/arch-meson/ 104 F: arch/arm/include/asm/arch-meson/
105 F: drivers/clk/meson/ 105 F: drivers/clk/meson/
106 F: drivers/serial/serial_meson.c 106 F: drivers/serial/serial_meson.c
107 F: drivers/reset/reset-meson.c 107 F: drivers/reset/reset-meson.c
108 F: drivers/i2c/meson_i2c.c 108 F: drivers/i2c/meson_i2c.c
109 F: drivers/net/phy/meson-gxl.c 109 F: drivers/net/phy/meson-gxl.c
110 F: drivers/adc/meson-saradc.c 110 F: drivers/adc/meson-saradc.c
111 F: drivers/phy/meson* 111 F: drivers/phy/meson*
112 F: drivers/mmc/meson_gx_mmc.c 112 F: drivers/mmc/meson_gx_mmc.c
113 F: drivers/spi/meson_spifc.c 113 F: drivers/spi/meson_spifc.c
114 F: drivers/pinctrl/meson/ 114 F: drivers/pinctrl/meson/
115 F: drivers/power/domain/meson-gx-pwrc-vpu.c 115 F: drivers/power/domain/meson-gx-pwrc-vpu.c
116 F: drivers/video/meson/ 116 F: drivers/video/meson/
117 F: include/configs/meson64.h 117 F: include/configs/meson64.h
118 N: meson 118 N: meson
119 119
120 ARM BROADCOM BCM283X 120 ARM BROADCOM BCM283X
121 M: Matthias Brugger <mbrugger@suse.com> 121 M: Matthias Brugger <mbrugger@suse.com>
122 S: Maintained 122 S: Maintained
123 F: arch/arm/mach-bcm283x/ 123 F: arch/arm/mach-bcm283x/
124 F: drivers/gpio/bcm2835_gpio.c 124 F: drivers/gpio/bcm2835_gpio.c
125 F: drivers/mmc/bcm2835_sdhci.c 125 F: drivers/mmc/bcm2835_sdhci.c
126 F: drivers/mmc/bcm2835_sdhost.c 126 F: drivers/mmc/bcm2835_sdhost.c
127 F: drivers/serial/serial_bcm283x_mu.c 127 F: drivers/serial/serial_bcm283x_mu.c
128 F: drivers/serial/serial_bcm283x_pl011.c 128 F: drivers/serial/serial_bcm283x_pl011.c
129 F: drivers/video/bcm2835.c 129 F: drivers/video/bcm2835.c
130 F: include/dm/platform_data/serial_bcm283x_mu.h 130 F: include/dm/platform_data/serial_bcm283x_mu.h
131 F: drivers/pinctrl/broadcom/ 131 F: drivers/pinctrl/broadcom/
132 132
133 ARM BROADCOM BCMSTB 133 ARM BROADCOM BCMSTB
134 M: Thomas Fitzsimmons <fitzsim@fitzsim.org> 134 M: Thomas Fitzsimmons <fitzsim@fitzsim.org>
135 S: Maintained 135 S: Maintained
136 F: arch/arm/mach-bcmstb/ 136 F: arch/arm/mach-bcmstb/
137 F: board/broadcom/bcmstb/ 137 F: board/broadcom/bcmstb/
138 F: configs/bcm7*_defconfig 138 F: configs/bcm7*_defconfig
139 F: doc/README.bcm7xxx 139 F: doc/README.bcm7xxx
140 F: drivers/mmc/bcmstb_sdhci.c 140 F: drivers/mmc/bcmstb_sdhci.c
141 F: drivers/spi/bcmstb_spi.c 141 F: drivers/spi/bcmstb_spi.c
142 142
143 ARM/CZ.NIC TURRIS MOX SUPPORT 143 ARM/CZ.NIC TURRIS MOX SUPPORT
144 M: Marek Behun <marek.behun@nic.cz> 144 M: Marek Behun <marek.behun@nic.cz>
145 S: Maintained 145 S: Maintained
146 F: arch/arm/dts/armada-3720-turris-mox.dts 146 F: arch/arm/dts/armada-3720-turris-mox.dts
147 F: board/CZ.NIC/ 147 F: board/CZ.NIC/
148 F: configs/turris_*_defconfig 148 F: configs/turris_*_defconfig
149 F: include/configs/turris_*.h 149 F: include/configs/turris_*.h
150 150
151 ARM FREESCALE IMX 151 ARM FREESCALE IMX
152 M: Stefano Babic <sbabic@denx.de> 152 M: Stefano Babic <sbabic@denx.de>
153 M: Fabio Estevam <festevam@gmail.com> 153 M: Fabio Estevam <festevam@gmail.com>
154 R: NXP i.MX U-Boot Team <uboot-imx@nxp.com> 154 R: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
155 S: Maintained 155 S: Maintained
156 T: git git://git.denx.de/u-boot-imx.git 156 T: git git://git.denx.de/u-boot-imx.git
157 F: arch/arm/cpu/arm1136/mx*/ 157 F: arch/arm/cpu/arm1136/mx*/
158 F: arch/arm/cpu/arm926ejs/mx*/ 158 F: arch/arm/cpu/arm926ejs/mx*/
159 F: arch/arm/cpu/armv7/vf610/ 159 F: arch/arm/cpu/armv7/vf610/
160 F: arch/arm/mach-imx/ 160 F: arch/arm/mach-imx/
161 F: arch/arm/include/asm/arch-imx/ 161 F: arch/arm/include/asm/arch-imx/
162 F: arch/arm/include/asm/arch-mx*/ 162 F: arch/arm/include/asm/arch-mx*/
163 F: arch/arm/include/asm/arch-vf610/ 163 F: arch/arm/include/asm/arch-vf610/
164 F: arch/arm/include/asm/mach-imx/ 164 F: arch/arm/include/asm/mach-imx/
165 F: board/freescale/*mx*/ 165 F: board/freescale/*mx*/
166 166
167 ARM HISILICON 167 ARM HISILICON
168 M: Peter Griffin <peter.griffin@linaro.org> 168 M: Peter Griffin <peter.griffin@linaro.org>
169 S: Maintained 169 S: Maintained
170 F: arch/arm/cpu/armv8/hisilicon 170 F: arch/arm/cpu/armv8/hisilicon
171 F: arch/arm/include/asm/arch-hi6220/ 171 F: arch/arm/include/asm/arch-hi6220/
172 172
173 ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X ARMADA-37XX ARMADA-7K/8K 173 ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X ARMADA-37XX ARMADA-7K/8K
174 M: Stefan Roese <sr@denx.de> 174 M: Stefan Roese <sr@denx.de>
175 S: Maintained 175 S: Maintained
176 T: git git://git.denx.de/u-boot-marvell.git 176 T: git git://git.denx.de/u-boot-marvell.git
177 F: arch/arm/mach-kirkwood/ 177 F: arch/arm/mach-kirkwood/
178 F: arch/arm/mach-mvebu/ 178 F: arch/arm/mach-mvebu/
179 F: drivers/ata/ahci_mvebu.c 179 F: drivers/ata/ahci_mvebu.c
180 F: drivers/ddr/marvell/ 180 F: drivers/ddr/marvell/
181 F: drivers/gpio/mvebu_gpio.c 181 F: drivers/gpio/mvebu_gpio.c
182 F: drivers/spi/kirkwood_spi.c 182 F: drivers/spi/kirkwood_spi.c
183 F: drivers/pci/pci_mvebu.c 183 F: drivers/pci/pci_mvebu.c
184 F: drivers/pci/pcie_dw_mvebu.c 184 F: drivers/pci/pcie_dw_mvebu.c
185 F: drivers/watchdog/orion_wdt.c 185 F: drivers/watchdog/orion_wdt.c
186 186
187 ARM MARVELL PXA 187 ARM MARVELL PXA
188 M: Marek Vasut <marex@denx.de> 188 M: Marek Vasut <marex@denx.de>
189 S: Maintained 189 S: Maintained
190 T: git git://git.denx.de/u-boot-pxa.git 190 T: git git://git.denx.de/u-boot-pxa.git
191 F: arch/arm/cpu/pxa/ 191 F: arch/arm/cpu/pxa/
192 F: arch/arm/include/asm/arch-pxa/ 192 F: arch/arm/include/asm/arch-pxa/
193 193
194 ARM MEDIATEK 194 ARM MEDIATEK
195 M: Ryder Lee <ryder.lee@mediatek.com> 195 M: Ryder Lee <ryder.lee@mediatek.com>
196 M: Weijie Gao <weijie.gao@mediatek.com> 196 M: Weijie Gao <weijie.gao@mediatek.com>
197 S: Maintained 197 S: Maintained
198 F: arch/arm/mach-mediatek/ 198 F: arch/arm/mach-mediatek/
199 F: arch/arm/include/asm/arch-mediatek/ 199 F: arch/arm/include/asm/arch-mediatek/
200 F: board/mediatek/ 200 F: board/mediatek/
201 F: doc/README.mediatek 201 F: doc/README.mediatek
202 F: drivers/clk/mediatek/ 202 F: drivers/clk/mediatek/
203 F: drivers/mmc/mtk-sd.c 203 F: drivers/mmc/mtk-sd.c
204 F: drivers/pinctrl/mediatek/ 204 F: drivers/pinctrl/mediatek/
205 F: drivers/power/domain/mtk-power-domain.c 205 F: drivers/power/domain/mtk-power-domain.c
206 F: drivers/ram/mediatek/ 206 F: drivers/ram/mediatek/
207 F: drivers/spi/mtk_qspi.c 207 F: drivers/spi/mtk_qspi.c
208 F: drivers/timer/mtk_timer.c 208 F: drivers/timer/mtk_timer.c
209 F: drivers/watchdog/mtk_wdt.c 209 F: drivers/watchdog/mtk_wdt.c
210 F: drivers/net/mtk_eth.c 210 F: drivers/net/mtk_eth.c
211 F: drivers/reset/reset-mediatek.c 211 F: drivers/reset/reset-mediatek.c
212 F: tools/mtk_image.c 212 F: tools/mtk_image.c
213 F: tools/mtk_image.h 213 F: tools/mtk_image.h
214 N: mediatek 214 N: mediatek
215 215
216 ARM MICROCHIP/ATMEL AT91 216 ARM MICROCHIP/ATMEL AT91
217 M: Eugen Hristev <eugen.hristev@microchip.com> 217 M: Eugen Hristev <eugen.hristev@microchip.com>
218 S: Maintained 218 S: Maintained
219 T: git git://git.denx.de/u-boot-atmel.git 219 T: git git://git.denx.de/u-boot-atmel.git
220 F: arch/arm/mach-at91/ 220 F: arch/arm/mach-at91/
221 F: board/atmel/ 221 F: board/atmel/
222 222
223 ARM OWL 223 ARM OWL
224 M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 224 M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
225 S: Maintained 225 S: Maintained
226 F: arch/arm/include/asm/arch-owl/ 226 F: arch/arm/include/asm/arch-owl/
227 F: arch/arm/mach-owl/ 227 F: arch/arm/mach-owl/
228 F: board/ucRobotics/ 228 F: board/ucRobotics/
229 F: drivers/clk/owl/ 229 F: drivers/clk/owl/
230 F: drivers/serial/serial_owl.c 230 F: drivers/serial/serial_owl.c
231 231
232 ARM RENESAS RMOBILE/R-CAR 232 ARM RENESAS RMOBILE/R-CAR
233 M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> 233 M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
234 M: Marek Vasut <marek.vasut+renesas@gmail.com> 234 M: Marek Vasut <marek.vasut+renesas@gmail.com>
235 S: Maintained 235 S: Maintained
236 T: git git://git.denx.de/u-boot-sh.git 236 T: git git://git.denx.de/u-boot-sh.git
237 F: arch/arm/mach-rmobile/ 237 F: arch/arm/mach-rmobile/
238 238
239 ARM ROCKCHIP 239 ARM ROCKCHIP
240 M: Simon Glass <sjg@chromium.org> 240 M: Simon Glass <sjg@chromium.org>
241 M: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> 241 M: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
242 M: Kever Yang <kever.yang@rock-chips.com> 242 M: Kever Yang <kever.yang@rock-chips.com>
243 S: Maintained 243 S: Maintained
244 T: git git://git.denx.de/u-boot-rockchip.git 244 T: git git://git.denx.de/u-boot-rockchip.git
245 F: arch/arm/include/asm/arch-rockchip/ 245 F: arch/arm/include/asm/arch-rockchip/
246 F: arch/arm/mach-rockchip/ 246 F: arch/arm/mach-rockchip/
247 F: board/rockchip/ 247 F: board/rockchip/
248 F: drivers/clk/rockchip/ 248 F: drivers/clk/rockchip/
249 F: drivers/gpio/rk_gpio.c 249 F: drivers/gpio/rk_gpio.c
250 F: drivers/misc/rockchip-efuse.c 250 F: drivers/misc/rockchip-efuse.c
251 F: drivers/mmc/rockchip_sdhci.c 251 F: drivers/mmc/rockchip_sdhci.c
252 F: drivers/mmc/rockchip_dw_mmc.c 252 F: drivers/mmc/rockchip_dw_mmc.c
253 F: drivers/pinctrl/rockchip/ 253 F: drivers/pinctrl/rockchip/
254 F: drivers/ram/rockchip/ 254 F: drivers/ram/rockchip/
255 F: drivers/sysreset/sysreset_rockchip.c 255 F: drivers/sysreset/sysreset_rockchip.c
256 F: drivers/video/rockchip/ 256 F: drivers/video/rockchip/
257 F: tools/rkcommon.c 257 F: tools/rkcommon.c
258 F: tools/rkcommon.h 258 F: tools/rkcommon.h
259 F: tools/rkimage.c 259 F: tools/rkimage.c
260 F: tools/rksd.c 260 F: tools/rksd.c
261 F: tools/rkspi.c 261 F: tools/rkspi.c
262 262
263 ARM SAMSUNG 263 ARM SAMSUNG
264 M: Minkyu Kang <mk7.kang@samsung.com> 264 M: Minkyu Kang <mk7.kang@samsung.com>
265 S: Maintained 265 S: Maintained
266 T: git git://git.denx.de/u-boot-samsung.git 266 T: git git://git.denx.de/u-boot-samsung.git
267 F: arch/arm/mach-exynos/ 267 F: arch/arm/mach-exynos/
268 F: arch/arm/mach-s5pc1xx/ 268 F: arch/arm/mach-s5pc1xx/
269 F: arch/arm/cpu/armv7/s5p-common/ 269 F: arch/arm/cpu/armv7/s5p-common/
270 270
271 ARM SNAPDRAGON 271 ARM SNAPDRAGON
272 M: Ramon Fried <ramon.fried@gmail.com> 272 M: Ramon Fried <ramon.fried@gmail.com>
273 S: Maintained 273 S: Maintained
274 F: arch/arm/mach-snapdragon/ 274 F: arch/arm/mach-snapdragon/
275 F: drivers/gpio/msm_gpio.c 275 F: drivers/gpio/msm_gpio.c
276 F: drivers/mmc/msm_sdhci.c 276 F: drivers/mmc/msm_sdhci.c
277 F: drivers/phy/msm8916-usbh-phy.c 277 F: drivers/phy/msm8916-usbh-phy.c
278 F: drivers/serial/serial_msm.c 278 F: drivers/serial/serial_msm.c
279 F: drivers/smem/msm_smem.c 279 F: drivers/smem/msm_smem.c
280 F: drivers/usb/host/ehci-msm.c 280 F: drivers/usb/host/ehci-msm.c
281 281
282 ARM STI 282 ARM STI
283 M: Patrice Chotard <patrice.chotard@st.com> 283 M: Patrice Chotard <patrice.chotard@st.com>
284 S: Maintained 284 S: Maintained
285 F: arch/arm/mach-sti/ 285 F: arch/arm/mach-sti/
286 F: arch/arm/include/asm/arch-sti*/ 286 F: arch/arm/include/asm/arch-sti*/
287 287
288 ARM STM SPEAR 288 ARM STM SPEAR
289 #M: Vipin Kumar <vipin.kumar@st.com> 289 #M: Vipin Kumar <vipin.kumar@st.com>
290 S: Orphaned (Since 2016-02) 290 S: Orphaned (Since 2016-02)
291 T: git git://git.denx.de/u-boot-stm.git 291 T: git git://git.denx.de/u-boot-stm.git
292 F: arch/arm/cpu/arm926ejs/spear/ 292 F: arch/arm/cpu/arm926ejs/spear/
293 F: arch/arm/include/asm/arch-spear/ 293 F: arch/arm/include/asm/arch-spear/
294 294
295 ARM STM STM32MP 295 ARM STM STM32MP
296 M: Patrick Delaunay <patrick.delaunay@st.com> 296 M: Patrick Delaunay <patrick.delaunay@st.com>
297 M: Christophe Kerello <christophe.kerello@st.com> 297 M: Christophe Kerello <christophe.kerello@st.com>
298 M: Patrice Chotard <patrice.chotard@st.com> 298 M: Patrice Chotard <patrice.chotard@st.com>
299 L: uboot-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers) 299 L: uboot-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers)
300 S: Maintained 300 S: Maintained
301 F: arch/arm/mach-stm32mp/ 301 F: arch/arm/mach-stm32mp/
302 F: drivers/clk/clk_stm32mp1.c 302 F: drivers/clk/clk_stm32mp1.c
303 F: drivers/i2c/stm32f7_i2c.c 303 F: drivers/i2c/stm32f7_i2c.c
304 F: drivers/misc/stm32mp_fuse.c 304 F: drivers/misc/stm32mp_fuse.c
305 F: drivers/mmc/stm32_sdmmc2.c 305 F: drivers/mmc/stm32_sdmmc2.c
306 F: drivers/phy/phy-stm32-usbphyc.c 306 F: drivers/phy/phy-stm32-usbphyc.c
307 F: drivers/pinctrl/pinctrl_stm32.c 307 F: drivers/pinctrl/pinctrl_stm32.c
308 F: drivers/power/pmic/stpmic1.c 308 F: drivers/power/pmic/stpmic1.c
309 F: drivers/power/regulator/stm32-vrefbuf.c 309 F: drivers/power/regulator/stm32-vrefbuf.c
310 F: drivers/power/regulator/stpmic1.c 310 F: drivers/power/regulator/stpmic1.c
311 F: drivers/ram/stm32mp1/ 311 F: drivers/ram/stm32mp1/
312 F: drivers/misc/stm32_rcc.c 312 F: drivers/misc/stm32_rcc.c
313 F: drivers/reset/stm32-reset.c 313 F: drivers/reset/stm32-reset.c
314 F: drivers/spi/stm32_qspi.c 314 F: drivers/spi/stm32_qspi.c
315 F: drivers/spi/stm32_spi.c
315 F: drivers/watchdog/stm32mp_wdt.c 316 F: drivers/watchdog/stm32mp_wdt.c
316 317
317 ARM STM STV0991 318 ARM STM STV0991
318 M: Vikas Manocha <vikas.manocha@st.com> 319 M: Vikas Manocha <vikas.manocha@st.com>
319 S: Maintained 320 S: Maintained
320 F: arch/arm/cpu/armv7/stv0991/ 321 F: arch/arm/cpu/armv7/stv0991/
321 F: arch/arm/include/asm/arch-stv0991/ 322 F: arch/arm/include/asm/arch-stv0991/
322 323
323 ARM SUNXI 324 ARM SUNXI
324 M: Jagan Teki <jagan@amarulasolutions.com> 325 M: Jagan Teki <jagan@amarulasolutions.com>
325 M: Maxime Ripard <maxime.ripard@bootlin.com> 326 M: Maxime Ripard <maxime.ripard@bootlin.com>
326 S: Maintained 327 S: Maintained
327 T: git git://git.denx.de/u-boot-sunxi.git 328 T: git git://git.denx.de/u-boot-sunxi.git
328 F: arch/arm/cpu/armv7/sunxi/ 329 F: arch/arm/cpu/armv7/sunxi/
329 F: arch/arm/include/asm/arch-sunxi/ 330 F: arch/arm/include/asm/arch-sunxi/
330 F: arch/arm/mach-sunxi/ 331 F: arch/arm/mach-sunxi/
331 F: board/sunxi/ 332 F: board/sunxi/
332 333
333 ARM TEGRA 334 ARM TEGRA
334 M: Tom Warren <twarren@nvidia.com> 335 M: Tom Warren <twarren@nvidia.com>
335 S: Maintained 336 S: Maintained
336 T: git git://git.denx.de/u-boot-tegra.git 337 T: git git://git.denx.de/u-boot-tegra.git
337 F: arch/arm/mach-tegra/ 338 F: arch/arm/mach-tegra/
338 F: arch/arm/include/asm/arch-tegra*/ 339 F: arch/arm/include/asm/arch-tegra*/
339 340
340 ARM TI 341 ARM TI
341 M: Tom Rini <trini@konsulko.com> 342 M: Tom Rini <trini@konsulko.com>
342 S: Maintained 343 S: Maintained
343 T: git git://git.denx.de/u-boot-ti.git 344 T: git git://git.denx.de/u-boot-ti.git
344 F: arch/arm/mach-davinci/ 345 F: arch/arm/mach-davinci/
345 F: arch/arm/mach-k3/ 346 F: arch/arm/mach-k3/
346 F: arch/arm/mach-keystone/ 347 F: arch/arm/mach-keystone/
347 F: arch/arm/include/asm/arch-omap*/ 348 F: arch/arm/include/asm/arch-omap*/
348 F: arch/arm/include/asm/ti-common/ 349 F: arch/arm/include/asm/ti-common/
349 350
350 ARM UNIPHIER 351 ARM UNIPHIER
351 M: Masahiro Yamada <yamada.masahiro@socionext.com> 352 M: Masahiro Yamada <yamada.masahiro@socionext.com>
352 S: Maintained 353 S: Maintained
353 T: git git://git.denx.de/u-boot-uniphier.git 354 T: git git://git.denx.de/u-boot-uniphier.git
354 F: arch/arm/mach-uniphier/ 355 F: arch/arm/mach-uniphier/
355 F: configs/uniphier_*_defconfig 356 F: configs/uniphier_*_defconfig
356 N: uniphier 357 N: uniphier
357 358
358 ARM VERSAL 359 ARM VERSAL
359 M: Michal Simek <michal.simek@xilinx.com> 360 M: Michal Simek <michal.simek@xilinx.com>
360 S: Maintained 361 S: Maintained
361 T: git git://git.denx.de/u-boot-microblaze.git 362 T: git git://git.denx.de/u-boot-microblaze.git
362 F: arch/arm/mach-versal/ 363 F: arch/arm/mach-versal/
363 364
364 ARM VERSATILE EXPRESS DRIVERS 365 ARM VERSATILE EXPRESS DRIVERS
365 M: Liviu Dudau <liviu.dudau@foss.arm.com> 366 M: Liviu Dudau <liviu.dudau@foss.arm.com>
366 S: Maintained 367 S: Maintained
367 T: git git://github.com/ARM-software/u-boot.git 368 T: git git://github.com/ARM-software/u-boot.git
368 F: drivers/misc/vexpress_config.c 369 F: drivers/misc/vexpress_config.c
369 N: vexpress 370 N: vexpress
370 371
371 ARM ZYNQ 372 ARM ZYNQ
372 M: Michal Simek <monstr@monstr.eu> 373 M: Michal Simek <monstr@monstr.eu>
373 S: Maintained 374 S: Maintained
374 T: git git://git.denx.de/u-boot-microblaze.git 375 T: git git://git.denx.de/u-boot-microblaze.git
375 F: arch/arm/mach-zynq/ 376 F: arch/arm/mach-zynq/
376 F: drivers/clk/clk_zynq.c 377 F: drivers/clk/clk_zynq.c
377 F: drivers/fpga/zynqpl.c 378 F: drivers/fpga/zynqpl.c
378 F: drivers/gpio/zynq_gpio.c 379 F: drivers/gpio/zynq_gpio.c
379 F: drivers/i2c/i2c-cdns.c 380 F: drivers/i2c/i2c-cdns.c
380 F: drivers/i2c/muxes/pca954x.c 381 F: drivers/i2c/muxes/pca954x.c
381 F: drivers/i2c/zynq_i2c.c 382 F: drivers/i2c/zynq_i2c.c
382 F: drivers/mmc/zynq_sdhci.c 383 F: drivers/mmc/zynq_sdhci.c
383 F: drivers/mtd/nand/raw/zynq_nand.c 384 F: drivers/mtd/nand/raw/zynq_nand.c
384 F: drivers/net/phy/xilinx_phy.c 385 F: drivers/net/phy/xilinx_phy.c
385 F: drivers/net/zynq_gem.c 386 F: drivers/net/zynq_gem.c
386 F: drivers/serial/serial_zynq.c 387 F: drivers/serial/serial_zynq.c
387 F: drivers/spi/zynq_qspi.c 388 F: drivers/spi/zynq_qspi.c
388 F: drivers/spi/zynq_spi.c 389 F: drivers/spi/zynq_spi.c
389 F: drivers/usb/host/ehci-zynq.c 390 F: drivers/usb/host/ehci-zynq.c
390 F: drivers/watchdog/cdns_wdt.c 391 F: drivers/watchdog/cdns_wdt.c
391 F: include/zynqpl.h 392 F: include/zynqpl.h
392 F: tools/zynqimage.c 393 F: tools/zynqimage.c
393 N: zynq 394 N: zynq
394 395
395 ARM ZYNQMP 396 ARM ZYNQMP
396 M: Michal Simek <michal.simek@xilinx.com> 397 M: Michal Simek <michal.simek@xilinx.com>
397 S: Maintained 398 S: Maintained
398 T: git git://git.denx.de/u-boot-microblaze.git 399 T: git git://git.denx.de/u-boot-microblaze.git
399 F: arch/arm/mach-zynqmp/ 400 F: arch/arm/mach-zynqmp/
400 F: drivers/clk/clk_zynqmp.c 401 F: drivers/clk/clk_zynqmp.c
401 F: drivers/fpga/zynqpl.c 402 F: drivers/fpga/zynqpl.c
402 F: drivers/gpio/zynq_gpio.c 403 F: drivers/gpio/zynq_gpio.c
403 F: drivers/i2c/i2c-cdns.c 404 F: drivers/i2c/i2c-cdns.c
404 F: drivers/i2c/muxes/pca954x.c 405 F: drivers/i2c/muxes/pca954x.c
405 F: drivers/i2c/zynq_i2c.c 406 F: drivers/i2c/zynq_i2c.c
406 F: drivers/mmc/zynq_sdhci.c 407 F: drivers/mmc/zynq_sdhci.c
407 F: drivers/mtd/nand/raw/zynq_nand.c 408 F: drivers/mtd/nand/raw/zynq_nand.c
408 F: drivers/net/phy/xilinx_phy.c 409 F: drivers/net/phy/xilinx_phy.c
409 F: drivers/net/zynq_gem.c 410 F: drivers/net/zynq_gem.c
410 F: drivers/serial/serial_zynq.c 411 F: drivers/serial/serial_zynq.c
411 F: drivers/spi/zynq_qspi.c 412 F: drivers/spi/zynq_qspi.c
412 F: drivers/spi/zynq_spi.c 413 F: drivers/spi/zynq_spi.c
413 F: drivers/timer/cadence-ttc.c 414 F: drivers/timer/cadence-ttc.c
414 F: drivers/usb/host/ehci-zynq.c 415 F: drivers/usb/host/ehci-zynq.c
415 F: drivers/watchdog/cdns_wdt.c 416 F: drivers/watchdog/cdns_wdt.c
416 F: include/zynqmppl.h 417 F: include/zynqmppl.h
417 F: tools/zynqmp* 418 F: tools/zynqmp*
418 N: ultra96 419 N: ultra96
419 N: zynqmp 420 N: zynqmp
420 421
421 ARM ZYNQMP R5 422 ARM ZYNQMP R5
422 M: Michal Simek <michal.simek@xilinx.com> 423 M: Michal Simek <michal.simek@xilinx.com>
423 S: Maintained 424 S: Maintained
424 T: git git://git.denx.de/u-boot-microblaze.git 425 T: git git://git.denx.de/u-boot-microblaze.git
425 F: arch/arm/mach-zynqmp-r5/ 426 F: arch/arm/mach-zynqmp-r5/
426 427
427 BINMAN 428 BINMAN
428 M: Simon Glass <sjg@chromium.org> 429 M: Simon Glass <sjg@chromium.org>
429 S: Maintained 430 S: Maintained
430 F: tools/binman/ 431 F: tools/binman/
431 432
432 BUILDMAN 433 BUILDMAN
433 M: Simon Glass <sjg@chromium.org> 434 M: Simon Glass <sjg@chromium.org>
434 S: Maintained 435 S: Maintained
435 F: tools/buildman/ 436 F: tools/buildman/
436 437
437 CFI FLASH 438 CFI FLASH
438 M: Stefan Roese <sr@denx.de> 439 M: Stefan Roese <sr@denx.de>
439 S: Maintained 440 S: Maintained
440 T: git git://git.denx.de/u-boot-cfi-flash.git 441 T: git git://git.denx.de/u-boot-cfi-flash.git
441 F: drivers/mtd/cfi_flash.c 442 F: drivers/mtd/cfi_flash.c
442 F: drivers/mtd/jedec_flash.c 443 F: drivers/mtd/jedec_flash.c
443 444
444 COLDFIRE 445 COLDFIRE
445 M: Huan Wang <alison.wang@nxp.com> 446 M: Huan Wang <alison.wang@nxp.com>
446 M: Angelo Dureghello <angelo@sysam.it> 447 M: Angelo Dureghello <angelo@sysam.it>
447 S: Maintained 448 S: Maintained
448 T: git git://git.denx.de/u-boot-coldfire.git 449 T: git git://git.denx.de/u-boot-coldfire.git
449 F: arch/m68k/ 450 F: arch/m68k/
450 451
451 DFU 452 DFU
452 M: Lukasz Majewski <lukma@denx.de> 453 M: Lukasz Majewski <lukma@denx.de>
453 S: Maintained 454 S: Maintained
454 T: git git://git.denx.de/u-boot-dfu.git 455 T: git git://git.denx.de/u-boot-dfu.git
455 F: cmd/dfu.c 456 F: cmd/dfu.c
456 F: cmd/usb_*.c 457 F: cmd/usb_*.c
457 F: common/dfu.c 458 F: common/dfu.c
458 F: common/update.c 459 F: common/update.c
459 F: common/usb_storage.c 460 F: common/usb_storage.c
460 F: drivers/dfu/ 461 F: drivers/dfu/
461 F: drivers/usb/gadget/ 462 F: drivers/usb/gadget/
462 463
463 DRIVER MODEL 464 DRIVER MODEL
464 M: Simon Glass <sjg@chromium.org> 465 M: Simon Glass <sjg@chromium.org>
465 S: Maintained 466 S: Maintained
466 T: git git://git.denx.de/u-boot-dm.git 467 T: git git://git.denx.de/u-boot-dm.git
467 F: drivers/core/ 468 F: drivers/core/
468 F: include/dm/ 469 F: include/dm/
469 F: test/dm/ 470 F: test/dm/
470 471
471 EFI PAYLOAD 472 EFI PAYLOAD
472 M: Heinrich Schuchardt <xypron.glpk@gmx.de> 473 M: Heinrich Schuchardt <xypron.glpk@gmx.de>
473 R: Alexander Graf <agraf@csgraf.de> 474 R: Alexander Graf <agraf@csgraf.de>
474 S: Maintained 475 S: Maintained
475 T: git git://git.denx.de/u-boot-efi.git 476 T: git git://git.denx.de/u-boot-efi.git
476 F: doc/README.uefi 477 F: doc/README.uefi
477 F: doc/README.iscsi 478 F: doc/README.iscsi
478 F: Documentation/efi.rst 479 F: Documentation/efi.rst
479 F: include/capitalization.h 480 F: include/capitalization.h
480 F: include/charset.h 481 F: include/charset.h
481 F: include/cp1250.h 482 F: include/cp1250.h
482 F: include/cp437.h 483 F: include/cp437.h
483 F: include/efi* 484 F: include/efi*
484 F: include/pe.h 485 F: include/pe.h
485 F: include/asm-generic/pe.h 486 F: include/asm-generic/pe.h
486 F: lib/charset.c 487 F: lib/charset.c
487 F: lib/efi*/ 488 F: lib/efi*/
488 F: test/py/tests/test_efi* 489 F: test/py/tests/test_efi*
489 F: test/unicode_ut.c 490 F: test/unicode_ut.c
490 F: cmd/bootefi.c 491 F: cmd/bootefi.c
491 F: cmd/efidebug.c 492 F: cmd/efidebug.c
492 F: cmd/nvedit_efi.c 493 F: cmd/nvedit_efi.c
493 F: tools/file2include.c 494 F: tools/file2include.c
494 495
495 FPGA 496 FPGA
496 M: Michal Simek <michal.simek@xilinx.com> 497 M: Michal Simek <michal.simek@xilinx.com>
497 S: Maintained 498 S: Maintained
498 T: git git://git.denx.de/u-boot-microblaze.git 499 T: git git://git.denx.de/u-boot-microblaze.git
499 F: drivers/fpga/ 500 F: drivers/fpga/
500 F: cmd/fpga.c 501 F: cmd/fpga.c
501 F: include/fpga.h 502 F: include/fpga.h
502 503
503 FLATTENED DEVICE TREE 504 FLATTENED DEVICE TREE
504 M: Simon Glass <sjg@chromium.org> 505 M: Simon Glass <sjg@chromium.org>
505 S: Maintained 506 S: Maintained
506 T: git git://git.denx.de/u-boot-fdt.git 507 T: git git://git.denx.de/u-boot-fdt.git
507 F: lib/fdtdec* 508 F: lib/fdtdec*
508 F: lib/libfdt/ 509 F: lib/libfdt/
509 F: include/fdt* 510 F: include/fdt*
510 F: include/linux/libfdt* 511 F: include/linux/libfdt*
511 F: cmd/fdt.c 512 F: cmd/fdt.c
512 F: common/fdt_support.c 513 F: common/fdt_support.c
513 514
514 FREEBSD 515 FREEBSD
515 M: Rafal Jaworowski <raj@semihalf.com> 516 M: Rafal Jaworowski <raj@semihalf.com>
516 S: Maintained 517 S: Maintained
517 T: git git://git.denx.de/u-boot-freebsd.git 518 T: git git://git.denx.de/u-boot-freebsd.git
518 519
519 FREESCALE QORIQ 520 FREESCALE QORIQ
520 M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> 521 M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
521 S: Maintained 522 S: Maintained
522 T: git git://git.denx.de/u-boot-fsl-qoriq.git 523 T: git git://git.denx.de/u-boot-fsl-qoriq.git
523 F: drivers/watchdog/sp805_wdt.c 524 F: drivers/watchdog/sp805_wdt.c
524 525
525 I2C 526 I2C
526 M: Heiko Schocher <hs@denx.de> 527 M: Heiko Schocher <hs@denx.de>
527 S: Maintained 528 S: Maintained
528 T: git git://git.denx.de/u-boot-i2c.git 529 T: git git://git.denx.de/u-boot-i2c.git
529 F: drivers/i2c/ 530 F: drivers/i2c/
530 531
531 LOGGING 532 LOGGING
532 M: Simon Glass <sjg@chromium.org> 533 M: Simon Glass <sjg@chromium.org>
533 S: Maintained 534 S: Maintained
534 T: git git://git.denx.de/u-boot.git 535 T: git git://git.denx.de/u-boot.git
535 F: common/log.c 536 F: common/log.c
536 F: cmd/log.c 537 F: cmd/log.c
537 F: test/log/log_test.c 538 F: test/log/log_test.c
538 F: test/py/tests/test_log.py 539 F: test/py/tests/test_log.py
539 540
540 MALI DISPLAY PROCESSORS 541 MALI DISPLAY PROCESSORS
541 M: Liviu Dudau <liviu.dudau@foss.arm.com> 542 M: Liviu Dudau <liviu.dudau@foss.arm.com>
542 S: Supported 543 S: Supported
543 T: git git://github.com/ARM-software/u-boot.git 544 T: git git://github.com/ARM-software/u-boot.git
544 F: drivers/video/mali_dp.c 545 F: drivers/video/mali_dp.c
545 F: drivers/i2c/i2c-versatile.c 546 F: drivers/i2c/i2c-versatile.c
546 547
547 MICROBLAZE 548 MICROBLAZE
548 M: Michal Simek <monstr@monstr.eu> 549 M: Michal Simek <monstr@monstr.eu>
549 S: Maintained 550 S: Maintained
550 T: git git://git.denx.de/u-boot-microblaze.git 551 T: git git://git.denx.de/u-boot-microblaze.git
551 F: arch/microblaze/ 552 F: arch/microblaze/
552 F: cmd/mfsl.c 553 F: cmd/mfsl.c
553 F: drivers/gpio/xilinx_gpio.c 554 F: drivers/gpio/xilinx_gpio.c
554 F: drivers/net/xilinx_axi_emac.c 555 F: drivers/net/xilinx_axi_emac.c
555 F: drivers/net/xilinx_emaclite.c 556 F: drivers/net/xilinx_emaclite.c
556 F: drivers/serial/serial_xuartlite.c 557 F: drivers/serial/serial_xuartlite.c
557 F: drivers/spi/xilinx_spi.c 558 F: drivers/spi/xilinx_spi.c
558 F: drivers/sysreset/sysreset_gpio.c 559 F: drivers/sysreset/sysreset_gpio.c
559 F: drivers/watchdog/xilinx_tb_wdt.c 560 F: drivers/watchdog/xilinx_tb_wdt.c
560 N: xilinx 561 N: xilinx
561 562
562 MIPS 563 MIPS
563 M: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> 564 M: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
564 S: Maintained 565 S: Maintained
565 T: git git://git.denx.de/u-boot-mips.git 566 T: git git://git.denx.de/u-boot-mips.git
566 F: arch/mips/ 567 F: arch/mips/
567 568
568 MIPS MSCC 569 MIPS MSCC
569 M: Gregory CLEMENT <gregory.clement@bootlin.com> 570 M: Gregory CLEMENT <gregory.clement@bootlin.com>
570 M: Lars Povlsen <lars.povlsen@microchip.com> 571 M: Lars Povlsen <lars.povlsen@microchip.com>
571 M: Horatiu Vultur <horatiu.vultur@microchip.com> 572 M: Horatiu Vultur <horatiu.vultur@microchip.com>
572 S: Maintained 573 S: Maintained
573 F: arch/mips/mach-mscc/ 574 F: arch/mips/mach-mscc/
574 F: arch/mips/dts/luton* 575 F: arch/mips/dts/luton*
575 F: arch/mips/dts/mscc* 576 F: arch/mips/dts/mscc*
576 F: arch/mips/dts/ocelot* 577 F: arch/mips/dts/ocelot*
577 F: arch/mips/dts/jr2* 578 F: arch/mips/dts/jr2*
578 F: arch/mips/dts/serval* 579 F: arch/mips/dts/serval*
579 F: board/mscc/ 580 F: board/mscc/
580 F: configs/mscc* 581 F: configs/mscc*
581 F: drivers/gpio/mscc_sgpio.c 582 F: drivers/gpio/mscc_sgpio.c
582 F: drivers/spi/mscc_bb_spi.c 583 F: drivers/spi/mscc_bb_spi.c
583 F: include/configs/vcoreiii.h 584 F: include/configs/vcoreiii.h
584 F: include/dt-bindings/mscc/ 585 F: include/dt-bindings/mscc/
585 F: drivers/pinctrl/mscc/ 586 F: drivers/pinctrl/mscc/
586 F: drivers/net/mscc_eswitch/ 587 F: drivers/net/mscc_eswitch/
587 588
588 MIPS JZ4780 589 MIPS JZ4780
589 M: Ezequiel Garcia <ezequiel@collabora.com> 590 M: Ezequiel Garcia <ezequiel@collabora.com>
590 S: Maintained 591 S: Maintained
591 F: arch/mips/mach-jz47xx/ 592 F: arch/mips/mach-jz47xx/
592 593
593 MMC 594 MMC
594 M: Peng Fan <peng.fan@nxp.com> 595 M: Peng Fan <peng.fan@nxp.com>
595 S: Maintained 596 S: Maintained
596 T: git git://git.denx.de/u-boot-mmc.git 597 T: git git://git.denx.de/u-boot-mmc.git
597 F: drivers/mmc/ 598 F: drivers/mmc/
598 599
599 NAND FLASH 600 NAND FLASH
600 #M: Scott Wood <oss@buserror.net> 601 #M: Scott Wood <oss@buserror.net>
601 S: Orphaned (Since 2018-07) 602 S: Orphaned (Since 2018-07)
602 T: git git://git.denx.de/u-boot-nand-flash.git 603 T: git git://git.denx.de/u-boot-nand-flash.git
603 F: drivers/mtd/nand/raw/ 604 F: drivers/mtd/nand/raw/
604 605
605 NDS32 606 NDS32
606 M: Macpaul Lin <macpaul@andestech.com> 607 M: Macpaul Lin <macpaul@andestech.com>
607 S: Maintained 608 S: Maintained
608 T: git git://git.denx.de/u-boot-nds32.git 609 T: git git://git.denx.de/u-boot-nds32.git
609 F: arch/nds32/ 610 F: arch/nds32/
610 611
611 NETWORK 612 NETWORK
612 M: Joe Hershberger <joe.hershberger@ni.com> 613 M: Joe Hershberger <joe.hershberger@ni.com>
613 S: Maintained 614 S: Maintained
614 T: git git://git.denx.de/u-boot-net.git 615 T: git git://git.denx.de/u-boot-net.git
615 F: drivers/net/ 616 F: drivers/net/
616 F: net/ 617 F: net/
617 618
618 NIOS 619 NIOS
619 M: Thomas Chou <thomas@wytron.com.tw> 620 M: Thomas Chou <thomas@wytron.com.tw>
620 S: Maintained 621 S: Maintained
621 T: git git://git.denx.de/u-boot-nios.git 622 T: git git://git.denx.de/u-boot-nios.git
622 F: arch/nios2/ 623 F: arch/nios2/
623 624
624 ONENAND 625 ONENAND
625 #M: Lukasz Majewski <l.majewski@majess.pl> 626 #M: Lukasz Majewski <l.majewski@majess.pl>
626 S: Orphaned (Since 2017-01) 627 S: Orphaned (Since 2017-01)
627 T: git git://git.denx.de/u-boot-onenand.git 628 T: git git://git.denx.de/u-boot-onenand.git
628 F: drivers/mtd/onenand/ 629 F: drivers/mtd/onenand/
629 630
630 PATMAN 631 PATMAN
631 M: Simon Glass <sjg@chromium.org> 632 M: Simon Glass <sjg@chromium.org>
632 S: Maintained 633 S: Maintained
633 F: tools/patman/ 634 F: tools/patman/
634 635
635 POWER 636 POWER
636 M: Jaehoon Chung <jh80.chung@samsung.com> 637 M: Jaehoon Chung <jh80.chung@samsung.com>
637 S: Maintained 638 S: Maintained
638 T: git git://git.denx.de/u-boot-pmic.git 639 T: git git://git.denx.de/u-boot-pmic.git
639 F: drivers/power/ 640 F: drivers/power/
640 641
641 POWERPC 642 POWERPC
642 M: Wolfgang Denk <wd@denx.de> 643 M: Wolfgang Denk <wd@denx.de>
643 S: Maintained 644 S: Maintained
644 F: arch/powerpc/ 645 F: arch/powerpc/
645 646
646 POWERPC MPC8XX 647 POWERPC MPC8XX
647 M: Christophe Leroy <christophe.leroy@c-s.fr> 648 M: Christophe Leroy <christophe.leroy@c-s.fr>
648 S: Maintained 649 S: Maintained
649 T: git git://git.denx.de/u-boot-mpc8xx.git 650 T: git git://git.denx.de/u-boot-mpc8xx.git
650 F: arch/powerpc/cpu/mpc8xx/ 651 F: arch/powerpc/cpu/mpc8xx/
651 652
652 POWERPC MPC83XX 653 POWERPC MPC83XX
653 M: Mario Six <mario.six@gdsys.cc> 654 M: Mario Six <mario.six@gdsys.cc>
654 S: Maintained 655 S: Maintained
655 T: git git://git.denx.de/u-boot-mpc83xx.git 656 T: git git://git.denx.de/u-boot-mpc83xx.git
656 F: drivers/ram/mpc83xx_sdram.c 657 F: drivers/ram/mpc83xx_sdram.c
657 F: include/dt-bindings/memory/mpc83xx-sdram.h 658 F: include/dt-bindings/memory/mpc83xx-sdram.h
658 F: drivers/sysreset/sysreset_mpc83xx.c 659 F: drivers/sysreset/sysreset_mpc83xx.c
659 F: drivers/sysreset/sysreset_mpc83xx.h 660 F: drivers/sysreset/sysreset_mpc83xx.h
660 F: drivers/clk/mpc83xx_clk.c 661 F: drivers/clk/mpc83xx_clk.c
661 F: drivers/clk/mpc83xx_clk.h 662 F: drivers/clk/mpc83xx_clk.h
662 F: include/dt-bindings/clk/mpc83xx-clk.h 663 F: include/dt-bindings/clk/mpc83xx-clk.h
663 F: drivers/timer/mpc83xx_timer.c 664 F: drivers/timer/mpc83xx_timer.c
664 F: drivers/cpu/mpc83xx_cpu.c 665 F: drivers/cpu/mpc83xx_cpu.c
665 F: drivers/cpu/mpc83xx_cpu.h 666 F: drivers/cpu/mpc83xx_cpu.h
666 F: drivers/misc/mpc83xx_serdes.c 667 F: drivers/misc/mpc83xx_serdes.c
667 F: arch/powerpc/cpu/mpc83xx/ 668 F: arch/powerpc/cpu/mpc83xx/
668 F: arch/powerpc/include/asm/arch-mpc83xx/ 669 F: arch/powerpc/include/asm/arch-mpc83xx/
669 670
670 POWERPC MPC85XX 671 POWERPC MPC85XX
671 M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> 672 M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
672 S: Maintained 673 S: Maintained
673 T: git git://git.denx.de/u-boot-mpc85xx.git 674 T: git git://git.denx.de/u-boot-mpc85xx.git
674 F: arch/powerpc/cpu/mpc85xx/ 675 F: arch/powerpc/cpu/mpc85xx/
675 676
676 POWERPC MPC86XX 677 POWERPC MPC86XX
677 M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> 678 M: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
678 S: Maintained 679 S: Maintained
679 T: git git://git.denx.de/u-boot-mpc86xx.git 680 T: git git://git.denx.de/u-boot-mpc86xx.git
680 F: arch/powerpc/cpu/mpc86xx/ 681 F: arch/powerpc/cpu/mpc86xx/
681 682
682 RISC-V 683 RISC-V
683 M: Rick Chen <rick@andestech.com> 684 M: Rick Chen <rick@andestech.com>
684 S: Maintained 685 S: Maintained
685 T: git git://git.denx.de/u-boot-riscv.git 686 T: git git://git.denx.de/u-boot-riscv.git
686 F: arch/riscv/ 687 F: arch/riscv/
687 F: cmd/riscv/ 688 F: cmd/riscv/
688 F: tools/prelink-riscv.c 689 F: tools/prelink-riscv.c
689 690
690 ROCKUSB 691 ROCKUSB
691 M: Eddie Cai <eddie.cai.linux@gmail.com> 692 M: Eddie Cai <eddie.cai.linux@gmail.com>
692 S: Maintained 693 S: Maintained
693 F: drivers/usb/gadget/f_rockusb.c 694 F: drivers/usb/gadget/f_rockusb.c
694 F: cmd/rockusb.c 695 F: cmd/rockusb.c
695 F: doc/README.rockusb 696 F: doc/README.rockusb
696 697
697 SANDBOX 698 SANDBOX
698 M: Simon Glass <sjg@chromium.org> 699 M: Simon Glass <sjg@chromium.org>
699 S: Maintained 700 S: Maintained
700 F: arch/sandbox/ 701 F: arch/sandbox/
701 702
702 SH 703 SH
703 M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> 704 M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
704 S: Maintained 705 S: Maintained
705 T: git git://git.denx.de/u-boot-sh.git 706 T: git git://git.denx.de/u-boot-sh.git
706 F: arch/sh/ 707 F: arch/sh/
707 708
708 SPI 709 SPI
709 M: Jagan Teki <jagan@amarulasolutions.com> 710 M: Jagan Teki <jagan@amarulasolutions.com>
710 S: Maintained 711 S: Maintained
711 T: git git://git.denx.de/u-boot-spi.git 712 T: git git://git.denx.de/u-boot-spi.git
712 F: drivers/spi/ 713 F: drivers/spi/
713 F: include/spi* 714 F: include/spi*
714 715
715 SPI-NOR 716 SPI-NOR
716 M: Jagan Teki <jagan@amarulasolutions.com> 717 M: Jagan Teki <jagan@amarulasolutions.com>
717 M: Vignesh R <vigneshr@ti.com> 718 M: Vignesh R <vigneshr@ti.com>
718 S: Maintained 719 S: Maintained
719 F: drivers/mtd/spi/ 720 F: drivers/mtd/spi/
720 F: include/spi_flash.h 721 F: include/spi_flash.h
721 F: include/linux/mtd/cfi.h 722 F: include/linux/mtd/cfi.h
722 F: include/linux/mtd/spi-nor.h 723 F: include/linux/mtd/spi-nor.h
723 724
724 SPMI 725 SPMI
725 M: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> 726 M: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
726 S: Maintained 727 S: Maintained
727 F: drivers/spmi/ 728 F: drivers/spmi/
728 F: include/spmi/ 729 F: include/spmi/
729 730
730 TDA19988 HDMI ENCODER 731 TDA19988 HDMI ENCODER
731 M: Liviu Dudau <liviu.dudau@foss.arm.com> 732 M: Liviu Dudau <liviu.dudau@foss.arm.com>
732 S: Maintained 733 S: Maintained
733 F: drivers/video/tda19988.c 734 F: drivers/video/tda19988.c
734 735
735 TI SYSTEM SECURITY 736 TI SYSTEM SECURITY
736 M: Andrew F. Davis <afd@ti.com> 737 M: Andrew F. Davis <afd@ti.com>
737 S: Supported 738 S: Supported
738 F: arch/arm/mach-omap2/omap5/sec_entry_cpu1.S 739 F: arch/arm/mach-omap2/omap5/sec_entry_cpu1.S
739 F: arch/arm/mach-omap2/sec-common.c 740 F: arch/arm/mach-omap2/sec-common.c
740 F: arch/arm/mach-omap2/config_secure.mk 741 F: arch/arm/mach-omap2/config_secure.mk
741 F: arch/arm/mach-k3/security.c 742 F: arch/arm/mach-k3/security.c
742 F: arch/arm/mach-k3/config_secure.mk 743 F: arch/arm/mach-k3/config_secure.mk
743 F: configs/am335x_hs_evm_defconfig 744 F: configs/am335x_hs_evm_defconfig
744 F: configs/am335x_hs_evm_uart_defconfig 745 F: configs/am335x_hs_evm_uart_defconfig
745 F: configs/am43xx_hs_evm_defconfig 746 F: configs/am43xx_hs_evm_defconfig
746 F: configs/am57xx_hs_evm_defconfig 747 F: configs/am57xx_hs_evm_defconfig
747 F: configs/am57xx_hs_evm_usb_defconfig 748 F: configs/am57xx_hs_evm_usb_defconfig
748 F: configs/dra7xx_hs_evm_defconfig 749 F: configs/dra7xx_hs_evm_defconfig
749 F: configs/dra7xx_hs_evm_usb_defconfig 750 F: configs/dra7xx_hs_evm_usb_defconfig
750 F: configs/k2hk_hs_evm_defconfig 751 F: configs/k2hk_hs_evm_defconfig
751 F: configs/k2e_hs_evm_defconfig 752 F: configs/k2e_hs_evm_defconfig
752 F: configs/k2g_hs_evm_defconfig 753 F: configs/k2g_hs_evm_defconfig
753 F: configs/k2l_hs_evm_defconfig 754 F: configs/k2l_hs_evm_defconfig
754 F: configs/am65x_hs_evm_r5_defconfig 755 F: configs/am65x_hs_evm_r5_defconfig
755 F: configs/am65x_hs_evm_a53_defconfig 756 F: configs/am65x_hs_evm_a53_defconfig
756 757
757 TQ GROUP 758 TQ GROUP
758 #M: Martin Krause <martin.krause@tq-systems.de> 759 #M: Martin Krause <martin.krause@tq-systems.de>
759 S: Orphaned (Since 2016-02) 760 S: Orphaned (Since 2016-02)
760 T: git git://git.denx.de/u-boot-tq-group.git 761 T: git git://git.denx.de/u-boot-tq-group.git
761 762
762 TEE 763 TEE
763 M: Jens Wiklander <jens.wiklander@linaro.org> 764 M: Jens Wiklander <jens.wiklander@linaro.org>
764 S: Maintained 765 S: Maintained
765 F: drivers/tee/ 766 F: drivers/tee/
766 F: include/tee.h 767 F: include/tee.h
767 F: include/tee/ 768 F: include/tee/
768 769
769 UBI 770 UBI
770 M: Kyungmin Park <kmpark@infradead.org> 771 M: Kyungmin Park <kmpark@infradead.org>
771 M: Heiko Schocher <hs@denx.de> 772 M: Heiko Schocher <hs@denx.de>
772 S: Maintained 773 S: Maintained
773 T: git git://git.denx.de/u-boot-ubi.git 774 T: git git://git.denx.de/u-boot-ubi.git
774 F: drivers/mtd/ubi/ 775 F: drivers/mtd/ubi/
775 776
776 USB 777 USB
777 M: Marek Vasut <marex@denx.de> 778 M: Marek Vasut <marex@denx.de>
778 S: Maintained 779 S: Maintained
779 T: git git://git.denx.de/u-boot-usb.git 780 T: git git://git.denx.de/u-boot-usb.git
780 F: drivers/usb/ 781 F: drivers/usb/
781 782
782 USB xHCI 783 USB xHCI
783 M: Bin Meng <bmeng.cn@gmail.com> 784 M: Bin Meng <bmeng.cn@gmail.com>
784 S: Maintained 785 S: Maintained
785 T: git git://git.denx.de/u-boot-usb.git topic-xhci 786 T: git git://git.denx.de/u-boot-usb.git topic-xhci
786 F: drivers/usb/host/xhci* 787 F: drivers/usb/host/xhci*
787 788
788 VIDEO 789 VIDEO
789 M: Anatolij Gustschin <agust@denx.de> 790 M: Anatolij Gustschin <agust@denx.de>
790 S: Maintained 791 S: Maintained
791 T: git git://git.denx.de/u-boot-video.git 792 T: git git://git.denx.de/u-boot-video.git
792 F: drivers/video/ 793 F: drivers/video/
793 F: common/lcd*.c 794 F: common/lcd*.c
794 F: include/lcd*.h 795 F: include/lcd*.h
795 F: include/video*.h 796 F: include/video*.h
796 797
797 X86 798 X86
798 M: Simon Glass <sjg@chromium.org> 799 M: Simon Glass <sjg@chromium.org>
799 M: Bin Meng <bmeng.cn@gmail.com> 800 M: Bin Meng <bmeng.cn@gmail.com>
800 S: Maintained 801 S: Maintained
801 T: git git://git.denx.de/u-boot-x86.git 802 T: git git://git.denx.de/u-boot-x86.git
802 F: arch/x86/ 803 F: arch/x86/
803 F: cmd/x86/ 804 F: cmd/x86/
804 805
805 XTENSA 806 XTENSA
806 M: Max Filippov <jcmvbkbc@gmail.com> 807 M: Max Filippov <jcmvbkbc@gmail.com>
807 S: Maintained 808 S: Maintained
808 F: arch/xtensa/ 809 F: arch/xtensa/
809 810
810 THE REST 811 THE REST
811 M: Tom Rini <trini@konsulko.com> 812 M: Tom Rini <trini@konsulko.com>
812 L: u-boot@lists.denx.de 813 L: u-boot@lists.denx.de
813 Q: http://patchwork.ozlabs.org/project/uboot/list/ 814 Q: http://patchwork.ozlabs.org/project/uboot/list/
814 S: Maintained 815 S: Maintained
815 T: git git://git.denx.de/u-boot.git 816 T: git git://git.denx.de/u-boot.git
816 F: configs/tools-only_defconfig 817 F: configs/tools-only_defconfig
817 F: * 818 F: *
818 F: */ 819 F: */
819 820
1 menuconfig SPI 1 menuconfig SPI
2 bool "SPI Support" 2 bool "SPI Support"
3 3
4 if SPI 4 if SPI
5 5
6 config DM_SPI 6 config DM_SPI
7 bool "Enable Driver Model for SPI drivers" 7 bool "Enable Driver Model for SPI drivers"
8 depends on DM 8 depends on DM
9 help 9 help
10 Enable driver model for SPI. The SPI slave interface 10 Enable driver model for SPI. The SPI slave interface
11 (spi_setup_slave(), spi_xfer(), etc.) is then implemented by 11 (spi_setup_slave(), spi_xfer(), etc.) is then implemented by
12 the SPI uclass. Drivers provide methods to access the SPI 12 the SPI uclass. Drivers provide methods to access the SPI
13 buses that they control. The uclass interface is defined in 13 buses that they control. The uclass interface is defined in
14 include/spi.h. The existing spi_slave structure is attached 14 include/spi.h. The existing spi_slave structure is attached
15 as 'parent data' to every slave on each bus. Slaves 15 as 'parent data' to every slave on each bus. Slaves
16 typically use driver-private data instead of extending the 16 typically use driver-private data instead of extending the
17 spi_slave structure. 17 spi_slave structure.
18 18
19 config SPI_MEM 19 config SPI_MEM
20 bool "SPI memory extension" 20 bool "SPI memory extension"
21 help 21 help
22 Enable this option if you want to enable the SPI memory extension. 22 Enable this option if you want to enable the SPI memory extension.
23 This extension is meant to simplify interaction with SPI memories 23 This extension is meant to simplify interaction with SPI memories
24 by providing an high-level interface to send memory-like commands. 24 by providing an high-level interface to send memory-like commands.
25 25
26 if DM_SPI 26 if DM_SPI
27 27
28 config ALTERA_SPI 28 config ALTERA_SPI
29 bool "Altera SPI driver" 29 bool "Altera SPI driver"
30 help 30 help
31 Enable the Altera SPI driver. This driver can be used to 31 Enable the Altera SPI driver. This driver can be used to
32 access the SPI NOR flash on platforms embedding this Altera 32 access the SPI NOR flash on platforms embedding this Altera
33 IP core. Please find details on the "Embedded Peripherals IP 33 IP core. Please find details on the "Embedded Peripherals IP
34 User Guide" of Altera. 34 User Guide" of Altera.
35 35
36 config ATCSPI200_SPI 36 config ATCSPI200_SPI
37 bool "Andestech ATCSPI200 SPI driver" 37 bool "Andestech ATCSPI200 SPI driver"
38 help 38 help
39 Enable the Andestech ATCSPI200 SPI driver. This driver can be 39 Enable the Andestech ATCSPI200 SPI driver. This driver can be
40 used to access the SPI flash on AE3XX and AE250 platforms embedding 40 used to access the SPI flash on AE3XX and AE250 platforms embedding
41 this Andestech IP core. 41 this Andestech IP core.
42 42
43 config ATH79_SPI 43 config ATH79_SPI
44 bool "Atheros SPI driver" 44 bool "Atheros SPI driver"
45 depends on ARCH_ATH79 45 depends on ARCH_ATH79
46 help 46 help
47 Enable the Atheros ar7xxx/ar9xxx SoC SPI driver, it was used 47 Enable the Atheros ar7xxx/ar9xxx SoC SPI driver, it was used
48 to access SPI NOR flash and other SPI peripherals. This driver 48 to access SPI NOR flash and other SPI peripherals. This driver
49 uses driver model and requires a device tree binding to operate. 49 uses driver model and requires a device tree binding to operate.
50 please refer to doc/device-tree-bindings/spi/spi-ath79.txt. 50 please refer to doc/device-tree-bindings/spi/spi-ath79.txt.
51 51
52 config ATMEL_SPI 52 config ATMEL_SPI
53 bool "Atmel SPI driver" 53 bool "Atmel SPI driver"
54 default y if ARCH_AT91 54 default y if ARCH_AT91
55 help 55 help
56 This enables driver for the Atmel SPI Controller, present on 56 This enables driver for the Atmel SPI Controller, present on
57 many AT91 (ARM) chips. This driver can be used to access 57 many AT91 (ARM) chips. This driver can be used to access
58 the SPI Flash, such as AT25DF321. 58 the SPI Flash, such as AT25DF321.
59 59
60 config BCM63XX_HSSPI 60 config BCM63XX_HSSPI
61 bool "BCM63XX HSSPI driver" 61 bool "BCM63XX HSSPI driver"
62 depends on ARCH_BMIPS 62 depends on ARCH_BMIPS
63 help 63 help
64 Enable the BCM6328 HSSPI driver. This driver can be used to 64 Enable the BCM6328 HSSPI driver. This driver can be used to
65 access the SPI NOR flash on platforms embedding this Broadcom 65 access the SPI NOR flash on platforms embedding this Broadcom
66 SPI core. 66 SPI core.
67 67
68 config BCM63XX_SPI 68 config BCM63XX_SPI
69 bool "BCM6348 SPI driver" 69 bool "BCM6348 SPI driver"
70 depends on ARCH_BMIPS 70 depends on ARCH_BMIPS
71 help 71 help
72 Enable the BCM6348/BCM6358 SPI driver. This driver can be used to 72 Enable the BCM6348/BCM6358 SPI driver. This driver can be used to
73 access the SPI NOR flash on platforms embedding these Broadcom 73 access the SPI NOR flash on platforms embedding these Broadcom
74 SPI cores. 74 SPI cores.
75 75
76 config BCMSTB_SPI 76 config BCMSTB_SPI
77 bool "BCMSTB SPI driver" 77 bool "BCMSTB SPI driver"
78 help 78 help
79 Enable the Broadcom set-top box SPI driver. This driver can 79 Enable the Broadcom set-top box SPI driver. This driver can
80 be used to access the SPI flash on platforms embedding this 80 be used to access the SPI flash on platforms embedding this
81 Broadcom SPI core. 81 Broadcom SPI core.
82 82
83 config CADENCE_QSPI 83 config CADENCE_QSPI
84 bool "Cadence QSPI driver" 84 bool "Cadence QSPI driver"
85 help 85 help
86 Enable the Cadence Quad-SPI (QSPI) driver. This driver can be 86 Enable the Cadence Quad-SPI (QSPI) driver. This driver can be
87 used to access the SPI NOR flash on platforms embedding this 87 used to access the SPI NOR flash on platforms embedding this
88 Cadence IP core. 88 Cadence IP core.
89 89
90 config CF_SPI 90 config CF_SPI
91 bool "ColdFire SPI driver" 91 bool "ColdFire SPI driver"
92 help 92 help
93 Enable the ColdFire SPI driver. This driver can be used on 93 Enable the ColdFire SPI driver. This driver can be used on
94 some m68k SoCs. 94 some m68k SoCs.
95 95
96 config DESIGNWARE_SPI 96 config DESIGNWARE_SPI
97 bool "Designware SPI driver" 97 bool "Designware SPI driver"
98 help 98 help
99 Enable the Designware SPI driver. This driver can be used to 99 Enable the Designware SPI driver. This driver can be used to
100 access the SPI NOR flash on platforms embedding this Designware 100 access the SPI NOR flash on platforms embedding this Designware
101 IP core. 101 IP core.
102 102
103 config EXYNOS_SPI 103 config EXYNOS_SPI
104 bool "Samsung Exynos SPI driver" 104 bool "Samsung Exynos SPI driver"
105 help 105 help
106 Enable the Samsung Exynos SPI driver. This driver can be used to 106 Enable the Samsung Exynos SPI driver. This driver can be used to
107 access the SPI NOR flash on platforms embedding this Samsung 107 access the SPI NOR flash on platforms embedding this Samsung
108 Exynos IP core. 108 Exynos IP core.
109 109
110 config FSL_DSPI 110 config FSL_DSPI
111 bool "Freescale DSPI driver" 111 bool "Freescale DSPI driver"
112 help 112 help
113 Enable the Freescale DSPI driver. This driver can be used to 113 Enable the Freescale DSPI driver. This driver can be used to
114 access the SPI NOR flash and SPI Data flash on platforms embedding 114 access the SPI NOR flash and SPI Data flash on platforms embedding
115 this Freescale DSPI IP core. LS102xA and Colibri VF50/VF61 platforms 115 this Freescale DSPI IP core. LS102xA and Colibri VF50/VF61 platforms
116 use this driver. 116 use this driver.
117 117
118 config ICH_SPI 118 config ICH_SPI
119 bool "Intel ICH SPI driver" 119 bool "Intel ICH SPI driver"
120 imply SPI_FLASH_BAR 120 imply SPI_FLASH_BAR
121 help 121 help
122 Enable the Intel ICH SPI driver. This driver can be used to 122 Enable the Intel ICH SPI driver. This driver can be used to
123 access the SPI NOR flash on platforms embedding this Intel 123 access the SPI NOR flash on platforms embedding this Intel
124 ICH IP core. 124 ICH IP core.
125 125
126 config MESON_SPIFC 126 config MESON_SPIFC
127 bool "Amlogic Meson SPI Flash Controller driver" 127 bool "Amlogic Meson SPI Flash Controller driver"
128 depends on ARCH_MESON 128 depends on ARCH_MESON
129 help 129 help
130 Enable the Amlogic Meson SPI Flash Controller SPIFC) driver. 130 Enable the Amlogic Meson SPI Flash Controller SPIFC) driver.
131 This driver can be used to access the SPI NOR flash chips on 131 This driver can be used to access the SPI NOR flash chips on
132 Amlogic Meson SoCs. 132 Amlogic Meson SoCs.
133 133
134 config MPC8XX_SPI 134 config MPC8XX_SPI
135 bool "MPC8XX SPI Driver" 135 bool "MPC8XX SPI Driver"
136 depends on MPC8xx 136 depends on MPC8xx
137 help 137 help
138 Enable support for SPI on MPC8XX 138 Enable support for SPI on MPC8XX
139 139
140 config MT7621_SPI 140 config MT7621_SPI
141 bool "MediaTek MT7621 SPI driver" 141 bool "MediaTek MT7621 SPI driver"
142 depends on SOC_MT7628 142 depends on SOC_MT7628
143 help 143 help
144 Enable the MT7621 SPI driver. This driver can be used to access 144 Enable the MT7621 SPI driver. This driver can be used to access
145 the SPI NOR flash on platforms embedding this Ralink / MediaTek 145 the SPI NOR flash on platforms embedding this Ralink / MediaTek
146 SPI core, like MT7621/7628/7688. 146 SPI core, like MT7621/7628/7688.
147 147
148 config MTK_QSPI 148 config MTK_QSPI
149 bool "Mediatek QSPI driver" 149 bool "Mediatek QSPI driver"
150 imply SPI_FLASH_BAR 150 imply SPI_FLASH_BAR
151 help 151 help
152 Enable the Mediatek QSPI driver. This driver can be 152 Enable the Mediatek QSPI driver. This driver can be
153 used to access the SPI NOR flash on platforms embedding this 153 used to access the SPI NOR flash on platforms embedding this
154 Mediatek QSPI IP core. 154 Mediatek QSPI IP core.
155 155
156 config MVEBU_A3700_SPI 156 config MVEBU_A3700_SPI
157 bool "Marvell Armada 3700 SPI driver" 157 bool "Marvell Armada 3700 SPI driver"
158 select CLK_ARMADA_3720 158 select CLK_ARMADA_3720
159 help 159 help
160 Enable the Marvell Armada 3700 SPI driver. This driver can be 160 Enable the Marvell Armada 3700 SPI driver. This driver can be
161 used to access the SPI NOR flash on platforms embedding this 161 used to access the SPI NOR flash on platforms embedding this
162 Marvell IP core. 162 Marvell IP core.
163 163
164 config PIC32_SPI 164 config PIC32_SPI
165 bool "Microchip PIC32 SPI driver" 165 bool "Microchip PIC32 SPI driver"
166 depends on MACH_PIC32 166 depends on MACH_PIC32
167 help 167 help
168 Enable the Microchip PIC32 SPI driver. This driver can be used 168 Enable the Microchip PIC32 SPI driver. This driver can be used
169 to access the SPI NOR flash, MMC-over-SPI on platforms based on 169 to access the SPI NOR flash, MMC-over-SPI on platforms based on
170 Microchip PIC32 family devices. 170 Microchip PIC32 family devices.
171 171
172 config PL022_SPI 172 config PL022_SPI
173 bool "ARM AMBA PL022 SSP controller driver" 173 bool "ARM AMBA PL022 SSP controller driver"
174 depends on ARM 174 depends on ARM
175 help 175 help
176 This selects the ARM(R) AMBA(R) PrimeCell PL022 SSP 176 This selects the ARM(R) AMBA(R) PrimeCell PL022 SSP
177 controller. If you have an embedded system with an AMBA(R) 177 controller. If you have an embedded system with an AMBA(R)
178 bus and a PL022 controller, say Y or M here. 178 bus and a PL022 controller, say Y or M here.
179 179
180 config RENESAS_RPC_SPI 180 config RENESAS_RPC_SPI
181 bool "Renesas RPC SPI driver" 181 bool "Renesas RPC SPI driver"
182 depends on RCAR_GEN3 || RZA1 182 depends on RCAR_GEN3 || RZA1
183 imply SPI_FLASH_BAR 183 imply SPI_FLASH_BAR
184 help 184 help
185 Enable the Renesas RPC SPI driver, used to access SPI NOR flash 185 Enable the Renesas RPC SPI driver, used to access SPI NOR flash
186 on Renesas RCar Gen3 SoCs. This uses driver model and requires a 186 on Renesas RCar Gen3 SoCs. This uses driver model and requires a
187 device tree binding to operate. 187 device tree binding to operate.
188 188
189 config ROCKCHIP_SPI 189 config ROCKCHIP_SPI
190 bool "Rockchip SPI driver" 190 bool "Rockchip SPI driver"
191 help 191 help
192 Enable the Rockchip SPI driver, used to access SPI NOR flash and 192 Enable the Rockchip SPI driver, used to access SPI NOR flash and
193 other SPI peripherals (such as the Chrome OS EC) on Rockchip SoCs. 193 other SPI peripherals (such as the Chrome OS EC) on Rockchip SoCs.
194 This uses driver model and requires a device tree binding to 194 This uses driver model and requires a device tree binding to
195 operate. 195 operate.
196 196
197 config SANDBOX_SPI 197 config SANDBOX_SPI
198 bool "Sandbox SPI driver" 198 bool "Sandbox SPI driver"
199 depends on SANDBOX && DM 199 depends on SANDBOX && DM
200 help 200 help
201 Enable SPI support for sandbox. This is an emulation of a real SPI 201 Enable SPI support for sandbox. This is an emulation of a real SPI
202 bus. Devices can be attached to the bus using the device tree 202 bus. Devices can be attached to the bus using the device tree
203 which specifies the driver to use. As an example, see this device 203 which specifies the driver to use. As an example, see this device
204 tree fragment from sandbox.dts. It shows that the SPI bus has a 204 tree fragment from sandbox.dts. It shows that the SPI bus has a
205 single flash device on chip select 0 which is emulated by the driver 205 single flash device on chip select 0 which is emulated by the driver
206 for "sandbox,spi-flash", which is in drivers/mtd/spi/sandbox.c. 206 for "sandbox,spi-flash", which is in drivers/mtd/spi/sandbox.c.
207 207
208 spi@0 { 208 spi@0 {
209 #address-cells = <1>; 209 #address-cells = <1>;
210 #size-cells = <0>; 210 #size-cells = <0>;
211 reg = <0>; 211 reg = <0>;
212 compatible = "sandbox,spi"; 212 compatible = "sandbox,spi";
213 cs-gpios = <0>, <&gpio_a 0>; 213 cs-gpios = <0>, <&gpio_a 0>;
214 flash@0 { 214 flash@0 {
215 reg = <0>; 215 reg = <0>;
216 compatible = "spansion,m25p16", "sandbox,spi-flash"; 216 compatible = "spansion,m25p16", "sandbox,spi-flash";
217 spi-max-frequency = <40000000>; 217 spi-max-frequency = <40000000>;
218 sandbox,filename = "spi.bin"; 218 sandbox,filename = "spi.bin";
219 }; 219 };
220 }; 220 };
221 221
222 config SPI_SUNXI 222 config SPI_SUNXI
223 bool "Allwinner SoC SPI controllers" 223 bool "Allwinner SoC SPI controllers"
224 help 224 help
225 Enable the Allwinner SoC SPi controller driver. 225 Enable the Allwinner SoC SPi controller driver.
226 226
227 Same controller driver can reuse in all Allwinner SoC variants. 227 Same controller driver can reuse in all Allwinner SoC variants.
228 228
229 config STM32_QSPI 229 config STM32_QSPI
230 bool "STM32F7 QSPI driver" 230 bool "STM32F7 QSPI driver"
231 depends on STM32F4 || STM32F7 || ARCH_STM32MP 231 depends on STM32F4 || STM32F7 || ARCH_STM32MP
232 help 232 help
233 Enable the STM32F7 Quad-SPI (QSPI) driver. This driver can be 233 Enable the STM32F7 Quad-SPI (QSPI) driver. This driver can be
234 used to access the SPI NOR flash chips on platforms embedding 234 used to access the SPI NOR flash chips on platforms embedding
235 this ST IP core. 235 this ST IP core.
236 236
237 config STM32_SPI
238 bool "STM32 SPI driver"
239 depends on ARCH_STM32MP
240 help
241 Enable the STM32 Serial Peripheral Interface (SPI) driver for STM32MP
242 SoCs. This uses driver model and requires a device tree binding to
243 operate.
244
237 config TEGRA114_SPI 245 config TEGRA114_SPI
238 bool "nVidia Tegra114 SPI driver" 246 bool "nVidia Tegra114 SPI driver"
239 help 247 help
240 Enable the nVidia Tegra114 SPI driver. This driver can be used to 248 Enable the nVidia Tegra114 SPI driver. This driver can be used to
241 access the SPI NOR flash on platforms embedding this nVidia Tegra114 249 access the SPI NOR flash on platforms embedding this nVidia Tegra114
242 IP core. 250 IP core.
243 251
244 This controller is different than the older SoCs SPI controller and 252 This controller is different than the older SoCs SPI controller and
245 also register interface get changed with this controller. 253 also register interface get changed with this controller.
246 254
247 config TEGRA20_SFLASH 255 config TEGRA20_SFLASH
248 bool "nVidia Tegra20 Serial Flash controller driver" 256 bool "nVidia Tegra20 Serial Flash controller driver"
249 help 257 help
250 Enable the nVidia Tegra20 Serial Flash controller driver. This driver 258 Enable the nVidia Tegra20 Serial Flash controller driver. This driver
251 can be used to access the SPI NOR flash on platforms embedding this 259 can be used to access the SPI NOR flash on platforms embedding this
252 nVidia Tegra20 IP core. 260 nVidia Tegra20 IP core.
253 261
254 config TEGRA20_SLINK 262 config TEGRA20_SLINK
255 bool "nVidia Tegra20/Tegra30 SLINK driver" 263 bool "nVidia Tegra20/Tegra30 SLINK driver"
256 help 264 help
257 Enable the nVidia Tegra20/Tegra30 SLINK driver. This driver can 265 Enable the nVidia Tegra20/Tegra30 SLINK driver. This driver can
258 be used to access the SPI NOR flash on platforms embedding this 266 be used to access the SPI NOR flash on platforms embedding this
259 nVidia Tegra20/Tegra30 IP cores. 267 nVidia Tegra20/Tegra30 IP cores.
260 268
261 config TEGRA210_QSPI 269 config TEGRA210_QSPI
262 bool "nVidia Tegra210 QSPI driver" 270 bool "nVidia Tegra210 QSPI driver"
263 help 271 help
264 Enable the Tegra Quad-SPI (QSPI) driver for T210. This driver 272 Enable the Tegra Quad-SPI (QSPI) driver for T210. This driver
265 be used to access SPI chips on platforms embedding this 273 be used to access SPI chips on platforms embedding this
266 NVIDIA Tegra210 IP core. 274 NVIDIA Tegra210 IP core.
267 275
268 config TI_QSPI 276 config TI_QSPI
269 bool "TI QSPI driver" 277 bool "TI QSPI driver"
270 imply TI_EDMA3 278 imply TI_EDMA3
271 help 279 help
272 Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms. 280 Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms.
273 This driver support spi flash single, quad and memory reads. 281 This driver support spi flash single, quad and memory reads.
274 282
275 config XILINX_SPI 283 config XILINX_SPI
276 bool "Xilinx SPI driver" 284 bool "Xilinx SPI driver"
277 help 285 help
278 Enable the Xilinx SPI driver from the Xilinx EDK. This SPI 286 Enable the Xilinx SPI driver from the Xilinx EDK. This SPI
279 controller support 8 bit SPI transfers only, with or w/o FIFO. 287 controller support 8 bit SPI transfers only, with or w/o FIFO.
280 For more info on Xilinx SPI Register Definitions and Overview 288 For more info on Xilinx SPI Register Definitions and Overview
281 see driver file - drivers/spi/xilinx_spi.c 289 see driver file - drivers/spi/xilinx_spi.c
282 290
283 config ZYNQ_SPI 291 config ZYNQ_SPI
284 bool "Zynq SPI driver" 292 bool "Zynq SPI driver"
285 depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL 293 depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
286 help 294 help
287 Enable the Zynq SPI driver. This driver can be used to 295 Enable the Zynq SPI driver. This driver can be used to
288 access the SPI NOR flash on platforms embedding this Zynq 296 access the SPI NOR flash on platforms embedding this Zynq
289 SPI IP core. 297 SPI IP core.
290 298
291 config ZYNQ_QSPI 299 config ZYNQ_QSPI
292 bool "Zynq QSPI driver" 300 bool "Zynq QSPI driver"
293 depends on ARCH_ZYNQ 301 depends on ARCH_ZYNQ
294 imply SPI_FLASH_BAR 302 imply SPI_FLASH_BAR
295 help 303 help
296 Enable the Zynq Quad-SPI (QSPI) driver. This driver can be 304 Enable the Zynq Quad-SPI (QSPI) driver. This driver can be
297 used to access the SPI NOR flash on platforms embedding this 305 used to access the SPI NOR flash on platforms embedding this
298 Zynq QSPI IP core. This IP is used to connect the flash in 306 Zynq QSPI IP core. This IP is used to connect the flash in
299 4-bit qspi, 8-bit dual stacked and shared 4-bit dual parallel. 307 4-bit qspi, 8-bit dual stacked and shared 4-bit dual parallel.
300 308
301 config ZYNQMP_GQSPI 309 config ZYNQMP_GQSPI
302 bool "Configure ZynqMP Generic QSPI" 310 bool "Configure ZynqMP Generic QSPI"
303 depends on ARCH_ZYNQMP || ARCH_VERSAL 311 depends on ARCH_ZYNQMP || ARCH_VERSAL
304 help 312 help
305 This option is used to enable ZynqMP QSPI controller driver which 313 This option is used to enable ZynqMP QSPI controller driver which
306 is used to communicate with qspi flash devices. 314 is used to communicate with qspi flash devices.
307 315
308 endif # if DM_SPI 316 endif # if DM_SPI
309 317
310 config SOFT_SPI 318 config SOFT_SPI
311 bool "Soft SPI driver" 319 bool "Soft SPI driver"
312 help 320 help
313 Enable Soft SPI driver. This driver is to use GPIO simulate 321 Enable Soft SPI driver. This driver is to use GPIO simulate
314 the SPI protocol. 322 the SPI protocol.
315 323
316 config MSCC_BB_SPI 324 config MSCC_BB_SPI
317 bool "MSCC bitbang SPI driver" 325 bool "MSCC bitbang SPI driver"
318 depends on SOC_VCOREIII 326 depends on SOC_VCOREIII
319 help 327 help
320 Enable MSCC bitbang SPI driver. This driver can be used on 328 Enable MSCC bitbang SPI driver. This driver can be used on
321 MSCC SOCs. 329 MSCC SOCs.
322 330
323 config CF_SPI 331 config CF_SPI
324 bool "ColdFire SPI driver" 332 bool "ColdFire SPI driver"
325 help 333 help
326 Enable the ColdFire SPI driver. This driver can be used on 334 Enable the ColdFire SPI driver. This driver can be used on
327 some m68k SoCs. 335 some m68k SoCs.
328 336
329 config FSL_ESPI 337 config FSL_ESPI
330 bool "Freescale eSPI driver" 338 bool "Freescale eSPI driver"
331 help 339 help
332 Enable the Freescale eSPI driver. This driver can be used to 340 Enable the Freescale eSPI driver. This driver can be used to
333 access the SPI interface and SPI NOR flash on platforms embedding 341 access the SPI interface and SPI NOR flash on platforms embedding
334 this Freescale eSPI IP core. 342 this Freescale eSPI IP core.
335 343
336 config FSL_QSPI 344 config FSL_QSPI
337 bool "Freescale QSPI driver" 345 bool "Freescale QSPI driver"
338 imply SPI_FLASH_BAR 346 imply SPI_FLASH_BAR
339 help 347 help
340 Enable the Freescale Quad-SPI (QSPI) driver. This driver can be 348 Enable the Freescale Quad-SPI (QSPI) driver. This driver can be
341 used to access the SPI NOR flash on platforms embedding this 349 used to access the SPI NOR flash on platforms embedding this
342 Freescale IP core. 350 Freescale IP core.
343 351
344 config DAVINCI_SPI 352 config DAVINCI_SPI
345 bool "Davinci & Keystone SPI driver" 353 bool "Davinci & Keystone SPI driver"
346 depends on ARCH_DAVINCI || ARCH_KEYSTONE 354 depends on ARCH_DAVINCI || ARCH_KEYSTONE
347 help 355 help
348 Enable the Davinci SPI driver 356 Enable the Davinci SPI driver
349 357
350 config SH_SPI 358 config SH_SPI
351 bool "SuperH SPI driver" 359 bool "SuperH SPI driver"
352 help 360 help
353 Enable the SuperH SPI controller driver. This driver can be used 361 Enable the SuperH SPI controller driver. This driver can be used
354 on various SuperH SoCs, such as SH7757. 362 on various SuperH SoCs, such as SH7757.
355 363
356 config SH_QSPI 364 config SH_QSPI
357 bool "Renesas Quad SPI driver" 365 bool "Renesas Quad SPI driver"
358 help 366 help
359 Enable the Renesas Quad SPI controller driver. This driver can be 367 Enable the Renesas Quad SPI controller driver. This driver can be
360 used on Renesas SoCs. 368 used on Renesas SoCs.
361 369
362 config KIRKWOOD_SPI 370 config KIRKWOOD_SPI
363 bool "Marvell Kirkwood SPI Driver" 371 bool "Marvell Kirkwood SPI Driver"
364 help 372 help
365 Enable support for SPI on various Marvell SoCs, such as 373 Enable support for SPI on various Marvell SoCs, such as
366 Kirkwood and Armada 375. 374 Kirkwood and Armada 375.
367 375
368 config LPC32XX_SSP 376 config LPC32XX_SSP
369 bool "LPC32XX SPI Driver" 377 bool "LPC32XX SPI Driver"
370 help 378 help
371 Enable support for SPI on LPC32xx 379 Enable support for SPI on LPC32xx
372 380
373 config MPC8XXX_SPI 381 config MPC8XXX_SPI
374 bool "MPC8XXX SPI Driver" 382 bool "MPC8XXX SPI Driver"
375 help 383 help
376 Enable support for SPI on the MPC8XXX PowerPC SoCs. 384 Enable support for SPI on the MPC8XXX PowerPC SoCs.
377 385
378 config MXC_SPI 386 config MXC_SPI
379 bool "MXC SPI Driver" 387 bool "MXC SPI Driver"
380 help 388 help
381 Enable the MXC SPI controller driver. This driver can be used 389 Enable the MXC SPI controller driver. This driver can be used
382 on various i.MX SoCs such as i.MX31/35/51/6/7. 390 on various i.MX SoCs such as i.MX31/35/51/6/7.
383 391
384 config MXS_SPI 392 config MXS_SPI
385 bool "MXS SPI Driver" 393 bool "MXS SPI Driver"
386 help 394 help
387 Enable the MXS SPI controller driver. This driver can be used 395 Enable the MXS SPI controller driver. This driver can be used
388 on the i.MX23 and i.MX28 SoCs. 396 on the i.MX23 and i.MX28 SoCs.
389 397
390 config OMAP3_SPI 398 config OMAP3_SPI
391 bool "McSPI driver for OMAP" 399 bool "McSPI driver for OMAP"
392 help 400 help
393 SPI master controller for OMAP24XX and later Multichannel SPI 401 SPI master controller for OMAP24XX and later Multichannel SPI
394 (McSPI). This driver be used to access SPI chips on platforms 402 (McSPI). This driver be used to access SPI chips on platforms
395 embedding this OMAP3 McSPI IP core. 403 embedding this OMAP3 McSPI IP core.
396 404
397 endif # menu "SPI Support" 405 endif # menu "SPI Support"
398 406
drivers/spi/Makefile
1 # SPDX-License-Identifier: GPL-2.0+ 1 # SPDX-License-Identifier: GPL-2.0+
2 # 2 #
3 # (C) Copyright 2000-2007 3 # (C) Copyright 2000-2007
4 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 5
6 # There are many options which enable SPI, so make this library available 6 # There are many options which enable SPI, so make this library available
7 ifdef CONFIG_DM_SPI 7 ifdef CONFIG_DM_SPI
8 obj-y += spi-uclass.o 8 obj-y += spi-uclass.o
9 obj-$(CONFIG_SANDBOX) += spi-emul-uclass.o 9 obj-$(CONFIG_SANDBOX) += spi-emul-uclass.o
10 obj-$(CONFIG_SOFT_SPI) += soft_spi.o 10 obj-$(CONFIG_SOFT_SPI) += soft_spi.o
11 obj-$(CONFIG_SPI_MEM) += spi-mem.o 11 obj-$(CONFIG_SPI_MEM) += spi-mem.o
12 obj-$(CONFIG_TI_QSPI) += ti_qspi.o 12 obj-$(CONFIG_TI_QSPI) += ti_qspi.o
13 else 13 else
14 obj-y += spi.o 14 obj-y += spi.o
15 obj-$(CONFIG_SPI_MEM) += spi-mem-nodm.o 15 obj-$(CONFIG_SPI_MEM) += spi-mem-nodm.o
16 obj-$(CONFIG_SOFT_SPI) += soft_spi_legacy.o 16 obj-$(CONFIG_SOFT_SPI) += soft_spi_legacy.o
17 endif 17 endif
18 18
19 obj-$(CONFIG_ALTERA_SPI) += altera_spi.o 19 obj-$(CONFIG_ALTERA_SPI) += altera_spi.o
20 obj-$(CONFIG_ATH79_SPI) += ath79_spi.o 20 obj-$(CONFIG_ATH79_SPI) += ath79_spi.o
21 obj-$(CONFIG_ATMEL_SPI) += atmel_spi.o 21 obj-$(CONFIG_ATMEL_SPI) += atmel_spi.o
22 obj-$(CONFIG_BCM63XX_HSSPI) += bcm63xx_hsspi.o 22 obj-$(CONFIG_BCM63XX_HSSPI) += bcm63xx_hsspi.o
23 obj-$(CONFIG_BCM63XX_SPI) += bcm63xx_spi.o 23 obj-$(CONFIG_BCM63XX_SPI) += bcm63xx_spi.o
24 obj-$(CONFIG_BCMSTB_SPI) += bcmstb_spi.o 24 obj-$(CONFIG_BCMSTB_SPI) += bcmstb_spi.o
25 obj-$(CONFIG_CADENCE_QSPI) += cadence_qspi.o cadence_qspi_apb.o 25 obj-$(CONFIG_CADENCE_QSPI) += cadence_qspi.o cadence_qspi_apb.o
26 obj-$(CONFIG_CF_SPI) += cf_spi.o 26 obj-$(CONFIG_CF_SPI) += cf_spi.o
27 obj-$(CONFIG_DAVINCI_SPI) += davinci_spi.o 27 obj-$(CONFIG_DAVINCI_SPI) += davinci_spi.o
28 obj-$(CONFIG_DESIGNWARE_SPI) += designware_spi.o 28 obj-$(CONFIG_DESIGNWARE_SPI) += designware_spi.o
29 obj-$(CONFIG_EXYNOS_SPI) += exynos_spi.o 29 obj-$(CONFIG_EXYNOS_SPI) += exynos_spi.o
30 obj-$(CONFIG_FSL_DSPI) += fsl_dspi.o 30 obj-$(CONFIG_FSL_DSPI) += fsl_dspi.o
31 obj-$(CONFIG_FSL_ESPI) += fsl_espi.o 31 obj-$(CONFIG_FSL_ESPI) += fsl_espi.o
32 obj-$(CONFIG_FSL_QSPI) += fsl_qspi.o 32 obj-$(CONFIG_FSL_QSPI) += fsl_qspi.o
33 obj-$(CONFIG_ICH_SPI) += ich.o 33 obj-$(CONFIG_ICH_SPI) += ich.o
34 obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o 34 obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o
35 obj-$(CONFIG_LPC32XX_SSP) += lpc32xx_ssp.o 35 obj-$(CONFIG_LPC32XX_SSP) += lpc32xx_ssp.o
36 obj-$(CONFIG_MESON_SPIFC) += meson_spifc.o 36 obj-$(CONFIG_MESON_SPIFC) += meson_spifc.o
37 obj-$(CONFIG_MPC8XX_SPI) += mpc8xx_spi.o 37 obj-$(CONFIG_MPC8XX_SPI) += mpc8xx_spi.o
38 obj-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o 38 obj-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o
39 obj-$(CONFIG_MTK_QSPI) += mtk_qspi.o 39 obj-$(CONFIG_MTK_QSPI) += mtk_qspi.o
40 obj-$(CONFIG_MT7621_SPI) += mt7621_spi.o 40 obj-$(CONFIG_MT7621_SPI) += mt7621_spi.o
41 obj-$(CONFIG_MSCC_BB_SPI) += mscc_bb_spi.o 41 obj-$(CONFIG_MSCC_BB_SPI) += mscc_bb_spi.o
42 obj-$(CONFIG_MVEBU_A3700_SPI) += mvebu_a3700_spi.o 42 obj-$(CONFIG_MVEBU_A3700_SPI) += mvebu_a3700_spi.o
43 obj-$(CONFIG_MXC_SPI) += mxc_spi.o 43 obj-$(CONFIG_MXC_SPI) += mxc_spi.o
44 obj-$(CONFIG_MXS_SPI) += mxs_spi.o 44 obj-$(CONFIG_MXS_SPI) += mxs_spi.o
45 obj-$(CONFIG_ATCSPI200_SPI) += atcspi200_spi.o 45 obj-$(CONFIG_ATCSPI200_SPI) += atcspi200_spi.o
46 obj-$(CONFIG_OMAP3_SPI) += omap3_spi.o 46 obj-$(CONFIG_OMAP3_SPI) += omap3_spi.o
47 obj-$(CONFIG_PIC32_SPI) += pic32_spi.o 47 obj-$(CONFIG_PIC32_SPI) += pic32_spi.o
48 obj-$(CONFIG_PL022_SPI) += pl022_spi.o 48 obj-$(CONFIG_PL022_SPI) += pl022_spi.o
49 obj-$(CONFIG_RENESAS_RPC_SPI) += renesas_rpc_spi.o 49 obj-$(CONFIG_RENESAS_RPC_SPI) += renesas_rpc_spi.o
50 obj-$(CONFIG_ROCKCHIP_SPI) += rk_spi.o 50 obj-$(CONFIG_ROCKCHIP_SPI) += rk_spi.o
51 obj-$(CONFIG_SANDBOX_SPI) += sandbox_spi.o 51 obj-$(CONFIG_SANDBOX_SPI) += sandbox_spi.o
52 obj-$(CONFIG_SPI_SUNXI) += spi-sunxi.o 52 obj-$(CONFIG_SPI_SUNXI) += spi-sunxi.o
53 obj-$(CONFIG_SH_SPI) += sh_spi.o 53 obj-$(CONFIG_SH_SPI) += sh_spi.o
54 obj-$(CONFIG_SH_QSPI) += sh_qspi.o 54 obj-$(CONFIG_SH_QSPI) += sh_qspi.o
55 obj-$(CONFIG_STM32_QSPI) += stm32_qspi.o 55 obj-$(CONFIG_STM32_QSPI) += stm32_qspi.o
56 obj-$(CONFIG_STM32_SPI) += stm32_spi.o
56 obj-$(CONFIG_TEGRA114_SPI) += tegra114_spi.o 57 obj-$(CONFIG_TEGRA114_SPI) += tegra114_spi.o
57 obj-$(CONFIG_TEGRA20_SFLASH) += tegra20_sflash.o 58 obj-$(CONFIG_TEGRA20_SFLASH) += tegra20_sflash.o
58 obj-$(CONFIG_TEGRA20_SLINK) += tegra20_slink.o 59 obj-$(CONFIG_TEGRA20_SLINK) += tegra20_slink.o
59 obj-$(CONFIG_TEGRA210_QSPI) += tegra210_qspi.o 60 obj-$(CONFIG_TEGRA210_QSPI) += tegra210_qspi.o
60 obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o 61 obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o
61 obj-$(CONFIG_ZYNQ_SPI) += zynq_spi.o 62 obj-$(CONFIG_ZYNQ_SPI) += zynq_spi.o
62 obj-$(CONFIG_ZYNQ_QSPI) += zynq_qspi.o 63 obj-$(CONFIG_ZYNQ_QSPI) += zynq_qspi.o
63 obj-$(CONFIG_ZYNQMP_GQSPI) += zynqmp_gqspi.o 64 obj-$(CONFIG_ZYNQMP_GQSPI) += zynqmp_gqspi.o
64 65
drivers/spi/stm32_spi.c
File was created 1 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2 /*
3 * Copyright (C) 2019, STMicroelectronics - All Rights Reserved
4 *
5 * Driver for STMicroelectronics Serial peripheral interface (SPI)
6 */
7 #include <common.h>
8 #include <clk.h>
9 #include <dm.h>
10 #include <errno.h>
11 #include <reset.h>
12 #include <spi.h>
13
14 #include <asm/io.h>
15 #include <asm/gpio.h>
16 #include <linux/bitfield.h>
17 #include <linux/iopoll.h>
18
19 /* STM32 SPI registers */
20 #define STM32_SPI_CR1 0x00
21 #define STM32_SPI_CR2 0x04
22 #define STM32_SPI_CFG1 0x08
23 #define STM32_SPI_CFG2 0x0C
24 #define STM32_SPI_SR 0x14
25 #define STM32_SPI_IFCR 0x18
26 #define STM32_SPI_TXDR 0x20
27 #define STM32_SPI_RXDR 0x30
28 #define STM32_SPI_I2SCFGR 0x50
29
30 /* STM32_SPI_CR1 bit fields */
31 #define SPI_CR1_SPE BIT(0)
32 #define SPI_CR1_MASRX BIT(8)
33 #define SPI_CR1_CSTART BIT(9)
34 #define SPI_CR1_CSUSP BIT(10)
35 #define SPI_CR1_HDDIR BIT(11)
36 #define SPI_CR1_SSI BIT(12)
37
38 /* STM32_SPI_CR2 bit fields */
39 #define SPI_CR2_TSIZE GENMASK(15, 0)
40
41 /* STM32_SPI_CFG1 bit fields */
42 #define SPI_CFG1_DSIZE GENMASK(4, 0)
43 #define SPI_CFG1_DSIZE_MIN 3
44 #define SPI_CFG1_FTHLV_SHIFT 5
45 #define SPI_CFG1_FTHLV GENMASK(8, 5)
46 #define SPI_CFG1_MBR_SHIFT 28
47 #define SPI_CFG1_MBR GENMASK(30, 28)
48 #define SPI_CFG1_MBR_MIN 0
49 #define SPI_CFG1_MBR_MAX FIELD_GET(SPI_CFG1_MBR, SPI_CFG1_MBR)
50
51 /* STM32_SPI_CFG2 bit fields */
52 #define SPI_CFG2_COMM_SHIFT 17
53 #define SPI_CFG2_COMM GENMASK(18, 17)
54 #define SPI_CFG2_MASTER BIT(22)
55 #define SPI_CFG2_LSBFRST BIT(23)
56 #define SPI_CFG2_CPHA BIT(24)
57 #define SPI_CFG2_CPOL BIT(25)
58 #define SPI_CFG2_SSM BIT(26)
59 #define SPI_CFG2_AFCNTR BIT(31)
60
61 /* STM32_SPI_SR bit fields */
62 #define SPI_SR_RXP BIT(0)
63 #define SPI_SR_TXP BIT(1)
64 #define SPI_SR_EOT BIT(3)
65 #define SPI_SR_TXTF BIT(4)
66 #define SPI_SR_OVR BIT(6)
67 #define SPI_SR_SUSP BIT(11)
68 #define SPI_SR_RXPLVL_SHIFT 13
69 #define SPI_SR_RXPLVL GENMASK(14, 13)
70 #define SPI_SR_RXWNE BIT(15)
71
72 /* STM32_SPI_IFCR bit fields */
73 #define SPI_IFCR_ALL GENMASK(11, 3)
74
75 /* STM32_SPI_I2SCFGR bit fields */
76 #define SPI_I2SCFGR_I2SMOD BIT(0)
77
78 #define MAX_CS_COUNT 4
79
80 /* SPI Master Baud Rate min/max divisor */
81 #define STM32_MBR_DIV_MIN (2 << SPI_CFG1_MBR_MIN)
82 #define STM32_MBR_DIV_MAX (2 << SPI_CFG1_MBR_MAX)
83
84 #define STM32_SPI_TIMEOUT_US 100000
85
86 /* SPI Communication mode */
87 #define SPI_FULL_DUPLEX 0
88 #define SPI_SIMPLEX_TX 1
89 #define SPI_SIMPLEX_RX 2
90 #define SPI_HALF_DUPLEX 3
91
92 struct stm32_spi_priv {
93 void __iomem *base;
94 struct clk clk;
95 struct reset_ctl rst_ctl;
96 struct gpio_desc cs_gpios[MAX_CS_COUNT];
97 ulong bus_clk_rate;
98 unsigned int fifo_size;
99 unsigned int cur_bpw;
100 unsigned int cur_hz;
101 unsigned int cur_xferlen; /* current transfer length in bytes */
102 int tx_len; /* number of data to be written in bytes */
103 int rx_len; /* number of data to be read in bytes */
104 const void *tx_buf; /* data to be written, or NULL */
105 void *rx_buf; /* data to be read, or NULL */
106 u32 cur_mode;
107 bool cs_high;
108 };
109
110 static void stm32_spi_write_txfifo(struct stm32_spi_priv *priv)
111 {
112 while ((priv->tx_len > 0) &&
113 (readl(priv->base + STM32_SPI_SR) & SPI_SR_TXP)) {
114 u32 offs = priv->cur_xferlen - priv->tx_len;
115
116 if (priv->tx_len >= sizeof(u32) &&
117 IS_ALIGNED((uintptr_t)(priv->tx_buf + offs), sizeof(u32))) {
118 const u32 *tx_buf32 = (const u32 *)(priv->tx_buf + offs);
119
120 writel(*tx_buf32, priv->base + STM32_SPI_TXDR);
121 priv->tx_len -= sizeof(u32);
122 } else if (priv->tx_len >= sizeof(u16) &&
123 IS_ALIGNED((uintptr_t)(priv->tx_buf + offs), sizeof(u16))) {
124 const u16 *tx_buf16 = (const u16 *)(priv->tx_buf + offs);
125
126 writew(*tx_buf16, priv->base + STM32_SPI_TXDR);
127 priv->tx_len -= sizeof(u16);
128 } else {
129 const u8 *tx_buf8 = (const u8 *)(priv->tx_buf + offs);
130
131 writeb(*tx_buf8, priv->base + STM32_SPI_TXDR);
132 priv->tx_len -= sizeof(u8);
133 }
134 }
135
136 debug("%s: %d bytes left\n", __func__, priv->tx_len);
137 }
138
139 static void stm32_spi_read_rxfifo(struct stm32_spi_priv *priv)
140 {
141 u32 sr = readl(priv->base + STM32_SPI_SR);
142 u32 rxplvl = (sr & SPI_SR_RXPLVL) >> SPI_SR_RXPLVL_SHIFT;
143
144 while ((priv->rx_len > 0) &&
145 ((sr & SPI_SR_RXP) ||
146 ((sr & SPI_SR_EOT) && ((sr & SPI_SR_RXWNE) || (rxplvl > 0))))) {
147 u32 offs = priv->cur_xferlen - priv->rx_len;
148
149 if (IS_ALIGNED((uintptr_t)(priv->rx_buf + offs), sizeof(u32)) &&
150 (priv->rx_len >= sizeof(u32) || (sr & SPI_SR_RXWNE))) {
151 u32 *rx_buf32 = (u32 *)(priv->rx_buf + offs);
152
153 *rx_buf32 = readl(priv->base + STM32_SPI_RXDR);
154 priv->rx_len -= sizeof(u32);
155 } else if (IS_ALIGNED((uintptr_t)(priv->rx_buf + offs), sizeof(u16)) &&
156 (priv->rx_len >= sizeof(u16) ||
157 (!(sr & SPI_SR_RXWNE) &&
158 (rxplvl >= 2 || priv->cur_bpw > 8)))) {
159 u16 *rx_buf16 = (u16 *)(priv->rx_buf + offs);
160
161 *rx_buf16 = readw(priv->base + STM32_SPI_RXDR);
162 priv->rx_len -= sizeof(u16);
163 } else {
164 u8 *rx_buf8 = (u8 *)(priv->rx_buf + offs);
165
166 *rx_buf8 = readb(priv->base + STM32_SPI_RXDR);
167 priv->rx_len -= sizeof(u8);
168 }
169
170 sr = readl(priv->base + STM32_SPI_SR);
171 rxplvl = (sr & SPI_SR_RXPLVL) >> SPI_SR_RXPLVL_SHIFT;
172 }
173
174 debug("%s: %d bytes left\n", __func__, priv->rx_len);
175 }
176
177 static int stm32_spi_enable(struct stm32_spi_priv *priv)
178 {
179 debug("%s\n", __func__);
180
181 /* Enable the SPI hardware */
182 setbits_le32(priv->base + STM32_SPI_CR1, SPI_CR1_SPE);
183
184 return 0;
185 }
186
187 static int stm32_spi_disable(struct stm32_spi_priv *priv)
188 {
189 debug("%s\n", __func__);
190
191 /* Disable the SPI hardware */
192 clrbits_le32(priv->base + STM32_SPI_CR1, SPI_CR1_SPE);
193
194 return 0;
195 }
196
197 static int stm32_spi_claim_bus(struct udevice *slave)
198 {
199 struct udevice *bus = dev_get_parent(slave);
200 struct stm32_spi_priv *priv = dev_get_priv(bus);
201
202 debug("%s\n", __func__);
203
204 /* Enable the SPI hardware */
205 return stm32_spi_enable(priv);
206 }
207
208 static int stm32_spi_release_bus(struct udevice *slave)
209 {
210 struct udevice *bus = dev_get_parent(slave);
211 struct stm32_spi_priv *priv = dev_get_priv(bus);
212
213 debug("%s\n", __func__);
214
215 /* Disable the SPI hardware */
216 return stm32_spi_disable(priv);
217 }
218
219 static void stm32_spi_stopxfer(struct udevice *dev)
220 {
221 struct stm32_spi_priv *priv = dev_get_priv(dev);
222 u32 cr1, sr;
223 int ret;
224
225 debug("%s\n", __func__);
226
227 cr1 = readl(priv->base + STM32_SPI_CR1);
228
229 if (!(cr1 & SPI_CR1_SPE))
230 return;
231
232 /* Wait on EOT or suspend the flow */
233 ret = readl_poll_timeout(priv->base + STM32_SPI_SR, sr,
234 !(sr & SPI_SR_EOT), 100000);
235 if (ret < 0) {
236 if (cr1 & SPI_CR1_CSTART) {
237 writel(cr1 | SPI_CR1_CSUSP, priv->base + STM32_SPI_CR1);
238 if (readl_poll_timeout(priv->base + STM32_SPI_SR,
239 sr, !(sr & SPI_SR_SUSP),
240 100000) < 0)
241 dev_err(dev, "Suspend request timeout\n");
242 }
243 }
244
245 /* clear status flags */
246 setbits_le32(priv->base + STM32_SPI_IFCR, SPI_IFCR_ALL);
247 }
248
249 static int stm32_spi_set_cs(struct udevice *dev, unsigned int cs, bool enable)
250 {
251 struct stm32_spi_priv *priv = dev_get_priv(dev);
252
253 debug("%s: cs=%d enable=%d\n", __func__, cs, enable);
254
255 if (cs >= MAX_CS_COUNT)
256 return -ENODEV;
257
258 if (!dm_gpio_is_valid(&priv->cs_gpios[cs]))
259 return -EINVAL;
260
261 if (priv->cs_high)
262 enable = !enable;
263
264 return dm_gpio_set_value(&priv->cs_gpios[cs], enable ? 1 : 0);
265 }
266
267 static int stm32_spi_set_mode(struct udevice *bus, uint mode)
268 {
269 struct stm32_spi_priv *priv = dev_get_priv(bus);
270 u32 cfg2_clrb = 0, cfg2_setb = 0;
271
272 debug("%s: mode=%d\n", __func__, mode);
273
274 if (mode & SPI_CPOL)
275 cfg2_setb |= SPI_CFG2_CPOL;
276 else
277 cfg2_clrb |= SPI_CFG2_CPOL;
278
279 if (mode & SPI_CPHA)
280 cfg2_setb |= SPI_CFG2_CPHA;
281 else
282 cfg2_clrb |= SPI_CFG2_CPHA;
283
284 if (mode & SPI_LSB_FIRST)
285 cfg2_setb |= SPI_CFG2_LSBFRST;
286 else
287 cfg2_clrb |= SPI_CFG2_LSBFRST;
288
289 if (cfg2_clrb || cfg2_setb)
290 clrsetbits_le32(priv->base + STM32_SPI_CFG2,
291 cfg2_clrb, cfg2_setb);
292
293 if (mode & SPI_CS_HIGH)
294 priv->cs_high = true;
295 else
296 priv->cs_high = false;
297 return 0;
298 }
299
300 static int stm32_spi_set_fthlv(struct udevice *dev, u32 xfer_len)
301 {
302 struct stm32_spi_priv *priv = dev_get_priv(dev);
303 u32 fthlv, half_fifo;
304
305 /* data packet should not exceed 1/2 of fifo space */
306 half_fifo = (priv->fifo_size / 2);
307
308 /* data_packet should not exceed transfer length */
309 fthlv = (half_fifo > xfer_len) ? xfer_len : half_fifo;
310
311 /* align packet size with data registers access */
312 fthlv -= (fthlv % 4);
313
314 if (!fthlv)
315 fthlv = 1;
316 clrsetbits_le32(priv->base + STM32_SPI_CFG1, SPI_CFG1_FTHLV,
317 (fthlv - 1) << SPI_CFG1_FTHLV_SHIFT);
318
319 return 0;
320 }
321
322 static int stm32_spi_set_speed(struct udevice *bus, uint hz)
323 {
324 struct stm32_spi_priv *priv = dev_get_priv(bus);
325 u32 div, mbrdiv;
326
327 debug("%s: hz=%d\n", __func__, hz);
328
329 if (priv->cur_hz == hz)
330 return 0;
331
332 div = DIV_ROUND_UP(priv->bus_clk_rate, hz);
333
334 if (div < STM32_MBR_DIV_MIN ||
335 div > STM32_MBR_DIV_MAX)
336 return -EINVAL;
337
338 /* Determine the first power of 2 greater than or equal to div */
339 if (div & (div - 1))
340 mbrdiv = fls(div);
341 else
342 mbrdiv = fls(div) - 1;
343
344 if ((mbrdiv - 1) < 0)
345 return -EINVAL;
346
347 clrsetbits_le32(priv->base + STM32_SPI_CFG1, SPI_CFG1_MBR,
348 (mbrdiv - 1) << SPI_CFG1_MBR_SHIFT);
349
350 priv->cur_hz = hz;
351
352 return 0;
353 }
354
355 static int stm32_spi_xfer(struct udevice *slave, unsigned int bitlen,
356 const void *dout, void *din, unsigned long flags)
357 {
358 struct udevice *bus = dev_get_parent(slave);
359 struct dm_spi_slave_platdata *slave_plat;
360 struct stm32_spi_priv *priv = dev_get_priv(bus);
361 u32 sr;
362 u32 ifcr = 0;
363 u32 xferlen;
364 u32 mode;
365 int xfer_status = 0;
366
367 xferlen = bitlen / 8;
368
369 if (xferlen <= SPI_CR2_TSIZE)
370 writel(xferlen, priv->base + STM32_SPI_CR2);
371 else
372 return -EMSGSIZE;
373
374 priv->tx_buf = dout;
375 priv->rx_buf = din;
376 priv->tx_len = priv->tx_buf ? bitlen / 8 : 0;
377 priv->rx_len = priv->rx_buf ? bitlen / 8 : 0;
378
379 mode = SPI_FULL_DUPLEX;
380 if (!priv->tx_buf)
381 mode = SPI_SIMPLEX_RX;
382 else if (!priv->rx_buf)
383 mode = SPI_SIMPLEX_TX;
384
385 if (priv->cur_xferlen != xferlen || priv->cur_mode != mode) {
386 priv->cur_mode = mode;
387 priv->cur_xferlen = xferlen;
388
389 /* Disable the SPI hardware to unlock CFG1/CFG2 registers */
390 stm32_spi_disable(priv);
391
392 clrsetbits_le32(priv->base + STM32_SPI_CFG2, SPI_CFG2_COMM,
393 mode << SPI_CFG2_COMM_SHIFT);
394
395 stm32_spi_set_fthlv(bus, xferlen);
396
397 /* Enable the SPI hardware */
398 stm32_spi_enable(priv);
399 }
400
401 debug("%s: priv->tx_len=%d priv->rx_len=%d\n", __func__,
402 priv->tx_len, priv->rx_len);
403
404 slave_plat = dev_get_parent_platdata(slave);
405 if (flags & SPI_XFER_BEGIN)
406 stm32_spi_set_cs(bus, slave_plat->cs, false);
407
408 /* Be sure to have data in fifo before starting data transfer */
409 if (priv->tx_buf)
410 stm32_spi_write_txfifo(priv);
411
412 setbits_le32(priv->base + STM32_SPI_CR1, SPI_CR1_CSTART);
413
414 while (1) {
415 sr = readl(priv->base + STM32_SPI_SR);
416
417 if (sr & SPI_SR_OVR) {
418 dev_err(bus, "Overrun: RX data lost\n");
419 xfer_status = -EIO;
420 break;
421 }
422
423 if (sr & SPI_SR_SUSP) {
424 dev_warn(bus, "System too slow is limiting data throughput\n");
425
426 if (priv->rx_buf && priv->rx_len > 0)
427 stm32_spi_read_rxfifo(priv);
428
429 ifcr |= SPI_SR_SUSP;
430 }
431
432 if (sr & SPI_SR_TXTF)
433 ifcr |= SPI_SR_TXTF;
434
435 if (sr & SPI_SR_TXP)
436 if (priv->tx_buf && priv->tx_len > 0)
437 stm32_spi_write_txfifo(priv);
438
439 if (sr & SPI_SR_RXP)
440 if (priv->rx_buf && priv->rx_len > 0)
441 stm32_spi_read_rxfifo(priv);
442
443 if (sr & SPI_SR_EOT) {
444 if (priv->rx_buf && priv->rx_len > 0)
445 stm32_spi_read_rxfifo(priv);
446 break;
447 }
448
449 writel(ifcr, priv->base + STM32_SPI_IFCR);
450 }
451
452 /* clear status flags */
453 setbits_le32(priv->base + STM32_SPI_IFCR, SPI_IFCR_ALL);
454 stm32_spi_stopxfer(bus);
455
456 if (flags & SPI_XFER_END)
457 stm32_spi_set_cs(bus, slave_plat->cs, true);
458
459 return xfer_status;
460 }
461
462 static int stm32_spi_get_fifo_size(struct udevice *dev)
463 {
464 struct stm32_spi_priv *priv = dev_get_priv(dev);
465 u32 count = 0;
466
467 stm32_spi_enable(priv);
468
469 while (readl(priv->base + STM32_SPI_SR) & SPI_SR_TXP)
470 writeb(++count, priv->base + STM32_SPI_TXDR);
471
472 stm32_spi_disable(priv);
473
474 debug("%s %d x 8-bit fifo size\n", __func__, count);
475
476 return count;
477 }
478
479 static int stm32_spi_probe(struct udevice *dev)
480 {
481 struct stm32_spi_priv *priv = dev_get_priv(dev);
482 unsigned long clk_rate;
483 int ret;
484 int i;
485
486 priv->base = dev_remap_addr(dev);
487 if (!priv->base)
488 return -EINVAL;
489
490 /* enable clock */
491 ret = clk_get_by_index(dev, 0, &priv->clk);
492 if (ret < 0)
493 return ret;
494
495 ret = clk_enable(&priv->clk);
496 if (ret < 0)
497 return ret;
498
499 clk_rate = clk_get_rate(&priv->clk);
500 if (!clk_rate) {
501 ret = -EINVAL;
502 goto clk_err;
503 }
504
505 priv->bus_clk_rate = clk_rate;
506
507 /* perform reset */
508 ret = reset_get_by_index(dev, 0, &priv->rst_ctl);
509 if (ret < 0)
510 goto clk_err;
511
512 reset_assert(&priv->rst_ctl);
513 udelay(2);
514 reset_deassert(&priv->rst_ctl);
515
516 ret = gpio_request_list_by_name(dev, "cs-gpios", priv->cs_gpios,
517 ARRAY_SIZE(priv->cs_gpios), 0);
518 if (ret < 0) {
519 pr_err("Can't get %s cs gpios: %d", dev->name, ret);
520 goto reset_err;
521 }
522
523 priv->fifo_size = stm32_spi_get_fifo_size(dev);
524
525 priv->cur_mode = SPI_FULL_DUPLEX;
526 priv->cur_xferlen = 0;
527 priv->cur_bpw = SPI_DEFAULT_WORDLEN;
528 clrsetbits_le32(priv->base + STM32_SPI_CFG1, SPI_CFG1_DSIZE,
529 priv->cur_bpw - 1);
530
531 for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
532 if (!dm_gpio_is_valid(&priv->cs_gpios[i]))
533 continue;
534
535 dm_gpio_set_dir_flags(&priv->cs_gpios[i],
536 GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
537 }
538
539 /* Ensure I2SMOD bit is kept cleared */
540 clrbits_le32(priv->base + STM32_SPI_I2SCFGR, SPI_I2SCFGR_I2SMOD);
541
542 /*
543 * - SS input value high
544 * - transmitter half duplex direction
545 * - automatic communication suspend when RX-Fifo is full
546 */
547 setbits_le32(priv->base + STM32_SPI_CR1,
548 SPI_CR1_SSI | SPI_CR1_HDDIR | SPI_CR1_MASRX);
549
550 /*
551 * - Set the master mode (default Motorola mode)
552 * - Consider 1 master/n slaves configuration and
553 * SS input value is determined by the SSI bit
554 * - keep control of all associated GPIOs
555 */
556 setbits_le32(priv->base + STM32_SPI_CFG2,
557 SPI_CFG2_MASTER | SPI_CFG2_SSM | SPI_CFG2_AFCNTR);
558
559 return 0;
560
561 reset_err:
562 reset_free(&priv->rst_ctl);
563
564 clk_err:
565 clk_disable(&priv->clk);
566 clk_free(&priv->clk);
567
568 return ret;
569 };
570
571 static int stm32_spi_remove(struct udevice *dev)
572 {
573 struct stm32_spi_priv *priv = dev_get_priv(dev);
574 int ret;
575
576 stm32_spi_stopxfer(dev);
577 stm32_spi_disable(priv);
578
579 ret = reset_assert(&priv->rst_ctl);
580 if (ret < 0)
581 return ret;
582
583 reset_free(&priv->rst_ctl);
584
585 ret = clk_disable(&priv->clk);
586 if (ret < 0)
587 return ret;
588
589 clk_free(&priv->clk);
590
591 return ret;
592 };
593
594 static const struct dm_spi_ops stm32_spi_ops = {
595 .claim_bus = stm32_spi_claim_bus,
596 .release_bus = stm32_spi_release_bus,
597 .set_mode = stm32_spi_set_mode,
598 .set_speed = stm32_spi_set_speed,
599 .xfer = stm32_spi_xfer,
600 };
601
602 static const struct udevice_id stm32_spi_ids[] = {
603 { .compatible = "st,stm32h7-spi", },
604 { }
605 };
606
607 U_BOOT_DRIVER(stm32_spi) = {
608 .name = "stm32_spi",
609 .id = UCLASS_SPI,
610 .of_match = stm32_spi_ids,
611 .ops = &stm32_spi_ops,
612 .priv_auto_alloc_size = sizeof(struct stm32_spi_priv),
613 .probe = stm32_spi_probe,
614 .remove = stm32_spi_remove,
615 };
616