This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

U-Boot/AM572x: DSS/DISPC driver

Other Parts Discussed in Thread: SYSCONFIG, DM3730

Hi, all

I want to display some splash screen on uboot.

but can not found any simple driver of DSS/DISPC for am572x in SDK

Is there any support?

I also try setting register according to CPU Manual and register value dumped from linux

All I want is to make a simple dss/dispc driver. Only output to LCD1(DPI1).

Table below is the comparation of register setting between Linux and U-Boot.

Item

 

 

 

 

 

DSS(Linux)

DSS(U-Boot)

1

DSS_REVISION

00000061

00000061

2

DSS_SYSCONFIG

00000000

00000000

3

DSS_SYSSTATUS

00000001

00000001

4

DSS_CONTROL

00010001

00010000

5

DSS_STATUS

01408a82

01408a81

6

PM_DSS_PWRSTCTRL

00030000

00030000

7

PM_DSS_PWRSTST

00000037

00000037

8

PM_DSS_DSS_WKDEP

00000000

00000000

9

RM_DSS_DSS_CONTEXT

00000000

00000103

10

PM_DSS_DSS2_WKDEP

00000000

00000000

11

RM_DSS_BB2D_CONTEXT

00000101

00000101

12

RM_DSS_SDVENC_CONTEXT

00000001

00000001

13

CM_DIV_H12_DPLL_PER

00000204

00000204

14

CTRL_CORE_CONTROL_IO_2

00000001

00000001

15

CM_DSS_CLKSTCTRL

00000703

00000203

16

CM_DSS_DSS_CLKCTRL

00001102

00060102

17

CTRL_CORE_DSS_PLL_CONTROL

000002a6

000002af

 

 

DISPC(Linux)

DISPC(U-Boot)

18

CTRL_CORE_SMA_SW_1

00410000

00410000

19

DISPC_REVISION

00000051

00000051

20

DISPC_SYSCONFIG

00002015

00002015

21

DISPC_SYSSTATUS

00000001

00000001

22

DISPC_IRQSTATUS

00000020

000102a2

23

DISPC_IRQENABLE

1694564e

00000000

24

DISPC_CONTROL

00018309

00018309

25

DISPC_CONFIG

0000020c

0000020c

26

DISPC_CAPABLE

00000000

00000000

27

DISPC_LINE_STATUS

00000150

0000003c

28

DISPC_LINE_NUMBER

00000000

00000000

29

DISPC_DIVISOR

00010001

00010000

30

DISPC_GLOBAL_ALPHA

ffffffff

ffffffff

31

DISPC_GLOBAL_MFLAG_ATTRIBUTE

00000001

00000001

32

DISPC_DEFAULT_COLOR(LCD)

00000000

00000000

33

DISPC_TRANS_COLOR(LCD)

00000000

00000000

34

DISPC_SIZE_MGR(LCD)

0257031f

0257031f

35

DISPC_TIMING_H(LCD)

0570277f

0570277f

36

DISPC_TIMING_V(LCD)

01700103

01700103

37

DISPC_POL_FREQ(LCD)

00073000

00073000

38

DISPC_DIVISORo(LCD)

00010004

00010005

39

DISPC_DATA_CYCLE1(LCD)

00000000

00000000

40

DISPC_DATA_CYCLE2(LCD)

00000000

00000000

41

DISPC_DATA_CYCLE3(LCD)

00000000

00000000

42

DISPC_CPR_COEF_R(LCD)

00000000

00000000

43

DISPC_CPR_COEF_G(LCD)

00000000

00000000

44

DISPC_CPR_COEF_B(LCD)

00000000

00000000

45

DISPC_OVL_BA0(GFX)

7fda8000

7fda8000

46

DISPC_OVL_BA1(GFX)

7fda8000

7fda8000

47

DISPC_OVL_POSITION(GFX)

00000000

00000000

48

DISPC_OVL_SIZE(GFX)

0257031f

0257031f

49

DISPC_OVL_ATTRIBUTES(GFX)

020040b1

020040b1

50

DISPC_OVL_FIFO_THRESHOLD(GFX)

07ff07f8

07ff07f8

51

DISPC_OVL_FIFO_SIZE_STATUS(GFX)

00000500

00000500

52

DISPC_OVL_ROW_INC(GFX)

00000381

00000381

53

DISPC_OVL_PIXEL_INC(GFX)

00000001

00000001

54

DISPC_OVL_PRELOAD(GFX)

000007ff

000007ff

55

DISPC_OVL_MFLAG_THRESHOLD(GFX)

05000400

05000400

56

DISPC_OVL_WINDOW_SKIP(GFX)

00000000

00000000

57

DISPC_OVL_TABLE_BA(GFX)

00000000

00000000

Problem:

1.My clock path: DSS_GFCLK->DSS_CLK->LCD1_CLK->PIXEL_CLK. Is that right?

2.My module path: DSS->GFX->LCD1, Is that right?

3.After setting, I can measure the pixel clock and frame rate from pin, but there is nothing display on screen, event though I change some pixel value accoring to gfx base 7fda8000.

4.From CPU manual, the DMA of DISPC is no need to set, using default is ok. Right?

5.I miss some register?

Can you give me some suggestion to solved the problem?

Or Can you give me some suggestion to let me know how to debug the DSS/DISPC on U-Boot. 

  • anybody can help me?
  • I'm not that familiar with DSS/DISPC yet, but there is an OMAP3 DSS driver in u-boot. I don't know how similar OMAP3 DSS and AM572x DSS are. Take a look at drivers/video/omap3_dss.c and see if it helps.

    Steve K.

  • I have been known that omap3_dss.c file.
    And before the am572x project. I do some job about dm3730, which base on OMAP3 DSS, and success configing the DSS core.
    But I think the am57xx DSS is more complicate than OMAP3 DSS.

    The important point is I have no idea to debug the DSS on am572x.
    Becasuse the signal is measured from pin, but nothing display. I think it maybe the gfx ba or dma.
    From CPU manual, the dma seem auto, and nothing need to change.
    How I can debug the dma transfer of dispc of DSS on U-boot?
  • I finally find out the problem.

    The DMM/TILER module is need by DISPC DMA for image address mapping.

    so I use DMM Direct Mapping . And the image is show.

    But there is another problem:

    The color display on screen  is wrong, and not corresponding to the DISPC setting.

    See picture below, the backgroup I set is 0, but the color on screen is cyan.

    and color bar at top left I set is a gray scale(0-255), but the colors on screen are misc.

    Is there any setting wrong? What I shoule check?

      

  • Can you post your code?

    Steve K.

  • omap5_dss.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    #include <common.h>
    #include <command.h>
    #include <asm/io.h>
    #include <asm/gpio.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/sys_proto.h>
    #define FLD_MASK(start, end) (((1 << ((start) - (end) + 1)) - 1) << (end))
    #define FLD_VAL(val, start, end) (((val) << (end)) & FLD_MASK(start, end))
    #define FLD_GET(val, start, end) (((val) & FLD_MASK(start, end)) >> (end))
    #define FLD_MOD(orig, val, start, end) \
    (((orig) & ~FLD_MASK(start, end)) | FLD_VAL(val, start, end))
    #define CM_DIV_H12_DPLL_PER 0x4A00815C
    #define CTRL_CORE_CONTROL_IO_2 0x4A002558
    //DSS_DESHDCP_CLKEN 0 1
    #define CM_DSS_CLKSTCTRL 0x4A009100
    //CLKTRCTRL 0-1 2
    #define CM_DSS_STATICDEP 0x4A009104
    #define CM_DSS_DYNAMICDEP 0x4A009108
    #define CM_DSS_DSS_CLKCTRL 0x4A009120
    //OPTFCLKEN_DSSCLK 8 1
    //MODULEMODE 0-1 2
    //IDLEST 16-17 0
    #define PM_DSS_PWRSTCTRL 0x4AE07100
    //POWERSTATE 0-1 3
    #define PM_DSS_PWRSTST 0x4AE07104
    #define PM_DSS_DSS_WKDEP 0x4AE07120
    #define RM_DSS_DSS_CONTEXT 0x4AE07124
    #define PM_DSS_DSS2_WKDEP 0x4AE07128
    #define RM_DSS_BB2D_CONTEXT 0x4AE07134
    #define RM_DSS_SDVENC_CONTEXT 0x4AE0713C
    #define CTRL_CORE_SMA_SW_1 0x4A002534
    #define CTRL_CORE_DSS_PLL_CONTROL 0x4A002538
    #define DSS_BASE 0x58000000
    #define DSS_REVISION (0x0000)
    #define DSS_SYSCONFIG (0x0010)
    #define DSS_SYSSTATUS (0x0014)
    #define DSS_CONTROL (0x0040)
    #define DSS_STATUS (0x005C)
    #define DSS_REG_GET(idx, start, end) \
    FLD_GET(dss_read_reg(idx), start, end)
    #define DSS_REG_FLD_MOD(idx, val, start, end) \
    dss_write_reg(idx, FLD_MOD(dss_read_reg(idx), val, start, end))
    static inline void dss_write_reg(const u32 idx, u32 val)
    {
    __raw_writel(val, DSS_BASE + idx);
    }
    static inline u32 dss_read_reg(const u32 idx)
    {
    return __raw_readl(DSS_BASE + idx);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • any suggestion?