/* * Each crtc has two set fb address registers usable, FB_REG_IN_USING bit of * LSDC_CRTCx_CFG_REG indicate which fb address register is in using by the * CRTC currently. CFG_PAGE_FLIP is used to trigger the switch, the switching * will be finished at the very next vblank. Trigger it again if you want to * switch back. * * If FB0_ADDR_REG is in using, we write the address to FB0_ADDR_REG, * if FB1_ADDR_REG is in using, we write the address to FB1_ADDR_REG.
*/ #define CFG_PAGE_FLIP BIT(7) #define CFG_OUTPUT_ENABLE BIT(8) #define CFG_HW_CLONE BIT(9) /* Indicate witch fb addr reg is in using, currently. read only */ #define FB_REG_IN_USING BIT(11) #define CFG_GAMMA_EN BIT(12)
/* The DC get soft reset if this bit changed from "1" to "0", active low */ #define CFG_RESET_N BIT(20) /* If this bit is set, it say that the CRTC stop working anymore, anchored. */ #define CRTC_ANCHORED BIT(24)
/* * The DMA step of the DC in LS7A2000/LS2K2000 is configurable, * setting those bits on ls7a1000 platform make no effect.
*/ #define CFG_DMA_STEP_MASK GENMASK(17, 16) #define CFG_DMA_STEP_SHIFT 16 enum lsdc_dma_steps {
LSDC_DMA_STEP_256_BYTES = 0,
LSDC_DMA_STEP_128_BYTES = 1,
LSDC_DMA_STEP_64_BYTES = 2,
LSDC_DMA_STEP_32_BYTES = 3,
};
/* * All of the DC variants has the hardware which record the scan position * of the CRTC, [31:16] : current X position, [15:0] : current Y position
*/ #define LSDC_CRTC0_SCAN_POS_REG 0x14C0 #define LSDC_CRTC1_SCAN_POS_REG 0x14D0
/* * In gross, LSDC_CRTC1_XXX_REG - LSDC_CRTC0_XXX_REG = 0x10, but not all of * the registers obey this rule, LSDC_CURSORx_XXX_REG just don't honor this. * This is the root cause we can't untangle the code by manpulating offset * of the register access simply. Our hardware engineers are lack experiance * when they design this...
*/ #define CRTC_PIPE_OFFSET 0x10
/* * There is only one hardware cursor unit in LS7A1000 and LS2K1000, let * CFG_HW_CLONE_EN bit be "1" could eliminate this embarrassment, we made * it on custom clone mode application. While LS7A2000 has two hardware * cursor unit which is good enough.
*/ #define CURSOR_FORMAT_MASK GENMASK(1, 0) #define CURSOR_FORMAT_SHIFT 0 enum lsdc_cursor_format {
CURSOR_FORMAT_DISABLE = 0,
CURSOR_FORMAT_MONOCHROME = 1, /* masked */
CURSOR_FORMAT_ARGB8888 = 2, /* A8R8G8B8 */
};
/* * LS7A1000 and LS2K1000 only support 32x32, LS2K2000 and LS7A2000 support * 64x64, but it seems that setting this bit make no harms on LS7A1000, it * just don't take effects.
*/ #define CURSOR_SIZE_SHIFT 2 enum lsdc_cursor_size {
CURSOR_SIZE_32X32 = 0,
CURSOR_SIZE_64X64 = 1,
};
/* * LS7A1000/LS7A2000 have 4 gpios which are used to emulated I2C. * They are under control of the LS7A_DC_GPIO_DAT_REG and LS7A_DC_GPIO_DIR_REG * register, Those GPIOs has no relationship whth the GPIO hardware on the * bridge chip itself. Those offsets are relative to DC register base address * * LS2k1000 don't have those registers, they use hardware i2c or general GPIO * emulated i2c from linux i2c subsystem. * * GPIO data register, address offset: 0x1650 * +---------------+-----------+-----------+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | * +---------------+-----------+-----------+ * | | DVO1 | DVO0 | * + N/A +-----------+-----------+ * | | SCL | SDA | SCL | SDA | * +---------------+-----------+-----------+
*/ #define LS7A_DC_GPIO_DAT_REG 0x1650
/* * GPIO Input/Output direction control register, address offset: 0x1660
*/ #define LS7A_DC_GPIO_DIR_REG 0x1660
/* * LS7A2000 has two built-in HDMI Encoder and one VGA encoder
*/
/* * Number of continuous packets may be present * in HDMI hblank and vblank zone, should >= 48
*/ #define LSDC_HDMI0_ZONE_REG 0x1700 #define LSDC_HDMI1_ZONE_REG 0x1710
/* HDMI Iterface Control Reg */ #define HDMI_INTERFACE_EN BIT(0) #define HDMI_PACKET_EN BIT(1) #define HDMI_AUDIO_EN BIT(2) /* * Preamble: * Immediately preceding each video data period or data island period is the * preamble. This is a sequence of eight identical control characters that * indicate whether the upcoming data period is a video data period or is a * data island. The values of CTL0, CTL1, CTL2, and CTL3 indicate the type of * data period that follows.
*/ #define HDMI_VIDEO_PREAMBLE_MASK GENMASK(7, 4) #define HDMI_VIDEO_PREAMBLE_SHIFT 4 /* 1: hw i2c, 0: gpio emu i2c, shouldn't put in LSDC_HDMIx_INTF_CTRL_REG */ #define HW_I2C_EN BIT(8) #define HDMI_CTL_PERIOD_MODE BIT(9) #define LSDC_HDMI0_INTF_CTRL_REG 0x1720 #define LSDC_HDMI1_INTF_CTRL_REG 0x1730
/* LS7A2000/LS2K2000 has hpd status reg, while the two hdmi's status * located at the one register again.
*/ #define LSDC_HDMI_HPD_STATUS_REG 0x1BA0 #define HDMI0_HPD_FLAG BIT(0) #define HDMI1_HPD_FLAG BIT(1)
/* 1: enable avi infoframe packet, 0: disable avi infoframe packet */ #define AVI_PKT_ENABLE BIT(0) /* 1: send one every two frame, 0: send one each frame */ #define AVI_PKT_SEND_FREQ BIT(1) /* * 1: write 1 to flush avi reg content0 ~ content3 to the packet to be send, * The hardware will clear this bit automatically.
*/ #define AVI_PKT_UPDATE BIT(2)
/* * LS7A2000 has the hardware which count the number of vblank generated
*/ #define LSDC_CRTC0_VSYNC_COUNTER_REG 0x1A00 #define LSDC_CRTC1_VSYNC_COUNTER_REG 0x1A10
/* * LS7A2000 has the audio hardware associate with the HDMI encoder.
*/ #define LSDC_HDMI0_AUDIO_PLL_LO_REG 0x1A20 #define LSDC_HDMI1_AUDIO_PLL_LO_REG 0x1A30
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.