完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
1,修改/kernel/arch/arm/boot/dts/rk3288-box.dts
u***_control { compatible = "rockchip,rk3288-u***-control"; host_drv_gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_LOW>;//modify by jiangdou otg_drv_gpio = <&gpio0 GPIO_B4 GPIO_ACTIVE_LOW>; ++ 3G_VCC_33_POWER = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;//modify by jiangdou for 3G_POWER 2,修改/kernel/drivers/u***/dwc_otg_310/u***dev_rk32.c ++#define INVALID_GPIO -1 //add for 3G_power by jiangdou ++int power_3g_en = INVALID_GPIO;//add for 3G_power by jiangdou static int rk_u***_control_probe(struct platform_device *pdev) { int gpio, err; struct device_node *np = pdev->dev.of_node; int ret = 0; control_u*** = devm_kzalloc(&pdev->dev, sizeof(*control_u***), GFP_KERNEL); if (!control_u***) { dev_err(&pdev->dev, "unable to alloc memory for control u***n"); ret = -ENOMEM; goto out; } control_u***->chip_id = RK3288_USB_CTLR; control_u***->remote_wakeup = of_property_read_bool(np, "rockchip,remote_wakeup"); control_u***->u***_irq_wakeup = of_property_read_bool(np, "rockchip,u***_irq_wakeup"); INIT_DELAYED_WORK(&control_u***->u***_charger_det_work, u***_battery_charger_detect_work); control_u***->host_gpios = devm_kzalloc(&pdev->dev, sizeof(struct gpio), GFP_KERNEL); if (!control_u***->host_gpios) { dev_err(&pdev->dev, "unable to alloc memory for host_gpiosn"); ret = -ENOMEM; goto out; } ++/*------------------------------我是分割线----------------------------------*/ ++//add for 3G_power by jiangdou start ++ power_3g_en = of_get_named_gpio(np, "3G_VCC_33_POWER", 0); ++ if (!gpio_is_valid(power_3g_en)) { ++ dev_err(&pdev->dev, "invalid host gpio%dn", power_3g_en); ++ } else { ++ err = devm_gpio_request(&pdev->dev, power_3g_en, "3G_VCC_33_POWER"); ++ if (err) { ++ dev_err(&pdev->dev, ++ "failed to request GPIO%d for host_drvn", ++ power_3g_en); ++ ret = err; ++ //goto out; ++ } ++ gpio_direction_output(power_3g_en, 1); ++ } ++ ++//add for 3G_power by jiangdou end ++/*------------------------------我是分割线----------------------------------*/ gpio = of_get_named_gpio(np, "host_drv_gpio", 0); 3..by jiangdou QQ:344283973 |
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
谁有3566+电池+POE充电的方案,有个项目需要用该功能的主板
437 浏览 0 评论
RK3588的GMAC0与PHY的参考时钟电平匹配问题??????
4425 浏览 1 评论
请问各位大佬,如何解决,瑞芯微 RV1126B 使用 mpp 自带工具 调试时,内核直接报错崩溃!
1802 浏览 0 评论
使用rk3568开发板,核0\\1\\3运行linux,核2运行hal,在核0中怎么关闭核2
2359 浏览 0 评论
2363 浏览 0 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 13:25 , Processed in 0.650340 second(s), Total 75, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
4443