Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) Maxim MAX77693 multi-function device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) MAX77693 is a Multifunction device with the following submodules:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) - PMIC,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) - CHARGER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) - LED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) - MUIC,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) - HAPTIC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) It is interfaced to host controller using i2c.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) This document describes the bindings for the mfd device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) - compatible : Must be "maxim,max77693".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) - reg : Specifies the i2c slave address of PMIC block.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) - interrupts : This i2c device has an IRQ line connected to the main SoC.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) Optional properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) - regulators : The regulators of max77693 have to be instantiated under subnode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)   named "regulators" using the following format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	regulators {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 		regulator-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 		standard regulator constraints[*].
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	[*] refer Documentation/devicetree/bindings/regulator/regulator.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) - haptic : The MAX77693 haptic device utilises a PWM controlled motor to provide
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)   users with tactile feedback. PWM period and duty-cycle are varied in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31)   order to provide the appropriate level of feedback.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33)  Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	- compatible : Must be "maxim,max77693-haptic"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	- haptic-supply : power supply for the haptic motor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	[*] refer Documentation/devicetree/bindings/regulator/regulator.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	- pwms : phandle to the physical PWM(Pulse Width Modulation) device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	 PWM properties should be named "pwms". And number of cell is different
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	 for each pwm device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	 To get more information, please refer to documentation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	[*] refer Documentation/devicetree/bindings/pwm/pwm.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) - charger : Node configuring the charger driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)   If present, required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)   - compatible : Must be "maxim,max77693-charger".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)   Optional properties (if not set, defaults will be used):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)   - maxim,constant-microvolt : Battery constant voltage in uV. The charger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49)     will operate in fast charge constant current mode till battery voltage
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50)     reaches this level. Then the charger will switch to fast charge constant
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51)     voltage mode. Also vsys (system voltage) will be set to this value when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)     DC power is supplied but charger is not enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53)     Valid values: 3650000 - 4400000, step by 25000 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)     Default: 4200000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)   - maxim,min-system-microvolt : Minimal system voltage in uV.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)     Valid values: 3000000 - 3700000, step by 100000 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)     Default: 3600000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)   - maxim,thermal-regulation-celsius : Temperature in Celsius for entering
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)     high temperature charging mode. If die temperature exceeds this value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)     the charging current will be reduced by 105 mA/Celsius.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63)     Valid values: 70, 85, 100, 115
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64)     Default: 100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)   - maxim,battery-overcurrent-microamp : Overcurrent protection threshold
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67)     in uA (current from battery to system).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)     Valid values: 2000000 - 3500000, step by 250000 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69)     Default: 3500000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)   - maxim,charge-input-threshold-microvolt : Threshold voltage in uV for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)     triggering input voltage regulation loop. If input voltage decreases
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)     below this value, the input current will be reduced to reach the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)     threshold voltage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)     Valid values: 4300000, 4700000, 4800000, 4900000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)     Default: 4300000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) - led : the LED submodule device node
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) There are two LED outputs available - FLED1 and FLED2. Each of them can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) control a separate LED or they can be connected together to double
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) the maximum current for a single connected LED. One LED is represented
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) by one child node.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) - compatible : Must be "maxim,max77693-led".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) Optional properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) - maxim,boost-mode :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	In boost mode the device can produce up to 1.2A of total current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	on both outputs. The maximum current on each output is reduced
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	to 625mA then. If not enabled explicitly, boost setting defaults to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	LEDS_BOOST_FIXED in case both current sources are used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	Possible values:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		LEDS_BOOST_OFF (0) - no boost,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		LEDS_BOOST_ADAPTIVE (1) - adaptive mode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		LEDS_BOOST_FIXED (2) - fixed mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) - maxim,boost-mvout : Output voltage of the boost module in millivolts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	Valid values: 3300 - 5500, step by 25 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	Default: 3300
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) - maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	if chip estimates that system voltage could drop below this level due
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	to flash power consumption.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	Valid values: 2400 - 3400, step by 33 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	Default: 2400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) Required properties for the LED child node:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) - led-sources : see Documentation/devicetree/bindings/leds/common.txt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		device current output identifiers: 0 - FLED1, 1 - FLED2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) - led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	Valid values for a LED connected to one FLED output:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 		15625 - 250000, step by 15625 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	Valid values for a LED connected to both FLED outputs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 		15625 - 500000, step by 15625 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) - flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	Valid values for a single LED connected to one FLED output
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	(boost mode must be turned off):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 		15625 - 1000000, step by 15625 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	Valid values for a single LED connected to both FLED outputs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 		15625 - 1250000, step by 15625 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	Valid values for two LEDs case:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		15625 - 625000, step by 15625 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) - flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	Valid values: 62500 - 1000000, step by 62500 (rounded down)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) Optional properties for the LED child node:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) - label : see Documentation/devicetree/bindings/leds/common.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) Optional nodes:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) - max77693-muic :
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	Node used only by extcon consumers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 		- compatible : "maxim,max77693-muic"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) #include <dt-bindings/leds/common.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	max77693@66 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		compatible = "maxim,max77693";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		reg = <0x66>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		interrupt-parent = <&gpx1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		interrupts = <5 2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 		regulators {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 			esafeout@1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 				regulator-compatible = "ESAFEOUT1";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 				regulator-name = "ESAFEOUT1";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 				regulator-boot-on;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 			};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 			esafeout@2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 				regulator-compatible = "ESAFEOUT2";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 				regulator-name = "ESAFEOUT2";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 				};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 			charger@0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 				regulator-compatible = "CHARGER";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 				regulator-name = "CHARGER";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 				regulator-min-microamp = <60000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 				regulator-max-microamp = <2580000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 					regulator-boot-on;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 			};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		haptic {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 			compatible = "maxim,max77693-haptic";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 			haptic-supply = <&haptic_supply>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 			pwms = <&pwm 0 40000 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 			pwm-names = "haptic";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 		charger {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 			compatible = "maxim,max77693-charger";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 			maxim,constant-microvolt = <4200000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 			maxim,min-system-microvolt = <3600000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 			maxim,thermal-regulation-celsius = <75>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 			maxim,battery-overcurrent-microamp = <3000000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 			maxim,charge-input-threshold-microvolt = <4300000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		led {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 			compatible = "maxim,max77693-led";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 			maxim,boost-mode = <LEDS_BOOST_FIXED>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 			maxim,boost-mvout = <5000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 			maxim,mvsys-min = <2400>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 			camera_flash: flash-led {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 				label = "max77693-flash";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 				led-sources = <0>, <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 				led-max-microamp = <500000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 				flash-max-microamp = <1250000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 				flash-max-timeout-us = <1000000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 			};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	};