0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * FriendlyElec NanoPC-T4 board device tree source
0004 *
0005 * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
0006 * (http://www.friendlyarm.com)
0007 *
0008 * Copyright (c) 2018 Collabora Ltd.
0009 */
0010
0011 /dts-v1/;
0012 #include "rk3399-nanopi4.dtsi"
0013
0014 / {
0015 model = "FriendlyElec NanoPC-T4";
0016 compatible = "friendlyarm,nanopc-t4", "rockchip,rk3399";
0017
0018 vcc12v0_sys: vcc12v0-sys {
0019 compatible = "regulator-fixed";
0020 regulator-always-on;
0021 regulator-boot-on;
0022 regulator-max-microvolt = <12000000>;
0023 regulator-min-microvolt = <12000000>;
0024 regulator-name = "vcc12v0_sys";
0025 };
0026
0027 vcc5v0_host0: vcc5v0-host0 {
0028 compatible = "regulator-fixed";
0029 regulator-always-on;
0030 regulator-boot-on;
0031 regulator-name = "vcc5v0_host0";
0032 vin-supply = <&vcc5v0_sys>;
0033 };
0034
0035 adc-keys {
0036 compatible = "adc-keys";
0037 io-channels = <&saradc 1>;
0038 io-channel-names = "buttons";
0039 keyup-threshold-microvolt = <1800000>;
0040 poll-interval = <100>;
0041
0042 recovery {
0043 label = "Recovery";
0044 linux,code = <KEY_VENDOR>;
0045 press-threshold-microvolt = <18000>;
0046 };
0047 };
0048
0049 ir-receiver {
0050 compatible = "gpio-ir-receiver";
0051 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
0052 pinctrl-names = "default";
0053 pinctrl-0 = <&ir_rx>;
0054 };
0055
0056 fan: pwm-fan {
0057 compatible = "pwm-fan";
0058 /*
0059 * With 20KHz PWM and an EVERCOOL EC4007H12SA fan, these levels
0060 * work out to 0, ~1200, ~3000, and 5000RPM respectively.
0061 */
0062 cooling-levels = <0 12 18 255>;
0063 #cooling-cells = <2>;
0064 fan-supply = <&vcc12v0_sys>;
0065 pwms = <&pwm1 0 50000 0>;
0066 };
0067 };
0068
0069 &cpu_thermal {
0070 trips {
0071 cpu_warm: cpu_warm {
0072 temperature = <55000>;
0073 hysteresis = <2000>;
0074 type = "active";
0075 };
0076
0077 cpu_hot: cpu_hot {
0078 temperature = <65000>;
0079 hysteresis = <2000>;
0080 type = "active";
0081 };
0082 };
0083
0084 cooling-maps {
0085 map2 {
0086 trip = <&cpu_warm>;
0087 cooling-device = <&fan THERMAL_NO_LIMIT 1>;
0088 };
0089
0090 map3 {
0091 trip = <&cpu_hot>;
0092 cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
0093 };
0094 };
0095 };
0096
0097 &pcie0 {
0098 ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
0099 num-lanes = <4>;
0100 vpcie3v3-supply = <&vcc3v3_sys>;
0101 };
0102
0103 &pinctrl {
0104 ir {
0105 ir_rx: ir-rx {
0106 /* external pullup to VCC3V3_SYS, despite being 1.8V :/ */
0107 rockchip,pins = <0 RK_PA6 1 &pcfg_pull_none>;
0108 };
0109 };
0110 };
0111
0112 &sdhci {
0113 mmc-hs400-1_8v;
0114 mmc-hs400-enhanced-strobe;
0115 };
0116
0117 &u2phy0_host {
0118 phy-supply = <&vcc5v0_host0>;
0119 };
0120
0121 &u2phy1_host {
0122 phy-supply = <&vcc5v0_host0>;
0123 };
0124
0125 &vcc5v0_sys {
0126 vin-supply = <&vcc12v0_sys>;
0127 };
0128
0129 &vcc3v3_sys {
0130 vin-supply = <&vcc12v0_sys>;
0131 };
0132
0133 &vbus_typec {
0134 enable-active-high;
0135 gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
0136 vin-supply = <&vcc5v0_sys>;
0137 };