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 ...
随机推荐
- linux中用户环境变量问题
修改所有用户的环境变量:/etc/profile文件 只修改root用户的环境变量:~/.bashrc文件 只修改某个非root用户的环境变量:/home/非root用户名/.bashrc文件
- Django视图扩展类
Django视图扩展类 扩展类必须配合GenericAPIView使用扩展类内部的方法,在调用序列化器时,都是使用get_serializer 需要自定义get.post等请求方法,内部实现调用扩展类 ...
- Testbench编写技巧
一.基本架构(常用模板) `timescale 1ns/1ps //时间精度 `define Clock //时钟周期 module my_design_tb; //================= ...
- jwt 0.9.0(一)推荐jwt理由
本人一直有良好的写技术博文的习惯,最近研究 jwt 有点点心得,赶紧记下来. 我推荐使用jwt(Json Web Token)这种客户端存储状态方式,代替传统的服务端存储状态方式(比如redis存储s ...
- Python Django 协程报错,进程池、线程池与异步调用、回调机制
一.问题描述 在Django视图函数中,导入 gevent 模块 import gevent from gevent import monkey; monkey.patch_all() from ge ...
- Unity的学习笔记(鼠标移动控制视角移动)
using UnityEngine; public class MouseLook : MonoBehaviour { , MouseX = , MouseY = } //定义一个枚举,移动xy,或者 ...
- 解决Ubuntu 16.04 环境下Python 无法显示中文的问题
一.下载中文字体(https://pan.baidu.com/s/1EqabwENMxR2WJrHfKvyrIw 这里下载多是SImhei字体) 安装字体:解压:unzip SimHei.zip拷贝字 ...
- Oracle.EntityFrameworkCore使用时报错:Specified cast is not valid
我用的是:Oracle.EntityframeworkCore 2.19.30 如果看到报错:System.InvalidCastException:“Specified cast is not va ...
- iOS - swift 后使用打包动态库
WWDC2014上发布的Xcode6 beta版有了不少更新,其中令我惊讶的一个是苹果在iOS上开放了动态库,在Xcode6 Beta版的更新文档中是这样描述的: Frameworks for iOS ...
- 不能在本机启动SQL Server服务错误代码126(要在协议里面禁用所有别的VIA,是怎么回事?)
在启动数据库sql服务的时候提示[Windows 不能在 本地计算机 启动 SQL Server . 有关更多信息,查阅系统事件日志.如果这是非 Microsoft 服务,请与服务厂商联系,并参考特定 ...