Commit graph

12035 commits

Author SHA1 Message Date
Olof Johansson
0f3dac6110 i.MX SoC update for 5.5:
- Add arm64 Kconfig option for the NXP S32 platform.
  - Drop imx_anatop_usb_chrg_detect_disable() function which becomes
    unneeded, since all the necessary charger setup is done by the USB
    PHY driver now.
  - Add serial number support for i.MX6/7 SoCs by reading 64-bit SoC
    unique ID from OCOTP block.
  - Replace i.MX machine specific coherency exit implementation using
    the generic v7_exit_coherency_flush() function.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJdwV03AAoJEFBXWFqHsHzOZuwH/Rsls0F80Iowk9382TJqQEWN
 cwuZpaPmYyxClUGI16QCWIeL2w0AMh0ni+iamneabADH0rLUvhu753mtSnODZFxE
 YQJMJ6Gv5rTW87A3zwWDoGulJ4YGr2HpoNHyY0Re7KQ5lFEZOKafIThbkDkERaum
 CqQj5uy39p7DRs+g2jtP8ePTQVH1fU0GfXkNIfI7izYftvM3cpSjwWoTrCV5NE2I
 SDanlra5f2UeJ6uUBzpzUrzbNQSMHr87PCfaFwpNdvcCSP2eYrY2NHf6Swi81Q+7
 SNLO+5iE9UHWiojWD0vdataioKxOEeSQF8KavVp6Ou6ue/u31TCiCi6ki6sAEB4=
 =Mo5t
 -----END PGP SIGNATURE-----

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

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

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

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

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

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

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

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

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

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

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

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

Let's do so.

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

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

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

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

... to:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Subsequent patches will make use of the new helper.

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

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

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

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

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

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

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

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

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

The local variable, "length" is unneeded.

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

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

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

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

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

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

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

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

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

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

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

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

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

Add device tree nodes for them.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

mvebu dt64 for 5.5 (part 1)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ARM64: hisilicon: defconfig updates for 5.5

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

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

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

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

ARM64: DT: Hisilicon SoCs DT updates for 5.5

- add Mali450 MP4 GPU node in the hi6220 SoC

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

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

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

Realtek ARM64 based SoC DT for v5.5

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

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

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

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

Realtek ARM64 based SoC for v5.5

Enable reset controllers and add a mailing list to MAINTAINERS.

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

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

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

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

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

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

This fixes the following build warnings with W=1:

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

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-11-04 08:52:14 +08:00
Fabio Estevam
f7e5bb37c4 arm64: dts: ls1028a-qds: Remove unnecessary #address-cells/#size-cells
The following build warning is seen with W=1:

arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts:196.10-208.4: Warning (avoid_unnecessary_addr_size): /soc/i2c@2000000/fpga@66: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

Fix it by removing the unnecessary #address-cells/#size-cells.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-11-04 08:52:13 +08:00
Anson Huang
235e091983 arm64: dts: imx8mn: Remove duplicated machine compatible
Machine compatible string normally is located in board DT, remove
the duplicated one from SoC dtsi.

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>
2019-11-04 08:52:13 +08:00
Anson Huang
615138e583 arm64: dts: imx8mm: Remove duplicated machine compatible
Machine compatible string normally is located in board DT, remove
the duplicated one from SoC dtsi.

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>
2019-11-04 08:52:13 +08:00
Rogerio Pimentel da Silva
431e4628ce arm64: dts: imx8mq-evk: Add remote control
Add remote control to i.MX8M EVK device tree.

The rc protocol must be selected by writing to:
/sys/devices/platform/ir-receiver/rc/rc0/protocols

On my tests, I used "nec" rc protocol:
echo nec > protocols

Tested using evetest:
evtest /dev/input/event0

Output log for each key pressed:
Event:
time 1568122608.267845, -------------- SYN_REPORT ------------
Event:
time 1568122610.503835, type 4 (EV_MSC), code 4 (MSC_SCAN), value 440

Signed-off-by: Rogerio Pimentel da Silva <rpimentel.silva@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-11-04 08:52:12 +08:00
Olof Johansson
cbf6673d67 arm64 defconfig for v5.5
- Add SPI_CADENCE_QUADSPI to support the Cadence QSPI driver
 - Add INTEL_STRATIX10_RSU as a module to support the Remote Service
   Update driver on Stratix10 and Agilex platforms
 - Add GPIO_ALTERA as a module to support the Altera GPIO driver
 -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEoHhMeiyk5VmwVMwNGZQEC4GjKPQFAl24SoAUHGRpbmd1eWVu
 QGtlcm5lbC5vcmcACgkQGZQEC4GjKPTy8A/+NQ2evuL2R4Ug8k1n+XCOszKDiYD7
 sjCho7iBWPjVXnpSDyxhvKV1ifmro58Tv/ddS0zqUQrpx5mcbZ6Y6JlMe9LbbhTj
 L6UWYDjQS/kAQENBmAsxuuQsNSNOBTWYCPou6AfXXrDgnz1L2vltt5BIaALWpSfh
 Ef/zXBV+vD0FJH+2PHVXU8g0nbi8RGxnxOHIkZZ8vycwXVwIaw4zo1UBF8JqQ2Ri
 ScjV2nORxuutcKF4ZSJgksZ7LMZRGkk6upI8fjN3QsQePVA++9WMAlgR8RMILhC8
 o46mJ7jzP4frF/p+QHUo9G07Ve37xOZsJ+9gAl2MU3zwFSKHqOv5iB+yJNFC/F1L
 a7Et+sv4QhVBHXaILmWRKV1gFCiCLKxNL1qrGBj9+SlwSE35nY/OGDOE5cGi4sEH
 B83E5t8Uf9it6zKWYkkPt/8iwG59d7XbxKXXe4vIdLQ9NKA2GYgG1/wIloR0Tg1X
 zYJZM8OV6F6fs2LLSdyK/r8KdONJsDUjSC6UManrGFxQezSbnVuHhqDLFGMAzG1v
 PGPYlaukx+U9wyJd0B61qe8yLF/ODQRgLg81PeszSQKps9Ld0j/SI7abd6Cfsz+x
 X7RhYL7FR23VBIJ9frw4Kej4pOX8df7/1gvyN9+mHGIVCirgpqnCTTtrpctLKX4S
 1S6jZ6YA93NZTuw=
 =mZHb
 -----END PGP SIGNATURE-----

Merge tag 'arm64_defconfig_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/defconfig

arm64 defconfig for v5.5
- Add SPI_CADENCE_QUADSPI to support the Cadence QSPI driver
- Add INTEL_STRATIX10_RSU as a module to support the Remote Service
  Update driver on Stratix10 and Agilex platforms
- Add GPIO_ALTERA as a module to support the Altera GPIO driver

* tag 'arm64_defconfig_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  arm64: defconfig: enable Altera GPIO controller
  arm64: defconfig: enable rsu driver
  arm64: defconfig: enable the Cadence QSPI controller

Link: https://lore.kernel.org/r/20191029143737.24850-2-dinguyen@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-02 13:35:39 -07:00
Olof Johansson
3760828a8b SoCFPGA DTS updates for v5.5
- Arria10
 	- modify QSPI read-delay property
 - Agilex
 	- Add QSPI support
 	- Enable USB and LEDs
 	- Add service layer, fpga manager support
 - Stratix10
 	- Update QSPI reg address
 -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEoHhMeiyk5VmwVMwNGZQEC4GjKPQFAl24RqQUHGRpbmd1eWVu
 QGtlcm5lbC5vcmcACgkQGZQEC4GjKPQKSw//bEtv+ZjzYUvCWnFdOpw1P3BpfDKm
 M6MT6j9/HIVnZ1mdSXN4rDNguXtrYqbdUXR2wJ+6EokOZiH9fJWiyoPZZ0paS5Wu
 /bHTFcfB6ghKk+aNs5vdBUPk82rmVsz9CPhO7bj5H+LOrFipWDTZ9K+gDOAq2XXz
 KwcIgc8T49vmkTE3vxTPCGkU9WfP+HFYxbjaJqVWY3EBgVYcNDqeryXdYkRCM/Ca
 n33+6Vs/DhmMaS7D6jo2rdUuIIacNXZ3e6ByyjUKLSiNMpqAeREQAcn91ehPs74j
 V8KU2Z4QbONRGdn2Ste5CNnWKtLUy+6dlqu3ofggYxEs/mLZ4pigwgQxYD2Mr2EF
 sPWRQqwtAgeMdkKKClogbQDA889joudpVmsA0lFazofzloeZW4kCNAUmygVBvZz/
 xM5OQgLxsVCbMSkdpyvUjKQpiloeCTBZIPdZ8Bxbxt0kdDr32WjX8R/rQ8hgriPs
 PdoO8yAQIs+jalheyTyP7V4B90VEx3hzdW/c6bGkThLxfYSr2gDehUsIC9hlen0M
 cqEaGvIZFPyziU0R6PJrZ7Q25GRjXfg5EK4Qs8+JlLEhlAgEEvvXrwZJbAKxJUeA
 OnaZe4+yxaWQsiE5X0rU0XzsEpDOlAO9j/pZxUy1d6g7BggrL+o6ikGGslfAnmmN
 NMz9u03gEhGmIL0=
 =xoQ2
 -----END PGP SIGNATURE-----

Merge tag 'socfpga_dts_updates_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt

SoCFPGA DTS updates for v5.5
- Arria10
	- modify QSPI read-delay property
- Agilex
	- Add QSPI support
	- Enable USB and LEDs
	- Add service layer, fpga manager support
- Stratix10
	- Update QSPI reg address

* tag 'socfpga_dts_updates_for_v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  arm64: dts: agilex: add service layer, fpga manager and fpga region
  arm64: agilex: enable USB and LEDs on agilex devkit
  arm64: dts: altera: update QSPI reg addresses for Stratix10
  arm64: dts: agilex: add QSPI support for Intel Agilex
  ARM: dts: arria10: Modify QSPI read_delay for Arria10

Link: https://lore.kernel.org/r/20191029143737.24850-1-dinguyen@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-02 13:34:25 -07:00
Olof Johansson
70a7274a54 i.MX fixes for 5.4, 2nd round:
- Get SNVS power key back to work for imx6-logicpd board. It was
    accidentally disabled by commit 770856f0da ("ARM: dts: imx6qdl:
    Enable SNVS power key according to board design").
  - Fix sparse warnings in IMX GPC driver by making the initializers
    in imx_gpc_domains C99 format.
  - Fix an interrupt storm coming from accelerometer on imx6qdl-sabreauto
    board. This is seen with upstream version U-Boot where pinctrl is not
    configured for the device.
  - Fix sdma device compatible string for i.MX8MM and i.MX8MN SoC.
  - Fix compatible of PCA9547 i2c-mux on LS1028A QDS board to get the
    device probed correctly.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJdt+NxAAoJEFBXWFqHsHzO9dQIAItV9GBySkuQ74/LBBp9WHfi
 Y708jUcbm/oEkic3bW+RdXpr+Xo3nP1E1VrdogqwWZStePS4JQtRWs7/+NAC/aiw
 wrUDoCXnZYiSLtp+f/1OSs7mUSG13Ip+Um9VxjI1AI9ld1YKg8sSeg0Xlk5oNsk4
 1/2c1P9nW0XjWMkpLqYzIbbtb+sisCX0/Ftyxw7vrjhpgJSDDUTE37IFgmdskZg6
 ILl00chE4E+8AlLm9kdtqOgzihtFVbSIrhF99gbF6R9vZQGoYgOE3QM2YG+qhEOd
 56bQTJJRVwutSbBGGv1ya/J5cmtZYDzoi10JEEQ+zkyrcU+G3qj9+8/wZORba5o=
 =0kUv
 -----END PGP SIGNATURE-----

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

i.MX fixes for 5.4, 2nd round:
 - Get SNVS power key back to work for imx6-logicpd board. It was
   accidentally disabled by commit 770856f0da ("ARM: dts: imx6qdl:
   Enable SNVS power key according to board design").
 - Fix sparse warnings in IMX GPC driver by making the initializers
   in imx_gpc_domains C99 format.
 - Fix an interrupt storm coming from accelerometer on imx6qdl-sabreauto
   board. This is seen with upstream version U-Boot where pinctrl is not
   configured for the device.
 - Fix sdma device compatible string for i.MX8MM and i.MX8MN SoC.
 - Fix compatible of PCA9547 i2c-mux on LS1028A QDS board to get the
   device probed correctly.

* tag 'imx-fixes-5.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: imx8mn: fix compatible string for sdma
  arm64: dts: imx8mm: fix compatible string for sdma
  ARM: dts: imx6-logicpd: Re-enable SNVS power key
  soc: imx: gpc: fix initialiser format
  ARM: dts: imx6qdl-sabreauto: Fix storm of accelerometer interrupts
  arm64: dts: ls1028a: fix a compatible issue

Link: https://lore.kernel.org/r/20191029110334.GA20928@dragon
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-11-02 13:28:57 -07:00
Clément Péron
3f04e05924 arm64: allwinner: h6: Enable GPU node for Tanix TX6
Unlike other H6 boards, Tanix TX6 doesn't have a PMIC so we can enable
the GPU without providing a specific power supply.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-02 16:40:18 +01:00
Linus Torvalds
d540c398db arm64 fixes for -rc6
- Enable CPU errata workarounds for Broadcom Brahma-B53
 
 - Enable CPU errata workarounds for Qualcomm Hydra/Kryo CPUs
 
 - Fix initial dirty status of writeable, shared mappings
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAl28HzAQHHdpbGxAa2Vy
 bmVsLm9yZwAKCRC3rHDchMFjNH3gB/4hJoYsASohxTVEcILOp7gZQZd4zgMuF16Z
 ci9XcUgmpT3LNQTqSYASDxZZylVdK7eEq4yUXFpe57D5WL6GyEBLDWr09O6qb6F1
 p/IuyEkUjram8GzRZsdW3/i786m887T1VYtRg6C7GKU9dHTRzkZcPTklWqc1CsEN
 u7KqLGzWHxRNNUVWFhEsn9kTSARVOMfqXfERcpc2f6E5olXz8E62K+av2NL3u5o7
 JQqHFqi5iJB66qc0AvUxc7oq/+Hvtz5nQfFm0IWQvGy3dvZ/vTGxYwAW2f7t70SH
 MGHT+MsqYEENDjunMKtdHZ+D3A1xkYcrsKgOBkSBTTVlgrSonCr/
 =0QZC
 -----END PGP SIGNATURE-----

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

Pull arm64 fixes from Will Deacon:
 "These are almost exclusively related to CPU errata in CPUs from
  Broadcom and Qualcomm where the workarounds were either not being
  enabled when they should have been or enabled when they shouldn't have
  been.

  The only "interesting" fix is ensuring that writeable, shared mappings
  are initially mapped as clean since we inadvertently broke the logic
  back in v4.14 and then noticed the problem via code inspection the
  other day.

  The only critical issue we have outstanding is a sporadic NULL
  dereference in the scheduler, which doesn't appear to be
  arm64-specific and PeterZ is tearing his hair out over it at the
  moment.

  Summary:

   - Enable CPU errata workarounds for Broadcom Brahma-B53

   - Enable CPU errata workarounds for Qualcomm Hydra/Kryo CPUs

   - Fix initial dirty status of writeable, shared mappings"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: apply ARM64_ERRATUM_843419 workaround for Brahma-B53 core
  arm64: Brahma-B53 is SSB and spectre v2 safe
  arm64: apply ARM64_ERRATUM_845719 workaround for Brahma-B53 core
  arm64: cpufeature: Enable Qualcomm Falkor errata 1009 for Kryo
  arm64: cpufeature: Enable Qualcomm Falkor/Kryo errata 1003
  arm64: Ensure VM_WRITE|VM_SHARED ptes are clean by default
2019-11-01 10:03:46 -07:00
Shaokun Zhang
9ef8567ccf arm64: perf: Simplify the ARMv8 PMUv3 event attributes
For each PMU event, there is a ARMV8_EVENT_ATTR(xx, XX) and
&armv8_event_attr_xx.attr.attr. Let's redefine the ARMV8_EVENT_ATTR
to simplify the armv8_pmuv3_event_attrs.

Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
[will: Dropped unnecessary array syntax]
Signed-off-by: Will Deacon <will@kernel.org>
2019-11-01 14:51:19 +00:00
Geert Uytterhoeven
b13d0e6162 arm64: defconfig: Enable R8A77961 SoC
Enable the Renesas R-Car M3-W+ (R8A77961) SoC in the ARM64 defconfig.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191023123342.13100-11-geert+renesas@glider.be
2019-11-01 14:06:01 +01:00
Geert Uytterhoeven
92980759c1 arm64: dts: renesas: Add support for Salvator-XS with R-Car M3-W+
Add initial support for the Renesas Salvator-X 2nd version development
board equipped with an R-Car M3-W+ SiP with 8 (2 x 4) GiB of RAM.

The memory map is as follows:
  - Bank0: 4GiB RAM : 0x000048000000 -> 0x000bfffffff
		      0x000480000000 -> 0x004ffffffff
  - Bank1: 4GiB RAM : 0x000600000000 -> 0x006ffffffff

Based on a patch in the BSP by Takeshi Kihara
<takeshi.kihara.df@renesas.com>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191023123342.13100-10-geert+renesas@glider.be
2019-11-01 14:03:41 +01:00
Geert Uytterhoeven
f51746ad7d arm64: dts: renesas: Add Renesas R8A77961 SoC support
Add initial support for the Renesas R-Car M3-W+ (R8A77961) SoC.

This includes:
  - Cortex-A57 and Cortex-A53 CPU cores
    (incl. L2 caches and power state definitions),
  - Power Management Unit,
  - PSCI firmware,
  - Pin Function Controller,
  - Clock, Reset, System, and Interrupt Controllers,
  - SCIF2 serial console,
  - Product Register,
  - ARM Architectured Timer,
and various placeholders to allow to use salvator-xs.dtsi.

Based on r8a7796.dtsi.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191023123342.13100-9-geert+renesas@glider.be
2019-11-01 14:03:41 +01:00
Geert Uytterhoeven
4c28ca12ea arm64: dts: renesas: Prepare for rename of ARCH_R8A7796 to ARCH_R8A77960
CONFIG_ARCH_R8A7796 for R-Car M3-W (R8A77960) will be renamed to
CONFIG_ARCH_R8A77960, to avoid confusion with R-Car M3-W+ (R8A77961),
which will use CONFIG_ARCH_R8A77961.

Relax dependencies by handling both symbols.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191023123342.13100-8-geert+renesas@glider.be
2019-11-01 14:03:41 +01:00
Florian Fainelli
1cf45b8fdb arm64: apply ARM64_ERRATUM_843419 workaround for Brahma-B53 core
The Broadcom Brahma-B53 core is susceptible to the issue described by
ARM64_ERRATUM_843419 so this commit enables the workaround to be applied
when executing on that core.

Since there are now multiple entries to match, we must convert the
existing ARM64_ERRATUM_843419 into an erratum list and use
cpucap_multi_entry_cap_matches to match our entries.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Will Deacon <will@kernel.org>
2019-11-01 10:47:37 +00:00
Florian Fainelli
e059770cb1 arm64: Brahma-B53 is SSB and spectre v2 safe
Add the Brahma-B53 CPU (all versions) to the whitelists of CPUs for the
SSB and spectre v2 mitigations.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Will Deacon <will@kernel.org>
2019-11-01 10:47:37 +00:00
Doug Berger
bfc97f9f19 arm64: apply ARM64_ERRATUM_845719 workaround for Brahma-B53 core
The Broadcom Brahma-B53 core is susceptible to the issue described by
ARM64_ERRATUM_845719 so this commit enables the workaround to be applied
when executing on that core.

Since there are now multiple entries to match, we must convert the
existing ARM64_ERRATUM_845719 into an erratum list.

Signed-off-by: Doug Berger <opendmb@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Will Deacon <will@kernel.org>
2019-11-01 10:47:37 +00:00
Nicolas Saenz Julienne
8b5369ea58 dma/direct: turn ARCH_ZONE_DMA_BITS into a variable
Some architectures, notably ARM, are interested in tweaking this
depending on their runtime DMA addressing limitations.

Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-11-01 09:41:18 +00:00
Georgii Staroselskii
5878524ee0
arm64: dts: allwinner: bluetooth for Emlid Neutis N5
The Emlid Neutis N5 board has AP6212 BT+WiFi chip. This patch is in
line with 8558c6e21c ("ARM: dts: sun8i: h3: bluetooth for Banana Pi
M2 Zero board") and other commits that add Bluetooth support for
similar boards.

Signed-off-by: Georgii Staroselskii <georgii.staroselskii@emlid.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-01 10:12:42 +01:00
Corentin Labbe
2fabf6dd77
arm64: defconfig: add new Allwinner crypto options
This patch adds the new allwinner crypto configs to ARM64 defconfig

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-01 10:02:27 +01:00
Corentin Labbe
709b86ff01
arm64: dts: allwinner: sun50i: Add Crypto Engine node on H6
The Crypto Engine is a hardware cryptographic accelerator that supports
many algorithms.

This patch enables the Crypto Engine on the Allwinner H6 SoC Device-tree.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-01 09:58:01 +01:00
Corentin Labbe
8002c454d4
arm64: dts: allwinner: sun50i: Add crypto engine node on H5
The Crypto Engine is a hardware cryptographic accelerator that supports
many algorithms.
It could be found on most Allwinner SoCs.

This patch enables the Crypto Engine on the Allwinner H5 SoC Device-tree.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-01 09:57:19 +01:00
Corentin Labbe
0f5fc15885
arm64: dts: allwinner: sun50i: Add Crypto Engine node on A64
The Crypto Engine is a hardware cryptographic accelerator that supports
many algorithms.
It could be found on most Allwinner SoCs.

This patch enables the Crypto Engine on the Allwinner A64 SoC Device-tree.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-11-01 09:56:31 +01:00
Eric Biggers
b95bba5d01 crypto: skcipher - rename the crypto_blkcipher module and kconfig option
Now that the blkcipher algorithm type has been removed in favor of
skcipher, rename the crypto_blkcipher kernel module to crypto_skcipher,
and rename the config options accordingly:

	CONFIG_CRYPTO_BLKCIPHER => CONFIG_CRYPTO_SKCIPHER
	CONFIG_CRYPTO_BLKCIPHER2 => CONFIG_CRYPTO_SKCIPHER2

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-11-01 13:42:47 +08:00
Yunfeng Ye
9b537997b6 crypto: arm64/aes-neonbs - add return value of skcipher_walk_done() in __xts_crypt()
A warning is found by the static code analysis tool:
  "Identical condition 'err', second condition is always false"

Fix this by adding return value of skcipher_walk_done().

Fixes: 67cfa5d3b7 ("crypto: arm64/aes-neonbs - implement ciphertext stealing for XTS")
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-11-01 13:33:42 +08:00
Sai Prakash Ranjan
a636f93fcd arm64: dts: qcom: msm8998: Disable coresight by default
Boot failure has been reported on MSM8998 based laptop when
coresight is enabled. This is most likely due to lack of
firmware support for coresight on production device when
compared to debug device like MTP where this issue is not
observed. So disable coresight by default for MSM8998 and
enable it only for MSM8998 MTP.

Reported-and-tested-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Fixes: 783abfa224 ("arm64: dts: qcom: msm8998: Add Coresight support")
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-10-31 21:05:08 -07:00
Jeffrey Hugo
b40dd23f9a arm64: dts: qcom: msm8998-clamshell: Remove retention idle state
The retention idle state does not appear to be supported by the firmware
present on the msm8998 laptops since the state is advertised as disabled
in ACPI, and attempting to enable the state in DT is observed to result
in boot hangs.  Therefore, remove the state from use to address the
observed issues.

Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Fixes: 2c6d2d3a58 (arm64: dts: qcom: Add Lenovo Miix 630)
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-10-31 21:04:06 -07:00
Bjorn Andersson
36c602dcdd arm64: cpufeature: Enable Qualcomm Falkor errata 1009 for Kryo
The Kryo cores share errata 1009 with Falkor, so add their model
definitions and enable it for them as well.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
[will: Update entry in silicon-errata.rst]
Signed-off-by: Will Deacon <will@kernel.org>
2019-10-31 13:22:12 +00:00
Clément Péron
8abc4c4a15
arm64: dts: allwinner: Add mali GPU supply for H6 boards
Enable and add supply to the Mali GPU node on all the
H6 boards.

Regarding the datasheet the maximum time for supply to reach
its voltage is 32ms.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-10-31 13:35:08 +01:00
Clément Péron
4acc24bca1
arm64: dts: allwinner: Add ARM Mali GPU node for H6
Add the mali gpu node to the H6 device-tree.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-10-31 13:35:08 +01:00
Sowjanya Komatineni
47b4e12915 arm64: tegra: Add Jetson Nano SC7 timings
Add platform specific SC7 timing configuration to the Jetson Nano device
tree.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:09 +01:00
Sowjanya Komatineni
106f7a06fb arm64: tegra: Add Jetson TX1 SC7 timings
Add platform specific SC7 timing configuration to the Jetson TX1 device
tree.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:09 +01:00
Sowjanya Komatineni
d13c13f4cd arm64: tegra: Enable wake from deep sleep on RTC alarm
This patch updates device tree for RTC and PMC to allow system wake
from deep sleep on RTC alarm.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
264064ab0b arm64: tegra: Add PMU on Tegra210
The NVIDIA Tegra210 contains an ARM PMU v3 that can be used to gather
statistics about the processors and their memory system. Add a device
tree node so that this functionality can be exposed.

Reported-by: William Cohen <giantklein@gmail.com>
Tested-by: William Cohen <giantklein@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
24fc33633e arm64: tegra: Add blank lines for better readability
Separate the individual thermal zones by a blank line for improved
readability.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
614d063f89 arm64: tegra: Enable DisplayPort on Jetson AGX Xavier
Enable both USB-C/DP ports on Jetson AGX Xavier and wire up the power
supplies for the SORs that drive these outputs.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
c90b8f15df arm64: tegra: p2888: Rename regulators for consistency
Some of the PMIC regulators had names that don't match the schematics.
Rename them so that it is easier to cross-reference with the hardware
documentation.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:08 +01:00
Thierry Reding
3fdfaf8718 arm64: tegra: Enable DP support on Jetson TX2
If equipped with an E3320 display module, Jetson TX2 can support
DisplayPort.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Thierry Reding
d46d1eb30c arm64: tegra: Fix compatible for SOR1
It turns out that both SORs on Tegra186 are the same, so there's no need
to distinguish between them in the compatible string.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Thierry Reding
35cbf655eb arm64: tegra: Enable DP support on Jetson Nano
Add the AVDD_IO_EDP_1V05 and enable the SOR and DPAUX hardware blocks
that are used to drive DisplayPort on Jetson Nano.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Thierry Reding
ed93a666bb arm64: tegra: Add SOR0_OUT clock on Tegra210
This clock was not previously used because it is a fixed clock. However,
adding it here allows operating systems to deal with SOR0 the same way
as SOR1.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Vidya Sagar
b7450f161f arm64: tegra: Assume no CLKREQ presence by default
Although Tegra194 has support for CLKREQ sideband signal and P2972
has routing of the same till the slot, it is the case most of the time
that the connected device doesn't have CLKREQ support. Hence, it makes
sense to assume that there is no CLKREQ support by default and it can
be enabled on need basis when a card with CLKREQ support is connected.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Thierry Reding
29ef1f4dac arm64: tegra: Enable SMMU for VIC on Tegra186
Enable address translation for VIC via the SMMU on Tegra186.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:07 +01:00
Nagarjuna Kristam
488a04d4bb arm64: tegra: Enable XUSB host controller on Jetson TX2
This enables the use of the USB ports found on the Jetson TX2 for input
or external storage, for example.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Nagarjuna Kristam
05705c7215 arm64: tegra: Enable SMMU for XUSB host on Tegra186
Enabling the SMMU for XUSB host allows buffers to be mapped through the
ARM SMMU, which helps protecting the system from rogue memory accesses
by the XUSB host.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Nagarjuna Kristam
ca2b8ee457 arm64: tegra: Enable XUSB pad controller on Jetson TX2
The XUSB pad controller is a prerequisite for enabling XUSB support.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Thierry Reding
2b6b3940e8 arm64: tegra: Add ethernet alias on Jetson AGX Xavier
The Tegra194 EQOS controller is used as primary Ethernet interface.
Set the ethernet0 alias to reflect that.

Generic bootloader code can use this to find the primary Ethernet device
and set the MAC address, for example.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Thierry Reding
19dc772a94 arm64: tegra: Fix compatible string for EQOS on Tegra194
The EQOS Ethernet controller found on Tegra194 is compatible with its
predecessor or Tegra186. However, it is an established practice to add
a compatible string for the most recent generation of the SoC as well,
just in case some incompatibilities or bugs are later discovered.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Thierry Reding
44ff822c58 arm64: tegra: Hook up edp interrupt on Tegra210 SOCTHERM
For some reason this was never hooked up. Do it now so that over-current
interrupts can be logged.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:06 +01:00
Thierry Reding
939e7430de arm64: tegra: Fix base address for SOR1 on Tegra194
The SOR1 hardware block's registers start at physical address 0x15b40000
as correctly specified by the unit-address, but the reg property lists a
wrong value, likely because it was copy-and-pasted from SOR0 but not
correctly updated.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Thierry Reding
1aaa769867 arm64: tegra: Add unit-address for ACONNECT on Tegra194
The ACONNECT complex starts at physical address 0x2900000, so give it a
unit-address to comply with standard naming practices checked for by the
device tree compiler.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Thierry Reding
eef97c2a77 arm64: tegra: Add unit-address for CBB on Tegra194
The control back-bone (CBB) starts at physical address 0, so give it a
unit-address to comply with standard naming practices checked for by the
device tree compiler.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Thierry Reding
b45d322c2c arm64: tegra: Add CPU and cache topology for Tegra194
Tegra194 has four CPU clusters, each with their own cache hierarchy.
This patch creates the CPU map for these clusters and adds the second-
and third-level caches and associates them with the CPUs.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Jon Hunter
d440538e5f arm64: tegra: Fix 'active-low' warning for Jetson Xavier regulator
Commit 4fdbfd60a3a2 ("arm64: tegra: Add PCIe slot supply information
in p2972-0000 platform") added regulators for the PCIe slot on the
Jetson Xavier platform. One of these regulators has an active-low enable
and this commit incorrectly added an active-low specifier for the GPIO
which causes the following warning to occur on boot ...

 WARNING KERN regulator@3 GPIO handle specifies active low - ignored

The fixed-regulator binding does not use the active-low flag from the
gpio specifier and purely relies of the presence of the
'enable-active-high' property to determine if it is active high or low
(if this property is omitted). Fix this warning by setting the GPIO
to active-high in the GPIO specifier. Finally, remove the
'enable-active-low' as this is not a valid property.

Fixes: 4fdbfd60a3a2 ("arm64: tegra: Add PCIe slot supply information in p2972-0000 platform")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:05 +01:00
Jon Hunter
1e5e929c00 arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator
Commit 3499359418 ("arm64: tegra: Enable HDMI on Jetson TX1")
added a regulator for HDMI on the Jetson TX1 platform. This regulator
has an active high enable, but the GPIO specifier for enabling the
regulator incorrectly defines it as active-low. This causes the
following warning to occur on boot ...

 WARNING KERN regulator@10 GPIO handle specifies active low - ignored

The fixed-regulator binding does not use the active-low flag from the
gpio specifier and purely relies of the presence of the
'enable-active-high' property to determine if it is active high or low
(if this property is omitted). Fix this warning by setting the GPIO
to active-high in the GPIO specifier which aligns with the presense of
the 'enable-active-high' property.

Fixes: 3499359418 ("arm64: tegra: Enable HDMI on Jetson TX1")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-10-29 20:30:04 +01:00
Bjorn Andersson
d4af3c4b81 arm64: cpufeature: Enable Qualcomm Falkor/Kryo errata 1003
With the introduction of 'cce360b54ce6 ("arm64: capabilities: Filter the
entries based on a given mask")' the Qualcomm Falkor/Kryo errata 1003 is
no long applied.

The result of not applying errata 1003 is that MSM8996 runs into various
RCU stalls and fails to boot most of the times.

Give 1003 a "type" to ensure they are not filtered out in
update_cpu_capabilities().

Fixes: cce360b54c ("arm64: capabilities: Filter the entries based on a given mask")
Cc: stable@vger.kernel.org
Reported-by: Mark Brown <broonie@kernel.org>
Suggested-by: Will Deacon <will@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
2019-10-29 17:18:50 +00:00
Catalin Marinas
aa57157be6 arm64: Ensure VM_WRITE|VM_SHARED ptes are clean by default
Shared and writable mappings (__S.1.) should be clean (!dirty) initially
and made dirty on a subsequent write either through the hardware DBM
(dirty bit management) mechanism or through a write page fault. A clean
pte for the arm64 kernel is one that has PTE_RDONLY set and PTE_DIRTY
clear.

The PAGE_SHARED{,_EXEC} attributes have PTE_WRITE set (PTE_DBM) and
PTE_DIRTY clear. Prior to commit 73e86cb03c ("arm64: Move PTE_RDONLY
bit handling out of set_pte_at()"), it was the responsibility of
set_pte_at() to set the PTE_RDONLY bit and mark the pte clean if the
software PTE_DIRTY bit was not set. However, the above commit removed
the pte_sw_dirty() check and the subsequent setting of PTE_RDONLY in
set_pte_at() while leaving the PAGE_SHARED{,_EXEC} definitions
unchanged. The result is that shared+writable mappings are now dirty by
default

Fix the above by explicitly setting PTE_RDONLY in PAGE_SHARED{,_EXEC}.
In addition, remove the superfluous PTE_DIRTY bit from the kernel PROT_*
attributes.

Fixes: 73e86cb03c ("arm64: Move PTE_RDONLY bit handling out of set_pte_at()")
Cc: <stable@vger.kernel.org> # 4.14.x-
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2019-10-29 16:22:33 +00:00
Xiang Zheng
e44ec4a35d arm64: print additional fault message when executing non-exec memory
When attempting to executing non-executable memory, the fault message
shows:

  Unable to handle kernel read from unreadable memory at virtual address
  ffff802dac469000

This may confuse someone, so add a new fault message for instruction
abort.

Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-29 15:41:14 +00:00
Andreas Färber
02f4597e7e arm64: dts: realtek: Add RTD129x UART resets
Associate the UART nodes with the corresponding reset controller bits.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2019-10-29 05:27:41 +01:00
Andreas Färber
fd5f8d0a99 arm64: dts: realtek: Add RTD129x reset controller nodes
Add nodes for the Realtek RTD1295 reset controllers.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2019-10-29 05:26:54 +01:00
Andreas Färber
dbb595333c arm64: dts: realtek: Add watchdog node for RTD129x
Add the watchdog node to the RTD129x Device Tree.

Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
[AF: Moved from RTD1295 to new RTD129x]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2019-10-29 04:58:08 +01:00
Andreas Färber
f2356d1afe arm64: dts: realtek: Add oscillator for RTD129x
Add 27 MHz oscillator clock node.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2019-10-29 04:57:52 +01:00
Andreas Färber
5133636e41 arm64: dts: realtek: Add RTD1296 and Synology DS418
Add Device Trees for RTD1296 SoC and Synology DiskStation DS418.

Cc: info@synology.com
Signed-off-by: Andreas Färber <afaerber@suse.de>
2019-10-29 04:57:03 +01:00
Andreas Färber
cf976f660e arm64: dts: realtek: Add RTD1293 and Synology DS418j
Add Device Trees for RTD1293 SoC and Synology DiskStation DS418j NAS.

Cc: info@synology.com
Signed-off-by: Andreas Färber <afaerber@suse.de>
2019-10-29 04:56:29 +01:00
Andreas Färber
39089a192a arm64: dts: realtek: Change dual-license from MIT to BSD
Move the SPDX-License-Identifier to the top line and update to SPDX 2.0.
While at it, switch from GPLv2+/MIT to GPLv2+/BSD2c before adding more.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2019-10-29 04:55:33 +01:00
Mihaela Martinas
e115e86af4 arm64: defconfig: Enable configs for S32V234
Enable support for the S32V234 SoC, including the previously added UART
driver.

Signed-off-by: Mihaela Martinas <Mihaela.Martinas@freescale.com>
Signed-off-by: Adrian.Nitu <adrian.nitu@freescale.com>
Signed-off-by: Stoica Cosmin-Stefan <cosmin.stoica@nxp.com>
Signed-off-by: Stefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-29 09:27:42 +08:00
Anson Huang
51c27f42fc arm64: defconfig: Enable CONFIG_KEYBOARD_IMX_SC_KEY as module
Select CONFIG_KEYBOARD_IMX_SC_KEY as module by default to
support i.MX8QXP scu key driver.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-29 09:25:55 +08:00
Catalin Marinas
8301ae822d Merge branch 'for-next/entry-s-to-c' into for-next/core
Move the synchronous exception paths from entry.S into a C file to
improve the code readability.

* for-next/entry-s-to-c:
  arm64: entry-common: don't touch daif before bp-hardening
  arm64: Remove asmlinkage from updated functions
  arm64: entry: convert el0_sync to C
  arm64: entry: convert el1_sync to C
  arm64: add local_daif_inherit()
  arm64: Add prototypes for functions called by entry.S
  arm64: remove __exception annotations
2019-10-28 17:02:56 +00:00
Catalin Marinas
4686da5140 arm64: Make arm64_dma32_phys_limit static
This variable is only used in the arch/arm64/mm/init.c file for
ZONE_DMA32 initialisation, no need to expose it.

Reported-by: Will Deacon <will@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 16:46:43 +00:00
Catalin Marinas
346f6a4636 Merge branch 'kvm-arm64/erratum-1319367' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into for-next/core
Similarly to erratum 1165522 that affects Cortex-A76, A57 and A72
respectively suffer from errata 1319537 and 1319367, potentially
resulting in TLB corruption if the CPU speculates an AT instruction
while switching guests.

The fix is slightly more involved since we don't have VHE to help us
here, but the idea is the same: when switching a guest in, we must
prevent any speculated AT from being able to parse the page tables
until S2 is up and running. Only at this stage can we allow AT to take
place.

For this, we always restore the guest sysregs first, except for its
SCTLR and TCR registers, which must be set with SCTLR.M=1 and
TCR.EPD{0,1} = {1, 1}, effectively disabling the PTW and TLB
allocation. Once S2 is setup, we restore the guest's SCTLR and
TCR. Similar things must be done on TLB invalidation...

* 'kvm-arm64/erratum-1319367' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms:
  arm64: Enable and document ARM errata 1319367 and 1319537
  arm64: KVM: Prevent speculative S1 PTW when restoring vcpu context
  arm64: KVM: Disable EL1 PTW when invalidating S2 TLBs
  arm64: KVM: Reorder system register restoration and stage-2 activation
  arm64: Add ARM64_WORKAROUND_1319367 for all A57 and A72 versions
2019-10-28 16:22:49 +00:00
Christoffer Dall
5c40130801 KVM: arm64: Don't set HCR_EL2.TVM when S2FWB is supported
On CPUs that support S2FWB (Armv8.4+), KVM configures the stage 2 page
tables to override the memory attributes of memory accesses, regardless
of the stage 1 page table configurations, and also when the stage 1 MMU
is turned off.  This results in all memory accesses to RAM being
cacheable, including during early boot of the guest.

On CPUs without this feature, memory accesses were non-cacheable during
boot until the guest turned on the stage 1 MMU, and we had to detect
when the guest turned on the MMU, such that we could invalidate all cache
entries and ensure a consistent view of memory with the MMU turned on.
When the guest turned on the caches, we would call stage2_flush_vm()
from kvm_toggle_cache().

However, stage2_flush_vm() walks all the stage 2 tables, and calls
__kvm_flush-dcache_pte, which on a system with S2FWB does ... absolutely
nothing.

We can avoid that whole song and dance, and simply not set TVM when
creating a VM on a system that has S2FWB.

Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20191028130541.30536-1-christoffer.dall@arm.com
2019-10-28 16:20:58 +00:00
Catalin Marinas
6a036afb55 Merge branch 'for-next/neoverse-n1-stale-instr' into for-next/core
Neoverse-N1 cores with the 'COHERENT_ICACHE' feature may fetch stale
instructions when software depends on prefetch-speculation-protection
instead of explicit synchronization. [0]

The workaround is to trap I-Cache maintenance and issue an
inner-shareable TLBI. The affected cores have a Coherent I-Cache, so the
I-Cache maintenance isn't necessary. The core tells user-space it can
skip it with CTR_EL0.DIC. We also have to trap this register to hide the
bit forcing DIC-aware user-space to perform the maintenance.

To avoid trapping all cache-maintenance, this workaround depends on
a firmware component that only traps I-cache maintenance from EL0 and
performs the workaround.

For user-space, the kernel's work is to trap CTR_EL0 to hide DIC, and
produce a fake IminLine. EL3 traps the now-necessary I-Cache maintenance
and performs the inner-shareable-TLBI that makes everything better.

[0] https://developer.arm.com/docs/sden885747/latest/arm-neoverse-n1-mp050-software-developer-errata-notice

* for-next/neoverse-n1-stale-instr:
  arm64: Silence clang warning on mismatched value/register sizes
  arm64: compat: Workaround Neoverse-N1 #1542419 for compat user-space
  arm64: Fake the IminLine size on systems affected by Neoverse-N1 #1542419
  arm64: errata: Hide CTR_EL0.DIC on systems affected by Neoverse-N1 #1542419
2019-10-28 16:12:40 +00:00
Olof Johansson
49067a8a6f ARMv8 Juno update for v5.5
Single patch to add support for Mali GPU on all versions of Juno.
 Though it's disabled by default, it is very useful to test panfrost
 drivers.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAl22ZX8ACgkQAEG6vDF+
 4piRLQ//cZ6Gq/ZoE7ebmyQxooY0tnmfAyq6cZgGqR6DZUKvZLnShSAnUt/ojMWO
 P8Ske10LkRU4yRjjkUhjELho5vMvz2TVTlZ5xX95Yto9+IbAIfox9XnwCp0amznx
 B4VgksPf74SOKPKACaKX5xMZHURvOdWd0k/rV7XpS4WLnmRLkYC5XPvj/dU1Ycp1
 4fV55NU5DQ0kCqkY9eRJn4RPHLlEloakvmvNgYblYPD3jC4DuGt+y80PURGuN7b0
 +fWNQpRVMRZRm7nocvpj64PMWJispRrFboJxv+Gu+IH3R/NBn7uZL9pGRUCP3ibh
 LKaQXsCz3rq4gq9FqtDaykMco82x1U8DPjfjyqukk0eYn1h1Yq60iJeAacgieAiM
 xPK1AZGmUiPSa4IXGnHmYnEvyukZxPQr6ZPmw4n6Fkx8Z1ycPkuehkZ7RQncIpPS
 VhBl1voS1l89EWDcm+vrJWr/RhHGQ2b3NicsOLwtmdtQcJYbakgJw1/QlFkw+FfP
 GpZJU2Yww04ErBuF+jiMOfaYGKV62qZj0CTuKIUdbEeKLMJpuANE/mZopCDLYURY
 Hz5QPmpm6VhLLHPZa3zzOOShlcOLHqpY8QssdMKjUBHu//UgrtlJJNZAgiodqAgo
 TIZK0yttqC4O1yq96Z3gY0y3COapLQsBiJSgtcjn7S8IZ7zci10=
 =W+dh
 -----END PGP SIGNATURE-----

Merge tag 'juno-update-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/dt

ARMv8 Juno update for v5.5

Single patch to add support for Mali GPU on all versions of Juno.
Though it's disabled by default, it is very useful to test panfrost
drivers.

* tag 'juno-update-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  arm64: dts: juno: add GPU subsystem

Link: https://lore.kernel.org/r/20191028040022.GC20568@e107533-lin.cambridge.arm.com
Signed-off-by: Olof Johansson <olof@lixom.net>
2019-10-28 08:52:41 -07:00
Catalin Marinas
ba95e9bd96 Merge remote-tracking branch 'arm64/for-next/fixes' into for-next/core
This is required to solve the conflicts with subsequent merges of two
more errata workaround branches.

* arm64/for-next/fixes:
  arm64: tags: Preserve tags for addresses translated via TTBR1
  arm64: mm: fix inverted PAR_EL1.F check
  arm64: sysreg: fix incorrect definition of SYS_PAR_EL1_F
  arm64: entry.S: Do not preempt from IRQ before all cpufeatures are enabled
  arm64: hibernate: check pgd table allocation
  arm64: cpufeature: Treat ID_AA64ZFR0_EL1 as RAZ when SVE is not enabled
  arm64: Fix kcore macros after 52-bit virtual addressing fallout
  arm64: Allow CAVIUM_TX2_ERRATUM_219 to be selected
  arm64: Avoid Cavium TX2 erratum 219 when switching TTBR
  arm64: Enable workaround for Cavium TX2 erratum 219 when running SMT
  arm64: KVM: Trap VM ops when ARM64_WORKAROUND_CAVIUM_TX2_219_TVM is set
2019-10-28 15:30:52 +00:00
Christian Borntraeger
01d035d796 KVM: arm/arm64: Show halt poll counters in debugfs
ARM/ARM64 has counters halt_successful_poll, halt_attempted_poll,
halt_poll_invalid, and halt_wakeup but never exposed those in debugfs.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1572164390-5851-1-git-send-email-borntraeger@de.ibm.com
2019-10-28 13:52:50 +00:00
Anson Huang
72ebb53bba arm64: dts: imx8mn: Add LPDDR4 EVK board support
i.MX8MN LPDDR4 EVK board shares most of the device as DDR4 EVK board,
the ONLY difference are the DDR type and PMIC, add support for it
and make it default i.MX8MN EVK board as usual.

The PMIC driver is NOT ready, so cpu-freq needs to be disabled as
it depends on regulator provided by PMIC.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:48:04 +08:00
Anson Huang
791b02da0a arm64: dts: imx8mn: Create EVK dtsi file for common use
i.MX8MN has different EVK boards to support different DDR types,
the ONLY differences are DDR chips and PMIC, so most of the devices
can be shared between these EVK boards, create a EVK dtsi file for
common use.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:48:04 +08:00
Anson Huang
0bd0512d06 arm64: dts: imx8mn: Move usdhc clocks assignment to board DT
usdhc's clock rate is different according to different devices
connected, so clock rate assignment should be placed in board
DT according to different devices connected on each usdhc port.

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>
2019-10-28 21:48:04 +08:00
Anson Huang
03750c3796 arm64: dts: imx8mm: Move usdhc clocks assignment to board DT
usdhc's clock rate is different according to different devices
connected, so clock rate assignment should be placed in board
DT according to different devices connected on each usdhc port.

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>
2019-10-28 21:48:04 +08:00
Anson Huang
e045f044e8 arm64: dts: imx8mq: Move usdhc clocks assignment to board DT
usdhc's clock rate is different according to different devices
connected, so clock rate assignment should be placed in board
DT according to different devices connected on each usdhc port.

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>
2019-10-28 21:48:03 +08:00
Anson Huang
3944b454f7 arm64: dts: imx8qxp: Move usdhc clocks assignment to board DT
usdhc's clock rate is different according to different devices
connected, so clock rate assignment should be placed in board
DT according to different devices connected on each usdhc port.

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>
2019-10-28 21:48:03 +08:00
Stoica Cosmin-Stefan
bc66392d82 arm64: dts: fsl: Add device tree for S32V234-EVB
Add initial version of device tree for S32V234-EVB, including nodes for the
4 Cortex-A53 cores, AIPS bus with UART modules, ARM architected timer and
Generic Interrupt Controller (GIC).

Keep SoC level separate from board level to let future boards with this SoC
share common properties, while the dts files will keep board-dependent
properties.

Signed-off-by: Stoica Cosmin-Stefan <cosmin.stoica@nxp.com>
Signed-off-by: Mihaela Martinas <Mihaela.Martinas@freescale.com>
Signed-off-by: Dan Nica <dan.nica@nxp.com>
Signed-off-by: Larisa Grigore <Larisa.Grigore@nxp.com>
Signed-off-by: Phu Luu An <phu.luuan@nxp.com>
Signed-off-by: Stefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:48:03 +08:00
S.j. Wang
e8b395b236 arm64: dts: imx8mm-evk: Assigned clocks for audio plls
Assign clocks and clock-rates for audio plls, that audio
drivers can utilize them.

Add dai-tdm-slot-num and dai-tdm-slot-width for sound-wm8524,
that sai driver can generate correct bit clock.

Fixes: 13f3b9fdef ("arm64: dts: imx8mm-evk: Enable audio codec wm8524")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:48:03 +08:00
Andrey Smirnov
4c997d12e6 arm64: dts: zii-ultra: Add node for switch watchdog
Add I2C node for switch watchdog present on both Zest and RMB3 boards.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:48:03 +08:00
Andrey Smirnov
2600069fab arm64: dts: zii-ultra: Add node for accelerometer
Add I2C node for accelerometer present on both Zest and RMB3 boards.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:48:02 +08:00
Andrey Smirnov
032c10aef5 arm64: dts: zii-ultra: Fix regulator-3p3-main's name
It's 3V3_MAIN, not 3V3V_MAIN on schematic. Fix it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:48:02 +08:00
Andrey Smirnov
7270a6b67f arm64: dts: zii-ultra: Fix regulator-vsd-3v3's vin-supply
Regulator-vsd-3v3 is supplied via GEN_3V3 rail which is an output of
an "always on" load switch supplied by 3V3_MAIN. GEN_3V3 is also used
as vin-supply by a number of peripherals, so adding it also allows us
to follow the schematic more closely.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:48:02 +08:00
Wen He
91035cb05f arm64: dts: ls1028a: Update #clock-cells of dpclk node
Update the property #clock-cells = <1> to #clock-cells = <0> of the
dpclk, since the Display output pixel clock driver provides single
clock output.

Signed-off-by: Wen He <wen.he_1@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:48:02 +08:00
Yuantian Tang
5363eaaeb8 arm64: dts: lx2160a: add tmu device node
Add the TMU (Thermal Monitoring Unit) device node to enable
TMU feature.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 21:46:53 +08:00
Shengjiu Wang
958c6014c6 arm64: dts: imx8mn: fix compatible string for sdma
SDMA in i.MX8MN should use same configuration as i.MX8MQ
So need to change compatible string to be "fsl,imx8mq-sdma".

Fixes: 6c3debcbae ("arm64: dts: freescale: Add i.MX8MN dtsi support")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 20:17:59 +08:00
Shengjiu Wang
e346ff93f0 arm64: dts: imx8mm: fix compatible string for sdma
SDMA in i.MX8MM should use same configuration as i.MX8MQ
So need to change compatible string to be "fsl,imx8mq-sdma".

Fixes: a05ea40eb3 ("arm64: dts: imx: Add i.mx8mm dtsi support")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2019-10-28 20:16:19 +08:00
James Morse
bfe298745a arm64: entry-common: don't touch daif before bp-hardening
The previous patches mechanically transformed the assembly version of
entry.S to entry-common.c for synchronous exceptions.

The C version of local_daif_restore() doesn't quite do the same thing
as the assembly versions if pseudo-NMI is in use. In particular,
| local_daif_restore(DAIF_PROCCTX_NOIRQ)
will still allow pNMI to be delivered. This is not the behaviour
do_el0_ia_bp_hardening() and do_sp_pc_abort() want as it should not
be possible for the PMU handler to run as an NMI until the bp-hardening
sequence has run.

The bp-hardening calls were placed where they are because this was the
first C code to run after the relevant exceptions. As we've now moved
that point earlier, move the checks and calls earlier too.

This makes it clearer that this stuff runs before any kind of exception,
and saves modifying PSTATE twice.

Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Cc: Julien Thierry <julien.thierry.kdev@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 11:22:54 +00:00
James Morse
afa7c0e5b9 arm64: Remove asmlinkage from updated functions
Now that the callers of these functions have moved into C, they no longer
need the asmlinkage annotation. Remove it.

Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 11:22:51 +00:00
Mark Rutland
582f95835a arm64: entry: convert el0_sync to C
This is largely a 1-1 conversion of asm to C, with a couple of caveats.

The el0_sync{_compat} switches explicitly handle all the EL0 debug
cases, so el0_dbg doesn't have to try to bail out for unexpected EL1
debug ESR values. This also means that an unexpected vector catch from
AArch32 is routed to el0_inv.

We *could* merge the native and compat switches, which would make the
diffstat negative, but I've tried to stay as close to the existing
assembly as possible for the moment.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[split out of a bigger series, added nokprobes. removed irq trace
 calls as the C helpers do this. renamed el0_dbg's use of FAR]
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Cc: Julien Thierry <julien.thierry.kdev@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 11:22:49 +00:00
Mark Rutland
ed3768db58 arm64: entry: convert el1_sync to C
This patch converts the EL1 sync entry assembly logic to C code.

Doing this will allow us to make changes in a slightly more
readable way. A case in point is supporting kernel-first RAS.
do_sea() should be called on the CPU that took the fault.

Largely the assembly code is converted to C in a relatively
straightforward manner.

Since all sync sites share a common asm entry point, the ASM_BUG()
instances are no longer required for effective backtraces back to
assembly, and we don't need similar BUG() entries.

The ESR_ELx.EC codes for all (supported) debug exceptions are now
checked in the el1_sync_handler's switch statement, which renders the
check in el1_dbg redundant. This both simplifies the el1_dbg handler,
and makes the EL1 exception handling more robust to
currently-unallocated ESR_ELx.EC encodings.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[split out of a bigger series, added nokprobes, moved prototypes]
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Cc: Julien Thierry <julien.thierry.kdev@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 11:22:47 +00:00
Mark Rutland
51077e03b8 arm64: add local_daif_inherit()
Some synchronous exceptions can be taken from a number of contexts,
e.g. where IRQs may or may not be masked. In the entry assembly for
these exceptions, we use the inherit_daif assembly macro to ensure
that we only mask those exceptions which were masked when the exception
was taken.

So that we can do the same from C code, this patch adds a new
local_daif_inherit() function, following the existing local_daif_*()
naming scheme.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
[moved away from local_daif_restore()]
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 11:22:43 +00:00
James Morse
e540e0a7fa arm64: Add prototypes for functions called by entry.S
Functions that are only called by assembly don't always have a
C header file prototype.

Add the prototypes before moving the assembly callers to C.

Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 11:22:41 +00:00
James Morse
b6e43c0e31 arm64: remove __exception annotations
Since commit 7326749801 ("arm64: unwind: reference pt_regs via embedded
stack frame") arm64 has not used the __exception annotation to dump
the pt_regs during stack tracing. in_exception_text() has no callers.

This annotation is only used to blacklist kprobes, it means the same as
__kprobes.

Section annotations like this require the functions to be grouped
together between the start/end markers, and placed according to
the linker script. For kprobes we also have NOKPROBE_SYMBOL() which
logs the symbol address in a section that kprobes parses and
blacklists at boot.

Using NOKPROBE_SYMBOL() instead lets kprobes publish the list of
blacklisted symbols, and saves us from having an arm64 specific
spelling of __kprobes.

do_debug_exception() already has a NOKPROBE_SYMBOL() annotation.

Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 11:22:38 +00:00
Catalin Marinas
27a22fbdee arm64: Silence clang warning on mismatched value/register sizes
Clang reports a warning on the __tlbi(aside1is, 0) macro expansion since
the value size does not match the register size specified in the inline
asm. Construct the ASID value using the __TLBI_VADDR() macro.

Fixes: 222fc0c850 ("arm64: compat: Workaround Neoverse-N1 #1542419 for compat user-space")
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Cc: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 09:13:21 +00:00
Markus Reichl
cec0e350ca arm64: dts: rockchip: Add LED nodes on rk3399-roc-pc
rk3399-roc-pc has three gpio LEDs, enable them.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
Link: https://lore.kernel.org/r/7d8d85c9-5fde-7943-a6b6-639bca38bdc1@fivetechno.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-10-27 19:08:47 +01:00