dts: nrf: PWM device node added to nRF52 devices with yaml binding
1. PWM device node added with alias to all nRF52x DTSI files. 1 instance for nRF52810, 3 instances for nRF52832, and 4 instance for nRF52840. 2. Added yaml binding for Nordic PWM node. Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
This commit is contained in:
parent
d6d9ca72eb
commit
7b1ebb2116
4 changed files with 143 additions and 0 deletions
|
@ -43,6 +43,7 @@
|
||||||
gpio-0 = &gpio0;
|
gpio-0 = &gpio0;
|
||||||
gpiote-0 = &gpiote;
|
gpiote-0 = &gpiote;
|
||||||
wdt-0 = &wdt;
|
wdt-0 = &wdt;
|
||||||
|
pwm-0 = &pwm0;
|
||||||
qdec-0 = &qdec;
|
qdec-0 = &qdec;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -92,6 +93,14 @@
|
||||||
label = "I2C_0";
|
label = "I2C_0";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pwm0: pwm@4001C000 {
|
||||||
|
compatible = "nordic,nrf-pwm";
|
||||||
|
reg = <0x4001C000 0x1000>;
|
||||||
|
interrupts = <28 1>;
|
||||||
|
status = "disabled";
|
||||||
|
label = "PWM_0";
|
||||||
|
};
|
||||||
|
|
||||||
qdec: qdec@40012000 {
|
qdec: qdec@40012000 {
|
||||||
compatible = "nordic,nrf-qdec";
|
compatible = "nordic,nrf-qdec";
|
||||||
reg = <0x40012000 0x1000>;
|
reg = <0x40012000 0x1000>;
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
gpio-0 = &gpio0;
|
gpio-0 = &gpio0;
|
||||||
gpiote-0 = &gpiote;
|
gpiote-0 = &gpiote;
|
||||||
wdt-0 = &wdt;
|
wdt-0 = &wdt;
|
||||||
|
pwm-0 = &pwm0;
|
||||||
|
pwm-1 = &pwm1;
|
||||||
|
pwm-2 = &pwm2;
|
||||||
qdec-0 = &qdec;
|
qdec-0 = &qdec;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -108,6 +111,30 @@
|
||||||
label = "I2C_1";
|
label = "I2C_1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pwm0: pwm@4001C000 {
|
||||||
|
compatible = "nordic,nrf-pwm";
|
||||||
|
reg = <0x4001C000 0x1000>;
|
||||||
|
interrupts = <28 1>;
|
||||||
|
status = "disabled";
|
||||||
|
label = "PWM_0";
|
||||||
|
};
|
||||||
|
|
||||||
|
pwm1: pwm@40021000 {
|
||||||
|
compatible = "nordic,nrf-pwm";
|
||||||
|
reg = <0x40021000 0x1000>;
|
||||||
|
interrupts = <33 1>;
|
||||||
|
status = "disabled";
|
||||||
|
label = "PWM_1";
|
||||||
|
};
|
||||||
|
|
||||||
|
pwm2: pwm@40022000 {
|
||||||
|
compatible = "nordic,nrf-pwm";
|
||||||
|
reg = <0x40022000 0x1000>;
|
||||||
|
interrupts = <34 1>;
|
||||||
|
status = "disabled";
|
||||||
|
label = "PWM_2";
|
||||||
|
};
|
||||||
|
|
||||||
qdec: qdec@40012000 {
|
qdec: qdec@40012000 {
|
||||||
compatible = "nordic,nrf-qdec";
|
compatible = "nordic,nrf-qdec";
|
||||||
reg = <0x40012000 0x1000>;
|
reg = <0x40012000 0x1000>;
|
||||||
|
|
|
@ -53,6 +53,10 @@
|
||||||
usbd-0 = &usbd;
|
usbd-0 = &usbd;
|
||||||
cc310 = &cryptocell;
|
cc310 = &cryptocell;
|
||||||
arm-cryptocell-310 = &cryptocell310;
|
arm-cryptocell-310 = &cryptocell310;
|
||||||
|
pwm-0 = &pwm0;
|
||||||
|
pwm-1 = &pwm1;
|
||||||
|
pwm-2 = &pwm2;
|
||||||
|
pwm-3 = &pwm3;
|
||||||
qdec-0 = &qdec;
|
qdec-0 = &qdec;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -132,6 +136,38 @@
|
||||||
label = "I2C_1";
|
label = "I2C_1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pwm0: pwm@4001C000 {
|
||||||
|
compatible = "nordic,nrf-pwm";
|
||||||
|
reg = <0x4001C000 0x1000>;
|
||||||
|
interrupts = <28 1>;
|
||||||
|
status = "disabled";
|
||||||
|
label = "PWM_0";
|
||||||
|
};
|
||||||
|
|
||||||
|
pwm1: pwm@40021000 {
|
||||||
|
compatible = "nordic,nrf-pwm";
|
||||||
|
reg = <0x40021000 0x1000>;
|
||||||
|
interrupts = <33 1>;
|
||||||
|
status = "disabled";
|
||||||
|
label = "PWM_1";
|
||||||
|
};
|
||||||
|
|
||||||
|
pwm2: pwm@40022000 {
|
||||||
|
compatible = "nordic,nrf-pwm";
|
||||||
|
reg = <0x40022000 0x1000>;
|
||||||
|
interrupts = <34 1>;
|
||||||
|
status = "disabled";
|
||||||
|
label = "PWM_2";
|
||||||
|
};
|
||||||
|
|
||||||
|
pwm3: pwm@4002D000 {
|
||||||
|
compatible = "nordic,nrf-pwm";
|
||||||
|
reg = <0x4002D000 0x1000>;
|
||||||
|
interrupts = <45 1>;
|
||||||
|
status = "disabled";
|
||||||
|
label = "PWM_3";
|
||||||
|
};
|
||||||
|
|
||||||
qdec: qdec@40012000 {
|
qdec: qdec@40012000 {
|
||||||
compatible = "nordic,nrf-qdec";
|
compatible = "nordic,nrf-qdec";
|
||||||
reg = <0x40012000 0x1000>;
|
reg = <0x40012000 0x1000>;
|
||||||
|
|
71
dts/bindings/pwm/nordic,nrf-pwm.yaml
Normal file
71
dts/bindings/pwm/nordic,nrf-pwm.yaml
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
---
|
||||||
|
title: nRF PWM
|
||||||
|
version: 0.1
|
||||||
|
|
||||||
|
description: >
|
||||||
|
This binding gives a base representation of the nRF PWM
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
constraint: "nordic,nrf-pwm"
|
||||||
|
|
||||||
|
reg:
|
||||||
|
type: array
|
||||||
|
description: mmio register space
|
||||||
|
generation: define
|
||||||
|
category: required
|
||||||
|
|
||||||
|
label:
|
||||||
|
type: string
|
||||||
|
category: required
|
||||||
|
description: Human readable string describing the device (used by Zephyr for API name)
|
||||||
|
generation: define
|
||||||
|
|
||||||
|
ch0-pin:
|
||||||
|
type: int
|
||||||
|
description: Channel 0 pin
|
||||||
|
category: optional
|
||||||
|
generation: define
|
||||||
|
|
||||||
|
ch0-inverted:
|
||||||
|
type: boolean
|
||||||
|
description: Channel 0 inverted
|
||||||
|
category: optional
|
||||||
|
generation: define
|
||||||
|
|
||||||
|
ch1-pin:
|
||||||
|
type: int
|
||||||
|
description: Channel 1 pin
|
||||||
|
category: optional
|
||||||
|
generation: define
|
||||||
|
|
||||||
|
ch1-inverted:
|
||||||
|
type: boolean
|
||||||
|
description: Channel 1 inverted
|
||||||
|
category: optional
|
||||||
|
generation: define
|
||||||
|
|
||||||
|
ch2-pin:
|
||||||
|
type: int
|
||||||
|
description: Channel 2 pin
|
||||||
|
category: optional
|
||||||
|
generation: define
|
||||||
|
|
||||||
|
ch2-inverted:
|
||||||
|
type: boolean
|
||||||
|
description: Channel 2 inverted
|
||||||
|
category: optional
|
||||||
|
generation: define
|
||||||
|
|
||||||
|
ch3-pin:
|
||||||
|
type: int
|
||||||
|
description: Channel 3 pin
|
||||||
|
category: optional
|
||||||
|
generation: define
|
||||||
|
|
||||||
|
ch3-inverted:
|
||||||
|
type: boolean
|
||||||
|
description: Channel 3 inverted
|
||||||
|
category: optional
|
||||||
|
generation: define
|
||||||
|
...
|
Loading…
Add table
Add a link
Reference in a new issue