Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * dts file for Xilinx ZynqMP Generic System Controller |
| 4 | * |
| 5 | * (C) Copyright 2021 - 2022, Xilinx, Inc. |
Saeed Nowshadi | 433df51 | 2024-10-24 12:42:33 +0200 | [diff] [blame] | 6 | * (C) Copyright 2022 - 2024, Advanced Micro Devices, Inc. |
Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 7 | * |
| 8 | * Michal Simek <michal.simek@amd.com> |
| 9 | */ |
| 10 | /dts-v1/; |
| 11 | |
| 12 | #include "zynqmp.dtsi" |
| 13 | #include "zynqmp-clk-ccf.dtsi" |
| 14 | #include <dt-bindings/input/input.h> |
| 15 | #include <dt-bindings/gpio/gpio.h> |
| 16 | #include <dt-bindings/net/ti-dp83867.h> |
| 17 | #include <dt-bindings/pinctrl/pinctrl-zynqmp.h> |
| 18 | #include <dt-bindings/phy/phy.h> |
| 19 | |
| 20 | / { |
| 21 | model = "ZynqMP Generic System Controller"; |
| 22 | compatible = "xlnx,zynqmp-sc-revB", "xlnx,zynqmp-sc", "xlnx,zynqmp"; |
| 23 | |
| 24 | aliases { |
| 25 | i2c0 = &i2c0; |
| 26 | i2c1 = &i2c1; |
| 27 | mmc0 = &sdhci0; |
| 28 | mmc1 = &sdhci1; |
| 29 | nvmem0 = &eeprom; |
| 30 | rtc0 = &rtc; |
| 31 | serial0 = &uart0; |
| 32 | serial1 = &uart1; |
| 33 | serial2 = &dcc; |
| 34 | spi0 = &qspi; |
| 35 | spi1 = &spi0; |
| 36 | spi2 = &spi1; |
| 37 | }; |
| 38 | |
| 39 | chosen { |
| 40 | bootargs = "earlycon"; |
| 41 | stdout-path = "serial1:115200n8"; |
| 42 | }; |
| 43 | |
| 44 | memory@0 { |
| 45 | device_type = "memory"; |
| 46 | reg = <0x0 0x0 0x0 0x80000000>; |
| 47 | }; |
| 48 | |
| 49 | gpio-keys { |
| 50 | compatible = "gpio-keys"; |
| 51 | autorepeat; |
Michal Simek | 518d166 | 2024-03-08 09:40:52 +0100 | [diff] [blame] | 52 | key-fwuen { |
Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 53 | label = "sw16"; |
| 54 | gpios = <&gpio 12 GPIO_ACTIVE_LOW>; |
| 55 | linux,code = <BTN_MISC>; |
| 56 | wakeup-source; |
| 57 | autorepeat; |
| 58 | }; |
| 59 | }; |
| 60 | |
| 61 | leds { |
| 62 | compatible = "gpio-leds"; |
| 63 | ds40-led { |
| 64 | label = "heartbeat"; |
| 65 | gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; |
| 66 | linux,default-trigger = "heartbeat"; |
| 67 | }; |
| 68 | ds44-led { |
| 69 | label = "status"; |
| 70 | gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; |
| 71 | }; |
| 72 | }; |
| 73 | |
Michal Simek | e315762 | 2024-01-08 10:24:45 +0100 | [diff] [blame] | 74 | si5332_2: si5332-2 { /* u42 */ |
Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 75 | compatible = "fixed-clock"; |
| 76 | #clock-cells = <0>; |
| 77 | clock-frequency = <26000000>; |
| 78 | }; |
| 79 | |
| 80 | pwm-fan { |
| 81 | compatible = "pwm-fan"; |
| 82 | status = "okay"; |
Saeed Nowshadi | 433df51 | 2024-10-24 12:42:33 +0200 | [diff] [blame] | 83 | pwms = <&ttc0 2 40000 0>; |
Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 84 | }; |
| 85 | }; |
| 86 | |
| 87 | &gpio { |
| 88 | status = "okay"; |
| 89 | gpio-line-names = "QSPI_CLK", "QSPI_DQ1", "QSPI_DQ2", "QSPI_DQ3", "QSPI_DQ0", /* 0 - 4 */ |
| 90 | "QSPI_CS_B", "", "LED1", "LED2", "", /* 5 - 9 */ |
| 91 | "", "ZU4_TRIGGER", "FWUEN", "EMMC_DAT0", "EMMC_DAT1", /* 10 - 14 */ |
| 92 | "EMMC_DAT2", "EMMC_DAT3", "EMMC_DAT4", "EMMC_DAT5", "EMMC_DAT6", /* 15 - 19 */ |
| 93 | "EMMC_DAT7", "EMMC_CMD", "EMMC_CLK", "EMMC_RST_B", "I2C1_SCL", /* 20 - 24 */ |
| 94 | "I2C1_SDA", "UART0_RXD", "UART0_TXD", "", "", /* 25 - 29 */ |
| 95 | "", "", "", "", "I2C0_SCL", /* 30 - 34 */ |
| 96 | "I2C0_SDA", "UART1_TXD", "UART1_RXD", "GEM_TX_CLK", "GEM_TX_D0", /* 35 - 39 */ |
| 97 | "GEM_TX_D1", "GEM_TX_D2", "GEM_TX_D3", "GEM_TX_CTL", "GEM_RX_CLK", /* 40 - 44 */ |
| 98 | "GEM_RX_D0", "GEM_RX_D1", "GEM_RX_D2", "GEM_RX_D3", "GEM_RX_CTL", /* 45 - 49 */ |
| 99 | "GEM_MDC", "GEM_MDIO", "USB0_CLK", "USB0_DIR", "USB0_DATA2", /* 50 - 54 */ |
| 100 | "USB0_NXT", "USB0_DATA0", "USB0_DATA1", "USB0_STP", "USB0_DATA3", /* 55 - 59 */ |
| 101 | "USB0_DATA4", "USB0_DATA5", "USB0_DATA6", "USB0_DATA7", "", /* 60 - 64 */ |
| 102 | "", "", "", "", "", /* 65 - 69 */ |
| 103 | "", "", "", "", "", /* 70 - 74 */ |
| 104 | "", "", "ETH_RESET_B", /* 75 - 77, MIO end and EMIO start */ |
| 105 | "", "", /* 78 - 79 */ |
| 106 | "", "", "", "", "", /* 80 - 84 */ |
Michal Simek | a8c5ce4 | 2024-09-13 11:28:46 +0200 | [diff] [blame] | 107 | "", "", "", "", "", /* 85 - 89 */ |
Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 108 | "", "", "", "", "", /* 90 - 94 */ |
| 109 | "", "", "", "", "", /* 95 - 99 */ |
| 110 | "", "", "", "", "", /* 100 - 104 */ |
| 111 | "", "", "", "", "", /* 105 - 109 */ |
| 112 | "", "", "", "", "", /* 110 - 114 */ |
| 113 | "", "", "", "", "", /* 115 - 119 */ |
| 114 | "", "", "", "", "", /* 120 - 124 */ |
| 115 | "", "", "", "", "", /* 125 - 129 */ |
| 116 | "", "", "", "", "", /* 130 - 134 */ |
| 117 | "", "", "", "", "", /* 135 - 139 */ |
| 118 | "", "", "", "", "", /* 140 - 144 */ |
| 119 | "", "", "", "", "", /* 145 - 149 */ |
| 120 | "", "", "", "", "", /* 150 - 154 */ |
| 121 | "", "", "", "", "", /* 155 - 159 */ |
| 122 | "", "", "", "", "", /* 160 - 164 */ |
| 123 | "", "", "", "", "", /* 165 - 169 */ |
| 124 | "", "", "", ""; /* 170 - 173 */ |
| 125 | }; |
| 126 | |
| 127 | &gem1 { /* gem1 MIO38-49, MDIO MIO50/51 */ |
| 128 | status = "okay"; |
| 129 | phy-mode = "rgmii-id"; |
| 130 | phy-handle = <&phy0>; |
| 131 | pinctrl-names = "default"; |
| 132 | pinctrl-0 = <&pinctrl_gem1_default>; |
| 133 | |
| 134 | mdio: mdio { |
| 135 | #address-cells = <1>; |
| 136 | #size-cells = <0>; |
| 137 | |
| 138 | phy0: ethernet-phy@1 { |
| 139 | #phy-cells = <1>; |
| 140 | compatible = "ethernet-phy-id2000.a231"; |
| 141 | reg = <1>; |
| 142 | ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>; |
| 143 | ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>; |
| 144 | ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; |
| 145 | ti,dp83867-rxctrl-strap-quirk; |
| 146 | reset-gpios = <&gpio 77 GPIO_ACTIVE_LOW>; |
| 147 | reset-assert-us = <100>; |
| 148 | reset-deassert-us = <280>; |
| 149 | }; |
| 150 | }; |
| 151 | }; |
| 152 | |
| 153 | &i2c0 { |
| 154 | #address-cells = <1>; |
| 155 | #size-cells = <0>; |
| 156 | status = "okay"; |
| 157 | clock-frequency = <100000>; |
| 158 | pinctrl-names = "default", "gpio"; |
| 159 | pinctrl-0 = <&pinctrl_i2c0_default>; |
| 160 | pinctrl-1 = <&pinctrl_i2c0_gpio>; |
| 161 | scl-gpios = <&gpio 34 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 162 | sda-gpios = <&gpio 35 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 163 | }; |
| 164 | |
| 165 | &i2c1 { /* i2c1 MIO 24-25 */ |
| 166 | status = "okay"; |
| 167 | bootph-all; |
| 168 | clock-frequency = <100000>; |
| 169 | pinctrl-names = "default", "gpio"; |
| 170 | pinctrl-0 = <&pinctrl_i2c1_default>; |
| 171 | pinctrl-1 = <&pinctrl_i2c1_gpio>; |
| 172 | scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 173 | sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 174 | |
| 175 | /* Use for storing information about SC board */ |
| 176 | eeprom: eeprom@54 { /* u34 - m24128 16kB */ |
| 177 | compatible = "st,24c128", "atmel,24c128"; |
| 178 | reg = <0x54>; /* & 0x5c */ |
| 179 | bootph-all; |
| 180 | }; |
| 181 | }; |
| 182 | |
| 183 | /* USB 3.0 only */ |
| 184 | &psgtr { |
| 185 | status = "okay"; |
| 186 | /* nc, nc, usb3 */ |
| 187 | clocks = <&si5332_2>; |
| 188 | clock-names = "ref2"; |
| 189 | }; |
| 190 | |
| 191 | &qspi { /* MIO 0-5 */ |
| 192 | status = "okay"; |
| 193 | /* QSPI should also have PINCTRL setup */ |
| 194 | flash@0 { |
Michal Simek | ae24507 | 2024-03-08 09:41:23 +0100 | [diff] [blame] | 195 | compatible = "m25p80", "jedec,spi-nor"; /* mt25qu512abb8e12 512Mib */ |
Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 196 | #address-cells = <1>; |
| 197 | #size-cells = <1>; |
| 198 | reg = <0>; |
| 199 | spi-tx-bus-width = <4>; |
| 200 | spi-rx-bus-width = <4>; |
| 201 | spi-max-frequency = <40000000>; /* 40MHz */ |
| 202 | partition@0 { |
| 203 | label = "Image Selector"; |
| 204 | reg = <0x0 0x80000>; /* 512KB */ |
| 205 | read-only; |
| 206 | lock; |
| 207 | }; |
| 208 | partition@80000 { |
| 209 | label = "Image Selector Golden"; |
| 210 | reg = <0x80000 0x80000>; /* 512KB */ |
| 211 | read-only; |
| 212 | lock; |
| 213 | }; |
| 214 | partition@100000 { |
| 215 | label = "Persistent Register"; |
| 216 | reg = <0x100000 0x20000>; /* 128KB */ |
| 217 | }; |
| 218 | partition@120000 { |
| 219 | label = "Persistent Register Backup"; |
| 220 | reg = <0x120000 0x20000>; /* 128KB */ |
| 221 | }; |
| 222 | partition@140000 { |
| 223 | label = "Open_1"; |
| 224 | reg = <0x140000 0xC0000>; /* 768KB */ |
| 225 | }; |
| 226 | partition@200000 { |
| 227 | label = "Image A (FSBL, PMU, ATF, U-Boot)"; |
| 228 | reg = <0x200000 0xD00000>; /* 13MB */ |
| 229 | }; |
| 230 | partition@f00000 { |
| 231 | label = "ImgSel Image A Catch"; |
| 232 | reg = <0xF00000 0x80000>; /* 512KB */ |
| 233 | read-only; |
| 234 | lock; |
| 235 | }; |
| 236 | partition@f80000 { |
| 237 | label = "Image B (FSBL, PMU, ATF, U-Boot)"; |
| 238 | reg = <0xF80000 0xD00000>; /* 13MB */ |
| 239 | }; |
| 240 | partition@1c80000 { |
| 241 | label = "ImgSel Image B Catch"; |
| 242 | reg = <0x1C80000 0x80000>; /* 512KB */ |
| 243 | read-only; |
| 244 | lock; |
| 245 | }; |
| 246 | partition@1d00000 { |
| 247 | label = "Open_2"; |
| 248 | reg = <0x1D00000 0x100000>; /* 1MB */ |
| 249 | }; |
| 250 | partition@1e00000 { |
| 251 | label = "Recovery Image"; |
| 252 | reg = <0x1E00000 0x200000>; /* 2MB */ |
| 253 | read-only; |
| 254 | lock; |
| 255 | }; |
| 256 | partition@2000000 { |
| 257 | label = "Recovery Image Backup"; |
| 258 | reg = <0x2000000 0x200000>; /* 2MB */ |
| 259 | read-only; |
| 260 | lock; |
| 261 | }; |
| 262 | partition@2200000 { |
| 263 | label = "U-Boot storage variables"; |
| 264 | reg = <0x2200000 0x20000>; /* 128KB */ |
| 265 | }; |
| 266 | partition@2220000 { |
| 267 | label = "U-Boot storage variables backup"; |
| 268 | reg = <0x2220000 0x20000>; /* 128KB */ |
| 269 | }; |
| 270 | partition@2240000 { |
| 271 | label = "SHA256"; |
| 272 | reg = <0x2240000 0x40000>; /* 256B but 256KB sector */ |
| 273 | read-only; |
| 274 | lock; |
| 275 | }; |
| 276 | partition@2280000 { |
| 277 | label = "Secure OS Storage"; |
| 278 | reg = <0x2280000 0x20000>; /* 128KB */ |
| 279 | }; |
| 280 | partition@22A0000 { |
| 281 | label = "User"; |
| 282 | reg = <0x22A0000 0x1d60000>; /* 29.375 MB */ |
| 283 | }; |
| 284 | }; |
| 285 | }; |
| 286 | |
| 287 | &sdhci0 { /* emmc MIO 13-23 - with some settings MTFC16GAPALBH 16GB */ |
| 288 | status = "okay"; |
| 289 | non-removable; |
| 290 | disable-wp; |
Paul Alvin | a1398f0 | 2024-09-25 09:03:13 +0200 | [diff] [blame] | 291 | no-sd; |
| 292 | no-sdio; |
| 293 | cap-mmc-hw-reset; |
Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 294 | bus-width = <8>; |
| 295 | xlnx,mio-bank = <0>; |
| 296 | }; |
| 297 | |
| 298 | &ttc0 { |
| 299 | status = "okay"; |
| 300 | #pwm-cells = <3>; |
| 301 | }; |
| 302 | |
| 303 | &uart1 { /* uart0 MIO36-37 */ |
| 304 | status = "okay"; |
| 305 | pinctrl-names = "default"; |
| 306 | pinctrl-0 = <&pinctrl_uart1_default>; |
| 307 | }; |
| 308 | |
| 309 | &pinctrl0 { /* required by spec */ |
| 310 | status = "okay"; |
| 311 | |
| 312 | pinctrl_uart1_default: uart1-default { |
| 313 | conf { |
| 314 | groups = "uart1_9_grp"; |
| 315 | slew-rate = <SLEW_RATE_SLOW>; |
| 316 | power-source = <IO_STANDARD_LVCMOS18>; |
| 317 | drive-strength = <12>; |
| 318 | }; |
| 319 | |
| 320 | conf-rx { |
| 321 | pins = "MIO37"; |
| 322 | bias-high-impedance; |
| 323 | }; |
| 324 | |
| 325 | conf-tx { |
| 326 | pins = "MIO36"; |
| 327 | bias-disable; |
| 328 | }; |
| 329 | |
| 330 | mux { |
| 331 | groups = "uart1_9_grp"; |
| 332 | function = "uart1"; |
| 333 | }; |
| 334 | }; |
| 335 | |
| 336 | pinctrl_i2c0_default: i2c0-default { |
| 337 | mux { |
| 338 | groups = "i2c0_8_grp"; |
| 339 | function = "i2c0"; |
| 340 | }; |
| 341 | |
| 342 | conf { |
| 343 | groups = "i2c0_8_grp"; |
| 344 | bias-pull-up; |
| 345 | slew-rate = <SLEW_RATE_SLOW>; |
| 346 | power-source = <IO_STANDARD_LVCMOS18>; |
| 347 | }; |
| 348 | }; |
| 349 | |
Michal Simek | cf3cd80 | 2023-12-19 17:16:50 +0100 | [diff] [blame] | 350 | pinctrl_i2c0_gpio: i2c0-gpio-grp { |
Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 351 | mux { |
| 352 | groups = "gpio0_34_grp", "gpio0_35_grp"; |
| 353 | function = "gpio0"; |
| 354 | }; |
| 355 | |
| 356 | conf { |
| 357 | groups = "gpio0_34_grp", "gpio0_35_grp"; |
| 358 | slew-rate = <SLEW_RATE_SLOW>; |
| 359 | power-source = <IO_STANDARD_LVCMOS18>; |
| 360 | }; |
| 361 | }; |
| 362 | |
| 363 | pinctrl_i2c1_default: i2c1-default { |
| 364 | conf { |
| 365 | groups = "i2c1_6_grp"; |
| 366 | bias-pull-up; |
| 367 | slew-rate = <SLEW_RATE_SLOW>; |
| 368 | power-source = <IO_STANDARD_LVCMOS18>; |
| 369 | }; |
| 370 | |
| 371 | mux { |
| 372 | groups = "i2c1_6_grp"; |
| 373 | function = "i2c1"; |
| 374 | }; |
| 375 | }; |
| 376 | |
Michal Simek | cf3cd80 | 2023-12-19 17:16:50 +0100 | [diff] [blame] | 377 | pinctrl_i2c1_gpio: i2c1-gpio-grp { |
Michal Simek | 68b6dba | 2023-09-27 11:53:32 +0200 | [diff] [blame] | 378 | conf { |
| 379 | groups = "gpio0_24_grp", "gpio0_25_grp"; |
| 380 | slew-rate = <SLEW_RATE_SLOW>; |
| 381 | power-source = <IO_STANDARD_LVCMOS18>; |
| 382 | }; |
| 383 | |
| 384 | mux { |
| 385 | groups = "gpio0_24_grp", "gpio0_25_grp"; |
| 386 | function = "gpio0"; |
| 387 | }; |
| 388 | }; |
| 389 | |
| 390 | pinctrl_gem1_default: gem1-default { |
| 391 | conf { |
| 392 | groups = "ethernet1_0_grp"; |
| 393 | slew-rate = <SLEW_RATE_SLOW>; |
| 394 | power-source = <IO_STANDARD_LVCMOS18>; |
| 395 | }; |
| 396 | |
| 397 | conf-rx { |
| 398 | pins = "MIO44", "MIO46", "MIO48"; |
| 399 | bias-high-impedance; |
| 400 | low-power-disable; |
| 401 | }; |
| 402 | |
| 403 | conf-bootstrap { |
| 404 | pins = "MIO45", "MIO47", "MIO49"; |
| 405 | bias-disable; |
| 406 | low-power-disable; |
| 407 | }; |
| 408 | |
| 409 | conf-tx { |
| 410 | pins = "MIO38", "MIO39", "MIO40", |
| 411 | "MIO41", "MIO42", "MIO43"; |
| 412 | bias-disable; |
| 413 | low-power-enable; |
| 414 | }; |
| 415 | |
| 416 | conf-mdio { |
| 417 | groups = "mdio1_0_grp"; |
| 418 | slew-rate = <SLEW_RATE_SLOW>; |
| 419 | power-source = <IO_STANDARD_LVCMOS18>; |
| 420 | bias-disable; |
| 421 | }; |
| 422 | |
| 423 | mux-mdio { |
| 424 | function = "mdio1"; |
| 425 | groups = "mdio1_0_grp"; |
| 426 | }; |
| 427 | |
| 428 | mux { |
| 429 | function = "ethernet1"; |
| 430 | groups = "ethernet1_0_grp"; |
| 431 | }; |
| 432 | }; |
| 433 | }; |