cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

qcom-wled.yaml (6062B)


      1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
      2%YAML 1.2
      3---
      4$id: http://devicetree.org/schemas/leds/backlight/qcom-wled.yaml#
      5$schema: http://devicetree.org/meta-schemas/core.yaml#
      6
      7title: Binding for Qualcomm Technologies, Inc. WLED driver
      8
      9maintainers:
     10  - Bjorn Andersson <bjorn.andersson@linaro.org>
     11  - Kiran Gunda <kgunda@codeaurora.org>
     12
     13description: |
     14  WLED (White Light Emitting Diode) driver is used for controlling display
     15  backlight that is part of PMIC on Qualcomm Technologies, Inc. reference
     16  platforms. The PMIC is connected to the host processor via SPMI bus.
     17
     18properties:
     19  compatible:
     20    enum:
     21      - qcom,pm8941-wled
     22      - qcom,pmi8994-wled
     23      - qcom,pmi8998-wled
     24      - qcom,pm660l-wled
     25      - qcom,pm6150l-wled
     26      - qcom,pm8150l-wled
     27
     28  reg:
     29    maxItems: 1
     30
     31  default-brightness:
     32    description: |
     33      brightness value on boot.
     34
     35  label: true
     36
     37  max-brightness:
     38    description: |
     39      Maximum brightness level.
     40
     41  qcom,cs-out:
     42    description: |
     43      enable current sink output.
     44      This property is supported only for WLED3.
     45    type: boolean
     46
     47  qcom,cabc:
     48    description: |
     49      enable content adaptive backlight control.
     50    type: boolean
     51
     52  qcom,ext-gen:
     53    description: |
     54      use externally generated modulator signal to dim.
     55      This property is supported only for WLED3.
     56    type: boolean
     57
     58  qcom,current-limit:
     59    description: |
     60      mA; per-string current limit.
     61      This property is supported only for WLED3.
     62    $ref: /schemas/types.yaml#/definitions/uint32
     63    default: 20
     64    minimum: 0
     65    maximum: 25
     66
     67  qcom,current-limit-microamp:
     68    description: |
     69      uA; per-string current limit.
     70    default: 25
     71    minimum: 0
     72    maximum: 30000
     73    multipleOf: 25
     74
     75  qcom,current-boost-limit:
     76    description: |
     77      mA; boost current limit.
     78    $ref: /schemas/types.yaml#/definitions/uint32
     79
     80  qcom,switching-freq:
     81    description: |
     82      kHz; switching frequency.
     83    $ref: /schemas/types.yaml#/definitions/uint32
     84    enum: [ 600, 640, 685, 738, 800, 872, 960, 1066, 1200, 1371, 1600, 1920,
     85            2400, 3200, 4800, 9600 ]
     86
     87  qcom,ovp:
     88    description: |
     89      V; Over-voltage protection limit.
     90      This property is supported only for WLED3.
     91    $ref: /schemas/types.yaml#/definitions/uint32
     92    enum: [ 27, 29, 32, 35 ]
     93    default: 29
     94
     95  qcom,ovp-millivolt:
     96    description: |
     97      Over-voltage protection limit. This property is for WLED4 only.
     98    $ref: /schemas/types.yaml#/definitions/uint32
     99    enum: [ 18100, 19600, 29600, 31100 ]
    100    default: 29600
    101
    102  qcom,num-strings:
    103    description: |
    104      number of led strings attached.
    105    $ref: /schemas/types.yaml#/definitions/uint32
    106
    107  qcom,enabled-strings:
    108    description: |
    109      Array of the WLED strings numbered from 0 to 3. Each
    110      string of leds are operated individually. Specify the
    111      list of strings used by the device. Any combination of
    112      led strings can be used.
    113    $ref: /schemas/types.yaml#/definitions/uint32-array
    114    minItems: 1
    115    maxItems: 4
    116
    117  qcom,external-pfet:
    118    description: |
    119      Specify if external PFET control for short circuit
    120      protection is used. This property is supported only
    121      for WLED4.
    122    type: boolean
    123
    124  qcom,auto-string-detection:
    125    description: |
    126      Enables auto-detection of the WLED string configuration.
    127      This feature is not supported for WLED3.
    128    type: boolean
    129
    130  interrupts:
    131    minItems: 1
    132    items:
    133      - description: over voltage protection interrupt.
    134      - description: short circuit interrupt.
    135
    136  interrupt-names:
    137    minItems: 1
    138    items:
    139      - const: ovp
    140      - const: short
    141
    142  qcom,modulator-sel:
    143    description: |
    144      Selects the modulator used for brightness modulation.
    145      Allowed values are,
    146           0 - Modulator A
    147           1 - Modulator B
    148      This property is applicable only to WLED5 peripheral.
    149    $ref: /schemas/types.yaml#/definitions/uint32
    150    enum: [ 0, 1 ]
    151    default: 0
    152
    153  qcom,cabc-sel:
    154    description: |
    155      Selects the CABC pin signal used for brightness modulation.
    156      Allowed values are,
    157           0 - CABC disabled
    158           1 - CABC 1
    159           2 - CABC 2
    160           3 - External signal (e.g. LPG) is used for dimming
    161      This property is applicable only to WLED5 peripheral.
    162    $ref: /schemas/types.yaml#/definitions/uint32
    163    enum: [ 0, 1, 2, 3 ]
    164
    165allOf:
    166  - if:
    167      properties:
    168        compatible:
    169          contains:
    170            const: qcom,pm8941-wled
    171
    172    then:
    173      properties:
    174        qcom,current-boost-limit:
    175          enum: [ 105, 385, 525, 805, 980, 1260, 1400, 1680 ]
    176          default: 805
    177
    178        qcom,switching-freq:
    179          default: 1600
    180
    181        qcom,num-strings:
    182          enum: [ 1, 2, 3 ]
    183
    184        interrupts:
    185          maxItems: 1
    186
    187        interrupt-names:
    188          maxItems: 1
    189
    190    else:
    191      properties:
    192        qcom,current-boost-limit:
    193          enum: [ 105, 280, 450, 620, 970, 1150, 1300, 1500 ]
    194          default: 970
    195
    196        qcom,switching-freq:
    197          default: 800
    198
    199        qcom,num-strings:
    200          enum: [ 1, 2, 3, 4 ]
    201
    202        interrupts:
    203          minItems: 2
    204
    205        interrupt-names:
    206          minItems: 2
    207  - if:
    208      properties:
    209        compatible:
    210          contains:
    211            enum:
    212              - qcom,pm8150l-wled
    213
    214    then:
    215      properties:
    216        default-brightness:
    217          minimum: 0
    218          maximum: 32767
    219
    220        max-brightness:
    221          minimum: 0
    222          maximum: 32767
    223
    224    else:
    225      properties:
    226        default-brightness:
    227          minimum: 0
    228          maximum: 4095
    229
    230        max-brightness:
    231          minimum: 0
    232          maximum: 4095
    233
    234required:
    235  - compatible
    236  - reg
    237  - label
    238
    239additionalProperties: false
    240
    241examples:
    242  - |
    243    backlight@d800 {
    244        compatible = "qcom,pm8941-wled";
    245        reg = <0xd800 0x100>;
    246        label = "backlight";
    247
    248        qcom,cs-out;
    249        qcom,current-limit = <20>;
    250        qcom,current-boost-limit = <805>;
    251        qcom,switching-freq = <1600>;
    252        qcom,ovp = <29>;
    253        qcom,num-strings = <2>;
    254        qcom,enabled-strings = <0 1>;
    255     };