Commit graph

12035 commits

Author SHA1 Message Date
Christoph Hellwig
56e35f9c5b dma-mapping: drop the dev argument to arch_sync_dma_for_*
These are pure cache maintainance routines, so drop the unused
struct device argument.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-11-20 20:31:38 +01:00
Pavel Tatashin
e50be648aa arm64: uaccess: Remove uaccess_*_not_uao asm macros
It is safer and simpler to drop the uaccess assembly macros in favour of
inline C functions. Although this bloats the Image size slightly, it
aligns our user copy routines with '{get,put}_user()' and generally
makes the code a lot easier to reason about.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
[will: tweaked commit message and changed temporary variable names]
Signed-off-by: Will Deacon <will@kernel.org>
2019-11-20 18:51:54 +00:00
Pavel Tatashin
94bb804e1e arm64: uaccess: Ensure PAN is re-enabled after unhandled uaccess fault
A number of our uaccess routines ('__arch_clear_user()' and
'__arch_copy_{in,from,to}_user()') fail to re-enable PAN if they
encounter an unhandled fault whilst accessing userspace.

For CPUs implementing both hardware PAN and UAO, this bug has no effect
when both extensions are in use by the kernel.

For CPUs implementing hardware PAN but not UAO, this means that a kernel
using hardware PAN may execute portions of code with PAN inadvertently
disabled, opening us up to potential security vulnerabilities that rely
on userspace access from within the kernel which would usually be
prevented by this mechanism. In other words, parts of the kernel run the
same way as they would on a CPU without PAN implemented/emulated at all.

For CPUs not implementing hardware PAN and instead relying on software
emulation via 'CONFIG_ARM64_SW_TTBR0_PAN=y', the impact is unfortunately
much worse. Calling 'schedule()' with software PAN disabled means that
the next task will execute in the kernel using the page-table and ASID
of the previous process even after 'switch_mm()', since the actual
hardware switch is deferred until return to userspace. At this point, or
if there is a intermediate call to 'uaccess_enable()', the page-table
and ASID of the new process are installed. Sadly, due to the changes
introduced by KPTI, this is not an atomic operation and there is a very
small window (two instructions) where the CPU is configured with the
page-table of the old task and the ASID of the new task; a speculative
access in this state is disastrous because it would corrupt the TLB
entries for the new task with mappings from the previous address space.

As Pavel explains:

  | I was able to reproduce memory corruption problem on Broadcom's SoC
  | ARMv8-A like this:
  |
  | Enable software perf-events with PERF_SAMPLE_CALLCHAIN so userland's
  | stack is accessed and copied.
  |
  | The test program performed the following on every CPU and forking
  | many processes:
  |
  |	unsigned long *map = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE,
  |				  MAP_SHARED | MAP_ANONYMOUS, -1, 0);
  |	map[0] = getpid();
  |	sched_yield();
  |	if (map[0] != getpid()) {
  |		fprintf(stderr, "Corruption detected!");
  |	}
  |	munmap(map, PAGE_SIZE);
  |
  | From time to time I was getting map[0] to contain pid for a
  | different process.

Ensure that PAN is re-enabled when returning after an unhandled user
fault from our uaccess routines.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Cc: <stable@vger.kernel.org>
Fixes: 338d4f49d6 ("arm64: kernel: Add support for Privileged Access Never")
Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
[will: rewrote commit message]
Signed-off-by: Will Deacon <will@kernel.org>
2019-11-20 18:51:47 +00:00
Ard Biesheuvel
c12d3362a7 int128: move __uint128_t compiler test to Kconfig
In order to use 128-bit integer arithmetic in C code, the architecture
needs to have declared support for it by setting ARCH_SUPPORTS_INT128,
and it requires a version of the toolchain that supports this at build
time. This is why all existing tests for ARCH_SUPPORTS_INT128 also test
whether __SIZEOF_INT128__ is defined, since this is only the case for
compilers that can support 128-bit integers.

Let's fold this additional test into the Kconfig declaration of
ARCH_SUPPORTS_INT128 so that we can also use the symbol in Makefiles,
e.g., to decide whether a certain object needs to be included in the
first place.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-11-17 09:02:42 +08:00
Ard Biesheuvel
f569ca1647 crypto: arm64/poly1305 - incorporate OpenSSL/CRYPTOGAMS NEON implementation
This is a straight import of the OpenSSL/CRYPTOGAMS Poly1305 implementation
for NEON authored by Andy Polyakov, and contributed by him to the OpenSSL
project. The file 'poly1305-armv8.pl' is taken straight from this upstream
GitHub repository [0] at commit ec55a08dc0244ce570c4fc7cade330c60798952f,
and already contains all the changes required to build it as part of a
Linux kernel module.

[0] https://github.com/dot-asm/cryptogams

Co-developed-by: Andy Polyakov <appro@cryptogams.org>
Signed-off-by: Andy Polyakov <appro@cryptogams.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-11-17 09:02:41 +08:00
Ard Biesheuvel
b36d8c09e7 crypto: arm/chacha - remove dependency on generic ChaCha driver
Instead of falling back to the generic ChaCha skcipher driver for
non-SIMD cases, use a fast scalar implementation for ARM authored
by Eric Biggers. This removes the module dependency on chacha-generic
altogether, which also simplifies things when we expose the ChaCha
library interface from this module.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-11-17 09:02:40 +08:00
Ard Biesheuvel
b3aad5bad2 crypto: arm64/chacha - expose arm64 ChaCha routine as library function
Expose the accelerated NEON ChaCha routine directly as a symbol
export so that users of the ChaCha library API can use it directly.

Given that calls into the library API will always go through the
routines in this module if it is enabled, switch to static keys
to select the optimal implementation available (which may be none
at all, in which case we defer to the generic implementation for
all invocations).

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-11-17 09:02:39 +08:00
Ard Biesheuvel
c77da4867c crypto: arm64/chacha - depend on generic chacha library instead of crypto driver
Depend on the generic ChaCha library routines instead of pulling in the
generic ChaCha skcipher driver, which is more than we need, and makes
managing the dependencies between the generic library, generic driver,
accelerated library and driver more complicated.

While at it, drop the logic to prefer the scalar code on short inputs.
Turning the NEON on and off is cheap these days, and one major use case
for ChaCha20 is ChaCha20-Poly1305, which is guaranteed to hit the scalar
path upon every invocation  (when doing the Poly1305 nonce generation)

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-11-17 09:02:39 +08:00
Ard Biesheuvel
5fb8ef2580 crypto: chacha - move existing library code into lib/crypto
Currently, our generic ChaCha implementation consists of a permute
function in lib/chacha.c that operates on the 64-byte ChaCha state
directly [and which is always included into the core kernel since it
is used by the /dev/random driver], and the crypto API plumbing to
expose it as a skcipher.

In order to support in-kernel users that need the ChaCha streamcipher
but have no need [or tolerance] for going through the abstractions of
the crypto API, let's expose the streamcipher bits via a library API
as well, in a way that permits the implementation to be superseded by
an architecture specific one if provided.

So move the streamcipher code into a separate module in lib/crypto,
and expose the init() and crypt() routines to users of the library.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-11-17 09:02:39 +08:00
Olof Johansson
db6efda854 Two OP-TE driver fixes:
- Add proper cleanup on optee_enumerate_devices() failure
 - Make sure to register kernel allocations of dynamic shared memory
 -----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCgA4FiEEcK3MsDvGvFp6zV9ztbC4QZeP7NMFAl3OgAAaHGplbnMud2lr
 bGFuZGVyQGxpbmFyby5vcmcACgkQtbC4QZeP7NO+ZQ/9HIvaUqStpOVVPqRVx8UU
 E2qNHleaVf72KIDfNgtGw2iovEaDr8Js2tWqXHz9f9awUJV5pJw098BEh45OC4KA
 bqAgfX7Gxi9evBb0zPN42dXY7PSNlBYF7vmPs9zfTHlplGtigWbv5A9U34J/GZcX
 7RXZU/IigYst7s00cu9CdT3XSkrCsx2M1Ecg7rrbkBirGCX8p4veRZ1XtYpJFGUF
 xA1Xstq6x1pYEkcLRsX0k/R2GlvNKIgPjmAA8zh8GHEWNMcxeMcv+Gd4nAVJN9S0
 eRr6jAJuJ597/6jS2HzCq/3ygNwgKKvdlthuDMizCzDkufo1wQdxAKdt3rCXzCr8
 zPFAzRpaeHX5gep94wjpj/YqV70a4miS09OVbpkuL7a8kbOdkdcQHKAVvF7BNJvF
 2Wp3Ytlnh9pfnl1A3bMp7tmdUY3LlW1ob+LtoS7+PmpxrQYp7XB3gPE6G3OF3xCS
 hKSOF5BgreeMZpw/oX1IH7zMLrQcjf6kZShtcrZTFVw84bXSIXpt30KCsBA1Hdzf
 EyygrIMgVEPOnIxiiaVrtd34f2LXc8YdiMj3N00vHzljFsMh2wcy7covEbxt62/7
 3a3Jqz23ngRXFFQQaT9iNc73WKST4iuyIPTjcrwqc8VDlSvkq95SQVArj3bfafmC
 0lhFIW4hnCjsHSrFqcgEZVg=
 =E+qa
 -----END PGP SIGNATURE-----

Merge tag 'tee-fixes-for-v5.4' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes

Two OP-TE driver fixes:
- Add proper cleanup on optee_enumerate_devices() failure
- Make sure to register kernel allocations of dynamic shared memory

* tag 'tee-fixes-for-v5.4' of git://git.linaro.org/people/jens.wiklander/linux-tee: (591 commits)
  tee: optee: fix device enumeration error handling
  tee: optee: Fix dynamic shm pool allocations
  Linux 5.4-rc3
  tracing: Initialize iter->seq after zeroing in tracing_read_pipe()
  tracing/hwlat: Don't ignore outer-loop duration when calculating max_latency
  tracing/hwlat: Report total time spent in all NMIs during the sample
  recordmcount: Fix nop_mcount() function
  tracing: Do not create tracefs files if tracefs lockdown is in effect
  tracing: Add locked_down checks to the open calls of files created for tracefs
  tracing: Add tracing_check_open_get_tr()
  tracing: Have trace events system open call tracing_open_generic_tr()
  tracing: Get trace_array reference for available_tracers files
  ftrace: Get a reference counter for the trace_array on filter files
  tracefs: Revert ccbd54ff54 ("tracefs: Restrict tracefs when the kernel is locked down")
  perf/x86/cstate: Add Tiger Lake CPU support
  perf/x86/msr: Add Tiger Lake CPU support
  perf/x86/intel: Add Tiger Lake CPU support
  perf/x86/cstate: Update C-state counters for Ice Lake
  perf/x86/msr: Add new CPU model numbers for Ice Lake
  perf/x86/cstate: Add Comet Lake CPU support
  ...

Link: https://lore.kernel.org/r/20191115105353.GA26176@jax
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-16 15:38:59 -08:00
Anders Roxell
d8e85e144b arm64: Kconfig: add a choice for endianness
When building allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/arm64/configs/defconfig
CONFIG_CPU_BIG_ENDIAN gets enabled. Which tends not to be what most
people want. Another concern that has come up is that ACPI isn't built
for an allmodconfig kernel today since that also depends on !CPU_BIG_ENDIAN.

Rework so that we introduce a 'choice' and default the choice to
CPU_LITTLE_ENDIAN. That means that when we build an allmodconfig kernel
it will default to CPU_LITTLE_ENDIAN that most people tends to want.

Reviewed-by: John Garry <john.garry@huawei.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-11-14 14:39:03 +00:00
Olof Johansson
f1deadb5be mt8183:
add systimer node and bindings
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEiUuSfQSYnG8EMsBltDliWyzx00MFAl3JSyMXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQtDliWyzx00Po4g/8Cxj6VgpZY4SJ6/wk/6d6E2vb
 2WoVrprSteQvBG176YbKJL1NTtRaBkDkhhjkLr/itn4Hf7YSujOX2nTjCwFnjGDw
 9VM9KsqLZpZtJ0sWnOwUVMBDu7+CRvnpRlnajSRPl2tfODhoIJZGmv6Aqmx/n3dd
 MECiqv6NROpiriV1lF6Vvip8F8IIkSE9h4yBjLhsnTUXPvThoz6gGSB55yl9onKy
 ReCdS6BCmBiC6vwejKx9uY1EVEhLJFnU3tZadNcTL7x42PXjNnE85liykKUe/bvt
 4RbPhr0qLBBNh7MEE1lZQNCZ+h8sOpcxBMRpHE2Xs2Wh9xY7VgmIBfcEcaW0n4QQ
 nWme7AFuG19iNoMK0VaWkrQRxYInOK8nd3VZpdodwNwROUkdvgXN7rGEQGEQS8hK
 mwGc4l2Dw8wgQak/LMIcghjJD1rAduvS6+AYgtoII5Ii+vtg2fYupHY6PZh5Kx5q
 HJrkgyiZI3rkO756Ug2+ZwTgZIREKgGOHZlAUHpEk9Nah0s17cF8NjXboekbH9Pq
 3iBA7nD+TalZy3hIMgMA7jmYGTWRDRK+EztLWBVHR5Pak8nCSpS67cH+NXmFZZZa
 7Ykl7f/gUid37VSG4WY7xzsqDmmsJV8nA8Uc9DpPWlSv/DwFQLPYPeoHGOY3m7TL
 7D8+5Mleu02vbKzUrg0=
 =ansa
 -----END PGP SIGNATURE-----

Merge tag 'v5.4-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt

mt8183:
add systimer node and bindings

* tag 'v5.4-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  arm64: dts: mt8183: add systimer0 device node
  dt-bindings: mediatek: update bindings for MT8183 systimer

Link: https://lore.kernel.org/r/4d3984bd-4bb3-b8c4-6e02-19a7185cd682@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-11 13:08:44 -08:00
Christoph Hellwig
d092a87073 arch: rely on asm-generic/io.h for default ioremap_* definitions
Various architectures that use asm-generic/io.h still defined their
own default versions of ioremap_nocache, ioremap_wt and ioremap_wc
that point back to plain ioremap directly or indirectly.  Remove these
definitions and rely on asm-generic/io.h instead.  For this to work
the backup ioremap_* defintions needs to be changed to purely cpp
macros instea of inlines to cover for architectures like openrisc
that only define ioremap after including <asm-generic/io.h>.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Palmer Dabbelt <palmer@dabbelt.com>
2019-11-11 21:18:19 +01:00
Anders Roxell
f70c08e46d arm64: Kconfig: make CMDLINE_FORCE depend on CMDLINE
When building allmodconfig KCONFIG_ALLCONFIG=$(pwd)/arch/arm64/configs/defconfig
CONFIG_CMDLINE_FORCE gets enabled. Which forces the user to pass the
full cmdline to CONFIG_CMDLINE="...".

Rework so that CONFIG_CMDLINE_FORCE gets set only if CONFIG_CMDLINE is
set to something except an empty string.

Suggested-by: John Garry <john.garry@huawei.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-11-11 18:22:57 +00:00
Christoph Hellwig
34dc0ea6bc dma-direct: provide mmap and get_sgtable method overrides
For dma-direct we know that the DMA address is an encoding of the
physical address that we can trivially decode.  Use that fact to
provide implementations that do not need the arch_dma_coherent_to_pfn
architecture hook.  Note that we still can only support mmap of
non-coherent memory only if the architecture provides a way to set an
uncached bit in the page tables.  This must be true for architectures
that use the generic remap helpers, but other architectures can also
manually select it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
2019-11-11 10:52:15 +01:00
Olof Johansson
5588aa81d2 arm64: dts: Amlogic updates for v5.5
Hightlights
 - new board; ugoos am6, based on G12B SoC
 - g12: add thermal driver and cooling properties
 - sm1: enable audio on SEI610 board
 - IR: add several keymaps
 - sdio: add keep-power-in-suspend property for multiple boards
 - pcie: add support for G12A
 - multiple fixes, cleanups
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAl3FFnEACgkQWTcYmtP7
 xmWyeg//QE6hBYYjZfwiIbLCgRlpdv04HZg6e5bPqZ8A9x9/mdQoH6cqwbKVpKij
 bLrkHuwD+WtkWStbemdPtmPliEncAyX9jXGcvIor3eYa9IV6kTORZ8YWq6c8RDMM
 y8UafRFbt24MNvzi41uuUoSLtlsLUDp6dVfekD4wf1IvV7Ew5Yk5XyHMAjdVongC
 07FA1aY6JOiPZeDcvNa11pxlzyciDf22YF8XLoZOsZ/cZN1itjBUMqGRefC51RQP
 cafmdk0Ms+Xgtq4GwDceLE5QMb/h1K582j4uVu38QMpPqR6WvTnpd/ra4chheJHE
 nhHHYiN4mWO3lgnp1ZZKooTUyBPAyf3kaP8I7YBrUXuuoy9GNRqKi25uJwALeVqh
 YKvZqpd6Uw4W/If5EW5zPXlKGv8xSJwaTh6q40sRI0OFMfniy1pLRM3mLKSVqJy6
 DKk7Pt4wptWe6Bv6P1hK34acmX6TGcyq53Dg5Nq79E0qul1YRRmHoUHewOeUgwPC
 XSaaqPSItLQggRXplZVaUm9e8cmjcwU4Od3rqfb/A2JsTniONB3kAI6YoBCsK4O2
 SwCbIVP8hkbCo/perun11C4SnsamPdQBmPs1if8PtT72LaNR8HAlFZTgX5yqEFAj
 ZP9vCgqtdlIE28W9cJLOEMT7KtAzCES2UYbKUDTx+E2GolvoYvA=
 =pQlU
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt

arm64: dts: Amlogic updates for v5.5

Hightlights
- new board; ugoos am6, based on G12B SoC
- g12: add thermal driver and cooling properties
- sm1: enable audio on SEI610 board
- IR: add several keymaps
- sdio: add keep-power-in-suspend property for multiple boards
- pcie: add support for G12A
- multiple fixes, cleanups

* tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (62 commits)
  arm64: dts: meson-gx: fix i2c compatible
  arm64: dts: meson-gx: cec node should be disabled by default
  arm64: dts: meson-g12b-odroid-n2: add missing amlogic, s922x compatible
  arm64: dts: meson-gxm: fix gpu irq order
  arm64: dts: meson-g12a: fix gpu irq order
  ARM64: dts: amlogic: adds crypto hardware node
  arm64: dts: meson-gxbb-vega-s95: set rc-vega-s9x ir keymap
  arm64: dts: meson-gxm-vega-s96: set rc-vega-s9x ir keymap
  arm64: dts: meson: g12b: add cooling properties
  arm64: dts: meson: g12a: add cooling properties
  arm64: dts: meson: g12: Add minimal thermal zone
  arm64: dts: meson: g12: add temperature sensor
  arm64: dts: meson: sei610: enable audio
  arm64: dts: meson: sm1: add audio devices
  dt-bindings: clock: meson: add sm1 resets to the axg-audio controller
  dt-bindings: clk: axg-audio: add sm1 bindings
  arm64: dts: meson-g12: add support for simplefb
  arm64: dts: meson: g12a: add audio devices resets
  arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI supply
  arm64: dts: meson: odroid-c2: Add missing regulator linked to VDDIO_AO3V3 regulator
  ...

Link: https://lore.kernel.org/r/7hd0dzs0m1.fsf@baylibre.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-10 21:29:06 -08:00
Olof Johansson
077f46db63 One new soc the rk3308 with quad-Cortex-A35 cores.
New boards are Beelink A1, roc-rk3308-cc, rk3308-evb
 A big number of improvements for the rk3399-roc-pc board
 (support for M.2 variant, reworked power-tree, buttons, leds)
 and further improvements of the px30-evb (usb2phy, otp controller,
 removal of default optee node - optee does add its own when loaded)
 And finally rk3328 audio support, sdmmc detection fix and enabled
 of the gpu on rk3399-puma.
 -----BEGIN PGP SIGNATURE-----
 
 iQFZBAABCABDFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAl3IKv8lHGhlaWtvLnN0
 dWVibmVyQHRoZW9icm9tYS1zeXN0ZW1zLmNvbQAKCRDzpnnJnNEdgQHeCACQTb4l
 0Z/qC5sAqa006VQ6z+WcNbmiqJyyYe6znS9+TEGnruTR6H6dZ5x5hxlWza8CP7x2
 BjYuPPaYoNcB/1ItFl0B6MD7rCdizX6UWfyjkeYmF4AHsnF/qP4lyj2iyp4sfWpO
 IfduK73UTjASC3UukkE4gL0lLlwMUofAtnDTkjr2LTPjrb8abagH7lMZFkpnFAVO
 15tmQ2scrki7oKraAWumwLqFqZ8YK9DVStGQsWOrr0Yy6I/pLJ3IDGOT3qfTpQqV
 2umE0yp1plO0qD8MRP/93tUXSXAOYa5cLDyww9YPf9eyqiAz8Xf5/wc5pJU3XuFV
 D7sxTPM0mbO/PXIR
 =09Yp
 -----END PGP SIGNATURE-----

Merge tag 'v5.5-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt

One new soc the rk3308 with quad-Cortex-A35 cores.
New boards are Beelink A1, roc-rk3308-cc, rk3308-evb
A big number of improvements for the rk3399-roc-pc board
(support for M.2 variant, reworked power-tree, buttons, leds)
and further improvements of the px30-evb (usb2phy, otp controller,
removal of default optee node - optee does add its own when loaded)
And finally rk3328 audio support, sdmmc detection fix and enabled
of the gpu on rk3399-puma.

* tag 'v5.5-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (21 commits)
  arm64: dts: rockchip: fix sdmmc detection on boot on rk3328-roc-cc
  arm64: dts: rockchip: Split rk3399-roc-pc for with and without mezzanine board.
  arm64: dts: rockchip: Add Beelink A1
  dt-bindings: ARM: rockchip: Add Beelink A1
  arm64: dts: rockchip: Add RK3328 audio pipelines
  arm64: dts: rockchip: Add devicetree for board roc-rk3308-cc
  dt-bindings: Add doc for Firefly ROC-RK3308-CC board
  dt-bindings: clean up rockchip grf binding document
  arm64: dts: rockchip: Rework voltage supplies for regulators on rk3399-roc-pc
  arm64: dts: rockchip: Add vcc_sys enable pin on rk3399-roc-pc
  arm64: dts: rockchip: Add nodes for buttons on rk3399-roc-pc
  arm64: dts: rockchip: enable usb2phy on px30-evb
  arm64: dts: rockchip: add usb2phy for px30
  arm64: dts: rockchip: remove px30 default optee node
  arm64: dts: rockchip: enable gpu on rk3399-puma
  arm64: dts: rockchip: add px30 otp controller
  arm64: dts: rockchip: Add LED nodes on rk3399-roc-pc
  arm64: dts: rockchip: Add basic dts for RK3308 EVB
  dt-bindings: Add doc for rk3308-evb
  arm64: dts: rockchip: Add core dts for RK3308 SOC
  ...

Link: https://lore.kernel.org/r/12204771.K8DX0fml49@phil
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-10 21:28:10 -08:00
Linus Torvalds
4486695680 ARM: SoC fixes
A set of fixes that have trickled in over the last couple of weeks:
 
  - MAINTAINER update for Cavium/Marvell ThunderX2
 
  - stm32 tweaks to pinmux for Joystick/Camera, and RAM allocation for CAN
    interfaces
 
  - i.MX fixes for voltage regulator GPIO mappings, fixes voltage scaling
    issues
 
  - More i.MX fixes for various issues on i.MX eval boards: interrupt
    storm due to u-boot leaving pins in new states, fixing power button
    config, a couple of compatible-string corrections.
 
  - Powerdown and Suspend/Resume fixes for Allwinner A83-based tablets
 
  - A few documentation tweaks and a fix of a memory leak in the reset
    subsystem
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCAAtFiEElf+HevZ4QCAJmMQ+jBrnPN6EHHcFAl3IVbUPHG9sb2ZAbGl4
 b20ubmV0AAoJEIwa5zzehBx3xTQQAKJcHO1Qy7+qk3w74ko3d2n9jnNAuFqma8om
 zhx+zyVrf28HI90rmJWx+mA+rVnKeNwqf7k6qeoukwxn4zVtZTx4+A6HMFOQ1cDP
 zEdVLbCp+99I3itBITMo5NjF3FsgRp8l5UHUmFBU8uPcjotPIVigVIum9KJTK1ZM
 3xcCOtOnydGagjHKM/QljSBxcg3ii+9cDUpJPwxYPCtv9kpCWiC/+mHg5bHD/kI2
 Hr6XqIV4gepc0LsV9OJthMgSzCyFYBNckh2EfAiI3sEb06ifJgrXZJT3GvG0BnRh
 DzN6KaxjILAlZmijRwKXmEDmSpyPaEaqlnPT4XdF7e0yVIa6ekgyS7oMdg6iQd2U
 Vbvq8k+NRWIg/MEvJ9lwuBW0luwZ3BNuPrSzIK4VG5d47qb3kosTe7KsZ4VYYEYd
 vkmNNaRlk+RFVOtWUsoNo18GjheEiWvW3ZRr8MjYwDKYbryXEFmNPbM4xr57e7LX
 QTtNumrWvS/xm1TGgPDBOUZzGh9UZVonlQVHf5Ix8c4sLR6wkRWPni4N4kJNfcD6
 pPwTQIpwxvCwpyuqtc6UFungBT3aj0FNMNNg06KfpDMXwyo8AFjPSbr7Fe8e5wjm
 vC5+VhB04l1DlX8ThwPvnKaIBtYG26AdB7ffhjQqlU5s4XnpdMXmfWlZtB8hp/oI
 VCtWgvsx
 =Ei7j
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Olof Johansson:
 "A set of fixes that have trickled in over the last couple of weeks:

   - MAINTAINER update for Cavium/Marvell ThunderX2

   - stm32 tweaks to pinmux for Joystick/Camera, and RAM allocation for
     CAN interfaces

   - i.MX fixes for voltage regulator GPIO mappings, fixes voltage
     scaling issues

   - More i.MX fixes for various issues on i.MX eval boards: interrupt
     storm due to u-boot leaving pins in new states, fixing power button
     config, a couple of compatible-string corrections.

   - Powerdown and Suspend/Resume fixes for Allwinner A83-based tablets

   - A few documentation tweaks and a fix of a memory leak in the reset
     subsystem"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  MAINTAINERS: update Cavium ThunderX2 maintainers
  ARM: dts: stm32: change joystick pinctrl definition on stm32mp157c-ev1
  ARM: dts: stm32: remove OV5640 pinctrl definition on stm32mp157c-ev1
  ARM: dts: stm32: Fix CAN RAM mapping on stm32mp157c
  ARM: dts: stm32: relax qspi pins slew-rate for stm32mp157
  arm64: dts: zii-ultra: fix ARM regulator GPIO handle
  ARM: sunxi: Fix CPU powerdown on A83T
  ARM: dts: sun8i-a83t-tbs-a711: Fix WiFi resume from suspend
  arm64: dts: imx8mn: fix compatible string for sdma
  arm64: dts: imx8mm: fix compatible string for sdma
  reset: fix reset_control_ops kerneldoc comment
  ARM: dts: imx6-logicpd: Re-enable SNVS power key
  soc: imx: gpc: fix initialiser format
  ARM: dts: imx6qdl-sabreauto: Fix storm of accelerometer interrupts
  arm64: dts: ls1028a: fix a compatible issue
  reset: fix reset_control_get_exclusive kerneldoc comment
  reset: fix reset_control_lookup kerneldoc comment
  reset: fix of_reset_control_get_count kerneldoc comment
  reset: fix of_reset_simple_xlate kerneldoc comment
  reset: Fix memory leak in reset_control_array_put()
2019-11-10 13:41:59 -08:00
Dehui Sun
5bc8e2875f arm64: dts: mt8183: add systimer0 device node
Add systimer device node for MT8183.

Signed-off-by: Dehui Sun <dehui.sun@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2019-11-10 21:14:18 +01:00
Linus Torvalds
621084cd3d Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner:
 "A small set of fixes for timekeepoing and clocksource drivers:

   - VDSO data was updated conditional on the availability of a VDSO
     capable clocksource. This causes the VDSO functions which do not
     depend on a VDSO capable clocksource to operate on stale data.
     Always update unconditionally.

   - Prevent a double free in the mediatek driver

   - Use the proper helper in the sh_mtu2 driver so it won't attempt to
     initialize non-existing interrupts"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping/vsyscall: Update VDSO data unconditionally
  clocksource/drivers/sh_mtu2: Do not loop using platform_get_irq_by_name()
  clocksource/drivers/mediatek: Fix error handling
2019-11-10 12:03:58 -08:00
Clément Péron
6555431ba2 media: arm64: dts: allwinner: beelink-gs1: Add rc-beelink-gs1 keymap
Beelink GS1 ships with a NEC remote control.

Add the rc keymap to the device-tree.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-09 09:17:26 +01:00
Peter Geis
75aa567803 arm64: dts: rockchip: fix sdmmc detection on boot on rk3328-roc-cc
With working GPIO, during init the GPIO state s reset.
This causes the sdmmc regulator to shut down, preventing detection.
Removing and replacing the card will allow it to be detected, but that should not be necessary.
Fix this by setting the regulator on at boot.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20191016185945.1962-1-pgwipeout@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-11-09 02:15:22 +01:00
Markus Reichl
f9010b0edc arm64: dts: rockchip: Split rk3399-roc-pc for with and without mezzanine board.
For rk3399-roc-pc is a mezzanine board available that carries M.2 and
POE interfaces. Use it with a separate dts.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/0fb4e21a-fe78-00aa-6142-ca8682a913eb@fivetechno.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-11-08 23:07:06 +01:00
Robin Murphy
79702ded8c arm64: dts: rockchip: Add Beelink A1
Beelink A1 is a TV box implementing the higher-end options of the
RK3328 reference design - the DTB from the stock Android firmware is
clearly the "rk3328-box-plus" variant from the Rockchip 3.10 BSP with
minor modifications to accommodate the USB WiFi module and additional
VFD-style LED driver. It features:

- 4GB of 32-bit LPDDR3
- 16GB of HS200 eMMC (newer models with 32GB also exist)
- Realtek RTL8211F phy for gigabit ethernet
- Fn-Link 6221E-UUC module (RealTek RTL8821CU) for 11ac WiFi
  and Bluetooth 4.2
- HDMI and analog A/V
- 1x USB 3.0 type A host, 1x USB 2.0 type A OTG, 1x micro SD
- IR receiver and a neat little LED clock display.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/2aa21c5f3020062cf6a47057bdf3c01f0ec863ea.1571090991.git.robin.murphy@arm.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-11-08 23:06:34 +01:00
Robin Murphy
29e8976e60 arm64: dts: rockchip: Add RK3328 audio pipelines
The audio pipelines for HDMI and the analog codec are internal to the
SoC, so it makes sense to describe them at that level such that boards
need only enable the respective nodes for outputs they implement.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/a09c8d795e7a66fb7bc47af2b6580f6e8dbec91e.1571090991.git.robin.murphy@arm.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-11-08 23:06:18 +01:00
Olof Johansson
7c3ddc6b03 Texas Instruments K3 SoC family changes for 5.5
- Add USB support for J721E
 - Add mailbox support for AM65x and J721E
 - Add MMC/SD support for J721E
 - Disable WP for AM654 MMC0
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEtQ6szHmfiBT7fujkyvq9MXlQGhEFAl3FZUUQHHQta3Jpc3Rv
 QHRpLmNvbQAKCRDK+r0xeVAaEbIrD/9hGvECYGK081frg4cV50LEWZhdaTkxWeWu
 UZEfCixUlKMXmkWL0ktY+dny1ZEXQVExkDFDtjGl7lh9FaMo9SDklaLcX2YHfAHn
 reaT5pndxdrcn83CEHgQSaVx714dS56+g6Gh/RBaUQAKjKeNuKd7INx8zHZ7SMz+
 912S9LDkCZBlgjyNeBQD1wVHyJ+2zsX3ICqQjVB/gD8PZqCq4V1woAPjUQnvQ8di
 wjWFCZx4sQyY8AbUfOHDPkskl11r7ypCd37M6Ko9SnepDf8FSAjiPIrbyoD3LCHP
 kdA+kOhqx91mp3AC4HQmQrJeANk51FjxNT1zp6hnI8Ng4vIvnav5vMhx8DE8Go/m
 sYocnrWJGtL0yLSTrBKDblBccUTNzje2uhANGYbAjsU47lFld6YkMO2Uo9qw8tq2
 HdhyW1OE2h6gNnV2gNWKBKboz96RKASY/JUj+YcH66paum841uuP03LI6U/i2TLA
 QJkw+NolNC/huNOq7+kwW/ip7UrGTwEHJ120Z7IZDksYg9IySc1uXgBQCxe4XaOr
 Hgtt914T89KLF20mkzMXm7lN/pm4n5YSviAg1Q6R0bfwcphSmbGvsc2vBG0mNpEw
 GxB0UA92svD+KRUbqXDZ9ec5ir/wI8U855RnNw39q1+vJU56FOVYC65TISyFpjyY
 9gUh7L9Ymg==
 =94Ds
 -----END PGP SIGNATURE-----

Merge tag 'ti-k3-soc-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into arm/dt

Texas Instruments K3 SoC family changes for 5.5

- Add USB support for J721E
- Add mailbox support for AM65x and J721E
- Add MMC/SD support for J721E
- Disable WP for AM654 MMC0

* tag 'ti-k3-soc-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux:
  arm64: dts: ti: k3-j721e-common-proc-board: Add USB ports
  arm64: dts: ti: k3-j721e-main: add USB controller nodes
  arm64: dts: ti: k3-am654-base-board: Add disable-wp for mmc0
  arm64: dts: ti: j721e-common-proc-board: Add Support for eMMC and SD card
  arm64: dts: ti: j721e-main: Add SDHCI nodes
  arm64: dts: ti: k3-j721e-common-proc-board: Add IPC sub-mailbox nodes
  arm64: dts: ti: k3-j721e-main: Add mailbox cluster nodes
  arm64: dts: ti: k3-am65-base-board: Add IPC sub-mailbox nodes for R5Fs
  arm64: dts: ti: k3-am65-main: Add mailbox cluster nodes

Link: https://lore.kernel.org/r/681f1bb5-d28c-a302-690a-82f0be4a7f34@ti.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-08 10:34:55 -08:00
Olof Johansson
44124df44d arm64: dts: zynqmp: DT changes for v5.5
- Add firmware node with fpga and nvmem support
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCXcPfkQAKCRDKSWXLKUoM
 Ids/AJwJ7rpNrB02FBhqkD253l8FzuR8gwCdGpnedyB/HgLc6iudIdek19C2ezQ=
 =Hnrs
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-dt-for-v5.5' of https://github.com/Xilinx/linux-xlnx into arm/dt

arm64: dts: zynqmp: DT changes for v5.5

- Add firmware node with fpga and nvmem support

* tag 'zynqmp-dt-for-v5.5' of https://github.com/Xilinx/linux-xlnx:
  arm64: zynqmp: Add support for zynqmp nvmem firmware driver
  arm64: zynqmp: Label whole PL part as fpga_full region
  arm64: zynqmp: Add support for zynqmp fpga manager
  arm64: zynqmp: Add firmware DT node

Link: https://lore.kernel.org/r/543394c2-ddff-33be-4c90-e01847539c64@monstr.eu
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-08 10:24:35 -08:00
Catalin Marinas
6be22809e5 Merge branches 'for-next/elf-hwcap-docs', 'for-next/smccc-conduit-cleanup', 'for-next/zone-dma', 'for-next/relax-icc_pmr_el1-sync', 'for-next/double-page-fault', 'for-next/misc', 'for-next/kselftest-arm64-signal' and 'for-next/kaslr-diagnostics' into for-next/core
* for-next/elf-hwcap-docs:
  : Update the arm64 ELF HWCAP documentation
  docs/arm64: cpu-feature-registers: Rewrite bitfields that don't follow [e, s]
  docs/arm64: cpu-feature-registers: Documents missing visible fields
  docs/arm64: elf_hwcaps: Document HWCAP_SB
  docs/arm64: elf_hwcaps: sort the HWCAP{, 2} documentation by ascending value

* for-next/smccc-conduit-cleanup:
  : SMC calling convention conduit clean-up
  firmware: arm_sdei: use common SMCCC_CONDUIT_*
  firmware/psci: use common SMCCC_CONDUIT_*
  arm: spectre-v2: use arm_smccc_1_1_get_conduit()
  arm64: errata: use arm_smccc_1_1_get_conduit()
  arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit()

* for-next/zone-dma:
  : Reintroduction of ZONE_DMA for Raspberry Pi 4 support
  arm64: mm: reserve CMA and crashkernel in ZONE_DMA32
  dma/direct: turn ARCH_ZONE_DMA_BITS into a variable
  arm64: Make arm64_dma32_phys_limit static
  arm64: mm: Fix unused variable warning in zone_sizes_init
  mm: refresh ZONE_DMA and ZONE_DMA32 comments in 'enum zone_type'
  arm64: use both ZONE_DMA and ZONE_DMA32
  arm64: rename variables used to calculate ZONE_DMA32's size
  arm64: mm: use arm64_dma_phys_limit instead of calling max_zone_dma_phys()

* for-next/relax-icc_pmr_el1-sync:
  : Relax ICC_PMR_EL1 (GICv3) accesses when ICC_CTLR_EL1.PMHE is clear
  arm64: Document ICC_CTLR_EL3.PMHE setting requirements
  arm64: Relax ICC_PMR_EL1 accesses when ICC_CTLR_EL1.PMHE is clear

* for-next/double-page-fault:
  : Avoid a double page fault in __copy_from_user_inatomic() if hw does not support auto Access Flag
  mm: fix double page fault on arm64 if PTE_AF is cleared
  x86/mm: implement arch_faults_on_old_pte() stub on x86
  arm64: mm: implement arch_faults_on_old_pte() on arm64
  arm64: cpufeature: introduce helper cpu_has_hw_af()

* for-next/misc:
  : Various fixes and clean-ups
  arm64: kpti: Add NVIDIA's Carmel core to the KPTI whitelist
  arm64: mm: Remove MAX_USER_VA_BITS definition
  arm64: mm: simplify the page end calculation in __create_pgd_mapping()
  arm64: print additional fault message when executing non-exec memory
  arm64: psci: Reduce the waiting time for cpu_psci_cpu_kill()
  arm64: pgtable: Correct typo in comment
  arm64: docs: cpu-feature-registers: Document ID_AA64PFR1_EL1
  arm64: cpufeature: Fix typos in comment
  arm64/mm: Poison initmem while freeing with free_reserved_area()
  arm64: use generic free_initrd_mem()
  arm64: simplify syscall wrapper ifdeffery

* for-next/kselftest-arm64-signal:
  : arm64-specific kselftest support with signal-related test-cases
  kselftest: arm64: fake_sigreturn_misaligned_sp
  kselftest: arm64: fake_sigreturn_bad_size
  kselftest: arm64: fake_sigreturn_duplicated_fpsimd
  kselftest: arm64: fake_sigreturn_missing_fpsimd
  kselftest: arm64: fake_sigreturn_bad_size_for_magic0
  kselftest: arm64: fake_sigreturn_bad_magic
  kselftest: arm64: add helper get_current_context
  kselftest: arm64: extend test_init functionalities
  kselftest: arm64: mangle_pstate_invalid_mode_el[123][ht]
  kselftest: arm64: mangle_pstate_invalid_daif_bits
  kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils
  kselftest: arm64: extend toplevel skeleton Makefile

* for-next/kaslr-diagnostics:
  : Provide diagnostics on boot for KASLR
  arm64: kaslr: Check command line before looking for a seed
  arm64: kaslr: Announce KASLR status on boot
2019-11-08 17:46:11 +00:00
Linus Torvalds
9e8ed26e60 arm64 fix for -rc7
- Fix pte_same() to avoid getting stuck on write fault
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAl3FPbsQHHdpbGxAa2Vy
 bmVsLm9yZwAKCRC3rHDchMFjNOkjB/9sNekV5x5vtLSXLPXH7TEt2jsKPHKHoc5h
 i9bnpZc8na50Sj9V4ugMs4mqa5qOw+m2sJEHXxVr5k/bNJv3gqEpWAlnb4bXgjDj
 yukM9FQVBRNMdDFeP3Yjm9VuoWhId0L9OfqCq/N6xi2kN3Xp60Ms7drYQeweBdEa
 dBj4x52o/lMo3h5JF0QmWKTD85Nz0f4GxX4gclBMqsg/VAQOMDho86mMsfecwgCA
 y9WbJClsH3nBcV8bChx0oSGzM+lJBmP6OnlxKM9tyzTmhJJQw4FDUmHmlaFptMe4
 DRqJnVi41tzv7p8As/aE4sY7rnWEKaitn0r7gCfei+ACJG0Ezmas
 =3M1Z
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fix from Will Deacon:
 "Fix pte_same() to avoid getting stuck on write fault.

  This single arm64 fix is a revert of 747a70e60b ("arm64: Fix
  copy-on-write referencing in HugeTLB"), not because that patch was
  wrong, but because it was broken by aa57157be6 ("arm64: Ensure
  VM_WRITE|VM_SHARED ptes are clean by default") which we merged in
  -rc6.

  We spotted the issue in Android (AOSP), where one of the JIT threads
  gets stuck on a write fault during boot because the faulting pte is
  marked as PTE_DIRTY | PTE_WRITE | PTE_RDONLY and the fault handler
  decides that there's nothing to do thanks to pte_same() masking out
  PTE_RDONLY.

  Thanks to John Stultz for reporting this and testing this so quickly,
  and to Steve Capper for confirming that the HugeTLB tests continue to
  pass"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Do not mask out PTE_RDONLY in pte_same()
2019-11-08 09:43:34 -08:00
Mark Brown
2203e1adb9 arm64: kaslr: Check command line before looking for a seed
Now that we print diagnostics at boot the reason why we do not initialise
KASLR matters. Currently we check for a seed before we check if the user
has explicitly disabled KASLR on the command line which will result in
misleading diagnostics so reverse the order of those checks. We still
parse the seed from the DT early so that if the user has both provided a
seed and disabled KASLR on the command line we still mask the seed on
the command line.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-11-08 17:36:51 +00:00
Mark Brown
294a9ddde6 arm64: kaslr: Announce KASLR status on boot
Currently the KASLR code is silent at boot unless it forces on KPTI in
which case a message will be printed for that. This can lead to users
incorrectly believing their system has the feature enabled when it in
fact does not, and if they notice the problem the lack of any
diagnostics makes it harder to understand the problem. Add an initcall
which prints a message showing the status of KASLR during boot to make
the status clear.

This is particularly useful in cases where we don't have a seed. It
seems to be a relatively common error for system integrators and
administrators to enable KASLR in their configuration but not provide
the seed at runtime, often due to seed provisioning breaking at some
later point after it is initially enabled and verified.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-11-08 17:36:48 +00:00
Marc Zyngier
cd7056ae34 Merge remote-tracking branch 'kvmarm/misc-5.5' into kvmarm/next 2019-11-08 11:27:29 +00:00
Marc Zyngier
ef2e78ddad KVM: arm64: Opportunistically turn off WFI trapping when using direct LPI injection
Just like we do for WFE trapping, it can be useful to turn off
WFI trapping when the physical CPU is not oversubscribed (that
is, the vcpu is the only runnable process on this CPU) *and*
that we're using direct injection of interrupts.

The conditions are reevaluated on each vcpu_load(), ensuring that
we don't switch to this mode on a busy system.

On a GICv4 system, this has the effect of reducing the generation
of doorbell interrupts to zero when the right conditions are
met, which is a huge improvement over the current situation
(where the doorbells are screaming if the CPU ever hits a
blocking WFI).

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Link: https://lore.kernel.org/r/20191107160412.30301-3-maz@kernel.org
2019-11-08 11:14:36 +00:00
Catalin Marinas
51effa6d11 Merge branch 'for-next/perf' into for-next/core
- Support for additional PMU topologies on HiSilicon platforms
- Support for CCN-512 interconnect PMU
- Support for AXI ID filtering in the IMX8 DDR PMU
- Support for the CCPI2 uncore PMU in ThunderX2
- Driver cleanup to use devm_platform_ioremap_resource()

* for-next/perf:
  drivers/perf: hisi: update the sccl_id/ccl_id for certain HiSilicon platform
  perf/imx_ddr: Dump AXI ID filter info to userspace
  docs/perf: Add AXI ID filter capabilities information
  perf/imx_ddr: Add driver for DDR PMU in i.MX8MPlus
  perf/imx_ddr: Add enhanced AXI ID filter support
  bindings: perf: imx-ddr: Add new compatible string
  docs/perf: Add explanation for DDR_CAP_AXI_ID_FILTER_ENHANCED quirk
  arm64: perf: Simplify the ARMv8 PMUv3 event attributes
  drivers/perf: Add CCPI2 PMU support in ThunderX2 UNCORE driver.
  Documentation: perf: Update documentation for ThunderX2 PMU uncore driver
  Documentation: Add documentation for CCN-512 DTS binding
  perf: arm-ccn: Enable stats for CCN-512 interconnect
  perf/smmuv3: use devm_platform_ioremap_resource() to simplify code
  perf/arm-cci: use devm_platform_ioremap_resource() to simplify code
  perf/arm-ccn: use devm_platform_ioremap_resource() to simplify code
  perf: xgene: use devm_platform_ioremap_resource() to simplify code
  perf: hisi: use devm_platform_ioremap_resource() to simplify code
2019-11-08 10:57:14 +00:00
Roger Quadros
49e19745e4 arm64: dts: ti: k3-j721e-common-proc-board: Add USB ports
Add USB0 as otg port and USB1 as host port.

Although USB0 can be used at super-speed, limit the
speed to high-speed for now till SERDES PHY support
is added.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2019-11-08 11:41:54 +02:00
Roger Quadros
451555c80b arm64: dts: ti: k3-j721e-main: add USB controller nodes
J721e has 2 USB super-speed controllers add them.

The USB2 PHY doesn't need any configuration.
USB3 PHY needs to be implemented using the Cadence
Sierra PHY. This support will be added later.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2019-11-08 11:41:54 +02:00
Dan Williams
16993c0f0a arm/efi: EFI soft reservation to memblock
UEFI 2.8 defines an EFI_MEMORY_SP attribute bit to augment the
interpretation of the EFI Memory Types as "reserved for a specific
purpose".

The proposed Linux behavior for specific purpose memory is that it is
reserved for direct-access (device-dax) by default and not available for
any kernel usage, not even as an OOM fallback.  Later, through udev
scripts or another init mechanism, these device-dax claimed ranges can
be reconfigured and hot-added to the available System-RAM with a unique
node identifier. This device-dax management scheme implements "soft" in
the "soft reserved" designation by allowing some or all of the
reservation to be recovered as typical memory. This policy can be
disabled at compile-time with CONFIG_EFI_SOFT_RESERVE=n, or runtime with
efi=nosoftreserve.

For this patch, update the ARM paths that consider
EFI_CONVENTIONAL_MEMORY to optionally take the EFI_MEMORY_SP attribute
into account as a reservation indicator. Publish the soft reservation as
IORES_DESC_SOFT_RESERVED memory, similar to x86.

(Based on an original patch by Ard)

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-11-07 15:44:19 +01:00
Catalin Marinas
c1c9ea6371 Merge branch 'arm64/ftrace-with-regs' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core
FTRACE_WITH_REGS support for arm64.

* 'arm64/ftrace-with-regs' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux:
  arm64: ftrace: minimize ifdeffery
  arm64: implement ftrace with regs
  arm64: asm-offsets: add S_FP
  arm64: insn: add encoder for MOV (register)
  arm64: module/ftrace: intialize PLT at load time
  arm64: module: rework special section handling
  module/ftrace: handle patchable-function-entry
  ftrace: add ftrace_init_nop()
2019-11-07 11:26:54 +00:00
Nicolas Saenz Julienne
bff3b04460 arm64: mm: reserve CMA and crashkernel in ZONE_DMA32
With the introduction of ZONE_DMA in arm64 we moved the default CMA and
crashkernel reservation into that area. This caused a regression on big
machines that need big CMA and crashkernel reservations. Note that
ZONE_DMA is only 1GB big.

Restore the previous behavior as the wide majority of devices are OK
with reserving these in ZONE_DMA32. The ones that need them in ZONE_DMA
will configure it explicitly.

Fixes: 1a8e1cef76 ("arm64: use both ZONE_DMA and ZONE_DMA32")
Reported-by: Qian Cai <cai@lca.pw>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-11-07 11:22:20 +00:00
Quentin Perret
48da6f8005 arm64: defconfig: Enable CONFIG_ENERGY_MODEL
The recently introduced Energy Model (EM) framework manages power cost
tables for the CPUs of the system. Its only user right now is the
scheduler, in the context of Energy Aware Scheduling (EAS).

However, the EM framework also offers a generic infrastructure that
could replace subsystem-specific implementations of the same concepts,
as this is the case in the thermal framework.

So, in order to prepare the migration of the thermal subsystem to use
the EM framework, enable it in the default arm64 defconfig, which is the
most commonly used architecture for IPA. This will also compile-in all
of the EAS code, although it won't be enabled by default -- EAS requires
to use the 'schedutil' CPUFreq governor while arm64 defaults to
'performance'.

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191030151451.7961-2-qperret@google.com
2019-11-07 07:02:40 +01:00
Olof Johansson
1d16a9172c Qualcomm ARM64 Updates for v5.5
* Add thermal IRQ support on MSM8916, SDM845, MSM8996, and QCS404
 * Fix thermal HW ids for cpus on MSM8916
 * Add blsp1 UART3 and  blsp1 BAM on MSM8998
 * Add volume buttons and WCNSS for Wifi and BT on MSM8916 LongCheer-l8150
 * Fixup load on l21 for SD on apq8096-db820c
 * Enable LVS1/2, APSS watchdog, and select UFS reset gpio for SDM845
 * Disable coresight by default on MSM8998
 * Enable bluetooth and remove retention idle state on MSM8998-clamshell
 * Enable adsp, cdsp, and mpss on C630
 * Enable bluetooth on MSM8998-mtp
 * Delete zap shader on SDM845-cheza
 * Add tactile buttons and hall sensor on MSM8916-Samsung-A2015
 * Add Interconnect nodes, watchdog, and sleep clk on QCS404
 * Override Iris compatible on MSM8916-Samsung-A5U
 * Enable WCNSS Wifi and bluetooth on MSM8916-Samsung-A2015
 * Fixup cooling states for the aoss warming devices
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJdwQS2AAoJEFKiBbHx2RXVsTIQALz7tNsuZ+CGpzUKxUfQmd0I
 TDk5xMeoeOLc+zT9GkAo0pf4De91D9qHLv9LjYZT7ukL1RjF/LrtC9Mv9qj7dp+r
 jrOd1MdXJqC+6w3uW4c7mP0Ov+obdkU8seN9lTN7eBbskDgEurjHncU49XUuRjCF
 1YECywNkqTieG71fcil3Wi65A+x6fttfrmlpFdIuDrlfh2IAQeHrueAG4cBe0E3l
 ajfU6yON26DeEVY09SnJwlc7RWvkUF1gjZDKEe1ELOrydsTvJHhZfs44ilnoTkJL
 wkY5unNX8KgjdZBpNAD10otVZp7lOmsCKOaVzB9e7n9/iG1vd08QWFeTK1xxGSoT
 Mo03WxxFxuSweOrB/oe4e2R16RbzccprniVNM6SuC5Md+sYvZKxzWrnvl5jdK+j2
 0351A4UgMvY5UCT3DvZxosbp80T+DaU9mubuqG2lrytWMiTAupsCQabzxTGYl78B
 B6lr4QQQ1lWJTOuw2qhzKA48mUzcrgbweJSXXWPeipRmUbL2bF8KpDgb2hxjZvKN
 TpjZ7qVGhNrKdEixp2krOwX074bckuBonyxDyuDvNvDnGPG4/cswVF6Ik3v5PiAO
 tswk1hUQ6VDEhfXD0us157DtmeqC+LwG5XtU0LcWEjgunqJxBbo9FqmYgxVnliSL
 fPP9v91WyTfD0Neuyy7M
 =jkQc
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt

Qualcomm ARM64 Updates for v5.5

* Add thermal IRQ support on MSM8916, SDM845, MSM8996, and QCS404
* Fix thermal HW ids for cpus on MSM8916
* Add blsp1 UART3 and  blsp1 BAM on MSM8998
* Add volume buttons and WCNSS for Wifi and BT on MSM8916 LongCheer-l8150
* Fixup load on l21 for SD on apq8096-db820c
* Enable LVS1/2, APSS watchdog, and select UFS reset gpio for SDM845
* Disable coresight by default on MSM8998
* Enable bluetooth and remove retention idle state on MSM8998-clamshell
* Enable adsp, cdsp, and mpss on C630
* Enable bluetooth on MSM8998-mtp
* Delete zap shader on SDM845-cheza
* Add tactile buttons and hall sensor on MSM8916-Samsung-A2015
* Add Interconnect nodes, watchdog, and sleep clk on QCS404
* Override Iris compatible on MSM8916-Samsung-A5U
* Enable WCNSS Wifi and bluetooth on MSM8916-Samsung-A2015
* Fixup cooling states for the aoss warming devices

* tag 'qcom-arm64-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (26 commits)
  arm64: dts: qcom: db845c: Enable LVS 1 and 2
  arm64: dts: qcom: msm8998: Disable coresight by default
  arm64: dts: qcom: msm8998-clamshell: Remove retention idle state
  arm64: dts: qcom: sdm845-cheza: delete zap-shader
  arm64: dts: msm8916: thermal: Fixup HW ids for cpu sensors
  arm64: dts: sdm845: thermal: Add interrupt support
  arm64: dts: msm8996: thermal: Add interrupt support
  arm64: dts: msm8998: thermal: Add interrupt support
  arm64: dts: qcs404: thermal: Add interrupt support
  arm64: dts: qcom: sdm845: Add APSS watchdog node
  arm64: dts: qcom: c630: Enable adsp, cdsp and mpss
  arm64: dts: qcom: msm8998-clamshell: Enable bluetooth
  arm64: dts: qcom: msm8998-mtp: Enable bluetooth
  arm64: dts: qcom: msm8998: Add blsp1_uart3
  arm64: dts: qcom: msm8998: Add blsp1 BAM
  arm64: dts: msm8916-longcheer-l8150: Add Volume buttons
  arm64: dts: msm8916-longcheer-l8150: Enable WCNSS for WiFi and BT
  soc: qcom: Invert the cooling states for the aoss warming devices
  arm64: dts: apq8096-db820c: Increase load on l21 for SDCARD
  arm64: dts: msm8916-samsung-a2015: add tactile buttons and hall sensor
  ...

Link: https://lore.kernel.org/r/1573068840-13098-2-git-send-email-agross@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-06 14:05:01 -08:00
Neil Armstrong
87297878b5 arm64: dts: meson-gx: fix i2c compatible
This fixes the following DT schemas check errors:
meson-gxbb-nanopi-k2.dt.yaml: i2c@8500: compatible: Additional items are not allowed ('amlogic,meson-gxbb-i2c' was unexpected)
meson-gxbb-nanopi-k2.dt.yaml: i2c@8500: compatible:0: 'amlogic,meson-gx-i2c' is not one of ['amlogic,meson6-i2c', 'amlogic,meson-gxbb-i2c', 'amlogic,meson-axg-i2c']
meson-gxbb-nanopi-k2.dt.yaml: i2c@8500: compatible: ['amlogic,meson-gx-i2c', 'amlogic,meson-gxbb-i2c'] is too long

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-11-06 11:36:29 -08:00
Neil Armstrong
b485a6a4e8 arm64: dts: meson-gx: cec node should be disabled by default
This fixes the following DT schemas check errors:
meson-gxl-s905x-hwacom-amazetv.dt.yaml: cec@100: 'hdmi-phandle' is a required property
meson-gxm-rbox-pro.dt.yaml: cec@100: 'hdmi-phandle' is a required property

because CEC is not enabled on these boards.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-11-06 11:36:29 -08:00
Neil Armstrong
409a0daa72 arm64: dts: meson-g12b-odroid-n2: add missing amlogic, s922x compatible
This fixes the following DT schemas check errors:
meson-g12b-odroid-n2.dt.yaml: /: compatible: ['hardkernel,odroid-n2', 'amlogic,g12b'] is not valid under any of the given schemas

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-11-06 11:36:29 -08:00
Neil Armstrong
69fb3f21f8 arm64: dts: meson-gxm: fix gpu irq order
This fixes the following DT schemas check errors:
meson-gxm-khadas-vim2.dt.yaml: gpu@c0000: interrupt-names:0: 'job' was expected
meson-gxm-khadas-vim2.dt.yaml: gpu@c0000: interrupt-names:2: 'gpu' was expected

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-11-06 11:36:29 -08:00
Neil Armstrong
711f9cb1f1 arm64: dts: meson-g12a: fix gpu irq order
This fixes the following DT schemas check errors:
meson-g12b-s922x-khadas-vim3.dt.yaml: gpu@ffe40000: interrupt-names:0: 'job' was expected
meson-g12b-s922x-khadas-vim3.dt.yaml: gpu@ffe40000: interrupt-names:2: 'gpu' was expected

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2019-11-06 11:36:28 -08:00
Catalin Marinas
6767df245f arm64: Do not mask out PTE_RDONLY in pte_same()
Following commit 73e86cb03c ("arm64: Move PTE_RDONLY bit handling out
of set_pte_at()"), the PTE_RDONLY bit is no longer managed by
set_pte_at() but built into the PAGE_* attribute definitions.
Consequently, pte_same() must include this bit when checking two PTEs
for equality.

Remove the arm64-specific pte_same() function, practically reverting
commit 747a70e60b ("arm64: Fix copy-on-write referencing in HugeTLB")

Fixes: 73e86cb03c ("arm64: Move PTE_RDONLY bit handling out of set_pte_at()")
Cc: <stable@vger.kernel.org> # 4.14.x-
Cc: Will Deacon <will@kernel.org>
Cc: Steve Capper <steve.capper@arm.com>
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2019-11-06 19:31:56 +00:00
Olof Johansson
1f0753ea6a i.MX defconfig update for 5.5:
- Enable i.MX7ULP watchdog, DA9052 touch and USB configfs support
    in imx_v6_v7_defconfig.
  - Enable newly added S32V234 SoC and its UART driver support in arm64
    defconfig.
  - Built i.MX8QXP SCU key driver as module in arm64 defconfig.
  - Change AT803X Ethernet PHY driver from module to built-in, so that
    we can boot i.MX8MM EVK board with rootfs on NFS.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJdwYuhAAoJEFBXWFqHsHzO+tcH/RmEkt5uueRqM++I56F7Kmc9
 80I2pMUbCXln2rjWXEP29OE1h4pKtimfwtEoQvtRX8DOhCFT+CCxsj9JqMZAEnxp
 WrCC6GbNAYG+Geje6HAVy7mr2mFD4KXwcc/TLjV2fk3MpuEcsYLuEL/t+wqnKw/W
 IabyG0v/CZfp1fkX5FIkpmI770WzOs5kzfIGTnJ9GEJtj/omZYPXK605GSDSWovJ
 XX2iI2wFmLy8/KO9enhGQjSzZQyOZce/cyqCG4YGdWSHQzJE9zBP207EHZqEB21b
 g+5VzYbM75WmAt0TL+2K3ZzuOKVKZeDpY6KQTz02rTfIRZ4sieY6l9+i/ECtAgY=
 =w4CK
 -----END PGP SIGNATURE-----

Merge tag 'imx-defconfig-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig

i.MX defconfig update for 5.5:
 - Enable i.MX7ULP watchdog, DA9052 touch and USB configfs support
   in imx_v6_v7_defconfig.
 - Enable newly added S32V234 SoC and its UART driver support in arm64
   defconfig.
 - Built i.MX8QXP SCU key driver as module in arm64 defconfig.
 - Change AT803X Ethernet PHY driver from module to built-in, so that
   we can boot i.MX8MM EVK board with rootfs on NFS.

* tag 'imx-defconfig-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: defconfig: Change CONFIG_AT803X_PHY from m to y
  ARM: imx_v6_v7_defconfig: Enable CONFIG_TOUCHSCREEN_DA9052
  arm64: defconfig: Enable configs for S32V234
  arm64: defconfig: Enable CONFIG_KEYBOARD_IMX_SC_KEY as module
  ARM: imx_v6_v7_defconfig: Build USB_CONFIGFS into kernel
  ARM: imx_v6_v7_defconfig: Enable CONFIG_IMX7ULP_WDT by default

Link: https://lore.kernel.org/r/20191105150315.15477-7-shawnguo@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-06 07:49:01 -08:00
Olof Johansson
17795bf9aa LX2160A TMU support for 5.5:
- Add TMU (Thermal Monitoring Unit) device node to enable thermal
    support on LX2160A SoC.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJdwYfpAAoJEFBXWFqHsHzOEuYH/jptqT0TA8u4x/HB74KZxDSn
 brX77UuDb2WAG1xqGNIUZwOtPy6TknrbhT+WtB+4w7gKUIH0pu5Oi1BWV1D2qvD9
 Ky+3fB4eSxqb72b6YWWyylt7pfDQ1iSt2CXmx1W+ZbBNX1Ku6jb9uNReC78FdT/n
 R+/gBu07EjGxYrOn5KyxWwxydsyPgRg0xW4H5Sp+ynzOFYTkWM8IM60ekz4667Yf
 RZdF5mG3hefuYH+d2DNrrQf9UB2rfK8ALUvkYfAQpqiTBBgBS9XIVnlHlC7IgdfA
 2ZCzYGenlA1HBD+XR6TCj7SwhoPEgpZiqiVP/eC6c0jHYOlaOB0wOnRbGbTi77w=
 =dD2j
 -----END PGP SIGNATURE-----

Merge tag 'imx-dt64-tmu-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt

LX2160A TMU support for 5.5:
 - Add TMU (Thermal Monitoring Unit) device node to enable thermal
   support on LX2160A SoC.

* tag 'imx-dt64-tmu-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: lx2160a: add tmu device node
  ARM: imx_v6_v7_defconfig: Enable CONFIG_DRM_MSM
  arm64: dts: imx8mn: Use correct clock for usdhc's ipg clk
  arm64: dts: imx8mm: Use correct clock for usdhc's ipg clk
  arm64: dts: imx8mq: Use correct clock for usdhc's ipg clk
  ARM: dts: imx7s: Correct GPT's ipg clock source
  ARM: dts: vf610-zii-scu4-aib: Specify 'i2c-mux-idle-disconnect'
  ARM: dts: imx6q-logicpd: Re-Enable SNVS power key
  arm64: dts: lx2160a: Correct CPU core idle state name
  arm64: dts: zii-ultra: fix ARM regulator states
  soc: imx: imx-scu: Getting UID from SCU should have response

Link: https://lore.kernel.org/r/20191105150315.15477-6-shawnguo@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-06 07:48:37 -08:00
Olof Johansson
06e78df33d i.MX arm64 device tree changes for 5.5:
- Add the initial support for a new arm64 family SoC from NXP:
    S32V234 ("Treerunner") vision microprocessors which are targeted for
    high-performance, computationally intensive vision and sensor fusion
    applications that require automotive safety levels.
  - New board support: i.MX8MN LPDDR4 EVK, i.MX8QXP Colibri and
    S32V234 EVB.
  - A series of patch from Andrey Smirnov to improve zii-ultra support by
    fixing regulator and adding accelerometer, switch watchdog.
  - Add system counter device and enable cpuidle support for i.MX8MN.
  - Move usdhc clocks assignment from SoC to board level DTS for
    i.MX8 based boards.
  - Add PCA6416 on I2C3 bus for imx8mm-evk, and enable SCU key for
    imx8qxp-mek board.
  - Enable GPU passive throttling on i.MX8MQ SoC, and add DDR PMU device
    for i.MX8MN.
  - A series from Fabio Estevam to fix DTC W=1 warnings for LS1028A device.
  - Update the clock providers for the Mali DP500 and '#clock-cells' of
    DPCLK node for LS1028A SoC.
  - Misc small updates on various boards.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJdwYP9AAoJEFBXWFqHsHzOVG8H/0bkEUvROVx9DT3rDCnZzhAl
 dR4aqDKST7Shwv+hI4ueqXWMtD/fg4FnmCGkMh5FYrJEsoRHAJWPQ6/44jor9tyV
 rgvhY2nCsYSD40XmbnibtIHKMay3MV2E9FHlHggqus/flsZtIOG6iFk4NJBv5lQ8
 sWB8eei8KEo8NBpis9het2lDrS7pBYDq2FkWMIVxNxfSZ+wwFlNGbdijun0W+oOX
 ccSXoHCUEx5ir+my70T/I1tVOJdaNZnaIvjsvFR9/KDTt7GFoq3woI5A1RAhBm8J
 tc7FmN3M6gSI54U2EKcDbBvp+c0Rohn1ZyziWRvu93yvAj+I4WB1TXJ8hSmq6NQ=
 =EAzo
 -----END PGP SIGNATURE-----

Merge tag 'imx-dt64-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt

i.MX arm64 device tree changes for 5.5:
 - Add the initial support for a new arm64 family SoC from NXP:
   S32V234 ("Treerunner") vision microprocessors which are targeted for
   high-performance, computationally intensive vision and sensor fusion
   applications that require automotive safety levels.
 - New board support: i.MX8MN LPDDR4 EVK, i.MX8QXP Colibri and
   S32V234 EVB.
 - A series of patch from Andrey Smirnov to improve zii-ultra support by
   fixing regulator and adding accelerometer, switch watchdog.
 - Add system counter device and enable cpuidle support for i.MX8MN.
 - Move usdhc clocks assignment from SoC to board level DTS for
   i.MX8 based boards.
 - Add PCA6416 on I2C3 bus for imx8mm-evk, and enable SCU key for
   imx8qxp-mek board.
 - Enable GPU passive throttling on i.MX8MQ SoC, and add DDR PMU device
   for i.MX8MN.
 - A series from Fabio Estevam to fix DTC W=1 warnings for LS1028A device.
 - Update the clock providers for the Mali DP500 and '#clock-cells' of
   DPCLK node for LS1028A SoC.
 - Misc small updates on various boards.

* tag 'imx-dt64-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (40 commits)
  arm64: dts: imx8mn-evk: Remove invalid Atheros properties
  arm64: dts: freescale: add initial support for colibri imx8x
  arm64: dts: ls1028a: Fix tmu unit address
  arm64: dts: ls1028a: Move thermal-zone out of SoC
  arm64: dts: ls1028a-qds: Remove unnecessary #address-cells/#size-cells
  arm64: dts: imx8mn: Remove duplicated machine compatible
  arm64: dts: imx8mm: Remove duplicated machine compatible
  arm64: dts: imx8mq-evk: Add remote control
  arm64: dts: imx8mn: Add LPDDR4 EVK board support
  arm64: dts: imx8mn: Create EVK dtsi file for common use
  arm64: dts: imx8mn: Move usdhc clocks assignment to board DT
  arm64: dts: imx8mm: Move usdhc clocks assignment to board DT
  arm64: dts: imx8mq: Move usdhc clocks assignment to board DT
  arm64: dts: imx8qxp: Move usdhc clocks assignment to board DT
  arm64: dts: fsl: Add device tree for S32V234-EVB
  arm64: dts: imx8mm-evk: Assigned clocks for audio plls
  arm64: dts: zii-ultra: Add node for switch watchdog
  arm64: dts: zii-ultra: Add node for accelerometer
  arm64: dts: zii-ultra: Fix regulator-3p3-main's name
  arm64: dts: zii-ultra: Fix regulator-vsd-3v3's vin-supply
  ...

Link: https://lore.kernel.org/r/20191105150315.15477-5-shawnguo@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-06 07:47:57 -08:00
Olof Johansson
0f3dac6110 i.MX SoC update for 5.5:
- Add arm64 Kconfig option for the NXP S32 platform.
  - Drop imx_anatop_usb_chrg_detect_disable() function which becomes
    unneeded, since all the necessary charger setup is done by the USB
    PHY driver now.
  - Add serial number support for i.MX6/7 SoCs by reading 64-bit SoC
    unique ID from OCOTP block.
  - Replace i.MX machine specific coherency exit implementation using
    the generic v7_exit_coherency_flush() function.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJdwV03AAoJEFBXWFqHsHzOZuwH/Rsls0F80Iowk9382TJqQEWN
 cwuZpaPmYyxClUGI16QCWIeL2w0AMh0ni+iamneabADH0rLUvhu753mtSnODZFxE
 YQJMJ6Gv5rTW87A3zwWDoGulJ4YGr2HpoNHyY0Re7KQ5lFEZOKafIThbkDkERaum
 CqQj5uy39p7DRs+g2jtP8ePTQVH1fU0GfXkNIfI7izYftvM3cpSjwWoTrCV5NE2I
 SDanlra5f2UeJ6uUBzpzUrzbNQSMHr87PCfaFwpNdvcCSP2eYrY2NHf6Swi81Q+7
 SNLO+5iE9UHWiojWD0vdataioKxOEeSQF8KavVp6Ou6ue/u31TCiCi6ki6sAEB4=
 =Mo5t
 -----END PGP SIGNATURE-----

Merge tag 'imx-soc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc

i.MX SoC update for 5.5:
 - Add arm64 Kconfig option for the NXP S32 platform.
 - Drop imx_anatop_usb_chrg_detect_disable() function which becomes
   unneeded, since all the necessary charger setup is done by the USB
   PHY driver now.
 - Add serial number support for i.MX6/7 SoCs by reading 64-bit SoC
   unique ID from OCOTP block.
 - Replace i.MX machine specific coherency exit implementation using
   the generic v7_exit_coherency_flush() function.

* tag 'imx-soc-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx: use generic function to exit coherency
  ARM: imx: Add serial number support for i.MX6/7 SoCs
  ARM: imx: Drop imx_anatop_usb_chrg_detect_disable()
  arm64: Introduce config for S32

Link: https://lore.kernel.org/r/20191105150315.15477-2-shawnguo@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-06 07:46:42 -08:00
Olof Johansson
ea21768a8a A few more DT patches for 5.5, mostly:
- USB3 support for the H6
   - Deinterlacer support for the H3
   - eDP Bridge support on the Teres-I
   - More DT cleanups thanks to the validation
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXcK5xwAKCRDj7w1vZxhR
 xZagAP9dDphr5+3Ah5E01ANIbI3xiEITkMm55DjahFUtcoygogEA82VvUmCNMzRx
 UVt2+k/eLB12V0RPsCCeCKXGCt34OgI=
 =arSK
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt-for-5.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

A few more DT patches for 5.5, mostly:
  - USB3 support for the H6
  - Deinterlacer support for the H3
  - eDP Bridge support on the Teres-I
  - More DT cleanups thanks to the validation

* tag 'sunxi-dt-for-5.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: h6: Remove useless reset name
  ARM: dts: sun6i: Remove useless reset-names
  arm64: dts: allwinner: orange-pi-3: Enable USB 3.0 host support
  arm64: dts: allwinner: h6: add USB3 device nodes
  dt-bindings: Add ANX6345 DP/eDP transmitter binding
  arm64: dts: allwinner: a64: enable ANX6345 bridge on Teres-I
  dts: arm: sun8i: h3: Enable deinterlace unit
  ARM: dts: sunxi: h3/h5: Add MBUS controller node
  dt-bindings: bus: sunxi: Add H3 MBUS compatible

Link: https://lore.kernel.org/r/58ad00a8-9579-4811-969a-a74e331ee9a2.lettre@localhost
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-06 07:42:04 -08:00
Olof Johansson
f129230b8c One patch to add back the PMU node that was removed because the
interrupts were improper in a previous fixes PR.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXcK4vQAKCRDj7w1vZxhR
 xYicAP47+z/2soJsnUf1jahKsVFqYoxKa+Z+qYg/f/hdphEvCwD+JqY46XbjbaL7
 hzHqYYQvJ1OAO/Mks3ms01/0ZnhbKww=
 =9zaU
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-5.4-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

One patch to add back the PMU node that was removed because the
interrupts were improper in a previous fixes PR.

* tag 'sunxi-fixes-for-5.4-3' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: a64: Re-add PMU node
  ARM: sunxi: Fix CPU powerdown on A83T
  ARM: dts: sun8i-a83t-tbs-a711: Fix WiFi resume from suspend
  ARM: dts: sun7i: Drop the module clock from the device tree
  dt-bindings: media: sun4i-csi: Drop the module clock
  media: dt-bindings: Fix building error for dt_binding_check
  arm64: dts: allwinner: a64: sopine-baseboard: Add PHY regulator delay
  arm64: dts: allwinner: a64: Drop PMU node
  arm64: dts: allwinner: a64: pine64-plus: Add PHY regulator delay

Link: https://lore.kernel.org/r/45023fa6-b2bc-4934-b85c-3e7841dde0b1.lettre@localhost
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-06 07:41:31 -08:00
Mark Rutland
7f08ae53a7 arm64: ftrace: minimize ifdeffery
Now that we no longer refer to mod->arch.ftrace_trampolines in the body
of ftrace_make_call(), we can use IS_ENABLED() rather than ifdeffery,
and make the code easier to follow. Likewise in ftrace_make_nop().

Let's do so.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Torsten Duwe <duwe@suse.de>
Tested-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Tested-by: Torsten Duwe <duwe@suse.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
2019-11-06 14:17:36 +00:00
Torsten Duwe
3b23e4991f arm64: implement ftrace with regs
This patch implements FTRACE_WITH_REGS for arm64, which allows a traced
function's arguments (and some other registers) to be captured into a
struct pt_regs, allowing these to be inspected and/or modified. This is
a building block for live-patching, where a function's arguments may be
forwarded to another function. This is also necessary to enable ftrace
and in-kernel pointer authentication at the same time, as it allows the
LR value to be captured and adjusted prior to signing.

Using GCC's -fpatchable-function-entry=N option, we can have the
compiler insert a configurable number of NOPs between the function entry
point and the usual prologue. This also ensures functions are AAPCS
compliant (e.g. disabling inter-procedural register allocation).

For example, with -fpatchable-function-entry=2, GCC 8.1.0 compiles the
following:

| unsigned long bar(void);
|
| unsigned long foo(void)
| {
|         return bar() + 1;
| }

... to:

| <foo>:
|         nop
|         nop
|         stp     x29, x30, [sp, #-16]!
|         mov     x29, sp
|         bl      0 <bar>
|         add     x0, x0, #0x1
|         ldp     x29, x30, [sp], #16
|         ret

This patch builds the kernel with -fpatchable-function-entry=2,
prefixing each function with two NOPs. To trace a function, we replace
these NOPs with a sequence that saves the LR into a GPR, then calls an
ftrace entry assembly function which saves this and other relevant
registers:

| mov	x9, x30
| bl	<ftrace-entry>

Since patchable functions are AAPCS compliant (and the kernel does not
use x18 as a platform register), x9-x18 can be safely clobbered in the
patched sequence and the ftrace entry code.

There are now two ftrace entry functions, ftrace_regs_entry (which saves
all GPRs), and ftrace_entry (which saves the bare minimum). A PLT is
allocated for each within modules.

Signed-off-by: Torsten Duwe <duwe@suse.de>
[Mark: rework asm, comments, PLTs, initialization, commit message]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Torsten Duwe <duwe@suse.de>
Tested-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Tested-by: Torsten Duwe <duwe@suse.de>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Julien Thierry <jthierry@redhat.com>
Cc: Will Deacon <will@kernel.org>
2019-11-06 14:17:35 +00:00
Mark Rutland
1f377e043b arm64: asm-offsets: add S_FP
So that assembly code can more easily manipulate the FP (x29) within a
pt_regs, add an S_FP asm-offsets definition.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Torsten Duwe <duwe@suse.de>
Tested-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Tested-by: Torsten Duwe <duwe@suse.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
2019-11-06 14:17:34 +00:00
Mark Rutland
e3bf8a67f7 arm64: insn: add encoder for MOV (register)
For FTRACE_WITH_REGS, we're going to want to generate a MOV (register)
instruction as part of the callsite intialization. As MOV (register) is
an alias for ORR (shifted register), we can generate this with
aarch64_insn_gen_logical_shifted_reg(), but it's somewhat verbose and
difficult to read in-context.

Add a aarch64_insn_gen_move_reg() wrapper for this case so that we can
write callers in a more straightforward way.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Torsten Duwe <duwe@suse.de>
Tested-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Tested-by: Torsten Duwe <duwe@suse.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
2019-11-06 14:17:33 +00:00
Mark Rutland
f1a54ae9af arm64: module/ftrace: intialize PLT at load time
Currently we lazily-initialize a module's ftrace PLT at runtime when we
install the first ftrace call. To do so we have to apply a number of
sanity checks, transiently mark the module text as RW, and perform an
IPI as part of handling Neoverse-N1 erratum #1542419.

We only expect the ftrace trampoline to point at ftrace_caller() (AKA
FTRACE_ADDR), so let's simplify all of this by intializing the PLT at
module load time, before the module loader marks the module RO and
performs the intial I-cache maintenance for the module.

Thus we can rely on the module having been correctly intialized, and can
simplify the runtime work necessary to install an ftrace call in a
module. This will also allow for the removal of module_disable_ro().

Tested by forcing ftrace_make_call() to use the module PLT, and then
loading up a module after setting up ftrace with:

| echo ":mod:<module-name>" > set_ftrace_filter;
| echo function > current_tracer;
| modprobe <module-name>

Since FTRACE_ADDR is only defined when CONFIG_DYNAMIC_FTRACE is
selected, we wrap its use along with most of module_init_ftrace_plt()
with ifdeffery rather than using IS_ENABLED().

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Torsten Duwe <duwe@suse.de>
Tested-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Tested-by: Torsten Duwe <duwe@suse.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
2019-11-06 14:17:32 +00:00
Mark Rutland
bd8b21d3dd arm64: module: rework special section handling
When we load a module, we have to perform some special work for a couple
of named sections. To do this, we iterate over all of the module's
sections, and perform work for each section we recognize.

To make it easier to handle the unexpected absence of a section, and to
make the section-specific logic easer to read, let's factor the section
search into a helper. Similar is already done in the core module loader,
and other architectures (and ideally we'd unify these in future).

If we expect a module to have an ftrace trampoline section, but it
doesn't have one, we'll now reject loading the module. When
ARM64_MODULE_PLTS is selected, any correctly built module should have
one (and this is assumed by arm64's ftrace PLT code) and the absence of
such a section implies something has gone wrong at build time.

Subsequent patches will make use of the new helper.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Torsten Duwe <duwe@suse.de>
Tested-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Tested-by: Torsten Duwe <duwe@suse.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
2019-11-06 14:17:31 +00:00
Andre Przywara
6b832a1487
arm64: dts: allwinner: a64: Re-add PMU node
As it was found recently, the Performance Monitoring Unit (PMU) on the
Allwinner A64 SoC was not generating (the right) interrupts. With the
SPI numbers from the manual the kernel did not receive any overflow
interrupts, so perf was not happy at all.
It turns out that the numbers were just off by 4, so the PMU interrupts
are from 148 to 151, not from 152 to 155 as the manual describes.

This was found by playing around with U-Boot, which typically does not
use interrupts, so the GIC is fully available for experimentation:
With *every* PPI and SPI enabled, an overflowing PMU cycle counter was
found to set a bit in one of the GICD_ISPENDR registers, with careful
counting this was determined to be number 148.

Tested with perf record and perf top on a Pine64-LTS. Also tested with
tasksetting to every core to confirm the assignment between IRQs and
cores.

This somewhat "revert-fixes" commit ed3e9406bc ("arm64: dts: allwinner:
a64: Drop PMU node").

Fixes: 34a97fcc71 ("arm64: dts: allwinner: a64: Add PMU node")
Fixes: ed3e9406bc ("arm64: dts: allwinner: a64: Drop PMU node")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-06 13:07:30 +01:00
Rich Wiley
918e1946c8 arm64: kpti: Add NVIDIA's Carmel core to the KPTI whitelist
NVIDIA Carmel CPUs don't implement ID_AA64PFR0_EL1.CSV3 but
aren't susceptible to Meltdown, so add Carmel to kpti_safe_list[].

Signed-off-by: Rich Wiley <rwiley@nvidia.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-11-06 11:31:03 +00:00
Bhupesh Sharma
218564b164 arm64: mm: Remove MAX_USER_VA_BITS definition
commit 9b31cf493f ("arm64: mm: Introduce MAX_USER_VA_BITS definition")
introduced the MAX_USER_VA_BITS definition, which was used to support
the arm64 mm use-cases where the user-space could use 52-bit virtual
addresses whereas the kernel-space would still could a maximum of 48-bit
virtual addressing.

But, now with commit b6d00d47e8 ("arm64: mm: Introduce 52-bit Kernel
VAs"), we removed the 52-bit user/48-bit kernel kconfig option and hence
there is no longer any scenario where user VA != kernel VA size
(even with CONFIG_ARM64_FORCE_52BIT enabled, the same is true).

Hence we can do away with the MAX_USER_VA_BITS macro as it is equal to
VA_BITS (maximum VA space size) in all possible use-cases. Note that
even though the 'vabits_actual' value would be 48 for arm64 hardware
which don't support LVA-8.2 extension (even when CONFIG_ARM64_VA_BITS_52
is enabled), VA_BITS would still be set to a value 52. Hence this change
would be safe in all possible VA address space combinations.

Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Steve Capper <steve.capper@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-kernel@vger.kernel.org
Cc: kexec@lists.infradead.org
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-11-06 11:19:25 +00:00
Masahiro Yamada
32d1870877 arm64: mm: simplify the page end calculation in __create_pgd_mapping()
Calculate the page-aligned end address more simply.

The local variable, "length" is unneeded.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-11-06 11:17:09 +00:00
Andy Yan
4403e1237b arm64: dts: rockchip: Add devicetree for board roc-rk3308-cc
ROC-RK3308-CC is a rk3308 based board designed by Firelfy,
with eMMC and 256MB DDR3 and RTL8188 Wifi on board.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Link: https://lore.kernel.org/r/20191030072811.29882-1-andy.yan@rock-chips.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-11-05 20:44:43 +01:00
Markus Reichl
f00736e38e arm64: dts: rockchip: Rework voltage supplies for regulators on rk3399-roc-pc
Correct the voltage supplies according to the board schematics
ROC-3399-PC-V10-A-20180804.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
Link: https://lore.kernel.org/r/22b56700-3c9e-0f60-cd74-7ff24d4f1a23@fivetechno.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-11-05 20:44:43 +01:00
Markus Reichl
88e0b7822d arm64: dts: rockchip: Add vcc_sys enable pin on rk3399-roc-pc
rk3399-roc-pc has vcc_sys 5V supply for USB and other peripherals.
Add the GPIO pin to enable the regulator.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
Link: https://lore.kernel.org/r/c72db0ad-c261-af4f-efe6-22bbcf4a0b7b@fivetechno.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-11-05 20:44:43 +01:00
Markus Reichl
389989270e arm64: dts: rockchip: Add nodes for buttons on rk3399-roc-pc
rk3399-roc-pc has a power and a recovery button, enable them.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
Link: https://lore.kernel.org/r/1ce152cc-bd6b-63af-7892-221e084d087f@fivetechno.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-11-05 20:44:43 +01:00
Heiko Stuebner
0815dc22c2 arm64: dts: rockchip: enable usb2phy on px30-evb
Enable the phy node ion the px30 evb board.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20190917082659.25549-13-heiko@sntech.de
2019-11-05 20:44:43 +01:00
Heiko Stuebner
f952b45bf3 arm64: dts: rockchip: add usb2phy for px30
Add the usb2phy node on the px30 and hook it up to the usb controllers
it supplies.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20190917082659.25549-12-heiko@sntech.de
2019-11-05 20:44:43 +01:00
Heiko Stuebner
7272d6e03d arm64: dts: rockchip: remove px30 default optee node
Having a default optee node in a soc devicetree is not really good.
For one there is no guarantee that any tee got loaded and there's even
the possibility that a completely different TEE got loaded.

OP-Tee however will insert relevant nodes to the devicetree (firmware
+reserved memory sections) during its own startup, so there really is
no need to provide a default node.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20191023224409.3550-1-heiko@sntech.de
2019-11-05 20:44:38 +01:00
Heiko Stuebner
2e7f8764dc arm64: dts: rockchip: enable gpu on rk3399-puma
Set the supplying regulator and enable the gpu node on the rk3399-puma som.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20191023223954.3139-1-heiko@sntech.de
2019-11-05 20:44:35 +01:00
Heiko Stuebner
fbb78418c8 arm64: dts: rockchip: add px30 otp controller
The px30 soc contains a controller for one-time-programmable memory,
so add the necessary node for it and the fields defined in it by default.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20191023224113.3268-1-heiko@sntech.de
2019-11-05 20:44:31 +01:00
Maxime Ripard
74ab6d9d7d
arm64: dts: allwinner: h6: Remove useless reset name
The TCON TOP node in the H6 DTSI has a reset name that isn't described in
the binding. Remove it.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-05 13:12:12 +01:00
Ondrej Jirman
b5d84ff8ae
arm64: dts: allwinner: orange-pi-3: Enable USB 3.0 host support
Enable Allwinner's USB 3.0 phy and the host controller. Orange Pi 3
board has GL3510 USB 3.0 4-port hub connected to the SoC's USB 3.0
port. All four ports are exposed via USB3-A connectors. VBUS is
always on, since it's powered directly from DCIN (VCC-5V) and
not switchable.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-05 11:44:45 +01:00
Icenowy Zheng
0b6f7014ad
arm64: dts: allwinner: h6: add USB3 device nodes
Allwinner H6 SoC features USB3 functionality, with a DWC3 controller and
a custom PHY.

Add device tree nodes for them.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-05 11:44:42 +01:00
Torsten Duwe
79bc02f122
arm64: dts: allwinner: a64: enable ANX6345 bridge on Teres-I
Teres-I has an anx6345 bridge connected to the RGB666 LCD output, and
the I2C controlling signals are connected to I2C0 bus.

Enable it in the device tree, and enable the display engine, video mixer
and tcon0 as well.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-05 11:36:12 +01:00
Huacai Chen
52338415cf timekeeping/vsyscall: Update VDSO data unconditionally
The update of the VDSO data is depending on __arch_use_vsyscall() returning
True. This is a leftover from the attempt to map the features of various
architectures 1:1 into generic code.

The usage of __arch_use_vsyscall() in the actual vsyscall implementations
got dropped and replaced by the requirement for the architecture code to
return U64_MAX if the global clocksource is not usable in the VDSO.

But the __arch_use_vsyscall() check in the update code stayed which causes
the VDSO data to be stale or invalid when an architecture actually
implements that function and returns False when the current clocksource is
not usable in the VDSO.

As a consequence the VDSO implementations of clock_getres(), time(),
clock_gettime(CLOCK_.*_COARSE) operate on invalid data and return bogus
information.

Remove the __arch_use_vsyscall() check from the VDSO update function and
update the VDSO data unconditionally.

[ tglx: Massaged changelog and removed the now useless implementations in
  	asm-generic/ARM64/MIPS ]

Fixes: 44f57d788e ("timekeeping: Provide a generic update_vsyscall() implementation")
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1571887709-11447-1-git-send-email-chenhc@lemote.com
2019-11-04 23:02:53 +01:00
Olof Johansson
3a82cd4484 i.MX fixes for 5.4, 3rd round:
- Fix the GPIO number that is controlling core voltage on
    imx8mq-zii-ultra board.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJdv+MuAAoJEFBXWFqHsHzOHzQH/Ayi4rrrHuInh7mCxSY2mXkH
 iHO8iVKH5i+AvCfH66LpfdLFsKy+5L6WllRWDt3tvEjI9YCpBdHZrwuiBteh90K2
 4J8vRNfLGhCqS7iRv17DuOIK0v9mC6mzbYg38xftSMDnNU0JanG0FSA6ztDuoKqZ
 NjrUkECWSQeLbic9N2H27x0RUdMG/RE4F+q+rDnaTzgMdwrws+hSKdTfsnS8MUBc
 NLnzwxoDjaB8rR6DKAM3xsQYEn9oT3cD2RDNJ2fBbp86XK9qTe5MNQlArp3grmHj
 4zwZcrG1NAxHtQJv6kqCIRZ8FYSCSQQORekYucstm35knr/zAYv1XDPOqLkkFG0=
 =0xmb
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes

i.MX fixes for 5.4, 3rd round:
 - Fix the GPIO number that is controlling core voltage on
   imx8mq-zii-ultra board.

* tag 'imx-fixes-5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: zii-ultra: fix ARM regulator GPIO handle

Link: https://lore.kernel.org/r/20191104084513.GW24620@dragon
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-04 10:06:41 -08:00
Kees Cook
19f6bc32c6 arm64: Move EXCEPTION_TABLE to RO_DATA segment
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Also
removes the redundant ALIGN, which is already present at the end of the
RO_DATA macro.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Will Deacon <will@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-alpha@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-c6x-dev@linux-c6x.org
Cc: linux-ia64@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-s390@vger.kernel.org
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: x86-ml <x86@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: https://lkml.kernel.org/r/20191029211351.13243-19-keescook@chromium.org
2019-11-04 18:02:35 +01:00
Kees Cook
c9174047b4 vmlinux.lds.h: Replace RW_DATA_SECTION with RW_DATA
Rename RW_DATA_SECTION to RW_DATA. (Calling this a "section" is a lie,
since it's multiple sections and section flags cannot be applied to
the macro.)

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # s390
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-alpha@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-c6x-dev@linux-c6x.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Will Deacon <will@kernel.org>
Cc: x86-ml <x86@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: https://lkml.kernel.org/r/20191029211351.13243-14-keescook@chromium.org
2019-11-04 15:57:41 +01:00
Kees Cook
eaf937075c vmlinux.lds.h: Move NOTES into RO_DATA
The .notes section should be non-executable read-only data. As such,
move it to the RO_DATA macro instead of being per-architecture defined.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # s390
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-alpha@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-c6x-dev@linux-c6x.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Will Deacon <will@kernel.org>
Cc: x86-ml <x86@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: https://lkml.kernel.org/r/20191029211351.13243-11-keescook@chromium.org
2019-11-04 15:34:41 +01:00
Fabio Estevam
227125fe72 arm64: dts: imx8mn-evk: Remove invalid Atheros properties
None of these at803x properties are documented anywhere, so just
remove them.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-11-04 16:00:56 +08:00
Peng Fan
c7cb7c96f3 arm64: defconfig: Change CONFIG_AT803X_PHY from m to y
With phy-reset-gpios are enabled for i.MX8MM-EVK board, phy
will be reset. Without CONFIG_AT803X_PHY as y, board will stop
booting in NFS DHCP, because phy is not ready. So mark
CONFIG_AT803X_PHY from m to y to make board boot when using nfs rootfs.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-11-04 15:25:55 +08:00
Lucas Stach
f852497c9a arm64: dts: zii-ultra: fix ARM regulator GPIO handle
The GPIO handle is referencing the wrong GPIO, so the voltage did not
actually change as intended. The pinmux is already correct, so just
correct the GPIO number.

Fixes: 4a13b3bec3 (arm64: dts: imx: add Zii Ultra board support)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-11-04 15:12:23 +08:00
Bjorn Andersson
915603b106 arm64: dts: qcom: db845c: Enable LVS 1 and 2
vreg_lvs1a_1p8 and vreg_lvs2a_1p8 are both feeding pins in the low speed
connectors and should as such alway be on, so enable them.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-11-03 20:49:00 -08:00
Olof Johansson
e315c7b3da mvebu dt64 for 5.5 (part 1)
- Add new Marvell CN9130 SoC support (CN9130 is made of one AP807 and
    one internal CP115, similar to the Armada 7K/8K using AP806 and
    CP110).
  - Reorganize EspressoBin device tree to add new variant of the boards
    (Armada 3270 based)
  - Add firmware node for turris Mox (Armada 3720 based)
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCXb9CgAAKCRALBhiOFHI7
 1USvAJ4u8Tl7qm8B4tuo/fazwbjfrMKMZQCdFFRU6NRElJcjQw99FYQTwJMV+aM=
 =J+uU
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt64-5.5-1' of git://git.infradead.org/linux-mvebu into arm/dt

mvebu dt64 for 5.5 (part 1)

 - Add new Marvell CN9130 SoC support (CN9130 is made of one AP807 and
   one internal CP115, similar to the Armada 7K/8K using AP806 and
   CP110).
 - Reorganize EspressoBin device tree to add new variant of the boards
   (Armada 3270 based)
 - Add firmware node for turris Mox (Armada 3720 based)

* tag 'mvebu-dt64-5.5-1' of git://git.infradead.org/linux-mvebu: (23 commits)
  arm64: dts: armada-3720-turris-mox: add firmware node
  arm64: dts: marvell: add ESPRESSObin variants
  arm64: dts: marvell: Add support for Marvell CN9132-DB
  arm64: dts: marvell: Add support for Marvell CN9131-DB
  arm64: dts: marvell: Add support for Marvell CN9130-DB
  arm64: dts: marvell: Add support for Marvell CN9130 SoC support
  arm64: dts: marvell: Add support for CP115
  arm64: dts: marvell: Externalize PCIe macros from CP11x file
  arm64: dts: marvell: Drop PCIe I/O ranges from CP11x file
  arm64: dts: marvell: Prepare the introduction of CP115
  arm64: dts: marvell: Fix CP110 NAND controller node multi-line comment alignment
  arm64: dts: marvell: Add AP807-quad cache description
  arm64: dts: marvell: Add AP806-quad cache description
  arm64: dts: marvell: Add AP806-dual cache description
  arm64: dts: marvell: Add support for AP807/AP807-quad
  dt-bindings: marvell: Declare the CN913x SoC compatibles
  dt-bindings: marvell: Convert the SoC compatibles description to YAML
  arm64: dts: marvell: Move clocks to AP806 specific file
  arm64: dts: marvell: Prepare the introduction of AP807 based SoCs
  MAINTAINERS: Add new Marvell CN9130-based files to track
  ...

Link: https://lore.kernel.org/r/87zhhc3bo6.fsf@FE-laptop
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 17:32:26 -08:00
Olof Johansson
fc711fdf06 arm64: tegra: Device tree changes for v5.5-rc1
Adds support for DP and XUSB on various boards, enables SMMU support for
 more devices and fixes a couple of DTC warnings and inconsistencies that
 are reported at runtime.
 
 These changes along with some of the driver changes in other branches
 allow suspend/resume support on Tegra210 devices (e.g. Jetson TX1 and
 Jetson Nano).
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl29j9ATHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoebdEACKhpjhqqa/D8tXyU76THQozmTSM4tk
 k5yvth4lrO1tK5fytpLaVqZqoXUJzZK5ls2RWESzVemldtFbqtLaUmAPJwbdLiQ9
 fo5sK47oekX8Mu3QsGejKExuHCklsRkr2FBlPX1dI8E1RTyiBexYqX1XYxFeSQ8L
 TJB0pNKK5HKoHGJztR/8dsJmKv5vKBnIBhBMRvP4wywdCY8Y2hZi6pqHQj8n1A4d
 wbr7BlZDiKMneLJ4YBdUj7N2Rwht7riB4CApLoE4+ev4QCMX1yG1g4FN/x7VQUAj
 ivL1mugGB+L7AYq5o1KVTUMJqau4xJ7vUqdwHf0lQ2odx29VOQ6PW9SjnaAReGDz
 BCyikUhvZL1nYZOahoaZf0D/jSqE9jUsgRgWBDMsjXIQN1pEo0Fu1bEhwrINam0j
 cWTEHobQ/L6fKO4gQdE8DdvCdWkL0kysC+afUrI3tiTTHKKpCKuvU6xwMiql+GuB
 45UZB7pb8QTBVNSque27OBbPXpIOxc7kKjox5JjsP85LFHpRUREI/knx3Xf29m4Q
 ZjwadddS2nfP1o7eC2U5KjjhXYfxBPa6yvhPrtoKsuRfLCclKFEKjQfRvP6/NfdE
 00Ic8MyHdr1xlyIb05BUXZHiNGWnwFgqDqwDVZ8RIzrEdz7J/o5TFI11Vw8GrjW5
 r1yo8onHqoJVzA==
 =NTCt
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-5.5-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt

arm64: tegra: Device tree changes for v5.5-rc1

Adds support for DP and XUSB on various boards, enables SMMU support for
more devices and fixes a couple of DTC warnings and inconsistencies that
are reported at runtime.

These changes along with some of the driver changes in other branches
allow suspend/resume support on Tegra210 devices (e.g. Jetson TX1 and
Jetson Nano).

* tag 'tegra-for-5.5-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (25 commits)
  arm64: tegra: Add Jetson Nano SC7 timings
  arm64: tegra: Add Jetson TX1 SC7 timings
  arm64: tegra: Enable wake from deep sleep on RTC alarm
  arm64: tegra: Add PMU on Tegra210
  arm64: tegra: Add blank lines for better readability
  arm64: tegra: Enable DisplayPort on Jetson AGX Xavier
  arm64: tegra: p2888: Rename regulators for consistency
  arm64: tegra: Enable DP support on Jetson TX2
  arm64: tegra: Fix compatible for SOR1
  arm64: tegra: Enable DP support on Jetson Nano
  arm64: tegra: Add SOR0_OUT clock on Tegra210
  arm64: tegra: Assume no CLKREQ presence by default
  arm64: tegra: Enable SMMU for VIC on Tegra186
  arm64: tegra: Enable XUSB host controller on Jetson TX2
  arm64: tegra: Enable SMMU for XUSB host on Tegra186
  arm64: tegra: Enable XUSB pad controller on Jetson TX2
  arm64: tegra: Add ethernet alias on Jetson AGX Xavier
  arm64: tegra: Fix compatible string for EQOS on Tegra194
  arm64: tegra: Hook up edp interrupt on Tegra210 SOCTHERM
  arm64: tegra: Fix base address for SOR1 on Tegra194
  ...

Link: https://lore.kernel.org/r/20191102144521.3863321-8-thierry.reding@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 17:31:22 -08:00
Marcel Ziswiler
ba5a5615d5 arm64: dts: freescale: add initial support for colibri imx8x
This patch adds the device tree to support Toradex Colibri iMX8X a
computer on module which can be used on different carrier boards.

The module consists of an NXP i.MX 8X family SoC (either i.MX 8DualX or
8QuadXPlus), a PF8100 PMIC, a FastEthernet PHY, 1 or 2 GB of LPDDR4
RAM, some level shifters, a Micron eMMC, a USB hub, an AD7879 resistive
touch controller, an SGTL5000 audio codec and on-module CSI as well as
DSI-LVDS FFC receptacles plus an optional Bluetooth/Wi-Fi module.

Anything that is not self-contained on the module is disabled by
default.

The device tree for the Colibri Evaluation Board includes the module's
device tree and enables the supported peripherals of the carrier board
(the Colibri Evaluation Board supports almost all of them).

So far there is no display or USB functionality supported at all but
basic console UART, eMMC and Ethernet functionality work fine.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-11-04 09:28:07 +08:00
Olof Johansson
fcdc437224 One new patch to the arm64 defconfig to enable the new crypto engine
driver.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXb2o+gAKCRDj7w1vZxhR
 xZtmAP489RgRU9J7nJ2aF08TB4/l+Ci5QPR21xR4CQZ0dviPVgEA6Pq2R2WvDfDY
 0Mnv5zsmnmcx2vWw0PVh5hn4HcZY7AU=
 =B+Au
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-config64-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig

One new patch to the arm64 defconfig to enable the new crypto engine
driver.

* tag 'sunxi-config64-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: defconfig: add new Allwinner crypto options

Link: https://lore.kernel.org/r/539241d6-9b2e-4d5b-bd63-f912cf6ebf96.lettre@localhost
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 17:08:26 -08:00
Olof Johansson
42a5718b8c Our usual bunch of DT patches, with this time mostly:
- Mali GPU support for the H6
  - Two new crypto drivers enablement
  - A few fixes to our DTs, fixed through the validation effort
  - New boards: NanoPi Duo2
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXb2oKAAKCRDj7w1vZxhR
 xUYQAP9HU8S+wvKapu/TOBEfFUv6xQcvxeO0uu+ugSp+YbdOAAD/RycCuS8alsc3
 p+PWoTBujof+qC/PrRTg/UluKInmlwM=
 =S/hB
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-dt-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt

Our usual bunch of DT patches, with this time mostly:
 - Mali GPU support for the H6
 - Two new crypto drivers enablement
 - A few fixes to our DTs, fixed through the validation effort
 - New boards: NanoPi Duo2

* tag 'sunxi-dt-for-5.5-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (22 commits)
  dt-bindings: arm: sunxi: add FriendlyARM NanoPi Duo2
  ARM: dts: sun8i: add FriendlyARM NanoPi Duo2
  arm64: allwinner: h6: Enable GPU node for Tanix TX6
  arm64: dts: allwinner: bluetooth for Emlid Neutis N5
  ARM: dts: sunxi: h3/h5: add missing uart2 rts/cts pins
  ARM: dts: sun9i: a80: Add Security System node
  ARM: dts: sun8i: a83t: Add Security System node
  arm64: dts: allwinner: sun50i: Add Crypto Engine node on H6
  arm64: dts: allwinner: sun50i: Add crypto engine node on H5
  arm64: dts: allwinner: sun50i: Add Crypto Engine node on A64
  ARM: dts: sun8i: H3: Add Crypto Engine node
  ARM: dts: sun8i: R40: add crypto engine node
  dt-bindings: crypto: Add DT bindings documentation for sun8i-ce Crypto Engine
  arm64: dts: allwinner: Add mali GPU supply for H6 boards
  arm64: dts: allwinner: Add ARM Mali GPU node for H6
  ARM: dts: sun8i: a83t: a711: Add touchscreen node
  ARM: dts: sun5i: olinuxino micro: Fix AT24 node name
  ARM: dts: sun9i: Add missing watchdog clocks
  arm64: dts: sun50i: sopine-baseboard: Expose serial1, serial2 and serial3
  arm64: dts: allwinner: orange-pi-3: Enable UART1 / Bluetooth
  ...

Link: https://lore.kernel.org/r/1bf18c83-f41d-4353-9ca2-9585b8693df2.lettre@localhost
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 17:07:52 -08:00
Geert Uytterhoeven
09612c9337 arm64: dts: lg1313: DT fix s/#interrupts-cells/#interrupt-cells/
The standard DT property is called "#interrupt-cells".

Link: https://lore.kernel.org/r/20191101160356.32034-2-geert+renesas@glider.be
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 17:06:43 -08:00
Geert Uytterhoeven
9e3bd0f664 arm64: dts: lg1312: DT fix s/#interrupts-cells/#interrupt-cells/
The standard DT property is called "#interrupt-cells".

Link: https://lore.kernel.org/r/20191101160356.32034-1-geert+renesas@glider.be
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 17:06:33 -08:00
Olof Johansson
571d32c283 Renesas ARM64 DT updates for v5.5 (take two)
- Video-Input and Serial-ATA support on RZ/G2N,
   - Color Management Module support on various R-Car Gen3 SoCs,
   - Initial support for the R-Car M3-W+ (r8a77961) SoC on the
     Salvator-XS board.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXbxHYgAKCRCKwlD9ZEnx
 cNS0AQDofwzZRnNq8xUumbw9fg2I79qhVqqBFYpg+R8qV7qgQQD/WwOfSfE6UlCf
 fTfpYowfPX8z985u7/vYDVfSv19d/Ag=
 =qA0S
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-dt-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt

Renesas ARM64 DT updates for v5.5 (take two)

  - Video-Input and Serial-ATA support on RZ/G2N,
  - Color Management Module support on various R-Car Gen3 SoCs,
  - Initial support for the R-Car M3-W+ (r8a77961) SoC on the
    Salvator-XS board.

* tag 'renesas-arm64-dt-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: dts: renesas: Add support for Salvator-XS with R-Car M3-W+
  arm64: dts: renesas: Add Renesas R8A77961 SoC support
  arm64: dts: renesas: Prepare for rename of ARCH_R8A7796 to ARCH_R8A77960
  dt-bindings: clock: Add r8a77961 CPG Core Clock Definitions
  dt-bindings: power: Add r8a77961 SYSC power domain definitions
  arm64: dts: renesas: r8a774b1: Add SATA controller node
  arm64: dts: renesas: rcar-gen3: Add CMM units
  arm64: dts: renesas: r8a774b1: Add VIN and CSI-2 support

Link: https://lore.kernel.org/r/20191101155842.31467-5-geert+renesas@glider.be
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 17:05:19 -08:00
Olof Johansson
4075e0db48 Renesas ARM64 defconfig updates for v5.5 (take two)
- Enable support for the new R-Car M3-W+ (r8a77961) SoC.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXbxC8QAKCRCKwlD9ZEnx
 cEbwAP0QFuUSw6DqGAW7KAXw9hw9wyflLV980BiAhLithcUc+gD9FfWapC+c4Bga
 1uiVND6X3kqUxHUcbc27P7xvziOYPgQ=
 =CPFd
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-defconfig-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig

Renesas ARM64 defconfig updates for v5.5 (take two)

  - Enable support for the new R-Car M3-W+ (r8a77961) SoC.

* tag 'renesas-arm64-defconfig-for-v5.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: defconfig: Enable R8A77961 SoC

Link: https://lore.kernel.org/r/20191101155842.31467-4-geert+renesas@glider.be
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 17:04:38 -08:00
Olof Johansson
ae314d78b5 ARM64: hisilicon: defconfig updates for 5.5
- enable ARM SMMUv3 PMU and hisi ZIP controller as module for
   Kunpeng920 SoC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJduVY1AAoJEAvIV27ZiWZcwxYP/R16mFC9+mOGCO0TaZfkxzV5
 cj4ofxhwNi3B3VK+HBDOCOEixh0fovyGihZCAE4X46UAo0ZuSzn/EMnIaV4caidT
 mRma+6NYUNfHtvNdvDSM6wp+dyWR4mIOKAivKvq0ItY5tiRWnZnHCdHIJGj9yCXs
 e9fax9ocuq6cLJ6ZKtVFxiUtG9/Z8I3gk0N869uN6ZMr2opa9fzi3AN+Amf/a9qX
 upcWVp8xIiwBTvn4ZCiTc1LOBeKWAsbK4XbVCB5lTGIA9SaDjR0N7nwHVWq7etBG
 t1LAD2HKpfL35kmNxr3uIhdR5P0no9BpQiDB8ykOO4JcEtPIsZMSIwibXG5JVUl2
 XEBXkdkSeBb6nWGKDxtmfQRE9jwrpvLB+MA/cxQvC9fi+bIRVP1cvqGYMbJrlVLI
 BTAjiZz7Uiy0FOD9FKfo/aOmJsHbFjXz1PPUbJjy3zXiAMsr/nuA1aoeGwBZMSTi
 E0AyvMqgWsGOSOYgZi/6XKjGJHAdM5N/eoSRtTaSAZk5zKAi4N3uZ2VV5ggE0dQl
 9pjFpkV2v87xP6Yu6CXD5kmsvIgUTTr78V2eVn/Mcvt2kEuUj4l2JSxjiFc2CdDf
 xpRPF5fzOL+AyyV74EwAMIgI/QfRerZ4xJWYiEh74ecd4bcQqXr8L+UYZLaPDHkL
 BCXGhps1Ukoa5txGV10Q
 =h4j2
 -----END PGP SIGNATURE-----

Merge tag 'hisi-arm64-defconfig-for-5.5' of git://github.com/hisilicon/linux-hisi into arm/defconfig

ARM64: hisilicon: defconfig updates for 5.5

- enable ARM SMMUv3 PMU and hisi ZIP controller as module for
  Kunpeng920 SoC

* tag 'hisi-arm64-defconfig-for-5.5' of git://github.com/hisilicon/linux-hisi:
  arm64: defconfig: Enable SMMU v3 PMCG
  arm64: defconfig: Enable HiSilicon ZIP controller

Link: https://lore.kernel.org/r/5DB95B1E.8060607@hisilicon.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 16:56:44 -08:00
Olof Johansson
32f714d30f ARM64: DT: Hisilicon SoCs DT updates for 5.5
- add Mali450 MP4 GPU node in the hi6220 SoC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJduUeEAAoJEAvIV27ZiWZclB0P/2E2SUD595mir9+49zNgrlqx
 JS559GOtzK096kmfQQ88tvB5BC2AulZX99tiC31a8Iy/qGdG2iXTnzJnuH6oCvT7
 sVMsFz+8tq6UB+VtVBCRrUvaQogqLD13hNQacqBENrD/jM2mrYbIfnYYUyftwZrA
 NJwS2fxQhSIRrFYKDSRSxey2a/8C8nfpnp3+9M2pzX3OTHhjfBKjPY1qrlIK9CNf
 IuAWYyTxZAolMNwS68di35fMv36PEzbeVnUcMMaeCG4j/u8IOzjEHibI2jzkncm8
 oJhXyzQ5T9g/qHXy8nlSB26XxIP/9cDWEKeSpZdAqYnxt78BDHFmHB2W5f6xWdXj
 b3NkclmtKyJwEfDdTgB5gbVabSdWrfNEQ2HQ/FAqCuidhxJjBZdEyc7VM2Bq0Oqs
 GtCZDGE+kShDFIr2jH8FmcF/dtbUT8h1v/JkfcMSuzGHyHE8m0cj8i7yGUEHcC/F
 p6Dmrg0pUaUfs+qQ46r0yddRop+EdS/JTYGN0TYagd4vO4V9PQh8nGPXl4fjp0tK
 29pRyO2KRxPgQP+ZRkX/DNWGutEU9M50umIXkri2SWygTU6Jjbk2VQFbiOdmeVpB
 IhIkKqDA5OY+HCxapr4zCDUYUSXydmzDqWYbGtL8p5a47tBBzvkwlNvz/gnPPF1y
 B+f5Dn76zel481ehTBHY
 =cPoz
 -----END PGP SIGNATURE-----

Merge tag 'hisi-arm64-dt-for-5.5' of git://github.com/hisilicon/linux-hisi into arm/dt

ARM64: DT: Hisilicon SoCs DT updates for 5.5

- add Mali450 MP4 GPU node in the hi6220 SoC

* tag 'hisi-arm64-dt-for-5.5' of git://github.com/hisilicon/linux-hisi:
  arm64: dts: hisilicon: Add Mali-450 MP4 GPU DT entry

Link: https://lore.kernel.org/r/5DB95AAB.8060405@hisilicon.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 16:56:25 -08:00
Olof Johansson
a1094a7c27 Realtek ARM64 based SoC DT for v5.5
Add RTD1293 and RTD1296 DTs. Add the watchdog for all of RTD129x DTs.
 Add reset controllers for RTD129x and start using them for UARTs.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEF08DRxvMIhphdW+W+i7RLT5+AT8FAl25CJkRHGFmYWVyYmVy
 QHN1c2UuZGUACgkQ+i7RLT5+AT8ndw/+PaYt6B92yzw5DwIYmONvSGuqgy51AFdu
 Wm6ATtdHGNJllXe7pAHh8a3cQMKAz04N/Xk+kMUfyYtnaQ2fvByS7yiXnMbVqIj7
 Q8AmE++ijDM5wTNF45Q3T+Rd7zcMQujElAGu+8l9I4P3iMwItK6LMAAXwCgOelec
 8brsLrqbjRNgtICFbds/7fMSn0ZaHiFu5gld07TyPHs5uTtq0raF8wL13X7IgBiB
 R70U62ux24Ld4SaFOShrgkJjDlPeZH8DH7bRh5PGlEmp822ZrFI//fc7a0HNpC8R
 ygBz2kmErZ1G9xPUwgEWtnTSh4D9QDJxI1btEaBuMbKI96Yaa9PIqV9tHtjJ0eWr
 lKEI8ymoFLaNqSQb9sMf7BGYEw/IXF7JAT42SL6APYYPccLezFUjKBRk9hRQBiy7
 PNFGXsa+dmvMu5vpYLoyJKmJf8Z7HXkx3buk8rj39ru7AHr37kJdwy3SAqZdH4KZ
 vFt1r2bFeBBhB+i9PuSrAVS+oL49UDd2IcB/1lZkvy6Y1waxIkJKZJPQVXnkrvtE
 DUiaq8Fcl4iZHmxL3wIKGdldFb77vCERI5cGwMfbh/qCZ8x+3ra4lEwysOAE9dGb
 OWO5KkGHIITZkFDQuOJtNcwXXsM2W4EgKmMdfnStFXycim1Wc3V7ACPyB2GuUR4Y
 lgdneqA9dpo=
 =yVVf
 -----END PGP SIGNATURE-----

Merge tag 'realtek-arm64-dt-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek into arm/dt

Realtek ARM64 based SoC DT for v5.5

Add RTD1293 and RTD1296 DTs. Add the watchdog for all of RTD129x DTs.
Add reset controllers for RTD129x and start using them for UARTs.

* tag 'realtek-arm64-dt-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek:
  arm64: dts: realtek: Add RTD129x UART resets
  arm64: dts: realtek: Add RTD129x reset controller nodes
  dt-bindings: reset: Add Realtek RTD1295
  arm64: dts: realtek: Add watchdog node for RTD129x
  arm64: dts: realtek: Add oscillator for RTD129x
  arm64: dts: realtek: Add RTD1296 and Synology DS418
  dt-bindings: arm: realtek: Document RTD1296 and Synology DS418
  arm64: dts: realtek: Add RTD1293 and Synology DS418j
  arm64: dts: realtek: Change dual-license from MIT to BSD
  dt-bindings: arm: realtek: Document RTD1293 and Synology DS418j
  dt-bindings: arm: realtek: Tidy up conversion to json-schema

Link: https://lore.kernel.org/r/20191030041000.31848-2-afaerber@suse.de
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 16:54:33 -08:00
Olof Johansson
433b1e8a6c Realtek ARM64 based SoC for v5.5
Enable reset controllers and add a mailing list to MAINTAINERS.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEF08DRxvMIhphdW+W+i7RLT5+AT8FAl25COERHGFmYWVyYmVy
 QHN1c2UuZGUACgkQ+i7RLT5+AT9uXg//a6LHDy2Cd3zeUH7EmBzr37SDcKsbdqe2
 wyfh10AhXUEf7oR0uiqiDRbVECiNucXGS1aBVyWai2ejpZeyzx339Mypkfzx9NCB
 66xh/FIlSGJtDAmLqRIK6ldYuT1r6ghVdunCye7sLsFMtUivfX+MjczxIJHGqTND
 LORKmVORcBpDrwvAoHIT1ySDIdTsEZYI5yrVYneG6f/6BmgAxz9lDTBPKPPsHXA5
 JlyngmADfzhnXYF+0oePjkyV8Py7PhcmRfvkWFSriw8Hn6PfNegYknKCY9VjIG0s
 HQ8zCfk+kdh185Cht/pLpyKa7vGBLl7XVcmZWIYxAi4idWvlI1I3V5yXlDNxVMsG
 MHNowUW7Lrdfp6p0yMdNze/DTtEgGrvKtOa6HZTDirZjIdXXKbWdlGejCYcSdSIV
 BDvKK8n0lNt4dOnT/L40Cm4zSypw7UlXIGOX0gq6r6Xg0nRFl+wNqLEQOA0Hyatx
 T3hq97YgGLPfIE2f/j/XxKeXuSzu2NnpxMAPJqmCJYMiD6FOknIocM8/Oqe+93VH
 Q7Br63+Sx2HIxEY0BxZKsdzgYio10VlmdUOvdhRZqNjPv4TGsQkWRluxiA87fQgC
 Ebu49hFYehP7ue0tD5/RiTonVYc1IrKeT0YsRCH8OpLhZdVf57Ck0dYRw5THaAaT
 /zBp9iZbhDc=
 =2bAx
 -----END PGP SIGNATURE-----

Merge tag 'realtek-arm64-soc-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek into arm/soc

Realtek ARM64 based SoC for v5.5

Enable reset controllers and add a mailing list to MAINTAINERS.

* tag 'realtek-arm64-soc-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek:
  arm64: realtek: Select reset controller
  MAINTAINERS: Add mailing list for Realtek SoCs

Link: https://lore.kernel.org/r/20191030041000.31848-1-afaerber@suse.de
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-03 16:54:07 -08:00
Fabio Estevam
0b68096308 arm64: dts: ls1028a: Fix tmu unit address
The following build warning is seen with W=1:

arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi:531.20-581.5: Warning (simple_bus_reg): /soc/tmu@1f00000: simple-bus unit address format error, expected "1f80000"

Fix it by adjusting the tmu unit address to match its reg entry.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-11-04 08:52:14 +08:00
Fabio Estevam
68e36a429e arm64: dts: ls1028a: Move thermal-zone out of SoC
Move thermal-zone node from the soc node to the root node.

thermal-zone node does not have any register properties and thus
shouldn't be placed on the bus.

This fixes the following build warnings with W=1:

arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi:583.17-612.5: Warning (simple_bus_reg): /soc/thermal-zones: missing or empty reg/ranges property

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-11-04 08:52:14 +08:00