0122-bcm270x_dt-Add-dwc2-and-dwc-otg-overlays.patch 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. From f59901d7849b23cd2ae6dc17184d46f62eaf9386 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
  3. Date: Thu, 31 Dec 2015 16:44:58 +0100
  4. Subject: [PATCH] bcm270x_dt: Add dwc2 and dwc-otg overlays
  5. ---
  6. arch/arm/boot/dts/overlays/Makefile | 2 ++
  7. arch/arm/boot/dts/overlays/README | 21 +++++++++++++++++++
  8. arch/arm/boot/dts/overlays/dwc-otg-overlay.dts | 20 ++++++++++++++++++
  9. arch/arm/boot/dts/overlays/dwc2-overlay.dts | 29 ++++++++++++++++++++++++++
  10. 4 files changed, 72 insertions(+)
  11. create mode 100644 arch/arm/boot/dts/overlays/dwc-otg-overlay.dts
  12. create mode 100644 arch/arm/boot/dts/overlays/dwc2-overlay.dts
  13. --- a/arch/arm/boot/dts/overlays/Makefile
  14. +++ b/arch/arm/boot/dts/overlays/Makefile
  15. @@ -15,6 +15,8 @@ endif
  16. dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb
  17. dtb-$(RPI_DT_OVERLAYS) += at86rf233-overlay.dtb
  18. dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb
  19. +dtb-$(RPI_DT_OVERLAYS) += dwc2-overlay.dtb
  20. +dtb-$(RPI_DT_OVERLAYS) += dwc-otg-overlay.dtb
  21. dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb
  22. dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb
  23. dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb
  24. --- a/arch/arm/boot/dts/overlays/README
  25. +++ b/arch/arm/boot/dts/overlays/README
  26. @@ -198,6 +198,27 @@ Params: gpiopin GPIO co
  27. (default 4)
  28. +Name: dwc-otg
  29. +Info: Selects the dwc_otg USB controller driver which has fiq support. This
  30. + is the default on all except the Pi Zero which defaults to dwc2.
  31. +Load: dtoverlay=dwc-otg
  32. +Params: <None>
  33. +
  34. +
  35. +Name: dwc2
  36. +Info: Selects the dwc2 USB controller driver
  37. +Load: dtoverlay=dwc2,<param>=<val>
  38. +Params: dr_mode Dual role mode: "host", "peripheral" or "otg"
  39. +
  40. + g-rx-fifo-size Size of rx fifo size in gadget mode
  41. +
  42. + g-np-tx-fifo-size Size of non-periodic tx fifo size in gadget
  43. + mode
  44. +
  45. + g-tx-fifo-size Size of periodic tx fifo per endpoint
  46. + (except ep0) in gadget mode
  47. +
  48. +
  49. [ The ds1307-rtc overlay has been deleted. See i2c-rtc. ]
  50. --- /dev/null
  51. +++ b/arch/arm/boot/dts/overlays/dwc-otg-overlay.dts
  52. @@ -0,0 +1,20 @@
  53. +/dts-v1/;
  54. +/plugin/;
  55. +
  56. +/{
  57. + compatible = "brcm,bcm2708";
  58. +
  59. + fragment@0 {
  60. + target = <&usb>;
  61. + #address-cells = <1>;
  62. + #size-cells = <1>;
  63. + __overlay__ {
  64. + compatible = "brcm,bcm2708-usb";
  65. + reg = <0x7e980000 0x10000>,
  66. + <0x7e006000 0x1000>;
  67. + interrupts = <2 0>,
  68. + <1 9>;
  69. + status = "okay";
  70. + };
  71. + };
  72. +};
  73. --- /dev/null
  74. +++ b/arch/arm/boot/dts/overlays/dwc2-overlay.dts
  75. @@ -0,0 +1,29 @@
  76. +/dts-v1/;
  77. +/plugin/;
  78. +
  79. +/{
  80. + compatible = "brcm,bcm2708";
  81. +
  82. + fragment@0 {
  83. + target = <&usb>;
  84. + #address-cells = <1>;
  85. + #size-cells = <1>;
  86. + __overlay__ {
  87. + compatible = "brcm,bcm2835-usb";
  88. + reg = <0x7e980000 0x10000>;
  89. + interrupts = <1 9>;
  90. + dr_mode = "otg";
  91. + g-np-tx-fifo-size = <32>;
  92. + g-rx-fifo-size = <256>;
  93. + g-tx-fifo-size = <256 128 128 64 64 64 32>;
  94. + status = "okay";
  95. + };
  96. + };
  97. +
  98. + __overrides__ {
  99. + dr_mode = <&usb>, "dr_mode";
  100. + g-np-tx-fifo-size = <&usb>,"g-np-tx-fifo-size:0";
  101. + g-rx-fifo-size = <&usb>,"g-rx-fifo-size:0";
  102. + g-tx-fifo-size = <&usb>,"g-tx-fifo-size:0";
  103. + };
  104. +};