diff --git a/arch/arm/boot/dts/amlogic/mesonsm1.dtsi b/arch/arm/boot/dts/amlogic/mesonsm1.dtsi index d1f63cda9076..dff93695761d 100644 --- a/arch/arm/boot/dts/amlogic/mesonsm1.dtsi +++ b/arch/arm/boot/dts/amlogic/mesonsm1.dtsi @@ -477,42 +477,6 @@ reg = <0xff809000 0x48>; }; - p_tsensor: p_tsensor@ff634594 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0xff634800 0x50>, - <0xff800268 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff800228 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0xff634c00 0x50>, - <0xff800230 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - power_ctrl: power_ctrl@ff8000e8 { compatible = "amlogic, sm1-powerctrl"; reg = <0xff8000e8 0x10>, @@ -1549,140 +1513,6 @@ /*partions defined in dts */ }; - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <115>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <358>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1460>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1460>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - /* Sound iomap */ aml_snd_iomap { compatible = "amlogic, snd-iomap"; diff --git a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts index 25fb8ba1c2c5..58a1b6f43b60 100644 --- a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts +++ b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts @@ -719,6 +719,176 @@ }; /* Audio Related end */ + p_tsensor: p_tsensor@ff634800 { + compatible = "amlogic, r1p1-tsensor"; + device_name = "meson-pthermal"; + status = "okay"; + reg = <0xff634800 0x50>, + <0xff800268 0x4>; + cal_type = <0x1>; + cal_a = <324>; + cal_b = <424>; + cal_c = <3159>; + cal_d = <9411>; + rtemp = <115000>; + interrupts = <0 35 0>; + clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ + clock-names = "ts_comp"; + #thermal-sensor-cells = <1>; + }; + + d_tsensor: d_tsensor@ff634c00 { + compatible = "amlogic, r1p1-tsensor"; + device_name = "meson-dthermal"; + status = "okay"; + reg = <0xff634c00 0x50>, + <0xff800230 0x4>; + cal_type = <0x1>; + cal_a = <324>; + cal_b = <424>; + cal_c = <3159>; + cal_d = <9411>; + rtemp = <115000>; + interrupts = <0 36 0>; + clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ + clock-names = "ts_comp"; + #thermal-sensor-cells = <1>; + }; + + meson_cooldev: meson-cooldev@0 { + status = "okay"; + compatible = "amlogic, meson-cooldev"; + device_name = "mcooldev"; + cooling_devices { + cpufreq_cool_cluster0 { + min_state = <1000000>; + dyn_coeff = <115>; + cluster_id = <0>; + node_name = "cpufreq_cool0"; + device_type = "cpufreq"; + }; + cpucore_cool_cluster0 { + min_state = <1>; + dyn_coeff = <0>; + cluster_id = <0>; + node_name = "cpucore_cool0"; + device_type = "cpucore"; + }; + gpufreq_cool { + min_state = <400>; + dyn_coeff = <358>; + gpu_pp = <2>; + cluster_id = <0>; + node_name = "gpufreq_cool0"; + device_type = "gpufreq"; + }; + gpucore_cool { + min_state = <1>; + dyn_coeff = <0>; + cluster_id = <0>; + node_name = "gpucore_cool0"; + device_type = "gpucore"; + }; + }; + cpufreq_cool0:cpufreq_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + cpucore_cool0:cpucore_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + gpufreq_cool0:gpufreq_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + gpucore_cool0:gpucore_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + }; + /*meson cooling devices end*/ + + thermal-zones { + soc_thermal: soc_thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + sustainable-power = <1460>; + thermal-sensors = <&p_tsensor 0>; + trips { + pswitch_on: trip-point@0 { + temperature = <60000>; + hysteresis = <5000>; + type = "passive"; + }; + pcontrol: trip-point@1 { + temperature = <75000>; + hysteresis = <5000>; + type = "passive"; + }; + phot: trip-point@2 { + temperature = <85000>; + hysteresis = <5000>; + type = "hot"; + }; + pcritical: trip-point@3 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + cpufreq_cooling_map { + trip = <&pcontrol>; + cooling-device = <&cpufreq_cool0 0 4>; + contribution = <1024>; + }; + cpucore_cooling_map { + trip = <&pcontrol>; + cooling-device = <&cpucore_cool0 0 3>; + contribution = <1024>; + }; + gpufreq_cooling_map { + trip = <&pcontrol>; + cooling-device = <&gpufreq_cool0 0 4>; + contribution = <1024>; + }; + gpucore_cooling_map { + trip = <&pcontrol>; + cooling-device = <&gpucore_cool0 0 2>; + contribution = <1024>; + }; + }; + }; + ddr_thermal: ddr_thermal { + polling-delay = <2000>; + polling-delay-passive = <1000>; + sustainable-power = <1460>; + thermal-sensors = <&d_tsensor 1>; + trips { + dswitch_on: trip-point@0 { + temperature = <60000>; + hysteresis = <5000>; + type = "passive"; + }; + dcontrol: trip-point@1 { + temperature = <75000>; + hysteresis = <5000>; + type = "passive"; + }; + dhot: trip-point@2 { + temperature = <85000>; + hysteresis = <5000>; + type = "hot"; + }; + dcritical: trip-point@3 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + }; + }; + /*thermal zone end*/ + cpu_opp_table0: cpu_opp_table0 { compatible = "operating-points-v2"; opp-shared; diff --git a/arch/arm/boot/dts/amlogic/sm1_s905d3_skt.dts b/arch/arm/boot/dts/amlogic/sm1_s905d3_skt.dts index f0ab6f573eed..972eaa9bec25 100644 --- a/arch/arm/boot/dts/amlogic/sm1_s905d3_skt.dts +++ b/arch/arm/boot/dts/amlogic/sm1_s905d3_skt.dts @@ -719,6 +719,176 @@ }; /* Audio Related end */ + p_tsensor: p_tsensor@ff634800 { + compatible = "amlogic, r1p1-tsensor"; + device_name = "meson-pthermal"; + status = "okay"; + reg = <0xff634800 0x50>, + <0xff800268 0x4>; + cal_type = <0x1>; + cal_a = <324>; + cal_b = <424>; + cal_c = <3159>; + cal_d = <9411>; + rtemp = <115000>; + interrupts = <0 35 0>; + clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ + clock-names = "ts_comp"; + #thermal-sensor-cells = <1>; + }; + + d_tsensor: d_tsensor@ff634c00 { + compatible = "amlogic, r1p1-tsensor"; + device_name = "meson-dthermal"; + status = "okay"; + reg = <0xff634c00 0x50>, + <0xff800230 0x4>; + cal_type = <0x1>; + cal_a = <324>; + cal_b = <424>; + cal_c = <3159>; + cal_d = <9411>; + rtemp = <115000>; + interrupts = <0 36 0>; + clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ + clock-names = "ts_comp"; + #thermal-sensor-cells = <1>; + }; + + meson_cooldev: meson-cooldev@0 { + status = "okay"; + compatible = "amlogic, meson-cooldev"; + device_name = "mcooldev"; + cooling_devices { + cpufreq_cool_cluster0 { + min_state = <1000000>; + dyn_coeff = <115>; + cluster_id = <0>; + node_name = "cpufreq_cool0"; + device_type = "cpufreq"; + }; + cpucore_cool_cluster0 { + min_state = <1>; + dyn_coeff = <0>; + cluster_id = <0>; + node_name = "cpucore_cool0"; + device_type = "cpucore"; + }; + gpufreq_cool { + min_state = <400>; + dyn_coeff = <358>; + gpu_pp = <2>; + cluster_id = <0>; + node_name = "gpufreq_cool0"; + device_type = "gpufreq"; + }; + gpucore_cool { + min_state = <1>; + dyn_coeff = <0>; + cluster_id = <0>; + node_name = "gpucore_cool0"; + device_type = "gpucore"; + }; + }; + cpufreq_cool0:cpufreq_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + cpucore_cool0:cpucore_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + gpufreq_cool0:gpufreq_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + gpucore_cool0:gpucore_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + }; + /*meson cooling devices end*/ + + thermal-zones { + soc_thermal: soc_thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + sustainable-power = <1460>; + thermal-sensors = <&p_tsensor 0>; + trips { + pswitch_on: trip-point@0 { + temperature = <60000>; + hysteresis = <5000>; + type = "passive"; + }; + pcontrol: trip-point@1 { + temperature = <75000>; + hysteresis = <5000>; + type = "passive"; + }; + phot: trip-point@2 { + temperature = <85000>; + hysteresis = <5000>; + type = "hot"; + }; + pcritical: trip-point@3 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + cpufreq_cooling_map { + trip = <&pcontrol>; + cooling-device = <&cpufreq_cool0 0 4>; + contribution = <1024>; + }; + cpucore_cooling_map { + trip = <&pcontrol>; + cooling-device = <&cpucore_cool0 0 3>; + contribution = <1024>; + }; + gpufreq_cooling_map { + trip = <&pcontrol>; + cooling-device = <&gpufreq_cool0 0 4>; + contribution = <1024>; + }; + gpucore_cooling_map { + trip = <&pcontrol>; + cooling-device = <&gpucore_cool0 0 2>; + contribution = <1024>; + }; + }; + }; + ddr_thermal: ddr_thermal { + polling-delay = <2000>; + polling-delay-passive = <1000>; + sustainable-power = <1460>; + thermal-sensors = <&d_tsensor 1>; + trips { + dswitch_on: trip-point@0 { + temperature = <60000>; + hysteresis = <5000>; + type = "passive"; + }; + dcontrol: trip-point@1 { + temperature = <75000>; + hysteresis = <5000>; + type = "passive"; + }; + dhot: trip-point@2 { + temperature = <85000>; + hysteresis = <5000>; + type = "hot"; + }; + dcritical: trip-point@3 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + }; + }; + /*thermal zone end*/ + cpu_opp_table0: cpu_opp_table0 { compatible = "operating-points-v2"; opp-shared; diff --git a/arch/arm64/boot/dts/amlogic/mesonsm1.dtsi b/arch/arm64/boot/dts/amlogic/mesonsm1.dtsi index c40bac63e053..e002a5c425d6 100644 --- a/arch/arm64/boot/dts/amlogic/mesonsm1.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesonsm1.dtsi @@ -477,42 +477,6 @@ reg = <0x0 0xff809000 0x0 0x48>; }; - p_tsensor: p_tsensor@ff634594 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0x0 0xff634800 0x0 0x50>, - <0x0 0xff800268 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff800228 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0x0 0xff634c00 0x0 0x50>, - <0x0 0xff800230 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - power_ctrl: power_ctrl@ff8000e8 { compatible = "amlogic, sm1-powerctrl"; reg = <0x0 0xff8000e8 0x0 0x10>, @@ -1548,140 +1512,6 @@ /*partions defined in dts */ }; - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <115>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <358>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1460>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1460>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - /* Sound iomap */ aml_snd_iomap { compatible = "amlogic, snd-iomap"; diff --git a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts index de7c75614e85..e6bc5ea69af9 100644 --- a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts +++ b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts @@ -717,6 +717,177 @@ }; /* Audio Related end */ + + p_tsensor: p_tsensor@ff634800 { + compatible = "amlogic, r1p1-tsensor"; + device_name = "meson-pthermal"; + status = "okay"; + reg = <0x0 0xff634800 0x0 0x50>, + <0x0 0xff800268 0x0 0x4>; + cal_type = <0x1>; + cal_a = <324>; + cal_b = <424>; + cal_c = <3159>; + cal_d = <9411>; + rtemp = <115000>; + interrupts = <0 35 0>; + clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ + clock-names = "ts_comp"; + #thermal-sensor-cells = <1>; + }; + + d_tsensor: d_tsensor@ff634c00 { + compatible = "amlogic, r1p1-tsensor"; + device_name = "meson-dthermal"; + status = "okay"; + reg = <0x0 0xff634c00 0x0 0x50>, + <0x0 0xff800230 0x0 0x4>; + cal_type = <0x1>; + cal_a = <324>; + cal_b = <424>; + cal_c = <3159>; + cal_d = <9411>; + rtemp = <115000>; + interrupts = <0 36 0>; + clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ + clock-names = "ts_comp"; + #thermal-sensor-cells = <1>; + }; + + meson_cooldev: meson-cooldev@0 { + status = "okay"; + compatible = "amlogic, meson-cooldev"; + device_name = "mcooldev"; + cooling_devices { + cpufreq_cool_cluster0 { + min_state = <1000000>; + dyn_coeff = <115>; + cluster_id = <0>; + node_name = "cpufreq_cool0"; + device_type = "cpufreq"; + }; + cpucore_cool_cluster0 { + min_state = <1>; + dyn_coeff = <0>; + cluster_id = <0>; + node_name = "cpucore_cool0"; + device_type = "cpucore"; + }; + gpufreq_cool { + min_state = <400>; + dyn_coeff = <358>; + gpu_pp = <2>; + cluster_id = <0>; + node_name = "gpufreq_cool0"; + device_type = "gpufreq"; + }; + gpucore_cool { + min_state = <1>; + dyn_coeff = <0>; + cluster_id = <0>; + node_name = "gpucore_cool0"; + device_type = "gpucore"; + }; + }; + cpufreq_cool0:cpufreq_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + cpucore_cool0:cpucore_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + gpufreq_cool0:gpufreq_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + gpucore_cool0:gpucore_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + }; + /*meson cooling devices end*/ + + thermal-zones { + soc_thermal: soc_thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + sustainable-power = <1460>; + thermal-sensors = <&p_tsensor 0>; + trips { + pswitch_on: trip-point@0 { + temperature = <60000>; + hysteresis = <5000>; + type = "passive"; + }; + pcontrol: trip-point@1 { + temperature = <75000>; + hysteresis = <5000>; + type = "passive"; + }; + phot: trip-point@2 { + temperature = <85000>; + hysteresis = <5000>; + type = "hot"; + }; + pcritical: trip-point@3 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + cpufreq_cooling_map { + trip = <&pcontrol>; + cooling-device = <&cpufreq_cool0 0 4>; + contribution = <1024>; + }; + cpucore_cooling_map { + trip = <&pcontrol>; + cooling-device = <&cpucore_cool0 0 3>; + contribution = <1024>; + }; + gpufreq_cooling_map { + trip = <&pcontrol>; + cooling-device = <&gpufreq_cool0 0 4>; + contribution = <1024>; + }; + gpucore_cooling_map { + trip = <&pcontrol>; + cooling-device = <&gpucore_cool0 0 2>; + contribution = <1024>; + }; + }; + }; + ddr_thermal: ddr_thermal { + polling-delay = <2000>; + polling-delay-passive = <1000>; + sustainable-power = <1460>; + thermal-sensors = <&d_tsensor 1>; + trips { + dswitch_on: trip-point@0 { + temperature = <60000>; + hysteresis = <5000>; + type = "passive"; + }; + dcontrol: trip-point@1 { + temperature = <75000>; + hysteresis = <5000>; + type = "passive"; + }; + dhot: trip-point@2 { + temperature = <85000>; + hysteresis = <5000>; + type = "hot"; + }; + dcritical: trip-point@3 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + }; + }; + /*thermal zone end*/ + cpu_opp_table0: cpu_opp_table0 { compatible = "operating-points-v2"; opp-shared; diff --git a/arch/arm64/boot/dts/amlogic/sm1_s905d3_skt.dts b/arch/arm64/boot/dts/amlogic/sm1_s905d3_skt.dts index 673a853ee393..375bccf9c8ca 100644 --- a/arch/arm64/boot/dts/amlogic/sm1_s905d3_skt.dts +++ b/arch/arm64/boot/dts/amlogic/sm1_s905d3_skt.dts @@ -717,6 +717,176 @@ }; /* Audio Related end */ + p_tsensor: p_tsensor@ff634800 { + compatible = "amlogic, r1p1-tsensor"; + device_name = "meson-pthermal"; + status = "okay"; + reg = <0x0 0xff634800 0x0 0x50>, + <0x0 0xff800268 0x0 0x4>; + cal_type = <0x1>; + cal_a = <324>; + cal_b = <424>; + cal_c = <3159>; + cal_d = <9411>; + rtemp = <115000>; + interrupts = <0 35 0>; + clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ + clock-names = "ts_comp"; + #thermal-sensor-cells = <1>; + }; + + d_tsensor: d_tsensor@ff634c00 { + compatible = "amlogic, r1p1-tsensor"; + device_name = "meson-dthermal"; + status = "okay"; + reg = <0x0 0xff634c00 0x0 0x50>, + <0x0 0xff800230 0x0 0x4>; + cal_type = <0x1>; + cal_a = <324>; + cal_b = <424>; + cal_c = <3159>; + cal_d = <9411>; + rtemp = <115000>; + interrupts = <0 36 0>; + clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ + clock-names = "ts_comp"; + #thermal-sensor-cells = <1>; + }; + + meson_cooldev: meson-cooldev@0 { + status = "okay"; + compatible = "amlogic, meson-cooldev"; + device_name = "mcooldev"; + cooling_devices { + cpufreq_cool_cluster0 { + min_state = <1000000>; + dyn_coeff = <115>; + cluster_id = <0>; + node_name = "cpufreq_cool0"; + device_type = "cpufreq"; + }; + cpucore_cool_cluster0 { + min_state = <1>; + dyn_coeff = <0>; + cluster_id = <0>; + node_name = "cpucore_cool0"; + device_type = "cpucore"; + }; + gpufreq_cool { + min_state = <400>; + dyn_coeff = <358>; + gpu_pp = <2>; + cluster_id = <0>; + node_name = "gpufreq_cool0"; + device_type = "gpufreq"; + }; + gpucore_cool { + min_state = <1>; + dyn_coeff = <0>; + cluster_id = <0>; + node_name = "gpucore_cool0"; + device_type = "gpucore"; + }; + }; + cpufreq_cool0:cpufreq_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + cpucore_cool0:cpucore_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + gpufreq_cool0:gpufreq_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + gpucore_cool0:gpucore_cool0 { + #cooling-cells = <2>; /* min followed by max */ + }; + }; + /*meson cooling devices end*/ + + thermal-zones { + soc_thermal: soc_thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + sustainable-power = <1460>; + thermal-sensors = <&p_tsensor 0>; + trips { + pswitch_on: trip-point@0 { + temperature = <60000>; + hysteresis = <5000>; + type = "passive"; + }; + pcontrol: trip-point@1 { + temperature = <75000>; + hysteresis = <5000>; + type = "passive"; + }; + phot: trip-point@2 { + temperature = <85000>; + hysteresis = <5000>; + type = "hot"; + }; + pcritical: trip-point@3 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + cpufreq_cooling_map { + trip = <&pcontrol>; + cooling-device = <&cpufreq_cool0 0 4>; + contribution = <1024>; + }; + cpucore_cooling_map { + trip = <&pcontrol>; + cooling-device = <&cpucore_cool0 0 3>; + contribution = <1024>; + }; + gpufreq_cooling_map { + trip = <&pcontrol>; + cooling-device = <&gpufreq_cool0 0 4>; + contribution = <1024>; + }; + gpucore_cooling_map { + trip = <&pcontrol>; + cooling-device = <&gpucore_cool0 0 2>; + contribution = <1024>; + }; + }; + }; + ddr_thermal: ddr_thermal { + polling-delay = <2000>; + polling-delay-passive = <1000>; + sustainable-power = <1460>; + thermal-sensors = <&d_tsensor 1>; + trips { + dswitch_on: trip-point@0 { + temperature = <60000>; + hysteresis = <5000>; + type = "passive"; + }; + dcontrol: trip-point@1 { + temperature = <75000>; + hysteresis = <5000>; + type = "passive"; + }; + dhot: trip-point@2 { + temperature = <85000>; + hysteresis = <5000>; + type = "hot"; + }; + dcritical: trip-point@3 { + temperature = <110000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + }; + }; + /*thermal zone end*/ + cpu_opp_table0: cpu_opp_table0 { compatible = "operating-points-v2"; opp-shared;