PWM: enable pwm's in device tree.

Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
This commit is contained in:
Thomas Klaehn 2017-08-14 10:09:28 +02:00
parent 05545ec382
commit 32eb5baea1
3 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,45 @@
diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
index db00d8ef7b19..9a5f612101db 100644
--- a/arch/arm/boot/dts/am335x-boneblack.dts
+++ b/arch/arm/boot/dts/am335x-boneblack.dts
@@ -75,6 +75,40 @@
AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */
>;
};
+
+ ehrpwm1_pins: pinmux_ehrpwm1a_pins {
+ pinctrl-single,pins = <
+ AM33XX_IOPAD(0x848, PIN_OUTPUT | MUX_MODE6) /* gpmc_a2.ehrpwm1a */
+ AM33XX_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE6) /* gpmc_a3.ehrpwm1b */
+ >;
+ };
+
+ ehrpwm2_pins: pinmux_ehrpwm2a_pins {
+ pinctrl-single,pins = <
+ AM33XX_IOPAD(0x820, PIN_OUTPUT | MUX_MODE4) /* ehrpwm2a */
+ AM33XX_IOPAD(0x824, PIN_OUTPUT | MUX_MODE4) /* ehrpwm2b */
+ >;
+ };
+};
+
+&epwmss1 {
+ status = "okay";
+};
+
+&epwmss2 {
+ status = "okay";
+};
+
+&ehrpwm1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&ehrpwm1_pins>;
+};
+
+&ehrpwm2 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&ehrpwm2_pins>;
};
&lcdc {

View File

@ -0,0 +1,6 @@
CONFIG_PWM=y
CONFIG_PWM_SYSFS=y
CONFIG_PWM_OMAP_DMTIMER=y
CONFIG_PWM_TIECAP=y
CONFIG_PWM_TIEHRPWM=y
CONFIG_PWM_TIPWMSS=y

View File

@ -3,8 +3,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://rtl8192cu.cfg "
SRC_URI += " \
file://rtl8192cu.cfg \
file://enable_pwm.cfg \
file://0001-bbb-enable-pwm.patch \
"
KERNEL_CONFIG_FRAGMENTS_append_ti33x = " \
${WORKDIR}/rtl8192cu.cfg \
${WORKDIR}/enable_pwm.cfg \
"