Skip to content

Commit 02e9ebf

Browse files
soburikartben
authored andcommitted
dts: bindings: pwm: Add Arduino PWM nexus mapping
Add `adruino-header-pwm` map node to describe well Arduino PWM pin configuration. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent 1ebffbd commit 02e9ebf

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (C) 2025 TOKITA Hiroshi
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
5+
PWM channels exposed on Arduino headers.
6+
7+
Arduino's PWM pin names shares the same definition as Digital pins one.
8+
That is, the mapping of PWM output on pin D3 on Arduino UNO R3 header is
9+
10+
pwm-map = <9 0 0 &pwm0 1 0 0>;
11+
12+
compatible: "arduino-header-pwm"
13+
14+
include: [base.yaml, pwm-nexus.yaml]

dts/bindings/pwm/pwm-nexus.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2025 TOKITA Hiroshi
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Common fields for PWM nexus nodes
5+
6+
properties:
7+
pwm-map:
8+
type: compound
9+
required: true
10+
11+
pwm-map-mask:
12+
type: array
13+
14+
pwm-map-pass-thru:
15+
type: array
16+
17+
"#pwm-cells":
18+
type: int
19+
required: true
20+
description: Number of items to expect in a PWM specifier

0 commit comments

Comments
 (0)