1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
4 $id: http://devicetree.org/schemas/mfd/gateworks-gsc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Gateworks System Controller
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
16 - Pushbutton controller
17 - Hardware monitor with ADC's for temperature and voltage rails and
21 - Tim Harvey <tharvey@gateworks.com>
25 pattern: "gsc@[0-9a-f]{1,2}"
30 description: I2C device address
36 interrupt-controller: true
49 additionalProperties: false
50 description: Optional hardware monitoring module
63 "^channel@[0-9a-f]+$":
65 additionalProperties: false
67 Properties for a single ADC which can report cooked values
68 (i.e. temperature sensor based on thermister), raw values
69 (i.e. voltage rail with a pre-scaling resistor divider).
73 description: Register of the ADC
77 description: Name of the ADC input
82 0 - temperature, in C*10
83 1 - pre-scaled 24-bit voltage value
84 2 - scaled voltage based on an optional resistor divider
86 3 - pre-scaled 16-bit voltage value
87 4 - fan tach input to report RPM's
88 $ref: /schemas/types.yaml#/definitions/uint32
91 gw,voltage-divider-ohms:
92 description: Values of resistors for divider on raw ADC input
98 gw,voltage-offset-microvolt:
100 A positive voltage offset to apply to a raw ADC
101 (i.e. to compensate for a diode drop).
116 "^fan-controller@[0-9a-f]+$":
118 additionalProperties: false
119 description: Optional fan controller
132 description: The fan controller base address
145 - interrupt-controller
150 additionalProperties: false
154 #include <dt-bindings/gpio/gpio.h>
155 #include <dt-bindings/interrupt-controller/irq.h>
157 #address-cells = <1>;
161 compatible = "gw,gsc";
163 interrupt-parent = <&gpio1>;
164 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
165 interrupt-controller;
166 #interrupt-cells = <1>;
167 #address-cells = <1>;
171 compatible = "gw,gsc-adc";
172 #address-cells = <1>;
175 channel@0 { /* A0: Board Temperature */
181 channel@2 { /* A1: Input Voltage (raw ADC) */
185 gw,voltage-divider-ohms = <22100 1000>;
186 gw,voltage-offset-microvolt = <800000>;
189 channel@b { /* A2: Battery voltage */
197 #address-cells = <1>;
199 compatible = "gw,gsc-fan";