Stefan Bosch | 3e05411 | 2020-07-10 19:07:32 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ |
| 2 | * |
| 3 | * Copyright (C) 2016 Nexell Co., Ltd. |
| 4 | * |
| 5 | * Author: junghyun, kim <jhkim@nexell.co.kr> |
| 6 | */ |
| 7 | |
| 8 | #ifndef _S5PXX18_SOC_DISPTOP_H_ |
| 9 | #define _S5PXX18_SOC_DISPTOP_H_ |
| 10 | |
Tom Rini | 4b5ed11 | 2024-05-01 19:31:31 -0600 | [diff] [blame^] | 11 | #include <linux/types.h> |
Stefan Bosch | 3e05411 | 2020-07-10 19:07:32 +0200 | [diff] [blame] | 12 | #include "s5pxx18_soc_disptype.h" |
| 13 | |
| 14 | #define NUMBER_OF_DISPTOP_MODULE 1 |
| 15 | #define PHY_BASEADDR_DISPLAYTOP_MODULE 0xC0100000 |
| 16 | #define PHY_BASEADDR_DISPTOP_LIST \ |
| 17 | { PHY_BASEADDR_DISPLAYTOP_MODULE } |
| 18 | |
| 19 | #define HDMI_ADDR_OFFSET \ |
| 20 | (((PHY_BASEADDR_DISPLAYTOP_MODULE / 0x00100000) % 2) ? 0x100000 \ |
| 21 | : 0x000000) |
| 22 | #define OTHER_ADDR_OFFSET \ |
| 23 | (((PHY_BASEADDR_DISPLAYTOP_MODULE / 0x00100000) % 2) ? 0x000000 \ |
| 24 | : 0x100000) |
| 25 | #define PHY_BASEADDR_DISPLAYTOP_MODULE_OFFSET (OTHER_ADDR_OFFSET + 0x001000) |
| 26 | #define PHY_BASEADDR_DUALDISPLAY_MODULE \ |
| 27 | (PHY_BASEADDR_DISPLAYTOP_MODULE + OTHER_ADDR_OFFSET + 0x002000) |
| 28 | #define PHY_BASEADDR_RESCONV_MODULE \ |
| 29 | (PHY_BASEADDR_DISPLAYTOP_MODULE + OTHER_ADDR_OFFSET + 0x003000) |
| 30 | #define PHY_BASEADDR_LCDINTERFACE_MODULE \ |
| 31 | (PHY_BASEADDR_DISPLAYTOP_MODULE + OTHER_ADDR_OFFSET + 0x004000) |
| 32 | #define PHY_BASEADDR_HDMI_MODULE (PHY_BASEADDR_DISPLAYTOP_MODULE + 0x000000) |
| 33 | #define PHY_BASEADDR_LVDS_MODULE \ |
| 34 | (PHY_BASEADDR_DISPLAYTOP_MODULE + OTHER_ADDR_OFFSET + 0x00a000) |
| 35 | |
| 36 | #define NUMBER_OF_DUALDISPLAY_MODULE 1 |
| 37 | #define INTNUM_OF_DUALDISPLAY_MODULE_PRIMIRQ \ |
| 38 | INTNUM_OF_DISPLAYTOP_MODULE_DUALDISPLAY_PRIMIRQ |
| 39 | #define INTNUM_OF_DUALDISPLAY_MODULE_SECONDIRQ \ |
| 40 | INTNUM_OF_DISPLAYTOP_MODULE_DUALDISPLAY_SECONDIRQ |
| 41 | #define RESETINDEX_OF_DUALDISPLAY_MODULE_I_NRST \ |
| 42 | RESETINDEX_OF_DISPLAYTOP_MODULE_I_DUALDISPLAY_NRST |
| 43 | #define PADINDEX_OF_DUALDISPLAY_O_NCS \ |
| 44 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PADPRIMVCLK |
| 45 | #define PADINDEX_OF_DUALDISPLAY_O_NRD \ |
| 46 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADN_HSYNC |
| 47 | #define PADINDEX_OF_DUALDISPLAY_O_RS \ |
| 48 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADN_VSYNC |
| 49 | #define PADINDEX_OF_DUALDISPLAY_O_NWR \ |
| 50 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADDE |
| 51 | #define PADINDEX_OF_DUALDISPLAY_PADPRIMVCLK \ |
| 52 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PADPRIMVCLK |
| 53 | #define PADINDEX_OF_DUALDISPLAY_O_PRIM_PADN_HSYNC \ |
| 54 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADN_HSYNC |
| 55 | #define PADINDEX_OF_DUALDISPLAY_O_PRIM_PADN_VSYNC \ |
| 56 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADN_VSYNC |
| 57 | #define PADINDEX_OF_DUALDISPLAY_O_PRIM_PADDE \ |
| 58 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADDE |
| 59 | #define PADINDEX_OF_DUALDISPLAY_PRIM_0_ \ |
| 60 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_0_ |
| 61 | #define PADINDEX_OF_DUALDISPLAY_PRIM_1_ \ |
| 62 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_1_ |
| 63 | #define PADINDEX_OF_DUALDISPLAY_PRIM_2_ \ |
| 64 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_2_ |
| 65 | #define PADINDEX_OF_DUALDISPLAY_PRIM_3_ \ |
| 66 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_3_ |
| 67 | #define PADINDEX_OF_DUALDISPLAY_PRIM_4_ \ |
| 68 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_4_ |
| 69 | #define PADINDEX_OF_DUALDISPLAY_PRIM_5_ \ |
| 70 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_5_ |
| 71 | #define PADINDEX_OF_DUALDISPLAY_PRIM_6_ \ |
| 72 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_6_ |
| 73 | #define PADINDEX_OF_DUALDISPLAY_PRIM_7_ \ |
| 74 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_7_ |
| 75 | #define PADINDEX_OF_DUALDISPLAY_PRIM_8_ \ |
| 76 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_8_ |
| 77 | #define PADINDEX_OF_DUALDISPLAY_PRIM_9_ \ |
| 78 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_9_ |
| 79 | #define PADINDEX_OF_DUALDISPLAY_PRIM_10_ \ |
| 80 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_10_ |
| 81 | #define PADINDEX_OF_DUALDISPLAY_PRIM_11_ \ |
| 82 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_11_ |
| 83 | #define PADINDEX_OF_DUALDISPLAY_PRIM_12_ \ |
| 84 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_12_ |
| 85 | #define PADINDEX_OF_DUALDISPLAY_PRIM_13_ \ |
| 86 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_13_ |
| 87 | #define PADINDEX_OF_DUALDISPLAY_PRIM_14_ \ |
| 88 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_14_ |
| 89 | #define PADINDEX_OF_DUALDISPLAY_PRIM_15_ \ |
| 90 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_15_ |
| 91 | #define PADINDEX_OF_DUALDISPLAY_PRIM_16_ \ |
| 92 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_16_ |
| 93 | #define PADINDEX_OF_DUALDISPLAY_PRIM_17_ \ |
| 94 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_17_ |
| 95 | #define PADINDEX_OF_DUALDISPLAY_PRIM_18_ \ |
| 96 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_18_ |
| 97 | #define PADINDEX_OF_DUALDISPLAY_PRIM_19_ \ |
| 98 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_19_ |
| 99 | #define PADINDEX_OF_DUALDISPLAY_PRIM_20_ \ |
| 100 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_20_ |
| 101 | #define PADINDEX_OF_DUALDISPLAY_PRIM_21_ \ |
| 102 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_21_ |
| 103 | #define PADINDEX_OF_DUALDISPLAY_PRIM_22_ \ |
| 104 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_22_ |
| 105 | #define PADINDEX_OF_DUALDISPLAY_PRIM_23_ \ |
| 106 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_23_ |
| 107 | #define PADINDEX_OF_DUALDISPLAY_PADSECONDVCLK \ |
| 108 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PADPRIMVCLK |
| 109 | #define PADINDEX_OF_DUALDISPLAY_O_SECOND_PADN_HSYNC \ |
| 110 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADN_HSYNC |
| 111 | #define PADINDEX_OF_DUALDISPLAY_O_SECOND_PADN_VSYNC \ |
| 112 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADN_VSYNC |
| 113 | #define PADINDEX_OF_DUALDISPLAY_O_SECOND_PADDE \ |
| 114 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADDE |
| 115 | #define PADINDEX_OF_DUALDISPLAY_SECOND_0_ \ |
| 116 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_0_ |
| 117 | #define PADINDEX_OF_DUALDISPLAY_SECOND_1_ \ |
| 118 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_1_ |
| 119 | #define PADINDEX_OF_DUALDISPLAY_SECOND_2_ \ |
| 120 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_2_ |
| 121 | #define PADINDEX_OF_DUALDISPLAY_SECOND_3_ \ |
| 122 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_3_ |
| 123 | #define PADINDEX_OF_DUALDISPLAY_SECOND_4_ \ |
| 124 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_4_ |
| 125 | #define PADINDEX_OF_DUALDISPLAY_SECOND_5_ \ |
| 126 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_5_ |
| 127 | #define PADINDEX_OF_DUALDISPLAY_SECOND_6_ \ |
| 128 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_6_ |
| 129 | #define PADINDEX_OF_DUALDISPLAY_SECOND_7_ \ |
| 130 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_7_ |
| 131 | #define PADINDEX_OF_DUALDISPLAY_SECOND_8_ \ |
| 132 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_8_ |
| 133 | #define PADINDEX_OF_DUALDISPLAY_SECOND_9_ \ |
| 134 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_9_ |
| 135 | #define PADINDEX_OF_DUALDISPLAY_SECOND_10_ \ |
| 136 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_10_ |
| 137 | #define PADINDEX_OF_DUALDISPLAY_SECOND_11_ \ |
| 138 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_11_ |
| 139 | #define PADINDEX_OF_DUALDISPLAY_SECOND_12_ \ |
| 140 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_12_ |
| 141 | #define PADINDEX_OF_DUALDISPLAY_SECOND_13_ \ |
| 142 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_13_ |
| 143 | #define PADINDEX_OF_DUALDISPLAY_SECOND_14_ \ |
| 144 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_14_ |
| 145 | #define PADINDEX_OF_DUALDISPLAY_SECOND_15_ \ |
| 146 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_15_ |
| 147 | #define PADINDEX_OF_DUALDISPLAY_SECOND_16_ \ |
| 148 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_16_ |
| 149 | #define PADINDEX_OF_DUALDISPLAY_SECOND_17_ \ |
| 150 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_17_ |
| 151 | #define PADINDEX_OF_DUALDISPLAY_SECOND_18_ \ |
| 152 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_18_ |
| 153 | #define PADINDEX_OF_DUALDISPLAY_SECOND_19_ \ |
| 154 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_19_ |
| 155 | #define PADINDEX_OF_DUALDISPLAY_SECOND_20_ \ |
| 156 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_20_ |
| 157 | #define PADINDEX_OF_DUALDISPLAY_SECOND_21_ \ |
| 158 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_21_ |
| 159 | #define PADINDEX_OF_DUALDISPLAY_SECOND_22_ \ |
| 160 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_22_ |
| 161 | #define PADINDEX_OF_DUALDISPLAY_SECOND_23_ \ |
| 162 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_23_ |
| 163 | |
| 164 | #define NUMBER_OF_RESCONV_MODULE 1 |
| 165 | #define INTNUM_OF_RESCONV_MODULE INTNUM_OF_DISPLAYTOP_MODULE_RESCONV_IRQ |
| 166 | #define RESETINDEX_OF_RESCONV_MODULE_I_NRST \ |
| 167 | RESETINDEX_OF_DISPLAYTOP_MODULE_I_RESCONV_NRST |
| 168 | #define RESETINDEX_OF_RESCONV_MODULE RESETINDEX_OF_RESCONV_MODULE_I_NRST |
| 169 | #define NUMBER_OF_LCDINTERFACE_MODULE 1 |
| 170 | #define RESETINDEX_OF_LCDINTERFACE_MODULE_I_NRST \ |
| 171 | RESETINDEX_OF_DISPLAYTOP_MODULE_I_LCDIF_NRST |
| 172 | #define PADINDEX_OF_LCDINTERFACE_O_VCLK \ |
| 173 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PADPRIMVCLK |
| 174 | #define PADINDEX_OF_LCDINTERFACE_O_NHSYNC \ |
| 175 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADN_HSYNC |
| 176 | #define PADINDEX_OF_LCDINTERFACE_O_NVSYNC \ |
| 177 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADN_VSYNC |
| 178 | #define PADINDEX_OF_LCDINTERFACE_O_DE \ |
| 179 | PADINDEX_OF_DISPLAYTOP_O_DUAL_DISPLAY_PRIM_PADDE |
| 180 | #define PADINDEX_OF_LCDINTERFACE_RGB24_0_ \ |
| 181 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_0_ |
| 182 | #define PADINDEX_OF_LCDINTERFACE_RGB24_1_ \ |
| 183 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_1_ |
| 184 | #define PADINDEX_OF_LCDINTERFACE_RGB24_2_ \ |
| 185 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_2_ |
| 186 | #define PADINDEX_OF_LCDINTERFACE_RGB24_3_ \ |
| 187 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_3_ |
| 188 | #define PADINDEX_OF_LCDINTERFACE_RGB24_4_ \ |
| 189 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_4_ |
| 190 | #define PADINDEX_OF_LCDINTERFACE_RGB24_5_ \ |
| 191 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_5_ |
| 192 | #define PADINDEX_OF_LCDINTERFACE_RGB24_6_ \ |
| 193 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_6_ |
| 194 | #define PADINDEX_OF_LCDINTERFACE_RGB24_7_ \ |
| 195 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_7_ |
| 196 | #define PADINDEX_OF_LCDINTERFACE_RGB24_8_ \ |
| 197 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_8_ |
| 198 | #define PADINDEX_OF_LCDINTERFACE_RGB24_9_ \ |
| 199 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_9_ |
| 200 | #define PADINDEX_OF_LCDINTERFACE_RGB24_10_ \ |
| 201 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_10_ |
| 202 | #define PADINDEX_OF_LCDINTERFACE_RGB24_11_ \ |
| 203 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_11_ |
| 204 | #define PADINDEX_OF_LCDINTERFACE_RGB24_12_ \ |
| 205 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_12_ |
| 206 | #define PADINDEX_OF_LCDINTERFACE_RGB24_13_ \ |
| 207 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_13_ |
| 208 | #define PADINDEX_OF_LCDINTERFACE_RGB24_14_ \ |
| 209 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_14_ |
| 210 | #define PADINDEX_OF_LCDINTERFACE_RGB24_15_ \ |
| 211 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_15_ |
| 212 | #define PADINDEX_OF_LCDINTERFACE_RGB24_16_ \ |
| 213 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_16_ |
| 214 | #define PADINDEX_OF_LCDINTERFACE_RGB24_17_ \ |
| 215 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_17_ |
| 216 | #define PADINDEX_OF_LCDINTERFACE_RGB24_18_ \ |
| 217 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_18_ |
| 218 | #define PADINDEX_OF_LCDINTERFACE_RGB24_19_ \ |
| 219 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_19_ |
| 220 | #define PADINDEX_OF_LCDINTERFACE_RGB24_20_ \ |
| 221 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_20_ |
| 222 | #define PADINDEX_OF_LCDINTERFACE_RGB24_21_ \ |
| 223 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_21_ |
| 224 | #define PADINDEX_OF_LCDINTERFACE_RGB24_22_ \ |
| 225 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_22_ |
| 226 | #define PADINDEX_OF_LCDINTERFACE_RGB24_23_ \ |
| 227 | PADINDEX_OF_DISPLAYTOP_DUAL_DISPLAY_PRIM_23_ |
| 228 | |
| 229 | #define NUMBER_OF_HDMI_MODULE 1 |
| 230 | #define INTNUM_OF_HDMI_MODULE INTNUM_OF_DISPLAYTOP_MODULE_HDMI_IRQ |
| 231 | #define RESETINDEX_OF_HDMI_MODULE_I_NRST \ |
| 232 | RESETINDEX_OF_DISPLAYTOP_MODULE_I_HDMI_NRST |
| 233 | #define RESETINDEX_OF_HDMI_MODULE_I_NRST_VIDEO \ |
| 234 | RESETINDEX_OF_DISPLAYTOP_MODULE_I_HDMI_VIDEO_NRST |
| 235 | #define RESETINDEX_OF_HDMI_MODULE_I_NRST_SPDIF \ |
| 236 | RESETINDEX_OF_DISPLAYTOP_MODULE_I_HDMI_SPDIF_NRST |
| 237 | #define RESETINDEX_OF_HDMI_MODULE_I_NRST_TMDS \ |
| 238 | RESETINDEX_OF_DISPLAYTOP_MODULE_I_HDMI_TMDS_NRST |
| 239 | #define RESETINDEX_OF_HDMI_MODULE_I_NRST_PHY \ |
| 240 | RESETINDEX_OF_DISPLAYTOP_MODULE_I_HDMI_PHY_NRST |
| 241 | #define PADINDEX_OF_HDMI_I_PHY_CLKI PADINDEX_OF_DISPLAYTOP_I_HDMI_CLKI |
| 242 | #define PADINDEX_OF_HDMI_O_PHY_CLKO PADINDEX_OF_DISPLAYTOP_O_HDMI_CLKO |
| 243 | #define PADINDEX_OF_HDMI_IO_PHY_REXT PADINDEX_OF_DISPLAYTOP_IO_HDMI_REXT |
| 244 | #define PADINDEX_OF_HDMI_O_PHY_TX0P PADINDEX_OF_DISPLAYTOP_O_HDMI_TX0P |
| 245 | #define PADINDEX_OF_HDMI_O_PHY_TX0N PADINDEX_OF_DISPLAYTOP_O_HDMI_TX0N |
| 246 | #define PADINDEX_OF_HDMI_O_PHY_TX1P PADINDEX_OF_DISPLAYTOP_O_HDMI_TX1P |
| 247 | #define PADINDEX_OF_HDMI_O_PHY_TX1N PADINDEX_OF_DISPLAYTOP_O_HDMI_TX1N |
| 248 | #define PADINDEX_OF_HDMI_O_PHY_TX2P PADINDEX_OF_DISPLAYTOP_O_HDMI_TX2P |
| 249 | #define PADINDEX_OF_HDMI_O_PHY_TX2N PADINDEX_OF_DISPLAYTOP_O_HDMI_TX2N |
| 250 | #define PADINDEX_OF_HDMI_O_PHY_TXCP PADINDEX_OF_DISPLAYTOP_O_HDMI_TXCP |
| 251 | #define PADINDEX_OF_HDMI_O_PHY_TXCN PADINDEX_OF_DISPLAYTOP_O_HDMI_TXCN |
| 252 | #define PADINDEX_OF_HDMI_I_HOTPLUG PADINDEX_OF_DISPLAYTOP_I_HDMI_HOTPLUG_5V |
| 253 | #define PADINDEX_OF_HDMI_IO_PAD_CEC PADINDEX_OF_DISPLAYTOP_IO_HDMI_CEC |
| 254 | #define NUMBER_OF_LVDS_MODULE 1 |
| 255 | |
| 256 | #define RESETINDEX_OF_LVDS_MODULE_I_RESETN \ |
| 257 | RESETINDEX_OF_DISPLAYTOP_MODULE_I_LVDS_NRST |
| 258 | #define RESETINDEX_OF_LVDS_MODULE RESETINDEX_OF_LVDS_MODULE_I_RESETN |
| 259 | |
| 260 | #define PADINDEX_OF_LVDS_TAP PADINDEX_OF_DISPLAYTOP_LVDS_TXP_A |
| 261 | #define PADINDEX_OF_LVDS_TAN PADINDEX_OF_DISPLAYTOP_LVDS_TXN_A |
| 262 | #define PADINDEX_OF_LVDS_TBP PADINDEX_OF_DISPLAYTOP_LVDS_TXP_B |
| 263 | #define PADINDEX_OF_LVDS_TBN PADINDEX_OF_DISPLAYTOP_LVDS_TXN_B |
| 264 | #define PADINDEX_OF_LVDS_TCP PADINDEX_OF_DISPLAYTOP_LVDS_TXP_C |
| 265 | #define PADINDEX_OF_LVDS_TCN PADINDEX_OF_DISPLAYTOP_LVDS_TXN_C |
| 266 | #define PADINDEX_OF_LVDS_TDP PADINDEX_OF_DISPLAYTOP_LVDS_TXP_D |
| 267 | #define PADINDEX_OF_LVDS_TDN PADINDEX_OF_DISPLAYTOP_LVDS_TXN_D |
| 268 | #define PADINDEX_OF_LVDS_TCLKP PADINDEX_OF_DISPLAYTOP_LVDS_TXP_CLK |
| 269 | #define PADINDEX_OF_LVDS_TCLKN PADINDEX_OF_DISPLAYTOP_LVDS_TXN_CLK |
| 270 | #define PADINDEX_OF_LVDS_ROUT PADINDEX_OF_DISPLAYTOP_LVDS_ROUT |
| 271 | #define PADINDEX_OF_LVDS_TEP PADINDEX_OF_DISPLAYTOP_LVDS_TXN_E |
| 272 | #define PADINDEX_OF_LVDS_TEN PADINDEX_OF_DISPLAYTOP_LVDS_TXN_E |
| 273 | #define NUMBER_OF_DISPTOP_CLKGEN_MODULE 5 |
| 274 | |
| 275 | enum disptop_clkgen_module_index { |
| 276 | res_conv_clkgen = 0, |
| 277 | lcdif_clkgen = 1, |
| 278 | to_mipi_clkgen = 2, |
| 279 | to_lvds_clkgen = 3, |
| 280 | hdmi_clkgen = 4, |
| 281 | }; |
| 282 | |
| 283 | enum disptop_res_conv_iclk_cclk { |
| 284 | res_conv_iclk = 0, |
| 285 | res_conv_cclk = 1, |
| 286 | }; |
| 287 | |
| 288 | enum disptop_res_conv_oclk { |
| 289 | res_conv_oclk = 1, |
| 290 | }; |
| 291 | |
| 292 | enum disptop_lcdif_clk { |
| 293 | lcdif_pixel_clkx_n = 0, |
| 294 | lcdif_pixel_clk = 1, |
| 295 | }; |
| 296 | |
| 297 | #define HDMI_SPDIF_CLKGEN 2 |
| 298 | #define HDMI_SPDIF_CLKOUT 0 |
| 299 | #define HDMI_I_VCLK_CLKOUT 0 |
| 300 | #define PHY_BASEADDR_DISPTOP_CLKGEN0_MODULE \ |
| 301 | (PHY_BASEADDR_DISPLAYTOP_MODULE + OTHER_ADDR_OFFSET + 0x006000) |
| 302 | #define PHY_BASEADDR_DISPTOP_CLKGEN1_MODULE \ |
| 303 | (PHY_BASEADDR_DISPLAYTOP_MODULE + OTHER_ADDR_OFFSET + 0x007000) |
| 304 | #define PHY_BASEADDR_DISPTOP_CLKGEN2_MODULE \ |
| 305 | (PHY_BASEADDR_DISPLAYTOP_MODULE + OTHER_ADDR_OFFSET + 0x005000) |
| 306 | #define PHY_BASEADDR_DISPTOP_CLKGEN3_MODULE \ |
| 307 | (PHY_BASEADDR_DISPLAYTOP_MODULE + OTHER_ADDR_OFFSET + 0x008000) |
| 308 | #define PHY_BASEADDR_DISPTOP_CLKGEN4_MODULE \ |
| 309 | (PHY_BASEADDR_DISPLAYTOP_MODULE + OTHER_ADDR_OFFSET + 0x009000) |
| 310 | |
| 311 | struct nx_disp_top_register_set { |
| 312 | u32 resconv_mux_ctrl; |
| 313 | u32 interconv_mux_ctrl; |
| 314 | u32 mipi_mux_ctrl; |
| 315 | u32 lvds_mux_ctrl; |
| 316 | u32 hdmifixctrl0; |
| 317 | u32 hdmisyncctrl0; |
| 318 | u32 hdmisyncctrl1; |
| 319 | u32 hdmisyncctrl2; |
| 320 | u32 hdmisyncctrl3; |
| 321 | u32 tftmpu_mux; |
| 322 | u32 hdmifieldctrl; |
| 323 | u32 greg0; |
| 324 | u32 greg1; |
| 325 | u32 greg2; |
| 326 | u32 greg3; |
| 327 | u32 greg4; |
| 328 | u32 greg5; |
| 329 | }; |
| 330 | |
| 331 | int nx_disp_top_initialize(void); |
| 332 | u32 nx_disp_top_get_number_of_module(void); |
| 333 | |
| 334 | u32 nx_disp_top_get_physical_address(void); |
| 335 | u32 nx_disp_top_get_size_of_register_set(void); |
| 336 | void nx_disp_top_set_base_address(void *base_address); |
| 337 | void *nx_disp_top_get_base_address(void); |
| 338 | int nx_disp_top_open_module(void); |
| 339 | int nx_disp_top_close_module(void); |
| 340 | int nx_disp_top_check_busy(void); |
| 341 | |
| 342 | enum mux_index { |
| 343 | primary_mlc = 0, |
| 344 | secondary_mlc = 1, |
| 345 | resolution_conv = 2, |
| 346 | }; |
| 347 | |
| 348 | enum prim_pad_mux_index { |
| 349 | padmux_primary_mlc = 0, |
| 350 | padmux_primary_mpu = 1, |
| 351 | padmux_secondary_mlc = 2, |
| 352 | padmux_resolution_conv = 3, |
| 353 | }; |
| 354 | |
| 355 | void nx_disp_top_set_resconvmux(int benb, u32 sel); |
| 356 | void nx_disp_top_set_hdmimux(int benb, u32 sel); |
| 357 | void nx_disp_top_set_mipimux(int benb, u32 sel); |
| 358 | void nx_disp_top_set_lvdsmux(int benb, u32 sel); |
| 359 | void nx_disp_top_set_primary_mux(u32 sel); |
| 360 | void nx_disp_top_hdmi_set_vsync_start(u32 sel); |
| 361 | void nx_disp_top_hdmi_set_vsync_hsstart_end(u32 start, u32 end); |
| 362 | void nx_disp_top_hdmi_set_hactive_start(u32 sel); |
| 363 | void nx_disp_top_hdmi_set_hactive_end(u32 sel); |
| 364 | |
| 365 | void nx_disp_top_set_hdmifield(u32 enable, u32 init_val, u32 vsynctoggle, |
| 366 | u32 hsynctoggle, u32 vsyncclr, u32 hsyncclr, |
| 367 | u32 field_use, u32 muxsel); |
| 368 | |
| 369 | enum padclk_config { |
| 370 | padclk_clk = 0, |
| 371 | padclk_inv_clk = 1, |
| 372 | padclk_reserved_clk = 2, |
| 373 | padclk_reserved_inv_clk = 3, |
| 374 | padclk_clk_div2_0 = 4, |
| 375 | padclk_clk_div2_90 = 5, |
| 376 | padclk_clk_div2_180 = 6, |
| 377 | padclk_clk_div2_270 = 7, |
| 378 | }; |
| 379 | |
| 380 | void nx_disp_top_set_padclock(u32 mux_index, u32 padclk_cfg); |
| 381 | void nx_disp_top_set_lcdif_enb(int enb); |
| 382 | void nx_disp_top_set_hdmifield(u32 enable, u32 init_val, u32 vsynctoggle, |
| 383 | u32 hsynctoggle, u32 vsyncclr, u32 hsyncclr, |
| 384 | u32 field_use, u32 muxsel); |
| 385 | |
| 386 | #endif |