qemu/include/hw/ppc
Cédric Le Goater 263b81ee15 ppc/pnv: Add an I2C controller model
The more recent IBM power processors have an embedded I2C
controller that is accessible by software via the XSCOM
address space.

Each instance of the I2C controller is capable of controlling
multiple I2C buses (one at a time).  Prior to beginning a
transaction on an I2C bus, the bus must be selected by writing
the port number associated with the bus into the PORT_NUM
field of the MODE register.  Once an I2C bus is selected,
the status of the bus can be determined by reading the
Status and Extended Status registers.

I2C bus transactions can be started by writing a command to
the Command register and reading/writing data from/to the
FIFO register.

Not supported :

 . 10 bit I2C addresses
 . Multimaster
 . Slave

Signed-off-by: Cédric Le Goater <clg@kaod.org>
[milesg: Split wiring to powernv9 into its own commit]
[milesg: Added more detail to commit message]
[milesg: Added SPDX Licensed Identifier to new files]
[milesg: updated copyright dates]
[milesg: Added use of g_autofree]
[milesg: Added NULL check after pnv_i2c_get_bus]
Signed-off-by: Glenn Miles <milesg@linux.vnet.ibm.com>
Acked-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-ID: <20231016222013.3739530-2-milesg@linux.vnet.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2023-11-07 15:49:41 -03:00
..
fdt.h hw/ppc: Clean up local variable shadowing in _FDT helper routine 2023-09-29 10:07:17 +02:00
mac_dbdma.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
openpic_kvm.h openpic: move KVM-specific declarations into separate openpic_kvm.h file 2018-03-06 13:16:29 +11:00
openpic.h ppc: spelling fixes 2023-09-20 07:54:34 +03:00
pef.h spapr: Add PEF based confidential guest support 2021-02-08 16:57:38 +11:00
pnv_chip.h include/hw/ppc: Split pnv_chip.h off pnv.h 2023-01-20 07:25:10 +01:00
pnv_core.h ppc/pnv: Add QME region for P10 2023-07-07 06:32:53 -03:00
pnv_homer.h include/hw/ppc include/hw/pci-host: Drop extra typedefs 2023-01-20 07:25:22 +01:00
pnv_i2c.h ppc/pnv: Add an I2C controller model 2023-11-07 15:49:41 -03:00
pnv_lpc.h include/hw/ppc include/hw/pci-host: Drop extra typedefs 2023-01-20 07:25:22 +01:00
pnv_occ.h include/hw/ppc: Supply a few missing includes 2023-01-20 07:25:14 +01:00
pnv_pnor.h include/hw/ppc: Supply a few missing includes 2023-01-20 07:25:14 +01:00
pnv_psi.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
pnv_sbe.h include/hw/ppc: Supply a few missing includes 2023-01-20 07:25:14 +01:00
pnv_xive.h include/hw/ppc include/hw/pci-host: Drop extra typedefs 2023-01-20 07:25:22 +01:00
pnv_xscom.h ppc/pnv: Add an I2C controller model 2023-11-07 15:49:41 -03:00
pnv.h target/ppc: Add POWER9 DD2.2 model 2023-05-28 13:25:11 -03:00
ppc4xx.h ppc440_pcix: Rename QOM type define abd move it to common header 2023-07-07 04:47:49 -03:00
ppc_e500.h intc/openpic: Build openpic only once 2013-07-09 21:33:02 +02:00
ppc.h hw/ppc: Reset timebase facilities on machine reset 2023-09-06 11:19:33 +02:00
spapr_cpu_core.h ppc/spapr: Add a nested state struct 2023-06-25 22:41:30 +02:00
spapr_drc.h spapr: rollback 'unplug timeout' for CPU hotunplugs 2021-04-12 12:27:14 +10:00
spapr_irq.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
spapr_nested.h ppc/spapr: Move spapr nested HV to a new file 2023-06-25 22:41:30 +02:00
spapr_numa.h spapr: move FORM1 verifications to post CAS 2021-09-30 12:26:06 +10:00
spapr_nvdimm.h spapr: nvdimm: Implement H_SCM_FLUSH hcall 2022-02-18 08:34:14 +01:00
spapr_ovec.h spapr_numa.c: FORM2 NUMA affinity support 2021-09-30 12:26:06 +10:00
spapr_rtas.h tests: add RTAS command in the protocol 2016-09-23 10:29:40 +10:00
spapr_tpm_proxy.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
spapr_vio.h dma: Let ld*_dma() propagate MemTxResult 2021-12-31 01:05:27 +01:00
spapr_xive.h spapr/xive: Make spapr_xive_pic_print_info() static 2021-01-06 11:09:59 +11:00
spapr.h ppc: spelling fixes 2023-09-20 07:54:34 +03:00
vof.h hw/ppc/vof: Do not include the full "cpu.h" 2022-12-21 14:17:55 -03:00
xics_spapr.h spapr/xics: Drop unused argument to xics_kvm_has_broken_disconnect() 2020-12-14 15:50:55 +11:00
xics.h hw/pci-host/pnv_phb3_msi: Convert TYPE_PHB3_MSI to 3-phase reset 2022-12-16 15:59:07 +00:00
xive2_regs.h include/hw/ppc: Supply a few missing includes 2023-01-20 07:25:14 +01:00
xive2.h include/hw/ppc: Supply a few missing includes 2023-01-20 07:25:14 +01:00
xive_regs.h pnv/xive2: Introduce macros to manipulate TIMA addresses 2023-06-10 10:19:24 -03:00
xive.h ppc/xive: Introduce a new XiveRouter end_notify() handler 2023-09-06 11:19:33 +02:00