Skip to content

Commit b9944a7

Browse files
Dirk EibachAndy Fleming
authored andcommitted
mpc85xx: Add gdsys ControlCenter Digital board
The gdsys ControlCenter Digital board is based on a Freescale P1022 QorIQ SOC. It boots from SPI-Flash but can be configured to boot from SD-card for factory programming and testing. On board peripherals include: - 2x GbE - Lattice ECP3 FPGA connected via PCIe - mSATA RAID1 - USB host - DisplayPort video output - Atmel TPM Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Reinhard Pfau <reinhard.pfau@gdsys.cc> Signed-off-by: Andy Fleming <afleming@freescale.com>
1 parent b8eee43 commit b9944a7

File tree

15 files changed

+2699
-1
lines changed

15 files changed

+2699
-1
lines changed

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ egnite GmbH <info@egnite.de>
160160

161161
Dirk Eibach <eibach@gdsys.de>
162162

163+
controlcenterd P1022
163164
devconcenter PPC460EX
164-
dlvision PPC405EP
165+
dlvision PPC405EP
165166
dlvision-10g PPC405EP
166167
gdppc440etx PPC440EP/GR
167168
intip PPC460EX

board/gdsys/common/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ COBJS-$(CONFIG_IO) += miiphybb.o
3333
COBJS-$(CONFIG_IO64) += miiphybb.o
3434
COBJS-$(CONFIG_IOCON) += osd.o
3535
COBJS-$(CONFIG_DLVISION_10G) += osd.o
36+
COBJS-$(CONFIG_CONTROLCENTERD) += dp501.o
3637

3738
COBJS := $(COBJS-y)
3839
SOBJS =

board/gdsys/common/dp501.c

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/*
2+
* (C) Copyright 2012
3+
* Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
4+
*
5+
* See file CREDITS for list of people who contributed to this
6+
* project.
7+
*
8+
* This program is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU General Public License as
10+
* published by the Free Software Foundation; either version 2 of
11+
* the License, or (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program; if not, write to the Free Software
20+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21+
* MA 02111-1307 USA
22+
*/
23+
24+
/* Parade Technologies Inc. DP501 DisplayPort DVI/HDMI Transmitter */
25+
26+
#include <common.h>
27+
#include <asm/io.h>
28+
#include <errno.h>
29+
#include <i2c.h>
30+
31+
static void dp501_setbits(u8 addr, u8 reg, u8 mask)
32+
{
33+
u8 val;
34+
35+
val = i2c_reg_read(addr, reg);
36+
setbits_8(&val, mask);
37+
i2c_reg_write(addr, reg, val);
38+
}
39+
40+
static void dp501_clrbits(u8 addr, u8 reg, u8 mask)
41+
{
42+
u8 val;
43+
44+
val = i2c_reg_read(addr, reg);
45+
clrbits_8(&val, mask);
46+
i2c_reg_write(addr, reg, val);
47+
}
48+
49+
static int dp501_detect_cable_adapter(u8 addr)
50+
{
51+
u8 val = i2c_reg_read(addr, 0x00);
52+
53+
return !(val & 0x04);
54+
}
55+
56+
static void dp501_link_training(u8 addr)
57+
{
58+
u8 val;
59+
60+
val = i2c_reg_read(addr, 0x51);
61+
i2c_reg_write(addr, 0x5d, val); /* set link_bw */
62+
val = i2c_reg_read(addr, 0x52);
63+
i2c_reg_write(addr, 0x5e, val); /* set lane_cnt */
64+
val = i2c_reg_read(addr, 0x53);
65+
i2c_reg_write(addr, 0x5c, val); /* set downspread_ctl */
66+
67+
i2c_reg_write(addr, 0x5f, 0x0d); /* start training */
68+
}
69+
70+
void dp501_powerup(u8 addr)
71+
{
72+
dp501_clrbits(addr, 0x0a, 0x30); /* power on encoder */
73+
i2c_reg_write(addr, 0x27, 0x30); /* Hardware auto detect DVO timing */
74+
dp501_setbits(addr, 0x72, 0x80); /* DPCD read enable */
75+
dp501_setbits(addr, 0x30, 0x20); /* RS polynomial select */
76+
i2c_reg_write(addr, 0x71, 0x20); /* Enable Aux burst write */
77+
dp501_setbits(addr, 0x78, 0x30); /* Disable HPD2 IRQ */
78+
dp501_clrbits(addr, 0x2f, 0x40); /* Link FIFO reset selection */
79+
i2c_reg_write(addr, 0x24, 0xc0); /* SDR mode 0, ext. H/VSYNC */
80+
i2c_reg_write(addr + 2, 0x24, 0x02); /* clock input single ended */
81+
82+
if (dp501_detect_cable_adapter(addr)) {
83+
printf("DVI/HDMI cable adapter detected\n");
84+
i2c_reg_write(addr, 0x5e, 0x04); /* enable 4 channel */
85+
dp501_clrbits(addr, 0x00, 0x08); /* DVI/HDMI HDCP operation */
86+
} else {
87+
printf("no DVI/HDMI cable adapter detected\n");
88+
i2c_reg_write(addr + 2, 0x00, 0x18); /* driving strength */
89+
i2c_reg_write(addr + 2, 0x03, 0x06); /* driving strength */
90+
i2c_reg_write(addr, 0x2c, 0x00); /* configure N value */
91+
i2c_reg_write(addr, 0x2d, 0x00); /* configure N value */
92+
i2c_reg_write(addr, 0x2e, 0x0c); /* configure N value */
93+
i2c_reg_write(addr, 0x76, 0xff); /* clear all interrupt */
94+
dp501_setbits(addr, 0x78, 0x03); /* clear all interrupt */
95+
i2c_reg_write(addr, 0x75, 0xf8); /* aux channel reset */
96+
i2c_reg_write(addr, 0x75, 0x00); /* clear aux channel reset */
97+
i2c_reg_write(addr, 0x87, 0x70); /* set retry counter as 7 */
98+
dp501_setbits(addr, 0x00, 0x08); /* for DP HDCP operation */
99+
100+
dp501_link_training(addr);
101+
}
102+
}
103+
104+
void dp501_powerdown(u8 addr)
105+
{
106+
dp501_setbits(addr, 0x0a, 0x30); /* power down encoder, standby mode */
107+
}

board/gdsys/common/dp501.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* (C) Copyright 2012
3+
* Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc
4+
*
5+
* See file CREDITS for list of people who contributed to this
6+
* project.
7+
*
8+
* This program is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU General Public License as
10+
* published by the Free Software Foundation; either version 2 of
11+
* the License, or (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program; if not, write to the Free Software
20+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21+
* MA 02111-1307 USA
22+
*/
23+
24+
#ifndef _DP501_H_
25+
#define _DP501_H_
26+
27+
void dp501_powerup(u8 addr);
28+
void dp501_powerdown(u8 addr);
29+
30+
#endif

board/gdsys/p1022/Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Copyright 2010 Freescale Semiconductor, Inc.
3+
#
4+
# This program is free software; you can redistribute it and/or modify it
5+
# under the terms of the GNU General Public License as published by the Free
6+
# Software Foundation; either version 2 of the License, or (at your option)
7+
# any later version.
8+
#
9+
10+
include $(TOPDIR)/config.mk
11+
12+
LIB = $(obj)lib$(BOARD).o
13+
14+
# COBJS-y += $(BOARD).o
15+
COBJS-y += law.o
16+
COBJS-y += ddr.o
17+
COBJS-y += tlb.o
18+
COBJS-y += sdhc_boot.o
19+
COBJS-$(CONFIG_CONTROLCENTERD) += controlcenterd.o controlcenterd-id.o
20+
21+
COBJS-$(CONFIG_FSL_DIU_FB) += diu.o
22+
23+
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
24+
OBJS := $(addprefix $(obj),$(COBJS-y))
25+
SOBJS := $(addprefix $(obj),$(SOBJS))
26+
27+
$(LIB): $(OBJS) $(SOBJS)
28+
$(call cmd_link_o_target, $(OBJS))
29+
30+
#########################################################################
31+
32+
# defines $(obj).depend target
33+
include $(SRCTREE)/rules.mk
34+
35+
sinclude $(obj).depend
36+
37+
#########################################################################

0 commit comments

Comments
 (0)