Граф коммитов

8783 Коммитов

Автор SHA1 Сообщение Дата
Anshuman Khandual 52338088ef arm64/numa: Unify common error path in numa_init()
At present numa_free_distance() is being called before numa_distance is
even initialized with numa_alloc_distance() which is really pointless.
Instead lets call numa_free_distance() on the common error path inside
numa_init() after numa_alloc_distance() has been successful.

Fixes: 1a2db30034 ("arm64, numa: Add NUMA support for arm64 platforms")
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:49:52 +01:00
Anshuman Khandual 77cfe95090 arm64/numa: Report correct memblock range for the dummy node
The dummy node ID is marked into all memory ranges on the system. So the
dummy node really extends the entire memblock.memory. Hence report correct
extent information for the dummy node using memblock range helper functions
instead of the range [0LLU, PFN_PHYS(max_pfn) - 1)].

Fixes: 1a2db30034 ("arm64, numa: Add NUMA support for arm64 platforms")
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:48:54 +01:00
Anshuman Khandual 359048f91d arm64/mm: Define esr_to_debug_fault_info()
fault_info[] and debug_fault_info[] are static arrays defining memory abort
exception handling functions looking into ESR fault status code encodings.
As esr_to_fault_info() is already available providing fault_info[] array
lookup, it really makes sense to have a corresponding debug_fault_info[]
array lookup function as well. This just adds an equivalent helper function
esr_to_debug_fault_info().

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:48:23 +01:00
Anshuman Khandual dbfe3828a6 arm64/mm: Reorganize arguments for is_el1_permission_fault()
Most memory abort exception handling related functions have the arguments
in the order (addr, esr, regs) except is_el1_permission_fault(). This
changes the argument order in this function as (addr, esr, regs) like
others.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:47:31 +01:00
Anshuman Khandual 00bbd5d901 arm64/mm: Use ESR_ELx_FSC macro while decoding fault exception
Just replace hard code value of 63 (0x111111) with an existing macro
ESR_ELx_FSC when parsing for the status code during fault exception.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:47:12 +01:00
Marc Zyngier 95b861a4a6 arm64: arch_timer: Add workaround for ARM erratum 1188873
When running on Cortex-A76, a timer access from an AArch32 EL0
task may end up with a corrupted value or register. The workaround for
this is to trap these accesses at EL1/EL2 and execute them there.

This only affects versions r0p0, r1p0 and r2p0 of the CPU.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:38:47 +01:00
Marc Zyngier 32a3e635fb arm64: compat: Add CNTFRQ trap handler
Just like CNTVCT, we need to handle userspace trapping into the
kernel if we're decided that the timer wasn't fit for purpose...
64bit userspace is already dealt with, but we're missing the
equivalent compat handling.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:36:03 +01:00
Marc Zyngier 50de013d22 arm64: compat: Add CNTVCT trap handler
Since people seem to make a point in breaking the userspace visible
counter, we have no choice but to trap the access. We already do this
for 64bit userspace, but this is lacking for compat. Let's provide
the required handler.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:36:01 +01:00
Marc Zyngier 2a8905e18c arm64: compat: Add cp15_32 and cp15_64 handler arrays
We're now ready to start handling CP15 access. Let's add (empty)
arrays for both 32 and 64bit accessors, and the code that deals
with them.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:35:59 +01:00
Marc Zyngier 1f1c014035 arm64: compat: Add condition code checks and IT advance
Here's a /really nice/ part of the architecture: a CP15 access is
allowed to trap even if it fails its condition check, and SW must
handle it. This includes decoding the IT state if this happens in
am IT block. As a consequence, SW must also deal with advancing
the IT state machine.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:35:56 +01:00
Marc Zyngier 70c63cdfd6 arm64: compat: Add separate CP15 trapping hook
Instead of directly generating an UNDEF when trapping a CP15 access,
let's add a new entry point to that effect (which only generates an
UNDEF for now).

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:35:53 +01:00
Marc Zyngier bd7ac140b8 arm64: Add decoding macros for CP15_32 and CP15_64 traps
So far, we don't have anything to help decoding ESR_ELx when dealing
with ESR_ELx_EC_CP15_{32,64}. As we're about to handle some of those,
let's add some useful macros.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 13:35:50 +01:00
Suzuki K Poulose 9f98ddd668 kvm: arm64: Add helper for loading the stage2 setting for a VM
We load the stage2 context of a guest for different operations,
including running the guest and tlb maintenance on behalf of the
guest. As of now only the vttbr is private to the guest, but this
is about to change with IPA per VM. Add a helper to load the stage2
configuration for a VM, which could do the right thing with the
future changes.

Cc: Christoffer Dall <cdall@kernel.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-10-01 13:08:41 +01:00
Ard Biesheuvel 9376b1e7b6 arm64: remove unused asm/compiler.h header file
arm64 does not define CONFIG_HAVE_ARCH_COMPILER_H, nor does it keep
anything useful in its copy of asm/compiler.h, so let's remove it
before anybody starts using it.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 11:57:04 +01:00
Will Deacon 24951465cb arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ
arch/arm/ defines a SIGMINSTKSZ of 2k, so we should use the same value
for compat tasks.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Reported-by: Steve McIntyre <steve.mcintyre@arm.com>
Tested-by: Steve McIntyre <93sam@debian.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-10-01 11:44:02 +01:00
Manivannan Sadhasivam e0c27a1066 arm64: actions: Enable PINCTRL in platforms Kconfig
Select PINCTRL for Actions Semi SoCs.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 19:11:33 +02:00
Saravanan Sekar 01463ac63b arm64: dts: actions: s700: Set UART clock references from CMU
Remove fixed clock in Cubieboard 7 and use Clock Management Unit clocks
for all UART nodes in Actions Semi S700 SoC.

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[AF: Moved/added to SoC]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:57:23 +02:00
Saravanan Sekar 8ba92cf593 arm64: dts: actions: s700: Add Clock Management Unit
Add Clock Management Unit for Actions Semi S700 SoC.

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:55:22 +02:00
Manivannan Sadhasivam c432aaa2b2 arm64: dts: actions: s900: Add DMA Controller
Add DMA controller node for Actions Semi S900 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:53:29 +02:00
Manivannan Sadhasivam 07b308eee0 arm64: dts: actions: s900-bubblegum-96: Enable I2C1 and I2C2
Add pinctrl definitions for Actions Semiconductor S900 I2C controllers.
Pinctrl definitions are only available for I2C0, I2C1, and I2C2.
Enable I2C1 and I2C2 exposed on the low speed expansion connector in
Bubblegum-96 board.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[AF: Squashed]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:50:42 +02:00
Manivannan Sadhasivam 5eb76e8a29 arm64: dts: actions: s900: Add I2C controller nodes
Add I2C controller nodes for Actions Semiconductor S900 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[AF: Squashed/added clocks, dropped pinctrl properties for now]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:47:13 +02:00
Manivannan Sadhasivam 29ea7bae20 arm64: dts: actions: s900-bubblegum-96: Add gpio line names
Add gpio line names to Actions Semi S900 based Bubblegum-96 board.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:46:07 +02:00
Manivannan Sadhasivam 48d4c88471 arm64: dts: actions: s900: Add gpio properties to pinctrl node
Add gpio properties to pinctrl node for Actions Semi S900 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:45:56 +02:00
Manivannan Sadhasivam a1d8219f97 arm64: dts: actions: s900: Add pinctrl node
Add pinctrl nodes for Actions Semi S900 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:45:37 +02:00
Manivannan Sadhasivam 6bd9ad12a3 arm64: dts: actions: s900: Add SPS node
Add Actions Semi S900 Smart Power System (SPS) node.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:45:27 +02:00
Manivannan Sadhasivam d3105e47b5 arm64: dts: actions: s900: Source CMU clock for UARTs
Remove fixed clock in Bubblegum-96 board and source CMU (Clock
Management Unit) clock for UART nodes in Actions Semi S900 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[AF: Move/add clocks to SoC]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 18:42:48 +02:00
Manivannan Sadhasivam 4db4a57fe0 arm64: dts: actions: s900: Add Clock Management Unit nodes
Add Actions Semi S900 Clock Management Unit (CMU) nodes.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-30 17:13:11 +02:00
Chen-Yu Tsai 6eeb4180d4
ARM: dts: sunxi: h3-h5: Add Bananapi M2+ v1.2 device trees
Bananapi released an updated revision of the H3/H5 based Bananapi M2+.
Version 1.2 enables voltage control for the CPU's regulator by using
a GPIO line to toggle a MOSFET that can change the effective resistance
value in the regulator's feedback network.

This patch adds a common .dtsi file for this new revision, which
includes the original common sunxi-bananapi-m2-plus.dtsi file, and
adds the GPIO-controlled regulator and a cpu-supply reference. H3
and H5 variant dts files are added as well.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-09-29 15:58:38 +02:00
Chen-Yu Tsai 80c21c8c8b
arm64: dts: allwinner: h5: Add device tree for Bananapi M2 Plus H5
The Bananapi M2 Plus H5 is a variant of the original Bananapi M2 Plus,
with the H3 SoC replaced with an H5. Everything else is the same.

Add a stub device tree incorporating the shared bananapi-m2-plus dtsi
file.

Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-09-29 15:57:46 +02:00
Chen-Yu Tsai bb39ed07e5
arm64: dts: allwinner: h5: Add device node for Mali-450 GPU
The H5 has a Mali-450 GPU with 4 Pixel Processor cores.

Interestingly, while the datasheet lists an interrupt line for the GPU's
PMU, the hardware block itself doesn't seem to have it. Reads from the
PMU address range all return zero, and writes are ignored.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-09-29 15:57:42 +02:00
Leilk Liu 3c2ac5b3eb arm64: dts: Add spi slave dts
This patch adds MT2712 spi slave into device tree.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-09-28 23:05:26 +02:00
Rob Herring de76e70a8d arm64: use for_each_of_cpu_node iterator
Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This
has the side effect of defaulting to iterating using "cpu" node names in
preference to the deprecated (for FDT) device_type == "cpu".

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-09-28 14:25:58 -05:00
Arnd Bergmann d314e6e26d Renesas ARM64 Based SoC Defconfig Updates for v4.20
* Enable recently upstreamed RZ/G2E (r8a774c0) and RZ/G2M (r8a774a1) SoCs
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAlut6ZwACgkQ189kaWo3
 T76tqA/+LEuFpTOW5U02ZzNFjHSTKWMWupfF2Nd1b9/FsrRh5FuSJNnrg97bePqJ
 76ylJMy9S5K86LyAB+thJdsHIvhZA+bSZIbjjmUzKWEbblk9sv35ey4i8SWCG7eQ
 59gMkQW///IqJreRgQ2z1N6R9cnElp58jSS1KX6H0vYwBZ4pcXFiwGrOUWH8Hq8o
 2maZ2LEjrRiWWVwFVVD36klKhvsclRsNh+snyMjYRtG4K/ujmVC2sgVbLgSbfSEi
 posvMffiCB2A3wTmiBeuVhZNtX3+UK5G6DzAKNv2dtHLROUhMMGW4DhcWlul0+x7
 SdbJ6yuI2fheIctXL9ZtI9FqHlF8e7RSNb3+sPq0AXNNjAautPt1loYwGNwO6iR8
 ScaDIYs9xVOLVC7385zYEiYFU8YSzhy31Asyp9+5s1xf02DQL5tItgW3fKstX7rl
 pjjzR0Uy1+Ik6Ggx9je9tf27zftaW2fUMVa/Ad21CZL3W337oUJ0PjFZLI+m2u6X
 UKqGbDFbE4NlckUdxLTarJD2FYRxhqrqqdPyrWNr7Poz0wVO+muNxjx5Fb029naZ
 VbA5LFsHjxt5Vqy3QQJqRHmicTNp3OFF+hhRNNq4xQF6dLJizwUD4uGuHkhyuzZ5
 XBfD4KH8IhPcb/kslf98PQ4ibkaFJCfeaDmdQp3ukIZ8moANDNA=
 =oPv4
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-defconfig-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/defconfig

Renesas ARM64 Based SoC Defconfig Updates for v4.20

* Enable recently upstreamed RZ/G2E (r8a774c0) and RZ/G2M (r8a774a1) SoCs

* tag 'renesas-arm64-defconfig-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: defconfig: enable R8A774C0 SoC
  arm64: defconfig: enable R8A774A1 SoC

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-09-28 18:02:53 +02:00
Arnd Bergmann 0526b92e3a Second Round of Renesas ARM64 Based SoC DT Updates for v4.20
* Remove unneeded status from thermal nodes
 
 * R-Car Gen 3 SoCs:
   - Use 400kHz for I2C DVFS bus
   - Revise USB2.0 properties
 * R-Car Gen 3 SoC based ULCB boards: Add default bootargs
 * R-Car M3-N (r8a77965) SoC based boards: Enable audio with DMA
 
 * R-Car V3M (r8a77970 and V3H (r8a77980) SoCs:
   - Add compare match timer (CMT) support
   - Add timer pulse unit (TPU) support
 * R-Car V3H (r8a77980) and E3 (r8a77990) SoCs:
   - Attach the SYS-DMAC to the IPMMU
 * E3 (r8a77990) SoC: Add display output support
 * R-Car E3 (r8a77990) based Ebisu board:
   - Enable HDMI and CVBS input, and VGA and HDMI display output
 
 * R-Car D3 (r8a77995) SoC: Add LVDS support
 * R-Car D3 (r8a77995) based Draak board: Enable HDMI display output
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAlut7W8ACgkQ189kaWo3
 T74zRA//a6osGbI8tUgygPvuLm1gTySaZWroRZxLdSQ0h41moC3AnHqUnzkzUMoa
 jlSKA+1yjloIRgP3XTUBWIMZST15eFjGW3KkLNbdzvRi0WMzANmbkGD67X4QOZ1T
 pVXWeS9RCHoFihThY5uKSMoOGJPFhHnjXB955gJ2UIfo+Rk+oBNttVfgUgnD6Nn9
 Ye1nWhPzh2+LeOfPzR7KNtg5blLhhlaPuSveadiM92MCahXKipbWNr7uoudBcUiL
 Mgq6NaiPOgdPPgPSNlJHFpxopIwSmrMsZ1WYOq4HSXjxcvRBp83fTSA2xSvWlO4P
 YcICzHtgjmwiNcChIUdaRTCpe3YcDzA10XlJGrTiBAHMRYc7YMUgI1pnPedlkVt5
 tF9tfXY7cKXSucmT0rAR6pmulJvPfXMTcuhCbVBzZj2vaJ2Eg2xXVjJUAe9F7LXT
 UOdc5Y+S66HpF3yQSVG7uZ8V0w1NjjEO0QIwyokhD13hKL6kYNims0vqRoBcHSzK
 +gpi8XXHT7E9nW0J+qFFaO9SUgxbK9+xSYl3BNeNPrnBK9iHA0WNVJCRcde8OB9D
 klD2w4FpEfG8cmvTelSYmoQ8itthU0XwU8qCGxZ2HITuFMaf4Gu9JepQB8Y/O0zl
 hZlZdY4kn3dP9mfxZUVANGP5DrFYFXa3ppI+N+pfumhTXwDVZsQ=
 =QtD1
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-dt2-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt

Second Round of Renesas ARM64 Based SoC DT Updates for v4.20

* Remove unneeded status from thermal nodes

* R-Car Gen 3 SoCs:
  - Use 400kHz for I2C DVFS bus
  - Revise USB2.0 properties
* R-Car Gen 3 SoC based ULCB boards: Add default bootargs
* R-Car M3-N (r8a77965) SoC based boards: Enable audio with DMA

* R-Car V3M (r8a77970 and V3H (r8a77980) SoCs:
  - Add compare match timer (CMT) support
  - Add timer pulse unit (TPU) support
* R-Car V3H (r8a77980) and E3 (r8a77990) SoCs:
  - Attach the SYS-DMAC to the IPMMU
* E3 (r8a77990) SoC: Add display output support
* R-Car E3 (r8a77990) based Ebisu board:
  - Enable HDMI and CVBS input, and VGA and HDMI display output

* R-Car D3 (r8a77995) SoC: Add LVDS support
* R-Car D3 (r8a77995) based Draak board: Enable HDMI display output

* tag 'renesas-arm64-dt2-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: dts: renesas: r8a77965: Add Sound and Audio DMAC device nodes
  arm64: dts: renesas: r8a77995: draak: Enable HDMI display output
  arm64: dts: renesas: r8a77990: ebisu: Enable VGA and HDMI outputs
  arm64: dts: renesas: r8a77995: Add LVDS support
  arm64: dts: renesas: r8a77990: Add display output support
  arm64: dts: renesas: r8a779{7|8}0: add TPU support
  arm64: dts: renesas: revise properties for R-Car Gen3 SoCs' usb 2.0
  arm64: dts: renesas: ulcb: add default bootargs
  arm64: dts: renesas: r8a779{7|8}0: add CMT support
  arm64: dts: renesas: gen3: use 400kHz for I2C DVFS bus
  arm64: dts: renesas: r8a77980: Attach the SYS-DMAC to the IPMMU
  arm64: dts: renesas: r8a77990: Attach the SYS-DMAC to the IPMMU
  arm64: dts: renesas: ebisu: Add HDMI and CVBS input
  arm64: dts: renesas: Remove unneeded status from thermal nodes

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-09-28 17:42:26 +02:00
Arnd Bergmann f62309c873 arm64: tegra: Device tree changes for v4.20-rc1
This contains mostly device tree changes to support faster SDHCI modes
 on Tegra210 and Tegra186.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlutRCATHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoaEeD/9u+1Pv4ygX1eGlBCYoYDLNnzo+Eckn
 KiZzrBnK5Wxl6X/SagxQBOK8QmzTJrIAWo0oRBcUknBWKKlP7xdM4DKHnWhWHvZZ
 d7ulULfWDEaqcLXnlf5LH8XzrkG3UON/AA9IkAkx9jXwv7ipZVzDBN7kiLNBpZbU
 BPra4HRWAw2H7umDC0STSnfQoyvJ0zidk86xEWHNRTkjaQvPjuz7GmKWcgsM6cFv
 mh7ZdCqNYrW09D8CJwaCiSHx5DIVUyfoK9+BWxYyiYe2hOxZJHybVdOWZbjvg2K3
 nD+tsV2/Ej9JUrBuxTz12IQ4Wpz/PQqkXTs3RBfzvh08+4tu20dWyt/Rj9LY5hWE
 R0P4RD3LOMGlycAFiSm30cRQPieYqScHsYsW6FKlE42W/4gyABgItv+nfrIVtBUd
 jg1XlDINhLcVTobKQAztssaPKm0iUbABrfCqccIdBSfSGIUSpxUsSlggmBYs11U+
 +Yj20ObJgKvgY/1/t3VoIOYiSZ3foUq1ykqib1nVS84JJRPYVSMPy6cMu62tLT17
 lyGP9SV/k5KuSrVyGyxtYiDrvWbXb+y4+4+5G3VepFkAo6CCf7GPYl92ZfAFMdGH
 h4IV7nZb3SLxgp7J1KtGXwblegOtt/nEWn4WqtKZiLYukKd1kdZ4wZDQx1lpb40s
 PCZzQrYnEKS/0w==
 =DHnl
 -----END PGP SIGNATURE-----

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

arm64: tegra: Device tree changes for v4.20-rc1

This contains mostly device tree changes to support faster SDHCI modes
on Tegra210 and Tegra186.

* tag 'tegra-for-4.20-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: tegra: I2C on Tegra194 is not compatible with Tegra114
  arm64: dts: tegra186: Enable HS400
  arm64: dts: tegra210: Enable HS400
  arm64: dts: tegra186: Add SDMMC4 DQS trim value
  arm64: dts: tegra210: Add SDMMC4 DQS trim value
  arm64: dts: tegra186: Assign clocks for sdmmc1 and sdmmc4
  arm64: dts: tegra210: Assign clocks for sdmmc1 and sdmmc4
  arm64: dts: tegra186: Add SDHCI tap and trim values
  arm64: dts: tegra210: Add SDHCI tap and trim values
  arm64: dts: tegra186: Add sdmmc pad auto calibration offsets
  arm64: dts: tegra210: Add sdmmc pad auto calibration offsets
  arm64: dts: tegra210-p2597: Remove no-1-8-v from sdmmc1
  arm64: dts: tegra210-p2180: Correct sdmmc4 vqmmc-supply
  arm64: dts: tegra210-p2180: Allow ldo2 to go down to 1.8 V
  arm64: dts: Add Tegra186 sdmmc pinctrl voltage states
  arm64: dts: Add Tegra210 sdmmc pinctrl voltage states

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-09-28 17:41:26 +02:00
Heiko Stuebner 9485107ae8 arm64: defconfig: enable Rockchip Innosilicon hdmiphy
The rk3228 and rk3328 socs use an MMIO-connected hdmi-phy from Innosilicon.
So enable the necessary driver as module.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-28 13:19:57 +02:00
Heiko Stuebner e78d53c7b2 arm64: dts: rockchip: enable display nodes on rk3328-rock64
Enable necessary nodes to get output on the hdmi port of the board.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-28 13:18:37 +02:00
Heiko Stuebner 725e351c26 arm64: dts: rockchip: add rk3328 display nodes
Add the chain of display nodes from the core display-subsystem
through the one vop to the dw-hdmi output.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Robin Murphy <robin.murphy@arm.com>

changes in v3:
- drop reg from hdmi-in-port
changes in v2:
- remove trailing 0 from vop irq
2018-09-28 13:16:30 +02:00
Heiko Stuebner 6c69dfe2af arm64: dts: rockchip: add Innosilicon hdmi phy node to rk3328
The rk3328 uses a hdmiphy from Innosilicon, so add the necessary node
to the rk3328 soc devicetree.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Robin Murphy <robin.murphy@arm.com>
2018-09-28 13:16:23 +02:00
Arnd Bergmann 4bef2317b4 Amlogic ARM64 DT updates for v4.20, round 2
- new SoC support: basic support for G12A family
 - new board: Amlogic U200 board, using G12A SoC
 - fix SPI bus warnings from new dtc updates
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAlurUJkACgkQWTcYmtP7
 xmW/vw//b31pLYbW7LkgVLnc6iG/FcLitYGSNi/vLLnZn7yQYEWiw014sbjrPfkS
 I8MufeoEGKml0l9JaWEKAX1MzEiFWKwBHzdDZZRAjperbYfLfa5YlY/JaO8RWyHH
 9QplBHf1tFCsUK2XKFC85BZ2iu//y3i6bI1lCjf9Vr/dgfoV+Qu7Qu9TMe7bZsec
 a/WhnIoQJbeNyUNL+HDagu9YgN7EGBaH42xrIEOPMyYTROCAg2IBVexjLF1nLNT6
 BDrfMIkuH63DTXmTUTh5ntGJ50OAAuDhMALS4nyn0uGxFuEKBIiogp/v9gXzF9QT
 2sP/1JQwcrVgrKRlyKhtUsLVhv1w5dqP3ym+OCT7gc6Bar17fE3n9T71oeW5G7h+
 0ceW728EzUKTAYKrv9rJ11j7Pjw9m/IrEpdkoqMLRkB5XveFePSxsdNho6QTpuPy
 RLWhJUW2y1kzE5grK2cY1Y+mZqrzkbkiNeoeqYj1yVDU7wTFiWoL6bscFsIOsx9r
 J2+exSf9xgbqll1i1WiZqJmyVpB/kD/iHQiz3ijsUlwy+To4pQMy/yAQqSitfJ7q
 a6SKWZ+U5aFbUbbYxG7+T9QS2exHf4MGanLorYuHC3Vy+Ga7H0dRHFj6rAMQ6vmw
 W0m0ptiIAzB14oET8HMqUvM+sx1GvB2qGqarPRzCMOJVsbxgDO0=
 =TU0T
 -----END PGP SIGNATURE-----

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

Amlogic ARM64 DT updates for v4.20, round 2
- new SoC support: basic support for G12A family
- new board: Amlogic U200 board, using G12A SoC
- fix SPI bus warnings from new dtc updates

* tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson-g12a: add initial g12a s905d2 SoC DT support
  dt-bindings: arm: amlogic: Add Meson G12A binding
  arm64: dts: meson: Fix erroneous SPI bus warnings

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-09-28 12:48:34 +02:00
Arnd Bergmann 262c083d13 Berlin64 DT changes for v4.20
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE2MW6uuYZ+0zBfpF41kg+k28NbwgFAlusjyQACgkQ1kg+k28N
 bwgnlQ//dGWWahz7svLgPGr68IKFRXFYNJGwFW5bnidSvCAj1e61tUS5p8SiRNJw
 CFsUglwfVDxf+n/9jJTlOLhojMz2x6kAjoW/xEKUFSLd+IZQyXq1qF4SITNaa3vG
 KCKT5QQEvAvYZq5YlKeupo16jyy2NDP4Esc/Hy4ZVdLGKW3bnUuDdo9+lrKpbe7A
 DF4Nr6VSo26UOhn5lrf9fnpYaPmjfbcyYzuP7S1ddabxzMWUvd4Y/8bmc2hVt7jO
 e1uZeDSu15DOso4mqQcuilBcASKHKZy+aD5wlUAf5vPptgtuPno5xQ+1JG7xHFpQ
 HkLTmXs0izquon6heS1Ytbrrzw+vF73PFoDratU9Rii8wWonxAvhVsqb/INQ71OO
 nbauVa1URYRzultLcIiSUUYeKlr8lv3gtuOezldVFquGEXpmEKTkczhundZ6ZRFO
 jQkM0UcMgfJWK2fvTySZ59V97V1xSAtWB0O+2jHKiYSEN7HZTJykW4lsvbfYWBFK
 8CKibHpRwtBW0Ifzf+/lPFSZ+1n0K8DN0nSa4SIbmx0vUOISwg48LdSMbZvbokG/
 j3oQpooMDjUA7ZxpQBfXFWdqJ8BXailpygpfub7006b21QTGC722GB6WI9Dxh0RW
 QxRFoZxu//Czxj/O9dfL/92CyXOeIOYNnCEaBdUNoXLjHKAD8yo=
 =l+7s
 -----END PGP SIGNATURE-----

Merge tag 'berlin64-dt-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jszhang/linux-berlin into next/dt

Berlin64 DT changes for v4.20

* tag 'berlin64-dt-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jszhang/linux-berlin:
  arm64: dts: synaptics: add dtsi file for Synaptics AS370 SoC
  dt-bindings: arm: syna: add support for the AS370 SoC
  dt-bindings: arm: move berlin binding documentation to syna.txt

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-09-28 12:37:18 +02:00
Rob Herring 09bae3b64c arm64: dts: lg: Fix SPI controller node names
SPI controller nodes should be named 'spi' rather than 'ssp'. Fixing the
name enables dtc SPI bus checks.

Cc: Chanho Min <chanho.min@lge.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-09-28 12:33:21 +02:00
Rob Herring e9f0878c4b arm64: dts: amd: Fix SPI bus warnings
dtc has new checks for SPI buses. Fix the warnings in node names.

arch/arm64/boot/dts/amd/amd-overdrive.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi'
arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi'
arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dtb: Warning (spi_bus_bridge): /smb/ssp@e1030000: node name for SPI buses should be 'spi'

Cc: Brijesh Singh <brijeshkumar.singh@amd.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-09-28 12:32:51 +02:00
Marek Behún 620cfb31ba arm64: dts: marvell: armada-37xx: add nodes to support watchdog
This adds the system controller node for CPU Miscellaneous Registers
(which is needed for the watchdog node) and the watchdog node.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-09-28 10:00:17 +02:00
Eric W. Biederman c852680959 signal/arm64: Use send_sig_fault where appropriate
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:55:23 +02:00
Eric W. Biederman f3a900b341 signal/arm64: Add and use arm64_force_sig_ptrace_errno_trap
Add arm64_force_sig_ptrace_errno_trap for consistency with
arm64_force_sig_fault and use it where appropriate.

This adds the show_signal logic to the force_sig_errno_trap case,
where it was apparently overlooked earlier.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:55:15 +02:00
Eric W. Biederman 2627f0347c signal/arm64: In ptrace_hbptriggered name the signal description string
This will let the description be reused shortly.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:55:08 +02:00
Eric W. Biederman 009f608ab2 signal/arm64: Remove arm64_force_sig_info
The function has no more callers so remove it.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:55:00 +02:00
Eric W. Biederman b4d5557caa signal/arm64: Add and use arm64_force_sig_mceerr as appropriate
Add arm64_force_sig_mceerr for consistency with arm64_force_sig_fault,
and use it in the one location that can take advantage of it.

This removes the fiddly filling out of siginfo before sending a signal
reporting an memory error to userspace.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:54:51 +02:00
Eric W. Biederman feca355b3d signal/arm64: Add and use arm64_force_sig_fault where appropriate
Wrap force_sig_fault with a helper that calls arm64_show_signal
and call arm64_force_sig_fault where appropraite.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2018-09-27 21:54:43 +02:00
Eric W. Biederman 559d8d91a8 signal/arm64: Only call set_thread_esr once in do_page_fault
This code is truly common between the signal sending cases so share it.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2018-09-27 21:54:33 +02:00
Eric W. Biederman 2d2837fab5 signal/arm64: Only perform one esr_to_fault_info call in do_page_fault
As this work is truly common between all of the signal sending cases
there is no need to repeat it between the different cases.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2018-09-27 21:54:26 +02:00
Eric W. Biederman effb093ad2 signal/arm64: Expand __do_user_fault and remove it
Not all of the signals passed to __do_user_fault can be handled
the same way so expand the now tiny __do_user_fault in it's callers
and remove it.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:54:18 +02:00
Eric W. Biederman aefab2b4c0 signal/arm64: For clarity separate the 3 signal sending cases in do_page_fault
It gets easy to confuse what is going on when some code is shared and some not
so stop sharing the trivial bits of signal generation to make future updates
easier to understand.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:54:10 +02:00
Eric W. Biederman 9ea3a9743c signal/arm64: Consolidate the two hwpoison cases in do_page_fault
These two cases are practically the same and use siginfo differently
from the other signals sent from do_page_fault.  So consolidate them
to make future changes easier.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:54:02 +02:00
Eric W. Biederman f29ad209e4 signal/arm64: Factor set_thread_esr out of __do_user_fault
This pepares for sending signals with something other than
arm64_force_sig_info.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:53:54 +02:00
Eric W. Biederman 1628a7cc85 signal/arm64: Factor out arm64_show_signal from arm64_force_sig_info
Filling in siginfo is error prone and so it is wise to use more
specialized helpers to do that work.  Factor out the arm specific
unhandled signal reporting from the work of delivering a signal so
the code can be modified to use functions that take the information
to fill out siginfo as parameters.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:53:46 +02:00
Eric W. Biederman 24b8f79dd8 signal/arm64: Remove unneeded tsk parameter from arm64_force_sig_info
Every caller passes in current for tsk so there is no need to pass
tsk.  Instead make tsk a local variable initialized to current.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:53:35 +02:00
Eric W. Biederman 6fa998e83e signal/arm64: Push siginfo generation into arm64_notify_die
Instead of generating a struct siginfo before calling arm64_notify_die
pass the signal number, tne sicode and the fault address into
arm64_notify_die and have it call force_sig_fault instead of
force_sig_info to let the generic code generate the struct siginfo.

This keeps code passing just the needed information into
siginfo generating code, making it easier to see what
is happening and harder to get wrong.  Further by letting
the generic code handle the generation of struct siginfo
it reduces the number of sites generating struct siginfo
making it possible to review them and verify that all
of the fiddly details for a structure passed to userspace
are handled properly.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-09-27 21:52:54 +02:00
Borislav Petkov d913e8966a Merge branch 'tip-x86-hygon' into edac-for-4.20
... to pick up a dependent commit and share it with the tip tree, branch
tip:x86/cpu.

Signed-off-by: Borislav Petkov <bp@suse.de>
2018-09-27 18:36:24 +02:00
Ard Biesheuvel c296146c05 arm64/kernel: jump_label: Switch to relative references
On a randomly chosen distro kernel build for arm64, vmlinux.o shows the
following sections, containing jump label entries, and the associated
RELA relocation records, respectively:

  ...
  [38088] __jump_table      PROGBITS         0000000000000000  00e19f30
       000000000002ea10  0000000000000000  WA       0     0     8
  [38089] .rela__jump_table RELA             0000000000000000  01fd8bb0
       000000000008be30  0000000000000018   I      38178   38088     8
  ...

In other words, we have 190 KB worth of 'struct jump_entry' instances,
and 573 KB worth of RELA entries to relocate each entry's code, target
and key members. This means the RELA section occupies 10% of the .init
segment, and the two sections combined represent 5% of vmlinux's entire
memory footprint.

So let's switch from 64-bit absolute references to 32-bit relative
references for the code and target field, and a 64-bit relative
reference for the 'key' field (which may reside in another module or the
core kernel, which may be more than 4 GB way on arm64 when running with
KASLR enable): this reduces the size of the __jump_table by 33%, and
gets rid of the RELA section entirely.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-s390@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jessica Yu <jeyu@kernel.org>
Link: https://lkml.kernel.org/r/20180919065144.25010-4-ard.biesheuvel@linaro.org
2018-09-27 17:56:47 +02:00
Thor Thayer 74121b9aa3 arm64: dts: stratix10: Correct System Manager register size
Correct the register size of the System Manager node.

Cc: stable@vger.kernel.org
Fixes: 78cd6a9d8e ("arm64: dts: Add base stratix 10 dtsi")
Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2018-09-27 09:33:24 -05:00
Rodrigo Exterckötter Tjäder 679294497b arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay
The PHY found on the A64-OLinuXino requires a TX delay in order to
operate properly. Olimex uses a 600ps second delay in their BSP, and
that has been found to work, so let's use that value in the current
DT.

Signed-off-by: Rodrigo Exterckötter Tjäder <rodrigo@tjader.xyz>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-09-27 18:20:35 +08:00
Jisheng Zhang 087682f5a7 arm64: dts: synaptics: add dtsi file for Synaptics AS370 SoC
Add initial dtsi file to support Synaptics AS370 SoC with quad
Cortex-A53 CPUs.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
2018-09-27 14:48:43 +08:00
Suzuki K Poulose 70a39be676 arm64: dts: msm8916: Update coresight bindings for hardware ports
Switch to updated coresight bindings for hw ports

Cc: Andy Gross <andy.gross@linaro.org>
Cc: David Brown <david.brown@linaro.org>
Cc: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-26 11:59:36 -05:00
Arnd Bergmann ba61ab1a23 arm64: zynqmp: SoC changes for v4.20
- Adding firmware API for SoC with debugfs interface
   Firmware driver communicates to Platform Management Unit (PMU) by using
   SMC instructions routed to Arm Trusted Firmware (ATF). Initial version
   adds support for base firmware driver with query and clock APIs.
 
   EEMI spec is available here:
   https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlurMMcACgkQykllyylKDCGE6gCfY2tOaxQCcBUzmh5ZXSUiQdeM
 BA8AoJgu8dBLcD/U9S5+lDlCEMY26eSh
 =tgPT
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-soc-for-v4.20-v2' of https://github.com/Xilinx/linux-xlnx into next/drivers

arm64: zynqmp: SoC changes for v4.20

- Adding firmware API for SoC with debugfs interface
  Firmware driver communicates to Platform Management Unit (PMU) by using
  SMC instructions routed to Arm Trusted Firmware (ATF). Initial version
  adds support for base firmware driver with query and clock APIs.

  EEMI spec is available here:
  https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf

* tag 'zynqmp-soc-for-v4.20-v2' of https://github.com/Xilinx/linux-xlnx:
  firmware: xilinx: Add debugfs for query data API
  firmware: xilinx: Add debugfs interface
  firmware: xilinx: Add clock APIs
  firmware: xilinx: Add query data API
  firmware: xilinx: Add Zynqmp firmware driver
  dt-bindings: firmware: Add bindings for ZynqMP firmware

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-09-26 17:18:53 +02:00
Christoph Hellwig 3cfa210bf3 xen: don't include <xen/xen.h> from <asm/io.h> and <asm/dma-mapping.h>
Nothing Xen specific in these headers, which get included from a lot
of code in the kernel.  So prune the includes and move them to the
Xen-specific files that actually use them instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-09-26 08:45:18 -06:00
Christoph Hellwig c39ae60dfb block: remove ARCH_BIOVEC_PHYS_MERGEABLE
Take the Xen check into the core code instead of delegating it to
the architectures.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-09-26 08:45:11 -06:00
Christoph Hellwig 20e3267601 xen: provide a prototype for xen_biovec_phys_mergeable in xen.h
Having multiple externs in arch headers is not a good way to provide
a common interface.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-09-26 08:45:10 -06:00
Thierry Reding d9fd22447b arm64: tegra: I2C on Tegra194 is not compatible with Tegra114
Tegra194 contains a version of the I2C controller that is no longer
compatible with the version found in Tegra114.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-09-26 15:50:59 +02:00
Antoine Tenart dd0da407bb arm64: dts: marvell: armada-cp110: describe more PPv2 interrupts
This patch describes 3 additional interrupts per PPv2 port. Those
interrupts will be used later in future versions of the Marvell PPv2
driver, and now the device tree description matches the hardware
capabilities.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-09-26 14:29:46 +02:00
Antoine Tenart eeee84f7a6 arm64: dts: marvell: armada-cp110: change the PPv2 IRQ names
This patch changes the PPv2 IRQ names in the CP110 device tree to match
a corresponding change in the Marvell PPv2 driver. The reason this was
updated is the IRQ where names after Tx/Rx interrupts, but this is not
true and can be configured. A following patch will add more of them and
the names wouldn't make sense.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-09-26 14:29:23 +02:00
Baruch Siach a612083327 arm64: dts: add support for SolidRun Clearfog GT 8K
The SolidRun Clearfog GT-8K is based on Marvell Armada 8040 SoC.

  https://wiki.solid-run.com/doku.php?id=products:a8040:clearfoggt8k

The following devices were tested with this DT on top of kernel
v4.19-rc4:

  * 1GB Ethernet WAN

  * 4 ports 1GB Ethernet switch (2.5GB uplink)

  * SFP port

  * SATA on CON3 PCIe slot

  * USB3 type A port

  * SD card and eMMC

  * 2 LEDs

  * 2 push buttons

[gregory: fix block comment alignement]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-09-26 14:23:59 +02:00
Heiko Stuebner 91e75bde63 arm64: dts: rockchip: add missing address and size cells for rk3399 mipi dsi
DSI controllers are also the hosts of their dsi bus and therefore contain
nodes describing the attached panels with their reg properties containing
the virtual ids.

The dsi controller nodes on rk3399 lacked the #address-cells and #size-cells
for these subnodes, so add them.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-26 13:39:18 +02:00
Chen-Yu Tsai cd7ab133db arm64: dts: rockchip: Enable SPI NOR flash on Rock64
The Pine64 Rock64 board comes with a GigaDevice GD25Q128CSIG
or GD25Q127CSIG chip, which is a 128 Mbit SPI NOR flash chip
that supports the JEDEC read-ID command.

This patch enables the SPI controller and adds a device node
for the flash chip using the generic "jedec,spi-nor" comaptible.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-26 13:37:52 +02:00
Akash Gajjar e4f3fb4909 arm64: dts: rockchip: add initial dts support for Rockpro64
Rockpro64 is a rockchip RK3399 based board from pine64.org.
This patch adds basic device node support for Rockpro64 board and make it able
to bring up.

Peripheral Works
- Sdcard
- USB 2.0, 3.0
- Leds
- Ethernet
- Debug console

Not working:
- USB Type-C

Signed-off-by: Akash Gajjar <Akash_Gajjar@mentor.com>
Acked-by: Deepak Das <Deepak_Das@mentor.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-26 13:31:55 +02:00
Takeshi Kihara 158928f38e arm64: dts: renesas: r8a77965: Add Sound and Audio DMAC device nodes
Based on a similar patch of the R8A7796 device tree
by Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-26 12:31:04 +02:00
Ulrich Hecht bcf3003438 arm64: dts: renesas: r8a77995: draak: Enable HDMI display output
Adds LVDS decoder, HDMI encoder and connector for the Draak board.

The LVDS0 and LVDS1 encoders can use the DU_DOTCLKIN0, DU_DOTCLKIN1 and
EXTAL externals clocks. Two of them are provided to the SoC on the Draak
board, hook them up in DT.

Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-26 11:16:41 +02:00
Laurent Pinchart 74fe39abbf arm64: dts: renesas: r8a77990: ebisu: Enable VGA and HDMI outputs
Add the LVDS decoder, HDMI encoder, VGA encoder and HDMI and VGA
connectors, and wire up the display-related nodes with clocks, pinmux
and regulators.

The LVDS0 and LVDS1 encoders can use the DU_DOTCLKIN0, DU_DOTCLKIN1 and
EXTAL externals clocks. Two of them are provided to the SoC on the Ebisu
board, hook them up in DT.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-26 11:14:22 +02:00
Kieran Bingham 0dc733988b arm64: dts: renesas: r8a77995: Add LVDS support
The r8a77995 D3 platform has 2 LVDS channels connected to the DU.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
[uli: moved lvds* into the soc node, added PM domains, resets]
Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-26 11:13:39 +02:00
Jianxin Pan 9c8c52f7cb arm64: dts: meson-g12a: add initial g12a s905d2 SoC DT support
Try to add basic DT support for the Amlogic's Meson-G12A S905D2 SoC,
which describe components as follows: Reserve Memory, CPU, GIC, IRQ,
Timer, UART. It's capable of booting up into the serial console.

Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-09-26 02:04:58 -07:00
Rob Herring b739c177e1 arm64: dts: fsl: Fix I2C and SPI bus warnings
dtc has new checks for I2C and SPI buses. Fix the SPI bus node names
and warnings in unit-addresses.

arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dtb: Warning (i2c_bus_reg): /soc/i2c@2180000/eeprom@57: I2C bus unit address format error, expected "53"
arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dtb: Warning (i2c_bus_reg): /soc/i2c@2180000/eeprom@56: I2C bus unit address format error, expected "52"

Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2018-09-26 17:01:53 +08:00
Laurent Pinchart 13ee2bfc54 arm64: dts: renesas: r8a77990: Add display output support
The R8A77990 (E3) platform has one RGB output and two LVDS outputs
connected to the DU. Add the DT nodes for the DU, LVDS encoders and
supporting VSP and FCP.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-26 11:00:52 +02:00
Rajan Vaja 76582671eb firmware: xilinx: Add Zynqmp firmware driver
This patch is adding communication layer with firmware.
Firmware driver provides an interface to firmware APIs.
Interface APIs can be used by any driver to communicate to
PMUFW(Platform Management Unit). All requests go through ATF.

Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-26 08:47:31 +02:00
Christoph Hellwig 1a0afc14b5 Revert "dma-mapping: clear dev->dma_ops in arch_teardown_dma_ops"
This reverts commit 46053c7368.

This change breaks architectures setting up dma_ops in their own magic
way and not using arch_setup_dma_ops, so revert it.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2018-09-25 15:12:26 -07:00
Nathan Chancellor b5bb425871 arm64: percpu: Initialize ret in the default case
Clang warns that if the default case is taken, ret will be
uninitialized.

./arch/arm64/include/asm/percpu.h:196:2: warning: variable 'ret' is used
uninitialized whenever switch default is taken
[-Wsometimes-uninitialized]
        default:
        ^~~~~~~
./arch/arm64/include/asm/percpu.h:200:9: note: uninitialized use occurs
here
        return ret;
               ^~~
./arch/arm64/include/asm/percpu.h:157:19: note: initialize the variable
'ret' to silence this warning
        unsigned long ret, loop;
                         ^
                          = 0

This warning appears several times while building the erofs filesystem.
While it's not strictly wrong, the BUILD_BUG will prevent this from
becoming a true problem. Initialize ret to 0 in the default case right
before the BUILD_BUG to silence all of these warnings.

Reported-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
2018-09-25 13:26:48 -07:00
Thor Thayer 6b2da9ff05 arm64: dts: stratix10: Add peripheral EDAC nodes
Add the usb and ethernet peripheral ECC nodes using the rria10 format.

Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Cc: robh+dt@kernel.org
Cc: mark.rutland@arm.com
Cc: mchehab@kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-edac@vger.kernel.org
Link: https://lkml.kernel.org/r/1537883342-30180-7-git-send-email-thor.thayer@linux.intel.com
2018-09-25 21:22:57 +02:00
Thor Thayer 446fd7afdc arm64: dts: stratix10: Add SDRAM node
Add the SDRAM node to follow the Arria10 layout and bindings. The
Arria10 SDRAM functions expect this node.

Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Cc: robh+dt@kernel.org
Cc: mark.rutland@arm.com
Cc: mchehab@kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-edac@vger.kernel.org
Link: https://lkml.kernel.org/r/1537883342-30180-4-git-send-email-thor.thayer@linux.intel.com
2018-09-25 21:18:56 +02:00
Thor Thayer 3ce078ffe2 arm64: dts: stratix10: Additions to EDAC System Manager
Add the phandle, address, size and ranges to the Stratix10 System
Manager node to match the existing Arria10 EDAC implementation.

Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Cc: robh+dt@kernel.org
Cc: mark.rutland@arm.com
Cc: mchehab@kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-edac@vger.kernel.org
Link: https://lkml.kernel.org/r/1537883342-30180-2-git-send-email-thor.thayer@linux.intel.com
2018-09-25 21:10:57 +02:00
Liviu Dudau 74cf77e8be arm64: dts: broadcom: Use the .dtb name in the rule, rather than .dts
Commit a7eb26392b ("arm64: dts: broadcom: Add reference to Compute
Module IO Board V3") adds the bcm2837-rpi-cm3-io3.dts file as a target
in the Makefile, rather than the .dtb name. This will skip the
generation of the .dtb file at compile time and will fail the dtbs_install
target.

Fixes: a7eb26392b ("arm64: dts: broadcom: Add reference to Compute Module IO Board V3")
Signed-off-by: Liviu Dudau <liviu@dudau.co.uk>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-25 11:49:51 -07:00
Olof Johansson 478bf0b470 ARM64: hisilicon: defconfig updates for 4.20
- Enable integrated NIC driver(hns3) for hisilicon SoCs
 - Enable PCIe Port bus to support some PCIe features like
   AER, hotplug, PME and DPC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJbpPB2AAoJEAvIV27ZiWZcskQP/R46DBO5oq8y1UUjPFTr7Rxb
 MAwSgEFGPuI+bDafgSVMKGU92soMDeyE467dxvUz2Ik42ZQHIgjQIAqSx1QNrfjh
 0hqPMBgnyiBUMSOmyCrvADNnYHu0gs+maGVDcZfkhmghq3mGkH5vtdh0kkZ5PaeY
 tifDhis36E7fr/rynSdpcmQELt/9Hbueh6/Cn4+hnWR/bNA0wcpmdwYMXH1Sx0ma
 iAVYJAyJYwOS8feZcQyTm2ZhRbIyX8QURT/rP66+J/u0PgGgBF4rmLvLHCeMeKzD
 SYb+7a2IenLplqXTZjNHC/k3adO89nfCG6GsHr1UsDBgXnwc+oVT40enf7P8ibww
 mPEw/3ISnUiFjrcpN25w+1M5/NaG98DCM2a0jCTr51jJavjXbB+ZCtYI7Z8VmvDE
 /lD94PPgvR4O2vEG3jsWJwTuIdjvF0Vm8efpCPohV7MPghn+2OYXKUy5K+oeVtLx
 WaHat7ucV9ONkxsOUMUvtMvI+ZWTNTiw3mcWvK79+GYwSVz9iET4U6RY1fITMcZM
 odRNxnk97wh7CWuO3N2y2kBrIQk4GC2tssqxL2r4rICQeeusNvxFWvpp7p7tHl3P
 CMnpLGZ/XxS2LD2yUvXeIxL7Ouo+Whf/tYamPJUxXOf1zT4K6q4O/YQYmZIiZmSB
 UcFKOl9+9xnFRZieU6fF
 =Gn5v
 -----END PGP SIGNATURE-----

Merge tag 'hisi-defconfig-for-4.20' of git://github.com/hisilicon/linux-hisi into next/defconfig

ARM64: hisilicon: defconfig updates for 4.20

- Enable integrated NIC driver(hns3) for hisilicon SoCs
- Enable PCIe Port bus to support some PCIe features like
  AER, hotplug, PME and DPC

* tag 'hisi-defconfig-for-4.20' of git://github.com/hisilicon/linux-hisi:
  arm64: defconfig: Enable PCIEPORTBUS
  arm64: defconfig: enable HiSilicon HNS3 driver

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-25 11:39:42 -07:00
Ryder Lee 0b6286dd96 arm64: dts: mt7622: add bananapi BPI-R64 board
Add support for the bananapi R64 (BPI-R64) development board from
BIPAI KEJI. Detailed hardware information for BPI-R64 which could be
found on http://wiki.banana-pi.org/Banana_Pi_BPI-R64

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-09-25 17:08:29 +02:00
Ryder Lee 8be2c4ae2f arm64: dts: mt7622: fix ram size for rfb1
Fix ram size to 512 megabytes and sort nodes in alphabetical order.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Acked-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-09-25 17:08:28 +02:00
Ryder Lee e1dd05824a arm64: dts: mt7622: add a bluetooth 5 device node
Add a built-in bluetooth 5 support for MT7622.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Acked-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-09-25 17:08:28 +02:00
Ryder Lee 9cc7f0de9e arm64: dts: mt7622: add timer, CCI-400 and PMU nodes
Add device tree entries for timer, ARM CCI-400 and its PMU.
Otherwise, we add a cortex-a53-pmu node to enable hw perfevents.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-09-25 17:08:00 +02:00
Jun Yao 8eb7e28d4c arm64/mm: move runtime pgds to rodata
Now that deliberate writes to swapper_pg_dir are made via the fixmap, we
can defend against errant writes by moving it into the rodata section.
Since tramp_pg_dir and reserved_ttbr0 must be at a fixed offset from
swapper_pg_dir, and are not modified at runtime, these are also moved
into the rodata section. Likewise, idmap_pg_dir is not modified at
runtime, and is moved into rodata.

Signed-off-by: Jun Yao <yaojun8558363@gmail.com>
Reviewed-by: James Morse <james.morse@arm.com>
[Mark: simplify linker script, commit message]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-25 15:10:55 +01:00
Jun Yao 2330b7ca78 arm64/mm: use fixmap to modify swapper_pg_dir
Once swapper_pg_dir is in the rodata section, it will not be possible to
modify it directly, but we will need to modify it in some cases.

To enable this, we can use the fixmap when deliberately modifying
swapper_pg_dir. As the pgd is only transiently mapped, this provides
some resilience against illicit modification of the pgd, e.g. for
Kernel Space Mirror Attack (KSMA).

Signed-off-by: Jun Yao <yaojun8558363@gmail.com>
Reviewed-by: James Morse <james.morse@arm.com>
[Mark: simplify ifdeffery, commit message]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-25 15:10:55 +01:00
Jun Yao 2b5548b681 arm64/mm: Separate boot-time page tables from swapper_pg_dir
Since the address of swapper_pg_dir is fixed for a given kernel image,
it is an attractive target for manipulation via an arbitrary write. To
mitigate this we'd like to make it read-only by moving it into the
rodata section.

We require that swapper_pg_dir is at a fixed offset from tramp_pg_dir
and reserved_ttbr0, so these will also need to move into rodata.
However, swapper_pg_dir is allocated along with some transient page
tables used for boot which we do not want to move into rodata.

As a step towards this, this patch separates the boot-time page tables
into a new init_pg_dir, and reduces swapper_pg_dir to the single page it
needs to be. This allows us to retain the relationship between
swapper_pg_dir, tramp_pg_dir, and swapper_pg_dir, while cleanly
separating these from the boot-time page tables.

The init_pg_dir holds all of the pgd/pud/pmd/pte levels needed during
boot, and all of these levels will be freed when we switch to the
swapper_pg_dir, which is initialized by the existing code in
paging_init(). Since we start off on the init_pg_dir, we no longer need
to allocate a transient page table in paging_init() in order to ensure
that swapper_pg_dir isn't live while we initialize it.

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

Signed-off-by: Jun Yao <yaojun8558363@gmail.com>
Reviewed-by: James Morse <james.morse@arm.com>
[Mark: place init_pg_dir after BSS, fold mm changes, commit message]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-25 15:10:54 +01:00
Jun Yao 693d5639b4 arm64/mm: Pass ttbr1 as a parameter to __enable_mmu()
In subsequent patches we'll use a transient pgd during the primary cpu's
boot process. To make this work while allowing secondary cpus to use the
swapper_pg_dir, we need to pass the relevant TTBR1 pgd as a parameter
to __enable_mmu().

This patch updates __enable__mmu() to take this as a parameter, updating
callsites to pass swapper_pg_dir for now.

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

Signed-off-by: Jun Yao <yaojun8558363@gmail.com>
Reviewed-by: James Morse <james.morse@arm.com>
[Mark: simplify assembly, clarify commit message]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-25 15:10:54 +01:00
Jagan Teki f4e4453aa9 arm64: dts: allwinner: a64: Enable HDMI output on A64 boards w/ HDMI
Enable all necessary device tree nodes and add connector node to device
trees for all supported A64 boards with HDMI.

Jagan, tested on BPI-M64, OPI-Win, A64-Olinuxino, NPI-A64
Vasily, tested on pine64-lts

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
[Icenowy: squash all board patches altogether and change supply name]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-09-25 17:38:12 +08:00
Jagan Teki e85f28e047 arm64: dts: allwinner: a64: Add display pipeline
Allwinner A64 have a display pipeline with 2 mixers/TCONs, the first
TCON is connected to LCD and the second is to HDMI.

The HDMI controller/PHY pair is similar to the one on H3/H5.

Add all required device tree nodes of the display pipeline, including
the TCON0 LCD one and the TCON1 HDMI one.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
[Icenowy: refactor commit message and add 1st pipeline]
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2018-09-25 17:38:07 +08:00
Robin Murphy 7adb562c3e arm64/dma-mapping: Mildly optimise non-coherent IOMMU ops
Whilst the symmetry of deferring to the existing sync callback in
__iommu_map_page() is nice, taking a round-trip through
iommu_iova_to_phys() is a pretty heavyweight way to get an address we
can trivially compute from the page we already have. Tweaking it to just
perform the cache maintenance directly when appropriate doesn't really
make the code any more complicated, and the runtime efficiency gain can
only be a benefit.

Furthermore, the sync operations themselves know they can only be
invoked on a managed DMA ops domain, so can use the fast specific domain
lookup to avoid excessive manipulation of the group refcount
(particularly in the scatterlist cases).

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2018-09-25 10:23:16 +02:00
Nipun Gupta 4f973ed321 arm64: dts: ls208xa: comply with the iommu map binding for fsl_mc
fsl-mc bus support the new iommu-map property. Comply to this binding
for fsl_mc bus.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2018-09-25 09:47:53 +02:00
Sergei Shtylyov dd809b7de2 arm64: dts: renesas: r8a779{7|8}0: add TPU support
Describe TPU in the R8A779{7|8}0 device trees.

Based on the original (and large) patches by Vladimir Barinov.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-25 09:41:52 +02:00
Yoshihiro Shimoda 737e05bf03 arm64: dts: renesas: revise properties for R-Car Gen3 SoCs' usb 2.0
R-Car Gen3 SoCs need to enable/deassert clocks/resets of both usb 2.0
host (included phy) and peripheral. Otherwise, other side device
cannot work correctly. So, this patch revises properties of clocks
and resets. After that, each device driver can enable/deassert
clocks/resets by its self.

Notes:
 - To work the renesas_usbhs driver correctly when host side drivers
   are disabled and the renesas_usbhs driver doesn't have multiple
   clock management, this patch doesn't change the order of the clocks
   property in each hsusb node.
 - This patch doesn't have any side-effects even if the renesas_usbhs
   driver doesn't have reset_control and multiple clock management.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-25 09:18:55 +02:00
Christoph Hellwig 6a9f5f240a block: simplify BIOVEC_PHYS_MERGEABLE
Turn the macro into an inline, move it to blk.h and simplify the
arch hooks a bit.

Also rename the function to biovec_phys_mergeable as there is no need
to shout.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-09-24 12:33:54 -06:00
Krzysztof Kozlowski 2352ae1306 arm64: ARM: dts: exynos: Remove double SD card detect pin inversion on TM2
MMC host controller bindings and MMC core defines card detect pin as
active low.  Therefore there is no point to invert it twice.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
2018-09-24 19:30:54 +02:00
Steve Capper 031e6e6b4e arm64: hugetlb: Avoid unnecessary clearing in huge_ptep_set_access_flags
For contiguous hugetlb, huge_ptep_set_access_flags performs a
get_clear_flush (which then flushes the TLBs) even when no change of ptes
is necessary.

Unfortunately, this behaviour can lead to back-to-back page faults being
generated when running with multiple threads that access the same
contiguous huge page.

Thread 1                     |  Thread 2
-----------------------------+------------------------------
hugetlb_fault                |
huge_ptep_set_access_flags   |
  -> invalidate pte range    | hugetlb_fault
continue processing          | wait for hugetlb_fault_mutex
release mutex and return     | huge_ptep_set_access_flags
                             |   -> invalidate pte range
hugetlb_fault
...

This patch changes huge_ptep_set_access_flags s.t. we first read the
contiguous range of ptes (whilst preserving dirty information); the pte
range is only then invalidated where necessary and this prevents further
spurious page faults.

Fixes: d8bdcff287 ("arm64: hugetlb: Add break-before-make logic for contiguous entries")
Reported-by: Lei Zhang <zhang.lei@jp.fujitsu.com>
Signed-off-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-09-24 17:51:50 +01:00
Steve Capper 469ed9d823 arm64: hugetlb: Fix handling of young ptes
In the contiguous bit hugetlb break-before-make code we assume that all
hugetlb pages are young.

In fact, remove_migration_pte is able to place an old hugetlb pte so
this assumption is not valid.

This patch fixes the contiguous hugetlb scanning code to preserve young
ptes.

Fixes: d8bdcff287 ("arm64: hugetlb: Add break-before-make logic for contiguous entries")
Signed-off-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-09-24 17:51:50 +01:00
Heiko Stuebner 2ed30cfcf8 arm64: dts: rockchip: enable dwc2-based otg controller on px30-evb
Enable the newly added controller on the px30 evaluation board.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-24 15:46:29 +02:00
Heiko Stuebner bb5981333f arm64: dts: rockchip: add dwc2 otg controller on px30
Add the node for the dwc2-based otg controller on the px30 soc.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-24 15:46:24 +02:00
Tri Vo 2a6c7c367d arm64: lse: remove -fcall-used-x0 flag
x0 is not callee-saved in the PCS. So there is no need to specify
-fcall-used-x0.

Clang doesn't currently support -fcall-used flags. This patch will help
building the kernel with clang.

Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Tri Vo <trong@android.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-24 10:56:24 +01:00
Kuninori Morimoto ae3d16b93c arm64: dts: renesas: ulcb: add default bootargs
It can't boot without bootargs settings on Uboot on ulcb board.
This patch adds missing default bootargs.
ulcb BSP can overwrite it by own UBoot settings.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-24 11:19:07 +02:00
Olof Johansson 42724dd893 ARM64: DT: Hisilicon SoC DT updates for 4.20
- Add missing clocks for Hi6220
 - Switch to updated coresight bindings for Hi6220
 - Add DT bindings and support for Hi3670 SoC and HiKey970 board
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJbpPu0AAoJEAvIV27ZiWZcOU8P/RrzQOp1PKIQwmwaAW6Ra820
 urcpY1bhYUYXrCA60BiTy9hzjqEi2kWljEcmoQoEIpF/I8TujIrUOX9ybvuexewP
 yTsdNmm5HidOm4e02Tk95ygSuRNyHkLexCe0adzfK0eTMQx7SPgcBMqEys++oZw+
 +vqyj2HxIPOp9fs71aqhPEjK1c0yePozk//Ss2tW5WZh5LGoGbbaZvU/EmokY+f3
 uNQn6y+/sTDxnVqew4lVHe1JpV9nRfFhpbR5/Ggj5nzcGAea89GevS5l9mV3l63e
 blAPzOsihUyBgmqfM+HOGEu/ExWqL7bI6ia1j8qGzDUZUP5oOtXnw2wXwbHw0SiR
 DTK2joRiAIA/8W01iCBiNZtWzXPjQvafoJilXXwI7TxdT70WPpFM9xcMSx5kXbXq
 sN0y/QmxD6KV6yYmizKgB8TkrLSNH+jYLrFryuR2URCrADT0p50k5Fn5EI07oeaE
 zr3vxU06vN2D0CMavLBvn1r+HwNwquaz35kBoXNdGZKfoi7SJ0Y70nfDYJj6tzNU
 aU3a5J3eV26sFyIuKJxLBjhYWzv6I/3LQ63OWgnjjYzwcRy8fkWN7qlZjxuWYBO9
 HQgnSO1/+vTM6zzb6AHS+Y1qY5F5EMLz9DSA+R6jtH3qr2qRAAed+4DkurP3NNMX
 S+rdLQrm4jeg4yjwk59i
 =64/5
 -----END PGP SIGNATURE-----

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

ARM64: DT: Hisilicon SoC DT updates for 4.20

- Add missing clocks for Hi6220
- Switch to updated coresight bindings for Hi6220
- Add DT bindings and support for Hi3670 SoC and HiKey970 board

* tag 'hisi-arm64-dt-for-4.20' of git://github.com/hisilicon/linux-hisi:
  arm64: dts: Add devicetree support for HiKey970 board
  dt-bindings: arm: hisilicon: Add binding for HiKey970 board
  arm64: dts: Add devicetree for Hisilicon Hi3670 SoC
  dt-bindings: arm: hisilicon: Add binding for Hi3670 SoC
  arm64: dts: hi6220: Update coresight bindings for hardware ports
  arm64: dts: hisilicon: Add missing clocks property for CPUs

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-23 06:37:47 -07:00
Olof Johansson f240bd3b4b TI AM654 support for v4.20 merge window.
This branch adds changes for the Texas Instruments AM654 SoC. Included
 changes are:
 - Add uart nodes
 - Change address cells and size-cells of interconnect tfrom 1 to 2
 - Add secure proxy instance for main domain
 - Add DMSC support
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEtQ6szHmfiBT7fujkyvq9MXlQGhEFAluiEF0QHHQta3Jpc3Rv
 QHRpLmNvbQAKCRDK+r0xeVAaETGgD/0dGzHmCvGHPIonYXjdpzNeEQwyyCbQJ0bW
 zRWBx1Cr6rZzjYUkZL8QYgztSM+v6CRWIvoSEUYhBAVsZTAoR0gYLU0wGVwDriT2
 HxlEMFx61N5wnojNpcn50lgDv8tl5P9lCEvdTixoclsDY4pFjVhEtyqwjRszEa92
 wiXnk6ALMCfPzxg9z2LlVDHvUdrUG0UDN97z/+gmz/YYC5Y+0RkbHCxB3G3LpW7F
 p15LnuWI3Ar8kP1X8mzXrA8MU2au/dMAYOjdpg7wY5Z56kB0c/oudf/NxkeULM+E
 MLMNem+rK9CblYZu3UPPWe2+j73mF9eeeOX1SdZtsnSwQNP2exKQt/nvR7Zt8JzH
 npbU1eEtkvXNHR0yIDN60+VO/KEIVCBXbG3nqHWL4DPoA9z+AOjmeH8tLC5VieHV
 /kfE2mB7cRSJmAhx6nZMhy+Q756A/t9IIi09OhHYFEkglA2e9jrBPF0aFeWhdd/Y
 HR8/+WN369Lj+W6VGt031NMmejB7U3HhlGBLYh2ltTkEyBgTQfehMlAG2kuR7b9o
 wcj3sNuXoXOoVvBt+OAKHXblSskcoK8pMl2PtRcJHYWPxJubidyQWETj0hYIshle
 P92OW8KCqdgWqPtS8HSvfivtoLuvFgv53b0YYklvz+orz8bp+XBW/7MKkkc4UhQ0
 PGdJ074hEw==
 =VyVP
 -----END PGP SIGNATURE-----

Merge tag 'am654-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into next/dt

TI AM654 support for v4.20 merge window.

This branch adds changes for the Texas Instruments AM654 SoC. Included
changes are:
- Add uart nodes
- Change address cells and size-cells of interconnect tfrom 1 to 2
- Add secure proxy instance for main domain
- Add DMSC support

* tag 'am654-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux:
  arm64: dts: ti: k3-am6: Add Device Management Security Controller support
  arm64: dts: ti: am654: Add secure proxy instance for main domain
  arm64: dts: ti: am654: Add uart nodes
  arm64: dts: ti: k3-am65: Change #address-cells and #size-cells of interconnect to 2

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-23 06:31:04 -07:00
Olof Johansson 6302cbe759 ARMv8 Juno/Vexpress updates for v4.20
1. Enablement of scatter gather mode for CoreSight TMC-ETR routing
 
 2. Usage of updated coresight graph bindings that eliminates loads of
    dtc warnings
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJboNc1AAoJEABBurwxfuKY2DcP/1R+z1wUvJBryuICwcs3uohL
 UGRUqYk0RUbfIRc87bc41fBY4/wjiPqQrtfMoMyjEUdujaCIwsiPzcvX0igKcWD+
 8GZt608EBchD15iXmi8LwvpFvLxNAnRCaeckfPESp4XujmXcUgbXNu9FVfDRCUmF
 NP1FiMEHygKoAfSBVjwe1xFCdfAwgsVlSOI8tZkeQsEWIRy13SM87khjkudvbNt9
 mui9twAFBm/Z1C0BkO4wTVLLPxKh+pVDgMyXcGRjFsgeWLoCX3lRv1y3TVgVSRtk
 vVd5EAZ9XEcTaLYWVXYf8KxecXtqLgndckrcg+kxuVy0gdzLfn9Qr0fp2fi6NoGZ
 6EJJOcJVzkZvNSK1C7KXGvs7kpmdFDHYFC5iywzmxca2HLeMiBEwsXy6ffpwKRjl
 36bh45hWrdTT/RYY8F5UxY3+ZA0Wq3Xi1hM9ISW6ou/0E/j2VXr0DWyaS/TZOUeq
 sXi+wr1kxC88Jn5zz99tS3TztighW78CETgGG0MXBlEAZ4U4PkV56sT8kOuuA637
 uCgeI6YJp3Wg9pa1Eoua2IbDS3QOC7sNUskBcGzKbZEAGh9+hOt/O/a8Hm8O8QFR
 pSa/W1q65WqmRCPSHQhpPGyguQQ472YxwGVTlsIQMdLBcEEvl28sNFc7+zRUoPmw
 FhWmibrOflWFU9mn4Jhk
 =RifB
 -----END PGP SIGNATURE-----

Merge tag 'juno-updates-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/dt

ARMv8 Juno/Vexpress updates for v4.20

1. Enablement of scatter gather mode for CoreSight TMC-ETR routing

2. Usage of updated coresight graph bindings that eliminates loads of
   dtc warnings

* tag 'juno-updates-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  arm64: dts: juno: Enable coresight tmc scatter gather in ETR
  arm64: dts: juno: Update entries to match latest coresight bindings

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-23 06:28:51 -07:00
Olof Johansson b610209c5d This pull request contains Broadcom ARM64-based SoCs Device Tree changes
for 4.20, please pull the following:
 
 - Stefan provides a reference to the Compute Module IO Board V3 such
   that we can reference the arm counterpart and still build it for arm64
 
 - Rob fixes I2C and SPI bus warnings which are going to show up with his
   update to DTC scheduled for 4.20
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAlucSiIACgkQh9CWnEQH
 BwT0SRAAlVOGMEJWfVxF/AdSYZWhOAvZspnyIXsC0qXS35bFVaA+gtIAkle6xHMr
 R2048FBviwlwB/vLZUqJh3q7Prw0F05Y3cdP4vFuKiIVXFZXOxcSHK51PFJSpMgJ
 fCpcYdVSR1aVfhWcvffi6VPDdn+3pJPbf3CNxNpNL2gJ5cq8eISSM0mAUKpe3qz6
 Zu2lGG4VGOAHa86d+PTSyHvFrK3gbQJgYA6ZZoY6FyU/U4Etobef30vwnXrdREuB
 D8oToGn0iNDSNp5T1K0v3Qm3gtRL2fORU2kpLjWvLXVuBz6aA3iLxWEb84fyzrU5
 y93jBSsGg8heWnFhcGI05TPT8UHcrz8wMYAHkJIhxmSGLTrcNCr6wsSZIzR2DImL
 Ap63dPD/OzUoR9jbWU2Q4vXgL93KBRDqR/e312CcmtnikKf8r0NJlJ0fil8yehTP
 GyjWYGZkoNz3S1Bjx0lFGZC2VQScSQDwAiUHkTr0oAhVqZOOI0vcG/pgayQg6ZN9
 Jvug9zSG6T4GruJn2QBmkX+Daekf56ZOMIvtY/zmTUQy7XMNyIDsidsDQm4eK6gY
 WUw1ez7tORqzzQkqNwp4E1JiSUBZlxA98a/3xxAhh+b1LK1qHrCRumfpECTR64vN
 h5SZuI3exjIQ8TMnk029ldt/IU8mjd4gyhdgFyEs9ceeX+9tQjs=
 =Ulpq
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-4.20/devicetree-arm64' of https://github.com/Broadcom/stblinux into next/dt

This pull request contains Broadcom ARM64-based SoCs Device Tree changes
for 4.20, please pull the following:

- Stefan provides a reference to the Compute Module IO Board V3 such
  that we can reference the arm counterpart and still build it for arm64

- Rob fixes I2C and SPI bus warnings which are going to show up with his
  update to DTC scheduled for 4.20

* tag 'arm-soc/for-4.20/devicetree-arm64' of https://github.com/Broadcom/stblinux:
  arm64: dts: broadcom: Fix I2C and SPI bus warnings
  arm64: dts: broadcom: Add reference to Compute Module IO Board V3

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-23 06:28:19 -07:00
Olof Johansson 68df1dba22 Amlogic ARM64 DT updates for v4.20
- AXG: cleanup/reorder nodes
 - AXG: add audio PDM support for s400 board
 - GX: increase CMA memory size
 - GX: new canvas driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAluaj9QACgkQWTcYmtP7
 xmXcKw//VD2TEK1XxYTULWnWxGQsTRmTDXvyr6CGMSQbt1xJATQYKLUCEeYKlLtT
 7TRnwUAyIWe4ql+m176j6VZ30V10xtyiBxoyhjm3KHGS4E45xe/iu4OBOQ5zb9U2
 CVZO+/TwaTBterrSpnLJDKDerf9x9Swdm+EBbsxd79hKOU75DlU/Ml0F+st2WG6N
 Hlwgl14xwotVWlXhp2si4AHvKi7GoZUnDu7qjQrssvK3cJM3eJloN8lVNWKCokJ8
 kzWgm9M4W26oydekkdDnNgy4MWFqeWaX8XwJW/SEPM7Jhpu80J+luUa9eCQmq7ck
 4xZnXiDTNfsY8HOxoYoRG8HJeTc2G0qZIPe9K0Ra2HOjAd6pAaFm7hCzcY71mrrf
 98K7EEAJVsuRgz8PykiWpS+b697ufVVYQk5KArZQ+ADnq744VH0G5a0Mv0iopDKD
 /vlJbTopsYaPjC33WyGWHdsIkm2amBv6BLW94sogYZJAO9hlSvQOuH5uSDXNKmeM
 vDwkPoLK5XPGEXZ1QqhwvfB3C8DnQFJI0cTUkcvXYlxJRrLogqR9l4ziOThAU2GI
 4Af7JTmWlftIe3xhMQ+Y1kJ6JXztpOPIHxGmUFhSBl79naH5cvcN8WeisM/P+a1A
 inA3zPLlHLtC/OQnqU366QdjRgz8L317Fdtx5nkxNlAPQcaHPrk=
 =Op/z
 -----END PGP SIGNATURE-----

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

Amlogic ARM64 DT updates for v4.20
- AXG: cleanup/reorder nodes
- AXG: add audio PDM support for s400 board
- GX: increase CMA memory size
- GX: new canvas driver

* tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: dts: meson: Switch simple-mfd and syscon order
  arm64: dts: meson-axg-s400: Add chosen and memory nodes
  arm64: dts: meson-axg: use the proper compatible for ethmac
  arm64: dts: meson-axg: s400: add pdm to the sound card
  arm64: dts: meson-axg: s400: add dmic codec
  arm64: dts: meson-axg: add pdm
  arm64: dts: meson-gx: add dmcbus and canvas nodes.
  arm64: dts: meson: libretech: update board model
  arm64: dts: meson-gx: increase default shared CMA pool size
  arm64: dts: meson-axg: sort nodes consistently
  arm64: dts: meson-axg: s400: add sound card
  arm64: dts: meson-axg: s400: enable audio devices
  arm64: dts: meson-axg: add audio fifos

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-23 06:21:10 -07:00
Olof Johansson 923769f7b3 New soc support for the px30 quad-core Cortex-A35.
New boards are the px30 eval board and roc-rk3399-pc.
 The rk3328 got support for the one gpio controlled via the general
 register files and the rk3399 finally got its idle-states defined.
 And finally fixes and improvements for firefly-rk3399 (wifi),
 roc-rk3328-cc (sdmmc-uhs, io-domains), rk3328-rock64 (gpio-regulator
 pin fix) and rk3399-sapphire (gpio-regulator pin fix, pmic pin fix
 and type-c port supply).
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAluaaskQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgTTdCACrfKOzRBY7rAmuo5abqWZGsAmbVLFmC/dG
 ssxdF9uUAKS2vOV2OKu4364RZgBTXI4Ko+k4IT/mbQbAOduvlrcdHoB+a0IzSJJj
 WGpFKTyt63uL9V34sLSXfJ7f0NevWXnBT54tisbvfOVHC+ysJ6MrvEiGl6eDcCkh
 Hweejd/tzryFefgn4r2TClsGtew45cSo2ZO9IHNTaLSNxL2yz6r3jCwmWl3P7a8o
 eBfvOllg/5FYKL1ybXs6/RJBOeowzOk9RBr9r2Q+7EGD6XsuU4W1DXc8wI57xwXP
 bYP/JfQR/yGrJuX+eA6XxkMoGXu5VWSu6PFnyupIGpmJz2EG/kGL
 =T4U2
 -----END PGP SIGNATURE-----

Merge tag 'v4.20-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt

New soc support for the px30 quad-core Cortex-A35.
New boards are the px30 eval board and roc-rk3399-pc.
The rk3328 got support for the one gpio controlled via the general
register files and the rk3399 finally got its idle-states defined.
And finally fixes and improvements for firefly-rk3399 (wifi),
roc-rk3328-cc (sdmmc-uhs, io-domains), rk3328-rock64 (gpio-regulator
pin fix) and rk3399-sapphire (gpio-regulator pin fix, pmic pin fix
and type-c port supply).

* tag 'v4.20-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Add type-c port supply on rk3399-sapphire board
  arm64: dts: rockchip: fix vcc_host1_5v pin assign on rk3328-rock64
  arm64: dts: rockchip: add WiFi module support for Firefly-RK3399
  arm64: dts: rockchip: remove dvs2 pinctrl from pmic on rk3399-sapphire
  arm64: dts: rockchip: Fix VCC5V0_HOST_EN on rk3399-sapphire
  arm64: dts: rockchip: re-order vcc_sys on rk3399-sapphire
  arm64: dts: rockchip: add missing vop properties for px30
  arm64: dts: rockchip: Add idle-states to device tree for rk3399
  arm64: dts: rockchip: add sdmmc UHS support for roc-rk3328-cc
  arm64: dts: rockchip: add GRF GPIO controller to rk3328
  arm64: dts: rockchip: add io-domain to roc-rk3328-cc
  arm64: dts: rockchip: add PX30 evaluation board devicetree
  arm64: dts: rockchip: add core dtsi file for PX30 SoCs
  dt-bindings: rockchip: grf: add grf and pmugrf description for px30
  arm64: dts: rockchip: add support for ROC-RK3399-PC board

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-23 06:20:06 -07:00
Olof Johansson 89cb3a4c97 Renesas ARM64 Based SoC DT Updates for v4.20
* Correct whitespace around assignments
 
 * R-Car Gen-3 SoCs:
   - Enable SDR104 for SD devices
   - Include R-Car product name in DTSI files to ease maintenance
 * R-Car Gen-3 SoC based boards: Convert to new LVDS DT bindings
 * R-Car Gen 3 Salvator-X and Salvator-XS boards:
   - Override secondary addresses of ADV748x to avoid address conflicts
 * R-Car Gen 3 based Salvator-XS board: Enable SATA
 
 * R-Car M3-N (r8a77965) SoC:
   - Add FDP1 device nodes
   - Move arm_cc630p and timer nodes to restore sort-order of file
   - Correct clock/reset for usb2_phy1
   - Correct HS-USB compat string
   - Add OPPs table for cpu devices enabling CPUFreq support
   - Add CAN device placeholder nodes to facilitate adding
     initial device tree for KF daughter board
   - Attach SYS-DMAC to the IPMMU
 * R-Car M3-N (r8a77965) based ULCB board:
   - Initial device tree for board and KF daughter board
 
 * R-Car E3 (r8a77990) SoC:
   - Add SYS-DMAC, I2C VIN, CSI-2, MSIOF device nodes
   - Add BRG support to SCIF2 which allows an increase in serial clock accuracy
   - Use CPG/MSSR and SYSC binding definitions
 * R-Car E3 (r8a77990) based Ebisu board: Enable PWM
 
 * R-Car D3 (r8a77995) SoC: Attach the SYS-DMAC to the IPMMU
 * R-Car D3 (r8a77995) based Draak board: Sort device nodes
 
 * R-Car V3H (r8a77980) based V3HSK board:
   - Move lvds0 node to restore sort-order of file
 * R-Car V3H (r8a77980) SoC:
   - Add RWDT, CSI2 and VIN, Cortex-A53 PMU nodes
   - Move IPMMU and CAN clock nodes to restore sort-order of file
 
 * R-Car V3M (r8a77970) SoC:
   - Add MMC nodes
   - Move CAN clock node to restore sort-order of file
 * R-Car V3M (r8a77970) based V3MSK board: Add eMMC support
 * R-Car V3H (r8a77980) based Condor board: Add PCIe, DU, LVDS and HDMI support
 
 * RZ/G2M (r8a774a1) SoC:
   - Initial device tree
   - Add SYS-DMAC, SCIF, HSCIF, INTC-EX, EtherAVB, RWDT, pinctl, GPIO,
     SDHI, I2C, IIC-DVFS, thermal, IPMMU, MSIOF, Cortex-A53 CPU core,
     PWM, Audio, FCPF, FCPV, USB2.0, USB-DMAC, HSUSB and USB3.0 device nodes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAluaJGgACgkQ189kaWo3
 T77fhxAAq3QhXh2NUl1CWqWOQo43/iKOFbm5QVjnPs7HGENYIWPJ3+CSF3ALHa52
 KVVVZevBGwOX0osXnMN/W85N5iyEt077OYONK13XMijf6V6rrWxunlV0DMQHOK+j
 AwxfL7xDugnJf6Q+nSd3MDu39HGu5iEiUSfhI9FBGrRcDcyB+4sQ9j67gbjxVp25
 WYax5El3eJhUMi53L5J46Om6QApdoNGkAtW2IQMFJv/RG4ygp/ja050U7iguDrNg
 CuNCX83myfVST3RgcZzmcY/qiFeHb65UOYNdzWZ18lJhix+NWI5udxPjoBcIrq70
 cOudHM22BZs6m5dL7PJ1ZU9dM7lF/CCp44GSpgSwTryOEWoiSGNrcGznmFhU6qsK
 im+ZCytvgDulVCZuDZHk79K4mlOPlNpWgr+cmU0PvlRRd7zjUs/SkPySl39jL4rb
 c1PDIreUfDUEBvHz4GQHgMVwGymBim+oeFdutQ5vwKt6f6PA91MTPT2m6J5v0sFR
 tBFgxIYZGAAyu3Ll9uQm+vawv97oJnhllNLXfKhYgw9WY/CpboKFqRFgKsZe0g9y
 tRtogMM9uMWvvqy8fHjaL7oL2qrN3n8RDtR7CxXs14LZbxEgHtQKo0ON4b5v5kqz
 N5hnxrI3pbxTo8n7wLgQIdJb5MTzWFOeLHFztPajBuNSmxlrwjE=
 =Qez4
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-dt-for-v4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt

Renesas ARM64 Based SoC DT Updates for v4.20

* Correct whitespace around assignments

* R-Car Gen-3 SoCs:
  - Enable SDR104 for SD devices
  - Include R-Car product name in DTSI files to ease maintenance
* R-Car Gen-3 SoC based boards: Convert to new LVDS DT bindings
* R-Car Gen 3 Salvator-X and Salvator-XS boards:
  - Override secondary addresses of ADV748x to avoid address conflicts
* R-Car Gen 3 based Salvator-XS board: Enable SATA

* R-Car M3-N (r8a77965) SoC:
  - Add FDP1 device nodes
  - Move arm_cc630p and timer nodes to restore sort-order of file
  - Correct clock/reset for usb2_phy1
  - Correct HS-USB compat string
  - Add OPPs table for cpu devices enabling CPUFreq support
  - Add CAN device placeholder nodes to facilitate adding
    initial device tree for KF daughter board
  - Attach SYS-DMAC to the IPMMU
* R-Car M3-N (r8a77965) based ULCB board:
  - Initial device tree for board and KF daughter board

* R-Car E3 (r8a77990) SoC:
  - Add SYS-DMAC, I2C VIN, CSI-2, MSIOF device nodes
  - Add BRG support to SCIF2 which allows an increase in serial clock accuracy
  - Use CPG/MSSR and SYSC binding definitions
* R-Car E3 (r8a77990) based Ebisu board: Enable PWM

* R-Car D3 (r8a77995) SoC: Attach the SYS-DMAC to the IPMMU
* R-Car D3 (r8a77995) based Draak board: Sort device nodes

* R-Car V3H (r8a77980) based V3HSK board:
  - Move lvds0 node to restore sort-order of file
* R-Car V3H (r8a77980) SoC:
  - Add RWDT, CSI2 and VIN, Cortex-A53 PMU nodes
  - Move IPMMU and CAN clock nodes to restore sort-order of file

* R-Car V3M (r8a77970) SoC:
  - Add MMC nodes
  - Move CAN clock node to restore sort-order of file
* R-Car V3M (r8a77970) based V3MSK board: Add eMMC support
* R-Car V3H (r8a77980) based Condor board: Add PCIe, DU, LVDS and HDMI support

* RZ/G2M (r8a774a1) SoC:
  - Initial device tree
  - Add SYS-DMAC, SCIF, HSCIF, INTC-EX, EtherAVB, RWDT, pinctl, GPIO,
    SDHI, I2C, IIC-DVFS, thermal, IPMMU, MSIOF, Cortex-A53 CPU core,
    PWM, Audio, FCPF, FCPV, USB2.0, USB-DMAC, HSUSB and USB3.0 device nodes

* tag 'renesas-arm64-dt-for-v4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (58 commits)
  arm64: dts: r8a77965: add FDP1 device nodes
  arm64: dts: renesas: draak: Sort device nodes
  arm64: dts: renesas: enable SDR104 on R-Car Gen3
  arm64: dts: renesas: r8a77990: Add SYS-DMAC device nodes
  arm64: dts: renesas: r8a77990: Add I2C device nodes
  arm64: dts: renesas: r8a77990: Add VIN and CSI-2 device nodes
  arm64: dts: renesas: r8a77990: Add all MSIOF nodes
  arm64: dts: renesas: r8a7795: Move arm_cc630p node
  arm64: dts: renesas: r8a77990: Add BRG support to SCIF2
  arm64: dts: renesas: r8a77990: Use CPG/MSSR and SYSC binding definitions
  arm64: dts: renesas: salvator-xs: Improve SATA switch settings comments
  arm64: dts: renesas: r8a77965: Fix clock/reset for usb2_phy1
  arm64: dts: renesas: r8a77965: Fix HS-USB compatible
  arm64: dts: renesas: r8a77965: Move timer node
  arm64: dts: renesas: v3hsk: Move lvds0 node
  arm64: dts: renesas: Fix whitespace around assignments
  arm64: dts: renesas: r8a77965: m3nulcb-kf: Initial device tree
  arm64: dts: renesas: condor: add PCIe support
  arm64: dts: renesas: r8a77980: add PCIe support
  arm64: dts: renesas: r8a774a1: Add USB3.0 device nodes
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-09-23 06:19:04 -07:00
Manivannan Sadhasivam 86ea9dc8c5 arm64: dts: rockchip: Enable SD card detection for Rock960 boards
For proper working of SD cards, let's add the Card Detect GPIO property
to the common devicetree for Rock960 family boards.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-22 22:55:56 +02:00
Manivannan Sadhasivam 75d0385657 arm64: dts: rockchip: Add support for Rock960 board
Add devicetree support for Rock960 board, one of the Consumer Edition
boards of the 96Boards family. This board support utilizes the common
Rock960 family board support that includes Ficus 96Board.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-22 22:55:11 +02:00
Manivannan Sadhasivam ffb7b25e8a arm64: dts: rockchip: Split out common nodes for Rock960 based boards
Since the same family members of Rock960 boards (Rock960 and Ficus)
share the same configuration, split out the common nodes into a common
dtsi file for reducing code duplication. The board specific nodes for
Ficus boards are then placed in corresponding board DTS file.

Below are some of the key differences between both Rock960 and Ficus
boards:

1. Different host enable GPIO for USB
2. Different power and reset GPIO for PCI-E
3. No Ethernet port on Rock960

Only the properties which differ between both boards are placed in the
board specific dts and the reset of the nodes are placed in common dtsi
file.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-22 22:52:38 +02:00
Katsuhiro Suzuki e007e4e0d8 arm64: dts: rockchip: add spdif sound node for rock64
This patch adds sound card node for rock64. Currently we can support
S/PDIF only. It seems the lack of codec driver of rk3328 to enable
analog audio out.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-22 22:51:15 +02:00
Vicente Bergas 88a20edf76 arm64: dts: rockchip: Fix microSD in rk3399 sapphire board
The microSD card slot in the Sapphire board is not working because of
several issues:
 1.- The vmmc power supply is missing in the DTS. It is capable of 3.0V
 and has a GPIO-based enable control.
 2.- The vqmmc power supply can provide up to 3.3V, but it is capped in
 the DTS to just 3.0V because of the vmmc capability. This results in a
 conflict from the mmc driver requesting an unsupportable voltage range
 from 3.3V to 3.0V (min > max) as reported in dmesg. So, extend the
 range up to 3.3V. The hw should be able to stand this 0.3V tolerance.
 See mmc_regulator_set_vqmmc in drivers/mmc/core/core.c.
 3.- The card detect signal is non-working. There is a known conflict
 with jtag, but the workaround in drivers/soc/rockchip/grf.c does not
 work. Adding the broken-cd attribute to the DTS fixes the issue.

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-22 22:49:22 +02:00
Andreas Färber f220d3ebba arm64: dts: actions: Convert to new-style SPDX license identifiers
Move SPDX-License-Identifier to the top and add one for the Makefile.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2018-09-22 15:24:09 +02:00
Andrzej Hajda 24966d4c61 arm64: dts: exynos: Add OF graph between USB-PHY and MUIC
OF graph describes USB data lanes between USB-PHY and respective MUIC.
Since graph is present and DWC driver can use it to get extcon, obsolete
extcon property can be removed.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2018-09-21 20:06:02 +02:00
Miquel Raynal f656c80157 arm64: dts: marvell: add thermal-zone node in cp110 DTSI file
Add a thermal-zone node and fill in all the sensors available in a
cp110 (only one in the thermal IP).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-09-21 16:13:36 +02:00
Miquel Raynal a60bdfc0c1 arm64: dts: marvell: add macro to make distinction between node names
Because the label is different between CPs, the full path of a node is
unique. However, when referring to the end of the path only (the node
name), this name is not unique anymore.

The *thermal_zone_of_sensor_register() functions of the thermal core
present this limitation and prevent having a thermal-zone per CP.

Add a macro to make the distinction between node names to solve this
situation.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-09-21 16:13:30 +02:00
Miquel Raynal 3be148512e arm64: dts: marvell: add thermal-zone node in ap806 DTSI file
Add a thermal-zone node and fill in all the sensors available in an
ap806 (one in the IC plus one per CPU).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-09-21 16:13:24 +02:00
Miquel Raynal 0863e01c39 arm64: dts: marvell: move AP806/CP110 thermal nodes into a new syscon
New bindings impose to declare the thermal IP from within a new syscon.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2018-09-21 16:12:59 +02:00
Dongdong Liu 7265b3d9dd arm64: defconfig: Enable PCIEPORTBUS
PCIe features like AER, Hotplug, PME, DPC depend on PCIEPORTBUS,
so enable PCIEPORTBUS as default.

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-09-21 14:12:42 +01:00
Zhou Wang ed0341ebe2 arm64: defconfig: enable HiSilicon HNS3 driver
Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-09-21 14:11:30 +01:00
Andrew Murray 0b8af74549 arm64: Remove unused VGA console support
Support for VGA_CONSOLE is not allowable due to commit ee23794b86
("video: vgacon: Don't build on arm64"), thus remove the associated
unused code.

Whilst PCI on arm64 would support VGA a valid screen_info structure
is missing.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-21 12:12:24 +01:00
James Morse 8a695a5873 arm64: Kconfig: Remove ARCH_HAS_HOLES_MEMORYMODEL
include/linux/mmzone.h describes ARCH_HAS_HOLES_MEMORYMODEL as
relevant when parts the memmap have been free()d. This would
happen on systems where memory is smaller than a sparsemem-section,
and the extra struct pages are expensive. pfn_valid() on these
systems returns true for the whole sparsemem-section, so an extra
memmap_valid_within() check is needed.

On arm64 we have nomap memory, so always provide pfn_valid() to test
for nomap pages. This means ARCH_HAS_HOLES_MEMORYMODEL's extra checks
are already rolled up into pfn_valid().

Remove it.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-21 12:02:45 +01:00
Anshuman Khandual 21f8479617 arm64/cpufeatures: Emulate MRS instructions by parsing ESR_ELx.ISS
Armv8.4-A extension enables MRS instruction encodings inside ESR_ELx.ISS
during exception class ESR_ELx_EC_SYS64 (0x18). This encoding can be used
to emulate MRS instructions which can avoid fetch/decode from user space
thus improving performance. This adds a new sys64_hook structure element
with applicable ESR mask/value pair for MRS instructions on various system
registers but constrained by sysreg encodings which is currently allowed
to be emulated.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-21 11:06:18 +01:00
Anshuman Khandual 520ad98871 arm64/cpufeatures: Factorize emulate_mrs()
MRS emulation gets triggered with exception class (0x00 or 0x18) eventually
calling the function emulate_mrs() which fetches the user space instruction
and analyses it's encodings (OP0, OP1, OP2, CRN, CRM, RT). The kernel tries
to emulate the given instruction looking into the encoding details. Going
forward these encodings can also be parsed from ESR_ELx.ISS fields without
requiring to fetch/decode faulting userspace instruction which can improve
performance. This factorizes emulate_mrs() function in a way that it can be
called directly with MRS encodings (OP0, OP1, OP2, CRN, CRM) for any given
target register which can then be used directly from 0x18 exception class.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-21 11:05:58 +01:00
Anshuman Khandual 1c8391412d arm64/cpufeatures: Introduce ESR_ELx_SYS64_ISS_RT()
Extracting target register from ESR.ISS encoding has already been required
at multiple instances. Just make it a macro definition and replace all the
existing use cases.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-21 11:05:25 +01:00
Horia Geantă e8342cc795 arm64: defconfig: enable CAAM crypto engine on QorIQ DPAA2 SoCs
Enable CAAM (Cryptographic Accelerator and Assurance Module) driver
for QorIQ Data Path Acceleration Architecture (DPAA) v2.
It handles DPSECI (Data Path SEC Interface) DPAA2 objects that sit
on the Management Complex (MC) fsl-mc bus.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-09-21 13:24:51 +08:00
Ard Biesheuvel 2e5d2f33d1 crypto: arm64/aes-blk - improve XTS mask handling
The Crypto Extension instantiation of the aes-modes.S collection of
skciphers uses only 15 NEON registers for the round key array, whereas
the pure NEON flavor uses 16 NEON registers for the AES S-box.

This means we have a spare register available that we can use to hold
the XTS mask vector, removing the need to reload it at every iteration
of the inner loop.

Since the pure NEON version does not permit this optimization, tweak
the macros so we can factor out this functionality. Also, replace the
literal load with a short sequence to compose the mask vector.

On Cortex-A53, this results in a ~4% speedup.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-09-21 13:24:50 +08:00
Ard Biesheuvel dd597fb33f crypto: arm64/aes-blk - add support for CTS-CBC mode
Currently, we rely on the generic CTS chaining mode wrapper to
instantiate the cts(cbc(aes)) skcipher. Due to the high performance
of the ARMv8 Crypto Extensions AES instructions (~1 cycles per byte),
any overhead in the chaining mode layers is amplified, and so it pays
off considerably to fold the CTS handling into the SIMD routines.

On Cortex-A53, this results in a ~50% speedup for smaller input sizes.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-09-21 13:24:50 +08:00
Ard Biesheuvel 6e7de6af91 crypto: arm64/aes-blk - revert NEON yield for skciphers
The reasoning of commit f10dc56c64 ("crypto: arm64 - revert NEON yield
for fast AEAD implementations") applies equally to skciphers: the walk
API already guarantees that the input size of each call into the NEON
code is bounded to the size of a page, and so there is no need for an
additional TIF_NEED_RESCHED flag check inside the inner loop. So revert
the skcipher changes to aes-modes.S (but retain the mac ones)

This partially reverts commit 0c8f838a52.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-09-21 13:24:50 +08:00
Ard Biesheuvel 557ecb4543 crypto: arm64/aes-blk - remove pointless (u8 *) casts
For some reason, the asmlinkage prototypes of the NEON routines take
u8[] arguments for the round key arrays, while the actual round keys
are arrays of u32, and so passing them into those routines requires
u8* casts at each occurrence. Fix that.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-09-21 13:24:50 +08:00
Will Deacon 880f7cc472 arm64: cpu_errata: Remove ARM64_MISMATCHED_CACHE_LINE_SIZE
There's no need to treat mismatched cache-line sizes reported by CTR_EL0
differently to any other mismatched fields that we treat as "STRICT" in
the cpufeature code. In both cases we need to trap and emulate EL0
accesses to the register, so drop ARM64_MISMATCHED_CACHE_LINE_SIZE and
rely on ARM64_MISMATCHED_CACHE_TYPE instead.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
[catalin.marinas@arm.com: move ARM64_HAS_CNP in the empty cpucaps.h slot]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-19 18:21:49 +01:00
Manivannan Sadhasivam 5510ee99c0 arm64: dts: Add devicetree support for HiKey970 board
Add devicetree support for HiKey970 development board which
based on Hi3670 SoC and is also one of the 96Boards Consumer
Edition and AI platform.

Only UART6 is enabled which is the default console required
by the 96Boards Consumer Edition Specification.

This patch has been tested on HiKey970 Board.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-09-19 16:15:25 +01:00
Manivannan Sadhasivam dd8c7b78c1 arm64: dts: Add devicetree for Hisilicon Hi3670 SoC
Add initial devicetree support for Hisilicon Hi3670 SoC which
is similar to Hi3660 SoC with NPU support.

This SoC has Octal core BigLittle CPUs in two clusters(4 * A53 & 4 * A73).

Only UART6 has been added for console support which is
pre configured by the bootloader. A fixed clock is sourcing
the UART6 which will get replaced by the clock driver when available.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-09-19 16:14:36 +01:00
Suzuki K Poulose e917b9432d arm64: dts: hi6220: Update coresight bindings for hardware ports
Switch to updated coresight bindings for hw ports.

Cc: xuwei5@hisilicon.com
Cc: lipengcheng8@huawei.com
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-09-19 16:06:02 +01:00
Viresh Kumar b27dedf551 arm64: dts: hisilicon: Add missing clocks property for CPUs
The clocks property should either be present for all the CPUs of a
cluster or none. If these are present only for a subset of CPUs of a
cluster then things will start falling apart as soon as the CPUs are
brought online in a different order. For example, this will happen
because the operating system looks for such properties in the CPU node
it is trying to bring up, so that it can register a cooling device.

Add missing clocks property.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2018-09-19 15:54:05 +01:00
Sergei Shtylyov a215af751d arm64: dts: renesas: r8a779{7|8}0: add CMT support
Describe CMTs in the R8A779{7|8}0 device trees.

Based on the original (and large) patches by Vladimir Barinov.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-19 11:18:24 +02:00
Wolfram Sang 11a33f8161 arm64: dts: renesas: gen3: use 400kHz for I2C DVFS bus
The PMIC and EEPROM can operate at 400kHz, so use this speed.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-19 11:07:14 +02:00
Magnus Damm d59b0784f1 arm64: dts: renesas: r8a77980: Attach the SYS-DMAC to the IPMMU
For R-Car V3H hook up SYS-DMAC1 and SYS-DMAC2 to IPMMU-DS1 to match
information in the R-Car Gen3 Rev.1.00 (April 2018) datasheet.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-19 10:16:29 +02:00
Magnus Damm f0f9f7a6ba arm64: dts: renesas: r8a77990: Attach the SYS-DMAC to the IPMMU
For R-Car E3 hook up SYS-DMAC0, SYS-DMAC1 and SYS-DMAC2 to
IPMMU-DS0 and IPMMU-DS1 in same way as for R-Car H3.
This follows the R-Car Gen3 Rev.1.00 (April 2018) datasheet.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-19 10:15:05 +02:00
Nishanth Menon 42e54f6467 arm64: dts: ti: k3-am6: Add Device Management Security Controller support
Add TISCI compatible System controller for AM6 SoCs.

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2018-09-18 18:25:06 +03:00
Nishanth Menon 77ccbae4f9 arm64: dts: ti: am654: Add secure proxy instance for main domain
Add secure proxy instance for Main domain

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2018-09-18 18:25:06 +03:00
Nishanth Menon 4201af2544 arm64: dts: ti: am654: Add uart nodes
Add uart nodes for AM654 device tree components.

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2018-09-18 18:25:06 +03:00
Kishon Vijay Abraham I 3bc1572068 arm64: dts: ti: k3-am65: Change #address-cells and #size-cells of interconnect to 2
AM65 has two PCIe controllers and each PCIe controller has '2' address
spaces one within the 4GB address space of the SoC and the other above
the 4GB address space of the SoC (cbass_main) in addition to the
register space. The size of the address space above the 4GB SoC address
space is 4GB. These address ranges will be used by CPU/DMA to access
the PCIe address space. In order to represent the address space above
the 4GB SoC address space and to represent the size of this address
space as 4GB, change address-cells and size-cells of interconnect to 2.

Since OSPI has similar need in MCU Domain Memory Map, change
address-cells and size-cells of cbass_mcu interconnect also to 2.

Fixes: ea47eed33a ("arm64: dts: ti: Add Support for AM654 SoC")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Vignesh R <vigneshr@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
2018-09-18 18:25:06 +03:00
Vladimir Murzin ab510027dc arm64: KVM: Enable Common Not Private translations
We rely on cpufeature framework to detect and enable CNP so for KVM we
need to patch hyp to set CNP bit just before TTBR0_EL2 gets written.

For the guest we encode CNP bit while building vttbr, so we don't need
to bother with that in a world switch.

Reviewed-by: James Morse <james.morse@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-18 12:03:34 +01:00
Vladimir Murzin 5ffdfaedfa arm64: mm: Support Common Not Private translations
Common Not Private (CNP) is a feature of ARMv8.2 extension which
allows translation table entries to be shared between different PEs in
the same inner shareable domain, so the hardware can use this fact to
optimise the caching of such entries in the TLB.

CNP occupies one bit in TTBRx_ELy and VTTBR_EL2, which advertises to
the hardware that the translation table entries pointed to by this
TTBR are the same as every PE in the same inner shareable domain for
which the equivalent TTBR also has CNP bit set. In case CNP bit is set
but TTBR does not point at the same translation table entries for a
given ASID and VMID, then the system is mis-configured, so the results
of translations are UNPREDICTABLE.

For kernel we postpone setting CNP till all cpus are up and rely on
cpufeature framework to 1) patch the code which is sensitive to CNP
and 2) update TTBR1_EL1 with CNP bit set. TTBR1_EL1 can be
reprogrammed as result of hibernation or cpuidle (via __enable_mmu).
For these two cases we restore CnP bit via __cpu_suspend_exit().

There are a few cases we need to care of changes in TTBR0_EL1:
  - a switch to idmap
  - software emulated PAN

we rule out latter via Kconfig options and for the former we make
sure that CNP is set for non-zero ASIDs only.

Reviewed-by: James Morse <james.morse@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
[catalin.marinas@arm.com: default y for CONFIG_ARM64_CNP]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-18 12:02:27 +01:00
Punit Agrawal 9c314a48ae arm64: PCI: Remove node-local allocations when initialising host controller
Memory for host controller data structures is allocated local to the node
to which the controller is associated with.  This has been the behaviour
since support for ACPI was added in commit 0cb0786bac ("ARM64: PCI:
Support ACPI-based PCI host controller").

Drop the node local allocation as there is no benefit from doing so - the
usage of these structures is independent from where the controller is
located.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2018-09-17 16:33:23 -05:00
Suzuki K Poulose 74e248286e arm64: sysreg: Clean up instructions for modifying PSTATE fields
Instructions for modifying the PSTATE fields which were not supported
in the older toolchains (e.g, PAN, UAO) are generated using macros.
We have so far used the normal sys_reg() helper for defining the PSTATE
fields. While this works fine, it is really difficult to correlate the
code with the Arm ARM definition.

As per Arm ARM, the PSTATE fields are defined only using Op1, Op2 fields,
with fixed values for Op0, CRn. Also the CRm field has been reserved
for the Immediate value for the instruction. So using the sys_reg()
looks quite confusing.

This patch cleans up the instruction helpers by bringing them
in line with the Arm ARM definitions to make it easier to correlate
code with the document. No functional changes.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-17 14:56:01 +01:00
Rob Herring 501500e65f arm64: dts: rockchip: Fix I2C bus unit-address error on rk3399-puma-haikou
dtc has new checks for I2C buses. Fix the warnings in unit-addresses.

arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: Warning (i2c_bus_reg): /i2c@ff3d0000/codec@0a: I2C bus unit address format error, expected "a"

Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2018-09-17 09:50:36 +02:00
Fabrizio Castro 76506880ea arm64: defconfig: enable R8A774C0 SoC
Enable the Renesas RZ/G2E (R8A774C0) SoC in the ARM64 defconfig.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-17 09:11:46 +02:00
Jacopo Mondi a1d354a768 arm64: dts: renesas: ebisu: Add HDMI and CVBS input
Add HDMI and CVBS inputs device nodes to R-Car E3 Ebisu board.

Both HDMI and CVBS inputs are connected to an ADV7482 video decoder hooked to
the SoC CSI-2 receiver port.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-17 09:07:48 +02:00
Rob Herring 68ecb5c192 arm64: dts: meson: Fix erroneous SPI bus warnings
dtc has new checks for SPI buses. The meson dts files have a node named
spi' which causes false positive warnings. As the node is a pinctrl child
node, change the node name to be 'spi-pins' to fix the warnings.

arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dtb: Warning (spi_bus_bridge): /soc/periphs@c8834000/pinctrl@4b0/spi: incorrect #address-cells for SPI bus

Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2018-09-14 12:36:00 -07:00
Hari Vyas e4ba15debc arm64: fix for bad_mode() handler to always result in panic
The bad_mode() handler is called if we encounter an uunknown exception,
with the expectation that the subsequent call to panic() will halt the
system. Unfortunately, if the exception calling bad_mode() is taken from
EL0, then the call to die() can end up killing the current user task and
calling schedule() instead of falling through to panic().

Remove the die() call altogether, since we really want to bring down the
machine in this "impossible" case.

Signed-off-by: Hari Vyas <hari.vyas@broadcom.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-14 17:46:25 +01:00
Will Deacon 8a60419d36 arm64: force_signal_inject: WARN if called from kernel context
force_signal_inject() is designed to send a fatal signal to userspace,
so WARN if the current pt_regs indicates a kernel context. This can
currently happen for the undefined instruction trap, so patch that up so
we always BUG() if we didn't have a handler.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-14 17:46:24 +01:00
Will Deacon b8925ee2e1 arm64: cpu: Move errata and feature enable callbacks closer to callers
The cpu errata and feature enable callbacks are only called via their
respective arm64_cpu_capabilities structure and therefore shouldn't
exist in the global namespace.

Move the PAN, RAS and cache maintenance emulation enable callbacks into
the same files as their corresponding arm64_cpu_capabilities structures,
making them static in the process.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-14 17:46:22 +01:00
Will Deacon 7c36447ae5 KVM: arm64: Set SCTLR_EL2.DSSBS if SSBD is forcefully disabled and !vhe
When running without VHE, it is necessary to set SCTLR_EL2.DSSBS if SSBD
has been forcefully disabled on the kernel command-line.

Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-14 17:46:20 +01:00
Will Deacon 8f04e8e6e2 arm64: ssbd: Add support for PSTATE.SSBS rather than trapping to EL3
On CPUs with support for PSTATE.SSBS, the kernel can toggle the SSBD
state without needing to call into firmware.

This patch hooks into the existing SSBD infrastructure so that SSBS is
used on CPUs that support it, but it's all made horribly complicated by
the very real possibility of big/little systems that don't uniformly
provide the new capability.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-14 17:46:19 +01:00
Will Deacon 0bf0f444b2 arm64: entry: Allow handling of undefined instructions from EL1
Rather than panic() when taking an undefined instruction exception from
EL1, allow a hook to be registered in case we want to emulate the
instruction, like we will for the SSBS PSTATE manipulation instructions.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-14 17:46:17 +01:00
Will Deacon 2d1b2a91d5 arm64: ssbd: Drop #ifdefs for PR_SPEC_STORE_BYPASS
Now that we're all merged nicely into mainline, there's no need to check
to see if PR_SPEC_STORE_BYPASS is defined.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-14 17:46:15 +01:00
Will Deacon d71be2b6c0 arm64: cpufeature: Detect SSBS and advertise to userspace
Armv8.5 introduces a new PSTATE bit known as Speculative Store Bypass
Safe (SSBS) which can be used as a mitigation against Spectre variant 4.

Additionally, a CPU may provide instructions to manipulate PSTATE.SSBS
directly, so that userspace can toggle the SSBS control without trapping
to the kernel.

This patch probes for the existence of SSBS and advertise the new instructions
to userspace if they exist.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-14 17:46:01 +01:00
Will Deacon ca7f686ac9 arm64: Fix silly typo in comment
I was passing through and figuered I'd fix this up:

	featuer -> feature

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2018-09-14 17:42:04 +01:00
Geert Uytterhoeven c79661eb50 arm64: dts: renesas: Remove unneeded status from thermal nodes
The thermal device is supposed to be always enabled.  As the default
value of the status property is "okay", there is no need to make this
explicit in SoC-specific .dtsi files where no override is involved.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2018-09-14 15:36:50 +02:00
Rob Herring 7cdbe45da1 arm64: dts: broadcom: Fix I2C and SPI bus warnings
dtc has new checks for I2C and SPI buses. Fix the warnings in node names
and unit-addresses.

arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dtb: Warning (i2c_bus_reg): /hsls/i2c@e0000/pcf8574@20: I2C bus unit address format error, expected "27"
arch/arm64/boot/dts/broadcom/stingray/bcm958742t.dtb: Warning (i2c_bus_reg): /hsls/i2c@e0000/pcf8574@20: I2C bus unit address format error, expected "27"
arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dtb: Warning (spi_bus_bridge): /hsls/ssp@180000: node name for SPI buses should be 'spi'
arch/arm64/boot/dts/broadcom/stingray/bcm958742k.dtb: Warning (spi_bus_bridge): /hsls/ssp@190000: node name for SPI buses should be 'spi'

Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: Jon Mason <jonmason@broadcom.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2018-09-13 15:05:47 -07:00
Bjorn Andersson 447c9dad7e arm64: dts: msm8996: Transition smp2p and smd to mailbox
The smd and smp2p drivers now support accessing the APCS GLOBAL IPC
register through the mailbox framework, so migrate the msm8996 dts to
use this and remove the syscon based APCS node.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:39:05 -05:00
Bjorn Andersson 1bdf91fd2a arm64: defconfig: Enable Qualcomm QRTR
The QRTR packet family is used for a wide range of communication between
services in Qualcomm platforms. Examples of services using this
transport for communication are remoteproc management, modem control,
positioning, power management and WiFi.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:38:06 -05:00
Matthias Kaehlcke 1b9d8bd693 arm64: dts: qcom: pm8998: Add pm8998 thermal zone
The thermal zone uses spmi-temp-alarm as sensor, the trip points
correspond to the PMIC thermal stages 1 and 2. The critical trip
point at 125°C disables the partial PMIC shutdown at stage 2.

Without an IIO input the sensor only reports a limited number of
temperatures:

- 37°C for temperatures below 105°C
- 107°C for temperatures >= 105°C and < 125°C
- 127°C for temperatures >= 125°C

(the numbers correspond to a stage 1 threshold of 105°C)

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:37:18 -05:00
Matthias Kaehlcke 104e6415bf arm64: dts: qcom: pm8998: Add spmi-temp-alarm node
This adds the spmi-temp-alarm node to pm8998 based on the examples in the
bindings.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:11 -05:00
Matthias Kaehlcke 40019e8452 arm64: dts: sdm845: Add dispcc node
This adds the display clock controller node to sdm845 based on the
examples in the bindings.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:10 -05:00
Bjorn Andersson 3debb1f30b arm64: dts: qcom: sdm845: Add adsp, cdsp and slpi smp2p
Add the SMP2P nodes for the remoteproc states for adsp, cdsp and slpi.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:09 -05:00
Douglas Anderson cfe10d38aa arm64: dts: qcom: sdm845-mtp: Add nodes for USB
Set the various nodes to "okay" and hook up the regulators.

NOTE: For now the main USB port (the one that goes out the Type C
connector) is forced to host.  Eventually someone will need to get the
Type C detection hooked up and get this all integrated with the
PMI8998 PMIC.  The reason for forcing to "host" in the meantime is
that this will leave us with one "host" and one "peripheral" port.

In order for host mode this to work, we assume that the bootloader
left things configured enough for us.  Apparently the magic for that
is is to do these writes on pmi8998:
- pm_comm_write_byte(2, 0x1153, 0x2C, 0);
- pm_comm_write_byte(2, 0x1152, 0x07, 0);
- pm_comm_write_byte(2, 0x1140, 0x00, 0);
- pm_comm_write_byte(2, 0x1140, 0x01, 0);

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:09 -05:00
Douglas Anderson d6c40ccf05 arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators
Add regulator devices for PMIC regulators managed via VRM and XOB
RPMh accelerators.

A few notes here:
- Regulators are added directly to the board file.  While it's true
  that this will mean a bunch of copy/pasting for other boards that
  are very similar, this is probably the right call since boards
  could make changes to the way these regulators are hooked up and
  trying to find a way to avoid duplication will result in some
  confusing node overrides.
- Regulators that are hooked up to supply pins on the SoC are given
  an alias matching the name of that pin (pin name comes from the
  Qualcomm SoC "device specification" doc).
- Other regulator labels are based on the schematic.  If there is
  more than one logical name on the schematic for the same rail the
  secondary names are also listed and should be referred to as
  appropriate.
- Regulators all default to HPM mode w/ no ability to switch modes.
  Future patches can switch things to LPM and possibly add
  dynamic load switching if we have determined there's a benefit.
  This should only be done for rails where we'll actually be able
  to take advantage of the lower power modes so we don't need to
  churn with lots of patches adding regulator_set_load() calls
  to drivers.

NOTE: This patch is loosely based on one originally shared to me by
David Collins.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:08 -05:00
Manu Gautam ca4db2b538 arm64: dts: qcom: sdm845: Add USB-related nodes
This adds nodes for USB and related PHYs.

Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
[dianders: reworked quite a bit]
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:08 -05:00
Sibi Sankar ead5eea3e3 arm64: dts: qcom: Add AOSS reset driver node for SDM845
This patch adds the node to support AOSS reset driver on
SDM845

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
[bjorn: Updated addresses to match the binding that was merged]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:07 -05:00
Niklas Cassel 216a2f9be0 arm64: dts: msm8996: Drop model
DTS board files should always specify model and compatible.

All DTS board files that includes msm8996.dtsi
already specifies model and compatible, and will thus
override the model and compatible in msm8996.dtsi.

Drop model from msm8916.dtsi, since it is only a source of confusion.

Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:07 -05:00
Niklas Cassel d5e20f286a arm64: dts: msm8916: Drop model and compatible
DTS board files should always specify model and compatible.

All DTS board files that includes msm8916.dtsi
already specifies model and compatible, and will thus
override the model and compatible in msm8916.dtsi.

Drop model and compatible from msm8916.dtsi,
since they are only a source of confusion.

Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:06 -05:00
Niklas Cassel 0ef351ab8c arm64: dts: db820c: Add qcom,apq8096 to compatible string
Add qcom,apq8096 to compatible string.
This compatible is defined in Documentation/devicetree/bindings/arm/qcom.txt
and is needed for e.g. drivers/cpufreq/qcom-cpufreq-kryo.c to be probed
correctly (and for drivers/cpufreq/cpufreq-dt-platdev.c to work properly).

Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:36:06 -05:00
Bjorn Andersson 61020aa53c arm64: dts: qcom: Populate pm8998 with additional nodes
Add pon, coincell and rtc to the first pm8998 sid.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 14:35:36 -05:00
Bjorn Andersson e8d006fd86 arm64: dts: qcom: msm8998: Add smp2p nodes
Add the adsp, modem and slpi smp2p nodes to msm8998.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:56:54 -05:00
Bjorn Andersson f259e398af arm64: dts: qcom: msm8998: Add the qfprom node
Add the QFPROM nvmem node to msm8998

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:56:50 -05:00
Bjorn Andersson d850156a22 arm64: dts: qcom: msm8998: Add firmware node
Add the firmware and scm nodes for msm8998

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:56:48 -05:00
Bjorn Andersson c783394956 arm64: dts: qcom: msm8998: Add smem related nodes
Add reserve-memory nodes, tcsr-mutex nodes and the smem node.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:56:45 -05:00
Bjorn Andersson b1227233f0 arm64: dts: qcom: msm8998: Add pmi8998 file
Add new dtsi file for the PMI8998, with its gpios and include all three
PMICs in the MSM8998 MTP dts.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:56:42 -05:00
Bjorn Andersson 4449b6f248 arm64: dts: qcom: msm8998: Add tsens and thermal-zones
Add the two tsens instances and the thermal zones for CPUs, GPUs,
battery and skin sensors.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:56:37 -05:00
Bjorn Andersson 31c1f0e33d arm64: dts: qcom: msm8998: Add RPM and regulators for MTP
Add nodes for RPM communication for MSM8998 and the regulator nodes for
the MTP.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:56:25 -05:00
Joonwoo Park 4807c71cc6 arm64: dts: Add msm8998 SoC and MTP board support
Add initial device tree support for the Qualcomm MSM8998 SoC and
MTP8998 evaluation board.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Imran Khan <kimran@codeaurora.org>
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
[bjorn: Restructured, removed its node and moved to SPDX headers]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:45:48 -05:00
Matthias Kaehlcke 43fb443168 arm64: dts: qcom: pm8998: Add adc node
This adds the adc node to pm8998 based on the examples in the
bindings. It also fixes the order of the included headers.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:44:39 -05:00
Vinod Koul 5817e887fc arm64: dts: qcom: apq8096-db820c: Add resin node
Resin is board specific, so add the resin node in apq8096-db820c dtsi

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:43:05 -05:00
Vinod Koul caf0caee50 arm64: dts: qcom: apq8016-sbc: Add resin node
Resin is board specific so add the resin node in apq8016-sbc dtsi

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-09-13 13:43:03 -05:00