102-dt-bindings-clock-at91-add-sama7g5-pll-defines.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From 44bb7c72cdd830f54fe18e730205f892d9cbfe39 Mon Sep 17 00:00:00 2001
  2. From: Eugen Hristev <[email protected]>
  3. Date: Thu, 19 Nov 2020 17:43:08 +0200
  4. Subject: [PATCH 102/247] dt-bindings: clock: at91: add sama7g5 pll defines
  5. Add SAMA7G5 specific PLL defines to be referenced in a phandle as a
  6. PMC_TYPE_CORE clock.
  7. Suggested-by: Claudiu Beznea <[email protected]>
  8. Signed-off-by: Eugen Hristev <[email protected]>
  9. [[email protected]: adapt comit message, adapt sama7g5.c]
  10. Signed-off-by: Claudiu Beznea <[email protected]>
  11. Link: https://lore.kernel.org/r/[email protected]
  12. Signed-off-by: Stephen Boyd <[email protected]>
  13. ---
  14. drivers/clk/at91/sama7g5.c | 6 +++---
  15. include/dt-bindings/clock/at91.h | 10 ++++++++++
  16. 2 files changed, 13 insertions(+), 3 deletions(-)
  17. --- a/drivers/clk/at91/sama7g5.c
  18. +++ b/drivers/clk/at91/sama7g5.c
  19. @@ -182,13 +182,13 @@ static const struct {
  20. .p = "audiopll_fracck",
  21. .l = &pll_layout_divpmc,
  22. .t = PLL_TYPE_DIV,
  23. - .eid = PMC_I2S0_MUX, },
  24. + .eid = PMC_AUDIOPMCPLL, },
  25. { .n = "audiopll_diviock",
  26. .p = "audiopll_fracck",
  27. .l = &pll_layout_divio,
  28. .t = PLL_TYPE_DIV,
  29. - .eid = PMC_I2S1_MUX, },
  30. + .eid = PMC_AUDIOIOPLL, },
  31. },
  32. [PLL_ID_ETH] = {
  33. @@ -835,7 +835,7 @@ static void __init sama7g5_pmc_setup(str
  34. if (IS_ERR(regmap))
  35. return;
  36. - sama7g5_pmc = pmc_data_allocate(PMC_I2S1_MUX + 1,
  37. + sama7g5_pmc = pmc_data_allocate(PMC_ETHPLL + 1,
  38. nck(sama7g5_systemck),
  39. nck(sama7g5_periphck),
  40. nck(sama7g5_gck), 8);
  41. --- a/include/dt-bindings/clock/at91.h
  42. +++ b/include/dt-bindings/clock/at91.h
  43. @@ -25,6 +25,16 @@
  44. #define PMC_PLLBCK 8
  45. #define PMC_AUDIOPLLCK 9
  46. +/* SAMA7G5 */
  47. +#define PMC_CPUPLL (PMC_MAIN + 1)
  48. +#define PMC_SYSPLL (PMC_MAIN + 2)
  49. +#define PMC_DDRPLL (PMC_MAIN + 3)
  50. +#define PMC_IMGPLL (PMC_MAIN + 4)
  51. +#define PMC_BAUDPLL (PMC_MAIN + 5)
  52. +#define PMC_AUDIOPMCPLL (PMC_MAIN + 6)
  53. +#define PMC_AUDIOIOPLL (PMC_MAIN + 7)
  54. +#define PMC_ETHPLL (PMC_MAIN + 8)
  55. +
  56. #ifndef AT91_PMC_MOSCS
  57. #define AT91_PMC_MOSCS 0 /* MOSCS Flag */
  58. #define AT91_PMC_LOCKA 1 /* PLLA Lock */