Skip to content

Commit

Permalink
BCM270x: Add USB controller to Device Tree
Browse files Browse the repository at this point in the history
Add Device Tree support to dwc_otg driver.
Add device to Device Tree.
Don't add platform devices when booting in DT mode.

Tested on Pi1 and Pi2 with and without DT.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
  • Loading branch information
notro authored and popcornmix committed Jun 7, 2015
1 parent df11ad9 commit 7495f03
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions arch/arm/boot/dts/bcm2708_common.dtsi
Expand Up @@ -121,6 +121,14 @@
status = "disabled";
};

usb: usb@7e980000 {
compatible = "brcm,bcm2708-usb";
reg = <0x7e980000 0x10000>,
<0x7e006000 0x1000>;
interrupts = <2 0>,
<1 9>;
};

leds: leds {
compatible = "gpio-leds";
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-bcm2708/bcm2708.c
Expand Up @@ -955,7 +955,7 @@ void __init bcm2708_init(void)
#endif
bcm_register_device(&bcm2708_systemtimer_device);
bcm_register_device_dt(&bcm2708_fb_device);
bcm_register_device(&bcm2708_usb_device);
bcm_register_device_dt(&bcm2708_usb_device);
bcm_register_device(&bcm2708_uart1_device);
bcm_register_device(&bcm2708_powerman_device);

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-bcm2709/bcm2709.c
Expand Up @@ -978,7 +978,7 @@ void __init bcm2709_init(void)
bcm_register_device(&bcm2708_systemtimer_device);
#endif
bcm_register_device_dt(&bcm2708_fb_device);
bcm_register_device(&bcm2708_usb_device);
bcm_register_device_dt(&bcm2708_usb_device);
bcm_register_device(&bcm2708_uart1_device);
bcm_register_device(&bcm2708_powerman_device);

Expand Down
7 changes: 7 additions & 0 deletions drivers/usb/host/dwc_otg/dwc_otg_driver.c
Expand Up @@ -1043,9 +1043,16 @@ static struct platform_device_id platform_ids[] = {
};
MODULE_DEVICE_TABLE(platform, platform_ids);

static const struct of_device_id dwc_otg_of_match_table[] = {
{ .compatible = "brcm,bcm2708-usb", },
{},
};
MODULE_DEVICE_TABLE(of, dwc_otg_of_match_table);

static struct platform_driver dwc_otg_driver = {
.driver = {
.name = (char *)dwc_driver_name,
.of_match_table = dwc_otg_of_match_table,
},
.id_table = platform_ids,

Expand Down

0 comments on commit 7495f03

Please sign in to comment.