diff --git a/build.sh b/build.sh index f754ee3d..96e8eeb1 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ set -eu -o pipefail ## Update docker image tag, because kernel build is using `uname -r` when defining package version variable # KERNEL_VERSION=$(curl -s https://www.kernel.org | grep '' | head -3 | tail -1 | cut -d'>' -f3 | cut -d'<' -f1) -KERNEL_VERSION=5.7.15 +KERNEL_VERSION=5.8.1 #KERNEL_REPOSITORY=git://kernel.ubuntu.com/virgin/linux-stable.git KERNEL_REPOSITORY=https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git REPO_PATH=$(pwd) @@ -63,10 +63,12 @@ echo >&2 "===]> Info: Applying patches... " echo 'Patches directory not found!' exit 1 } + + while IFS= read -r file; do echo "==> Adding $file" patch -p1 <"$file" -done < <(find "${WORKING_PATH}/patches" -type f -name "*.patch" | grep -vE '[2]00[0-9]' | sort) +done < <(find "${WORKING_PATH}/patches" -type f -name "*.patch" | sort) chmod a+x "${KERNEL_PATH}"/debian/rules chmod a+x "${KERNEL_PATH}"/debian/scripts/* @@ -85,20 +87,20 @@ echo "" >"${KERNEL_PATH}"/.scmversion # Build Deb packages make -j "$(getconf _NPROCESSORS_ONLN)" deb-pkg LOCALVERSION=-mbp KDEB_PKGVERSION="$(make kernelversion)-$(get_next_version mbp)" -# Create alternative Kernel -echo >&2 "===]> Info: Create alternative kernel ... " -make distclean -make clean -while IFS= read -r file; do - echo "==> Adding $file" - patch -p1 <"$file" -done < <(find "${WORKING_PATH}/patches" -type f -name "*.patch" | grep -E '[2]00[0-9]' | sort) -cp "${WORKING_PATH}/templates/default-config" "${KERNEL_PATH}/.config" -make olddefconfig -echo "" >"${KERNEL_PATH}"/.scmversion - -# Build Deb packages -make -j "$(getconf _NPROCESSORS_ONLN)" deb-pkg LOCALVERSION=-mbp-alt KDEB_PKGVERSION="$(make kernelversion)-$(get_next_version mbp-alt)" +## Create alternative Kernel +#echo >&2 "===]> Info: Create alternative kernel ... " +#make distclean +#make clean +#while IFS= read -r file; do +# echo "==> Adding $file" +# patch -p1 <"$file" +#done < <(find "${WORKING_PATH}/patches" -type f -name "*.patch" | grep -E '[2]00[0-9]' | sort) +#cp "${WORKING_PATH}/templates/default-config" "${KERNEL_PATH}/.config" +#make olddefconfig +#echo "" >"${KERNEL_PATH}"/.scmversion +# +## Build Deb packages +#make -j "$(getconf _NPROCESSORS_ONLN)" deb-pkg LOCALVERSION=-mbp-alt KDEB_PKGVERSION="$(make kernelversion)-$(get_next_version mbp-alt)" #### Copy artifacts to shared volume echo >&2 "===]> Info: Copying debs and calculating SHA256 ... " diff --git a/patch_driver.sh b/patch_driver.sh index bef82826..10521fc8 100755 --- a/patch_driver.sh +++ b/patch_driver.sh @@ -6,9 +6,9 @@ BUILD_PATH=/tmp/build-kernel ### Apple T2 drivers commit hashes # Patches -APPLE_SMC_DRIVER_GIT_URL=https://github.com/aunali1/linux-mbp-arch -APPLE_SMC_DRIVER_BRANCH_NAME=master -APPLE_SMC_DRIVER_COMMIT_HASH=aa8d8579b88f67cc21592a439937f73d174e836f +APPLE_SMC_DRIVER_GIT_URL=https://github.com/marcosfad/linux-mbp-arch.git +APPLE_SMC_DRIVER_BRANCH_NAME=feature/kernel-5.8 +APPLE_SMC_DRIVER_COMMIT_HASH=13a0aff189d5c70a9b570e69cbf8b13b2887ba19 ## BCE #APPLE_BCE_DRIVER_GIT_URL=https://github.com/aunali1/mbp2018-bridge-drv.git #APPLE_BCE_DRIVER_BRANCH_NAME=aur @@ -31,7 +31,7 @@ git checkout ${APPLE_SMC_DRIVER_COMMIT_HASH} while IFS= read -r file; do echo "==> Adding ${file}" cp -rfv "${file}" "${WORKING_PATH}"/patches/"${file##*/}" -done < <(find "${BUILD_PATH}/linux-mbp-arch" -type f -name "*.patch" | grep -E '[235]00[0-9]' | sort) +done < <(find "${BUILD_PATH}/linux-mbp-arch" -type f -name "*.patch" | grep -vE '000[0-9]' | sort) #### Add custom drivers to kernel #echo -e "From: \"Kernel Builder (sita)\" \nSubject: patch custom drivers\n" >"${WORKING_PATH}/patches/custom-drivers.patch" diff --git a/patches/0005-configs-based-on-Ubuntu-5.7.0-6.7.patch b/patches/0005-configs-based-on-Ubuntu-5.7.0-6.7.patch deleted file mode 100644 index b29304ed..00000000 --- a/patches/0005-configs-based-on-Ubuntu-5.7.0-6.7.patch +++ /dev/null @@ -1,297 +0,0 @@ -From c3bc0f62079428513e0fbdad1aefe029f769b603 Mon Sep 17 00:00:00 2001 -From: "Kernel Builder (sita)" -Date: Sun, 7 Jun 2020 12:31:27 +0000 -Subject: [PATCH 5/5] configs (based on Ubuntu-5.7.0-6.7) - ---- - .../config/amd64/config.common.amd64 | 1 - - .../config/amd64/config.flavour.generic | 1 - - .../config/amd64/config.flavour.lowlatency | 1 - - .../config/arm64/config.common.arm64 | 4 +- - .../config/armhf/config.common.armhf | 2 - - debian.master/config/config.common.ubuntu | 37 +------------------ - debian.master/config/i386/config.common.i386 | 1 - - .../config/i386/config.flavour.generic | 1 - - .../config/i386/config.flavour.lowlatency | 1 - - .../config/ppc64el/config.common.ppc64el | 2 - - .../config/s390x/config.common.s390x | 1 - - 11 files changed, 3 insertions(+), 49 deletions(-) - -diff --git a/debian.master/config/amd64/config.common.amd64 b/debian.master/config/amd64/config.common.amd64 -index 11d4bde9d612..2a209f34db83 100644 ---- a/debian.master/config/amd64/config.common.amd64 -+++ b/debian.master/config/amd64/config.common.amd64 -@@ -185,7 +185,6 @@ CONFIG_HFSPLUS_FS=m - CONFIG_HFS_FS=m - CONFIG_HIBERNATION=y - CONFIG_HID=m --CONFIG_HIO=m - CONFIG_HMC6352=m - CONFIG_HOTPLUG_PCI=y - CONFIG_HOTPLUG_PCI_SHPC=y -diff --git a/debian.master/config/amd64/config.flavour.generic b/debian.master/config/amd64/config.flavour.generic -index d1662374ea94..5938d9ba3f6c 100644 ---- a/debian.master/config/amd64/config.flavour.generic -+++ b/debian.master/config/amd64/config.flavour.generic -@@ -4,7 +4,6 @@ - CONFIG_HZ=250 - # CONFIG_HZ_1000 is not set - CONFIG_HZ_250=y --# CONFIG_IRQ_FORCED_THREADING_DEFAULT is not set - # CONFIG_LATENCYTOP is not set - # CONFIG_PREEMPT is not set - CONFIG_PREEMPT_VOLUNTARY=y -diff --git a/debian.master/config/amd64/config.flavour.lowlatency b/debian.master/config/amd64/config.flavour.lowlatency -index 814348dc984b..42de09fb0bff 100644 ---- a/debian.master/config/amd64/config.flavour.lowlatency -+++ b/debian.master/config/amd64/config.flavour.lowlatency -@@ -4,7 +4,6 @@ - CONFIG_HZ=1000 - CONFIG_HZ_1000=y - # CONFIG_HZ_250 is not set --CONFIG_IRQ_FORCED_THREADING_DEFAULT=y - CONFIG_LATENCYTOP=y - CONFIG_PREEMPT=y - # CONFIG_PREEMPT_VOLUNTARY is not set -diff --git a/debian.master/config/arm64/config.common.arm64 b/debian.master/config/arm64/config.common.arm64 -index 8a04a5dea27c..b09ed523e18d 100644 ---- a/debian.master/config/arm64/config.common.arm64 -+++ b/debian.master/config/arm64/config.common.arm64 -@@ -166,7 +166,7 @@ CONFIG_FEALNX=m - CONFIG_FIREWIRE=m - CONFIG_FIREWIRE_NOSY=m - CONFIG_FIXED_PHY=y --CONFIG_FORCE_MAX_ZONEORDER=13 -+CONFIG_FORCE_MAX_ZONEORDER=11 - CONFIG_FPGA_BRIDGE=m - CONFIG_FPGA_DFL=m - CONFIG_FRAME_WARN=1024 -@@ -197,7 +197,6 @@ CONFIG_HFSPLUS_FS=m - CONFIG_HFS_FS=m - # CONFIG_HIBERNATION is not set - CONFIG_HID=m --# CONFIG_HIO is not set - CONFIG_HMC6352=m - CONFIG_HOTPLUG_PCI=y - CONFIG_HOTPLUG_PCI_SHPC=y -@@ -287,7 +286,6 @@ CONFIG_IPMI_HANDLER=m - # CONFIG_IPMMU_VMSA is not set - # CONFIG_IP_DCCP_CCID3 is not set - CONFIG_IRQ_BYPASS_MANAGER=y --# CONFIG_IRQ_FORCED_THREADING_DEFAULT is not set - CONFIG_ISL29003=m - CONFIG_ISL29020=m - CONFIG_JFS_FS=m -diff --git a/debian.master/config/armhf/config.common.armhf b/debian.master/config/armhf/config.common.armhf -index b6521d7ec3ba..413dbe0d70ad 100644 ---- a/debian.master/config/armhf/config.common.armhf -+++ b/debian.master/config/armhf/config.common.armhf -@@ -186,7 +186,6 @@ CONFIG_HFSPLUS_FS=m - CONFIG_HFS_FS=m - CONFIG_HIBERNATION=y - CONFIG_HID=m --# CONFIG_HIO is not set - CONFIG_HMC6352=m - # CONFIG_HOTPLUG_PCI is not set - CONFIG_HPFS_FS=m -@@ -272,7 +271,6 @@ CONFIG_IPMI_HANDLER=m - CONFIG_IPMMU_VMSA=y - # CONFIG_IP_DCCP_CCID3 is not set - CONFIG_IRQ_BYPASS_MANAGER=m --# CONFIG_IRQ_FORCED_THREADING_DEFAULT is not set - CONFIG_ISL29003=m - CONFIG_ISL29020=m - CONFIG_JFS_FS=m -diff --git a/debian.master/config/config.common.ubuntu b/debian.master/config/config.common.ubuntu -index a274792c072a..12410e033315 100644 ---- a/debian.master/config/config.common.ubuntu -+++ b/debian.master/config/config.common.ubuntu -@@ -283,10 +283,7 @@ CONFIG_AMD_XGBE_DCB=y - CONFIG_AMD_XGBE_HAVE_ECC=y - CONFIG_AMILO_RFKILL=m - CONFIG_AMLOGIC_THERMAL=m --CONFIG_ANDROID_BINDERFS=m --CONFIG_ANDROID_BINDER_DEVICES="" --CONFIG_ANDROID_BINDER_IPC=m --# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set -+# CONFIG_ANDROID_BINDER_IPC is not set - CONFIG_APB_TIMER=y - CONFIG_APDS9300=m - CONFIG_APDS9960=m -@@ -773,7 +770,7 @@ CONFIG_ARM_TI_CPUFREQ=y - CONFIG_ARM_VEXPRESS_SPC_CPUFREQ=m - CONFIG_ARM_VIRT_EXT=y - CONFIG_AS3935=m --CONFIG_ASHMEM=m -+# CONFIG_ASHMEM is not set - CONFIG_ASN1=y - CONFIG_ASPEED_ADC=m - CONFIG_ASPEED_BT_IPMI_BMC=m -@@ -909,25 +906,6 @@ CONFIG_AUDIT_ARCH=y - CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y - CONFIG_AUDIT_COMPAT_GENERIC=y - CONFIG_AUDIT_GENERIC=y --CONFIG_AUFS_BDEV_LOOP=y --# CONFIG_AUFS_BRANCH_MAX_1023 is not set --CONFIG_AUFS_BRANCH_MAX_127=y --# CONFIG_AUFS_BRANCH_MAX_32767 is not set --# CONFIG_AUFS_BRANCH_MAX_511 is not set --# CONFIG_AUFS_BR_FUSE is not set --CONFIG_AUFS_BR_HFSPLUS=y --# CONFIG_AUFS_BR_RAMFS is not set --# CONFIG_AUFS_DEBUG is not set --CONFIG_AUFS_DIRREN=y --CONFIG_AUFS_EXPORT=y --# CONFIG_AUFS_FHSM is not set --CONFIG_AUFS_FS=m --# CONFIG_AUFS_HNOTIFY is not set --CONFIG_AUFS_INO_T_64=y --# CONFIG_AUFS_RDU is not set --CONFIG_AUFS_SBILIST=y --# CONFIG_AUFS_SHWH is not set --CONFIG_AUFS_XATTR=y - CONFIG_AURORA_NB8800=m - CONFIG_AUTO_ZRELADDR=y - CONFIG_AX25=m -@@ -2481,7 +2459,6 @@ CONFIG_DELL_SMBIOS=m - CONFIG_DELL_SMBIOS_SMM=y - CONFIG_DELL_SMBIOS_WMI=y - CONFIG_DELL_SMO8800=m --CONFIG_DELL_UART_BACKLIGHT=m - CONFIG_DELL_WMI=m - CONFIG_DELL_WMI_AIO=m - CONFIG_DELL_WMI_DESCRIPTOR=m -@@ -5187,7 +5164,6 @@ CONFIG_KGDB_KDB=y - CONFIG_KGDB_LOW_LEVEL_TRAP=y - CONFIG_KGDB_SERIAL_CONSOLE=y - # CONFIG_KGDB_TESTS is not set --CONFIG_KMSG_IDS=y - CONFIG_KMX61=m - CONFIG_KPC2000=y - CONFIG_KPC2000_CORE=m -@@ -5415,7 +5391,6 @@ CONFIG_LOCKDEP_SUPPORT=y - CONFIG_LOCKD_V4=y - CONFIG_LOCKUP_DETECTOR=y - CONFIG_LOCK_DEBUGGING_SUPPORT=y --CONFIG_LOCK_DOWN_IN_SECURE_BOOT=y - # CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set - # CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set - CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y -@@ -8556,14 +8531,12 @@ CONFIG_RTLWIFI_USB=m - CONFIG_RTL_CARDS=m - CONFIG_RTS5208=m - CONFIG_RTW88=m --CONFIG_RTW88_8723DE=y - CONFIG_RTW88_8822BE=y - CONFIG_RTW88_8822CE=y - CONFIG_RTW88_CORE=m - # CONFIG_RTW88_DEBUG is not set - # CONFIG_RTW88_DEBUGFS is not set - CONFIG_RTW88_PCI=m --# CONFIG_RTW88_REGD_USER_REG_HINTS is not set - # CONFIG_RT_GROUP_SCHED is not set - CONFIG_RT_MUTEXES=y - CONFIG_RUNTIME_TESTING_MENU=y -@@ -9156,8 +9129,6 @@ CONFIG_SGI_XP=m - CONFIG_SGL_ALLOC=y - CONFIG_SG_POOL=y - CONFIG_SG_SPLIT=y --CONFIG_SHIFT_FS=m --CONFIG_SHIFT_FS_POSIX_ACL=y - CONFIG_SHMEM=y - CONFIG_SHUFFLE_PAGE_ALLOCATOR=y - CONFIG_SH_ETH=m -@@ -9479,8 +9450,6 @@ CONFIG_SND_SOC_AMD_ACP=m - CONFIG_SND_SOC_AMD_ACP3x=m - CONFIG_SND_SOC_AMD_CZ_DA7219MX98357_MACH=m - CONFIG_SND_SOC_AMD_CZ_RT5645_MACH=m --CONFIG_SND_SOC_AMD_RENOIR=m --CONFIG_SND_SOC_AMD_RENOIR_MACH=m - CONFIG_SND_SOC_AMD_RV_RT5682_MACH=m - CONFIG_SND_SOC_APQ8016_SBC=m - CONFIG_SND_SOC_ARIZONA=m -@@ -11267,7 +11236,6 @@ CONFIG_VDPA_SIM=m - CONFIG_VDSO=y - CONFIG_VEML6030=m - CONFIG_VEML6070=m --CONFIG_VERSION_SIGNATURE="" - CONFIG_VETH=m - CONFIG_VEXPRESS_CONFIG=y - CONFIG_VEXPRESS_SYSCFG=y -@@ -11708,7 +11676,6 @@ CONFIG_WATCHDOG_RTAS=m - CONFIG_WATCHDOG_SYSFS=y - CONFIG_WCN36XX=m - # CONFIG_WCN36XX_DEBUGFS is not set --# CONFIG_WCN36XX_SNAPDRAGON_HACKS is not set - CONFIG_WD80x3=m - CONFIG_WDAT_WDT=m - CONFIG_WDT=m -diff --git a/debian.master/config/i386/config.common.i386 b/debian.master/config/i386/config.common.i386 -index e62994cdf221..821f0a41d7cf 100644 ---- a/debian.master/config/i386/config.common.i386 -+++ b/debian.master/config/i386/config.common.i386 -@@ -182,7 +182,6 @@ CONFIG_HFSPLUS_FS=m - CONFIG_HFS_FS=m - CONFIG_HIBERNATION=y - CONFIG_HID=m --CONFIG_HIO=m - CONFIG_HMC6352=m - CONFIG_HOTPLUG_PCI=y - CONFIG_HOTPLUG_PCI_SHPC=y -diff --git a/debian.master/config/i386/config.flavour.generic b/debian.master/config/i386/config.flavour.generic -index 5c2e4e1d3a9f..965113b110ce 100644 ---- a/debian.master/config/i386/config.flavour.generic -+++ b/debian.master/config/i386/config.flavour.generic -@@ -4,6 +4,5 @@ - CONFIG_HZ=250 - # CONFIG_HZ_1000 is not set - CONFIG_HZ_250=y --# CONFIG_IRQ_FORCED_THREADING_DEFAULT is not set - # CONFIG_PREEMPT is not set - CONFIG_PREEMPT_VOLUNTARY=y -diff --git a/debian.master/config/i386/config.flavour.lowlatency b/debian.master/config/i386/config.flavour.lowlatency -index 6b121e3f433b..0af82e00adce 100644 ---- a/debian.master/config/i386/config.flavour.lowlatency -+++ b/debian.master/config/i386/config.flavour.lowlatency -@@ -4,6 +4,5 @@ - CONFIG_HZ=1000 - CONFIG_HZ_1000=y - # CONFIG_HZ_250 is not set --CONFIG_IRQ_FORCED_THREADING_DEFAULT=y - CONFIG_PREEMPT=y - # CONFIG_PREEMPT_VOLUNTARY is not set -diff --git a/debian.master/config/ppc64el/config.common.ppc64el b/debian.master/config/ppc64el/config.common.ppc64el -index 729f8e2647f3..fba24cc25001 100644 ---- a/debian.master/config/ppc64el/config.common.ppc64el -+++ b/debian.master/config/ppc64el/config.common.ppc64el -@@ -184,7 +184,6 @@ CONFIG_HFSPLUS_FS=m - CONFIG_HFS_FS=m - # CONFIG_HIBERNATION is not set - CONFIG_HID=m --# CONFIG_HIO is not set - CONFIG_HMC6352=m - CONFIG_HOTPLUG_PCI=y - # CONFIG_HOTPLUG_PCI_SHPC is not set -@@ -270,7 +269,6 @@ CONFIG_IPACK_BUS=m - CONFIG_IPMI_HANDLER=m - # CONFIG_IP_DCCP_CCID3 is not set - CONFIG_IRQ_BYPASS_MANAGER=y --# CONFIG_IRQ_FORCED_THREADING_DEFAULT is not set - CONFIG_ISL29003=m - CONFIG_ISL29020=m - CONFIG_JFS_FS=m -diff --git a/debian.master/config/s390x/config.common.s390x b/debian.master/config/s390x/config.common.s390x -index 4fdac229f6a9..5c58a16b5350 100644 ---- a/debian.master/config/s390x/config.common.s390x -+++ b/debian.master/config/s390x/config.common.s390x -@@ -170,7 +170,6 @@ CONFIG_GPIO_GENERIC_PLATFORM=m - # CONFIG_HFSPLUS_FS is not set - # CONFIG_HFS_FS is not set - # CONFIG_HID is not set --# CONFIG_HIO is not set - # CONFIG_HMC6352 is not set - CONFIG_HOTPLUG_PCI=y - # CONFIG_HOTPLUG_PCI_SHPC is not set --- -2.17.1 - diff --git a/patches/4001-touchpad.patch b/patches/4001-touchpad.patch deleted file mode 100644 index bdde4cfb..00000000 --- a/patches/4001-touchpad.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c -index 6ac8becc2372..b1143139599a 100644 ---- a/drivers/hid/hid-apple.c -+++ b/drivers/hid/hid-apple.c -@@ -561,6 +561,16 @@ static const struct hid_device_id apple_devices[] = { - .driver_data = APPLE_HAS_FN }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS), - .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_A), -+ .driver_data = APPLE_HAS_FN }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_B), -+ .driver_data = APPLE_HAS_FN }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_C), -+ .driver_data = APPLE_HAS_FN }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_D), -+ .driver_data = APPLE_HAS_FN }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING11_T2), -+ .driver_data = APPLE_HAS_FN }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI), - .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO), -diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h -index 3a400ce603c4..d7c678017b12 100644 ---- a/drivers/hid/hid-ids.h -+++ b/drivers/hid/hid-ids.h -@@ -168,6 +168,11 @@ - #define USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI 0x0272 - #define USB_DEVICE_ID_APPLE_WELLSPRING9_ISO 0x0273 - #define USB_DEVICE_ID_APPLE_WELLSPRING9_JIS 0x0274 -+#define USB_DEVICE_ID_APPLE_WELLSPRING10_T2_A 0x027a -+#define USB_DEVICE_ID_APPLE_WELLSPRING10_T2_B 0x027b -+#define USB_DEVICE_ID_APPLE_WELLSPRING10_T2_C 0x027c -+#define USB_DEVICE_ID_APPLE_WELLSPRING10_T2_D 0x027d -+#define USB_DEVICE_ID_APPLE_WELLSPRING11_T2 0x0340 - #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a - #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b - #define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240 -diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c -index 0e7b2d998395..ba9c0dcbea9e 100644 ---- a/drivers/hid/hid-quirks.c -+++ b/drivers/hid/hid-quirks.c -@@ -274,6 +274,11 @@ static const struct hid_device_id hid_have_special_driver[] = { - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_A) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_B) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_C) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_D) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING11_T2) }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, -@@ -908,6 +913,11 @@ static const struct hid_device_id hid_mouse_ignore_list[] = { - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_ISO) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_A) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_B) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_C) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_D) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING11_T2) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, - { } -diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c -index 59a14505b9cd..63ab0b804a94 100644 ---- a/drivers/input/mouse/bcm5974.c -+++ b/drivers/input/mouse/bcm5974.c -@@ -82,6 +82,17 @@ - #define USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI 0x0272 - #define USB_DEVICE_ID_APPLE_WELLSPRING9_ISO 0x0273 - #define USB_DEVICE_ID_APPLE_WELLSPRING9_JIS 0x0274 -+/* T2-Attached Devices */ -+/* MacbookAir8,1 (2018) */ -+#define USB_DEVICE_ID_APPLE_WELLSPRING10_T2_A 0x027a -+/* MacbookPro15,2 (2018) */ -+#define USB_DEVICE_ID_APPLE_WELLSPRING10_T2_B 0x027b -+/* MacbookPro15,1 (2018) */ -+#define USB_DEVICE_ID_APPLE_WELLSPRING10_T2_C 0x027c -+/* MacbookPro15,4 (2019) */ -+#define USB_DEVICE_ID_APPLE_WELLSPRING10_T2_D 0x027d -+/* MacbookPro16,1 (2019)*/ -+#define USB_DEVICE_ID_APPLE_WELLSPRING11_T2 0x0340 - - #define BCM5974_DEVICE(prod) { \ - .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ -@@ -147,6 +158,16 @@ static const struct usb_device_id bcm5974_table[] = { - BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_ANSI), - BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_ISO), - BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING9_JIS), -+ /* MacbookAir8,1 */ -+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING10_T2_A), -+ /* MacbookPro15,2 */ -+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING10_T2_B), -+ /* MacbookPro15,1 */ -+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING10_T2_C), -+ /* MacbookPro15,4 */ -+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING10_T2_D), -+ /* MacbookPro16,1 */ -+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING11_T2), - /* Terminating entry */ - {} - }; -@@ -483,6 +504,71 @@ static const struct bcm5974_config bcm5974_config_table[] = { - { SN_COORD, -203, 6803 }, - { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION } - }, -+ { -+ USB_DEVICE_ID_APPLE_WELLSPRING10_T2_A, -+ 0, -+ 0, -+ HAS_INTEGRATED_BUTTON, -+ 0, sizeof(struct bt_data), -+ 0x83, DATAFORMAT(TYPE4), -+ { SN_PRESSURE, 0, 300 }, -+ { SN_WIDTH, 0, 2048 }, -+ { SN_COORD, -6243, 6749 }, -+ { SN_COORD, -170, 7685 }, -+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION } -+ }, -+ { -+ USB_DEVICE_ID_APPLE_WELLSPRING10_T2_B, -+ 0, -+ 0, -+ HAS_INTEGRATED_BUTTON, -+ 0, sizeof(struct bt_data), -+ 0x83, DATAFORMAT(TYPE4), -+ { SN_PRESSURE, 0, 300 }, -+ { SN_WIDTH, 0, 2048 }, -+ { SN_COORD, -6243, 6749 }, -+ { SN_COORD, -170, 7685 }, -+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION } -+ }, -+ { -+ USB_DEVICE_ID_APPLE_WELLSPRING10_T2_C, -+ 0, -+ 0, -+ HAS_INTEGRATED_BUTTON, -+ 0, sizeof(struct bt_data), -+ 0x83, DATAFORMAT(TYPE4), -+ { SN_PRESSURE, 0, 300 }, -+ { SN_WIDTH, 0, 2048 }, -+ { SN_COORD, -7456, 7976 }, -+ { SN_COORD, -1768, 7685 }, -+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION } -+ }, -+ { -+ USB_DEVICE_ID_APPLE_WELLSPRING10_T2_D, -+ 0, -+ 0, -+ HAS_INTEGRATED_BUTTON, -+ 0, sizeof(struct bt_data), -+ 0x83, DATAFORMAT(TYPE4), -+ { SN_PRESSURE, 0, 300 }, -+ { SN_WIDTH, 0, 2048 }, -+ { SN_COORD, -6243, 6749 }, -+ { SN_COORD, -170, 7685 }, -+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION } -+ }, -+ { -+ USB_DEVICE_ID_APPLE_WELLSPRING11_T2, -+ 0, -+ 0, -+ HAS_INTEGRATED_BUTTON, -+ 0, sizeof(struct bt_data), -+ 0x83, DATAFORMAT(TYPE4), -+ { SN_PRESSURE, 0, 300 }, -+ { SN_WIDTH, 0, 2048 }, -+ { SN_COORD, -7456, 7976 }, -+ { SN_COORD, -1768, 7685 }, -+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION } -+ }, - {} - }; - diff --git a/patches/4002-keyboard-backlight.patch b/patches/4002-keyboard-backlight.patch deleted file mode 100644 index 5a54bde3..00000000 --- a/patches/4002-keyboard-backlight.patch +++ /dev/null @@ -1,270 +0,0 @@ -diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c -index 9c7f68bb0b99..85560293d45e 100644 ---- a/drivers/hid/hid-apple.c -+++ b/drivers/hid/hid-apple.c -@@ -7,6 +7,7 @@ - * Copyright (c) 2005 Michael Haboustak for Concept2, Inc - * Copyright (c) 2006-2007 Jiri Kosina - * Copyright (c) 2008 Jiri Slaby -+ * Copyright (c) 2019 Paul Pawlowski - */ - - /* -@@ -30,6 +31,7 @@ - #define APPLE_INVERT_HWHEEL 0x0040 - #define APPLE_IGNORE_HIDINPUT 0x0080 - #define APPLE_NUMLOCK_EMULATION 0x0100 -+#define APPLE_BACKLIGHT_CTL 0x0200 - - #define APPLE_FLAG_FKEY 0x01 - -@@ -51,11 +53,29 @@ MODULE_PARM_DESC(swap_opt_cmd, "Swap the Option (\"Alt\") and Command (\"Flag\") - "(For people who want to keep Windows PC keyboard muscle memory. " - "[0] = as-is, Mac layout. 1 = swapped, Windows layout.)"); - -+static unsigned int swap_fn_leftctrl; -+module_param(swap_fn_leftctrl, uint, 0644); -+MODULE_PARM_DESC(swap_fn_leftctrl, "Swap the Fn and left Control keys. " -+ "(For people who want to keep PC keyboard muscle memory. " -+ "[0] = as-is, Mac layout, 1 = swapped, PC layout)"); -+ -+static unsigned int rightalt_as_rightctrl; -+module_param(rightalt_as_rightctrl, uint, 0644); -+MODULE_PARM_DESC(rightalt_as_rightctrl, "Use the right Alt key as a right Ctrl key. " -+ "[0] = as-is, Mac layout. 1 = Right Alt is right Ctrl"); -+ -+struct apple_sc_backlight { -+ struct led_classdev cdev; -+ struct hid_device *hdev; -+ unsigned short backlight_off, backlight_on_min, backlight_on_max; -+}; -+ - struct apple_sc { - unsigned long quirks; - unsigned int fn_on; - unsigned int fn_found; - DECLARE_BITMAP(pressed_numlock, KEY_CNT); -+ struct apple_sc_backlight *backlight; - }; - - struct apple_key_translation { -@@ -163,6 +183,29 @@ static const struct apple_key_translation swapped_option_cmd_keys[] = { - { } - }; - -+static const struct apple_key_translation swapped_fn_leftctrl_keys[] = { -+ { KEY_FN, KEY_LEFTCTRL }, -+ { } -+}; -+ -+static const struct apple_key_translation rightalt_as_rightctrl_keys[] = { -+ { KEY_RIGHTALT, KEY_RIGHTCTRL }, -+ { } -+}; -+ -+struct apple_backlight_config_report { -+ u8 report_id; -+ u8 version; -+ u16 backlight_off, backlight_on_min, backlight_on_max; -+}; -+ -+struct apple_backlight_set_report { -+ u8 report_id; -+ u8 version; -+ u16 backlight; -+ u16 rate; -+}; -+ - static const struct apple_key_translation *apple_find_translation( - const struct apple_key_translation *table, u16 from) - { -@@ -184,9 +227,11 @@ - bool do_translate; - u16 code = 0; - -- if (usage->code == KEY_FN) { -+ u16 fn_keycode = (swap_fn_leftctrl) ? (KEY_LEFTCTRL) : (KEY_FN); -+ -+ if (usage->code == fn_keycode) { - asc->fn_on = !!value; -- input_event(input, usage->type, usage->code, value); -+ input_event(input, usage->type, KEY_FN, value); - return 1; - } - -@@ -271,7 +316,21 @@ - } - } - -- return 0; -+ if (rightalt_as_rightctrl) { -+ trans = apple_find_translation(rightalt_as_rightctrl_keys, usage->code); -+ if (trans) { -+ input_event(input, usage->type, trans->to, value); -+ return 1; -+ } -+ } -+ if (swap_fn_leftctrl) { -+ trans = apple_find_translation(swapped_fn_leftctrl_keys, usage->code); -+ if (trans) { -+ input_event(input, usage->type, trans->to, value); -+ return 1; -+ } -+ } -+ return 0; - } - - static int apple_event(struct hid_device *hdev, struct hid_field *field, -@@ -334,6 +393,16 @@ - - for (trans = apple_iso_keyboard; trans->from; trans++) - set_bit(trans->to, input->keybit); -+ -+ if (swap_fn_leftctrl) { -+ for (trans = swapped_fn_leftctrl_keys; trans->from; trans++) -+ set_bit(trans->to, input->keybit); -+ } -+ -+ if (rightalt_as_rightctrl) { -+ for (trans = rightalt_as_rightctrl_keys; trans->from; trans++) -+ set_bit(trans->to, input->keybit); -+ } - } - - static int apple_input_mapping(struct hid_device *hdev, struct hid_input *hi, -@@ -388,6 +457,101 @@ static int apple_input_configured(struct hid_device *hdev, - return 0; - } - -+static bool apple_backlight_check_support(struct hid_device *hdev) -+{ -+ int i; -+ unsigned hid; -+ struct hid_report *report; -+ -+ list_for_each_entry(report, &hdev->report_enum[HID_INPUT_REPORT].report_list, list) { -+ for (i = 0; i < report->maxfield; i++) { -+ hid = report->field[i]->usage->hid; -+ if ((hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR && (hid & HID_USAGE) == 0xf) -+ return true; -+ } -+ } -+ -+ return false; -+} -+ -+static int apple_backlight_set(struct hid_device *hdev, u16 value, u16 rate) -+{ -+ int ret = 0; -+ struct apple_backlight_set_report *rep; -+ -+ rep = kmalloc(sizeof(*rep), GFP_KERNEL); -+ if (rep == NULL) -+ return -ENOMEM; -+ -+ rep->report_id = 0xB0; -+ rep->version = 1; -+ rep->backlight = value; -+ rep->rate = rate; -+ -+ ret = hid_hw_raw_request(hdev, 0xB0u, (u8 *) rep, sizeof(*rep), HID_OUTPUT_REPORT, HID_REQ_SET_REPORT); -+ -+ kfree(rep); -+ return ret; -+} -+ -+static int apple_backlight_led_set(struct led_classdev *led_cdev, -+ enum led_brightness brightness) -+{ -+ struct apple_sc_backlight *backlight = container_of(led_cdev, struct apple_sc_backlight, cdev); -+ return apple_backlight_set(backlight->hdev, brightness, 0); -+} -+ -+static int apple_backlight_init(struct hid_device *hdev) -+{ -+ int ret; -+ struct apple_sc *asc = hid_get_drvdata(hdev); -+ struct apple_backlight_config_report *rep; -+ -+ if (!apple_backlight_check_support(hdev)) -+ return -EINVAL; -+ -+ rep = kmalloc(0x200, GFP_KERNEL); -+ if (rep == NULL) -+ return -ENOMEM; -+ -+ ret = hid_hw_raw_request(hdev, 0xBFu, (u8 *) rep, sizeof(*rep), HID_FEATURE_REPORT, HID_REQ_GET_REPORT); -+ if (ret < 0) { -+ hid_err(hdev, "backlight request failed: %d\n", ret); -+ goto cleanup_and_exit; -+ } -+ if (ret < 8 || rep->version != 1) { -+ hid_err(hdev, "backlight config struct: bad version %i\n", rep->version); -+ ret = -EINVAL; -+ goto cleanup_and_exit; -+ } -+ -+ hid_dbg(hdev, "backlight config: off=%u, on_min=%u, on_max=%u\n", -+ rep->backlight_off, rep->backlight_on_min, rep->backlight_on_max); -+ -+ asc->backlight = devm_kzalloc(&hdev->dev, sizeof(*asc->backlight), GFP_KERNEL); -+ if (!asc->backlight) { -+ ret = -ENOMEM; -+ goto cleanup_and_exit; -+ } -+ -+ asc->backlight->hdev = hdev; -+ asc->backlight->cdev.name = "apple::kbd_backlight"; -+ asc->backlight->cdev.max_brightness = rep->backlight_on_max; -+ asc->backlight->cdev.brightness_set_blocking = apple_backlight_led_set; -+ -+ ret = apple_backlight_set(hdev, 0, 0); -+ if (ret < 0) { -+ hid_err(hdev, "backlight set request failed: %d\n", ret); -+ goto cleanup_and_exit; -+ } -+ -+ ret = devm_led_classdev_register(&hdev->dev, &asc->backlight->cdev); -+ -+cleanup_and_exit: -+ kfree(rep); -+ return ret; -+} -+ - static int apple_probe(struct hid_device *hdev, - const struct hid_device_id *id) - { -@@ -423,6 +587,12 @@ static int apple_probe(struct hid_device *hdev, - return ret; - } - -+ if (quirks & APPLE_BACKLIGHT_CTL) { -+ ret = apple_backlight_init(hdev); -+ if (ret < 0) -+ hid_warn(hdev, "backlight init failed: %d\n", ret); -+ } -+ - return 0; - } - -@@ -580,15 +703,15 @@ static const struct hid_device_id apple_devices[] = { - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING9_JIS), - .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_A), -- .driver_data = APPLE_HAS_FN }, -+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_B), -- .driver_data = APPLE_HAS_FN }, -+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_C), -- .driver_data = APPLE_HAS_FN }, -+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING10_T2_D), -- .driver_data = APPLE_HAS_FN }, -+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING11_T2), -- .driver_data = APPLE_HAS_FN }, -+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI), - .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO), diff --git a/patches/camera.patch b/patches/camera.patch deleted file mode 100644 index 88aaaa09..00000000 --- a/patches/camera.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c -index 10cfe8e51626..6a81c7ffda5f 100644 ---- a/drivers/media/usb/uvc/uvc_driver.c -+++ b/drivers/media/usb/uvc/uvc_driver.c -@@ -2874,6 +2874,15 @@ static const struct usb_device_id uvc_ids[] = { - .bInterfaceSubClass = 1, - .bInterfaceProtocol = 0, - .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) }, -+ /* Apple Built-In iSight via iBridge */ -+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE -+ | USB_DEVICE_ID_MATCH_INT_INFO, -+ .idVendor = 0x05ac, -+ .idProduct = 0x8514, -+ .bInterfaceClass = USB_CLASS_VIDEO, -+ .bInterfaceSubClass = 1, -+ .bInterfaceProtocol = 0, -+ .driver_info = (kernel_ulong_t)&uvc_quirk_probe_def }, - /* Generic USB Video Class */ - { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) }, - { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) }, diff --git a/patches/wifi.patch b/patches/wifi.patch deleted file mode 100644 index 2c8db343..00000000 --- a/patches/wifi.patch +++ /dev/null @@ -1,148 +0,0 @@ -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -index a3a257089..b2ee4a214 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c -@@ -703,6 +703,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) - switch (ci->pub.chip) { - case BRCM_CC_4345_CHIP_ID: - return 0x198000; -+ case BRCM_CC_4377_CHIP_ID: /* MacBookPro15,4 */ - case BRCM_CC_4335_CHIP_ID: - case BRCM_CC_4339_CHIP_ID: - case BRCM_CC_4350_CHIP_ID: -@@ -721,9 +722,10 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) - case BRCM_CC_4366_CHIP_ID: - case BRCM_CC_43664_CHIP_ID: - return 0x200000; -+ case BRCM_CC_4355_CHIP_ID: /* MacBookAir8,x */ - case BRCM_CC_4359_CHIP_ID: - return (ci->pub.chiprev < 9) ? 0x180000 : 0x160000; -- case BRCM_CC_4364_CHIP_ID: -+ case BRCM_CC_4364_CHIP_ID: /* MacBookPro15,x, 16,x */ - case CY_CC_4373_CHIP_ID: - return 0x160000; - default: -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -index 39381cbde..b7af5ee30 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c -@@ -48,16 +48,18 @@ enum brcmf_pcie_state { - BRCMF_FW_DEF(43602, "brcmfmac43602-pcie"); - BRCMF_FW_DEF(4350, "brcmfmac4350-pcie"); - BRCMF_FW_DEF(4350C, "brcmfmac4350c2-pcie"); -+BRCMF_FW_DEF(4355, "brcmfmac4355-pcie"); /* MacBookAir8,x */ - BRCMF_FW_DEF(4356, "brcmfmac4356-pcie"); - BRCMF_FW_DEF(43570, "brcmfmac43570-pcie"); - BRCMF_FW_DEF(4358, "brcmfmac4358-pcie"); - BRCMF_FW_DEF(4359, "brcmfmac4359-pcie"); --BRCMF_FW_DEF(4364, "brcmfmac4364-pcie"); -+BRCMF_FW_DEF(4364, "brcmfmac4364-pcie"); /* MacBookPro15,x 16,x */ - BRCMF_FW_DEF(4365B, "brcmfmac4365b-pcie"); - BRCMF_FW_DEF(4365C, "brcmfmac4365c-pcie"); - BRCMF_FW_DEF(4366B, "brcmfmac4366b-pcie"); - BRCMF_FW_DEF(4366C, "brcmfmac4366c-pcie"); - BRCMF_FW_DEF(4371, "brcmfmac4371-pcie"); -+BRCMF_FW_DEF(4377, "brcmfmac4377-pcie"); /* MacBookPro15,4 */ - - static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { - BRCMF_FW_ENTRY(BRCM_CC_43602_CHIP_ID, 0xFFFFFFFF, 43602), -@@ -65,19 +67,21 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { - BRCMF_FW_ENTRY(BRCM_CC_4350_CHIP_ID, 0x000000FF, 4350C), - BRCMF_FW_ENTRY(BRCM_CC_4350_CHIP_ID, 0xFFFFFF00, 4350), - BRCMF_FW_ENTRY(BRCM_CC_43525_CHIP_ID, 0xFFFFFFF0, 4365C), -+ BRCMF_FW_ENTRY(BRCM_CC_4355_CHIP_ID, 0xFFFFFFFF, 4355), /* MacBookAir8,x */ - BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356), - BRCMF_FW_ENTRY(BRCM_CC_43567_CHIP_ID, 0xFFFFFFFF, 43570), - BRCMF_FW_ENTRY(BRCM_CC_43569_CHIP_ID, 0xFFFFFFFF, 43570), - BRCMF_FW_ENTRY(BRCM_CC_43570_CHIP_ID, 0xFFFFFFFF, 43570), - BRCMF_FW_ENTRY(BRCM_CC_4358_CHIP_ID, 0xFFFFFFFF, 4358), - BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359), -- BRCMF_FW_ENTRY(BRCM_CC_4364_CHIP_ID, 0xFFFFFFFF, 4364), -+ BRCMF_FW_ENTRY(BRCM_CC_4364_CHIP_ID, 0xFFFFFFFF, 4364), /* MacBookPro15,x 16,x */ - BRCMF_FW_ENTRY(BRCM_CC_4365_CHIP_ID, 0x0000000F, 4365B), - BRCMF_FW_ENTRY(BRCM_CC_4365_CHIP_ID, 0xFFFFFFF0, 4365C), - BRCMF_FW_ENTRY(BRCM_CC_4366_CHIP_ID, 0x0000000F, 4366B), - BRCMF_FW_ENTRY(BRCM_CC_4366_CHIP_ID, 0xFFFFFFF0, 4366C), - BRCMF_FW_ENTRY(BRCM_CC_43664_CHIP_ID, 0xFFFFFFF0, 4366C), - BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371), -+ BRCMF_FW_ENTRY(BRCM_CC_4377_CHIP_ID, 0xFFFFFFFF, 4377), /* MacBookPro15,4 */ - }; - - #define BRCMF_PCIE_FW_UP_TIMEOUT 5000 /* msec */ -@@ -2098,6 +2102,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { - BRCMF_PCIE_DEVICE(BRCM_PCIE_4350_DEVICE_ID), - BRCMF_PCIE_DEVICE_SUB(0x4355, BRCM_PCIE_VENDOR_ID_BROADCOM, 0x4355), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4354_RAW_DEVICE_ID), -+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4355_DEVICE_ID), /* MacBookAir8,x */ - BRCMF_PCIE_DEVICE(BRCM_PCIE_4356_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID), -@@ -2107,7 +2112,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { - BRCMF_PCIE_DEVICE(BRCM_PCIE_43602_2G_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_43602_5G_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_43602_RAW_DEVICE_ID), -- BRCMF_PCIE_DEVICE(BRCM_PCIE_4364_DEVICE_ID), -+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4364_DEVICE_ID), /* MacBookPro15,x 16,x */ - BRCMF_PCIE_DEVICE(BRCM_PCIE_4365_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4365_2G_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4365_5G_DEVICE_ID), -@@ -2116,6 +2121,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { - BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_2G_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID), -+ BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID), /* MacBookPro15,4 */ - { /* end: all zeroes */ } - }; - -diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -index c6c4be051..20abac3e0 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h -@@ -36,6 +36,7 @@ - #define BRCM_CC_4350_CHIP_ID 0x4350 - #define BRCM_CC_43525_CHIP_ID 43525 - #define BRCM_CC_4354_CHIP_ID 0x4354 -+#define BRCM_CC_4355_CHIP_ID 0x4355 /* MacBookAir8,x */ - #define BRCM_CC_4356_CHIP_ID 0x4356 - #define BRCM_CC_43566_CHIP_ID 43566 - #define BRCM_CC_43567_CHIP_ID 43567 -@@ -44,11 +45,12 @@ - #define BRCM_CC_4358_CHIP_ID 0x4358 - #define BRCM_CC_4359_CHIP_ID 0x4359 - #define BRCM_CC_43602_CHIP_ID 43602 --#define BRCM_CC_4364_CHIP_ID 0x4364 -+#define BRCM_CC_4364_CHIP_ID 0x4364 /* MacBookPro15,x 16,x */ - #define BRCM_CC_4365_CHIP_ID 0x4365 - #define BRCM_CC_4366_CHIP_ID 0x4366 - #define BRCM_CC_43664_CHIP_ID 43664 - #define BRCM_CC_4371_CHIP_ID 0x4371 -+#define BRCM_CC_4377_CHIP_ID 0x4377 /* MacBookPro15,4 */ - #define CY_CC_4373_CHIP_ID 0x4373 - #define CY_CC_43012_CHIP_ID 43012 - -@@ -66,6 +68,7 @@ - #define BRCM_PCIE_4350_DEVICE_ID 0x43a3 - #define BRCM_PCIE_4354_DEVICE_ID 0x43df - #define BRCM_PCIE_4354_RAW_DEVICE_ID 0x4354 -+#define BRCM_PCIE_4355_DEVICE_ID 0x43dc /* MacBookAir8,x */ - #define BRCM_PCIE_4356_DEVICE_ID 0x43ec - #define BRCM_PCIE_43567_DEVICE_ID 0x43d3 - #define BRCM_PCIE_43570_DEVICE_ID 0x43d9 -@@ -75,7 +78,7 @@ - #define BRCM_PCIE_43602_2G_DEVICE_ID 0x43bb - #define BRCM_PCIE_43602_5G_DEVICE_ID 0x43bc - #define BRCM_PCIE_43602_RAW_DEVICE_ID 43602 --#define BRCM_PCIE_4364_DEVICE_ID 0x4464 -+#define BRCM_PCIE_4364_DEVICE_ID 0x4464 /* MacBookPro15,x 16,x */ - #define BRCM_PCIE_4365_DEVICE_ID 0x43ca - #define BRCM_PCIE_4365_2G_DEVICE_ID 0x43cb - #define BRCM_PCIE_4365_5G_DEVICE_ID 0x43cc -@@ -83,6 +86,7 @@ - #define BRCM_PCIE_4366_2G_DEVICE_ID 0x43c4 - #define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 - #define BRCM_PCIE_4371_DEVICE_ID 0x440d -+#define BRCM_PCIE_4377_DEVICE_ID 0x4488 /* MacBookPro15,4 */ - - - /* brcmsmac IDs */ -