15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 25def4c47SEmmanuel Vadot%YAML 1.2 35def4c47SEmmanuel Vadot--- 45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/leds/leds-lgm.yaml# 55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65def4c47SEmmanuel Vadot 75def4c47SEmmanuel Vadottitle: Intel Lightning Mountain (LGM) SoC LED Serial Shift Output (SSO) Controller driver 85def4c47SEmmanuel Vadot 95def4c47SEmmanuel Vadotmaintainers: 105def4c47SEmmanuel Vadot - Zhu, Yi Xin <Yixin.zhu@intel.com> 115def4c47SEmmanuel Vadot - Amireddy Mallikarjuna reddy <mallikarjunax.reddy@intel.com> 125def4c47SEmmanuel Vadot 135def4c47SEmmanuel Vadotproperties: 145def4c47SEmmanuel Vadot compatible: 155def4c47SEmmanuel Vadot const: intel,lgm-ssoled 165def4c47SEmmanuel Vadot 172eb4d8dcSEmmanuel Vadot reg: 182eb4d8dcSEmmanuel Vadot maxItems: 1 192eb4d8dcSEmmanuel Vadot 202eb4d8dcSEmmanuel Vadot clocks: 212eb4d8dcSEmmanuel Vadot maxItems: 2 222eb4d8dcSEmmanuel Vadot 232eb4d8dcSEmmanuel Vadot clock-names: 242eb4d8dcSEmmanuel Vadot items: 252eb4d8dcSEmmanuel Vadot - const: sso 262eb4d8dcSEmmanuel Vadot - const: fpid 272eb4d8dcSEmmanuel Vadot 285def4c47SEmmanuel Vadot gpio-controller: true 295def4c47SEmmanuel Vadot 305def4c47SEmmanuel Vadot '#gpio-cells': 315def4c47SEmmanuel Vadot const: 2 325def4c47SEmmanuel Vadot 335def4c47SEmmanuel Vadot ngpios: 345def4c47SEmmanuel Vadot minimum: 0 355def4c47SEmmanuel Vadot maximum: 32 365def4c47SEmmanuel Vadot description: 375def4c47SEmmanuel Vadot Number of GPIOs this controller provides. 385def4c47SEmmanuel Vadot 395def4c47SEmmanuel Vadot intel,sso-update-rate-hz: 405def4c47SEmmanuel Vadot description: 415def4c47SEmmanuel Vadot Blink frequency for SOUTs in Hz. 425def4c47SEmmanuel Vadot 435def4c47SEmmanuel Vadot led-controller: 445def4c47SEmmanuel Vadot type: object 455def4c47SEmmanuel Vadot description: 465def4c47SEmmanuel Vadot This sub-node must contain a sub-node for each leds. 475def4c47SEmmanuel Vadot 485def4c47SEmmanuel Vadot additionalProperties: false 495def4c47SEmmanuel Vadot 502eb4d8dcSEmmanuel Vadot properties: 512eb4d8dcSEmmanuel Vadot '#address-cells': 522eb4d8dcSEmmanuel Vadot const: 1 532eb4d8dcSEmmanuel Vadot 542eb4d8dcSEmmanuel Vadot '#size-cells': 552eb4d8dcSEmmanuel Vadot const: 0 562eb4d8dcSEmmanuel Vadot 575def4c47SEmmanuel Vadot patternProperties: 582eb4d8dcSEmmanuel Vadot "^led@[0-2]$": 59*8bab661aSEmmanuel Vadot $ref: common.yaml# 60*8bab661aSEmmanuel Vadot unevaluatedProperties: false 615def4c47SEmmanuel Vadot 625def4c47SEmmanuel Vadot properties: 635def4c47SEmmanuel Vadot reg: 645def4c47SEmmanuel Vadot description: Index of the LED. 655def4c47SEmmanuel Vadot minimum: 0 665def4c47SEmmanuel Vadot maximum: 2 675def4c47SEmmanuel Vadot 68*8bab661aSEmmanuel Vadot led-gpios: 69*8bab661aSEmmanuel Vadot maxItems: 1 70*8bab661aSEmmanuel Vadot 715def4c47SEmmanuel Vadot intel,sso-hw-trigger: 725def4c47SEmmanuel Vadot type: boolean 735def4c47SEmmanuel Vadot description: This property indicates Hardware driven/control LED. 745def4c47SEmmanuel Vadot 755def4c47SEmmanuel Vadot intel,sso-hw-blink: 765def4c47SEmmanuel Vadot type: boolean 775def4c47SEmmanuel Vadot description: This property indicates Enable LED blink by Hardware. 785def4c47SEmmanuel Vadot 795def4c47SEmmanuel Vadot intel,sso-blink-rate-hz: 805def4c47SEmmanuel Vadot description: LED HW blink frequency. 815def4c47SEmmanuel Vadot 825def4c47SEmmanuel Vadot retain-state-suspended: 835def4c47SEmmanuel Vadot type: boolean 845def4c47SEmmanuel Vadot description: The suspend state of LED can be retained. 855def4c47SEmmanuel Vadot 865def4c47SEmmanuel Vadot retain-state-shutdown: 875def4c47SEmmanuel Vadot type: boolean 885def4c47SEmmanuel Vadot description: Retain the state of the LED on shutdown. 895def4c47SEmmanuel Vadot 905def4c47SEmmanuel Vadotrequired: 915def4c47SEmmanuel Vadot - compatible 925def4c47SEmmanuel Vadot - reg 935def4c47SEmmanuel Vadot - clocks 945def4c47SEmmanuel Vadot - clock-names 955def4c47SEmmanuel Vadot - "#gpio-cells" 965def4c47SEmmanuel Vadot - gpio-controller 975def4c47SEmmanuel Vadot 985def4c47SEmmanuel VadotadditionalProperties: false 995def4c47SEmmanuel Vadot 1005def4c47SEmmanuel Vadotexamples: 1015def4c47SEmmanuel Vadot - | 1025def4c47SEmmanuel Vadot #include <dt-bindings/clock/intel,lgm-clk.h> 1035def4c47SEmmanuel Vadot #include <dt-bindings/leds/common.h> 1045def4c47SEmmanuel Vadot 1055def4c47SEmmanuel Vadot ssogpio: ssogpio@e0d40000 { 1062eb4d8dcSEmmanuel Vadot compatible = "intel,lgm-ssoled"; 1075def4c47SEmmanuel Vadot reg = <0xE0D40000 0x2E4>; 1085def4c47SEmmanuel Vadot gpio-controller; 1095def4c47SEmmanuel Vadot #gpio-cells = <2>; 1105def4c47SEmmanuel Vadot ngpios = <32>; 1115def4c47SEmmanuel Vadot pinctrl-names = "default"; 1125def4c47SEmmanuel Vadot pinctrl-0 = <&pinctrl_ledc>; 1135def4c47SEmmanuel Vadot clocks = <&cgu0 LGM_GCLK_LEDC0>, <&afeclk>; 1145def4c47SEmmanuel Vadot clock-names = "sso", "fpid"; 1155def4c47SEmmanuel Vadot intel,sso-update-rate-hz = <250000>; 1165def4c47SEmmanuel Vadot 1175def4c47SEmmanuel Vadot led-controller { 1185def4c47SEmmanuel Vadot #address-cells = <1>; 1195def4c47SEmmanuel Vadot #size-cells = <0>; 1205def4c47SEmmanuel Vadot 1215def4c47SEmmanuel Vadot led@0 { 1225def4c47SEmmanuel Vadot reg = <0>; 1235def4c47SEmmanuel Vadot function = "gphy"; 1245def4c47SEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 125*8bab661aSEmmanuel Vadot led-gpios = <&ssogpio 0 0>; 1265def4c47SEmmanuel Vadot }; 1275def4c47SEmmanuel Vadot 1282eb4d8dcSEmmanuel Vadot led@2 { 1292eb4d8dcSEmmanuel Vadot reg = <2>; 1305def4c47SEmmanuel Vadot function = LED_FUNCTION_POWER; 1315def4c47SEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 132*8bab661aSEmmanuel Vadot led-gpios = <&ssogpio 23 0>; 1335def4c47SEmmanuel Vadot }; 1345def4c47SEmmanuel Vadot }; 1355def4c47SEmmanuel Vadot }; 136