pl111_nomadik.c 955 B

123456789101112131415161718192021222324252627282930313233343536
  1. // SPDX-License-Identifier: GPL-2.0+
  2. #include <linux/device.h>
  3. #include <linux/regmap.h>
  4. #include <linux/mfd/syscon.h>
  5. #include <linux/bitops.h>
  6. #include <linux/module.h>
  7. #include "pl111_nomadik.h"
  8. #define PMU_CTRL_OFFSET 0x0000
  9. #define PMU_CTRL_LCDNDIF BIT(26)
  10. void pl111_nomadik_init(struct device *dev)
  11. {
  12. struct regmap *pmu_regmap;
  13. /*
  14. * Just bail out of this is not found, we could be running
  15. * multiplatform on something else than Nomadik.
  16. */
  17. pmu_regmap =
  18. syscon_regmap_lookup_by_compatible("stericsson,nomadik-pmu");
  19. if (IS_ERR(pmu_regmap))
  20. return;
  21. /*
  22. * This bit in the PMU controller multiplexes the two graphics
  23. * blocks found in the Nomadik STn8815. The other one is called
  24. * MDIF (Master Display Interface) and gets muxed out here.
  25. */
  26. regmap_update_bits(pmu_regmap,
  27. PMU_CTRL_OFFSET,
  28. PMU_CTRL_LCDNDIF,
  29. 0);
  30. dev_info(dev, "set Nomadik PMU mux to CLCD mode\n");
  31. }
  32. EXPORT_SYMBOL_GPL(pl111_nomadik_init);