嵌入式爱好者

6254关于M核的引脚在A核使用

2022-9-1 15:15| 发布者: ljb2019001| 查看: 495| 评论: 0

类目: AM6254系列产品  >  linux     文档编号: 746

设备树配置

&mcu_pmx0 {

        mymcugpio1_pins_default: mymcugpio1-pins-default {

                pinctrl-single,pins = <                                         

                        AM62X_MCU_IOPAD(0x004, PIN_INPUT, 7)

                >;

        };

};

 

 

&mcu_gpio0 {

        pinctrl-names = "default";

pinctrl-0 =<&mymcugpio1_pins_default>;

        status = "okay";

};

 

使用gpio-leds驱动的配置,在leds节点中添加如下

--- a/arch/arm64/boot/dts/ti/OK6254-C.dts

+++ b/arch/arm64/boot/dts/ti/OK6254-C.dts

@@ -166,7 +166,7 @@

                compatible = "gpio-leds";

                pinctrl-names = "default";

                pinctrl-0 = <&usr_led_pins_default>;

-

+               pinctrl-1 = <&mymcugpio1_pins_default>;

                led-0 {

                        label = "heartbeat";

                        gpios = <&main_gpio0 42 GPIO_ACTIVE_HIGH>;

@@ -206,6 +206,14 @@

                        led-pattern = <500 500>;

                        default-state = "on";

                };

+               

+               led-5 {

+                       label = "led5";

+                        gpios = <&mcu_gpio0 1 GPIO_ACTIVE_HIGH>;

+                        linux,default-trigger = "timer";

+                        led-pattern = <500 500>;

+                        default-state = "on";

+               };

 

        };



已解决

未解决

只是看看

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-11-24 19:19

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部