| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,138 @@ | ||
| # | ||
| # This file is part of the coreboot project. | ||
| # | ||
| # Copyright (C) 2017 Arthur Heymans <arthur@aheymans.xyz> | ||
| # | ||
| # This program is free software; you can redistribute it and/or modify | ||
| # it under the terms of the GNU General Public License as published by | ||
| # the Free Software Foundation; either version 2 of the License, or | ||
| # (at your option) any later version. | ||
| # | ||
| # This program is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| # GNU General Public License for more details. | ||
| # | ||
|
|
||
| chip northbridge/intel/x4x # Northbridge | ||
| device cpu_cluster 0 on # APIC cluster | ||
| chip cpu/intel/socket_LGA775 | ||
| device lapic 0 on end | ||
| end | ||
| chip cpu/intel/model_1067x # CPU | ||
| device lapic 0xACAC off end | ||
| end | ||
| end | ||
| device domain 0 on # PCI domain | ||
| subsystemid 0x1458 0x5000 inherit | ||
| device pci 0.0 on # Host Bridge | ||
| subsystemid 0x1849 0x2e30 | ||
| end | ||
| device pci 1.0 on end # PEG | ||
|
|
||
| device pci 2.0 on # Integrated graphics controller | ||
| subsystemid 0x1849 0x2e32 | ||
| end | ||
| device pci 3.0 off end # ME | ||
| device pci 3.1 off end # ME | ||
| chip southbridge/intel/i82801gx # Southbridge | ||
| register "pirqa_routing" = "0x0b" | ||
| register "pirqb_routing" = "0x0b" | ||
| register "pirqc_routing" = "0x0b" | ||
| register "pirqd_routing" = "0x0b" | ||
| register "pirqe_routing" = "0x80" | ||
| register "pirqf_routing" = "0x80" | ||
| register "pirqg_routing" = "0x80" | ||
| register "pirqh_routing" = "0x0b" | ||
|
|
||
| register "ide_enable_primary" = "0x1" | ||
| register "gpe0_en" = "0x440" | ||
|
|
||
| device pci 1b.0 on # Audio | ||
| subsystemid 0x1849 0x3662 | ||
| end | ||
| device pci 1c.0 on end # PCIe 1 | ||
| device pci 1c.1 on end # PCIe 2 | ||
| device pci 1c.2 off end # PCIe 3 | ||
| device pci 1c.3 off end # PCIe 4 | ||
| device pci 1c.4 off end # PCIe 5 | ||
| device pci 1c.5 off end # PCIe 6 | ||
| device pci 1d.0 on # USB | ||
| subsystemid 0x1849 0x27c8 | ||
| end | ||
| device pci 1d.1 on # USB | ||
| subsystemid 0x1849 0x27c9 | ||
| end | ||
| device pci 1d.2 on # USB | ||
| subsystemid 0x1849 0x27ca | ||
| end | ||
| device pci 1d.3 on # USB | ||
| subsystemid 0x1849 0x27cb | ||
| end | ||
| device pci 1d.7 on # USB | ||
| subsystemid 0x1849 0x27cc | ||
| end | ||
| device pci 1e.0 on end # PCI bridge | ||
| device pci 1e.2 off end # AC'97 Audio | ||
| device pci 1e.3 off end # AC'97 Modem | ||
| device pci 1f.0 on # ISA bridge | ||
| subsystemid 0x1849 0x27b8 | ||
| chip superio/winbond/w83627dhg | ||
| device pnp 2e.0 off end # Floppy | ||
| device pnp 2e.1 on # Parallel port | ||
| # global | ||
| irq 0x28 = 0x70 | ||
| irq 0x2c = 0xd2 | ||
| # parallel port | ||
| io 0x60 = 0x378 | ||
| irq 0x70 = 7 | ||
| drq 0x74 = 3 | ||
| end | ||
| device pnp 2e.2 on # COM1 | ||
| io 0x60 = 0x3f8 | ||
| irq 0x70 = 4 | ||
| end | ||
| device pnp 2e.3 off end # COM2 | ||
| device pnp 2e.5 on # Keyboard & MOUSE | ||
| io 0x60 = 0x60 | ||
| io 0x62 = 0x64 | ||
| irq 0x70 = 1 | ||
| irq 0x72 = 0x0C | ||
| end | ||
| device pnp 2e.6 off end # SPI | ||
| device pnp 2e.7 off end # GPIO6 | ||
| device pnp 2e.8 off end # WDT0#, PLED | ||
| device pnp 2e.9 off end # GPIO2 | ||
| device pnp 2e.109 off end # GPIO3 | ||
| device pnp 2e.209 on # GPIO4 | ||
| irq 0xf4 = 0x73 | ||
| end | ||
| device pnp 2e.309 off end # GPIO5 | ||
| device pnp 2e.a on # ACPI | ||
| irq 0xe4 = 0x10 # Power dram during s3 | ||
| end | ||
| device pnp 2e.b on # HWM, front pannel LED | ||
| io 0x60 = 0x290 | ||
| irq 0x70 = 0 | ||
| end | ||
| device pnp 2e.c off end # PECI, SST | ||
| end | ||
| end | ||
| device pci 1f.1 on # PATA/IDE | ||
| subsystemid 0x1849 0x27df | ||
| end | ||
| device pci 1f.2 on # SATA | ||
| subsystemid 0x1849 0x27c0 | ||
| end | ||
| device pci 1f.3 on # SMbus | ||
| subsystemid 0x1849 0x27da | ||
| chip drivers/i2c/ck505 # W83115RG-965 | ||
| # set SATA to fixed 100Mhz refclk | ||
| register "mask" = "{ 0x02 }" | ||
| register "regs" = "{ 0x02 }" | ||
| device i2c 69 on end | ||
| end | ||
| end | ||
| end | ||
| end | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| # | ||
| # This file is part of the coreboot project. | ||
| # | ||
| # Copyright (C) 2017 Arthur Heymans <arthur@aheymans.xyz> | ||
| # | ||
| # This program is free software; you can redistribute it and/or modify | ||
| # it under the terms of the GNU General Public License as published by | ||
| # the Free Software Foundation; either version 2 of the License, or | ||
| # (at your option) any later version. | ||
| # | ||
| # This program is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| # GNU General Public License for more details. | ||
| # | ||
|
|
||
| chip northbridge/intel/x4x # Northbridge | ||
| device cpu_cluster 0 on # APIC cluster | ||
| chip cpu/intel/socket_LGA775 | ||
| device lapic 0 on end | ||
| end | ||
| chip cpu/intel/model_1067x # CPU | ||
| device lapic 0xACAC off end | ||
| end | ||
| end | ||
| device domain 0 on # PCI domain | ||
| subsystemid 0x1458 0x5000 inherit | ||
| device pci 0.0 on # Host Bridge | ||
| subsystemid 0x1849 0x2e30 | ||
| end | ||
| device pci 1.0 on end # PEG | ||
|
|
||
| device pci 2.0 on # Integrated graphics controller | ||
| subsystemid 0x1849 0x2e32 | ||
| end | ||
| device pci 3.0 off end # ME | ||
| device pci 3.1 off end # ME | ||
| chip southbridge/intel/i82801gx # Southbridge | ||
| register "pirqa_routing" = "0x0b" | ||
| register "pirqb_routing" = "0x0b" | ||
| register "pirqc_routing" = "0x0b" | ||
| register "pirqd_routing" = "0x0b" | ||
| register "pirqe_routing" = "0x80" | ||
| register "pirqf_routing" = "0x80" | ||
| register "pirqg_routing" = "0x80" | ||
| register "pirqh_routing" = "0x0b" | ||
|
|
||
| register "ide_enable_primary" = "0x1" | ||
| register "sata_ahci" = "0x0" # AHCI not supported on this ICH7 variant | ||
| register "sata_ports_implemented" = "0x3" | ||
| register "gpe0_en" = "0x440" | ||
|
|
||
| device pci 1b.0 on # Audio | ||
| subsystemid 0x1849 0x3662 | ||
| end | ||
| device pci 1c.0 on end # PCIe 1 | ||
| device pci 1c.1 on end # PCIe 2 | ||
| device pci 1c.2 off end # PCIe 3 | ||
| device pci 1c.3 off end # PCIe 4 | ||
| device pci 1d.0 on # USB | ||
| subsystemid 0x1849 0x27c8 | ||
| end | ||
| device pci 1d.1 on # USB | ||
| subsystemid 0x1849 0x27c9 | ||
| end | ||
| device pci 1d.2 on # USB | ||
| subsystemid 0x1849 0x27ca | ||
| end | ||
| device pci 1d.3 on # USB | ||
| subsystemid 0x1849 0x27cb | ||
| end | ||
| device pci 1d.7 on # USB | ||
| subsystemid 0x1849 0x27cc | ||
| end | ||
| device pci 1e.0 on end # PCI bridge | ||
| device pci 1f.0 on # ISA bridge | ||
| subsystemid 0x1849 0x27b8 | ||
| chip superio/winbond/w83627dhg | ||
| device pnp 2e.0 off end # Floppy | ||
| device pnp 2e.1 on # Parallel port | ||
| # global | ||
| irq 0x28 = 0x70 | ||
| irq 0x2c = 0xd2 | ||
| # parallel port | ||
| io 0x60 = 0x378 | ||
| irq 0x70 = 7 | ||
| drq 0x74 = 3 | ||
| end | ||
| device pnp 2e.2 on # COM1 | ||
| io 0x60 = 0x3f8 | ||
| irq 0x70 = 4 | ||
| end | ||
| device pnp 2e.3 off end # COM2 | ||
| device pnp 2e.5 on # Keyboard & MOUSE | ||
| io 0x60 = 0x60 | ||
| io 0x62 = 0x64 | ||
| irq 0x70 = 1 | ||
| irq 0x72 = 0x0C | ||
| end | ||
| device pnp 2e.6 off end # SPI | ||
| device pnp 2e.7 off end # GPIO6 | ||
| device pnp 2e.8 off end # WDT0#, PLED | ||
| device pnp 2e.9 on end # GPIO2 | ||
| device pnp 2e.109 on # GPIO3 | ||
| irq 0xfe = 0x07 | ||
| end | ||
| device pnp 2e.209 on # GPIO4 | ||
| irq 0xf4 = 0x73 | ||
| end | ||
| device pnp 2e.309 off end # GPIO5 | ||
| device pnp 2e.a on # ACPI | ||
| irq 0xe4 = 0x10 # Power dram during s3 | ||
| end | ||
| device pnp 2e.b on # HWM, front pannel LED | ||
| io 0x60 = 0x290 | ||
| irq 0x70 = 0 | ||
| end | ||
| device pnp 2e.c off end # PECI, SST | ||
| end | ||
| end | ||
| device pci 1f.1 on # PATA/IDE | ||
| subsystemid 0x1849 0x27df | ||
| end | ||
| device pci 1f.2 on # SATA | ||
| subsystemid 0x1849 0x27c0 | ||
| end | ||
| device pci 1f.3 on # SMbus | ||
| subsystemid 0x1849 0x27da | ||
| end | ||
| device pci 1f.4 off end | ||
| device pci 1f.5 off end | ||
| device pci 1f.6 off end | ||
| end | ||
| end | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| config VENDOR_CAVIUM | ||
| bool "Cavium" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| ## | ||
| ## This file is part of the coreboot project. | ||
| ## | ||
| ## Copyright 2018 Facebook, Inc. | ||
| ## | ||
| ## This program is free software; you can redistribute it and/or modify | ||
| ## it under the terms of the GNU General Public License as published by | ||
| ## the Free Software Foundation; version 2 of the License. | ||
| ## | ||
| ## This program is distributed in the hope that it will be useful, | ||
| ## but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| ## GNU General Public License for more details. | ||
| ## | ||
|
|
||
| if BOARD_CAVIUM_CN8100_SFF_EVB | ||
|
|
||
| config BOARD_SPECIFIC_OPTIONS | ||
| def_bool y | ||
| select BOARD_ROMSIZE_KB_16384 | ||
| select COMMON_CBFS_SPI_WRAPPER | ||
| select RTC | ||
| select SOC_CAVIUM_CN81XX | ||
| select SPI_FLASH | ||
| select SPI_FLASH_STMICRO | ||
|
|
||
| config MAINBOARD_DIR | ||
| string | ||
| default "cavium/cn8100_sff_evb" | ||
|
|
||
| config MAINBOARD_VENDOR | ||
| string | ||
| default "Cavium" | ||
|
|
||
| config DRAM_SIZE_MB | ||
| int | ||
| default 8192 | ||
|
|
||
| config BOOT_DEVICE_SPI_FLASH_BUS | ||
| int | ||
| default 0 | ||
|
|
||
| config CONSOLE_SERIAL_UART_ADDRESS | ||
| hex | ||
| depends on DRIVERS_UART | ||
| default 0x87E028000000 | ||
|
|
||
| config UART_FOR_CONSOLE | ||
| int | ||
| depends on DRIVERS_UART | ||
| default 0 | ||
|
|
||
| config FMDFILE | ||
| string | ||
| default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/board.fmd" | ||
|
|
||
| config MAX_CPUS | ||
| default 4 | ||
|
|
||
| ########################################################## | ||
| #### Update below when adding a new derivative board. #### | ||
| ########################################################## | ||
| config DEVICETREE | ||
| string | ||
| default "devicetree.cb" | ||
|
|
||
| config MAINBOARD_PART_NUMBER | ||
| string | ||
| default "CN8100_SFF_EVB" | ||
|
|
||
| endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| config BOARD_CAVIUM_CN8100_SFF_EVB | ||
| bool "CN8100 SFF EVB" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * Copyright 2017-present Facebook, Inc. | ||
| * | ||
| * This program is free software; you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation; version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| */ | ||
|
|
||
| // This file is automatically generated. | ||
| // DO NOT EDIT BY HAND. | ||
|
|
||
| #include <bdk-devicetree.h> | ||
|
|
||
| const struct bdk_devicetree_key_value devtree[] = { | ||
| {"DDR-TEST-BOOT", "1"}, | ||
| {"DDR-CONFIG-DQX-CTL", "0x4"}, | ||
| {"DDR-CONFIG-WODT-MASK.RANKS2.DIMMS2", "0xc0c0303"}, | ||
| {"DDR-CONFIG-WODT-MASK.RANKS4.DIMMS1", "0x1030203"}, | ||
| {"DDR-CONFIG-MODE1-RTT-WR.RANKS1.DIMMS1.RANK0", "0x4"}, | ||
| {"DDR-CONFIG-MODE1-RTT-WR.RANKS1.DIMMS2.RANK0", "0x4"}, | ||
| {"DDR-CONFIG-MODE1-RTT-WR.RANKS1.DIMMS2.RANK2", "0x4"}, | ||
| {"DDR-CONFIG-MODE1-RTT-WR.RANKS2.DIMMS1.RANK0", "0x2"}, | ||
| {"DDR-CONFIG-MODE1-RTT-WR.RANKS2.DIMMS1.RANK1", "0x2"}, | ||
| {"DDR-CONFIG-MODE1-RTT-WR.RANKS2.DIMMS2", "0x2"}, | ||
| {"DDR-CONFIG-MODE1-RTT-WR.RANKS4", "0x1"}, | ||
| {"DDR-CONFIG-MODE1-DIC.RANKS4.DIMMS1", "0x1"}, | ||
| {"DDR-CONFIG-MODE1-RTT-NOM.RANKS2.DIMMS2", "0x2"}, | ||
| {"DDR-CONFIG-MODE1-RTT-NOM.RANKS4.DIMMS1.RANK0", "0x4"}, | ||
| {"DDR-CONFIG-MODE1-RTT-NOM.RANKS4.DIMMS1.RANK2", "0x4"}, | ||
| {"DDR-CONFIG-MODE2-RTT-PARK.RANKS1.DIMMS1.RANK0", "0x1"}, | ||
| {"DDR-CONFIG-MODE2-RTT-PARK.RANKS1.DIMMS2.RANK0", "0x5"}, | ||
| {"DDR-CONFIG-MODE2-RTT-PARK.RANKS1.DIMMS2.RANK2", "0x5"}, | ||
| {"DDR-CONFIG-MODE2-RTT-PARK.RANKS2.DIMMS1.RANK0", "0x2"}, | ||
| {"DDR-CONFIG-MODE2-RTT-PARK.RANKS2.DIMMS1.RANK1", "0x2"}, | ||
| {"DDR-CONFIG-MODE2-RTT-PARK.RANKS2.DIMMS2", "0x1"}, | ||
| {"DDR-CONFIG-MODE2-RTT-PARK.RANKS4.DIMMS1.RANK0", "0x6"}, | ||
| {"DDR-CONFIG-MODE2-RTT-PARK.RANKS4.DIMMS1.RANK1", "0x6"}, | ||
| {"DDR-CONFIG-MODE2-VREF-VALUE.RANKS1.DIMMS1.RANK0", "0x22"}, | ||
| {"DDR-CONFIG-MODE2-VREF-VALUE.RANKS1.DIMMS2.RANK0", "0x1f"}, | ||
| {"DDR-CONFIG-MODE2-VREF-VALUE.RANKS1.DIMMS2.RANK2", "0x1f"}, | ||
| {"DDR-CONFIG-MODE2-VREF-VALUE.RANKS2.DIMMS1.RANK0", "0x19"}, | ||
| {"DDR-CONFIG-MODE2-VREF-VALUE.RANKS2.DIMMS1.RANK1", "0x19"}, | ||
| {"DDR-CONFIG-MODE2-VREF-VALUE.RANKS2.DIMMS2", "0x19"}, | ||
| {"DDR-CONFIG-MODE2-VREF-VALUE.RANKS4.DIMMS1.RANK0", "0x1f"}, | ||
| {"DDR-CONFIG-MODE2-VREF-VALUE.RANKS4.DIMMS1.RANK1", "0x1f"}, | ||
| {"DDR-CONFIG-RODT-CTL.RANKS1.DIMMS1", "0x7"}, | ||
| {"DDR-CONFIG-RODT-CTL.RANKS1.DIMMS2", "0x3"}, | ||
| {"DDR-CONFIG-RODT-CTL.RANKS2.DIMMS1", "0x3"}, | ||
| {"DDR-CONFIG-RODT-CTL.RANKS2.DIMMS2", "0x7"}, | ||
| {"DDR-CONFIG-RODT-CTL.RANKS4.DIMMS1", "0x7"}, | ||
| {"DDR-CONFIG-RODT-MASK.RANKS2.DIMMS2", "0x4080102"}, | ||
| {"DDR-CONFIG-RODT-MASK.RANKS4.DIMMS1", "0x1010202"}, | ||
| {"DDR-CONFIG-CUSTOM-MIN-RTT-NOM-IDX", "0x1"}, | ||
| {"DDR-CONFIG-CUSTOM-MAX-RTT-NOM-IDX", "0x7"}, | ||
| {"DDR-CONFIG-CUSTOM-MIN-RODT-CTL", "0x1"}, | ||
| {"DDR-CONFIG-CUSTOM-MAX-RODT-CTL", "0x7"}, | ||
| {"DDR-CONFIG-CUSTOM-CK-CTL", "0x4"}, | ||
| {"DDR-CONFIG-CUSTOM-CMD-CTL", "0x4"}, | ||
| {"DDR-CONFIG-CUSTOM-CTL-CTL", "0x4"}, | ||
| {"DDR-CONFIG-CUSTOM-OFFSET-EN", "0x1"}, | ||
| {"DDR-CONFIG-CUSTOM-OFFSET", "0x2"}, | ||
| {"DDR-CONFIG-CUSTOM-DDR2T", "0x1"}, | ||
| {"DDR-CONFIG-CUSTOM-MAXIMUM-ADJACENT-RLEVEL-DELAY-INCREMENT", "0x2"}, | ||
| {"DDR-CONFIG-CUSTOM-FPRCH2", "0x2"}, | ||
| {"PHY-ADDRESS.N0.BGX0.P0", "0xff000010"}, | ||
| {"PHY-ADDRESS.N0.BGX0.P1", "0xff000011"}, | ||
| {"PHY-ADDRESS.N0.BGX0.P2", "0xff000012"}, | ||
| {"PHY-ADDRESS.N0.BGX0.P3", "0xff000013"}, | ||
| {"PHY-ADDRESS.N0.BGX1.P0", "0xff002014"}, | ||
| {"PHY-ADDRESS.N0.BGX1.P1", "0xff002014"}, | ||
| {"PHY-ADDRESS.N0.BGX2.P0", "0xff000000"}, | ||
| {"BGX-ENABLE.N0.BGX0.P0", "1"}, | ||
| {"BGX-ENABLE.N0.BGX0.P1", "1"}, | ||
| {"BGX-ENABLE.N0.BGX0.P2", "1"}, | ||
| {"BGX-ENABLE.N0.BGX0.P3", "1"}, | ||
| {"BGX-ENABLE.N0.BGX1.P0", "1"}, | ||
| {"BGX-ENABLE.N0.BGX1.P1", "1"}, | ||
| {"BGX-ENABLE.N0.BGX2.P0", "1"}, | ||
| {"BDK-NUM-PACKET-BUFFERS", "0x1000"}, | ||
| {"BDK-PACKET-BUFFER-SIZE", "0x400"}, | ||
| {"BDK-SHOW-LINK-STATUS", "1"}, | ||
| {"BDK-COREMASK", "0"}, | ||
| {"MULTI-NODE", "0"}, | ||
| {"QLM-AUTO-CONFIG", "0"}, | ||
| {"QLM-DIP-AUTO-CONFIG", "1"}, | ||
| {"DDR-CONFIG-SPD-ADDR.DIMM0.LMC0", "0x1050"}, | ||
| {"USB-PWR-GPIO.N0.PORT0", "12"}, | ||
| {"USB-PWR-GPIO-POLARITY.N0.PORT0", "0"}, | ||
| {"USB-REFCLK-SRC.N0.PORT0", "0"}, | ||
| {"GPIO-PIN-SELECT-GPIO15", "0x24f"}, | ||
| {"GPIO-PIN-SELECT-GPIO16", "0x24e"}, | ||
| {"GPIO-PIN-SELECT-GPIO17", "0x24b"}, | ||
| {"GPIO-PIN-SELECT-GPIO18", "0x247"}, | ||
| {"GPIO-PIN-SELECT-GPIO19", "0x24d"}, | ||
| {"GPIO-PIN-SELECT-GPIO20", "0x24c"}, | ||
| {"GPIO-PIN-SELECT-GPIO37", "0x24a"}, | ||
| {"GPIO-PIN-SELECT-GPIO38", "0x246"}, | ||
| {"GPIO-PIN-SELECT-GPIO7", "0xe1"}, | ||
| {"GPIO-PIN-SELECT-GPIO24", "0xeb"}, | ||
| {"GPIO-PIN-SELECT-GPIO27", "0xed"}, | ||
| {"GPIO-PIN-SELECT-GPIO28", "0xe3"}, | ||
| {"GPIO-PIN-SELECT-GPIO29", "0xe0"}, | ||
| {"GPIO-PIN-SELECT-GPIO30", "0xe2"}, | ||
| {"GPIO-PIN-SELECT-GPIO40", "0x112"}, | ||
| {"GPIO-PIN-SELECT-GPIO41", "0x113"}, | ||
| {"GPIO-PIN-SELECT-GPIO42", "0x114"}, | ||
| {"GPIO-PIN-SELECT-GPIO43", "0x115"}, | ||
| {"GPIO-PIN-SELECT-GPIO44", "0x116"}, | ||
| {"GPIO-PIN-SELECT-GPIO45", "0x117"}, | ||
| {"GPIO-PIN-SELECT-GPIO46", "0x118"}, | ||
| {"GPIO-PIN-SELECT-GPIO47", "0x119"}, | ||
| {"GPIO-POLARITY-GPIO7", "1"}, | ||
| {"GPIO-POLARITY-GPIO27", "1"}, | ||
| {"GPIO-POLARITY-GPIO28", "1"}, | ||
| {"GPIO-POLARITY-GPIO30", "1"}, | ||
| {0, 0}, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| FLASH@0x0 8M { | ||
| WP_RO@0x0 0x400000 { | ||
| RO_SECTION@0x0 0x200000 { | ||
| # bootblock includes trusted/non-trusted CLIB, CSIB, | ||
| # and BL1FWs packaged in | ||
| # src/soc/cavium/common/Makefile.inc. | ||
| BOOTBLOCK@0x10000 0x70000 | ||
| FMAP@0x90000 0x1000 | ||
| COREBOOT(CBFS)@0x100000 0x100000 | ||
| } | ||
| } | ||
| RW_SECTION_A@0x400000 0xe8000 { | ||
| VBLOCK_A@0x0 0x2000 | ||
| FW_MAIN_A(CBFS)@0x2000 0xe5f00 | ||
| RW_FWID_A@0xe7f00 0x100 | ||
| } | ||
| RW_UNUSED@0x4e8000 0x8000 | ||
| RW_ELOG@0x5d8000 0x1000 | ||
| RW_SHARED@0x5e0000 0x10000 { | ||
| SHARED_DATA@0x0 0x10000 | ||
| } | ||
| RW_NVRAM@0x5f0000 0x10000 | ||
| CONSOLE@0x700000 0x100000 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Vendor name: Cavium | ||
| Board name: CN81XX SFF EVB | ||
| Category: eval | ||
| ROM protocol: SPI | ||
| ROM socketed: n | ||
| Flashrom support: n |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * Copyright 2018 Facebook, Inc. | ||
| * | ||
| * This program is free software; you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation; version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| */ | ||
|
|
||
| #include <bootblock_common.h> | ||
| #include <soc/soc.h> | ||
| #include <soc/spi.h> | ||
| #include <soc/uart.h> | ||
|
|
||
| void bootblock_mainboard_early_init(void) | ||
| { | ||
| if (IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE)) { | ||
| if (!uart_is_enabled(CONFIG_UART_FOR_CONSOLE)) | ||
| uart_setup(CONFIG_UART_FOR_CONSOLE, CONFIG_TTYS0_BAUD); | ||
| } | ||
| } | ||
|
|
||
| static void configure_spi_flash(void) | ||
| { | ||
| /* FIXME: Only tested on EM100 Pro */ | ||
| spi_init_custom(0, // bus | ||
| 25000000, // speed Hz | ||
| 0, // idle low disabled | ||
| 0, // zero idle cycles between transfers | ||
| 0, // MSB first | ||
| 0, // Chip select 0 | ||
| 1); // assert is high | ||
| } | ||
|
|
||
| void bootblock_mainboard_init(void) | ||
| { | ||
| configure_spi_flash(); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,210 @@ | ||
| ## | ||
| ## This file is part of the coreboot project. | ||
| ## | ||
| ## Copyright 2017-present Facebook, Inc. | ||
| ## | ||
| ## This program is free software; you can redistribute it and/or modify | ||
| ## it under the terms of the GNU General Public License as published by | ||
| ## the Free Software Foundation; version 2 of the License. | ||
| ## | ||
| ## This program is distributed in the hope that it will be useful, | ||
| ## but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| ## GNU General Public License for more details. | ||
| ## | ||
|
|
||
| chip soc/cavium/cn81xx | ||
| device cpu_cluster 0 on end | ||
|
|
||
| device domain 0 on | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 01.0 on # PCI bridge | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 00.0 on end # MRML | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 00.1 on end # RESET | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 00.2 on end # DAP | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 00.3 on end # MDIO | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 00.4 on end # FUSE | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 01.2 on end # SGPIO | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 01.3 on end # SMI | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 01.4 on end # MMC | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 01.5 on end # KEY | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 01.6 on end # BOOT BUS | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 01.7 on end # PBUS | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 02.0 on end # XCV | ||
| end | ||
| device pci 04.0 on end | ||
|
|
||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 06.0 on end # L2C-TAD | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 07.0 on end # L2C-CBC | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 07.4 on end # L2C-MCI | ||
| end | ||
|
|
||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 08.0 on end # UUA0 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 08.1 on end # UUA1 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 08.2 on end # UUA2 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 08.3 on end # UUA3 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 08.4 on end # VRM | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 09.0 on end # I2C0 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 09.1 on end # I2C1 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 0a.0 on end # PCC Bridge | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 0b.0 on end # IOBN | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 0c.0 on end # OCLA0 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 0c.1 on end # OCLA1 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 0d.0 on end | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 0e.0 on end # PCIe0 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 0e.1 on end # PCIe1 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 0e.2 on end # PCIe2 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 10.0 on end # bgx0 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 10.1 on end # bgx1 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 11.0 on end # rgx0 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "0" | ||
| device pci 12.0 on end # MAC | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 1c.0 on end # GSER0 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 1c.1 on end # GSER1 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 1c.2 on end # GSER2 | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 1c.3 on end # GSER3 | ||
| end | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 02.0 on end #SMMU | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 03.0 on end #GIC | ||
| end | ||
| chip soc/cavium/common/pci | ||
| register "secure" = "1" | ||
| device pci 04.0 on end #GTI | ||
| end | ||
|
|
||
| device pci 05.0 on end # NIC | ||
| device pci 06.0 on end # GPIO | ||
| device pci 07.0 on end # SPI | ||
| device pci 08.0 on end # MIO | ||
| device pci 09.0 on end # PCI bridge | ||
| device pci 0a.0 on end # PCI bridge | ||
| device pci 0b.0 on end # NFC | ||
| device pci 0c.0 on end # PCI bridge | ||
| device pci 0d.0 on end # PCM | ||
| device pci 0e.0 on end # VRM | ||
| device pci 0f.0 on end # PCI bridge | ||
|
|
||
| device pci 10.0 on end # USB0 | ||
| device pci 11.0 on end # USB1 | ||
| device pci 16.0 on end # SATA0 | ||
| device pci 17.0 on end # SATA1 | ||
| end | ||
| end | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,285 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * Copyright 2017-2018 Facebook, Inc. | ||
| * Copyright 2003-2017 Cavium Inc. (support@cavium.com) | ||
| * | ||
| * This program is free software; you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation; version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * Derived from Cavium's BSD-3 Clause OCTEONTX-SDK-6.2.0. | ||
| */ | ||
|
|
||
| #include <device/device.h> | ||
| #include <libbdk-hal/bdk-config.h> | ||
| #include <libbdk-hal/bdk-twsi.h> | ||
| #include <soc/twsi.h> | ||
| #include <soc/gpio.h> | ||
| #include <delay.h> | ||
| #include <soc/uart.h> | ||
| #include <console/console.h> | ||
| #include <soc/clock.h> | ||
| #include <soc/gpio.h> | ||
| #include <soc/timer.h> | ||
| #include <soc/cpu.h> | ||
| #include <soc/sdram.h> | ||
|
|
||
| static void mainboard_print_info(void) | ||
| { | ||
| printk(BIOS_INFO, "MB: trusted boot : %s\n", | ||
| gpio_strap_value(10) ? "yes" : "no"); | ||
|
|
||
| const size_t boot_method = gpio_strap_value(0) | | ||
| (gpio_strap_value(1) << 1) | | ||
| (gpio_strap_value(2) << 2) | | ||
| (gpio_strap_value(3) << 3); | ||
|
|
||
| printk(BIOS_INFO, "MB: boot method : "); | ||
| switch (boot_method) { | ||
| case 0x2: | ||
| case 0x3: | ||
| printk(BIOS_INFO, "EMMC\n"); | ||
| break; | ||
| case 0x5: | ||
| case 0x6: | ||
| printk(BIOS_INFO, "SPI\n"); | ||
| break; | ||
| case 0x8: | ||
| printk(BIOS_INFO, "REMOTE\n"); | ||
| break; | ||
| case 0xc: | ||
| case 0xd: | ||
| printk(BIOS_INFO, "PCIe\n"); | ||
| break; | ||
| default: | ||
| printk(BIOS_INFO, "unknown\n"); | ||
| } | ||
|
|
||
| printk(BIOS_INFO, "MB: REFclk : %llu MHz\n", | ||
| thunderx_get_ref_clock() / 1000000ULL); | ||
|
|
||
| printk(BIOS_INFO, "MB: IOclk : %llu MHz\n", | ||
| thunderx_get_io_clock() / 1000000ULL); | ||
|
|
||
| printk(BIOS_INFO, "MB: COREclk : %llu MHz\n", | ||
| thunderx_get_core_clock() / 1000000ULL); | ||
|
|
||
| printk(BIOS_INFO, "MB: #CPU cores : %zu\n", | ||
| cpu_get_num_available_cores()); | ||
|
|
||
| printk(BIOS_INFO, "MB: RAM : %zu MiB\n", | ||
| sdram_size_mb()); | ||
| } | ||
|
|
||
| extern const struct bdk_devicetree_key_value devtree[]; | ||
|
|
||
| static void mainboard_init(struct device *dev) | ||
| { | ||
| size_t i; | ||
|
|
||
| /* Init UARTs */ | ||
| for (i = 0; i < 4; i++) { | ||
| if (!uart_is_enabled(i)) | ||
| uart_setup(i, 0); | ||
| } | ||
|
|
||
| /* Init timer */ | ||
| soc_timer_init(); | ||
|
|
||
| /* Init CPUs */ | ||
| for (i = 1; i < CONFIG_MAX_CPUS; i++) | ||
| start_cpu(i, NULL); | ||
| } | ||
|
|
||
| static void mainboard_enable(struct device *dev) | ||
| { | ||
| dev->ops->init = &mainboard_init; | ||
|
|
||
| bdk_config_set_fdt(devtree); | ||
|
|
||
| /* | ||
| * Adapted from Cavium's devicetree TWSI-WRITE: | ||
| * Init board-specific I2C hardware: | ||
| */ | ||
| twsi_init(0, I2C_SPEED_STANDARD); | ||
|
|
||
| /* Initialize IO expander U6 to power-up defaults */ | ||
| /* float all pins 0.0-0.7 */ | ||
| bdk_twsix_write_ia(0,0,0x21,6,1,1,0xff); | ||
| /* float all pins 1.0-1.7 */ | ||
| bdk_twsix_write_ia(0,0,0x21,7,1,1,0xff); | ||
| /* 0.x: all outputs low, but disabled */ | ||
| bdk_twsix_write_ia(0,0,0x21,2,1,1,0x00); | ||
| /* 1.x: all outputs low, but disabled */ | ||
| bdk_twsix_write_ia(0,0,0x21,3,1,1,0x00); | ||
| /* 0.x: no polarity inversion */ | ||
| bdk_twsix_write_ia(0,0,0x21,4,1,1,0x00); | ||
| /* 1.x: no polarity inversion */ | ||
| bdk_twsix_write_ia(0,0,0x21,5,1,1,0x00); | ||
| /* Initialize IO expander U89 to power-up defaults */ | ||
| /* float all pins 0.0-0.7 */ | ||
| bdk_twsix_write_ia(0,0,0x22,6,1,1,0xff); | ||
| /* float all pins 1.0-1.7 */ | ||
| bdk_twsix_write_ia(0,0,0x22,7,1,1,0xff); | ||
| /* 0.x: all outputs low, but disabled */ | ||
| bdk_twsix_write_ia(0,0,0x22,2,1,1,0x00); | ||
| /* 1.x: all outputs low, but disabled */ | ||
| bdk_twsix_write_ia(0,0,0x22,3,1,1,0x00); | ||
| /* 0.x: no polarity inversion */ | ||
| bdk_twsix_write_ia(0,0,0x22,4,1,1,0x00); | ||
| /* 1.x: no polarity inversion */ | ||
| bdk_twsix_write_ia(0,0,0x22,5,1,1,0x00); | ||
| /* set outputs SLIC_RESET_L=0 and SPI_SEL=0 */ | ||
| bdk_twsix_write_ia(0,0,0x21,6,1,1,0xee); /* 0.0 & 0.4 are outputs */ | ||
|
|
||
| /* Select channel-0 in PCA9546A to enable SFI */ | ||
| bdk_twsix_write_ia(0, 0, 0x70, 0, 1, 1, 0x7); | ||
| mdelay(10); | ||
| /* Configure I2C-GPIO expander I/O directions */ | ||
| bdk_twsix_write_ia(0, 0, 0x22, 6, 1, 1, 0x07); | ||
| mdelay(10); | ||
| /* Configure I2C-GPIO expander I/O directions */ | ||
| bdk_twsix_write_ia(0, 0, 0x22, 7, 1, 1, 0x38); | ||
| mdelay(10); | ||
| /* Turn on SFP+ Transmitters */ | ||
| bdk_twsix_write_ia(0, 0, 0x22, 2, 1, 1, 0x0); | ||
| mdelay(10); | ||
| /* Set VSC7224 to I2C mode */ | ||
| bdk_twsix_write_ia(0, 0, 0x22, 3, 1, 1, 0x0); | ||
| mdelay(10); | ||
| /* Assert VSC7224 reset*/ | ||
| bdk_twsix_write_ia(0, 0, 0x22, 2, 1, 1, 0x80); | ||
| mdelay(50); | ||
| /* Deassert VSC7224 reset*/ | ||
| bdk_twsix_write_ia(0, 0, 0x22, 2, 1, 1, 0x0); | ||
| mdelay(50); | ||
| /* Page select FSYNC0 (0x30) */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x7f, 2, 1, 0x0030); | ||
| mdelay(10); | ||
| /* Set FSYNC0 for 10.3125Gbps See Table 3 */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x80, 2, 1, 0x2841); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x81, 2, 1, 0x0008); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x82, 2, 1, 0x7a00); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x83, 2, 1, 0x000f); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x84, 2, 1, 0x9c18); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x85, 2, 1, 0x0); | ||
| mdelay(10); | ||
|
|
||
| /* All channels Rx settings set equally */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x7f, 2, 1, 0x0050); | ||
| mdelay(10); | ||
| /* Shrink EQ_BUFF */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x82, 2, 1, 0x0014); | ||
| mdelay(10); | ||
| /* Select min DFE Delay (DFE_DELAY) */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x90, 2, 1, 0x5585); | ||
| mdelay(10); | ||
| /* Set DFE 1-3 limit (DXMAX) = 32dec, AP Max limit = 127 decimal */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x92, 2, 1, 0x207f); | ||
| mdelay(10); | ||
| /* Set AP Min limit = 32 decimal */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x93, 2, 1, 0x2000); | ||
| mdelay(10); | ||
| /* Set DFE Averaging to the slowest (DFE_AVG) */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x94, 2, 1, 0x0031); | ||
| mdelay(10); | ||
| /* Set Inductor Bypass OD_IND_BYP = 0 & fastest Rise/Fall */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x9c, 2, 1, 0x0000); | ||
| mdelay(10); | ||
| /* Setting DFE Boost = none. Must set for rev C | ||
| * (if DFE in adapt mode) */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0xaa, 2, 1, 0x0888); | ||
| mdelay(10); | ||
| /* Setting EQ Min/Max = 8/72 */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0xa8, 2, 1, 0x2408); | ||
| mdelay(10); | ||
| /* Setting EQVGA = 96, when in EQVGA manual mode */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0xa9, 2, 1, 0x0060); | ||
| mdelay(10); | ||
| /* Setting SW_BFOCM, bits 15:14 to 01 */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x87, 2, 1, 0x4021); | ||
| mdelay(10); | ||
| /* Turn off adaptive input equalization and VGA adaptive algorithm | ||
| * control */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x89, 2, 1, 0x7313); | ||
| mdelay(10); | ||
| /* Turn on adaptive input equalization and VGA adaptive algorithm | ||
| * control */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x89, 2, 1, 0x7f13); | ||
| mdelay(10); | ||
|
|
||
| /* TAP settings for each channel 0-3 */ | ||
| /* Ch-0 Tx */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x7f, 2, 1, 0x0000); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x99, 2, 1, 0x001f); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x9a, 2, 1, 0x000f); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x9b, 2, 1, 0x0004); | ||
| mdelay(10); | ||
|
|
||
| /* Ch-1 Rx */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x7f, 2, 1, 0x0001); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x97, 2, 1, 0x1400); | ||
| mdelay(10); | ||
| /* Transmitter Output polarity Inverted (Unfortunately, | ||
| * Rx polarity lines are wrongly inverted on board */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x97, 2, 1, 0x4000); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x99, 2, 1, 0x000f); | ||
| mdelay(10); | ||
|
|
||
| /* Ch-2 Tx */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x7f, 2, 1, 0x0002); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x99, 2, 1, 0x001f); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x9a, 2, 1, 0x000f); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x9b, 2, 1, 0x0004); | ||
| mdelay(10); | ||
|
|
||
| /* Ch-3 Rx */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x7f, 2, 1, 0x0003); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x97, 2, 1, 0x1400); | ||
| mdelay(10); | ||
| /* Transmitter Output polarity Inverted (Unfortunately, | ||
| * Rx polarity lines are wrongly inverted on board */ | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x97, 2, 1, 0x4000); | ||
| mdelay(10); | ||
| bdk_twsix_write_ia(0, 0, 0x14, 0x99, 2, 1, 0x000f); | ||
| mdelay(10); | ||
|
|
||
| /** | ||
| * The following hardware magically starts working after toggling | ||
| * GPIO_10_PHY_RESET_L: | ||
| * * SATA PHY | ||
| * * GBE PHY | ||
| * * XFI PHY | ||
| * * MMC | ||
| */ | ||
| gpio_output(10, 0); | ||
| udelay(100); | ||
| gpio_output(10, 1); | ||
|
|
||
| mainboard_print_info(); | ||
| } | ||
|
|
||
| struct chip_operations mainboard_ops = { | ||
| .name = CONFIG_MAINBOARD_PART_NUMBER, | ||
| .enable_dev = mainboard_enable, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| #include <soc/memlayout.ld> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,282 @@ | ||
| /* | ||
| * Cavium Thunder DTS file - Thunder board description | ||
| * | ||
| * Copyright (C) 2016, Cavium Inc. | ||
| * | ||
| * This file is dual-licensed: you can use it either under the terms | ||
| * of the GPL or the X11 license, at your option. Note that this dual | ||
| * licensing only applies to this file, and not this project as a | ||
| * whole. | ||
| * | ||
| * a) This program is free software; you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation; version 2 of the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * Or, alternatively, | ||
| * | ||
| * b) Permission is hereby granted, free of charge, to any person | ||
| * obtaining a copy of this software and associated documentation | ||
| * files (the "Software"), to deal in the Software without | ||
| * restriction, including without limitation the rights to use, | ||
| * copy, modify, merge, publish, distribute, sublicense, and/or | ||
| * sell copies of the Software, and to permit persons to whom the | ||
| * Software is furnished to do so, subject to the following | ||
| * conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be | ||
| * included in all copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
| * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
| * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| * OTHER DEALINGS IN THE SOFTWARE. | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
|
|
||
| /include/ "cn81xx-linux.dtsi" | ||
|
|
||
| &mrml_bridge { | ||
| mdio-nexus@1,3 { | ||
| mdio0@87e005003800 { | ||
| rgmii00: rgmii00 { | ||
| reg = <0> ; | ||
| compatible = "marvell,88e1510", "ethernet-phy-ieee802.3-c22"; | ||
| }; | ||
|
|
||
| qsgmii00: qsgmii00 { | ||
| qlm-mode = "0x000,qsgmii"; | ||
| reg = <0x10> ; | ||
| compatible = "vitesse,vsc8574", "ethernet-phy-ieee802.3-c22"; | ||
| }; | ||
| qsgmii01: qsgmii01 { | ||
| qlm-mode = "0x001,qsgmii"; | ||
| reg = <0x11> ; | ||
| compatible = "vitesse,vsc8574", "ethernet-phy-ieee802.3-c22"; | ||
| }; | ||
| qsgmii02: qsgmii02 { | ||
| qlm-mode = "0x002,qsgmii"; | ||
| reg = <0x12> ; | ||
| compatible = "vitesse,vsc8574", "ethernet-phy-ieee802.3-c22"; | ||
| }; | ||
| qsgmii03: qsgmii03 { | ||
| qlm-mode = "0x003,qsgmii"; | ||
| reg = <0x13> ; | ||
| compatible = "vitesse,vsc8574", "ethernet-phy-ieee802.3-c22"; | ||
| }; | ||
| }; | ||
| mdio1@87e005003880 { | ||
| xfi00: xfi00 { | ||
| qlm-mode = "0x000,xfi"; | ||
| reg = <0x0>; | ||
| compatible = "aquantia,aqr105", "ethernet-phy-ieee802.3-c45"; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| rgx0 { | ||
| rgmii00 { | ||
| reg = <0>; | ||
| local-mac-address = [00 00 00 00 00 00]; | ||
| phy-handle = <&rgmii00>; | ||
| }; | ||
| }; | ||
|
|
||
| bgx0 { | ||
| /* typename+qlm+typenumber eg : | ||
| qsgmii+bgx0+sgmmi0 | ||
| */ | ||
| qsgmii00 { | ||
| reg = <0>; | ||
| qlm-mode = "0x000,qsgmii"; | ||
| local-mac-address = [00 00 00 00 00 00]; | ||
| phy-handle = <&qsgmii00>; | ||
| }; | ||
| qsgmii01 { | ||
| reg = <1>; | ||
| qlm-mode = "0x001,qsgmii"; | ||
| local-mac-address = [00 00 00 00 00 00]; | ||
| phy-handle = <&qsgmii01>; | ||
| }; | ||
| qsgmii02 { | ||
| reg = <2>; | ||
| qlm-mode = "0x002,qsgmii"; | ||
| local-mac-address = [00 00 00 00 00 00]; | ||
| phy-handle = <&qsgmii02>; | ||
| }; | ||
| qsgmii03 { | ||
| reg = <3>; | ||
| qlm-mode = "0x003,qsgmii"; | ||
| local-mac-address = [00 00 00 00 00 00]; | ||
| phy-handle = <&qsgmii03>; | ||
| }; | ||
|
|
||
| xfi00 { | ||
| reg = <0>; | ||
| qlm-mode = "0x000,xfi"; | ||
| local-mac-address = [00 00 00 00 00 00]; | ||
| phy-handle = <&xfi00>; | ||
| }; | ||
| }; | ||
|
|
||
| bgx1 { | ||
| xfi10 { | ||
| reg = <0>; | ||
| qlm-mode = "0x010,xfi"; | ||
| local-mac-address = [00 00 00 00 00 00]; | ||
| }; | ||
|
|
||
| xfi11 { | ||
| reg = <1>; | ||
| qlm-mode = "0x011,xfi"; | ||
| local-mac-address = [00 00 00 00 00 00]; | ||
| }; | ||
| }; | ||
|
|
||
|
|
||
| }; | ||
|
|
||
| &mmc_1_4 { | ||
| /* NOTE: the BDK is responsible for swapping the two slots. | ||
| * Unfortunately there does not appear to be any way to read the | ||
| * position of SW2-7 in software. | ||
| */ | ||
| mmc-slot@0 { | ||
| compatible = "mmc-slot"; | ||
| reg = <0>; | ||
| vmmc-supply = <&mmc_supply_3v3>; | ||
| max-frequency = <26000000>; | ||
| /* 1.8v is not supported */ | ||
| no-1-8-v; | ||
| /* Bus width is only 4 bits maximum */ | ||
| bus-width = <4>; | ||
| /* No write-protect switch is present */ | ||
| disable-wp; | ||
| /* There is no card detection available; polling must be used. */ | ||
| broken-cd; | ||
| /* High-speed mode is supported */ | ||
| cap-sd-highspeed; | ||
| /* speed up device probing */ | ||
| no-sdio; | ||
| no-mmc; | ||
| }; | ||
| mmc-slot@1 { | ||
| compatible = "mmc-slot"; | ||
| reg = <1>; | ||
| vmmc-supply = <&mmc_supply_3v3>; | ||
| max-frequency = <26000000>; | ||
| mmc-ddr-3_3v; | ||
| /* 1.8v is not supported */ | ||
| no-1-8-v; | ||
| /* Bus width is only 8 bits maximum */ | ||
| bus-width = <8>; | ||
| /* No write-protect switch is present */ | ||
| disable-wp; | ||
| /* There is no card detection available; polling must be used. */ | ||
| broken-cd; | ||
| /* High-speed mode is supported */ | ||
| cap-mmc-highspeed; | ||
| /* eMMC device is soldered onto the board */ | ||
| non-removable; | ||
| /* speed up device probing */ | ||
| no-sdio; | ||
| no-sd; | ||
| }; | ||
| }; | ||
|
|
||
| &i2c_9_0 { | ||
| /* another pca9535 at 0x20 is only visible via jtag */ | ||
| gpio1: gpio-i2c@21 { | ||
| compatible = "nxp,pca9535"; | ||
| gpio-controller; | ||
| reg = <0x21>; | ||
| gpio_base = <48>; | ||
| pins = <48 16>; | ||
| ngpios = <16>; // standard | ||
| n_gpios = <16>; // deprecated, driver required | ||
| #gpio-cells = <2>; | ||
| }; | ||
|
|
||
| gpio2: gpio-i2c@22 { | ||
| compatible = "nxp,pca9535"; | ||
| gpio-controller; | ||
| reg = <0x22>; | ||
| gpio_base = <64>; | ||
| pins = <64 16>; | ||
| ngpios = <16>; // standard | ||
| n_gpios = <16>; // deprecated, driver required | ||
| #gpio-cells = <2>; | ||
| }; | ||
|
|
||
| mux@70 { | ||
| compatible = "nxp,pca9546"; | ||
| reg = <0x70>; | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| i2c@0 { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| reg = <0>; | ||
| }; | ||
|
|
||
| i2c@1 { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| reg = <1>; | ||
| }; | ||
|
|
||
| i2c@2 { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| reg = <2>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &i2c_9_1 { | ||
| rom@54 { | ||
| compatible = "atmel,24c256"; | ||
| reg = <0x54>; | ||
| pagesize = <64>; | ||
| }; | ||
|
|
||
| rtc@68 { | ||
| compatible = "isil,isl12057"; | ||
| reg = <0x68>; | ||
| }; | ||
| }; | ||
|
|
||
| &spi_7_0 { | ||
| flash@0 { | ||
| compatible = "micron,n25q128a13", "spi-flash", "jedec,spi-nor"; | ||
| reg = <0x0>; | ||
| spi-max-frequency = <16000000>; | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
| }; | ||
| flash@1 { | ||
| compatible = "spinand,mt29f", "mt29f"; | ||
| reg = <0x1>; | ||
| spi-max-frequency = <50000000>; | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
| nand-ecc-mode = "none"; | ||
| }; | ||
| }; | ||
|
|
||
| &nfc { | ||
| nand@1 { | ||
| reg = <0x1>; | ||
| nand-ecc-mode = "none"; | ||
| }; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ | |
|
|
||
| #include "memory.c" | ||
|
|
||
| void *asmlinkage romstage_main(unsigned long bist) | ||
| { | ||
| int cbmem_was_initted; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,19 @@ | ||
| comment "Glados" | ||
|
|
||
| config BOARD_GOOGLE_CHELL | ||
| bool "-> Chell (HP Chromebook 13 G1)" | ||
| select BOARD_GOOGLE_BASEBOARD_GLADOS | ||
| select NHLT_SSM4567 if INCLUDE_NHLT_BLOBS | ||
|
|
||
| config BOARD_GOOGLE_GLADOS | ||
| bool "-> Glados Skylake Reference Board" | ||
| select BOARD_GOOGLE_BASEBOARD_GLADOS | ||
| select NHLT_DMIC_4CH if INCLUDE_NHLT_BLOBS | ||
| select NHLT_SSM4567 if INCLUDE_NHLT_BLOBS | ||
|
|
||
| config BOARD_GOOGLE_LARS | ||
| bool "-> Lars (Acer Chromebook 14 for Work (CP5-471))" | ||
| select BOARD_GOOGLE_BASEBOARD_GLADOS | ||
| select DRIVERS_GENERIC_MAX98357A | ||
| select EXCLUDE_NATIVE_SD_INTERFACE | ||
| select NHLT_MAX98357 if INCLUDE_NHLT_BLOBS |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /* | ||
| * This file is part of the coreboot project. | ||
| * | ||
| * This program is free software; you can redistribute it and/or | ||
| * modify it under the terms of the GNU General Public License as | ||
| * published by the Free Software Foundation; version 2 of | ||
| * the License. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| */ | ||
|
|
||
| #ifndef GLADOS_VARIANT_H | ||
| #define GLADOS_VARIANT_H | ||
|
|
||
| int is_dual_channel(const int spd_index); | ||
| void mainboard_gpio_smi_sleep(void); | ||
|
|
||
| #endif /* GLADOS_VARIANT_H */ |