Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branches 'ib-mfd-hwmon-regulator-5.18', 'ib-mfd-iio-5.18', 'ib-mfd-led-power-regulator-5.18', 'ib-mfd-mediatek-mt6366-5.18', 'ib-mfd-rtc-watchdog-5.18' and 'ib-mfd-spi-dt-5.18' into ibs-for-mfd-merged

+1962 -681
+40
Documentation/devicetree/bindings/extcon/maxim,max77843.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/extcon/maxim,max77843.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX77843 MicroUSB and Companion Power Management IC Extcon 8 + 9 + maintainers: 10 + - Chanwoo Choi <cw00.choi@samsung.com> 11 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 12 + 13 + description: | 14 + This is a part of device tree bindings for Maxim MAX77843 MicroUSB 15 + Integrated Circuit (MUIC). 16 + 17 + See also Documentation/devicetree/bindings/mfd/maxim,max77843.yaml for 18 + additional information and example. 19 + 20 + properties: 21 + compatible: 22 + const: maxim,max77843-muic 23 + 24 + connector: 25 + $ref: /schemas/connector/usb-connector.yaml# 26 + 27 + ports: 28 + $ref: /schemas/graph.yaml#/properties/port 29 + description: 30 + Any connector to the data bus of this controller should be modelled using 31 + the OF graph bindings specified 32 + properties: 33 + port: 34 + $ref: /schemas/graph.yaml#/properties/port 35 + 36 + required: 37 + - compatible 38 + - connector 39 + 40 + additionalProperties: false
+105
Documentation/devicetree/bindings/leds/maxim,max77693.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/leds/maxim,max77693.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX77693 MicroUSB and Companion Power Management IC LEDs 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated 14 + Circuit (MUIC). 15 + 16 + There are two LED outputs available - FLED1 and FLED2. Each of them can 17 + control a separate LED or they can be connected together to double the 18 + maximum current for a single connected LED. One LED is represented by one 19 + child node. 20 + 21 + See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for 22 + additional information and example. 23 + 24 + properties: 25 + compatible: 26 + const: maxim,max77693-led 27 + 28 + maxim,boost-mode: 29 + description: 30 + In boost mode the device can produce up to 1.2A of total current on both 31 + outputs. The maximum current on each output is reduced to 625mA then. If 32 + not enabled explicitly, boost setting defaults to LEDS_BOOST_FIXED in 33 + case both current sources are used. 34 + See LEDS_BOOST_* in include/dt-bindings/leds/common.h. 35 + $ref: /schemas/types.yaml#/definitions/uint32 36 + enum: [0, 1, 2] 37 + 38 + maxim,boost-mvout: 39 + description: | 40 + Output voltage of the boost module in millivolts. 41 + Valid values: 3300 - 5500, step by 25 (rounded down) 42 + $ref: /schemas/types.yaml#/definitions/uint32 43 + minimum: 3300 44 + maximum: 5500 45 + default: 3300 46 + 47 + maxim,mvsys-min: 48 + description: | 49 + Low input voltage level in millivolts. Flash is not fired if chip 50 + estimates that system voltage could drop below this level due to flash 51 + power consumption. 52 + Valid values: 2400 - 3400, step by 33 (rounded down) 53 + $ref: /schemas/types.yaml#/definitions/uint32 54 + minimum: 2400 55 + maximum: 3400 56 + default: 2400 57 + 58 + patternProperties: 59 + "^([a-z]+-)?led[01]?$": 60 + type: object 61 + $ref: common.yaml# 62 + unevaluatedProperties: false 63 + 64 + properties: 65 + led-sources: 66 + allOf: 67 + - minItems: 1 68 + maxItems: 2 69 + items: 70 + minimum: 0 71 + maximum: 1 72 + 73 + led-max-microamp: 74 + description: | 75 + Valid values for a LED connected to one FLED output: 76 + 15625 - 250000, step by 15625 (rounded down) 77 + Valid values for a LED connected to both FLED outputs: 78 + 15625 - 500000, step by 15625 (rounded down) 79 + 80 + flash-max-microamp: 81 + description: | 82 + Valid values for a single LED connected to one FLED output 83 + (boost mode must be turned off): 84 + 15625 - 1000000, step by 15625 (rounded down) 85 + Valid values for a single LED connected to both FLED outputs: 86 + 15625 - 1250000, step by 15625 (rounded down) 87 + Valid values for two LEDs case: 88 + 15625 - 625000, step by 15625 (rounded down) 89 + 90 + flash-max-timeout-us: 91 + description: | 92 + Valid values: 62500 - 1000000, step by 62500 (rounded down) 93 + minimum: 62500 94 + maximum: 1000000 95 + 96 + required: 97 + - flash-max-microamp 98 + - flash-max-timeout-us 99 + - led-max-microamp 100 + - led-sources 101 + 102 + required: 103 + - compatible 104 + 105 + additionalProperties: false
+17 -14
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
··· 31 31 32 32 controller-data: 33 33 description: 34 - SPI controller data, see bindings/spi/spi-samsung.txt 34 + SPI controller data, see bindings/spi/samsung,spi-peripheral-props.yaml 35 35 type: object 36 36 37 37 google,cros-ec-spi-pre-delay: ··· 148 148 required: 149 149 - compatible 150 150 151 - if: 152 - properties: 153 - compatible: 154 - contains: 155 - enum: 156 - - google,cros-ec-i2c 157 - - google,cros-ec-rpmsg 158 - then: 159 - properties: 160 - google,cros-ec-spi-pre-delay: false 161 - google,cros-ec-spi-msg-delay: false 162 - spi-max-frequency: false 151 + allOf: 152 + - if: 153 + properties: 154 + compatible: 155 + contains: 156 + enum: 157 + - google,cros-ec-i2c 158 + - google,cros-ec-rpmsg 159 + then: 160 + properties: 161 + google,cros-ec-spi-pre-delay: false 162 + google,cros-ec-spi-msg-delay: false 163 + spi-max-frequency: false 164 + else: 165 + $ref: /schemas/spi/spi-peripheral-props.yaml 163 166 164 167 additionalProperties: false 165 168 ··· 203 200 spi-max-frequency = <5000000>; 204 201 205 202 proximity { 206 - compatible = "google,cros-ec-mkbp-proximity"; 203 + compatible = "google,cros-ec-mkbp-proximity"; 207 204 }; 208 205 209 206 cbas {
-147
Documentation/devicetree/bindings/mfd/max14577.txt
··· 1 - Maxim MAX14577/77836 Multi-Function Device 2 - 3 - MAX14577 is a Multi-Function Device with Micro-USB Interface Circuit, Li+ 4 - Battery Charger and SFOUT LDO output for powering USB devices. It is 5 - interfaced to host controller using I2C. 6 - 7 - MAX77836 additionally contains PMIC (with two LDO regulators) and Fuel Gauge. 8 - For the description of Fuel Gauge low SOC alert interrupt see: 9 - ../power/supply/max17040_battery.txt 10 - 11 - 12 - Required properties: 13 - - compatible : Must be "maxim,max14577" or "maxim,max77836". 14 - - reg : I2C slave address for the max14577 chip (0x25 for max14577/max77836) 15 - - interrupts : IRQ line for the chip. 16 - 17 - 18 - Required nodes: 19 - - charger : 20 - Node for configuring the charger driver. 21 - Required properties: 22 - - compatible : "maxim,max14577-charger" 23 - or "maxim,max77836-charger" 24 - - maxim,fast-charge-uamp : Current in uA for Fast Charge; 25 - Valid values: 26 - - for max14577: 90000 - 950000; 27 - - for max77836: 45000 - 475000; 28 - - maxim,eoc-uamp : Current in uA for End-Of-Charge mode; 29 - Valid values: 30 - - for max14577: 50000 - 200000; 31 - - for max77836: 5000 - 100000; 32 - - maxim,ovp-uvolt : OverVoltage Protection Threshold in uV; 33 - In an overvoltage condition, INT asserts and charging 34 - stops. Valid values: 35 - - 6000000, 6500000, 7000000, 7500000; 36 - - maxim,constant-uvolt : Battery Constant Voltage in uV; 37 - Valid values: 38 - - 4000000 - 4280000 (step by 20000); 39 - - 4350000; 40 - 41 - 42 - Optional nodes: 43 - - max14577-muic/max77836-muic : 44 - Node used only by extcon consumers. 45 - Required properties: 46 - - compatible : "maxim,max14577-muic" or "maxim,max77836-muic" 47 - 48 - - regulators : 49 - Required properties: 50 - - compatible : "maxim,max14577-regulator" 51 - or "maxim,max77836-regulator" 52 - 53 - May contain a sub-node per regulator from the list below. Each 54 - sub-node should contain the constraints and initialization information 55 - for that regulator. See regulator.txt for a description of standard 56 - properties for these sub-nodes. 57 - 58 - List of valid regulator names: 59 - - for max14577: CHARGER, SAFEOUT. 60 - - for max77836: CHARGER, SAFEOUT, LDO1, LDO2. 61 - 62 - The SAFEOUT is a fixed voltage regulator so there is no need to specify 63 - voltages for it. 64 - 65 - 66 - Example: 67 - 68 - #include <dt-bindings/interrupt-controller/irq.h> 69 - 70 - max14577@25 { 71 - compatible = "maxim,max14577"; 72 - reg = <0x25>; 73 - interrupt-parent = <&gpx1>; 74 - interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 75 - 76 - muic: max14577-muic { 77 - compatible = "maxim,max14577-muic"; 78 - }; 79 - 80 - regulators { 81 - compatible = "maxim,max14577-regulator"; 82 - 83 - SAFEOUT { 84 - regulator-name = "SAFEOUT"; 85 - }; 86 - CHARGER { 87 - regulator-name = "CHARGER"; 88 - regulator-min-microamp = <90000>; 89 - regulator-max-microamp = <950000>; 90 - regulator-boot-on; 91 - }; 92 - }; 93 - 94 - charger { 95 - compatible = "maxim,max14577-charger"; 96 - 97 - maxim,constant-uvolt = <4350000>; 98 - maxim,fast-charge-uamp = <450000>; 99 - maxim,eoc-uamp = <50000>; 100 - maxim,ovp-uvolt = <6500000>; 101 - }; 102 - }; 103 - 104 - 105 - max77836@25 { 106 - compatible = "maxim,max77836"; 107 - reg = <0x25>; 108 - interrupt-parent = <&gpx1>; 109 - interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 110 - 111 - muic: max77836-muic { 112 - compatible = "maxim,max77836-muic"; 113 - }; 114 - 115 - regulators { 116 - compatible = "maxim,max77836-regulator"; 117 - 118 - SAFEOUT { 119 - regulator-name = "SAFEOUT"; 120 - }; 121 - CHARGER { 122 - regulator-name = "CHARGER"; 123 - regulator-min-microamp = <90000>; 124 - regulator-max-microamp = <950000>; 125 - regulator-boot-on; 126 - }; 127 - LDO1 { 128 - regulator-name = "LDO1"; 129 - regulator-min-microvolt = <2700000>; 130 - regulator-max-microvolt = <2700000>; 131 - }; 132 - LDO2 { 133 - regulator-name = "LDO2"; 134 - regulator-min-microvolt = <800000>; 135 - regulator-max-microvolt = <3950000>; 136 - }; 137 - }; 138 - 139 - charger { 140 - compatible = "maxim,max77836-charger"; 141 - 142 - maxim,constant-uvolt = <4350000>; 143 - maxim,fast-charge-uamp = <225000>; 144 - maxim,eoc-uamp = <7500>; 145 - maxim,ovp-uvolt = <6500000>; 146 - }; 147 - };
-194
Documentation/devicetree/bindings/mfd/max77693.txt
··· 1 - Maxim MAX77693 multi-function device 2 - 3 - MAX77693 is a Multifunction device with the following submodules: 4 - - PMIC, 5 - - CHARGER, 6 - - LED, 7 - - MUIC, 8 - - HAPTIC 9 - 10 - It is interfaced to host controller using i2c. 11 - This document describes the bindings for the mfd device. 12 - 13 - Required properties: 14 - - compatible : Must be "maxim,max77693". 15 - - reg : Specifies the i2c slave address of PMIC block. 16 - - interrupts : This i2c device has an IRQ line connected to the main SoC. 17 - 18 - Optional properties: 19 - - regulators : The regulators of max77693 have to be instantiated under subnode 20 - named "regulators" using the following format. 21 - 22 - regulators { 23 - regulator-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER 24 - standard regulator constraints[*]. 25 - }; 26 - 27 - [*] refer Documentation/devicetree/bindings/regulator/regulator.txt 28 - 29 - - haptic : The MAX77693 haptic device utilises a PWM controlled motor to provide 30 - users with tactile feedback. PWM period and duty-cycle are varied in 31 - order to provide the appropriate level of feedback. 32 - 33 - Required properties: 34 - - compatible : Must be "maxim,max77693-haptic" 35 - - haptic-supply : power supply for the haptic motor 36 - [*] refer Documentation/devicetree/bindings/regulator/regulator.txt 37 - - pwms : phandle to the physical PWM(Pulse Width Modulation) device. 38 - PWM properties should be named "pwms". And number of cell is different 39 - for each pwm device. 40 - To get more information, please refer to documentation. 41 - [*] refer Documentation/devicetree/bindings/pwm/pwm.txt 42 - 43 - - charger : Node configuring the charger driver. 44 - If present, required properties: 45 - - compatible : Must be "maxim,max77693-charger". 46 - 47 - Optional properties (if not set, defaults will be used): 48 - - maxim,constant-microvolt : Battery constant voltage in uV. The charger 49 - will operate in fast charge constant current mode till battery voltage 50 - reaches this level. Then the charger will switch to fast charge constant 51 - voltage mode. Also vsys (system voltage) will be set to this value when 52 - DC power is supplied but charger is not enabled. 53 - Valid values: 3650000 - 4400000, step by 25000 (rounded down) 54 - Default: 4200000 55 - 56 - - maxim,min-system-microvolt : Minimal system voltage in uV. 57 - Valid values: 3000000 - 3700000, step by 100000 (rounded down) 58 - Default: 3600000 59 - 60 - - maxim,thermal-regulation-celsius : Temperature in Celsius for entering 61 - high temperature charging mode. If die temperature exceeds this value 62 - the charging current will be reduced by 105 mA/Celsius. 63 - Valid values: 70, 85, 100, 115 64 - Default: 100 65 - 66 - - maxim,battery-overcurrent-microamp : Overcurrent protection threshold 67 - in uA (current from battery to system). 68 - Valid values: 2000000 - 3500000, step by 250000 (rounded down) 69 - Default: 3500000 70 - 71 - - maxim,charge-input-threshold-microvolt : Threshold voltage in uV for 72 - triggering input voltage regulation loop. If input voltage decreases 73 - below this value, the input current will be reduced to reach the 74 - threshold voltage. 75 - Valid values: 4300000, 4700000, 4800000, 4900000 76 - Default: 4300000 77 - 78 - - led : the LED submodule device node 79 - 80 - There are two LED outputs available - FLED1 and FLED2. Each of them can 81 - control a separate LED or they can be connected together to double 82 - the maximum current for a single connected LED. One LED is represented 83 - by one child node. 84 - 85 - Required properties: 86 - - compatible : Must be "maxim,max77693-led". 87 - 88 - Optional properties: 89 - - maxim,boost-mode : 90 - In boost mode the device can produce up to 1.2A of total current 91 - on both outputs. The maximum current on each output is reduced 92 - to 625mA then. If not enabled explicitly, boost setting defaults to 93 - LEDS_BOOST_FIXED in case both current sources are used. 94 - Possible values: 95 - LEDS_BOOST_OFF (0) - no boost, 96 - LEDS_BOOST_ADAPTIVE (1) - adaptive mode, 97 - LEDS_BOOST_FIXED (2) - fixed mode. 98 - - maxim,boost-mvout : Output voltage of the boost module in millivolts. 99 - Valid values: 3300 - 5500, step by 25 (rounded down) 100 - Default: 3300 101 - - maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired 102 - if chip estimates that system voltage could drop below this level due 103 - to flash power consumption. 104 - Valid values: 2400 - 3400, step by 33 (rounded down) 105 - Default: 2400 106 - 107 - Required properties for the LED child node: 108 - - led-sources : see Documentation/devicetree/bindings/leds/common.txt; 109 - device current output identifiers: 0 - FLED1, 1 - FLED2 110 - - led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt 111 - Valid values for a LED connected to one FLED output: 112 - 15625 - 250000, step by 15625 (rounded down) 113 - Valid values for a LED connected to both FLED outputs: 114 - 15625 - 500000, step by 15625 (rounded down) 115 - - flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt 116 - Valid values for a single LED connected to one FLED output 117 - (boost mode must be turned off): 118 - 15625 - 1000000, step by 15625 (rounded down) 119 - Valid values for a single LED connected to both FLED outputs: 120 - 15625 - 1250000, step by 15625 (rounded down) 121 - Valid values for two LEDs case: 122 - 15625 - 625000, step by 15625 (rounded down) 123 - - flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt 124 - Valid values: 62500 - 1000000, step by 62500 (rounded down) 125 - 126 - Optional properties for the LED child node: 127 - - label : see Documentation/devicetree/bindings/leds/common.txt 128 - 129 - Optional nodes: 130 - - max77693-muic : 131 - Node used only by extcon consumers. 132 - Required properties: 133 - - compatible : "maxim,max77693-muic" 134 - 135 - Example: 136 - #include <dt-bindings/leds/common.h> 137 - 138 - max77693@66 { 139 - compatible = "maxim,max77693"; 140 - reg = <0x66>; 141 - interrupt-parent = <&gpx1>; 142 - interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 143 - 144 - regulators { 145 - esafeout@1 { 146 - regulator-compatible = "ESAFEOUT1"; 147 - regulator-name = "ESAFEOUT1"; 148 - regulator-boot-on; 149 - }; 150 - esafeout@2 { 151 - regulator-compatible = "ESAFEOUT2"; 152 - regulator-name = "ESAFEOUT2"; 153 - }; 154 - charger@0 { 155 - regulator-compatible = "CHARGER"; 156 - regulator-name = "CHARGER"; 157 - regulator-min-microamp = <60000>; 158 - regulator-max-microamp = <2580000>; 159 - regulator-boot-on; 160 - }; 161 - }; 162 - 163 - haptic { 164 - compatible = "maxim,max77693-haptic"; 165 - haptic-supply = <&haptic_supply>; 166 - pwms = <&pwm 0 40000 0>; 167 - pwm-names = "haptic"; 168 - }; 169 - 170 - charger { 171 - compatible = "maxim,max77693-charger"; 172 - 173 - maxim,constant-microvolt = <4200000>; 174 - maxim,min-system-microvolt = <3600000>; 175 - maxim,thermal-regulation-celsius = <75>; 176 - maxim,battery-overcurrent-microamp = <3000000>; 177 - maxim,charge-input-threshold-microvolt = <4300000>; 178 - }; 179 - 180 - led { 181 - compatible = "maxim,max77693-led"; 182 - maxim,boost-mode = <LEDS_BOOST_FIXED>; 183 - maxim,boost-mvout = <5000>; 184 - maxim,mvsys-min = <2400>; 185 - 186 - camera_flash: flash-led { 187 - label = "max77693-flash"; 188 - led-sources = <0>, <1>; 189 - led-max-microamp = <500000>; 190 - flash-max-microamp = <1250000>; 191 - flash-max-timeout-us = <1000000>; 192 - }; 193 - }; 194 - };
-25
Documentation/devicetree/bindings/mfd/max77802.txt
··· 1 - Maxim MAX77802 multi-function device 2 - 3 - The Maxim MAX77802 is a Power Management IC (PMIC) that contains 10 high 4 - efficiency Buck regulators, 32 Low-DropOut (LDO) regulators used to power 5 - up application processors and peripherals, a 2-channel 32kHz clock outputs, 6 - a Real-Time-Clock (RTC) and a I2C interface to program the individual 7 - regulators, clocks outputs and the RTC. 8 - 9 - Bindings for the built-in 32k clock generator block and 10 - regulators are defined in ../clk/maxim,max77802.txt and 11 - ../regulator/max77802.txt respectively. 12 - 13 - Required properties: 14 - - compatible : Must be "maxim,max77802" 15 - - reg : Specifies the I2C slave address of PMIC block. 16 - - interrupts : I2C device IRQ line connected to the main SoC. 17 - 18 - Example: 19 - 20 - max77802: pmic@9 { 21 - compatible = "maxim,max77802"; 22 - interrupt-parent = <&intc>; 23 - interrupts = <26 IRQ_TYPE_NONE>; 24 - reg = <0x09>; 25 - };
+195
Documentation/devicetree/bindings/mfd/maxim,max14577.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/maxim,max14577.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB 14 + Integrated Circuit (MUIC). 15 + 16 + The Maxim MAX14577 is a MicroUSB and Companion Power Management IC which 17 + includes voltage safeout regulators, charger and MicroUSB management IC. 18 + 19 + The Maxim MAX77836 is a MicroUSB and Companion Power Management IC which 20 + includes voltage safeout and LDO regulators, charger, fuel-gauge and MicroUSB 21 + management IC. 22 + 23 + properties: 24 + compatible: 25 + enum: 26 + - maxim,max14577 27 + - maxim,max77836 28 + 29 + interrupts: 30 + maxItems: 1 31 + 32 + reg: 33 + maxItems: 1 34 + 35 + wakeup-source: true 36 + 37 + charger: 38 + $ref: /schemas/power/supply/maxim,max14577.yaml 39 + 40 + extcon: 41 + type: object 42 + properties: 43 + compatible: 44 + enum: 45 + - maxim,max14577-muic 46 + - maxim,max77836-muic 47 + 48 + required: 49 + - compatible 50 + 51 + regulators: 52 + $ref: /schemas/regulator/maxim,max14577.yaml 53 + 54 + required: 55 + - compatible 56 + - interrupts 57 + - reg 58 + - charger 59 + 60 + allOf: 61 + - if: 62 + properties: 63 + compatible: 64 + contains: 65 + const: maxim,max14577 66 + then: 67 + properties: 68 + charger: 69 + properties: 70 + compatible: 71 + const: maxim,max14577-charger 72 + extcon: 73 + properties: 74 + compatible: 75 + const: maxim,max14577-muic 76 + regulator: 77 + properties: 78 + compatible: 79 + const: maxim,max14577-regulator 80 + else: 81 + properties: 82 + charger: 83 + properties: 84 + compatible: 85 + const: maxim,max77836-charger 86 + extcon: 87 + properties: 88 + compatible: 89 + const: maxim,max77836-muic 90 + regulator: 91 + properties: 92 + compatible: 93 + const: maxim,max77836-regulator 94 + 95 + additionalProperties: false 96 + 97 + examples: 98 + - | 99 + #include <dt-bindings/interrupt-controller/irq.h> 100 + 101 + i2c { 102 + #address-cells = <1>; 103 + #size-cells = <0>; 104 + 105 + pmic@25 { 106 + compatible = "maxim,max14577"; 107 + reg = <0x25>; 108 + interrupt-parent = <&gpx1>; 109 + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 110 + 111 + extcon { 112 + compatible = "maxim,max14577-muic"; 113 + }; 114 + 115 + regulators { 116 + compatible = "maxim,max14577-regulator"; 117 + 118 + SAFEOUT { 119 + regulator-name = "SAFEOUT"; 120 + }; 121 + 122 + CHARGER { 123 + regulator-name = "CHARGER"; 124 + regulator-min-microamp = <90000>; 125 + regulator-max-microamp = <950000>; 126 + regulator-boot-on; 127 + }; 128 + }; 129 + 130 + charger { 131 + compatible = "maxim,max14577-charger"; 132 + 133 + maxim,constant-uvolt = <4350000>; 134 + maxim,fast-charge-uamp = <450000>; 135 + maxim,eoc-uamp = <50000>; 136 + maxim,ovp-uvolt = <6500000>; 137 + }; 138 + }; 139 + }; 140 + 141 + - | 142 + #include <dt-bindings/interrupt-controller/irq.h> 143 + 144 + i2c { 145 + #address-cells = <1>; 146 + #size-cells = <0>; 147 + 148 + pmic@25 { 149 + compatible = "maxim,max77836"; 150 + interrupt-parent = <&gpx1>; 151 + interrupts = <5 IRQ_TYPE_NONE>; 152 + reg = <0x25>; 153 + wakeup-source; 154 + 155 + extcon { 156 + compatible = "maxim,max77836-muic"; 157 + }; 158 + 159 + regulators { 160 + compatible = "maxim,max77836-regulator"; 161 + 162 + SAFEOUT { 163 + regulator-name = "SAFEOUT"; 164 + }; 165 + 166 + CHARGER { 167 + regulator-name = "CHARGER"; 168 + regulator-min-microamp = <45000>; 169 + regulator-max-microamp = <475000>; 170 + regulator-boot-on; 171 + }; 172 + 173 + LDO1 { 174 + regulator-name = "MOT_2.7V"; 175 + regulator-min-microvolt = <1100000>; 176 + regulator-max-microvolt = <2700000>; 177 + }; 178 + 179 + LDO2 { 180 + regulator-name = "UNUSED_LDO2"; 181 + regulator-min-microvolt = <800000>; 182 + regulator-max-microvolt = <3950000>; 183 + }; 184 + }; 185 + 186 + charger { 187 + compatible = "maxim,max77836-charger"; 188 + 189 + maxim,constant-uvolt = <4350000>; 190 + maxim,fast-charge-uamp = <225000>; 191 + maxim,eoc-uamp = <7500>; 192 + maxim,ovp-uvolt = <6500000>; 193 + }; 194 + }; 195 + };
+143
Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/maxim,max77693.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX77693 MicroUSB and Companion Power Management IC 8 + 9 + maintainers: 10 + - Chanwoo Choi <cw00.choi@samsung.com> 11 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 12 + 13 + description: | 14 + This is a part of device tree bindings for Maxim MAX77693 MicroUSB 15 + Integrated Circuit (MUIC). 16 + 17 + The Maxim MAX77693 is a MicroUSB and Companion Power Management IC which 18 + includes voltage current regulators, charger, LED/flash, haptic motor driver 19 + and MicroUSB management IC. 20 + 21 + properties: 22 + compatible: 23 + const: maxim,max77693 24 + 25 + interrupts: 26 + maxItems: 1 27 + 28 + reg: 29 + maxItems: 1 30 + 31 + charger: 32 + $ref: /schemas/power/supply/maxim,max77693.yaml 33 + 34 + led: 35 + $ref: /schemas/leds/maxim,max77693.yaml 36 + 37 + max77693-muic: 38 + type: object 39 + additionalProperties: false 40 + 41 + properties: 42 + compatible: 43 + const: maxim,max77693-muic 44 + 45 + required: 46 + - compatible 47 + 48 + motor-driver: 49 + type: object 50 + additionalProperties: false 51 + 52 + properties: 53 + compatible: 54 + const: maxim,max77693-haptic 55 + 56 + haptic-supply: 57 + description: Power supply to the haptic motor 58 + 59 + pwms: 60 + maxItems: 1 61 + 62 + required: 63 + - compatible 64 + - haptic-supply 65 + - pwms 66 + 67 + regulators: 68 + $ref: ../regulator/maxim,max77693.yaml 69 + description: 70 + List of child nodes that specify the regulators. 71 + 72 + required: 73 + - compatible 74 + - interrupts 75 + - reg 76 + 77 + additionalProperties: false 78 + 79 + examples: 80 + - | 81 + #include <dt-bindings/interrupt-controller/irq.h> 82 + #include <dt-bindings/leds/common.h> 83 + 84 + i2c { 85 + #address-cells = <1>; 86 + #size-cells = <0>; 87 + 88 + pmic@66 { 89 + compatible = "maxim,max77693"; 90 + reg = <0x66>; 91 + interrupt-parent = <&gpx1>; 92 + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; 93 + 94 + regulators { 95 + ESAFEOUT1 { 96 + regulator-name = "ESAFEOUT1"; 97 + }; 98 + 99 + ESAFEOUT2 { 100 + regulator-name = "ESAFEOUT2"; 101 + }; 102 + 103 + CHARGER { 104 + regulator-name = "CHARGER"; 105 + regulator-min-microamp = <60000>; 106 + regulator-max-microamp = <2580000>; 107 + }; 108 + }; 109 + 110 + motor-driver { 111 + compatible = "maxim,max77693-haptic"; 112 + haptic-supply = <&ldo26_reg>; 113 + pwms = <&pwm 0 38022 0>; 114 + }; 115 + 116 + charger { 117 + compatible = "maxim,max77693-charger"; 118 + 119 + maxim,constant-microvolt = <4350000>; 120 + maxim,min-system-microvolt = <3600000>; 121 + maxim,thermal-regulation-celsius = <100>; 122 + maxim,battery-overcurrent-microamp = <3500000>; 123 + maxim,charge-input-threshold-microvolt = <4300000>; 124 + }; 125 + 126 + led { 127 + compatible = "maxim,max77693-led"; 128 + maxim,boost-mode = <LEDS_BOOST_FIXED>; 129 + maxim,boost-mvout = <5000>; 130 + maxim,mvsys-min = <2400>; 131 + 132 + flash-led { 133 + label = "max77693-flash"; 134 + function = LED_FUNCTION_FLASH; 135 + color = <LED_COLOR_ID_WHITE>; 136 + led-sources = <0>, <1>; 137 + led-max-microamp = <500000>; 138 + flash-max-microamp = <1250000>; 139 + flash-max-timeout-us = <1000000>; 140 + }; 141 + }; 142 + }; 143 + };
+68
Documentation/devicetree/bindings/mfd/maxim,max77714.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/maxim,max77714.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MAX77714 PMIC with GPIO, RTC and watchdog from Maxim Integrated. 8 + 9 + maintainers: 10 + - Luca Ceresoli <luca@lucaceresoli.net> 11 + 12 + description: | 13 + MAX77714 is a Power Management IC with 4 buck regulators, 9 14 + low-dropout regulators, 8 GPIOs, RTC and watchdog. 15 + 16 + properties: 17 + compatible: 18 + const: maxim,max77714 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + interrupts: 24 + maxItems: 1 25 + 26 + interrupt-controller: true 27 + 28 + "#interrupt-cells": 29 + const: 2 30 + description: 31 + The first cell is the IRQ number, the second cell is the trigger type. 32 + 33 + regulators: 34 + type: object 35 + additionalProperties: false 36 + 37 + patternProperties: 38 + '^(buck[0-3]|ldo[0-8])$': 39 + type: object 40 + unevaluatedProperties: false 41 + $ref: /schemas/regulator/regulator.yaml# 42 + 43 + required: 44 + - compatible 45 + - reg 46 + - interrupts 47 + - interrupt-controller 48 + - "#interrupt-cells" 49 + 50 + additionalProperties: false 51 + 52 + examples: 53 + - | 54 + #include <dt-bindings/interrupt-controller/irq.h> 55 + i2c { 56 + #address-cells = <1>; 57 + #size-cells = <0>; 58 + 59 + pmic@1c { 60 + compatible = "maxim,max77714"; 61 + reg = <0x1c>; 62 + interrupt-parent = <&gpio2>; 63 + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 64 + 65 + interrupt-controller; 66 + #interrupt-cells = <2>; 67 + }; 68 + };
+194
Documentation/devicetree/bindings/mfd/maxim,max77802.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/maxim,max77802.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX77802 Power Management IC 8 + 9 + maintainers: 10 + - Javier Martinez Canillas <javier@dowhile0.org> 11 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 12 + 13 + description: | 14 + This is a part of device tree bindings for Maxim MAX77802 Power Management 15 + Integrated Circuit (PMIC). 16 + 17 + The Maxim MAX77802 is a Power Management IC which includes voltage and 18 + current regulators (10 high efficiency Buck regulators and 32 Low-DropOut 19 + (LDO)), RTC and clock outputs. 20 + 21 + The MAX77802 provides two 32.768khz clock outputs that can be controlled 22 + (gated/ungated) over I2C. The clock IDs are defined as preprocessor macros 23 + in dt-bindings/clock/maxim,max77802.h. 24 + 25 + properties: 26 + compatible: 27 + const: maxim,max77802 28 + 29 + '#clock-cells': 30 + const: 1 31 + 32 + interrupts: 33 + maxItems: 1 34 + 35 + reg: 36 + maxItems: 1 37 + 38 + regulators: 39 + $ref: /schemas/regulator/maxim,max77802.yaml 40 + description: 41 + List of child nodes that specify the regulators. 42 + 43 + inb1-supply: 44 + description: Power supply for buck1 45 + inb2-supply: 46 + description: Power supply for buck2 47 + inb3-supply: 48 + description: Power supply for buck3 49 + inb4-supply: 50 + description: Power supply for buck4 51 + inb5-supply: 52 + description: Power supply for buck5 53 + inb6-supply: 54 + description: Power supply for buck6 55 + inb7-supply: 56 + description: Power supply for buck7 57 + inb8-supply: 58 + description: Power supply for buck8 59 + inb9-supply: 60 + description: Power supply for buck9 61 + inb10-supply: 62 + description: Power supply for buck10 63 + 64 + inl1-supply: 65 + description: Power supply for LDO8, LDO15 66 + inl2-supply: 67 + description: Power supply for LDO17, LDO27, LDO30, LDO35 68 + inl3-supply: 69 + description: Power supply for LDO3, LDO5, LDO7, LDO7 70 + inl4-supply: 71 + description: Power supply for LDO10, LDO11, LDO13, LDO14 72 + inl5-supply: 73 + description: Power supply for LDO9, LDO19 74 + inl6-supply: 75 + description: Power supply for LDO4, LDO21, LDO24, LDO33 76 + inl7-supply: 77 + description: Power supply for LDO18, LDO20, LDO28, LDO29 78 + inl9-supply: 79 + description: Power supply for LDO12, LDO23, LDO25, LDO26, LDO32, LDO34 80 + inl10-supply: 81 + description: Power supply for LDO1, LDO2 82 + 83 + wakeup-source: true 84 + 85 + required: 86 + - compatible 87 + - '#clock-cells' 88 + - reg 89 + 90 + additionalProperties: false 91 + 92 + examples: 93 + - | 94 + #include <dt-bindings/interrupt-controller/irq.h> 95 + #include <dt-bindings/regulator/maxim,max77802.h> 96 + 97 + i2c { 98 + #address-cells = <1>; 99 + #size-cells = <0>; 100 + 101 + pmic@9 { 102 + compatible = "maxim,max77802"; 103 + interrupt-parent = <&gpx3>; 104 + interrupts = <1 IRQ_TYPE_NONE>; 105 + pinctrl-names = "default"; 106 + pinctrl-0 = <&max77802_irq>, <&pmic_selb>, 107 + <&pmic_dvs_1>, <&pmic_dvs_2>, <&pmic_dvs_3>; 108 + wakeup-source; 109 + reg = <0x9>; 110 + #clock-cells = <1>; 111 + 112 + inb1-supply = <&tps65090_dcdc2>; 113 + inb2-supply = <&tps65090_dcdc1>; 114 + inb3-supply = <&tps65090_dcdc2>; 115 + inb4-supply = <&tps65090_dcdc2>; 116 + inb5-supply = <&tps65090_dcdc1>; 117 + inb6-supply = <&tps65090_dcdc2>; 118 + inb7-supply = <&tps65090_dcdc1>; 119 + inb8-supply = <&tps65090_dcdc1>; 120 + inb9-supply = <&tps65090_dcdc1>; 121 + inb10-supply = <&tps65090_dcdc1>; 122 + 123 + inl1-supply = <&buck5_reg>; 124 + inl2-supply = <&buck7_reg>; 125 + inl3-supply = <&buck9_reg>; 126 + inl4-supply = <&buck9_reg>; 127 + inl5-supply = <&buck9_reg>; 128 + inl6-supply = <&tps65090_dcdc2>; 129 + inl7-supply = <&buck9_reg>; 130 + inl9-supply = <&tps65090_dcdc2>; 131 + inl10-supply = <&buck7_reg>; 132 + 133 + regulators { 134 + BUCK1 { 135 + regulator-name = "vdd_mif"; 136 + regulator-min-microvolt = <800000>; 137 + regulator-max-microvolt = <1300000>; 138 + regulator-always-on; 139 + regulator-boot-on; 140 + regulator-ramp-delay = <12500>; 141 + regulator-state-mem { 142 + regulator-off-in-suspend; 143 + }; 144 + }; 145 + 146 + BUCK2 { 147 + regulator-name = "vdd_arm"; 148 + regulator-min-microvolt = <800000>; 149 + regulator-max-microvolt = <1500000>; 150 + regulator-always-on; 151 + regulator-boot-on; 152 + regulator-ramp-delay = <12500>; 153 + regulator-coupled-with = <&buck3_reg>; 154 + regulator-coupled-max-spread = <300000>; 155 + regulator-state-mem { 156 + regulator-off-in-suspend; 157 + }; 158 + }; 159 + 160 + // ... 161 + 162 + BUCK10 { 163 + regulator-name = "vdd_1v8"; 164 + regulator-min-microvolt = <1800000>; 165 + regulator-max-microvolt = <1800000>; 166 + regulator-always-on; 167 + regulator-boot-on; 168 + regulator-state-mem { 169 + regulator-on-in-suspend; 170 + }; 171 + }; 172 + 173 + LDO1 { 174 + regulator-name = "vdd_1v0"; 175 + regulator-min-microvolt = <1000000>; 176 + regulator-max-microvolt = <1000000>; 177 + regulator-always-on; 178 + regulator-initial-mode = <MAX77802_OPMODE_NORMAL>; 179 + regulator-state-mem { 180 + regulator-on-in-suspend; 181 + regulator-mode = <MAX77802_OPMODE_LP>; 182 + }; 183 + }; 184 + 185 + // ... 186 + 187 + LDO35 { 188 + regulator-name = "ldo_35"; 189 + regulator-min-microvolt = <1200000>; 190 + regulator-max-microvolt = <1200000>; 191 + }; 192 + }; 193 + }; 194 + };
+144
Documentation/devicetree/bindings/mfd/maxim,max77843.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/maxim,max77843.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX77843 MicroUSB and Companion Power Management IC 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for Maxim MAX77843 MicroUSB 14 + Integrated Circuit (MUIC). 15 + 16 + The Maxim MAX77843 is a MicroUSB and Companion Power Management IC which 17 + includes voltage current regulators, charger, fuel-gauge, haptic motor driver 18 + and MicroUSB management IC. 19 + 20 + properties: 21 + compatible: 22 + const: maxim,max77843 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + extcon: 31 + $ref: /schemas/extcon/maxim,max77843.yaml 32 + 33 + motor-driver: 34 + type: object 35 + properties: 36 + compatible: 37 + const: maxim,max77843-haptic 38 + 39 + haptic-supply: 40 + description: Power supply to the haptic motor 41 + 42 + pwms: 43 + maxItems: 1 44 + 45 + required: 46 + - compatible 47 + - haptic-supply 48 + - pwms 49 + 50 + regulators: 51 + $ref: /schemas/regulator/maxim,max77843.yaml 52 + 53 + required: 54 + - compatible 55 + - interrupts 56 + - reg 57 + 58 + additionalProperties: false 59 + 60 + examples: 61 + - | 62 + #include <dt-bindings/interrupt-controller/irq.h> 63 + 64 + i2c { 65 + #address-cells = <1>; 66 + #size-cells = <0>; 67 + 68 + pmic@66 { 69 + compatible = "maxim,max77843"; 70 + interrupt-parent = <&gpa1>; 71 + interrupts = <5 IRQ_TYPE_EDGE_FALLING>; 72 + reg = <0x66>; 73 + 74 + extcon { 75 + compatible = "maxim,max77843-muic"; 76 + 77 + connector { 78 + compatible = "samsung,usb-connector-11pin", 79 + "usb-b-connector"; 80 + label = "micro-USB"; 81 + type = "micro"; 82 + 83 + ports { 84 + #address-cells = <1>; 85 + #size-cells = <0>; 86 + 87 + port@0 { 88 + /* 89 + * TODO: The DTS this is based on does not have 90 + * port@0 which is a required property. The ports 91 + * look incomplete and need fixing. 92 + * Add a disabled port just to satisfy dtschema. 93 + */ 94 + reg = <0>; 95 + status = "disabled"; 96 + }; 97 + 98 + port@3 { 99 + reg = <3>; 100 + endpoint { 101 + remote-endpoint = <&mhl_to_musb_con>; 102 + }; 103 + }; 104 + }; 105 + }; 106 + 107 + ports { 108 + port { 109 + endpoint { 110 + remote-endpoint = <&usb_to_muic>; 111 + }; 112 + }; 113 + }; 114 + }; 115 + 116 + regulators { 117 + compatible = "maxim,max77843-regulator"; 118 + 119 + SAFEOUT1 { 120 + regulator-name = "SAFEOUT1"; 121 + regulator-min-microvolt = <3300000>; 122 + regulator-max-microvolt = <4950000>; 123 + }; 124 + 125 + SAFEOUT2 { 126 + regulator-name = "SAFEOUT2"; 127 + regulator-min-microvolt = <3300000>; 128 + regulator-max-microvolt = <4950000>; 129 + }; 130 + 131 + CHARGER { 132 + regulator-name = "CHARGER"; 133 + regulator-min-microamp = <100000>; 134 + regulator-max-microamp = <3150000>; 135 + }; 136 + }; 137 + 138 + motor-driver { 139 + compatible = "maxim,max77843-haptic"; 140 + haptic-supply = <&ldo38_reg>; 141 + pwms = <&pwm 0 33670 0>; 142 + }; 143 + }; 144 + };
+84
Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/power/supply/maxim,max14577.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC Charger 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB 14 + Integrated Circuit (MUIC). 15 + 16 + See also Documentation/devicetree/bindings/mfd/maxim,max14577.yaml for 17 + additional information and example. 18 + 19 + properties: 20 + compatible: 21 + enum: 22 + - maxim,max14577-charger 23 + - maxim,max77836-charger 24 + 25 + maxim,constant-uvolt: 26 + description: 27 + Battery Constant Voltage in uV 28 + $ref: /schemas/types.yaml#/definitions/uint32 29 + minimum: 4000000 30 + maximum: 4350000 31 + 32 + maxim,eoc-uamp: 33 + description: | 34 + Current in uA for End-Of-Charge mode. 35 + MAX14577: 50000-20000 36 + MAX77836: 5000-100000 37 + $ref: /schemas/types.yaml#/definitions/uint32 38 + 39 + maxim,fast-charge-uamp: 40 + description: | 41 + Current in uA for Fast Charge 42 + MAX14577: 90000-950000 43 + MAX77836: 45000-475000 44 + $ref: /schemas/types.yaml#/definitions/uint32 45 + 46 + maxim,ovp-uvolt: 47 + description: 48 + OverVoltage Protection Threshold in uV; In an overvoltage condition, INT 49 + asserts and charging stops. 50 + $ref: /schemas/types.yaml#/definitions/uint32 51 + enum: [6000000, 6500000, 7000000, 7500000] 52 + 53 + required: 54 + - compatible 55 + - maxim,constant-uvolt 56 + - maxim,eoc-uamp 57 + - maxim,fast-charge-uamp 58 + - maxim,ovp-uvolt 59 + 60 + allOf: 61 + - if: 62 + properties: 63 + compatible: 64 + contains: 65 + const: maxim,max14577-charger 66 + then: 67 + properties: 68 + maxim,eoc-uamp: 69 + minimum: 50000 70 + maximum: 200000 71 + maxim,fast-charge-uamp: 72 + minimum: 90000 73 + maximum: 950000 74 + else: 75 + # max77836 76 + properties: 77 + maxim,eoc-uamp: 78 + minimum: 5000 79 + maximum: 100000 80 + maxim,fast-charge-uamp: 81 + minimum: 45000 82 + maximum: 475000 83 + 84 + additionalProperties: false
+70
Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/power/supply/maxim,max77693.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX77693 MicroUSB and Companion Power Management IC Charger 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated 14 + Circuit (MUIC). 15 + 16 + See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for 17 + additional information and example. 18 + 19 + properties: 20 + compatible: 21 + const: maxim,max77693-charger 22 + 23 + maxim,constant-microvolt: 24 + description: | 25 + Battery constant voltage in uV. The charger will operate in fast 26 + charge constant current mode till battery voltage reaches this level. 27 + Then the charger will switch to fast charge constant voltage mode. 28 + Also vsys (system voltage) will be set to this value when DC power is 29 + supplied but charger is not enabled. 30 + Valid values: 3650000 - 4400000, step by 25000 (rounded down) 31 + minimum: 3650000 32 + maximum: 4400000 33 + default: 4200000 34 + 35 + maxim,min-system-microvolt: 36 + description: | 37 + Minimal system voltage in uV. 38 + enum: [3000000, 3100000, 3200000, 3300000, 3400000, 3500000, 39 + 3600000, 3700000] 40 + default: 3600000 41 + 42 + maxim,thermal-regulation-celsius: 43 + description: | 44 + Temperature in Celsius for entering high temperature charging mode. 45 + If die temperature exceeds this value the charging current will be 46 + reduced by 105 mA/Celsius. 47 + enum: [70, 85, 100, 115] 48 + default: 100 49 + 50 + maxim,battery-overcurrent-microamp: 51 + description: | 52 + Overcurrent protection threshold in uA (current from battery to 53 + system). 54 + Valid values: 2000000 - 3500000, step by 250000 (rounded down) 55 + minimum: 2000000 56 + maximum: 3500000 57 + default: 3500000 58 + 59 + maxim,charge-input-threshold-microvolt: 60 + description: | 61 + Threshold voltage in uV for triggering input voltage regulation loop. 62 + If input voltage decreases below this value, the input current will 63 + be reduced to reach the threshold voltage. 64 + enum: [4300000, 4700000, 4800000, 4900000] 65 + default: 4300000 66 + 67 + required: 68 + - compatible 69 + 70 + additionalProperties: false
-111
Documentation/devicetree/bindings/regulator/max77802.txt
··· 1 - Binding for Maxim MAX77802 regulators 2 - 3 - This is a part of device tree bindings of MAX77802 multi-function device. 4 - More information can be found in bindings/mfd/max77802.txt file. 5 - 6 - The MAX77802 PMIC has 10 high-efficiency Buck and 32 Low-dropout (LDO) 7 - regulators that can be controlled over I2C. 8 - 9 - Following properties should be present in main device node of the MFD chip. 10 - 11 - Optional properties: 12 - - inb1-supply: The input supply for BUCK1 13 - - inb2-supply: The input supply for BUCK2 14 - - inb3-supply: The input supply for BUCK3 15 - - inb4-supply: The input supply for BUCK4 16 - - inb5-supply: The input supply for BUCK5 17 - - inb6-supply: The input supply for BUCK6 18 - - inb7-supply: The input supply for BUCK7 19 - - inb8-supply: The input supply for BUCK8 20 - - inb9-supply: The input supply for BUCK9 21 - - inb10-supply: The input supply for BUCK10 22 - - inl1-supply: The input supply for LDO8 and LDO15 23 - - inl2-supply: The input supply for LDO17, LDO27, LDO30 and LDO35 24 - - inl3-supply: The input supply for LDO3, LDO5, LDO6 and LDO7 25 - - inl4-supply: The input supply for LDO10, LDO11, LDO13 and LDO14 26 - - inl5-supply: The input supply for LDO9 and LDO19 27 - - inl6-supply: The input supply for LDO4, LDO21, LDO24 and LDO33 28 - - inl7-supply: The input supply for LDO18, LDO20, LDO28 and LDO29 29 - - inl9-supply: The input supply for LDO12, LDO23, LDO25, LDO26, LDO32 and LDO34 30 - - inl10-supply: The input supply for LDO1 and LDO2 31 - 32 - Optional nodes: 33 - - regulators : The regulators of max77802 have to be instantiated 34 - under subnode named "regulators" using the following format. 35 - 36 - regulator-name { 37 - standard regulator constraints.... 38 - }; 39 - refer Documentation/devicetree/bindings/regulator/regulator.txt 40 - 41 - The regulator node name should be initialized with a string to get matched 42 - with their hardware counterparts as follow. The valid names are: 43 - 44 - -LDOn : for LDOs, where n can lie in ranges 1-15, 17-21, 23-30 45 - and 32-35. 46 - example: LDO1, LDO2, LDO35. 47 - -BUCKn : for BUCKs, where n can lie in range 1 to 10. 48 - example: BUCK1, BUCK5, BUCK10. 49 - 50 - The max77802 regulator supports two different operating modes: Normal and Low 51 - Power Mode. Some regulators support the modes to be changed at startup or by 52 - the consumers during normal operation while others only support to change the 53 - mode during system suspend. The standard regulator suspend states binding can 54 - be used to configure the regulator operating mode. 55 - 56 - The regulators that support the standard "regulator-initial-mode" property, 57 - changing their mode during normal operation are: LDOs 1, 3, 20 and 21. 58 - 59 - The possible values for "regulator-initial-mode" and "regulator-mode" are: 60 - 1: Normal regulator voltage output mode. 61 - 3: Low Power which reduces the quiescent current down to only 1uA 62 - 63 - The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h 64 - header and can be included by device tree source files. 65 - 66 - The standard "regulator-mode" property can only be used for regulators that 67 - support changing their mode to Low Power Mode during suspend. These regulators 68 - are: BUCKs 2-4 and LDOs 1-35. Also, it only takes effect if the regulator has 69 - been enabled for the given suspend state using "regulator-on-in-suspend" and 70 - has not been disabled for that state using "regulator-off-in-suspend". 71 - 72 - Example: 73 - 74 - max77802@9 { 75 - compatible = "maxim,max77802"; 76 - interrupt-parent = <&wakeup_eint>; 77 - interrupts = <26 0>; 78 - reg = <0x09>; 79 - #address-cells = <1>; 80 - #size-cells = <0>; 81 - 82 - inb1-supply = <&parent_reg>; 83 - 84 - regulators { 85 - ldo1_reg: LDO1 { 86 - regulator-name = "vdd_1v0"; 87 - regulator-min-microvolt = <1000000>; 88 - regulator-max-microvolt = <1000000>; 89 - regulator-always-on; 90 - regulator-initial-mode = <MAX77802_OPMODE_LP>; 91 - }; 92 - 93 - ldo11_reg: LDO11 { 94 - regulator-name = "vdd_ldo11"; 95 - regulator-min-microvolt = <1900000>; 96 - regulator-max-microvolt = <1900000>; 97 - regulator-always-on; 98 - regulator-state-mem { 99 - regulator-on-in-suspend; 100 - regulator-mode = <MAX77802_OPMODE_LP>; 101 - }; 102 - }; 103 - 104 - buck1_reg: BUCK1 { 105 - regulator-name = "vdd_mif"; 106 - regulator-min-microvolt = <950000>; 107 - regulator-max-microvolt = <1300000>; 108 - regulator-always-on; 109 - regulator-boot-on; 110 - }; 111 - };
+78
Documentation/devicetree/bindings/regulator/maxim,max14577.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/maxim,max14577.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC regulators 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB 14 + Integrated Circuit (MUIC). 15 + 16 + See also Documentation/devicetree/bindings/mfd/maxim,max14577.yaml for 17 + additional information and example. 18 + 19 + properties: 20 + compatible: 21 + enum: 22 + - maxim,max14577-regulator 23 + - maxim,max77836-regulator 24 + 25 + CHARGER: 26 + type: object 27 + $ref: regulator.yaml# 28 + unevaluatedProperties: false 29 + description: | 30 + Current regulator. 31 + 32 + properties: 33 + regulator-min-microvolt: false 34 + regulator-max-microvolt: false 35 + 36 + SAFEOUT: 37 + type: object 38 + $ref: regulator.yaml# 39 + unevaluatedProperties: false 40 + description: | 41 + Safeout LDO regulator (fixed voltage). 42 + 43 + properties: 44 + regulator-min-microamp: false 45 + regulator-max-microamp: false 46 + regulator-min-microvolt: 47 + const: 4900000 48 + regulator-max-microvolt: 49 + const: 4900000 50 + 51 + patternProperties: 52 + "^LDO[12]$": 53 + type: object 54 + $ref: regulator.yaml# 55 + unevaluatedProperties: false 56 + description: | 57 + Current regulator. 58 + 59 + properties: 60 + regulator-min-microamp: false 61 + regulator-max-microamp: false 62 + regulator-min-microvolt: 63 + minimum: 800000 64 + regulator-max-microvolt: 65 + maximum: 3950000 66 + 67 + allOf: 68 + - if: 69 + properties: 70 + compatible: 71 + contains: 72 + const: maxim,max14577-regulator 73 + then: 74 + properties: 75 + LDO1: false 76 + LDO2: false 77 + 78 + additionalProperties: false
+60
Documentation/devicetree/bindings/regulator/maxim,max77693.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/maxim,max77693.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX77693 MicroUSB and Companion Power Management IC regulators 8 + 9 + maintainers: 10 + - Chanwoo Choi <cw00.choi@samsung.com> 11 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 12 + 13 + description: | 14 + This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated 15 + Circuit (MUIC). 16 + 17 + See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for 18 + additional information and example. 19 + 20 + properties: 21 + CHARGER: 22 + type: object 23 + $ref: regulator.yaml# 24 + additionalProperties: false 25 + description: | 26 + Current regulator. 27 + 28 + properties: 29 + regulator-name: true 30 + regulator-always-on: true 31 + regulator-boot-on: true 32 + regulator-min-microamp: 33 + minimum: 60000 34 + regulator-max-microamp: 35 + maximum: 2580000 36 + 37 + required: 38 + - regulator-name 39 + 40 + patternProperties: 41 + "^ESAFEOUT[12]$": 42 + type: object 43 + $ref: regulator.yaml# 44 + additionalProperties: false 45 + description: | 46 + Safeout LDO regulator. 47 + 48 + properties: 49 + regulator-name: true 50 + regulator-always-on: true 51 + regulator-boot-on: true 52 + regulator-min-microvolt: 53 + minimum: 3300000 54 + regulator-max-microvolt: 55 + maximum: 4950000 56 + 57 + required: 58 + - regulator-name 59 + 60 + additionalProperties: false
+85
Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/maxim,max77802.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX77802 Power Management IC regulators 8 + 9 + maintainers: 10 + - Javier Martinez Canillas <javier@dowhile0.org> 11 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 12 + 13 + description: | 14 + This is a part of device tree bindings for Maxim MAX77802 Power Management 15 + Integrated Circuit (PMIC). 16 + 17 + The Maxim MAX77686 provides 10 high-efficiency Buck and 32 Low-DropOut (LDO) 18 + regulators. 19 + 20 + See also Documentation/devicetree/bindings/mfd/maxim,max77802.yaml for 21 + additional information and example. 22 + 23 + Certain regulators support "regulator-initial-mode" and "regulator-mode". 24 + The valid modes list is defined in the dt-bindings/regulator/maxim,max77802.h 25 + and their meaning is:: 26 + 1 - Normal regulator voltage output mode. 27 + 3 - Low Power which reduces the quiescent current down to only 1uA 28 + 29 + The standard "regulator-mode" property can only be used for regulators that 30 + support changing their mode to Low Power Mode during suspend. These 31 + regulators are:: bucks 2-4 and LDOs 1-35. Also, it only takes effect if the 32 + regulator has been enabled for the given suspend state using 33 + "regulator-on-in-suspend" and has not been disabled for that state using 34 + "regulator-off-in-suspend". 35 + 36 + patternProperties: 37 + # LDO1, LDO3, LDO20, LDO21 38 + "^LDO([13]|2[01])$": 39 + type: object 40 + $ref: regulator.yaml# 41 + unevaluatedProperties: false 42 + description: 43 + LDOs supporting the regulator-initial-mode property and changing their 44 + mode during normal operation. 45 + 46 + # LDO2, LDO4-15, LDO17-19, LDO23-30, LDO32-35 47 + "^LDO([24-9]|1[0-5789]|2[3-9]|3[02345])$": 48 + type: object 49 + $ref: regulator.yaml# 50 + unevaluatedProperties: false 51 + description: 52 + LDOs supporting the regulator-mode property (changing mode to Low Power 53 + Mode during suspend). 54 + 55 + properties: 56 + regulator-initial-mode: false 57 + 58 + # buck2-4 59 + "^BUCK[2-4]$": 60 + type: object 61 + $ref: regulator.yaml# 62 + unevaluatedProperties: false 63 + description: 64 + bucks supporting the regulator-mode property (changing mode to Low Power 65 + Mode during suspend). 66 + 67 + properties: 68 + regulator-initial-mode: false 69 + 70 + # buck1, buck5-10 71 + "^BUCK([15-9]|10)$": 72 + type: object 73 + $ref: regulator.yaml# 74 + unevaluatedProperties: false 75 + 76 + properties: 77 + regulator-initial-mode: false 78 + 79 + patternProperties: 80 + regulator-state-(standby|mem|disk): 81 + type: object 82 + properties: 83 + regulator-mode: false 84 + 85 + additionalProperties: false
+65
Documentation/devicetree/bindings/regulator/maxim,max77843.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/maxim,max77843.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Maxim MAX77843 MicroUSB and Companion Power Management IC regulators 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: | 13 + This is a part of device tree bindings for Maxim MAX77843 MicroUSB Integrated 14 + Circuit (MUIC). 15 + 16 + See also Documentation/devicetree/bindings/mfd/maxim,max77843.yaml for 17 + additional information and example. 18 + 19 + properties: 20 + compatible: 21 + const: maxim,max77843-regulator 22 + 23 + CHARGER: 24 + type: object 25 + $ref: regulator.yaml# 26 + additionalProperties: false 27 + description: | 28 + Current regulator. 29 + 30 + properties: 31 + regulator-name: true 32 + regulator-always-on: true 33 + regulator-boot-on: true 34 + regulator-min-microamp: 35 + minimum: 100000 36 + regulator-max-microamp: 37 + maximum: 3150000 38 + 39 + required: 40 + - regulator-name 41 + 42 + patternProperties: 43 + "^SAFEOUT[12]$": 44 + type: object 45 + $ref: regulator.yaml# 46 + additionalProperties: false 47 + description: | 48 + Safeout LDO regulator. 49 + 50 + properties: 51 + regulator-name: true 52 + regulator-always-on: true 53 + regulator-boot-on: true 54 + regulator-min-microvolt: 55 + minimum: 3300000 56 + regulator-max-microvolt: 57 + maximum: 4950000 58 + 59 + required: 60 + - regulator-name 61 + 62 + required: 63 + - compatible 64 + 65 + additionalProperties: false
+1 -1
Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml
··· 22 22 23 23 [1] Documentation/devicetree/bindings/serial/samsung_uart.yaml 24 24 [2] Documentation/devicetree/bindings/i2c/i2c-exynos5.txt 25 - [3] Documentation/devicetree/bindings/spi/spi-samsung.txt 25 + [3] Documentation/devicetree/bindings/spi/samsung,spi.yaml 26 26 27 27 properties: 28 28 $nodename:
+33
Documentation/devicetree/bindings/spi/samsung,spi-peripheral-props.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/spi/samsung,spi-peripheral-props.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Peripheral-specific properties for Samsung S3C/S5P/Exynos SoC SPI controller 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: 13 + See spi-peripheral-props.yaml for more info. 14 + 15 + properties: 16 + controller-data: 17 + type: object 18 + additionalProperties: false 19 + 20 + properties: 21 + samsung,spi-feedback-delay: 22 + description: | 23 + The sampling phase shift to be applied on the miso line (to account 24 + for any lag in the miso line). Valid values: 25 + - 0: No phase shift. 26 + - 1: 90 degree phase shift sampling. 27 + - 2: 180 degree phase shift sampling. 28 + - 3: 270 degree phase shift sampling. 29 + $ref: /schemas/types.yaml#/definitions/uint32 30 + enum: [0, 1, 2, 3] 31 + default: 0 32 + 33 + additionalProperties: true
+187
Documentation/devicetree/bindings/spi/samsung,spi.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/spi/samsung,spi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Samsung S3C/S5P/Exynos SoC SPI controller 8 + 9 + maintainers: 10 + - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 11 + 12 + description: 13 + All the SPI controller nodes should be represented in the aliases node using 14 + the following format 'spi{n}' where n is a unique number for the alias. 15 + 16 + properties: 17 + compatible: 18 + oneOf: 19 + - enum: 20 + - samsung,s3c2443-spi # for S3C2443, S3C2416 and S3C2450 21 + - samsung,s3c6410-spi 22 + - samsung,s5pv210-spi # for S5PV210 and S5PC110 23 + - samsung,exynos5433-spi 24 + - const: samsung,exynos7-spi 25 + deprecated: true 26 + 27 + clocks: 28 + minItems: 2 29 + maxItems: 3 30 + 31 + clock-names: 32 + minItems: 2 33 + maxItems: 3 34 + 35 + cs-gpios: true 36 + 37 + dmas: 38 + minItems: 2 39 + maxItems: 2 40 + 41 + dma-names: 42 + items: 43 + - const: tx 44 + - const: rx 45 + 46 + interrupts: 47 + maxItems: 1 48 + 49 + no-cs-readback: 50 + description: 51 + The CS line is disconnected, therefore the device should not operate 52 + based on CS signalling. 53 + type: boolean 54 + 55 + num-cs: 56 + minimum: 1 57 + maximum: 4 58 + default: 1 59 + 60 + samsung,spi-src-clk: 61 + description: 62 + If the spi controller includes a internal clock mux to select the clock 63 + source for the spi bus clock, this property can be used to indicate the 64 + clock to be used for driving the spi bus clock. If not specified, the 65 + clock number 0 is used as default. 66 + $ref: /schemas/types.yaml#/definitions/uint32 67 + default: 0 68 + 69 + reg: 70 + maxItems: 1 71 + 72 + required: 73 + - compatible 74 + - clocks 75 + - clock-names 76 + - dmas 77 + - dma-names 78 + - interrupts 79 + - reg 80 + 81 + allOf: 82 + - $ref: spi-controller.yaml# 83 + - if: 84 + properties: 85 + compatible: 86 + contains: 87 + const: samsung,exynos5433-spi 88 + then: 89 + properties: 90 + clocks: 91 + minItems: 3 92 + maxItems: 3 93 + clock-names: 94 + items: 95 + - const: spi 96 + - enum: 97 + - spi_busclk0 98 + - spi_busclk1 99 + - spi_busclk2 100 + - spi_busclk3 101 + - const: spi_ioclk 102 + else: 103 + properties: 104 + clocks: 105 + minItems: 2 106 + maxItems: 2 107 + clock-names: 108 + items: 109 + - const: spi 110 + - enum: 111 + - spi_busclk0 112 + - spi_busclk1 113 + - spi_busclk2 114 + - spi_busclk3 115 + 116 + unevaluatedProperties: false 117 + 118 + examples: 119 + - | 120 + #include <dt-bindings/clock/exynos5433.h> 121 + #include <dt-bindings/clock/samsung,s2mps11.h> 122 + #include <dt-bindings/interrupt-controller/arm-gic.h> 123 + #include <dt-bindings/gpio/gpio.h> 124 + 125 + spi@14d30000 { 126 + compatible = "samsung,exynos5433-spi"; 127 + reg = <0x14d30000 0x100>; 128 + interrupts = <GIC_SPI 433 IRQ_TYPE_LEVEL_HIGH>; 129 + dmas = <&pdma0 11>, <&pdma0 10>; 130 + dma-names = "tx", "rx"; 131 + #address-cells = <1>; 132 + #size-cells = <0>; 133 + clocks = <&cmu_peric CLK_PCLK_SPI1>, 134 + <&cmu_peric CLK_SCLK_SPI1>, 135 + <&cmu_peric CLK_SCLK_IOCLK_SPI1>; 136 + clock-names = "spi", 137 + "spi_busclk0", 138 + "spi_ioclk"; 139 + samsung,spi-src-clk = <0>; 140 + pinctrl-names = "default"; 141 + pinctrl-0 = <&spi1_bus>; 142 + num-cs = <1>; 143 + 144 + cs-gpios = <&gpd6 3 GPIO_ACTIVE_HIGH>; 145 + 146 + audio-codec@0 { 147 + compatible = "wlf,wm5110"; 148 + reg = <0x0>; 149 + spi-max-frequency = <20000000>; 150 + interrupt-parent = <&gpa0>; 151 + interrupts = <4 IRQ_TYPE_NONE>; 152 + clocks = <&pmu_system_controller 0>, 153 + <&s2mps13_osc S2MPS11_CLK_BT>; 154 + clock-names = "mclk1", "mclk2"; 155 + 156 + gpio-controller; 157 + #gpio-cells = <2>; 158 + interrupt-controller; 159 + #interrupt-cells = <2>; 160 + 161 + wlf,micd-detect-debounce = <300>; 162 + wlf,micd-bias-start-time = <0x1>; 163 + wlf,micd-rate = <0x7>; 164 + wlf,micd-dbtime = <0x2>; 165 + wlf,micd-force-micbias; 166 + wlf,micd-configs = <0x0 1 0>; 167 + wlf,hpdet-channel = <1>; 168 + wlf,gpsw = <0x1>; 169 + wlf,inmode = <2 0 2 0>; 170 + 171 + wlf,reset = <&gpc0 7 GPIO_ACTIVE_HIGH>; 172 + wlf,ldoena = <&gpf0 0 GPIO_ACTIVE_HIGH>; 173 + 174 + /* core supplies */ 175 + AVDD-supply = <&ldo18_reg>; 176 + DBVDD1-supply = <&ldo18_reg>; 177 + CPVDD-supply = <&ldo18_reg>; 178 + DBVDD2-supply = <&ldo18_reg>; 179 + DBVDD3-supply = <&ldo18_reg>; 180 + SPKVDDL-supply = <&ldo18_reg>; 181 + SPKVDDR-supply = <&ldo18_reg>; 182 + 183 + controller-data { 184 + samsung,spi-feedback-delay = <0>; 185 + }; 186 + }; 187 + };
+1
Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
··· 85 85 # The controller specific properties go here. 86 86 allOf: 87 87 - $ref: cdns,qspi-nor-peripheral-props.yaml# 88 + - $ref: samsung,spi-peripheral-props.yaml# 88 89 89 90 additionalProperties: true
-122
Documentation/devicetree/bindings/spi/spi-samsung.txt
··· 1 - * Samsung SPI Controller 2 - 3 - The Samsung SPI controller is used to interface with various devices such as flash 4 - and display controllers using the SPI communication interface. 5 - 6 - Required SoC Specific Properties: 7 - 8 - - compatible: should be one of the following. 9 - - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms 10 - - samsung,s3c6410-spi: for s3c6410 platforms 11 - - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms 12 - - samsung,exynos5433-spi: for exynos5433 compatible controllers 13 - - samsung,exynos7-spi: for exynos7 platforms <DEPRECATED> 14 - 15 - - reg: physical base address of the controller and length of memory mapped 16 - region. 17 - 18 - - interrupts: The interrupt number to the cpu. The interrupt specifier format 19 - depends on the interrupt controller. 20 - 21 - - dmas : Two or more DMA channel specifiers following the convention outlined 22 - in bindings/dma/dma.txt 23 - 24 - - dma-names: Names for the dma channels. There must be at least one channel 25 - named "tx" for transmit and named "rx" for receive. 26 - 27 - - clocks: specifies the clock IDs provided to the SPI controller; they are 28 - required for interacting with the controller itself, for synchronizing the bus 29 - and as I/O clock (the latter is required by exynos5433 and exynos7). 30 - 31 - - clock-names: string names of the clocks in the 'clocks' property; for all the 32 - the devices the names must be "spi", "spi_busclkN" (where N is determined by 33 - "samsung,spi-src-clk"), while Exynos5433 should specify a third clock 34 - "spi_ioclk" for the I/O clock. 35 - 36 - Required Board Specific Properties: 37 - 38 - - #address-cells: should be 1. 39 - - #size-cells: should be 0. 40 - 41 - Optional Board Specific Properties: 42 - 43 - - samsung,spi-src-clk: If the spi controller includes a internal clock mux to 44 - select the clock source for the spi bus clock, this property can be used to 45 - indicate the clock to be used for driving the spi bus clock. If not specified, 46 - the clock number 0 is used as default. 47 - 48 - - num-cs: Specifies the number of chip select lines supported. If 49 - not specified, the default number of chip select lines is set to 1. 50 - 51 - - cs-gpios: should specify GPIOs used for chipselects (see spi-bus.txt) 52 - 53 - - no-cs-readback: the CS line is disconnected, therefore the device should not 54 - operate based on CS signalling. 55 - 56 - SPI Controller specific data in SPI slave nodes: 57 - 58 - - The spi slave nodes should provide the following information which is required 59 - by the spi controller. 60 - 61 - - samsung,spi-feedback-delay: The sampling phase shift to be applied on the 62 - miso line (to account for any lag in the miso line). The following are the 63 - valid values. 64 - 65 - - 0: No phase shift. 66 - - 1: 90 degree phase shift sampling. 67 - - 2: 180 degree phase shift sampling. 68 - - 3: 270 degree phase shift sampling. 69 - 70 - Aliases: 71 - 72 - - All the SPI controller nodes should be represented in the aliases node using 73 - the following format 'spi{n}' where n is a unique number for the alias. 74 - 75 - 76 - Example: 77 - 78 - - SoC Specific Portion: 79 - 80 - spi_0: spi@12d20000 { 81 - compatible = "samsung,exynos4210-spi"; 82 - reg = <0x12d20000 0x100>; 83 - interrupts = <0 66 0>; 84 - dmas = <&pdma0 5 85 - &pdma0 4>; 86 - dma-names = "tx", "rx"; 87 - #address-cells = <1>; 88 - #size-cells = <0>; 89 - }; 90 - 91 - - Board Specific Portion: 92 - 93 - spi_0: spi@12d20000 { 94 - #address-cells = <1>; 95 - #size-cells = <0>; 96 - pinctrl-names = "default"; 97 - pinctrl-0 = <&spi0_bus>; 98 - cs-gpios = <&gpa2 5 0>; 99 - 100 - w25q80bw@0 { 101 - #address-cells = <1>; 102 - #size-cells = <1>; 103 - compatible = "w25x80"; 104 - reg = <0>; 105 - spi-max-frequency = <10000>; 106 - 107 - controller-data { 108 - samsung,spi-feedback-delay = <0>; 109 - }; 110 - 111 - partition@0 { 112 - label = "U-Boot"; 113 - reg = <0x0 0x40000>; 114 - read-only; 115 - }; 116 - 117 - partition@40000 { 118 - label = "Kernel"; 119 - reg = <0x40000 0xc0000>; 120 - }; 121 - }; 122 - };
+15 -3
MAINTAINERS
··· 11691 11691 F: drivers/regulator/max77650-regulator.c 11692 11692 F: include/linux/mfd/max77650.h 11693 11693 11694 + MAXIM MAX77714 PMIC MFD DRIVER 11695 + M: Luca Ceresoli <luca@lucaceresoli.net> 11696 + S: Maintained 11697 + F: Documentation/devicetree/bindings/mfd/maxim,max77714.yaml 11698 + F: drivers/mfd/max77714.c 11699 + F: include/linux/mfd/max77714.h 11700 + 11694 11701 MAXIM MAX77802 PMIC REGULATOR DEVICE DRIVER 11695 11702 M: Javier Martinez Canillas <javier@dowhile0.org> 11696 11703 L: linux-kernel@vger.kernel.org 11697 11704 S: Supported 11698 - F: Documentation/devicetree/bindings/*/*max77802.txt 11705 + F: Documentation/devicetree/bindings/*/*max77802.yaml 11699 11706 F: drivers/regulator/max77802-regulator.c 11700 11707 F: include/dt-bindings/*/*max77802.h 11701 11708 ··· 11717 11710 M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> 11718 11711 L: linux-pm@vger.kernel.org 11719 11712 S: Supported 11713 + F: Documentation/devicetree/bindings/power/supply/maxim,max14577.yaml 11714 + F: Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml 11720 11715 F: drivers/power/supply/max14577_charger.c 11721 11716 F: drivers/power/supply/max77693_charger.c 11722 11717 ··· 11728 11719 M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> 11729 11720 L: linux-kernel@vger.kernel.org 11730 11721 S: Supported 11722 + F: Documentation/devicetree/bindings/*/maxim,max14577.yaml 11731 11723 F: Documentation/devicetree/bindings/*/maxim,max77686.yaml 11724 + F: Documentation/devicetree/bindings/*/maxim,max77693.yaml 11725 + F: Documentation/devicetree/bindings/*/maxim,max77843.yaml 11732 11726 F: Documentation/devicetree/bindings/clock/maxim,max77686.txt 11733 - F: Documentation/devicetree/bindings/mfd/max14577.txt 11734 11727 F: Documentation/devicetree/bindings/mfd/max77693.txt 11728 + F: drivers/*/*max77843.c 11735 11729 F: drivers/*/max14577*.c 11736 11730 F: drivers/*/max77686*.c 11737 11731 F: drivers/*/max77693*.c ··· 17101 17089 L: linux-spi@vger.kernel.org 17102 17090 L: linux-samsung-soc@vger.kernel.org 17103 17091 S: Maintained 17104 - F: Documentation/devicetree/bindings/spi/spi-samsung.txt 17092 + F: Documentation/devicetree/bindings/spi/samsung,spi*.yaml 17105 17093 F: drivers/spi/spi-s3c* 17106 17094 F: include/linux/platform_data/spi-s3c64xx.h 17107 17095 F: include/linux/spi/s3c24xx-fiq.h
+3 -1
drivers/iio/temperature/iqs620at-temp.c
··· 17 17 18 18 #define IQS620_TEMP_SCALE 1000 19 19 #define IQS620_TEMP_OFFSET (-100) 20 + #define IQS620_TEMP_OFFSET_V3 (-40) 20 21 21 22 static int iqs620_temp_read_raw(struct iio_dev *indio_dev, 22 23 struct iio_chan_spec const *chan, ··· 42 41 return IIO_VAL_INT; 43 42 44 43 case IIO_CHAN_INFO_OFFSET: 45 - *val = IQS620_TEMP_OFFSET; 44 + *val = iqs62x->hw_num < IQS620_HW_NUM_V3 ? IQS620_TEMP_OFFSET 45 + : IQS620_TEMP_OFFSET_V3; 46 46 return IIO_VAL_INT; 47 47 48 48 default:
+14
drivers/mfd/Kconfig
··· 849 849 additional drivers must be enabled in order to use the functionality 850 850 of the device. 851 851 852 + config MFD_MAX77714 853 + tristate "Maxim Semiconductor MAX77714 PMIC Support" 854 + depends on I2C 855 + depends on OF || COMPILE_TEST 856 + select MFD_CORE 857 + select REGMAP_I2C 858 + help 859 + Say yes here to add support for Maxim Semiconductor MAX77714. 860 + This is a Power Management IC with 4 buck regulators, 9 861 + low-dropout regulators, 8 GPIOs, RTC, watchdog etc. This driver 862 + provides common support for accessing the device; additional 863 + drivers must be enabled in order to use each functionality of the 864 + device. 865 + 852 866 config MFD_MAX77843 853 867 bool "Maxim Semiconductor MAX77843 PMIC Support" 854 868 depends on I2C=y
+1
drivers/mfd/Makefile
··· 162 162 obj-$(CONFIG_MFD_MAX77650) += max77650.o 163 163 obj-$(CONFIG_MFD_MAX77686) += max77686.o 164 164 obj-$(CONFIG_MFD_MAX77693) += max77693.o 165 + obj-$(CONFIG_MFD_MAX77714) += max77714.o 165 166 obj-$(CONFIG_MFD_MAX77843) += max77843.o 166 167 obj-$(CONFIG_MFD_MAX8907) += max8907.o 167 168 max8925-objs := max8925-core.o max8925-i2c.o
+3 -3
drivers/mfd/iqs62x.c
··· 898 898 struct iqs62x_info info; 899 899 unsigned int val; 900 900 int ret, i, j; 901 - u8 sw_num = 0; 902 901 const char *fw_name = NULL; 903 902 904 903 iqs62x = devm_kzalloc(&client->dev, sizeof(*iqs62x), GFP_KERNEL); ··· 948 949 if (info.sw_num < iqs62x->dev_desc->sw_num) 949 950 continue; 950 951 951 - sw_num = info.sw_num; 952 + iqs62x->sw_num = info.sw_num; 953 + iqs62x->hw_num = info.hw_num; 952 954 953 955 /* 954 956 * Read each of the device's designated calibration registers, ··· 985 985 return -EINVAL; 986 986 } 987 987 988 - if (!sw_num) { 988 + if (!iqs62x->sw_num) { 989 989 dev_err(&client->dev, "Unrecognized software number: 0x%02X\n", 990 990 info.sw_num); 991 991 return -EINVAL;
+1 -1
drivers/mfd/max77686.c
··· 87 87 reg == MAX77802_RTC_WEEKDAY || 88 88 reg == MAX77802_RTC_MONTH || 89 89 reg == MAX77802_RTC_YEAR || 90 - reg == MAX77802_RTC_DATE); 90 + reg == MAX77802_RTC_MONTHDAY); 91 91 } 92 92 93 93 static bool max77802_is_volatile_reg(struct device *dev, unsigned int reg)
+152
drivers/mfd/max77714.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * Maxim MAX77714 Core Driver 4 + * 5 + * Copyright (C) 2022 Luca Ceresoli 6 + * Author: Luca Ceresoli <luca@lucaceresoli.net> 7 + */ 8 + 9 + #include <linux/i2c.h> 10 + #include <linux/interrupt.h> 11 + #include <linux/mfd/core.h> 12 + #include <linux/mfd/max77714.h> 13 + #include <linux/module.h> 14 + #include <linux/of.h> 15 + #include <linux/regmap.h> 16 + 17 + static const struct mfd_cell max77714_cells[] = { 18 + { .name = "max77714-watchdog" }, 19 + { .name = "max77714-rtc" }, 20 + }; 21 + 22 + static const struct regmap_range max77714_readable_ranges[] = { 23 + regmap_reg_range(MAX77714_INT_TOP, MAX77714_INT_TOP), 24 + regmap_reg_range(MAX77714_INT_TOPM, MAX77714_INT_TOPM), 25 + regmap_reg_range(MAX77714_32K_STATUS, MAX77714_32K_CONFIG), 26 + regmap_reg_range(MAX77714_CNFG_GLBL2, MAX77714_CNFG2_ONOFF), 27 + }; 28 + 29 + static const struct regmap_range max77714_writable_ranges[] = { 30 + regmap_reg_range(MAX77714_INT_TOPM, MAX77714_INT_TOPM), 31 + regmap_reg_range(MAX77714_32K_CONFIG, MAX77714_32K_CONFIG), 32 + regmap_reg_range(MAX77714_CNFG_GLBL2, MAX77714_CNFG2_ONOFF), 33 + }; 34 + 35 + static const struct regmap_access_table max77714_readable_table = { 36 + .yes_ranges = max77714_readable_ranges, 37 + .n_yes_ranges = ARRAY_SIZE(max77714_readable_ranges), 38 + }; 39 + 40 + static const struct regmap_access_table max77714_writable_table = { 41 + .yes_ranges = max77714_writable_ranges, 42 + .n_yes_ranges = ARRAY_SIZE(max77714_writable_ranges), 43 + }; 44 + 45 + static const struct regmap_config max77714_regmap_config = { 46 + .reg_bits = 8, 47 + .val_bits = 8, 48 + .max_register = MAX77714_CNFG2_ONOFF, 49 + .rd_table = &max77714_readable_table, 50 + .wr_table = &max77714_writable_table, 51 + }; 52 + 53 + static const struct regmap_irq max77714_top_irqs[] = { 54 + REGMAP_IRQ_REG(MAX77714_IRQ_TOP_ONOFF, 0, MAX77714_INT_TOP_ONOFF), 55 + REGMAP_IRQ_REG(MAX77714_IRQ_TOP_RTC, 0, MAX77714_INT_TOP_RTC), 56 + REGMAP_IRQ_REG(MAX77714_IRQ_TOP_GPIO, 0, MAX77714_INT_TOP_GPIO), 57 + REGMAP_IRQ_REG(MAX77714_IRQ_TOP_LDO, 0, MAX77714_INT_TOP_LDO), 58 + REGMAP_IRQ_REG(MAX77714_IRQ_TOP_SD, 0, MAX77714_INT_TOP_SD), 59 + REGMAP_IRQ_REG(MAX77714_IRQ_TOP_GLBL, 0, MAX77714_INT_TOP_GLBL), 60 + }; 61 + 62 + static const struct regmap_irq_chip max77714_irq_chip = { 63 + .name = "max77714-pmic", 64 + .status_base = MAX77714_INT_TOP, 65 + .mask_base = MAX77714_INT_TOPM, 66 + .num_regs = 1, 67 + .irqs = max77714_top_irqs, 68 + .num_irqs = ARRAY_SIZE(max77714_top_irqs), 69 + }; 70 + 71 + /* 72 + * MAX77714 initially uses the internal, low precision oscillator. Enable 73 + * the external oscillator by setting the XOSC_RETRY bit. If the external 74 + * oscillator is not OK (probably not installed) this has no effect. 75 + */ 76 + static int max77714_setup_xosc(struct device *dev, struct regmap *regmap) 77 + { 78 + /* Internal Crystal Load Capacitance, indexed by value of 32KLOAD bits */ 79 + static const unsigned int load_cap[4] = {0, 10, 12, 22}; /* pF */ 80 + unsigned int load_cap_idx; 81 + unsigned int status; 82 + int err; 83 + 84 + err = regmap_update_bits(regmap, MAX77714_32K_CONFIG, 85 + MAX77714_32K_CONFIG_XOSC_RETRY, 86 + MAX77714_32K_CONFIG_XOSC_RETRY); 87 + if (err) 88 + return dev_err_probe(dev, err, "Failed to configure the external oscillator\n"); 89 + 90 + err = regmap_read(regmap, MAX77714_32K_STATUS, &status); 91 + if (err) 92 + return dev_err_probe(dev, err, "Failed to read external oscillator status\n"); 93 + 94 + load_cap_idx = (status >> MAX77714_32K_STATUS_32KLOAD_SHF) 95 + & MAX77714_32K_STATUS_32KLOAD_MSK; 96 + 97 + dev_info(dev, "Using %s oscillator, %d pF load cap\n", 98 + status & MAX77714_32K_STATUS_32KSOURCE ? "internal" : "external", 99 + load_cap[load_cap_idx]); 100 + 101 + return 0; 102 + } 103 + 104 + static int max77714_probe(struct i2c_client *client) 105 + { 106 + struct device *dev = &client->dev; 107 + struct regmap *regmap; 108 + struct regmap_irq_chip_data *irq_data; 109 + int err; 110 + 111 + regmap = devm_regmap_init_i2c(client, &max77714_regmap_config); 112 + if (IS_ERR(regmap)) 113 + return dev_err_probe(dev, PTR_ERR(regmap), 114 + "Failed to initialise regmap\n"); 115 + 116 + err = max77714_setup_xosc(dev, regmap); 117 + if (err) 118 + return err; 119 + 120 + err = devm_regmap_add_irq_chip(dev, regmap, client->irq, 121 + IRQF_ONESHOT | IRQF_SHARED, 0, 122 + &max77714_irq_chip, &irq_data); 123 + if (err) 124 + return dev_err_probe(dev, err, "Failed to add PMIC IRQ chip\n"); 125 + 126 + err = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, 127 + max77714_cells, ARRAY_SIZE(max77714_cells), 128 + NULL, 0, NULL); 129 + if (err) 130 + return dev_err_probe(dev, err, "Failed to register child devices\n"); 131 + 132 + return 0; 133 + } 134 + 135 + static const struct of_device_id max77714_dt_match[] = { 136 + { .compatible = "maxim,max77714" }, 137 + {}, 138 + }; 139 + MODULE_DEVICE_TABLE(of, max77714_dt_match); 140 + 141 + static struct i2c_driver max77714_driver = { 142 + .driver = { 143 + .name = "max77714", 144 + .of_match_table = max77714_dt_match, 145 + }, 146 + .probe_new = max77714_probe, 147 + }; 148 + module_i2c_driver(max77714_driver); 149 + 150 + MODULE_DESCRIPTION("Maxim MAX77714 MFD core driver"); 151 + MODULE_AUTHOR("Luca Ceresoli <luca@lucaceresoli.net>"); 152 + MODULE_LICENSE("GPL");
+3 -1
drivers/mfd/mc13xxx-core.c
··· 323 323 adc1 |= MC13783_ADC1_ATOX; 324 324 325 325 dev_dbg(mc13xxx->dev, "%s: request irq\n", __func__); 326 - mc13xxx_irq_request(mc13xxx, MC13XXX_IRQ_ADCDONE, 326 + ret = mc13xxx_irq_request(mc13xxx, MC13XXX_IRQ_ADCDONE, 327 327 mc13xxx_handler_adcdone, __func__, &adcdone_data); 328 + if (ret) 329 + goto out; 328 330 329 331 mc13xxx_reg_write(mc13xxx, MC13XXX_ADC0, adc0); 330 332 mc13xxx_reg_write(mc13xxx, MC13XXX_ADC1, adc1);
+1
drivers/mfd/mt6358-irq.c
··· 212 212 213 213 switch (chip->chip_id) { 214 214 case MT6358_CHIP_ID: 215 + case MT6366_CHIP_ID: 215 216 chip->irq_data = &mt6358_irqd; 216 217 break; 217 218
+1 -1
drivers/rtc/Kconfig
··· 375 375 376 376 config RTC_DRV_MAX77686 377 377 tristate "Maxim MAX77686" 378 - depends on MFD_MAX77686 || MFD_MAX77620 || COMPILE_TEST 378 + depends on MFD_MAX77686 || MFD_MAX77620 || MFD_MAX77714 || COMPILE_TEST 379 379 help 380 380 If you say yes here you will get support for the 381 381 RTC of Maxim MAX77686/MAX77620/MAX77802 PMIC.
+45 -30
drivers/rtc/rtc-max77686.c
··· 19 19 20 20 #define MAX77686_I2C_ADDR_RTC (0x0C >> 1) 21 21 #define MAX77620_I2C_ADDR_RTC 0x68 22 + #define MAX77714_I2C_ADDR_RTC 0x48 22 23 #define MAX77686_INVALID_I2C_ADDR (-1) 23 24 24 25 /* Define non existing register */ ··· 35 34 #define RTC_UDR_MASK BIT(RTC_UDR_SHIFT) 36 35 #define RTC_RBUDR_SHIFT 4 37 36 #define RTC_RBUDR_MASK BIT(RTC_RBUDR_SHIFT) 38 - /* RTC Hour register */ 39 - #define HOUR_PM_SHIFT 6 40 - #define HOUR_PM_MASK BIT(HOUR_PM_SHIFT) 41 37 /* RTC Alarm Enable */ 42 38 #define ALARM_ENABLE_SHIFT 7 43 39 #define ALARM_ENABLE_MASK BIT(ALARM_ENABLE_SHIFT) ··· 55 57 RTC_WEEKDAY, 56 58 RTC_MONTH, 57 59 RTC_YEAR, 58 - RTC_DATE, 60 + RTC_MONTHDAY, 59 61 RTC_NR_TIME 60 62 }; 61 63 64 + /** 65 + * struct max77686_rtc_driver_data - model-specific configuration 66 + * @delay: Minimum usecs needed for a RTC update 67 + * @mask: Mask used to read RTC registers value 68 + * @map: Registers offset to I2C addresses map 69 + * @alarm_enable_reg: Has a separate alarm enable register? 70 + * @rtc_i2c_addr: I2C address for RTC block 71 + * @rtc_irq_from_platform: RTC interrupt via platform resource 72 + * @alarm_pending_status_reg: Pending alarm status register 73 + * @rtc_irq_chip: RTC IRQ CHIP for regmap 74 + * @regmap_config: regmap configuration for the chip 75 + */ 62 76 struct max77686_rtc_driver_data { 63 - /* Minimum usecs needed for a RTC update */ 64 77 unsigned long delay; 65 - /* Mask used to read RTC registers value */ 66 78 u8 mask; 67 - /* Registers offset to I2C addresses map */ 68 79 const unsigned int *map; 69 - /* Has a separate alarm enable register? */ 70 80 bool alarm_enable_reg; 71 - /* I2C address for RTC block */ 72 81 int rtc_i2c_addr; 73 - /* RTC interrupt via platform resource */ 74 82 bool rtc_irq_from_platform; 75 - /* Pending alarm status register */ 76 83 int alarm_pending_status_reg; 77 - /* RTC IRQ CHIP for regmap */ 78 84 const struct regmap_irq_chip *rtc_irq_chip; 79 - /* regmap configuration for the chip */ 80 85 const struct regmap_config *regmap_config; 81 86 }; 82 87 ··· 97 96 98 97 int rtc_irq; 99 98 int virq; 100 - int rtc_24hr_mode; 101 99 }; 102 100 103 101 enum MAX77686_RTC_OP { ··· 116 116 REG_RTC_WEEKDAY, 117 117 REG_RTC_MONTH, 118 118 REG_RTC_YEAR, 119 - REG_RTC_DATE, 119 + REG_RTC_MONTHDAY, 120 120 REG_ALARM1_SEC, 121 121 REG_ALARM1_MIN, 122 122 REG_ALARM1_HOUR, ··· 147 147 [REG_RTC_WEEKDAY] = MAX77686_RTC_WEEKDAY, 148 148 [REG_RTC_MONTH] = MAX77686_RTC_MONTH, 149 149 [REG_RTC_YEAR] = MAX77686_RTC_YEAR, 150 - [REG_RTC_DATE] = MAX77686_RTC_DATE, 150 + [REG_RTC_MONTHDAY] = MAX77686_RTC_MONTHDAY, 151 151 [REG_ALARM1_SEC] = MAX77686_ALARM1_SEC, 152 152 [REG_ALARM1_MIN] = MAX77686_ALARM1_MIN, 153 153 [REG_ALARM1_HOUR] = MAX77686_ALARM1_HOUR, ··· 201 201 .regmap_config = &max77686_rtc_regmap_config, 202 202 }; 203 203 204 + static const struct regmap_irq_chip max77714_rtc_irq_chip = { 205 + .name = "max77714-rtc", 206 + .status_base = MAX77686_RTC_INT, 207 + .mask_base = MAX77686_RTC_INTM, 208 + .num_regs = 1, 209 + .irqs = max77686_rtc_irqs, 210 + .num_irqs = ARRAY_SIZE(max77686_rtc_irqs) - 1, /* no WTSR on 77714 */ 211 + }; 212 + 213 + static const struct max77686_rtc_driver_data max77714_drv_data = { 214 + .delay = 16000, 215 + .mask = 0x7f, 216 + .map = max77686_map, 217 + .alarm_enable_reg = false, 218 + .rtc_irq_from_platform = false, 219 + /* On MAX77714 RTCA1 is BIT 1 of RTCINT (0x00). Not supported by this driver. */ 220 + .alarm_pending_status_reg = MAX77686_INVALID_REG, 221 + .rtc_i2c_addr = MAX77714_I2C_ADDR_RTC, 222 + .rtc_irq_chip = &max77714_rtc_irq_chip, 223 + .regmap_config = &max77686_rtc_regmap_config, 224 + }; 225 + 204 226 static const struct regmap_config max77620_rtc_regmap_config = { 205 227 .reg_bits = 8, 206 228 .val_bits = 8, ··· 252 230 [REG_RTC_WEEKDAY] = MAX77802_RTC_WEEKDAY, 253 231 [REG_RTC_MONTH] = MAX77802_RTC_MONTH, 254 232 [REG_RTC_YEAR] = MAX77802_RTC_YEAR, 255 - [REG_RTC_DATE] = MAX77802_RTC_DATE, 233 + [REG_RTC_MONTHDAY] = MAX77802_RTC_MONTHDAY, 256 234 [REG_ALARM1_SEC] = MAX77802_ALARM1_SEC, 257 235 [REG_ALARM1_MIN] = MAX77802_ALARM1_MIN, 258 236 [REG_ALARM1_HOUR] = MAX77802_ALARM1_HOUR, ··· 297 275 298 276 tm->tm_sec = data[RTC_SEC] & mask; 299 277 tm->tm_min = data[RTC_MIN] & mask; 300 - if (info->rtc_24hr_mode) { 301 - tm->tm_hour = data[RTC_HOUR] & 0x1f; 302 - } else { 303 - tm->tm_hour = data[RTC_HOUR] & 0x0f; 304 - if (data[RTC_HOUR] & HOUR_PM_MASK) 305 - tm->tm_hour += 12; 306 - } 278 + tm->tm_hour = data[RTC_HOUR] & 0x1f; 307 279 308 280 /* Only a single bit is set in data[], so fls() would be equivalent */ 309 281 tm->tm_wday = ffs(data[RTC_WEEKDAY] & mask) - 1; 310 - tm->tm_mday = data[RTC_DATE] & 0x1f; 282 + tm->tm_mday = data[RTC_MONTHDAY] & 0x1f; 311 283 tm->tm_mon = (data[RTC_MONTH] & 0x0f) - 1; 312 284 tm->tm_year = data[RTC_YEAR] & mask; 313 285 tm->tm_yday = 0; ··· 322 306 data[RTC_MIN] = tm->tm_min; 323 307 data[RTC_HOUR] = tm->tm_hour; 324 308 data[RTC_WEEKDAY] = 1 << tm->tm_wday; 325 - data[RTC_DATE] = tm->tm_mday; 309 + data[RTC_MONTHDAY] = tm->tm_mday; 326 310 data[RTC_MONTH] = tm->tm_mon + 1; 327 311 328 312 if (info->drv_data->alarm_enable_reg) { ··· 578 562 data[RTC_MONTH] |= (1 << ALARM_ENABLE_SHIFT); 579 563 if (data[RTC_YEAR] & info->drv_data->mask) 580 564 data[RTC_YEAR] |= (1 << ALARM_ENABLE_SHIFT); 581 - if (data[RTC_DATE] & 0x1f) 582 - data[RTC_DATE] |= (1 << ALARM_ENABLE_SHIFT); 565 + if (data[RTC_MONTHDAY] & 0x1f) 566 + data[RTC_MONTHDAY] |= (1 << ALARM_ENABLE_SHIFT); 583 567 584 568 ret = regmap_bulk_write(info->rtc_regmap, map[REG_ALARM1_SEC], 585 569 data, ARRAY_SIZE(data)); ··· 674 658 /* Set RTC control register : Binary mode, 24hour mdoe */ 675 659 data[0] = (1 << BCD_EN_SHIFT) | (1 << MODEL24_SHIFT); 676 660 data[1] = (0 << BCD_EN_SHIFT) | (1 << MODEL24_SHIFT); 677 - 678 - info->rtc_24hr_mode = 1; 679 661 680 662 ret = regmap_bulk_write(info->rtc_regmap, 681 663 info->drv_data->map[REG_RTC_CONTROLM], ··· 866 852 { "max77686-rtc", .driver_data = (kernel_ulong_t)&max77686_drv_data, }, 867 853 { "max77802-rtc", .driver_data = (kernel_ulong_t)&max77802_drv_data, }, 868 854 { "max77620-rtc", .driver_data = (kernel_ulong_t)&max77620_drv_data, }, 855 + { "max77714-rtc", .driver_data = (kernel_ulong_t)&max77714_drv_data, }, 869 856 {}, 870 857 }; 871 858 MODULE_DEVICE_TABLE(platform, rtc_id);
+6 -8
drivers/spi/spi-s3c64xx.c
··· 796 796 return ERR_PTR(-EINVAL); 797 797 } 798 798 799 + cs = kzalloc(sizeof(*cs), GFP_KERNEL); 800 + if (!cs) 801 + return ERR_PTR(-ENOMEM); 802 + 799 803 data_np = of_get_child_by_name(slave_np, "controller-data"); 800 804 if (!data_np) { 801 - dev_err(&spi->dev, "child node 'controller-data' not found\n"); 802 - return ERR_PTR(-EINVAL); 803 - } 804 - 805 - cs = kzalloc(sizeof(*cs), GFP_KERNEL); 806 - if (!cs) { 807 - of_node_put(data_np); 808 - return ERR_PTR(-ENOMEM); 805 + dev_info(&spi->dev, "feedback delay set to default (0)\n"); 806 + return cs; 809 807 } 810 808 811 809 of_property_read_u32(data_np, "samsung,spi-feedback-delay", &fb_delay);
+1 -1
drivers/watchdog/Kconfig
··· 678 678 679 679 config MAX77620_WATCHDOG 680 680 tristate "Maxim Max77620 Watchdog Timer" 681 - depends on MFD_MAX77620 || COMPILE_TEST 681 + depends on MFD_MAX77620 || MFD_MAX77714 || COMPILE_TEST 682 682 select WATCHDOG_CORE 683 683 help 684 684 This is the driver for the Max77620 watchdog timer.
+69 -16
drivers/watchdog/max77620_wdt.c
··· 3 3 * Maxim MAX77620 Watchdog Driver 4 4 * 5 5 * Copyright (C) 2016 NVIDIA CORPORATION. All rights reserved. 6 + * Copyright (C) 2022 Luca Ceresoli 6 7 * 7 8 * Author: Laxman Dewangan <ldewangan@nvidia.com> 9 + * Author: Luca Ceresoli <luca@lucaceresoli.net> 8 10 */ 9 11 10 12 #include <linux/err.h> ··· 15 13 #include <linux/module.h> 16 14 #include <linux/mod_devicetable.h> 17 15 #include <linux/mfd/max77620.h> 16 + #include <linux/mfd/max77714.h> 18 17 #include <linux/platform_device.h> 19 18 #include <linux/regmap.h> 20 19 #include <linux/slab.h> ··· 23 20 24 21 static bool nowayout = WATCHDOG_NOWAYOUT; 25 22 23 + /** 24 + * struct max77620_variant - Data specific to a chip variant 25 + * @wdt_info: watchdog descriptor 26 + * @reg_onoff_cnfg2: ONOFF_CNFG2 register offset 27 + * @reg_cnfg_glbl2: CNFG_GLBL2 register offset 28 + * @reg_cnfg_glbl3: CNFG_GLBL3 register offset 29 + * @wdtc_mask: WDTC bit mask in CNFG_GLBL3 (=bits to update to ping the watchdog) 30 + * @bit_wd_rst_wk: WD_RST_WK bit offset within ONOFF_CNFG2 31 + * @cnfg_glbl2_cfg_bits: configuration bits to enable in CNFG_GLBL2 register 32 + */ 33 + struct max77620_variant { 34 + u8 reg_onoff_cnfg2; 35 + u8 reg_cnfg_glbl2; 36 + u8 reg_cnfg_glbl3; 37 + u8 wdtc_mask; 38 + u8 bit_wd_rst_wk; 39 + u8 cnfg_glbl2_cfg_bits; 40 + }; 41 + 26 42 struct max77620_wdt { 27 43 struct device *dev; 28 44 struct regmap *rmap; 45 + const struct max77620_variant *drv_data; 29 46 struct watchdog_device wdt_dev; 47 + }; 48 + 49 + static const struct max77620_variant max77620_wdt_data = { 50 + .reg_onoff_cnfg2 = MAX77620_REG_ONOFFCNFG2, 51 + .reg_cnfg_glbl2 = MAX77620_REG_CNFGGLBL2, 52 + .reg_cnfg_glbl3 = MAX77620_REG_CNFGGLBL3, 53 + .wdtc_mask = MAX77620_WDTC_MASK, 54 + .bit_wd_rst_wk = MAX77620_ONOFFCNFG2_WD_RST_WK, 55 + /* Set WDT clear in OFF and sleep mode */ 56 + .cnfg_glbl2_cfg_bits = MAX77620_WDTSLPC | MAX77620_WDTOFFC, 57 + }; 58 + 59 + static const struct max77620_variant max77714_wdt_data = { 60 + .reg_onoff_cnfg2 = MAX77714_CNFG2_ONOFF, 61 + .reg_cnfg_glbl2 = MAX77714_CNFG_GLBL2, 62 + .reg_cnfg_glbl3 = MAX77714_CNFG_GLBL3, 63 + .wdtc_mask = MAX77714_WDTC, 64 + .bit_wd_rst_wk = MAX77714_WD_RST_WK, 65 + /* Set WDT clear in sleep mode (there is no WDTOFFC on MAX77714) */ 66 + .cnfg_glbl2_cfg_bits = MAX77714_WDTSLPC, 30 67 }; 31 68 32 69 static int max77620_wdt_start(struct watchdog_device *wdt_dev) 33 70 { 34 71 struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); 35 72 36 - return regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2, 73 + return regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, 37 74 MAX77620_WDTEN, MAX77620_WDTEN); 38 75 } 39 76 ··· 81 38 { 82 39 struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); 83 40 84 - return regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2, 41 + return regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, 85 42 MAX77620_WDTEN, 0); 86 43 } 87 44 ··· 89 46 { 90 47 struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); 91 48 92 - return regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL3, 93 - MAX77620_WDTC_MASK, 0x1); 49 + return regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl3, 50 + wdt->drv_data->wdtc_mask, 0x1); 94 51 } 95 52 96 53 static int max77620_wdt_set_timeout(struct watchdog_device *wdt_dev, ··· 123 80 break; 124 81 } 125 82 126 - ret = regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL3, 127 - MAX77620_WDTC_MASK, 0x1); 83 + /* 84 + * "If the value of TWD needs to be changed, clear the system 85 + * watchdog timer first [...], then change the value of TWD." 86 + * (MAX77714 datasheet but applies to MAX77620 too) 87 + */ 88 + ret = regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl3, 89 + wdt->drv_data->wdtc_mask, 0x1); 128 90 if (ret < 0) 129 91 return ret; 130 92 131 - ret = regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2, 93 + ret = regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, 132 94 MAX77620_TWD_MASK, regval); 133 95 if (ret < 0) 134 96 return ret; ··· 157 109 158 110 static int max77620_wdt_probe(struct platform_device *pdev) 159 111 { 112 + const struct platform_device_id *id = platform_get_device_id(pdev); 160 113 struct device *dev = &pdev->dev; 161 114 struct max77620_wdt *wdt; 162 115 struct watchdog_device *wdt_dev; ··· 169 120 return -ENOMEM; 170 121 171 122 wdt->dev = dev; 123 + wdt->drv_data = (const struct max77620_variant *) id->driver_data; 124 + 172 125 wdt->rmap = dev_get_regmap(dev->parent, NULL); 173 126 if (!wdt->rmap) { 174 127 dev_err(wdt->dev, "Failed to get parent regmap\n"); ··· 187 136 platform_set_drvdata(pdev, wdt); 188 137 189 138 /* Enable WD_RST_WK - WDT expire results in a restart */ 190 - ret = regmap_update_bits(wdt->rmap, MAX77620_REG_ONOFFCNFG2, 191 - MAX77620_ONOFFCNFG2_WD_RST_WK, 192 - MAX77620_ONOFFCNFG2_WD_RST_WK); 139 + ret = regmap_update_bits(wdt->rmap, wdt->drv_data->reg_onoff_cnfg2, 140 + wdt->drv_data->bit_wd_rst_wk, 141 + wdt->drv_data->bit_wd_rst_wk); 193 142 if (ret < 0) { 194 143 dev_err(wdt->dev, "Failed to set WD_RST_WK: %d\n", ret); 195 144 return ret; 196 145 } 197 146 198 - /* Set WDT clear in OFF and sleep mode */ 199 - ret = regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2, 200 - MAX77620_WDTOFFC | MAX77620_WDTSLPC, 201 - MAX77620_WDTOFFC | MAX77620_WDTSLPC); 147 + /* Set the "auto WDT clear" bits available on the chip */ 148 + ret = regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, 149 + wdt->drv_data->cnfg_glbl2_cfg_bits, 150 + wdt->drv_data->cnfg_glbl2_cfg_bits); 202 151 if (ret < 0) { 203 152 dev_err(wdt->dev, "Failed to set WDT OFF mode: %d\n", ret); 204 153 return ret; 205 154 } 206 155 207 156 /* Check if WDT running and if yes then set flags properly */ 208 - ret = regmap_read(wdt->rmap, MAX77620_REG_CNFGGLBL2, &regval); 157 + ret = regmap_read(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, &regval); 209 158 if (ret < 0) { 210 159 dev_err(wdt->dev, "Failed to read WDT CFG register: %d\n", ret); 211 160 return ret; ··· 237 186 } 238 187 239 188 static const struct platform_device_id max77620_wdt_devtype[] = { 240 - { .name = "max77620-watchdog", }, 189 + { "max77620-watchdog", (kernel_ulong_t)&max77620_wdt_data }, 190 + { "max77714-watchdog", (kernel_ulong_t)&max77714_wdt_data }, 241 191 { }, 242 192 }; 243 193 MODULE_DEVICE_TABLE(platform, max77620_wdt_devtype); ··· 260 208 "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 261 209 262 210 MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>"); 211 + MODULE_AUTHOR("Luca Ceresoli <luca@lucaceresoli.net>"); 263 212 MODULE_LICENSE("GPL v2");
+7
include/linux/mfd/iqs62x.h
··· 14 14 #define IQS624_PROD_NUM 0x43 15 15 #define IQS625_PROD_NUM 0x4E 16 16 17 + #define IQS620_HW_NUM_V0 0x82 18 + #define IQS620_HW_NUM_V1 IQS620_HW_NUM_V0 19 + #define IQS620_HW_NUM_V2 IQS620_HW_NUM_V0 20 + #define IQS620_HW_NUM_V3 0x92 21 + 17 22 #define IQS621_ALS_FLAGS 0x16 18 23 #define IQS622_ALS_FLAGS 0x14 19 24 ··· 134 129 struct completion fw_done; 135 130 enum iqs62x_ui_sel ui_sel; 136 131 unsigned long event_cache; 132 + u8 sw_num; 133 + u8 hw_num; 137 134 }; 138 135 139 136 extern const struct iqs62x_event_desc iqs62x_events[IQS62X_NUM_EVENTS];
+2 -2
include/linux/mfd/max77686-private.h
··· 152 152 MAX77686_RTC_WEEKDAY = 0x0A, 153 153 MAX77686_RTC_MONTH = 0x0B, 154 154 MAX77686_RTC_YEAR = 0x0C, 155 - MAX77686_RTC_DATE = 0x0D, 155 + MAX77686_RTC_MONTHDAY = 0x0D, 156 156 MAX77686_ALARM1_SEC = 0x0E, 157 157 MAX77686_ALARM1_MIN = 0x0F, 158 158 MAX77686_ALARM1_HOUR = 0x10, ··· 352 352 MAX77802_RTC_WEEKDAY = 0xCA, 353 353 MAX77802_RTC_MONTH = 0xCB, 354 354 MAX77802_RTC_YEAR = 0xCC, 355 - MAX77802_RTC_DATE = 0xCD, 355 + MAX77802_RTC_MONTHDAY = 0xCD, 356 356 MAX77802_RTC_AE1 = 0xCE, 357 357 MAX77802_ALARM1_SEC = 0xCF, 358 358 MAX77802_ALARM1_MIN = 0xD0,
+60
include/linux/mfd/max77714.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * Maxim MAX77714 Register and data structures definition. 4 + * 5 + * Copyright (C) 2022 Luca Ceresoli 6 + * Author: Luca Ceresoli <luca@lucaceresoli.net> 7 + */ 8 + 9 + #ifndef __LINUX_MFD_MAX77714_H_ 10 + #define __LINUX_MFD_MAX77714_H_ 11 + 12 + #include <linux/bits.h> 13 + 14 + #define MAX77714_INT_TOP 0x00 15 + #define MAX77714_INT_TOPM 0x07 /* Datasheet says "read only", but it is RW */ 16 + 17 + #define MAX77714_INT_TOP_ONOFF BIT(1) 18 + #define MAX77714_INT_TOP_RTC BIT(3) 19 + #define MAX77714_INT_TOP_GPIO BIT(4) 20 + #define MAX77714_INT_TOP_LDO BIT(5) 21 + #define MAX77714_INT_TOP_SD BIT(6) 22 + #define MAX77714_INT_TOP_GLBL BIT(7) 23 + 24 + #define MAX77714_32K_STATUS 0x30 25 + #define MAX77714_32K_STATUS_SIOSCOK BIT(5) 26 + #define MAX77714_32K_STATUS_XOSCOK BIT(4) 27 + #define MAX77714_32K_STATUS_32KSOURCE BIT(3) 28 + #define MAX77714_32K_STATUS_32KLOAD_MSK 0x3 29 + #define MAX77714_32K_STATUS_32KLOAD_SHF 1 30 + #define MAX77714_32K_STATUS_CRYSTAL_CFG BIT(0) 31 + 32 + #define MAX77714_32K_CONFIG 0x31 33 + #define MAX77714_32K_CONFIG_XOSC_RETRY BIT(4) 34 + 35 + #define MAX77714_CNFG_GLBL2 0x91 36 + #define MAX77714_WDTEN BIT(2) 37 + #define MAX77714_WDTSLPC BIT(3) 38 + #define MAX77714_TWD_MASK 0x3 39 + #define MAX77714_TWD_2s 0x0 40 + #define MAX77714_TWD_16s 0x1 41 + #define MAX77714_TWD_64s 0x2 42 + #define MAX77714_TWD_128s 0x3 43 + 44 + #define MAX77714_CNFG_GLBL3 0x92 45 + #define MAX77714_WDTC BIT(0) 46 + 47 + #define MAX77714_CNFG2_ONOFF 0x94 48 + #define MAX77714_WD_RST_WK BIT(5) 49 + 50 + /* Interrupts */ 51 + enum { 52 + MAX77714_IRQ_TOP_ONOFF, 53 + MAX77714_IRQ_TOP_RTC, /* Real-time clock */ 54 + MAX77714_IRQ_TOP_GPIO, /* GPIOs */ 55 + MAX77714_IRQ_TOP_LDO, /* Low-dropout regulators */ 56 + MAX77714_IRQ_TOP_SD, /* Step-down regulators */ 57 + MAX77714_IRQ_TOP_GLBL, /* "Global resources": Low-Battery, overtemp... */ 58 + }; 59 + 60 + #endif /* __LINUX_MFD_MAX77714_H_ */
+7
include/linux/mfd/mt6358/registers.h
··· 94 94 #define MT6358_BUCK_VCORE_CON0 0x1488 95 95 #define MT6358_BUCK_VCORE_DBG0 0x149e 96 96 #define MT6358_BUCK_VCORE_DBG1 0x14a0 97 + #define MT6358_BUCK_VCORE_SSHUB_CON0 0x14a4 98 + #define MT6358_BUCK_VCORE_SSHUB_CON1 0x14a6 99 + #define MT6358_BUCK_VCORE_SSHUB_ELR0 MT6358_BUCK_VCORE_SSHUB_CON1 100 + #define MT6358_BUCK_VCORE_SSHUB_DBG1 MT6358_BUCK_VCORE_DBG1 97 101 #define MT6358_BUCK_VCORE_ELR0 0x14aa 98 102 #define MT6358_BUCK_VGPU_CON0 0x1508 99 103 #define MT6358_BUCK_VGPU_DBG0 0x151e ··· 173 169 #define MT6358_LDO_VSRAM_OTHERS_CON0 0x1ba6 174 170 #define MT6358_LDO_VSRAM_OTHERS_DBG0 0x1bc0 175 171 #define MT6358_LDO_VSRAM_OTHERS_DBG1 0x1bc2 172 + #define MT6358_LDO_VSRAM_OTHERS_SSHUB_CON0 0x1bc4 173 + #define MT6358_LDO_VSRAM_OTHERS_SSHUB_CON1 0x1bc6 174 + #define MT6358_LDO_VSRAM_OTHERS_SSHUB_DBG1 MT6358_LDO_VSRAM_OTHERS_DBG1 176 175 #define MT6358_LDO_VSRAM_GPU_CON0 0x1bc8 177 176 #define MT6358_LDO_VSRAM_GPU_DBG0 0x1be2 178 177 #define MT6358_LDO_VSRAM_GPU_DBG1 0x1be4
+1
include/linux/mfd/mt6397/core.h
··· 14 14 MT6323_CHIP_ID = 0x23, 15 15 MT6358_CHIP_ID = 0x58, 16 16 MT6359_CHIP_ID = 0x59, 17 + MT6366_CHIP_ID = 0x66, 17 18 MT6391_CHIP_ID = 0x91, 18 19 MT6397_CHIP_ID = 0x97, 19 20 };