summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround.sh
blob: 9ebf601360f0ac813a672625a26dc369b2398f9f (plain)
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
#!/bin/sh -e
# Apply fixes over FSI to POWER9 hosts. Required before VCS rail on.

PDBG=${PDBG:-pdbg}

putcfam()
{
    $PDBG $1 putcfam $2 $3 $4
}

# P9 dd1 required workaround needed before powering VCS rails
p9_dd1_vcs_workaround()
{
    putcfam -a 0x2810 0x00000000 0x00010000 &&  # Unfence PLL controls
    putcfam -a 0x281A 0x40000000 0x40000000 &&  # Assert Perv chiplet endpoint reset, just in case
    putcfam -a 0x281A 0x00000001 0x00000001     # Enable Nest PLL
}

# Put the CFAM/FSI slave into async mode
putcfam -p0 0x900 1

#Set hMFSI error recovery
putcfam -p0 0x34b8 0x0000c000

#Set hMFSI timings
putcfam -p0 0x3400 0xd0040110
putcfam -p0 0x3401 0xffff0000

#Enable hMFST ports
putcfam -p0 0x3404 0xf0000000

p9_dd1_vcs_workaround
OpenPOWER on IntegriCloud