diff --git a/arch/arm/src/stm32/stm32_spi.c b/arch/arm/src/stm32/stm32_spi.c index e517a4028b..978ea18556 100644 --- a/arch/arm/src/stm32/stm32_spi.c +++ b/arch/arm/src/stm32/stm32_spi.c @@ -1,35 +1,20 @@ /************************************************************************************ * arch/arm/src/stm32/stm32_spi.c * - * Copyright (C) 2009-2013, 2016-2018 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. * ************************************************************************************/ @@ -83,8 +68,9 @@ #include "stm32_dma.h" #include "stm32_spi.h" -#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) || \ - defined(CONFIG_STM32_SPI4) || defined(CONFIG_STM32_SPI5) || defined(CONFIG_STM32_SPI6) +#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || \ + defined(CONFIG_STM32_SPI3) || defined(CONFIG_STM32_SPI4) || \ + defined(CONFIG_STM32_SPI5) || defined(CONFIG_STM32_SPI6) /************************************************************************************ * Pre-processor Definitions @@ -1440,7 +1426,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) } } -/**************************************************************************** +/************************************************************************************ * Name: spi_hwfeatures * * Description: @@ -1454,7 +1440,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) * Zero (OK) if the selected H/W features are enabled; A negated errno * value if any H/W feature is not supportable. * - ****************************************************************************/ + ************************************************************************************/ #ifdef CONFIG_SPI_HWFEATURES static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features) @@ -1566,7 +1552,8 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) * ************************************************************************************/ -#if !defined(CONFIG_STM32_SPI_DMA) || defined(CONFIG_STM32_DMACAPABLE) || defined(CONFIG_STM32_SPI_DMATHRESHOLD) +#if !defined(CONFIG_STM32_SPI_DMA) || defined(CONFIG_STM32_DMACAPABLE) || \ + defined(CONFIG_STM32_SPI_DMATHRESHOLD) #if !defined(CONFIG_STM32_SPI_DMA) static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, FAR void *rxbuffer, size_t nwords) @@ -1651,7 +1638,7 @@ static void spi_exchange_nodma(FAR struct spi_dev_s *dev, FAR const void *txbuff } #endif /* !CONFIG_STM32_SPI_DMA || CONFIG_STM32_DMACAPABLE || CONFIG_STM32_SPI_DMATHRESHOLD */ -/**************************************************************************** +/************************************************************************************ * Name: spi_exchange (with DMA capability) * * Description: @@ -1761,7 +1748,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, } #endif /* CONFIG_STM32_SPI_DMA */ -/**************************************************************************** +/************************************************************************************ * Name: spi_trigger * * Description: @@ -1775,7 +1762,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, * ENOTSUP - Trigger not fired due to lack of DMA support * EIO - Trigger not fired because not previously primed * - ****************************************************************************/ + ************************************************************************************/ #ifdef CONFIG_SPI_TRIGGER static int spi_trigger(FAR struct spi_dev_s *dev) @@ -1798,7 +1785,7 @@ static int spi_trigger(FAR struct spi_dev_s *dev) } #endif -/**************************************************************************** +/************************************************************************************ * Name: spi_sndblock * * Description: @@ -2149,4 +2136,6 @@ FAR struct spi_dev_s *stm32_spibus_initialize(int bus) return (FAR struct spi_dev_s *)priv; } -#endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI2 || CONFIG_STM32_SPI3 || CONFIG_STM32_SPI4 || CONFIG_STM32_SPI5 || CONFIG_STM32_SPI6 */ +#endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI2 || CONFIG_STM32_SPI3 || + * CONFIG_STM32_SPI4 || CONFIG_STM32_SPI5 || CONFIG_STM32_SPI6 + */ diff --git a/arch/arm/src/stm32f7/stm32_spi.c b/arch/arm/src/stm32f7/stm32_spi.c index fbbda1444f..90a18bfb3e 100644 --- a/arch/arm/src/stm32f7/stm32_spi.c +++ b/arch/arm/src/stm32f7/stm32_spi.c @@ -1,36 +1,20 @@ /************************************************************************************ * arm/arm/src/stm32f7/stm32_spi.c * - * Copyright (C) 2016-2017 Gregory Nutt. All rights reserved. - * Authors: Gregory Nutt - * David Sidrane + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. * ************************************************************************************/ @@ -95,6 +79,7 @@ ************************************************************************************/ /* Configuration ********************************************************************/ + /* SPI interrupts */ #ifdef CONFIG_STM32F7_SPI_INTERRUPTS @@ -123,7 +108,6 @@ # error "Illegal value for CONFIG_SPI_DMAPRIO" #endif - /* DMA channel configuration */ # define SPI_RXDMA16_CONFIG (SPI_DMA_PRIO|DMA_SCR_MSIZE_16BITS|DMA_SCR_PSIZE_16BITS|DMA_SCR_MINC|DMA_SCR_DIR_P2M) @@ -277,7 +261,10 @@ static const struct spi_ops_s g_sp1iops = static struct stm32_spidev_s g_spi1dev = { - .spidev = { &g_sp1iops }, + .spidev = + { + &g_sp1iops + }, .spibase = STM32_SPI1_BASE, .spiclock = STM32_PCLK2_FREQUENCY, #ifdef CONFIG_STM32F7_SPI_INTERRUPTS @@ -332,7 +319,10 @@ static const struct spi_ops_s g_sp2iops = static struct stm32_spidev_s g_spi2dev = { - .spidev = { &g_sp2iops }, + .spidev = + { + &g_sp2iops + }, .spibase = STM32_SPI2_BASE, .spiclock = STM32_PCLK1_FREQUENCY, #ifdef CONFIG_STM32F7_SPI_INTERRUPTS @@ -387,7 +377,10 @@ static const struct spi_ops_s g_sp3iops = static struct stm32_spidev_s g_spi3dev = { - .spidev = { &g_sp3iops }, + .spidev = + { + &g_sp3iops + }, .spibase = STM32_SPI3_BASE, .spiclock = STM32_PCLK1_FREQUENCY, #ifdef CONFIG_STM32F7_SPI_INTERRUPTS @@ -442,7 +435,10 @@ static const struct spi_ops_s g_sp4iops = static struct stm32_spidev_s g_spi4dev = { - .spidev = { &g_sp4iops }, + .spidev = + { + &g_sp4iops + }, .spibase = STM32_SPI4_BASE, .spiclock = STM32_PCLK2_FREQUENCY, #ifdef CONFIG_STM32F7_SPI_INTERRUPTS @@ -497,7 +493,10 @@ static const struct spi_ops_s g_sp5iops = static struct stm32_spidev_s g_spi5dev = { - .spidev = { &g_sp5iops }, + .spidev = + { + &g_sp5iops + }, .spibase = STM32_SPI5_BASE, .spiclock = STM32_PCLK2_FREQUENCY, #ifdef CONFIG_STM32F7_SPI_INTERRUPTS @@ -552,7 +551,10 @@ static const struct spi_ops_s g_sp6iops = static struct stm32_spidev_s g_spi6dev = { - .spidev = { &g_sp6iops }, + .spidev = + { + &g_sp6iops + }, .spibase = STM32_SPI6_BASE, .spiclock = STM32_PCLK2_FREQUENCY, #ifdef CONFIG_STM32F7_SPI_INTERRUPTS @@ -1352,6 +1354,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) if (nbits != priv->nbits) { /* Yes... Set CR2 appropriately */ + /* Set the number of bits (valid range 4-16) */ if (nbits < 4 || nbits > 16) @@ -1381,11 +1384,11 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) /* Save the selection so the subsequence re-configurations will be faster */ - priv->nbits = savbits; // nbits has been clobbered... save the signed value. + priv->nbits = savbits; /* nbits has been clobbered... save the signed value. */ } } -/**************************************************************************** +/************************************************************************************ * Name: spi_hwfeatures * * Description: @@ -1399,7 +1402,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) * Zero (OK) if the selected H/W features are enabled; A negated errno * value if any H/W feature is not supportable. * - ****************************************************************************/ + ************************************************************************************/ #ifdef CONFIG_SPI_HWFEATURES static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features) @@ -1490,7 +1493,7 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) } else { - spi_writebyte(priv, (uint8_t)(wd & 0xFF)); + spi_writebyte(priv, (uint8_t)(wd & 0xff)); ret = (uint16_t)spi_readbyte(priv); } @@ -1533,7 +1536,8 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) * ************************************************************************************/ -#if !defined(CONFIG_STM32F7_SPI_DMA) || defined(CONFIG_STM32F7_DMACAPABLE) || defined(CONFIG_STM32F7_SPI_DMATHRESHOLD) +#if !defined(CONFIG_STM32F7_SPI_DMA) || defined(CONFIG_STM32F7_DMACAPABLE) || \ + defined(CONFIG_STM32F7_SPI_DMATHRESHOLD) #if !defined(CONFIG_STM32F7_SPI_DMA) static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, FAR void *rxbuffer, size_t nwords) @@ -1616,9 +1620,11 @@ static void spi_exchange_nodma(FAR struct spi_dev_s *dev, FAR const void *txbuff } } } -#endif /* !CONFIG_STM32F7_SPI_DMA || CONFIG_STM32F7_DMACAPABLE || CONFIG_STM32F7_SPI_DMATHRESHOLD */ +#endif /* !CONFIG_STM32F7_SPI_DMA || CONFIG_STM32F7_DMACAPABLE || + * CONFIG_STM32F7_SPI_DMATHRESHOLD + */ -/**************************************************************************** +/************************************************************************************ * Name: spi_exchange (with DMA capability) * * Description: @@ -1755,7 +1761,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, } #endif /* CONFIG_STM32F7_SPI_DMA */ -/**************************************************************************** +/************************************************************************************ * Name: spi_trigger * * Description: @@ -1769,7 +1775,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, * ENOTSUP - Trigger not fired due to lack of DMA support * EIO - Trigger not fired because not previously primed * - ****************************************************************************/ + ************************************************************************************/ #ifdef CONFIG_SPI_TRIGGER static int spi_trigger(FAR struct spi_dev_s *dev) @@ -1792,7 +1798,7 @@ static int spi_trigger(FAR struct spi_dev_s *dev) } #endif -/**************************************************************************** +/************************************************************************************ * Name: spi_sndblock * * Description: @@ -1894,6 +1900,7 @@ static int spi_pm_prepare(FAR struct pm_callback_s *cb, int domain, case PM_STANDBY: case PM_SLEEP: + /* Check if exclusive lock for SPI bus is held. */ if (nxsem_getvalue(&priv->exclsem, &sval) < 0) @@ -1912,6 +1919,7 @@ static int spi_pm_prepare(FAR struct pm_callback_s *cb, int domain, break; default: + /* Should not get here */ break; @@ -2207,5 +2215,6 @@ FAR struct spi_dev_s *stm32_spibus_initialize(int bus) return (FAR struct spi_dev_s *)priv; } -#endif /* CONFIG_STM32F7_SPI1 || CONFIG_STM32F7_SPI2 || CONFIG_STM32F7_SPI3 || \ - * CONFIG_STM32F7_SPI4 || CONFIG_STM32F7_SPI5 || CONFIG_STM32F7_SPI6 */ +#endif /* CONFIG_STM32F7_SPI1 || CONFIG_STM32F7_SPI2 || CONFIG_STM32F7_SPI3 || + * CONFIG_STM32F7_SPI4 || CONFIG_STM32F7_SPI5 || CONFIG_STM32F7_SPI6 + */ diff --git a/arch/arm/src/stm32h7/stm32_spi.c b/arch/arm/src/stm32h7/stm32_spi.c index 6b4164bc78..115f2e15a2 100644 --- a/arch/arm/src/stm32h7/stm32_spi.c +++ b/arch/arm/src/stm32h7/stm32_spi.c @@ -1,37 +1,20 @@ /************************************************************************************ * arch/arm/src/stm32h7/stm32_spi.c * - * Copyright (C) 2018 Gregory Nutt. All rights reserved. - * Authors: Gregory Nutt - * David Sidrane - * Modified for STM32H7 by Mateusz Szafoni + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. * ************************************************************************************/ @@ -56,7 +39,7 @@ * mmcsd_spislotinitialize(), for example, will bind the SPI driver to * the SPI MMC/SD driver). * - ***********************************************************************************/ + ************************************************************************************/ /************************************************************************************ * Included Files @@ -1443,7 +1426,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) } } -/**************************************************************************** +/************************************************************************************ * Name: spi_hwfeatures * * Description: @@ -1457,7 +1440,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) * Zero (OK) if the selected H/W features are enabled; A negated errno * value if any H/W feature is not supportable. * - ****************************************************************************/ + ************************************************************************************/ #ifdef CONFIG_SPI_HWFEATURES static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features) @@ -1603,7 +1586,8 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) * ************************************************************************************/ -#if !defined(CONFIG_STM32H7_SPI_DMA) || defined(CONFIG_STM32H7_DMACAPABLE) || defined(CONFIG_STM32H7_SPI_DMATHRESHOLD) +#if !defined(CONFIG_STM32H7_SPI_DMA) || defined(CONFIG_STM32H7_DMACAPABLE) || \ + defined(CONFIG_STM32H7_SPI_DMATHRESHOLD) #if !defined(CONFIG_STM32H7_SPI_DMA) static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, FAR void *rxbuffer, size_t nwords) @@ -1686,9 +1670,11 @@ static void spi_exchange_nodma(FAR struct spi_dev_s *dev, FAR const void *txbuff } } } -#endif /* !CONFIG_STM32H7_SPI_DMA || CONFIG_STM32H7_DMACAPABLE || CONFIG_STM32H7_SPI_DMATHRESHOLD */ +#endif /* !CONFIG_STM32H7_SPI_DMA || CONFIG_STM32H7_DMACAPABLE || + * CONFIG_STM32H7_SPI_DMATHRESHOLD + */ -/**************************************************************************** +/************************************************************************************ * Name: spi_exchange (with DMA capability) * * Description: @@ -1844,7 +1830,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, } #endif /* CONFIG_STM32H7_SPI_DMA */ -/**************************************************************************** +/************************************************************************************ * Name: spi_trigger * * Description: @@ -1858,7 +1844,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, * ENOTSUP - Trigger not fired due to lack of DMA support * EIO - Trigger not fired because not previously primed * - ****************************************************************************/ + ************************************************************************************/ #ifdef CONFIG_SPI_TRIGGER static int spi_trigger(FAR struct spi_dev_s *dev) @@ -1881,7 +1867,7 @@ static int spi_trigger(FAR struct spi_dev_s *dev) } #endif -/**************************************************************************** +/************************************************************************************ * Name: spi_sndblock * * Description: @@ -2310,5 +2296,6 @@ FAR struct spi_dev_s *stm32_spibus_initialize(int bus) return (FAR struct spi_dev_s *)priv; } -#endif /* CONFIG_STM32H7_SPI1 || CONFIG_STM32H7_SPI2 || CONFIG_STM32H7_SPI3 || \ - * CONFIG_STM32H7_SPI4 || CONFIG_STM32H7_SPI5 || CONFIG_STM32H7_SPI6 */ +#endif /* CONFIG_STM32H7_SPI1 || CONFIG_STM32H7_SPI2 || CONFIG_STM32H7_SPI3 || + * CONFIG_STM32H7_SPI4 || CONFIG_STM32H7_SPI5 || CONFIG_STM32H7_SPI6 + */