0016-ARM-dts-Add-TVE-TVC-and-ILI9322-panel-to-DIR-685.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. From 9d3b968d13ba1eecaf22d5824cf8fd270c061534 Mon Sep 17 00:00:00 2001
  2. From: Linus Walleij <[email protected]>
  3. Date: Sat, 15 Jul 2017 21:02:06 +0200
  4. Subject: [PATCH 16/31] ARM: dts: Add TVE/TVC and ILI9322 panel to DIR-685
  5. This adds the TVE200/TVC TV-encoder and the Ilitek ILI9322 panel
  6. to the DIR-685 device tree.
  7. This brings graphics to this funky router and it is possible to
  8. even run a console on its tiny screen.
  9. Incidentally this requires us to disable the access to the
  10. parallel (NOR) flash, as the communication pins to the panel
  11. are shared with the flash memory.
  12. To access the flash, a separate kernel with the panel disabled
  13. and the flash enabled should be booted. The pin control selecting
  14. whether to use the lines cannot be altered at runtime due to
  15. hardware constraints.
  16. Cc: David Lechner <[email protected]>
  17. Cc: Stefano Babic <[email protected]>
  18. Cc: Ben Dooks <[email protected]>
  19. Signed-off-by: Linus Walleij <[email protected]>
  20. ---
  21. arch/arm/boot/dts/gemini-dlink-dir-685.dts | 63 +++++++++++++++++++++++++++++-
  22. 1 file changed, 62 insertions(+), 1 deletion(-)
  23. --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
  24. +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
  25. @@ -45,6 +45,47 @@
  26. };
  27. };
  28. + vdisp: regulator {
  29. + compatible = "regulator-fixed";
  30. + regulator-name = "display-power";
  31. + regulator-min-microvolt = <3600000>;
  32. + regulator-max-microvolt = <3600000>;
  33. + /* Collides with LCD E */
  34. + gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
  35. + enable-active-high;
  36. + };
  37. +
  38. + spi {
  39. + compatible = "spi-gpio";
  40. + #address-cells = <1>;
  41. + #size-cells = <0>;
  42. +
  43. + /* Collides with IDE pins, that's cool (we do not use them) */
  44. + gpio-sck = <&gpio1 5 GPIO_ACTIVE_HIGH>;
  45. + gpio-miso = <&gpio1 8 GPIO_ACTIVE_HIGH>;
  46. + gpio-mosi = <&gpio1 7 GPIO_ACTIVE_HIGH>;
  47. + /* Collides with pflash CE1, not so cool */
  48. + cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
  49. + num-chipselects = <1>;
  50. +
  51. + panel: display@0 {
  52. + compatible = "dlink,dir-685-panel", "ilitek,ili9322";
  53. + reg = <0>;
  54. + /* 50 ns min period = 20 MHz */
  55. + spi-max-frequency = <20000000>;
  56. + spi-cpol; /* Clock active low */
  57. + vcc-supply = <&vdisp>;
  58. + iovcc-supply = <&vdisp>;
  59. + vci-supply = <&vdisp>;
  60. +
  61. + port {
  62. + panel_in: endpoint {
  63. + remote-endpoint = <&display_out>;
  64. + };
  65. + };
  66. + };
  67. + };
  68. +
  69. leds {
  70. compatible = "gpio-leds";
  71. led-wps {
  72. @@ -115,7 +156,16 @@
  73. soc {
  74. flash@30000000 {
  75. - status = "okay";
  76. + /*
  77. + * Flash access is by default disabled, because it
  78. + * collides with the Chip Enable signal for the display
  79. + * panel, that reuse the parallel flash Chip Select 1
  80. + * (CS1). Enabling flash makes graphics stop working.
  81. + *
  82. + * We might be able to hack around this by letting
  83. + * GPIO poke around in the flash controller registers.
  84. + */
  85. + /* status = "okay"; */
  86. /* 32MB of flash */
  87. reg = <0x30000000 0x02000000>;
  88. @@ -238,5 +288,16 @@
  89. ata@63000000 {
  90. status = "okay";
  91. };
  92. +
  93. + display-controller@6a000000 {
  94. + status = "okay";
  95. +
  96. + port@0 {
  97. + reg = <0>;
  98. + display_out: endpoint {
  99. + remote-endpoint = <&panel_in>;
  100. + };
  101. + };
  102. + };
  103. };
  104. };