Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: stm32: add support for art-pi board based on stm32h750xbh6

This patchset has following changes:

- introduce stm32h750.dtsi to support stm32h750 value line
- add pin groups for usart3/uart4/spi1/sdmmc2
- add stm32h750i-art-pi.dtb (arch/arm/boot/dts/Makefile)
- add stm32h750-art-pi.dts to support art-pi board

art-pi board component:
- 8MiB qspi flash
- 16MiB spi flash
- 32MiB sdram
- ap6212 wifi&bt&fm

the detail board information can be found at:
https://art-pi.gitee.io/website/

Signed-off-by: dillon min <dillon.minfei@gmail.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

authored by

dillon min and committed by
Alexandre Torgue
2aaa41ee 978783f9

+325
+1
arch/arm/boot/dts/Makefile
··· 1071 1071 stm32746g-eval.dtb \ 1072 1072 stm32h743i-eval.dtb \ 1073 1073 stm32h743i-disco.dtb \ 1074 + stm32h750i-art-pi.dtb \ 1074 1075 stm32mp153c-dhcom-drc02.dtb \ 1075 1076 stm32mp157a-avenger96.dtb \ 1076 1077 stm32mp157a-dhcor-avenger96.dtb \
+89
arch/arm/boot/dts/stm32h7-pinctrl.dtsi
··· 137 137 }; 138 138 }; 139 139 140 + sdmmc2_b4_pins_a: sdmmc2-b4-0 { 141 + pins { 142 + pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC1_D0 */ 143 + <STM32_PINMUX('B', 15, AF9)>, /* SDMMC1_D1 */ 144 + <STM32_PINMUX('B', 3, AF9)>, /* SDMMC1_D2 */ 145 + <STM32_PINMUX('B', 4, AF9)>, /* SDMMC1_D3 */ 146 + <STM32_PINMUX('D', 6, AF11)>, /* SDMMC1_CK */ 147 + <STM32_PINMUX('D', 7, AF11)>; /* SDMMC1_CMD */ 148 + slew-rate = <3>; 149 + drive-push-pull; 150 + bias-disable; 151 + }; 152 + }; 153 + 154 + sdmmc2_b4_od_pins_a: sdmmc2-b4-od-0 { 155 + pins1 { 156 + pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */ 157 + <STM32_PINMUX('B', 15, AF9)>, /* SDMMC1_D1 */ 158 + <STM32_PINMUX('B', 3, AF9)>, /* SDMMC1_D2 */ 159 + <STM32_PINMUX('B', 4, AF9)>, /* SDMMC1_D3 */ 160 + <STM32_PINMUX('D', 6, AF11)>; /* SDMMC1_CK */ 161 + slew-rate = <3>; 162 + drive-push-pull; 163 + bias-disable; 164 + }; 165 + pins2{ 166 + pinmux = <STM32_PINMUX('D', 7, AF11)>; /* SDMMC1_CMD */ 167 + slew-rate = <3>; 168 + drive-open-drain; 169 + bias-disable; 170 + }; 171 + }; 172 + 173 + sdmmc2_b4_sleep_pins_a: sdmmc2-b4-sleep-0 { 174 + pins { 175 + pinmux = <STM32_PINMUX('B', 14, ANALOG)>, /* SDMMC1_D0 */ 176 + <STM32_PINMUX('B', 15, ANALOG)>, /* SDMMC1_D1 */ 177 + <STM32_PINMUX('B', 3, ANALOG)>, /* SDMMC1_D2 */ 178 + <STM32_PINMUX('B', 4, ANALOG)>, /* SDMMC1_D3 */ 179 + <STM32_PINMUX('D', 6, ANALOG)>, /* SDMMC1_CK */ 180 + <STM32_PINMUX('D', 7, ANALOG)>; /* SDMMC1_CMD */ 181 + }; 182 + }; 183 + 184 + spi1_pins: spi1-0 { 185 + pins1 { 186 + pinmux = <STM32_PINMUX('A', 5, AF5)>, 187 + /* SPI1_CLK */ 188 + <STM32_PINMUX('B', 5, AF5)>; 189 + /* SPI1_MOSI */ 190 + bias-disable; 191 + drive-push-pull; 192 + slew-rate = <2>; 193 + }; 194 + pins2 { 195 + pinmux = <STM32_PINMUX('G', 9, AF5)>; 196 + /* SPI1_MISO */ 197 + bias-disable; 198 + }; 199 + }; 200 + 201 + uart4_pins: uart4-0 { 202 + pins1 { 203 + pinmux = <STM32_PINMUX('A', 0, AF8)>; /* UART4_TX */ 204 + bias-disable; 205 + drive-push-pull; 206 + slew-rate = <0>; 207 + }; 208 + pins2 { 209 + pinmux = <STM32_PINMUX('I', 9, AF8)>; /* UART4_RX */ 210 + bias-disable; 211 + }; 212 + }; 213 + 140 214 usart1_pins: usart1-0 { 141 215 pins1 { 142 216 pinmux = <STM32_PINMUX('B', 14, AF4)>; /* USART1_TX */ ··· 233 159 }; 234 160 pins2 { 235 161 pinmux = <STM32_PINMUX('D', 6, AF7)>; /* USART2_RX */ 162 + bias-disable; 163 + }; 164 + }; 165 + 166 + usart3_pins: usart3-0 { 167 + pins1 { 168 + pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */ 169 + <STM32_PINMUX('D', 12, AF7)>; /* USART3_RTS_DE */ 170 + bias-disable; 171 + drive-push-pull; 172 + slew-rate = <0>; 173 + }; 174 + pins2 { 175 + pinmux = <STM32_PINMUX('B', 11, AF7)>, /* USART3_RX */ 176 + <STM32_PINMUX('D', 11, AF7)>; /* USART3_CTS_NSS */ 236 177 bias-disable; 237 178 }; 238 179 };
+6
arch/arm/boot/dts/stm32h750.dtsi
··· 1 + /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 2 + /* Copyright (C) STMicroelectronics 2021 - All Rights Reserved */ 3 + 4 + #include "stm32h743.dtsi" 5 + 6 +
+229
arch/arm/boot/dts/stm32h750i-art-pi.dts
··· 1 + /* 2 + * Copyright 2021 - Dillon Min <dillon.minfei@gmail.com> 3 + * 4 + * This file is dual-licensed: you can use it either under the terms 5 + * of the GPL or the X11 license, at your option. Note that this dual 6 + * licensing only applies to this file, and not this project as a 7 + * whole. 8 + * 9 + * a) This file is free software; you can redistribute it and/or 10 + * modify it under the terms of the GNU General Public License as 11 + * published by the Free Software Foundation; either version 2 of the 12 + * License, or (at your option) any later version. 13 + * 14 + * This file is distributed in the hope that it will be useful, 15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 + * GNU General Public License for more details. 18 + * 19 + * Or, alternatively, 20 + * 21 + * b) Permission is hereby granted, free of charge, to any person 22 + * obtaining a copy of this software and associated documentation 23 + * files (the "Software"), to deal in the Software without 24 + * restriction, including without limitation the rights to use, 25 + * copy, modify, merge, publish, distribute, sublicense, and/or 26 + * sell copies of the Software, and to permit persons to whom the 27 + * Software is furnished to do so, subject to the following 28 + * conditions: 29 + * 30 + * The above copyright notice and this permission notice shall be 31 + * included in all copies or substantial portions of the Software. 32 + * 33 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40 + * OTHER DEALINGS IN THE SOFTWARE. 41 + * 42 + * For art-pi board resources, you can refer to link: 43 + * https://art-pi.gitee.io/website/ 44 + */ 45 + 46 + /dts-v1/; 47 + #include "stm32h750.dtsi" 48 + #include "stm32h7-pinctrl.dtsi" 49 + #include <dt-bindings/interrupt-controller/irq.h> 50 + #include <dt-bindings/gpio/gpio.h> 51 + 52 + / { 53 + model = "RT-Thread STM32H750i-ART-PI board"; 54 + compatible = "st,stm32h750i-art-pi", "st,stm32h750"; 55 + 56 + chosen { 57 + bootargs = "root=/dev/ram"; 58 + stdout-path = "serial0:2000000n8"; 59 + }; 60 + 61 + memory@c0000000 { 62 + device_type = "memory"; 63 + reg = <0xc0000000 0x2000000>; 64 + }; 65 + 66 + reserved-memory { 67 + #address-cells = <1>; 68 + #size-cells = <1>; 69 + ranges; 70 + 71 + linux,cma { 72 + compatible = "shared-dma-pool"; 73 + no-map; 74 + size = <0x100000>; 75 + linux,dma-default; 76 + }; 77 + }; 78 + 79 + aliases { 80 + serial0 = &uart4; 81 + serial1 = &usart3; 82 + }; 83 + 84 + leds { 85 + compatible = "gpio-leds"; 86 + led-red { 87 + gpios = <&gpioi 8 0>; 88 + }; 89 + led-green { 90 + gpios = <&gpioc 15 0>; 91 + linux,default-trigger = "heartbeat"; 92 + }; 93 + }; 94 + 95 + v3v3: regulator-v3v3 { 96 + compatible = "regulator-fixed"; 97 + regulator-name = "v3v3"; 98 + regulator-min-microvolt = <3300000>; 99 + regulator-max-microvolt = <3300000>; 100 + regulator-always-on; 101 + }; 102 + 103 + wlan_pwr: regulator-wlan { 104 + compatible = "regulator-fixed"; 105 + 106 + regulator-name = "wl-reg"; 107 + regulator-min-microvolt = <3300000>; 108 + regulator-max-microvolt = <3300000>; 109 + 110 + gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; 111 + enable-active-high; 112 + }; 113 + }; 114 + 115 + &clk_hse { 116 + clock-frequency = <25000000>; 117 + }; 118 + 119 + &dma1 { 120 + status = "okay"; 121 + }; 122 + 123 + &dma2 { 124 + status = "okay"; 125 + }; 126 + 127 + &mac { 128 + status = "disabled"; 129 + pinctrl-0 = <&ethernet_rmii>; 130 + pinctrl-names = "default"; 131 + phy-mode = "rmii"; 132 + phy-handle = <&phy0>; 133 + 134 + mdio0 { 135 + #address-cells = <1>; 136 + #size-cells = <0>; 137 + compatible = "snps,dwmac-mdio"; 138 + phy0: ethernet-phy@0 { 139 + reg = <0>; 140 + }; 141 + }; 142 + }; 143 + 144 + &sdmmc1 { 145 + pinctrl-names = "default", "opendrain", "sleep"; 146 + pinctrl-0 = <&sdmmc1_b4_pins_a>; 147 + pinctrl-1 = <&sdmmc1_b4_od_pins_a>; 148 + pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; 149 + broken-cd; 150 + st,neg-edge; 151 + bus-width = <4>; 152 + vmmc-supply = <&v3v3>; 153 + status = "okay"; 154 + }; 155 + 156 + &sdmmc2 { 157 + pinctrl-names = "default", "opendrain", "sleep"; 158 + pinctrl-0 = <&sdmmc2_b4_pins_a>; 159 + pinctrl-1 = <&sdmmc2_b4_od_pins_a>; 160 + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>; 161 + broken-cd; 162 + non-removable; 163 + st,neg-edge; 164 + bus-width = <4>; 165 + vmmc-supply = <&wlan_pwr>; 166 + status = "okay"; 167 + 168 + #address-cells = <1>; 169 + #size-cells = <0>; 170 + brcmf: bcrmf@1 { 171 + reg = <1>; 172 + compatible = "brcm,bcm4329-fmac"; 173 + }; 174 + }; 175 + 176 + &spi1 { 177 + status = "okay"; 178 + pinctrl-0 = <&spi1_pins>; 179 + pinctrl-names = "default"; 180 + cs-gpios = <&gpioa 4 GPIO_ACTIVE_LOW>; 181 + dmas = <&dmamux1 37 0x400 0x05>, 182 + <&dmamux1 38 0x400 0x05>; 183 + dma-names = "rx", "tx"; 184 + 185 + flash@0 { 186 + #address-cells = <1>; 187 + #size-cells = <1>; 188 + compatible = "winbond,w25q128", "jedec,spi-nor"; 189 + reg = <0>; 190 + spi-max-frequency = <80000000>; 191 + 192 + partition@0 { 193 + label = "root filesystem"; 194 + reg = <0 0x1000000>; 195 + }; 196 + }; 197 + }; 198 + 199 + &usart2 { 200 + pinctrl-0 = <&usart2_pins>; 201 + pinctrl-names = "default"; 202 + status = "disabled"; 203 + }; 204 + 205 + &usart3 { 206 + pinctrl-names = "default"; 207 + pinctrl-0 = <&usart3_pins>; 208 + dmas = <&dmamux1 45 0x400 0x05>, 209 + <&dmamux1 46 0x400 0x05>; 210 + dma-names = "rx", "tx"; 211 + st,hw-flow-ctrl; 212 + status = "okay"; 213 + 214 + bluetooth { 215 + compatible = "brcm,bcm43438-bt"; 216 + host-wakeup-gpios = <&gpioc 0 GPIO_ACTIVE_HIGH>; 217 + device-wakeup-gpios = <&gpioi 10 GPIO_ACTIVE_HIGH>; 218 + shutdown-gpios = <&gpioi 11 GPIO_ACTIVE_HIGH>; 219 + max-speed = <115200>; 220 + }; 221 + }; 222 + 223 + &uart4 { 224 + pinctrl-0 = <&uart4_pins>; 225 + pinctrl-names = "default"; 226 + status = "okay"; 227 + }; 228 + 229 +