How to add 3G modem in Sabresx board
来源:互联网 发布:弗洛伊德算法复杂动画 编辑:程序博客网 时间:2024/05/29 08:40
How to add 3G modem in Sabresx board
From 7fb55cad18e2d482aa88fe6ed0ee552df6a813c2 Mon Sep 17 00:00:00 2001
From: Jianzheng Zhou <Jianzheng.zhou@freescale.com>Date: Mon, 30 Jun 2014 17:31:03 +0800
Subject: [PATCH] Add 3G modem support
Signed-off-by: Jianzheng Zhou <Jianzheng.zhou@freescale.com>
---
arch/arm/boot/dts/imx6sx-sdb.dts | 5 +++++
arch/arm/mach-imx/mach-imx6sx.c | 24 ++++++++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
index 9c58768..aa1bd4d 100644
--- a/arch/arm/boot/dts/imx6sx-sdb.dts
+++ b/arch/arm/boot/dts/imx6sx-sdb.dts
@@ -146,6 +146,10 @@
status = "okay";
};
+ minipcie_ctrl {
+ power-on-gpio = <&gpio2 1 0>;
+ };
+
bt_rfkill {
compatible = "fsl,mxc_bt_rfkill";
bt-power-gpios = <&gpio4 10 0>;
@@ -425,6 +429,7 @@
hog {
pinctrl_hog: hoggrp {
fsl,pins = <
+ MX6SX_PAD_ENET1_CRS__GPIO2_IO_1 0x80000000
MX6SX_PAD_ENET2_COL__GPIO2_IO_6 0x80000000
MX6SX_PAD_QSPI1A_DATA0__GPIO4_IO_16 0x80000000
MX6SX_PAD_QSPI1A_DATA3__GPIO4_IO_19 0x80000000
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
index c5a8ef3..6bfca53 100644
--- a/arch/arm/mach-imx/mach-imx6sx.c
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -223,6 +223,29 @@ static void __init imx6sx_enet_plt_init(void)
if (np && of_get_property(np, "fsl,magic-packet", NULL))
fec_pdata[1].sleep_mode_enable = imx6sx_fec2_stop_enable;
}
+/*
+ * Init GPIO PCIE_PWR_EN to keep power supply to miniPCIE 3G modem
+ *
+ */
+static void __init imx6sx_mini_pcie_init(void)
+{
+ struct device_node *np = NULL;
+ int ret, power_on_gpio;
+ np = of_find_node_by_name(NULL, "minipcie_ctrl");
+ if (!np)
+ return;
+
+ power_on_gpio = of_get_named_gpio(np, "power-on-gpio", 0);
+ if (gpio_is_valid(power_on_gpio)) {
+ ret = gpio_request_one(power_on_gpio,
+ GPIOF_OUT_INIT_HIGH,
+ "miniPCIE Power On");
+ pr_warn("!!request miniPCIE Power On gpio\n");
+ if (ret)
+ pr_warn("failed to request miniPCIE Power On gpio\n");
+ }
+}
+
static inline void imx6sx_enet_init(void)
{
@@ -276,6 +299,7 @@ static void __init imx6sx_init_machine(void)
imx_anatop_init();
imx6_pm_init();
imx6sx_qos_init();
+ imx6sx_mini_pcie_init();
}
static void __init imx6sx_opp_init(struct device *cpu_dev)
--
1.8.0
0 0
- How to add 3G modem in Sabresx board
- How to add swap space in Linux
- How to add Snap-in (扩展Powershell)
- How to add new partition in centos
- How to add route in Linux
- 【skill】How to add codes in csdn ?
- How to add user in gerrit
- How To Add Bookmark (mark) In Pycharm
- How To Add Bookmark (mark) In Pycharm
- Android Build System ---- how to add your product and board config *.mk
- Android Build System ---- how to add your product and board config *.mk
- Android Build System ---- how to add your product and board config *.mk
- Android Build System - how to add your product and board config *.mk[转]
- Android Build System ---- how to add your product and board config *.mk
- Android Build System ---- how to add your product and board config *.mk
- How to add a DELAY in applying transactions in GoldenGate?
- How To Add Menus to the Menubar in Cocoa
- How to add application to right click menu in Windows
- 浙江大学电气工程学院顶级期刊和优秀期刊目录(2015年1月公布)
- 素数的家族(回文素数)
- OpenGL启用双缓冲时颜色变淡或者不纯的解法方法
- 素数的家族(要发就发)
- LevelDB原理探究与代码分析
- How to add 3G modem in Sabresx board
- 【Qt5开发及实例】20、实现一个飞舞的蝴蝶
- java interface和class中的协变
- MFC状态栏的创建、管理、维护等
- CE教程第八步之多级指针
- MFC中如何删除工具栏中多余的图标
- [LeetCode]30.Substring with Concatenation of All Words
- CentOS卸载JDK并安装新的JDK(tar,rpm)
- BZOJ 2594 LCT维护最小生成树