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. AX2009取销售订单的税额

    直接用以下方法即可: Tax::calcTaxAmount(salesLine.TaxGroup, salesLine.TaxItemGroup, systemDateGet(),    salesL ...

  2. 第14章 Salesforce标准对象

    14.1 Sales Cloud基本信息 Sales Cloud 会为您提供管理业务的一切功能.生成最佳潜在客户.通过销售漏斗管理业务机会,并使用现有客户培养关系.以及,预测收入.设置销售区域,并将代 ...

  3. numpy模块之axis(转)

    转自:https://blog.csdn.net/fangjian1204/article/details/53055219

  4. .Net Core WebApi(1)— 入门

    主要讲述利用EF Core的CodeFirst迁移数据库,简单接口增删改查的使用,利用Swagger生成接口文档. 1.新建项目 创建DbContext 和实体模型

  5. 3.MVC基础-Code First 入门完整实例

    1.添加一个EF的上下文类  EFDbContext public class EFDbContext:DbContext { public EFDbContext() : base("EF ...

  6. 关闭 禁止 window10 UpdateOrchestrator UsoSvc服务

    背景故事:w10流氓更新关了! 然后重启还更新? 读者肯定关过win10自动跟新服务 如图: 然后 还有这个流氓设置 然而微软还有一招啊! 前有win10 update 后有计划任务 powershe ...

  7. 5_PHP数组_3_数组处理函数及其应用_4_数组和变量间的转换函数

    以下为学习孔祥盛主编的<PHP编程基础与实例教程>(第二版)所做的笔记. 数组和变量间的转换函数 1. list() 语言结构 程序: <?php $info = array('co ...

  8. 某类继承thread,同时实现runnable

    package com.giserve.test; public class ThreadTest { public static void main(String[] args) { new Thr ...

  9. 简述几个css hack?【CSS】

    (1) 图片间隙  在div中插入图片,图片会将div下方撑大3px. hack1:将<div>与<img>写在同一行. hack2:给<img>添加display ...

  10. c# FileStream 类构造函数