121-mfd-qcom_rpm-Add-support-for-IPQ8064.patch 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. From 4d54b0adfa67476e6509bc8646b9dbac642e8a29 Mon Sep 17 00:00:00 2001
  2. From: Josh Cartwright <joshc@codeaurora.org>
  3. Date: Thu, 26 Mar 2015 11:29:26 -0700
  4. Subject: [PATCH] mfd: qcom_rpm: Add support for IPQ8064
  5. The IPQ8064 also includes an RPM following the same message structure as
  6. other chips. In addition, it supports a few new resource types to
  7. support the NSS fabric clocks and the SMB208/SMB209 regulators found on
  8. the reference boards.
  9. Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
  10. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
  11. Signed-off-by: Lee Jones <lee.jones@linaro.org>
  12. ---
  13. drivers/mfd/qcom_rpm.c | 41 +++++++++++++++++++++++++++++++++++++++++
  14. 1 file changed, 41 insertions(+)
  15. --- a/drivers/mfd/qcom_rpm.c
  16. +++ b/drivers/mfd/qcom_rpm.c
  17. @@ -323,10 +323,51 @@ static const struct qcom_rpm_data msm896
  18. .n_resources = ARRAY_SIZE(msm8960_rpm_resource_table),
  19. };
  20. +static const struct qcom_rpm_resource ipq806x_rpm_resource_table[] = {
  21. + [QCOM_RPM_CXO_CLK] = { 25, 9, 5, 1 },
  22. + [QCOM_RPM_PXO_CLK] = { 26, 10, 6, 1 },
  23. + [QCOM_RPM_APPS_FABRIC_CLK] = { 27, 11, 8, 1 },
  24. + [QCOM_RPM_SYS_FABRIC_CLK] = { 28, 12, 9, 1 },
  25. + [QCOM_RPM_NSS_FABRIC_0_CLK] = { 29, 13, 10, 1 },
  26. + [QCOM_RPM_DAYTONA_FABRIC_CLK] = { 30, 14, 11, 1 },
  27. + [QCOM_RPM_SFPB_CLK] = { 31, 15, 12, 1 },
  28. + [QCOM_RPM_CFPB_CLK] = { 32, 16, 13, 1 },
  29. + [QCOM_RPM_NSS_FABRIC_1_CLK] = { 33, 17, 14, 1 },
  30. + [QCOM_RPM_EBI1_CLK] = { 34, 18, 16, 1 },
  31. + [QCOM_RPM_APPS_FABRIC_HALT] = { 35, 19, 18, 2 },
  32. + [QCOM_RPM_APPS_FABRIC_MODE] = { 37, 20, 19, 3 },
  33. + [QCOM_RPM_APPS_FABRIC_IOCTL] = { 40, 21, 20, 1 },
  34. + [QCOM_RPM_APPS_FABRIC_ARB] = { 41, 22, 21, 12 },
  35. + [QCOM_RPM_SYS_FABRIC_HALT] = { 53, 23, 22, 2 },
  36. + [QCOM_RPM_SYS_FABRIC_MODE] = { 55, 24, 23, 3 },
  37. + [QCOM_RPM_SYS_FABRIC_IOCTL] = { 58, 25, 24, 1 },
  38. + [QCOM_RPM_SYS_FABRIC_ARB] = { 59, 26, 25, 30 },
  39. + [QCOM_RPM_MM_FABRIC_HALT] = { 89, 27, 26, 2 },
  40. + [QCOM_RPM_MM_FABRIC_MODE] = { 91, 28, 27, 3 },
  41. + [QCOM_RPM_MM_FABRIC_IOCTL] = { 94, 29, 28, 1 },
  42. + [QCOM_RPM_MM_FABRIC_ARB] = { 95, 30, 29, 2 },
  43. + [QCOM_RPM_CXO_BUFFERS] = { 209, 33, 31, 1 },
  44. + [QCOM_RPM_USB_OTG_SWITCH] = { 210, 34, 32, 1 },
  45. + [QCOM_RPM_HDMI_SWITCH] = { 211, 35, 33, 1 },
  46. + [QCOM_RPM_DDR_DMM] = { 212, 36, 34, 2 },
  47. + [QCOM_RPM_VDDMIN_GPIO] = { 215, 40, 39, 1 },
  48. + [QCOM_RPM_SMB208_S1a] = { 216, 41, 90, 2 },
  49. + [QCOM_RPM_SMB208_S1b] = { 218, 43, 91, 2 },
  50. + [QCOM_RPM_SMB208_S2a] = { 220, 45, 92, 2 },
  51. + [QCOM_RPM_SMB208_S2b] = { 222, 47, 93, 2 },
  52. +};
  53. +
  54. +static const struct qcom_rpm_data ipq806x_template = {
  55. + .version = 3,
  56. + .resource_table = ipq806x_rpm_resource_table,
  57. + .n_resources = ARRAY_SIZE(ipq806x_rpm_resource_table),
  58. +};
  59. +
  60. static const struct of_device_id qcom_rpm_of_match[] = {
  61. { .compatible = "qcom,rpm-apq8064", .data = &apq8064_template },
  62. { .compatible = "qcom,rpm-msm8660", .data = &msm8660_template },
  63. { .compatible = "qcom,rpm-msm8960", .data = &msm8960_template },
  64. + { .compatible = "qcom,rpm-ipq8064", .data = &ipq806x_template },
  65. { }
  66. };
  67. MODULE_DEVICE_TABLE(of, qcom_rpm_of_match);