1// SPDX-License-Identifier: GPL-2.0 2/* 3 * dts file for Hisilicon HiKey970 Development Board 4 * 5 * Copyright (C) 2016, Hisilicon Ltd. 6 * Copyright (C) 2018, Linaro Ltd. 7 * 8 */ 9 10/dts-v1/; 11 12#include "hi3670.dtsi" 13#include "hikey970-pinctrl.dtsi" 14 15/ { 16 model = "HiKey970"; 17 compatible = "hisilicon,hi3670-hikey970", "hisilicon,hi3670"; 18 19 aliases { 20 serial0 = &uart0; 21 serial1 = &uart1; 22 serial2 = &uart2; 23 serial3 = &uart3; 24 serial4 = &uart4; 25 serial5 = &uart5; 26 serial6 = &uart6; /* console UART */ 27 }; 28 29 chosen { 30 stdout-path = "serial6:115200n8"; 31 }; 32 33 memory@0 { 34 device_type = "memory"; 35 /* expect bootloader to fill in this region */ 36 reg = <0x0 0x0 0x0 0x0>; 37 }; 38}; 39 40/* 41 * Legend: proper name = the GPIO line is used as GPIO 42 * NC = not connected (pin out but not routed from the chip to 43 * anything the board) 44 * "[PER]" = pin is muxed for [peripheral] (not GPIO) 45 * "" = no idea, schematic doesn't say, could be 46 * unrouted (not connected to any external pin) 47 * LSEC = Low Speed External Connector 48 * HSEC = High Speed External Connector 49 * 50 * Line names are taken from "hikey970-schematics.pdf" from HiSilicon. 51 * 52 * For the lines routed to the external connectors the 53 * lines are named after the 96Boards CE Specification 1.0, 54 * Appendix "Expansion Connector Signal Description". 55 * 56 * When the 96Board naming of a line and the schematic name of 57 * the same line are in conflict, the 96Board specification 58 * takes precedence, which means that the external UART on the 59 * LSEC is named UART0 while the schematic and SoC names this 60 * UART2. This is only for the informational lines i.e. "[FOO]", 61 * the GPIO named lines "GPIO-A" thru "GPIO-L" are the only 62 * ones actually used for GPIO. 63 */ 64&gpio0 { 65 /* GPIO_000-GPIO_007 */ 66 gpio-line-names = 67 "", 68 "TP901", /* TEST_MODE connected to TP901 */ 69 "", 70 "GPIO_003_USB_HUB_RESET_N", 71 "NC", 72 "[AP_GPS_REF_CLK]", 73 "[I2C3_SCL]", 74 "[I2C3_SDA]"; 75}; 76 77&gpio1 { 78 /* GPIO_008-GPIO_015 */ 79 gpio-line-names = 80 "[UART0_CTS]", /* LSEC pin 3: GPIO_008_UART2_CTS_N */ 81 "[UART0_RTS]", /* LSEC pin 9: GPIO_009_UART2_RTS_N */ 82 "[UART0_TXD]", /* LSEC pin 5: GPIO_010_UART2_TXD */ 83 "[UART0_RXD]", /* LSEC pin 7: GPIO_011_UART2_RXD */ 84 "[USER_LED5]", 85 "GPIO-I", /* LSEC pin 31: GPIO_013_CAM0_RST_N */ 86 "[USER_LED3]", 87 "[USER_LED4]"; 88}; 89 90&gpio2 { 91 /* GPIO_016-GPIO_023 */ 92 gpio-line-names = 93 "GPIO-G", /* LSEC pin 29: GPIO_016_LCD_TE0 */ 94 "[CSI0_MCLK]", /* HSEC pin 15: ISP_CCLK0_MCAM */ 95 "[CSI1_MCLK]", /* HSEC pin 17: ISP_CCLK1_SCAM */ 96 "GPIO_019_BT_ACTIVE", 97 "[I2C2_SCL]", /* HSEC pin 32: ISP_SCL0 */ 98 "[I2C2_SDA]", /* HSEC pin 34: ISP_SDA0 */ 99 "[I2C3_SCL]", /* HSEC pin 36: ISP_SCL1 */ 100 "[I2C3_SDA]"; /* HSEC pin 38: ISP_SDA1 */ 101}; 102 103&gpio3 { 104 /* GPIO_024-GPIO_031 */ 105 gpio-line-names = 106 "GPIO_024_WIFI_ACTIVE", 107 "GPIO_025_PERST_M.2", 108 "[I2C4_SCL]", 109 "[I2C4_SDA]", 110 "NC", 111 "GPIO-H", /* LSEC pin 30: GPIO_029_LCD_RST_N */ 112 "[USER_LED1]", 113 "GPIO-L"; /* LSEC pin 34: GPIO_031 */ 114}; 115 116&gpio4 { 117 /* GPIO_032-GPIO_039 */ 118 gpio-line-names = 119 "GPIO-K", /* LSEC pin 33: GPIO_032_CAM1_RST_N */ 120 "GPIO_033_PMU1_EN", 121 "GPIO_034_USBSW_SEL", 122 /* 123 * These two pins should be used for SD(IO) data according 124 * to the 96boards specification but seems to be repurposed 125 * for UART 0. They are however named according to the spec. 126 */ 127 "[SD_DAT1]", /* HSEC pin 3: GPIO_035_UART0_RXD */ 128 "[SD_DAT2]", /* HSEC pin 5: GPIO_036_UART0_TXD */ 129 "[UART1_RXD]", /* LSEC pin 13: DEBUG_UART6_RXD */ 130 "[UART1_TXD]", /* LSEC pin 11: DEBUG_UART6_TXD */ 131 "[SOC_GPS_UART3_CTS_N]"; /* TP2304 */ 132}; 133 134&gpio5 { 135 /* GPIO_040-GPIO_047 */ 136 gpio-line-names = 137 "[SOC_GPS_UART3_RTS_N]", /* TP2302 */ 138 "[SOC_GPS_UART3_RXD]", /* TP2303 */ 139 "[SOC_GPS_UART3_TXD]", /* TP2305 */ 140 "[SOC_BT_UART4_CTS_N]", 141 "[SOC_BT_UART4_RTS_N]", 142 "[SOC_BT_UART4_RXD]", 143 "[SOC_BT_UART4_TXD]", 144 "NC"; 145}; 146 147&gpio6 { 148 /* GPIO_048-GPIO_055 */ 149 gpio-line-names = 150 "NC", 151 "GPIO_049_USER_LED6", 152 "GPIO_050_CAN_RST", 153 "GPIO_051_WIFI_EN", 154 "GPIO-D", /* LSEC pin 26 */ 155 "GPIO-J", /* LSEC pin 32 */ 156 "GPIO_054_BT_EN", 157 "[GPIO_055_SEL]"; 158}; 159 160&gpio7 { 161 /* GPIO_056-GPIO_063 */ 162 gpio-line-names = 163 "[PCIE_PERST_L]", "NC", "NC", "NC", "NC", "NC", "NC", "NC"; 164}; 165 166&gpio8 { 167 /* GPIO_064-GPIO_071 */ 168 gpio-line-names = "NC", "NC", "NC", "NC", "NC", "NC", "NC", "NC"; 169}; 170 171&gpio9 { 172 /* GPIO_072-GPIO_079 */ 173 gpio-line-names = "NC", "NC", "NC", "NC", "NC", "NC", "NC", "NC"; 174}; 175 176&gpio10 { 177 /* GPIO_080-GPIO_087 */ 178 gpio-line-names = "NC", "NC", "NC", "NC", "NC", "NC", "NC", "NC"; 179}; 180 181&gpio11 { 182 /* GPIO_088-GPIO_095 */ 183 gpio-line-names = "NC", "NC", "NC", "NC", "NC", "NC", "NC", "NC"; 184}; 185 186&gpio12 { 187 /* GPIO_096-GPIO_103 */ 188 gpio-line-names = "NC", "", "", "", "", "", "", ""; 189}; 190 191&gpio13 { 192 /* GPIO_104-GPIO_111 */ 193 gpio-line-names = "", "", "", "", "", "", "", ""; 194}; 195 196&gpio14 { 197 /* GPIO_112-GPIO_119 */ 198 gpio-line-names = "", "", "", "", "", "", "", ""; 199}; 200 201&gpio15 { 202 /* GPIO_120-GPIO_127 */ 203 gpio-line-names = "", "", "", "", "", "", "", ""; 204}; 205 206&gpio16 { 207 /* GPIO_128-GPIO_135 */ 208 gpio-line-names = 209 "[WL_SDIO_CLK]", 210 "[WL_SDIO_CMD]", 211 "[WL_SDIO_DATA0]", 212 "[WL_SDIO_DATA1]", 213 "[WL_SDIO_DATA2]", 214 "[WL_SDIO_DATA3]", 215 "[ETH_ISOLATE]", 216 "NC"; 217}; 218 219&gpio17 { 220 /* GPIO_136-GPIO_143 */ 221 gpio-line-names = 222 "[MINI1CLK_EN]", "NC", "", "", "", "", "", ""; 223}; 224 225&gpio18 { 226 /* GPIO_144-GPIO_151 */ 227 gpio-line-names = 228 "[SPI1_SCLK]", /* HSEC pin 9: GPIO_144_SPI3_CLK */ 229 "[SPI1_DIN]", /* HSEC pin 11: GPIO_145_SPI3_DI */ 230 "[SPI1_DOUT]", /* HSEC pin 1: GPIO_146_SPI3_DO */ 231 "[SPI1_CS]", /* HSEC pin 7: GPIO_147_SPI3_CS0_N */ 232 "[POWER_INT_N]", 233 "[CDMA_GPS_SYNC]", 234 "GPIO_150_PEX_INTA", 235 "GPIO_151_CAN_INT"; 236}; 237 238&gpio19 { 239 /* GPIO_152-GPIO_159 */ 240 gpio-line-names = "", "", "", "", "", "", "", ""; 241}; 242 243&gpio20 { 244 /* GPIO_160-GPIO_167 */ 245 gpio-line-names = 246 "[SD_CLK]", 247 "[SD_CMD]", 248 "[SD_DATA0]", 249 "[SD_DATA1]", 250 "[SD_DATA2]", 251 "[SD_DATA3]", 252 "GPIO_166_ETHCLK_EN", 253 "GPIO_167_USER_LED2"; 254}; 255 256&gpio21 { 257 /* GPIO_168-GPIO_175 */ 258 gpio-line-names = 259 "GPIO_168_GPS_EN", 260 "GPIO-C", /* LSEC pin 25: GPIO_169_USIM1_CLK */ 261 "GPIO-E", /* LSEC pin 27: GPIO_170_USIM1_RST */ 262 "GPIO-B", /* LSEC pin 24: GPIO_171_USIM1_DATA */ 263 "", "", "", "", ""; 264}; 265 266&gpio22 { 267 /* GPIO_176-GPIO_183 */ 268 gpio-line-names = 269 "[PMU_PWR_HOLD]", 270 "GPIO_177_WL_WAKEUP_AP", 271 "[JTAG_TCK]", 272 "[JTAG_TMS]", 273 "[JTAG_TDI]", 274 "[JTAG_TMS]", 275 "GPIO_182_FATAL_ERR", 276 "NC"; 277}; 278 279&gpio23 { 280 /* GPIO_184-GPIO_191 */ 281 gpio-line-names = 282 "GPIO_184_JTAG_SEL", 283 "GPIO-F", /* LSEC pin 28: GPIO_185_LCD_BL_PWM */ 284 "[I2C0_SCL]", /* LSEC pin 15: GPIO_186_I2C0_SCL */ 285 "[I2C0_SDA]", /* LSEC pin 17: GPIO_187_I2C0_SDA */ 286 "[GPIO_188_I2C1_SCL]", /* Actual SoC I2C1_SCL */ 287 "[GPIO_189_I2C1_SDA]", /* Actual SoC I2C1_SDA */ 288 "[I2C1_SCL]", /* LSEC pin 19: GPIO_190_I2C2_SCL */ 289 "[I2C2_SDA]"; /* LSEC pin 21: GPIO_191_I2C2_SDA */ 290}; 291 292&gpio24 { 293 /* GPIO_192-GPIO_199 */ 294 gpio-line-names = 295 "[SD_LED]", 296 "NC", 297 "[PCM_DI]", /* LSEC pin 22: GPIO_194_I2S0_DI */ 298 "[PCM_DO]", /* LSEC pin 20: GPIO_195_I2S0_DO */ 299 "[PCM_CLK]", /* LSEC pin 18: GPIO_196_I2S0_XCLK */ 300 "[PCM_FS]", /* LSEC pin 16: GPIO_197_I2S0_XFS */ 301 "", 302 "[I2S2_DO]"; 303}; 304 305&gpio25 { 306 /* GPIO_200-GPIO_207 */ 307 gpio-line-names = 308 "[I2S2_XCLK]", 309 "[I2S2_XFS]", 310 "GPIO_202_PERST_ETH", 311 "GPIO_203_PWRON_DET", 312 "GPIO_204_PMU1_IRQ_N", 313 "GPIO_205_SD_DET", 314 "GPIO_206_GPS_MOTION_INT", 315 "GPIO_207_HDMI_SEL"; 316}; 317 318&gpio26 { 319 /* GPIO_208-GPIO_215 */ 320 gpio-line-names = 321 "GPIO-A", /* LSEC pin 23: GPIO_208_WAKEUP_SOC */ 322 "GPIO_209_VBUS_TYPEC", 323 "NC", 324 "NC", 325 "NC", 326 "[SPI0_SCLK]", /* LSEC pin 8: GPIO_213_SPI2_CLK */ 327 "[SPI0_DIN]", /* LSEC pin 10: GPIO_214_SPI2_DI */ 328 "[SPI0_DOUT]"; /* LSEC pin 14: GPIO_215_SPI2_DO */ 329}; 330 331&gpio27 { 332 /* GPIO_216-GPIO_223 */ 333 gpio-line-names = 334 "[SPI0_CS]", /* LSEC pin 12: GPIO_216_SPI2_CS0_N */ 335 "GPIO_217_HDMI_PD", 336 "GPIO_218_GPS_WAKEUP_AP", 337 "GPIO_219_M.2CLK_EN", 338 "GPIO_220_PERST_MINI", 339 "GPIO_221_CC_INT", 340 "[PCIE_CLKREQ_L]", 341 "NC"; 342}; 343 344&gpio28 { 345 /* GPIO_224-GPIO_231 */ 346 gpio-line-names = 347 "[PMU0_INT]", 348 "[SPMI_DATA]", 349 "[SPMI_CLK]", 350 "[CAN_SPI_CLK]", 351 "[CAN_SPI_DI]", 352 "[CAN_SPI_DO]", 353 "[CAN_SPI_CS]", 354 "GPIO_231_HDMI_INT"; 355}; 356 357&uart0 { 358 /* On High speed expansion header */ 359 label = "HS-UART0"; 360 status = "okay"; 361}; 362 363&uart2 { 364 /* On Low speed expansion header */ 365 label = "LS-UART0"; 366 status = "okay"; 367}; 368 369&uart6 { 370 /* On Low speed expansion header */ 371 label = "LS-UART1"; 372 status = "okay"; 373}; 374