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