Evgeny Zinoviev has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32604
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466)
This is WIP.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 17 files changed, 843 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/1
diff --git a/src/mainboard/apple/macbookair5_2/Kconfig b/src/mainboard/apple/macbookair5_2/Kconfig new file mode 100644 index 0000000..853021f --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/Kconfig @@ -0,0 +1,55 @@ +if BOARD_APPLE_MACBOOKAIR5_2 + +config BOARD_SPECIFIC_OPTIONS + def_bool y + select BOARD_ROMSIZE_KB_8192 + select EC_ACPI + select HAVE_ACPI_RESUME + select HAVE_ACPI_TABLES + select INTEL_INT15 + select NORTHBRIDGE_INTEL_IVYBRIDGE + select SERIRQ_CONTINUOUS_MODE + select SOUTHBRIDGE_INTEL_C216 + select SYSTEM_TYPE_LAPTOP + select USE_NATIVE_RAMINIT + select MAINBOARD_HAS_LIBGFXINIT + select GFX_GMA_INTERNAL_IS_LVDS + select SERIRQ_CONTINUOUS_MODE + +config MAINBOARD_DIR + string + default apple/macbookair5_2 + +config MAINBOARD_PART_NUMBER + string + default "MacBookAir5,2" + +config VGA_BIOS_FILE + string + default "pci8086,0166.rom" + +config VGA_BIOS_ID + string + default "8086,0166" + +config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID + hex + default 0x7270 + +config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID + hex + default 0x8086 + +config DRAM_RESET_GATE_GPIO # FIXME: check this + int + default 60 + +config MAX_CPUS + int + default 8 + +config MAINBOARD_SMBIOS_MANUFACTURER + string + default "Apple Inc." + +endif diff --git a/src/mainboard/apple/macbookair5_2/Kconfig.name b/src/mainboard/apple/macbookair5_2/Kconfig.name new file mode 100644 index 0000000..d8a1fbf --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/Kconfig.name @@ -0,0 +1,2 @@ +config BOARD_APPLE_MACBOOKAIR5_2 + bool "MacBookAir5,2" diff --git a/src/mainboard/apple/macbookair5_2/Makefile.inc b/src/mainboard/apple/macbookair5_2/Makefile.inc new file mode 100644 index 0000000..fd60338 --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/Makefile.inc @@ -0,0 +1,7 @@ +romstage-y += gpio.c + +cbfs-files-y += spd.bin +spd.bin-file := spd.bin +spd.bin-type := spd + +ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads diff --git a/src/mainboard/apple/macbookair5_2/acpi/ec.asl b/src/mainboard/apple/macbookair5_2/acpi/ec.asl new file mode 100644 index 0000000..f70cb3d --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/acpi/ec.asl @@ -0,0 +1,20 @@ +/* + * 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. + */ + +Device(EC) +{ + Name (_HID, EISAID("PNP0C09")) + Name (_UID, 0) + Name (_GPE, 23) +/* FIXME: EC support */ +} diff --git a/src/mainboard/apple/macbookair5_2/acpi/platform.asl b/src/mainboard/apple/macbookair5_2/acpi/platform.asl new file mode 100644 index 0000000..a17c6ea --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/acpi/platform.asl @@ -0,0 +1,23 @@ +/* + * 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. + */ + +Method(_WAK,1) +{ + /* FIXME: EC support */ + Return(Package(){0,0}) +} + +Method(_PTS,1) +{ + /* FIXME: EC support */ +} diff --git a/src/mainboard/apple/macbookair5_2/acpi/superio.asl b/src/mainboard/apple/macbookair5_2/acpi/superio.asl new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/acpi/superio.asl diff --git a/src/mainboard/apple/macbookair5_2/acpi_tables.c b/src/mainboard/apple/macbookair5_2/acpi_tables.c new file mode 100644 index 0000000..c48f0bd --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/acpi_tables.c @@ -0,0 +1,33 @@ +/* + * 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. + */ + +#include <southbridge/intel/bd82x6x/nvs.h> + +/* FIXME: check this function. */ +void acpi_create_gnvs(global_nvs_t *gnvs) +{ + /* Disable USB ports in S3 by default */ + gnvs->s3u0 = 0; + gnvs->s3u1 = 0; + + /* Disable USB ports in S5 by default */ + gnvs->s5u0 = 0; + gnvs->s5u1 = 0; + + // the lid is open by default. + gnvs->lids = 1; + + gnvs->tcrt = 100; + gnvs->tpsv = 90; +} diff --git a/src/mainboard/apple/macbookair5_2/board_info.txt b/src/mainboard/apple/macbookair5_2/board_info.txt new file mode 100644 index 0000000..cbd72ee --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/board_info.txt @@ -0,0 +1,6 @@ +Category: laptop +ROM protocol: SPI +Flashrom support: n +ROM package: WSON-8 +ROM socketed: n +Release year: 2012 diff --git a/src/mainboard/apple/macbookair5_2/devicetree.cb b/src/mainboard/apple/macbookair5_2/devicetree.cb new file mode 100644 index 0000000..efc5ddb --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/devicetree.cb @@ -0,0 +1,119 @@ +chip northbridge/intel/sandybridge # FIXME: check gfx.ndid and gfx.did + register "gfx.did" = "{ 0x80000410, 0x80000320, 0x80000410, 0x80000410, 0x00000005 }" + #register "gfx.did" = "{ 0x80000100, 0x80000240, 0x80000410 }" + register "gfx.link_frequency_270_mhz" = "0" + register "gfx.ndid" = "2" + register "gfx.use_spread_spectrum_clock" = "1" + register "gpu_cpu_backlight" = "0x00000710" + register "gpu_dp_b_hotplug" = "4" + register "gpu_dp_c_hotplug" = "4" + register "gpu_dp_d_hotplug" = "4" + register "gpu_panel_port_select" = "1" + register "gpu_panel_power_backlight_off_delay" = "2000" + register "gpu_panel_power_backlight_on_delay" = "10" + register "gpu_panel_power_cycle_delay" = "6" + register "gpu_panel_power_down_delay" = "740" + register "gpu_panel_power_up_delay" = "2000" + register "gpu_pch_backlight" = "0x07100710" + device cpu_cluster 0x0 on + chip cpu/intel/model_206ax # FIXME: check all registers + register "c1_acpower" = "1" + register "c1_battery" = "1" + register "c2_acpower" = "3" + register "c2_battery" = "3" + register "c3_acpower" = "5" + register "c3_battery" = "5" + device lapic 0x0 on end + device lapic 0xacac off end + end + end + + register "pci_mmio_size" = "2048" + + device domain 0x0 on + chip southbridge/intel/bd82x6x # Intel Series 6 Cougar Point PCH + register "c2_latency" = "0x0065" + register "docking_supported" = "0" + register "gen1_dec" = "0x000c0681" + register "gen2_dec" = "0x000c1641" + register "gen3_dec" = "0x001c0301" + register "gen4_dec" = "0x00fc0701" + register "gpi7_routing" = "2" + register "p_cnt_throttling_supported" = "1" + register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }" + register "pcie_port_coalesce" = "1" + register "sata_interface_speed_support" = "0x3" + register "sata_port_map" = "0x1" + register "spi_lvscc" = "0x0" + register "spi_uvscc" = "0x2005" + register "superspeed_capable_ports" = "0x0000000f" + register "xhci_overcurrent_mapping" = "0x08040201" + register "xhci_switchable_ports" = "0x0000000f" + device pci 14.0 on # USB 3.0 Controller + subsystemid 0x8086 0x7270 + end + device pci 16.0 on # Management Engine Interface 1 + subsystemid 0x8086 0x7270 + end + device pci 16.1 off # Management Engine Interface 2 + end + device pci 16.2 off # Management Engine IDE-R + end + device pci 16.3 off # Management Engine KT + end + device pci 19.0 off # Intel Gigabit Ethernet + end + device pci 1a.0 on # USB2 EHCI #2 + subsystemid 0x8086 0x7270 + end + device pci 1b.0 on # High Definition Audio Audio controller + subsystemid 0x8086 0x7270 + end + device pci 1c.0 on # PCIe Port #1 + subsystemid 0x8086 0x7270 + end + device pci 1c.1 on # PCIe Port #2 + subsystemid 0x8086 0x7270 + end + device pci 1c.2 off # PCIe Port #3 + end + device pci 1c.3 off # PCIe Port #4 + end + device pci 1c.4 on # PCIe Port #5 + subsystemid 0x8086 0x7270 + end + device pci 1c.5 off # PCIe Port #6 + end + device pci 1c.6 off # PCIe Port #7 + end + device pci 1c.7 off # PCIe Port #8 + end + device pci 1d.0 on # USB2 EHCI #1 + subsystemid 0x8086 0x7270 + end + device pci 1e.0 off # PCI bridge + end + device pci 1f.0 on # LPC bridge PCI-LPC bridge + subsystemid 0x8086 0x7270 + end + device pci 1f.2 on # SATA Controller 1 + subsystemid 0x8086 0x7270 + end + device pci 1f.3 on # SMBus + subsystemid 0x8086 0x7270 + end + device pci 1f.5 off # SATA Controller 2 + end + device pci 1f.6 off # Thermal + end + end + device pci 00.0 on # Host bridge Host bridge + subsystemid 0x106b 0x00fe + end + device pci 01.0 off # PCIe Bridge for discrete graphics + end + device pci 02.0 on # Internal graphics VGA controller + subsystemid 0x106b 0x00fe + end + end +end diff --git a/src/mainboard/apple/macbookair5_2/dsdt.asl b/src/mainboard/apple/macbookair5_2/dsdt.asl new file mode 100644 index 0000000..455ac17 --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/dsdt.asl @@ -0,0 +1,42 @@ +/* + * 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. + */ + +#define BRIGHTNESS_UP _SB.PCI0.GFX0.INCB +#define BRIGHTNESS_DOWN _SB.PCI0.GFX0.DECB +#define ACPI_VIDEO_DEVICE _SB.PCI0.GFX0 + +#include <arch/acpi.h> +DefinitionBlock( + "dsdt.aml", + "DSDT", + 0x02, // DSDT revision: ACPI 2.0 and up + OEM_ID, + ACPI_TABLE_CREATOR, + 0x20141018 // OEM revision +) +{ + /* Some generic macros */ + #include "acpi/platform.asl" + #include <cpu/intel/common/acpi/cpu.asl> + #include <southbridge/intel/bd82x6x/acpi/platform.asl> + /* global NVS and variables. */ + #include <southbridge/intel/bd82x6x/acpi/globalnvs.asl> + #include <southbridge/intel/bd82x6x/acpi/sleepstates.asl> + + Device (_SB.PCI0) + { + #include <northbridge/intel/sandybridge/acpi/sandybridge.asl> + #include <drivers/intel/gma/acpi/default_brightness_levels.asl> + #include <southbridge/intel/bd82x6x/acpi/pch.asl> + } +} diff --git a/src/mainboard/apple/macbookair5_2/gma-mainboard.ads b/src/mainboard/apple/macbookair5_2/gma-mainboard.ads new file mode 100644 index 0000000..d4a5d7d --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/gma-mainboard.ads @@ -0,0 +1,34 @@ +-- +-- 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; 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. +-- + +with HW.GFX.GMA; +with HW.GFX.GMA.Display_Probing; + +use HW.GFX.GMA; +use HW.GFX.GMA.Display_Probing; + +private package GMA.Mainboard is + + ports : constant Port_List := + (DP1, + DP2, + DP3, + HDMI1, + HDMI2, + HDMI3, + Analog, + Internal, + others => Disabled); + +end GMA.Mainboard; diff --git a/src/mainboard/apple/macbookair5_2/gnvs.c b/src/mainboard/apple/macbookair5_2/gnvs.c new file mode 100644 index 0000000..def9e5f --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/gnvs.c @@ -0,0 +1,31 @@ +/* + * 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. + */ + +#include <southbridge/intel/bd82x6x/nvs.h> + +void acpi_create_gnvs(global_nvs_t *gnvs) +{ + /* Disable USB ports in S3 by default */ + gnvs->s3u0 = 0; + gnvs->s3u1 = 0; + + /* Disable USB ports in S5 by default */ + gnvs->s5u0 = 0; + gnvs->s5u1 = 0; + + /* the lid is open by default. */ + gnvs->lids = 1; + + gnvs->tcrt = 100; + gnvs->tpsv = 90; +} diff --git a/src/mainboard/apple/macbookair5_2/gpio.c b/src/mainboard/apple/macbookair5_2/gpio.c new file mode 100644 index 0000000..9f2cd14 --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/gpio.c @@ -0,0 +1,242 @@ +/* + * 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. + */ + +#include <southbridge/intel/common/gpio.h> + +static const struct pch_gpio_set1 pch_gpio_set1_mode = { + .gpio0 = GPIO_MODE_GPIO, + .gpio1 = GPIO_MODE_GPIO, + .gpio2 = GPIO_MODE_GPIO, + .gpio3 = GPIO_MODE_GPIO, + .gpio4 = GPIO_MODE_GPIO, + .gpio5 = GPIO_MODE_GPIO, + .gpio6 = GPIO_MODE_GPIO, + .gpio7 = GPIO_MODE_GPIO, + .gpio8 = GPIO_MODE_GPIO, + .gpio9 = GPIO_MODE_NATIVE, + .gpio10 = GPIO_MODE_GPIO, + .gpio11 = GPIO_MODE_GPIO, + .gpio12 = GPIO_MODE_GPIO, + .gpio13 = GPIO_MODE_GPIO, + .gpio14 = GPIO_MODE_GPIO, + .gpio15 = GPIO_MODE_GPIO, + .gpio16 = GPIO_MODE_GPIO, + .gpio17 = GPIO_MODE_GPIO, + .gpio18 = GPIO_MODE_NATIVE, + .gpio19 = GPIO_MODE_GPIO, + .gpio20 = GPIO_MODE_NATIVE, + .gpio21 = GPIO_MODE_GPIO, + .gpio22 = GPIO_MODE_GPIO, + .gpio23 = GPIO_MODE_GPIO, + .gpio24 = GPIO_MODE_GPIO, + .gpio25 = GPIO_MODE_NATIVE, + .gpio26 = GPIO_MODE_GPIO, + .gpio27 = GPIO_MODE_GPIO, + .gpio28 = GPIO_MODE_GPIO, + .gpio29 = GPIO_MODE_GPIO, + .gpio30 = GPIO_MODE_NATIVE, + .gpio31 = GPIO_MODE_NATIVE, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_direction = { + .gpio0 = GPIO_DIR_INPUT, + .gpio1 = GPIO_DIR_INPUT, + .gpio2 = GPIO_DIR_INPUT, + .gpio3 = GPIO_DIR_INPUT, + .gpio4 = GPIO_DIR_INPUT, + .gpio5 = GPIO_DIR_INPUT, + .gpio6 = GPIO_DIR_INPUT, + .gpio7 = GPIO_DIR_INPUT, + .gpio8 = GPIO_DIR_OUTPUT, + .gpio10 = GPIO_DIR_INPUT, + .gpio11 = GPIO_DIR_INPUT, + .gpio12 = GPIO_DIR_OUTPUT, + .gpio13 = GPIO_DIR_INPUT, + .gpio14 = GPIO_DIR_INPUT, + .gpio15 = GPIO_DIR_OUTPUT, + .gpio16 = GPIO_DIR_OUTPUT, + .gpio17 = GPIO_DIR_INPUT, + .gpio19 = GPIO_DIR_OUTPUT, + .gpio21 = GPIO_DIR_OUTPUT, + .gpio22 = GPIO_DIR_OUTPUT, + .gpio23 = GPIO_DIR_OUTPUT, + .gpio24 = GPIO_DIR_OUTPUT, + .gpio26 = GPIO_DIR_INPUT, + .gpio27 = GPIO_DIR_INPUT, + .gpio28 = GPIO_DIR_OUTPUT, + .gpio29 = GPIO_DIR_INPUT, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_level = { + .gpio8 = GPIO_LEVEL_HIGH, + .gpio12 = GPIO_LEVEL_LOW, + .gpio15 = GPIO_LEVEL_HIGH, + .gpio16 = GPIO_LEVEL_LOW, + .gpio19 = GPIO_LEVEL_HIGH, + .gpio21 = GPIO_LEVEL_LOW, + .gpio22 = GPIO_LEVEL_LOW, + .gpio23 = GPIO_LEVEL_HIGH, + .gpio24 = GPIO_LEVEL_LOW, + .gpio28 = GPIO_LEVEL_HIGH, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_reset = { + .gpio11 = GPIO_RESET_RSMRST, + .gpio15 = GPIO_RESET_RSMRST, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_invert = { + .gpio1 = GPIO_INVERT, + .gpio2 = GPIO_INVERT, + .gpio4 = GPIO_INVERT, + .gpio5 = GPIO_INVERT, + .gpio7 = GPIO_INVERT, +}; + +static const struct pch_gpio_set1 pch_gpio_set1_blink = { +}; + +static const struct pch_gpio_set2 pch_gpio_set2_mode = { + .gpio32 = GPIO_MODE_NATIVE, + .gpio33 = GPIO_MODE_GPIO, + .gpio34 = GPIO_MODE_GPIO, + .gpio35 = GPIO_MODE_GPIO, + .gpio36 = GPIO_MODE_GPIO, + .gpio37 = GPIO_MODE_GPIO, + .gpio38 = GPIO_MODE_GPIO, + .gpio39 = GPIO_MODE_GPIO, + .gpio40 = GPIO_MODE_NATIVE, + .gpio41 = GPIO_MODE_NATIVE, + .gpio42 = GPIO_MODE_NATIVE, + .gpio43 = GPIO_MODE_NATIVE, + .gpio44 = GPIO_MODE_NATIVE, + .gpio45 = GPIO_MODE_NATIVE, + .gpio46 = GPIO_MODE_NATIVE, + .gpio47 = GPIO_MODE_GPIO, + .gpio48 = GPIO_MODE_GPIO, + .gpio49 = GPIO_MODE_GPIO, + .gpio50 = GPIO_MODE_GPIO, + .gpio51 = GPIO_MODE_GPIO, + .gpio52 = GPIO_MODE_GPIO, + .gpio53 = GPIO_MODE_GPIO, + .gpio54 = GPIO_MODE_GPIO, + .gpio55 = GPIO_MODE_GPIO, + .gpio56 = GPIO_MODE_GPIO, + .gpio57 = GPIO_MODE_GPIO, + .gpio58 = GPIO_MODE_NATIVE, + .gpio59 = GPIO_MODE_NATIVE, + .gpio60 = GPIO_MODE_GPIO, + .gpio61 = GPIO_MODE_NATIVE, + .gpio62 = GPIO_MODE_NATIVE, + .gpio63 = GPIO_MODE_NATIVE, +}; + +static const struct pch_gpio_set2 pch_gpio_set2_direction = { + .gpio33 = GPIO_DIR_INPUT, + .gpio34 = GPIO_DIR_OUTPUT, + .gpio35 = GPIO_DIR_OUTPUT, + .gpio36 = GPIO_DIR_OUTPUT, + .gpio37 = GPIO_DIR_INPUT, + .gpio38 = GPIO_DIR_INPUT, + .gpio39 = GPIO_DIR_INPUT, + .gpio47 = GPIO_DIR_INPUT, + .gpio48 = GPIO_DIR_OUTPUT, + .gpio49 = GPIO_DIR_OUTPUT, + .gpio50 = GPIO_DIR_INPUT, + .gpio51 = GPIO_DIR_OUTPUT, + .gpio52 = GPIO_DIR_OUTPUT, + .gpio53 = GPIO_DIR_OUTPUT, + .gpio54 = GPIO_DIR_OUTPUT, + .gpio55 = GPIO_DIR_OUTPUT, + .gpio56 = GPIO_DIR_INPUT, + .gpio57 = GPIO_DIR_INPUT, + .gpio60 = GPIO_DIR_INPUT, +}; + +static const struct pch_gpio_set2 pch_gpio_set2_level = { + .gpio34 = GPIO_LEVEL_HIGH, + .gpio35 = GPIO_LEVEL_LOW, + .gpio36 = GPIO_LEVEL_LOW, + .gpio48 = GPIO_LEVEL_HIGH, + .gpio49 = GPIO_LEVEL_LOW, + .gpio51 = GPIO_LEVEL_HIGH, + .gpio52 = GPIO_LEVEL_LOW, + .gpio53 = GPIO_LEVEL_HIGH, + .gpio54 = GPIO_LEVEL_LOW, + .gpio55 = GPIO_LEVEL_HIGH, +}; + +static const struct pch_gpio_set2 pch_gpio_set2_reset = { +}; + +static const struct pch_gpio_set3 pch_gpio_set3_mode = { + .gpio64 = GPIO_MODE_GPIO, + .gpio65 = GPIO_MODE_GPIO, + .gpio66 = GPIO_MODE_GPIO, + .gpio67 = GPIO_MODE_GPIO, + .gpio68 = GPIO_MODE_GPIO, + .gpio69 = GPIO_MODE_GPIO, + .gpio70 = GPIO_MODE_GPIO, + .gpio71 = GPIO_MODE_GPIO, + .gpio72 = GPIO_MODE_NATIVE, + .gpio73 = GPIO_MODE_NATIVE, + .gpio74 = GPIO_MODE_GPIO, + .gpio75 = GPIO_MODE_NATIVE, +}; + +static const struct pch_gpio_set3 pch_gpio_set3_direction = { + .gpio64 = GPIO_DIR_OUTPUT, + .gpio65 = GPIO_DIR_OUTPUT, + .gpio66 = GPIO_DIR_OUTPUT, + .gpio67 = GPIO_DIR_OUTPUT, + .gpio68 = GPIO_DIR_INPUT, + .gpio69 = GPIO_DIR_INPUT, + .gpio70 = GPIO_DIR_INPUT, + .gpio71 = GPIO_DIR_INPUT, + .gpio74 = GPIO_DIR_OUTPUT, +}; + +static const struct pch_gpio_set3 pch_gpio_set3_level = { + .gpio64 = GPIO_LEVEL_LOW, + .gpio65 = GPIO_LEVEL_LOW, + .gpio66 = GPIO_LEVEL_LOW, + .gpio67 = GPIO_LEVEL_LOW, + .gpio74 = GPIO_LEVEL_HIGH, +}; + +static const struct pch_gpio_set3 pch_gpio_set3_reset = { +}; + +const struct pch_gpio_map mainboard_gpio_map = { + .set1 = { + .mode = &pch_gpio_set1_mode, + .direction = &pch_gpio_set1_direction, + .level = &pch_gpio_set1_level, + .blink = &pch_gpio_set1_blink, + .invert = &pch_gpio_set1_invert, + .reset = &pch_gpio_set1_reset, + }, + .set2 = { + .mode = &pch_gpio_set2_mode, + .direction = &pch_gpio_set2_direction, + .level = &pch_gpio_set2_level, + .reset = &pch_gpio_set2_reset, + }, + .set3 = { + .mode = &pch_gpio_set3_mode, + .direction = &pch_gpio_set3_direction, + .level = &pch_gpio_set3_level, + .reset = &pch_gpio_set3_reset, + }, +}; diff --git a/src/mainboard/apple/macbookair5_2/hda_verb.c b/src/mainboard/apple/macbookair5_2/hda_verb.c new file mode 100644 index 0000000..6c8e555 --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/hda_verb.c @@ -0,0 +1,76 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2008-2009 coresystems GmbH + * Copyright (C) 2014 Vladimir Serbinenko + * + * 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 <device/azalia_device.h> + +const u32 cim_verb_data[] = { + 0x10134206, /* Codec Vendor / Device ID: Cirrus */ + 0x106b5600, /* Subsystem ID */ + + 0x0000000b, /* Number of 4 dword sets */ + /* NID 0x01: Subsystem ID. */ + AZALIA_SUBVENDOR(0x0, 0x106b5600), + + /* NID 0x09. */ + AZALIA_PIN_CFG(0x0, 0x09, 0x0e2b4030), + + /* NID 0x0a. */ + AZALIA_PIN_CFG(0x0, 0x0a, 0x400000f0), + + /* NID 0x0b. */ + AZALIA_PIN_CFG(0x0, 0x0b, 0x90100120), + + /* NID 0x0c. */ + AZALIA_PIN_CFG(0x0, 0x0c, 0x400000f0), + + /* NID 0x0d. */ + AZALIA_PIN_CFG(0x0, 0x0d, 0x90a00110), + + /* NID 0x0e. */ + AZALIA_PIN_CFG(0x0, 0x0e, 0x400000f0), + + /* NID 0x0f. */ + AZALIA_PIN_CFG(0x0, 0x0f, 0x400000f0), + + /* NID 0x10. */ + AZALIA_PIN_CFG(0x0, 0x10, 0x400000f0), + + /* NID 0x12. */ + AZALIA_PIN_CFG(0x0, 0x12, 0x400000f0), + + /* NID 0x15. */ + AZALIA_PIN_CFG(0x0, 0x15, 0x400000f0), + 0x80862806, /* Codec Vendor / Device ID: Intel */ + 0x80860101, /* Subsystem ID */ + + 0x00000004, /* Number of 4 dword sets */ + /* NID 0x01: Subsystem ID. */ + AZALIA_SUBVENDOR(0x3, 0x80860101), + + /* NID 0x05. */ + AZALIA_PIN_CFG(0x3, 0x05, 0x18560010), + + /* NID 0x06. */ + AZALIA_PIN_CFG(0x3, 0x06, 0x18560010), + + /* NID 0x07. */ + AZALIA_PIN_CFG(0x3, 0x07, 0x18560010), +}; + +const u32 pc_beep_verbs[0] = {}; + +AZALIA_ARRAY_SIZES; diff --git a/src/mainboard/apple/macbookair5_2/mainboard.c b/src/mainboard/apple/macbookair5_2/mainboard.c new file mode 100644 index 0000000..d497c51 --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/mainboard.c @@ -0,0 +1,67 @@ +/* + * 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. + */ + +#include <device/device.h> +#include <drivers/intel/gma/int15.h> +#include <southbridge/intel/bd82x6x/pch.h> +#include <ec/acpi/ec.h> +#include <console/console.h> + +static void mainboard_init(struct device *dev) +{ + /* FIXME: trim this down or remove if necessary */ +// { +// int i; +// const u8 dmp[256] = { +// /* 00 */ 0x40, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* 10 */ 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* 20 */ 0x00, 0x80, 0x16, 0x16, 0xe0, 0x40, 0x4f, 0x4e, 0x7a, 0x34, 0x35, 0x31, 0x38, 0x31, 0x32, 0x44, +// /* 30 */ 0x4b, 0x52, 0x4e, 0x41, 0x38, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, +// /* 40 */ 0x43, 0x44, 0x45, 0x00, 0x02, 0x14, 0x11, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* 50 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* 60 */ 0x03, 0x00, 0x00, 0x00, 0x0f, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* 70 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* 80 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* 90 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* a0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* b0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* c0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* d0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* e0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// /* f0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// +// printk(BIOS_DEBUG, "Replaying EC dump ..."); +// for (i = 0; i < 256; i++) +// ec_write (i, dmp[i]); +// printk(BIOS_DEBUG, "done\n"); +// } + + RCBA32(0x38c8) = 0x00002005; + RCBA32(0x38c4) = 0x00800000; +} + +static void mainboard_enable(struct device *dev) +{ + dev->ops->init = mainboard_init; + +// /* FIXME: fix those values*/ +// install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS, +// GMA_INT15_PANEL_FIT_DEFAULT, +// GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); + install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); +} + +struct chip_operations mainboard_ops = { + .enable_dev = mainboard_enable, +}; diff --git a/src/mainboard/apple/macbookair5_2/romstage.c b/src/mainboard/apple/macbookair5_2/romstage.c new file mode 100644 index 0000000..6594b15 --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/romstage.c @@ -0,0 +1,86 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2008-2009 coresystems GmbH + * Copyright (C) 2014 Vladimir Serbinenko + * + * 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. + */ + +/* FIXME: Check if all includes are needed. */ + +#include <stdint.h> +#include <string.h> +#include <timestamp.h> +#include <arch/byteorder.h> +#include <arch/io.h> +#include <device/mmio.h> +#include <device/pci_ops.h> +#include <device/pnp_ops.h> +#include <console/console.h> +#include <northbridge/intel/sandybridge/sandybridge.h> +#include <northbridge/intel/sandybridge/raminit_native.h> +#include <southbridge/intel/bd82x6x/pch.h> +#include <southbridge/intel/common/gpio.h> +#include <cbfs.h> + +void pch_enable_lpc(void) +{ + pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x40, 0x00000401); + pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x80, 0x0070); + pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x3f0f); + pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x84, 0x000c0681); + pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x88, 0x000c1641); + pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x8c, 0x001c0301); + pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x90, 0x00fc0701); +} + +void mainboard_rcba_config(void) +{ + RCBA32(0x3414) = 0x00000020; +} + +const struct southbridge_usb_port mainboard_usb_ports[] = { + { 1, 0, 0 }, + { 1, 0, 1 }, + { 1, 0, 2 }, + { 1, 0, 3 }, + { 1, 0, -1 }, + { 1, 0, -1 }, + { 1, 0, -1 }, + { 1, 0, -1 }, + { 1, 0, -1 }, + { 1, 0, -1 }, + { 1, 0, -1 }, + { 1, 0, -1 }, + { 1, 0, -1 }, + { 1, 0, -1 }, +}; + +void mainboard_early_init(int s3resume) +{ +} + +void mainboard_config_superio(void) +{ +} + +void mainboard_get_spd(spd_raw_data *spd, bool id_only) +{ + void *spd_file; + size_t spd_file_len = 0; + spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD, + &spd_file_len); + if (spd_file && spd_file_len >= 512) { + memcpy(&spd[0], spd_file, 128); + memcpy(&spd[2], spd_file + 256, 128); + } +} diff --git a/src/mainboard/apple/macbookair5_2/spd.bin b/src/mainboard/apple/macbookair5_2/spd.bin new file mode 100644 index 0000000..2e2a6b4 --- /dev/null +++ b/src/mainboard/apple/macbookair5_2/spd.bin Binary files differ
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) ......................................................................
Patch Set 2:
(1 comment)
This change is ready for review.
https://review.coreboot.org/#/c/32604/1/src/mainboard/apple/macbookair5_2/Kc... File src/mainboard/apple/macbookair5_2/Kconfig:
https://review.coreboot.org/#/c/32604/1/src/mainboard/apple/macbookair5_2/Kc... PS1, Line 45: 60
Schematics say GPIO28 (see ISOLATE_CPU_MEM_L). […]
Yes. In 4,2 schematics it's also GPIO28.
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#3).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466)
This is WIP.
Current state: - SeaBIOS shows up, but it's not usable since the keyboard doesn't work
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 17 files changed, 803 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/3
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/#/c/32604/3/src/mainboard/apple/macbookair5_2/ma... File src/mainboard/apple/macbookair5_2/mainboard.c:
https://review.coreboot.org/#/c/32604/3/src/mainboard/apple/macbookair5_2/ma... PS3, Line 22: RCBA32(0x38c8) = 0x00002005; please, no spaces at the start of a line
https://review.coreboot.org/#/c/32604/3/src/mainboard/apple/macbookair5_2/ma... PS3, Line 29: install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); line over 80 characters
https://review.coreboot.org/#/c/32604/3/src/mainboard/apple/macbookair5_2/ma... PS3, Line 29: install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); please, no spaces at the start of a line
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#4).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
This is WIP.
What works: - Linux - GRUB, SeaBIOS - Wi-Fi - S3 resume and wakeup - Both USB ports
Issues: - The keyboard is not inited in coreboot, will be fixed soon - Battery and AC (probably smth else) are not yet visible in userspace due to missing ACPI support.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 17 files changed, 806 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/4
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 4:
(4 comments)
https://review.coreboot.org/#/c/32604/4/src/mainboard/apple/macbookair5_2/ma... File src/mainboard/apple/macbookair5_2/mainboard.c:
https://review.coreboot.org/#/c/32604/4/src/mainboard/apple/macbookair5_2/ma... PS4, Line 22: RCBA32(0x38c8) = 0x00002005; please, no spaces at the start of a line
https://review.coreboot.org/#/c/32604/4/src/mainboard/apple/macbookair5_2/ma... PS4, Line 29: install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); line over 80 characters
https://review.coreboot.org/#/c/32604/4/src/mainboard/apple/macbookair5_2/ma... PS4, Line 29: install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, GMA_INT15_PANEL_FIT_DEFAULT, GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); please, no spaces at the start of a line
https://review.coreboot.org/#/c/32604/4/src/mainboard/apple/macbookair5_2/ro... File src/mainboard/apple/macbookair5_2/romstage.c:
https://review.coreboot.org/#/c/32604/4/src/mainboard/apple/macbookair5_2/ro... PS4, Line 37: printk(BIOS_INFO, "MacBook Air: pch_enable_lpc\n"); Prefer using '"%s...", __func__' to using 'pch_enable_lpc', this function's name, in a string
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#5).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
This is WIP.
What works: - Linux - GRUB, SeaBIOS - Wi-Fi - S3 resume and wakeup - Both USB ports - Trackpad - libgfxinit
Issues: - The keyboard is not inited in coreboot, will be fixed soon - Battery and AC (probably smth else) are not yet visible in userspace due to missing ACPI support.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 17 files changed, 806 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/5
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 5:
(1 comment)
Nice work.
https://review.coreboot.org/#/c/32604/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32604/5//COMMIT_MSG@12 PS5, Line 12: - Linux : - GRUB, SeaBIOS What versions?
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#6).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
This is WIP.
What works: - Linux - GRUB, SeaBIOS - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner
Not tested: - Thunderbolt - Headphones - Speakers - Mic - Camera
Issues: - The keyboard is not inited in coreboot, will be fixed soon - Battery and AC (probably smth else) are not yet visible in userspace due to missing ACPI support.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 17 files changed, 771 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/6
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#7).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
This is WIP. Not ready for merge.
What works: - Linux - GRUB, SeaBIOS - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner
Not tested: - Thunderbolt - Headphones - Speakers - Mic - Camera
Issues: - Battery and AC (probably smth else) are not yet visible in userspace due to missing ACPI support.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 17 files changed, 771 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/7
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 7:
(6 comments)
https://review.coreboot.org/#/c/32604/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32604/5//COMMIT_MSG@12 PS5, Line 12: - Linux : - GRUB, SeaBIOS
What versions?
Devuan ascii, kernel 4.9.0 GRUB 2.02 SeaBIOS 1.12.1
https://review.coreboot.org/#/c/32604/1/src/mainboard/apple/macbookair5_2/Kc... File src/mainboard/apple/macbookair5_2/Kconfig:
https://review.coreboot.org/#/c/32604/1/src/mainboard/apple/macbookair5_2/Kc... PS1, Line 16: LVDS
eDP
Done
https://review.coreboot.org/#/c/32604/1/src/mainboard/apple/macbookair5_2/Kc... PS1, Line 35: config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID : hex : default 0x7270 : : config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID : hex : default 0x8086
Please remove
Done
https://review.coreboot.org/#/c/32604/1/src/mainboard/apple/macbookair5_2/Kc... PS1, Line 45: 60
Yes. In 4,2 schematics it's also GPIO28.
Done
https://review.coreboot.org/#/c/32604/1/src/mainboard/apple/macbookair5_2/de... File src/mainboard/apple/macbookair5_2/devicetree.cb:
https://review.coreboot.org/#/c/32604/1/src/mainboard/apple/macbookair5_2/de... PS1, Line 53: subsystemid 0x8086 0x7270
These lines can be removed when inheriting the subsystemid
Done
https://review.coreboot.org/#/c/32604/1/src/mainboard/apple/macbookair5_2/de... PS1, Line 59: end
Please move to the previous line
Done
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 19:
It's kind of ready for review. Works quite well.
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#20).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9 (Devuan) - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - Headphones - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug
Not tested: - Thunderbolt
Minor problems: - Keyboard is not working in SeaBIOS. Recommended to use GRUB or Tianocore until it's fixed. Seems like a SeaBIOS bug.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 19 files changed, 850 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/20
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#21).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9 (Devuan) - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - Headphones - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Minor problems: - Keyboard is not working in SeaBIOS. Recommended to use GRUB or Tianocore until it's fixed. Seems like a SeaBIOS bug.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 19 files changed, 850 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/21
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#22).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9 (Devuan) - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - Headphones - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Minor problems: - Keyboard is not working in SeaBIOS. Recommended to use GRUB or Tianocore until it's fixed. Seems like a SeaBIOS bug.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 19 files changed, 850 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/22
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 22:
(1 comment)
https://review.coreboot.org/#/c/32604/22/src/mainboard/apple/macbookair5_2/r... File src/mainboard/apple/macbookair5_2/romstage.c:
https://review.coreboot.org/#/c/32604/22/src/mainboard/apple/macbookair5_2/r... PS22, Line 67: void mainboard_get_spd(spd_raw_data *spd, bool id_only) how can it be detected which memory configuration is used in the laptop? i think there are versions with different amounts of ram. is there some gpio strapped to some value corresponding to that?
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 22:
(1 comment)
https://review.coreboot.org/#/c/32604/22/src/mainboard/apple/macbookair5_2/r... File src/mainboard/apple/macbookair5_2/romstage.c:
https://review.coreboot.org/#/c/32604/22/src/mainboard/apple/macbookair5_2/r... PS22, Line 67: void mainboard_get_spd(spd_raw_data *spd, bool id_only)
how can it be detected which memory configuration is used in the laptop? i think there are versions […]
have a look at ramcfg[0..3] in the schematics; that's wired to 4 PCH GPIOs
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 22:
Please add mainboard documentation as well which answer the following questions: How to access the flash IC? What kinds of debug port exists? Whats working and what are the TODOs?
Please also recommend a flashing method as explained in https://doc.coreboot.org/flash_tutorial/index.html
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#23).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9 (Devuan) - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gnvs.c A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/romstage.c A src/mainboard/apple/macbookair5_2/spd.bin 19 files changed, 853 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/23
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 23:
(4 comments)
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 75: 0x00270500, /* Set PS to D0 on DAC1 */ please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 76: 0x00470500, /* Set PS to D0 on DAC3 */ please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 77: 0x00270650, /* Set converter stream on DAC1 */ please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 78: 0x00470650, /* Set converted stream on DAC3 */ please, no spaces at the start of a line
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 23:
Most of the comments from CB:32673 also apply to this machine.
I haven't checked, but maybe they can be made variants of the same board?
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 23:
Patch Set 23:
Most of the comments from CB:32673 also apply to this machine.
I'll address all comments. I already started writing documentation for the boards btw.
I haven't checked, but maybe they can be made variants of the same board?
I don't think so, these are quite different boards. It's like making X220 and T530 the same baseboard: probably possible, but... I doubt it's the right thing to do :)
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 23:
Patch Set 23:
Patch Set 23:
Most of the comments from CB:32673 also apply to this machine.
I'll address all comments. I already started writing documentation for the boards btw.
Perfect, thanks!
I haven't checked, but maybe they can be made variants of the same board?
I don't think so, these are quite different boards. It's like making X220 and T530 the same baseboard: probably possible, but... I doubt it's the right thing to do :)
I don't know much about Lenovo boards (I have none here), but I know X220 and T530 have PCHs of a different generation, and the EC is a completely different beast. I have seen the same thing with Apple sandy/ivy boards: My 820-2828 has a Cougar Point PCH and a Renesas H8S SMC, whereas the newer 820-3302A has a Panther Point PCH and a TI Stellaris LM4FSXAH5BB SMC.
However, I would believe that there aren't many differences between xx20 and xx30 Thinkpads, and I guess the same applies within the same generation (sandy/ivy) of Apple hardware.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 23:
(33 comments)
https://review.coreboot.org/c/coreboot/+/32604/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/32604/5//COMMIT_MSG@12 PS5, Line 12: - Linux : - GRUB, SeaBIOS
Devuan ascii, kernel 4.9.0 […]
Done
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... File src/mainboard/apple/macbookair5_2/Kconfig:
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... PS1, Line 45: 60
Done
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/Kconfig:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 31: default "pci8086,0166.rom" Is the VBIOS tested?
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 2: : cbfs-files-y += spd.bin : spd.bin-file := spd.bin : spd.bin-type := spd I think you can use GENERIC_SPD_BIN. see src/mb/hp/snb_ivb_laptops as an example (the revolve 810 uses that mechanism)
Note that it uses plaintext SPD files, so you may have to xxd your file
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/acpi_tables.c:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 20: /* Disable USB ports in S3 by default */ : gnvs->s3u0 = 0; : gnvs->s3u1 = 0; : : /* Disable USB ports in S5 by default */ : gnvs->s5u0 = 0; : gnvs->s5u1 = 0; These can be dropped
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 28: // the lid is open by default. Please use C-style comments for consistency
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... File src/mainboard/apple/macbookair5_2/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... PS1, Line 33: :
Add this line here: […]
Done
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... PS1, Line 110: Host bridge
Duplicate comment
Done
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... PS1, Line 110: device pci 00.0 on # Host bridge Host bridge : subsystemid 0x106b 0x00fe : end : device pci 01.0 off # PCIe Bridge for discrete graphics : end : device pci 02.0 on # Internal graphics VGA controller : subsystemid 0x106b 0x00fe : end
Please move above the "chip southbridge/intel/bd82x6x" line
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 2: register "gfx.did" = "{ 0x80000410, 0x80000320, 0x80000410, 0x80000410, 0x00000005 }" This can be dropped
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 19: 0x0 0
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 27: 0x0 0
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 32: 0x0 0
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 44: register "docking_supported" = "0" is zero, can be dropped
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 50: register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }" is zero, can be dropped
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 66: High Definition Audio Audio Stereo audio again :^)
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/dsdt.asl:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 12: : : #define BRIGHTNESS_UP _SB.PCI0.GFX0.INCB : #define BRIGHTNESS_DOWN _SB.PCI0.GFX0.DECB : #define ACPI_VIDEO_DEVICE _SB.PCI0.GFX0 Are these used?
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 28: /* Some generic macros */ Please remove this comment. I killed it on a recent change.
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 30: : #include <southbridge/intel/bd82x6x/acpi/platform.asl> : /* global NVS and variables. */ : #include <southbridge/intel/bd82x6x/acpi/globalnvs.asl> : #include <southbridge/intel/bd82x6x/acpi/sleepstates.asl> Some of these are now under common
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/gma-mainboard.ads:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 30: Analog This one is likely to be unused
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... File src/mainboard/apple/macbookair5_2/gnvs.c:
PS1:
This file is a duplicate of acpi_tables.c […]
See current patchset
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/gnvs.c:
PS23: This file is a duplicate of acpi_tables.c
It doesn't even get built. Please remove.
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 21: Cirrus Cirrus CS4206
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 24: 0x0000000b Use decimal here
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 25: /* NID 0x01: Subsystem ID. */ All of the "NID" comments are of no use, they can be dropped
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 26: 0x0 Use decimal here as well
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 57: 0x80862806, /* Codec Vendor / Device ID: Intel */ Add a space between the two codecs
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 60: 0x00000004 Also decimal
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 62: 0x3 Also decimal
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 75: 0x00270500, /* Set PS to D0 on DAC1 */
please, no spaces at the start of a line
Please correct this
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... File src/mainboard/apple/macbookair5_2/mainboard.c:
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... PS1, Line 62: GMA_INT15_ACTIVE_LFP_EDP
Confirmed, it's eDP. Please format this line properly, though.
Ack
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/mainboard.c:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 29: install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, : GMA_INT15_PANEL_FIT_DEFAULT, : GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); Is the VBIOS tested?
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/romstage.c:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 73: memcpy(&spd[0], spd_file, 128); Why is only half of the spd file used? Only the 1st and 3rd quarters are used.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 23: Code-Review+1
Did you use autoport? What device did you use as template?
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 23:
Patch Set 23: Code-Review+1
Did you use autoport? What device did you use as template?
Just autoport.
Hello Patrick Rudolph, Angel Pons, Paul Menzel, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#24).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9 (Devuan) - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd.bin 26 files changed, 864 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/24
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 24:
(23 comments)
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/Kconfig:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 31: default "pci8086,0166.rom"
Is the VBIOS tested?
Not on this machine yet
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/acpi_tables.c:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 20: /* Disable USB ports in S3 by default */ : gnvs->s3u0 = 0; : gnvs->s3u1 = 0; : : /* Disable USB ports in S5 by default */ : gnvs->s5u0 = 0; : gnvs->s5u1 = 0;
These can be dropped
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 28: // the lid is open by default.
Please use C-style comments for consistency
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 2: register "gfx.did" = "{ 0x80000410, 0x80000320, 0x80000410, 0x80000410, 0x00000005 }"
This can be dropped
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 19: 0x0
0
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 27: 0x0
0
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 32: 0x0
0
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 44: register "docking_supported" = "0"
is zero, can be dropped
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 50: register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }"
is zero, can be dropped
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 66: High Definition Audio Audio
Stereo audio again :^)
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/dsdt.asl:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 12: : : #define BRIGHTNESS_UP _SB.PCI0.GFX0.INCB : #define BRIGHTNESS_DOWN _SB.PCI0.GFX0.DECB : #define ACPI_VIDEO_DEVICE _SB.PCI0.GFX0
Are these used?
No
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 28: /* Some generic macros */
Please remove this comment. I killed it on a recent change.
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 30: : #include <southbridge/intel/bd82x6x/acpi/platform.asl> : /* global NVS and variables. */ : #include <southbridge/intel/bd82x6x/acpi/globalnvs.asl> : #include <southbridge/intel/bd82x6x/acpi/sleepstates.asl>
Some of these are now under common
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/gma-mainboard.ads:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 30: Analog
This one is likely to be unused
Done
https://review.coreboot.org/c/coreboot/+/32604/1/src/mainboard/apple/macbook... File src/mainboard/apple/macbookair5_2/gnvs.c:
PS1:
See current patchset
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... File src/mainboard/apple/macbookair5_2/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 21: Cirrus
Cirrus CS4206
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 24: 0x0000000b
Use decimal here
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 25: /* NID 0x01: Subsystem ID. */
All of the "NID" comments are of no use, they can be dropped
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 26: 0x0
Use decimal here as well
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 57: 0x80862806, /* Codec Vendor / Device ID: Intel */
Add a space between the two codecs
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 60: 0x00000004
Also decimal
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 62: 0x3
Also decimal
Done
https://review.coreboot.org/c/coreboot/+/32604/23/src/mainboard/apple/macboo... PS23, Line 75: 0x00270500, /* Set PS to D0 on DAC1 */
Please correct this
Done
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#25).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd.bin 26 files changed, 729 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/25
Attention is currently required from: Evgeny Zinoviev. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 25:
(6 comments)
Patchset:
PS25: This looks very similar to the MBP10,1 port. Using variants would reduce the amount of redundant stuff.
File Documentation/mainboard/apple/macbookair5_2.md:
https://review.coreboot.org/c/coreboot/+/32604/comment/126a9904_3c06c1a8 PS25, Line 18: 8MB MiB
File Documentation/mainboard/index.md:
https://review.coreboot.org/c/coreboot/+/32604/comment/0505f41f_2233b410 PS25, Line 13: whitespace
File src/mainboard/apple/macbookair5_2/cmos.layout:
PS25: Same as on MBP 10,1 patch
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/88801300_91a74497 PS25, Line 33: } The code for MBP10,1 dies if no SPD is found, I wonder why this is different here?
File src/mainboard/apple/macbookair5_2/mainboard.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/a6818abb_686d1b1f PS25, Line 9: GMA_INT15_PANEL_FIT_DEFAULT, : GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); nit: two more tabs
Attention is currently required from: Angel Pons. Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 25:
(3 comments)
Patchset:
PS25:
This looks very similar to the MBP10,1 port. […]
Well, I don't know, what about MBA4,2 then? Even more similar (in reality at least, while Pro is very different). They all are similar. MBP8,1 too.
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/98167aee_ac271659 PS25, Line 33: }
The code for MBP10,1 dies if no SPD is found, I wonder why this is different here?
Forgot about it, will fix.
File src/mainboard/apple/macbookair5_2/gnvs.c:
PS23:
This file is a duplicate of acpi_tables.c […]
Done
Attention is currently required from: Evgeny Zinoviev. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 25:
(1 comment)
Patchset:
PS25:
Well, I don't know, what about MBA4,2 then? Even more similar (in reality at least, while Pro is ver […]
Yeah, MBA4,2 may also be a good candidate to make a variant with. IIRC it's one generation older, and I've no idea how different stuff like EC/SMC is.
Attention is currently required from: Evgeny Zinoviev. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#26).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd.bin 26 files changed, 731 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/26
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 26:
(5 comments)
Patchset:
PS26: Minor changes.
File Documentation/mainboard/apple/macbookair5_2.md:
https://review.coreboot.org/c/coreboot/+/32604/comment/34e5e7a2_7a84373f PS25, Line 18: 8MB
MiB
Done
File Documentation/mainboard/index.md:
https://review.coreboot.org/c/coreboot/+/32604/comment/8da0637f_9a16bc9e PS25, Line 13:
whitespace
Done
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/42f45da1_76c6736b PS25, Line 33: }
Forgot about it, will fix.
Done
File src/mainboard/apple/macbookair5_2/mainboard.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/6e90858e_397d2ea5 PS25, Line 9: GMA_INT15_PANEL_FIT_DEFAULT, : GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
nit: two more tabs
Done
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#27).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 27 files changed, 776 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/27
Attention is currently required from: Evgeny Zinoviev. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#28).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 27 files changed, 777 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/28
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#29).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 27 files changed, 820 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/29
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#30).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 27 files changed, 808 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/30
Attention is currently required from: Evgeny Zinoviev. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#31).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 27 files changed, 811 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/31
Attention is currently required from: Evgeny Zinoviev. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#32).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 27 files changed, 818 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/32
Attention is currently required from: Angel Pons, Felix Held. Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 32:
(5 comments)
File src/mainboard/apple/macbookair5_2/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/32604/comment/dbfb7bf9_d4d43404 PS23, Line 2: : cbfs-files-y += spd.bin : spd.bin-file := spd.bin : spd.bin-type := spd
I think you can use GENERIC_SPD_BIN. […]
Done
File src/mainboard/apple/macbookair5_2/cmos.layout:
PS25:
Same as on MBP 10,1 patch
Done
File src/mainboard/apple/macbookair5_2/romstage.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/d3ba1867_26e787c3 PS1, Line 78: void *spd_file; : size_t spd_file_len = 0; : spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD, : &spd_file_len); : if (spd_file && spd_file_len >= 512) { : memcpy(&spd[0], spd_file, 128); : memcpy(&spd[2], spd_file + 256, 128); : }
So, if I understand properly, this board has two memory "modules" (soldered on the board), and you u […]
Done
File src/mainboard/apple/macbookair5_2/romstage.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/ea76456f_116507fb PS22, Line 67: void mainboard_get_spd(spd_raw_data *spd, bool id_only)
have a look at ramcfg[0.. […]
Done
File src/mainboard/apple/macbookair5_2/romstage.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/cc1b98e9_3522c968 PS23, Line 73: memcpy(&spd[0], spd_file, 128);
Why is only half of the spd file used? Only the 1st and 3rd quarters are used.
Done
Attention is currently required from: Evgeny Zinoviev, Felix Held. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 32: Code-Review+1
(1 comment)
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/4ac50649_e81252c7 PS32, Line 59: die("Unsupported memory, RAMCFG=%d\n", ramcfg); I'd try to boot anyway. If you want to try supporting 8 GiB variants, you can double the density from 2 Gib to 4 Gib
Attention is currently required from: Evgeny Zinoviev, Felix Held. Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#33).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (usb port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/4g_samsung.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 28 files changed, 841 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/33
Attention is currently required from: Felix Held. Hello build bot (Jenkins), Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#34).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, 5.10, 5.13 - SeaBIOS - GRUB - Tianocore - Wi-Fi - Bluetooth - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (USB port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Payload issues: - Keyboard doesn't work in GRUB if it was chainloaded from SeaBIOS. In SeaBIOS itself keyboard works.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/4g_samsung.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 28 files changed, 830 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/34
Attention is currently required from: Felix Held. Hello build bot (Jenkins), Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#35).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, 5.10, 5.13 - SeaBIOS - GRUB - Tianocore - Wi-Fi - Bluetooth - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (USB port on the left side) - Thunderbolt (probably works? see note below)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Payload issues: - Keyboard doesn't work in GRUB if it was chainloaded from SeaBIOS. In SeaBIOS itself keyboard works.
- Thunderbolt The thunderbolt-to-ethernet adapter is detected by the kernel: [ 835.495393] thunderbolt 0-1: new device found, vendor=0x1 device=0x8003 [ 835.495408] thunderbolt 0-1: Apple, Inc. Thunderbolt to Gigabit Ethernet Adapter The network interface wasn't created though, so I couldn't test the adapter. No idea if it's linux or coreboot, but I think it's linux issue.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/4g_samsung.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 28 files changed, 830 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/35
Attention is currently required from: Felix Held. Hello build bot (Jenkins), Martin Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#36).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, 5.10, 5.13 - SeaBIOS - GRUB - Tianocore - Wi-Fi - Bluetooth - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (USB port on the left side) - Thunderbolt (probably works? see note below)
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Payload issues: - Keyboard doesn't work in GRUB if it was chainloaded from SeaBIOS. In SeaBIOS itself keyboard works.
- Thunderbolt The thunderbolt-to-ethernet adapter is detected by the kernel: [ 835.495393] thunderbolt 0-1: new device found, vendor=0x1 device=0x8003 [ 835.495408] thunderbolt 0-1: Apple, Inc. Thunderbolt to Gigabit Ethernet Adapter The network interface wasn't created though, so I couldn't test the adapter. No idea if it's linux or coreboot, but I think it's linux issue.
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/4g_samsung.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 28 files changed, 830 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/36
Attention is currently required from: Evgeny Zinoviev, Felix Held. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 36:
(21 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/32604/comment/a8a52650_7e98082f PS36, Line 38: - Thunderbolt : The thunderbolt-to-ethernet adapter is detected by the kernel: : [ 835.495393] thunderbolt 0-1: new device found, vendor=0x1 : device=0x8003 : [ 835.495408] thunderbolt 0-1: Apple, Inc. Thunderbolt to Gigabit : Ethernet Adapter : The network interface wasn't created though, so I couldn't test the : adapter. No idea if it's linux or coreboot, but I think it's linux issue. Was the Thunderbolt-to-Ethernet adapter plugged in before booting, or was it plugged in afterwards? Would be interesting to check if coreboot detects the adapter.
In any case, Thunderbolt controllers need some initialisation. IIRC, some steps involve toggling some mainboard-specific GPIOs to reset the Thunderbolt controller.
File Documentation/mainboard/apple/macbookair5_2.md:
https://review.coreboot.org/c/coreboot/+/32604/comment/a56aab8c_b80c2594 PS36, Line 139: usb USB
File src/mainboard/apple/macbookair5_2/Kconfig:
https://review.coreboot.org/c/coreboot/+/32604/comment/309ae30c_cba52b95 PS36, Line 27: string Type not needed
File src/mainboard/apple/macbookair5_2/acpi_tables.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/84a49a2d_912f2018 PS36, Line 11: gnvs->tcrt = 100; : gnvs->tpsv = 90; These GNVS values aren't used anywhere. So, these assignments are unnecessary.
File src/mainboard/apple/macbookair5_2/cmos.default:
https://review.coreboot.org/c/coreboot/+/32604/comment/96e87047_83f5902a PS36, Line 3: 32M I think macOS wants at least 64M here
https://review.coreboot.org/c/coreboot/+/32604/comment/5336f612_edec1c03 PS36, Line 4: me_state=Normal Missing defaults for `nmi`, `power_on_after_fail`
File src/mainboard/apple/macbookair5_2/cmos.layout:
https://review.coreboot.org/c/coreboot/+/32604/comment/8395e0a3_a013f9d1 PS36, Line 27: 432 3 e 11 gfx_uma_size After adding more enum values for `gfx_uma_size` (see comment below), its size needs to be increased to at least 5 bits:
432 5 e 11 gfx_uma_size
https://review.coreboot.org/c/coreboot/+/32604/comment/e75adf37_ceb1df2a PS36, Line 29: # SandyBridge MRC Scrambler Seed values : 896 32 r 0 mrc_scrambler_seed : 928 32 r 0 mrc_scrambler_seed_s3 : 960 16 r 0 mrc_scrambler_seed_chk This is only needed when using MRC.bin, which is not possible because this board selects `USE_NATIVE_RAMINIT`. So, this should be removed.
https://review.coreboot.org/c/coreboot/+/32604/comment/56304ef4_60e476bd PS36, Line 42: 2 0 Enable : 2 1 Disable This enumeration is unused, please drop
https://review.coreboot.org/c/coreboot/+/32604/comment/f18e7752_67349816 PS36, Line 58: 11 0 32M : 11 1 64M : 11 2 96M : 11 3 128M : 11 4 160M : 11 5 192M : 11 6 224M Add all possible choices for `gfx_uma_size`:
11 0 32M 11 1 64M 11 2 96M 11 3 128M 11 4 160M 11 5 192M 11 6 224M 11 7 256M 11 8 288M 11 9 320M 11 10 352M 11 11 384M 11 12 416M 11 13 448M 11 14 480M 11 15 512M 11 16 1024M
File src/mainboard/apple/macbookair5_2/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/32604/comment/c8fe5a2b_2ee1c583 PS36, Line 2: register "gfx.ndid" = "2" This doesn't make sense if `gfx.did` is not specified.
https://review.coreboot.org/c/coreboot/+/32604/comment/4ea50304_da79815d PS36, Line 8: 1 PANEL_PORT_DP_A
https://review.coreboot.org/c/coreboot/+/32604/comment/bb7b5db0_d7d20fe3 PS36, Line 36: Intel Series 6 Cougar Point PCH This board uses a 7 series Panther Point PCH
https://review.coreboot.org/c/coreboot/+/32604/comment/b947d5ef_3e9e65d2 PS36, Line 42: register "pcie_port_coalesce" = "1" Coalescing isn't needed when the first PCH PCIe RP (`device pci 1c.0`) is enabled.
https://review.coreboot.org/c/coreboot/+/32604/comment/45e89ea6_7134ba85 PS36, Line 68: PCI-LPC bridge This part of the comment is redundant, I'd drop it.
File src/mainboard/apple/macbookair5_2/dsdt.asl:
https://review.coreboot.org/c/coreboot/+/32604/comment/7c681850_c6747505 PS36, Line 10: // OEM revision I'd drop this comment
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/df95d34b_6f0fac2a PS32, Line 59: die("Unsupported memory, RAMCFG=%d\n", ramcfg);
I'd try to boot anyway. […]
No need to do this now.
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/de1bee97_98d37e9e PS36, Line 6: #include <southbridge/intel/common/gpio.h> Missing: #include <types.h>
Also, if you want, why not order the includes alphabetically?
https://review.coreboot.org/c/coreboot/+/32604/comment/38ab50cb_1c6e1ce8 PS36, Line 46: GPIO68 Looks like GPIO68 is always 0. Do you know if there's any configuration where it is 1?
https://review.coreboot.org/c/coreboot/+/32604/comment/5c03bf5a_afaa3166 PS36, Line 41: const int spd_gpio_vector[] = {71, 70, 69, 68, -1}; : int ramcfg = get_gpios(spd_gpio_vector); : int spd_index = -1; : : /* : * GPIO68 GPIO69 GPIO70 GPIO71 Memory Supported : * 0 0 0 0 4 GiB Hynix Yes : * 0 1 0 0 8 GiB Hynix No : * 0 0 1 0 4 GiB Samsung Yes : * 0 1 1 0 8 GiB Samsung No : * 0 1 1 1 8 GiB Elpida No : * 0 0 1 1 4 GiB Elpida No : */ : : switch (ramcfg) { : case 0: : spd_index = 0; : break; : case 2: : spd_index = 1; : break; : } : : if (spd_index == -1) : die("Unsupported memory, RAMCFG=%d\n", ramcfg); I'd put this into a helper function and make `spd_index` unsigned:
static unsigned int get_spd_index(void) { const int spd_gpio_vector[] = {71, 70, 69, 68, -1}; const unsigned int ramcfg = get_gpios(spd_gpio_vector);
/* * GPIO68 GPIO69 GPIO70 GPIO71 Memory Supported * 0 0 0 0 4 GiB Hynix Yes * 0 1 0 0 8 GiB Hynix No * 0 0 1 0 4 GiB Samsung Yes * 0 1 1 0 8 GiB Samsung No * 0 1 1 1 8 GiB Elpida No * 0 0 1 1 4 GiB Elpida No */ switch (ramcfg) { case 0: return 0; case 2: return 1; default: die("Unsupported memory, RAMCFG=%u\n", ramcfg); } }
File src/mainboard/apple/macbookair5_2/mainboard.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/f2bfe305_5c693bfd PS36, Line 9: GMA_INT15_PANEL_FIT_DEFAULT, : GMA_INT15_BOOT_DISPLAY_DEFAULT, 0); nit: Add another tab so that the arguments start on the same column
Attention is currently required from: Evgeny Zinoviev, Felix Held. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 36: Code-Review+1
Attention is currently required from: Evgeny Zinoviev, Felix Held.
Hello build bot (Jenkins), Martin L Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#37).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (USB port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- M 3rdparty/blobs M 3rdparty/cmocka M 3rdparty/intel-microcode A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/4g_samsung.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 31 files changed, 875 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/37
Attention is currently required from: Angel Pons, Felix Held.
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 37:
(11 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/32604/comment/0c3bad68_58b4f5ce PS36, Line 38: - Thunderbolt : The thunderbolt-to-ethernet adapter is detected by the kernel: : [ 835.495393] thunderbolt 0-1: new device found, vendor=0x1 : device=0x8003 : [ 835.495408] thunderbolt 0-1: Apple, Inc. Thunderbolt to Gigabit : Ethernet Adapter : The network interface wasn't created though, so I couldn't test the : adapter. No idea if it's linux or coreboot, but I think it's linux issue.
Was the Thunderbolt-to-Ethernet adapter plugged in before booting, or was it plugged in afterwards? […]
Afterwards.
File Documentation/mainboard/apple/macbookair5_2.md:
https://review.coreboot.org/c/coreboot/+/32604/comment/2655e195_009eee46 PS36, Line 139: usb
USB
Done
File src/mainboard/apple/macbookair5_2/Kconfig:
https://review.coreboot.org/c/coreboot/+/32604/comment/1735cb45_650b00a4 PS36, Line 27: string
Type not needed
Done
File src/mainboard/apple/macbookair5_2/cmos.default:
https://review.coreboot.org/c/coreboot/+/32604/comment/f4d33b38_16e3ecf9 PS36, Line 3: 32M
I think macOS wants at least 64M here
I don't know what macOS wants but corebooting a macbook to then turn it into a hackintosh to use macOS on it sounds a bit silly anyway. :)
But sure, why not.
File src/mainboard/apple/macbookair5_2/cmos.layout:
https://review.coreboot.org/c/coreboot/+/32604/comment/3b972407_21d01596 PS36, Line 29: # SandyBridge MRC Scrambler Seed values : 896 32 r 0 mrc_scrambler_seed : 928 32 r 0 mrc_scrambler_seed_s3 : 960 16 r 0 mrc_scrambler_seed_chk
This is only needed when using MRC. […]
Done
https://review.coreboot.org/c/coreboot/+/32604/comment/3a51cff5_c78d78fc PS36, Line 42: 2 0 Enable : 2 1 Disable
This enumeration is unused, please drop
Done
https://review.coreboot.org/c/coreboot/+/32604/comment/6adab6ae_79febaf0 PS36, Line 58: 11 0 32M : 11 1 64M : 11 2 96M : 11 3 128M : 11 4 160M : 11 5 192M : 11 6 224M
Add all possible choices for `gfx_uma_size`: […]
Done
File src/mainboard/apple/macbookair5_2/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/32604/comment/611c1727_59488384 PS36, Line 68: PCI-LPC bridge
This part of the comment is redundant, I'd drop it.
Done
File src/mainboard/apple/macbookair5_2/dsdt.asl:
https://review.coreboot.org/c/coreboot/+/32604/comment/7a7ac2a8_24e1a74f PS36, Line 10: // OEM revision
I'd drop this comment
Done
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/0d7fc3ef_67062c3f PS36, Line 6: #include <southbridge/intel/common/gpio.h>
Missing: #include <types.h> […]
Done
File src/mainboard/apple/macbookair5_2/mainboard.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/46bfa453_69cffa0f PS36, Line 9: GMA_INT15_PANEL_FIT_DEFAULT, : GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
nit: Add another tab so that the arguments start on the same column
Done
Attention is currently required from: Angel Pons, Felix Held.
Hello build bot (Jenkins), Martin L Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#38).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - 4 GiB (Hynix RAM) model - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (USB port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- M 3rdparty/blobs M 3rdparty/cmocka M 3rdparty/intel-microcode A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix.spd.hex A src/mainboard/apple/macbookair5_2/spd/4g_samsung.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 31 files changed, 878 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/38
Attention is currently required from: Angel Pons, Felix Held.
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 37:
(3 comments)
File src/mainboard/apple/macbookair5_2/acpi_tables.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/5e8685ba_25e23dc3 PS36, Line 11: gnvs->tcrt = 100; : gnvs->tpsv = 90;
These GNVS values aren't used anywhere. So, these assignments are unnecessary.
Done
File src/mainboard/apple/macbookair5_2/cmos.default:
https://review.coreboot.org/c/coreboot/+/32604/comment/4c1f42ff_7f5142ef PS36, Line 4: me_state=Normal
Missing defaults for `nmi`, `power_on_after_fail`
Done
File src/mainboard/apple/macbookair5_2/cmos.layout:
https://review.coreboot.org/c/coreboot/+/32604/comment/848f8066_776b207f PS36, Line 27: 432 3 e 11 gfx_uma_size
After adding more enum values for `gfx_uma_size` (see comment below), its size needs to be increased […]
Done
Attention is currently required from: Angel Pons, Felix Held.
Hello build bot (Jenkins), Martin L Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#39).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (USB port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- M 3rdparty/blobs M 3rdparty/cmocka M 3rdparty/intel-microcode A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix_micron.spd.hex A src/mainboard/apple/macbookair5_2/spd/4g_samsung.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 31 files changed, 876 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/39
Attention is currently required from: Angel Pons, Felix Held.
Hello build bot (Jenkins), Martin L Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#40).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (USB port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/mainboard.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix_micron.spd.hex A src/mainboard/apple/macbookair5_2/spd/4g_samsung.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 28 files changed, 873 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/40
Attention is currently required from: Angel Pons, Felix Held.
Hello build bot (Jenkins), Martin L Roth, Paul Menzel, Angel Pons, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32604
to look at the new patch set (#41).
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
mb/apple: Add MacBook Air 5,2 (A1466) support
What works: - Linux 4.9, Linux 5.10 - SeaBIOS - GRUB - Tianocore - Wi-Fi - S3 suspend and resume - Both USB ports - Trackpad - libgfxinit - me_cleaner - Speakers - ACPI support for battery, AC, lid (lid wakeup also works) - SD card reader - Camera - Mic - usbdebug (USB port on the left side)
Not tested: - Thunderbolt
Known issues: - Bad sound in headphones - Not all memory configurations are supported
Change-Id: I1ebe6f87a8254871698be74f913b9d969d722447 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- A Documentation/mainboard/apple/macbookair5_2.md A Documentation/mainboard/apple/mba52_3v3.jpg A Documentation/mainboard/apple/mba52_3v3_2.jpg A Documentation/mainboard/apple/mba52_adapter.jpg A Documentation/mainboard/apple/mba52_bat_unplug.jpg A Documentation/mainboard/apple/mba52_motherboard.jpg A Documentation/mainboard/apple/mba52_plug_j5100.jpg M Documentation/mainboard/index.md A src/mainboard/apple/macbookair5_2/Kconfig A src/mainboard/apple/macbookair5_2/Kconfig.name A src/mainboard/apple/macbookair5_2/Makefile.inc A src/mainboard/apple/macbookair5_2/acpi/ec.asl A src/mainboard/apple/macbookair5_2/acpi/platform.asl A src/mainboard/apple/macbookair5_2/acpi/superio.asl A src/mainboard/apple/macbookair5_2/acpi_tables.c A src/mainboard/apple/macbookair5_2/board_info.txt A src/mainboard/apple/macbookair5_2/cmos.default A src/mainboard/apple/macbookair5_2/cmos.layout A src/mainboard/apple/macbookair5_2/devicetree.cb A src/mainboard/apple/macbookair5_2/dsdt.asl A src/mainboard/apple/macbookair5_2/early_init.c A src/mainboard/apple/macbookair5_2/gma-mainboard.ads A src/mainboard/apple/macbookair5_2/gpio.c A src/mainboard/apple/macbookair5_2/hda_verb.c A src/mainboard/apple/macbookair5_2/spd/4g_hynix_micron.spd.hex A src/mainboard/apple/macbookair5_2/spd/4g_samsung.spd.hex A src/mainboard/apple/macbookair5_2/spd/Makefile.inc 27 files changed, 854 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/32604/41
Attention is currently required from: Angel Pons, Felix Held.
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 41:
(7 comments)
File src/mainboard/apple/macbookair5_2/Kconfig:
https://review.coreboot.org/c/coreboot/+/32604/comment/4a9ed4c1_b95031e9 PS23, Line 31: default "pci8086,0166.rom"
Not on this machine yet
Who wants VBIOS anyway, let's drop it.
File src/mainboard/apple/macbookair5_2/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/32604/comment/2eb4865c_2078965d PS36, Line 2: register "gfx.ndid" = "2"
This doesn't make sense if `gfx.did` is not specified.
Done
https://review.coreboot.org/c/coreboot/+/32604/comment/0819252f_f93a8133 PS36, Line 8: 1
PANEL_PORT_DP_A
Done
https://review.coreboot.org/c/coreboot/+/32604/comment/e71b4224_7f50962e PS36, Line 36: Intel Series 6 Cougar Point PCH
This board uses a 7 series Panther Point PCH
Done
https://review.coreboot.org/c/coreboot/+/32604/comment/dc126efd_eb6325f7 PS36, Line 42: register "pcie_port_coalesce" = "1"
Coalescing isn't needed when the first PCH PCIe RP (`device pci 1c.0`) is enabled.
Done
File src/mainboard/apple/macbookair5_2/gma-mainboard.ads:
https://review.coreboot.org/c/coreboot/+/32604/comment/108d5838_19de4817 PS1, Line 23: ports : constant Port_List :=
Some of these ports can be removed, if not in use.
Same answer.
File src/mainboard/apple/macbookair5_2/mainboard.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/60d37794_90d4bcb0 PS23, Line 29: install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_EDP, : GMA_INT15_PANEL_FIT_DEFAULT, : GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
Is the VBIOS tested?
Done
Attention is currently required from: Angel Pons, Felix Held.
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 41:
(1 comment)
File src/mainboard/apple/macbookair5_2/gma-mainboard.ads:
https://review.coreboot.org/c/coreboot/+/32604/comment/6afa4838_31ab211d PS1, Line 23: ports : constant Port_List :=
Same answer.
Accidentally replied to the wrong comment. This one is still open.
Attention is currently required from: Evgeny Zinoviev, Felix Held.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 41: Code-Review+1
(6 comments)
File src/mainboard/apple/macbookair5_2/Kconfig:
https://review.coreboot.org/c/coreboot/+/32604/comment/84a824e6_994e5c69 PS41, Line 31: config MAX_CPUS : int : default 8 Shouldn't be necessary
https://review.coreboot.org/c/coreboot/+/32604/comment/9bd02d81_9e20c568 PS41, Line 40: default "Apple Inc." Sounds like `MAINBOARD_VENDOR` could be changed so that this isn't needed. But not in this patch.
File src/mainboard/apple/macbookair5_2/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/32604/comment/06467776_d7fc7e3a PS41, Line 33: register "pcie_port_coalesce" = "1" Is this actually needed?
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/9895a251_f58c93dc PS41, Line 43: int const unsigned int
https://review.coreboot.org/c/coreboot/+/32604/comment/e86be0d4_00e44a47 PS41, Line 57: switch (ramcfg) { : case 0: : case 1: : spd_index = 0; : break; : case 2: : spd_index = 1; : break; : } : : if (spd_index == -1) : die("Unsupported memory, RAMCFG=%d\n", ramcfg); To avoid a signed-unsigned comparison in `get_spd_data()` between `int spd_index` and `spd_file_len`, the former variable can be made unsigned by refactoring the switch block as follows:
``` switch (ramcfg) { case 0: case 1: spd_index = 0; break; case 2: spd_index = 1; break; default: die("Unsupported memory, RAMCFG=%u\n", ramcfg); } ```
File src/mainboard/apple/macbookair5_2/spd/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/32604/comment/715493f6_47709bf3 PS41, Line 4: = Shouldn't this be `+=` instead?
Attention is currently required from: Evgeny Zinoviev, Felix Held.
Nicholas Chin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 41:
(1 comment)
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/5bde9473_4f3a8759 PS41, Line 71: memcpy(&spd[0], memory, 256); : memcpy(&spd[2], memory, 256); From the SPDs, the Hynix configuration uses 2Gbit chips with an IO width of 8 bits/chip which means it uses 8 chips/channel (64 bits/channel) and 2 channels to total 4GiB. The Samsung configuration uses 4Gbit chips and also has an IO width of 8 bits/chip, meaning only 8 chips in a single channel are required to get 4GiB.
This unconditionally populates the SPDs of both channels, so I would assume that raminit would try and init both channels even if only one is being used. Glancing through the raminit code it seems like coreboot would just disable the failing channel (failing because it isn't populated) so it still might boot, but I guess time could be saved by copying the SPD for the second channel only if it is being used, which could be determined based on the GPIO straps and the channel configuration of the corresponding chips
Attention is currently required from: Evgeny Zinoviev, Felix Held.
Nicholas Chin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32604 )
Change subject: mb/apple: Add MacBook Air 5,2 (A1466) support ......................................................................
Patch Set 41:
(1 comment)
File src/mainboard/apple/macbookair5_2/early_init.c:
https://review.coreboot.org/c/coreboot/+/32604/comment/c6cf632a_059f8f71 PS41, Line 62: case 2: I was helping a user on the libreboot IRC get their 8 GiB Hynix working, and they reported that the generated SPD from inteltool for it is exactly the same as the 4 GiB Samsung one. Adding `case 4:` as a fallthrough here did work for them. It's probably just a matter of the chips having similar timings and the 8 GiB config using dual vs single channel for the 4 GiB config.