Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2014
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.79 KB | None | 0 0
  1. diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
  2. index 11412c2..0b3d55a 100644
  3. --- a/arch/arm/boot/dts/at91sam9x5.dtsi
  4. +++ b/arch/arm/boot/dts/at91sam9x5.dtsi
  5. @@ -181,10 +181,10 @@
  6. compatible = "atmel,at91sam9x5-usart";
  7. reg = <0xf801c000 0x200>;
  8. interrupts = <5 4 5>;
  9. - atmel,use-dma-rx;
  10. +/* atmel,use-dma-rx;
  11. dma-rx = <&dma0 0x20000204>;
  12. atmel,use-dma-tx;
  13. - dma-tx = <&dma0 0x10002030>;
  14. + dma-tx = <&dma0 0x10002030>; */
  15. pinctrl-names = "default";
  16. pinctrl-0 = <&pinctrl_usart0>;
  17. status = "disabled";
  18. @@ -812,14 +812,76 @@
  19. status = "disabled";
  20. };
  21.  
  22. - usb0: ohci@00600000 {
  23. + usb0: gadget@00500000 {
  24. + #address-cells = <1>;
  25. + #size-cells = <0>;
  26. + compatible = "atmel,at91sam9rl-udc";
  27. + reg = <0x00500000 0x100000
  28. + 0xf803c000 0x4000>;
  29. + interrupts = <23 4 2>;
  30. + status = "disabled";
  31. +
  32. + ep0 {
  33. + reg = <0>;
  34. + atmel,fifo-size = <64>;
  35. + atmel,nb-banks = <1>;
  36. + };
  37. +
  38. + ep1 {
  39. + reg = <1>;
  40. + atmel,fifo-size = <1024>;
  41. + atmel,nb-banks = <2>;
  42. + atmel,can-dma;
  43. + atmel,can-isoc;
  44. + };
  45. +
  46. + ep2 {
  47. + reg = <2>;
  48. + atmel,fifo-size = <1024>;
  49. + atmel,nb-banks = <2>;
  50. + atmel,can-dma;
  51. + atmel,can-isoc;
  52. + };
  53. +
  54. + ep3 {
  55. + reg = <3>;
  56. + atmel,fifo-size = <1024>;
  57. + atmel,nb-banks = <3>;
  58. + atmel,can-dma;
  59. + };
  60. +
  61. + ep4 {
  62. + reg = <4>;
  63. + atmel,fifo-size = <1024>;
  64. + atmel,nb-banks = <3>;
  65. + atmel,can-dma;
  66. + };
  67. +
  68. + ep5 {
  69. + reg = <5>;
  70. + atmel,fifo-size = <1024>;
  71. + atmel,nb-banks = <3>;
  72. + atmel,can-dma;
  73. + atmel,can-isoc;
  74. + };
  75. +
  76. + ep6 {
  77. + reg = <6>;
  78. + atmel,fifo-size = <1024>;
  79. + atmel,nb-banks = <3>;
  80. + atmel,can-dma;
  81. + atmel,can-isoc;
  82. + };
  83. + };
  84. +
  85. + usb1: ohci@00600000 {
  86. compatible = "atmel,at91rm9200-ohci", "usb-ohci";
  87. reg = <0x00600000 0x100000>;
  88. interrupts = <22 4 2>;
  89. status = "disabled";
  90. };
  91.  
  92. - usb1: ehci@00700000 {
  93. + usb2: ehci@00700000 {
  94. compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
  95. reg = <0x00700000 0x100000>;
  96. interrupts = <22 4 2>;
  97. diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi
  98. index 5791a0c..3c44242 100644
  99. --- a/arch/arm/boot/dts/at91sam9x5ek.dtsi
  100. +++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi
  101. @@ -13,7 +13,7 @@
  102. compatible = "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
  103.  
  104. chosen {
  105. - bootargs = "128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
  106. + bootargs = "128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs fbcon=rotate:1 ";
  107. };
  108.  
  109. ahb {
  110. @@ -49,6 +49,11 @@
  111. atmel,pins =
  112. <3 14 0x0 0x5>; /* PD14 gpio with pullup deglitch */
  113. };
  114. +
  115. + pinctrl_usba_vbus: usba_vbus {
  116. + atmel,pins =
  117. + <1 16 0x0 0x4>; /* PB16 GPIO with deglitch */
  118. + };
  119. };
  120. };
  121.  
  122. @@ -60,6 +65,14 @@
  123. status = "okay";
  124. };
  125.  
  126. + usart1: serial@f8020000 {
  127. + status = "okay";
  128. + };
  129. +
  130. + usart2: serial@f8024000 {
  131. + status = "okay";
  132. + };
  133. +
  134. mmc0: mmc@f0008000 {
  135. pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>;
  136. status = "okay";
  137. @@ -92,7 +105,13 @@
  138. };
  139. };
  140.  
  141. - usb0: ohci@00600000 {
  142. + usb0:gadget@00500000 {
  143. + pinctrl-names = "default";
  144. + pinctrl-0 = <&pinctrl_usba_vbus>;
  145. + status = "okay";
  146. + };
  147. +
  148. + usb1: ohci@00600000 {
  149. status = "okay";
  150. num-ports = <3>;
  151. atmel,vbus-gpio = <0 /* &pioD 18 1 *//* Activate to have access to port A */
  152. @@ -101,7 +120,7 @@
  153. >;
  154. };
  155.  
  156. - usb1: ehci@00700000 {
  157. + usb2: ehci@00700000 {
  158. status = "okay";
  159. };
  160. };
  161. diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
  162. index fc4b02b..1bf997a 100644
  163. --- a/arch/arm/mach-at91/at91sam9x5.c
  164. +++ b/arch/arm/mach-at91/at91sam9x5.c
  165. @@ -222,6 +222,8 @@ static struct clk *periph_clocks[] __initdata = {
  166.  
  167. static struct clk_lookup periph_clocks_lookups[] = {
  168. /* lookup table for DT entries */
  169. + CLKDEV_CON_DEV_ID("pclk", "500000.gadget", &udphs_clk),
  170. + CLKDEV_CON_DEV_ID("hclk", "500000.gadget", &utmi_clk),
  171. CLKDEV_CON_DEV_ID("hclk", "600000.ohci", &uhphs_clk),
  172. CLKDEV_CON_DEV_ID("ohci_clk", "600000.ohci", &uhphs_clk),
  173. CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk),
  174. diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
  175. index f500a53..17d8c7d 100644
  176. --- a/arch/arm/mach-at91/board-dt.c
  177. +++ b/arch/arm/mach-at91/board-dt.c
  178. @@ -9,7 +9,7 @@
  179.  
  180. #include <linux/types.h>
  181. #include <linux/init.h>
  182. -#include <linux/module.h>
  183. +#include <linux/module.h>
  184. #include <linux/gpio.h>
  185. #include <linux/phy.h>
  186. #include <linux/micrel_phy.h>
  187. @@ -37,6 +37,7 @@
  188. #include <linux/fb.h>
  189.  
  190. #include <video/atmel_lcdfb.h>
  191. +#include <mach/atmel_lcdc.h>
  192. #include <mach/atmel_hlcdc.h>
  193.  
  194. #include <media/soc_camera.h>
  195. @@ -47,18 +48,36 @@
  196. /*
  197. * LCD Controller
  198. */
  199. -static struct fb_videomode at91_tft_vga_modes[] = {
  200. +
  201. +/* static struct fb_videomode at91_tft_vga_modes[] = {
  202. {
  203. .name = "LG",
  204. .refresh = 60,
  205. - .xres = 800, .yres = 480,
  206. + .xres = 320, .yres = 240,
  207. .pixclock = KHZ2PICOS(33260),
  208.  
  209. - .left_margin = 88, .right_margin = 168,
  210. - .upper_margin = 8, .lower_margin = 37,
  211. - .hsync_len = 128, .vsync_len = 2,
  212. + .left_margin = 71, .right_margin = 15,
  213. + .upper_margin = 10, .lower_margin = 17,
  214. + .hsync_len = 20, .vsync_len = 2,
  215. +
  216. + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
  217. + .vmode = FB_VMODE_NONINTERLACED,
  218. + },
  219. +}; */
  220. +
  221. +static struct fb_videomode at91_tft_vga_modes[] = {
  222. + {
  223. + .name = "LG",
  224. + .refresh = 70,
  225. + .xres = 240, .yres = 320,
  226. + .pixclock = KHZ2PICOS(6278),
  227.  
  228. - .sync = 0,
  229. + .left_margin = 20, .right_margin = 10,
  230. + .upper_margin = 2, .lower_margin = 4,
  231. + .hsync_len = 10, .vsync_len = 2,
  232. +
  233. +
  234. + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
  235. .vmode = FB_VMODE_NONINTERLACED,
  236. },
  237. };
  238. @@ -66,13 +85,12 @@ static struct fb_videomode at91_tft_vga_modes[] = {
  239. static struct fb_monspecs at91fb_default_monspecs = {
  240. .manufacturer = "LG",
  241. .monitor = "LB043WQ1",
  242. -
  243. .modedb = at91_tft_vga_modes,
  244. .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
  245. .hfmin = 15000,
  246. .hfmax = 17640,
  247. - .vfmin = 57,
  248. - .vfmax = 67,
  249. + .vfmin = 50,
  250. + .vfmax = 150,
  251. };
  252.  
  253. /* Default output mode is TFT 24 bit */
  254. @@ -84,7 +102,7 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
  255. .alpha_enabled = false,
  256. .default_bpp = 16,
  257. /* Reserve enough memory for 32bpp */
  258. - .smem_len = 800 * 480 * 4,
  259. + .smem_len = 320 * 240 * 4,
  260. /* default_lcdcon2 is used for LCDCFG5 */
  261. .default_lcdcon2 = BPP_OUT_DEFAULT_LCDCFG5,
  262. .default_monspecs = &at91fb_default_monspecs,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement