【TINY4412】LINUX移植笔记:(10)USB OTG

【TINY4412】LINUX移植笔记:(10)USB OTG

宿主机 : 虚拟机 Ubuntu 16.04 LTS / X64
目标板[底板]: Tiny4412SDK - 1506
目标板[核心板]: Tiny4412 - 1412
LINUX内核: 4.12.0
交叉编译器: gcc-arm-none-eabi-5_4-2016q3
日期: 2017-7-27 22:04:55
作者: SY

简介

前面已经移植好了USB接口,USB-OTG就很简单了。

设备树

# exynos4.dtsi
hsotg: hsotg@12480000 {
    compatible = "samsung,s3c6400-hsotg";
    reg = <0x12480000 0x20000>;
    interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&clock CLK_USB_DEVICE>;
    clock-names = "otg";
    phys = <&exynos_usbphy 0>;
    phy-names = "usb2-phy";
    status = "disabled";
};

# exynos4412-tiny4412.dts

&hsotg {
    status = "okay";
};
Device Drivers  --->
    [*] USB support  --->
        [*]   OTG support

分析

找到./driver/usb/dwc2/platform.c

module_platform_driver(dwc2_platform_driver);

static struct platform_driver dwc2_platform_driver = {
    .driver = {
        .name = dwc2_driver_name,
        .of_match_table = dwc2_of_match_table,
        .pm = &dwc2_dev_pm_ops,
    },
    .probe = dwc2_driver_probe,     -->
    .remove = dwc2_driver_remove,
    .shutdown = dwc2_driver_shutdown,
};

static int dwc2_driver_probe(struct platform_device *dev)
{

}

测试

0.881087] dwc2 12480000.hsotg: 12480000.hsotg supply vusb_d not found, using dummy regulator
[    0.889656] dwc2 12480000.hsotg: 12480000.hsotg supply vusb_a not found, using dummy regulator
[    1.302603] dwc2 12480000.hsotg: dwc2_check_params: Invalid parameter g_np_tx_fifo_size=1024
[    1.302709] dwc2 12480000.hsotg: EPs: 16, dedicated fifos, 7808 entries in SPRAM
[    1.422647] dwc2 12480000.hsotg: DWC OTG Controller
[    1.422712] dwc2 12480000.hsotg: new USB bus registered, assigned bus number 1
[    1.422796] dwc2 12480000.hsotg: irq 45, io mem 0x12480000
[    1.422980] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值