summary refs log tree commit diff stats
path: root/hw/misc/pca9554.c
diff options
context:
space:
mode:
authorGlenn Miles <milesg@linux.vnet.ibm.com>2024-02-05 17:40:16 +1000
committerNicholas Piggin <npiggin@gmail.com>2024-02-23 23:24:42 +1000
commit6f86885a74584f069db95bd6043d9497388808b4 (patch)
treee42b56e39ba4b4d9b6415ba949f0f73c01de3412 /hw/misc/pca9554.c
parent33467ecb86e7938df605d0384a3a0e3e8a57c707 (diff)
downloadfocaccia-qemu-6f86885a74584f069db95bd6043d9497388808b4.tar.gz
focaccia-qemu-6f86885a74584f069db95bd6043d9497388808b4.zip
ppc/pnv: Wire up pca9552 GPIO pins for PCIe hotplug power control
For power10-rainier, a pca9552 device is used for PCIe slot hotplug
power control by the Power Hypervisor code.  The code expects that
some time after it enables power to a PCIe slot by asserting one of
the pca9552 GPIO pins 0-4, it should see a "power good" signal asserted
on one of pca9552 GPIO pins 5-9.

To simulate this behavior, we simply connect the GPIO outputs for
pins 0-4 to the GPIO inputs for pins 5-9.

Each PCIe slot is assigned 3 GPIO pins on the pca9552 device, for
control of up to 5 PCIe slots.  The per-slot signal names are:

   SLOTx_EN.......PHYP uses this as an output to enable
                  slot power.  We connect this to the
                  SLOTx_PG pin to simulate a PGOOD signal.
   SLOTx_PG.......PHYP uses this as in input to detect
                  PGOOD for the slot.  For our purposes
                  we just connect this to the SLOTx_EN
                  output.
   SLOTx_Control..PHYP uses this as an output to prevent
                  a race condition in the real hotplug
                  circuitry, but we can ignore this output
                  for simulation.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Glenn Miles <milesg@linux.vnet.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'hw/misc/pca9554.c')
0 files changed, 0 insertions, 0 deletions