Yanhong Wang | 5efc934 | 2023-03-29 11:42:23 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 OR MIT |
| 2 | /* |
| 3 | * Copyright (C) 2022 StarFive Technology Co., Ltd. |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "jh7110.dtsi" |
| 9 | #include <dt-bindings/pinctrl/pinctrl-starfive-jh7110.h> |
Mason Huo | 23dfd81 | 2023-07-25 17:46:50 +0800 | [diff] [blame] | 10 | #include <dt-bindings/gpio/gpio.h> |
Yanhong Wang | 5efc934 | 2023-03-29 11:42:23 +0800 | [diff] [blame] | 11 | / { |
| 12 | aliases { |
| 13 | serial0 = &uart0; |
| 14 | spi0 = &qspi; |
| 15 | mmc0 = &mmc0; |
| 16 | mmc1 = &mmc1; |
| 17 | i2c0 = &i2c0; |
| 18 | i2c2 = &i2c2; |
| 19 | i2c5 = &i2c5; |
| 20 | i2c6 = &i2c6; |
Yanhong Wang | 7f63bd9 | 2023-06-15 17:36:44 +0800 | [diff] [blame] | 21 | ethernet0 = &gmac0; |
| 22 | ethernet1 = &gmac1; |
Yanhong Wang | 5efc934 | 2023-03-29 11:42:23 +0800 | [diff] [blame] | 23 | }; |
| 24 | |
| 25 | chosen { |
| 26 | stdout-path = "serial0:115200n8"; |
| 27 | }; |
| 28 | |
| 29 | cpus { |
| 30 | timebase-frequency = <4000000>; |
| 31 | }; |
| 32 | |
| 33 | memory@40000000 { |
| 34 | device_type = "memory"; |
| 35 | reg = <0x0 0x40000000 0x2 0x0>; |
| 36 | }; |
Jaehoon Chung | 9adf696 | 2023-10-31 17:24:38 +0900 | [diff] [blame] | 37 | |
| 38 | gpio-restart { |
| 39 | compatible = "gpio-restart"; |
| 40 | gpios = <&sysgpio 35 GPIO_ACTIVE_HIGH>; |
| 41 | }; |
Yanhong Wang | 5efc934 | 2023-03-29 11:42:23 +0800 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | &osc { |
| 45 | clock-frequency = <24000000>; |
| 46 | }; |
| 47 | |
| 48 | &rtc_osc { |
| 49 | clock-frequency = <32768>; |
| 50 | }; |
| 51 | |
| 52 | &gmac0_rmii_refin { |
| 53 | clock-frequency = <50000000>; |
| 54 | }; |
| 55 | |
| 56 | &gmac0_rgmii_rxin { |
| 57 | clock-frequency = <125000000>; |
| 58 | }; |
| 59 | |
| 60 | &gmac1_rmii_refin { |
| 61 | clock-frequency = <50000000>; |
| 62 | }; |
| 63 | |
| 64 | &gmac1_rgmii_rxin { |
| 65 | clock-frequency = <125000000>; |
| 66 | }; |
| 67 | |
| 68 | &i2stx_bclk_ext { |
| 69 | clock-frequency = <12288000>; |
| 70 | }; |
| 71 | |
| 72 | &i2stx_lrck_ext { |
| 73 | clock-frequency = <192000>; |
| 74 | }; |
| 75 | |
| 76 | &i2srx_bclk_ext { |
| 77 | clock-frequency = <12288000>; |
| 78 | }; |
| 79 | |
| 80 | &i2srx_lrck_ext { |
| 81 | clock-frequency = <192000>; |
| 82 | }; |
| 83 | |
| 84 | &tdm_ext { |
| 85 | clock-frequency = <49152000>; |
| 86 | }; |
| 87 | |
| 88 | &mclk_ext { |
| 89 | clock-frequency = <12288000>; |
| 90 | }; |
| 91 | |
| 92 | &uart0 { |
| 93 | reg-offset = <0>; |
| 94 | current-speed = <115200>; |
| 95 | clock-frequency = <24000000>; |
| 96 | pinctrl-names = "default"; |
| 97 | pinctrl-0 = <&uart0_pins>; |
| 98 | status = "okay"; |
| 99 | }; |
| 100 | |
| 101 | &i2c0 { |
| 102 | clock-frequency = <100000>; |
| 103 | i2c-sda-hold-time-ns = <300>; |
| 104 | i2c-sda-falling-time-ns = <510>; |
| 105 | i2c-scl-falling-time-ns = <510>; |
| 106 | pinctrl-names = "default"; |
| 107 | pinctrl-0 = <&i2c0_pins>; |
| 108 | status = "okay"; |
| 109 | }; |
| 110 | |
| 111 | &i2c2 { |
| 112 | clock-frequency = <100000>; |
| 113 | i2c-sda-hold-time-ns = <300>; |
| 114 | i2c-sda-falling-time-ns = <510>; |
| 115 | i2c-scl-falling-time-ns = <510>; |
| 116 | pinctrl-names = "default"; |
| 117 | pinctrl-0 = <&i2c2_pins>; |
| 118 | status = "okay"; |
| 119 | }; |
| 120 | |
| 121 | &i2c5 { |
| 122 | clock-frequency = <100000>; |
| 123 | i2c-sda-hold-time-ns = <300>; |
| 124 | i2c-sda-falling-time-ns = <510>; |
| 125 | i2c-scl-falling-time-ns = <510>; |
| 126 | pinctrl-names = "default"; |
| 127 | pinctrl-0 = <&i2c5_pins>; |
| 128 | status = "okay"; |
Yanhong Wang | d426942 | 2023-06-15 17:36:49 +0800 | [diff] [blame] | 129 | |
| 130 | eeprom@50 { |
| 131 | compatible = "atmel,24c04"; |
| 132 | reg = <0x50>; |
| 133 | pagesize = <16>; |
| 134 | }; |
Yanhong Wang | 5efc934 | 2023-03-29 11:42:23 +0800 | [diff] [blame] | 135 | }; |
| 136 | |
| 137 | &i2c6 { |
| 138 | clock-frequency = <100000>; |
| 139 | i2c-sda-hold-time-ns = <300>; |
| 140 | i2c-sda-falling-time-ns = <510>; |
| 141 | i2c-scl-falling-time-ns = <510>; |
| 142 | pinctrl-names = "default"; |
| 143 | pinctrl-0 = <&i2c6_pins>; |
| 144 | status = "okay"; |
| 145 | }; |
| 146 | |
| 147 | &sysgpio { |
| 148 | status = "okay"; |
| 149 | uart0_pins: uart0-0 { |
| 150 | tx-pins { |
| 151 | pinmux = <GPIOMUX(5, GPOUT_SYS_UART0_TX, |
| 152 | GPOEN_ENABLE, |
| 153 | GPI_NONE)>; |
| 154 | bias-disable; |
| 155 | drive-strength = <12>; |
| 156 | input-disable; |
| 157 | input-schmitt-disable; |
| 158 | slew-rate = <0>; |
| 159 | }; |
| 160 | |
| 161 | rx-pins { |
| 162 | pinmux = <GPIOMUX(6, GPOUT_LOW, |
| 163 | GPOEN_DISABLE, |
| 164 | GPI_SYS_UART0_RX)>; |
| 165 | bias-disable; /* external pull-up */ |
| 166 | drive-strength = <2>; |
| 167 | input-enable; |
| 168 | input-schmitt-enable; |
| 169 | slew-rate = <0>; |
| 170 | }; |
| 171 | }; |
| 172 | |
| 173 | i2c0_pins: i2c0-0 { |
| 174 | i2c-pins { |
| 175 | pinmux = <GPIOMUX(57, GPOUT_LOW, |
| 176 | GPOEN_SYS_I2C0_CLK, |
| 177 | GPI_SYS_I2C0_CLK)>, |
| 178 | <GPIOMUX(58, GPOUT_LOW, |
| 179 | GPOEN_SYS_I2C0_DATA, |
| 180 | GPI_SYS_I2C0_DATA)>; |
| 181 | bias-disable; /* external pull-up */ |
| 182 | input-enable; |
| 183 | input-schmitt-enable; |
| 184 | }; |
| 185 | }; |
| 186 | |
| 187 | i2c2_pins: i2c2-0 { |
| 188 | i2c-pins { |
| 189 | pinmux = <GPIOMUX(3, GPOUT_LOW, |
| 190 | GPOEN_SYS_I2C2_CLK, |
| 191 | GPI_SYS_I2C2_CLK)>, |
| 192 | <GPIOMUX(2, GPOUT_LOW, |
| 193 | GPOEN_SYS_I2C2_DATA, |
| 194 | GPI_SYS_I2C2_DATA)>; |
| 195 | bias-disable; /* external pull-up */ |
| 196 | input-enable; |
| 197 | input-schmitt-enable; |
| 198 | }; |
| 199 | }; |
| 200 | |
| 201 | i2c5_pins: i2c5-0 { |
| 202 | i2c-pins { |
| 203 | pinmux = <GPIOMUX(19, GPOUT_LOW, |
| 204 | GPOEN_SYS_I2C5_CLK, |
| 205 | GPI_SYS_I2C5_CLK)>, |
| 206 | <GPIOMUX(20, GPOUT_LOW, |
| 207 | GPOEN_SYS_I2C5_DATA, |
| 208 | GPI_SYS_I2C5_DATA)>; |
| 209 | bias-disable; /* external pull-up */ |
| 210 | input-enable; |
| 211 | input-schmitt-enable; |
| 212 | }; |
| 213 | }; |
| 214 | |
| 215 | i2c6_pins: i2c6-0 { |
| 216 | i2c-pins { |
| 217 | pinmux = <GPIOMUX(16, GPOUT_LOW, |
| 218 | GPOEN_SYS_I2C6_CLK, |
| 219 | GPI_SYS_I2C6_CLK)>, |
| 220 | <GPIOMUX(17, GPOUT_LOW, |
| 221 | GPOEN_SYS_I2C6_DATA, |
| 222 | GPI_SYS_I2C6_DATA)>; |
| 223 | bias-disable; /* external pull-up */ |
| 224 | input-enable; |
| 225 | input-schmitt-enable; |
| 226 | }; |
| 227 | }; |
| 228 | |
| 229 | mmc0_pins: mmc0-pins { |
| 230 | mmc0-pins-rest { |
| 231 | pinmux = <GPIOMUX(62, GPOUT_SYS_SDIO0_RST, |
| 232 | GPOEN_ENABLE, GPI_NONE)>; |
| 233 | bias-pull-up; |
| 234 | drive-strength = <12>; |
| 235 | input-disable; |
| 236 | input-schmitt-disable; |
| 237 | slew-rate = <0>; |
| 238 | }; |
| 239 | }; |
| 240 | |
| 241 | mmc1_pins: mmc1-pins { |
| 242 | mmc1-pins0 { |
| 243 | pinmux = <GPIOMUX(10, GPOUT_SYS_SDIO1_CLK, |
| 244 | GPOEN_ENABLE, GPI_NONE)>; |
| 245 | bias-pull-up; |
| 246 | drive-strength = <12>; |
| 247 | input-disable; |
| 248 | input-schmitt-disable; |
| 249 | slew-rate = <0>; |
| 250 | }; |
| 251 | |
| 252 | mmc1-pins1 { |
| 253 | pinmux = <GPIOMUX(9, GPOUT_SYS_SDIO1_CMD, |
| 254 | GPOEN_SYS_SDIO1_CMD, GPI_SYS_SDIO1_CMD)>, |
| 255 | <GPIOMUX(11, GPOUT_SYS_SDIO1_DATA0, |
| 256 | GPOEN_SYS_SDIO1_DATA0, GPI_SYS_SDIO1_DATA0)>, |
| 257 | <GPIOMUX(12, GPOUT_SYS_SDIO1_DATA1, |
| 258 | GPOEN_SYS_SDIO1_DATA1, GPI_SYS_SDIO1_DATA1)>, |
| 259 | <GPIOMUX(7, GPOUT_SYS_SDIO1_DATA2, |
| 260 | GPOEN_SYS_SDIO1_DATA2, GPI_SYS_SDIO1_DATA2)>, |
| 261 | <GPIOMUX(8, GPOUT_SYS_SDIO1_DATA3, |
| 262 | GPOEN_SYS_SDIO1_DATA3, GPI_SYS_SDIO1_DATA3)>; |
| 263 | bias-pull-up; |
| 264 | drive-strength = <12>; |
| 265 | input-enable; |
| 266 | input-schmitt-enable; |
| 267 | slew-rate = <0>; |
| 268 | }; |
| 269 | }; |
| 270 | }; |
| 271 | |
| 272 | &mmc0 { |
| 273 | compatible = "snps,dw-mshc"; |
| 274 | max-frequency = <100000000>; |
| 275 | bus-width = <8>; |
| 276 | pinctrl-names = "default"; |
| 277 | pinctrl-0 = <&mmc0_pins>; |
| 278 | cap-mmc-highspeed; |
| 279 | mmc-ddr-1_8v; |
| 280 | mmc-hs200-1_8v; |
| 281 | non-removable; |
| 282 | cap-mmc-hw-reset; |
| 283 | post-power-on-delay-ms = <200>; |
| 284 | status = "okay"; |
| 285 | |
| 286 | }; |
| 287 | |
| 288 | &mmc1 { |
| 289 | compatible = "snps,dw-mshc"; |
| 290 | max-frequency = <100000000>; |
| 291 | bus-width = <4>; |
| 292 | pinctrl-names = "default"; |
| 293 | pinctrl-0 = <&mmc1_pins>; |
| 294 | no-sdio; |
| 295 | no-mmc; |
| 296 | broken-cd; |
| 297 | cap-sd-highspeed; |
| 298 | post-power-on-delay-ms = <200>; |
| 299 | status = "okay"; |
| 300 | }; |
| 301 | |
| 302 | &qspi { |
| 303 | spi-max-frequency = <250000000>; |
| 304 | status = "okay"; |
| 305 | |
| 306 | nor-flash@0 { |
| 307 | compatible = "jedec,spi-nor"; |
| 308 | reg=<0>; |
| 309 | spi-max-frequency = <100000000>; |
| 310 | cdns,tshsl-ns = <1>; |
| 311 | cdns,tsd2d-ns = <1>; |
| 312 | cdns,tchsh-ns = <1>; |
| 313 | cdns,tslch-ns = <1>; |
| 314 | }; |
| 315 | }; |
| 316 | |
Mason Huo | 23dfd81 | 2023-07-25 17:46:50 +0800 | [diff] [blame] | 317 | &pcie0 { |
| 318 | reset-gpios = <&sysgpio 26 GPIO_ACTIVE_LOW>; |
Minda Chen | 021faf7 | 2023-08-07 16:53:36 +0800 | [diff] [blame] | 319 | status = "okay"; |
Mason Huo | 23dfd81 | 2023-07-25 17:46:50 +0800 | [diff] [blame] | 320 | }; |
| 321 | |
| 322 | &pcie1 { |
| 323 | reset-gpios = <&sysgpio 28 GPIO_ACTIVE_LOW>; |
| 324 | status = "okay"; |
| 325 | }; |
| 326 | |
Yanhong Wang | 5efc934 | 2023-03-29 11:42:23 +0800 | [diff] [blame] | 327 | &syscrg { |
| 328 | assigned-clocks = <&syscrg JH7110_SYSCLK_CPU_ROOT>, |
| 329 | <&syscrg JH7110_SYSCLK_BUS_ROOT>, |
| 330 | <&syscrg JH7110_SYSCLK_PERH_ROOT>, |
| 331 | <&syscrg JH7110_SYSCLK_QSPI_REF>; |
Xingyu Wu | 1345c9e | 2023-07-07 18:50:09 +0800 | [diff] [blame] | 332 | assigned-clock-parents = <&pllclk JH7110_SYSCLK_PLL0_OUT>, |
| 333 | <&pllclk JH7110_SYSCLK_PLL2_OUT>, |
| 334 | <&pllclk JH7110_SYSCLK_PLL2_OUT>, |
Yanhong Wang | 5efc934 | 2023-03-29 11:42:23 +0800 | [diff] [blame] | 335 | <&syscrg JH7110_SYSCLK_QSPI_REF_SRC>; |
| 336 | assigned-clock-rates = <0>, <0>, <0>, <0>; |
| 337 | }; |
| 338 | |
| 339 | &aoncrg { |
| 340 | assigned-clocks = <&aoncrg JH7110_AONCLK_APB_FUNC>; |
| 341 | assigned-clock-parents = <&osc>; |
| 342 | assigned-clock-rates = <0>; |
| 343 | }; |
Yanhong Wang | 7f63bd9 | 2023-06-15 17:36:44 +0800 | [diff] [blame] | 344 | |
| 345 | &gmac0 { |
| 346 | phy-handle = <&phy0>; |
| 347 | phy-mode = "rgmii-id"; |
| 348 | status = "okay"; |
| 349 | |
| 350 | mdio { |
| 351 | #address-cells = <1>; |
| 352 | #size-cells = <0>; |
| 353 | compatible = "snps,dwmac-mdio"; |
| 354 | |
| 355 | phy0: ethernet-phy@0 { |
| 356 | reg = <0>; |
| 357 | }; |
| 358 | }; |
| 359 | }; |
| 360 | |
| 361 | &gmac1 { |
| 362 | phy-handle = <&phy1>; |
| 363 | phy-mode = "rgmii-id"; |
| 364 | status = "okay"; |
| 365 | |
| 366 | mdio { |
| 367 | #address-cells = <1>; |
| 368 | #size-cells = <0>; |
| 369 | compatible = "snps,dwmac-mdio"; |
| 370 | |
| 371 | phy1: ethernet-phy@1 { |
| 372 | reg = <0>; |
| 373 | }; |
| 374 | }; |
| 375 | }; |