1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/i2c/silabs,cp2112.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: CP2112 HID USB to SMBus/I2C Bridge 8 9maintainers: 10 - Danny Kaehn <danny.kaehn@plexus.com> 11 12description: 13 The CP2112 is a USB HID device which includes an integrated I2C controller 14 and 8 GPIO pins. Its GPIO pins can each be configured as inputs, open-drain 15 outputs, or push-pull outputs. 16 17properties: 18 compatible: 19 const: usb10c4,ea90 20 21 reg: 22 maxItems: 1 23 description: The USB port number 24 25 interrupt-controller: true 26 "#interrupt-cells": 27 const: 2 28 29 gpio-controller: true 30 "#gpio-cells": 31 const: 2 32 33 gpio-line-names: 34 minItems: 1 35 maxItems: 8 36 37 i2c: 38 description: The SMBus/I2C controller node for the CP2112 39 $ref: /schemas/i2c/i2c-controller.yaml# 40 unevaluatedProperties: false 41 42 properties: 43 clock-frequency: 44 minimum: 10000 45 default: 100000 46 maximum: 400000 47 48patternProperties: 49 "-hog(-[0-9]+)?$": 50 type: object 51 52 required: 53 - gpio-hog 54 55required: 56 - compatible 57 - reg 58 59additionalProperties: false 60 61examples: 62 - | 63 #include <dt-bindings/interrupt-controller/irq.h> 64 #include <dt-bindings/gpio/gpio.h> 65 66 usb { 67 #address-cells = <1>; 68 #size-cells = <0>; 69 70 cp2112: device@1 { 71 compatible = "usb10c4,ea90"; 72 reg = <1>; 73 74 gpio-controller; 75 interrupt-controller; 76 #interrupt-cells = <2>; 77 #gpio-cells = <2>; 78 gpio-line-names = "CP2112_SDA", "CP2112_SCL", "TEST2", 79 "TEST3","TEST4", "TEST5", "TEST6"; 80 81 fan-rst-hog { 82 gpio-hog; 83 gpios = <7 GPIO_ACTIVE_HIGH>; 84 output-high; 85 line-name = "FAN_RST"; 86 }; 87 88 i2c { 89 #address-cells = <1>; 90 #size-cells = <0>; 91 sda-gpios = <&cp2112 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 92 scl-gpios = <&cp2112 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 93 94 temp@48 { 95 compatible = "national,lm75"; 96 reg = <0x48>; 97 }; 98 }; 99 }; 100 }; 101