summaryrefslogtreecommitdiff
path: root/sys/src/9/imx8/lcd.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-06-13 19:48:01 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-06-13 19:48:01 +0000
commit8dd05d041ed65e8c74c23baccaf99ba6ad424c39 (patch)
treed96583b4d3968496909a61d012ff1fad3f1e6e64 /sys/src/9/imx8/lcd.c
parent5388575c149445928b2eb98794998225ecf1ccfa (diff)
imx8: provide iomuxgpr() function to access iomuxc's gpr's
Diffstat (limited to 'sys/src/9/imx8/lcd.c')
-rw-r--r--sys/src/9/imx8/lcd.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/src/9/imx8/lcd.c b/sys/src/9/imx8/lcd.c
index 686ee9aa8..0fa2ab65c 100644
--- a/sys/src/9/imx8/lcd.c
+++ b/sys/src/9/imx8/lcd.c
@@ -14,13 +14,6 @@
extern Memimage *gscreen;
-/* pinmux registers */
-enum {
- IOMUXC_GPR_GPR13 = 0x10034/4, /* GPR13 for MIPI_MUX_SEL */
- MIPI_MUX_SEL = 1<<2,
- MIPI_MUX_INV = 1<<3,
-};
-
/* gpio registers */
enum {
GPIO_DR = 0x00/4,
@@ -366,8 +359,6 @@ struct dsi_cfg {
/* base addresses, VIRTIO is at 0x30000000 physical */
-static u32int *iomuxc = (u32int*)(VIRTIO + 0x330000);
-
static u32int *gpio1 = (u32int*)(VIRTIO + 0x200000);
static u32int *gpio3 = (u32int*)(VIRTIO + 0x220000);
@@ -828,8 +819,8 @@ lcdinit(void)
/* pwm2_out: for panel backlight */
iomuxpad("pad_spdif_rx", "pwm2_out", nil);
- /* lcdif to dpi=0, dcss=1 */
- mr(iomuxc, IOMUXC_GPR_GPR13, 0, MIPI_MUX_SEL);
+ /* GPR13[MIPI_MUX_SEL]: 0 = LCDIF, 1 = DCSS */
+ iomuxgpr(13, 0, 1<<2);
setclkgate("gpio1.ipg_clk_s", 1);
setclkgate("gpio3.ipg_clk_s", 1);