最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

embedded linux - Add PWM pin in beaglebone black - Stack Overflow

programmeradmin3浏览0评论

I need to add 2 new pwm pins to my dts in beaglebone black, can anyone help me? it has the P9_42 as pwm pin but i'm having some dificulty in adding another pwm pin, i'll use in mg90 for a college work, i'm using linux 6.0.0 as kernel and buildroot to generate the rootfs,I needed more 2 pins as pwm, my current dts is am335x-evm:

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2012 Texas Instruments Incorporated - /
 */
/dts-v1/;

#include "am33xx.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>

/ {
    model = "TI AM335x EVM";
    compatible = "ti,am335x-evm", "ti,am33xx";

    cpus {
        cpu@0 {
            cpu0-supply = <&vdd1_reg>;
        };
    };

    memory@80000000 {
        device_type = "memory";
        reg = <0x80000000 0x10000000>; /* 256 MB */
    };

    
    backlight: backlight {
        compatible = "pwm-backlight";
        pwms = <&ecap0 0 50000 0>;
        brightness-levels = <0 51 53 56 62 75 101 152 255>;
        default-brightness-level = <8>;
    };

    panel {
        compatible = "tfc,s9700rtwv43tr-01b";

        pinctrl-names = "default";
        pinctrl-0 = <&lcd_pins_s0>;
        backlight = <&backlight>;

        port {
            panel_0: endpoint@0 {
                remote-endpoint = <&lcdc_0>;
            };
        };
    };

&am33xx_pinmux {
    pinctrl-names = "default";
    pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 &clkout2_pin>;

    ecap0_pins: backlight_pins {
        pinctrl-single,pins = <
            AM33XX_PADCONF(AM335X_PIN_ECAP0_IN_PWM0_OUT, 0x0, MUX_MODE0)
        >;
    };


    

&epwmss0 {
    status = "okay";

    ecap0: pwm@100 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&ecap0_pins>;
    };
};
发布评论

评论列表(0)

  1. 暂无评论