1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Device Tree file for Lenovo Hr855xg2 platform 4 * 5 * Copyright (C) 2019-present Lenovo 6 */ 7 8/dts-v1/; 9 10#include "aspeed-g5.dtsi" 11#include <dt-bindings/gpio/aspeed-gpio.h> 12 13/ { 14 model = "HR855XG2 BMC"; 15 compatible = "lenovo,hr855xg2-bmc", "aspeed,ast2500"; 16 17 aliases { 18 i2c14 = &i2c_riser1; 19 i2c15 = &i2c_riser2; 20 i2c16 = &i2c_riser3; 21 i2c17 = &i2c_M2; 22 i2c18 = &channel_0; 23 i2c19 = &channel_1; 24 i2c20 = &channel_2; 25 i2c21 = &channel_3; 26 }; 27 28 chosen { 29 stdout-path = &uart5; 30 bootargs = "console=tty0 console=ttyS4,115200 earlyprintk"; 31 }; 32 33 memory@80000000 { 34 device_type = "memory"; 35 reg = <0x80000000 0x20000000>; 36 }; 37 38 reserved-memory { 39 #address-cells = <1>; 40 #size-cells = <1>; 41 ranges; 42 43 flash_memory: region@98000000 { 44 no-map; 45 reg = <0x98000000 0x00100000>; /* 1M */ 46 }; 47 48 gfx_memory: framebuffer { 49 size = <0x01000000>; 50 alignment = <0x01000000>; 51 compatible = "shared-dma-pool"; 52 reusable; 53 }; 54 }; 55 56 leds { 57 compatible = "gpio-leds"; 58 59 heartbeat { 60 gpios = <&gpio ASPEED_GPIO(C, 7) GPIO_ACTIVE_LOW>; 61 }; 62 63 fault { 64 gpios = <&gpio ASPEED_GPIO(G, 3) GPIO_ACTIVE_LOW>; 65 }; 66 }; 67 68 iio-hwmon { 69 compatible = "iio-hwmon"; 70 io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, 71 <&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>, 72 <&adc 8>, <&adc 9>, <&adc 10>,<&adc 11>, 73 <&adc 12>,<&adc 13>,<&adc 14>; 74 }; 75 76 iio-hwmon-battery { 77 compatible = "iio-hwmon"; 78 io-channels = <&adc 15>; 79 }; 80 81}; 82 83&fmc { 84 status = "okay"; 85 flash@0 { 86 status = "okay"; 87 m25p,fast-read; 88 label = "bmc"; 89 spi-max-frequency = <50000000>; 90#include "openbmc-flash-layout.dtsi" 91 }; 92}; 93 94&lpc_ctrl { 95 status = "okay"; 96 memory-region = <&flash_memory>; 97 flash = <&spi1>; 98}; 99 100&lpc_snoop { 101 status = "okay"; 102 snoop-ports = <0x80>; 103}; 104 105&uart1 { 106 status = "okay"; 107 pinctrl-names = "default"; 108 pinctrl-0 = <&pinctrl_txd1_default 109 &pinctrl_rxd1_default>; 110}; 111 112&uart2 { 113 /* Rear RS-232 connector */ 114 status = "okay"; 115 pinctrl-names = "default"; 116 pinctrl-0 = <&pinctrl_txd2_default 117 &pinctrl_rxd2_default 118 &pinctrl_nrts2_default 119 &pinctrl_ndtr2_default 120 &pinctrl_ndsr2_default 121 &pinctrl_ncts2_default 122 &pinctrl_ndcd2_default 123 &pinctrl_nri2_default>; 124}; 125 126&uart3 { 127 status = "okay"; 128}; 129 130&uart5 { 131 status = "okay"; 132}; 133 134&ibt { 135 status = "okay"; 136}; 137 138&mac0 { 139 status = "okay"; 140 pinctrl-names = "default"; 141 pinctrl-0 = <&pinctrl_rmii1_default>; 142 use-ncsi; 143}; 144 145&mac1 { 146 status = "okay"; 147 pinctrl-names = "default"; 148 pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>; 149}; 150 151&adc{ 152 status = "okay"; 153 pinctrl-names = "default"; 154 pinctrl-0 = <&pinctrl_adc0_default 155 &pinctrl_adc1_default 156 &pinctrl_adc2_default 157 &pinctrl_adc3_default 158 &pinctrl_adc4_default 159 &pinctrl_adc5_default 160 &pinctrl_adc6_default 161 &pinctrl_adc7_default 162 &pinctrl_adc8_default 163 &pinctrl_adc9_default 164 &pinctrl_adc10_default 165 &pinctrl_adc11_default 166 &pinctrl_adc12_default 167 &pinctrl_adc13_default 168 &pinctrl_adc14_default 169 &pinctrl_adc15_default>; 170}; 171 172&i2c0 { 173 status = "okay"; 174 175 i2c-switch@70 { 176 compatible = "nxp,pca9545"; 177 reg = <0x70>; 178 #address-cells = <1>; 179 #size-cells = <0>; 180 181 i2c_riser1: i2c@0 { 182 #address-cells = <1>; 183 #size-cells = <0>; 184 reg = <0>; 185 }; 186 187 i2c_riser2: i2c@1 { 188 #address-cells = <1>; 189 #size-cells = <0>; 190 reg = <1>; 191 }; 192 193 i2c_riser3: i2c@2 { 194 #address-cells = <1>; 195 #size-cells = <0>; 196 reg = <2>; 197 }; 198 199 i2c_M2: i2c@3 { 200 #address-cells = <1>; 201 #size-cells = <0>; 202 reg = <3>; 203 }; 204 }; 205}; 206 207&i2c1 { 208 status = "okay"; 209 bus-frequency = <90000>; 210 HotSwap@10 { 211 compatible = "adm1272"; 212 reg = <0x10>; 213 }; 214 215 VR@45 { 216 compatible = "pmbus"; 217 reg = <0x45>; 218 }; 219}; 220 221&i2c2 { 222 status = "okay"; 223}; 224 225&i2c3 { 226 status = "okay"; 227 i2c-switch@70 { 228 compatible = "nxp,pca9546"; 229 reg = <0x70>; 230 #address-cells = <1>; 231 #size-cells = <0>; 232 233 channel_0: i2c@0 { 234 #address-cells = <1>; 235 #size-cells = <0>; 236 reg = <0>; 237 }; 238 239 channel_1: i2c@1 { 240 #address-cells = <1>; 241 #size-cells = <0>; 242 reg = <1>; 243 }; 244 245 channel_2: i2c@2 { 246 #address-cells = <1>; 247 #size-cells = <0>; 248 reg = <2>; 249 }; 250 251 channel_3: i2c@3 { 252 #address-cells = <1>; 253 #size-cells = <0>; 254 reg = <3>; 255 }; 256 }; 257}; 258 259&i2c4 { 260 status = "okay"; 261}; 262 263&i2c5 { 264 status = "okay"; 265}; 266 267&i2c6 { 268 status = "okay"; 269 /* temp1 */ 270 tmp75@49 { 271 compatible = "national,lm75"; 272 reg = <0x49>; 273 }; 274 275 /* temp2 */ 276 tmp75@4d { 277 compatible = "national,lm75"; 278 reg = <0x4d>; 279 }; 280 281 eeprom@54 { 282 compatible = "atmel,24c256"; 283 reg = <0x54>; 284 pagesize = <16>; 285 }; 286}; 287 288&i2c7 { 289 status = "okay"; 290}; 291 292&i2c8 { 293 status = "okay"; 294}; 295 296&i2c9 { 297 status = "okay"; 298}; 299 300&i2c10 { 301 status = "okay"; 302}; 303 304&i2c11 { 305 status = "okay"; 306}; 307 308&i2c13 { 309 status = "okay"; 310}; 311 312&ehci1 { 313 status = "okay"; 314}; 315 316&uhci { 317 status = "okay"; 318}; 319 320&gfx { 321 status = "okay"; 322 memory-region = <&gfx_memory>; 323}; 324 325&pwm_tacho { 326 status = "okay"; 327 pinctrl-names = "default"; 328 pinctrl-0 = <&pinctrl_pwm0_default 329 &pinctrl_pwm1_default 330 &pinctrl_pwm2_default 331 &pinctrl_pwm3_default 332 &pinctrl_pwm4_default 333 &pinctrl_pwm5_default 334 &pinctrl_pwm6_default 335 &pinctrl_pwm7_default>; 336 337 fan@0 { 338 reg = <0x00>; 339 aspeed,fan-tach-ch = /bits/ 8 <0x00>; 340 }; 341 342 fan@1 { 343 reg = <0x00>; 344 aspeed,fan-tach-ch = /bits/ 8 <0x01>; 345 }; 346 347 fan@2 { 348 reg = <0x01>; 349 aspeed,fan-tach-ch = /bits/ 8 <0x02>; 350 }; 351 352 fan@3 { 353 reg = <0x01>; 354 aspeed,fan-tach-ch = /bits/ 8 <0x03>; 355 }; 356 357 fan@4 { 358 reg = <0x02>; 359 aspeed,fan-tach-ch = /bits/ 8 <0x04>; 360 }; 361 362 fan@5 { 363 reg = <0x02>; 364 aspeed,fan-tach-ch = /bits/ 8 <0x05>; 365 }; 366 367 fan@6 { 368 reg = <0x03>; 369 aspeed,fan-tach-ch = /bits/ 8 <0x06>; 370 }; 371 372 fan@7 { 373 reg = <0x03>; 374 aspeed,fan-tach-ch = /bits/ 8 <0x07>; 375 }; 376 377 fan@8 { 378 reg = <0x04>; 379 aspeed,fan-tach-ch = /bits/ 8 <0x08>; 380 }; 381 382 fan@9 { 383 reg = <0x04>; 384 aspeed,fan-tach-ch = /bits/ 8 <0x09>; 385 }; 386 387 fan@10 { 388 reg = <0x05>; 389 aspeed,fan-tach-ch = /bits/ 8 <0x0a>; 390 }; 391 392 fan@11 { 393 reg = <0x05>; 394 aspeed,fan-tach-ch = /bits/ 8 <0x0b>; 395 }; 396 397 fan@12 { 398 reg = <0x06>; 399 aspeed,fan-tach-ch = /bits/ 8 <0x0c>; 400 }; 401 402 fan@13 { 403 reg = <0x06>; 404 aspeed,fan-tach-ch = /bits/ 8 <0x0d>; 405 }; 406 407 fan@14 { 408 reg = <0x07>; 409 aspeed,fan-tach-ch = /bits/ 8 <0x0e>; 410 }; 411 412 fan@15 { 413 reg = <0x07>; 414 aspeed,fan-tach-ch = /bits/ 8 <0x0f>; 415 }; 416 417 fan@16 { 418 reg = <0x07>; 419 aspeed,fan-tach-ch = /bits/ 8 <0x0f>; 420 }; 421}; 422 423&gpio { 424 425 pin_gpio_a1 { 426 gpio-hog; 427 gpios = <ASPEED_GPIO(A, 1) GPIO_ACTIVE_LOW>; 428 output-high; 429 line-name = "BMC_EMMC_RST_N"; 430 }; 431 432 pin_gpio_a3 { 433 gpio-hog; 434 gpios = <ASPEED_GPIO(A, 3) GPIO_ACTIVE_LOW>; 435 output-high; 436 line-name = "PCH_PWROK_BMC_FPGA"; 437 }; 438 439 pin_gpio_b5 { 440 gpio-hog; 441 gpios = <ASPEED_GPIO(B, 5) GPIO_ACTIVE_HIGH>; 442 output-high; 443 line-name = "IRQ_BMC_PCH_SMI_LPC_N"; 444 }; 445 446 pin_gpio_b7 { 447 gpio-hog; 448 gpios = <ASPEED_GPIO(B, 7) GPIO_ACTIVE_LOW>; 449 output-low; 450 line-name = "CPU_SM_WP"; 451 }; 452 453 pin_gpio_e0 { 454 gpio-hog; 455 gpios = <ASPEED_GPIO(E, 0) GPIO_ACTIVE_HIGH>; 456 input; 457 line-name = "PDB_PSU_SEL"; 458 }; 459 460 pin_gpio_e2 { 461 gpio-hog; 462 gpios = <ASPEED_GPIO(E, 2) GPIO_ACTIVE_HIGH>; 463 output-high; 464 line-name = "LOCATOR_LED_N"; 465 }; 466 467 pin_gpio_e5 { 468 gpio-hog; 469 gpios = <ASPEED_GPIO(E, 5) GPIO_ACTIVE_HIGH>; 470 output-high; 471 line-name = "FM_BMC_DBP_PRESENT_R1_N"; 472 }; 473 474 pin_gpio_e6 { 475 gpio-hog; 476 gpios = <ASPEED_GPIO(E, 6) GPIO_ACTIVE_HIGH>; 477 output-high; 478 line-name = "BMC_ME_SECURITY_OVERRIDE_N"; 479 }; 480 481 pin_gpio_f0 { 482 gpio-hog; 483 gpios = <ASPEED_GPIO(F, 0) GPIO_ACTIVE_HIGH>; 484 output-high; 485 line-name = "IRQ_BMC_PCH_NMI_R"; 486 }; 487 488 pin_gpio_f1 { 489 gpio-hog; 490 gpios = <ASPEED_GPIO(F, 1) GPIO_ACTIVE_HIGH>; 491 input; 492 line-name = "CPU2_PROCDIS_BMC_N"; 493 }; 494 495 pin_gpio_f2 { 496 gpio-hog; 497 gpios = <ASPEED_GPIO(F, 2) GPIO_ACTIVE_HIGH>; 498 output-high; 499 line-name = "RM_THROTTLE_EN_N"; 500 }; 501 502 pin_gpio_f3 { 503 gpio-hog; 504 gpios = <ASPEED_GPIO(F, 3) GPIO_ACTIVE_HIGH>; 505 output-low; 506 line-name = "FM_PMBUS_ALERT_B_EN"; 507 }; 508 509 pin_gpio_f4 { 510 gpio-hog; 511 gpios = <ASPEED_GPIO(F, 4) GPIO_ACTIVE_HIGH>; 512 output-high; 513 line-name = "BMC_FORCE_NM_THROTTLE_N"; 514 }; 515 516 pin_gpio_f6 { 517 gpio-hog; 518 gpios = <ASPEED_GPIO(F, 6) GPIO_ACTIVE_HIGH>; 519 output-high; 520 line-name = "FM_BMC_CPU_PWR_DEBUG_N"; 521 }; 522 523 pin_gpio_g7 { 524 gpio-hog; 525 gpios = <ASPEED_GPIO(G, 7) GPIO_ACTIVE_HIGH>; 526 output-high; 527 line-name = "BMC_PCIE_I2C_MUX_RST_N"; 528 }; 529 530 pin_gpio_h6 { 531 gpio-hog; 532 gpios = <ASPEED_GPIO(H, 6) GPIO_ACTIVE_HIGH>; 533 output-high; 534 line-name = "FM_BMC_DBP_PRESENT_R2_N"; 535 }; 536 537 pin_gpio_i3 { 538 gpio-hog; 539 gpios = <ASPEED_GPIO(I, 3) GPIO_ACTIVE_HIGH>; 540 output-high; 541 line-name = "SPI_BMC_BIOS_WP_N"; 542 }; 543 544 pin_gpio_j1 { 545 gpio-hog; 546 gpios = <ASPEED_GPIO(J, 1) GPIO_ACTIVE_HIGH>; 547 output-high; 548 line-name = "BMC_USB_SEL"; 549 }; 550 551 pin_gpio_j2 { 552 gpio-hog; 553 gpios = <ASPEED_GPIO(J, 2) GPIO_ACTIVE_HIGH>; 554 output-high; 555 line-name = "PDB_SMB_RST_N"; 556 }; 557 558 pin_gpio_j3 { 559 gpio-hog; 560 gpios = <ASPEED_GPIO(J, 3) GPIO_ACTIVE_HIGH>; 561 output-high; 562 line-name = "SPI_BMC_BIOS_HOLD_N"; 563 }; 564 565 pin_gpio_l0 { 566 gpio-hog; 567 gpios = <ASPEED_GPIO(L, 0) GPIO_ACTIVE_HIGH>; 568 output-high; 569 line-name = "PDB_FAN_TACH_SEL"; 570 }; 571 572 pin_gpio_l1 { 573 gpio-hog; 574 gpios = <ASPEED_GPIO(L, 1) GPIO_ACTIVE_HIGH>; 575 output-high; 576 line-name = "SYS_RESET_BMC_FPGA_N"; 577 }; 578 579 pin_gpio_l4 { 580 gpio-hog; 581 gpios = <ASPEED_GPIO(L, 4) GPIO_ACTIVE_HIGH>; 582 output-high; 583 line-name = "FM_EFUSE_FAN_G1_EN"; 584 }; 585 586 pin_gpio_l5 { 587 gpio-hog; 588 gpios = <ASPEED_GPIO(L, 5) GPIO_ACTIVE_HIGH>; 589 output-high; 590 line-name = "FM_EFUSE_FAN_G2_EN"; 591 }; 592 593 pin_gpio_r6 { 594 gpio-hog; 595 gpios = <ASPEED_GPIO(R, 6) GPIO_ACTIVE_HIGH>; 596 input; 597 line-name = "CPU3_PROCDIS_BMC_N"; 598 }; 599 600 pin_gpio_r7 { 601 gpio-hog; 602 gpios = <ASPEED_GPIO(R, 7) GPIO_ACTIVE_HIGH>; 603 input; 604 line-name = "CPU4_PROCDIS_BMC_N"; 605 }; 606 607 pin_gpio_s1 { 608 gpio-hog; 609 gpios = <ASPEED_GPIO(S, 1) GPIO_ACTIVE_HIGH>; 610 output-low; 611 line-name = "DBP_SYSPWROK_BMC"; 612 }; 613 614 pin_gpio_s2 { 615 gpio-hog; 616 gpios = <ASPEED_GPIO(S, 2) GPIO_ACTIVE_HIGH>; 617 output-high; 618 line-name = "PCH_RST_RSMRST_N"; 619 }; 620 621 pin_gpio_s6 { 622 gpio-hog; 623 gpios = <ASPEED_GPIO(S, 6) GPIO_ACTIVE_HIGH>; 624 output-high; 625 line-name = "BMC_HW_STRAP_5"; 626 }; 627 628 pin_gpio_z3 { 629 gpio-hog; 630 gpios = <ASPEED_GPIO(Z, 3) GPIO_ACTIVE_HIGH>; 631 output-high; 632 line-name = "FM_BMC_PCH_SCI_LPC_N"; 633 }; 634 635 pin_gpio_aa0 { 636 gpio-hog; 637 gpios = <ASPEED_GPIO(AA, 0) GPIO_ACTIVE_HIGH>; 638 output-low; 639 line-name = "FW_PSU_ALERT_EN_N"; 640 }; 641 642 pin_gpio_aa4 { 643 gpio-hog; 644 gpios = <ASPEED_GPIO(AA, 4) GPIO_ACTIVE_HIGH>; 645 output-high; 646 line-name = "DBP_CPU_PREQ_N"; 647 }; 648 649 pin_gpio_ab3 { 650 gpio-hog; 651 gpios = <ASPEED_GPIO(AB, 3) GPIO_ACTIVE_HIGH>; 652 output-low; 653 line-name = "BMC_WDTRST"; 654 }; 655 656 pin_gpio_ac6 { 657 gpio-hog; 658 gpios = <ASPEED_GPIO(AC, 6) GPIO_ACTIVE_HIGH>; 659 output-high; 660 line-name = "ESPI_BMC_ALERT_N"; 661 }; 662 663}; 664