0154-clk-bcm2835-Add-bindings-for-the-auxiliary-periphera.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. From 85e7001af712694f81195fe9389deb14aa562da3 Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Tue, 15 Dec 2015 15:35:57 -0800
  4. Subject: [PATCH] clk: bcm2835: Add bindings for the auxiliary peripheral clock
  5. gates.
  6. These will be used for enabling UART1, SPI1, and SPI2.
  7. Signed-off-by: Eric Anholt <eric@anholt.net>
  8. Acked-by: Rob Herring <robh@kernel.org>
  9. Signed-off-by: Michael Turquette <mturquette@baylibre.com>
  10. ---
  11. .../bindings/clock/brcm,bcm2835-aux-clock.txt | 31 ++++++++++++++++++++++
  12. include/dt-bindings/clock/bcm2835-aux.h | 17 ++++++++++++
  13. 2 files changed, 48 insertions(+)
  14. create mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt
  15. create mode 100644 include/dt-bindings/clock/bcm2835-aux.h
  16. --- /dev/null
  17. +++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt
  18. @@ -0,0 +1,31 @@
  19. +Broadcom BCM2835 auxiliary peripheral support
  20. +
  21. +This binding uses the common clock binding:
  22. + Documentation/devicetree/bindings/clock/clock-bindings.txt
  23. +
  24. +The auxiliary peripherals (UART, SPI1, and SPI2) have a small register
  25. +area controlling clock gating to the peripherals, and providing an IRQ
  26. +status register.
  27. +
  28. +Required properties:
  29. +- compatible: Should be "brcm,bcm2835-aux"
  30. +- #clock-cells: Should be <1>. The permitted clock-specifier values can be
  31. + found in include/dt-bindings/clock/bcm2835-aux.h
  32. +- reg: Specifies base physical address and size of the registers
  33. +- clocks: The parent clock phandle
  34. +
  35. +Example:
  36. +
  37. + clocks: cprman@7e101000 {
  38. + compatible = "brcm,bcm2835-cprman";
  39. + #clock-cells = <1>;
  40. + reg = <0x7e101000 0x2000>;
  41. + clocks = <&clk_osc>;
  42. + };
  43. +
  44. + aux: aux@0x7e215004 {
  45. + compatible = "brcm,bcm2835-aux";
  46. + #clock-cells = <1>;
  47. + reg = <0x7e215000 0x8>;
  48. + clocks = <&clocks BCM2835_CLOCK_VPU>;
  49. + };
  50. --- /dev/null
  51. +++ b/include/dt-bindings/clock/bcm2835-aux.h
  52. @@ -0,0 +1,17 @@
  53. +/*
  54. + * Copyright (C) 2015 Broadcom Corporation
  55. + *
  56. + * This program is free software; you can redistribute it and/or
  57. + * modify it under the terms of the GNU General Public License as
  58. + * published by the Free Software Foundation version 2.
  59. + *
  60. + * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  61. + * kind, whether express or implied; without even the implied warranty
  62. + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  63. + * GNU General Public License for more details.
  64. + */
  65. +
  66. +#define BCM2835_AUX_CLOCK_UART 0
  67. +#define BCM2835_AUX_CLOCK_SPI1 1
  68. +#define BCM2835_AUX_CLOCK_SPI2 2
  69. +#define BCM2835_AUX_CLOCK_COUNT 3