Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 3f469267 authored by Robert Nelson's avatar Robert Nelson
Browse files

k3-j721e-beagleboneai64: add pwm overlays


Signed-off-by: default avatarRobert Nelson <robertcnelson@gmail.com>
parent c9fb19dd
Branches
No related merge requests found
Pipeline #16997 passed with stage
in 5 seconds
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
* DT Overlay for BBORG_MOTOR connections within the expansion header.
*
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
*
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include "ti/k3-pinctrl.h"
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
k3-j721e-beagleboneai64-BBORG_MOTOR.kernel = __TIMESTAMP__;
p8_13.3000000.pwm = "k3-j721e-beagleboneai64-pwm-epwm0-p8_13.3000000.1.P8_13";
p8_19.3000000.pwm = "k3-j721e-beagleboneai64-pwm-epwm0-p8_19.3000000.0.P8_19";
p9_14.3020000.pwm = "k3-j721e-beagleboneai64-pwm-epwm2-p9_14.3020000.0.P9_14";
p9_16.3020000.pwm = "k3-j721e-beagleboneai64-pwm-epwm2-p9_16.3020000.1.P9_16";
};
};
&main_pmx0 {
P8_13_P8_19_pwm: P8-13-P8-19pwm-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x168, PIN_OUTPUT, 6) /* (V27) RGMII5_TD1.EHRPWM0_B */
J721E_IOPAD(0x164, PIN_OUTPUT, 6) /* (V29) RGMII5_TD2.EHRPWM0_A */
>;
};
P9_14_P9_16_pwm: P9-14-P9-16-pwm-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x178, PIN_OUTPUT, 6) /* (U27) RGMII5_RD3.EHRPWM2_A */
J721E_IOPAD(0x17C, PIN_OUTPUT, 6) /* (U24) RGMII5_RD2.EHRPWM2_B */
>;
};
bborg_motor: bborg-motor-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x10, PIN_OUTPUT, 7) /* (AJ23) PRG1_PRU0_GPO3.GPIO0_4 P8_18 m1 */
J721E_IOPAD(0xFC, PIN_OUTPUT, 7) /* (AB28) PRG0_PRU0_GPO19.GPIO0_62 P8_16 m2 */
J721E_IOPAD(0x130, PIN_OUTPUT, 7) /* (AF27) PRG0_PRU1_GPO12.GPIO0_75 P8_14 m3 */
J721E_IOPAD(0xD0, PIN_OUTPUT, 7) /* (AC27) PRG0_PRU0_GPO8.GPIO0_51 P8_26 m4 */
>;
};
};
&epwm0 {
pinctrl-names = "default";
pinctrl-0 = <&P8_13_P8_19_pwm>;
status = "okay";
};
&epwm2 {
pinctrl-names = "default";
pinctrl-0 = <&P9_14_P9_16_pwm>;
status = "okay";
};
&{/} {
leds {
pinctrl-names = "default";
pinctrl-0 = <&bborg_motor>;
compatible = "gpio-leds";
motor-1 {
label = "m1_high";
gpios = <&main_gpio0 4 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
motor-2 {
label = "m2_high";
gpios = <&main_gpio0 62 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
motor-3 {
label = "m3_high";
gpios = <&main_gpio0 75 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
motor-4 {
label = "m4_high";
gpios = <&main_gpio0 51 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
};
};
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
* DT Overlay for P8_13 and P8_19 epwm0 connections within the expansion header.
*
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
*
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include "ti/k3-pinctrl.h"
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
k3-j721e-beagleboneai64-pwm-epwm0-p8_13-p8_19.kernel = __TIMESTAMP__;
p8_13.3000000.pwm = "k3-j721e-beagleboneai64-pwm-epwm0-p8_13.3000000.1.P8_13";
p8_19.3000000.pwm = "k3-j721e-beagleboneai64-pwm-epwm0-p8_19.3000000.0.P8_19";
};
};
&main_pmx0 {
P8_13_P8_19_pwm: P8-13-P8-19pwm-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x168, PIN_OUTPUT, 6) /* (V27) RGMII5_TD1.EHRPWM0_B */
J721E_IOPAD(0x164, PIN_OUTPUT, 6) /* (V29) RGMII5_TD2.EHRPWM0_A */
>;
};
};
&epwm0 {
pinctrl-names = "default";
pinctrl-0 = <&P8_13_P8_19_pwm>;
status = "okay";
};
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
* DT Overlay for P8_13 epwm0 connections within the expansion header.
*
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
*
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include "ti/k3-pinctrl.h"
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
k3-j721e-beagleboneai64-pwm-epwm0-p8_13.kernel = __TIMESTAMP__;
p8_13.3000000.pwm = "k3-j721e-beagleboneai64-pwm-epwm0-p8_13.3000000.1.P8_13";
};
};
&main_pmx0 {
P8_13_pwm: P8-13-pwm-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x168, PIN_OUTPUT, 6) /* (V27) RGMII5_TD1.EHRPWM0_B */
>;
};
};
&epwm0 {
pinctrl-names = "default";
pinctrl-0 = <&P8_13_pwm>;
status = "okay";
};
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
* DT Overlay for P8_19 epwm0 connections within the expansion header.
*
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
*
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include "ti/k3-pinctrl.h"
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
k3-j721e-beagleboneai64-pwm-epwm0-p8_19.kernel = __TIMESTAMP__;
p8_19.3000000.pwm = "k3-j721e-beagleboneai64-pwm-epwm0-p8_19.3000000.0.P8_19";
};
};
&main_pmx0 {
P8_19_pwm: P8-19-pwm-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x164, PIN_OUTPUT, 6) /* (V29) RGMII5_TD2.EHRPWM0_A */
>;
};
};
&epwm0 {
pinctrl-names = "default";
pinctrl-0 = <&P8_19_pwm>;
status = "okay";
};
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
* DT Overlay for P9_14 and P9_16 epwm2 connections within the expansion header.
*
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
*
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include "ti/k3-pinctrl.h"
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
k3-j721e-beagleboneai64-pwm-epwm2-p9_14-p9_16.kernel = __TIMESTAMP__;
p9_14.3020000.pwm = "k3-j721e-beagleboneai64-pwm-epwm2-p9_14.3020000.0.P9_14";
p9_16.3020000.pwm = "k3-j721e-beagleboneai64-pwm-epwm2-p9_16.3020000.1.P9_16";
};
};
&main_pmx0 {
P9_14_P9_16_pwm: P9-14-P9-16-pwm-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x178, PIN_OUTPUT, 6) /* (U27) RGMII5_RD3.EHRPWM2_A */
J721E_IOPAD(0x17C, PIN_OUTPUT, 6) /* (U24) RGMII5_RD2.EHRPWM2_B */
>;
};
};
&epwm2 {
pinctrl-names = "default";
pinctrl-0 = <&P9_14_P9_16_pwm>;
status = "okay";
};
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
* DT Overlay for P9_14 epwm2 connections within the expansion header.
*
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
*
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include "ti/k3-pinctrl.h"
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
k3-j721e-beagleboneai64-pwm-epwm2-p9_14.kernel = __TIMESTAMP__;
p9_14.3020000.pwm = "k3-j721e-beagleboneai64-pwm-epwm2-p9_14.3020000.0.P9_14";
};
};
&main_pmx0 {
P9_14_pwm: P9-14-pwm-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x178, PIN_OUTPUT, 6) /* (U27) RGMII5_RD3.EHRPWM2_A */
>;
};
};
&epwm2 {
pinctrl-names = "default";
pinctrl-0 = <&P9_14_pwm>;
status = "okay";
};
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
* DT Overlay for P9_16 epwm2 connections within the expansion header.
*
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
*
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include "ti/k3-pinctrl.h"
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
k3-j721e-beagleboneai64-pwm-epwm2-p9_16.kernel = __TIMESTAMP__;
p9_16.3020000.pwm = "k3-j721e-beagleboneai64-pwm-epwm2-p9_16.3020000.1.P9_16";
};
};
&main_pmx0 {
P9_16_pwm: P9-16-pwm-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x17C, PIN_OUTPUT, 6) /* (U24) RGMII5_RD2.EHRPWM2_B */
>;
};
};
&epwm2 {
pinctrl-names = "default";
pinctrl-0 = <&P9_16_pwm>;
status = "okay";
};
......@@ -38,6 +38,37 @@
};
};
&main_gpio0 {
gpio-line-names = "", "", "", "", "P8_18", /* 0-4 */
"", "", "", "", "", /* 5-9 */
"", "", "", "", "", /* 10-14 */
"", "", "", "", "", /* 15-19 */
"", "", "", "", "", /* 20-24 */
"", "", "", "", "", /* 25-29 */
"", "", "", "", "", /* 30-34 */
"", "", "", "", "", /* 35-39 */
"", "", "", "", "", /* 40-44 */
"", "", "", "", "", /* 45-49 */
"", "P8_26", "", "", "", /* 50-54 */
"", "", "", "", "", /* 55-59 */
"", "", "P8_16", "", "", /* 60-64 */
"", "", "", "", "", /* 65-69 */
"", "", "", "", "", /* 70-74 */
"P8_14", "", "", "", ""; /* 75-79 */
};
&main_gpio1 {
gpio-line-names = "", "", "", "", "", /* 0-4 */
"", "", "", "", "", /* 5-9 */
"", "", "", "", "", /* 10-14 */
"", "", "", "", "", /* 15-19 */
"", "", "", "", "", /* 20-24 */
"", "", "", "", "", /* 25-29 */
"", "", "", "", "", /* 30-34 */
"", "", "", "", "", /* 35-39 */
"", "", "", "", ""; /* 40-44 */
};
bone_i2c_2: &main_i2c2 {
/* BBB Header: P9.19 and P9.20 */
clock-frequency = <100000>;
......@@ -52,3 +83,11 @@ bone_i2c_1: &main_i2c6 {
/* BBB Header: P9.17 and P9.18 */
clock-frequency = <100000>;
};
epwm0: &main_ehrpwm0 {
status = "okay";
};
epwm2: &main_ehrpwm2 {
status = "okay";
};
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment