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. |
| 6 | * (C) Copyright 2022 - 2023, Advanced Micro Devices, Inc. |
| 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; |
| 52 | fwuen { |
| 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 | |
| 74 | si5332_2: si5332_2 { /* u42 */ |
| 75 | compatible = "fixed-clock"; |
| 76 | #clock-cells = <0>; |
| 77 | clock-frequency = <26000000>; |
| 78 | }; |
| 79 | |
| 80 | pwm-fan { |
| 81 | compatible = "pwm-fan"; |
| 82 | status = "okay"; |
| 83 | pwms = <&ttc0 2 40000 1>; |
| 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 */ |
| 107 | "", "", "", "", "", /* 85 -89 */ |
| 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 { |
| 195 | compatible = "mt25qu512a", "m25p80", "jedec,spi-nor"; /* mt25qu512abb8e12 512Mib */ |
| 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; |
| 291 | bus-width = <8>; |
| 292 | xlnx,mio-bank = <0>; |
| 293 | }; |
| 294 | |
| 295 | &ttc0 { |
| 296 | status = "okay"; |
| 297 | #pwm-cells = <3>; |
| 298 | }; |
| 299 | |
| 300 | &uart1 { /* uart0 MIO36-37 */ |
| 301 | status = "okay"; |
| 302 | pinctrl-names = "default"; |
| 303 | pinctrl-0 = <&pinctrl_uart1_default>; |
| 304 | }; |
| 305 | |
| 306 | &pinctrl0 { /* required by spec */ |
| 307 | status = "okay"; |
| 308 | |
| 309 | pinctrl_uart1_default: uart1-default { |
| 310 | conf { |
| 311 | groups = "uart1_9_grp"; |
| 312 | slew-rate = <SLEW_RATE_SLOW>; |
| 313 | power-source = <IO_STANDARD_LVCMOS18>; |
| 314 | drive-strength = <12>; |
| 315 | }; |
| 316 | |
| 317 | conf-rx { |
| 318 | pins = "MIO37"; |
| 319 | bias-high-impedance; |
| 320 | }; |
| 321 | |
| 322 | conf-tx { |
| 323 | pins = "MIO36"; |
| 324 | bias-disable; |
| 325 | }; |
| 326 | |
| 327 | mux { |
| 328 | groups = "uart1_9_grp"; |
| 329 | function = "uart1"; |
| 330 | }; |
| 331 | }; |
| 332 | |
| 333 | pinctrl_i2c0_default: i2c0-default { |
| 334 | mux { |
| 335 | groups = "i2c0_8_grp"; |
| 336 | function = "i2c0"; |
| 337 | }; |
| 338 | |
| 339 | conf { |
| 340 | groups = "i2c0_8_grp"; |
| 341 | bias-pull-up; |
| 342 | slew-rate = <SLEW_RATE_SLOW>; |
| 343 | power-source = <IO_STANDARD_LVCMOS18>; |
| 344 | }; |
| 345 | }; |
| 346 | |
| 347 | pinctrl_i2c0_gpio: i2c0-gpio { |
| 348 | mux { |
| 349 | groups = "gpio0_34_grp", "gpio0_35_grp"; |
| 350 | function = "gpio0"; |
| 351 | }; |
| 352 | |
| 353 | conf { |
| 354 | groups = "gpio0_34_grp", "gpio0_35_grp"; |
| 355 | slew-rate = <SLEW_RATE_SLOW>; |
| 356 | power-source = <IO_STANDARD_LVCMOS18>; |
| 357 | }; |
| 358 | }; |
| 359 | |
| 360 | pinctrl_i2c1_default: i2c1-default { |
| 361 | conf { |
| 362 | groups = "i2c1_6_grp"; |
| 363 | bias-pull-up; |
| 364 | slew-rate = <SLEW_RATE_SLOW>; |
| 365 | power-source = <IO_STANDARD_LVCMOS18>; |
| 366 | }; |
| 367 | |
| 368 | mux { |
| 369 | groups = "i2c1_6_grp"; |
| 370 | function = "i2c1"; |
| 371 | }; |
| 372 | }; |
| 373 | |
| 374 | pinctrl_i2c1_gpio: i2c1-gpio { |
| 375 | conf { |
| 376 | groups = "gpio0_24_grp", "gpio0_25_grp"; |
| 377 | slew-rate = <SLEW_RATE_SLOW>; |
| 378 | power-source = <IO_STANDARD_LVCMOS18>; |
| 379 | }; |
| 380 | |
| 381 | mux { |
| 382 | groups = "gpio0_24_grp", "gpio0_25_grp"; |
| 383 | function = "gpio0"; |
| 384 | }; |
| 385 | }; |
| 386 | |
| 387 | pinctrl_gem1_default: gem1-default { |
| 388 | conf { |
| 389 | groups = "ethernet1_0_grp"; |
| 390 | slew-rate = <SLEW_RATE_SLOW>; |
| 391 | power-source = <IO_STANDARD_LVCMOS18>; |
| 392 | }; |
| 393 | |
| 394 | conf-rx { |
| 395 | pins = "MIO44", "MIO46", "MIO48"; |
| 396 | bias-high-impedance; |
| 397 | low-power-disable; |
| 398 | }; |
| 399 | |
| 400 | conf-bootstrap { |
| 401 | pins = "MIO45", "MIO47", "MIO49"; |
| 402 | bias-disable; |
| 403 | low-power-disable; |
| 404 | }; |
| 405 | |
| 406 | conf-tx { |
| 407 | pins = "MIO38", "MIO39", "MIO40", |
| 408 | "MIO41", "MIO42", "MIO43"; |
| 409 | bias-disable; |
| 410 | low-power-enable; |
| 411 | }; |
| 412 | |
| 413 | conf-mdio { |
| 414 | groups = "mdio1_0_grp"; |
| 415 | slew-rate = <SLEW_RATE_SLOW>; |
| 416 | power-source = <IO_STANDARD_LVCMOS18>; |
| 417 | bias-disable; |
| 418 | }; |
| 419 | |
| 420 | mux-mdio { |
| 421 | function = "mdio1"; |
| 422 | groups = "mdio1_0_grp"; |
| 423 | }; |
| 424 | |
| 425 | mux { |
| 426 | function = "ethernet1"; |
| 427 | groups = "ethernet1_0_grp"; |
| 428 | }; |
| 429 | }; |
| 430 | }; |