TI中文支持网
TI专业的中文技术问题搜集分享网站

[FAQ] TDA4VM: 如何使用 Linux 在 J7 EVM 上启用 EHRPWM

Part Number:TDA4VM

TDA4VM 上存在多个 EHPWM 实例。如何在 PSDKLA 上启用它们?

Annie Liu:

diff –git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi

index 8675a4887..619532f9e 100644

— a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi

+++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi

@@ -71,8 +71,74 @@

                        #mux-control-cells = <1>;

                        mux-reg-masks = <0x4000 0x8000000>, /* USB0 to SERDES0/3 mux */

                                        <0x4010 0x8000000>; /* USB1 to SERDES1/2 mux */

–           };

+               };

+

+               tbclk_ctrl: tbclk_ctrl@4140 {

+                       compatible = "syscon";

+                       reg = <0x4140 0x18>;

+               };

+       };

+

+       ehrpwm_tbclk: clk0 {

+               compatible = "ti,am654-ehrpwm-tbclk";

+               #clock-cells = <1>;

+               ti,tbclk-syscon = <&tbclk_ctrl>;

+       };

+

+       ehrpwm0: pwm@3000000 {

+               compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";

+               #pwm-cells = <3>;

+               reg = <0x0 0x3000000 0x0 0x100>;

+               power-domains = <&k3_pds 83 TI_SCI_PD_EXCLUSIVE>;

+               clocks = <&ehrpwm_tbclk 0>, <&k3_clks 83 0>;

+               clock-names = "tbclk", "fck";

+       };

+

+       ehrpwm1: pwm@3010000 {

+               compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";

+               #pwm-cells = <3>;

+               reg = <0x0 0x3010000 0x0 0x100>;

+               power-domains = <&k3_pds 84 TI_SCI_PD_EXCLUSIVE>;

+               clocks = <&ehrpwm_tbclk 1>, <&k3_clks 84 0>;

+               clock-names = "tbclk", "fck";

+       };

+

+       ehrpwm2: pwm@3020000 {

+               compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";

+               #pwm-cells = <3>;

+               reg = <0x0 0x3020000 0x0 0x100>;

+               power-domains = <&k3_pds 85 TI_SCI_PD_EXCLUSIVE>;

+               clocks = <&ehrpwm_tbclk 2>, <&k3_clks 85 0>;

+               clock-names = "tbclk", "fck";

+       };

+

+       ehrpwm3: pwm@3030000 {

+               compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";

+               #pwm-cells = <3>;

+               reg = <0x0 0x3030000 0x0 0x100>;

+               power-domains = <&k3_pds 86 TI_SCI_PD_EXCLUSIVE>;

+               clocks = <&ehrpwm_tbclk 3>, <&k3_clks 86 0>;

+               clock-names = "tbclk", "fck";

+       };

+

+       ehrpwm4: pwm@3040000 {

+               compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";

+               #pwm-cells = <3>;

+               reg = <0x0 0x3040000 0x0 0x100>;

+               power-domains = <&k3_pds 87 TI_SCI_PD_EXCLUSIVE>;

+               clocks = <&ehrpwm_tbclk 4>, <&k3_clks 87 0>;

+               clock-names = "tbclk", "fck";

+       };

+

+       ehrpwm5: pwm@3050000 {

+               compatible = "ti,am654-ehrpwm", "ti,am3352-ehrpwm";

+               #pwm-cells = <3>;

+               reg = <0x0 0x3050000 0x0 0x100>;

+               power-domains = <&k3_pds 88 TI_SCI_PD_EXCLUSIVE>;

+               clocks = <&ehrpwm_tbclk 5>, <&k3_clks 88 0>;

+               clock-names = "tbclk", "fck";

        };

+ };

所有 6 个实例均作为上述补丁的一部分启用。

所有与 EHRPWM 相关的 CONFIG 都已启用。因此,通过添加上述 DT 节点,应该能够查看 sysfs 节点。

赞(0)
未经允许不得转载:TI中文支持网 » [FAQ] TDA4VM: 如何使用 Linux 在 J7 EVM 上启用 EHRPWM
分享到: 更多 (0)