pwrseq-qcom-wcn.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (C) 2024 Linaro Ltd.
  4. */
  5. #include <linux/clk.h>
  6. #include <linux/delay.h>
  7. #include <linux/device.h>
  8. #include <linux/gpio/consumer.h>
  9. #include <linux/jiffies.h>
  10. #include <linux/mod_devicetable.h>
  11. #include <linux/module.h>
  12. #include <linux/of.h>
  13. #include <linux/platform_device.h>
  14. #include <linux/property.h>
  15. #include <linux/regulator/consumer.h>
  16. #include <linux/pwrseq/provider.h>
  17. #include <linux/string.h>
  18. #include <linux/types.h>
  19. struct pwrseq_qcom_wcn_pdata {
  20. const char *const *vregs;
  21. size_t num_vregs;
  22. unsigned int pwup_delay_ms;
  23. unsigned int gpio_enable_delay_ms;
  24. const struct pwrseq_target_data **targets;
  25. bool has_vddio; /* separate VDD IO regulator */
  26. int (*match)(struct pwrseq_device *pwrseq, struct device *dev);
  27. };
  28. struct pwrseq_qcom_wcn_ctx {
  29. struct pwrseq_device *pwrseq;
  30. struct device_node *of_node;
  31. const struct pwrseq_qcom_wcn_pdata *pdata;
  32. struct regulator_bulk_data *regs;
  33. struct regulator *vddio;
  34. struct gpio_desc *bt_gpio;
  35. struct gpio_desc *wlan_gpio;
  36. struct gpio_desc *xo_clk_gpio;
  37. struct clk *clk;
  38. unsigned long last_gpio_enable_jf;
  39. };
  40. static void pwrseq_qcom_wcn_ensure_gpio_delay(struct pwrseq_qcom_wcn_ctx *ctx)
  41. {
  42. unsigned long diff_jiffies;
  43. unsigned int diff_msecs;
  44. if (!ctx->pdata->gpio_enable_delay_ms)
  45. return;
  46. diff_jiffies = jiffies - ctx->last_gpio_enable_jf;
  47. diff_msecs = jiffies_to_msecs(diff_jiffies);
  48. if (diff_msecs < ctx->pdata->gpio_enable_delay_ms)
  49. msleep(ctx->pdata->gpio_enable_delay_ms - diff_msecs);
  50. }
  51. static int pwrseq_qcom_wcn_vddio_enable(struct pwrseq_device *pwrseq)
  52. {
  53. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  54. return regulator_enable(ctx->vddio);
  55. }
  56. static int pwrseq_qcom_wcn_vddio_disable(struct pwrseq_device *pwrseq)
  57. {
  58. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  59. return regulator_disable(ctx->vddio);
  60. }
  61. static const struct pwrseq_unit_data pwrseq_qcom_wcn_vddio_unit_data = {
  62. .name = "vddio-enable",
  63. .enable = pwrseq_qcom_wcn_vddio_enable,
  64. .disable = pwrseq_qcom_wcn_vddio_disable,
  65. };
  66. static int pwrseq_qcom_wcn_vregs_enable(struct pwrseq_device *pwrseq)
  67. {
  68. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  69. return regulator_bulk_enable(ctx->pdata->num_vregs, ctx->regs);
  70. }
  71. static int pwrseq_qcom_wcn_vregs_disable(struct pwrseq_device *pwrseq)
  72. {
  73. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  74. return regulator_bulk_disable(ctx->pdata->num_vregs, ctx->regs);
  75. }
  76. static const struct pwrseq_unit_data pwrseq_qcom_wcn_vregs_unit_data = {
  77. .name = "regulators-enable",
  78. .enable = pwrseq_qcom_wcn_vregs_enable,
  79. .disable = pwrseq_qcom_wcn_vregs_disable,
  80. };
  81. static int pwrseq_qcom_wcn_clk_enable(struct pwrseq_device *pwrseq)
  82. {
  83. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  84. return clk_prepare_enable(ctx->clk);
  85. }
  86. static int pwrseq_qcom_wcn_clk_disable(struct pwrseq_device *pwrseq)
  87. {
  88. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  89. clk_disable_unprepare(ctx->clk);
  90. return 0;
  91. }
  92. static const struct pwrseq_unit_data pwrseq_qcom_wcn_clk_unit_data = {
  93. .name = "clock-enable",
  94. .enable = pwrseq_qcom_wcn_clk_enable,
  95. .disable = pwrseq_qcom_wcn_clk_disable,
  96. };
  97. static const struct pwrseq_unit_data *pwrseq_qcom_wcn3990_unit_deps[] = {
  98. &pwrseq_qcom_wcn_vddio_unit_data,
  99. &pwrseq_qcom_wcn_vregs_unit_data,
  100. NULL,
  101. };
  102. static const struct pwrseq_unit_data pwrseq_qcom_wcn3990_unit_data = {
  103. .name = "clock-enable",
  104. .deps = pwrseq_qcom_wcn3990_unit_deps,
  105. .enable = pwrseq_qcom_wcn_clk_enable,
  106. .disable = pwrseq_qcom_wcn_clk_disable,
  107. };
  108. static const struct pwrseq_unit_data *pwrseq_qcom_wcn_unit_deps[] = {
  109. &pwrseq_qcom_wcn_vregs_unit_data,
  110. &pwrseq_qcom_wcn_clk_unit_data,
  111. NULL
  112. };
  113. static int pwrseq_qcom_wcn6855_clk_assert(struct pwrseq_device *pwrseq)
  114. {
  115. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  116. if (!ctx->xo_clk_gpio)
  117. return 0;
  118. msleep(1);
  119. gpiod_set_value_cansleep(ctx->xo_clk_gpio, 1);
  120. usleep_range(100, 200);
  121. return 0;
  122. }
  123. static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_xo_clk_assert = {
  124. .name = "xo-clk-assert",
  125. .enable = pwrseq_qcom_wcn6855_clk_assert,
  126. };
  127. static const struct pwrseq_unit_data *pwrseq_qcom_wcn6855_unit_deps[] = {
  128. &pwrseq_qcom_wcn_vregs_unit_data,
  129. &pwrseq_qcom_wcn_clk_unit_data,
  130. &pwrseq_qcom_wcn6855_xo_clk_assert,
  131. NULL
  132. };
  133. static int pwrseq_qcom_wcn_bt_enable(struct pwrseq_device *pwrseq)
  134. {
  135. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  136. pwrseq_qcom_wcn_ensure_gpio_delay(ctx);
  137. gpiod_set_value_cansleep(ctx->bt_gpio, 1);
  138. ctx->last_gpio_enable_jf = jiffies;
  139. return 0;
  140. }
  141. static int pwrseq_qcom_wcn_bt_disable(struct pwrseq_device *pwrseq)
  142. {
  143. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  144. gpiod_set_value_cansleep(ctx->bt_gpio, 0);
  145. return 0;
  146. }
  147. static const struct pwrseq_unit_data pwrseq_qcom_wcn_bt_unit_data = {
  148. .name = "bluetooth-enable",
  149. .deps = pwrseq_qcom_wcn_unit_deps,
  150. .enable = pwrseq_qcom_wcn_bt_enable,
  151. .disable = pwrseq_qcom_wcn_bt_disable,
  152. };
  153. static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_bt_unit_data = {
  154. .name = "bluetooth-enable",
  155. .deps = pwrseq_qcom_wcn6855_unit_deps,
  156. .enable = pwrseq_qcom_wcn_bt_enable,
  157. .disable = pwrseq_qcom_wcn_bt_disable,
  158. };
  159. static int pwrseq_qcom_wcn_wlan_enable(struct pwrseq_device *pwrseq)
  160. {
  161. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  162. pwrseq_qcom_wcn_ensure_gpio_delay(ctx);
  163. gpiod_set_value_cansleep(ctx->wlan_gpio, 1);
  164. ctx->last_gpio_enable_jf = jiffies;
  165. return 0;
  166. }
  167. static int pwrseq_qcom_wcn_wlan_disable(struct pwrseq_device *pwrseq)
  168. {
  169. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  170. gpiod_set_value_cansleep(ctx->wlan_gpio, 0);
  171. return 0;
  172. }
  173. static const struct pwrseq_unit_data pwrseq_qcom_wcn_wlan_unit_data = {
  174. .name = "wlan-enable",
  175. .deps = pwrseq_qcom_wcn_unit_deps,
  176. .enable = pwrseq_qcom_wcn_wlan_enable,
  177. .disable = pwrseq_qcom_wcn_wlan_disable,
  178. };
  179. static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_wlan_unit_data = {
  180. .name = "wlan-enable",
  181. .deps = pwrseq_qcom_wcn6855_unit_deps,
  182. .enable = pwrseq_qcom_wcn_wlan_enable,
  183. .disable = pwrseq_qcom_wcn_wlan_disable,
  184. };
  185. static int pwrseq_qcom_wcn_pwup_delay(struct pwrseq_device *pwrseq)
  186. {
  187. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  188. if (ctx->pdata->pwup_delay_ms)
  189. msleep(ctx->pdata->pwup_delay_ms);
  190. return 0;
  191. }
  192. static int pwrseq_qcom_wcn6855_xo_clk_deassert(struct pwrseq_device *pwrseq)
  193. {
  194. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  195. if (ctx->xo_clk_gpio) {
  196. usleep_range(2000, 5000);
  197. gpiod_set_value_cansleep(ctx->xo_clk_gpio, 0);
  198. }
  199. return pwrseq_qcom_wcn_pwup_delay(pwrseq);
  200. }
  201. static const struct pwrseq_target_data pwrseq_qcom_wcn_bt_target_data = {
  202. .name = "bluetooth",
  203. .unit = &pwrseq_qcom_wcn_bt_unit_data,
  204. .post_enable = pwrseq_qcom_wcn_pwup_delay,
  205. };
  206. static const struct pwrseq_target_data pwrseq_qcom_wcn_wlan_target_data = {
  207. .name = "wlan",
  208. .unit = &pwrseq_qcom_wcn_wlan_unit_data,
  209. .post_enable = pwrseq_qcom_wcn_pwup_delay,
  210. };
  211. /* There are no separate BT and WLAN enablement pins */
  212. static const struct pwrseq_target_data pwrseq_qcom_wcn3990_bt_target_data = {
  213. .name = "bluetooth",
  214. .unit = &pwrseq_qcom_wcn3990_unit_data,
  215. };
  216. static const struct pwrseq_target_data pwrseq_qcom_wcn3990_wlan_target_data = {
  217. .name = "wlan",
  218. .unit = &pwrseq_qcom_wcn3990_unit_data,
  219. };
  220. static const struct pwrseq_target_data pwrseq_qcom_wcn6855_bt_target_data = {
  221. .name = "bluetooth",
  222. .unit = &pwrseq_qcom_wcn6855_bt_unit_data,
  223. .post_enable = pwrseq_qcom_wcn6855_xo_clk_deassert,
  224. };
  225. static const struct pwrseq_target_data pwrseq_qcom_wcn6855_wlan_target_data = {
  226. .name = "wlan",
  227. .unit = &pwrseq_qcom_wcn6855_wlan_unit_data,
  228. .post_enable = pwrseq_qcom_wcn6855_xo_clk_deassert,
  229. };
  230. static const struct pwrseq_target_data *pwrseq_qcom_wcn_targets[] = {
  231. &pwrseq_qcom_wcn_bt_target_data,
  232. &pwrseq_qcom_wcn_wlan_target_data,
  233. NULL
  234. };
  235. static const struct pwrseq_target_data *pwrseq_qcom_wcn3990_targets[] = {
  236. &pwrseq_qcom_wcn3990_bt_target_data,
  237. &pwrseq_qcom_wcn3990_wlan_target_data,
  238. NULL
  239. };
  240. static const struct pwrseq_target_data *pwrseq_qcom_wcn6855_targets[] = {
  241. &pwrseq_qcom_wcn6855_bt_target_data,
  242. &pwrseq_qcom_wcn6855_wlan_target_data,
  243. NULL
  244. };
  245. static const char *const pwrseq_qca6390_vregs[] = {
  246. "vddio",
  247. "vddaon",
  248. "vddpmu",
  249. "vddrfa0p95",
  250. "vddrfa1p3",
  251. "vddrfa1p9",
  252. "vddpcie1p3",
  253. "vddpcie1p9",
  254. };
  255. static const struct pwrseq_qcom_wcn_pdata pwrseq_qca6390_of_data = {
  256. .vregs = pwrseq_qca6390_vregs,
  257. .num_vregs = ARRAY_SIZE(pwrseq_qca6390_vregs),
  258. .pwup_delay_ms = 60,
  259. .gpio_enable_delay_ms = 100,
  260. .targets = pwrseq_qcom_wcn_targets,
  261. };
  262. static const char *const pwrseq_wcn3990_vregs[] = {
  263. /* vddio is handled separately */
  264. "vddxo",
  265. "vddrf",
  266. "vddch0",
  267. "vddch1",
  268. };
  269. static int pwrseq_qcom_wcn3990_match(struct pwrseq_device *pwrseq,
  270. struct device *dev);
  271. static const struct pwrseq_qcom_wcn_pdata pwrseq_wcn3990_of_data = {
  272. .vregs = pwrseq_wcn3990_vregs,
  273. .num_vregs = ARRAY_SIZE(pwrseq_wcn3990_vregs),
  274. .pwup_delay_ms = 50,
  275. .targets = pwrseq_qcom_wcn3990_targets,
  276. .has_vddio = true,
  277. .match = pwrseq_qcom_wcn3990_match,
  278. };
  279. static const char *const pwrseq_wcn6750_vregs[] = {
  280. "vddaon",
  281. "vddasd",
  282. "vddpmu",
  283. "vddrfa0p8",
  284. "vddrfa1p2",
  285. "vddrfa1p7",
  286. "vddrfa2p2",
  287. };
  288. static const struct pwrseq_qcom_wcn_pdata pwrseq_wcn6750_of_data = {
  289. .vregs = pwrseq_wcn6750_vregs,
  290. .num_vregs = ARRAY_SIZE(pwrseq_wcn6750_vregs),
  291. .pwup_delay_ms = 50,
  292. .gpio_enable_delay_ms = 5,
  293. .targets = pwrseq_qcom_wcn_targets,
  294. };
  295. static const char *const pwrseq_wcn6855_vregs[] = {
  296. "vddio",
  297. "vddaon",
  298. "vddpmu",
  299. "vddpmumx",
  300. "vddpmucx",
  301. "vddrfa0p95",
  302. "vddrfa1p3",
  303. "vddrfa1p9",
  304. "vddpcie1p3",
  305. "vddpcie1p9",
  306. };
  307. static const struct pwrseq_qcom_wcn_pdata pwrseq_wcn6855_of_data = {
  308. .vregs = pwrseq_wcn6855_vregs,
  309. .num_vregs = ARRAY_SIZE(pwrseq_wcn6855_vregs),
  310. .pwup_delay_ms = 50,
  311. .gpio_enable_delay_ms = 5,
  312. .targets = pwrseq_qcom_wcn6855_targets,
  313. };
  314. static const char *const pwrseq_wcn7850_vregs[] = {
  315. "vdd",
  316. "vddio",
  317. "vddio1p2",
  318. "vddaon",
  319. "vdddig",
  320. "vddrfa1p2",
  321. "vddrfa1p8",
  322. };
  323. static const struct pwrseq_qcom_wcn_pdata pwrseq_wcn7850_of_data = {
  324. .vregs = pwrseq_wcn7850_vregs,
  325. .num_vregs = ARRAY_SIZE(pwrseq_wcn7850_vregs),
  326. .pwup_delay_ms = 50,
  327. .targets = pwrseq_qcom_wcn_targets,
  328. };
  329. static int pwrseq_qcom_wcn_match_regulator(struct pwrseq_device *pwrseq,
  330. struct device *dev,
  331. const char *name)
  332. {
  333. struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
  334. struct device_node *dev_node = dev->of_node;
  335. /*
  336. * The PMU supplies power to the Bluetooth and WLAN modules. both
  337. * consume the PMU AON output so check the presence of the
  338. * 'vddaon-supply' property and whether it leads us to the right
  339. * device.
  340. */
  341. if (!of_property_present(dev_node, name))
  342. return PWRSEQ_NO_MATCH;
  343. struct device_node *reg_node __free(device_node) =
  344. of_parse_phandle(dev_node, name, 0);
  345. if (!reg_node)
  346. return PWRSEQ_NO_MATCH;
  347. /*
  348. * `reg_node` is the PMU AON regulator, its parent is the `regulators`
  349. * node and finally its grandparent is the PMU device node that we're
  350. * looking for.
  351. */
  352. if (!reg_node->parent || !reg_node->parent->parent ||
  353. reg_node->parent->parent != ctx->of_node)
  354. return PWRSEQ_NO_MATCH;
  355. return PWRSEQ_MATCH_OK;
  356. }
  357. static int pwrseq_qcom_wcn_match(struct pwrseq_device *pwrseq,
  358. struct device *dev)
  359. {
  360. return pwrseq_qcom_wcn_match_regulator(pwrseq, dev, "vddaon-supply");
  361. }
  362. static int pwrseq_qcom_wcn3990_match(struct pwrseq_device *pwrseq,
  363. struct device *dev)
  364. {
  365. int ret;
  366. /* BT device */
  367. ret = pwrseq_qcom_wcn_match_regulator(pwrseq, dev, "vddio-supply");
  368. if (ret == PWRSEQ_MATCH_OK)
  369. return ret;
  370. /* WiFi device match */
  371. return pwrseq_qcom_wcn_match_regulator(pwrseq, dev, "vdd-1.8-xo-supply");
  372. }
  373. static int pwrseq_qcom_wcn_probe(struct platform_device *pdev)
  374. {
  375. struct device *dev = &pdev->dev;
  376. struct pwrseq_qcom_wcn_ctx *ctx;
  377. struct pwrseq_config config;
  378. int i, ret;
  379. ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
  380. if (!ctx)
  381. return -ENOMEM;
  382. ctx->of_node = dev->of_node;
  383. ctx->pdata = device_get_match_data(dev);
  384. if (!ctx->pdata)
  385. return dev_err_probe(dev, -ENODEV,
  386. "Failed to obtain platform data\n");
  387. ctx->regs = devm_kcalloc(dev, ctx->pdata->num_vregs,
  388. sizeof(*ctx->regs), GFP_KERNEL);
  389. if (!ctx->regs)
  390. return -ENOMEM;
  391. for (i = 0; i < ctx->pdata->num_vregs; i++)
  392. ctx->regs[i].supply = ctx->pdata->vregs[i];
  393. ret = devm_regulator_bulk_get(dev, ctx->pdata->num_vregs, ctx->regs);
  394. if (ret < 0)
  395. return dev_err_probe(dev, ret,
  396. "Failed to get all regulators\n");
  397. if (ctx->pdata->has_vddio) {
  398. ctx->vddio = devm_regulator_get(dev, "vddio");
  399. if (IS_ERR(ctx->vddio))
  400. return dev_err_probe(dev, PTR_ERR(ctx->vddio), "Failed to get VDDIO\n");
  401. }
  402. ctx->bt_gpio = devm_gpiod_get_optional(dev, "bt-enable", GPIOD_OUT_LOW);
  403. if (IS_ERR(ctx->bt_gpio))
  404. return dev_err_probe(dev, PTR_ERR(ctx->bt_gpio),
  405. "Failed to get the Bluetooth enable GPIO\n");
  406. /*
  407. * FIXME: This should actually be GPIOD_OUT_LOW, but doing so would
  408. * cause the WLAN power to be toggled, resulting in PCIe link down.
  409. * Since the PCIe controller driver is not handling link down currently,
  410. * the device becomes unusable. So we need to keep this workaround until
  411. * the link down handling is implemented in the controller driver.
  412. */
  413. ctx->wlan_gpio = devm_gpiod_get_optional(dev, "wlan-enable",
  414. GPIOD_ASIS);
  415. if (IS_ERR(ctx->wlan_gpio))
  416. return dev_err_probe(dev, PTR_ERR(ctx->wlan_gpio),
  417. "Failed to get the WLAN enable GPIO\n");
  418. ctx->xo_clk_gpio = devm_gpiod_get_optional(dev, "xo-clk",
  419. GPIOD_OUT_LOW);
  420. if (IS_ERR(ctx->xo_clk_gpio))
  421. return dev_err_probe(dev, PTR_ERR(ctx->xo_clk_gpio),
  422. "Failed to get the XO_CLK GPIO\n");
  423. /*
  424. * Set direction to output but keep the current value in order to not
  425. * disable the WLAN module accidentally if it's already powered on.
  426. */
  427. gpiod_direction_output(ctx->wlan_gpio,
  428. gpiod_get_value_cansleep(ctx->wlan_gpio));
  429. ctx->clk = devm_clk_get_optional(dev, NULL);
  430. if (IS_ERR(ctx->clk))
  431. return dev_err_probe(dev, PTR_ERR(ctx->clk),
  432. "Failed to get the reference clock\n");
  433. memset(&config, 0, sizeof(config));
  434. config.parent = dev;
  435. config.owner = THIS_MODULE;
  436. config.drvdata = ctx;
  437. config.match = ctx->pdata->match ? : pwrseq_qcom_wcn_match;
  438. config.targets = ctx->pdata->targets;
  439. ctx->pwrseq = devm_pwrseq_device_register(dev, &config);
  440. if (IS_ERR(ctx->pwrseq))
  441. return dev_err_probe(dev, PTR_ERR(ctx->pwrseq),
  442. "Failed to register the power sequencer\n");
  443. return 0;
  444. }
  445. static const struct of_device_id pwrseq_qcom_wcn_of_match[] = {
  446. {
  447. .compatible = "qcom,wcn3950-pmu",
  448. .data = &pwrseq_wcn3990_of_data,
  449. },
  450. {
  451. .compatible = "qcom,wcn3988-pmu",
  452. .data = &pwrseq_wcn3990_of_data,
  453. },
  454. {
  455. .compatible = "qcom,wcn3990-pmu",
  456. .data = &pwrseq_wcn3990_of_data,
  457. },
  458. {
  459. .compatible = "qcom,wcn3991-pmu",
  460. .data = &pwrseq_wcn3990_of_data,
  461. },
  462. {
  463. .compatible = "qcom,wcn3998-pmu",
  464. .data = &pwrseq_wcn3990_of_data,
  465. },
  466. {
  467. .compatible = "qcom,qca6390-pmu",
  468. .data = &pwrseq_qca6390_of_data,
  469. },
  470. {
  471. .compatible = "qcom,wcn6855-pmu",
  472. .data = &pwrseq_wcn6855_of_data,
  473. },
  474. {
  475. .compatible = "qcom,wcn7850-pmu",
  476. .data = &pwrseq_wcn7850_of_data,
  477. },
  478. {
  479. .compatible = "qcom,wcn6750-pmu",
  480. .data = &pwrseq_wcn6750_of_data,
  481. },
  482. { }
  483. };
  484. MODULE_DEVICE_TABLE(of, pwrseq_qcom_wcn_of_match);
  485. static struct platform_driver pwrseq_qcom_wcn_driver = {
  486. .driver = {
  487. .name = "pwrseq-qcom_wcn",
  488. .of_match_table = pwrseq_qcom_wcn_of_match,
  489. },
  490. .probe = pwrseq_qcom_wcn_probe,
  491. };
  492. module_platform_driver(pwrseq_qcom_wcn_driver);
  493. MODULE_AUTHOR("Bartosz Golaszewski <bartosz.golaszewski@linaro.org>");
  494. MODULE_DESCRIPTION("Qualcomm WCN PMU power sequencing driver");
  495. MODULE_LICENSE("GPL");