1      Hardware Overview

gpio interface,pin map:

AM335X_I2C0_W_C----------------------MCASP0_AXR1

/*4g-power*/

AM335X_MMC2_DAT0------------------GPMC_A1

/*4g-reset*/

AM335X_MMC2_DAT2------------------GPMC_A3

/*wifi-led*/

AM335X_WIFI------------------------------GPMC_A2

/*system-led*/

AM335X_XDMA_EVENT_INTR1------XDMA_EVENT_INTR1

/*key2 button*/

AM335X_SPI0_CS1-----------------------SPI0_CS1

2   GPIO DRIVER Overview

The gpio-leds driver provide userspace access gpio interface, for example: /sys/class/leds/4g-reset dir,  under the dir have brightness、trigger, led trigger mode current triggers are:

"backlight" - LED will act as a back-light, controlled by the framebuffer system

"default-on" - LED will turn on (but for leds-gpio see "default-state"

property in Documentation/devicetree/bindings/gpio/led.txt)

"heartbeat" - LED "double" flashes at a load average based rate

"disk-activity" - LED indicates disk activity

"ide-disk" - LED indicates IDE disk activity (deprecated),in new implementations use "disk-activity"

"timer" - LED flashes at a fixed, configurable rate

The gpio driver can be used to pullup/pulldown led(io) from the User interface as shown by the below diagram..

3  Kernel GPIO porting

PIN MUX

user_leds_s0: user_leds_s0 {
pinctrl-single,pins = <
AM33XX_IOPAD(0x9a8, PIN_OUTPUT_PULLUP | MUX_MODE7) /* mcasp0_axr1.gpio3_20 ----> eeprom_write_control*/
AM33XX_IOPAD(0x844, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a1.gpio1_17 ----> 4g-power*/
AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a3.gpio1_19 ---->4g-reset*/
AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a2.gpio1_18 ---->wifi-led*/
AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLUP | MUX_MODE7) /* xdma_event_intr1.gpio0_20 ---->system-led*/
AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE7) /* spi0_cs1.gpio0_6 ----> button */
>;
};

GPIO DTS NODE

leds {
pinctrl-names = "default";
pinctrl-0 = <&user_leds_s0>;

compatible = "gpio-leds";

led1 {
label = "heartbeat";
gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};

led2 {
label = "eeprom-write-control";
gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
default-state = "off";
};

led3 {
label = "4g-power";
gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
default-state = "on";
};

led4 {
label = "4g-reset";
gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
default-state = "off";
};

led5 {
label = "wif-led";
gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "off";
};
};

4    User Space Interface

root@am335x-evm:/sys/class/leds/4g-reset# ls

brightness      device          max_brightness  power           subsystem       trigger         uevent

am335x system upgrade kernel gpio(九)的更多相关文章

  1. am335x system upgrade kernel tf(五)

    1      Scope of Document This document describes TF hardware design 2      Requiremen 2.1     Functi ...

  2. am335x system upgrade kernel ethernet(四)

    1      Scope of Document This document describes ethernet hardware design and porting KZS8081 to ubo ...

  3. am335x system upgrade kernel can(八)

    1      Scope of Document This document describes can bus hardware design and can bus driver developm ...

  4. am335x system upgrade kernel uart(七)

    1      Scope of Document This document describes UART hardware design, uart driver porting 2      Re ...

  5. am335x system upgrade kernel i2c rtc eeprom(六)

    1      Scope of Document This document describes i2c bus hardware design and support i2c-devices: ee ...

  6. am335x system upgrade kernel ec20 simcom7600ce(十一)

    1      Scope of Document This document describes 4G hardware design, support quectel ec20 4G module/ ...

  7. am335x system upgrade kernel usb stroage(十)

    1      Scope of Document This document describes USB hardware design, support stardard usb2.0 port o ...

  8. am335x system upgrade kernel f-ram fm25l16b(十六)

    1      Scope of Document This document describes SPI F-RAM hardware design 2      Requiremen 2.1     ...

  9. am335x system upgrade kernel emmc(十八)

    1      Scope of Document This document describes EMMC hardware design 2      Requiremen 2.1     Func ...

随机推荐

  1. 消息认证码 - MAC (Message Authentication Code)

    消息认证包括两个目标 1消息完整性认证: 确保张三发给我的消息是完整的,在传输过程中没有被第三方篡改 2消息的来源认证: 确保这个数据是张三发给我的,而不是李四发给我的 第一个目标通常使用散列函数来达 ...

  2. ElasticSerach 6.x的安装及配置

    1.准备工作 安装Centos7.建议内存2G以上.安装java1.8环境,固定IP地址,本文省略. 2.ElasticSerach单机安装 1) 创建/opt/es目录,存放文件ElasticSer ...

  3. webapp之登录页面当input获得焦点时,顶部版权文本被顶上去 的解决方法

    如上图,顶部版权是用绝对定位写的,被顶上去了,解决方法是判断屏幕大小,改变footer的定位方式: <script> var oHeight = $(document).height(); ...

  4. Android ProGuard:代码混淆压缩

    写这篇文章的目的 一直以来,在项目中需要进行代码混淆时每次都要去翻文档,很麻烦.也没有像写代码那样记得那么多.既然要查来查去,就不如自己捋一捋这个知识点了,被人写的终究还是别人的.所以自己去翻看了很多 ...

  5. uavcan扩展帧格式 zubax

    zubax_gnss_1.0和zubax_gnss_2.0中使用的uavcan的两种不同封装方式.都是采用扩展帧29b帧类型 zubax_gnss_1.0 我的代码:https://github.co ...

  6. Winform开发1

    VS的Winform开发中,TextBox可能拖过来的时候不能改变其高度,这就要在其属性Multiline为True.

  7. Python线性回归算法【解析解,sklearn机器学习库】

    一.概述 参考博客:https://www.cnblogs.com/yszd/p/8529704.html 二.代码实现[解析解] import numpy as np import matplotl ...

  8. MySQL Lock--MySQL加锁学习1

    准备测试数据: ## 开启InnoDB Monitor SET GLOBAL innodb_status_output=ON; SET GLOBAL innodb_status_output_lock ...

  9. Oracle 限制行的子句

    12c新特性 限制行的子句允许限制查询返回的行.可以指定偏移量,以及要返回的行数或百分比.您可以使用此子句实现Top-N报告.要获得一致的结果,请指定ORDER_by子句以确保具有确定性的排序顺序. ...

  10. 腾讯云服务器搭建WampServer环境

    软件环境Windows Server 2008 R2 企业版 SP1 64位 刚刚进入 Windows Server ,你会看到以下界面: 列出了服务器的基础信息和常用配置下载 XAMPP https ...