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