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 */ |
| 123 | reg = <8>; |
| 124 | adi,rx-internal-delay-ps = <2000>; |
| 125 | adi,tx-internal-delay-ps = <2000>; |
| 126 | adi,fifo-depth-bits = <8>; |
| 127 | reset-assert-us = <10>; |
| 128 | reset-deassert-us = <5000>; |
| 129 | reset-gpios = <&gpio 77 GPIO_ACTIVE_LOW>; |
| 130 | }; |
| 131 | }; |
| 132 | }; |
| 133 | |
| 134 | /* 2 more ethernet phys u32@2 and u34@3 */ |
| 135 | |
| 136 | &pinctrl0 { /* required by spec */ |
| 137 | status = "okay"; |
| 138 | |
| 139 | pinctrl_can0_default: can0-default { |
| 140 | mux { |
| 141 | function = "can0"; |
| 142 | groups = "can0_16_grp"; |
| 143 | }; |
| 144 | |
| 145 | conf { |
| 146 | groups = "can0_16_grp"; |
| 147 | slew-rate = <SLEW_RATE_SLOW>; |
| 148 | power-source = <IO_STANDARD_LVCMOS18>; |
| 149 | }; |
| 150 | |
| 151 | conf-rx { |
| 152 | pins = "MIO66"; |
| 153 | bias-pull-up; |
| 154 | }; |
| 155 | |
| 156 | conf-tx { |
| 157 | pins = "MIO67"; |
| 158 | bias-pull-up; |
| 159 | drive-strength = <4>; |
| 160 | }; |
| 161 | }; |
| 162 | |
| 163 | pinctrl_uart0_default: uart0-default { |
| 164 | conf { |
| 165 | groups = "uart0_17_grp"; |
| 166 | slew-rate = <SLEW_RATE_SLOW>; |
| 167 | power-source = <IO_STANDARD_LVCMOS18>; |
| 168 | drive-strength = <12>; |
| 169 | }; |
| 170 | |
| 171 | conf-rx { |
| 172 | pins = "MIO70"; |
| 173 | bias-high-impedance; |
| 174 | }; |
| 175 | |
| 176 | conf-tx { |
| 177 | pins = "MIO71"; |
| 178 | bias-disable; |
| 179 | }; |
| 180 | |
| 181 | mux { |
| 182 | groups = "uart0_17_grp"; |
| 183 | function = "uart0"; |
| 184 | }; |
| 185 | }; |
| 186 | |
| 187 | pinctrl_uart1_default: uart1-default { |
| 188 | conf { |
| 189 | groups = "uart1_9_grp"; |
| 190 | slew-rate = <SLEW_RATE_SLOW>; |
| 191 | power-source = <IO_STANDARD_LVCMOS18>; |
| 192 | drive-strength = <12>; |
| 193 | }; |
| 194 | |
| 195 | conf-rx { |
| 196 | pins = "MIO37"; |
| 197 | bias-high-impedance; |
| 198 | }; |
| 199 | |
| 200 | conf-tx { |
| 201 | pins = "MIO36"; |
| 202 | bias-disable; |
| 203 | output-enable; |
| 204 | }; |
| 205 | |
| 206 | mux { |
| 207 | groups = "uart1_9_grp"; |
| 208 | function = "uart1"; |
| 209 | }; |
| 210 | }; |
| 211 | |
| 212 | pinctrl_i2c1_default: i2c1-default { |
| 213 | conf { |
| 214 | groups = "i2c1_6_grp"; |
| 215 | bias-pull-up; |
| 216 | slew-rate = <SLEW_RATE_SLOW>; |
| 217 | power-source = <IO_STANDARD_LVCMOS18>; |
| 218 | }; |
| 219 | |
| 220 | mux { |
| 221 | groups = "i2c1_6_grp"; |
| 222 | function = "i2c1"; |
| 223 | }; |
| 224 | }; |
| 225 | |
| 226 | pinctrl_i2c1_gpio: i2c1-gpio { |
| 227 | conf { |
| 228 | groups = "gpio0_24_grp", "gpio0_25_grp"; |
| 229 | slew-rate = <SLEW_RATE_SLOW>; |
| 230 | power-source = <IO_STANDARD_LVCMOS18>; |
| 231 | }; |
| 232 | |
| 233 | mux { |
| 234 | groups = "gpio0_24_grp", "gpio0_25_grp"; |
| 235 | function = "gpio0"; |
| 236 | }; |
| 237 | }; |
| 238 | |
| 239 | pinctrl_gem1_default: gem1-default { |
| 240 | conf { |
| 241 | groups = "ethernet1_0_grp"; |
| 242 | slew-rate = <SLEW_RATE_SLOW>; |
| 243 | power-source = <IO_STANDARD_LVCMOS18>; |
| 244 | }; |
| 245 | |
| 246 | conf-rx { |
| 247 | pins = "MIO45", "MIO46", "MIO47", "MIO48"; |
| 248 | bias-disable; |
| 249 | low-power-disable; |
| 250 | }; |
| 251 | |
| 252 | conf-bootstrap { |
| 253 | pins = "MIO44", "MIO49"; |
| 254 | bias-disable; |
| 255 | output-enable; |
| 256 | low-power-disable; |
| 257 | }; |
| 258 | |
| 259 | conf-tx { |
| 260 | pins = "MIO38", "MIO39", "MIO40", |
| 261 | "MIO41", "MIO42", "MIO43"; |
| 262 | bias-disable; |
| 263 | output-enable; |
| 264 | low-power-enable; |
| 265 | }; |
| 266 | |
| 267 | conf-mdio { |
| 268 | groups = "mdio1_0_grp"; |
| 269 | slew-rate = <SLEW_RATE_SLOW>; |
| 270 | power-source = <IO_STANDARD_LVCMOS18>; |
| 271 | bias-disable; |
| 272 | output-enable; |
| 273 | }; |
| 274 | |
| 275 | mux-mdio { |
| 276 | function = "mdio1"; |
| 277 | groups = "mdio1_0_grp"; |
| 278 | }; |
| 279 | |
| 280 | mux { |
| 281 | function = "ethernet1"; |
| 282 | groups = "ethernet1_0_grp"; |
| 283 | }; |
| 284 | }; |
| 285 | |
| 286 | pinctrl_usb0_default: usb0-default { |
| 287 | conf { |
| 288 | groups = "usb0_0_grp"; |
| 289 | power-source = <IO_STANDARD_LVCMOS18>; |
| 290 | }; |
| 291 | |
| 292 | conf-rx { |
| 293 | pins = "MIO52", "MIO53", "MIO55"; |
| 294 | bias-high-impedance; |
| 295 | drive-strength = <12>; |
| 296 | slew-rate = <SLEW_RATE_FAST>; |
| 297 | }; |
| 298 | |
| 299 | conf-tx { |
| 300 | pins = "MIO54", "MIO56", "MIO57", "MIO58", "MIO59", |
| 301 | "MIO60", "MIO61", "MIO62", "MIO63"; |
| 302 | bias-disable; |
| 303 | output-enable; |
| 304 | drive-strength = <4>; |
| 305 | slew-rate = <SLEW_RATE_SLOW>; |
| 306 | }; |
| 307 | |
| 308 | mux { |
| 309 | groups = "usb0_0_grp"; |
| 310 | function = "usb0"; |
| 311 | }; |
| 312 | }; |
| 313 | |
| 314 | pinctrl_usb1_default: usb1-default { |
| 315 | conf { |
| 316 | groups = "usb1_0_grp"; |
| 317 | power-source = <IO_STANDARD_LVCMOS18>; |
| 318 | }; |
| 319 | |
| 320 | conf-rx { |
| 321 | pins = "MIO64", "MIO65", "MIO67"; |
| 322 | bias-high-impedance; |
| 323 | drive-strength = <12>; |
| 324 | slew-rate = <SLEW_RATE_FAST>; |
| 325 | }; |
| 326 | |
| 327 | conf-tx { |
| 328 | pins = "MIO66", "MIO68", "MIO69", "MIO70", "MIO71", |
| 329 | "MIO72", "MIO73", "MIO74", "MIO75"; |
| 330 | bias-disable; |
| 331 | output-enable; |
| 332 | drive-strength = <4>; |
| 333 | slew-rate = <SLEW_RATE_SLOW>; |
| 334 | }; |
| 335 | |
| 336 | mux { |
| 337 | groups = "usb1_0_grp"; |
| 338 | function = "usb1"; |
| 339 | }; |
| 340 | }; |
| 341 | }; |
| 342 | |
| 343 | &uart0 { |
| 344 | status = "okay"; |
| 345 | pinctrl-names = "default"; |
| 346 | pinctrl-0 = <&pinctrl_uart0_default>; |
| 347 | assigned-clock-rates = <100000000>; |
| 348 | }; |
| 349 | |
| 350 | &uart1 { |
| 351 | status = "okay"; |
| 352 | pinctrl-names = "default"; |
| 353 | pinctrl-0 = <&pinctrl_uart1_default>; |
| 354 | }; |