Commit Graph

20883 Commits

Author SHA1 Message Date
Nobuhiro Iwamatsu
0e7cd4395b arm64: dts: visconti: Update the clock providers for I2C
Replace I2C clock with common clock framework.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220510015229.139818-3-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:17:00 +09:00
Nobuhiro Iwamatsu
4374055674 arm64: dts: visconti: Update the clock providers for UART
Remove fixed clock and source common clock for UART.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220510015229.139818-2-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:16:07 +09:00
Nobuhiro Iwamatsu
34f7c6e7d4 arm64: dts: visconti: Add clock controller support for TMPV7708
Adds node of clock controller support for Toshiba Visconti TMPV7708.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://lore.kernel.org/r/20220421080143.2135566-1-nobuhiro1.iwamatsu@toshiba.co.jp/
2022-05-10 11:11:07 +09:00
David Hildenbrand
570ef36350 arm64/pgtable: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE
Let's use one of the type bits: core-mm only supports 5, so there is no
need to consume 6.

Note that we might be able to reuse bit 1, but reusing bit 1 turned out
problematic in the past for PROT_NONE handling; so let's play safe and use
another bit.

Link: https://lkml.kernel.org/r/20220329164329.208407-5-david@redhat.com
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Don Dutile <ddutile@redhat.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Liang Zhang <zhangliang5@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Nadav Amit <namit@vmware.com>
Cc: Oded Gabbay <oded.gabbay@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-05-09 18:20:46 -07:00
Mike Rapoport
260364d112 arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map
The semantics of pfn_valid() is to check presence of the memory map for a
PFN and not whether a PFN is covered by the linear map.  The memory map
may be present for NOMAP memory regions, but they won't be mapped in the
linear mapping.  Accessing such regions via __va() when they are
memremap()'ed will cause a crash.

On v5.4.y the crash happens on qemu-arm with UEFI [1]:

<1>[    0.084476] 8<--- cut here ---
<1>[    0.084595] Unable to handle kernel paging request at virtual address dfb76000
<1>[    0.084938] pgd = (ptrval)
<1>[    0.085038] [dfb76000] *pgd=5f7fe801, *pte=00000000, *ppte=00000000

...

<4>[    0.093923] [<c0ed6ce8>] (memcpy) from [<c16a06f8>] (dmi_setup+0x60/0x418)
<4>[    0.094204] [<c16a06f8>] (dmi_setup) from [<c16a38d4>] (arm_dmi_init+0x8/0x10)
<4>[    0.094408] [<c16a38d4>] (arm_dmi_init) from [<c0302e9c>] (do_one_initcall+0x50/0x228)
<4>[    0.094619] [<c0302e9c>] (do_one_initcall) from [<c16011e4>] (kernel_init_freeable+0x15c/0x1f8)
<4>[    0.094841] [<c16011e4>] (kernel_init_freeable) from [<c0f028cc>] (kernel_init+0x8/0x10c)
<4>[    0.095057] [<c0f028cc>] (kernel_init) from [<c03010e8>] (ret_from_fork+0x14/0x2c)

On kernels v5.10.y and newer the same crash won't reproduce on ARM because
commit b10d6bca87 ("arch, drivers: replace for_each_membock() with
for_each_mem_range()") changed the way memory regions are registered in
the resource tree, but that merely covers up the problem.

On ARM64 memory resources registered in yet another way and there the
issue of wrong usage of pfn_valid() to ensure availability of the linear
map is also covered.

Implement arch_memremap_can_ram_remap() on ARM and ARM64 to prevent access
to NOMAP regions via the linear mapping in memremap().

Link: https://lore.kernel.org/all/Yl65zxGgFzF1Okac@sirena.org.uk
Link: https://lkml.kernel.org/r/20220426060107.7618-1-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Tested-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Will Deacon <will@kernel.org>
Cc: <stable@vger.kernel.org>	[5.4+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-05-09 17:34:28 -07:00
Arnd Bergmann
977389aabe i.MX arm64 device tree update for 5.19:
- New board support: Engicam i.Core MX8M Plus SoM and EDIMM2.2 Starter
   Kit, Toradex Verdin i.MX8M Plus devices, Data Modul i.MX8M Mini eDM SBC,
   Verdin based MX8Menlo, 8MNANOD3L EVK, i.MX8M Plus Gateworks GW7400.
 - Enable RTS-CTS on UART3 for imx8mm-beacon and imx8mn-beacon boards.
 - Enable HS400-ES support for i.MX8MN and i.MX8MP uSDHC devices by
   updating the compatible.
 - A few updates on imx8mq-librem5 to increase boost regulation
   current, add panel compatible for r4 ("Evergreen") revision and volume
   buttons a wakeup source.
 - Clean up vendor specific 'fsl,uart-has-rtscts' property by using
   standard 'uart-has-rtscts'.
 - Add GPC, GPU, MEDIAMIX, and HSIO power domains for i.MX8M Plus SoC.
 - A series from Marcel Ziswiler to improve imx8mm-verdin support,
   including cosmetic changes and functional improvements like SD1 sleep
   pinctrl and fully validated IOMUX configuration.
 - Add PWM polarity inversion support for i.MX8 SoCs.
 - A couple of changes from Michael Walle to update PMIC output names and
   min/max voltages for imx8mn-evk board.
 - A series from Tim Harvey to improve imx8mm-venice boards, add missing
   uart-has-rtscts property to UARTs, clock-names to pcie_phy, and
   vdd_5p0 ADC channel.
 - Add VPU codec  devices for i.MX8QXP SoC.
 - Other small and random changes.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmJ3N+4UHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM748QgAt12d3nU7Eh3TbnpYO2ofVGv/JzNJ
 jUvyP5DzuxmFh9wvs50QuH7AkHjoBHh52cOxy0jHUJDvOF6o0UlUZjmhDmBK9hSh
 U7gnr+y3im7lZQNaPI5ECZcxPR7cStW3z2YDsdhx4eL6jn2Rh5kCdpOWbKqhaBEJ
 eQQEuY03GU7t+3BjwroTk1njyn6hH21NCskQCL1wR+B76z/0JtmocsNhwUjTmdvt
 +jMuHu2PMStbu8K0Eb45bsdKSk46TwQUeF9NDSDELuzYtA/XdWe7iBZd3NjlbFxY
 8mHBzF8poum3seA8XJA/O00KGhqGhKawIlMlQZCtxi8L0CxgEXABUFYsDA==
 =07f+
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5i6oACgkQmmx57+YA
 GNnzug/9G1L/D6yJw6TYlgGm0QD9D+BLlZ6tose33I8INCTIxl5MZ/79fW+8+8VI
 ZT83I94K6aLrqTTFiKOlSfhztGLgqRkr14952Nt3wgKSu+9t0cFvSpmJ4z+xathQ
 Gc7nEbNUZ8pOjNypyAK4+JztKMDOsV1NhvyWg0m4LFhQ5TscHFOYKAcx5Cu7YB13
 6wAEhpEJ5wacBLoCKTIiZXx66Mgxm9rBpE78auoFdYCscwmrwiVgPqsYkbhKVDT9
 NWvzMq7qKsMhf7JoIQwxmLhDeROLbjQUARixDQyrBVMIAVQ/E7LzUrnyNutj2P9E
 HFLr8PoF7/7SnezAPdhxw5fNpqliiaoSg7fmitDvmY9VTMh7wAnv5GqScPUlfCw0
 Fg8gTYhvLjtM4jsyPB6iTCjHddNFDNitEOm1FxvFfTpB1rE6oSGcU7m6+11QPsFt
 3JbDcDu39Jl8sQW6ZN+Iy2L3YfyskIxSuh2NCOtcXZLO3nosk6smu76S28JxgQcc
 S7pZK1OxBFRI9/+J0ZebK24fZW7AU6kDcOfH/0lh/ymyCG+NVkV3kEVqFRydDj+W
 IvdI1mEB2csiIFxr2jYjJdf4m8iBYbh/lwIs6bOp+RyY2Kjav5sA6mp3IZGLGIF9
 wFNXxOYXesehVxDkyZgxqoqAGyePgi71hRjNHCMC2YexVItEYlQ=
 =dgZt
 -----END PGP SIGNATURE-----

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

i.MX arm64 device tree update for 5.19:

- New board support: Engicam i.Core MX8M Plus SoM and EDIMM2.2 Starter
  Kit, Toradex Verdin i.MX8M Plus devices, Data Modul i.MX8M Mini eDM SBC,
  Verdin based MX8Menlo, 8MNANOD3L EVK, i.MX8M Plus Gateworks GW7400.
- Enable RTS-CTS on UART3 for imx8mm-beacon and imx8mn-beacon boards.
- Enable HS400-ES support for i.MX8MN and i.MX8MP uSDHC devices by
  updating the compatible.
- A few updates on imx8mq-librem5 to increase boost regulation
  current, add panel compatible for r4 ("Evergreen") revision and volume
  buttons a wakeup source.
- Clean up vendor specific 'fsl,uart-has-rtscts' property by using
  standard 'uart-has-rtscts'.
- Add GPC, GPU, MEDIAMIX, and HSIO power domains for i.MX8M Plus SoC.
- A series from Marcel Ziswiler to improve imx8mm-verdin support,
  including cosmetic changes and functional improvements like SD1 sleep
  pinctrl and fully validated IOMUX configuration.
- Add PWM polarity inversion support for i.MX8 SoCs.
- A couple of changes from Michael Walle to update PMIC output names and
  min/max voltages for imx8mn-evk board.
- A series from Tim Harvey to improve imx8mm-venice boards, add missing
  uart-has-rtscts property to UARTs, clock-names to pcie_phy, and
  vdd_5p0 ADC channel.
- Add VPU codec  devices for i.MX8QXP SoC.
- Other small and random changes.

* tag 'imx-dt64-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (65 commits)
  arm64: dt: imx8mp: support pwm polarity inversion
  arm64: dt: imx8mn: support pwm polarity inversion
  arm64: dt: imx8mm: support pwm polarity inversion
  arm64: dt: imx8mq: support pwm polarity inversion
  arm64: dts: imx8mm-venice-gw7901: remove unnecessary cpu temp override
  arm64: dts: imx8mm-venice-gw7902: add vdd_5p0 ADC channel
  arm64: dts: imx8m*venice: add missing clock-names to pcie_phy
  arm64: dts: imx8mm-venice-gw7902: fix pcie bindings
  arm64: dts: freescale: reduce the interrup-map-mask
  arm64: dts: imx8mn-beacon: Enable RTS-CTS on UART3
  arm64: dts: imx8mm-beacon: Enable RTS-CTS on UART3
  arm64: dts: imx8mm: Use 100 kHz I2C2 on Data Modul i.MX8M Mini eDM SBC
  arm64: dts: imx8mm: Disable USB2 OC on Data Modul i.MX8M Mini eDM SBC
  arm64: dts: imx8mm: Add CPLD on MX8Menlo board
  arm64: dts: imx8mq-kontron-pitx-imx8m: Use the standard 'uart-has-rtscts'
  arm64: dts: imx8mp-verdin: Use the standard 'uart-has-rtscts'
  arm64: dts: imx8mp: Add MEDIA_BLK_CTRL
  arm64: dts: imx8mp: Add MEDIAMIX power domains
  arm64: dts: imx8mp: add HSIO power-domains
  arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit
  ...

Link: https://lore.kernel.org/r/20220508033843.2773685-4-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:46:18 +02:00
Arnd Bergmann
d4dcdc53c4 Qualcomm ARM64 DT updates for v5.19
This adds MDIO bus description on the IPQ6018 platform.
 
 On MSM8916 the BAM-DMUX WWAN network device is added and the Huawei
 Ascend G7 gains sound card definition and clarified installation
 instructions.
 
 MSM8992 and MSM8994 continues to be worked on, gaining multimedia clock
 controller, on-chip memory, watchdog and various cleanup changes. The
 Xiaomi Mi 4C gains CPU regulators and fixes to the framebuffer
 definition, while Huawei Nexus 6P gains eMMC support.
 
 On MSM8996 the modem and sensor remtoeprocs are added and enabled in the
 Dragonboard 820c and the Xiaomi devices.
 
 On MSM8998 a few newly added clocks related to the sensor subsystem bus
 are marked as protected by default and the OnePlus devices gains NFC.
 
 The SC7180 platform and devices thereon are further polished and
 limozeen moves to using edp-panel for EDID-based detection, over
 statically defined panels.
 
 On SC7280 GPI DMA, WiFi remoteproc and network device, LPASS audio
 clocks, resets for SDCC controllers and a new CRD revision are added. A
 supply glitch on the PCIe power and a current leak for Bluetooth during
 suspend are corrected. The Herobrine board gains eDP support and the IDP
 gains backlight. USB is marked wakeup capable.
 
 On SDM845 the IPA, WLED based backlight and second WiFi channel are
 enabled for Xiaomi Pocophone F1, the firmware name is modified to not
 conflict with other boards.  On RB3 the CAN bus controller is added and
 the WiFi calibration variant is defined to allow adding the board's
 calibration information into linux-firmware.
 
 SM6350 gains I2C busses, UFS and WiFi support, and the numbering of
 uart9 is corrected.
 
 On SM7225 and the Fairphone 4 UFS, WiFi and haptics are enabled.
 
 On SM8150 PCIe, Ethernet and uSD card support is added, and enabled for
 the SA8155p ADP board. The PDC interrupt controller is also added and
 described as wakup interrupt parent for TLMM.
 
 Camera subsystem and control interface are defined for SM8250. On the
 Sony Xperia 1 II the audio amplifiers are enabled.
 
 On SM8350 GPI DMA engines are added and linked to the I2C and SPI
 serial engines. Surface Duo 2 gains battery charger support.
 
 On SM8450 the two PCIe controller/PHYs are enabled, GPI DMA and QUP
 serial engine instances are added. Remoteproc instances are enabled on
 SM8450 HDK.
 
 Last, but not least, a number of DeviceTree validation errors across
 various boards are corrected.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmJ5fREbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FTdwP/icvr02w0vfY+Ae2NEI2
 gS836xXJWTXMxj2rW4WPQVGzbhNouMfl3yGVV0LxUrkD7pkcXAtCFul/DYJoZSTT
 ubnh4v/Axl7YVW5JwlL/+k3BEi39rSupa9HfEyLM5jVq39a0G9TqugVm9KmimIfL
 UEMN5pR0ZPLmMrQXzNSSw9uqHuBdr7G+25MMb2yyW8GoxMYE8xcVz0Syz5Xomv6V
 DHxl3jgvx7An7x1MbbbSyEOtkIjMtTSqzrRil7Y4g9Q1YTum74r4q/vKqfW+IMpz
 fNFz/sqpgy/9ixNtCIE3L1l/YakgHod8bm0DRBCVknEziYNhLIfbDqq3IksySitQ
 2ofoolp0Ip7eryHe47HBTzxnDKnfCG8iwaOPgbbtar6Ru32os8C9VbtNRBtZIzMN
 NpEqtlaJC+m4U92TlnCqsfKrWDYGdVWQeXU2/rU5QEFYtIGqP8fKLwEQbF/yls75
 j/57xtDVheoJbn79ELHCon3PumdpB5XhDLQgIji5jDl+D3rMOYxq86M1f2yF0zqF
 34EvwLoy2syY1dlelvECso3Zihszk1RQfEInuwN9RrLyXGXSqUDkODV49pR16URz
 ZRELs9SO99iRS5fjWzA0qoCWKS5hBu2GDnGr3Pv8gHBNGAJKKhTHSJLq+/q7aLTs
 9ApGB1PzsZiBv8LMF37El0L4
 =cBVa
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5hwoACgkQmmx57+YA
 GNnJlA//R4pNO09VYGzZTOiVbhjsTPBCcuyBkv2OJlqiz/BSfG6R7pNt0sH3jlgG
 /3X8sLS5v/IdT/qXLS0DPAn6A1Qjj37VAFTVd8ZUNCbn7iXdE3Wphd0phLlgcGr5
 bxBV6gvnQydvOsALA+9Fsuug3KSBK3ZdFOAjuD5JaqVU5dHmXYsLizskS3Zrpofs
 jX05qDCguXPGFX5zd4TYMu+sWnLTjyBu0TvHCuZ3sIjERDY49QtPaNdSiNxtQJ3g
 fXDOuMP6GIB+PRSS0ajDAi+vmnzWNszlWhQEbcrtCyqCE9Qqrl4oSOtQbsFPhlUY
 wvqn84QIY9QUGNAebzGWrkBm6e7ehCHB4cm2Ac42uI6aSSC8YfON98EpM8f8e13x
 QWUMm9JfPV/QjAmAhD/hp5/Gc3lNJvawU2Bb/FSvu26HsHDSz+SJOuyMxXOBOV9k
 p6hjDQgo7Suwjkpe72Z3LSQq6zdD7r8MokmxFl8yWgxXr8V02zESOQYYhUjyA+Rj
 uda+2bRpnqIdoh3IObV5Dz9EGM1aEhbqGn1UMJJCtetGpVAF7PhGrKjDffQEzV+P
 OZAOBv0JpMWErks6WNReiN5M+bfm7zArHw3iWAB6grBQUEeF1MD5315m/+hOBxy1
 Aj9pv/fLJcIHatnVcAjYUMkpPhMkkPv9AUFwM+Q65zxmu+0wH2Q=
 =MmN1
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 DT updates for v5.19

This adds MDIO bus description on the IPQ6018 platform.

On MSM8916 the BAM-DMUX WWAN network device is added and the Huawei
Ascend G7 gains sound card definition and clarified installation
instructions.

MSM8992 and MSM8994 continues to be worked on, gaining multimedia clock
controller, on-chip memory, watchdog and various cleanup changes. The
Xiaomi Mi 4C gains CPU regulators and fixes to the framebuffer
definition, while Huawei Nexus 6P gains eMMC support.

On MSM8996 the modem and sensor remtoeprocs are added and enabled in the
Dragonboard 820c and the Xiaomi devices.

On MSM8998 a few newly added clocks related to the sensor subsystem bus
are marked as protected by default and the OnePlus devices gains NFC.

The SC7180 platform and devices thereon are further polished and
limozeen moves to using edp-panel for EDID-based detection, over
statically defined panels.

On SC7280 GPI DMA, WiFi remoteproc and network device, LPASS audio
clocks, resets for SDCC controllers and a new CRD revision are added. A
supply glitch on the PCIe power and a current leak for Bluetooth during
suspend are corrected. The Herobrine board gains eDP support and the IDP
gains backlight. USB is marked wakeup capable.

On SDM845 the IPA, WLED based backlight and second WiFi channel are
enabled for Xiaomi Pocophone F1, the firmware name is modified to not
conflict with other boards.  On RB3 the CAN bus controller is added and
the WiFi calibration variant is defined to allow adding the board's
calibration information into linux-firmware.

SM6350 gains I2C busses, UFS and WiFi support, and the numbering of
uart9 is corrected.

On SM7225 and the Fairphone 4 UFS, WiFi and haptics are enabled.

On SM8150 PCIe, Ethernet and uSD card support is added, and enabled for
the SA8155p ADP board. The PDC interrupt controller is also added and
described as wakup interrupt parent for TLMM.

Camera subsystem and control interface are defined for SM8250. On the
Sony Xperia 1 II the audio amplifiers are enabled.

On SM8350 GPI DMA engines are added and linked to the I2C and SPI
serial engines. Surface Duo 2 gains battery charger support.

On SM8450 the two PCIe controller/PHYs are enabled, GPI DMA and QUP
serial engine instances are added. Remoteproc instances are enabled on
SM8450 HDK.

Last, but not least, a number of DeviceTree validation errors across
various boards are corrected.

* tag 'qcom-arm64-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (150 commits)
  arm64: dts: qcom: Only include sc7180.dtsi in sc7180-trogdor.dtsi
  arm64: dts: qcom: sc7180-trogdor: Simplify spi0/spi6 labeling
  arm64: dts: qcom: sc7180-trogdor: Simplify trackpad enabling
  arm64: dts: qcom: sc7280: eDP for herobrine boards
  arm64: dts: qcom: sa8155p-adp: Disable multiple Tx and Rx queues for ethernet IP
  arm64: dts: qcom: sm8150: Fix iommu sid value for SDC2 controller
  arm64: dts: qcom: sm8350-duo2: enable battery charger
  arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2
  arm64: dts: qcom: pm8350c: Add pwm support
  arm64: dts: qcom: sc7280-qcard: Configure CTS pin to bias-bus-hold for bluetooth
  arm64: dts: qcom: sc7280-idp: Configure CTS pin to bias-bus-hold for bluetooth
  arm64: dts: qcom: sc7180: Remove ipa interconnect node
  arm64: dts: qcom: sc7280-idp: Enable GPI DMAs
  arm64: dts: qcom: sc7280: Add GENI I2C/SPI DMA channels
  arm64: dts: qcom: sc7280: Add GPI DMAengines
  arm64: dts: qcom: sm8450: Fix qmp phy node (use phy@ instead of lanes@)
  arm64: dts: qcom: db845c: Add support for MCP2517FD
  arm64: dts: qcom: qrb5165-rb5: Fix can-clock node name
  arm64: dts: qcom: sc7280: Add SAR sensors to herobrine crd
  arm64: dts: qcom: sm8250: camss: Add CCI definitions
  ...

Link: https://lore.kernel.org/r/20220509204451.325675-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:26:34 +02:00
Arnd Bergmann
e81c07e25e Qualcomm ARM64 DT fixes for v5.18
This disables the two Soundwire controllers as well as rx and tx macros
 by default on the SM8250 platform to avoid crashes on devices where
 these aren't available.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmJ5MRQbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FhVAP/jyGQq7xDk4+Td3YI0pR
 NGlpTUciiKlnNFyPITrkqzTl1gzZFX8rKfg/Gd4Z5ZsEiXes9xO9wr82FFeeyHjZ
 3dzkOl9RHP7tpTfYix93O+qbtctEcOoc6A94bzmKtxE4td/K3davJ0b0C3P0haLn
 57T8C1G22bS6Byq75W7+SliORDe+K2xllewesS3DSRfa0maCz0YF/BPccUZnNQm1
 CeLFL5Sojsv2at6aPN1dSf6CTgv/6Ct3A5RxZ/qFKxwPko57MGUZDu9xja7Gcqtj
 DYRQrNxf6rm7u41DaQNnjvTmUCVc8/woTLtwuPY5a5rmneXsocMruqdasbJy1stE
 QTusQqTYRFR5k9KzWvWzPzR/e2NOLL0XRVUWpsJQFTaBd90JFtvY4R5CYxWXAfqL
 8h0/pyl5BaDyVD7i1Eaat6sneqKut4zs9/PuTqg2XzrlSuiQv17ZeWl1rByJdsB9
 Yau0L+tDle6OFRBjm5w+xFZ0k9K98KWJanYuCycZ4Ff/bFc19MuUk/O4ueEvtb9P
 MZZxKV0AA91cd2G376WvIh9ZR89n9ahU7x5KvwpvRe5UP/JDC+vOXqR87t+NJj28
 1q8ySXnzihEs2inTsfnOGN83k4pfrxOnbol4fnDAw1Sf/ubmH++rHhdeswFvPQFP
 ftbaayoIkiaLKFvMmPtGHy8a
 =EwkG
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5hLkACgkQmmx57+YA
 GNnBKQ/6AoE7QsBqHfacDEzJg6ImM/QkwfYd7ut9ZVhfhzzXNmI71+TEv07Im1L9
 QbKmLLZXg2cH3ic3XCwlnK2yFT+9gB7ZwTV9bMVQYAMovfxZmFr2FNtushZiAijH
 yBJpi+psIFKlM1IKL+JLk4hL47TQhJb3k+u0uQyCtA7DY5qv4Eba3wDlmsARwCXN
 lmuojVacUWMSFoadPZlc0uRtwkw3CKCtGgXJ/90HdfgEotctch0kW+BFCgVtu+EV
 eB7VXFI3k551fKopqVIHiTV2nw/LkoyHh21uLaZP8au7BroJDBVmTzEAK5UHoPON
 H6HQLIHO+hfVpzCop0bLKwjXFQHhXH84IrJlW9VRsTvQnNrEEEXFH9HVpTh677H1
 qpbjOsk5shWZIKZ5Xb74E2dq8TpPxF3gjGVuyEuo/r5BCHk7mNSRQPqsb+yiE8Nj
 cIZrhX8t1Zd8qVrSl/1MMABllIzoKdeTh1sJAalS6Eg08J3G7RFhacce/q28Y41w
 dJtk6bcvbBnoTg4qB4app4ECvGoe7bubMrpQmNR0n0qRJh37IeOEM4OaCzshEqaF
 UKrY8DWz8QbHKz354Vf6sEpcRNumLqAPXX/dQcdHL1XRW++lfvVpN5t/8nRhPRii
 VPEr4HFBzHi7gOsjJqhlKkhAkaO3kxqGRUh7vu7pi7i+nKKfdVM=
 =gn1C
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 DT fixes for v5.18

This disables the two Soundwire controllers as well as rx and tx macros
by default on the SM8250 platform to avoid crashes on devices where
these aren't available.

* tag 'qcom-arm64-fixes-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: dts: qcom: sm8250: don't enable rx/tx macro by default

Link: https://lore.kernel.org/r/20220509152310.306179-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:16:40 +02:00
Arnd Bergmann
0e33a25841 Qualcomm ARM64 defconfig updates for v5.19
This enables the GPI DMA driver, providing access to I2C and SPI
 controllers that are setup for shared ownership. The PCIe Gen2 PHY
 provides PCI support on the QCS405 platform, among others. The PMIC
 watchdog, concell and ADC5 ThermalMonitor drivers provides housekeeping
 services on a range of different platforms.
 
 The Display and Video clock controllers for SM8250 are enabled, as is
 the audio RX/TX macros and the WCD9335 audio codec driver.
 
 Lastly the Ath11k driver, used on a variety of modern boards and the
 FastRPC driver, which provides an interface for computational offloading
 on the Hexagon cores, are enabled.
 
 All drivers, except the SM8250 Display and Video clock controller
 drivers are enabled as modules. The two clock controllers provides
 power-domains and must be builtin to reduce the risk of probe deferral
 happening (and being ignored) after late initcall.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmJ5SNcbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FzLcQAKVGBX+PCuv8jK5gO2JH
 rgiLcrQz5CaS5U/nVXxtKZDyh2JuLPpv2o8BwILuEvOfol5SZ/19uxZdhPew/MCo
 1af9EIWNeI+Eu95y154cQ1BYSvt1GLVY9RxMEIGTGNRw7Tlm/NXEI1tFUT/U6Fow
 veU63k98oYseQsots55j+OsMDc91DVBCBRW/VPCm3OJU7X5huy66RMK9ofvRlQAL
 pmVFOl8VW0d+GuLfNP8UxgV/Ck9PEsU4XIDF62LBj7MRr/zBRTYPfCi7PWihNy8r
 iT1v3x2PQRmmRSqgpNmWnazfoXt1+jeOvpNkKtJ5GOiuJpDiSBlBAWqnq18mEs7m
 8vrBFq0zVsU9u+fxFN1tLbCZyvet7Q7UnJ9dMb3qg6bN4oWS8NVDXFlQq69thQ1w
 llYvQqo1K9jrj8jd8vRaBjOcoVi0UFoVbOxdMG1tAqVW1iAWXY+BvUdOs5NLebQx
 t8hd7FXFkvHCXJztJQEO3Loa9K/nDfMySkpDrWBtuS9S3kswZrQ9BdiVSSu5Ca4d
 4FG+6TORM/PEc+AGNnnLWdLbbYoOva3togZknndMZwGaTAOX7762lLudUipX2iLi
 HEeMOeVNEg7ttCFnVNZKYdrMGGT0TB3Nv2PgbfiZW5QFsOLiwrKz8Pi5Pp0qZChj
 UuVnkZznTyW3u2MatDZ5SYt5
 =BrN9
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5geIACgkQmmx57+YA
 GNlM7Q//VC3XMyUgLXCaDkQu1jiggHkIvPBzrvl4MZ6q7akPzn777rKXuQVnjih3
 UabrkF5C1ZV1YOSHAsEFDsbbxZzBIk03OBqscmglU5kRgxT6oq0eliKSWn3lbhPU
 CHM38iRbd70+9c9/zixKi1qK+z/OTVEV/0vhBI7mLtUIy37bcElp1Trpz8xqjYN3
 kigWxTdNtIOUGYhJOcsQK0yIk6Ac0XHAjuFk69TWTl/j/ML6K6LG+4x2VCg/vPTv
 Gvn0BZQ7ssRhwml3hjBswH4DuiPIDiqJTcMRz40zmujXFORM61CDoikkPt/QglfX
 z+dhWXrKisD/UxigXMKLVhIxj8lV0OFIey9ugDnKIAsKtNE8VXrgfqJpCZpk2o1H
 L5xZKyE6ZSLWuKtXP+bvn5ziNyDCqp0jMI1dUWiv23MU16/2vINqCdHD1i2AjvPP
 +n+wuCN6BHRIxrmsjc+FBBIW2zILz91kBOs6n2zKFBuQe0wMBl+XciEcnA7cAh67
 5tW0Tu/IzNdgqn751olmZUNVGhQz9HO5jyB82iIDuQVz3gN1v40F6+LbPFHePQ5P
 zl9JG1VnF1eWO/CR1FiUPaG1616ESQtr2Rbq73t34LpnIQRj7lP4uJsW7R7pTfHn
 is2Fu1a7Lk+K0tNDtOJ0qy6hupHt11aU4qJlx8GTJluVA+FU2hE=
 =BAuz
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 defconfig updates for v5.19

This enables the GPI DMA driver, providing access to I2C and SPI
controllers that are setup for shared ownership. The PCIe Gen2 PHY
provides PCI support on the QCS405 platform, among others. The PMIC
watchdog, concell and ADC5 ThermalMonitor drivers provides housekeeping
services on a range of different platforms.

The Display and Video clock controllers for SM8250 are enabled, as is
the audio RX/TX macros and the WCD9335 audio codec driver.

Lastly the Ath11k driver, used on a variety of modern boards and the
FastRPC driver, which provides an interface for computational offloading
on the Hexagon cores, are enabled.

All drivers, except the SM8250 Display and Video clock controller
drivers are enabled as modules. The two clock controllers provides
power-domains and must be builtin to reduce the risk of probe deferral
happening (and being ignored) after late initcall.

* tag 'qcom-arm64-defconfig-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: Enable Qualcomm GPI DMA Driver
  arm64: defconfig: Enable Qualcomm PCIe Gen2 PHY
  arm64: defconfig: Enable SM8250 video clock controller
  arm64: defconfig: Enable PM8916 watchdog driver
  arm64: defconfig: enable ath11k driver
  arm64: defconfig: Enable some Qualcomm drivers
  arm64: defconfig: reenable SM_DISPCC_8250
  arm64: defconfig: enable wcd9335 codec as module
  arm64: defconfig: enable Qualcomm RX and TX macro for SM8250 audio

Link: https://lore.kernel.org/r/20220509170158.311962-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:04:34 +02:00
Arnd Bergmann
1758da7f31 i.MX defconfig update for 5.19:
- Enable the WM8524 codec driver as module in arm64 defconfig for audio
   support on imx8mn-evk board.
 - Enable the ADC part of the STMPE MFD in imx_v6_v7_defconfig, as the
   SoM Apalis/Colibri iMX6 use the ADC of a STMPE 811.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmJ3OOMUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM43JwgAgKOb0UndVfyEOV02LPQoVYiEN0P9
 cKbenz/IpXFT0fDYyTezg1BmU7T5KH4dg8R40JZdmeOjhEkpigXs1EEVEeBy9Dws
 j7RjV+vL/i4shN4j6dYXsWGxLf3E96eNIqMfy4kRfJygTbg/99sgC/YT29OI1TJO
 uyJJHqmBvLcfG4kAoYc3W17PM37JD9T6A3DvDZTn5PRgBd8ywK5ydyrqgKgTG6f9
 CD6nIyW396rC26+v0Gzrc/0zgxGjLJznD2iiGxyR8Sa6ILYdyXQEIsK5XOst9/PS
 E0EnM3HA3icr1bvUUyztdRBuRlYq/BR73GCAWHSpi55Nfh5bT3dCHrpZwQ==
 =kFqE
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5gawACgkQmmx57+YA
 GNkwtg//aobpTxR/CaTJHQcAanC3amr0ysCr/LOR9Oy+0JdxJ1+GW13fG8BYFCvr
 oA3Ie87DwlkrJYceJRrY3rwSCZ7Ajtw1hJAIH8wYj1Lh5nUtK6fopPfaSHxqNcer
 otr3EBpXSORD7aA5TNWNDVJIA/XplDQsbQpwrpay00tLoyo9+IpJ/eh8m6IL/Wbh
 avJ309rbpqBsfV7jIwoNx/eqCtnNl6qhTFnltdlFigSkyPG4MmGcMUXtV5YZaxFE
 b/Mf9Mm191nse3nmQSJjMVCt8cu2FeMYoEs96nKmYmKf67GJhTOXOIZMEDAn421V
 215RN86/rNjzxfjNvcLWGC86Q3YnkLRfE0BZ9YWo3lvUAI8wFzCsPNCiuYogwARa
 gSKg5DwihO+JfHEcguUjdNNYmEHVORDyegS4uhjSbLL/QplwZoTM0tTbfi1PcFDr
 yDlVKP2lTU63Es15taK89PO43Y2Ypl1VMisUP+nUXiu0cQk6wgbkc2rtMohUOBqc
 +Pd/npmuPrTHaahbvX8YkkrFt5V0rDeDPiYGMFA7ZpxTtExgHEFN99AAv9p1+2fP
 GlzK7OoivxIn23wYduTfrONON+g0bE89Nj2Rn9Brr95K/J3bNFF7bB2+f/NxpGhV
 UiF6oTXBI1/4E8fVRuE08xQ4FnESV2WoV6lLlLupe6+aZFXgyCo=
 =pAvl
 -----END PGP SIGNATURE-----

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

i.MX defconfig update for 5.19:

- Enable the WM8524 codec driver as module in arm64 defconfig for audio
  support on imx8mn-evk board.
- Enable the ADC part of the STMPE MFD in imx_v6_v7_defconfig, as the
  SoM Apalis/Colibri iMX6 use the ADC of a STMPE 811.

* tag 'imx-defconfig-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: defconfig: Enable the WM8524 codec driver
  ARM: imx_v6_v7_defconfig: Enable the ADC part of the STMPE MFD

Link: https://lore.kernel.org/r/20220508033843.2773685-5-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:03:40 +02:00
Arnd Bergmann
9bc4df1d8b TI K3 defconfig updates for v5.19
* Enable TIDSS and Display Port related configs
 * Enable Cadence Torrent PHY for Display Port
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEEyRC2zAhGcGjrhiNExEYeRXyRFuMFAmJ081MQHHZpZ25lc2hy
 QHRpLmNvbQAKCRDERh5FfJEW4wg9CADFEgCX4rqicIpgN+8z3yJtBSXKmk1EdKPv
 gxcvU/tGPV1P7yfgrhRYXPqHo73ls+hI8brg0/XRWCaI3CqBL8tF+EfZyQZsOdv3
 zEsOSH5R9PErDLlBGSyLJG0hovYUHxQO5aAWL2CnBMzgC2UV43DzXRstTe9ppv8B
 HNfocoVUgR/ujH/yhd33+BezMcxyTR5GKTl2CKHemskMzmZsM+ci3DCbJjEPPbj1
 pM0mEjquGyytvviv+6Hix7QIq6pI0MUur/qUGB205C21oUT75mVnN9ln+c3VEYTd
 Vlf5cf6oojtWbJb+gpYOKe+GjF38kzgZ6sPjxRfAXeM1K5sk43wa
 =ugpE
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5gQ0ACgkQmmx57+YA
 GNmJFxAApqyTNl2xgiDCdciYRJbY7lIIDvhZWUxD4Y6MREd0MITKDmfrRqB00ler
 FgZ3Ftqua9j81YCq+i2NT+7WMuwaryu40GaO5MUuP4mfdmn/1XUCgRs0mq86XSKV
 0MBk+XlAn9/CpGttLyPxqD+VW5CB8E4UZ7kTR03VV0aNi7unC9I0y8WbN9wtgiBw
 q1tFzr3yTjMyPIaVZcQRgdIoL1SGAbBp8ZveQ6bD0j6VFjO7x5G1StEXt8MIQMI/
 UbAe7V2j7CB7jCz5z1kAcUfrKJ8+f854WuqwIZsMG/XRL0+HmFKl14fuEn6Rr5sm
 GowNFbuMQ7R03PpyLYfRsomrLCWTfX59O7wXrowB/0GRVXhUlnsL2KyOmW4COkus
 AE9jHH59DcUug6Ap5SmdjYLjsJuORyEZq7mvRZp/shV/Z/KCfWUL8wr0BZx+V/Rx
 RWFOGbCyjcOTMH57vHIaHVUjwyhBm67rXD1K922O4qr0GLPByDskDI8qNFAj91lo
 VKw21pdRIepfQwumEQKRnhZE7h/+WXZRCHBUR1Nq5CiMM36WWzZTSCahXCrCNzR2
 0Waj1rJMe9YskttbI7Y8f7jTdt6/ho0LgUt1+53/71kZOvsxQblBPZA0ooSk80+k
 TxOXZaLIqX01npaDuLj812q6er7PNVRAiQt5JzrceuE6ryH5jv8=
 =ysrS
 -----END PGP SIGNATURE-----

Merge tag 'ti-k3-config-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/defconfig

TI K3 defconfig updates for v5.19

* Enable TIDSS and Display Port related configs
* Enable Cadence Torrent PHY for Display Port

* tag 'ti-k3-config-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  arm64: defconfig: Enable configs for DisplayPort on J721e

Link: https://lore.kernel.org/r/88cd734e-47a7-4307-c119-8f6ec6c40452@ti.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 23:01:01 +02:00
Arnd Bergmann
168b43ac21 TI K3 device tree updates for v5.19
New Features:
 J721e:
 * Enable DSS, DP, HDMI on J721e EVM and SK
 AM62:
 * MCAN, MCU GPIO, ECAP APWM, DMA, Etherent and several peripheral on AM62 SK EVM
 AM64:
 * Enable Wireless LAN support
 
 Fixes:
 Drop incorrect MCU UART clock rates
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEEyRC2zAhGcGjrhiNExEYeRXyRFuMFAmJ09SgQHHZpZ25lc2hy
 QHRpLmNvbQAKCRDERh5FfJEW4xthB/0XAFR46Pzyb4EX09hhFyEmjei6y+ZcQ2EC
 aH0Ynu+WTnHlD1NkX9SoMSfrU+VtBxQCFJFgoljrb6BnubEcwldfg2uzFVCoi5VN
 3qS55SCjJJQV0u57UadytF+AU0qdcRsCpIiumtoTiImVeTaIc7UU1s64ErlYthKF
 RJCvoWYKXvfIuhz3u72jIb7OGmUtSa6jtpTXBoIchZXGaCFeQw9fHKKO/0sjtFAk
 a4lQa64TvS20SJ4iPFd6gK0befZQHG7+fm5v00RkyGqwqKuI4vwZv0CRKROuyIoD
 rk44ifIReSufneRwqWhHggQlP7OmI+Ly233hxW4q12UT6CUEWWpC
 =e3yn
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ5BsIACgkQmmx57+YA
 GNnr5hAAmxH43IjNRfJT5GbITOf0hIaoG9ygWNRiuIvnQD8HIVD8KCQ402zpb/OK
 VP9Gq7G1CQ22mT0rNipjvZE15WdN2CVRrmc+PInGlhCgkzjwOtDjCKs5IjSpbS7z
 QvI/oCxSWPnVbSrGRyND8xGdfDC3Tnd4U4RxOE1nHZ35d7GMTIX/tjDLrL35NDqK
 lf8bgHEL5c3Mdcep1vURZ7hlLwKP+zxtfKJ8fe0A0GjmFfKJXWcZA8/JvM8Id+8+
 m+BwyMAvupacb3l8aDxmsz8bE0ulz/B9yAlzun8IYZwHqRUN82sQkKoj/fX5eSdH
 wi1jhDpEpse0ElOrIWAX7/FCdVN2CvCaKGG7yYlD+bH7V4qx5O4btTGE7zWIRfuc
 lNx6t2yE+bF0YZOS1BQ6MSFlAtOFV5Cd9PX5qyJAlo+s0M85r0ckzORD3EzgOMaW
 dUERlRTSozAuI/7pqYXmEKIcNku7hDDanlt4mOsaWvoZO8HvAqkoepxo8omPkCwm
 BQa/2dT1kvvNk9plqVLghfxWl/fp2r3Ra764+kSVAObCb1AW9AEJfmua9xLg+kCA
 S7/Tu6gH5Gf2PiQFFNSzLJAiOWzPSIAynLoreA8uPt2p2NEnbHvMN7rQUaXELttm
 5qbxsPpp4yb4VaBwy32hZmSoJGa+8xBlAAILfIzlLhxPtzTyW2s=
 =sY5d
 -----END PGP SIGNATURE-----

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

TI K3 device tree updates for v5.19

New Features:
J721e:
* Enable DSS, DP, HDMI on J721e EVM and SK
AM62:
* MCAN, MCU GPIO, ECAP APWM, DMA, Etherent and several peripheral on AM62 SK EVM
AM64:
* Enable Wireless LAN support

Fixes:
Drop incorrect MCU UART clock rates

* tag 'ti-k3-dt-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  arm64: dts: ti: k3-j721e-sk: Enable HDMI
  arm64: dts: ti: k3-j721e-sk: Enable DisplayPort
  arm64: dts: ti: k3-j721e-common-proc-board: add DP to j7 evm
  arm64: dts: ti: k3-j721e-*: add DP & DP PHY
  arm64: dts: ti: k3-am62: Add SA3UL ranges in cbass_main
  arm64: dts: ti: k3-am62: Add support for MCAN
  arm64: dts: ti: k3-am62-mcu: Enable MCU GPIO module
  arm64: dts: ti: k3-am625-sk: Add ECAP APWM nodes
  arm64: dts: ti: k3-am625-sk: Enable on board peripherals
  arm64: dts: ti: k3-am62: Add more peripheral nodes
  arm64: dts: ti: k3-am642-sk: Enable WLAN connected to SDHCI0
  arm64: dts: ti: k3-am64-mcu: remove incorrect UART base clock rates

Link: https://lore.kernel.org/r/3dc2011b-eb6d-dcd5-3921-57f6a1cf6d8e@ti.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-09 14:19:14 +02:00
Chris Packham
239466bddf arm64: dts: marvell: Update sdhci node names to match schema
Update the node names of the sdhci@ interfaces to be mmc@ to match the
node name enforced by the mmc-controller.yaml schema.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-05-09 11:23:33 +02:00
Robert Marko
eacec7ebc1 arm64: dts: marvell: espressobin-ultra: enable front USB3 port
Espressobin Ultra has a front panel USB3.0 Type-A port which works
just fine so enable it.
I dont see a reason why it was disabled in the first place anyway.

Fixes: 3404fe15a6 ("arm64: dts: marvell: add DT for ESPRESSObin-Ultra")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-05-09 10:56:14 +02:00
Robert Marko
e836070f94 arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins
Both the Topaz switch and 88E1512 PHY have their reset and interrupts
connected to the SoC.

So, define the Topaz and 88E1512 reset pins in the DTS.

Defining the interrupt pins wont work as both the 88E1512 and the
Topaz switch uses active LOW IRQ signals but the A37xx GPIO controller
only supports edge triggers.
88E1512 would require special setup anyway as its INT pin is shared with
the LED2 and you first need to configure it as INT.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-05-09 10:56:13 +02:00
Robert Marko
5202f4c381 arm64: dts: marvell: espressobin-ultra: fix SPI-NOR config
SPI config for the SPI-NOR is incorrect and completely breaking
reading/writing to the onboard SPI-NOR.

SPI-NOR is connected in the single(x1) IO mode and not in the quad
(x4) mode.
Also, there is no need to override the max frequency from the DTSI
as the mx25u3235f that is used supports 104Mhz.

Fixes: 3404fe15a6 ("arm64: dts: marvell: add DT for ESPRESSObin-Ultra")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-05-09 10:55:50 +02:00
Robert Marko
e4fde76fa5 arm64: dts: uDPU: correct temperature sensors
uDPU has a pair of NCT375 temperature sensors, which are TMP75C compatible
as far as the driver is concerned.

The current LM75 compatible worked as all of the LM75 compatible sensors
are backwards compatible with the original part, but it meant that lower
resolution and incorrect sample rate was being used.

The "lm75" compatible has been deprecated anyway and is meant as fallback
in order to keep older DTS-es working.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-05-09 10:46:33 +02:00
Robert Marko
5e9b59bd37 arm64: dts: uDPU: update partition table
Partition currently called "uboot" does not only contain U-boot, but
rather it contains TF-A, U-boot and U-boot environment.

So, to avoid accidentally deleting the U-boot environment which is
located at 0x180000 split the partition.

"uboot" is not the correct name as you can't boot these boards with U-boot
only, TF-A must be present as well, so rename the "uboot" partition to
"firmware".

While we are here, describe the NOR node as "spi-flash@0" instead of
"m25p80@0" which is the old SPI-NOR driver name.

This won't break booting for existing devices as the SoC-s BootROM is not
partition aware at all, it will simply try booting from 0x0 of the
boot device that is set by bootstrap pins.

This will however prevent accidental or automated flashing of just U-boot
to the partition.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-05-09 10:46:32 +02:00
Mark Rutland
88959a39a1 arm64: entry: use stackleak_erase_on_task_stack()
On arm64 we always call stackleak_erase() on a task stack, and never
call it on another stack. We can avoid some redundant work by using
stackleak_erase_on_task_stack(), telling the stackleak code that it's
being called on a task stack.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Popov <alex.popov@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Will Deacon <will@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220427173128.2603085-14-mark.rutland@arm.com
2022-05-08 01:33:09 -07:00
Mark Rutland
e85094c31d arm64: stackleak: fix current_top_of_stack()
Due to some historical confusion, arm64's current_top_of_stack() isn't
what the stackleak code expects. This could in theory result in a number
of problems, and practically results in an unnecessary performance hit.
We can avoid this by aligning the arm64 implementation with the x86
implementation.

The arm64 implementation of current_top_of_stack() was added
specifically for stackleak in commit:

  0b3e336601 ("arm64: Add support for STACKLEAK gcc plugin")

This was intended to be equivalent to the x86 implementation, but the
implementation, semantics, and performance characteristics differ
wildly:

* On x86, current_top_of_stack() returns the top of the current task's
  task stack, regardless of which stack is in active use.

  The implementation accesses a percpu variable which the x86 entry code
  maintains, and returns the location immediately above the pt_regs on
  the task stack (above which x86 has some padding).

* On arm64 current_top_of_stack() returns the top of the stack in active
  use (i.e. the one which is currently being used).

  The implementation checks the SP against a number of
  potentially-accessible stacks, and will BUG() if no stack is found.

The core stackleak_erase() code determines the upper bound of stack to
erase with:

| if (on_thread_stack())
|         boundary = current_stack_pointer;
| else
|         boundary = current_top_of_stack();

On arm64 stackleak_erase() is always called on a task stack, and
on_thread_stack() should always be true. On x86, stackleak_erase() is
mostly called on a trampoline stack, and is sometimes called on a task
stack.

Currently, this results in a lot of unnecessary code being generated for
arm64 for the impossible !on_thread_stack() case. Some of this is
inlined, bloating stackleak_erase(), while portions of this are left
out-of-line and permitted to be instrumented (which would be a
functional problem if that code were reachable).

As a first step towards improving this, this patch aligns arm64's
implementation of current_top_of_stack() with x86's, always returning
the top of the current task's stack. With GCC 11.1.0 this results in the
bulk of the unnecessary code being removed, including all of the
out-of-line instrumentable code.

While I don't believe there's a functional problem in practice I've
marked this as a fix since the semantic was clearly wrong, the fix
itself is simple, and other code might rely upon this in future.

Fixes: 0b3e336601 ("arm64: Add support for STACKLEAK gcc plugin")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Popov <alex.popov@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Will Deacon <will@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220427173128.2603085-2-mark.rutland@arm.com
2022-05-08 01:33:07 -07:00
Kees Cook
613f4b3ed7 randstruct: Split randstruct Makefile and CFLAGS
To enable the new Clang randstruct implementation[1], move
randstruct into its own Makefile and split the CFLAGS from
GCC_PLUGINS_CFLAGS into RANDSTRUCT_CFLAGS.

[1] https://reviews.llvm.org/D121556

Cc: linux-hardening@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220503205503.3054173-5-keescook@chromium.org
2022-05-08 01:33:06 -07:00
Chen Zhou
944a45abfa arm64: kdump: Reimplement crashkernel=X
There are following issues in arm64 kdump:
1. We use crashkernel=X to reserve crashkernel in DMA zone, which
will fail when there is not enough low memory.
2. If reserving crashkernel above DMA zone, in this case, crash dump
kernel will fail to boot because there is no low memory available
for allocation.

To solve these issues, introduce crashkernel=X,[high,low].
The "crashkernel=X,high" is used to select a region above DMA zone, and
the "crashkernel=Y,low" is used to allocate specified size low memory.

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Co-developed-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20220506114402.365-4-thunder.leizhen@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-07 19:54:33 +01:00
Zhen Lei
e6b394425c arm64: Use insert_resource() to simplify code
insert_resource() traverses the subtree layer by layer from the root node
until a proper location is found. Compared with request_resource(), the
parent node does not need to be determined in advance.

In addition, move the insertion of node 'crashk_res' into function
reserve_crashkernel() to make the associated code close together.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: John Donnelly  <john.p.donnelly@oracle.com>
Acked-by: Baoquan He <bhe@redhat.com>
Link: https://lore.kernel.org/r/20220506114402.365-3-thunder.leizhen@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-07 19:54:33 +01:00
Eric W. Biederman
5bd2e97c86 fork: Generalize PF_IO_WORKER handling
Add fn and fn_arg members into struct kernel_clone_args and test for
them in copy_thread (instead of testing for PF_KTHREAD | PF_IO_WORKER).
This allows any task that wants to be a user space task that only runs
in kernel mode to use this functionality.

The code on x86 is an exception and still retains a PF_KTHREAD test
because x86 unlikely everything else handles kthreads slightly
differently than user space tasks that start with a function.

The functions that created tasks that start with a function
have been updated to set ".fn" and ".fn_arg" instead of
".stack" and ".stack_size".  These functions are fork_idle(),
create_io_thread(), kernel_thread(), and user_mode_thread().

Link: https://lkml.kernel.org/r/20220506141512.516114-4-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2022-05-07 09:01:59 -05:00
Eric W. Biederman
c5febea095 fork: Pass struct kernel_clone_args into copy_thread
With io_uring we have started supporting tasks that are for most
purposes user space tasks that exclusively run code in kernel mode.

The kernel task that exec's init and tasks that exec user mode
helpers are also user mode tasks that just run kernel code
until they call kernel execve.

Pass kernel_clone_args into copy_thread so these oddball
tasks can be supported more cleanly and easily.

v2: Fix spelling of kenrel_clone_args on h8300
Link: https://lkml.kernel.org/r/20220506141512.516114-2-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2022-05-07 09:01:48 -05:00
Arnd Bergmann
77ef40603f arm64: tegra: Default configuration updates for v5.19-rc1
This enables the driver for the new ASRC audio block that is found on
 Tegra186 and later.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmJ1LwcTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoREwD/92Uvj+88Ab/a2LAPE0BCiNXqdFJ4We
 HgOEDL33ZxoDkM3SQ475tjrDrOvPGD0mgqWl+0gsXXeu8wRir1K4dl9RjJC4r70y
 BXSZoMSvgS/+9togRHMMvFuE63f+QNa29XYGPdRTX5d6TsMdYHDJy1Ugy8rGpaiI
 jmAsl2/50A6p5cgie+85oSLmUyb2gVm+Tesea8o4qWvcgyCWAiJoZJUq/MpEbDl5
 CNNucyMupq+wkWckkoxM0ZT1iwoPdj8x7Elhef7ndx/TS0gSf3OWIQhFBndCdLQW
 gQyn9mEOl1FJEroCIJtlyc85s30nJMvZloadHccykMoTDvyMZVDzG8Gk+sRWsD6z
 OoGdPVP3fyLaybSrKv/PtFjXElhVZvRN0SRkCMMMiSG01QptuHLRuPa40cDu7M1i
 j20VBexXug+RONwqpMS2SKljkUZFLKJ6KnyJ0AYdL2feoEqWrmWcG5flbwlb8Bh4
 1jqJD7k56o2sWRNZk9758W2+tCmaXGryLGHNktl2OgMLRia8huxFCGFf1olIUGEQ
 uSfxdnQE9fKMqG2I2JvvDFUzCjVlxtpXkUV4mZ8yrkqOdnK/snlgnaepQ6ZSFk6T
 rW0rOwHm9A/OTGnptgIBXd160b/vCqtDLN+AcLVpSRd9XDCSShKCRKRMFEmBZhpG
 mB9JNRvQffPdbQ==
 =U3ik
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1iuoACgkQmmx57+YA
 GNlv/xAAowdp7bbuBKLXegb3iFFQYBP+lkCrm6KETgT1dZ7mSL4ya9ieI2cymsym
 m6sOjYv4YHSWE96urYQfw8dJKVXCCIzbbZI9u8cxcJA8OIexuQJ/0RdyQeE5MpmS
 PjQxrzZasLTuKa0PCoxDq2uW/Sj4vS/UdJHSI+UVxRHMGn8i4yBBStVavHgwaMy2
 tIVYmHEbCSJ3eTXLyvFmbJi6xTD4Re6QWvIDsSw45dNEWW9hQsio5xdFISHv+KDc
 GtSRpvA+kcN7RlYjUgi21xPfwJH1LVrQtngOjc/ELvLHgqWZ/hEd/O/D7Q4kEvOW
 OmsWA7a99fV0gmPZwX/+rJGrf18htVhEk4hMT0Aei16CyZ8hUdJuYpffvYa89HKl
 1IVqC5ScM+9fP072dqYE/+ye+Hd5Cp7eeah5+T6/kcNrdN5Uwv+aloL/90Ft+Snn
 p6ggaHtnAtrlQS5AePr3I6xSH25GAi5tFtLrD73OWkrTaqgeLeslvJyn1cHCtrlD
 rk06rxrZnYMsKUDGsAXJhqT+pvnPR7CW+IqqhESmd0uMYBz1NTTD7FLaVr2SAz+6
 NXwnKkeZuDxAXP/nldS15fjwpOO/Brrc5yHGF7E8KceoFBFw1CG1RR+7/r5gu5zz
 6xhNNKNCoh1wEe9kWeHOWgFSQxaT8Uxm82z3ywBCDAYXgb/omUI=
 =hc0y
 -----END PGP SIGNATURE-----

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

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

This enables the driver for the new ASRC audio block that is found on
Tegra186 and later.

* tag 'tegra-for-5.19-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: defconfig: Build Tegra ASRC module

Link: https://lore.kernel.org/r/20220506143005.3916655-6-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:54:02 +02:00
Arnd Bergmann
7a2dc21938 Renesas ARM defconfig updates for v5.19 (take two)
- Enable support for the Renesas RZ/G2UL and RZ/V2M SoCs in the arm64
     defconfig,
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCYnTXKQAKCRCKwlD9ZEnx
 cEqvAQCfbX325WAM/lkE6m11gjJCKSbGj3rwHWzigSiTfnaU4gEAnXHWOTFFLej4
 l20hPHLNRdG4uG7+yObmpWU8hAX57wA=
 =tJKF
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1ijMACgkQmmx57+YA
 GNnmzg//c5AiqbSRjBfDaSo4gcBax/ZT2lUNctE1tHQH5eFwBZsRIVVgaNUEnnbl
 cwU62eBFNbLUOC52RDTZ1/bB/SEQeuPFfwxRnE//ZPLMXZLeSYfn5cT0kEsHdVfy
 iZKKTYn8SW02eOPSWCB7LLr0jrV9P2dxMkONigTIynRiDWL/cqgzstO+AKkRgkc9
 M8c6i1BwmOEFqKk/fm/0Nvu/3nsAtuuUbH2c9Vg+1pmAoFYGARmDUkUeZ7SCz+WX
 pwkRjesBWZw6YCFLThCFenhkWHManc92xIGwq8G3MFIQHvCAJyVyW5zTfWrLntfH
 Zmnpn5foWfJjysKbX+R2l8qgawcuFgVRGqlmHZWJ0wayvr8ICyVhP0Dq7Y5gCHoo
 7/hDZdJ94OqVZVRQB8+a+r4gf7qZJNdXNdRGcMtt1e0lx+1HqskOwShWzTJCJrh2
 hEUuSLPQ5ur21QgbXAqcZ5eCZcslOeN/PxAoxLGHVkUcRmV1BzZAVMY2xjjqq70o
 pFAgqKaY6GKtCTCDCKYNbNBgFreVF8uieMNKzV1Accb+lQHF0a6D9hHE5n5myOa8
 izuxb0Qr8eilW/feHvOuG1S8c1usKZX8wpMio2MoEfsbBiSVM57HH/q7fScA6N4+
 T3EtCAqxonjlMpCzKV6vDow+BZx6LHXllms2ZqZxIjNTehhKFvc=
 =o8bh
 -----END PGP SIGNATURE-----

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

Renesas ARM defconfig updates for v5.19 (take two)

  - Enable support for the Renesas RZ/G2UL and RZ/V2M SoCs in the arm64
    defconfig,

* tag 'renesas-arm-defconfig-for-v5.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: defconfig: Enable Renesas RZ/V2M SoC
  arm64: defconfig: Enable ARCH_R9A07G043

Link: https://lore.kernel.org/r/cover.1651828601.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:50:59 +02:00
Arnd Bergmann
73ff4d189b - F1C100 improvements (SPI, MMC, timer, cpu, watchdog)
- SPI flash node for licheepi-nano
 - enabled analogue audio on olinuxino-a64
 - GPIO port regulators on teres-i
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCYnVTxQAKCRB0Ba7+DO8k
 k3ZXAQC1lZhgQ7idHrArWwby6QNsyCt7HHhU+buFDQf2UtrwSgD9HcC8nEON/rY3
 frxzVcdxwra78kDaB52ExC54KrW3qAo=
 =2uu2
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1h9cACgkQmmx57+YA
 GNmHzg/8DTzpPRD9ftQySaCpiQtLUr1ZecGEVf7WZ00OoQeGEVoJ0hpzTkzkimGC
 h5us0Ysf744b4G1I8HA6E6AMbXHF9+ncEe3x3RHPRY6xt5FeOKcPYNIXn0uzMMn7
 yt/PtwU9uqDX4w8BeraBDc+sHYHTy/qdYaOFMMaaZ7nie5URO6blOXRa8x7hnMv1
 +sijU8itBwNkwX5XxzEjEJiIof+vk9r3SYl02rc3Oql/4YXsgx9RGaJ1GS1HHdLH
 H1BeeEYBwHlHelRKKzXdEy0CO3No01TFqb9PNeBl4PB76noMOu6/KnLfwLeTB097
 +H14MA01FvGvLnbKDuZYjYtTwwN9WbI3WIlP8ZS6alyxG2Bm4waPg22uVl4NumDf
 ble1HDHn0ZBva6nKnVxOR8aGnmBIMj7cPfuiK1S9JSJ7/OVP0lfGzHvoC9Eqy5Ss
 bckKd17CdrpVvFwi/0ii9p66ocSfik2nWIOmTDCLzuT2cfwPn3syHblI5RZJMQ/A
 FV4mF3v8JaywkivocHGprCjTCyFSj4+cEWOTF+6IOg0BUZdLru7ZetSpPV4wtJWB
 k69gdjDDLnTbyVl9yMp4T1/G034gAC14p3YMZnovNo3Vg2CzSUtvuhFnaGDDHU+1
 HGF0LHX3x73QfwgJRcX1QOauR4geR5f+H1+CMadTk5zjuXqvKX4=
 =prXe
 -----END PGP SIGNATURE-----

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

- F1C100 improvements (SPI, MMC, timer, cpu, watchdog)
- SPI flash node for licheepi-nano
- enabled analogue audio on olinuxino-a64
- GPIO port regulators on teres-i

* tag 'sunxi-dt-for-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: teres-i: Add GPIO port regulators
  arm64: dts: allwinner: a64: olinuxino: Enable audio
  ARM: dts: suniv: licheepi-nano: add SPI flash
  ARM: dts: suniv: F1C100: add SPI support
  dt-bindings: spi: sunxi: document F1C100 controllers
  ARM: dts: suniv: licheepi-nano: add microSD card
  ARM: dts: suniv: F1C100: add MMC controllers
  ARM: dts: suniv: F1C100: fix timer node
  ARM: dts: suniv: F1C100: fix CPU node
  ARM: dts: suniv: F1C100: add clock and reset macros
  dt-bindings: arm: sunxi: document LicheePi Nano name
  ARM: dts: suniv: F1C100: fix watchdog compatible
  dt-bindings: watchdog: sunxi: clarify clock support
  dt-bindings: watchdog: sunxi: fix F1C100s compatible

Link: https://lore.kernel.org/r/YnVUmSLE1MZFkApt@kista.localdomain
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:40:55 +02:00
Arnd Bergmann
1bc44c1e79 arm64: tegra: Device tree changes for v5.19-rc1
This adds some improvements on Tegra234 (QSPI, CCPLEX), improves the
 SDMMC clock speed on Tegra194 and adds the ASRC audio block on various
 chip generations. Memory controller channels are also added on Tegra186
 and later and the missing DFLL reset is added for Tegra210.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmJ1LsgTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoZKcD/4rxLjWUWGLqTxg1ZtMpWgWpqQAOgn1
 lCQCcK75WFOSXWhzFVlvxvDff5RS80vDXHNS9mPT5S9uI2PiqiHKY6v/fOQkddI4
 Gk78BGbAtSzCUCoTKYf/iWdiNYhYU7SfgxdZplb8JLAsRCbgxirbnBD+QkMvD4T3
 ksTAgUUDespZzJ4NksNWMCWC2iehQu594sXWbMzMTxojC5i1QlanEfX8yg3C5O8C
 c+NpA9q/JHYg1MiSoDP7Co4Kgj8Bfu0Fxm8DGsaNKSMVh6Ai45TC/5ED7gCBkgLA
 ObaMQcb6gOnco5LdCAipDMyKml1qiK3YiOa+92CnWocMMWMbg1dlQ8IBoacycOgj
 hV6/egdcMtmzIK9rj4fGVFH3zbkqw2JeY0IWtZH+5zgJZjsCofIK0PsmgPIewEnj
 iglEuAWmV4qev/8KB2cbcpRiggLKBZ1o3lpOatKNugNy/T4Aie1C/2tfUEV0Ie07
 n/9EkgHHlSXZGwI7zvFwTeiI/IOIySg2BVZsQi//0QVRsj7w9cKv+mHoQ/bZZQFc
 nXhiMEHhKuWDhbRrlpshI1XUJ5knGz9lCJPrcRV8/9rL0A4zDH+IfH966Jpdepo5
 Qh8MdncxOlrflZTOLhbOjemyCU8ieahu8yTcpziyUHqKcxKXDnjJXC6Cg0TpeuX3
 QDuWvinVDDHoLw==
 =KBZh
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1h4sACgkQmmx57+YA
 GNmbcBAAj+oXraktDfkgmiEg2vcBS92H/ik/09RdifgTomjEQMHNpB+Kp+c6xXuh
 rHZU/HMqNuuVImmZImTDGqYKXzJMsEckIzBWiXsIP3vNNooJbWyDC5YxPftZqCED
 tfXfra0U6hCumX03o9l6Tywf2pfawxsO28QFE+xGffKHa53GruIYkj62prXCJWqD
 GOcCoBkqulNPVoIsQAtCp3JNxnvR3JmYxNlCdbIrTp6zGnhYsMyLFeEdcamS1rCO
 ZyQ//byFjhTGWr5e3w3LD4ZPekAFN0elWXGLjyz+oitxIAm/jL/4JpZwkbL+qS35
 MDO57gQB/nc5wfM2Ojm3rIk2Vs0DeX3V92TcSKPVTqHPqciySb1ftDa5CLzRPyCQ
 fcLxZHWP1YTHvfcSG0MQLhixp3GW8OhJiSQElqjhWE4LpNmWreElnFAxZ9oiiDTb
 58xnU4vaYb7RzqZVmyXuBWaxXH5NQKjri+OFGjbqvH9CI+KVQeH2829otEhbHTad
 nfBeoZqp9CjzY9ejBWFduCeXLEDO52HGa33BDkJPeO/PENmgmDBZMxo+hJOL2ZZx
 htpHFlllj0eC/QomGp9zJfadZbslRGigWr9X868whDROhBlL/onFh6iEqPmREhTv
 M4waPbQynA9928AfYFSxXJmUdvbusxvppU1e4eISWWzC3DyHlHE=
 =wsbV
 -----END PGP SIGNATURE-----

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

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

This adds some improvements on Tegra234 (QSPI, CCPLEX), improves the
SDMMC clock speed on Tegra194 and adds the ASRC audio block on various
chip generations. Memory controller channels are also added on Tegra186
and later and the missing DFLL reset is added for Tegra210.

* tag 'tegra-for-5.19-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: tegra: Add missing DFLL reset on Tegra210
  arm64: tegra: Add memory controller channels
  arm64: tegra: Enable ASRC on various platforms
  arm64: tegra: Add ASRC device on Tegra186 and later
  arm64: tegra: Update PWM fan node name
  arm64: tegra: Add node for Tegra234 CCPLEX cluster
  arm64: tegra: Add QSPI controllers on Tegra234
  arm64: tegra: Update SDMMC1/3 clock source for Tegra194

Link: https://lore.kernel.org/r/20220506143005.3916655-5-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:39:39 +02:00
Arnd Bergmann
4a17dc417a Renesas ARM DT updates for v5.19 (take two)
- I2C, sound, USB, CANFD, timer, watchdog, (Q)SPI, cpufreq, and
     thermal support for the RZ/G2UL SoC and the RZ/G2UL SMARC EVK
     development board,
   - Initial support for the R-Car V4H SoC and the Renesas White Hawk
     development board stack,
   - DMA, RTC, and USB support for the RZ/N1D SoC,
   - Initial support for the RZ/V2M SoC an the RZ/V2M Evaluation Kit
     Board,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCYnTmCAAKCRCKwlD9ZEnx
 cNXAAP4zWJnWNezZM//dRYwLHALSOE5x22y+MJyiDYDPO2Z0FgD+LcVO1AV+FEqN
 /vFkQRBThrdcARFqc44lSYGj2f2+kgg=
 =L6Mz
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1hYMACgkQmmx57+YA
 GNkGMRAAxCV75SY+uFRw3LMWPW65C07dTxA7K7KNZxFJTL09I4YykZ1mA7yLfDie
 Awyaf51Xl7n6EaczqFBYOTmdHW6v3GRbaetbZMPLPVgqTBWfIHKcUfxDGQZ28h2W
 vcwtecEqmSQcKmiWohqpz0gYNA/FIIPa2jO1tp7AtnOLx/W7/Qzw8zYsWH8ozSYe
 xPq28aGoq1HCsqd56/X5i2O1oCWYWO6QPwL7yhe0ylkqww5rffyFb69+8CznwIvv
 GAW5qPG0EG1ORDTZGqe/n/AsZWhs8EsDC8IkKeDLkC6zHEj124Vqdl+YKfv/tdNk
 Z5Ng7EGFU88XGqBFaiFp58Olw3YkvsSswOKJFXUkgA+Zql3O1Pz/LpLhteqIPczZ
 xJsfBCBvrZhAlqVHIZQpge2mWLhyaHBqc7aytIhzdMCOLjylGeHyCS9J0tCI3S1H
 FyEM0hpFojaZh8dAAzFVGAEJi2KxwKVjJey82epRtMkNeUbOGlLAXRSlLT149Fqi
 NdbL7py/rsibmtQJg/pNXvxwzf56zmAkJg3OVc7Kzw/uO9X5Iwrt9VsLN4L2rb13
 0eAKr8/72za82u4dpEHiHbCQgl3E2g+zyhYTaEskB68p/fxw7P87R/cZg+ws2c/S
 7kyfJAlndj7FZ/RajblY+EDAaa5J7bchXRkpeMcm7Yx+Eg2KKSU=
 =3n4A
 -----END PGP SIGNATURE-----

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

Renesas ARM DT updates for v5.19 (take two)

  - I2C, sound, USB, CANFD, timer, watchdog, (Q)SPI, cpufreq, and
    thermal support for the RZ/G2UL SoC and the RZ/G2UL SMARC EVK
    development board,
  - Initial support for the R-Car V4H SoC and the Renesas White Hawk
    development board stack,
  - DMA, RTC, and USB support for the RZ/N1D SoC,
  - Initial support for the RZ/V2M SoC an the RZ/V2M Evaluation Kit
    Board,
  - Miscellaneous fixes and improvements.

* tag 'renesas-arm-dt-for-v5.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (40 commits)
  arm64: dts: renesas: Add initial device tree for RZ/V2M EVK
  arm64: dts: renesas: Add initial DTSI for RZ/V2M SoC
  arm64: dts: renesas: r8a779a0: Update to R-Car Gen4 compatible values
  ARM: dts: r9a06g032: Link the PCI USB devices to the USB PHY
  ARM: dts: r9a06g032: Add USB PHY DT support
  ARM: dts: r9a06g032: Add internal PCI bridge node
  ARM: dts: r9a06g032: Describe the RTC
  arm64: dts: renesas: Add interrupt-names to CANFD nodes
  arm64: dts: renesas: r9a07g043: Add SPI Multi I/O Bus controller node
  arm64: dts: renesas: r9a07g043: Create thermal zone to support IPA
  arm64: dts: renesas: r9a07g043: Add TSU node
  arm64: dts: renesas: r9a07g043: Add OPP table
  arm64: dts: renesas: r9a07g043: Add RSPI{0,1,2} nodes
  arm64: dts: renesas: r9a07g054: Fix external clk node names
  arm64: dts: renesas: r9a07g044: Fix external clk node names
  ARM: dts: r9a06g032: Fix the NAND controller node
  ARM: dts: r9a06g032: Fill the UART DMA properties
  ARM: dts: r9a06g032: Describe the DMA router
  ARM: dts: r9a06g032: Add the two DMA nodes
  arm64: dts: renesas: Remove empty rgb output endpoints
  ...

Link: https://lore.kernel.org/r/cover.1651828603.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:30:59 +02:00
Arnd Bergmann
2367ee1ab9 Samsung DTS ARM64 changes for v5.19, part two
1. Cleanups: unused and undocumented dma-channels and dma-requests.
 2. Add clock controllers to ExynosAutov9.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmJ01mIQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD19wrD/0TEcs2zVyKKwtBdzH9UoAcBzAHsFrs/B+8
 x/PbErDa1QWr0N+ChCcuPJF/QoWMYDoXIPkfA3QOJNI4CZXIoQTFUnrO3dINYsUm
 /HoVKP8tXjCd9bMTcKT1uryBqv+/Iyqekb+XapP+NRySWCSaJ/D7+RQbtr24Pl9X
 6YPBlUgpbqtBsOfxjMD63Ryj67BsrH7MzKsZWcmp1294x5pXu1qc8EQCnJoFY9A/
 XfrZEnZmsV7niNO60ohM/o7JDPorLdUXW93VRdaU4RM6Za6GSes/S/0fyTtN3jQs
 bn+w3QZh2OyEPVia1rEDBuRUUECLgvjc+kfEFEf+MgiQ8AxIRMac8mvPIf9W3LLi
 E5piweN+ZvijIkvuC8wpOFdlgzbEq6nhEkrckO9CNhx1NltgtDHIPEwXZamgR+30
 vuBry1JxKagFSGpqju78D5s5Jd1o+r1ByEg7oL1HSLJdcCKd6YEklGakPeXbMyR2
 QQSbbMK2NiODpQcjmEo4FxpGta6rlKZibnKbKTpRm/QSyzRITSQvc8l7yZnHD47S
 Ato0qXbwlRmuReXX+P1+yP8wSl6aSPurWbOrobwL/ziTWXXDJjlp6Qr9rhvhreNs
 VZ3ERh8JIUYgOuFT7O9GS325a5JSNtX6uL2ZtH6QKn/d3s/8x962QiaU84ULDCSG
 RAL8jS3gbQ==
 =LPf7
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1hHUACgkQmmx57+YA
 GNkg2A/5AZtnjtY2TXwA4bCulEmSkrb6CD5jjJwvGLJU3bDokK4X8bkxHFlqirxM
 RhPrGPCDMvATNVNVkerGJoDtOvCxh5b9zx7s6YtJiQ7D2kn0exeL9sviQow8W4oz
 H9uL+zyFSJr9QC8evN7yMcQz1A7+o3BhXqHH9raeeZb0X2o89Q+fvrUWqRmtTLul
 jfmbx5Gmakfj7RFV52abwqOvW7CO5gLmhCev9Namq8GbHplCe6kABrxULwZSp5Jo
 WcMeCNo7MaNuesSq/wwTiRaFc5FNkB/WJC8SHIq/wpGzr5u/sUIqhVr+Brm/E1+G
 MoGcOE55gYNCdyKOjDAEA7tGWPH+MQYJKo2g32ahNw2jsKCRxknxvvAy+uLrSpPV
 Jm0fd9dWDn9zqrLymAnlEo7ljHFcdQLFDZmTSYRUQ8Fm+BWxQNANL8kt7kv3D0BQ
 GUPD0JLrMVCOKtg5r16pMWEu4UOQT+VR1j7tXc1UKKpQ0RsIMIDl2Z9iWrjLYIme
 GjFRAzaqNxe27A3uVZaenPphL9fXqgVxOSMKhIRMJK6k8MdxeUU8xsuF0Se+A7Zu
 62Dv6+qiBckciVUFdSzGRXCxXX6m/ZIIkiBh4q7W6jRBs1S3DyiTysNyBiZxVXkE
 p4XSYgyk+T2ps9Y17gRa3Plv9xl+L8MwGmrXqT/WLpo1YgkPMSQ=
 =TVub
 -----END PGP SIGNATURE-----

Merge tag 'samsung-dt64-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt

Samsung DTS ARM64 changes for v5.19, part two

1. Cleanups: unused and undocumented dma-channels and dma-requests.
2. Add clock controllers to ExynosAutov9.

* tag 'samsung-dt64-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynos: switch UFS clock node in ExynosAutov9
  arm64: dts: exynos: switch USI clocks in ExynosAutov9
  arm64: dts: exynos: add initial CMU clock nodes in ExynosAutov9
  dt-bindings: clock: add Exynos Auto v9 SoC CMU bindings
  dt-bindings: clock: add clock binding definitions for Exynos Auto v9
  arm64: dts: fsd: drop useless 'dma-channels/requests' properties
  arm64: dts: exynos: drop useless 'dma-channels/requests' properties
  arm64: dts: exynos: move XTCXO clock frequency to board in Exynos Auto v9

Link: https://lore.kernel.org/r/20220506081438.149192-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:26:29 +02:00
Arnd Bergmann
620b2c35ab Minor cleanup of ARM64 DTS for v5.19
Align SPI NOR node names and freq-table-hz to DT schema. Drop
 unused/undocumented dma-channels/dma-requests.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmJ010AQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD11itD/0RwGve5QdxMHp1Au0/AkyHiPHxlmvgPMwa
 GxOjmNYjDRSnocX+r9TVpT6/SK6XWIYN/OQV8WC2L7NuPYUTeQz2H0ms+Zr7D2E0
 5ToXC6KlyfMMtejGbiqNtzLQAt0/l6qT6thVVtS9fHnE3Rf+zVq8rjOZJE7yVPXl
 W9WxJvQsDYg4FLSmnZm4OAZeJkZ7gOOZEeZv6pLyJizzx03HB7kZXZT5Vnu+7Xc9
 blzmUN/LU5UyEWg8lsmxZchiOt4QJJICwbuKRCV2zvd7+WzqJyZJjC3NBQK+wlQs
 zd9dzOYqBYi7hyiN2Up53sHE8MDEGfM9RCm0q9avZKqgC32GlVBHlv1iT0JvamJ1
 NT+Fo2YjvdTXA2wxLsmlSYc6CimKBIwRgQVae+7zEDqKNhfeTOb5lqmDhqCqI2X0
 ddYkzxaP9M6fDkhKWBhHLS6vgjCt8xv8MDxIj5Udq5pNMXunZj52S/XcxKHH9/9e
 DpNNF2C8W0WSFXi+z6qJ8TriqiNvoH7tvNtJoUowJhc16NIb0OdxpR/PV6m8AqaT
 Bxf7s+jg0onW8CpGo4+2s+rwlsXuSDuHsrI4H5rsQc0N5of9B6NIvHeO5zQnuLum
 NkEUaXf6qTlUn8uIWc8GYABT4fR4Y9/YsT8FJ3IoLmn7GHdEmBGniuLIVVq0TUjb
 uggxlmam5A==
 =qmZo
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ1gTYACgkQmmx57+YA
 GNnH0g/9E+sT9kwa74GhBCyIhC7PRbAbJ5/issAeneYM2uO4tnpcCF84Y+uXcSw7
 M5JW/2e9vAXzipT2AovJeHTAUrrpJOyjRfKrJ0ARbo8TbtjM9ve/yQVP3UaEEH54
 Z6jINufrnlqqX7/FfHa1S8XUsOsNqpcXC0fJhBGn9tquWlKT+9AVxLL6hVxK/vLd
 M/ZsJmHiNJjYQ1ovTuavLf4u1m2k+u9UYh8Fpq3+aDM0ql0/Uvtqtn6P5SxlXp9u
 K2Dt+B5TOquZHIPCNOxmm1nNzEir7o0SFZxNChl51CHiviPpY384W90UoSGAyEcl
 kzd5laY8RRKN1XLrKhe5CuO5Kg4220ZQk7JguSBxgu3gqKgDY2IyAvY+h+hQhYjP
 hN329JhqJWmHr1oYBk7ealKq4Ftu/U+32uEbNUmUwsbAJtshbM6BPoHwrCTFfBnk
 BmvljAgBOioACGJUMRSyAxHB5mqM6lP6mJWclI6OZR21F86fWq1a/GIKXxzZYNY1
 8aN2ZiB/NKtDMEhAZmi4ZK2ulhcEV8wH7NtD42JNQ7mdxRj5MNKx9K7231Mqm9wn
 JrtfNmftjHzMHYTJS5oTF8BmHQW7Zk+v0TjLo9CkfsuQdh2J98Chd9QtwywNoE18
 eFUfPE4Ljc8OQO9nmqx0WWP/SbyDNQeTBIboAhvySJOcWkZqjC8=
 =8NSC
 -----END PGP SIGNATURE-----

Merge tag 'dt64-cleanup-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt

Minor cleanup of ARM64 DTS for v5.19

Align SPI NOR node names and freq-table-hz to DT schema. Drop
unused/undocumented dma-channels/dma-requests.

* tag 'dt64-cleanup-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: broadcom: drop useless 'dma-channels/requests' properties
  arm64: dts: stratix10/agilex: drop useless 'dma-channels/requests' properties
  arm64: dts: marvell: align SPI NOR node name with dtschema
  arm64: dts: microchip: align SPI NOR node name with dtschema
  arm64: dts: hisilicon: align 'freq-table-hz' with dtschema in UFS

Link: https://lore.kernel.org/r/20220506081438.149192-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-06 22:12:38 +02:00
Pierre Gondois
d3c3db41df cpufreq: CPPC: Add per_cpu efficiency_class
In ACPI, describing power efficiency of CPUs can be done through the
following arm specific field:
ACPI 6.4, s5.2.12.14 'GIC CPU Interface (GICC) Structure',
'Processor Power Efficiency Class field':
  Describes the relative power efficiency of the associated pro-
  cessor. Lower efficiency class numbers are more efficient than
  higher ones (e.g. efficiency class 0 should be treated as more
  efficient than efficiency class 1). However, absolute values
  of this number have no meaning: 2 isn’t necessarily half as
  efficient as 1.

The efficiency_class field is stored in the GicC structure of the
ACPI MADT table and it's currently supported in Linux for arm64 only.
Thus, this new functionality is introduced for arm64 only.

To allow the cppc_cpufreq driver to know and preprocess the
efficiency_class values of all the CPUs, add a per_cpu efficiency_class
variable to store them.

At least 2 different efficiency classes must be present,
otherwise there is no use in creating an Energy Model.

The efficiency_class values are squeezed in [0:#efficiency_class-1]
while conserving the order. For instance, efficiency classes of:
  [111, 212, 250]
will be mapped to:
  [0 (was 111), 1 (was 212), 2 (was 250)].

Each policy being independently registered in the driver, populating
the per_cpu efficiency_class is done only once at the driver
initialization. This prevents from having each policy re-searching the
efficiency_class values of other CPUs. The EM will be registered in a
following patch.

The patch also exports acpi_cpu_get_madt_gicc() to fetch the GicC
structure of the ACPI MADT table for each CPU.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-05-06 21:01:17 +02:00
Mark Brown
d158a0608e arm64/sme: More sensibly define the size for the ZA register set
Since the vector length configuration mechanism is identical between SVE
and SME we share large elements of the code including the definition for
the maximum vector length. Unfortunately when we were defining the ABI
for SVE we included not only the actual maximum vector length of 2048
bits but also the value possible if all the bits reserved in the
architecture for expansion of the LEN field were used, 16384 bits.

This starts creating problems if we try to allocate anything for the ZA
matrix based on the maximum possible vector length, as we do for the
regset used with ptrace during the process of generating a core dump.
While the maximum potential size for ZA with the current architecture is
a reasonably managable 64K with the higher reserved limit ZA would be
64M which leads to entirely reasonable complaints from the memory
management code when we try to allocate a buffer of that size. Avoid
these issues by defining the actual maximum vector length for the
architecture and using it for the SME regsets.

Also use the full ZA_PT_SIZE() with the header rather than just the
actual register payload when specifying the size, fixing support for the
largest vector lengths now that we have this new, lower define. With the
SVE maximum this did not cause problems due to the extra headroom we
had.

While we're at it add a comment clarifying why even though ZA is a
single register we tell the regset code that it is a multi-register
regset.

Reported-by: Qian Cai <quic_qiancai@quicinc.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Link: https://lore.kernel.org/r/20220505221517.1642014-1-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-06 18:24:19 +01:00
Randy Dunlap
bd61395ae8 KVM: arm64: nvhe: Eliminate kernel-doc warnings
Don't use begin-kernel-doc notation (/**) for comments that are not in
kernel-doc format.

This prevents these kernel-doc warnings:

arch/arm64/kvm/hyp/nvhe/switch.c:126: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Disable host events, enable guest events
arch/arm64/kvm/hyp/nvhe/switch.c:146: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Disable guest events, enable host events
arch/arm64/kvm/hyp/nvhe/switch.c:164: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Handler for protected VM restricted exceptions.
arch/arm64/kvm/hyp/nvhe/switch.c:176: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Handler for protected VM MSR, MRS or System instruction execution in AArch64.
arch/arm64/kvm/hyp/nvhe/switch.c:196: warning: Function parameter or member 'vcpu' not described in 'kvm_handle_pvm_fpsimd'
arch/arm64/kvm/hyp/nvhe/switch.c:196: warning: Function parameter or member 'exit_code' not described in 'kvm_handle_pvm_fpsimd'
arch/arm64/kvm/hyp/nvhe/switch.c:196: warning: expecting prototype for Handler for protected floating(). Prototype was for kvm_handle_pvm_fpsimd() instead

Fixes: 09cf57eba3 ("KVM: arm64: Split hyp/switch.c to VHE/nVHE")
Fixes: 1423afcb41 ("KVM: arm64: Trap access to pVM restricted features")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Fuad Tabba <tabba@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: David Brazdil <dbrazdil@google.com>
Cc: James Morse <james.morse@arm.com>
Cc: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kvmarm@lists.cs.columbia.edu
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220430050123.2844-1-rdunlap@infradead.org
2022-05-06 11:03:56 +01:00
Ard Biesheuvel
7ee74cc7ad KVM: arm64: Avoid unnecessary absolute addressing via literals
There are a few cases in the nVHE code where we take the absolute
address of a symbol via a literal pool entry, and subsequently translate
it to another address space (PA, kimg VA, kernel linear VA, etc).
Originally, this literal was needed because we relied on a different
translation for absolute references, but this is no longer the case, so
we can simply use relative addressing instead. This removes a couple of
RELA entries pointing into the .text segment.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220428140350.3303481-1-ardb@kernel.org
2022-05-06 11:03:56 +01:00
Phil Edworthy
ad1bd2bf65 arm64: dts: renesas: Add initial device tree for RZ/V2M EVK
Add basic support for RZ/V2M EVK (based on R9A09G011):
- memory
- External input clock
- UART

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220503115557.53370-13-phil.edworthy@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:57 +02:00
Phil Edworthy
fb1929b98f arm64: dts: renesas: Add initial DTSI for RZ/V2M SoC
Details of the SoC can be found here:
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-cortex-a-mpus/rzv2m-dual-cortex-a53-lpddr4x32bit-ai-accelerator-isp-4k-video-codec-4k-camera-input-fhd-display-output

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220504094456.24386-3-phil.edworthy@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:57 +02:00
Geert Uytterhoeven
a1721bbbdb arm64: dts: renesas: r8a779a0: Update to R-Car Gen4 compatible values
Despite the name, R-Car V3U is the first member of the R-Car Gen4
family.  Hence update the compatible properties in various device nodes
to include family-specific compatible values for R-Car Gen4 instead of
R-Car Gen3:
  - DMAC,
  - (H)SCIF,
  - I2C,
  - IPMMU,
  - WDT.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/73cea9d5e1a6639422c67e4df4285042e31c9fd5.1651497071.git.geert+renesas@glider.be
2022-05-06 11:09:34 +02:00
Geert Uytterhoeven
6af663af3c arm64: dts: renesas: Add interrupt-names to CANFD nodes
The Renesas R-Car CAN-FD Controller on R-Car Gen3 and RZ/G2 SoCs has two
interrupts.  Add interrupt-names properties to all CAN-FD device nodes
to identify the individual interrupts, so we can make this property a
required property in the DT bindings.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/10eef1e20372af4a156b06df8e5124666ec7c6b6.1651512451.git.geert+renesas@glider.be
2022-05-06 11:09:34 +02:00
Biju Das
470218e29d arm64: dts: renesas: r9a07g043: Add SPI Multi I/O Bus controller node
Add SPI Multi I/O Bus controller node to R9A07G043 (RZ/G2UL) SoC DTSI.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220502190155.84496-1-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:34 +02:00
Biju Das
c2ff5c0282 arm64: dts: renesas: r9a07g043: Create thermal zone to support IPA
Setup a thermal zone driven by SoC temperature sensor.
Create passive trip points and bind them to CPUFreq cooling
device that supports power extension.

Based on the work done by Dien Pham <dien.pham.ry@renesas.com>
and others for r8a77990 SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220501112926.47024-6-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:34 +02:00
Biju Das
91e548da2c arm64: dts: renesas: r9a07g043: Add TSU node
Add TSU node to RZ/G2UL SoC DTSI.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220501112926.47024-5-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:34 +02:00
Biju Das
e6a9acc370 arm64: dts: renesas: r9a07g043: Add OPP table
Add OPP table for RZ/G2UL SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220501112926.47024-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:33 +02:00
Biju Das
22ec868997 arm64: dts: renesas: r9a07g043: Add RSPI{0,1,2} nodes
Add RSPI{0,1,2} nodes to R9A07G043 (RZ/G2UL) SoC DTSI.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220501112926.47024-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:33 +02:00
Biju Das
9752535054 arm64: dts: renesas: r9a07g054: Fix external clk node names
Add suffix '-clk' for can and extal clk node names and replace the
clk node names audio_clk{1,2} with audio{1,2}-clk as per the device
tree specification.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220428133156.18080-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:33 +02:00
Biju Das
1404ca90f4 arm64: dts: renesas: r9a07g044: Fix external clk node names
Add suffix '-clk' for can and extal clk node names and replace the
clk node names audio_clk{1,2} with audio{1,2}-clk as per the device
tree specification.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220428133156.18080-1-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:33 +02:00
Laurent Pinchart
747bbcd3aa arm64: dts: renesas: Remove empty rgb output endpoints
Endpoints node must have a remote-endpoint property, as endpoints only
exist to model a link between ports. Drop the empty rgb output endpoints
from SoC dtsi files, and declare them in the board dts instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20220424161228.8147-2-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:33 +02:00
Laurent Pinchart
b7423e3943 arm64: dts: renesas: Remove empty lvds endpoints
Endpoints node must have a remote-endpoint property, as endpoints only
exist to model a link between ports. Drop the empty lvds endpoints from
SoC dtsi files, they should be instead declared in the board dts or in
overlays.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20220424161228.8147-1-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:33 +02:00
Biju Das
094ff3485a arm64: dts: renesas: rzg2ul-smarc: Enable USB2.0 support
Enable USB2.0 Host/Device support on RZ/G2UL SMARC EVK by
adding usb{0,1} pincontrol entries to the soc-pinctrl dtsi
and deleting the nodes which disabled it.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220429072400.23729-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:33 +02:00
Biju Das
1ed914e341 arm64: dts: renesas: rzg2ul-smarc: Enable Audio
Enable Audio on RZ/G2UL SMARC EVK by adding ssi1 pincontrol entries
to the soc-pinctrl dtsi and ssi1 and cpu sound_dai nodes to the board
dtsi.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220429072400.23729-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:32 +02:00
Biju Das
c62af12c70 arm64: dts: renesas: rzg2l-smarc: Move ssi0 and cpu sound_dai nodes from common dtsi
On RZ/G2{L,LC} SoM module, the wm8978 audio codec is connected to ssi0,
whereas on RZ/G2UL it is connected to ssi1. So move ssi0 and cpu
sound_dai nodes from common dtsi to board specific dtsi.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220429072400.23729-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:32 +02:00
Yoshihiro Shimoda
e4d755cfec arm64: dts: renesas: Add Renesas White Hawk boards support
Initial support for the Renesas White Hawk CPU and BreakOut boards.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220428135058.597586-4-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:10 +02:00
Yoshihiro Shimoda
987da486d8 arm64: dts: renesas: Add Renesas R8A779G0 SoC support
Add initial support for the Renesas R8A779G0 (R-Car V4H) SoC.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20220428135058.597586-3-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-05-06 11:09:10 +02:00
Stephen Boyd
19794489fa arm64: dts: qcom: Only include sc7180.dtsi in sc7180-trogdor.dtsi
The SoC is always present on sc7180-trogdor.dtsi and thus we should
include it in the "generic" dtsi file for trogdor. Previously we had
removed it from there because we had to do the spi6/spi0 swizzle, so
each trogdor variant board had to include sc7180.dtsi and then
sc7180-trogdor.dtsi so that the latter dtsi file could modify the right
spi bus for EC and H1 properties that are common to all trogdor boards.

Now that we're done with that we can replace sc7180.dtsi includes with
sc7180-trogdor.dtsi and include sc7180.dtsi in sc7180-trogdor.dtsi as
was originally intended. We still need to include sc7180-trogdor.dtsi
before the bridge dtsi files though because those rely on the panel
label.

Cc: "Joseph S. Barrera III" <joebar@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220427020339.360855-4-swboyd@chromium.org
2022-05-05 22:42:27 -05:00
Stephen Boyd
d277cab7af arm64: dts: qcom: sc7180-trogdor: Simplify spi0/spi6 labeling
We had to do this spi0/spi6 flip-flop on trogdor-r0 because the spi
buses got swizzled between r0 and r1. The swizzle stopped after r1, but
we kept this around to support either hardware possibility and to keep
trogdor-r0 working.

trogdor-r0 isn't supported upstream, so this swizzle is not doing
anything besides making a pattern that others tryt  to copy for the EC and
H1 nodes. Let's remove it and simplify the dts files.

Cc: "Joseph S. Barrera III" <joebar@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220427020339.360855-3-swboyd@chromium.org
2022-05-05 22:42:27 -05:00
Stephen Boyd
51d30402be arm64: dts: qcom: sc7180-trogdor: Simplify trackpad enabling
Trogdor boards with a detachable keyboard don't have a trackpad over
i2c. Instead the trackpad is on the detachable keyboard base. Let's move
the enabling of the trackpad i2c bus out of the base sc7180-trogdor.dtsi
file so that each trogdor board that is detachable, of which there are
many, doesn't have to disable the trackpad bus.

Cc: "Joseph S. Barrera III" <joebar@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220427020339.360855-2-swboyd@chromium.org
2022-05-05 22:42:27 -05:00
Douglas Anderson
366a0a194b arm64: dts: qcom: sc7280: eDP for herobrine boards
Add eDP support to herobrine boards, splitting up amongst the
different files as makes sense. Rationale for the current split of
things:
* The eDP connector itself is on qcard. However, not all devices with
  a qcard will use an eDP panel. Some might use MIPI and, presumably,
  someone could build a device with qcard that had no display at all.
* The qcard provides a PWM for backlight that goes to the eDP
  connector. This PWM is also provided to the board and it's expected
  that it would be used as the backlight PWM even for herobrine
  devices with MIPI displays.
* It's currently assumed that all herobrine boards will have some sort
  of display, either MIPI or eDP (but not both).
* We will assume herobrine-rev1 has eDP. The schematics allow for a
  MIPI panel to be hooked up but, aside from some testing, nobody is
  doing this and most boards don't have all the parts stuffed for
  it. The two panels would also share a PWM for backlight, which is
  weird.
* herobrine-villager and herobrine-hoglin (crd) also have eDP.
* herobrine-hoglin (crd) has slightly different regulator setup for
  the backlight. It's expected that this is unique to this board. See
  comments in the dts file.
* There are some regulators that are defined in the qcard schematic
  but provided by the board like "vreg_edp_bl" and
  "vreg_edp_3p3". While we could put references to these regulators
  straight in the qcard.dtsi file, this would force someone using
  qcard that didn't provide those regulators to provide a dummy or do
  an ugly /delete-node/. Instead, we'll add references in
  herobrine.dtsi.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220426124053.v2.1.Iedd71976a78d53c301ce0134832de95a989c9195@changeid
2022-05-05 22:36:26 -05:00
Bhupesh Sharma
11a3f3dc2c arm64: dts: qcom: sa8155p-adp: Disable multiple Tx and Rx queues for ethernet IP
Fix the issues seen with ethernet traffic getting stalled on SA8155p-ADP
board with default (or larger) mtu size of 1500 bytes, by disabling
multiple Tx and Rx queues for the stmmac IP block.

With the single queue setup, the ethernet traffic is stable,
wget / curl can work well on the board and no ethernet stall is
observed even when longer netperf / iperf3 test are run. Also
a performance of ~940 Mbits/sec is observed on the 1G link, so
there is no observable degradation in performance as well.

Fixes: c5cb42cc84 ("arm64: dts: qcom: sa8155p-adp: Enable ethernet node")
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220423195003.353150-1-bhupesh.sharma@linaro.org
2022-05-05 22:11:09 -05:00
Bhupesh Sharma
9583009097 arm64: dts: qcom: sm8150: Fix iommu sid value for SDC2 controller
Fix the IOMMU sid value for SDC2 controller, to ensure that no
ADMA error is observed when the microSD card is detected on the
SA8155p-ADP board.

Fixes: 876644c760 ("arm64: dts: qcom: sm8150: Add support for SDC2")
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220422210611.173842-1-bhupesh.sharma@linaro.org
2022-05-05 22:10:07 -05:00
Krzysztof Kozlowski
4a7ffc10d1 arm64: dts: qcom: align DWC3 USB interrupts with DT schema
Align order of interrupts with Qualcomm DWC3 USB DT schema.  No
functional impact expected.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220504131923.214367-14-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-05 22:06:44 +02:00
Krzysztof Kozlowski
8d5fd4e4d4 arm64: dts: qcom: align DWC3 USB clocks with DT schema
Align order of clocks and their names with Qualcomm DWC3 USB DT schema.
No functional impact expected.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220504131923.214367-13-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-05 22:06:43 +02:00
Krzysztof Kozlowski
bbd25a8703 arm64: dts: qcom: msm8996: add clock-names to DWC3 USB node
The clock-names is a required property of DWC3 USB node.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220504131923.214367-12-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-05 22:06:43 +02:00
Krzysztof Kozlowski
28c71c305d arm64: dts: qcom: qcs404: add dedicated qcom,qcs404-dwc3 compatible
Add dedicated compatible for DWC3 USB node name to allow more accurate
DT schema matching.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220504131923.214367-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-05 22:06:42 +02:00
Krzysztof Kozlowski
f526072aac arm64: dts: qcom: sm6125: add dedicated qcom,sm6125-dwc3 compatible
Add dedicated compatible for DWC3 USB node name to allow more accurate
DT schema matching.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220504131923.214367-10-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-05 22:06:42 +02:00
Krzysztof Kozlowski
b7f1528eba arm64: dts: qcom: msm8994: add dedicated qcom,msm8994-dwc3 compatible
Add dedicated compatible for DWC3 USB node name to allow more accurate
DT schema matching.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220504131923.214367-9-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-05 22:06:41 +02:00
Krzysztof Kozlowski
3a6b8bf18e arm64: dts: qcom: ipq8074: add dedicated qcom,ipq8074-dwc3 compatible
Add dedicated compatible for DWC3 USB node name to allow more accurate
DT schema matching.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220504131923.214367-8-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-05 22:06:41 +02:00
Krzysztof Kozlowski
b77a1c4d6b arm64: dts: qcom: correct DWC3 node names and unit addresses
Align DWC3 USB node names with DT schema ("usb" is expected) and correct
the unit addresses to match the "reg" property.  This also implies
overriding nodes by label, instead of full path.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220504131923.214367-7-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-05 22:06:41 +02:00
Jakub Kicinski
c8227d568d Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
tools/testing/selftests/net/forwarding/Makefile
  f62c5acc80 ("selftests/net/forwarding: add missing tests to Makefile")
  50fe062c80 ("selftests: forwarding: new test, verify host mdb entries")
https://lore.kernel.org/all/20220502111539.0b7e4621@canb.auug.org.au/

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-05-05 13:03:18 -07:00
Arnd Bergmann
1b8e9677bc This pull request contains Broadcom ARM64-based SoCs changes for 5.19,
please pull the following:
 
 - Krzysztof fixes the SPI NOR Device Tree node name to comply with the
   dtschema
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmJy6GYACgkQh9CWnEQH
 BwQR6w//fHtYQAC+s/y7hTKhKi9ZPtLB9V60BwkzHbJR/NbTLQW5vn1AGQ2qcUTR
 xA4RUoiIVqcrj3B4TXRMW+0AG5ULHIlGefYW945C9v17c/fi0+ylcTde9AlLRC/g
 lOfXB82+1Q4yHr9qlAahtTT4SeC02BD/4yzlJ4jbF2JPdx3o71F5t+v2x4tko1Sh
 EMfNNjZ3oLwaJLpAAvuVdIHjSyohK7BSWPndSi6iOhtZfvWYg00nWtCZp3jnjepm
 CdUGEVlESbLpt2jtpEdc7mbrGcjZRSReNMz9J2ENjfyjguM4/ChYG99PaUSm11jV
 LumvXu1TRALBUFEikdBizgKuy+Fy8mtw+k8GjUVxqrgDimebgNqrAOwklbXZcqPD
 htGA/h/CYiMprUyYMZPNXIIA3f4+bTNpxM7wLrU6sBZoaObv6RAmSyYr4O2blas1
 z9JAgHv5Bnr+0WU22HuHXVYgbkeyqOe2xcHi1rXm/HhhgrjjLdwkOLm/r29auJ7C
 QghZsw41h5qMNfgiLvkIMivKCRilZg6rAdhmQ+Y8DPQD1lyIAM1D8Q52MiXPkmtt
 Ld543fBtvrG39rv5pdR0PORoTMRFrSCY/M2KRYEMvRrs05nnAp2vU6ShOqXw/q3Q
 rDA95mNzarLzxlVl80EOvHGdxcP16FlGwmUcdAZgmc9HXtBm+qE=
 =igMx
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJ0D+sACgkQmmx57+YA
 GNlhWg/9EkurskBIlNEip/rCObMXck4FQVrg192GQkZaBxsmdhk9VGfoYpvrOZPg
 tfho9JYtEPJfNXf0MWG96FBxAZIVbkQm05bBXvmF/J1O5eDZ6JHCcRKB40AKhMWZ
 ittV1iFO6BjjrBOKT6HbOx3V8JKQvTtBUf6pEUqHiNloMIsILVk9PT8opLexwLbd
 XSKkbDvFWpyKcZrPbnW5D5+dGyjDiODLkkRljWWVSDRi50FSbWWKvU5BlwqPAkc2
 TP58RstHhY4DrSmDvbyHJiRW0kt5qc90Orlfp6fjzAVCXbI4uvOVn+AIaGACNYil
 OplONjHi1Vjl5/cXSQALJvDhl0JjcU83u1IEKz4KpN14aMhHSFUcvWc0PpiqlLEC
 bQuHDUmZYwY/il7Qb31zUCKfcyZrDjB+GeACWjI/ZBwKR4xXH0rCK1yiqxjMLcl4
 XEiRkT24PuAwnChYtINmGAnWieiYX0uK7YIQGao74rvhL2uBuGw2EkBsvbgytChO
 Nk0lDSen8L8SdJVcenpZxcwDzJSONAAmJyoOZL1uuyJvxGpbscPAebiQOy7gtq6n
 fpmOdTMZWWychEiFA3zCZ8TPP54qFnSS8BGP9loxI1N8gl1JX9+F7vASgQQIcaj6
 UyCnSUiNnLdK8JQ6fTcat4NiMss6jD7kvQXz1qRD0CneY7Hcbes=
 =KFF2
 -----END PGP SIGNATURE-----

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

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

- Krzysztof fixes the SPI NOR Device Tree node name to comply with the
  dtschema

* tag 'arm-soc/for-5.19/devicetree-arm64' of https://github.com/Broadcom/stblinux:
  arm64: dts: broadcom: align SPI NOR node name with dtschema

Link: https://lore.kernel.org/r/20220504210942.1838248-3-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-05 19:56:59 +02:00
Rahul T R
7d4686fc3c arm64: dts: ti: k3-j721e-sk: Enable HDMI
Add node for dvi bridge and the endpoint nodes to
describe connection from
DSS => TI TFP410 DPI-to-DVI Bridge => HDMI connector.
Also add the required pinmux for HDMI hotplug and
powerdown

Signed-off-by: Rahul T R <r-ravikumar@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com>
Link: https://lore.kernel.org/r/20220505090709.9252-3-r-ravikumar@ti.com
2022-05-05 22:45:16 +05:30
Rahul T R
d4f3c8a169 arm64: dts: ti: k3-j721e-sk: Enable DisplayPort
Add the endpoint nodes to describe connection from
DSS => MHDP => DisplayPort connector.

Signed-off-by: Rahul T R <r-ravikumar@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com>
Link: https://lore.kernel.org/r/20220505090709.9252-2-r-ravikumar@ti.com
2022-05-05 22:45:16 +05:30
Tomi Valkeinen
8f984f60f2 arm64: dts: ti: k3-j721e-common-proc-board: add DP to j7 evm
Add the endpoint nodes to describe connection from
DSS => MHDP => DisplayPort connector.
Also add the required pinmux nodes for hotplug.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Rahul T R <r-ravikumar@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com>
Link: https://lore.kernel.org/r/20220429112639.13004-3-r-ravikumar@ti.com
2022-05-05 22:45:16 +05:30
Tomi Valkeinen
92c996f4ce arm64: dts: ti: k3-j721e-*: add DP & DP PHY
Add DT nodes for DisplayPort and DisplayPort PHY. The DP is Cadence MHDP
8546 and the PHY is a Cadence Torrent PHY with TI WIZ wrapper.

Also add the required phy link nodes in the board dts files.

A slight irregularity in the bindings is the DPTX PHY register block,
which is in the MHDP IP, but is needed and mapped by the PHY.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Rahul T R <r-ravikumar@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com>
Link: https://lore.kernel.org/r/20220429112639.13004-2-r-ravikumar@ti.com
2022-05-05 22:45:16 +05:30
Arnd Bergmann
e8bcacdaf1 Arm FVP/Juno device tree updates for v5.19
The main and bulk of the change is the addition of new platform
 Arm corstone1000(both FVP and FPGA versions). Also, there are
 addition of Coresight Cross Trigger Interface(CTI) support on Juno,
 fix for incorrect SCMI power domain IDs, addition of virtio-rng
 on FVP which is default disabled as it works only on latest versions
 of the FVP model.
 
 Other miscellanous changes include dropping of useless
 'dma-channels/requests' properties and updating virtio device
 node names as per dtschema.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmJyPcUACgkQAEG6vDF+
 4pizDw/+NzmnScLZFzwXKi8LqKIuC+JlDf+mvWGlidjjz2c1X4Mf45AKPpKvRQmc
 PyvVKB7t6azo9xHcgS43J7+DOFOziqjY/+RJhiQ7YS8L/SSSuaNDyAO3EpWpIo85
 c2QL9sFsiVPqQFmF+E4cLh96gF97xi2QfB2420E5m7feLzCgHQZYYWijhGVlZR5L
 nsoXLDU/HK9MTts3q9jyen3gA2nBE7NGuU2SacehJNXoHCd+T0W6AQgYWIWzWa+X
 eq/PbbnFCguFyzNRncbnxzCVOXeg0FS1zTPOtJFNHioG6FnIEqg4VEF9g2hdtnTZ
 CGEtu4vvVsSKxIr7s2d/vfqlYpOpxwVkJl3XgNcqLXTgk4tHWODW7Rl7RTXwT3hT
 mgh0j272/4gm+iTDYI+YmanQsEKP/VQiMGXDVTX43da2rgFVXUMU/XT1EHy7Ef0P
 iULL5sqcA0q9Y895AV6aeMXZdQl9ZHYYgLxQLPecMVt+dMfde1LxaRssH3YQ+aLN
 u0ZO/SOYRXqe1AbJvgC2xKPH6URmNAHHg6urVsOPI14Zj+q+zdz7M2/Ii1cu6o5O
 EvISCqoNU0Wazcnfg6Khp6MwnPxKVIHl0w3C0Z4qZjVIzzSF0VTomy1W3FJHEZuf
 9HSB0BopmOM8FQzAOJnHYjHIXT7jhhjACmapdi4U1d+XGqw1ih4=
 =dlOE
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJz4x8ACgkQmmx57+YA
 GNkV+A/+OUattSEzS2yaSUDbHC9KjWEEZvPZduQr6EI7rjOlpqeWIlkL0Neh4fce
 UCQNkk3m6VmJmL+b0YljZZPTK+ajH0cPqb8Rp4EDhaqivhLAiaqRW7v6zMj621rQ
 QXA+7DZ0jh8OXkgJJJaDTAEotFAv+NZ95Ca+AbE31Zi5BfHfe0nQs6s+BJYGmt76
 I3hK6ZCgfa4T/ubFariJsFxbZisWbuMjQJIw5Z+PC7sGPYEx00xiws7L/8apBxTt
 XHz4NF02qA0wV28W6TyQdTN8q+8t/1yAG7wd2cFic5RJl7KNH+SP9WsL2jMLscvM
 QjoFdEg7RM80slFFHI3HUvcC5+2KiqzkvhKbXAG5lqXtgk1Q0I+aLi795TRRhrXu
 IxPubqvBqOd8MLUUIeU+qf3KFAVdtB1ly/tRCFaF5m3U4v8naE063rO3IMuojQmk
 BaCfbBB7vfa50ETSVYwT/APq2U+V6LOH1nvIP8kgltiqd70XZFyGs9cIgdcVZE3w
 a11PPgl/Ux2kKnf8YaRr4vckn+MZ7ByBEEDaHPmbRRlup+n2sMX8q3w1sfYoVI5C
 /IVS3XGxBWkVb3FGoOA4PllIdf9FWr00TIC3N/+3R12WpJ76ACVd+kVlB/GVNMkM
 QY3GaetMUZ4OMm93mXwqg0yACA6arfvRbd/TrTdoRGwb2EYehFs=
 =o+6w
 -----END PGP SIGNATURE-----

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

Arm FVP/Juno device tree updates for v5.19

The main and bulk of the change is the addition of new platform
Arm corstone1000(both FVP and FPGA versions). Also, there are
addition of Coresight Cross Trigger Interface(CTI) support on Juno,
fix for incorrect SCMI power domain IDs, addition of virtio-rng
on FVP which is default disabled as it works only on latest versions
of the FVP model.

Other miscellanous changes include dropping of useless
'dma-channels/requests' properties and updating virtio device
node names as per dtschema.

* tag 'juno-updates-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  arm64: dts: juno: Drop useless 'dma-channels/requests' properties
  arm64: dts: fvp: Align virtio device node names with dtschema
  arm64: dts: fvp: Add virtio-rng support
  arm64: dts: Add Arm corstone1000 platform support
  dt-bindings: Add Arm corstone1000 platform
  arm64: dts: juno: add CTI entries to device tree
  arm64: dts: juno: Fix SCMI power domain IDs for ETF and CS funnel

Link: https://lore.kernel.org/r/20220504112917.3492009-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-05 16:45:51 +02:00
Christophe Leroy
2cb4de085f mm: Add len and flags parameters to arch_get_mmap_end()
Powerpc needs flags and len to make decision on arch_get_mmap_end().

So add them as parameters to arch_get_mmap_end().

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/b556daabe7d2bdb2361c4d6130280da7c1ba2c14.1649523076.git.christophe.leroy@csgroup.eu
2022-05-05 22:11:57 +10:00
Kefeng Wang
f41ef4c2ee arm64: mm: Cleanup useless parameters in zone_sizes_init()
Directly use max_pfn for max and no one use min, kill them.

Reviewed-by: Vijay Balakrishna <vijayb@linux.microsoft.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Link: https://lore.kernel.org/r/20220411092455.1461-4-wangkefeng.wang@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-05 08:48:09 +01:00
Markus Niebel
d80b9c8422 arm64: dt: imx8mp: support pwm polarity inversion
The i.MX8M Plus has the same PWM IP as i.MX6 / i.MX7. This IP
and the driver supporting pwm polarity inversion. Switch CPU
device tree fragment to use 3 pwm-cells.

Tested on MBa8MPxL mainboard.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 15:46:31 +08:00
Markus Niebel
6bc1e58055 arm64: dt: imx8mn: support pwm polarity inversion
The i.MX8M Nano has the same PWM IP as i.MX6 / i.MX7. This IP
and the driver supporting pwm polarity inversion. Switch CPU
device tree fragment to use 3 pwm-cells.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 15:46:28 +08:00
Markus Niebel
957aef026c arm64: dt: imx8mm: support pwm polarity inversion
The i.MX8M Mini has the same PWM IP as i.MX6 / i.MX7. This IP
and the driver supporting pwm polarity inversion. Switch CPU
device tree fragment to use 3 pwm-cells and correct board
device trees.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 15:46:25 +08:00
Markus Niebel
15ca3f00a1 arm64: dt: imx8mq: support pwm polarity inversion
The i.MX8MQ has the same PWM IP as i.MX6 / i.MX7. This IP and the driver
supporting pwm polarity inversion. Switch CPU device tree fragment to
use 3 pwm-cells and correct board device trees.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 15:46:09 +08:00
Tim Harvey
22463f7cd0 arm64: dts: imx8mm-venice-gw7901: remove unnecessary cpu temp override
Remove the unnecessary cpu_alert0 and cpu_crit0 TMU node overrides as
these are added dynamically by boot firmware based on CPU temperature
grade.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 15:40:45 +08:00
Tim Harvey
dd6fa86043 arm64: dts: imx8mm-venice-gw7902: add vdd_5p0 ADC channel
Add missing vdd_5p0 ADC channel for the GW7902 boards.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 15:40:34 +08:00
Tim Harvey
450cec4f7d arm64: dts: imx8m*venice: add missing clock-names to pcie_phy
Define the missing clock-names property for the pcie_phy required by
the fsl,imx8-pcie-phy dt bindings.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 15:40:21 +08:00
Chanho Park
9882948322 arm64: dts: exynos: switch UFS clock node in ExynosAutov9
Use cmu_fsys's clock node instead of dummy UFS clock node.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/r/20220504075154.58819-13-chanho61.park@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2022-05-05 09:07:36 +02:00
Chanho Park
4c882968d4 arm64: dts: exynos: switch USI clocks in ExynosAutov9
Use CMU clock nodes instead of dummy fixed-rate-clock.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/r/20220504075154.58819-12-chanho61.park@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2022-05-05 09:07:07 +02:00
Chanho Park
5394461a31 arm64: dts: exynos: add initial CMU clock nodes in ExynosAutov9
Add cmu_top, cmu_busmc, cmu_core, cmu_fsys and peric0/c1/s clock nodes.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/r/20220504075154.58819-11-chanho61.park@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2022-05-05 09:06:59 +02:00
Tim Harvey
bf198e2e91 arm64: dts: imx8mm-venice-gw7902: fix pcie bindings
Update the pcie bindings to the correct dt bindings:
 pcie_phy:
  - use pcie0_refclk
  - add required clock-names
 pcie:
  - remove pcie_phy clock as it comes from phy driver

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 15:00:34 +08:00
Michael Walle
339c8beae8 arm64: dts: freescale: reduce the interrup-map-mask
Reduce the interrupt-map-mask of the external interrupt controller to
0xf to align with the devicetree schema.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 11:55:55 +08:00
Adam Ford
5446ff1a67 arm64: dts: imx8mn-beacon: Enable RTS-CTS on UART3
There is a header for a DB9 serial port, but any attempts to use
hardware handshaking fail.  Enable RTS and CTS pin muxing and enable
handshaking in the uart node.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 11:53:28 +08:00
Adam Ford
4ce01ce36d arm64: dts: imx8mm-beacon: Enable RTS-CTS on UART3
There is a header for a DB9 serial port, but any attempts to use
hardware handshaking fail.  Enable RTS and CTS pin muxing and enable
handshaking in the uart node.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 11:53:20 +08:00
Marek Vasut
42c1a6f62e arm64: dts: imx8mm: Use 100 kHz I2C2 on Data Modul i.MX8M Mini eDM SBC
The I2C2 has SMBus device SMSC USB2514Bi connected to it, the device is
capable of up to 100 kHz operation. Reduce the bus frequency to 100 kHz
to guarantee this I2C device can work correctly.

Fixes: 583f24ae42 ("arm64: dts: imx8mm: Add support for Data Modul i.MX8M Mini eDM SBC")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: NXP Linux Team <linux-imx@nxp.com>
To: linux-arm-kernel@lists.infradead.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 11:51:25 +08:00
Marek Vasut
13305aa536 arm64: dts: imx8mm: Disable USB2 OC on Data Modul i.MX8M Mini eDM SBC
The USB2 port has USB Hub permanently connected to it, disable OC
to avoid getting false OC indication.

Fixes: 583f24ae42 ("arm64: dts: imx8mm: Add support for Data Modul i.MX8M Mini eDM SBC")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: NXP Linux Team <linux-imx@nxp.com>
To: linux-arm-kernel@lists.infradead.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 11:51:16 +08:00
Marek Vasut
13e4e43a19 arm64: dts: imx8mm: Add CPLD on MX8Menlo board
The CPLD on MX8Menlo board is used to operate custom hardware,
the CPLD content is compatible with previous M53Menlo CPLD,
add the bindings.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: devicetree@vger.kernel.org
To: linux-arm-kernel@lists.infradead.org
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 11:47:43 +08:00
Fabio Estevam
080d681bf3 arm64: defconfig: Enable the WM8524 codec driver
imx8mn-evk has a WM8524 codec.

Enable the WM8524 codec driver so that audio can be functional
on this board.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 10:18:47 +08:00
Fabio Estevam
dab98061d7 arm64: dts: imx8mq-kontron-pitx-imx8m: Use the standard 'uart-has-rtscts'
The usage of the 'fsl,uart-has-rtscts' property is deprecated.

Use the standard 'uart-has-rtscts' instead.

Cc: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-By: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 10:13:14 +08:00
Fabio Estevam
83b41ad1dc arm64: dts: imx8mp-verdin: Use the standard 'uart-has-rtscts'
The usage of the 'fsl,uart-has-rtscts' property is deprecated.

Use the standard 'uart-has-rtscts' instead.

Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 10:12:58 +08:00
Paul Elder
29f440a7bd arm64: dts: imx8mp: Add MEDIA_BLK_CTRL
Add a DT node for the MEDIA_BLK_CTRL, which provides power domains for
the camera and display devices.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 09:34:33 +08:00
Laurent Pinchart
9d89189d52 arm64: dts: imx8mp: Add MEDIAMIX power domains
Add the power domains related to the MEDIAMIX to the GPC.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 09:32:55 +08:00
Lucas Stach
2ae42e0c0b arm64: dts: imx8mp: add HSIO power-domains
This adds the GPC and HSIO blk-ctrl nodes providing power control for
the high-speed (USB and PCIe) IOs.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 09:32:02 +08:00
Manoj Sai
aec8ad34f7 arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit
Genaral features:
- LCD 7" C.Touch
- microSD slot
- Ethernet 1Gb
- Wifi/BT
- 2x LVDS Full HD interfaces
- 3x USB 2.0
- 1x USB 3.0
- HDMI Out
- Plus PCIe
- MIPI CSI
- 2x CAN
- Audio Out

i.Core MX8M Plus is an EDIMM SoM based on NXP i.MX8M Plus from Engicam.

i.Core MX8M Plus needs to mount on top of this Evaluation board for
creating complete i.Core MX8M Plus EDIMM2.2 Starter Kit.

Add support for it.

Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Signed-off-by: Matteo Lisi <matteo.lisi@engicam.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 08:57:02 +08:00
Manoj Sai
eefe06b295 arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus SoM
i.Core MX8M Plus is an EDIMM SoM based on NXP i.MX8M Plus
from Engicam.

General features:
- NXP i.MX8M Plus
- Up to 4GB LDDR4
- 8 eMMC
- Gigabit Ethernet
- USB 3.0, 2.0 Host/OTG
- PCIe 3.0 interface
- I2S
- LVDS
- rest of i.MX8M Plus features

i.Core MX8M Plus needs to mount on top of Engicam baseboards
for creating complete platform solutions.

Add support for it.

Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Signed-off-by: Matteo Lisi <matteo.lisi@engicam.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 08:56:33 +08:00
Li Yang
e55264f3d7 arm64: dts: freescale: update ifc node name to be memory-controller
Update the node name to be align with updated DT binding.  But be
noted that u-boot for ls1088a used the ifc node name to disable ifc-nor
node when the SoC is configured to use QSPI.  The u-boot has been
updated to use the latest name but the change could break
compatibility with older u-boot for ls1088a.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 08:49:00 +08:00
Li Yang
fefbc00219 arm64: dts: remove "simple-bus" compatible from ifc node
The binding of ifc device has been updated.  Update dts to match
accordingly.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-05-05 08:48:50 +08:00
Tong Tiangen
921d161f15 arm64: fix types in copy_highpage()
In copy_highpage() the `kto` and `kfrom` local variables are pointers to
struct page, but these are used to hold arbitrary pointers to kernel memory
. Each call to page_address() returns a void pointer to memory associated
with the relevant page, and copy_page() expects void pointers to this
memory.

This inconsistency was introduced in commit 2563776b41 ("arm64: mte:
Tags-aware copy_{user_,}highpage() implementations") and while this
doesn't appear to be harmful in practice it is clearly wrong.

Correct this by making `kto` and `kfrom` void pointers.

Fixes: 2563776b41 ("arm64: mte: Tags-aware copy_{user_,}highpage() implementations")
Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Link: https://lore.kernel.org/r/20220420030418.3189040-3-tongtiangen@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 20:00:13 +01:00
Mark Brown
7a41a97b65 arm64/sysreg: Generate definitions for SCTLR_EL1
Automatically generate register definitions for SCTLR_EL1. No functional
change.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220503170233.507788-13-broonie@kernel.org
[catalin.marinas@arm.com: fix the SCTLR_EL1 encoding]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 18:56:50 +01:00
Alexandru Elisei
325031d4f3 KVM: arm64: Print emulated register table name when it is unsorted
When a sysreg table entry is out-of-order, KVM attempts to print the
address of the table:

[    0.143911] kvm [1]: sys_reg table (____ptrval____) out of order (1)

Printing the name of the table instead of a pointer is more helpful in this
case. The message has also been slightly tweaked to be point out the
offending entry (and to match the missing reset error message):

[    0.143891] kvm [1]: sys_reg table sys_reg_descs+0x50/0x7490 entry 1 out of order

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220428103405.70884-3-alexandru.elisei@arm.com
2022-05-04 17:52:56 +01:00
Alexandru Elisei
f1f0c0cfea KVM: arm64: Don't BUG_ON() if emulated register table is unsorted
To emulate a register access, KVM uses a table of registers sorted by
register encoding to speed up queries using binary search.

When Linux boots, KVM checks that the table is sorted and uses a BUG_ON()
statement to let the user know if it's not. The unfortunate side effect is
that an unsorted sysreg table brings down the whole kernel, not just KVM,
even though the rest of the kernel can function just fine without KVM. To
make matters worse, on machines which lack a serial console, the user is
left pondering why the machine is taking so long to boot.

Improve this situation by returning an error from kvm_arch_init() if the
sysreg tables are not in the correct order. The machine is still very much
usable for the user, with the exception of virtualization, who can now
easily determine what went wrong.

A minor typo has also been corrected in the check_sysreg_table() function.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220428103405.70884-2-alexandru.elisei@arm.com
2022-05-04 17:52:50 +01:00
Katherine Perez
aadc48f7c4 arm64: dts: qcom: sm8350-duo2: enable battery charger
Enable the relevant qup and I2C nodes to enable the battery charger.

Signed-off-by: Katherine Perez <kaperez@linux.microsoft.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211207231736.1762503-2-kaperez@linux.microsoft.com
2022-05-04 11:41:56 -05:00
Satya Priya
82096cc644 arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2
Enable pm8350c pmic pwm support for backlight on sc7280-idp2.

Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1645509309-16142-5-git-send-email-quic_c_skakit@quicinc.com
2022-05-04 11:22:29 -05:00
Satya Priya
5be66d2dc8 arm64: dts: qcom: pm8350c: Add pwm support
Add pwm support for PM8350C pmic.

Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1645509309-16142-4-git-send-email-quic_c_skakit@quicinc.com
2022-05-04 11:22:29 -05:00
Hector Martin
5028fbad2d arm64: Set ARCH_NR_GPIO to 2048 for ARCH_APPLE
We're already running into the 512 GPIO limit on t600[01] depending on
how many SMC GPIOs we allocate, and a 2-die version could double that.
Let's make it 2K to be safe for now.

Signed-off-by: Hector Martin <marcan@marcan.st>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220502091427.28416-1-marcan@marcan.st
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 16:33:48 +01:00
Daniel Thompson
4efc851c36 irqchip/exiu: Fix acknowledgment of edge triggered interrupts
Currently the EXIU uses the fasteoi interrupt flow that is configured by
it's parent (irq-gic-v3.c). With this flow the only chance to clear the
interrupt request happens during .irq_eoi() and (obviously) this happens
after the interrupt handler has run. EXIU requires edge triggered
interrupts to be acked prior to interrupt handling. Without this we
risk incorrect interrupt dismissal when a new interrupt is delivered
after the handler reads and acknowledges the peripheral but before the
irq_eoi() takes place.

Fix this by clearing the interrupt request from .irq_ack() if we are
configured for edge triggered interrupts. This requires adopting the
fasteoi-ack flow instead of the fasteoi to ensure the ack gets called.

These changes have been tested using the power button on a
Developerbox/SC2A11 combined with some hackery in gpio-keys so I can
play with the different trigger mode [and an mdelay(500) so I can
can check what happens on a double click in both modes].

Fixes: 706cffc1b9 ("irqchip/exiu: Add support for Socionext Synquacer EXIU controller")
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220503134541.2566457-1-daniel.thompson@linaro.org
2022-05-04 16:33:17 +01:00
Mark Brown
41fde73506 arm64/sysreg: Generate definitions for TTBRn_EL1
Automatically generate definitions for accessing the TTBRn_EL1 registers,
no functional change.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220503170233.507788-12-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:28 +01:00
Mark Brown
e33bb6461c arm64/sysreg: Generate definitions for ID_AA64ISAR0_EL1
Remove the manual definitions for ID_AA64ISAR0_EL1 in favour of automatic
generation. There should be no functional change. The only notable change
is that 27:24 TME is defined rather than RES0 reflecting DDI0487H.a.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220503170233.507788-11-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:28 +01:00
Mark Brown
c07d8017bc arm64/sysreg: Enable automatic generation of system register definitions
Now that we have a script for generating system registers hook it up to the
build system similarly to cpucaps. Since we don't currently have any actual
register information in the input file this should produce no change in the
built kernel. For ease of review the register information will be converted
in separate patches.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220503170233.507788-10-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:28 +01:00
Mark Rutland
66847e0618 arm64: Add sysreg header generation scripting
The arm64 kernel requires some metadata for each system register it may
need to access. Currently we have:

* A SYS_<regname> definition which sorresponds to a sys_reg() macro.
  This is used both to look up a sysreg by encoding (e.g. in KVM), and
  also to generate code to access a sysreg where the assembler is
  unaware of the specific sysreg encoding.

  Where assemblers support the S3_<op1>_C<crn>_C<crm>_<op2> syntax for
  system registers, we could use this rather than manually assembling
  the instructions. However, we don't have consistent definitions for
  these and we currently still need to handle toolchains that lack this
  feature.

* A set of <regname>_<fieldname>_SHIFT and <regname>_<fieldname>_MASK
  definitions, which can be used to extract fields from the register, or
  to construct a register from a set of fields.

  These do not follow the convention used by <linux/bitfield.h>, and the
  masks are not shifted into place, preventing their use in FIELD_PREP()
  and FIELD_GET(). We require the SHIFT definitions for inline assembly
  (and WIDTH definitions would be helpful for UBFX/SBFX), so we cannot
  only define a shifted MASK. Defining a SHIFT, WIDTH, shifted MASK and
  unshifted MASK is tedious and error-prone and life is much easier when
  they can be relied up to exist when writing code.

* A set of <regname>_<fieldname>_<valname> definitions for each
  enumerated value a field may hold. These are used when identifying the
  presence of features.

Atop of this, other code has to build up metadata at runtime (e.g. the
sets of RES0/RES1 bits in a register).

This patch adds scripting so that we can have an easier-to-manage
canonical representation of this metadata, from which we can generate
all the definitions necessary for various use-cases, e.g.

| #define REG_ID_AA64ISAR0_EL1                    S3_0_C0_C6_0
| #define SYS_ID_AA64ISAR0_EL1                    sys_reg(3, 0, 0, 6, 0)
| #define SYS_ID_AA64ISAR0_EL1_Op0                3
| #define SYS_ID_AA64ISAR0_EL1_Op1                0
| #define SYS_ID_AA64ISAR0_EL1_CRn                0
| #define SYS_ID_AA64ISAR0_EL1_CRm                6
| #define SYS_ID_AA64ISAR0_EL1_Op2                0

| #define ID_AA64ISAR0_EL1_RNDR                   GENMASK(63, 60)
| #define ID_AA64ISAR0_EL1_RNDR_MASK              GENMASK(63, 60)
| #define ID_AA64ISAR0_EL1_RNDR_SHIFT             60
| #define ID_AA64ISAR0_EL1_RNDR_WIDTH             4
| #define ID_AA64ISAR0_EL1_RNDR_NI                UL(0b0000)
| #define ID_AA64ISAR0_EL1_RNDR_IMP               UL(0b0001)

The script requires that all bits in the register be specified and that
there be no overlapping fields. This helps the script spot errors in the
input but means that the few registers which change layout at runtime
depending on things like virtualisation settings will need some manual
handling. No actual register conversions are done here but a header for
the register data with some documention of the format is provided.

For cases where multiple registers share a layout (eg, when identical
controls are provided at multiple ELs) the register fields can be
defined once and referenced from the actual registers, currently we do
not generate actual defines for the individual registers.

At the moment this is only intended to express metadata from the
architecture, and does not handle policy imposed by the kernel, such as
values exposed to userspace or VMs. In future this could be extended to
express such information.

This script was mostly written by Mark Rutland but has been extended by
Mark Brown to improve validation of input and better integrate with the
kernel.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Co-Developed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220503170233.507788-9-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:28 +01:00
Mark Brown
0eda2ec489 arm64/sysreg: Standardise ID_AA64ISAR0_EL1 macro names
The macros for accessing fields in ID_AA64ISAR0_EL1 omit the _EL1 from the
name of the register. In preparation for converting this register to be
automatically generated update the names to include an _EL1, there should
be no functional change.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220503170233.507788-8-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:28 +01:00
Mark Brown
6329eb543d arm64: Update name of ID_AA64ISAR0_EL1_ATOMIC to reflect ARM
The architecture reference manual refers to the field in bits 23:20 of
ID_AA64ISAR0_EL1 with the name "atomic" but the kernel defines for this
bitfield use the name "atomics". Bring the two into sync to make it easier
to cross reference with the specification.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220503170233.507788-7-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:28 +01:00
Mark Brown
56eb621b8a arm64/sysreg: Define bits for previously RES1 fields in SCTLR_EL1
In older revisions of the architecture SCTLR_EL1 contained several RES1
fields but in DDI0487H.a these now all have assigned functions. In
preparation for automatically generating sysreg.h provide explicit
definitions for all these bits and use them in the INIT_SCTLR_EL1_ macros
where _RES1 was previously used.

There should be no functional change.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220503170233.507788-6-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:28 +01:00
Mark Brown
e4e6a9d559 arm64/sysreg: Rename SCTLR_EL1_NTWE/TWI to SCTLR_EL1_nTWE/TWI
We already use lower case in some defines in sysreg.h, for consistency with
the architecture definition do so for SCTLR_EL1.nTWE and SCTLR_EL1.nTWI.

No functional change.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220503170233.507788-5-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:27 +01:00
Mark Brown
bc249e37b9 arm64/mte: Make TCF field values and naming more standard
In preparation for automatic generation of the defines for system registers
make the values used for the enumeration in SCTLR_ELx.TCF suitable for use
with the newly defined SYS_FIELD_PREP_ENUM helper, removing the shift from
the define and using the helper to generate it on use instead. Since we
only ever interact with this field in EL1 and in preparation for generation
of the defines also rename from SCTLR_ELx to SCTLR_EL1. SCTLR_EL2 is not
quite the same as SCTLR_EL1 so the conversion does not share the field
definitions.

There should be no functional change from this patch.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220503170233.507788-4-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:27 +01:00
Mark Brown
96f101a9ea arm64/mte: Make TCF0 naming and field values more standard
In preparation for automatic generation of SCTLR_EL1 register definitions
make the macros used to define SCTLR_EL1.TCF0 and the enumeration values it
has more standard so they can be used with FIELD_PREP() via the newly
defined SYS_FIELD_PREP_ helpers.

Since the field also exists in SCTLR_EL2 with the same values also rename
the macros to SCTLR_ELx rather than SCTLR_EL1.

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

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com
Link: https://lore.kernel.org/r/20220503170233.507788-3-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:27 +01:00
Mark Brown
e6a6b34f97 arm64/sysreg: Introduce helpers for access to sysreg fields
The macros we define for the bitfields within sysregs have very regular
names, especially once we switch to automatic generation of those macros.
Take advantage of this to define wrappers around FIELD_PREP() allowing
us to simplify setting values in fields either numerically

   SYS_FIELD_PREP(SCTLR_EL1, TCF0, 0x0)

or using the values of enumerations within the fields

   SYS_FIELD_PREP_ENUM(SCTLR_EL1, TCF0, ASYMM)

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220503170233.507788-2-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 15:30:27 +01:00
Marc Zyngier
49a1a2c70a KVM: arm64: vgic-v3: Advertise GICR_CTLR.{IR, CES} as a new GICD_IIDR revision
Since adversising GICR_CTLR.{IC,CES} is directly observable from
a guest, we need to make it selectable from userspace.

For that, bump the default GICD_IIDR revision and let userspace
downgrade it to the previous default. For GICv2, the two distributor
revisions are strictly equivalent.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220405182327.205520-5-maz@kernel.org
2022-05-04 14:09:53 +01:00
Marc Zyngier
4645d11f4a KVM: arm64: vgic-v3: Implement MMIO-based LPI invalidation
Since GICv4.1, it has become legal for an implementation to advertise
GICR_{INVLPIR,INVALLR,SYNCR} while having an ITS, allowing for a more
efficient invalidation scheme (no guest command queue contention when
multiple CPUs are generating invalidations).

Provide the invalidation registers as a primitive to their ITS
counterpart. Note that we don't advertise them to the guest yet
(the architecture allows an implementation to do this).

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Oliver Upton <oupton@google.com>
Link: https://lore.kernel.org/r/20220405182327.205520-4-maz@kernel.org
2022-05-04 14:09:53 +01:00
Marc Zyngier
94828468a6 KVM: arm64: vgic-v3: Expose GICR_CTLR.RWP when disabling LPIs
When disabling LPIs, a guest needs to poll GICR_CTLR.RWP in order
to be sure that the write has taken effect. We so far reported it
as 0, as we didn't advertise that LPIs could be turned off the
first place.

Start tracking this state during which LPIs are being disabled,
and expose the 'in progress' state via the RWP bit.

We also take this opportunity to disallow enabling LPIs and programming
GICR_{PEND,PROP}BASER while LPI disabling is in progress, as allowed by
the architecture (UNPRED behaviour).

We don't advertise the feature to the guest yet (which is allowed by
the architecture).

Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220405182327.205520-3-maz@kernel.org
2022-05-04 14:09:53 +01:00
Michal Orzel
48e6f22e25 arm64: cputype: Avoid overflow using MIDR_IMPLEMENTOR_MASK
Value of macro MIDR_IMPLEMENTOR_MASK exceeds the range of integer
and can lead to overflow. Currently there is no issue as it is used
in expressions implicitly casting it to u32. To avoid possible
problems, fix the macro.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Link: https://lore.kernel.org/r/20220426070603.56031-1-michal.orzel@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-05-04 11:52:15 +01:00
Diogo Ivo
0017f2c856 arm64: tegra: Add missing DFLL reset on Tegra210
Commit 4782c0a5dd ("clk: tegra: Don't deassert reset on enabling
clocks") removed deassertion of reset lines when enabling peripheral
clocks. This breaks the initialization of the DFLL driver which relied
on this behaviour.

In order to be able to fix this, add the corresponding reset to the DT.
Tested on Google Pixel C.

Cc: stable@vger.kernel.org
Fixes: 4782c0a5dd ("clk: tegra: Don't deassert reset on enabling clocks")
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-05-04 11:22:43 +02:00
Marc Zyngier
d25f30fe41 Merge branch kvm-arm64/aarch32-idreg-trap into kvmarm-master/next
* kvm-arm64/aarch32-idreg-trap:
  : .
  : Add trapping/sanitising infrastructure for AArch32 systen registers,
  : allowing more control over what we actually expose (such as the PMU).
  :
  : Patches courtesy of Oliver and Alexandru.
  : .
  KVM: arm64: Fix new instances of 32bit ESRs
  KVM: arm64: Hide AArch32 PMU registers when not available
  KVM: arm64: Start trapping ID registers for 32 bit guests
  KVM: arm64: Plumb cp10 ID traps through the AArch64 sysreg handler
  KVM: arm64: Wire up CP15 feature registers to their AArch64 equivalents
  KVM: arm64: Don't write to Rt unless sys_reg emulation succeeds
  KVM: arm64: Return a bool from emulate_cp()

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-05-04 09:42:45 +01:00
Marc Zyngier
904cabf471 Merge branch kvm-arm64/hyp-stack-guard into kvmarm-master/next
* kvm-arm64/hyp-stack-guard:
  : .
  : Harden the EL2 stack by providing stack guards, courtesy of
  : Kalesh Singh.
  : .
  KVM: arm64: Symbolize the nVHE HYP addresses
  KVM: arm64: Detect and handle hypervisor stack overflows
  KVM: arm64: Add guard pages for pKVM (protected nVHE) hypervisor stack
  KVM: arm64: Add guard pages for KVM nVHE hypervisor stack
  KVM: arm64: Introduce pkvm_alloc_private_va_range()
  KVM: arm64: Introduce hyp_alloc_private_va_range()

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-05-04 09:42:37 +01:00
Marc Zyngier
b2c4caf331 Merge branch kvm-arm64/wfxt into kvmarm-master/next
* kvm-arm64/wfxt:
  : .
  : Add support for the WFET/WFIT instructions that provide the same
  : service as WFE/WFI, only with a timeout.
  : .
  KVM: arm64: Expose the WFXT feature to guests
  KVM: arm64: Offer early resume for non-blocking WFxT instructions
  KVM: arm64: Handle blocking WFIT instruction
  KVM: arm64: Introduce kvm_counter_compute_delta() helper
  KVM: arm64: Simplify kvm_cpu_has_pending_timer()
  arm64: Use WFxT for __delay() when possible
  arm64: Add wfet()/wfit() helpers
  arm64: Add HWCAP advertising FEAT_WFXT
  arm64: Add RV and RN fields for ESR_ELx_WFx_ISS
  arm64: Expand ESR_ELx_WFx_ISS_TI to match its ARMv8.7 definition

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-05-04 09:42:16 +01:00
Marc Zyngier
4b88524c47 Merge remote-tracking branch 'arm64/for-next/sme' into kvmarm-master/next
Merge arm64's SME branch to resolve conflicts with the WFxT branch.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-05-04 09:38:32 +01:00
Oliver Upton
bfbab44568 KVM: arm64: Implement PSCI SYSTEM_SUSPEND
ARM DEN0022D.b 5.19 "SYSTEM_SUSPEND" describes a PSCI call that allows
software to request that a system be placed in the deepest possible
low-power state. Effectively, software can use this to suspend itself to
RAM.

Unfortunately, there really is no good way to implement a system-wide
PSCI call in KVM. Any precondition checks done in the kernel will need
to be repeated by userspace since there is no good way to protect a
critical section that spans an exit to userspace. SYSTEM_RESET and
SYSTEM_OFF are equally plagued by this issue, although no users have
seemingly cared for the relatively long time these calls have been
supported.

The solution is to just make the whole implementation userspace's
problem. Introduce a new system event, KVM_SYSTEM_EVENT_SUSPEND, that
indicates to userspace a calling vCPU has invoked PSCI SYSTEM_SUSPEND.
Additionally, add a CAP to get buy-in from userspace for this new exit
type.

Only advertise the SYSTEM_SUSPEND PSCI call if userspace has opted in.
If a vCPU calls SYSTEM_SUSPEND, punt straight to userspace. Provide
explicit documentation of userspace's responsibilites for the exit and
point to the PSCI specification to describe the actual PSCI call.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220504032446.4133305-8-oupton@google.com
2022-05-04 09:28:45 +01:00
Oliver Upton
7b33a09d03 KVM: arm64: Add support for userspace to suspend a vCPU
Introduce a new MP state, KVM_MP_STATE_SUSPENDED, which indicates a vCPU
is in a suspended state. In the suspended state the vCPU will block
until a wakeup event (pending interrupt) is recognized.

Add a new system event type, KVM_SYSTEM_EVENT_WAKEUP, to indicate to
userspace that KVM has recognized one such wakeup event. It is the
responsibility of userspace to then make the vCPU runnable, or leave it
suspended until the next wakeup event.

Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220504032446.4133305-7-oupton@google.com
2022-05-04 09:28:45 +01:00
Oliver Upton
3fdd04592d KVM: arm64: Return a value from check_vcpu_requests()
A subsequent change to KVM will introduce a vCPU request that could
result in an exit to userspace. Change check_vcpu_requests() to return a
value and document the function. Unconditionally return 1 for now.

Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220504032446.4133305-6-oupton@google.com
2022-05-04 09:28:45 +01:00
Oliver Upton
1c6219e3fa KVM: arm64: Rename the KVM_REQ_SLEEP handler
The naming of the kvm_req_sleep function is confusing: the function
itself sleeps the vCPU, it does not request such an event. Rename the
function to make its purpose more clear.

No functional change intended.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220504032446.4133305-5-oupton@google.com
2022-05-04 09:28:45 +01:00
Oliver Upton
b171f9bbb1 KVM: arm64: Track vCPU power state using MP state values
A subsequent change to KVM will add support for additional power states.
Store the MP state by value rather than keeping track of it as a
boolean.

No functional change intended.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220504032446.4133305-4-oupton@google.com
2022-05-04 09:28:44 +01:00
Oliver Upton
1e5794295c KVM: arm64: Dedupe vCPU power off helpers
vcpu_power_off() and kvm_psci_vcpu_off() are equivalent; rename the
former and replace all callsites to the latter.

No functional change intended.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220504032446.4133305-3-oupton@google.com
2022-05-04 09:28:44 +01:00
Oliver Upton
5bc2cb95ad KVM: arm64: Don't depend on fallthrough to hide SYSTEM_RESET2
Depending on a fallthrough to the default case for hiding SYSTEM_RESET2
requires that any new case statements clean up the failure path for this
PSCI call.

Unhitch SYSTEM_RESET2 from the default case by setting val to
PSCI_RET_NOT_SUPPORTED outside of the switch statement. Apply the
cleanup to both the PSCI_1_1_FN_SYSTEM_RESET2 and
PSCI_1_0_FN_PSCI_FEATURES handlers.

No functional change intended.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220504032446.4133305-2-oupton@google.com
2022-05-04 09:28:44 +01:00
Krzysztof Kozlowski
8dba791a72 arm64: dts: broadcom: drop useless 'dma-channels/requests' properties
The pl330 DMA controller provides number of DMA channels and requests
through its registers, so duplicating this information (with a chance of
mistakes) in DTS is pointless.  Additionally the DTS used always wrong
property names which causes DT schema check failures - the bindings
documented 'dma-channels' and 'dma-requests' properties without leading
hash sign.

Reported-by: Rob Herring <robh@kernel.org>
Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220430121902.59895-6-krzysztof.kozlowski@linaro.org
2022-05-04 10:26:56 +02:00
Krzysztof Kozlowski
a93fbb0023 arm64: dts: stratix10/agilex: drop useless 'dma-channels/requests' properties
The pl330 DMA controller provides number of DMA channels and requests
through its registers, so duplicating this information (with a chance of
mistakes) in DTS is pointless.  Additionally the DTS used always wrong
property names which causes DT schema check failures - the bindings
documented 'dma-channels' and 'dma-requests' properties without leading
hash sign.

Reported-by: Rob Herring <robh@kernel.org>
Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220430121902.59895-4-krzysztof.kozlowski@linaro.org
2022-05-04 10:26:35 +02:00
Krzysztof Kozlowski
6745dbc731 arm64: dts: fsd: drop useless 'dma-channels/requests' properties
The pl330 DMA controller provides number of DMA channels and requests
through its registers, so duplicating this information (with a chance of
mistakes) in DTS is pointless.  Additionally the DTS used always wrong
property names which causes DT schema check failures - the bindings
documented 'dma-channels' and 'dma-requests' properties without leading
hash sign.

Reported-by: Rob Herring <robh@kernel.org>
Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220430121902.59895-10-krzysztof.kozlowski@linaro.org
2022-05-04 10:22:19 +02:00
Krzysztof Kozlowski
03e1d34d27 arm64: dts: exynos: drop useless 'dma-channels/requests' properties
The pl330 DMA controller provides number of DMA channels and requests
through its registers, so duplicating this information (with a chance of
mistakes) in DTS is pointless.  Additionally the DTS used always wrong
property names which causes DT schema check failures - the bindings
documented 'dma-channels' and 'dma-requests' properties without leading
hash sign.

Reported-by: Rob Herring <robh@kernel.org>
Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220430121902.59895-9-krzysztof.kozlowski@linaro.org
2022-05-04 10:21:46 +02:00
Krzysztof Kozlowski
f223095c6e arm64: dts: exynos: move XTCXO clock frequency to board in Exynos Auto v9
The external oscillator - XTCXO - is an input to the SoC.  It is defined
in the Exynos Auto v9 SoC DTSI, because all boards will provide it and
clock controller bindings expect it, however the actual frequency of the
clock should be determined by the board.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20220503092631.174713-1-krzysztof.kozlowski@linaro.org
2022-05-04 10:20:59 +02:00
Marc Zyngier
ee87a9bd65 KVM: arm64: Fix new instances of 32bit ESRs
Fix the new instances of ESR being described as a u32, now that
we consistently are using a u64 for this register.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-05-04 08:01:05 +01:00
Raghavendra Rao Ananta
b22216e1a6 KVM: arm64: Add vendor hypervisor firmware register
Introduce the firmware register to hold the vendor specific
hypervisor service calls (owner value 6) as a bitmap. The
bitmap represents the features that'll be enabled for the
guest, as configured by the user-space. Currently, this
includes support for KVM-vendor features along with
reading the UID, represented by bit-0, and Precision Time
Protocol (PTP), represented by bit-1.

Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
[maz: tidy-up bitmap values]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220502233853.1233742-5-rananta@google.com
2022-05-03 21:30:19 +01:00
Raghavendra Rao Ananta
428fd6788d KVM: arm64: Add standard hypervisor firmware register
Introduce the firmware register to hold the standard hypervisor
service calls (owner value 5) as a bitmap. The bitmap represents
the features that'll be enabled for the guest, as configured by
the user-space. Currently, this includes support only for
Paravirtualized time, represented by bit-0.

Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
[maz: tidy-up bitmap values]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220502233853.1233742-4-rananta@google.com
2022-05-03 21:30:19 +01:00
Raghavendra Rao Ananta
05714cab7d KVM: arm64: Setup a framework for hypercall bitmap firmware registers
KVM regularly introduces new hypercall services to the guests without
any consent from the userspace. This means, the guests can observe
hypercall services in and out as they migrate across various host
kernel versions. This could be a major problem if the guest
discovered a hypercall, started using it, and after getting migrated
to an older kernel realizes that it's no longer available. Depending
on how the guest handles the change, there's a potential chance that
the guest would just panic.

As a result, there's a need for the userspace to elect the services
that it wishes the guest to discover. It can elect these services
based on the kernels spread across its (migration) fleet. To remedy
this, extend the existing firmware pseudo-registers, such as
KVM_REG_ARM_PSCI_VERSION, but by creating a new COPROC register space
for all the hypercall services available.

These firmware registers are categorized based on the service call
owners, but unlike the existing firmware pseudo-registers, they hold
the features supported in the form of a bitmap.

During the VM initialization, the registers are set to upper-limit of
the features supported by the corresponding registers. It's expected
that the VMMs discover the features provided by each register via
GET_ONE_REG, and write back the desired values using SET_ONE_REG.
KVM allows this modification only until the VM has started.

Some of the standard features are not mapped to any bits of the
registers. But since they can recreate the original problem of
making it available without userspace's consent, they need to
be explicitly added to the case-list in
kvm_hvc_call_default_allowed(). Any function-id that's not enabled
via the bitmap, or not listed in kvm_hvc_call_default_allowed, will
be returned as SMCCC_RET_NOT_SUPPORTED to the guest.

Older userspace code can simply ignore the feature and the
hypercall services will be exposed unconditionally to the guests,
thus ensuring backward compatibility.

In this patch, the framework adds the register only for ARM's standard
secure services (owner value 4). Currently, this includes support only
for ARM True Random Number Generator (TRNG) service, with bit-0 of the
register representing mandatory features of v1.0. Other services are
momentarily added in the upcoming patches.

Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
[maz: reduced the scope of some helpers, tidy-up bitmap max values,
 dropped error-only fast path]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220502233853.1233742-3-rananta@google.com
2022-05-03 21:30:19 +01:00
Vijaya Krishna Nivarthi
3d0e375bae arm64: dts: qcom: sc7280-qcard: Configure CTS pin to bias-bus-hold for bluetooth
WLAN rail was leaking power during RBSC/sleep even after turning BT off.
Change active and sleep pinctrl configurations to handle same.

Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1650556567-4995-3-git-send-email-quic_vnivarth@quicinc.com
2022-05-03 14:06:45 -05:00
Vijaya Krishna Nivarthi
497b272759 arm64: dts: qcom: sc7280-idp: Configure CTS pin to bias-bus-hold for bluetooth
WLAN rail was leaking power during RBSC/sleep even after turning BT off.
Change active and sleep pinctrl configurations to handle same.

Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1650556567-4995-2-git-send-email-quic_vnivarth@quicinc.com
2022-05-03 14:06:45 -05:00
Stephen Boyd
067bc653b8 arm64: dts: qcom: sc7180: Remove ipa interconnect node
This device node is unused now that we've removed the driver that
consumed it in the kernel. Drop the unused node to save some space.

Cc: Alex Elder <elder@linaro.org>
Cc: Taniya Das <quic_tdas@quicinc.com>
Cc: Mike Tipton <quic_mdtipton@quicinc.com>
Cc: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Georgi Djakov <djakov@kernel.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220415005828.1980055-1-swboyd@chromium.org
2022-05-03 14:05:28 -05:00
Harald Geyer
50612cf9e0 arm64: dts: allwinner: teres-i: Add GPIO port regulators
Allwinner A64 SoC has separate supplies for PC, PD, PE, PG and PL.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220430191009.73946-1-harald@ccbib.org
2022-05-03 19:00:24 +02:00
Greg Kroah-Hartman
b9c92fb4aa Linux 5.18-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmJu9FYeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGAyEH/16xtJSpLmLwrQzG
 o+4ToQxSQ+/9UHyu0RTEvHg2THm9/8emtIuYyc/5FgdoWctcSa3AaDcveWmuWmkS
 KYcdhfJsaEqjNHS3OPYXN84fmo9Hel7263shu5+IYmP/sN0DfQp6UWTryX1q4B3Q
 4Pdutkuq63Uwd8nBZ5LXQBumaBrmkkuMgWEdT4+6FOo1mPzwdIGBxCuz1UsNNl5k
 chLWxkQfe2eqgWbYJrgCQfrVdORXVtoU2fGilZUNrHRVGkkldXkkz5clJfapyZD3
 odmZCEbrE4GPKgZwCmDERMfD1hzhZDtYKiHfOQ506szH5ykJjPBcOjHed7dA60eB
 J3+wdek=
 =39Ca
 -----END PGP SIGNATURE-----

Merge 5.18-rc5 into usb-next

We need the USB fixes in here, and this resolves a merge issue in
drivers/usb/dwc3/drd.c

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-03 16:35:26 +02:00
Raghavendra Rao Ananta
85fbe08e4d KVM: arm64: Factor out firmware register handling from psci.c
Common hypercall firmware register handing is currently employed
by psci.c. Since the upcoming patches add more of these registers,
it's better to move the generic handling to hypercall.c for a
cleaner presentation.

While we are at it, collect all the firmware registers under
fw_reg_ids[] to help implement kvm_arm_get_fw_num_regs() and
kvm_arm_copy_fw_reg_indices() in a generic way. Also, define
KVM_REG_FEATURE_LEVEL_MASK using a GENMASK instead.

No functional change intended.

Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
[maz: fixed KVM_REG_FEATURE_LEVEL_MASK]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220502233853.1233742-2-rananta@google.com
2022-05-03 14:48:54 +01:00
Arnd Bergmann
8b86fc3343 Amlogic ARM64 DT changes for v5.19:
- DTS makefile alpsa sort
 - align SPI NOR node name with dtschema
 - add support for S4 power domain, gpio_intc, pinctrl
 - updates and fixes for JetHub D1/H1 boards
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmJv1dkACgkQd9zb2sjI
 SdEEihAAhXD6/rsbuaUyxVhNfa+9DXtzvU7Q8hon3+v6eqc1wvsfnLJ5U4hToF8F
 lR2h9NQRB7Kg2yp/k4rozNCpN4CA+KAuZh813rGXkcl30a6MojChmmb8vp5ZOMLo
 ISvEQ+YfVBqF6qPPvCvG9zqafoDlzDlWI/lxA6FaF2gnMRrfN/okhsJBBt8kiXbi
 PadmVha6mnpiQxgTmMb4lwivOcro5mMX3+zCktdde4c+F90dEraTcHRxK2Wzar9r
 f5RedHqro4CqaeQ40ewBxFVTVO34RVFgB9bKme0Bpzqa96rAgufCId/DRJyg4PvA
 AHxpxESmV694ademhf87A24G9M42L7kFJJwdz6Gg41X0IahdSxO+brg1AOUZ0/Tc
 k6pfRzP0KyeKj3eq2xUK9IbAuFYIo+Yq+oP9CtD56uAKWYbMR7XvJagTRgP5KYYb
 hwVmTB37uNsSfyPviSwTd/FwwNKhJax+Waaln0prPsCSHqwzmRfbSh7iwVXxU7XZ
 Fbw6BqOYN1DcUP4+iQ4f6dYlDCN3hRKA8OTarYhWERjs+g+Z3EZPPRwZyz3uDSMA
 hc4B1/VLM12O7Hx8eq+B0x4Y9hMdpGDRHiHFS7nGToevCRdckQcnd9lTrSiBsbz6
 sdbXjlkbd0Oh47iHaZaq8OojBwiwx4uj4SUpJxBocg3PmQpJQVg=
 =f61M
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJxLd4ACgkQmmx57+YA
 GNk8Lw/9GodWBolHtaPqg2/85EmM7z32NW3ZnaUwYC/pXINBpHtjNQd4XFHQTBz9
 aDydGwnwIPKnjuQh3at1VtysB+AmkKpx59LXhzK2/IoHGgR/EWWEsuhu7sUrzbrl
 OzP/OItD8zKJmk3/8KXkyvhCeUEM030Y0XDmgTAm1/HnuUThtcVLadzaJ0hxrMvz
 iXOVi+VX+V2SQjNrk944UszHuVevvgf1n4wns1+Kpvb6QtvIjZL5SDQxeRw/oOBE
 R8JYukQf9ffkv79bfVBKf2/bb1nN6bYhsNljWB7u5AVyCad9Q2Bjqvwj6kqwCw5d
 5wFR8WqI9jCEBHMV0Mn468Ummk+53nkoppZSuGbeOGWiuzkkAwxAWI1X7g+r7mzD
 lbZRzit1Are0Vgrz4CAr9igxEOhn0HKkS9Y4wft0yqgw/sKx1JIQHZbDTcSWbJha
 mCrMBvenwyRcY1W3Az18APXLxNrWW98ielPV7OencFDvj8ZM0CDJsQwwe6mNVLQK
 xRYmTqiE0nGGtRdz9mktss5XKQ92gs8q5r20NsbBPy2S37MStpaR6eCO9qGiFo6c
 OdMR+kWHcECHaYASsqxUV/vTWyKMNM2Y1HU4vOZAsv9C/IAWfys6q0c87k3Tjdjs
 I9k5vmqfrQVPvkQfcUOoPCgeOR/v1X2y4xv2sZ3q60twV53/OK0=
 =zZTK
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-arm64-dt-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/dt

Amlogic ARM64 DT changes for v5.19:
- DTS makefile alpsa sort
- align SPI NOR node name with dtschema
- add support for S4 power domain, gpio_intc, pinctrl
- updates and fixes for JetHub D1/H1 boards

* tag 'amlogic-arm64-dt-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  arm64: dts: meson: alpa sort the board Makefile
  arm64: dts: meson: align SPI NOR node name with dtschema
  arm64: dts: add support for S4 power domain controller
  arm64: dts: meson-s4: add gpio_intc node
  arm64: dts: meson-s4: add pinctrl node
  arm64: meson: update WiFi SDIO in dts for JetHub D1
  arm64: meson: update SDIO voltage in dts for JetHub D1
  arm64: meson: dts: update serial alias in dts for JetHub D1
  arm64: meson: add dts bluetooth node for JetHub H1

Link: https://lore.kernel.org/r/1e5179ab-2d92-0d64-c57b-e002ec2f0806@baylibre.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-03 15:27:58 +02:00
Arnd Bergmann
70a89009f7 Renesas ARM DT updates for v5.19
- ADC, SDHI, CAN-FD, I2C, QSPI, timer, watchdog, sound, USB, SPI, GPU,
     cpufreq, and thermal support for the RZ/V2L SoC, and the RZ/V2L
     SMARC EVK development board,
   - USB, I2C, Audio, NOR Flash, timer, SPI support for RZ/G2LC SMARC EVK
     development board,
   - Can-FD support for the R-Car M30W+ and V3U SoCs, and the Falcon
     development board,
   - I2C and GPIO support for the R-Car S4-8 SoC,
   - I2C EEPROM support for the Falcon development board,
   - SPI Multi I/O Bus Controller (RPC-IF) support for the R-Car H3,
     M3-W(+), M3-N, E3, and D3 SoCs,
   - RPC HyperFlash support for the Draak, Ebisu, Salvator-X(S), and ULCB
     development boards,
   - Initial support (UART, DMAC, pin control, SDHI, eMMC, Ethernet) for
     the RZ/G2UL SoC, and the RZ/G2UL SMARC EVK development board,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCYmJ+7gAKCRCKwlD9ZEnx
 cE5hAQDebyQdMMpgRgOC4ES3leIRrMJSmOAjrQcQjrTUJ6WYNgD9Gj8USqudA/By
 Toz6dahFUSI0MDbgqnBjiqMGbEnbNww=
 =xap2
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJxLPkACgkQmmx57+YA
 GNmqrBAAhF9gE+g7S+lSKSsf5MOgy8l4llsohMVrZbvMQwIt7wR+uNuZE8i8Cx4s
 f8Mm8h6s9mprEXD7QitV7PKAfDoiJ642OZc2aNns4B82jY2JDLzigJhw+Xx2/La/
 1DycdpnD1UkNgrwVBGpmgfTs4Q455HB5J5X3ypcP4TN0fWxmfkN4yEvaiHxGjuoi
 a0VowBrlWAfYE6gaF5d5QnWS6TMp8YYSrJsl+4+IQKO1kbaiHXUuu/Ipd8AXxe5/
 BaWz0YLLPwI/MU6za9F2IpXq+aT5/e34QF3wjtg45YPNE39RsL+hpZbdoDYLBrfT
 9HCvk5cv4emF4fcr/NSjQCpzN/bn2amJEbDovDIYek3mpiM7rSRFDw15NGbe8E2K
 38gSZugURkufABc/dUHgXy1Ja72mp3xfk++FQ99Tn1JHcXvyooZ+HYDm0LA7F6tZ
 oQtiUUP3SQMvdlCFUP0NezJjR/MMx3G6VRAmLcYcdcQddUbvfmB2RSsi3e34QOgu
 rbOqwa3FImDJi4N42aOKfmoEDz3dMByV1uSv0NfWOAR8h9silszZmMLIm3XNkwi8
 EgwL/cUXPtxIr1S3+A2+IzR2HsTqkbL/smSyIu1gRIMHQBJLVnM5wxmj71U+yA3C
 tc+vqAEuqOEmGuKiGvgaDn4LDXS/2C3yEDvp3x/sv/XLxA5jFZQ=
 =SiTm
 -----END PGP SIGNATURE-----

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

Renesas ARM DT updates for v5.19

  - ADC, SDHI, CAN-FD, I2C, QSPI, timer, watchdog, sound, USB, SPI, GPU,
    cpufreq, and thermal support for the RZ/V2L SoC, and the RZ/V2L
    SMARC EVK development board,
  - USB, I2C, Audio, NOR Flash, timer, SPI support for RZ/G2LC SMARC EVK
    development board,
  - Can-FD support for the R-Car M30W+ and V3U SoCs, and the Falcon
    development board,
  - I2C and GPIO support for the R-Car S4-8 SoC,
  - I2C EEPROM support for the Falcon development board,
  - SPI Multi I/O Bus Controller (RPC-IF) support for the R-Car H3,
    M3-W(+), M3-N, E3, and D3 SoCs,
  - RPC HyperFlash support for the Draak, Ebisu, Salvator-X(S), and ULCB
    development boards,
  - Initial support (UART, DMAC, pin control, SDHI, eMMC, Ethernet) for
    the RZ/G2UL SoC, and the RZ/G2UL SMARC EVK development board,
  - Miscellaneous fixes and improvements.

* tag 'renesas-arm-dt-for-v5.19-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (55 commits)
  ARM: dts: r9a06g032: Drop "arm,cortex-a7-timer" from timer node
  arm64: dts: renesas: r8a779f0: Add GPIO nodes
  arm64: dts: renesas: rzg2ul-smarc-som: Enable Ethernet on SMARC platform
  arm64: dts: renesas: rzg2ul-smarc-som: Enable eMMC on SMARC platform
  arm64: dts: renesas: rzg2ul-smarc: Enable microSD on SMARC platform
  arm64: dts: renesas: r9a07g043: Add GbEthernet nodes
  arm64: dts: renesas: r9a07g043: Add SDHI nodes
  arm64: dts: renesas: rzg2ul-smarc: Add scif0 and audio clk pins
  arm64: dts: renesas: r9a07g043: Fillup the pinctrl stub node
  arm64: dts: renesas: Add initial device tree for RZ/G2UL Type-1 SMARC EVK
  arm64: dts: renesas: Add initial DTSI for RZ/G2UL SoC
  arm64: dts: renesas: rzg2l-smarc: Move gpios property of vccq_sdhi1 from common dtsi
  arm64: dts: renesas: rzg2lc-smarc: Enable RSPI1 on carrier board
  arm64: dts: renesas: ulcb: Add RPC HyperFlash device node
  arm64: dts: renesas: salvator-common: Add RPC HyperFlash device node
  arm64: dts: renesas: ebisu: Add RPC HyperFlash device node
  arm64: dts: renesas: draak: Add RPC HyperFlash device node
  arm64: dts: renesas: rcar-gen3: Add RPC device nodes
  arm64: dts: renesas: rcar-gen4: Add interrupt properties to watchdog nodes
  arm64: dts: renesas: rzg2: Add interrupt properties to watchdog nodes
  ...

Link: https://lore.kernel.org/r/cover.1650638505.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-03 15:24:09 +02:00
Arnd Bergmann
65462ba7e1 Renesas ARM defconfig updates for v5.19
- Enable support for the Renesas RZ/V2L SoC and the Maxim MAX96712
     Quad GMSL2 Deserializer in the arm64 defconfig,
   - Refresh shmobile_defconfig for v5.18-rc1.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCYmJ3AwAKCRCKwlD9ZEnx
 cNa0APwJIXP3GulpMvVC07l9MISB0TuMIKJr7hpix4FWR3UgdAD/Qb4uzseyOt7P
 OR1bifu1lIXrha/ABr3dhZr77B2DYwQ=
 =9bw+
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJxJeEACgkQmmx57+YA
 GNn0phAAwWQANXNwMdx0+yZp3rfqZzN13b/QIQS0qyRL9e3Rzf6rIxgzb3rkIaz5
 4oqWQeBSOfMmVyN4Q2Cznw+MWT16/xMZycJO8HicE075ivlnkxGlswAASQ2h1PMo
 E3vXSeVADVW4Vhwly4XUMClU11jmyplJzLtrI55GpsRGRcR5RARGf9CL4nBuscwD
 5zLIQGa0mbI/3vQFo4yvdQhtktmZA/KBoL9c4zJmGMtE/xJoFz+nC2mL/971PzFD
 E8FEYUukAiDsp86NvSxWE5flJV+5tCkBG1ZvHxbvfb68mwmB2G5qeEJgXCAktc1y
 CnftEDUpRQTLZkvNs8yc12ZcehP8xx4YFscVafs64YGlnvdpyPyQuYc/8+Ra47la
 RWrbEhkTDOTc6XEN2rW/gMB206cWbj2zVFCE/FmFu11HH5l4zlJpo4QI1PfotfHx
 opC7/69uttDWtnhEjrVmHfSr/lYGKJzzkc1TXgdFgMR9HPcYsP9CQa1QuFHPjBgL
 5Z2Qt93bxzGmqHIQNoM5AN7qXpkJDtkGDOFX4mhdz+S4f0NeFj/ZGRoPqDvOXEqS
 D4o8h96Ep+x7aAXy1EtRnt25g4rgEwzLxSbxbXcruWZqutnsu4STV4AYqcVu73YQ
 Yn89GECxUgxix7QsSIauqxAILb65pL2oLakpYnm8EYOZzGZJbS8=
 =W1C7
 -----END PGP SIGNATURE-----

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

Renesas ARM defconfig updates for v5.19

  - Enable support for the Renesas RZ/V2L SoC and the Maxim MAX96712
    Quad GMSL2 Deserializer in the arm64 defconfig,
  - Refresh shmobile_defconfig for v5.18-rc1.

* tag 'renesas-arm-defconfig-for-v5.19-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  ARM: shmobile: defconfig: Refresh for v5.18-rc1
  arm64: defconfig: Enable Maxim MAX96712 Quad GMSL2 Deserializer support
  arm64: defconfig: Enable ARCH_R9A07G054

Link: https://lore.kernel.org/r/cover.1650638503.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-03 14:53:53 +02:00
carsten.haitzler@foss.arm.com
16a5b26d27
arm64: defconfig: Enable modules for arm displays
Key devices that support displays on SoCs like the Komeda DRM driver, the
older HDLCD were not enabled by default and should be so displays can work
out of the box on defconfig. Also Candence I2C support should be enabled so
the PHY and thus displays can work too.

Signed-off-by: Carsten Haitzler <carsten.haitzler@arm.com>
Link: https://lore.kernel.org/r/20220427114200.111904-1-carsten.haitzler@foss.arm.com'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-03 14:53:30 +02:00
Alexandru Elisei
a9e192cd4f KVM: arm64: Hide AArch32 PMU registers when not available
commit 11663111cd ("KVM: arm64: Hide PMU registers from userspace when
not available") hid the AArch64 PMU registers from userspace and guest
when the PMU VCPU feature was not set. Do the same when the PMU
registers are accessed by an AArch32 guest. While we're at it, rename
the previously unused AA32_ZEROHIGH to AA32_DIRECT to match the behavior
of get_access_mask().

Now that KVM emulates ID_DFR0 and hides the PMU from the guest when the
feature is not set, it is safe to inject to inject an undefined exception
when the PMU is not present, as that corresponds to the architected
behaviour.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
[Oliver - Add AA32_DIRECT to match the zero value of the enum]
Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220503060205.2823727-7-oupton@google.com
2022-05-03 11:17:41 +01:00
Oliver Upton
fd1264c4ca KVM: arm64: Start trapping ID registers for 32 bit guests
To date KVM has not trapped ID register accesses from AArch32, meaning
that guests get an unconstrained view of what hardware supports. This
can be a serious problem because we try to base the guest's feature
registers on values that are safe system-wide. Furthermore, KVM does not
implement the latest ISA in the PMU and Debug architecture, so we
constrain these fields to supported values.

Since KVM now correctly handles CP15 and CP10 register traps, we no
longer need to clear HCR_EL2.TID3 for 32 bit guests and will instead
emulate reads with their safe values.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220503060205.2823727-6-oupton@google.com
2022-05-03 11:14:34 +01:00
Oliver Upton
9369bc5c5e KVM: arm64: Plumb cp10 ID traps through the AArch64 sysreg handler
In order to enable HCR_EL2.TID3 for AArch32 guests KVM needs to handle
traps where ESR_EL2.EC=0x8, which corresponds to an attempted VMRS
access from an ID group register. Specifically, the MVFR{0-2} registers
are accessed this way from AArch32. Conveniently, these registers are
architecturally mapped to MVFR{0-2}_EL1 in AArch64. Furthermore, KVM
already handles reads to these aliases in AArch64.

Plumb VMRS read traps through to the general AArch64 system register
handler.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220503060205.2823727-5-oupton@google.com
2022-05-03 11:14:34 +01:00
Oliver Upton
e651976667 KVM: arm64: Wire up CP15 feature registers to their AArch64 equivalents
KVM currently does not trap ID register accesses from an AArch32 EL1.
This is painful for a couple of reasons. Certain unimplemented features
are visible to AArch32 EL1, as we limit PMU to version 3 and the debug
architecture to v8.0. Additionally, we attempt to paper over
heterogeneous systems by using register values that are safe
system-wide. All this hard work is completely sidestepped because KVM
does not set TID3 for AArch32 guests.

Fix up handling of CP15 feature registers by simply rerouting to their
AArch64 aliases. Punt setting HCR_EL2.TID3 to a later change, as we need
to fix up the oddball CP10 feature registers still.

Signed-off-by: Oliver Upton <oupton@google.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220503060205.2823727-4-oupton@google.com
2022-05-03 11:14:33 +01:00
Oliver Upton
28eda7b5e8 KVM: arm64: Don't write to Rt unless sys_reg emulation succeeds
emulate_sys_reg() returns 1 unconditionally, even though a a system
register access can fail. Furthermore, kvm_handle_sys_reg() writes to Rt
for every register read, regardless of if it actually succeeded.

Though this pattern is safe (as params.regval is initialized with the
current value of Rt) it is a bit ugly. Indicate failure if the register
access could not be emulated and only write to Rt on success.

Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220503060205.2823727-3-oupton@google.com
2022-05-03 11:14:33 +01:00
Oliver Upton
001bb81999 KVM: arm64: Return a bool from emulate_cp()
KVM indicates success/failure in several ways, but generally an integer
is used when conditionally bouncing to userspace is involved. That is
not the case from emulate_cp(); just use a bool instead.

No functional change intended.

Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220503060205.2823727-2-oupton@google.com
2022-05-03 11:14:33 +01:00
Sascha Hauer
bd820bc5e7 arm64: dts: rockchip: rename HDMI ref clock to 'ref' on rk3399
The reference clock for the HDMI controller has been renamed to 'ref',
the previous 'vpll' name is only left for compatibility in the driver.
Rename the clock to the new name.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20220422072841.2206452-7-s.hauer@pengutronix.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-05-03 11:28:06 +02:00
Sean Christopherson
f502cc568d KVM: Add max_vcpus field in common 'struct kvm'
For TDX guests, the maximum number of vcpus needs to be specified when the
TDX guest VM is initialized (creating the TDX data corresponding to TDX
guest) before creating vcpu.  It needs to record the maximum number of
vcpus on VM creation (KVM_CREATE_VM) and return error if the number of
vcpus exceeds it

Because there is already max_vcpu member in arm64 struct kvm_arch, move it
to common struct kvm and initialize it to KVM_MAX_VCPUS before
kvm_arch_init_vm() instead of adding it to x86 struct kvm_arch.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Message-Id: <e53234cdee6a92357d06c80c03d77c19cdefb804.1646422845.git.isaku.yamahata@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-02 11:42:42 -04:00
Linus Torvalds
b6b2648911 ARM:
* Take care of faults occuring between the PARange and
   IPA range by injecting an exception
 
 * Fix S2 faults taken from a host EL0 in protected mode
 
 * Work around Oops caused by a PMU access from a 32bit
   guest when PMU has been created. This is a temporary
   bodge until we fix it for good.
 
 x86:
 
 * Fix potential races when walking host page table
 
 * Fix shadow page table leak when KVM runs nested
 
 * Work around bug in userspace when KVM synthesizes leaf
   0x80000021 on older (pre-EPYC) or Intel processors
 
 Generic (but affects only RISC-V):
 
 * Fix bad user ABI for KVM_EXIT_SYSTEM_EVENT
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmJuxI4UHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNjfQf/X4Rn6+sTkXRS0UHWEu+q9FjJ+mIx
 ZUWdbncf0brUB1RPAFfKaiQHo0t2Req+iTlpqZL0nVQ4myNUelHYube/sZdK/aBR
 WOjKZE0hugGyMH3js2bsTdgzbcphThyYAX97qGZNb7tsPGhBiw7c98KhjxlieJab
 D8LMNtM3uzPDxg422GfOm8ge2VbpySS5oRoGHfbD+4FiLYlXoCYfZuzlFwFFIGxw
 uHm5zzfX5jshayFpFYVSJHtARXlpwJWKz9yl63QjHrhVitW4m5j4re3aNfboL6Pd
 F5Z9K+DKhJLAH5cqmgiPPe2CGMvmRwKrN3F9MqV91xDPBT8J4rrowEeboQ==
 =SwSU
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "ARM:

   - Take care of faults occuring between the PARange and IPA range by
     injecting an exception

   - Fix S2 faults taken from a host EL0 in protected mode

   - Work around Oops caused by a PMU access from a 32bit guest when PMU
     has been created. This is a temporary bodge until we fix it for
     good.

  x86:

   - Fix potential races when walking host page table

   - Fix shadow page table leak when KVM runs nested

   - Work around bug in userspace when KVM synthesizes leaf 0x80000021
     on older (pre-EPYC) or Intel processors

  Generic (but affects only RISC-V):

   - Fix bad user ABI for KVM_EXIT_SYSTEM_EVENT"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: work around QEMU issue with synthetic CPUID leaves
  Revert "x86/mm: Introduce lookup_address_in_mm()"
  KVM: x86/mmu: fix potential races when walking host page table
  KVM: fix bad user ABI for KVM_EXIT_SYSTEM_EVENT
  KVM: x86/mmu: Do not create SPTEs for GFNs that exceed host.MAXPHYADDR
  KVM: arm64: Inject exception on out-of-IPA-range translation fault
  KVM/arm64: Don't emulate a PMU for 32-bit guests if feature not set
  KVM: arm64: Handle host stage-2 faults from 32-bit EL0
2022-05-01 11:49:32 -07:00
Furkan Kardame
30ac9b4e25 arm64: dts: rockchip: add dts for Firefly Station M2 rk3566
Add dts for Firefly Station M2.
Working IO:
* UART
* LED
* LAN
* Wifi
* SD Card
* eMMC
* USB2

Signed-off-by: Furkan Kardame <f.kardame@manjaro.org>
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20220429115252.2360496-8-pgwipeout@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-05-01 15:03:05 +02:00
Peter Geis
5859b5a9c3 arm64: dts: rockchip: add SoQuartz CM4IO dts
This is the initial SoQuartz SoM device tree on a CM4IO carrier board.
This board outputs debug on uart2 and supports the following components:
Gigabit Ethernet
USB2 (OTG/Host shared)
PCIe 2.0 x1
HDMI (HDMI Port 0)
eDP (HDMI Port 1)
DSI (RPi compatible pinout)
CSI (RPi compatible pinout)
A/B/G/N WiFi
Bluetooth
SDMMC
eMMC
SPI NOR Flash (Not placed)
PI-40 compatible pin header

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20220429115252.2360496-7-pgwipeout@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-05-01 15:03:01 +02:00
Peter Geis
dcc8c66bef arm64: dts: rockchip: add Pine64 Quartz64-B device tree
Add a device tree for the Pine64 Quartz64 Model B single board computer.
This board ouputs debug on uart2 and supports the following components:
Gigabit Ethernet
USB2 x2 (one port otg capable)
USB3
PCIe/SATA M2
HDMI
DSI (RPi compatible pinout)
CSI (RPi compatible pinout)
A/B/G/N WiFi
Bluetooth
SDMMC
eMMC
SPI Flash
PI-40 compatible pin header

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20220429115252.2360496-6-pgwipeout@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-05-01 15:02:58 +02:00
Krzysztof Kozlowski
b30ae5638d arm64: dts: juno: Drop useless 'dma-channels/requests' properties
The pl330 DMA controller provides number of DMA channels and requests
through its registers, so duplicating this information (with a chance of
mistakes) in DTS is pointless.  Additionally the DTS used always wrong
property names which causes DT schema check failures - the bindings
documented 'dma-channels' and 'dma-requests' properties without leading
hash sign.

Another reason is that the number of requests also does not seem right
(should be 8).

Link: https://lore.kernel.org/r/20220430121902.59895-5-krzysztof.kozlowski@linaro.org
Reported-by: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2022-04-30 20:11:01 +01:00
Michael Riesch
160f126b89 arm64: dts: rockchip: enable usb hub on the radxa rock3 model a
One USB 2.0 host port on the Radxa ROCK3 Model A is connected to the
SoC via a hub. Introduce a voltage regulator to enable this USB hub.

Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20220425133502.405512-3-michael.riesch@wolfvision.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-04-30 15:32:07 +02:00
Michael Riesch
254a1f6a29 arm64: dts: rockchip: add usb3 support to the radxa rock3 model a
The Radxa ROCK3 Model A features one USB 3.0 host port and one USB 3.0
OTG/DRD port. Enable them in the device tree.

Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20220425133502.405512-2-michael.riesch@wolfvision.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-04-30 15:32:07 +02:00
Peter Geis
13e0ee34f3 arm64: dts: rockchip: add rk356x sfc support
Add the sfc node to the rk356x device tree. This enables spi flash
support for this soc.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20220429115252.2360496-5-pgwipeout@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-04-30 15:22:34 +02:00
Samuel Holland
87a267b4af arm64: dts: rockchip: Add USB and TCPC to rk3566-pinenote
PineNote has a USB Type-C port connected to the first USB 2.0 OTG PHY
and XHCI controller via a Willsemi WUSB3801 Type-C port controller.
Add support for it.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220413035614.31045-3-samuel@sholland.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-04-30 15:16:51 +02:00
Samuel Holland
8d411bebd4 arm64: dts: rockchip: Add accelerometer to rk3566-pinenote
PineNote has an SC7A20 accelerometer connected via I2C. Enable it.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220413035614.31045-2-samuel@sholland.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-04-30 15:16:51 +02:00
Caleb Connolly
ec48c3e82c arm64: dts: rockchip: add an input enable pinconf to rk3399
Add a pinconf to configure pins as input-enable.

Signed-off-by: Caleb Connolly <kc@postmarketos.org>
Link: https://lore.kernel.org/r/20220328005005.72492-5-kc@postmarketos.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-04-30 15:13:42 +02:00
Christopher Obbard
17408c9b11 arm64: dts: rockchip: Add vdec support for RK3328
The RK3328 has an vdec device with dedicated iommu.
Describe the vdec device, the required power-domains
and enable the iommu in the devicetree.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Link: https://lore.kernel.org/r/20220425184510.1138446-4-chris.obbard@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-04-30 15:02:01 +02:00
Christopher Obbard
a2fe0f97fd arm64: dts: rockchip: Rename vdec_mmu node for RK3328
All other rockchip devices which have vdec nodes do not
have an rk prefix. Remove the prefix from the (currently
unused) rkvdec_mmu node for consistency with other
devices.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Link: https://lore.kernel.org/r/20220425184510.1138446-3-chris.obbard@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2022-04-30 15:02:01 +02:00
Linus Torvalds
8013d1d3d2 ARM: SoC fixes for 5.18, part 3
- A fix for a regression caused by the previous set of bugfixes
    changing tegra and at91 pinctrl properties. More work is needed
    to figure out what this should actually be, but a revert makes
    it work for the moment.
 
  - Defconfig regression fixes for tegra after renamed symbols
 
  - Build-time warning and static checker fixes for imx, op-tee,
    sunxi, meson, at91, and omap
 
  - More at91 DT fixes for audio, regulator and spi nodes
 
  - A regression fix for Renesas Hyperflash memory probe
 
  - A stability fix for amlogic boards, modifying the allowed
    cpufreq states
 
  - Multiple fixes for system suspend on omap2+
 
  - DT fixes for various i.MX bugs
 
  - A probe error fix for imx6ull-colibri MMC
 
  - A MAINTAINERS file entry for samsung bug reports
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJsVcUACgkQmmx57+YA
 GNkvWA//WHU9udPtwJZFFeVqDqHcGF4KWu9Y0NtEHGbMFrPCepIMAqMe/EDoKNKn
 Covl4h63XWwQbI82pAmSCY+cBK7zb9o5a0chXV0wZCZOvWxTRnOklJppyRtRzbPL
 Nb2fh2Gbl9KFXSqnbMdAdCyeiEAe1MunCzTVfzzL8eyGLv0t5lyCChQZqkrQ+Axe
 bnY93HucfULJh2H3J5hdGIdo3iklOigFq5ZvltSedaKaGl+pnKJ49KdyKSXT8jl0
 N/grhpvYukIBvDvuowkav8/h0U+7nlLGEzVbnDBzSi4PYHmorY0S4tBjuTR87w2W
 h/0xgdd3SPyBS19Q3dW/67Hx9O3UF0ecAaW2MK/wV+Y6nX68ip79E+zAN8LFwuQW
 Lw53fyc/NgMBHMmAHBP8jvuedYAdYZ7tXgtPBSKLNIoDpbwaT5IxKD+E+0Vbf2vl
 kHSPuo7e7zC2Mw+opf8J+hPOtG/mmGVNpwSq7RMyQx/AYD5h6g5M30dQcNgKoi0V
 80isG8bEj0fdu4GMX0IW+lNEqrMz/pW6iB/mqHQbQbhNVgYiiQCeLmLHpXwlgriU
 kRC8KAor5jKUn5IST7FjAa7FCEun2hWU7vS+Ye+aZPanxzu/4r8Zj4az31lEmGyT
 1hBIiy0/1XuLiQ6mmqIAat7PhML9UKQIQuzNbpibdSR/2Llc4OY=
 =GXTu
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Arnd Bergmann:

 - A fix for a regression caused by the previous set of bugfixes
   changing tegra and at91 pinctrl properties.

   More work is needed to figure out what this should actually be, but a
   revert makes it work for the moment.

 - Defconfig regression fixes for tegra after renamed symbols

 - Build-time warning and static checker fixes for imx, op-tee, sunxi,
   meson, at91, and omap

 - More at91 DT fixes for audio, regulator and spi nodes

 - A regression fix for Renesas Hyperflash memory probe

 - A stability fix for amlogic boards, modifying the allowed cpufreq
   states

 - Multiple fixes for system suspend on omap2+

 - DT fixes for various i.MX bugs

 - A probe error fix for imx6ull-colibri MMC

 - A MAINTAINERS file entry for samsung bug reports

* tag 'soc-fixes-5.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (42 commits)
  Revert "arm: dts: at91: Fix boolean properties with values"
  bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create()
  Revert "arm64: dts: tegra: Fix boolean properties with values"
  arm64: dts: imx8mn-ddr4-evk: Describe the 32.768 kHz PMIC clock
  ARM: dts: imx6ull-colibri: fix vqmmc regulator
  MAINTAINERS: add Bug entry for Samsung and memory controller drivers
  memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode
  ARM: dts: logicpd-som-lv: Fix wrong pinmuxing on OMAP35
  ARM: dts: am3517-evm: Fix misc pinmuxing
  ARM: dts: am33xx-l4: Add missing touchscreen clock properties
  ARM: dts: Fix mmc order for omap3-gta04
  ARM: dts: at91: fix pinctrl phandles
  ARM: dts: at91: sama5d4_xplained: fix pinctrl phandle name
  ARM: dts: at91: Describe regulators on at91sam9g20ek
  ARM: dts: at91: Map MCLK for wm8731 on at91sam9g20ek
  ARM: dts: at91: Fix boolean properties with values
  ARM: dts: at91: use generic node name for dataflash
  ARM: dts: at91: align SPI NOR node name with dtschema
  ARM: dts: at91: sama7g5ek: Align the impedance of the QSPI0's HSIO and PCB lines
  ARM: dts: at91: sama7g5ek: enable pull-up on flexcom3 console lines
  ...
2022-04-29 15:51:05 -07:00
Matthew Wilcox (Oracle)
5d8de293c2 vmcore: convert copy_oldmem_page() to take an iov_iter
Patch series "Convert vmcore to use an iov_iter", v5.

For some reason several people have been sending bad patches to fix
compiler warnings in vmcore recently.  Here's how it should be done. 
Compile-tested only on x86.  As noted in the first patch, s390 should take
this conversion a bit further, but I'm not inclined to do that work
myself.


This patch (of 3):

Instead of passing in a 'buf' and 'userbuf' argument, pass in an iov_iter.
s390 needs more work to pass the iov_iter down further, or refactor, but
I'd be more comfortable if someone who can test on s390 did that work.

It's more convenient to convert the whole of read_from_oldmem() to take an
iov_iter at the same time, so rename it to read_from_oldmem_iter() and add
a temporary read_from_oldmem() wrapper that creates an iov_iter.

Link: https://lkml.kernel.org/r/20220408090636.560886-1-bhe@redhat.com
Link: https://lkml.kernel.org/r/20220408090636.560886-2-bhe@redhat.com
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-04-29 14:37:59 -07:00
Alexandru Elisei
18f3976fdb KVM: arm64: uapi: Add kvm_debug_exit_arch.hsr_high
When userspace is debugging a VM, the kvm_debug_exit_arch part of the
kvm_run struct contains arm64 specific debug information: the ESR_EL2
value, encoded in the field "hsr", and the address of the instruction
that caused the exception, encoded in the field "far".

Linux has moved to treating ESR_EL2 as a 64-bit register, but unfortunately
kvm_debug_exit_arch.hsr cannot be changed because that would change the
memory layout of the struct on big endian machines:

Current layout:			| Layout with "hsr" extended to 64 bits:
				|
offset 0: ESR_EL2[31:0] (hsr)   | offset 0: ESR_EL2[61:32] (hsr[61:32])
offset 4: padding		| offset 4: ESR_EL2[31:0]  (hsr[31:0])
offset 8: FAR_EL2[61:0] (far)	| offset 8: FAR_EL2[61:0]  (far)

which breaks existing code.

The padding is inserted by the compiler because the "far" field must be
aligned to 8 bytes (each field must be naturally aligned - aapcs64 [1],
page 18), and the struct itself must be aligned to 8 bytes (the struct must
be aligned to the maximum alignment of its fields - aapcs64, page 18),
which means that "hsr" must be aligned to 8 bytes as it is the first field
in the struct.

To avoid changing the struct size and layout for the existing fields, add a
new field, "hsr_high", which replaces the existing padding. "hsr_high" will
be used to hold the ESR_EL2[61:32] bits of the register. The memory layout,
both on big and little endian machine, becomes:

offset 0: ESR_EL2[31:0]  (hsr)
offset 4: ESR_EL2[61:32] (hsr_high)
offset 8: FAR_EL2[61:0]  (far)

The padding that the compiler inserts for the current struct layout is
unitialized. To prevent an updated userspace running on an old kernel
mistaking the padding for a valid "hsr_high" value, add a new flag,
KVM_DEBUG_ARCH_HSR_HIGH_VALID, to kvm_run->flags to let userspace know that
"hsr_high" holds a valid ESR_EL2[61:32] value.

[1] https://github.com/ARM-software/abi-aa/releases/download/2021Q3/aapcs64.pdf

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220425114444.368693-6-alexandru.elisei@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-04-29 19:26:27 +01:00
Alexandru Elisei
0b12620fdd KVM: arm64: Treat ESR_EL2 as a 64-bit register
ESR_EL2 was defined as a 32-bit register in the initial release of the
ARM Architecture Manual for Armv8-A, and was later extended to 64 bits,
with bits [63:32] RES0. ARMv8.7 introduced FEAT_LS64, which makes use of
bits [36:32].

KVM treats ESR_EL1 as a 64-bit register when saving and restoring the
guest context, but ESR_EL2 is handled as a 32-bit register. Start
treating ESR_EL2 as a 64-bit register to allow KVM to make use of the
most significant 32 bits in the future.

The type chosen to represent ESR_EL2 is u64, as that is consistent with the
notation KVM overwhelmingly uses today (u32), and how the rest of the
registers are declared.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220425114444.368693-5-alexandru.elisei@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-04-29 19:26:27 +01:00
Alexandru Elisei
8d56e5c5a9 arm64: Treat ESR_ELx as a 64-bit register
In the initial release of the ARM Architecture Reference Manual for
ARMv8-A, the ESR_ELx registers were defined as 32-bit registers. This
changed in 2018 with version D.a (ARM DDI 0487D.a) of the architecture,
when they became 64-bit registers, with bits [63:32] defined as RES0. In
version G.a, a new field was added to ESR_ELx, ISS2, which covers bits
[36:32].  This field is used when the Armv8.7 extension FEAT_LS64 is
implemented.

As a result of the evolution of the register width, Linux stores it as
both a 64-bit value and a 32-bit value, which hasn't affected correctness
so far as Linux only uses the lower 32 bits of the register.

Make the register type consistent and always treat it as 64-bit wide. The
register is redefined as an "unsigned long", which is an unsigned
double-word (64-bit quantity) for the LP64 machine (aapcs64 [1], Table 1,
page 14). The type was chosen because "unsigned int" is the most frequent
type for ESR_ELx and because FAR_ELx, which is used together with ESR_ELx
in exception handling, is also declared as "unsigned long". The 64-bit type
also makes adding support for architectural features that use fields above
bit 31 easier in the future.

The KVM hypervisor will receive a similar update in a subsequent patch.

[1] https://github.com/ARM-software/abi-aa/releases/download/2021Q3/aapcs64.pdf

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220425114444.368693-4-alexandru.elisei@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-04-29 19:26:27 +01:00
Alexandru Elisei
3fed9e5514 arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall
If a compat process tries to execute an unknown system call above the
__ARM_NR_COMPAT_END number, the kernel sends a SIGILL signal to the
offending process. Information about the error is printed to dmesg in
compat_arm_syscall() -> arm64_notify_die() -> arm64_force_sig_fault() ->
arm64_show_signal().

arm64_show_signal() interprets a non-zero value for
current->thread.fault_code as an exception syndrome and displays the
message associated with the ESR_ELx.EC field (bits 31:26).
current->thread.fault_code is set in compat_arm_syscall() ->
arm64_notify_die() with the bad syscall number instead of a valid ESR_ELx
value. This means that the ESR_ELx.EC field has the value that the user set
for the syscall number and the kernel can end up printing bogus exception
messages*. For example, for the syscall number 0x68000000, which evaluates
to ESR_ELx.EC value of 0x1A (ESR_ELx_EC_FPAC) the kernel prints this error:

[   18.349161] syscall[300]: unhandled exception: ERET/ERETAA/ERETAB, ESR 0x68000000, Oops - bad compat syscall(2) in syscall[10000+50000]
[   18.350639] CPU: 2 PID: 300 Comm: syscall Not tainted 5.18.0-rc1 #79
[   18.351249] Hardware name: Pine64 RockPro64 v2.0 (DT)
[..]

which is misleading, as the bad compat syscall has nothing to do with
pointer authentication.

Stop arm64_show_signal() from printing exception syndrome information by
having compat_arm_syscall() set the ESR_ELx value to 0, as it has no
meaning for an invalid system call number. The example above now becomes:

[   19.935275] syscall[301]: unhandled exception: Oops - bad compat syscall(2) in syscall[10000+50000]
[   19.936124] CPU: 1 PID: 301 Comm: syscall Not tainted 5.18.0-rc1-00005-g7e08006d4102 #80
[   19.936894] Hardware name: Pine64 RockPro64 v2.0 (DT)
[..]

which although shows less information because the syscall number,
wrongfully advertised as the ESR value, is missing, it is better than
showing plainly wrong information. The syscall number can be easily
obtained with strace.

*A 32-bit value above or equal to 0x8000_0000 is interpreted as a negative
integer in compat_arm_syscal() and the condition scno < __ARM_NR_COMPAT_END
evaluates to true; the syscall will exit to userspace in this case with the
ENOSYS error code instead of arm64_notify_die() being called.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220425114444.368693-3-alexandru.elisei@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-04-29 19:26:27 +01:00
Alexandru Elisei
a99ef9cb4b arm64: Make ESR_ELx_xVC_IMM_MASK compatible with assembly
ESR_ELx_xVC_IMM_MASK is used as a mask for the immediate value for the
HVC/SMC instructions. The header file is included by assembly files (like
entry.S) and ESR_ELx_xVC_IMM_MASK is not conditioned on __ASSEMBLY__ being
undefined. Use the UL() macro for defining the constant's size, as that is
compatible with both C code and assembly, whereas the UL suffix only works
for C code.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220425114444.368693-2-alexandru.elisei@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-04-29 19:26:26 +01:00
Chengming Zhou
c4a0ebf87c arm64/ftrace: Make function graph use ftrace directly
As we do in commit 0c0593b45c ("x86/ftrace: Make function graph
use ftrace directly"), we don't need special hook for graph tracer,
but instead we use graph_ops:func function to install return_hooker.

Since commit 3b23e4991f ("arm64: implement ftrace with regs") add
implementation for FTRACE_WITH_REGS on arm64, we can easily adopt
the same cleanup on arm64.

And this cleanup only changes the FTRACE_WITH_REGS implementation,
so the mcount-based implementation is unaffected.

While in theory it would be possible to make a similar cleanup for
!FTRACE_WITH_REGS, this will require rework of the core code, and
so for now we only change the FTRACE_WITH_REGS implementation.

Tested-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Link: https://lore.kernel.org/r/20220420160006.17880-2-zhouchengming@bytedance.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-04-29 19:21:12 +01:00
Linus Torvalds
66c2112b74 arm64 fix for -rc5
- Rename and reallocate the PT_ARM_MEMTAG_MTE ELF segment type
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAmJryRkQHHdpbGxAa2Vy
 bmVsLm9yZwAKCRC3rHDchMFjNOS/B/43vhg0Bz0sH9poU0r3YE6TfEeCTd2HwCBq
 Caf6VAM6K9Y7JwPSFkAgnmW2DOG1hif83mCaX47Dkb4bJZaUQpmzJ+ZsK0nCe/Wo
 GIBzTdjRLrl6LQAqcW860s2eE4Ac212LszDxdp5DXFp4HjzbSfsteUFWipnpyXEs
 KtA4Z991fbsj+FsWY42zqhFkMnnPO+6twT5okYN/S6tONrojCTZhRTKupBr4VRAk
 94xD+pJI/8EfyakEhNN2PabhCvlq0bEI/EB6pJMrL6GjMs5t0pbpowXHzMoctZuf
 /SkRgyILDNUPbAa6wGCJoV4ZcgFH7PDy80iDMwNscb/DgAO8xo6t
 =hafH
 -----END PGP SIGNATURE-----

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

Pull arm64 fix from Will Deacon:
 "Rename and reallocate the PT_ARM_MEMTAG_MTE ELF segment type.

  This is a fix to the MTE ELF ABI for a bug that was added during the
  most recent merge window as part of the coredump support.

  The issue is that the value assigned to the new PT_ARM_MEMTAG_MTE
  segment type has already been allocated to PT_AARCH64_UNWIND by the
  ELF ABI, so we've bumped the value and changed the name of the
  identifier to be better aligned with the existing one"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  elf: Fix the arm64 MTE ELF segment name and value
2022-04-29 10:36:47 -07:00
Paolo Bonzini
73331c5d84 Merge branch 'kvm-fixes-for-5.18-rc5' into HEAD
Fixes for (relatively) old bugs, to be merged in both the -rc and next
development trees:

* Fix potential races when walking host page table

* Fix bad user ABI for KVM_EXIT_SYSTEM_EVENT

* Fix shadow page table leak when KVM runs nested
2022-04-29 12:39:34 -04:00
Paolo Bonzini
d495f942f4 KVM: fix bad user ABI for KVM_EXIT_SYSTEM_EVENT
When KVM_EXIT_SYSTEM_EVENT was introduced, it included a flags
member that at the time was unused.  Unfortunately this extensibility
mechanism has several issues:

- x86 is not writing the member, so it would not be possible to use it
  on x86 except for new events

- the member is not aligned to 64 bits, so the definition of the
  uAPI struct is incorrect for 32- on 64-bit userspace.  This is a
  problem for RISC-V, which supports CONFIG_KVM_COMPAT, but fortunately
  usage of flags was only introduced in 5.18.

Since padding has to be introduced, place a new field in there
that tells if the flags field is valid.  To allow further extensibility,
in fact, change flags to an array of 16 values, and store how many
of the values are valid.  The availability of the new ndata field
is tied to a system capability; all architectures are changed to
fill in the field.

To avoid breaking compilation of userspace that was using the flags
field, provide a userspace-only union to overlap flags with data[0].
The new field is placed at the same offset for both 32- and 64-bit
userspace.

Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Peter Gonda <pgonda@google.com>
Cc: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
Message-Id: <20220422103013.34832-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-04-29 12:38:22 -04:00
Paolo Bonzini
484c22df5a KVM/arm64 fixes for 5.18, take #2
- Take care of faults occuring between the PARange and
   IPA range by injecting an exception
 
 - Fix S2 faults taken from a host EL0 in protected mode
 
 - Work around Oops caused by a PMU access from a 32bit
   guest when PMU has been created. This is a temporary
   bodge until we fix it for good.
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCgAtFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAmJsA9kPHG1hekBrZXJu
 ZWwub3JnAAoJECPQ0LrRPXpD/FYP/1G0ctyOaZDWC90sZVtBmVfO9Sc1xiZ2Kael
 3+79N96ncFHp8oKTDz4zcSvs2hDG+9tUhG54MVr1DnPuO5rQubEGr+inYnb1cQfr
 j0qBxvVAyP9wnQmtPeTvbHJCumB3RCm5d1tDLhmr4vnh5vBOn36fpCEhKhuv/2ib
 xsXE8rhL0PjRV+NV5KAlO5bJuUU0F8OaZ8612yyO0ExtV+6t1WQGsIBhf3aBRhAY
 oaYG2CmSgsifW9fgXdz/CVzRdPGV4E/hhAcQbY3CmzMbzlO6tqbOIK1NoMivoNIg
 smKMJNhnaVLSybprAcQvAG9H1vbGSQWLurd42EvZIzn59+ILFHW90fYmW4QM69P3
 mqOW40RXlZ/8BwIVEftzyZ8J8XNTpaDeGZ4D1aHY6yvKTd7ApiiU3OZOrYgZ7H/a
 d/2W3tQfV9MlifJjNFZDWj8fMqxLifcZksvMfwbl775B/9SO66UHx00qFhZxQ5nI
 7A8RKyB2jRRM/ndb337XMWoHQVwjof4CUZG1XuLSyYtb1K9joROoLD0hiNYTJOek
 QxT3T+g5FF3YpxrB270lKA4xJ6fUqUgAisThY5AZnK3Ezw8udx18ADT+X76/OqqQ
 GTxG3v45YObjA2t4xSk8TszFg83JubsCGKYQLKEbdMsfBIkhvT+fyrW4fCxODGHH
 r/rK7iuK
 =Ejoh
 -----END PGP SIGNATURE-----

Merge tag 'kvmarm-fixes-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 5.18, take #2

- Take care of faults occuring between the PARange and
  IPA range by injecting an exception

- Fix S2 faults taken from a host EL0 in protected mode

- Work around Oops caused by a PMU access from a 32bit
  guest when PMU has been created. This is a temporary
  bodge until we fix it for good.
2022-04-29 12:32:14 -04:00
Wan Jiabing
2e29b9971a arm64/sme: Fix NULL check after kzalloc
Fix following coccicheck error:
./arch/arm64/kernel/process.c:322:2-23: alloc with no test, possible model on line 326

Here should be dst->thread.sve_state.

Fixes: 8bd7f91c03 ("arm64/sme: Implement traps and syscall handling for SME")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Reviwed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220426113054.630983-1-wanjiabing@vivo.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-04-29 16:03:47 +01:00
Arnd Bergmann
73c7bcdcfd i.MX fixes for 5.18, 2nd round:
- Fix one sparse warning on imx-weim driver.
 - Fix vqmmc regulator to get UHS-I mode work on imx6ull-colibri board.
 - Add missing 32.768 kHz PMIC clock for imx8mn-ddr4-evk board to fix
   bd718xx-clk probe error.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmJnS4AUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM7QoAf/QrfXi9R6VE4zF6rRA9vBeXhMtGgK
 I7diJUYCOlg5Pb+YMGJi1v3TLEfA8YzuIhdJ723qb5R48V5ffBXJ5cm1XwwyPEYw
 hdWEdrIm0DT28ntHXYAzmrJAyghYvMDPcorYcSm+CSaNiBKry1DUFY94D9I9Fvjz
 MREzBMKt0ba/0hDaZ1unz3CVg2j9lVkWeENld6Q9iV6JvqxoCstELTyuXtBgofIf
 TM+IXYVDh/mEWLJF50yZtHj5mZzBB0EoxcR9NlLabgbA0EYdkFvitMahZm1VF74g
 Y5bIIdlw/EEu+AakbFT696r+oOW5GYUJvrqt3FpaeTXgRMW/Bx4DFO3X3w==
 =RSOR
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmJr9OMACgkQmmx57+YA
 GNnuDA/+JKPbq129hn20rwEt0ROtYOHUfFZy7vfb4LJXEvVriD7omH1mqGEVtJQ6
 WZjRVFdAY795bu8oMrY5CLW00wYvHUDPYK3DlmbH8wno387Dw4O8RopBmlDGIoxS
 k+TkLWwTqw/PY8kkuN2BN4RDCS40pw58W4QVqW6fYQqP9wlwzWGRiU4JL/oln60D
 Oe4KJFUruSb333XunxKZFjVVdlzPrsO9w0v7jzxKNwQt74DnC8b/QELNFDMNLJui
 mOO8ylYtq+VPN0GxYgtTklXwoUxmczvNlN1PDq9No0wsTeydTzgaV2/UYEiPXmhb
 AG7CF0BmO+czGoq9uxKO015nRRJDL/x0Wa0w1MuSCVlX4nDEaWr5ur23JTO1OVHV
 cwWurbzX9scX56j8tsV68IB0O6yi5BO0dk9NDw0h/qKxY5L078Xkq3M1CyED94Oc
 ZMwKqBVfAFB08rBv5Q4tKFlpAlQArBf89LjydrR0NdoVvCiImqqf7pmwT0jQ33WI
 NtVRvjMb43OZEUoC+81dW1TguBO1+FGYqHb2Y1gsDbM2pXOouezrV1pCGfuYW657
 qnZ+0+mqLfG/0jhoP7tBEcC1ZEn65Wm/G4n7cG5m8cGZdMa9Hkf+DHCNYOEU2IEf
 FyyqKajVObxF4cxklpaY6DMJtJM9LO4NJt7XkbWaWkibv2WcsvU=
 =n2P2
 -----END PGP SIGNATURE-----

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

i.MX fixes for 5.18, 2nd round:

- Fix one sparse warning on imx-weim driver.
- Fix vqmmc regulator to get UHS-I mode work on imx6ull-colibri board.
- Add missing 32.768 kHz PMIC clock for imx8mn-ddr4-evk board to fix
  bd718xx-clk probe error.

* tag 'imx-fixes-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: dts: imx8mn-ddr4-evk: Describe the 32.768 kHz PMIC clock
  ARM: dts: imx6ull-colibri: fix vqmmc regulator
  bus: imx-weim: make symbol 'weim_of_notifier' static

Link: https://lore.kernel.org/r/20220426013427.GB14615@dragon
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-04-29 16:23:31 +02:00
Ashish Mhetre
000b99e5ed arm64: tegra: Add memory controller channels
From tegra186 onwards, memory controller support multiple channels.
During the error interrupts from memory controller, corresponding
channels need to be accessed for logging error info and clearing the
interrupt.
So add address and size of these channels in device tree node of
tegra186, tegra194 and tegra234 memory controller. Also add reg-names
for each of these reg items which are used by driver for mapping.

Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-04-29 10:36:01 +02:00
Biju Das
3f67af66e6 arm64: dts: renesas: rzg2ul-smarc-som: Enable watchdog
Enable watchdog{0,2} interfaces on RZ/G2UL SMARC EVK.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220425170530.200921-14-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-04-29 09:42:17 +02:00
Biju Das
0b3e18dbcd arm64: dts: renesas: rzg2ul-smarc-som: Enable OSTM
Enable OSTM{1, 2} interfaces on RZ/G2UL SMARC EVK.
OSTM0 is reserved for TF-A.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220425170530.200921-13-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-04-29 09:42:17 +02:00
Biju Das
820e976909 arm64: dts: renesas: rzg2ul-smarc: Enable CANFD
Enable CANFD on RZ/G2UL SMARC platform.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220425170530.200921-12-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-04-29 09:42:17 +02:00
Biju Das
b0fa698b83 arm64: dts: renesas: rzg2ul-smarc: Enable i2c{0,1} and wm8978
Enable i2c{0,1} on RZ/G2UL SMARC EVK by deleting respective
entries from board dts and adding pincontrol entries to the
soc-pinctrl dtsi. Also enable wm8978 audio codec.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220425170530.200921-8-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-04-29 09:41:59 +02:00
Jayesh Choudhary
c024c46fe1 arm64: dts: ti: k3-am62: Add SA3UL ranges in cbass_main
Add the address space for SA3UL to the ranges property of the
cbass_main node.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Link: https://lore.kernel.org/r/20220412075008.10553-1-j-choudhary@ti.com
2022-04-29 12:36:46 +05:30