Commit graph

12566 commits

Author SHA1 Message Date
Will Deacon
e717d93b1c arm64: kconfig: Fix alignment of E0PD help text
Remove the additional space.

Signed-off-by: Will Deacon <will@kernel.org>
2020-01-22 11:23:54 +00:00
Mark Brown
2e8e1ea88c arm64: Use v8.5-RNG entropy for KASLR seed
When seeding KALSR on a system where we have architecture level random
number generation make use of that entropy, mixing it in with the seed
passed by the bootloader. Since this is run very early in init before
feature detection is complete we open code rather than use archrandom.h.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-22 09:54:52 +00:00
Richard Henderson
1a50ec0b3b arm64: Implement archrandom.h for ARMv8.5-RNG
Expose the ID_AA64ISAR0.RNDR field to userspace, as the RNG system
registers are always available at EL0.

Implement arch_get_random_seed_long using RNDR.  Given that the
TRNG is likely to be a shared resource between cores, and VMs,
do not explicitly force re-seeding with RNDRRS.  In order to avoid
code complexity and potential issues with hetrogenous systems only
provide values after cpufeature has finalized the system capabilities.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
[Modified to only function after cpufeature has finalized the system
capabilities and move all the code into the header -- broonie]
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
[will: Advertise HWCAP via /proc/cpuinfo]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-22 09:54:18 +00:00
Olof Johansson
498f2a4be6 arm64: dts: zynqmp: DT changes for v5.6
- Switch from fixed to firmware based clock driver
 - Wire power domain driver
 - Wire all ina226 chips through IIO and IIO hwmon drivers
 - Add missing dr_mode property to usb nodes
 - Use gpio-line-names property instead of comments
 - Use clock-output-names for si570 differentiation
 - Minor DT fixes
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCXibMLgAKCRDKSWXLKUoM
 IQW6AJ9Szg4yizku9Q6oi+yrR6L3eRxnyACcDiM4EeKIvrlK19cYVnd/58ENPs8=
 =k6/g
 -----END PGP SIGNATURE-----

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

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

- Switch from fixed to firmware based clock driver
- Wire power domain driver
- Wire all ina226 chips through IIO and IIO hwmon drivers
- Add missing dr_mode property to usb nodes
- Use gpio-line-names property instead of comments
- Use clock-output-names for si570 differentiation
- Minor DT fixes

* tag 'zynqmp-dt-for-v5.6' of https://github.com/Xilinx/linux-xlnx: (21 commits)
  arm64: zynqmp: Add label property to all ina226 on zcu106
  arm64: zynqmp: Enable iio-hwmon for ina226 on zcu106
  arm64: zynqmp: Add label property to all ina226 on zcu102
  arm64: zynqmp: Enable iio-hwmon for ina226 on zcu102
  arm64: zynqmp: Add label property to all ina226 on zcu111
  arm64: zynqmp: Enable iio-hwmon for ina226 on zcu111
  arm64: zynqmp: Enable iio-hwmon for ina226 on zcu100
  arm64: zynqmp: Setup default number of chipselects for zcu100
  arm64: zynqmp: Remove broken-cd from zcu100-revC
  arm64: zynqmp: Fix the si570 clock frequency on zcu111
  arm64: zynqmp: Setup clock-output-names for si570 chips
  arm64: zynqmp: Turn comment to gpio-line-names
  arm64: zynqmp: Fix address for tca6416_u97 chip on zcu104
  arm64: zynqmp: Remove addition number in node name
  arm64: zynqmp: Use ethernet-phy as node name for ethernet phys
  arm64: dts: xilinx: Add the power nodes for zynqmp
  arm64: dts: xilinx: Remove dtsi for fixed clock
  arm64: dts: xilinx: Add the clock nodes for zynqmp
  arm64: zynqmp: Add dr_mode property to usb node
  arm64: dts: zynqmp: Use decimal values for drm-clock properties
  ...

Link: https://lore.kernel.org/r/c70d2efa-9ee2-a764-5248-0e5bfbf29f8a@monstr.eu
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-21 15:06:11 -08:00
Dirk Behme
d7bbd6c1b0 arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean'
Since v4.3-rc1 commit 0723c05fb7 ("arm64: enable more compressed
Image formats"), it is possible to build Image.{bz2,lz4,lzma,lzo}
AArch64 images. However, the commit missed adding support for removing
those images on 'make ARCH=arm64 (dist)clean'.

Fix this by adding them to the target list.
Make sure to match the order of the recipes in the makefile.

Cc: stable@vger.kernel.org # v4.3+
Fixes: 0723c05fb7 ("arm64: enable more compressed Image formats")
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-21 16:28:36 +00:00
Julien Thierry
108eae2d4d arm64: entry: Avoid empty alternatives entries
kernel_ventry will create alternative entries to potentially replace
0 instructions with 0 instructions for EL1 vectors. While this does not
cause an issue, it pointlessly takes up some bytes in the alternatives
section.

Do not generate such entries.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-21 09:55:18 +00:00
Vladimir Murzin
9834602336 arm64: Kconfig: select HAVE_FUTEX_CMPXCHG
arm64 provides always working implementation of futex_atomic_cmpxchg_inatomic(),
so there is no need to check it runtime.

Reported-by: Piyush swami <Piyush.swami@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-21 09:14:01 +00:00
Ingo Molnar
a786810cc8 Linux 5.5-rc7
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl4k7i8eHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGvk0IAKRenVOdiudY77SQ
 VZjsteyrYTTQtPPv494ToIRjR0XQ+gYp8vyWzXTUC5Nm9Y9U3VzDqUPUjWszrSXE
 6mU+tzcMc9qwuUxnIFn8zfg64ygw+37sn/w3xqeH4QmF9Z5Wl3EX3SdXTs7jp3RS
 VxiztkUNI5ZBV2GDtla5K/9qLPqCQnUYXIiyi5lAtBtiitZDVXFp7dy7hMgEiaEO
 +78K5Kh3xlt5ndDsBFOlwIb2Oof3KL7bBXntdbSBc/bjol6IRvAgln48HWCv59G2
 jzAp2tj2KobX9GRAEPj+v4TQZEW0SXDNDi8MgQsM+3DYVCTmANsv57CBKRuf01+F
 nB1kAys=
 =zSnJ
 -----END PGP SIGNATURE-----

Merge tag 'v5.5-rc7' into efi/core, to pick up fixes

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2020-01-20 08:05:16 +01:00
Olof Johansson
71acc94c49 DSI display for px30 evaluation board and a number of cleanups
accross multiple socs.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAl4k5D4QHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgfEbCACOCZhDKEttjrJckHExJzyEm+NThYTy4Mmt
 FwKS10w3/Fp9Z+Pc7fZk/e1QZ6AlEQPjmy+Ls1r7D7MrkotmPy6YRI6R9OFoj/aw
 eUCeo+plJUl2ij8oGgHNnWq6DJEm9cXcmCILuk8K3aj51fWMXH30L0F70lGxAuYb
 G1Ta3lnZ22Yc46ie6rQuTU9xtpv2Oy7gtPnZ2uYPEs9T8GFHH/frnaJIyk0SaU4k
 n7vWajLqoASDawZJ162+Tq2xtUpNF8CWdYTwtHlheVEC28g9H8f+XX+66x+plrGe
 t0Prg62VWUaEn6w80JILxYwPEXh1eHXY7reM/bGwoIW+9U0UtxMX
 =8p9R
 -----END PGP SIGNATURE-----

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

DSI display for px30 evaluation board and a number of cleanups
accross multiple socs.

* tag 'v5.6-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Kill off "simple-panel" compatibles
  arm64: dts: rockchip: rename dwmmc node names to mmc
  arm64: dts: rockchip: hook up the px30-evb dsi display
  arm64: dts: rockchip: Enable sdio0 and uart0 on rk3399-roc-pc-mezzanine
  arm64: dts: rockchip: add reg property to brcmf sub-nodes
  arm64: dts: rockchip: fix dwmmc clock name for rk3308
  arm64: dts: rockchip: fix dwmmc clock name for px30

Link: https://lore.kernel.org/r/7641353.lIegmeFAIi@phil
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-19 22:47:47 -08:00
David S. Miller
b3f7e3f23a Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2020-01-19 22:10:04 +01:00
Mark Rutland
1cfbb484de KVM: arm/arm64: Correct AArch32 SPSR on exception entry
Confusingly, there are three SPSR layouts that a kernel may need to deal
with:

(1) An AArch64 SPSR_ELx view of an AArch64 pstate
(2) An AArch64 SPSR_ELx view of an AArch32 pstate
(3) An AArch32 SPSR_* view of an AArch32 pstate

When the KVM AArch32 support code deals with SPSR_{EL2,HYP}, it's either
dealing with #2 or #3 consistently. On arm64 the PSR_AA32_* definitions
match the AArch64 SPSR_ELx view, and on arm the PSR_AA32_* definitions
match the AArch32 SPSR_* view.

However, when we inject an exception into an AArch32 guest, we have to
synthesize the AArch32 SPSR_* that the guest will see. Thus, an AArch64
host needs to synthesize layout #3 from layout #2.

This patch adds a new host_spsr_to_spsr32() helper for this, and makes
use of it in the KVM AArch32 support code. For arm64 we need to shuffle
the DIT bit around, and remove the SS bit, while for arm we can use the
value as-is.

I've open-coded the bit manipulation for now to avoid having to rework
the existing PSR_* definitions into PSR64_AA32_* and PSR32_AA32_*
definitions. I hope to perform a more thorough refactoring in future so
that we can handle pstate view manipulation more consistently across the
kernel tree.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200108134324.46500-4-mark.rutland@arm.com
2020-01-19 18:06:14 +00:00
Mark Rutland
3c2483f154 KVM: arm/arm64: Correct CPSR on exception entry
When KVM injects an exception into a guest, it generates the CPSR value
from scratch, configuring CPSR.{M,A,I,T,E}, and setting all other
bits to zero.

This isn't correct, as the architecture specifies that some CPSR bits
are (conditionally) cleared or set upon an exception, and others are
unchanged from the original context.

This patch adds logic to match the architectural behaviour. To make this
simple to follow/audit/extend, documentation references are provided,
and bits are configured in order of their layout in SPSR_EL2. This
layout can be seen in the diagram on ARM DDI 0487E.a page C5-426.

Note that this code is used by both arm and arm64, and is intended to
fuction with the SPSR_EL2 and SPSR_HYP layouts.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200108134324.46500-3-mark.rutland@arm.com
2020-01-19 18:06:14 +00:00
Mark Rutland
a425372e73 KVM: arm64: Correct PSTATE on exception entry
When KVM injects an exception into a guest, it generates the PSTATE
value from scratch, configuring PSTATE.{M[4:0],DAIF}, and setting all
other bits to zero.

This isn't correct, as the architecture specifies that some PSTATE bits
are (conditionally) cleared or set upon an exception, and others are
unchanged from the original context.

This patch adds logic to match the architectural behaviour. To make this
simple to follow/audit/extend, documentation references are provided,
and bits are configured in order of their layout in SPSR_EL2. This
layout can be seen in the diagram on ARM DDI 0487E.a page C5-429.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200108134324.46500-2-mark.rutland@arm.com
2020-01-19 18:06:13 +00:00
Russell King
f5523423de arm64: kvm: Fix IDMAP overlap with HYP VA
Booting 5.4 on LX2160A reveals that KVM is non-functional:

kvm: Limiting the IPA size due to kernel Virtual Address limit
kvm [1]: IPA Size Limit: 43bits
kvm [1]: IDMAP intersecting with HYP VA, unable to continue
kvm [1]: error initializing Hyp mode: -22

Debugging shows:

kvm [1]: IDMAP page: 81a26000
kvm [1]: HYP VA range: 0:22ffffffff

as RAM is located at:

80000000-fbdfffff : System RAM
2080000000-237fffffff : System RAM

Comparing this with the same kernel on Armada 8040 shows:

kvm: Limiting the IPA size due to kernel Virtual Address limit
kvm [1]: IPA Size Limit: 43bits
kvm [1]: IDMAP page: 2a26000
kvm [1]: HYP VA range: 4800000000:493fffffff
...
kvm [1]: Hyp mode initialized successfully

which indicates that hyp_va_msb is set, and is always set to the
opposite value of the idmap page to avoid the overlap. This does not
happen with the LX2160A.

Further debugging shows vabits_actual = 39, kva_msb = 38 on LX2160A and
kva_msb = 33 on Armada 8040. Looking at the bit layout of the HYP VA,
there is still one bit available for hyp_va_msb. Set this bit
appropriately. This allows KVM to be functional on the LX2160A, but
without any HYP VA randomisation:

kvm: Limiting the IPA size due to kernel Virtual Address limit
kvm [1]: IPA Size Limit: 43bits
kvm [1]: IDMAP page: 81a24000
kvm [1]: HYP VA range: 4000000000:62ffffffff
...
kvm [1]: Hyp mode initialized successfully

Fixes: ed57cac83e ("arm64: KVM: Introduce EL2 VA randomisation")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
[maz: small additional cleanups, preserved case where the tag
 is legitimately 0 and we can just use the mask, Fixes tag]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/E1ilAiY-0000MA-RG@rmk-PC.armlinux.org.uk
2020-01-19 16:05:23 +00:00
Christoffer Dall
b6ae256afd KVM: arm64: Only sign-extend MMIO up to register width
On AArch64 you can do a sign-extended load to either a 32-bit or 64-bit
register, and we should only sign extend the register up to the width of
the register as specified in the operation (by using the 32-bit Wn or
64-bit Xn register specifier).

As it turns out, the architecture provides this decoding information in
the SF ("Sixty-Four" -- how cute...) bit.

Let's take advantage of this with the usual 32-bit/64-bit header file
dance and do the right thing on AArch64 hosts.

Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20191212195055.5541-1-christoffer.dall@arm.com
2020-01-19 16:05:10 +00:00
Rob Herring
62b5efc919 arm64: dts: rockchip: Kill off "simple-panel" compatibles
"simple-panel" is a Linux driver and has never been an accepted upstream
compatible string, so remove it.

Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200117230851.25434-1-robh@kernel.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-18 23:58:56 +01:00
Johan Jonker
3ef7c2558f arm64: dts: rockchip: rename dwmmc node names to mmc
Current dts files with 'dwmmc' nodes are manually verified.
In order to automate this process rockchip-dw-mshc.txt
has to be converted to yaml. In the new setup
rockchip-dw-mshc.yaml will inherit properties from
mmc-controller.yaml and synopsys-dw-mshc-common.yaml.
'dwmmc' will no longer be a valid name for a node,
so change them all to 'mmc'

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200115185244.18149-2-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-18 23:56:10 +01:00
Aleksa Sarai
fddb5d430a open: introduce openat2(2) syscall
/* Background. */
For a very long time, extending openat(2) with new features has been
incredibly frustrating. This stems from the fact that openat(2) is
possibly the most famous counter-example to the mantra "don't silently
accept garbage from userspace" -- it doesn't check whether unknown flags
are present[1].

This means that (generally) the addition of new flags to openat(2) has
been fraught with backwards-compatibility issues (O_TMPFILE has to be
defined as __O_TMPFILE|O_DIRECTORY|[O_RDWR or O_WRONLY] to ensure old
kernels gave errors, since it's insecure to silently ignore the
flag[2]). All new security-related flags therefore have a tough road to
being added to openat(2).

Userspace also has a hard time figuring out whether a particular flag is
supported on a particular kernel. While it is now possible with
contemporary kernels (thanks to [3]), older kernels will expose unknown
flag bits through fcntl(F_GETFL). Giving a clear -EINVAL during
openat(2) time matches modern syscall designs and is far more
fool-proof.

In addition, the newly-added path resolution restriction LOOKUP flags
(which we would like to expose to user-space) don't feel related to the
pre-existing O_* flag set -- they affect all components of path lookup.
We'd therefore like to add a new flag argument.

Adding a new syscall allows us to finally fix the flag-ignoring problem,
and we can make it extensible enough so that we will hopefully never
need an openat3(2).

/* Syscall Prototype. */
  /*
   * open_how is an extensible structure (similar in interface to
   * clone3(2) or sched_setattr(2)). The size parameter must be set to
   * sizeof(struct open_how), to allow for future extensions. All future
   * extensions will be appended to open_how, with their zero value
   * acting as a no-op default.
   */
  struct open_how { /* ... */ };

  int openat2(int dfd, const char *pathname,
              struct open_how *how, size_t size);

/* Description. */
The initial version of 'struct open_how' contains the following fields:

  flags
    Used to specify openat(2)-style flags. However, any unknown flag
    bits or otherwise incorrect flag combinations (like O_PATH|O_RDWR)
    will result in -EINVAL. In addition, this field is 64-bits wide to
    allow for more O_ flags than currently permitted with openat(2).

  mode
    The file mode for O_CREAT or O_TMPFILE.

    Must be set to zero if flags does not contain O_CREAT or O_TMPFILE.

  resolve
    Restrict path resolution (in contrast to O_* flags they affect all
    path components). The current set of flags are as follows (at the
    moment, all of the RESOLVE_ flags are implemented as just passing
    the corresponding LOOKUP_ flag).

    RESOLVE_NO_XDEV       => LOOKUP_NO_XDEV
    RESOLVE_NO_SYMLINKS   => LOOKUP_NO_SYMLINKS
    RESOLVE_NO_MAGICLINKS => LOOKUP_NO_MAGICLINKS
    RESOLVE_BENEATH       => LOOKUP_BENEATH
    RESOLVE_IN_ROOT       => LOOKUP_IN_ROOT

open_how does not contain an embedded size field, because it is of
little benefit (userspace can figure out the kernel open_how size at
runtime fairly easily without it). It also only contains u64s (even
though ->mode arguably should be a u16) to avoid having padding fields
which are never used in the future.

Note that as a result of the new how->flags handling, O_PATH|O_TMPFILE
is no longer permitted for openat(2). As far as I can tell, this has
always been a bug and appears to not be used by userspace (and I've not
seen any problems on my machines by disallowing it). If it turns out
this breaks something, we can special-case it and only permit it for
openat(2) but not openat2(2).

After input from Florian Weimer, the new open_how and flag definitions
are inside a separate header from uapi/linux/fcntl.h, to avoid problems
that glibc has with importing that header.

/* Testing. */
In a follow-up patch there are over 200 selftests which ensure that this
syscall has the correct semantics and will correctly handle several
attack scenarios.

In addition, I've written a userspace library[4] which provides
convenient wrappers around openat2(RESOLVE_IN_ROOT) (this is necessary
because no other syscalls support RESOLVE_IN_ROOT, and thus lots of care
must be taken when using RESOLVE_IN_ROOT'd file descriptors with other
syscalls). During the development of this patch, I've run numerous
verification tests using libpathrs (showing that the API is reasonably
usable by userspace).

/* Future Work. */
Additional RESOLVE_ flags have been suggested during the review period.
These can be easily implemented separately (such as blocking auto-mount
during resolution).

Furthermore, there are some other proposed changes to the openat(2)
interface (the most obvious example is magic-link hardening[5]) which
would be a good opportunity to add a way for userspace to restrict how
O_PATH file descriptors can be re-opened.

Another possible avenue of future work would be some kind of
CHECK_FIELDS[6] flag which causes the kernel to indicate to userspace
which openat2(2) flags and fields are supported by the current kernel
(to avoid userspace having to go through several guesses to figure it
out).

[1]: https://lwn.net/Articles/588444/
[2]: https://lore.kernel.org/lkml/CA+55aFyyxJL1LyXZeBsf2ypriraj5ut1XkNDsunRBqgVjZU_6Q@mail.gmail.com
[3]: commit 629e014bb8 ("fs: completely ignore unknown open flags")
[4]: https://sourceware.org/bugzilla/show_bug.cgi?id=17523
[5]: https://lore.kernel.org/lkml/20190930183316.10190-2-cyphar@cyphar.com/
[6]: https://youtu.be/ggD-eb3yPVs

Suggested-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2020-01-18 09:19:18 -05:00
Olof Johansson
bba9d2b163 This pull request contains Broadcom ARM64-based SoCs defconfig changes
for 5.6, please pull the following:
 
 - Nicolas enables the Broadcom GENET controller and Broadcom STB PCIe
   Root Complex driver as a module for the ARM64 defconfig. The PCIe RC
   driver will go through the PCIe maintainers pull request for 5.6.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAl4iFKAACgkQh9CWnEQH
 BwSiqRAAr57unOelMvv+Nd8H5x7m1JkfHQZquVkqlui3na+fssIOshRgQ+VXbtVR
 y2wDZlAH5j66VCsAv9yXBJJPOb8Ta0iXMCGxSycZmGpF9rn/RaUziz9JljJ4DvZN
 xOf+j13q1R/mjaleRIIwZGk6MwFZr8RCtZhAV/jQjTihJSEJj0+FiNfG/TjW3mgY
 L25JLHXtThFpADxXYHzI5LUsH9T2HiWn0IC3UEloBggjn7Vv2+1fZfeukOexRnt7
 SHzHOFADrPCvaSxK9CtRFR1n4FcB87Kvl0g+b0EKDrYLnZkpuZ1FAmt7tR8NZ6RC
 mZ2DCPuhPZ4W2ToM5OpzQVUUpBaMLNM0TtNwS6NFit7t3q+RYa7mvCNoQifvwh7L
 ruNNLXEaH0fl+/hPRlQw2jBuhfuvgz0W8dpgj/389Zhs5SnO5P/7jOp5DqNmQ4su
 rMDcbEV2sElC0ZJuhkEL7Z0STRBhf72D3KTrfOwZd4hrrWKKEdDHUc/3fX1YsQ1h
 /PLWt3K5VbqZCgH+cmuiO0afFJZa3unx3HoMI8fTpo6WLVmA57gWvJMDusKHSq3p
 j0wJtY5q8oTc36xe2Y0nuO6DpWDMuR0RBJGHBpbbWT7NgsJSj5BqS3JOG44DQSdF
 gJS8GhAGnY9PeJuVv4QElq0QWo31iv/3fjROaCh+IpA2QMthbxQ=
 =UsZS
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-5.6/defconfig-arm64' of https://github.com/Broadcom/stblinux into arm/defconfig

This pull request contains Broadcom ARM64-based SoCs defconfig changes
for 5.6, please pull the following:

- Nicolas enables the Broadcom GENET controller and Broadcom STB PCIe
  Root Complex driver as a module for the ARM64 defconfig. The PCIe RC
  driver will go through the PCIe maintainers pull request for 5.6.

* tag 'arm-soc/for-5.6/defconfig-arm64' of https://github.com/Broadcom/stblinux:
  arm64: defconfig: Enable Broadcom's GENET Ethernet controller
  arm64: defconfig: Enable Broadcom's STB PCIe controller

Link: https://lore.kernel.org/r/20200117222705.25391-1-f.fainelli@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-17 17:07:35 -08:00
Krzysztof Kozlowski
b0e55fef62 arm64: dts: exynos: Rename Samsung and Exynos to lowercase
Fix up inconsistent usage of upper and lowercase letters in "Samsung"
and "Exynos" names.

"SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked
names.  Therefore they should be written with lowercase letters starting
with capital letter.

The lowercase "Exynos" name is promoted by its manufacturer Samsung
Electronics Co., Ltd., in advertisement materials and on website.

Although advertisement materials usually use uppercase "SAMSUNG", the
lowercase version is used in all legal aspects (e.g. on Wikipedia and in
privacy/legal statements on
https://www.samsung.com/semiconductor/privacy-global/).

Link: https://lore.kernel.org/r/20200117190305.5257-1-krzk@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-17 12:08:49 -08:00
Nicolas Saenz Julienne
e926791a96 arm64: defconfig: Enable Broadcom's GENET Ethernet controller
Currently used on the Raspberry Pi 4 and various Broadcom STB SoCs.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2020-01-17 12:03:18 -08:00
Olof Johansson
bd4d5488d3 Merge tag 'ti-k3-soc-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into arm/dt
Texas Instruments K3 SoC family changes for 5.6

- Add missing power domains for smmu for J721e
- Add I2C, ADC, OSPI and UFS nodes for J721e
- Add OSPI and MCU syscon nodes for am65x
- Add IRQ line for GPIO expander on am65x

* tag 'ti-k3-soc-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux:
  arm64: dts: ti: k3-j721e-main: Add missing power-domains for smmu
  arm64: dts: ti: k3-am65-mcu: add system control module node
  arm64: dts: k3-am654-base-board: Add IRQ line for GPIO expander
  arm64: dts: ti: k3-am65: Add OSPI DT node
  arm64: dts: ti: k3-j721e: Add DT nodes for few peripherials

Link: https://lore.kernel.org/r/c5b74bfc-f2f0-1b72-4a3c-4c1d478a023a@ti.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-17 12:01:31 -08:00
Robin Murphy
c2c24edb1d arm64: csum: Fix pathological zero-length calls
In validating the checksumming results of the new routine, I sadly
neglected to test its not-checksumming results. Thus it slipped through
that the one case where @buff is already dword-aligned and @len = 0
manages to defeat the tail-masking logic and behave as if @len = 8.
For a zero length it doesn't make much sense to deference @buff anyway,
so just add an early return (which has essentially zero impact on
performance).

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-17 16:05:50 +00:00
Masahiro Yamada
e98d5023fe arm64: dts: uniphier: add reset-names to NAND controller node
The Denali NAND controller IP has separate reset control for the
controller core and registers.

Add the reset-names, and one more phandle accordingly. This is the
approved DT-binding.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-01-18 00:56:18 +09:00
Mark Rutland
3e3934176a arm64: entry: cleanup sp_el0 manipulation
The kernel stashes the current task struct in sp_el0 so that this can be
acquired consistently/cheaply when required. When we take an exception
from EL0 we have to:

1) stash the original sp_el0 value
2) find the current task
3) update sp_el0 with the current task pointer

Currently steps #1 and #2 occur in one place, and step #3 a while later.
As the value of sp_el0 is immaterial between these points, let's move
them together to make the code clearer and minimize ifdeffery. This
necessitates moving the comment for MDSCR_EL1.SS.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-17 13:22:14 +00:00
Mark Rutland
7a2c094464 arm64: entry: cleanup el0 svc handler naming
For most of the exception entry code, <foo>_handler() is the first C
function called from the entry assembly in entry-common.c, and external
functions handling the bulk of the logic are called do_<foo>().

For consistency, apply this scheme to el0_svc_handler and
el0_svc_compat_handler, renaming them to do_el0_svc and
do_el0_svc_compat respectively.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-17 13:22:14 +00:00
Mark Rutland
2d226c1e1c arm64: entry: mark all entry code as notrace
Almost all functions in entry-common.c are marked notrace, with
el1_undef and el1_inv being the only exceptions. We appear to have done
this on the assumption that there were no exception registers that we
needed to snapshot, and thus it was safe to run trace code that might
result in further exceptions and clobber those registers.

However, until we inherit the DAIF flags, our irq flag tracing is stale,
and this discrepancy could set off warnings in some configurations. For
example if CONFIG_DEBUG_LOCKDEP is selected and a trace function calls
into any flag-checking locking routines. Given we don't expect to
trigger el1_undef or el1_inv unless something is already wrong, any
irqflag warnigns are liable to mask the information we'd actually care
about.

Let's keep things simple and mark el1_undef and el1_inv as notrace.
Developers can trace do_undefinstr and bad_mode if they really want to
monitor these cases.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-17 13:22:14 +00:00
Mark Rutland
ddb953f86c arm64: assembler: remove smp_dmb macro
These days arm64 kernels are always SMP, and thus smp_dmb is an
overly-long way of writing dmb. Naturally, no-one uses it.

Remove the unused macro.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-17 13:22:13 +00:00
Mark Rutland
170b25fa6a arm64: assembler: remove inherit_daif macro
We haven't needed the inherit_daif macro since commit:

  ed3768db58 ("arm64: entry: convert el1_sync to C")

... which converted all callers to C and the local_daif_inherit
function.

Remove the unused macro.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-17 13:22:13 +00:00
Catalin Marinas
95b3f74bec arm64: Use macros instead of hard-coded constants for MAIR_EL1
Currently, the arm64 __cpu_setup has hard-coded constants for the memory
attributes that go into the MAIR_EL1 register. Define proper macros in
asm/sysreg.h and make use of them in proc.S.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-17 12:48:33 +00:00
Sai Prakash Ranjan
83b0c36b8a arm64: Add KRYO{3,4}XX CPU cores to spectre-v2 safe list
The "silver" KRYO3XX and KRYO4XX CPU cores are not affected by Spectre
variant 2. Add them to spectre_v2 safe list to correct the spurious
ARM_SMCCC_ARCH_WORKAROUND_1 warning and vulnerability status reported
under sysfs.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
[will: tweaked commit message to remove stale mention of "gold" cores]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-17 12:46:41 +00:00
Waiman Long
f5bfdc8e39 locking/osq: Use optimized spinning loop for arm64
Arm64 has a more optimized spinning loop (atomic_cond_read_acquire)
using wfe for spinlock that can boost performance of sibling threads
by putting the current cpu to a wait state that is broken only when
the monitored variable changes or an external event happens.

OSQ has a more complicated spinning loop. Besides the lock value, it
also checks for need_resched() and vcpu_is_preempted(). The check for
need_resched() is not a problem as it is only set by the tick interrupt
handler. That will be detected by the spinning cpu right after iret.

The vcpu_is_preempted() check, however, is a problem as changes to the
preempt state of of previous node will not affect the wait state. For
ARM64, vcpu_is_preempted is not currently defined and so is a no-op.
Will has indicated that he is planning to para-virtualize wfe instead
of defining vcpu_is_preempted for PV support. So just add a comment in
arch/arm64/include/asm/spinlock.h to indicate that vcpu_is_preempted()
should not be defined as suggested.

On a 2-socket 56-core 224-thread ARM64 system, a kernel mutex locking
microbenchmark was run for 10s with and without the patch. The
performance numbers before patch were:

Running locktest with mutex [runtime = 10s, load = 1]
Threads = 224, Min/Mean/Max = 316/123,143/2,121,269
Threads = 224, Total Rate = 2,757 kop/s; Percpu Rate = 12 kop/s

After patch, the numbers were:

Running locktest with mutex [runtime = 10s, load = 1]
Threads = 224, Min/Mean/Max = 334/147,836/1,304,787
Threads = 224, Total Rate = 3,311 kop/s; Percpu Rate = 15 kop/s

So there was about 20% performance improvement.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200113150735.21956-1-longman@redhat.com
2020-01-17 10:19:30 +01:00
Lokesh Vutla
3f03a58b25 arm64: dts: ti: k3-j721e-main: Add missing power-domains for smmu
Add power-domains entry for smmu, so that the it is accessible as long
as the driver is active. Without this device shutdown is throwing the
below warning:
"[   44.736348] arm-smmu-v3 36600000.smmu: failed to clear cr0"

Reported-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2020-01-17 10:19:51 +02:00
Grygorii Strashko
f2965b9979 arm64: dts: ti: k3-am65-mcu: add system control module node
The MCU System control module support is added to the device tree to allow
drivers to access to their System control module registers.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2020-01-17 10:19:51 +02:00
Vignesh Raghavendra
ca3be22dd0 arm64: dts: k3-am654-base-board: Add IRQ line for GPIO expander
Add IRQ line for IO expander present on wkup_i2c bus on  AM654 EVM

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2020-01-17 10:19:51 +02:00
Vignesh Raghavendra
07481770e8 arm64: dts: ti: k3-am65: Add OSPI DT node
AM654 SoC has two Cadence OSPI controller instances under Flash
subsystem (FSS). Add DT nodes for the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2020-01-17 10:19:51 +02:00
Vignesh Raghavendra
cb27354b38 arm64: dts: ti: k3-j721e: Add DT nodes for few peripherials
Enable I2Cs, ADCs, OSPIs and UFS peripherals present on J721e.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2020-01-17 10:19:51 +02:00
Linus Torvalds
575966e080 ARM: SoC fixes
I've been sitting on these longer than I meant, so the patch count is
 a bit higher than ideal for this part of the release. There's also some
 reverts of double-applied patches that brings the diffstat up a bit.
 
 With that said, the biggest changes are:
 
  - Revert of duplicate i2c device addition on two Aspeed (BMC) Devicetrees.
  - Move of two device nodes that got applied to the wrong part of the
    tree on ASpeed G6.
  - Regulator fix for Beaglebone X15 (adding 12/5V supplies)
  - Use interrupts for keys on Amlogic SM1 to avoid missed polls
 
 In addition to that, there is a collection of smaller DT fixes:
 
  - Power supply assignment fixes for i.MX6
  - Fix of interrupt line for magnetometer on i.MX8 Librem5 devkit
  - Build fixlets (selects) for davinci/omap2+
  - More interrupt number fixes for Stratix10, Amlogic SM1, etc.
  - ... and more similar fixes across different platforms
 
 And some non-DT stuff:
 
  - optee fix to register multiple shared pages properly
  - Clock calculation fixes for MMP3
  - Clock fixes for OMAP as well
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCAAtFiEElf+HevZ4QCAJmMQ+jBrnPN6EHHcFAl4hIooPHG9sb2ZAbGl4
 b20ubmV0AAoJEIwa5zzehBx3vckP/jT/yrodXuK3OLtBnDQI4Em5b14uJQxEAsh+
 fTaz1H3n82PaWJVaEXpRTYMa4WZnmMPazoAoDhuqWnz/VbzfXmufFIIXsQ0rJqbf
 Ht1LWvx7hd5q49aq2x1o9Nuo5OKMbW8igQqsx7PqjSOQRaAZTkxZhOI1C9pKnnnD
 oJU8nw19N8yCQILxXMmpBX2vczWyJ3tgH6v8rhB89riBXouqwcKbTRyI0ciFdO91
 mPlfF9qwqZ99bb+7WqalrtOr+/0VgvhB3oCNzoWYPptipiaLGdH4ZXVEhyCUDmrY
 WN1kZsBtK+jtDLcMdRqg+EmbijxcxA0DSLDCow1QwuMPNHxVN5du1JN7b4uTvCPX
 sHbrDO/YdiSWx20VZID/x/sWqcQyBrDqZkA3NWhoClm75JGQUHP16pZUURCN/awy
 IGApkQ5164Ac+2DFHgh3S7qKXWk7O+hY6iksyRPPZkj31d4mCimdVaHDV/c3aeI/
 EnUI6nj6H3ghYTX2gl3yhT8d4yCM+2uSawdIFWGNvB85vs1koAUEuczc6Me8JdZV
 4HWexVs8W0Jo1w3Ndq3Hxw0RTKccC34x1f4dnzSSSEF7t4GMveTdecd/D77aiT2x
 eVNox3PIAfjR96et2vQ1C+hVRyEqn/hDapvR5OI/78F2ampee8m8tWQDYIlH/RbZ
 pdBTN5CS
 =MMJu
 -----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:
 "I've been sitting on these longer than I meant, so the patch count is
  a bit higher than ideal for this part of the release. There's also
  some reverts of double-applied patches that brings the diffstat up a
  bit.

  With that said, the biggest changes are:

   - Revert of duplicate i2c device addition on two Aspeed (BMC)
     Devicetrees.

   - Move of two device nodes that got applied to the wrong part of the
     tree on ASpeed G6.

   - Regulator fix for Beaglebone X15 (adding 12/5V supplies)

   - Use interrupts for keys on Amlogic SM1 to avoid missed polls

  In addition to that, there is a collection of smaller DT fixes:

   - Power supply assignment fixes for i.MX6

   - Fix of interrupt line for magnetometer on i.MX8 Librem5 devkit

   - Build fixlets (selects) for davinci/omap2+

   - More interrupt number fixes for Stratix10, Amlogic SM1, etc.

   - ... and more similar fixes across different platforms

  And some non-DT stuff:

   - optee fix to register multiple shared pages properly

   - Clock calculation fixes for MMP3

   - Clock fixes for OMAP as well"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (42 commits)
  MAINTAINERS: Add myself as the co-maintainer for Actions Semi platforms
  ARM: dts: imx7: Fix Toradex Colibri iMX7S 256MB NAND flash support
  ARM: dts: imx6sll-evk: Remove incorrect power supply assignment
  ARM: dts: imx6sl-evk: Remove incorrect power supply assignment
  ARM: dts: imx6sx-sdb: Remove incorrect power supply assignment
  ARM: dts: imx6qdl-sabresd: Remove incorrect power supply assignment
  ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6DL
  ARM: omap2plus: select RESET_CONTROLLER
  ARM: davinci: select CONFIG_RESET_CONTROLLER
  ARM: dts: aspeed: rainier: Fix fan fault and presence
  ARM: dts: aspeed: rainier: Remove duplicate i2c busses
  ARM: dts: aspeed: tacoma: Remove duplicate flash nodes
  ARM: dts: aspeed: tacoma: Remove duplicate i2c busses
  ARM: dts: aspeed: tacoma: Fix fsi master node
  ARM: dts: aspeed-g6: Fix FSI master location
  ARM: dts: mmp3: Fix the TWSI ranges
  clk: mmp2: Fix the order of timer mux parents
  ARM: mmp: do not divide the clock rate
  arm64: dts: rockchip: Fix IR on Beelink A1
  optee: Fix multi page dynamic shm pool alloc
  ...
2020-01-16 19:42:08 -08:00
Manivannan Sadhasivam
0109ef6e69 arm64: defconfig: Enable Actions Semi specific drivers
Since the Actions Semi platform has been enabled in defconfig, let's
also enable the relevant device drivers there.

Link: https://lore.kernel.org/r/20200114084348.25659-3-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 15:49:46 -08:00
Manivannan Sadhasivam
dee0be5c21 arm64: dts: bitmain: Source common clock for UART controllers
Remove fixed clock and source common clock for UART controllers.

Link: https://lore.kernel.org/r/20200114040311.6599-3-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 15:48:11 -08:00
Manivannan Sadhasivam
e1cd7b8046 arm64: dts: bitmain: Add clock controller support for BM1880 SoC
Add clock controller support for Bitmain BM1880 SoC.

Link: https://lore.kernel.org/r/20200114040311.6599-2-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 15:48:02 -08:00
Olof Johansson
5a74e85ae4 arm64: dts: Amlogic updates for v5.6
- new boards: libretech-pc (S912 and S905D versions)
 - new board: Videostrong KII Pro
 - A1: add reset controller
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAl4Xc/IACgkQWTcYmtP7
 xmVWVQ//UoVRudraCl55cRr01VSWeciO2ccDau6ohZgnEs0lQauBEB36Z5SjrHbz
 pF1b1cR/qgcMG5Y5d7dkhHSP0CaHfhqHoWD+ePo1HuGeqnQ0YC6cIvXxLltohS0O
 jTqImL01vVbWZdg+CgwWLTXOa+eUYRKaQmilrSFgZwDrUM0yA1g5a88pEsl0ZHhM
 +6rXuWyunuojSkxS5JUFZU4gqq2A6h0UYysixI3YCtB6aOVvWvR/twM48wAtzUwR
 PyANvh1LuAUiUMcOPTVuM3+rjswmuczQZg7gLSk0QO+wNZwP0jpzolNTw2Y8Q90a
 JfiJMs+HG+REL83h1+S+pEsG2N7+rDkqXoPA0yKR68lDd0CN824/qv6pjOSUnAXz
 QS41H5hktWeWGeOwzx4flC73PSPgqiMIui2r7U+857zgNpLLOXbH8LfWTOS8TsPx
 hKsaz0LfW9+QffZHmA82yw5qDf8mHB9lDwyWWd9fulRRqnwDvr97NN9EAftmkIm1
 crZA+u1LDxRLHwdhCRt7gnbsTUTMBBsB3R4SscDa5759ClTLkCwm6OXuV62vmV0N
 /UKDAUjtMxxbEEhZ2TFtRUUP1yiqAOsqgcMfqwOQJe5N5QrN7HSxdc1431tYY/Il
 i13Y3mtFob6AA5M40hDPETs3v7B3TKPJypDf5hatcLN/a6uu9EA=
 =ye5+
 -----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.6
- new boards: libretech-pc (S912 and S905D versions)
- new board: Videostrong KII Pro
- A1: add reset controller

* tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson: add audio fifo depths
  arm64: dts: meson: add libretech-pc boards support
  dt-bindings: arm: amlogic: add libretech-pc bindings
  arm64: dts: meson: gxl: add i2c C pins
  arm64: dts: meson-sm1: add video decoder compatible
  arm64: dts: meson-g12-common: add video decoder node
  arm64: dts: meson-gxbb: add support for Videostrong KII Pro
  dt-bindings: arm: amlogic: add Videostrong KII Pro bindings
  dt-bindings: Add vendor prefix for Videostrong
  arm64: dts: meson: a1: add pinctrl controller support
  arm64: dts: meson: add reset controller for Meson-A1 SoC

Link: https://lore.kernel.org/r/7hsgkidi3k.fsf@baylibre.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 15:46:40 -08:00
Olof Johansson
2e04d1bd54 Qualcomm ARM64 DT updates for v5.6
* Align SDM845 firmware paths with linux-firmware
 * Make WiFi work on Dragonboard845c
 * Wire up wakeup controller for SDM845
 * Critical thermal interrupt support for SDM845, MSM8996 and MSM8998
 * Enable UFS for SM8150
 * Add remoteproc enablers and nodes for SM8150
 * Add CPUfreq for SM8150
 * Add RPMH power-domain node for SM8150
 * Cleanup and refactor MSM8996 dts structure
 * Add initial Inforce Computing IFC6640 dts
 * Increase MSM8996 core voltage
 * Fix MSM8996 USB phy settings
 * Add missing alias for BLSP UART in MSM8998 MTP
 * Add remoteproc nodes for ADSP, modem and sensor core for MSM8998
 * Enable WiFI for MSM8998
 * Introduce the SC7180 platform and the IDP development board
 * Add CPUfreq, QUPs, USB, remoteproc etc for SC7180
 * Enable USB OTG for Dragonboard 410c
 * Add vibrator motor node for PM8916
 * Properly specify APCS clocks for MSM8916
 * Add CPR and HFPLL for QCS404
 * Enable full CPUfreq (with AVS) for QCS404
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAl4czOIbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FqygP/Aw1zvnCyKYfWGYrzXi2
 X7moY5Re0mm1ePQwlZyK681wrdGX3EghkpHeGxoHpApZGUE7K/bkeWH5shtEltmI
 SA1WrszRbcs9BL1jKXlC46kmjNTGkEjfqIJDwT0SxvN2XMQJGp/Dn8cg6eSOhDt4
 UAsXMOPoOJiiOo6zuQZzDHcSzRvUl4Ea4ePPcVILRLjco33rjvKtJYg2Syq7v4Zi
 Jqd1UhWuY/s1KlfJ13Oi3q9/HuWjt4C756U3eHPQOyTbKVbAIMZq3g5qK+ph3oSp
 6alwHagCLS945PvuZIZsy8XtKjowuNfMqHFJQVllkOF3bkVa/QnuMFHID2V+MHYC
 B1WFCGZPB0bn3ItGy+oBF/6H8Djz9iAmo7WD4pt25rSqDGMVRhd5vn3LhEo/p2wk
 Zs2RrQqYqr0gvklLX5CGts5WAND5Np8NGH6rAoC9HnfTSaCQucuCMi/kF3oS1m2X
 tihvXbJmbRfi/LHcKbM8Jvb+C5Hqw7BhuBohk5GExwEcrJoX2dCr7ZIjEKNr+NBI
 B2VmuPujwZjthl5CyZUlgTEYd4lko+Rq8WYfpHz6W9ZATuP1SMrMxhSHh1jWD2qT
 CHcWfyDRJ7/TVw7n90dLx8sbjKxw6cz7U9jh4hJ0ovEAeUS0MGaXxh0FzYlzGFjO
 79D+Lz4GLL1OASC79crgDM36
 =IqrO
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 DT updates for v5.6

* Align SDM845 firmware paths with linux-firmware
* Make WiFi work on Dragonboard845c
* Wire up wakeup controller for SDM845
* Critical thermal interrupt support for SDM845, MSM8996 and MSM8998
* Enable UFS for SM8150
* Add remoteproc enablers and nodes for SM8150
* Add CPUfreq for SM8150
* Add RPMH power-domain node for SM8150
* Cleanup and refactor MSM8996 dts structure
* Add initial Inforce Computing IFC6640 dts
* Increase MSM8996 core voltage
* Fix MSM8996 USB phy settings
* Add missing alias for BLSP UART in MSM8998 MTP
* Add remoteproc nodes for ADSP, modem and sensor core for MSM8998
* Enable WiFI for MSM8998
* Introduce the SC7180 platform and the IDP development board
* Add CPUfreq, QUPs, USB, remoteproc etc for SC7180
* Enable USB OTG for Dragonboard 410c
* Add vibrator motor node for PM8916
* Properly specify APCS clocks for MSM8916
* Add CPR and HFPLL for QCS404
* Enable full CPUfreq (with AVS) for QCS404

* tag 'qcom-arm64-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (88 commits)
  arm64: dts: qcom: sdm845: move gpu zap nodes to per-device dts
  arm64: dts: qcom: sm8150: Hard code rpmhpd constants
  arm64: dts: apq8096-db820c: Fix VDD core voltage
  arm64: dts: qcom: qcs404-evb: Set vdd_apc regulator in high power mode
  arm64: dts: qcom: msm8998-mtp: Add alias for blsp1_uart3
  arm64: dts: qcom: sc7180: Add critical interrupt and cooling maps for TSENS in SC7180
  arm64: dts: qcom: msm8996: Fix venus iommu nodename error
  arm64: dts: qcom: sdm845: add the ufs reset
  arm64: dts: qcom: sm8150: Fix UFS phy register size
  arm64: dts: qcom: sm8150-mtp: Add UFS gpio reset
  arm64: dts: qcom: qcs404: Add CPR and populate OPP table
  arm64: dts: qcom: qcs404: Add DVFS support
  arm64: dts: qcom: qcs404: Add the clocks for APCS mux/divider
  arm64: dts: qcom: qcs404: Add HFPLL node
  arm64: dts: qcom: msm8916: Add the clocks for the APCS mux/divider
  arm64: dts: qcom: sc7180: Add rpmh power-domain node
  arm64: dts: pm8004: Add SPMI regulator and add phandles to lsids
  arm64: dts: msm8998: thermal: Add critical interrupt support
  arm64: dts: msm8996: thermal: Add critical interrupt support
  arm64: dts: qcom: db845c: Move remoteproc firmware to sdm845
  ...

Link: https://lore.kernel.org/r/20200113204225.GB3325@yoga
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 15:44:16 -08:00
Olof Johansson
8b91bcd75a Qualcomm ARM64 defconfig updates for v5.6
* Enable NVMEM and OSM CPUfreq drivers
 * Enable CPR driver
 * Enable HFPLL driver
 * Enable ATH10k SNOC driver
 * Enable PMIC thermal driver
 * Enable wakeup controller driver
 * Enable watchdog driver
 * Enable PRNG driver
 * Enable SN65DSI86 DSI to DisplayPort bridge driver
 * Enable QCA Bluetooth driver
 * Enable Qualcomm SoCinfo driver
 * Enable SPI and QSPI drivers
 * Enable drivers providing remoteproc dependencies
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAl4czwMbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3F4zgQALbvQj9xup5hcL6MTTY1
 kZR0yGPq1VG7Qg8P3tpP9y421a90yuqglnxQaln2EPavCurnxnX9nxl8Rp9vB8SC
 sG6PPrpWegS8DVW9aSwbyKv8GXH/FtdvGQDEAZdgIEGZPN11NwsZXoA0m2x0yjoY
 lOFAc8G1+g1ueQ/YNQjJneR7k4usJzrBhtb1fI77g9rpJnzlpgKPaAW5jOSO3ywE
 lMbhFBABFRHjG1j+6gf0N6ONyY1o8Hs0xC0//y50RikhgJ34oVDMhJUXQZlFCWtR
 U4vL4on28YLis+FnPcQpaBDQVqTUyazG2H9lA3O/LTci+JyhlIgUMJf8kE7eK2Eh
 IYdlJ+REq75WaJaXyQDsYOVmK9c/cGrVuziqBTitHIT/7mRjSFhxtEQOp/4ojsrc
 vCuzqIbJqKQsBdVkRYXv/6RccxhLvi8116piiKd3ZSuMTc1unSOuPiJCNlYXOqJw
 ENZSwxYRscmzpejxb5U6dzBDIKfQY/Vq+Xu5NcaoiYgQZwZHfEadRiQzD3+jhoeY
 2tm/gfOOK7mK4AHAYLc9/YoDtpC2MHYLnWkKIShf92I1caHojUWL5EA7cYbiGDQr
 Zi1kRz47osTgrD2U6c5db7glAoT/+YFr4ATbgTtBE+WvSxdAcfFCTt3Z4YSQKq0y
 /+Y6IV12fdLK49LFuij9Fbvx
 =D6XI
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-defconfig-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig

Qualcomm ARM64 defconfig updates for v5.6

* Enable NVMEM and OSM CPUfreq drivers
* Enable CPR driver
* Enable HFPLL driver
* Enable ATH10k SNOC driver
* Enable PMIC thermal driver
* Enable wakeup controller driver
* Enable watchdog driver
* Enable PRNG driver
* Enable SN65DSI86 DSI to DisplayPort bridge driver
* Enable QCA Bluetooth driver
* Enable Qualcomm SoCinfo driver
* Enable SPI and QSPI drivers
* Enable drivers providing remoteproc dependencies

* tag 'qcom-arm64-defconfig-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM
  arm64: defconfig: enable CONFIG_QCOM_CPR
  arm64: defconfig: Enable HFPLL
  arm64: defconfig: Enable ATH10K_SNOC
  arm64: defconfig: Enable QCOM PMIC thermal
  arm64: defconfig: enable PDC interrupt controller for Qualcomm SDM845
  arm64: defconfig: Enable Qualcomm watchdog driver
  arm64: defconfig: Enable Qualcomm pseudo rng
  arm64: defconfig: Enable SN65DSI86 display bridge
  arm64: defconfig: Enable QCA Bluetooth over UART
  arm64: defconfig: Enable Qualcomm CPUfreq HW driver
  arm64: defconfig: Enable Qualcomm socinfo driver
  arm64: defconfig: Enable Qualcomm SPI and QSPI controller
  arm64: defconfig: Enable Qualcomm remoteproc dependencies

Link: https://lore.kernel.org/r/20200113204130.GA3325@yoga
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 14:10:23 -08:00
Olof Johansson
2db34041dc mt8173:
- add dynamic power coefficient to the cpu clusters
 - add jpeg decoder node
 
 mt8183:
 - add node for the Global Command Engine (gce)
 - add reset cells to the infracfg node
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAl4cP5cXHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH533xAAsao67Z0BufI61tGGaMZGckSG
 dQC7QuhHr5z6FGqt8WBez0HZ/qeJTvrDQQnpjwqUdjOw7ksCpSu1kUPU57cVwKPH
 CGwDBBFLLGRawzeeNOoDovoP62nx1yUSzJTHxtrhQUMcfumVPRAQDr/lgiAPqtzw
 DnAXKeBXsbDbdyz0eiNviRLUOOgRtHtChcvs7G7jKKqcvmDQi3lw+tKOz9SBbUo6
 tqCPhOUtdUBoOGffR7zthWMXMr6OfA1leMt8ES9KMS3lfzhoRBWgF5UvgMo3DNAZ
 UvDKDQzBHVceB2L/V3htFTsMoXQ57PyNYWXS10lFP5FrhQcMBTGE7oysxQthQz2I
 cttTVUigCD5lh0Y1zo/q8S0bSTo5Q8OMtq3lt8j9SAmx6T0RKw5QIjo2rSQ50hBZ
 NLRlBGnbywV5SknN3iQz4i8EkixLogFbEm9oM79HVR/RfO0Ubf4clYELWKXaq5Vj
 1nQpOZj8J2uHwnlFTVufWzVfuAUTMsWQTZnDvGxVKs7LC2zzQweD35UxxFu86U9m
 CbQ3Q3Qt11cazlRg4cJz3lNe8NivYC5+QYw0NTfmLDu/dinxo8dpUC4GMOjM9hoF
 n4mY66KCIw+N3oqOEpuBR+AiTSSEJMbRRurkGcpnh2fKU00NkZFgipIfv2Re+NTQ
 pB1qzAeaiheV0vsenpE=
 =d7+O
 -----END PGP SIGNATURE-----

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

mt8173:
- add dynamic power coefficient to the cpu clusters
- add jpeg decoder node

mt8183:
- add node for the Global Command Engine (gce)
- add reset cells to the infracfg node

* tag 'v5.5-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  arm64: dts: mt8183: add reset-cells in infracfg
  arm64: dts: mt8173: add Mediatek JPEG Codec
  arm64: dts: add gce node for mt8183
  arm64: dts: mt8173: Add dynamic power node.

Link: https://lore.kernel.org/r/46c1a244-3f74-8069-6600-8ced02775677@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 12:49:35 -08:00
Olof Johansson
7d6292ab11 This is our usual set of DT patches for the Allwinner SoCs.
It's fairly big this time, but the highlights are:
   - Enable cpufreq and CPU thermal throttling on the A64
     - CLK_CPUX macro usage removed (changed from first pull request)
   - CSI0 support on the R40
   - CSI1 support on the A10 and A20
   - SPI support on the R40
   - PMU support on the H3, H5, H6 and R40
   - MIPI-DSI support on the A64
   - PWM support on the H6
   - Thermal sensor on the A64, A83t, H3, H5, H6 and R40
   - More DT schemas fixes and conversions
   - New boards: LibreComputer ALL-H5-CC H5, LibreComputer ALL-H3-IT H5,
                 Pine64 H64 Model B, Neutis N5H3
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCgAsFiEE2nN1m/hhnkhOWjtHOJpUIZwPJDAFAl4cOHUOHHdlbnNAY3Np
 ZS5vcmcACgkQOJpUIZwPJDDMaw/8CYesTIYwsaPQpW6GnAe8lsB8qtOdIj2xhlzp
 Qf3INpkH9lBl718lkwsOnVuQP8pJ75gp5J9yFNVuhSXTpWjpEJyKdiTa1e7TiZMj
 LS7pKerFy7anZuL2bpgPAFHVyfokvnn8OGEc5tfHX0XJ8hQC+FnkzXpsxz7vYdP2
 oxokLZNY/AeuTyPUG5/6KMkH2UJMlK9YRN7p/jPEKFXGlFy4bY9HKaIr3SxMMC7B
 NwxYfFPdFVqODnHfWQq9TjXhPVXzHDg1B2bJT6yC1hjpNmDmqDZ6U8mj8v8aZy/u
 x8WdUZbFALJeqL3J2ejsWbGsgwG3eMLOZVFIw9JEPgmqWE00pVnndu70P8hI3ZL0
 7clq33b+EDjAf5B5oXUJPLdaW6DonWXHrBMbC1PaHwrPVZV+qZtoquAVwTR/WDk6
 hnahfOGPB52y/OmxbrognU1dJwpHtVqgjvYjLMhXQoa4WaAS+fN7OBEDiYqC03Ty
 Rsxd8iNaVnDVBovWbcnSpE9qG6i7hi9iZlt5LJJGalNxrs9RQ6ncDheyQtHS0TIl
 BkwNkPMLy14mbLfiU3CvyDNZVgBIBaltsCVD0N6b5vZraizga4F4rS3FvoMR0JAJ
 1bYXR7S53ga53k9t/VyVAEhoJt+5Bzy9WBbjLlL3IgT08K4N7dN/Y0cKKHt8Q7zx
 QphJaBs=
 =1h4A
 -----END PGP SIGNATURE-----

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

This is our usual set of DT patches for the Allwinner SoCs.

It's fairly big this time, but the highlights are:
  - Enable cpufreq and CPU thermal throttling on the A64
    - CLK_CPUX macro usage removed (changed from first pull request)
  - CSI0 support on the R40
  - CSI1 support on the A10 and A20
  - SPI support on the R40
  - PMU support on the H3, H5, H6 and R40
  - MIPI-DSI support on the A64
  - PWM support on the H6
  - Thermal sensor on the A64, A83t, H3, H5, H6 and R40
  - More DT schemas fixes and conversions
  - New boards: LibreComputer ALL-H5-CC H5, LibreComputer ALL-H3-IT H5,
                Pine64 H64 Model B, Neutis N5H3

* tag 'sunxi-dt-for-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (52 commits)
  arm64: dts: allwinner: a64: enable DVFS
  arm64: dts: allwinner: a64: add dtsi with CPU operating points
  arm64: dts: allwinner: a64: add cooling maps and thermal tripping points
  arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes
  arm64: dts: allwinner: sun50i-a64: Use macros for newly exported clocks
  ARM: dts: sunxi: Use macros for references to CCU clocks
  arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-CC H5 board
  ARM: dts: sun8i: R40: Add SPI controllers nodes and pinmuxes
  arm64: dts: allwinner: a64: pinebook: Fix lid wakeup
  ARM: dts: sun8i: r40: Add device node for CSI0
  ARM: dts: sun7i: Add CSI1 controller and pinmux options
  ARM: dts: sun4i: Add CSI1 controller and pinmux options
  ARM: dts: sunxi: Add missing LVDS resets and clocks
  ARM: dts: sun8i: r40: Use tcon top clock index macros
  ARM: dts: sun8i: R40: Add PMU node
  ARM: dts: sun8i: R40: Upgrade GICC reg size to 8K
  arm64: dts: allwinner: h6: Add thermal sensor and thermal zones
  ARM: dts: sunxi: Add Libre Computer ALL-H3-IT H5 board
  arm64: dts: allwinner: a64: Add MIPI DSI pipeline
  arm64: dts: allwinner: a64: Add thermal sensors and thermal zones
  ...

Link: https://lore.kernel.org/r/20200113095555.GA29848@wens.csie.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 12:48:52 -08:00
Olof Johansson
59abae1ad9 i.MX defconfig update for 5.6:
- Enable i.MX8MP clock driver in arm64 defconfig.
  - Enable Crypto CAAM driver support as module in arm64 defconfig.
  - Enable ILI210X touch driver, USB CDC ACM function, NFS_V4 support and
    TFP410 DVI bridge driver support in arm32 imx_v6_v7_defconfig.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAl4b4oUUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM7iqQgAm/j9aO61exErck4aI9+krqrLnF3w
 eWgrrovPEwSARQo69bTAGK5GYjaZ4yGlDiH3Qk6TS5pvcRsEjaxsu/Ym/KVDtOBM
 iiLD9MbI7w8Nd5pe4jBkCHF6ZOEWbMvzwc8zStM/RwTVvwajdkW/p1If4RQGEqmM
 ZcMgXLcQneqWAbCsFDziAwsf6kfOhOghW3CNQ63GuGZc4UFRv8j056mBlG8PDeLL
 4UbT+rI1xwwatNg9a2/E0HfA3Z4eJg1YbjMTrEx4NDkDel2Sz9GuVxJIY1+/lDKs
 DCw4n1Fzfn4nxR8Eak7foQPY27VLgDqa6zM06QYhQXE3wWt2HumxJNQkmQ==
 =H+6R
 -----END PGP SIGNATURE-----

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

i.MX defconfig update for 5.6:

 - Enable i.MX8MP clock driver in arm64 defconfig.
 - Enable Crypto CAAM driver support as module in arm64 defconfig.
 - Enable ILI210X touch driver, USB CDC ACM function, NFS_V4 support and
   TFP410 DVI bridge driver support in arm32 imx_v6_v7_defconfig.

* tag 'imx-defconfig-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: defconfig: Enable CONFIG_CLK_IMX8MP by default
  arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
  ARM: imx_v6_v7_defconfig: Select the TFP410 driver
  ARM: imx_v6_v7_defconfig: Enable NFS_V4_1 and NFS_V4_2 support
  ARM: configs: imx_v6_v7_defconfig: enable USB ACM
  ARM: imx_v6_v7_defconfig: Enable TOUCHSCREEN_ILI210X

Link: https://lore.kernel.org/r/20200113034006.17430-6-shawnguo@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 10:49:44 -08:00
Olof Johansson
87f846c773 i.MX arm64 device tree update for 5.6:
- New board support: i.MX8MQ based Thor96 board, Google i.MX8MQ Phanbell
    board, LX2160A based Solidrun Clearfog CX and Honeycomb boards.
  - Add eLCDIF controller and missing SAI nodes for i.MX8MQ SoC.
  - Add Crypto CAAM support for i.MX8MM and i.MX8MN.
  - Drop unneeded "simple-bus" from anatop node on i.MX8MM and i.MX8MN.
  - Drop unused/undocumented "fsl,aips-bus" and "fsl,imx8mq-aips-bus"
    compatibles from i.MX8M SoCs.
  - Add DDR controller nodes for i.MX8M devices.
  - Add EEPROM description for imx8mq-hummingboard-pulse and
    imx8mq-sr-som boards.
  - Enable USB1 and TypeC support for imx8mn-evk board.
  - Add FlexSPI and QSPI support for a few Layerscape SoCs and boards.
  - Add External MDIO1 node and the two RGMII PHYs connected on LX2160A.
  - Add missing SAI devices and set SAIs into async mode on LS1028A.
  - Other random device additions and enhancement for various platforms.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAl4b4EYUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM6Iwwf/ZqkWN7e4Am8MFMbw4aJ4WLMes1M5
 pHWEl/vxLmOdrzY45pyLjxarkXlzEE/Q4iS0/k9g4FSjj2BCOzFjlJAskTPGF7Jh
 YL02N32xPpsWHxJ04wX+VqZYrNkPH3ywpfgfOQzW9JWIs/Jz0PGB65SuniuHuhdr
 Y1twDz1sVLVdMpp6dlfPtMFxRMydvjkvlXrk7HzFuyGbxeJnGzhWa4rUlVcQoKwm
 +v/Hcn7B2CQgBzFgRQJUXEPntWFVPSB7c1nlx3iH4HHwGi14k5QbAfn6xBLyOwXQ
 QN3MCpY4n2ankaJ5D3zBQ5kCt17EOGUOLaW4VC5RpSUKhafSZV4din8cWA==
 =JSDg
 -----END PGP SIGNATURE-----

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

i.MX arm64 device tree update for 5.6:

 - New board support: i.MX8MQ based Thor96 board, Google i.MX8MQ Phanbell
   board, LX2160A based Solidrun Clearfog CX and Honeycomb boards.
 - Add eLCDIF controller and missing SAI nodes for i.MX8MQ SoC.
 - Add Crypto CAAM support for i.MX8MM and i.MX8MN.
 - Drop unneeded "simple-bus" from anatop node on i.MX8MM and i.MX8MN.
 - Drop unused/undocumented "fsl,aips-bus" and "fsl,imx8mq-aips-bus"
   compatibles from i.MX8M SoCs.
 - Add DDR controller nodes for i.MX8M devices.
 - Add EEPROM description for imx8mq-hummingboard-pulse and
   imx8mq-sr-som boards.
 - Enable USB1 and TypeC support for imx8mn-evk board.
 - Add FlexSPI and QSPI support for a few Layerscape SoCs and boards.
 - Add External MDIO1 node and the two RGMII PHYs connected on LX2160A.
 - Add missing SAI devices and set SAIs into async mode on LS1028A.
 - Other random device additions and enhancement for various platforms.

* tag 'imx-dt64-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (35 commits)
  arm64: dts: imx8mn: Memory node should be in board DT
  arm64: dts: imx8mm: Memory node should be in board DT
  arm64: dts: imx8mn: add crypto node
  arm64: dts: imx8mq-hummingboard-pulse: add eeprom description
  arm64: dts: imx8mq-sr-som: add eeprom description
  arm64: dts: ls208xa: Update qspi node properties for LS2088ARDB
  arm64: dts: freescale: Add devicetree support for Thor96 board
  arm64: dts: imx8mq-librem5-devkit: add accelerometer and gyro sensor
  arm64: dts: imx8mm: Add Crypto CAAM support
  arm64: dts: freescale: add initial support for Google i.MX 8MQ Phanbell
  arm64: dts: ls1028a-rdb: enable emmc hs400 mode
  arm64: dts: ls1028a: Update edma compatible to fit eDMA driver
  arm64: dts: imx8m: drop "fsl,aips-bus" and "fsl,imx8mq-aips-bus"
  arm64: dts: imx8mm: Add missing mux options for UART1 and UART2 signals
  arm64: dts: lx2160a: add dts for CEX7 platforms
  arm64: dts: lx2160a: add emdio2 node
  arm64: dts: ls1028a: put SAIs into async mode
  arm64: dts: ls1028a: add missing sai nodes
  arm64: dts: imx8mn-evk: enable usb1 and typec support
  arm64: dts: imx8mn: Remove setting for IMX8MN_CLK_USB_CORE_REF
  ...

Link: https://lore.kernel.org/r/20200113034006.17430-5-shawnguo@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 10:49:27 -08:00
Olof Johansson
7f1f5ac4dc mvebu dt64 for 5.6 (part 1)
micro-DPU (uDPU) board changes (Armada 3270 based board):
  - Fix broken ethernet
  - Remove i2c-fast-mode property
  - Indicate that SFP cages support 3W modules
  SolidRun Clearfog GT 8K (Armada 8040 base board):
  - Fix switch cpu port node
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCXhoDpgAKCRALBhiOFHI7
 1ZEvAJ9vBYDraVE2i3d/XaKSU9uzb6PphACffuUjeJSuIp3fks/GERizhSJ6hec=
 =nLtK
 -----END PGP SIGNATURE-----

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

mvebu dt64 for 5.6 (part 1)

 micro-DPU (uDPU) board changes (Armada 3270 based board):
 - Fix broken ethernet
 - Remove i2c-fast-mode property
 - Indicate that SFP cages support 3W modules
 SolidRun Clearfog GT 8K (Armada 8040 base board):
 - Fix switch cpu port node

* tag 'mvebu-dt64-5.6-1' of git://git.infradead.org/linux-mvebu:
  arm64: dts: marvell: clearfog-gt-8k: fix switch cpu port node
  arm64: dts: uDPU: SFP cages support 3W modules
  arm64: dts: uDPU: remove i2c-fast-mode
  arm64: dts: uDPU: fix broken ethernet

Link: https://lore.kernel.org/r/871rs53nu5.fsf@FE-laptop
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 10:46:53 -08:00
Olof Johansson
7aeff9cbbb arm64: tegra: Default configuration updates for v5.6-rc1
This enables the USB GPIO connector and Tegra XUDC drivers in the
 default configuration.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl4ZHEkTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoRhqD/9RAWM2eiNwIvWMZO9QBWK2GTUu90Ri
 mUo0tpNY63W6GwVLzISr3ASWeDZIicfCpjuB0+mHFV4A0SHvjeTrvGnf3H2jMHxz
 jEX7FrIEdAB3QNSsK/3RD98Ewo7yHKvqX5YMfIapdDQRzwMWS3N+Qjuv21T6kv45
 qADpeVZYYmRpyscgJ5kVK6FfZ08lm4nXF7yqkmLkP8BNX+BWWrbtfjnanqHPCNRm
 Jx6qkcPDqdYbSRAtyljEGNBgXiv5qg4EX97Rh2zqEzmPqvX+ogmYN/Ypc1zbMlHI
 gEY0fbo/Ig7BqTPsrYwugNjqhbYSwHJBurSuzwHCfMtGZzM45KtZvRDSPGYbXnLe
 u5oav6NfdzYhYdAAS8ZkE61lt+4NifR7OUvN70yEeahXs6g/38REHO8EOWQac34Y
 XEVOmwge8+h9K6zZCZ0jez6TH1KXS8AKznjIhTHP7UY1YDA892zmlSV89iyRCj3N
 WqbnYtjGAeRtf9O2og0n9hUtMDDzkhTYtVVyG84Jej1KfpEjRbqwIAYQWCznevMX
 dMd2rnwp0Fr9DjKrYFkwWHCZrvzhUUic/H/W327ea/o8z98e/LMn5FyV6Hd1Zycy
 VyHEgeKrjhFSrjQyJ7CFjQlKr0F2ITiwgSGADTSwJSUzds9hiocBjK48n55Srb7y
 /IGkFd10+vaGew==
 =RP5m
 -----END PGP SIGNATURE-----

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

arm64: tegra: Default configuration updates for v5.6-rc1

This enables the USB GPIO connector and Tegra XUDC drivers in the
default configuration.

* tag 'tegra-for-5.6-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: defconfig: Enable tegra XUDC support

Link: https://lore.kernel.org/r/20200111005526.2413959-1-thierry.reding@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 10:43:53 -08:00
Olof Johansson
84c2f68ed2 arm64: tegra: Device tree changes for v5.6-rc1
These patches do some cleanup to existing nodes, add the memory
 subsystem on Tegra186 and Tegra194 as well as the FUSE and APB MISC
 nodes on Tegra194. There are also a few additions to the Jetson Nano
 device tree to enable additional features and the force recovery
 button on the Jetson AGX Xavier now produces a key code that is
 actually valid. Finally, an alias is added for the Ethernet card on
 Jetson TX2 to allow firmware to find it and pass a MAC address via
 device tree.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl4ZDLsTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoR8cD/9AgTo0ulXiVk42XR+jlL3yklAm7jPC
 XG5k8VS19YgRTHW/HosicWq36jBqs47PlMGG3rJdtaFYIbXNQFbgK/bEYxAmVCAC
 n9T00H/VfV0NsKnt30eo43eOqdFY+L1k07nrcGv/H+VQRCh6LzkZAYBp7NQDX7WS
 X0LMOY7sLeHxakKfrlSiAKlJHRmEg2XmkrfBLYvht9pEWCO/SdXxIKtUNMzILtdB
 dJfiCuMBAahVIufhWTF9MlNAJ1VDWeza+0r2mzIjwXoYgvQy1kJLy+p7iYSfT48w
 oM5PWn0ABUEG8v7GUCUdABOAvJ2rw//yYoUinQ7pE4eAiNgKN+2qvz3gbmUR0kdZ
 NuTtS1IAApwMgtQWd6CCjT29LVAM/7erwBqMY1QLXGCzqL41iDny48tnG/tH8zJR
 gx8UAKeG7pTM6k627vSFGAbVMUmzdyejgoqmbM9XFQrM3KCxgDxxFFqMS80p9FD2
 Y8JfMw8AxR1KehDQvElJ8T7sGTwQwcIOkWohxHM2wyyy6urNNSSNBaJzTsM+AHFZ
 j8UQoeRVl2wvkqen/prW67nEqHdXvq97bK1SxQ3mzTHwmuwntPaWHmR/7lyIZbXD
 /CNyAuo3GibeuCeCMKOC+n+bEaEd9Y20emuqIAI0ptJ1lZVMaKXkd1M5gr+DcQWG
 S3b0/dh3BlGfvw==
 =lD4r
 -----END PGP SIGNATURE-----

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

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

These patches do some cleanup to existing nodes, add the memory
subsystem on Tegra186 and Tegra194 as well as the FUSE and APB MISC
nodes on Tegra194. There are also a few additions to the Jetson Nano
device tree to enable additional features and the force recovery
button on the Jetson AGX Xavier now produces a key code that is
actually valid. Finally, an alias is added for the Ethernet card on
Jetson TX2 to allow firmware to find it and pass a MAC address via
device tree.

* tag 'tegra-for-5.6-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: tegra: Allow bootloader to configure Ethernet MAC on Jetson TX2
  arm64: tegra: Redefine force recovery key on Jetson AGX Xavier
  arm64: tegra: Enable SDIO on Jetson Nano M.2 Key E
  arm64: tegra: Enable PWM fan on Jetson Nano
  arm64: tegra: Add fuse/apbmisc node on Tegra194
  arm64: tegra: Make XUSB node consistent with the rest
  arm64: tegra: Add the memory subsystem on Tegra194
  arm64: tegra: Add external memory controller on Tegra186
  arm64: tegra: Add interrupt for memory controller on Tegra186
  arm64: tegra: Rename EMC on Tegra132
  arm64: tegra: Let the EMC hardware use the EMC clock

Link: https://lore.kernel.org/r/20200111003553.2411874-7-thierry.reding@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-16 10:43:19 -08:00
Ard Biesheuvel
500d14affd arm64: kernel: avoid x18 in __cpu_soft_restart
The code in __cpu_soft_restart() uses x18 as an arbitrary temp register,
which will shortly be disallowed. So use x8 instead.

Link: https://patchwork.kernel.org/patch/9836877/
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
[Sami: updated commit message]
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 17:32:56 +00:00
Ard Biesheuvel
af12376814 arm64: kvm: stop treating register x18 as caller save
In preparation of reserving x18, stop treating it as caller save in
the KVM guest entry/exit code. Currently, the code assumes there is
no need to preserve it for the host, given that it would have been
assumed clobbered anyway by the function call to __guest_enter().
Instead, preserve its value and restore it upon return.

Link: https://patchwork.kernel.org/patch/9836891/
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
[Sami: updated commit message, switched from x18 to x29 for the guest context]
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 17:32:56 +00:00
Ard Biesheuvel
7f153ccb9b arm64/lib: copy_page: avoid x18 register in assembler code
Register x18 will no longer be used as a caller save register in the
future, so stop using it in the copy_page() code.

Link: https://patchwork.kernel.org/patch/9836869/
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
[Sami: changed the offset and bias to be explicit]
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 17:32:56 +00:00
Sami Tolvanen
e3ec6582d1 arm64: mm: avoid x18 in idmap_kpti_install_ng_mappings
idmap_kpti_install_ng_mappings uses x18 as a temporary register, which
will result in a conflict when x18 is reserved. Use x16 and x17 instead
where needed.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 17:32:56 +00:00
Sami Tolvanen
c54f90c262 arm64: fix alternatives with LLVM's integrated assembler
LLVM's integrated assembler fails with the following error when
building KVM:

  <inline asm>:12:6: error: expected absolute expression
   .if kvm_update_va_mask == 0
       ^
  <inline asm>:21:6: error: expected absolute expression
   .if kvm_update_va_mask == 0
       ^
  <inline asm>:24:2: error: unrecognized instruction mnemonic
          NOT_AN_INSTRUCTION
          ^
  LLVM ERROR: Error parsing inline asm

These errors come from ALTERNATIVE_CB and __ALTERNATIVE_CFG,
which test for the existence of the callback parameter in inline
assembly using the following expression:

  " .if " __stringify(cb) " == 0\n"

This works with GNU as, but isn't supported by LLVM. This change
splits __ALTERNATIVE_CFG and ALTINSTR_ENTRY into separate macros
to fix the LLVM build.

Link: https://github.com/ClangBuiltLinux/linux/issues/472
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 17:32:34 +00:00
Sami Tolvanen
e0d5896bd3 arm64: lse: fix LSE atomics with LLVM's integrated assembler
Unlike gcc, clang considers each inline assembly block to be independent
and therefore, when using the integrated assembler for inline assembly,
any preambles that enable features must be repeated in each block.

This change defines __LSE_PREAMBLE and adds it to each inline assembly
block that has LSE instructions, which allows them to be compiled also
with clang's assembler.

Link: https://github.com/ClangBuiltLinux/linux/issues/671
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Andrew Murray <andrew.murray@arm.com>
Tested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 17:25:10 +00:00
Nicolas Saenz Julienne
03077ad5c0 arm64: defconfig: Enable Broadcom's STB PCIe controller
For now mainly used in the Raspberry Pi 4.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2020-01-16 09:18:29 -08:00
Robin Murphy
5777eaed56 arm64: Implement optimised checksum routine
Apparently there exist certain workloads which rely heavily on software
checksumming, for which the generic do_csum() implementation becomes a
significant bottleneck. Therefore let's give arm64 its own optimised
version - for ease of maintenance this foregoes assembly or intrisics,
and is thus not actually arm64-specific, but does rely heavily on C
idioms that translate well to the A64 ISA and the typical load/store
capabilities of most ARMv8 CPU cores.

The resulting increase in checksum throughput scales nicely with buffer
size, tending towards 4x for a small in-order core (Cortex-A53), and up
to 6x or more for an aggressive big core (Ampere eMAG).

Reported-by: Lingyan Huang <huanglingyan2@huawei.com>
Tested-by: Lingyan Huang <huanglingyan2@huawei.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 15:23:29 +00:00
Vladimir Murzin
f88f42f853 arm64: context: Free up kernel ASIDs if KPTI is not in use
We can extend user ASID space if it turns out that system does not
require KPTI. We start with kernel ASIDs reserved because CPU caps are
not finalized yet and free them up lazily on the next rollover if we
confirm than KPTI is not in use.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 12:45:05 +00:00
Steven Price
275fa0ea2c arm64: Workaround for Cortex-A55 erratum 1530923
Cortex-A55 erratum 1530923 allows TLB entries to be allocated as a
result of a speculative AT instruction. This may happen in the middle of
a guest world switch while the relevant VMSA configuration is in an
inconsistent state, leading to erroneous content being allocated into
TLBs.

The same workaround as is used for Cortex-A76 erratum 1165522
(WORKAROUND_SPECULATIVE_AT_VHE) can be used here. Note that this
mandates the use of VHE on affected parts.

Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 10:44:14 +00:00
Steven Price
db0d46a58d arm64: Rename WORKAROUND_1319367 to SPECULATIVE_AT_NVHE
To match SPECULATIVE_AT_VHE let's also have a generic name for the NVHE
variant.

Acked-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 10:44:11 +00:00
Steven Price
e85d68faed arm64: Rename WORKAROUND_1165522 to SPECULATIVE_AT_VHE
Cortex-A55 is affected by a similar erratum, so rename the existing
workaround for errarum 1165522 so it can be used for both errata.

Acked-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-16 10:43:53 +00:00
Jason A. Donenfeld
31899908a0 crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit
This appears to be some kind of copy and paste error, and is actually
dead code.

Pre: f = 0 ⇒ (f >> 32) = 0
    f = (f >> 32) + le32_to_cpu(digest[0]);
Post: 0 ≤ f < 2³²
    put_unaligned_le32(f, dst);

Pre: 0 ≤ f < 2³² ⇒ (f >> 32) = 0
    f = (f >> 32) + le32_to_cpu(digest[1]);
Post: 0 ≤ f < 2³²
    put_unaligned_le32(f, dst + 4);

Pre: 0 ≤ f < 2³² ⇒ (f >> 32) = 0
    f = (f >> 32) + le32_to_cpu(digest[2]);
Post: 0 ≤ f < 2³²
    put_unaligned_le32(f, dst + 8);

Pre: 0 ≤ f < 2³² ⇒ (f >> 32) = 0
    f = (f >> 32) + le32_to_cpu(digest[3]);
Post: 0 ≤ f < 2³²
    put_unaligned_le32(f, dst + 12);

Therefore this sequence is redundant. And Andy's code appears to handle
misalignment acceptably.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Tested-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-01-16 15:18:12 +08:00
Will Deacon
a569f5f372 arm64: Use register field helper in kaslr_requires_kpti()
Rather than open-code the extraction of the E0PD field from the MMFR2
register, we can use the cpuid_feature_extract_unsigned_field() helper
instead.

Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 16:49:48 +00:00
Will Deacon
ebac96ede6 arm64: Simplify early check for broken TX1 when KASLR is enabled
Now that the decision to use non-global mappings is stored in a variable,
the check to avoid enabling them for the terminally broken ThunderX1
platform can be simplified so that it is only keyed off the MIDR value.

Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 16:49:27 +00:00
Vladimir Murzin
8bf9284d99 arm64: Turn "broken gas inst" into real config option
Use the new 'as-instr' Kconfig macro to define CONFIG_BROKEN_GAS_INST
directly, making it available everywhere.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
[will: Drop redundant 'y if' logic]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 16:35:12 +00:00
Mark Brown
09e3c22a86 arm64: Use a variable to store non-global mappings decision
Refactor the code which checks to see if we need to use non-global
mappings to use a variable instead of checking with the CPU capabilities
each time, doing the initial check for KPTI early in boot before we
start allocating memory so we still avoid transitioning to non-global
mappings in common cases.

Since this variable always matches our decision about non-global
mappings this means we can also combine arm64_kernel_use_ng_mappings()
and arm64_unmap_kernel_at_el0() into a single function, the variable
simply stores the result and the decision code is elsewhere. We could
just have the users check the variable directly but having a function
makes it clear that these uses are read-only.

The result is that we simplify the code a bit and reduces the amount of
code executed at runtime.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 14:11:18 +00:00
Mark Brown
92ac6fd162 arm64: Don't use KPTI where we have E0PD
Since E0PD is intended to fulfil the same role as KPTI we don't need to
use KPTI on CPUs where E0PD is available, we can rely on E0PD instead.
Change the check that forces KPTI on when KASLR is enabled to check for
E0PD before doing so, CPUs with E0PD are not expected to be affected by
meltdown so should not need to enable KPTI for other reasons.

Since E0PD is a system capability we will still enable KPTI if any of
the CPUs in the system lacks E0PD, this will rewrite any global mappings
that were established in systems where some but not all CPUs support
E0PD.  We may transiently have a mix of global and non-global mappings
while booting since we use the local CPU when deciding if KPTI will be
required prior to completing CPU enumeration but any global mappings
will be converted to non-global ones when KPTI is applied.

KPTI can still be forced on from the command line if required.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 14:11:17 +00:00
Mark Brown
c2d92353b2 arm64: Factor out checks for KASLR in KPTI code into separate function
In preparation for integrating E0PD support with KASLR factor out the
checks for interaction between KASLR and KPTI done in boot context into
a new function kaslr_requires_kpti(), in the process clarifying the
distinction between what we do in boot context and what we do at
runtime.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 14:11:17 +00:00
Mark Brown
3e6c69a058 arm64: Add initial support for E0PD
Kernel Page Table Isolation (KPTI) is used to mitigate some speculation
based security issues by ensuring that the kernel is not mapped when
userspace is running but this approach is expensive and is incompatible
with SPE.  E0PD, introduced in the ARMv8.5 extensions, provides an
alternative to this which ensures that accesses from userspace to the
kernel's half of the memory map to always fault with constant time,
preventing timing attacks without requiring constant unmapping and
remapping or preventing legitimate accesses.

Currently this feature will only be enabled if all CPUs in the system
support E0PD, if some CPUs do not support the feature at boot time then
the feature will not be enabled and in the unlikely event that a late
CPU is the first CPU to lack the feature then we will reject that CPU.

This initial patch does not yet integrate with KPTI, this will be dealt
with in followup patches.  Ideally we could ensure that by default we
don't use KPTI on CPUs where E0PD is present.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
[will: Fixed typo in Kconfig text]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 14:11:02 +00:00
Catalin Marinas
395af86137 arm64: Move the LSE gas support detection to Kconfig
As the Kconfig syntax gained support for $(as-instr) tests, move the LSE
gas support detection from Makefile to the main arm64 Kconfig and remove
the additional CONFIG_AS_LSE definition and check.

Cc: Will Deacon <will@kernel.org>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 12:50:48 +00:00
Anshuman Khandual
8e3747beff arm64: Introduce ID_ISAR6 CPU register
This adds basic building blocks required for ID_ISAR6 CPU register which
identifies support for various instruction implementation on AArch32 state.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-kernel@vger.kernel.org
Cc: kvmarm@lists.cs.columbia.edu
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
[will: Ensure SPECRES is treated the same as on A64]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 11:13:27 +00:00
Steven Price
d4209d8b71 arm64: cpufeature: Export matrix and other features to userspace
Export the features introduced as part of ARMv8.6 exposed in the
ID_AA64ISAR1_EL1 and ID_AA64ZFR0_EL1 registers. This introduces the
Matrix features (ARMv8.2-I8MM, ARMv8.2-F64MM and ARMv8.2-F32MM) along
with BFloat16 (Armv8.2-BF16), speculation invalidation (SPECRES) and
Data Gathering Hint (ARMv8.0-DGH).

Signed-off-by: Julien Grall <julien.grall@arm.com>
[Added other features in those registers]
Signed-off-by: Steven Price <steven.price@arm.com>
[will: Don't advertise SPECRES to userspace]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 11:13:07 +00:00
Suzuki K Poulose
52f73c383b arm64: nofpsmid: Handle TIF_FOREIGN_FPSTATE flag cleanly
We detect the absence of FP/SIMD after an incapable CPU is brought up,
and by then we have kernel threads running already with TIF_FOREIGN_FPSTATE set
which could be set for early userspace applications (e.g, modprobe triggered
from initramfs) and init. This could cause the applications to loop forever in
do_nofity_resume() as we never clear the TIF flag, once we now know that
we don't support FP.

Fix this by making sure that we clear the TIF_FOREIGN_FPSTATE flag
for tasks which may have them set, as we would have done in the normal
case, but avoiding touching the hardware state (since we don't support any).

Also to make sure we handle the cases seemlessly we categorise the
helper functions to two :
 1) Helpers for common core code, which calls into take appropriate
    actions without knowing the current FPSIMD state of the CPU/task.

    e.g fpsimd_restore_current_state(), fpsimd_flush_task_state(),
        fpsimd_save_and_flush_cpu_state().

    We bail out early for these functions, taking any appropriate actions
    (e.g, clearing the TIF flag) where necessary to hide the handling
    from core code.

 2) Helpers used when the presence of FP/SIMD is apparent.
    i.e, save/restore the FP/SIMD register state, modify the CPU/task
    FP/SIMD state.
    e.g,

    fpsimd_save(), task_fpsimd_load() - save/restore task FP/SIMD registers

    fpsimd_bind_task_to_cpu()  \
                                - Update the "state" metadata for CPU/task.
    fpsimd_bind_state_to_cpu() /

    fpsimd_update_current_state() - Update the fp/simd state for the current
                                    task from memory.

    These must not be called in the absence of FP/SIMD. Put in a WARNING
    to make sure they are not invoked in the absence of FP/SIMD.

KVM also uses the TIF_FOREIGN_FPSTATE flag to manage the FP/SIMD state
on the CPU. However, without FP/SIMD support we trap all accesses and
inject undefined instruction. Thus we should never "load" guest state.
Add a sanity check to make sure this is valid.

Fixes: 82e0191a1a ("arm64: Support systems without FP/ASIMD")
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-14 17:11:53 +00:00
Suzuki K Poulose
6d502b6ba1 arm64: signal: nofpsimd: Handle fp/simd context for signal frames
Make sure we try to save/restore the vfp/fpsimd context for signal
handling only when the fp/simd support is available. Otherwise, skip
the frames.

Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-14 17:11:46 +00:00
Suzuki K Poulose
c9d66999f0 arm64: ptrace: nofpsimd: Fail FP/SIMD regset operations
When fp/simd is not supported on the system, fail the operations
of FP/SIMD regsets.

Fixes: 82e0191a1a ("arm64: Support systems without FP/ASIMD")
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-14 17:11:39 +00:00
Suzuki K Poulose
7559950aef arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly
We set the compat_elf_hwcap bits unconditionally on arm64 to
include the VFP and NEON support. However, the FP/SIMD unit
is optional on Arm v8 and thus could be missing. We already
handle this properly in the kernel, but still advertise to
the COMPAT applications that the VFP is available. Fix this
to make sure we only advertise when we really have them.

Fixes: 82e0191a1a ("arm64: Support systems without FP/ASIMD")
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-14 17:11:36 +00:00
Suzuki K Poulose
449443c03d arm64: cpufeature: Fix the type of no FP/SIMD capability
The NO_FPSIMD capability is defined with scope SYSTEM, which implies
that the "absence" of FP/SIMD on at least one CPU is detected only
after all the SMP CPUs are brought up. However, we use the status
of this capability for every context switch. So, let us change
the scope to LOCAL_CPU to allow the detection of this capability
as and when the first CPU without FP is brought up.

Also, the current type allows hotplugged CPU to be brought up without
FP/SIMD when all the current CPUs have FP/SIMD and we have the userspace
up. Fix both of these issues by changing the capability to
BOOT_RESTRICTED_LOCAL_CPU_FEATURE.

Fixes: 82e0191a1a ("arm64: Support systems without FP/ASIMD")
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-14 17:11:31 +00:00
Suzuki K Poulose
0cd82feb01 arm64: fpsimd: Make sure SVE setup is complete before SIMD is used
In-kernel users of NEON rely on may_use_simd() to check if the SIMD
can be used. However, we must initialize the SVE before SIMD can
be used. Add a sanity check to make sure that we have completed the
SVE setup before anyone uses the SIMD.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-14 17:11:21 +00:00
Suzuki K Poulose
b51c6ac220 arm64: Introduce system_capabilities_finalized() marker
We finalize the system wide capabilities after the SMP CPUs
are booted by the kernel. This is used as a marker for deciding
various checks in the kernel. e.g, sanity check the hotplugged
CPUs for missing mandatory features.

However there is no explicit helper available for this in the
kernel. There is sys_caps_initialised, which is not exposed.
The other closest one we have is the jump_label arm64_const_caps_ready
which denotes that the capabilities are set and the capability checks
could use the individual jump_labels for fast path. This is
performed before setting the ELF Hwcaps, which must be checked
against the new CPUs. We also perform some of the other initialization
e.g, SVE setup, which is important for the use of FP/SIMD
where SVE is supported. Normally userspace doesn't get to run
before we finish this. However the in-kernel users may
potentially start using the neon mode. So, we need to
reject uses of neon mode before we are set. Instead of defining
a new marker for the completion of SVE setup, we could simply
reuse the arm64_const_caps_ready and enable it once we have
finished all the setup. Also we could expose this to the
various users as "system_capabilities_finalized()" to make
it more meaningful than "const_caps_ready".

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-14 17:10:21 +00:00
Arvind Sankar
46cbe2f399 arch/arm64/setup: Drop dummy_con initialization
con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset.
Drop it from arch setup code.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20191218214506.49252-7-nivedita@alum.mit.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-14 15:29:15 +01:00
Vincenzo Frascino
972188f3a2 arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK
VDSO_HAS_32BIT_FALLBACK has been removed from the core since
the architectures that support the generic vDSO library have
been converted to support the 32 bit fallbacks.

Remove unused VDSO_HAS_32BIT_FALLBACK from arm64 compat vdso.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20190830135902.20861-7-vincenzo.frascino@arm.com
2020-01-14 12:20:45 +01:00
Vincenzo Frascino
3b5584afee arm64: compat: vdso: Expose BUILD_VDSO32
clock_gettime32 and clock_getres_time32 should be compiled only with the
32 bit vdso library.

Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an
indication to the generic library to include these symbols.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20190830135902.20861-2-vincenzo.frascino@arm.com
2020-01-14 12:20:43 +01:00
Sargun Dhillon
9a2cef09c8
arch: wire up pidfd_getfd syscall
This wires up the pidfd_getfd syscall for all architectures.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200107175927.4558-4-sargun@sargun.me
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-01-13 21:49:47 +01:00
Rob Clark
f489b13dae arm64: dts: qcom: sdm845: move gpu zap nodes to per-device dts
We want to specify per-device firmware-name, so move the zap node into
the .dts file for individual boards/devices.  This lets us get rid of
the /delete-node/ for cheza, which does not use zap.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20200112195405.1132288-5-robdclark@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-13 11:45:51 -08:00
Bjorn Andersson
d07706276b arm64: dts: qcom: sm8150: Hard code rpmhpd constants
I missed the fact that these constants was not yet available, so hard
code their values in the dts to make the branch compile on its own.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-13 11:14:03 -08:00
Mark Brown
73d6890fe8 arm64: kernel: Correct annotation of end of el0_sync
Commit 582f95835a ("arm64: entry: convert el0_sync to C") caused
the ENDPROC() annotating the end of el0_sync to be placed after the code
for el0_sync_compat. This replaced the previous annotation where it was
located after all the cases that are now converted to C, including after
the currently unannotated el0_irq_compat and el0_error_compat. Move the
annotation to the end of the function and add separate annotations for
the _compat ones.

Fixes: 582f95835a (arm64: entry: convert el0_sync to C)
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-13 11:38:43 +00:00
Heiko Stuebner
110f027193 arm64: dts: rockchip: hook up the px30-evb dsi display
Create the necessary display nodes to activate the Xingpeng XPP055C272
dsi display that can be found on the px30-evb.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Link: https://lore.kernel.org/r/20191209145301.5307-2-heiko@sntech.de
2020-01-13 10:33:12 +01:00
yong.liang
a845ad1621 arm64: dts: mt8183: add reset-cells in infracfg
Include mt8183-reset.h and add reset-cells in infracfg
in dtsi file

Signed-off-by: yong.liang <yong.liang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-01-13 10:29:11 +01:00
Markus Reichl
cf3c539783 arm64: dts: rockchip: Enable sdio0 and uart0 on rk3399-roc-pc-mezzanine
The mezzanine board carries an E key type M.2 slot. This is
connected to USB, SDIO and UART0. Enable sdio and uart0 for use
with wlan and/or bt M.2 cards.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
Link: https://lore.kernel.org/r/20200109154211.1530-1-m.reichl@fivetechno.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-13 10:22:22 +01:00
Johan Jonker
96ff264bcc arm64: dts: rockchip: add reg property to brcmf sub-nodes
An experimental test with the command below gives this error:
rk3399-firefly.dt.yaml: dwmmc@fe310000: wifi@1:
'reg' is a required property
rk3399-orangepi.dt.yaml: dwmmc@fe310000: wifi@1:
'reg' is a required property
rk3399-khadas-edge.dt.yaml: dwmmc@fe310000: wifi@1:
'reg' is a required property
rk3399-khadas-edge-captain.dt.yaml: dwmmc@fe310000: wifi@1:
'reg' is a required property
rk3399-khadas-edge-v.dt.yaml: dwmmc@fe310000: wifi@1:
'reg' is a required property
So fix this by adding a reg property to the brcmf sub node.
Also add #address-cells and #size-cells to prevent more warnings.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200110142128.13522-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-13 10:21:38 +01:00
Johan Jonker
2be6a28014 arm64: dts: rockchip: fix dwmmc clock name for rk3308
An experimental test with the command below gives this error:
rk3308-evb.dt.yaml: dwmmc@ff480000: clock-names:2:
'ciu-drive' was expected

'ciu-drv' is not a valid dwmmc clock name,
so fix this by changing it to 'ciu-drive'.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200110161200.22755-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-13 10:13:36 +01:00
Johan Jonker
7f21473502 arm64: dts: rockchip: fix dwmmc clock name for px30
An experimental test with the command below gives this error:
px30-evb.dt.yaml: dwmmc@ff390000: clock-names:2:
'ciu-drive' was expected

'ciu-drv' is not a valid dwmmc clock name,
so fix this by changing it to 'ciu-drive'.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20200110161200.22755-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-13 10:13:33 +01:00
Vasily Khoruzhick
ac90484308 arm64: dts: allwinner: a64: enable DVFS
Add CPU regulator and operating points for all the A64-based boards
that are currently supported to enable DVFS.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-01-13 16:54:53 +08:00
Vasily Khoruzhick
51b3eaba8a arm64: dts: allwinner: a64: add dtsi with CPU operating points
Add operating points for A64. These are taken from FEX file from BSP
for A64.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-01-13 16:54:53 +08:00
Vasily Khoruzhick
e1c3804a17 arm64: dts: allwinner: a64: add cooling maps and thermal tripping points
Add cooling maps and thermal tripping points to prevent CPU overheating when
running at the highest frequency. Tripping points are taken from A33 dts since
A64 user manual doesn't mention when we should start throttling.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-01-13 16:54:53 +08:00
Vasily Khoruzhick
f267eff70c arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes
Add CPU clock to the CPU nodes since it is a prerequisite for enabling
DVFS.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
[wens@csie.org: Replace CLK_CPUX macro with raw number]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2020-01-13 16:52:36 +08:00
Anson Huang
9bfb129457 arm64: defconfig: Enable CONFIG_CLK_IMX8MP by default
Select CONFIG_CLK_IMX8MP by default to support i.MX8MP clock driver.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-01-12 14:08:39 +08:00
Linus Torvalds
606e9ad200 clone3-tls-v5.5-rc6
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCXhhtDQAKCRCRxhvAZXjc
 orQ3AQD7H2ovZbPIpWbwOnRIExBF4O8gPDfFc/J/RweZx40v/AD/QwfFnq0TpmUc
 UfS4zzLxJ4K+L4RYWId5v8MFHGIu8QQ=
 =LmmJ
 -----END PGP SIGNATURE-----

Merge tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux

Pull thread fixes from Christian Brauner:
 "This contains a series of patches to fix CLONE_SETTLS when used with
  clone3().

  The clone3() syscall passes the tls argument through struct clone_args
  instead of a register. This means, all architectures that do not
  implement copy_thread_tls() but still support CLONE_SETTLS via
  copy_thread() expecting the tls to be located in a register argument
  based on clone() are currently unfortunately broken. Their tls value
  will be garbage.

  The patch series fixes this on all architectures that currently define
  __ARCH_WANT_SYS_CLONE3. It also adds a compile-time check to ensure
  that any architecture that enables clone3() in the future is forced to
  also implement copy_thread_tls().

  My ultimate goal is to get rid of the copy_thread()/copy_thread_tls()
  split and just have copy_thread_tls() at some point in the not too
  distant future (Maybe even renaming copy_thread_tls() back to simply
  copy_thread() once the old function is ripped from all arches). This
  is dependent now on all arches supporting clone3().

  While all relevant arches do that now there are still four missing:
  ia64, m68k, sh and sparc. They have the system call reserved, but not
  implemented. Once they all implement clone3() we can get rid of
  ARCH_WANT_SYS_CLONE3 and HAVE_COPY_THREAD_TLS.

  This series also includes a minor fix for the arm64 uapi headers which
  caused __NR_clone3 to be missing from the exported user headers.

  Unfortunately the series came in a little late especially given that
  it touches a range of architectures. Due to the holidays not all arch
  maintainers responded in time probably due to their backlog. Will and
  Arnd have thankfully acked the arm specific changes.

  Given that the changes are straightforward and rather minimal combined
  with the fact the that clone3() with CLONE_SETTLS is broken I decided
  to send them post rc3 nonetheless"

* tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
  um: Implement copy_thread_tls
  clone3: ensure copy_thread_tls is implemented
  xtensa: Implement copy_thread_tls
  riscv: Implement copy_thread_tls
  parisc: Implement copy_thread_tls
  arm: Implement copy_thread_tls
  arm64: Implement copy_thread_tls
  arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers
2020-01-11 15:33:48 -08:00
Olof Johansson
99e45e29b6 New boards are the Radxa Rock Pi N10 using the VMARC SOM and Dalang
carrier board, separate versions for the two rockpro64 hardware revisions
 which switched a pin between revisions. The rockpro64 also got
 bluetooth support now.
 
 The px30 got a lot of attention with dsi, gpu and thermal support.
 Similarly the rk3399-roc-pc board also got attention with mtd flash,
 sdr104 mode, hdmi sound, gpu and a lot of other smaller improvements.
 
 Other than that there is a new gpu-cooling device for rk3399 a cpu
 idle-state for rk3328 and more small improvements across a number
 of boards.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAl4Xm7MQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgXPbB/4/iuGhWfydiiB6Mrmeifzlt+Ch7Hm5IJBA
 03f8FiHbGkW1Tlh1buw6t9BDKI0XKNqD94MU0pya4yDB7baFaH1GEk8S4/mbEAuE
 OZnWM0jzQ40b/1JmwRCw0PL2NTFHwlE+SSHnBJ4EW/OnOsCYUSz8+Aq33fMwdsPA
 Dm9gxAeeHsBJTxk26cxLrGePB5vYXltGwazklkKkU5scV75sfJu1xcRKcnVp71sH
 4j33aWi19GWo2YkW6RGXzTgiXoFPR+PgzfU337KTqq6A5oSIybH9g2WUnYyAxi8R
 tJKxiOBSBeGIrIRxMWtw8g9VxohJwzHfi9y4XO1VwzLpl/SQf3mb
 =iCh7
 -----END PGP SIGNATURE-----

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

New boards are the Radxa Rock Pi N10 using the VMARC SOM and Dalang
carrier board, separate versions for the two rockpro64 hardware revisions
which switched a pin between revisions. The rockpro64 also got
bluetooth support now.

The px30 got a lot of attention with dsi, gpu and thermal support.
Similarly the rk3399-roc-pc board also got attention with mtd flash,
sdr104 mode, hdmi sound, gpu and a lot of other smaller improvements.

Other than that there is a new gpu-cooling device for rk3399 a cpu
idle-state for rk3328 and more small improvements across a number
of boards.

* tag 'v5.6-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (37 commits)
  arm64: dts: rockchip: Enable mp8859 regulator on rk3399-roc-pc
  arm64: dts: rockchip: rk3399-hugsun-x99: remove supports-sd and supports-emmc options
  arm64: dts: rockchip: rk3399-firefly: remove num-slots from &sdio0 node
  arm64: dts: rockchip: Add PX30 LVDS
  arm64: dts: rockchip: add dsi controller for px30
  arm64: dts: rockchip: Add PX30 DSI DPHY
  arm64: dts: rockchip: Add RK3328 idle state
  arm64: dts: rockchip: remove identical &uart0 node from rk3368-lion-haikou
  arm64: dts: rockchip: Add Radxa Rock Pi N10 initial support
  ARM: dts: rockchip: Add Radxa Dalang Carrier board
  arm64: dts: rockchip: Add VMARC RK3399Pro SOM initial support
  dt-bindings: arm: rockchip: Add Rock Pi N10 binding
  arm64: dts: rockchip: hook up bluetooth at uart0 on rockpro64
  arm64: dts: rockchip: enable wifi module at sdio0 on rockpro64
  arm64: dts: rockchip: split rk3399-rockpro64 for v2 and v2.1 boards
  arm64: dts: rockchip: enable the gpu on px30-evb
  arm64: dts: rockchip: add the gpu for px30
  dt-bindings: gpu: mali-bifrost: Add Rockchip PX30
  arm64: dts: rockchip: Add GPU cooling device for RK3399
  arm64: dts: rockchip: Add regulators for PCIe for Radxa Rock Pi 4 board
  ...

Link: https://lore.kernel.org/r/5115625.yBEeHQkg2z@phil
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-10 22:19:08 -08:00
Olof Johansson
031a612b16 ARM64: DT: Hisilicon SoCs DT updates for 5.6
- Add remote control map name of the IR device for the hi3798cv200 poplar board
 - Correct the PCIe bus range setting for the hi3798cv200
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJeFcMZAAoJEAvIV27ZiWZcDzQQAJw7D30WMPFlRhd8Ah8GYDdN
 5FdmmAK65W7VOZHETBCgPyIXWIiiMUxWKzEgTdinqcaXa0pCfsmb/cUIeYw4cd1B
 JjntX1j901sZwxd9BAam9WI1OuXBpSXFAALIdkvNCBln5I6L7JOEUxbG3YxVjHWo
 q5mf/64ZOKmCuPYQrFKxQI5LnI8aHt05Nf67pzC5UM0fysCn2jetane+rX072LQ2
 5EiGgz5b7eYi0VswKyjbnptJSrfTTGGMhRM/zdwLxcw9jtfh8Hqnmme94RrbArlu
 K1Cr2sKimNbwkrwYhdElkaalDDx5BwDBJs0eiGZ9w1qNZP1SZ/eIK11LPDxt39Yh
 W1kAL9gB9+Xaz0eU9NghP73bTQaYbiDWs6jdRcBtYV33mPjNifFQRwpWgFt2/zJ2
 kNUZhTiV+HCtLJZFDAMDRRl2/zbmgKkoN0GL4Qkk+jx02QD+FLntKXoEDJ48xsHc
 6TrfJ7uvPhON2NTHpRntfkD/o7sLXMTxAolldObS+owJ3uAp+Mi9p6GfzoPOfNsg
 Sxrh/MyymPKqYdPwoR0zEAc8SXYObJRfrx7dIsU6S+wysLx9NzaPUhm/QKNAODqL
 fEJxKGqDZ8BojzOsS49zfVvNcCFPRntL8f3KYKQidjPKg8pCKh9xZQb18N3U7yaP
 z3cp3irAMvO0TnzmWgyO
 =+4YO
 -----END PGP SIGNATURE-----

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

ARM64: DT: Hisilicon SoCs DT updates for 5.6

- Add remote control map name of the IR device for the hi3798cv200 poplar board
- Correct the PCIe bus range setting for the hi3798cv200

* tag 'hisi-arm64-dt-for-5.6' of git://github.com/hisilicon/linux-hisi:
  arm64: dts: hi3798cv200: correct PCIe 'bus-range' setting
  arm64: dts: hi3798cv200-poplar: add linux,rc-map-name for IR

Link: https://lore.kernel.org/r/5E169EDE.8020809@hisilicon.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-10 22:16:18 -08:00
Olof Johansson
b47611c8c3 A fix for the Beelink A1 IR receiver setting the correct polarity.
-----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAl4XkqoQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgfPdCACArEwY6eMQspCf9akFXt1splXKKk6eygtZ
 vKduoK0A0CGmYF3XGo0umk7KX5b2NZdvFbUiFzBv/zyrBL05yY86KIRUx+qCh8En
 HIKDDL8grI4yyJftvcQeLo52B4Jw1SfP91MFSgowmOkTVlqlVwXDpn2cs/ShRD78
 Z0fatPZ8XnHeiIpcAcsJLPlZXPDNORPkDv/ePBLepmT5CgQJWsZfeULNK8xP5Z4P
 tJLyQPWM2Hz9tOlECVIGwNoIYlchN2erhy35UNstUIkew6MCOM2L4LfkV7jJ1b49
 rZ1qlYlq+fVV+Ut+fNAusjK2Nn2Zh4zQ3bRd1qPxmeXS3SUstHJo
 =mlvF
 -----END PGP SIGNATURE-----

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

A fix for the Beelink A1 IR receiver setting the correct polarity.

* tag 'v5.5-rockchip-dtsfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Fix IR on Beelink A1

Link: https://lore.kernel.org/r/2054603.JKFSmqfO19@phil
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-10 22:12:54 -08:00
Olof Johansson
41ec98def8 A couple of fixes for GPIO polarity and regulators on the A64
olinuxino.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXhixHwAKCRDj7w1vZxhR
 xfp9AQC7va+NSh3Lr7ot0XhX2viBJuZe4YY/Xa6fabQ7XGqWQgEA/MO6sgqegmqN
 uF2pHPhK/ijwZ1EC5ekWRVm77EslOAk=
 =DmZO
 -----END PGP SIGNATURE-----

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

A couple of fixes for GPIO polarity and regulators on the A64
olinuxino.

* tag 'sunxi-fixes-for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: dts: sun8i: a83t: Correct USB3503 GPIOs polarity
  arm64: dts: allwinner: a64: olinuxino: Fix SDIO supply regulator
  arm64: dts: allwinner: a64: olinuxino: Fix eMMC supply regulator

Link: https://lore.kernel.org/r/582f4fda-38af-43e8-af58-957aee5b9dd8.lettre@localhost
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-10 22:12:34 -08:00
Olof Johansson
3f2b5941d3 i.MX fixes for 5.5, round 2:
- Fix i.MX8MM SDMA1 AHB clock setting to remove a "Timeout waiting for CH0"
    error seen with UART1.
  - Correct compatible of RV3029 RTC device on imx6q-dhcom board.
  - Correct interrupt trigger type for magnetometer on board
    imx8mq-librem5-devkit.
  - A series from Anson Huang to fix vdd3p0 power supplier for a few NXP
    development board.
  - Fix imx6q-icore-mipi board to use 1.5 version of i.Core MX6DL, so
    that Ethernet interface on the board works properly.
  - Fix Toradex Colibri board to get NAND flash support back.
  - Fix SGTL5000 VDDIO regulator connection for imx6q-dhcom, which
    is connected to PMIC SW2 output rather than a fixed 3V3 rail.
  - Fix 'reg' of CPU node on imx7ulp to get rid of a warning given by
    kernel.
  - Fix endian setting for DCFG on LS1028A SoC, so that register access
    of DCFG becomes correct.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAl4Xz5gUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM44xgf+J/WZaUY9S9tvl9w9kMdmmB71WSVY
 qCgWTS6FUvw7AiJ+4mUzXXTP+Wwb0c1wBtvI4FRk6MhkHEc1nSkhJ5I9++bDD7BV
 2ktAIJmC2uSHdazq/wjDMi4T6LGnmRv1xKkEvib2/CBVzET9PoGJY2stS8R0r2xf
 WwCvMb0Lc7Twp0/nlY+h8ItHL50ZZuBSqW83P26zQdImHKMwRiAdlFa7eiZu82nV
 sPadYbtf07yUfeLpUfYXo/nFZ+Q2c+tJGUNxm0hXGvc+FaWS4MM44luBTN2fpaVl
 vAg2LKvdaWGbDZk0Q6WQdMsleDaHs3JdbaNrqBePbYyTnMll8N31ek3PWg==
 =Hv2B
 -----END PGP SIGNATURE-----

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

i.MX fixes for 5.5, round 2:

 - Fix i.MX8MM SDMA1 AHB clock setting to remove a "Timeout waiting for CH0"
   error seen with UART1.
 - Correct compatible of RV3029 RTC device on imx6q-dhcom board.
 - Correct interrupt trigger type for magnetometer on board
   imx8mq-librem5-devkit.
 - A series from Anson Huang to fix vdd3p0 power supplier for a few NXP
   development board.
 - Fix imx6q-icore-mipi board to use 1.5 version of i.Core MX6DL, so
   that Ethernet interface on the board works properly.
 - Fix Toradex Colibri board to get NAND flash support back.
 - Fix SGTL5000 VDDIO regulator connection for imx6q-dhcom, which
   is connected to PMIC SW2 output rather than a fixed 3V3 rail.
 - Fix 'reg' of CPU node on imx7ulp to get rid of a warning given by
   kernel.
 - Fix endian setting for DCFG on LS1028A SoC, so that register access
   of DCFG becomes correct.

* tag 'imx-fixes-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: imx7: Fix Toradex Colibri iMX7S 256MB NAND flash support
  ARM: dts: imx6sll-evk: Remove incorrect power supply assignment
  ARM: dts: imx6sl-evk: Remove incorrect power supply assignment
  ARM: dts: imx6sx-sdb: Remove incorrect power supply assignment
  ARM: dts: imx6qdl-sabresd: Remove incorrect power supply assignment
  ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6DL
  arm64: dts: imx8mq-librem5-devkit: use correct interrupt for the magnetometer
  ARM: dts: imx6q-dhcom: Fix SGTL5000 VDDIO regulator connection
  ARM: dts: imx7ulp: fix reg of cpu node
  arm64: dts: imx8mm: Change SDMA1 ahb clock for imx8mm
  arm64: dts: ls1028a: fix endian setting for dcfg
  ARM: dts: imx6q-dhcom: fix rtc compatible

Link: https://lore.kernel.org/r/20200110011836.GW4456@T480
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-10 22:12:17 -08:00
Olof Johansson
dc64f487f4 arm-soc: Amlogic fixes for v5.5-rc
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAl4XcK8ACgkQWTcYmtP7
 xmV9YQ//XCbLVDiWSukge/1PqgHk0rT5z638fREta9AYWS0XO7SVhneMvKfjfmMD
 1gbWeukDdyKKi3wmAv2qbqNKcXALzsarkItltR6+/3otFFki3kPCDWKBRFc2I/u3
 xTR7O7WaPgMg2t+Mdyi1AiyEVgXP+78+F87sTGmP92U6iQaXzPOiuWC+beIQGWyh
 qqjnu2If5WD1rtOc/LwCpweV+CFxHGXDMDE1nmXY9BsGiGXb9aElUjkKRIoMQTt/
 EYGQbEE5UQdA9sMc59wXL5PJ4qosl77U4wINMz/eaCzuCAk5Z8sQ5i6vqrJkx3+C
 PkFjHNGCfsIesttByJE+BPK1W6s8pwu6Y3eiCa9YHnznpcy9kwi5c0ENkw+bde5m
 EcNeRcNh7pIb36orVBzrp5AfPYcylEXfif43YQI8w+l0RVqh0k7gc9v/a/5z4mPq
 ZkJTe+ljsTMKPFoYXDKE4bIbGSVTiburCze/GKWZ5RT5RaFvpdhtPCAMPXtpnGYv
 UXO5Ngd6X2WTZVdqAu1VU3ZfryGE+3UBGmLLVSRlYBFyHsrt+WsMcmZ0jlGvPD5m
 0qwAT5Ek7IAPtHtp4T2RQnjzxzoCMGck0vQtDtUQnS9HLUwazXDnqcoaem1KIoS5
 +q9rTUatvC1NFJGAwsUZApyA4Gu5sy1je80soFWSfj+/jgG1Pdg=
 =CuHF
 -----END PGP SIGNATURE-----

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

arm-soc: Amlogic fixes for v5.5-rc

* tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson-sm1-sei610: add gpio bluetooth interrupt
  dt-bindings: reset: meson8b: fix duplicate reset IDs
  soc: amlogic: meson-ee-pwrc: propagate errors from pm_genpd_init()
  soc: amlogic: meson-ee-pwrc: propagate PD provider registration errors
  ARM: dts: meson8: fix the size of the PMU registers
  arm64: dts: meson-sm1-sei610: gpio-keys: switch to IRQs

Link: https://lore.kernel.org/r/7hmuaweavi.fsf@baylibre.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-10 22:11:13 -08:00
Ingo Molnar
57ad87ddce Merge branch 'x86/mm' into efi/core, to pick up dependencies
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2020-01-10 18:53:14 +01:00
Ingo Molnar
02df083201 Merge branch 'linus' into efi/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2020-01-10 18:52:11 +01:00
Nagarjuna Kristam
ddb8840d27 arm64: defconfig: Enable tegra XUDC support
Enable Nvidia XUSB device mode controller driver and USB GPIO Based
Connection Detection Driver as module.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-10 18:34:14 +01:00
Peter Robinson
f41f34ddce arm64: tegra: Allow bootloader to configure Ethernet MAC on Jetson TX2
Add an ethernet alias so that a stable MAC address is added to the
device tree for the wired ethernet interface.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-10 17:04:29 +01:00
Will Deacon
1595fe299e Revert "arm64: kexec: make dtb_mem always enabled"
Adding crash dump support to 'kexec_file' is going to extend 'struct
kimage_arch' with more 'kexec_file'-specific members. The cleanup here
then starts to get in the way, so revert it.

This reverts commit 621516789e.

Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-10 16:00:50 +00:00
Thierry Reding
cd8f843c6c arm64: tegra: Redefine force recovery key on Jetson AGX Xavier
The current BTN_1 code associated with the force-recovery key is not a
valid code for EV_KEY type input devices. This causes errors in the
libinput debug-events command.

There is no system level action that maps to the force-recovery key on
Jetson AGX Xavier, so assign it the KEY_SLEEP action, which at least
makes it do something marginally useful.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-10 16:56:47 +01:00
Tamás Szűcs
1f32a31fe2 arm64: tegra: Enable SDIO on Jetson Nano M.2 Key E
Enable SDMMC3 and set it up for SDIO devices.

Signed-off-by: Tamás Szűcs <tszucs@protonmail.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-10 16:46:47 +01:00
Tamás Szűcs
6f78a9460f arm64: tegra: Enable PWM fan on Jetson Nano
Enable PWM fan and extend CPU thermal zones for monitoring and fan control.
This will trigger the PWM fan on J15 and cool down the system if necessary.

Signed-off-by: Tamás Szűcs <tszucs@protonmail.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-10 16:41:28 +01:00
David S. Miller
a2d6d7ae59 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
The ungrafting from PRIO bug fixes in net, when merged into net-next,
merge cleanly but create a build failure.  The resolution used here is
from Petr Machata.

Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-09 12:13:43 -08:00
JC Kuo
09903c5e07 arm64: tegra: Add fuse/apbmisc node on Tegra194
This commit adds Tegra194 fuse and apbmisc device nodes.

Signed-off-by: JC Kuo <jckuo@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-09 19:27:48 +01:00
Thierry Reding
06c6b06f89 arm64: tegra: Make XUSB node consistent with the rest
The ordering of properties in the XUSB node is inconsistent with the
ordering of the properties in other nodes. Resort them to make the node
more consistent. Also get rid of some unnecessary whitespace.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-09 19:15:50 +01:00
Thierry Reding
be9b887f3b arm64: tegra: Add the memory subsystem on Tegra194
The memory subsystem on Tegra194 encompasses both the memory and
external memory controllers. The EMC is represented as a subnode of the
MC and a ranges property is used to describe the register ranges.

A dma-ranges property is also added to describe that all memory clients
can address up to 39 bits using the memory controller client interface
(MCCIF), unless otherwise limited by the DMA engines of the hardware. A
memory client can technically use 40 bits of addresses, but the memory
controller on Tegra194 uses bit 39 to determine the XBAR format used to
access memory. Use of this bit needs to be explicitly controlled by the
operating system drivers for devices that can use this on-the-fly format
conversion. Using the dma-ranges property prevents the operating system
from using the bit implicitly, for example in I/O virtual address
mappings.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-09 19:15:09 +01:00
Thierry Reding
3f6eaef9ab arm64: tegra: Add external memory controller on Tegra186
Add the external memory controller as a child device of the memory
controller on Tegra186. The memory controller really represents the
memory subsystem that encompasses both the memory and external memory
controllers. The external memory controller uses the BPMP to obtain the
list of supported EMC frequencies and set the EMC frequency.

Also set up the dma-ranges property to describe that all memory clients
can address up to 40 bits using the memory controller client interface
(MCCIF), unless otherwise limited by the DMA engines of the hardware.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-09 19:14:51 +01:00
Thierry Reding
b72d52a1b6 arm64: tegra: Add interrupt for memory controller on Tegra186
The memory controller can be interrupted by certain conditions. Add the
interrupt to the device tree node to allow drivers to trap these
conditions.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-09 19:14:14 +01:00
Thierry Reding
47cd385e08 arm64: tegra: Rename EMC on Tegra132
Rename the EMC node to external-memory-controller according to device
tree best practices.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-09 19:07:21 +01:00
Thierry Reding
0bab86abe5 arm64: tegra: Let the EMC hardware use the EMC clock
The EMC hardware block needs access to the EMC clock in order to scale
the external memory frequency. Add the clocks property so that drivers
for the EMC can acquire a reference to the EMC clock.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-01-09 19:06:39 +01:00
Mark Brown
b6a5c58240 arm64: xen: Use modern annotations for assembly functions
In an effort to clarify and simplify the annotation of assembly functions
in the kernel new macros have been introduced. These replace ENTRY and
ENDPROC. Update the annotations in the xen code to the new macros.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Julien Grall <julien@xen.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-09 16:09:42 +00:00
Michal Simek
5a25e64690 arm64: zynqmp: Add label property to all ina226 on zcu106
Label property is adding capability to distiguish chips from each other
when iio framework is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:59:51 +01:00
Michal Simek
d7b13a3cf2 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu106
ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:56:47 +01:00
Michal Simek
353f5ece94 arm64: zynqmp: Add label property to all ina226 on zcu102
Label property is adding capability to distiguish chips from each other
when iio framework is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:56:47 +01:00
Michal Simek
86444d3ecf arm64: zynqmp: Enable iio-hwmon for ina226 on zcu102
ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:56:47 +01:00
Michal Simek
9529be140f arm64: zynqmp: Add label property to all ina226 on zcu111
Label property is adding capability to distiguish chips from each other
when iio framework is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:56:46 +01:00
Michal Simek
2fe8397833 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu111
ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:56:46 +01:00
Michal Simek
526a63f00f arm64: zynqmp: Enable iio-hwmon for ina226 on zcu100
ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:56:46 +01:00
Michal Simek
c8e75cd490 arm64: zynqmp: Setup default number of chipselects for zcu100
There is only one chipselect on each connector.
Define it directly in board dts file.
There should be an option to use more chipselects via gpios.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:48:44 +01:00
Michal Simek
b4582390d5 arm64: zynqmp: Remove broken-cd from zcu100-revC
Card detect bit was broken on revA and it is working fine with revC
board that's why this property can be removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:48:44 +01:00
Venkatesh Yadav Abbarapu
25ef9bb6c2 arm64: zynqmp: Fix the si570 clock frequency on zcu111
The si570 clock frequency should be 156.25MHz as per datasheet.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:48:44 +01:00
Michal Simek
48b44b9090 arm64: zynqmp: Setup clock-output-names for si570 chips
If there are more instances of si570 clock-output-names property
should be used for differentiation of clock output.
The patch is adding this optional properties for all zynqmp boards with
si570 chip.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:48:44 +01:00
Michal Simek
4426df7c8d arm64: zynqmp: Turn comment to gpio-line-names
Label gpio lines properly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:48:44 +01:00
Michal Simek
8cfb5a11e1 arm64: zynqmp: Fix address for tca6416_u97 chip on zcu104
I2c address is not 0x21 but 0x20.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:48:44 +01:00
Michal Simek
4b0ec30be9 arm64: zynqmp: Remove addition number in node name
This change is coming from mainline review that's why this patch is
sync.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:48:33 +01:00
Michal Simek
13d21eba78 arm64: zynqmp: Use ethernet-phy as node name for ethernet phys
Ethernet phys based on devicetree specification should be using
ethernet-phy@ node name instead of pure phy@.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:48:20 +01:00
Rajan Vaja
959b86ae37 arm64: dts: xilinx: Add the power nodes for zynqmp
Add power domain nodes for zynqmp.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:21:41 +01:00
Rajan Vaja
4406486805 arm64: dts: xilinx: Remove dtsi for fixed clock
Currently CCF clocks sre used in zynqmp dts. So there is no use of
dtsi for fixed clock. Remove dtsi for fixed clock.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:21:41 +01:00
Rajan Vaja
9c8a47b484 arm64: dts: xilinx: Add the clock nodes for zynqmp
Add clock nodes for zynqmp based on CCF.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-09 14:21:39 +01:00
Anson Huang
c16b4571bb arm64: dts: imx8mn: Memory node should be in board DT
Memory address/size depends on board design, so memory node should
be in board DT.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-01-09 18:55:39 +08:00
Anson Huang
e1437b0944 arm64: dts: imx8mm: Memory node should be in board DT
Memory address/size depends on board design, so memory node should
be in board DT.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-01-09 18:54:55 +08:00
Horia Geantă
aad2417502 arm64: dts: imx8mn: add crypto node
Add node for CAAM - Cryptographic Acceleration and Assurance Module.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Tested-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-01-09 18:42:13 +08:00
Baruch Siach
785331b35b arm64: dts: imx8mq-hummingboard-pulse: add eeprom description
Add DT node for the eeprom data storage on SolidRun Hummingboard Pulse
carrier board.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-01-09 17:14:46 +08:00
Baruch Siach
67f2fd0298 arm64: dts: imx8mq-sr-som: add eeprom description
Add DT node for the eeprom data storage on SolidRun i.MX8M SOM.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-01-09 17:14:32 +08:00
Kuldeep Singh
73d582606a arm64: dts: ls208xa: Update qspi node properties for LS2088ARDB
LS2088ADB has one spansion flash s25fs512s of size 64M.

Add qspi dts entry for the board using compatibles as "jedec,spi-nor" to
probe flash successfully. Also, align properties with other board dts
properties.

Use dt-bindings constants in interrupts instead of using numbers.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-01-09 15:32:29 +08:00
Manivannan Sadhasivam
68ca364d48 arm64: dts: freescale: Add devicetree support for Thor96 board
Add devicetree support for Thor96 board from Einfochips. This board is
one of the 96Boards Consumer Edition platform powered by the NXP
i.MX8MQ SoC.

Following are the features supported currently:

1. uSD
2. WiFi/BT
3. Ethernet
4. EEPROM (M24256)
5. NOR Flash (W25Q256JW)
6. 2xUSB3.0 ports and 1xUSB2.0 port at HS expansion

More information about this board can be found in Arrow website:
https://www.arrow.com/en/products/i.imx8-thor96/arrow-development-tools

Link to 96Boards CE Specification: https://linaro.co/ce-specification

Signed-off-by: Darshak Patel <darshak.patel@einfochips.com>
[Mani: cleaned up for upstream]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2020-01-09 14:40:55 +08:00
Eric Biggers
674f368a95 crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
The CRYPTO_TFM_RES_BAD_KEY_LEN flag was apparently meant as a way to
make the ->setkey() functions provide more information about errors.

However, no one actually checks for this flag, which makes it pointless.

Also, many algorithms fail to set this flag when given a bad length key.
Reviewing just the generic implementations, this is the case for
aes-fixed-time, cbcmac, echainiv, nhpoly1305, pcrypt, rfc3686, rfc4309,
rfc7539, rfc7539esp, salsa20, seqiv, and xcbc.  But there are probably
many more in arch/*/crypto/ and drivers/crypto/.

Some algorithms can even set this flag when the key is the correct
length.  For example, authenc and authencesn set it when the key payload
is malformed in any way (not just a bad length), the atmel-sha and ccree
drivers can set it if a memory allocation fails, and the chelsio driver
sets it for bad auth tag lengths, not just bad key lengths.

So even if someone actually wanted to start checking this flag (which
seems unlikely, since it's been unused for a long time), there would be
a lot of work needed to get it working correctly.  But it would probably
be much better to go back to the drawing board and just define different
return values, like -EINVAL if the key is invalid for the algorithm vs.
-EKEYREJECTED if the key was rejected by a policy like "no weak keys".
That would be much simpler, less error-prone, and easier to test.

So just remove this flag.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-01-09 11:30:53 +08:00
Markus Reichl
1fc61ed04d arm64: dts: rockchip: Enable mp8859 regulator on rk3399-roc-pc
The rk3399-roc-pc uses a MP8859 DC/DC converter for 12V supply.
This supplies 5V only in default state after booting.
Now we can control the output voltage via I2C interface.
Add a node for the driver to reach 12V.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
Link: https://lore.kernel.org/r/20200106211633.2882-6-m.reichl@fivetechno.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-09 00:28:40 +01:00