|
6 | 6 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
7 | 7 | #include <dt-bindings/reset/nvidia,tegra114-car.h> |
8 | 8 | #include <dt-bindings/soc/tegra-pmc.h> |
| 9 | +#include <dt-bindings/thermal/tegra114-soctherm.h> |
9 | 10 |
|
10 | 11 | / { |
11 | 12 | compatible = "nvidia,tegra114"; |
|
751 | 752 | }; |
752 | 753 | }; |
753 | 754 |
|
| 755 | + soctherm: thermal-sensor@700e2000 { |
| 756 | + compatible = "nvidia,tegra114-soctherm"; |
| 757 | + reg = <0x700e2000 0x600>, /* SOC_THERM reg_base */ |
| 758 | + <0x60006000 0x400>; /* CAR reg_base */ |
| 759 | + reg-names = "soctherm-reg", "car-reg"; |
| 760 | + interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>, |
| 761 | + <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>; |
| 762 | + interrupt-names = "thermal", "edp"; |
| 763 | + clocks = <&tegra_car TEGRA114_CLK_TSENSOR>, |
| 764 | + <&tegra_car TEGRA114_CLK_SOC_THERM>; |
| 765 | + clock-names = "tsensor", "soctherm"; |
| 766 | + resets = <&tegra_car 78>; |
| 767 | + reset-names = "soctherm"; |
| 768 | + |
| 769 | + assigned-clocks = <&tegra_car TEGRA114_CLK_TSENSOR>, |
| 770 | + <&tegra_car TEGRA114_CLK_SOC_THERM>; |
| 771 | + assigned-clock-rates = <500000>, <51000000>; |
| 772 | + |
| 773 | + assigned-clock-parents = <&tegra_car TEGRA114_CLK_CLK_M>, |
| 774 | + <&tegra_car TEGRA114_CLK_PLL_P>; |
| 775 | + |
| 776 | + #thermal-sensor-cells = <1>; |
| 777 | + |
| 778 | + throttle-cfgs { |
| 779 | + throttle_heavy: heavy { |
| 780 | + nvidia,priority = <100>; |
| 781 | + nvidia,cpu-throt-percent = <80>; |
| 782 | + nvidia,gpu-throt-level = <TEGRA114_SOCTHERM_THROT_LEVEL_HIGH>; |
| 783 | + #cooling-cells = <2>; |
| 784 | + }; |
| 785 | + |
| 786 | + throttle_light: light { |
| 787 | + nvidia,priority = <80>; |
| 788 | + nvidia,cpu-throt-percent = <50>; |
| 789 | + nvidia,gpu-throt-level = <TEGRA114_SOCTHERM_THROT_LEVEL_MED>; |
| 790 | + #cooling-cells = <2>; |
| 791 | + }; |
| 792 | + }; |
| 793 | + }; |
| 794 | + |
754 | 795 | mipi: mipi@700e3000 { |
755 | 796 | compatible = "nvidia,tegra114-mipi"; |
756 | 797 | reg = <0x700e3000 0x100>; |
|
921 | 962 | clock-names = "cpu_g", "cpu_lp", "pll_x", "pll_p", "dfll"; |
922 | 963 | /* FIXME: what's the actual transition time? */ |
923 | 964 | clock-latency = <300000>; |
| 965 | + #cooling-cells = <2>; |
924 | 966 | }; |
925 | 967 |
|
926 | 968 | cpu1: cpu@1 { |
927 | 969 | device_type = "cpu"; |
928 | 970 | compatible = "arm,cortex-a15"; |
929 | 971 | reg = <1>; |
| 972 | + #cooling-cells = <2>; |
930 | 973 | }; |
931 | 974 |
|
932 | 975 | cpu2: cpu@2 { |
933 | 976 | device_type = "cpu"; |
934 | 977 | compatible = "arm,cortex-a15"; |
935 | 978 | reg = <2>; |
| 979 | + #cooling-cells = <2>; |
936 | 980 | }; |
937 | 981 |
|
938 | 982 | cpu3: cpu@3 { |
939 | 983 | device_type = "cpu"; |
940 | 984 | compatible = "arm,cortex-a15"; |
941 | 985 | reg = <3>; |
| 986 | + #cooling-cells = <2>; |
942 | 987 | }; |
943 | 988 | }; |
944 | 989 |
|
|
951 | 996 | interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; |
952 | 997 | }; |
953 | 998 |
|
| 999 | + thermal-zones { |
| 1000 | + cpu-thermal { |
| 1001 | + polling-delay-passive = <1000>; |
| 1002 | + polling-delay = <1000>; |
| 1003 | + |
| 1004 | + thermal-sensors = |
| 1005 | + <&soctherm TEGRA114_SOCTHERM_SENSOR_CPU>; |
| 1006 | + |
| 1007 | + trips { |
| 1008 | + cpu-shutdown-trip { |
| 1009 | + temperature = <102000>; |
| 1010 | + hysteresis = <0>; |
| 1011 | + type = "critical"; |
| 1012 | + }; |
| 1013 | + |
| 1014 | + cpu_throttle_trip: cpu-throttle-trip { |
| 1015 | + temperature = <100000>; |
| 1016 | + hysteresis = <1000>; |
| 1017 | + type = "hot"; |
| 1018 | + }; |
| 1019 | + |
| 1020 | + cpu_balanced_trip: cpu-balanced-trip { |
| 1021 | + temperature = <90000>; |
| 1022 | + hysteresis = <1000>; |
| 1023 | + type = "passive"; |
| 1024 | + }; |
| 1025 | + }; |
| 1026 | + |
| 1027 | + cooling-maps { |
| 1028 | + map0 { |
| 1029 | + trip = <&cpu_throttle_trip>; |
| 1030 | + cooling-device = <&throttle_heavy 1 1>; |
| 1031 | + }; |
| 1032 | + |
| 1033 | + map1 { |
| 1034 | + trip = <&cpu_balanced_trip>; |
| 1035 | + cooling-device = <&throttle_light 1 1>; |
| 1036 | + }; |
| 1037 | + }; |
| 1038 | + }; |
| 1039 | + |
| 1040 | + mem-thermal { |
| 1041 | + polling-delay-passive = <1000>; |
| 1042 | + polling-delay = <1000>; |
| 1043 | + |
| 1044 | + thermal-sensors = |
| 1045 | + <&soctherm TEGRA114_SOCTHERM_SENSOR_MEM>; |
| 1046 | + |
| 1047 | + trips { |
| 1048 | + mem-shutdown-trip { |
| 1049 | + temperature = <102000>; |
| 1050 | + hysteresis = <0>; |
| 1051 | + type = "critical"; |
| 1052 | + }; |
| 1053 | + |
| 1054 | + mem_throttle_trip: mem-throttle-trip { |
| 1055 | + temperature = <100000>; |
| 1056 | + hysteresis = <1000>; |
| 1057 | + type = "hot"; |
| 1058 | + }; |
| 1059 | + |
| 1060 | + mem_balanced_trip: mem-balanced-trip { |
| 1061 | + temperature = <90000>; |
| 1062 | + hysteresis = <1000>; |
| 1063 | + type = "passive"; |
| 1064 | + }; |
| 1065 | + }; |
| 1066 | + |
| 1067 | + cooling-maps { |
| 1068 | + /* |
| 1069 | + * There are currently no cooling maps, |
| 1070 | + * because there are no cooling devices. |
| 1071 | + */ |
| 1072 | + }; |
| 1073 | + }; |
| 1074 | + |
| 1075 | + gpu-thermal { |
| 1076 | + polling-delay-passive = <1000>; |
| 1077 | + polling-delay = <1000>; |
| 1078 | + |
| 1079 | + thermal-sensors = |
| 1080 | + <&soctherm TEGRA114_SOCTHERM_SENSOR_GPU>; |
| 1081 | + |
| 1082 | + trips { |
| 1083 | + gpu-shutdown-trip { |
| 1084 | + temperature = <102000>; |
| 1085 | + hysteresis = <0>; |
| 1086 | + type = "critical"; |
| 1087 | + }; |
| 1088 | + |
| 1089 | + gpu_throttle_trip: gpu-throttle-trip { |
| 1090 | + temperature = <100000>; |
| 1091 | + hysteresis = <1000>; |
| 1092 | + type = "hot"; |
| 1093 | + }; |
| 1094 | + |
| 1095 | + gpu_balanced_trip: gpu-balanced-trip { |
| 1096 | + temperature = <90000>; |
| 1097 | + hysteresis = <1000>; |
| 1098 | + type = "passive"; |
| 1099 | + }; |
| 1100 | + }; |
| 1101 | + |
| 1102 | + cooling-maps { |
| 1103 | + map0 { |
| 1104 | + trip = <&gpu_throttle_trip>; |
| 1105 | + cooling-device = <&throttle_heavy 1 1>; |
| 1106 | + }; |
| 1107 | + |
| 1108 | + map1 { |
| 1109 | + trip = <&gpu_balanced_trip>; |
| 1110 | + cooling-device = <&throttle_light 1 1>; |
| 1111 | + }; |
| 1112 | + }; |
| 1113 | + }; |
| 1114 | + |
| 1115 | + pllx-thermal { |
| 1116 | + polling-delay-passive = <1000>; |
| 1117 | + polling-delay = <1000>; |
| 1118 | + |
| 1119 | + thermal-sensors = |
| 1120 | + <&soctherm TEGRA114_SOCTHERM_SENSOR_PLLX>; |
| 1121 | + |
| 1122 | + trips { |
| 1123 | + pllx-shutdown-trip { |
| 1124 | + temperature = <102000>; |
| 1125 | + hysteresis = <0>; |
| 1126 | + type = "critical"; |
| 1127 | + }; |
| 1128 | + |
| 1129 | + pllx_throttle_trip: pllx-throttle-trip { |
| 1130 | + temperature = <100000>; |
| 1131 | + hysteresis = <1000>; |
| 1132 | + type = "hot"; |
| 1133 | + }; |
| 1134 | + |
| 1135 | + pllx_balanced_trip: pllx-balanced-trip { |
| 1136 | + temperature = <90000>; |
| 1137 | + hysteresis = <1000>; |
| 1138 | + type = "passive"; |
| 1139 | + }; |
| 1140 | + }; |
| 1141 | + |
| 1142 | + cooling-maps { |
| 1143 | + /* |
| 1144 | + * There are currently no cooling maps, |
| 1145 | + * because there are no cooling devices. |
| 1146 | + */ |
| 1147 | + }; |
| 1148 | + }; |
| 1149 | + }; |
| 1150 | + |
954 | 1151 | timer { |
955 | 1152 | compatible = "arm,armv7-timer"; |
956 | 1153 | interrupts = |
|
0 commit comments