Skip to content

Commit e8a6f4a

Browse files
author
Lee Jones
committed
Merge branches 'ib-mfd-x86-usb-watchdog-5.8', 'ib-mfd-power-rtc-5.8', 'ib-mfd-iio-power-5.8' and 'ib-mfd-hwmon-5.8' into ibs-for-mfd-merged
4 parents 2f72d35 + 29ee400 + 904ac71 + 3bce537 commit e8a6f4a

32 files changed

Lines changed: 2963 additions & 62 deletions
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
What: /sys/class/power_supply/mp2629_battery/batt_impedance_compen
2+
Date: April 2020
3+
KernelVersion: 5.7
4+
Description:
5+
Represents a battery impedance compensation to accelerate charging.
6+
7+
Access: Read, Write
8+
Valid values: Represented in milli-ohms. Valid range is [0, 140].
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mfd/gateworks-gsc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Gateworks System Controller
8+
9+
description: |
10+
The Gateworks System Controller (GSC) is a device present across various
11+
Gateworks product families that provides a set of system related features
12+
such as the following (refer to the board hardware user manuals to see what
13+
features are present)
14+
- Watchdog Timer
15+
- GPIO
16+
- Pushbutton controller
17+
- Hardware monitor with ADC's for temperature and voltage rails and
18+
fan controller
19+
20+
maintainers:
21+
- Tim Harvey <tharvey@gateworks.com>
22+
- Robert Jones <rjones@gateworks.com>
23+
24+
properties:
25+
$nodename:
26+
pattern: "gsc@[0-9a-f]{1,2}"
27+
compatible:
28+
const: gw,gsc
29+
30+
reg:
31+
description: I2C device address
32+
maxItems: 1
33+
34+
interrupts:
35+
maxItems: 1
36+
37+
interrupt-controller: true
38+
39+
"#interrupt-cells":
40+
const: 1
41+
42+
"#address-cells":
43+
const: 1
44+
45+
"#size-cells":
46+
const: 0
47+
48+
adc:
49+
type: object
50+
description: Optional hardware monitoring module
51+
52+
properties:
53+
compatible:
54+
const: gw,gsc-adc
55+
56+
"#address-cells":
57+
const: 1
58+
59+
"#size-cells":
60+
const: 0
61+
62+
patternProperties:
63+
"^channel@[0-9]+$":
64+
type: object
65+
description: |
66+
Properties for a single ADC which can report cooked values
67+
(i.e. temperature sensor based on thermister), raw values
68+
(i.e. voltage rail with a pre-scaling resistor divider).
69+
70+
properties:
71+
reg:
72+
description: Register of the ADC
73+
maxItems: 1
74+
75+
label:
76+
description: Name of the ADC input
77+
78+
gw,mode:
79+
description: |
80+
conversion mode:
81+
0 - temperature, in C*10
82+
1 - pre-scaled voltage value
83+
2 - scaled voltage based on an optional resistor divider
84+
and optional offset
85+
$ref: /schemas/types.yaml#/definitions/uint32
86+
enum: [0, 1, 2]
87+
88+
gw,voltage-divider-ohms:
89+
description: Values of resistors for divider on raw ADC input
90+
maxItems: 2
91+
items:
92+
minimum: 1000
93+
maximum: 1000000
94+
95+
gw,voltage-offset-microvolt:
96+
description: |
97+
A positive voltage offset to apply to a raw ADC
98+
(i.e. to compensate for a diode drop).
99+
minimum: 0
100+
maximum: 1000000
101+
102+
required:
103+
- gw,mode
104+
- reg
105+
- label
106+
107+
required:
108+
- compatible
109+
- "#address-cells"
110+
- "#size-cells"
111+
112+
patternProperties:
113+
"^fan-controller@[0-9a-f]+$":
114+
type: object
115+
description: Optional fan controller
116+
117+
properties:
118+
compatible:
119+
const: gw,gsc-fan
120+
121+
"#address-cells":
122+
const: 1
123+
124+
"#size-cells":
125+
const: 0
126+
127+
reg:
128+
description: The fan controller base address
129+
maxItems: 1
130+
131+
required:
132+
- compatible
133+
- reg
134+
- "#address-cells"
135+
- "#size-cells"
136+
137+
required:
138+
- compatible
139+
- reg
140+
- interrupts
141+
- interrupt-controller
142+
- "#interrupt-cells"
143+
- "#address-cells"
144+
- "#size-cells"
145+
146+
examples:
147+
- |
148+
#include <dt-bindings/gpio/gpio.h>
149+
i2c {
150+
#address-cells = <1>;
151+
#size-cells = <0>;
152+
153+
gsc@20 {
154+
compatible = "gw,gsc";
155+
reg = <0x20>;
156+
interrupt-parent = <&gpio1>;
157+
interrupts = <4 GPIO_ACTIVE_LOW>;
158+
interrupt-controller;
159+
#interrupt-cells = <1>;
160+
#address-cells = <1>;
161+
#size-cells = <0>;
162+
163+
adc {
164+
compatible = "gw,gsc-adc";
165+
#address-cells = <1>;
166+
#size-cells = <0>;
167+
168+
channel@0 { /* A0: Board Temperature */
169+
reg = <0x00>;
170+
label = "temp";
171+
gw,mode = <0>;
172+
};
173+
174+
channel@2 { /* A1: Input Voltage (raw ADC) */
175+
reg = <0x02>;
176+
label = "vdd_vin";
177+
gw,mode = <1>;
178+
gw,voltage-divider-ohms = <22100 1000>;
179+
gw,voltage-offset-microvolt = <800000>;
180+
};
181+
182+
channel@b { /* A2: Battery voltage */
183+
reg = <0x0b>;
184+
label = "vdd_bat";
185+
gw,mode = <1>;
186+
};
187+
};
188+
189+
fan-controller@2c {
190+
#address-cells = <1>;
191+
#size-cells = <0>;
192+
compatible = "gw,gsc-fan";
193+
reg = <0x2c>;
194+
};
195+
};
196+
};
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mfd/mps,mp2629.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MP2629 Battery Charger PMIC from Monolithic Power System.
8+
9+
maintainers:
10+
- Saravanan Sekar <sravanhome@gmail.com>
11+
12+
description: |
13+
MP2629 is a PMIC providing battery charging and power supply for smartphones,
14+
wireless camera and portable devices. Chip is controlled over I2C.
15+
16+
The battery charge management device handles battery charger controller and
17+
ADC IIO device for battery, system voltage
18+
19+
properties:
20+
compatible:
21+
const: mps,mp2629
22+
23+
reg:
24+
maxItems: 1
25+
26+
interrupts:
27+
maxItems: 1
28+
29+
interrupt-controller: true
30+
31+
"#interrupt-cells":
32+
const: 2
33+
description:
34+
The first cell is the IRQ number, the second cell is the trigger type.
35+
36+
required:
37+
- compatible
38+
- reg
39+
- interrupts
40+
- interrupt-controller
41+
- "#interrupt-cells"
42+
43+
additionalProperties: false
44+
45+
examples:
46+
- |
47+
#include <dt-bindings/interrupt-controller/irq.h>
48+
#include <dt-bindings/input/linux-event-codes.h>
49+
i2c {
50+
#address-cells = <1>;
51+
#size-cells = <0>;
52+
53+
pmic@4b {
54+
compatible = "mps,mp2629";
55+
reg = <0x4b>;
56+
57+
interrupt-controller;
58+
interrupt-parent = <&gpio2>;
59+
#interrupt-cells = <2>;
60+
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
61+
};
62+
};

‎Documentation/devicetree/bindings/mfd/mt6397.txt‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,30 @@ See the following for pwarp node definitions:
1818
This document describes the binding for MFD device and its sub module.
1919

2020
Required properties:
21-
compatible: "mediatek,mt6397" or "mediatek,mt6323"
21+
compatible:
22+
"mediatek,mt6323" for PMIC MT6323
23+
"mediatek,mt6358" for PMIC MT6358
24+
"mediatek,mt6397" for PMIC MT6397
2225

2326
Optional subnodes:
2427

2528
- rtc
2629
Required properties: Should be one of follows
2730
- compatible: "mediatek,mt6323-rtc"
31+
- compatible: "mediatek,mt6358-rtc"
2832
- compatible: "mediatek,mt6397-rtc"
2933
For details, see ../rtc/rtc-mt6397.txt
3034
- regulators
3135
Required properties:
32-
- compatible: "mediatek,mt6397-regulator"
33-
see ../regulator/mt6397-regulator.txt
3436
- compatible: "mediatek,mt6323-regulator"
3537
see ../regulator/mt6323-regulator.txt
38+
- compatible: "mediatek,mt6358-regulator"
39+
see ../regulator/mt6358-regulator.txt
40+
- compatible: "mediatek,mt6397-regulator"
41+
see ../regulator/mt6397-regulator.txt
3642
- codec
3743
Required properties:
38-
- compatible: "mediatek,mt6397-codec"
44+
- compatible: "mediatek,mt6397-codec" or "mediatek,mt6358-sound"
3945
- clk
4046
Required properties:
4147
- compatible: "mediatek,mt6397-clk"

‎Documentation/hwmon/gsc-hwmon.rst‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
Kernel driver gsc-hwmon
4+
=======================
5+
6+
Supported chips: Gateworks GSC
7+
Datasheet: http://trac.gateworks.com/wiki/gsc
8+
Author: Tim Harvey <tharvey@gateworks.com>
9+
10+
Description:
11+
------------
12+
13+
This driver supports hardware monitoring for the temperature sensor,
14+
various ADC's connected to the GSC, and optional FAN controller available
15+
on some boards.
16+
17+
18+
Voltage Monitoring
19+
------------------
20+
21+
The voltage inputs are scaled either internally or by the driver depending
22+
on the GSC version and firmware. The values returned by the driver do not need
23+
further scaling. The voltage input labels provide the voltage rail name:
24+
25+
inX_input Measured voltage (mV).
26+
inX_label Name of voltage rail.
27+
28+
29+
Temperature Monitoring
30+
----------------------
31+
32+
Temperatures are measured with 12-bit or 10-bit resolution and are scaled
33+
either internally or by the driver depending on the GSC version and firmware.
34+
The values returned by the driver reflect millidegree Celcius:
35+
36+
tempX_input Measured temperature.
37+
tempX_label Name of temperature input.
38+
39+
40+
PWM Output Control
41+
------------------
42+
43+
The GSC features 1 PWM output that operates in automatic mode where the
44+
PWM value will be scalled depending on 6 temperature boundaries.
45+
The tempeature boundaries are read-write and in millidegree Celcius and the
46+
read-only PWM values range from 0 (off) to 255 (full speed).
47+
Fan speed will be set to minimum (off) when the temperature sensor reads
48+
less than pwm1_auto_point1_temp and maximum when the temperature sensor
49+
equals or exceeds pwm1_auto_point6_temp.
50+
51+
pwm1_auto_point[1-6]_pwm PWM value.
52+
pwm1_auto_point[1-6]_temp Temperature boundary.
53+

‎Documentation/hwmon/index.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Hardware Monitoring Kernel Drivers
6060
ftsteutates
6161
g760a
6262
g762
63+
gsc-hwmon
6364
gl518sm
6465
hih6130
6566
ibmaem

‎MAINTAINERS‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7028,6 +7028,17 @@ F: kernel/futex.c
70287028
F: tools/perf/bench/futex*
70297029
F: tools/testing/selftests/futex/
70307030

7031+
GATEWORKS SYSTEM CONTROLLER (GSC) DRIVER
7032+
M: Tim Harvey <tharvey@gateworks.com>
7033+
M: Robert Jones <rjones@gateworks.com>
7034+
S: Maintained
7035+
F: Documentation/devicetree/bindings/mfd/gateworks-gsc.yaml
7036+
F: drivers/mfd/gateworks-gsc.c
7037+
F: include/linux/mfd/gsc.h
7038+
F: Documentation/hwmon/gsc-hwmon.rst
7039+
F: drivers/hwmon/gsc-hwmon.c
7040+
F: include/linux/platform_data/gsc_hwmon.h
7041+
70317042
GASKET DRIVER FRAMEWORK
70327043
M: Rob Springer <rspringer@google.com>
70337044
M: Todd Poynor <toddpoynor@google.com>
@@ -11382,10 +11393,15 @@ F: kernel/module.c
1138211393
MONOLITHIC POWER SYSTEM PMIC DRIVER
1138311394
M: Saravanan Sekar <sravanhome@gmail.com>
1138411395
S: Maintained
11396+
F: Documentation/devicetree/bindings/mfd/mps,mp2629.yaml
1138511397
F: Documentation/devicetree/bindings/regulator/mps,mp*.yaml
11398+
F: drivers/iio/adc/mp2629_adc.c
11399+
F: drivers/mfd/mp2629.c
11400+
F: drivers/power/supply/mp2629_charger.c
1138611401
F: drivers/regulator/mp5416.c
1138711402
F: drivers/regulator/mpq7920.c
1138811403
F: drivers/regulator/mpq7920.h
11404+
F: include/linux/mfd/mp2629.h
1138911405

1139011406
MOTION EYE VAIO PICTUREBOOK CAMERA DRIVER
1139111407
S: Orphan

0 commit comments

Comments
 (0)