cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

pwm-regulator.txt (3177B)


      1Bindings for the Generic PWM Regulator
      2======================================
      3
      4Currently supports 2 modes of operation:
      5
      6Voltage Table:		When in this mode, a voltage table (See below) of
      7			predefined voltage <=> duty-cycle values must be
      8			provided via DT. Limitations are that the regulator can
      9			only operate at the voltages supplied in the table.
     10			Intermediary duty-cycle values which would normally
     11			allow finer grained voltage selection are ignored and
     12			rendered useless.  Although more control is given to
     13			the user if the assumptions made in continuous-voltage
     14			mode do not reign true.
     15
     16Continuous Voltage:	This mode uses the regulator's maximum and minimum
     17			supplied voltages specified in the
     18			regulator-{min,max}-microvolt properties to calculate
     19			appropriate duty-cycle values.  This allows for a much
     20			more fine grained solution when compared with
     21			voltage-table mode above.  This solution does make an
     22			assumption that a %50 duty-cycle value will cause the
     23			regulator voltage to run at half way between the
     24			supplied max_uV and min_uV values.
     25
     26Required properties:
     27--------------------
     28- compatible:		Should be "pwm-regulator"
     29
     30- pwms:			PWM specification (See: ../pwm/pwm.txt)
     31
     32Only required for Voltage Table Mode:
     33- voltage-table: 	Voltage and Duty-Cycle table consisting of 2 cells
     34			    First cell is voltage in microvolts (uV)
     35			    Second cell is duty-cycle in percent (%)
     36
     37Optional properties for Continuous mode:
     38- pwm-dutycycle-unit:	Integer value encoding the duty cycle unit. If not
     39			defined, <100> is assumed, meaning that
     40			pwm-dutycycle-range contains values expressed in
     41			percent.
     42
     43- pwm-dutycycle-range:	Should contain 2 entries. The first entry is encoding
     44			the dutycycle for regulator-min-microvolt and the
     45			second one the dutycycle for regulator-max-microvolt.
     46			Duty cycle values are expressed in pwm-dutycycle-unit.
     47			If not defined, <0 100> is assumed.
     48
     49NB: To be clear, if voltage-table is provided, then the device will be used
     50in Voltage Table Mode.  If no voltage-table is provided, then the device will
     51be used in Continuous Voltage Mode.
     52
     53Optional properties:
     54--------------------
     55- enable-gpios:		GPIO to use to enable/disable the regulator
     56
     57Any property defined as part of the core regulator binding can also be used.
     58(See: ../regulator/regulator.txt)
     59
     60Continuous Voltage With Enable GPIO Example:
     61	pwm_regulator {
     62		compatible = "pwm-regulator";
     63		pwms = <&pwm1 0 8448 0>;
     64		enable-gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
     65		regulator-min-microvolt = <1016000>;
     66		regulator-max-microvolt = <1114000>;
     67		regulator-name = "vdd_logic";
     68		/* unit == per-mille */
     69		pwm-dutycycle-unit = <1000>;
     70		/*
     71		 * Inverted PWM logic, and the duty cycle range is limited
     72		 * to 30%-70%.
     73		 */
     74		pwm-dutycycle-range = <700 300>; /* */
     75	};
     76
     77Voltage Table Example:
     78	pwm_regulator {
     79		compatible = "pwm-regulator";
     80		pwms = <&pwm1 0 8448 0>;
     81		regulator-min-microvolt = <1016000>;
     82		regulator-max-microvolt = <1114000>;
     83		regulator-name = "vdd_logic";
     84
     85			      /* Voltage Duty-Cycle */
     86		voltage-table = <1114000 0>,
     87				<1095000 10>,
     88				<1076000 20>,
     89				<1056000 30>,
     90				<1036000 40>,
     91				<1016000 50>;
     92	};