rk3399-nanopc-t4.dts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * FriendlyElec NanoPC-T4 board device tree source
  4. *
  5. * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
  6. * (http://www.friendlyarm.com)
  7. *
  8. * Copyright (c) 2018 Collabora Ltd.
  9. */
  10. /dts-v1/;
  11. #include "rk3399-nanopi4.dtsi"
  12. / {
  13. model = "FriendlyElec NanoPC-T4";
  14. compatible = "friendlyarm,nanopc-t4", "rockchip,rk3399";
  15. vcc12v0_sys: vcc12v0-sys {
  16. compatible = "regulator-fixed";
  17. regulator-always-on;
  18. regulator-boot-on;
  19. regulator-max-microvolt = <12000000>;
  20. regulator-min-microvolt = <12000000>;
  21. regulator-name = "vcc12v0_sys";
  22. };
  23. vcc5v0_host0: vcc5v0-host0 {
  24. compatible = "regulator-fixed";
  25. regulator-always-on;
  26. regulator-boot-on;
  27. regulator-name = "vcc5v0_host0";
  28. vin-supply = <&vcc5v0_sys>;
  29. };
  30. adc-keys {
  31. compatible = "adc-keys";
  32. io-channels = <&saradc 1>;
  33. io-channel-names = "buttons";
  34. keyup-threshold-microvolt = <1800000>;
  35. poll-interval = <100>;
  36. button-recovery {
  37. label = "Recovery";
  38. linux,code = <KEY_VENDOR>;
  39. press-threshold-microvolt = <18000>;
  40. };
  41. };
  42. ir-receiver {
  43. compatible = "gpio-ir-receiver";
  44. gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
  45. pinctrl-names = "default";
  46. pinctrl-0 = <&ir_rx>;
  47. };
  48. fan: pwm-fan {
  49. compatible = "pwm-fan";
  50. /*
  51. * With 20KHz PWM and an EVERCOOL EC4007H12SA fan, these levels
  52. * work out to 0, ~1200, ~3000, and 5000RPM respectively.
  53. */
  54. cooling-levels = <0 12 18 255>;
  55. #cooling-cells = <2>;
  56. fan-supply = <&vcc12v0_sys>;
  57. pwms = <&pwm1 0 50000 0>;
  58. };
  59. };
  60. &cpu_thermal {
  61. trips {
  62. cpu_warm: cpu_warm {
  63. temperature = <55000>;
  64. hysteresis = <2000>;
  65. type = "active";
  66. };
  67. cpu_hot: cpu_hot {
  68. temperature = <65000>;
  69. hysteresis = <2000>;
  70. type = "active";
  71. };
  72. };
  73. cooling-maps {
  74. map2 {
  75. trip = <&cpu_warm>;
  76. cooling-device = <&fan THERMAL_NO_LIMIT 1>;
  77. };
  78. map3 {
  79. trip = <&cpu_hot>;
  80. cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
  81. };
  82. };
  83. };
  84. &pcie0 {
  85. ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
  86. num-lanes = <4>;
  87. vpcie3v3-supply = <&vcc3v3_sys>;
  88. };
  89. &pinctrl {
  90. ir {
  91. ir_rx: ir-rx {
  92. /* external pullup to VCC3V3_SYS, despite being 1.8V :/ */
  93. rockchip,pins = <0 RK_PA6 1 &pcfg_pull_none>;
  94. };
  95. };
  96. };
  97. &sdhci {
  98. mmc-hs400-1_8v;
  99. mmc-hs400-enhanced-strobe;
  100. };
  101. &u2phy0_host {
  102. phy-supply = <&vcc5v0_host0>;
  103. };
  104. &u2phy1_host {
  105. phy-supply = <&vcc5v0_host0>;
  106. };
  107. &vcc5v0_sys {
  108. vin-supply = <&vcc12v0_sys>;
  109. };
  110. &vcc3v3_sys {
  111. vin-supply = <&vcc12v0_sys>;
  112. };
  113. &vbus_typec {
  114. enable-active-high;
  115. gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
  116. vin-supply = <&vcc5v0_sys>;
  117. };