| 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-bcm63138.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Broadcom's BCM63138 LEDs controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Rafał Miłecki <[email protected]> |
| 11 |
|
| 12 |
description: | |
| 13 |
This LEDs controller was first used on BCM63138 and later reused on BCM4908, |
| 14 |
BCM6848, BCM6858, BCM63138, BCM63148, BCM63381 and BCM68360 SoCs. |
| 15 |
|
| 16 |
It supports up to 32 LEDs that can be connected parallelly or serially. It |
| 17 |
also includes limited support for hardware blinking. |
| 18 |
|
| 19 |
Binding serially connected LEDs isn't documented yet. |
| 20 |
|
| 21 |
properties: |
| 22 |
compatible: |
| 23 |
oneOf: |
| 24 |
- items: |
| 25 |
- enum: |
| 26 |
- brcm,bcm4908-leds |
| 27 |
- brcm,bcm6848-leds |
| 28 |
- brcm,bcm6858-leds |
| 29 |
- brcm,bcm63148-leds |
| 30 |
- brcm,bcm63381-leds |
| 31 |
- brcm,bcm68360-leds |
| 32 |
- const: brcm,bcm63138-leds |
| 33 |
- const: brcm,bcm63138-leds |
| 34 |
|
| 35 |
reg: |
| 36 |
maxItems: 1 |
| 37 |
|
| 38 |
"#address-cells": |
| 39 |
const: 1 |
| 40 |
|
| 41 |
"#size-cells": |
| 42 |
const: 0 |
| 43 |
|
| 44 |
brcm,serial-shift-bits: |
| 45 |
minimum: 1 |
| 46 |
maximum: 32 |
| 47 |
description: |
| 48 |
This describes the number of 8-bit serial shifters connected to the LED |
| 49 |
controller block. The hardware is typically using 8-bit shift registers |
| 50 |
with 8 LEDs per shift register, so 4 shifters results in 32 LEDs or 2 |
| 51 |
shifters give 16 LEDs etc, but the hardware supports any odd number of |
| 52 |
registers. If left unspecified, the hardware boot-time default is used. |
| 53 |
|
| 54 |
patternProperties: |
| 55 |
"^led@[a-f0-9]+$": |
| 56 |
type: object |
| 57 |
|
| 58 |
$ref: common.yaml# |
| 59 |
|
| 60 |
properties: |
| 61 |
reg: |
| 62 |
maxItems: 1 |
| 63 |
description: LED pin number |
| 64 |
|
| 65 |
required: |
| 66 |
- reg |
| 67 |
|
| 68 |
unevaluatedProperties: false |
| 69 |
|
| 70 |
required: |
| 71 |
- reg |
| 72 |
- "#address-cells" |
| 73 |
- "#size-cells" |
| 74 |
|
| 75 |
additionalProperties: false |
| 76 |
|
| 77 |
examples: |
| 78 |
- | |
| 79 |
#include <dt-bindings/leds/common.h> |
| 80 |
|
| 81 |
leds@ff800800 { |
| 82 |
compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds"; |
| 83 |
reg = <0xff800800 0xdc>; |
| 84 |
brcm,serial-shift-bits = <16>; |
| 85 |
|
| 86 |
#address-cells = <1>; |
| 87 |
#size-cells = <0>; |
| 88 |
|
| 89 |
led@0 { |
| 90 |
reg = <0x0>; |
| 91 |
function = LED_FUNCTION_POWER; |
| 92 |
color = <LED_COLOR_ID_GREEN>; |
| 93 |
default-state = "on"; |
| 94 |
}; |
| 95 |
|
| 96 |
led@3 { |
| 97 |
reg = <0x3>; |
| 98 |
function = LED_FUNCTION_STATUS; |
| 99 |
color = <LED_COLOR_ID_GREEN>; |
| 100 |
active-low; |
| 101 |
}; |
| 102 |
}; |