0051-BCM2708-use-pinctrl-bcm2835.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. From fff70fcc73e09e86d46f87dd44459870f15423b2 Mon Sep 17 00:00:00 2001
  2. From: notro <notro@tronnes.org>
  3. Date: Thu, 10 Jul 2014 13:59:47 +0200
  4. Subject: [PATCH 051/114] BCM2708: use pinctrl-bcm2835
  5. Use pinctrl-bcm2835 instead of the pinctrl-bcm2708 and bcm2708_gpio
  6. combination.
  7. Signed-off-by: Noralf Tronnes <notro@tronnes.org>
  8. ---
  9. arch/arm/boot/dts/bcm2708.dtsi | 12 ++++++++++++
  10. arch/arm/mach-bcm2708/Kconfig | 3 +++
  11. arch/arm/mach-bcm2708/bcm2708.c | 2 +-
  12. drivers/pinctrl/pinctrl-bcm2835.c | 2 +-
  13. 4 files changed, 17 insertions(+), 2 deletions(-)
  14. --- a/arch/arm/boot/dts/bcm2708.dtsi
  15. +++ b/arch/arm/boot/dts/bcm2708.dtsi
  16. @@ -26,6 +26,18 @@
  17. interrupt-controller;
  18. #interrupt-cells = <2>;
  19. };
  20. +
  21. + gpio: gpio {
  22. + compatible = "brcm,bcm2835-gpio";
  23. + reg = <0x7e200000 0xb4>;
  24. + interrupts = <2 17>, <2 18>;
  25. +
  26. + gpio-controller;
  27. + #gpio-cells = <2>;
  28. +
  29. + interrupt-controller;
  30. + #interrupt-cells = <2>;
  31. + };
  32. };
  33. clocks {
  34. --- a/arch/arm/mach-bcm2708/Kconfig
  35. +++ b/arch/arm/mach-bcm2708/Kconfig
  36. @@ -14,6 +14,9 @@ config BCM2708_DT
  37. depends on MACH_BCM2708
  38. default n
  39. select USE_OF
  40. + select ARCH_REQUIRE_GPIOLIB
  41. + select PINCTRL
  42. + select PINCTRL_BCM2835
  43. help
  44. Enable Device Tree support for BCM2708
  45. --- a/arch/arm/mach-bcm2708/bcm2708.c
  46. +++ b/arch/arm/mach-bcm2708/bcm2708.c
  47. @@ -767,7 +767,7 @@ void __init bcm2708_init(void)
  48. bcm_register_device(&bcm2708_dmaman_device);
  49. bcm_register_device(&bcm2708_vcio_device);
  50. #ifdef CONFIG_BCM2708_GPIO
  51. - bcm_register_device(&bcm2708_gpio_device);
  52. + bcm_register_device_dt(&bcm2708_gpio_device);
  53. #endif
  54. #if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
  55. w1_gpio_pdata.pin = w1_gpio_pin;
  56. --- a/drivers/pinctrl/pinctrl-bcm2835.c
  57. +++ b/drivers/pinctrl/pinctrl-bcm2835.c
  58. @@ -382,7 +382,7 @@ static struct gpio_chip bcm2835_gpio_chi
  59. .get = bcm2835_gpio_get,
  60. .set = bcm2835_gpio_set,
  61. .to_irq = bcm2835_gpio_to_irq,
  62. - .base = -1,
  63. + .base = 0,
  64. .ngpio = BCM2835_NUM_GPIOS,
  65. .can_sleep = false,
  66. };