8fea94d44aeea0a3b27c42d3195c78d1e47f8403
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.9 / 950-0121-ARM64-Make-it-work-again-on-4.9-1790.patch
1 From fe3c34c6196cfc708a515e44dd432da0e6cc0aba Mon Sep 17 00:00:00 2001
2 From: Electron752 <mzoran@crowfest.net>
3 Date: Thu, 12 Jan 2017 07:07:08 -0800
4 Subject: [PATCH] ARM64: Make it work again on 4.9 (#1790)
5
6 * Invoke the dtc compiler with the same options used in arm mode.
7 * ARM64 now uses the bcm2835 platform just like ARM32.
8 * ARM64: Update bcmrpi3_defconfig
9
10 Signed-off-by: Michael Zoran <mzoran@crowfest.net>
11 ---
12 arch/arm64/Kconfig.platforms | 22 ------
13 arch/arm64/boot/dts/broadcom/Makefile | 10 ++-
14 arch/arm64/boot/dts/overlays | 1 +
15 arch/arm64/configs/bcmrpi3_defconfig | 126 ++++++++++------------------------
16 4 files changed, 48 insertions(+), 111 deletions(-)
17 create mode 120000 arch/arm64/boot/dts/overlays
18
19 --- a/arch/arm64/Kconfig.platforms
20 +++ b/arch/arm64/Kconfig.platforms
21 @@ -1,27 +1,5 @@
22 menu "Platform selection"
23
24 -config MACH_BCM2709
25 - bool
26 -
27 -config ARCH_BCM2709
28 - bool "Broadcom BCM2709 family"
29 - select MACH_BCM2709
30 - select HAVE_SMP
31 - select ARM_AMBA
32 - select COMMON_CLK
33 - select ARCH_HAS_CPUFREQ
34 - select GENERIC_CLOCKEVENTS
35 - select MULTI_IRQ_HANDLER
36 - select SPARSE_IRQ
37 - select MFD_SYSCON
38 - select VC4
39 - select USE_OF
40 - select ARCH_REQUIRE_GPIOLIB
41 - select PINCTRL
42 - select PINCTRL_BCM2835
43 - help
44 - This enables support for Broadcom BCM2709 boards.
45 -
46 config ARCH_SUNXI
47 bool "Allwinner sunxi 64-bit SoC Family"
48 select GENERIC_IRQ_CHIP
49 --- a/arch/arm64/boot/dts/broadcom/Makefile
50 +++ b/arch/arm64/boot/dts/broadcom/Makefile
51 @@ -1,7 +1,15 @@
52 +# Enable fixups to support overlays on BCM2835 platforms
53 +
54 +ifeq ($(CONFIG_ARCH_BCM2835),y)
55 +DTC_FLAGS ?= -@ -H epapr
56 +endif
57 +
58 dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
59 dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-svk.dtb
60 dtb-$(CONFIG_ARCH_VULCAN) += vulcan-eval.dtb
61 -dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-3-b.dtb
62 +dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb
63 +
64 +dts-dirs += ../overlays
65
66 always := $(dtb-y)
67 subdir-y := $(dts-dirs)
68 --- a/arch/arm64/configs/bcmrpi3_defconfig
69 +++ b/arch/arm64/configs/bcmrpi3_defconfig
70 @@ -1,52 +1,9 @@
71 -# CONFIG_ARM_PATCH_PHYS_VIRT is not set
72 -CONFIG_PHYS_OFFSET=0
73 CONFIG_LOCALVERSION="-v8"
74 # CONFIG_LOCALVERSION_AUTO is not set
75 -CONFIG_64BIT=y
76 CONFIG_SYSVIPC=y
77 CONFIG_POSIX_MQUEUE=y
78 CONFIG_NO_HZ=y
79 CONFIG_HIGH_RES_TIMERS=y
80 -
81 -#
82 -# ARM errata workarounds via the alternatives framework
83 -#
84 -CONFIG_ARM64_ERRATUM_826319=n
85 -CONFIG_ARM64_ERRATUM_827319=n
86 -CONFIG_ARM64_ERRATUM_824069=n
87 -CONFIG_ARM64_ERRATUM_819472=n
88 -CONFIG_ARM64_ERRATUM_832075=n
89 -CONFIG_ARM64_ERRATUM_845719=n
90 -CONFIG_ARM64_ERRATUM_843419=n
91 -CONFIG_CAVIUM_ERRATUM_22375=n
92 -CONFIG_CAVIUM_ERRATUM_23154=n
93 -CONFIG_CAVIUM_ERRATUM_27456=n
94 -CONFIG_ARM64_4K_PAGES=y
95 -CONFIG_ARM64_VA_BITS_39=y
96 -CONFIG_ARM64_VA_BITS=39
97 -CONFIG_SCHED_MC=y
98 -CONFIG_NR_CPUS=4
99 -CONFIG_HOTPLUG_CPU=y
100 -CONFIG_ARMV8_DEPRECATED=y
101 -CONFIG_SWP_EMULATION=y
102 -CONFIG_CP15_BARRIER_EMULATION=y
103 -CONFIG_SETEND_EMULATION=y
104 -
105 -#
106 -# ARMv8.1 architectural features
107 -#
108 -CONFIG_ARM64_HW_AFDBM=y
109 -CONFIG_ARM64_PAN=y
110 -CONFIG_ARM64_LSE_ATOMICS=y
111 -CONFIG_ARM64_VHE=y
112 -
113 -#
114 -# ARMv8.2 architectural features
115 -#
116 -CONFIG_ARM64_UAO=y
117 -CONFIG_ARM64_MODULE_CMODEL_LARGE=n
118 -CONFIG_RANDOMIZE_BASE=n
119 -
120 CONFIG_BSD_PROCESS_ACCT=y
121 CONFIG_BSD_PROCESS_ACCT_V3=y
122 CONFIG_TASKSTATS=y
123 @@ -55,7 +12,6 @@ CONFIG_TASK_XACCT=y
124 CONFIG_TASK_IO_ACCOUNTING=y
125 CONFIG_IKCONFIG=m
126 CONFIG_IKCONFIG_PROC=y
127 -CONFIG_NMI_LOG_BUF_SHIFT=12
128 CONFIG_MEMCG=y
129 CONFIG_BLK_CGROUP=y
130 CONFIG_CGROUP_FREEZER=y
131 @@ -69,54 +25,49 @@ CONFIG_BLK_DEV_INITRD=y
132 CONFIG_EMBEDDED=y
133 # CONFIG_COMPAT_BRK is not set
134 CONFIG_PROFILING=y
135 -CONFIG_OPROFILE=m
136 CONFIG_KPROBES=y
137 CONFIG_JUMP_LABEL=y
138 CONFIG_MODULES=y
139 CONFIG_MODULE_UNLOAD=y
140 CONFIG_MODVERSIONS=y
141 CONFIG_MODULE_SRCVERSION_ALL=y
142 -CONFIG_TRIM_UNUSED_KSYMS=y
143 CONFIG_BLK_DEV_THROTTLING=y
144 CONFIG_PARTITION_ADVANCED=y
145 CONFIG_MAC_PARTITION=y
146 CONFIG_CFQ_GROUP_IOSCHED=y
147 -CONFIG_ARCH_BCM2709=y
148 -# CONFIG_CACHE_L2X0 is not set
149 -CONFIG_SMP=y
150 -CONFIG_HAVE_ARM_ARCH_TIMER=y
151 -CONFIG_VMSPLIT_2G=y
152 -CONFIG_PREEMPT_VOLUNTARY=y
153 -CONFIG_AEABI=y
154 -CONFIG_OABI_COMPAT=y
155 -# CONFIG_CPU_SW_DOMAIN_PAN is not set
156 +CONFIG_ARCH_BCM2835=y
157 +# CONFIG_CAVIUM_ERRATUM_22375 is not set
158 +# CONFIG_CAVIUM_ERRATUM_23154 is not set
159 +# CONFIG_CAVIUM_ERRATUM_27456 is not set
160 +CONFIG_SCHED_MC=y
161 +CONFIG_NR_CPUS=4
162 +CONFIG_PREEMPT=y
163 +CONFIG_HZ_1000=y
164 CONFIG_CLEANCACHE=y
165 CONFIG_FRONTSWAP=y
166 CONFIG_CMA=y
167 CONFIG_ZSMALLOC=m
168 CONFIG_PGTABLE_MAPPING=y
169 -CONFIG_UACCESS_WITH_MEMCPY=y
170 CONFIG_SECCOMP=y
171 -# CONFIG_ATAGS is not set
172 -CONFIG_ZBOOT_ROM_TEXT=0x0
173 -CONFIG_ZBOOT_ROM_BSS=0x0
174 +CONFIG_ARMV8_DEPRECATED=y
175 +CONFIG_SWP_EMULATION=y
176 +CONFIG_CP15_BARRIER_EMULATION=y
177 +CONFIG_SETEND_EMULATION=y
178 CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
179 +CONFIG_BINFMT_MISC=y
180 +CONFIG_COMPAT=y
181 +# CONFIG_SUSPEND is not set
182 +CONFIG_PM=y
183 +CONFIG_CPU_IDLE=y
184 +CONFIG_ARM_CPUIDLE=y
185 CONFIG_CPU_FREQ=y
186 +CONFIG_CPU_FREQ_STAT=y
187 CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
188 CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
189 CONFIG_CPU_FREQ_GOV_USERSPACE=y
190 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
191 CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
192 CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
193 -CONFIG_VFP=y
194 -CONFIG_NEON=y
195 -CONFIG_KERNEL_MODE_NEON=y
196 -CONFIG_BINFMT_MISC=m
197 -CONFIG_COMPAT=y
198 -CONFIG_SYSVIPC_COMPAT=y
199 -
200 -# CONFIG_SUSPEND is not set
201 -CONFIG_PM=y
202 CONFIG_NET=y
203 CONFIG_PACKET=y
204 CONFIG_UNIX=y
205 @@ -437,6 +388,7 @@ CONFIG_BT_MRVL=m
206 CONFIG_BT_MRVL_SDIO=m
207 CONFIG_BT_ATH3K=m
208 CONFIG_BT_WILINK=m
209 +CONFIG_CFG80211=m
210 CONFIG_MAC80211=m
211 CONFIG_MAC80211_MESH=y
212 CONFIG_WIMAX=m
213 @@ -490,7 +442,6 @@ CONFIG_BONDING=m
214 CONFIG_DUMMY=m
215 CONFIG_IFB=m
216 CONFIG_MACVLAN=m
217 -CONFIG_IPVLAN=m
218 CONFIG_VXLAN=m
219 CONFIG_NETCONSOLE=m
220 CONFIG_TUN=m
221 @@ -579,8 +530,6 @@ CONFIG_RT2800USB_RT3573=y
222 CONFIG_RT2800USB_RT53XX=y
223 CONFIG_RT2800USB_RT55XX=y
224 CONFIG_RT2800USB_UNKNOWN=y
225 -CONFIG_RTL8187=m
226 -CONFIG_RTL8192CU=n
227 CONFIG_USB_ZD1201=m
228 CONFIG_ZD1211RW=m
229 CONFIG_MAC80211_HWSIM=m
230 @@ -606,7 +555,7 @@ CONFIG_JOYSTICK_RPISENSE=m
231 CONFIG_INPUT_TOUCHSCREEN=y
232 CONFIG_TOUCHSCREEN_ADS7846=m
233 CONFIG_TOUCHSCREEN_EGALAX=m
234 -CONFIG_TOUCHSCREEN_FT6236=m
235 +CONFIG_TOUCHSCREEN_EKTF2127=m
236 CONFIG_TOUCHSCREEN_RPI_FT5406=m
237 CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
238 CONFIG_TOUCHSCREEN_STMPE=m
239 @@ -626,10 +575,8 @@ CONFIG_SERIO_RAW=m
240 CONFIG_GAMEPORT=m
241 CONFIG_GAMEPORT_NS558=m
242 CONFIG_GAMEPORT_L4=m
243 -CONFIG_BRCM_CHAR_DRIVERS=n
244 -CONFIG_BCM_VC_CMA=n
245 -CONFIG_BCM_VCIO=n
246 -CONFIG_BCM_VC_SM=n
247 +# CONFIG_BCM2835_DEVGPIOMEM is not set
248 +# CONFIG_BCM2835_SMI_DEV is not set
249 # CONFIG_LEGACY_PTYS is not set
250 # CONFIG_DEVKMEM is not set
251 CONFIG_SERIAL_8250=y
252 @@ -638,6 +585,9 @@ CONFIG_SERIAL_8250_CONSOLE=y
253 # CONFIG_SERIAL_8250_DMA is not set
254 CONFIG_SERIAL_8250_NR_UARTS=1
255 CONFIG_SERIAL_8250_RUNTIME_UARTS=0
256 +CONFIG_SERIAL_8250_EXTENDED=y
257 +CONFIG_SERIAL_8250_SHARE_IRQ=y
258 +CONFIG_SERIAL_8250_BCM2835AUX=y
259 CONFIG_SERIAL_OF_PLATFORM=y
260 CONFIG_SERIAL_AMBA_PL011=y
261 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
262 @@ -650,6 +600,7 @@ CONFIG_I2C=y
263 CONFIG_I2C_CHARDEV=m
264 CONFIG_I2C_MUX_PCA954x=m
265 CONFIG_I2C_BCM2708=m
266 +CONFIG_I2C_BCM2835=m
267 CONFIG_I2C_GPIO=m
268 CONFIG_SPI=y
269 CONFIG_SPI_BCM2835=m
270 @@ -681,13 +632,13 @@ CONFIG_W1_SLAVE_DS2780=m
271 CONFIG_W1_SLAVE_DS2781=m
272 CONFIG_W1_SLAVE_DS28E04=m
273 CONFIG_W1_SLAVE_BQ27000=m
274 -CONFIG_BATTERY_DS2760=m
275 -CONFIG_POWER_RESET=y
276 CONFIG_POWER_RESET_GPIO=y
277 +CONFIG_BATTERY_DS2760=m
278 CONFIG_HWMON=m
279 CONFIG_SENSORS_LM75=m
280 CONFIG_SENSORS_SHT21=m
281 CONFIG_SENSORS_SHTC1=m
282 +CONFIG_SENSORS_INA2XX=m
283 CONFIG_THERMAL=y
284 CONFIG_THERMAL_BCM2835=y
285 CONFIG_WATCHDOG=y
286 @@ -835,8 +786,6 @@ CONFIG_VIDEO_EM28XX_V4L2=m
287 CONFIG_VIDEO_EM28XX_ALSA=m
288 CONFIG_VIDEO_EM28XX_DVB=m
289 CONFIG_V4L_PLATFORM_DRIVERS=y
290 -CONFIG_VIDEO_BCM2835=n
291 -CONFIG_VIDEO_BCM2835_MMAL=n
292 CONFIG_RADIO_SI470X=y
293 CONFIG_USB_SI470X=m
294 CONFIG_I2C_SI470X=m
295 @@ -892,8 +841,6 @@ CONFIG_SND_VIRMIDI=m
296 CONFIG_SND_MTPAV=m
297 CONFIG_SND_SERIAL_U16550=m
298 CONFIG_SND_MPU401=m
299 -CONFIG_SND_ARM=n
300 -CONFIG_SND_BCM2835=n
301 CONFIG_SND_USB_AUDIO=m
302 CONFIG_SND_USB_UA101=m
303 CONFIG_SND_USB_CAIAQ=m
304 @@ -916,7 +863,10 @@ CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m
305 CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m
306 CONFIG_SND_DIGIDAC1_SOUNDCARD=m
307 CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m
308 +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m
309 +CONFIG_SND_PISOUND=m
310 CONFIG_SND_SOC_ADAU1701=m
311 +CONFIG_SND_SOC_AK4554=m
312 CONFIG_SND_SOC_WM8804_I2C=m
313 CONFIG_SND_SIMPLE_CARD=m
314 CONFIG_SOUND_PRIME=m
315 @@ -979,8 +929,6 @@ CONFIG_USB_HIDDEV=y
316 CONFIG_USB=y
317 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
318 CONFIG_USB_MON=m
319 -CONFIG_USB_DWCOTG=n
320 -CONFIG_USB_DWC2=y
321 CONFIG_USB_PRINTER=m
322 CONFIG_USB_STORAGE=y
323 CONFIG_USB_STORAGE_REALTEK=m
324 @@ -1001,6 +949,7 @@ CONFIG_USB_MICROTEK=m
325 CONFIG_USBIP_CORE=m
326 CONFIG_USBIP_VHCI_HCD=m
327 CONFIG_USBIP_HOST=m
328 +CONFIG_USB_DWC2=y
329 CONFIG_USB_SERIAL=m
330 CONFIG_USB_SERIAL_GENERIC=y
331 CONFIG_USB_SERIAL_AIRCABLE=m
332 @@ -1096,6 +1045,7 @@ CONFIG_LEDS_TRIGGER_INPUT=y
333 CONFIG_LEDS_TRIGGER_PANIC=y
334 CONFIG_RTC_CLASS=y
335 # CONFIG_RTC_HCTOSYS is not set
336 +CONFIG_RTC_DRV_ABX80X=m
337 CONFIG_RTC_DRV_DS1307=m
338 CONFIG_RTC_DRV_DS1374=m
339 CONFIG_RTC_DRV_DS1672=m
340 @@ -1103,7 +1053,6 @@ CONFIG_RTC_DRV_MAX6900=m
341 CONFIG_RTC_DRV_RS5C372=m
342 CONFIG_RTC_DRV_ISL1208=m
343 CONFIG_RTC_DRV_ISL12022=m
344 -CONFIG_RTC_DRV_ISL12057=m
345 CONFIG_RTC_DRV_X1205=m
346 CONFIG_RTC_DRV_PCF8523=m
347 CONFIG_RTC_DRV_PCF8563=m
348 @@ -1137,7 +1086,6 @@ CONFIG_STAGING=y
349 CONFIG_PRISM2_USB=m
350 CONFIG_R8712U=m
351 CONFIG_R8188EU=m
352 -CONFIG_R8723AU=m
353 CONFIG_VT6656=m
354 CONFIG_SPEAKUP=m
355 CONFIG_SPEAKUP_SYNTH_SOFT=m
356 @@ -1153,6 +1101,7 @@ CONFIG_FB_TFT_BD663474=m
357 CONFIG_FB_TFT_HX8340BN=m
358 CONFIG_FB_TFT_HX8347D=m
359 CONFIG_FB_TFT_HX8353D=m
360 +CONFIG_FB_TFT_HX8357D=m
361 CONFIG_FB_TFT_ILI9163=m
362 CONFIG_FB_TFT_ILI9320=m
363 CONFIG_FB_TFT_ILI9325=m
364 @@ -1176,6 +1125,7 @@ CONFIG_FB_TFT_UPD161704=m
365 CONFIG_FB_TFT_WATTEROTT=m
366 CONFIG_FB_FLEX=m
367 CONFIG_FB_TFT_FBTFT_DEVICE=m
368 +# CONFIG_BCM2708_VCHIQ is not set
369 CONFIG_MAILBOX=y
370 CONFIG_BCM2835_MBOX=y
371 # CONFIG_IOMMU_SUPPORT is not set
372 @@ -1189,6 +1139,7 @@ CONFIG_IIO_KFIFO_BUF=m
373 CONFIG_MCP320X=m
374 CONFIG_MCP3422=m
375 CONFIG_DHT11=m
376 +CONFIG_HTU21=m
377 CONFIG_PWM_BCM2835=m
378 CONFIG_PWM_PCA9685=m
379 CONFIG_RASPBERRYPI_FIRMWARE=y
380 @@ -1309,6 +1260,7 @@ CONFIG_BOOT_PRINTK_DELAY=y
381 CONFIG_DEBUG_MEMORY_INIT=y
382 CONFIG_DETECT_HUNG_TASK=y
383 CONFIG_TIMER_STATS=y
384 +CONFIG_LATENCYTOP=y
385 CONFIG_IRQSOFF_TRACER=y
386 CONFIG_SCHED_TRACER=y
387 CONFIG_STACK_TRACER=y
388 @@ -1331,5 +1283,3 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m
389 CONFIG_ARM64_CRYPTO=y
390 CONFIG_CRC_ITU_T=y
391 CONFIG_LIBCRC32C=y
392 -CONFIG_BCM2708_VCHIQ=n
393 -CONFIG_ARCH_BCM2835=y