coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
iomap.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef AMD_PICASSO_IOMAP_H
4 #define AMD_PICASSO_IOMAP_H
5 
6 #if ENV_X86
7 
8 /* MMIO Ranges */
9 /* IO_APIC_ADDR defined in arch/x86 0xfec00000 */
10 #define GNB_IO_APIC_ADDR 0xfec01000
11 #define SPI_BASE_ADDRESS 0xfec10000
12 
13 /* FCH AL2AHB Registers */
14 #define ALINK_AHB_ADDRESS 0xfedc0000
15 #define AL2AHB_CONTROL_CLK_OFFSET 0x10
16 #define AL2AHB_CLK_GATE_EN (1 << 1)
17 #define AL2AHB_CONTROL_HCLK_OFFSET 0x30
18 #define AL2AHB_HCLK_GATE_EN (1 << 1)
19 
20 /* Reserved 0xfecd1000-0xfedc3fff */
21 
22 #endif /* ENV_X86 */
23 
24 /*
25  * Picasso/Dali have I2C0 and I2C1 wired to the Sensor Fusion Hub (SFH/MP2).
26  * The controllers are not directly accessible via the x86.
27  *
28  * On Pollock, I2C0 and I2C1 are routed to the x86 domain, but unfortunately the
29  * interrupts weren't. This effectively makes the I2C controllers useless, so we
30  * pretend they don't exist.
31  *
32  * We want the device tree numbering to match the I2C numbers, so we allocate
33  * I2C0 and I2C1 even though they are not functional.
34  */
35 #define I2C_MASTER_DEV_COUNT 4
36 #define I2C_MASTER_START_INDEX 2
37 #define I2C_PERIPHERAL_DEV_COUNT 1
38 #define I2C_CTRLR_COUNT (I2C_MASTER_DEV_COUNT + I2C_PERIPHERAL_DEV_COUNT)
39 
40 #if ENV_X86
41 
42 #define APU_I2C2_BASE 0xfedc4000
43 #define APU_I2C3_BASE 0xfedc5000
44 #define APU_I2C4_BASE 0xfedc6000
45 
46 #define APU_DMAC0_BASE 0xfedc7000
47 #define APU_DMAC1_BASE 0xfedc8000
48 #define APU_UART0_BASE 0xfedc9000
49 #define APU_UART1_BASE 0xfedca000
50 /* Reserved 0xfedcb000 */
51 #define APU_DMAC2_BASE 0xfedcc000
52 #define APU_DMAC3_BASE 0xfedcd000
53 #define APU_UART2_BASE 0xfedce000
54 #define APU_UART3_BASE 0xfedcf000
55 /* Reserved 0xfedd0000-0xfedd4fff */
56 #define APU_EMMC_BASE 0xfedd5000
57 #define APU_EMMC_CONFIG_BASE 0xfedd5800
58 
59 #endif /* ENV_X86 */
60 
61 #define FLASH_BASE_ADDR ((0xffffffff - CONFIG_ROM_SIZE) + 1)
62 
63 /* I/O Ranges */
64 #define ACPI_IO_BASE 0x400
65 #define ACPI_PM_EVT_BLK (ACPI_IO_BASE + 0x00) /* 4 bytes */
66 #define ACPI_PM1_STS (ACPI_PM_EVT_BLK + 0x00) /* 2 bytes */
67 #define ACPI_PM1_EN (ACPI_PM_EVT_BLK + 0x02) /* 2 bytes */
68 #define ACPI_PM1_CNT_BLK (ACPI_IO_BASE + 0x04) /* 2 bytes */
69 #define ACPI_PM_TMR_BLK (ACPI_IO_BASE + 0x08) /* 4 bytes */
70 #define ACPI_CPU_CONTROL (ACPI_IO_BASE + 0x10)
71 /* doc says 0x14 for GPE0_BLK but FT5 only works with 0x20 */
72 #define ACPI_GPE0_BLK (ACPI_IO_BASE + 0x20) /* 8 bytes */
73 #define ACPI_GPE0_STS (ACPI_GPE0_BLK + 0x00) /* 4 bytes */
74 #define ACPI_GPE0_EN (ACPI_GPE0_BLK + 0x04) /* 4 bytes */
75 #define SMB_BASE_ADDR 0xb00
76 #define PM2_INDEX 0xcd0
77 #define PM2_DATA 0xcd1
78 #define BIOSRAM_INDEX 0xcd4
79 #define BIOSRAM_DATA 0xcd5
80 #define AB_INDX 0xcd8
81 #define AB_DATA (AB_INDX+4)
82 
83 #endif /* AMD_PICASSO_IOMAP_H */