| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/leds/register-bit-led.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Register Bit LEDs |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Linus Walleij <[email protected]> |
| 11 |
|
| 12 |
description: |+ |
| 13 |
Register bit leds are used with syscon multifunctional devices where single |
| 14 |
bits in a certain register can turn on/off a single LED. The register bit LEDs |
| 15 |
appear as children to the syscon device, with the proper compatible string. |
| 16 |
For the syscon bindings see: |
| 17 |
Documentation/devicetree/bindings/mfd/syscon.yaml |
| 18 |
|
| 19 |
allOf: |
| 20 |
- $ref: /schemas/leds/common.yaml# |
| 21 |
|
| 22 |
properties: |
| 23 |
$nodename: |
| 24 |
description: |
| 25 |
The unit-address is in the form of @<reg addr>,<bit offset> |
| 26 |
pattern: '^led@[0-9a-f]+,[0-9a-f]{1,2}$' |
| 27 |
|
| 28 |
compatible: |
| 29 |
const: register-bit-led |
| 30 |
|
| 31 |
reg: |
| 32 |
description: |
| 33 |
The register address and size |
| 34 |
maxItems: 1 |
| 35 |
|
| 36 |
mask: |
| 37 |
description: |
| 38 |
bit mask for the bit controlling this LED in the register |
| 39 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 40 |
enum: |
| 41 |
[ 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, |
| 42 |
0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, 0x40000, 0x80000, |
| 43 |
0x100000, 0x200000, 0x400000, 0x800000, 0x1000000, 0x2000000, 0x4000000, |
| 44 |
0x8000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000 ] |
| 45 |
|
| 46 |
offset: |
| 47 |
description: |
| 48 |
register offset to the register controlling this LED |
| 49 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 50 |
deprecated: true |
| 51 |
|
| 52 |
required: |
| 53 |
- compatible |
| 54 |
- mask |
| 55 |
- reg |
| 56 |
|
| 57 |
unevaluatedProperties: false |
| 58 |
|
| 59 |
examples: |
| 60 |
- | |
| 61 |
|
| 62 |
syscon@10000000 { |
| 63 |
compatible = "arm,realview-pb1176-syscon", "syscon", "simple-mfd"; |
| 64 |
reg = <0x10000000 0x1000>; |
| 65 |
#address-cells = <1>; |
| 66 |
#size-cells = <1>; |
| 67 |
ranges = <0x0 0x10000000 0x1000>; |
| 68 |
|
| 69 |
led@8,0 { |
| 70 |
compatible = "register-bit-led"; |
| 71 |
reg = <0x08 0x04>; |
| 72 |
offset = <0x08>; |
| 73 |
mask = <0x01>; |
| 74 |
label = "versatile:0"; |
| 75 |
linux,default-trigger = "heartbeat"; |
| 76 |
default-state = "on"; |
| 77 |
}; |
| 78 |
led@8,1 { |
| 79 |
compatible = "register-bit-led"; |
| 80 |
reg = <0x08 0x04>; |
| 81 |
offset = <0x08>; |
| 82 |
mask = <0x02>; |
| 83 |
label = "versatile:1"; |
| 84 |
default-state = "off"; |
| 85 |
}; |
| 86 |
led@8,2 { |
| 87 |
compatible = "register-bit-led"; |
| 88 |
reg = <0x08 0x04>; |
| 89 |
offset = <0x08>; |
| 90 |
mask = <0x04>; |
| 91 |
label = "versatile:2"; |
| 92 |
default-state = "off"; |
| 93 |
}; |
| 94 |
}; |
| 95 |
... |