Path: blob/master/Documentation/devicetree/bindings/embedded-controller/gw,gsc.yaml
29285 views
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause1%YAML 1.22---3$id: http://devicetree.org/schemas/embedded-controller/gw,gsc.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Gateworks System Controller78description: |9The Gateworks System Controller (GSC) is a device present across various10Gateworks product families that provides a set of system related features11such as the following (refer to the board hardware user manuals to see what12features are present)13- Watchdog Timer14- GPIO15- Pushbutton controller16- Hardware monitor with ADC's for temperature and voltage rails and17fan controller1819maintainers:20- Tim Harvey <tharvey@gateworks.com>2122properties:23$nodename:24pattern: "gsc@[0-9a-f]{1,2}"25compatible:26const: gw,gsc2728reg:29description: I2C device address30maxItems: 13132interrupts:33maxItems: 13435interrupt-controller: true3637"#interrupt-cells":38const: 13940"#address-cells":41const: 14243"#size-cells":44const: 04546adc:47type: object48additionalProperties: false49description: Optional hardware monitoring module5051properties:52compatible:53const: gw,gsc-adc5455"#address-cells":56const: 15758"#size-cells":59const: 06061patternProperties:62"^channel@[0-9a-f]+$":63type: object64additionalProperties: false65description: |66Properties for a single ADC which can report cooked values67(i.e. temperature sensor based on thermister), raw values68(i.e. voltage rail with a pre-scaling resistor divider).6970properties:71reg:72description: Register of the ADC73maxItems: 17475label:76description: Name of the ADC input7778gw,mode:79description: |80conversion mode:810 - temperature, in C*10821 - pre-scaled 24-bit voltage value832 - scaled voltage based on an optional resistor divider84and optional offset853 - pre-scaled 16-bit voltage value864 - fan tach input to report RPM's87$ref: /schemas/types.yaml#/definitions/uint3288enum: [0, 1, 2, 3, 4]8990gw,voltage-divider-ohms:91description: Values of resistors for divider on raw ADC input92maxItems: 293items:94minimum: 100095maximum: 10000009697gw,voltage-offset-microvolt:98description: |99A positive voltage offset to apply to a raw ADC100(i.e. to compensate for a diode drop).101minimum: 0102maximum: 1000000103104required:105- gw,mode106- reg107- label108109required:110- compatible111- "#address-cells"112- "#size-cells"113114patternProperties:115"^fan-controller@[0-9a-f]+$":116type: object117additionalProperties: false118description: Optional fan controller119120properties:121compatible:122const: gw,gsc-fan123124reg:125description: The fan controller base address126maxItems: 1127128required:129- compatible130- reg131132required:133- compatible134- reg135- interrupts136- interrupt-controller137- "#interrupt-cells"138- "#address-cells"139- "#size-cells"140141additionalProperties: false142143examples:144- |145#include <dt-bindings/gpio/gpio.h>146#include <dt-bindings/interrupt-controller/irq.h>147i2c {148#address-cells = <1>;149#size-cells = <0>;150151gsc@20 {152compatible = "gw,gsc";153reg = <0x20>;154interrupt-parent = <&gpio1>;155interrupts = <4 IRQ_TYPE_LEVEL_LOW>;156interrupt-controller;157#interrupt-cells = <1>;158#address-cells = <1>;159#size-cells = <0>;160161adc {162compatible = "gw,gsc-adc";163#address-cells = <1>;164#size-cells = <0>;165166channel@0 { /* A0: Board Temperature */167reg = <0x00>;168label = "temp";169gw,mode = <0>;170};171172channel@2 { /* A1: Input Voltage (raw ADC) */173reg = <0x02>;174label = "vdd_vin";175gw,mode = <1>;176gw,voltage-divider-ohms = <22100 1000>;177gw,voltage-offset-microvolt = <800000>;178};179180channel@b { /* A2: Battery voltage */181reg = <0x0b>;182label = "vdd_bat";183gw,mode = <1>;184};185};186187fan-controller@2c {188compatible = "gw,gsc-fan";189reg = <0x2c>;190};191};192};193194195