sysedp: Jetson-CV: Scale back reactive capping
Anand Prasad [Thu, 23 Jul 2015 19:11:16 +0000 (12:11 -0700)]
Add warning node to the sysedp reactive capping device-tree structure.
Add specific warnings to be used for Jetson-CV.
Scale back Jetson sysedp reactive capping.
Disable soctherm h/w throttling for the battery overcurrent monitor.

Bug 1665297

Change-Id: I5611349ce25f1a6afe01a0c129fbde890979f6cc
Signed-off-by: Anand Prasad <anprasad@nvidia.com>
Reviewed-on: http://git-master/r/774643
(cherry picked from commit bd914fcb44d8b8d1fa7040a8d0fa0daf7c55c659)
Reviewed-on: http://git-master/r/786105
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sivaram Nair <sivaramn@nvidia.com>

Documentation/devicetree/bindings/edp/nvidia,tegra124-sysedp_reactive_capping.txt
arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
arch/arm64/boot/dts/tegra210-platforms/tegra210-p2180-common.dtsi

index 0c97af3..04485b8 100644 (file)
@@ -16,6 +16,10 @@ Required properties:
   the interrupt into the virtual irq value and flags used by
   request_threaded_irq(). Only 1 interrupt (2 values) should be defined.
 
+Optional properties:
+- nvidia,threshold_warning: If used, this node provides a message to be printed
+  when this consumer's interrupt gets trigerred.
+
 Required sub-nodes:
 - sysedpc: This node contains one subnode which needs one property defined:
 
@@ -29,6 +33,7 @@ Example:
                nvidia,step_alarm_mw = <1000>;
                nvidia,step_relax_mw = <500>;
                nvidia,relax_ms = <250>;
+               nvidia,threshold_warning = "WARNING - SYSTEM Voltage Droop detected, please refer to the Power management application note";
                interrupt-parent = <&soctherm>;
                interrupts = <1 0x2002>;
 
index 2916a29..6c649c4 100644 (file)
 
        sysedp_reactive_capping@1 {
                compatible = "nvidia,tegra124-sysedp_reactive_capping";
-               nvidia,max_capping_mw = <15000>;
-               nvidia,step_alarm_mw = <1000>;
-               nvidia,step_relax_mw = <500>;
-               nvidia,relax_ms = <250>;
+               nvidia,max_capping_mw = <0>;
+               nvidia,step_alarm_mw = <0>;
+               nvidia,step_relax_mw = <0>;
+               nvidia,relax_ms = <0>;
+               nvidia,threshold_warning = "WARNING - SYSTEM Voltage Droop detected, please refer to the Jetson Power management application note";
                interrupt-parent = <&soctherm>;
                interrupts = <1 0x2002>;
                sysedpc {
 
        sysedp_reactive_capping@3 {
                compatible = "nvidia,tegra124-sysedp_reactive_capping";
-               nvidia,max_capping_mw = <15000>;
-               nvidia,step_alarm_mw = <1000>;
-               nvidia,step_relax_mw = <500>;
-               nvidia,relax_ms = <250>;
+               nvidia,max_capping_mw = <0>;
+               nvidia,step_alarm_mw = <0>;
+               nvidia,step_relax_mw = <0>;
+               nvidia,relax_ms = <0>;
+               nvidia,threshold_warning = "WARNING - Battery Over Current Limit hit, please refer to the Jetson Power management application note";
                interrupt-parent = <&soctherm>;
                interrupts = <3 0x2002>;
                sysedpc {
                throttle@oc3 {
                        device_type = "throttlectl";
                        oc-alarm-id = <3>;
-                       priority = <50>;
+                       priority = <40>;
                        mode = "brief";
                        intr;
                        active_low;
-                       count_threshold = <15>;
+                       count_threshold = <5>;
                        filter = <5100000>;
-                       throttle_dev = <&{/soctherm@0x700E2000/throttle_dev@cpu_medium}
-                                       &{/soctherm@0x700E2000/throttle_dev@gpu_medium}>;
+                       throttle_dev = <&{/soctherm@0x700E2000/throttle_dev@cpu_none}
+                                       &{/soctherm@0x700E2000/throttle_dev@gpu_none}>;
+               };
+               throttle_dev@cpu_none {
+                       dividend = <255>;
+                       divisor = <255>;
+                       duration = <0>;
+                       step = <0>;
+               };
+               throttle_dev@gpu_none {
+                       level = "no_throttling";
                };
                throttle_dev@cpu_medium {
                        dividend = <63>;
index 8d4a719..7bd31a2 100644 (file)
                status = "disabled";
        };
 
-       soctherm@0x700E2000 {
-               throttle@oc1 {
-                       device_type = "throttlectl";
-                       oc-alarm-id = <1>;
-                       priority = <50>;
-                       mode = "brief";
-                       intr;
-                       active_low;
-                       count_threshold = <100>;
-                       filter = <5100000>;
-                       throttle_dev = <&{/soctherm@0x700E2000/throttle_dev@cpu_medium}
-                                       &{/soctherm@0x700E2000/throttle_dev@gpu_medium}>;
-               };
-               throttle@oc3 {
-                       device_type = "throttlectl";
-                       oc-alarm-id = <3>;
-                       priority = <49>;
-                       mode = "brief";
-                       intr;
-                       active_low;
-                       count_threshold = <15>;
-                       filter = <5100000>;
-                       throttle_dev = <&{/soctherm@0x700E2000/throttle_dev@cpu_medium}
-                                       &{/soctherm@0x700E2000/throttle_dev@gpu_medium}>;
-               };
-               throttle_dev@cpu_medium {
-                       dividend = <63>;
-                       divisor = <255>;
-                       duration = <0>;
-                       step = <0>;
-               };
-               throttle_dev@gpu_medium {
-                       level = "medium_throttling";
-               };
-       };
-
        thermal-zones {
                CPU-therm {
                        thermal-zone-params {