Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/leds/leds-lgm.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Intel Lightning Mountain (LGM) SoC LED Serial Shift Output (SSO) Controller driver
0008 
0009 maintainers:
0010   - Zhu, Yi Xin <Yixin.zhu@intel.com>
0011   - Amireddy Mallikarjuna reddy <mallikarjunax.reddy@intel.com>
0012 
0013 properties:
0014   compatible:
0015     const: intel,lgm-ssoled
0016 
0017   reg:
0018     maxItems: 1
0019 
0020   clocks:
0021     maxItems: 2
0022 
0023   clock-names:
0024     items:
0025       - const: sso
0026       - const: fpid
0027 
0028   gpio-controller: true
0029 
0030   '#gpio-cells':
0031     const: 2
0032 
0033   ngpios:
0034     minimum: 0
0035     maximum: 32
0036     description:
0037       Number of GPIOs this controller provides.
0038 
0039   intel,sso-update-rate-hz:
0040     description:
0041       Blink frequency for SOUTs in Hz.
0042 
0043   led-controller:
0044     type: object
0045     description:
0046       This sub-node must contain a sub-node for each leds.
0047 
0048     additionalProperties: false
0049 
0050     properties:
0051       '#address-cells':
0052         const: 1
0053 
0054       '#size-cells':
0055         const: 0
0056 
0057     patternProperties:
0058       "^led@[0-2]$":
0059         type: object
0060 
0061         properties:
0062           reg:
0063             description: Index of the LED.
0064             minimum: 0
0065             maximum: 2
0066 
0067           intel,sso-hw-trigger:
0068             type: boolean
0069             description: This property indicates Hardware driven/control LED.
0070 
0071           intel,sso-hw-blink:
0072             type: boolean
0073             description: This property indicates Enable LED blink by Hardware.
0074 
0075           intel,sso-blink-rate-hz:
0076             description: LED HW blink frequency.
0077 
0078           retain-state-suspended:
0079             type: boolean
0080             description: The suspend state of LED can be retained.
0081 
0082           retain-state-shutdown:
0083             type: boolean
0084             description: Retain the state of the LED on shutdown.
0085 
0086 required:
0087   - compatible
0088   - reg
0089   - clocks
0090   - clock-names
0091   - "#gpio-cells"
0092   - gpio-controller
0093 
0094 additionalProperties: false
0095 
0096 examples:
0097   - |
0098     #include <dt-bindings/clock/intel,lgm-clk.h>
0099     #include <dt-bindings/leds/common.h>
0100 
0101     ssogpio: ssogpio@e0d40000 {
0102       compatible = "intel,lgm-ssoled";
0103       reg = <0xE0D40000 0x2E4>;
0104       gpio-controller;
0105       #gpio-cells = <2>;
0106       ngpios = <32>;
0107       pinctrl-names = "default";
0108       pinctrl-0 = <&pinctrl_ledc>;
0109       clocks = <&cgu0 LGM_GCLK_LEDC0>, <&afeclk>;
0110       clock-names = "sso", "fpid";
0111       intel,sso-update-rate-hz = <250000>;
0112 
0113       led-controller {
0114         #address-cells = <1>;
0115         #size-cells = <0>;
0116 
0117         led@0 {
0118           reg = <0>;
0119           function = "gphy";
0120           color = <LED_COLOR_ID_GREEN>;
0121           led-gpio = <&ssogpio 0 0>;
0122         };
0123 
0124         led@2 {
0125           reg = <2>;
0126           function = LED_FUNCTION_POWER;
0127           color = <LED_COLOR_ID_GREEN>;
0128           led-gpio = <&ssogpio 23 0>;
0129         };
0130       };
0131     };