Michal Simek | 1e356db | 2023-09-27 11:53:27 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * dts file for KD240 revA Carrier Card |
| 4 | * |
| 5 | * Copyright (C) 2021 - 2022, Xilinx, Inc. |
| 6 | * Copyright (C) 2022 - 2023, Advanced Micro Devices, Inc. |
| 7 | * |
| 8 | * Michal Simek <michal.simek@amd.com> |
| 9 | */ |
| 10 | |
| 11 | #include <dt-bindings/gpio/gpio.h> |
| 12 | #include <dt-bindings/phy/phy.h> |
| 13 | #include <dt-bindings/pinctrl/pinctrl-zynqmp.h> |
| 14 | |
| 15 | /dts-v1/; |
| 16 | /plugin/; |
| 17 | |
| 18 | &{/} { |
| 19 | compatible = "xlnx,zynqmp-sk-kd240-rev1", |
| 20 | "xlnx,zynqmp-sk-kd240-revB", |
| 21 | "xlnx,zynqmp-sk-kd240-revA", |
| 22 | "xlnx,zynqmp-sk-kd240", "xlnx,zynqmp"; |
| 23 | model = "ZynqMP KD240 revA/B/1"; |
| 24 | |
| 25 | ina260-u3 { |
| 26 | compatible = "iio-hwmon"; |
| 27 | io-channels = <&u3 0>, <&u3 1>, <&u3 2>; |
| 28 | }; |
| 29 | |
| 30 | clk_26: clock2 { /* u17 - USB */ |
| 31 | compatible = "fixed-clock"; |
| 32 | #clock-cells = <0>; |
| 33 | clock-frequency = <26000000>; |
| 34 | }; |
Michal Simek | 632a8e0 | 2024-01-29 08:46:43 +0100 | [diff] [blame] | 35 | |
| 36 | clk_25_0: clock4 { /* u92/u91 - GEM2 */ |
| 37 | compatible = "fixed-clock"; |
| 38 | #clock-cells = <0>; |
| 39 | clock-frequency = <25000000>; |
| 40 | }; |
| 41 | |
| 42 | clk_25_1: clock5 { /* u92/u91 - GEM3 */ |
| 43 | compatible = "fixed-clock"; |
| 44 | #clock-cells = <0>; |
| 45 | clock-frequency = <25000000>; |
| 46 | }; |
Michal Simek | 1e356db | 2023-09-27 11:53:27 +0200 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | &can0 { |
| 50 | status = "okay"; |
| 51 | pinctrl-names = "default"; |
| 52 | pinctrl-0 = <&pinctrl_can0_default>; |
| 53 | }; |
| 54 | |
| 55 | &i2c1 { /* I2C_SCK C26/C27 - MIO from SOM */ |
| 56 | #address-cells = <1>; |
| 57 | #size-cells = <0>; |
| 58 | pinctrl-names = "default", "gpio"; |
| 59 | pinctrl-0 = <&pinctrl_i2c1_default>; |
| 60 | pinctrl-1 = <&pinctrl_i2c1_gpio>; |
| 61 | scl-gpios = <&gpio 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 62 | sda-gpios = <&gpio 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 63 | |
| 64 | u3: ina260@40 { /* u3 */ |
| 65 | compatible = "ti,ina260"; |
| 66 | #io-channel-cells = <1>; |
| 67 | label = "ina260-u14"; |
| 68 | reg = <0x40>; |
| 69 | }; |
| 70 | |
| 71 | slg7xl45106: gpio@11 { /* u13 - reset logic */ |
| 72 | compatible = "dlg,slg7xl45106"; |
| 73 | reg = <0x11>; |
| 74 | label = "resetchip"; |
| 75 | gpio-controller; |
| 76 | #gpio-cells = <2>; |
| 77 | gpio-line-names = "USB0_PHY_RESET_B", "", |
| 78 | "SD_RESET_B", "USB0_HUB_RESET_B", |
| 79 | "", "PS_GEM0_RESET_B", |
| 80 | "", ""; |
| 81 | }; |
| 82 | |
| 83 | /* usb5744@2d */ |
| 84 | }; |
| 85 | |
| 86 | /* USB 3.0 */ |
| 87 | &psgtr { |
| 88 | status = "okay"; |
| 89 | /* usb */ |
| 90 | clocks = <&clk_26>; |
| 91 | clock-names = "ref2"; |
| 92 | }; |
| 93 | |
| 94 | &usb0 { /* mio52 - mio63 */ |
| 95 | status = "okay"; |
| 96 | pinctrl-names = "default"; |
| 97 | pinctrl-0 = <&pinctrl_usb0_default>; |
| 98 | phy-names = "usb3-phy"; |
| 99 | phys = <&psgtr 2 PHY_TYPE_USB3 0 2>; |
| 100 | reset-gpios = <&slg7xl45106 0 GPIO_ACTIVE_LOW>; |
| 101 | assigned-clock-rates = <250000000>, <20000000>; |
Michal Simek | 30d1dfc | 2023-11-06 16:55:48 +0100 | [diff] [blame] | 102 | #if 0 |
Michal Simek | 1e356db | 2023-09-27 11:53:27 +0200 | [diff] [blame] | 103 | usbhub0: usb-hub { /* u36 */ |
| 104 | i2c-bus = <&i2c1>; |
| 105 | compatible = "microchip,usb5744"; |
| 106 | reset-gpios = <&slg7xl45106 3 GPIO_ACTIVE_LOW>; |
| 107 | }; |
| 108 | |
| 109 | usb2244: usb-sd { /* u41 */ |
| 110 | compatible = "microchip,usb2244"; |
| 111 | reset-gpios = <&slg7xl45106 2 GPIO_ACTIVE_LOW>; |
| 112 | }; |
Michal Simek | 30d1dfc | 2023-11-06 16:55:48 +0100 | [diff] [blame] | 113 | #endif |
Michal Simek | 1e356db | 2023-09-27 11:53:27 +0200 | [diff] [blame] | 114 | }; |
| 115 | |
| 116 | &dwc3_0 { |
| 117 | status = "okay"; |
| 118 | dr_mode = "host"; |
| 119 | snps,usb3_lpm_capable; |
| 120 | maximum-speed = "super-speed"; |
| 121 | }; |
| 122 | |
| 123 | &gem1 { /* mdio mio50/51 */ |
| 124 | status = "okay"; |
| 125 | pinctrl-names = "default"; |
| 126 | pinctrl-0 = <&pinctrl_gem1_default>; |
| 127 | assigned-clock-rates = <250000000>; |
| 128 | |
| 129 | phy-handle = <&phy0>; |
| 130 | phy-mode = "rgmii-id"; |
| 131 | mdio: mdio { |
| 132 | #address-cells = <1>; |
| 133 | #size-cells = <0>; |
| 134 | phy0: ethernet-phy@8 { /* Adin u31 */ |
Michal Simek | c753918 | 2023-12-18 13:57:22 +0100 | [diff] [blame] | 135 | #phy-cells = <1>; |
| 136 | compatible = "ethernet-phy-id0283.bc30"; |
Michal Simek | 1e356db | 2023-09-27 11:53:27 +0200 | [diff] [blame] | 137 | reg = <8>; |
| 138 | adi,rx-internal-delay-ps = <2000>; |
| 139 | adi,tx-internal-delay-ps = <2000>; |
| 140 | adi,fifo-depth-bits = <8>; |
| 141 | reset-assert-us = <10>; |
| 142 | reset-deassert-us = <5000>; |
| 143 | reset-gpios = <&gpio 77 GPIO_ACTIVE_LOW>; |
| 144 | }; |
| 145 | }; |
| 146 | }; |
| 147 | |
| 148 | /* 2 more ethernet phys u32@2 and u34@3 */ |
| 149 | |
| 150 | &pinctrl0 { /* required by spec */ |
| 151 | status = "okay"; |
| 152 | |
| 153 | pinctrl_can0_default: can0-default { |
| 154 | mux { |
| 155 | function = "can0"; |
| 156 | groups = "can0_16_grp"; |
| 157 | }; |
| 158 | |
| 159 | conf { |
| 160 | groups = "can0_16_grp"; |
| 161 | slew-rate = <SLEW_RATE_SLOW>; |
| 162 | power-source = <IO_STANDARD_LVCMOS18>; |
| 163 | }; |
| 164 | |
| 165 | conf-rx { |
| 166 | pins = "MIO66"; |
| 167 | bias-pull-up; |
| 168 | }; |
| 169 | |
| 170 | conf-tx { |
| 171 | pins = "MIO67"; |
| 172 | bias-pull-up; |
| 173 | drive-strength = <4>; |
| 174 | }; |
| 175 | }; |
| 176 | |
| 177 | pinctrl_uart0_default: uart0-default { |
| 178 | conf { |
| 179 | groups = "uart0_17_grp"; |
| 180 | slew-rate = <SLEW_RATE_SLOW>; |
| 181 | power-source = <IO_STANDARD_LVCMOS18>; |
| 182 | drive-strength = <12>; |
| 183 | }; |
| 184 | |
| 185 | conf-rx { |
| 186 | pins = "MIO70"; |
| 187 | bias-high-impedance; |
| 188 | }; |
| 189 | |
| 190 | conf-tx { |
| 191 | pins = "MIO71"; |
| 192 | bias-disable; |
| 193 | }; |
| 194 | |
| 195 | mux { |
| 196 | groups = "uart0_17_grp"; |
| 197 | function = "uart0"; |
| 198 | }; |
| 199 | }; |
| 200 | |
| 201 | pinctrl_uart1_default: uart1-default { |
| 202 | conf { |
| 203 | groups = "uart1_9_grp"; |
| 204 | slew-rate = <SLEW_RATE_SLOW>; |
| 205 | power-source = <IO_STANDARD_LVCMOS18>; |
| 206 | drive-strength = <12>; |
| 207 | }; |
| 208 | |
| 209 | conf-rx { |
| 210 | pins = "MIO37"; |
| 211 | bias-high-impedance; |
| 212 | }; |
| 213 | |
| 214 | conf-tx { |
| 215 | pins = "MIO36"; |
| 216 | bias-disable; |
| 217 | output-enable; |
| 218 | }; |
| 219 | |
| 220 | mux { |
| 221 | groups = "uart1_9_grp"; |
| 222 | function = "uart1"; |
| 223 | }; |
| 224 | }; |
| 225 | |
| 226 | pinctrl_i2c1_default: i2c1-default { |
| 227 | conf { |
| 228 | groups = "i2c1_6_grp"; |
| 229 | bias-pull-up; |
| 230 | slew-rate = <SLEW_RATE_SLOW>; |
| 231 | power-source = <IO_STANDARD_LVCMOS18>; |
| 232 | }; |
| 233 | |
| 234 | mux { |
| 235 | groups = "i2c1_6_grp"; |
| 236 | function = "i2c1"; |
| 237 | }; |
| 238 | }; |
| 239 | |
Michal Simek | cf3cd80 | 2023-12-19 17:16:50 +0100 | [diff] [blame] | 240 | pinctrl_i2c1_gpio: i2c1-gpio-grp { |
Michal Simek | 1e356db | 2023-09-27 11:53:27 +0200 | [diff] [blame] | 241 | conf { |
| 242 | groups = "gpio0_24_grp", "gpio0_25_grp"; |
| 243 | slew-rate = <SLEW_RATE_SLOW>; |
| 244 | power-source = <IO_STANDARD_LVCMOS18>; |
| 245 | }; |
| 246 | |
| 247 | mux { |
| 248 | groups = "gpio0_24_grp", "gpio0_25_grp"; |
| 249 | function = "gpio0"; |
| 250 | }; |
| 251 | }; |
| 252 | |
| 253 | pinctrl_gem1_default: gem1-default { |
| 254 | conf { |
| 255 | groups = "ethernet1_0_grp"; |
| 256 | slew-rate = <SLEW_RATE_SLOW>; |
| 257 | power-source = <IO_STANDARD_LVCMOS18>; |
| 258 | }; |
| 259 | |
| 260 | conf-rx { |
| 261 | pins = "MIO45", "MIO46", "MIO47", "MIO48"; |
| 262 | bias-disable; |
| 263 | low-power-disable; |
| 264 | }; |
| 265 | |
| 266 | conf-bootstrap { |
| 267 | pins = "MIO44", "MIO49"; |
| 268 | bias-disable; |
| 269 | output-enable; |
| 270 | low-power-disable; |
| 271 | }; |
| 272 | |
| 273 | conf-tx { |
| 274 | pins = "MIO38", "MIO39", "MIO40", |
| 275 | "MIO41", "MIO42", "MIO43"; |
| 276 | bias-disable; |
| 277 | output-enable; |
| 278 | low-power-enable; |
| 279 | }; |
| 280 | |
| 281 | conf-mdio { |
| 282 | groups = "mdio1_0_grp"; |
| 283 | slew-rate = <SLEW_RATE_SLOW>; |
| 284 | power-source = <IO_STANDARD_LVCMOS18>; |
| 285 | bias-disable; |
| 286 | output-enable; |
| 287 | }; |
| 288 | |
| 289 | mux-mdio { |
| 290 | function = "mdio1"; |
| 291 | groups = "mdio1_0_grp"; |
| 292 | }; |
| 293 | |
| 294 | mux { |
| 295 | function = "ethernet1"; |
| 296 | groups = "ethernet1_0_grp"; |
| 297 | }; |
| 298 | }; |
| 299 | |
| 300 | pinctrl_usb0_default: usb0-default { |
| 301 | conf { |
| 302 | groups = "usb0_0_grp"; |
| 303 | power-source = <IO_STANDARD_LVCMOS18>; |
| 304 | }; |
| 305 | |
| 306 | conf-rx { |
| 307 | pins = "MIO52", "MIO53", "MIO55"; |
| 308 | bias-high-impedance; |
| 309 | drive-strength = <12>; |
| 310 | slew-rate = <SLEW_RATE_FAST>; |
| 311 | }; |
| 312 | |
| 313 | conf-tx { |
| 314 | pins = "MIO54", "MIO56", "MIO57", "MIO58", "MIO59", |
| 315 | "MIO60", "MIO61", "MIO62", "MIO63"; |
| 316 | bias-disable; |
| 317 | output-enable; |
| 318 | drive-strength = <4>; |
| 319 | slew-rate = <SLEW_RATE_SLOW>; |
| 320 | }; |
| 321 | |
| 322 | mux { |
| 323 | groups = "usb0_0_grp"; |
| 324 | function = "usb0"; |
| 325 | }; |
| 326 | }; |
| 327 | |
| 328 | pinctrl_usb1_default: usb1-default { |
| 329 | conf { |
| 330 | groups = "usb1_0_grp"; |
| 331 | power-source = <IO_STANDARD_LVCMOS18>; |
| 332 | }; |
| 333 | |
| 334 | conf-rx { |
| 335 | pins = "MIO64", "MIO65", "MIO67"; |
| 336 | bias-high-impedance; |
| 337 | drive-strength = <12>; |
| 338 | slew-rate = <SLEW_RATE_FAST>; |
| 339 | }; |
| 340 | |
| 341 | conf-tx { |
| 342 | pins = "MIO66", "MIO68", "MIO69", "MIO70", "MIO71", |
| 343 | "MIO72", "MIO73", "MIO74", "MIO75"; |
| 344 | bias-disable; |
| 345 | output-enable; |
| 346 | drive-strength = <4>; |
| 347 | slew-rate = <SLEW_RATE_SLOW>; |
| 348 | }; |
| 349 | |
| 350 | mux { |
| 351 | groups = "usb1_0_grp"; |
| 352 | function = "usb1"; |
| 353 | }; |
| 354 | }; |
| 355 | }; |
| 356 | |
| 357 | &uart0 { |
| 358 | status = "okay"; |
Manikanta Guntupalli | 62689de | 2024-03-19 12:27:33 +0100 | [diff] [blame] | 359 | rts-gpios = <&gpio 72 GPIO_ACTIVE_HIGH>; |
| 360 | linux,rs485-enabled-at-boot-time; |
Michal Simek | 1e356db | 2023-09-27 11:53:27 +0200 | [diff] [blame] | 361 | pinctrl-names = "default"; |
| 362 | pinctrl-0 = <&pinctrl_uart0_default>; |
| 363 | assigned-clock-rates = <100000000>; |
| 364 | }; |
| 365 | |
| 366 | &uart1 { |
| 367 | status = "okay"; |
| 368 | pinctrl-names = "default"; |
| 369 | pinctrl-0 = <&pinctrl_uart1_default>; |
| 370 | }; |
Michal Simek | e2d3390 | 2024-02-01 13:38:44 +0100 | [diff] [blame] | 371 | |
| 372 | &zynqmp_dpsub { |
| 373 | status = "disabled"; |
| 374 | }; |