1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/leds/leds-lgm.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Intel Lightning Mountain (LGM) SoC LED Serial Shift Output (SSO) Controller driver 8 9maintainers: 10 - Zhu, Yi Xin <Yixin.zhu@intel.com> 11 - Amireddy Mallikarjuna reddy <mallikarjunax.reddy@intel.com> 12 13properties: 14 compatible: 15 const: intel,lgm-ssoled 16 17 reg: 18 maxItems: 1 19 20 clocks: 21 maxItems: 2 22 23 clock-names: 24 items: 25 - const: sso 26 - const: fpid 27 28 gpio-controller: true 29 30 '#gpio-cells': 31 const: 2 32 33 ngpios: 34 minimum: 0 35 maximum: 32 36 description: 37 Number of GPIOs this controller provides. 38 39 intel,sso-update-rate-hz: 40 description: 41 Blink frequency for SOUTs in Hz. 42 43 led-controller: 44 type: object 45 description: 46 This sub-node must contain a sub-node for each leds. 47 48 additionalProperties: false 49 50 properties: 51 '#address-cells': 52 const: 1 53 54 '#size-cells': 55 const: 0 56 57 patternProperties: 58 "^led@[0-2]$": 59 type: object 60 61 properties: 62 reg: 63 description: Index of the LED. 64 minimum: 0 65 maximum: 2 66 67 intel,sso-hw-trigger: 68 type: boolean 69 description: This property indicates Hardware driven/control LED. 70 71 intel,sso-hw-blink: 72 type: boolean 73 description: This property indicates Enable LED blink by Hardware. 74 75 intel,sso-blink-rate-hz: 76 description: LED HW blink frequency. 77 78 retain-state-suspended: 79 type: boolean 80 description: The suspend state of LED can be retained. 81 82 retain-state-shutdown: 83 type: boolean 84 description: Retain the state of the LED on shutdown. 85 86required: 87 - compatible 88 - reg 89 - clocks 90 - clock-names 91 - "#gpio-cells" 92 - gpio-controller 93 94additionalProperties: false 95 96examples: 97 - | 98 #include <dt-bindings/clock/intel,lgm-clk.h> 99 #include <dt-bindings/leds/common.h> 100 101 ssogpio: ssogpio@e0d40000 { 102 compatible = "intel,lgm-ssoled"; 103 reg = <0xE0D40000 0x2E4>; 104 gpio-controller; 105 #gpio-cells = <2>; 106 ngpios = <32>; 107 pinctrl-names = "default"; 108 pinctrl-0 = <&pinctrl_ledc>; 109 clocks = <&cgu0 LGM_GCLK_LEDC0>, <&afeclk>; 110 clock-names = "sso", "fpid"; 111 intel,sso-update-rate-hz = <250000>; 112 113 led-controller { 114 #address-cells = <1>; 115 #size-cells = <0>; 116 117 led@0 { 118 reg = <0>; 119 function = "gphy"; 120 color = <LED_COLOR_ID_GREEN>; 121 led-gpio = <&ssogpio 0 0>; 122 }; 123 124 led@2 { 125 reg = <2>; 126 function = LED_FUNCTION_POWER; 127 color = <LED_COLOR_ID_GREEN>; 128 led-gpio = <&ssogpio 23 0>; 129 }; 130 }; 131 }; 132