Skip to content

Commit 4664b0b

Browse files
cpackham-atlnzandy-shev
authored andcommitted
dt-bindings: auxdisplay: Add bindings for generic 7-segment LED
Add bindings for a generic 7-segment LED display using GPIOs. Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 899383f commit 4664b0b

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/auxdisplay/gpio-7-segment.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: GPIO based LED segment display
8+
9+
maintainers:
10+
- Chris Packham <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: gpio-7-segment
15+
16+
segment-gpios:
17+
description: |
18+
An array of GPIOs one per segment. The first GPIO corresponds to the A
19+
segment, the seventh GPIO corresponds to the G segment. Some LED blocks
20+
also have a decimal point which can be specified as an optional eighth
21+
segment.
22+
23+
-a-
24+
| |
25+
f b
26+
| |
27+
-g-
28+
| |
29+
e c
30+
| |
31+
-d- dp
32+
33+
minItems: 7
34+
maxItems: 8
35+
36+
required:
37+
- segment-gpios
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
44+
#include <dt-bindings/gpio/gpio.h>
45+
46+
led-7seg {
47+
compatible = "gpio-7-segment";
48+
segment-gpios = <&gpio 0 GPIO_ACTIVE_LOW>,
49+
<&gpio 1 GPIO_ACTIVE_LOW>,
50+
<&gpio 2 GPIO_ACTIVE_LOW>,
51+
<&gpio 3 GPIO_ACTIVE_LOW>,
52+
<&gpio 4 GPIO_ACTIVE_LOW>,
53+
<&gpio 5 GPIO_ACTIVE_LOW>,
54+
<&gpio 6 GPIO_ACTIVE_LOW>;
55+
};

0 commit comments

Comments
 (0)