am335x system upgrade kernel gpio(九)
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(九)的更多相关文章
- am335x system upgrade kernel tf(五)
1 Scope of Document This document describes TF hardware design 2 Requiremen 2.1 Functi ...
- am335x system upgrade kernel ethernet(四)
1 Scope of Document This document describes ethernet hardware design and porting KZS8081 to ubo ...
- am335x system upgrade kernel can(八)
1 Scope of Document This document describes can bus hardware design and can bus driver developm ...
- am335x system upgrade kernel uart(七)
1 Scope of Document This document describes UART hardware design, uart driver porting 2 Re ...
- am335x system upgrade kernel i2c rtc eeprom(六)
1 Scope of Document This document describes i2c bus hardware design and support i2c-devices: ee ...
- am335x system upgrade kernel ec20 simcom7600ce(十一)
1 Scope of Document This document describes 4G hardware design, support quectel ec20 4G module/ ...
- am335x system upgrade kernel usb stroage(十)
1 Scope of Document This document describes USB hardware design, support stardard usb2.0 port o ...
- am335x system upgrade kernel f-ram fm25l16b(十六)
1 Scope of Document This document describes SPI F-RAM hardware design 2 Requiremen 2.1 ...
- am335x system upgrade kernel emmc(十八)
1 Scope of Document This document describes EMMC hardware design 2 Requiremen 2.1 Func ...
随机推荐
- windows 开始→运行→命令集锦
windows 开始→运行→命令集锦 来源于网络,侵权请通知我删除 命令 说明 vwinver 检查Windows版本 wmimgmt.msc 打开windows管理体系结构(WMI) wupdmgr ...
- 我的 VSCode 配置
VSCode 配置 先安装 Settings Sync 插件,然后点击"download from github"之类的一个链接,弹出一个输入框,输入 a5922d436b82dd ...
- Spring Boot,Spring Security实现OAuth2 + JWT认证
阅读此文,希望是对JWT以及OAuth2有一定了解的童鞋. JWT认证,提供了对称加密以及非对称的实现. 内容源码点我 涉及到源码中两个服务 spring-boot-oauth-jwt-server ...
- MySQL安装后的初始优化
mysql数据库在安装之后,有一些内置的库(test库).用户(如root@localhost.localdomain)是不需要的,而且在Linux系统上,yum安装的mysql是默认无root密码的 ...
- linux ubuntu-16.04-配置java1.8和Tomcat8
前言 第一次使用linux ubuntu16.04 服务器,所以做一下常用配置的记录. JDK 1.创建存放jdk的目录 一般在usr/local下创建一个java文件夹 cd /usr/local ...
- wc命令——Linux系统高效数据统计工具
wc(world count)是一个统计文件字词,字节,行数的Linux命令,它可以帮我们非常方便的统计以上信息. 主要参数 常见参数如下: -c 统计字节数. -l 统计行数. -m 统计字符数.这 ...
- 配置APP的图标
https://www.cnblogs.com/hupo376787/p/10290840.html 上一篇文章说到 Flutter - 自动生成Android & iOS图标 通过flut ...
- UnicodeDecodeError: 'utf-8' codec can't decode byte..问题
解决UnicodeDecodeError: 'utf-8' codec can't decode byte..问题 问题描述: 问题分析: 该情况是由于出现了无法进行转换的 二进制数据 造成的,可以写 ...
- django路由系统及分发路由的本质
路由系统 当我们启动一个django项目后,想要通过浏览器访问到django项目中的资源 就需要在django中的urls项目中进行路由配置 urlpatterns = [ url(r'^admin/ ...
- Jmeter学习笔记(十二)——断言
一.断言简介 jmeter中有个元件叫做断言(Assertion).用于检查测试中得到的响应数据等是否符合预期,用以保证性能测试过程中的数据交互与预期一致. 使用断言的目的:在request的返回层面 ...