Commit Graph

12580 Commits

Author SHA1 Message Date
Vignesh Raghavendra
cb27354b38 arm64: dts: ti: k3-j721e: Add DT nodes for few peripherials
Enable I2Cs, ADCs, OSPIs and UFS peripherals present on J721e.

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

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

Pull ARM SoC fixes from Olof Johansson:
 "I've been sitting on these longer than I meant, so the patch count is
  a bit higher than ideal for this part of the release. There's also
  some reverts of double-applied patches that brings the diffstat up a
  bit.

  With that said, the biggest changes are:

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

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

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

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

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

   - Power supply assignment fixes for i.MX6

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

   - Build fixlets (selects) for davinci/omap2+

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

   - ... and more similar fixes across different platforms

  And some non-DT stuff:

   - optee fix to register multiple shared pages properly

   - Clock calculation fixes for MMP3

   - Clock fixes for OMAP as well"

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

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

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

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

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

arm64: dts: Amlogic updates for v5.6
- new boards: libretech-pc (S912 and S905D versions)
- new board: Videostrong KII Pro
- A1: add reset controller

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

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

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

Qualcomm ARM64 DT updates for v5.6

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

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

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

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

Qualcomm ARM64 defconfig updates for v5.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

i.MX defconfig update for 5.6:

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

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

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

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

i.MX arm64 device tree update for 5.6:

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

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

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

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

mvebu dt64 for 5.6 (part 1)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Remove unused VDSO_HAS_32BIT_FALLBACK from arm64 compat vdso.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ARM64: DT: Hisilicon SoCs DT updates for 5.6

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

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

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

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

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

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

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

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

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

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

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

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

i.MX fixes for 5.5, round 2:

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

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

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

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

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

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

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

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

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

This reverts commit 621516789e.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Following are the features supported currently:

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

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

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

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

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

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

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

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

So just remove this flag.

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

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
Link: https://lore.kernel.org/r/20200106211633.2882-6-m.reichl@fivetechno.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-09 00:28:40 +01:00
Baruch Siach
62bba54d99 arm64: dts: marvell: clearfog-gt-8k: fix switch cpu port node
Explicitly set the switch cpu (upstream) port phy-mode and managed
properties. This fixes the Marvell 88E6141 switch serdes configuration
with the recently enabled phylink layer.

Fixes: a612083327 ("arm64: dts: add support for SolidRun Clearfog GT 8K")
Reported-by: Denis Odintsov <d.odintsov@traviangames.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-01-08 22:16:03 +01:00
Jerome Brunet
be63807524 arm64: dts: meson: add audio fifo depths
Add the property describing the depth of the audio fifo on the axg, g12a
and sm1 SoC family

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2020-01-08 10:52:12 -08:00
Pan Zhang
edf9081827 mm: change_memory_common: add spaces for * operator
Leaves one space before and after a binary operator both, it may be more elegant.

Signed-off-by: Pan Zhang <zhangpan26@huawei.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 17:30:33 +00:00
Prabhakar Kushwaha
4e410ef96c arm64: Remove __exception_text_start and __exception_text_end from asm/section.h
Linux commit b6e43c0e31 ("arm64: remove __exception annotations") has
removed __exception_text_start and __exception_text_end sections.

So removing reference of __exception_text_start and __exception_text_end
from from asm/section.h.

Cc: James Morse <james.morse@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 17:30:19 +00:00
Joe Perches
3c9c1dcde7 arm64: Kconfig: Remove CONFIG_ prefix from ARM64_PSEUDO_NMI section
Remove the CONFIG_ prefix from the select statement for ARM_GIC_V3.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 17:30:08 +00:00
Hanjun Guo
26415330a7 arm64: armv8_deprecated: update the comments of armv8_deprecated_init()
In commit c0d8832e78 ("arm64: Ensure the instruction emulation is
ready for userspace"), armv8_deprecated_init() was promoted to
core_initcall() but the comments were left unchanged, update it now.

Spotted by some random reading of the code.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
[will: "can guarantee" => "guarantees"]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 17:29:41 +00:00
Florian Fainelli
31d868c490 arm64: kpti: Add Broadcom Brahma-B53 core to the KPTI whitelist
Broadcom Brahma-B53 CPUs do not implement ID_AA64PFR0_EL1.CSV3 but are
not susceptible to Meltdown, so add all Brahma-B53 part numbers to
kpti_safe_list[].

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 17:29:06 +00:00
Anthony Steinhauser
b3c75c9d76 Return ENODEV when the selected speculation misfeature is unsupported
When the control of the selected speculation misbehavior is unsupported,
the kernel should return ENODEV according to the documentation:
https://www.kernel.org/doc/html/v4.17/userspace-api/spec_ctrl.html
Current aarch64 implementation of SSB control sometimes returns EINVAL
which is reserved for unimplemented prctl and for violations of reserved
arguments. This change makes the aarch64 implementation consistent with
the x86 implementation and with the documentation.

Signed-off-by: Anthony Steinhauser <asteinhauser@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 17:27:41 +00:00
Mark Brown
f7ef82c22f arm64: asm: Remove ENDPIPROC()
Now all the users have been removed delete the definition of ENDPIPROC()
to ensure we don't acquire any new users.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 17:09:31 +00:00
AKASHI Takahiro
3751e728ce arm64: kexec_file: add crash dump support
Enabling crash dump (kdump) includes
* prepare contents of ELF header of a core dump file, /proc/vmcore,
  using crash_prepare_elf64_headers(), and
* add two device tree properties, "linux,usable-memory-range" and
  "linux,elfcorehdr", which represent respectively a memory range
  to be used by crash dump kernel and the header's location

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Tested-and-reviewed-by: Bhupesh Sharma <bhsharma@redhat.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 17:05:23 +00:00
Pavel Tatashin
a2c2e67923 arm64: hibernate: add trans_pgd public functions
trans_pgd_create_copy() and trans_pgd_map_page() are going to be
the basis for new shared code that handles page tables for cases
which are between kernels: kexec, and hibernate.

Note: Eventually, get_safe_page() will be moved into a function pointer
passed via argument, but for now keep it as is.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: James Morse <james.morse@arm.com>
[will: Keep these functions static until kexec needs them]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 16:55:12 +00:00
Pavel Tatashin
7ea4088938 arm64: hibernate: add PUD_SECT_RDONLY
There is PMD_SECT_RDONLY that is used in pud_* function which is confusing.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Acked-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 16:32:55 +00:00
Pavel Tatashin
13373f0e65 arm64: hibernate: rename dst to page in create_safe_exec_page
create_safe_exec_page() allocates a safe page and maps it at a
specific location, also this function returns the physical address
of newly allocated page.

The destination VA, and PA are specified in arguments: dst_addr,
phys_dst_addr

However, within the function it uses "dst" which has unsigned long
type, but is actually a pointers in the current virtual space. This
is confusing to read.

Rename dst to more appropriate page (page that is created), and also
change its time to "void *"

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 16:32:55 +00:00
Pavel Tatashin
a89d7ff933 arm64: hibernate: remove gotos as they are not needed
Usually, gotos are used to handle cleanup after exception, but in case of
create_safe_exec_page and swsusp_arch_resume there are no clean-ups. So,
simply return the errors directly.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 16:32:55 +00:00
Pavel Tatashin
051a7a94aa arm64: hibernate: use get_safe_page directly
create_safe_exec_page() uses hibernate's allocator to create a set of page
table to map a single page that will contain the relocation code.

Remove the allocator related arguments, and use get_safe_page directly, as
it is done in other local functions in this file to simplify function
prototype.

Removing this function pointer makes it easier to refactor the code later.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 16:32:55 +00:00
Pavel Tatashin
d234332c28 arm64: hibernate: pass the allocated pgdp to ttbr0
ttbr0 should be set to the beginning of pgdp, however, currently
in create_safe_exec_page it is set to pgdp after pgd_offset_raw(),
which works by accident.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 16:32:55 +00:00
Pavel Tatashin
621516789e arm64: kexec: make dtb_mem always enabled
Currently, dtb_mem is enabled only when CONFIG_KEXEC_FILE is
enabled. This adds ugly ifdefs to c files.

Always enabled dtb_mem, when it is not used, it is NULL.
Change the dtb_mem to phys_addr_t, as it is a physical address.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 16:32:55 +00:00
Pavel Tatashin
3b54b74339 arm64: kexec: remove unnecessary debug prints
The kexec_image_info() outputs all the necessary information about the
upcoming kexec. The extra debug printfs in machine_kexec() are not
needed.

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 16:32:55 +00:00
Mark Brown
f4659254a3 arm64: mm: Use modern annotations for assembly functions
In an effort to clarify and simplify the annotation of assembly functions
in the kernel new macros have been introduced. These replace ENTRY and
ENDPROC and also add a new annotation for static functions which previously
had no ENTRY equivalent. Update the annotations in the mm code to the
new macros. Even the functions called from non-standard environments
like idmap have no special requirements on their environments so can be
treated like regular functions.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 12:23:38 +00:00
Mark Brown
3ac0f4526d arm64: lib: Use modern annotations for assembly functions
In an effort to clarify and simplify the annotation of assembly functions
in the kernel new macros have been introduced. These replace ENTRY and
ENDPROC and also add a new annotation for static functions which previously
had no ENTRY equivalent. Update the annotations in the library code to the
new macros.

Signed-off-by: Mark Brown <broonie@kernel.org>
[will: Use SYM_FUNC_START_WEAK_PI]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 12:23:02 +00:00
Mark Brown
35e61c77ef arm64: asm: Add new-style position independent function annotations
As part of an effort to make the annotations in assembly code clearer and
more consistent new macros have been introduced, including replacements
for ENTRY() and ENDPROC().

On arm64 we have ENDPIPROC(), a custom version of ENDPROC() which is
used for code that will need to run in position independent environments
like EFI, it creates an alias for the function with the prefix __pi_ and
then emits the standard ENDPROC. Add new-style macros to replace this
which expand to the standard SYM_FUNC_*() and SYM_FUNC_ALIAS_*(),
resulting in the same object code. These are added in linkage.h for
consistency with where the generic assembler code has its macros.

Signed-off-by: Mark Brown <broonie@kernel.org>
[will: Rename 'WEAK' macro, use ';' instead of ASM_NL, deprecate ENDPIPROC]
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-08 12:14:08 +00:00
Shawn Guo
6fa154e46c arm64: dts: hi3798cv200: correct PCIe 'bus-range' setting
The PCIe 'bus-range' setting is incorrect and causing the following
message during boot.

pci_bus 0000:01: busn_res: can not insert [bus 01-ff] under [bus 00-0f] (conflicts with (null) [bus 00-0f])

Correct it to get rid of the message.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2020-01-08 19:33:54 +08:00
Loic Poulain
7a2a2231ef arm64: dts: apq8096-db820c: Fix VDD core voltage
APQ8096 has its VDD APC (Power for quad Kryo applications
microprocessors) powered by PM8996 PMIC S9, S10, S11 tri-phase
regulators (gang). The bootloader may have configured these
regulators with non sustainable default values, leading to sporadic
hangs under CPU stress tests (cpufreq-bench). Ideally we should enable
voltage scaling along with frequency scaling, but for now just set the
regulator gang value to a sane voltage, capable of supporting highest
frequencies (turbo).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Link: https://lore.kernel.org/r/1578401755-26211-1-git-send-email-loic.poulain@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-07 15:27:57 -08:00
Niklas Cassel
eac8ce86cb arm64: dts: qcom: qcs404-evb: Set vdd_apc regulator in high power mode
vdd_apc is the regulator that supplies the main CPU cluster.

At sudden CPU load changes, we have noticed invalid page faults on
addresses with all bits shifted, as well as on addresses with individual
bits flipped.

By putting the vdd_apc regulator in high power mode, the voltage drops
during sudden load changes will be less severe, and we have not been able
to reproduce the invalid page faults with the regulator in this mode.

Fixes: 8faea8edbb ("arm64: dts: qcom: qcs404-evb: add spmi regulators")
Cc: stable@vger.kernel.org
Suggested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20191014120920.12691-1-niklas.cassel@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-07 15:17:04 -08:00
Bjorn Andersson
c9ec155b59 arm64: dts: qcom: msm8998-mtp: Add alias for blsp1_uart3
The msm_serial driver has a predefined set of uart ports defined, which
is allocated either by reading aliases or if no match is found a simple
counter, starting at index 0. But there's no logic in place to prevent
these two allocation mechanism from colliding. As a result either none
or all of the active msm_serial instances must be listed as aliases.

Define blsp1_uart3 as "serial1" to mitigate this problem.

Fixes: 4cffb9f2c7 ("arm64: dts: qcom: msm8998-mtp: Enable bluetooth")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Link: https://lore.kernel.org/r/20191119011823.379100-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-07 15:17:03 -08:00
Johan Jonker
25418f9d49 arm64: dts: rockchip: rk3399-hugsun-x99: remove supports-sd and supports-emmc options
The entries "supports-sd" and "supports-emmc" are not a valid Linux option
in relation with SD card or eMMC, so remove them.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20191231175054.4929-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-07 23:03:10 +01:00
Johan Jonker
24bea4dfa3 arm64: dts: rockchip: rk3399-firefly: remove num-slots from &sdio0 node
The option "num-slots" was deprecated long time ago, so remove it.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20191231191154.5587-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-07 23:02:55 +01:00
Amanieu d'Antras
a4376f2fbc
arm64: Implement copy_thread_tls
This is required for clone3 which passes the TLS value through a
struct rather than a register.

Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: <stable@vger.kernel.org> # 5.3.x
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20200102172413.654385-3-amanieu@gmail.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-01-07 13:31:01 +01:00
Amanieu d'Antras
3e3c8ca5a3
arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers
Previously this was only defined in the internal headers which
resulted in __NR_clone3 not being defined in the user headers.

Signed-off-by: Amanieu d'Antras <amanieu@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: <stable@vger.kernel.org> # 5.3.x
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200102172413.654385-2-amanieu@gmail.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2020-01-07 13:30:49 +01:00
Rajeshwari
2552c123e8 arm64: dts: qcom: sc7180: Add critical interrupt and cooling maps for TSENS in SC7180
Added critical interrupt support in TSENS node and cooling maps in Thermal-zones node.

Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Rajeshwari <rkambl@codeaurora.org>
Link: https://lore.kernel.org/r/1578317369-16045-2-git-send-email-rkambl@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-06 21:39:03 -08:00
Chen-Yu Tsai
b71818cbda
arm64: dts: allwinner: sun50i-a64: Use macros for newly exported clocks
A few clocks from the CCU were exported later, and references to them in
the device tree were using raw numbers.

Now that the DT binding header changes are in as well, switch to the
macros for more clarity.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-01-06 23:24:06 +01:00
Chen-Yu Tsai
60d0426d76
arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-CC H5 board
The Libre Computer ALL-H5-CC board is an upgraded version of the
ALL-H3-CC. Changes include:

  - Gigabit Ethernet via external RTL8211E Ethernet PHY
  - 16 MiB SPI NOR flash memory
  - PoE tap header
  - Line out jack removed

Only H5 variant test samples were made available, and the vendor is not
certain whether other SoC variants would be made or not. Furthermore the
board is a minor upgrade compared to the ALL-H3-CC. Thus the device tree
simply includes the one for the ALL-H3-CC, and adds the changes on top.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-01-06 23:24:05 +01:00
Stanimir Varbanov
277a13b5f8 arm64: dts: qcom: msm8996: Fix venus iommu nodename error
Fix the following error/warn seen with make dtbs_check

arm,smmu-venus@d40000: $nodename:0: 'arm,smmu-venus@d40000' does not match '^iommu@[0-9a-f]*'
arm,smmu-venus@d40000: clock-names:0: 'bus' was expected
arm,smmu-venus@d40000: clock-names:1: 'iface' was expected

by rename nodename to "iommu".

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Link: https://lore.kernel.org/r/20200106102305.27059-1-stanimir.varbanov@linaro.org
[bjorn: Added padding of address to 8 digits]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-06 11:10:59 -08:00
Catalin Marinas
24cecc3774 arm64: Revert support for execute-only user mappings
The ARMv8 64-bit architecture supports execute-only user permissions by
clearing the PTE_USER and PTE_UXN bits, practically making it a mostly
privileged mapping but from which user running at EL0 can still execute.

The downside, however, is that the kernel at EL1 inadvertently reading
such mapping would not trip over the PAN (privileged access never)
protection.

Revert the relevant bits from commit cab15ce604 ("arm64: Introduce
execute-only page access permissions") so that PROT_EXEC implies
PROT_READ (and therefore PTE_USER) until the architecture gains proper
support for execute-only user mappings.

Fixes: cab15ce604 ("arm64: Introduce execute-only page access permissions")
Cc: <stable@vger.kernel.org> # 4.9.x-
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-01-06 10:10:07 -08:00
Olof Johansson
8b004f1262 Renesas ARM64 DT updates for v5.6
- Remove now unused ARCH_R8A7796 config symbol,
   - Rename R-Car H3 and M3-W SoC, and ULCB board DTS files to increase
     naming consistency,
   - Miscellaneous fixes for issues detected by "make dtbs_check",
   - Enhance support for R-Car M3-W+,
   - Display support for the EK874 board,
   - Prepare for split of R-Car H3 ES1.x and ES2.0+ config symbols,
   - Minor fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXhMGUAAKCRCKwlD9ZEnx
 cCDiAP9H7ARLrTCvJ2mrJFCrDVL6xc2JFL9z9BqPdyzhy3bG0gEAnvoh99NRIWGM
 hfQc76xsD2l14u1jbXFrJBxmLCFAhQM=
 =9SUQ
 -----END PGP SIGNATURE-----

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

Renesas ARM64 DT updates for v5.6

  - Remove now unused ARCH_R8A7796 config symbol,
  - Rename R-Car H3 and M3-W SoC, and ULCB board DTS files to increase
    naming consistency,
  - Miscellaneous fixes for issues detected by "make dtbs_check",
  - Enhance support for R-Car M3-W+,
  - Display support for the EK874 board,
  - Prepare for split of R-Car H3 ES1.x and ES2.0+ config symbols,
  - Minor fixes and improvements.

* tag 'renesas-arm64-dt-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: dts: renesas: Prepare for split of ARCH_R8A7795 into ARCH_R8A7795[01]
  arm64: dts: renesas: Sort DTBs in Makefile
  arm64: dts: renesas: Drop redundant SoC prefixes from ULCB DTS file names
  arm64: dts: renesas: Rename r8a7795{-es1,}* to r8a7795[01]*
  arm64: dts: renesas: Add EK874 board with idk-2121wr display support
  arm64: dts: renesas: r8a77961: Add SDHI nodes
  arm64: dts: renesas: r8a77961: Add I2C nodes
  arm64: dts: renesas: r8a77961: Add SYS-DMAC nodes
  arm64: dts: renesas: r8a77961: Add RAVB node
  arm64: dts: renesas: r8a77961: Add GPIO nodes
  arm64: dts: renesas: r8a77961: Add RWDT node
  arm64: dts: renesas: r8a77990: ebisu: Remove clkout-lr-synchronous from sound
  arm64: dts: renesas: r8a77970: Group tuples in thermal reg property
  arm64: dts: renesas: Group tuples in pci ranges and dma-ranges properties
  arm64: dts: renesas: Group tuples in interrupt properties
  arm64: dts: renesas: Group tuples in regulator-gpio states properties
  arm64: dts: renesas: Rename r8a7796* to r8a77960*
  arm64: dts: renesas: Remove use of ARCH_R8A7796

Link: https://lore.kernel.org/r/20200106104857.8361-4-geert+renesas@glider.be
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-06 09:28:57 -08:00
Chunyan Zhang
f1da5ea670 arm64: dts: Add Unisoc's SC9863A SoC support
Add basic DT to support Unisoc's SC9863A, with this patch,
the board sp9863a-1h10 can run into console.

Link: https://lore.kernel.org/r/20191223092948.24824-4-zhang.lyra@gmail.com
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-01-06 09:21:57 -08:00
Miquel Raynal
dbb6f77879 arm64: dts: rockchip: Add PX30 LVDS
Describe LVDS IP. Add the CRTC and LVDS relevant endpoints so they can
be linked together.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20191224143900.23567-12-miquel.raynal@bootlin.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-06 12:45:27 +01:00
Heiko Stuebner
cc5912ab43 arm64: dts: rockchip: add dsi controller for px30
This adds the dw-mipi-dsi controller and hooks it into the
display-subsystem on px30.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Link: https://lore.kernel.org/r/20200106112005.795834-1-heiko@sntech.de
2020-01-06 12:42:04 +01:00
Robin Murphy
3433bdf98d arm64: dts: rockchip: Fix IR on Beelink A1
Apparently I wasn't paying enough attention... And nor is the lazy
test of `cat /dev/lirc0` sufficiently blunder-proof. Oh well, with
the correct polarity, let's also hook up a keymap now that one for
the standard Beelink remote has handily appeared.

Fixes: 79702ded8c ("arm64: dts: rockchip: Add Beelink A1")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/44269c08e2a5d75b03ded87d2eb11621762d8249.1577636223.git.robin.murphy@arm.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-06 12:39:26 +01:00
Miquel Raynal
7e90ccec8c arm64: dts: rockchip: Add PX30 DSI DPHY
Add the PHY which outputs MIPI DSI and LVDS.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20191224143900.23567-11-miquel.raynal@bootlin.com
[added dsi power-domain, following vendor-kernel]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2020-01-06 12:38:46 +01:00
Samuel Holland
ad39fc5b5f
arm64: dts: allwinner: a64: pinebook: Fix lid wakeup
By default, gpio-keys configures the pin to trigger wakeup IRQs on
either edge. The lid switch should only trigger wakeup when opening the
lid, not when closing it.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2020-01-06 09:52:59 +01:00
Vinod Koul
a8aa481a5d arm64: dts: qcom: sdm845: add the ufs reset
Add the core UFS reset for sdm845

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200106070826.147064-4-vkoul@kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-05 23:33:59 -08:00
Vinod Koul
c79ec8911e arm64: dts: qcom: sm8150: Fix UFS phy register size
UFS phy register space size is 0x1c0. so update it

Reported-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200106070826.147064-3-vkoul@kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-05 23:33:55 -08:00
Vinod Koul
7c785435ba arm64: dts: qcom: sm8150-mtp: Add UFS gpio reset
Add the reset-gpio for UFS for sm8150-mtp.

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200106070826.147064-2-vkoul@kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-05 23:33:50 -08:00
Shawn Guo
3d5191a140 arm64: dts: hi3798cv200-poplar: add linux,rc-map-name for IR
It adds remote control map name for IR device, so that key event can be
reported.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
2020-01-06 10:07:26 +08:00
Niklas Cassel
a7ab9b89af arm64: defconfig: enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM
Enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM.

Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20191129213917.1301110-6-niklas.cassel@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-04 23:58:00 -08:00
Niklas Cassel
2e08c109d8 arm64: defconfig: enable CONFIG_QCOM_CPR
Enable CONFIG_QCOM_CPR.

Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20191129213917.1301110-5-niklas.cassel@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-04 23:57:58 -08:00
Niklas Cassel
04aadcaadd arm64: dts: qcom: qcs404: Add CPR and populate OPP table
Add CPR and populate OPP table.

Co-developed-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20191129213917.1301110-4-niklas.cassel@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-04 23:57:32 -08:00
Jorge Ramirez-Ortiz
f666fba17b arm64: defconfig: Enable HFPLL
The high frequency pll is required on compatible Qualcomm SoCs to
support the CPU frequency scaling feature.

Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20191125142511.681149-6-niklas.cassel@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-04 23:57:03 -08:00
Jorge Ramirez-Ortiz
cbccc6bcdf arm64: dts: qcom: qcs404: Add DVFS support
Support dynamic voltage and frequency scaling on qcs404.

CPUFreq will soon be superseded by Core Power Reduction (CPR, a form
of Adaptive Voltage Scaling found on some Qualcomm SoCs like the
qcs404).

Due to the CPR upstreaming already being in progress - and some
commits already merged -  the following commit will need to be
reverted to enable CPUFreq support

   Author: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
   Date:   Thu Jul 25 12:41:36 2019 +0200
       cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist

Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20191125142511.681149-5-niklas.cassel@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-04 23:56:53 -08:00
Jorge Ramirez-Ortiz
01163a2001 arm64: dts: qcom: qcs404: Add the clocks for APCS mux/divider
Specify the clocks that feed the APCS mux/divider instead of using
default hardcoded values in the source code.

Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20191125142511.681149-4-niklas.cassel@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-04 23:56:45 -08:00
Jorge Ramirez-Ortiz
40b3d94043 arm64: dts: qcom: qcs404: Add HFPLL node
The high frequency pll functionality is required to enable CPU
frequency scaling operation.

Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20191125142511.681149-3-niklas.cassel@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-04 23:56:42 -08:00
Jorge Ramirez-Ortiz
118764988c arm64: dts: qcom: msm8916: Add the clocks for the APCS mux/divider
Specify the clocks that feed the APCS mux/divider instead of using
default hardcoded values in the source code.

The driver still supports the previous bindings; however with this
update it we allow the msm8916 to access the parent clock names
required by the driver operation using the device tree node.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20191125142511.681149-2-niklas.cassel@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-04 23:56:17 -08:00
Sibi Sankar
a16f862f60 arm64: dts: qcom: sc7180: Add rpmh power-domain node
Add the DT node for the rpmhpd power controller on SC7180 SoCs.

Reviewed-by: Rajendra Nayak <rnayak@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Link: https://lore.kernel.org/r/20191220064823.6115-3-sibis@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-04 23:54:03 -08:00
David Hildenbrand
feee6b2989 mm/memory_hotplug: shrink zones when offlining memory
We currently try to shrink a single zone when removing memory.  We use
the zone of the first page of the memory we are removing.  If that
memmap was never initialized (e.g., memory was never onlined), we will
read garbage and can trigger kernel BUGs (due to a stale pointer):

    BUG: unable to handle page fault for address: 000000000000353d
    #PF: supervisor write access in kernel mode
    #PF: error_code(0x0002) - not-present page
    PGD 0 P4D 0
    Oops: 0002 [#1] SMP PTI
    CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 5.3.0-rc5-next-20190820+ #317
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.4
    Workqueue: kacpi_hotplug acpi_hotplug_work_fn
    RIP: 0010:clear_zone_contiguous+0x5/0x10
    Code: 48 89 c6 48 89 c3 e8 2a fe ff ff 48 85 c0 75 cf 5b 5d c3 c6 85 fd 05 00 00 01 5b 5d c3 0f 1f 840
    RSP: 0018:ffffad2400043c98 EFLAGS: 00010246
    RAX: 0000000000000000 RBX: 0000000200000000 RCX: 0000000000000000
    RDX: 0000000000200000 RSI: 0000000000140000 RDI: 0000000000002f40
    RBP: 0000000140000000 R08: 0000000000000000 R09: 0000000000000001
    R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000140000
    R13: 0000000000140000 R14: 0000000000002f40 R15: ffff9e3e7aff3680
    FS:  0000000000000000(0000) GS:ffff9e3e7bb00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 000000000000353d CR3: 0000000058610000 CR4: 00000000000006e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     __remove_pages+0x4b/0x640
     arch_remove_memory+0x63/0x8d
     try_remove_memory+0xdb/0x130
     __remove_memory+0xa/0x11
     acpi_memory_device_remove+0x70/0x100
     acpi_bus_trim+0x55/0x90
     acpi_device_hotplug+0x227/0x3a0
     acpi_hotplug_work_fn+0x1a/0x30
     process_one_work+0x221/0x550
     worker_thread+0x50/0x3b0
     kthread+0x105/0x140
     ret_from_fork+0x3a/0x50
    Modules linked in:
    CR2: 000000000000353d

Instead, shrink the zones when offlining memory or when onlining failed.
Introduce and use remove_pfn_range_from_zone(() for that.  We now
properly shrink the zones, even if we have DIMMs whereby

 - Some memory blocks fall into no zone (never onlined)

 - Some memory blocks fall into multiple zones (offlined+re-onlined)

 - Multiple memory blocks that fall into different zones

Drop the zone parameter (with a potential dubious value) from
__remove_pages() and __remove_section().

Link: http://lkml.kernel.org/r/20191006085646.5768-6-david@redhat.com
Fixes: f1dd2cd13c ("mm, memory_hotplug: do not associate hotadded memory to zones until online")	[visible after d0dc12e86b]
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Logan Gunthorpe <logang@deltatee.com>
Cc: <stable@vger.kernel.org>	[5.0+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-01-04 13:55:08 -08:00
AngeloGioacchino Del Regno
268b4cdfff arm64: dts: pm8004: Add SPMI regulator and add phandles to lsids
Add the SPMI regulator node in the PM8004 LSID5 (as there is where
it resides basically 99% of the times) and set the nodes to be
disabled by default, as not all boards have both or one of the
lsids specified in this generic pm8004 DT.

While at it, also add nice phandles to the lsids specified in this
DT to allow configuration in specific board dts in a more human
readable fashion.

Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
Link: https://lore.kernel.org/r/20191031111645.34777-3-kholk11@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-03 12:56:36 -08:00
Arnd Bergmann
202bf8d758 compat: provide compat_ptr() on all architectures
In order to avoid needless #ifdef CONFIG_COMPAT checks,
move the compat_ptr() definition to linux/compat.h
where it can be seen by any file regardless of the
architecture.

Only s390 needs a special definition, this can use the
self-#define trick we have elsewhere.

Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-01-03 09:32:51 +01:00
Arnd Bergmann
556d687a4c compat: ARM64: always include asm-generic/compat.h
In order to use compat_* type defininitions in device drivers
outside of CONFIG_COMPAT, move the inclusion of asm-generic/compat.h
ahead of the #ifdef.

All other architectures already do this.

Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-01-03 09:32:32 +01:00
Ulf Hansson
e371315568 arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916
To enable the OS to better support PSCI OS initiated CPU suspend mode,
let's convert from the flattened layout to the hierarchical layout.

In the hierarchical layout, let's create a power domain provider per CPU
and describe the idle states for each CPU inside the power domain provider
node. To group the CPUs into a cluster, let's add another power domain
provider and make it act as the master domain. Note that, the CPU's idle
states remains compatible with "arm,idle-state", while the cluster's idle
state becomes compatible with "domain-idle-state".

Co-developed-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
2020-01-02 16:53:10 +01:00
Robin Murphy
4f279f9fbc arm64: dts: rockchip: Add RK3328 idle state
Downstream RK3328 DTBs describe a CPU idle state matching that present
on other SoCs like RK3399. This works with upstream Trusted Firmware-A
too, so let's add it here.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/a8c83e705d387446ea8121516d410e38b2d9c57b.1577640736.git.robin.murphy@arm.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-12-31 12:48:46 +01:00
Johan Jonker
ba790c16a8 arm64: dts: rockchip: remove identical &uart0 node from rk3368-lion-haikou
There are two identical &uart0 nodes in this dts file,
so remove one of them.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20191228074757.2075-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2019-12-31 12:46:01 +01:00
Geert Uytterhoeven
7ba33c335a arm64: dts: renesas: Prepare for split of ARCH_R8A7795 into ARCH_R8A7795[01]
As R-Car H3 ES1.x (R8A77950) and R-Car H3 ES2.0+ (R8A77951) are really
different SoCs, CONFIG_ARCH_R8A7795 will be split in
CONFIG_ARCH_R8A77950 and CONFIG_ARCH_R8A77951.

Relax dependencies by handling both the old and the new symbols.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191217183841.432-5-geert+renesas@glider.be
2019-12-31 10:28:56 +01:00
Geert Uytterhoeven
567d4ffb6d arm64: dts: renesas: Sort DTBs in Makefile
Sort the entries for the various DTBs in the Makefile by SoC and board
type.  Keep Salvator-X(S) together, and do the same for ULCB with and
without Kingfisher extension.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191217183841.432-4-geert+renesas@glider.be
2019-12-31 10:28:56 +01:00
Geert Uytterhoeven
919d31abe7 arm64: dts: renesas: Drop redundant SoC prefixes from ULCB DTS file names
Unlike the V3MSK and V3HSK boards, the various "ULCB" boards are really
the same boards, with different SiPs fitted, just like the Salvator-X(S)
boards.  Furthermore, the "H3", "M3", and "M3N" prefixes of the "ULCB"
parts in the DTS file names are redundant, as they are implied by the
SoC part numbers, which are also part of the file names.

Hence drop the redundant prefixes, to make the DTS file names consistent
with the file names for the various "Salvator-X(S)" boards.

Suggested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191217183841.432-3-geert+renesas@glider.be
2019-12-31 10:28:56 +01:00
Geert Uytterhoeven
052e99db7c arm64: dts: renesas: Rename r8a7795{-es1,}* to r8a7795[01]*
Despite using the same compatible values ("r8a7795"-based) because of
historical reasons, R-Car H3 ES1.x (R8A77950) and R-Car H3 ES2.0+
(R8A77951) are really different SoCs, with different part numbers.

Reflect this in the DTS files by changing their base names from
"r8a7795-es1" and "r8a7795" to "r8a77950" resp. "r8a77951".
Drop all "ES" references next to part numbers, as they are implied by
the part numbers, and thus redundant.

Note that DT binding headers, definitions, and compatible values are
not renamed, to preserve backward compatibility.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191217183841.432-2-geert+renesas@glider.be
2019-12-31 10:28:20 +01:00
Amit Kucheria
f0b888af53 arm64: dts: msm8998: thermal: Add critical interrupt support
Register critical interrupts for each of the two tsens controllers

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Link: https://lore.kernel.org/r/3ef309a98ca6445c1982ec3ff1a70db39b18f415.1575349416.git.amit.kucheria@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-28 22:25:53 -08:00
Amit Kucheria
1246f78297 arm64: dts: msm8996: thermal: Add critical interrupt support
Register critical interrupts for each of the two tsens controllers

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Link: https://lore.kernel.org/r/53d8f7b922ec889ed11380896c2a367ae0998db2.1575349416.git.amit.kucheria@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-28 22:25:34 -08:00
David S. Miller
2bbc078f81 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Daniel Borkmann says:

====================
pull-request: bpf-next 2019-12-27

The following pull-request contains BPF updates for your *net-next* tree.

We've added 127 non-merge commits during the last 17 day(s) which contain
a total of 110 files changed, 6901 insertions(+), 2721 deletions(-).

There are three merge conflicts. Conflicts and resolution looks as follows:

1) Merge conflict in net/bpf/test_run.c:

There was a tree-wide cleanup c593642c8b ("treewide: Use sizeof_field() macro")
which gets in the way with b590cb5f80 ("bpf: Switch to offsetofend in
BPF_PROG_TEST_RUN"):

  <<<<<<< HEAD
          if (!range_is_zero(__skb, offsetof(struct __sk_buff, priority) +
                             sizeof_field(struct __sk_buff, priority),
  =======
          if (!range_is_zero(__skb, offsetofend(struct __sk_buff, priority),
  >>>>>>> 7c8dce4b16

There are a few occasions that look similar to this. Always take the chunk with
offsetofend(). Note that there is one where the fields differ in here:

  <<<<<<< HEAD
          if (!range_is_zero(__skb, offsetof(struct __sk_buff, tstamp) +
                             sizeof_field(struct __sk_buff, tstamp),
  =======
          if (!range_is_zero(__skb, offsetofend(struct __sk_buff, gso_segs),
  >>>>>>> 7c8dce4b16

Just take the one with offsetofend() /and/ gso_segs. Latter is correct due to
850a88cc40 ("bpf: Expose __sk_buff wire_len/gso_segs to BPF_PROG_TEST_RUN").

2) Merge conflict in arch/riscv/net/bpf_jit_comp.c:

(I'm keeping Bjorn in Cc here for a double-check in case I got it wrong.)

  <<<<<<< HEAD
          if (is_13b_check(off, insn))
                  return -1;
          emit(rv_blt(tcc, RV_REG_ZERO, off >> 1), ctx);
  =======
          emit_branch(BPF_JSLT, RV_REG_T1, RV_REG_ZERO, off, ctx);
  >>>>>>> 7c8dce4b16

Result should look like:

          emit_branch(BPF_JSLT, tcc, RV_REG_ZERO, off, ctx);

3) Merge conflict in arch/riscv/include/asm/pgtable.h:

  <<<<<<< HEAD
  =======
  #define VMALLOC_SIZE     (KERN_VIRT_SIZE >> 1)
  #define VMALLOC_END      (PAGE_OFFSET - 1)
  #define VMALLOC_START    (PAGE_OFFSET - VMALLOC_SIZE)

  #define BPF_JIT_REGION_SIZE     (SZ_128M)
  #define BPF_JIT_REGION_START    (PAGE_OFFSET - BPF_JIT_REGION_SIZE)
  #define BPF_JIT_REGION_END      (VMALLOC_END)

  /*
   * Roughly size the vmemmap space to be large enough to fit enough
   * struct pages to map half the virtual address space. Then
   * position vmemmap directly below the VMALLOC region.
   */
  #define VMEMMAP_SHIFT \
          (CONFIG_VA_BITS - PAGE_SHIFT - 1 + STRUCT_PAGE_MAX_SHIFT)
  #define VMEMMAP_SIZE    BIT(VMEMMAP_SHIFT)
  #define VMEMMAP_END     (VMALLOC_START - 1)
  #define VMEMMAP_START   (VMALLOC_START - VMEMMAP_SIZE)

  #define vmemmap         ((struct page *)VMEMMAP_START)

  >>>>>>> 7c8dce4b16

Only take the BPF_* defines from there and move them higher up in the
same file. Remove the rest from the chunk. The VMALLOC_* etc defines
got moved via 01f52e16b8 ("riscv: define vmemmap before pfn_to_page
calls"). Result:

  [...]
  #define __S101  PAGE_READ_EXEC
  #define __S110  PAGE_SHARED_EXEC
  #define __S111  PAGE_SHARED_EXEC

  #define VMALLOC_SIZE     (KERN_VIRT_SIZE >> 1)
  #define VMALLOC_END      (PAGE_OFFSET - 1)
  #define VMALLOC_START    (PAGE_OFFSET - VMALLOC_SIZE)

  #define BPF_JIT_REGION_SIZE     (SZ_128M)
  #define BPF_JIT_REGION_START    (PAGE_OFFSET - BPF_JIT_REGION_SIZE)
  #define BPF_JIT_REGION_END      (VMALLOC_END)

  /*
   * Roughly size the vmemmap space to be large enough to fit enough
   * struct pages to map half the virtual address space. Then
   * position vmemmap directly below the VMALLOC region.
   */
  #define VMEMMAP_SHIFT \
          (CONFIG_VA_BITS - PAGE_SHIFT - 1 + STRUCT_PAGE_MAX_SHIFT)
  #define VMEMMAP_SIZE    BIT(VMEMMAP_SHIFT)
  #define VMEMMAP_END     (VMALLOC_START - 1)
  #define VMEMMAP_START   (VMALLOC_START - VMEMMAP_SIZE)

  [...]

Let me know if there are any other issues.

Anyway, the main changes are:

1) Extend bpftool to produce a struct (aka "skeleton") tailored and specific
   to a provided BPF object file. This provides an alternative, simplified API
   compared to standard libbpf interaction. Also, add libbpf extern variable
   resolution for .kconfig section to import Kconfig data, from Andrii Nakryiko.

2) Add BPF dispatcher for XDP which is a mechanism to avoid indirect calls by
   generating a branch funnel as discussed back in bpfconf'19 at LSF/MM. Also,
   add various BPF riscv JIT improvements, from Björn Töpel.

3) Extend bpftool to allow matching BPF programs and maps by name,
   from Paul Chaignon.

4) Support for replacing cgroup BPF programs attached with BPF_F_ALLOW_MULTI
   flag for allowing updates without service interruption, from Andrey Ignatov.

5) Cleanup and simplification of ring access functions for AF_XDP with a
   bonus of 0-5% performance improvement, from Magnus Karlsson.

6) Enable BPF JITs for x86-64 and arm64 by default. Also, final version of
   audit support for BPF, from Daniel Borkmann and latter with Jiri Olsa.

7) Move and extend test_select_reuseport into BPF program tests under
   BPF selftests, from Jakub Sitnicki.

8) Various BPF sample improvements for xdpsock for customizing parameters
   to set up and benchmark AF_XDP, from Jay Jayatheerthan.

9) Improve libbpf to provide a ulimit hint on permission denied errors.
   Also change XDP sample programs to attach in driver mode by default,
   from Toke Høiland-Jørgensen.

10) Extend BPF test infrastructure to allow changing skb mark from tc BPF
    programs, from Nikita V. Shirokov.

11) Optimize prologue code sequence in BPF arm32 JIT, from Russell King.

12) Fix xdp_redirect_cpu BPF sample to manually attach to tracepoints after
    libbpf conversion, from Jesper Dangaard Brouer.

13) Minor misc improvements from various others.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2019-12-27 14:20:10 -08:00
Ondrej Jirman
d7cfb661b2
arm64: dts: allwinner: h6: Add thermal sensor and thermal zones
There are two sensors, one for CPU, one for GPU.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-12-27 16:37:04 +01:00
Bjorn Andersson
82b1cc447a arm64: dts: qcom: db845c: Move remoteproc firmware to sdm845
The redistributable firmware should work on any engineering device, so
lets push this to qcom/sdm845, rather than qcom/db845c. Also specify the
path for the modem firmware.

Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20191113203951.3704428-1-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 21:03:35 -08:00
Bjorn Andersson
6cbdec2d3c arm64: dts: qcom: msm8996: Introduce IFC6640
Introduce a base dts for the Inforce 6640 Single Board Computer. This
initial commit boots to console on the uart and provides UFS and SD card
storage support.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:10 -08:00
Bjorn Andersson
83d9ed4342 arm64: dts: qcom: db820c: Use regulator names from schematics
Update the regulator names in db820c.dtsi to use the names from the
schematics, instead of the made up genric names.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:10 -08:00
Bjorn Andersson
50aa72ccb3 arm64: dts: qcom: msm8996: Sort all nodes in msm8996.dtsi
Sort all the nodes by unit address, then name.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:10 -08:00
Bjorn Andersson
86f6d6225e arm64: dts: qcom: msm8996: Pad addresses
Pad all addresses in msm8996.dtsi to 8 digits, in order to make it
easier to ensure ordering when adding new nodes.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:09 -08:00
Bjorn Andersson
88264f1f6b arm64: dts: qcom: db820c: Remove pin specific files
Rather than scattering pinctrl definitions in various files, merge the
nodes into db820c.dtsi to make it easier to navigate.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:09 -08:00
Bjorn Andersson
d5f4ac865a arm64: dts: qcom: db820c: Sort all nodes
Sort all nodes in db820c.dtsi based on address, then name.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:09 -08:00
Bjorn Andersson
7b494cc41e arm64: dts: qcom: db820c: Group root nodes
Prior refactoring have left a few root nodes scattered throughout
db820c.dtsi, group these at the top of the file.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:08 -08:00
Bjorn Andersson
c61a5658e8 arm64: dts: qcom: msm8996: Move regulators to db820c
As the definition of available PMICs and the names of their outputs are
board specifc move this to db820c.dtsi

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:08 -08:00
Bjorn Andersson
8088443143 arm64: dts: qcom: msm8996: Move regulator consumers to db820c
Supplies for the various components in the SoC depends on board layout,
so move the supply definitions to db820c.dtsi instead of carrying them
in the platform dtsi.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:08 -08:00
Bjorn Andersson
75b77d6492 arm64: dts: qcom: msm8996: Use node references in db820c
Instead of mimicing the structure of the platform, reference nodes by
their label in apq8096-db820c.dtsi. Add labels in msm8996.dtsi where
necessary.

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:08 -08:00
Bjorn Andersson
f978d45b4a arm64: dts: qcom: db820c: Move non-soc entries out of /soc
The USB id pins and wlan regulator are not platform devices, so move
them out of /soc

Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-12-26 16:24:07 -08:00
Chen-Yu Tsai
1b27080ab2
ARM: dts: sunxi: Add Libre Computer ALL-H3-IT H5 board
The Libre Computer ALL-H3-IT board is a small single board computer that
is roughly the same size as the Raspberry Pi Zero, or around 20% smaller
than a credit card.

The board features:

  - H2, H3, or H5 SoC from Allwinner
  - 2 DDR3 DRAM chips
  - Realtek RTL8821CU based WiFi module
  - 128 Mbit SPI-NOR flash
  - micro-SD card slot
  - micro HDMI video output
  - FPC connector for camera sensor module
  - generic Raspberri-Pi style 40 pin GPIO header
  - additional pin headers for extra USB host ports, ananlog audio and
    IR receiver

Only H5 variant test samples were made available, but the vendor does
have plans to include at least an H3 variant. Thus the device tree is
split much like the ALL-H3-CC, with a common dtsi file for the board
design, and separate dts files including the common board file and the
SoC dtsi file. The other variants will be added as they are made
available.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-12-26 10:54:53 +01:00
Jagan Teki
16c8ff571a
arm64: dts: allwinner: a64: Add MIPI DSI pipeline
Add MIPI DSI pipeline for Allwinner A64.

- dsi node, with A64 compatible since it doesn't support
  DSI_SCLK gating unlike A33
- dphy node, with A64 compatible with A33 fallback since
  DPHY on A64 and A33 is similar
- finally, attach the dsi_in to tcon0 for complete MIPI DSI

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Merlijn Wajer <merlijn@wizzup.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-12-26 10:36:57 +01:00
Vasily Khoruzhick
59f5e9b9a8
arm64: dts: allwinner: a64: Add thermal sensors and thermal zones
A64 has 3 thermal sensors: 1 for CPU, 2 for GPU.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-12-26 10:27:07 +01:00
Ondrej Jirman
9ad4255710
arm64: dts: allwinner: h5: Add thermal sensor and thermal zones
There are two sensors, one for CPU, one for GPU.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
2019-12-26 10:27:05 +01:00
Ard Biesheuvel
966291f634 efi/libstub: Rename efi_call_early/_runtime macros to be more intuitive
The macros efi_call_early and efi_call_runtime are used to call EFI
boot services and runtime services, respectively. However, the naming
is confusing, given that the early vs runtime distinction may suggest
that these are used for calling the same set of services either early
or late (== at runtime), while in reality, the sets of services they
can be used with are completely disjoint, and efi_call_runtime is also
only usable in 'early' code.

So do a global sweep to replace all occurrences with efi_bs_call or
efi_rt_call, respectively, where BS and RT match the idiom used by
the UEFI spec to refer to boot time or runtime services.

While at it, use 'func' as the macro parameter name for the function
pointers, which is less likely to collide and cause weird build errors.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>
Cc: Borislav Petkov <bp@alien8.de>
Cc: James Morse <james.morse@arm.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20191224151025.32482-24-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-12-25 10:49:25 +01:00