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 led-gpios: 68 maxItems: 1 69 70 intel,sso-hw-trigger: 71 type: boolean 72 description: This property indicates Hardware driven/control LED. 73 74 intel,sso-hw-blink: 75 type: boolean 76 description: This property indicates Enable LED blink by Hardware. 77 78 intel,sso-blink-rate-hz: 79 description: LED HW blink frequency. 80 81 retain-state-suspended: 82 type: boolean 83 description: The suspend state of LED can be retained. 84 85 retain-state-shutdown: 86 type: boolean 87 description: Retain the state of the LED on shutdown. 88 89required: 90 - compatible 91 - reg 92 - clocks 93 - clock-names 94 - "#gpio-cells" 95 - gpio-controller 96 97additionalProperties: false 98 99examples: 100 - | 101 #include <dt-bindings/clock/intel,lgm-clk.h> 102 #include <dt-bindings/leds/common.h> 103 104 ssogpio: ssogpio@e0d40000 { 105 compatible = "intel,lgm-ssoled"; 106 reg = <0xE0D40000 0x2E4>; 107 gpio-controller; 108 #gpio-cells = <2>; 109 ngpios = <32>; 110 pinctrl-names = "default"; 111 pinctrl-0 = <&pinctrl_ledc>; 112 clocks = <&cgu0 LGM_GCLK_LEDC0>, <&afeclk>; 113 clock-names = "sso", "fpid"; 114 intel,sso-update-rate-hz = <250000>; 115 116 led-controller { 117 #address-cells = <1>; 118 #size-cells = <0>; 119 120 led@0 { 121 reg = <0>; 122 function = "gphy"; 123 color = <LED_COLOR_ID_GREEN>; 124 led-gpios = <&ssogpio 0 0>; 125 }; 126 127 led@2 { 128 reg = <2>; 129 function = LED_FUNCTION_POWER; 130 color = <LED_COLOR_ID_GREEN>; 131 led-gpios = <&ssogpio 23 0>; 132 }; 133 }; 134 }; 135