24612 Commits

Author SHA1 Message Date
Gavin Shan
2f8b1ad222 KVM: arm64: Allow no running vcpu on restoring vgic3 LPI pending status
We don't have a running VCPU context to restore vgic3 LPI pending status
due to command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} on KVM
device "kvm-arm-vgic-its".

Use vgic_write_guest_lock() to restore vgic3 LPI pending status.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230126235451.469087-4-gshan@redhat.com
2023-01-29 18:46:11 +00:00
Gavin Shan
a23eaf9368 KVM: arm64: Add helper vgic_write_guest_lock()
Currently, the unknown no-running-vcpu sites are reported when a
dirty page is tracked by mark_page_dirty_in_slot(). Until now, the
only known no-running-vcpu site is saving vgic/its tables through
KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_SAVE_TABLES} command on KVM device
"kvm-arm-vgic-its". Unfortunately, there are more unknown sites to
be handled and no-running-vcpu context will be allowed in these
sites: (1) KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} command
on KVM device "kvm-arm-vgic-its" to restore vgic/its tables. The
vgic3 LPI pending status could be restored. (2) Save vgic3 pending
table through KVM_DEV_ARM_{VGIC_GRP_CTRL, VGIC_SAVE_PENDING_TABLES}
command on KVM device "kvm-arm-vgic-v3".

In order to handle those unknown cases, we need a unified helper
vgic_write_guest_lock(). struct vgic_dist::save_its_tables_in_progress
is also renamed to struct vgic_dist::save_tables_in_progress.

No functional change intended.

Suggested-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230126235451.469087-3-gshan@redhat.com
2023-01-29 18:46:11 +00:00
Jagan Teki
ef9134d9bb arm64: dts: rockchip: Correct the model name for Radxa E25
Radxa E25 is a Carrier board, so update the model name for Radxa E25
as suggested by the Radxa website.

Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
Cc: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Link: https://lore.kernel.org/r/20230123071654.73139-4-jagan@amarulasolutions.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-29 13:12:28 +01:00
Jagan Teki
421c059d41 arm64: dts: rockchip: Drop unneeded model for Radxa CM3i
With module and carrier board topology, carrier board dts will include
module dtsi files for creating complete platform.

The carrier board dts will have final model name and compatible string
so any model name added in module dtsi will eventually replaced.

This happened for any devicetree property if the same property is updated
or added twice.

So, drop this unneeded model name from module dtsi.

Cc: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Link: https://lore.kernel.org/r/20230123071654.73139-3-jagan@amarulasolutions.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-29 13:12:28 +01:00
Jagan Teki
c4d2b02d63 arm64: dts: rockchip: Add missing CM3i fallback compatible for Radxa E25
In order to function the Radxa E25 Carrier board, it is mandatory to
mount the Radxa CM3i module. 

Add Radxa CM3i compatible as fallback compatible to string to satisfy
the Module and Carrier board topology.

Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
Cc: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Link: https://lore.kernel.org/r/20230123071654.73139-2-jagan@amarulasolutions.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-29 13:12:28 +01:00
Jagan Teki
8f19828844 arm64: dts: rockchip: Fix compatible for Radxa CM3
The compatible string "radxa,radxa-cm3" referring the product name
as "Radxa Radxa CM3" but the actual product name is "Radxa CM3".

Fix the compatible strings.

Fixes: 24a28d3eb07d ("dt-bindings: arm: rockchip: Add Radxa Compute Module 3")
Fixes: 7469ab529bca ("arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3")
Fixes: 096ebfb74b19 ("arm64: dts: rockchip: Add Radxa Compute Module 3 IO board")
Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230123071654.73139-1-jagan@amarulasolutions.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-29 13:12:27 +01:00
Jagan Teki
af5a803bf2 arm64: dts: rockchip: rk3566: Enable WiFi, BT support for Radxa CM3
Radxa Compute Module 3 has an onboard AW_CM256SM WiFi/BT module.

Add nodes for enabling it.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Link: https://lore.kernel.org/r/20230125161023.12115-2-jagan@amarulasolutions.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-29 13:09:34 +01:00
Manoj Sai
cc52bfc047 arm64: dts: rockchip: Enable Ethernet for Radxa CM3 IO
Add ethernet nodes for enabling gmac1 on the Radxa CM3 IO board.

Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Link: https://lore.kernel.org/r/20230125161023.12115-1-jagan@amarulasolutions.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-29 13:09:34 +01:00
Chris Morgan
97ce9f3663 arm64: dts: rockchip: add display to RG503
Add Samsung AMS495QA01 panel to RG503.

Co-developed-by: Maya Matuszczyk <maccraft123mc@gmail.com>
Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20230123154603.1315112-5-macroalpha82@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-29 13:07:17 +01:00
Michael Riesch
381b6d432f arm64: dts: rockchip: add pinctrls for 16-bit/18-bit rgb interface to rk356x
The rk3568-pinctrl.dtsi only defines the 24-bit RGB interface. Add separate
nodes for the 16-bit and 18-bit version, respectively. While at it, split
off the clock/sync signals from the data signals.

The exact mapping of the data pins was discussed here:
https://lore.kernel.org/linux-rockchip/f33a0488-528c-99de-3279-3c0346a03fd6@wolfvision.net/T/

Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20230124054706.3921383-7-michael.riesch@wolfvision.net
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-01-29 13:05:16 +01:00
Krzysztof Kozlowski
28dd277e54 arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos7
Neither simple-bus bindings nor dtc W=1 accept device nodes in soc@ node
which do not have unit address.  Therefore usethe address space
of child device (actual DWC3 Controller) as the wrapper's address to
fix:

  exynos7-espresso.dtb: soc@0: usb: {'compatible': ['samsung,exynos7-dwusb3'], ...
    should not be valid under {'type': 'object'}

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Tested-by: Alim Akhtar <alim.akhtar@samsung.com>
Link: https://lore.kernel.org/r/20230127212713.267014-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-29 11:34:29 +01:00
Krzysztof Kozlowski
becad83e0f arm64: dts: exynos: add unit address to DWC3 node wrapper in Exynos5433
Neither simple-bus bindings nor dtc W=1 accept device nodes in soc@ node
which do not have unit address.  Therefore usethe address space
of child device (actual DWC3 Controller) as the wrapper's address to
fix:

  exynos5433-tm2e.dtb: soc@0: usbdrd: {'compatible': ['samsung,exynos5433-dwusb3'], ...
    should not be valid under {'type': 'object'}

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20230127212713.267014-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-29 11:34:29 +01:00
Krzysztof Kozlowski
9ee57955d1 arm64: dts: exynos: move exynos-bus nodes out of soc in Exynos5433
The soc node is supposed to have only device nodes with MMIO addresses,
as reported by dtc W=1:

  exynos5433-bus.dtsi:10.20-16.4:
    Warning (simple_bus_reg): /soc@0/bus0: missing or empty reg/ranges property

and dtbs_check:

  exynos5433-tm2.dtb: soc@0: bus1:
    {'compatible': ['samsung,exynos-bus'], 'clocks': [[21, 220]], 'clock-names': ['bus'], 'operating-points-v2': [[165]], 'status': ['okay'], 'devfreq': [[166]]} should not be valid under {'type': 'object'}

Move the bus nodes and their OPP tables out of SoC to fix this.

Link: https://lore.kernel.org/r/20230125094513.155063-8-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-29 11:32:50 +01:00
Krzysztof Kozlowski
9f2c917093 arm64: dts: amd: use "okay" for status
"okay" over "ok" is preferred for status property.

Link: https://lore.kernel.org/r/20230127101829.93761-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-28 11:16:00 +01:00
Krzysztof Kozlowski
2f3086577f arm64: dts: apm: use "okay" for status
"okay" over "ok" is preferred for status property.

Link: https://lore.kernel.org/r/20230127101827.93728-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-28 11:15:52 +01:00
Krzysztof Kozlowski
d105729968 arm64: dts: microchip: use "okay" for status
"okay" over "ok" is preferred for status property.

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Link: https://lore.kernel.org/r/20230127101824.93684-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-28 11:15:36 +01:00
Krzysztof Kozlowski
987414b1cf arm64: dts: exynos: use lowercase hex addresses
By convention the hex addresses should be lowercase.

Link: https://lore.kernel.org/r/20230125094513.155063-9-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-28 11:01:30 +01:00
Krzysztof Kozlowski
db00347974 arm64: dts: exynos: correct wlf,micd-dbtime on TM2
The wlf,micd-dbtime property of WM5110 codec can be either 2 or 4
(driver ignores other values, so assume author wanted something here):

  exynos5433-tm2e.dtb: audio-codec@0: wlf,micd-dbtime:0:0: 1 is not one of [2, 4]

Link: https://lore.kernel.org/r/20230120173116.341270-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-28 11:01:30 +01:00
Krzysztof Kozlowski
d7cd5b50ea arm64: dts: exynos: add interrupt-controller to WM5110 on TM2
The WM5110 bindings expect node to be interrupt controller:

  exynos5433-tm2.dtb: audio-codec@0: 'interrupt-controller' is a required property
  exynos5433-tm2.dtb: audio-codec@0: '#interrupt-cells' is a required property

Link: https://lore.kernel.org/r/20230120173116.341270-5-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-28 11:01:30 +01:00
Krzysztof Kozlowski
b838792a62 arm64: dts: exynos: add VPH_PWR regulator on TM2
VPH_PWR is routed to battery, so it is not configurable.  However few
devices, e.g. WM5110 expect speaker power supplies, thus provide the
regulator for full hardware description.  Audio amplifier also accepts
that power supply.

Keep ordering the nodes by renaming existing IRDA regulator.

This fixes dtbs_check warnings:

  exynos5433-tm2e.dtb: audio-codec@0: 'SPKVDDL-supply' is a required property
  exynos5433-tm2e.dtb: audio-codec@0: 'SPKVDDR-supply' is a required property

Link: https://lore.kernel.org/r/20230120173116.341270-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-28 11:01:30 +01:00
Krzysztof Kozlowski
2bbd69327a arm64: dts: exynos: correct Bluetooth LED triger on E850-96
Switch source of LED activity to hci0-power from RX, to match bindings
(same effect expected):

  exynos850-e850-96.dtb: leds: led-5:linux,default-trigger: 'oneOf' conditional failed, one must be fixed:
    'hci0rx' is not one of ['backlight', 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
    'hci0rx' does not match '^cpu[0-9]*$'
    'hci0rx' does not match '^hci[0-9]+-power$'
    'hci0rx' does not match '^mmc[0-9]+$'
    'hci0rx' does not match '^phy[0-9]+tx$'

Link: https://lore.kernel.org/r/20230120173116.341270-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-28 11:01:30 +01:00
Krzysztof Kozlowski
682319f63d arm64: dts: exynos: add ADC supply on Exynos7 Espresso
ADC requires supply and it seems LDO3 (same as on Exynos5433 TM2 boards)
fits in voltage range of 1.8 V.  Use it to silence warning:

  exynos7-espresso.dtb: adc@13620000: 'vdd-supply' is a required property

Link: https://lore.kernel.org/r/20230120173116.341270-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
2023-01-28 11:01:18 +01:00
Krzysztof Kozlowski
5f762c4008 arm64: dts: exynos: disable non-working GPU on Exynos7 Espresso
The Panfrost GPU drivers require clock but such was not provided in
Exynos7 DTSI.  The CMU_G3D clock controller was not upstreamed, thus
consider GPU as non-working and simply disable it to silence warnings
like:

  exynos7-espresso.dtb: gpu@14ac0000: 'clocks' is a required property

Link: https://lore.kernel.org/r/20230120173116.341270-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
2023-01-28 11:01:09 +01:00
Jakub Kicinski
b568d3072a Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts:

drivers/net/ethernet/intel/ice/ice_main.c
  418e53401e47 ("ice: move devlink port creation/deletion")
  643ef23bd9dd ("ice: Introduce local var for readability")
https://lore.kernel.org/all/20230127124025.0dacef40@canb.auug.org.au/
https://lore.kernel.org/all/20230124005714.3996270-1-anthony.l.nguyen@intel.com/

drivers/net/ethernet/engleder/tsnep_main.c
  3d53aaef4332 ("tsnep: Fix TX queue stop/wake for multiple queues")
  25faa6a4c5ca ("tsnep: Replace TX spin_lock with __netif_tx_lock")
https://lore.kernel.org/all/20230127123604.36bb3e99@canb.auug.org.au/

net/netfilter/nf_conntrack_proto_sctp.c
  13bd9b31a969 ("Revert "netfilter: conntrack: add sctp DATA_SENT state"")
  a44b7651489f ("netfilter: conntrack: unify established states for SCTP paths")
  f71cb8f45d09 ("netfilter: conntrack: sctp: use nf log infrastructure for invalid packets")
https://lore.kernel.org/all/20230127125052.674281f9@canb.auug.org.au/
https://lore.kernel.org/all/d36076f3-6add-a442-6d4b-ead9f7ffff86@tessares.net/

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-01-27 22:56:18 -08:00
Samuel Holland
862ee64b3a arm64: dts: allwinner: a64: Add DPHY interrupt
The DPHY has an interrupt line which is shared with the DSI controller.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20221114022113.31694-4-samuel@sholland.org
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2023-01-27 22:34:32 +01:00
Mark Rutland
a873bb493f arm64: traps: attempt to dump all instructions
Currently dump_kernel_instr() dumps a few instructions around the
pt_regs::pc value, dumping 4 instructions before the PC before dumping
the instruction at the PC. If an attempt to read an instruction fails,
it gives up and does not attempt to dump any subsequent instructions.

This is unfortunate when the pt_regs::pc value points to the start of a
page with a leading guard page, where the instruction at the PC can be
read, but prior instructions cannot.

This patch makes dump_kernel_instr() attempt to dump each instruction
regardless of whether reading a prior instruction could be read, which
gives a more useful code dump in such cases. When an instruction cannot
be read, it is reported as "????????", which cannot be confused with a
hex value,

For example, with a `UDF #0` (AKA 0x00000000) early in the kexec control
page, we'll now get the following code dump:

| Internal error: Oops - Undefined instruction: 0000000002000000 [#1] SMP
| Modules linked in:
| CPU: 0 PID: 261 Comm: kexec Not tainted 6.2.0-rc5+ #26
| Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
| pstate: 604003c5 (nZCv DAIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
| pc : 0x48c00000
| lr : machine_kexec+0x190/0x200
| sp : ffff80000d36ba80
| x29: ffff80000d36ba80 x28: ffff000002dfc380 x27: 0000000000000000
| x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
| x23: ffff80000a9f7858 x22: 000000004c460000 x21: 0000000000000010
| x20: 00000000ad821000 x19: ffff000000aa0000 x18: 0000000000000006
| x17: ffff8000758a2000 x16: ffff800008000000 x15: ffff80000d36b568
| x14: 0000000000000000 x13: ffff80000d36b707 x12: ffff80000a9bf6e0
| x11: 00000000ffffdfff x10: ffff80000aaaf8e0 x9 : ffff80000815eff8
| x8 : 000000000002ffe8 x7 : c0000000ffffdfff x6 : 00000000000affa8
| x5 : 0000000000001fff x4 : 0000000000000001 x3 : ffff80000a263008
| x2 : ffff80000a9e20f8 x1 : 0000000048c00000 x0 : ffff000000aa0000
| Call trace:
|  0x48c00000
|  kernel_kexec+0x88/0x138
|  __do_sys_reboot+0x108/0x288
|  __arm64_sys_reboot+0x2c/0x40
|  invoke_syscall+0x78/0x140
|  el0_svc_common.constprop.0+0x4c/0x100
|  do_el0_svc+0x34/0x80
|  el0_svc+0x34/0x140
|  el0t_64_sync_handler+0xf4/0x140
|  el0t_64_sync+0x194/0x1c0
| Code: ???????? ???????? ???????? ???????? (00000000)
| ---[ end trace 0000000000000000 ]---
| Kernel panic - not syncing: Oops - Undefined instruction: Fatal exception
| Kernel Offset: disabled
| CPU features: 0x002000,00050108,c8004203
| Memory Limit: none

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230127121256.2141368-1-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-27 17:48:34 +00:00
Mark Rutland
dc4824faa2 arm64: avoid executing padding bytes during kexec / hibernation
Currently we rely on the HIBERNATE_TEXT section starting with the entry
point to swsusp_arch_suspend_exit, and the KEXEC_TEXT section starting
with the entry point to arm64_relocate_new_kernel. In both cases we copy
the entire section into a dynamically-allocated page, and then later
branch to the start of this page.

SYM_FUNC_START() will align the function entry points to
CONFIG_FUNCTION_ALIGNMENT, and when the linker later processes the
assembled code it will place padding bytes before the function entry
point if the location counter was not already sufficiently aligned. The
linker happens to use the value zero for these padding bytes.

This padding may end up being applied whenever CONFIG_FUNCTION_ALIGNMENT
is greater than 4, which can be the case with
CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B=y or
CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS=y.

When such padding is applied, attempting to kexec or resume from
hibernate will result ina crash: the kernel will branch to the padding
bytes as the start of the dynamically-allocated page, and as those bytes
are zero they will decode as UDF #0, which reliably triggers an
UNDEFINED exception. For example:

| # ./kexec --reuse-cmdline -f Image
| [   46.965800] kexec_core: Starting new kernel
| [   47.143641] psci: CPU1 killed (polled 0 ms)
| [   47.233653] psci: CPU2 killed (polled 0 ms)
| [   47.323465] psci: CPU3 killed (polled 0 ms)
| [   47.324776] Bye!
| [   47.327072] Internal error: Oops - Undefined instruction: 0000000002000000 [#1] SMP
| [   47.328510] Modules linked in:
| [   47.329086] CPU: 0 PID: 259 Comm: kexec Not tainted 6.2.0-rc5+ #3
| [   47.330223] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
| [   47.331497] pstate: 604003c5 (nZCv DAIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
| [   47.332782] pc : 0x43a95000
| [   47.333338] lr : machine_kexec+0x190/0x1e0
| [   47.334169] sp : ffff80000d293b70
| [   47.334845] x29: ffff80000d293b70 x28: ffff000002cc0000 x27: 0000000000000000
| [   47.336292] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
| [   47.337744] x23: ffff80000a837858 x22: 0000000048ec9000 x21: 0000000000000010
| [   47.339192] x20: 00000000adc83000 x19: ffff000000827000 x18: 0000000000000006
| [   47.340638] x17: ffff800075a61000 x16: ffff800008000000 x15: ffff80000d293658
| [   47.342085] x14: 0000000000000000 x13: ffff80000d2937f7 x12: ffff80000a7ff6e0
| [   47.343530] x11: 00000000ffffdfff x10: ffff80000a8ef8e0 x9 : ffff80000813ef00
| [   47.344976] x8 : 000000000002ffe8 x7 : c0000000ffffdfff x6 : 00000000000affa8
| [   47.346431] x5 : 0000000000001fff x4 : 0000000000000001 x3 : ffff80000a0a3008
| [   47.347877] x2 : ffff80000a8220f8 x1 : 0000000043a95000 x0 : ffff000000827000
| [   47.349334] Call trace:
| [   47.349834]  0x43a95000
| [   47.350338]  kernel_kexec+0x88/0x100
| [   47.351070]  __do_sys_reboot+0x108/0x268
| [   47.351873]  __arm64_sys_reboot+0x2c/0x40
| [   47.352689]  invoke_syscall+0x78/0x108
| [   47.353458]  el0_svc_common.constprop.0+0x4c/0x100
| [   47.354426]  do_el0_svc+0x34/0x50
| [   47.355102]  el0_svc+0x34/0x108
| [   47.355747]  el0t_64_sync_handler+0xf4/0x120
| [   47.356617]  el0t_64_sync+0x194/0x198
| [   47.357374] Code: bad PC value
| [   47.357999] ---[ end trace 0000000000000000 ]---
| [   47.358937] Kernel panic - not syncing: Oops - Undefined instruction: Fatal exception
| [   47.360515] Kernel Offset: disabled
| [   47.361230] CPU features: 0x002000,00050108,c8004203
| [   47.362232] Memory Limit: none

Note: Unfortunately the code dump reports "bad PC value" as it attempts
to dump some instructions prior to the UDF (i.e. before the start of the
page), and terminates early upon a fault, obscuring the problem.

This patch fixes this issue by aligning the section starter markes to
CONFIG_FUNCTION_ALIGNMENT using the ALIGN_FUNCTION() helper, which
ensures that the linker never needs to place padding bytes within the
section. Assertions are added to verify each section begins with the
function we expect, making our implicit requirement explicit.

In future it might be nice to rework the kexec and hibernation code to
decouple the section start from the entry point, but that involves much
more significant changes that come with a higher risk of error, so I've
tried to keep this fix as simple as possible for now.

Fixes: 47a15aa54427 ("arm64: Extend support for CONFIG_FUNCTION_ALIGNMENT")
Reported-by: CKI Project <cki-project@redhat.com>
Link: https://lore.kernel.org/linux-arm-kernel/29992.123012504212600261@us-mta-139.us.mimecast.lan/
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-01-27 17:45:44 +00:00
Yuntian Zhang
d747e7f76a arm64: dts: meson: add support for Radxa Zero2
Radxa Zero2 is a small form factor SBC based on the Amlogic A311D
chipset that ships in a number of eMMC configurations:

- Amlogic A311D (Quad A73 + Dual A53) CPU
- 4GB LPDDR4 RAM
- 32/64/128GB eMMC
- Mali G52-MP4 GPU
- HDMI 2.1 output (micro)
- BCM4345 WiFi (2.4/5GHz a/b/g/n/ac) and BT 5.0
- 1x USB 2.0 port - Type C (OTG)
- 1x USB 3.0 port - Type C (Host)
- 1x micro SD Card slot
- 40 Pin GPIO header

Signed-off-by: Yuntian Zhang <yt@radxa.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230127150536.3719090-2-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-27 18:01:56 +01:00
Christian Hewitt
5bcfbee7d5 arm64: dts: meson: add support for BananaPi M2-Pro
BPI-M2-PRO is based upon the BPI-M5 design except for a different
physical board layout and the following changes:

- USB 3.0 ports reduced from 4x to 2x
- 3.5mm Combined CVBS/Audio Jack removed
- RTL8821BU WiFi/BT module (internal USB connected)

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230127142221.3718184-6-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-27 18:01:19 +01:00
Christian Hewitt
ca8dac3a01 arm64: dts: meson: bananapi-m5: convert dts to dtsi
Convert the BPI-M5 dts into meson-sm1-bananapi.dtsi to support the
addition of new boards based on the same design.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230127142221.3718184-4-christianshewitt@gmail.com
[narmstrong: fixed adc-keys node name]
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-27 18:00:57 +01:00
Christian Hewitt
31752ffeec arm64: dts: meson: bananapi-m5: remove redundant status from sound node
The sound device is enabled by default so remove the redundant status.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230127142221.3718184-3-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-27 17:56:10 +01:00
Christian Hewitt
856968e066 arm64: dts: meson: bananapi-m5: switch VDDIO_C pin to OPEN_DRAIN
For proper warm (re)boot from SD card the BPI-M5 board requires TFLASH_VDD_EN
and VDDIO_C pins to be switched to high impedance mode. This can be achieved
using OPEN_DRAIN instead of ACTIVE_HIGH to leave the GPIO pins in input mode
and retain high state (pin has the pull-up).

This change is inspired by meson-sm1-odroid.dtsi where OPEN_DRAIN has been
used to resolve similar problems with the Odroid C4 board (TF_IO in the C4
dts is the equivalent regulator).

Fixes: 976e920183e4 ("arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts")
Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230127142221.3718184-2-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-27 17:56:10 +01:00
Thierry Reding
682e1c498a arm64: tegra: Drop I2C iommus and dma-coherent properties
Drop the iommus and dma-coherent properties for the I2C controller
device tree nodes. These are only needed for the device tree nodes
that represent the GPC DMA controller, since that is the device
performing the direct memory accesses.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-01-27 17:08:58 +01:00
Christian Hewitt
ce43ea00b9 arm64: dts: meson: radxa-zero: allow usb otg mode
Setting dr_mode to "host" prevents otg which can be useful on a board
with limited connectivity options. So don't force host mode.

Fixes: 26d1400f7457 ("arm64: dts: amlogic: add support for Radxa Zero")
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230127103913.3386435-1-christianshewitt@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-27 14:19:31 +01:00
Krzysztof Kozlowski
0a9b7bee00 arm64: dts: synaptics: align UART node name with bindings
Bindings expect UART/serial node names to be "serial".

  berlin4ct-dmp.dtb: uart@d000: $nodename:0: 'uart@d000' does not match '^serial(@.*)?$'

Link: https://lore.kernel.org/r/20230123151540.369690-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-27 10:44:37 +01:00
Krzysztof Kozlowski
b8081b9a80 arm64: dts: hisilicon: align UART node name with bindings
Bindings expect UART/serial node names to be "serial".

Link: https://lore.kernel.org/r/20230123151516.369130-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-27 10:44:18 +01:00
Krzysztof Kozlowski
5ad30c5fc0 arm64: dts: realtek: align UART node name with bindings
Bindings expect UART/serial node names to be "serial".

Link: https://lore.kernel.org/r/20230123151514.369101-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-01-27 10:44:05 +01:00
Yoshihiro Shimoda
46fe3950ce arm64: dts: renesas: r8a779f0: Add iommus to MMC node
Add iommus property to the MMC node for r8a779f0.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230123013448.1250991-3-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-01-27 10:41:19 +01:00
Fabrizio Castro
3d28ccb9b3 arm64: dts: renesas: v2mevk2: Add PWC support
The RZ/V2M EVK uses the PWC IP to control external power supplies
and the I/O voltage for the uSD card.

This patch enables the PWC node, and it also enables the poweroff
features since PWC is actually used to control the board power
rails.

Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230118144747.24968-3-fabrizio.castro.jz@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-01-27 10:41:19 +01:00
Fabrizio Castro
cf67b31904 arm64: dts: renesas: r9a09g011: Add PWC support
The RZ/V2M SoC contains an External Power Sequence Controller (PWC)
module. This module provides an external power supply on/off
sequence, on/off signal for the LPDDR4 core power supply, General
Purpose Outputs, and key input signals.

This patch adds PWC support to the SoC specific device tree.

Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230118144747.24968-2-fabrizio.castro.jz@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-01-27 10:41:19 +01:00
Fabrizio Castro
11ffdcdfa2 arm64: dts: renesas: r9a09g011: Reword ethernet status
Although of_fdt_device_is_available returns true when the DT
property "status" is assigned "ok" or "okay", and false for every
other value, it's become common practice to assign "disabled"
when we want of_fdt_device_is_available to return false.
For some reason, the status property of the ethernet node was
assigned "disable" when originally added to the kernel. Change
it to "disabled" for consistency.

Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230118135259.19249-1-fabrizio.castro.jz@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-01-27 10:41:19 +01:00
Adam Ford
3deb0c759d arm64: dts: renesas: r8a774[be]1-beacon: Sync aliases with RZ/G2M
The Beacon Embedded RZ/G2[MNH] boards all have the same baseboard
and all share the same PCB.  To make sure all instances appear
the same, make the aliases for RZ/G2N and RZ/G2H match RZ/G2M to keep
them consistent.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230117232609.477247-1-aford173@gmail.com
Link: https://lore.kernel.org/r/20230117232609.477247-2-aford173@gmail.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-01-27 10:41:18 +01:00
Adam Ford
63acac8a02 arm64: dts: renesas: beacon-renesom: Fix audio clock rate
The WM8962 is configured so the SoC is driving the clock, and it's
currently set to 24 MHz.  However, when playing audio it shows the
following message:
    wm8962 5-001a: Unsupported sysclk ratio 500

While not harmful, a better clock ratio is 512.  It makes the
message disappear, and it still plays sound.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230114225647.227972-3-aford173@gmail.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-01-27 10:41:15 +01:00
Adam Ford
a0d23b8645 arm64: dts: renesas: beacon-renesom: Update Ethernet PHY ID
Due to the part shortage, the AR8031 PHY was replaced with a Micrel
KSZ9131.  Hard-coding the ID of the PHY makes this new PHY
non-operational on newer hardware.  Since previous hardware had only
shipped to a limited number of people, and they have not gone to
production, it should be safe to update the PHY ID.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230114225647.227972-2-aford173@gmail.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-01-27 10:41:10 +01:00
Adam Ford
d7f9492dfc arm64: dts: renesas: beacon-renesom: Fix gpio expander reference
The board used to originally introduce the Beacon Embedded RZ/G2[M/N/H]
boards had a GPIO expander with address 20, but this was changed when
the final board went to production.

The production boards changed both the part itself and the address.
With the incorrect address, the LCD cannot come up.  If the LCD fails,
the rcar-du driver fails to come up, and that also breaks HDMI.

Pre-release board were not shipped to the general public, so it should
be safe to push this as a fix.  Anyone with a production board would
have video fail due to this GPIO expander change.

Fixes: a1d8a344f1ca ("arm64: dts: renesas: Introduce r8a774a1-beacon-rzg2m-kit")
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230114225647.227972-1-aford173@gmail.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-01-27 10:41:03 +01:00
Yoshihiro Shimoda
c3b8f309de arm64: dts: renesas: spider-cpu: Enable UFS device
Enable UFS device for R-Car S4-8 Spider CPU board.

Note that the conditions of RC21012 on the Spider are:
 - OUT11 (for UFS30_REFCLK_V) is disabled as default.
 - OUT11 is controlled by GPIO0 pin.
 - The GPIO0 pin is inverted sense (low active) and pull-up enabled.

To output the clock, pin 4 of TCA9554 on the Spider board needs to
output low level so that using "gpio-gate-clock" for it.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230113134639.338908-1-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2023-01-27 10:38:53 +01:00
David Heidelberg
527c9552f5 arm64: dts: meson-gxm-khadas-vim2: use gpio-fan matrix instead of an array
No functional changes.

Adjust to comply with dt-schema requirements
and make it possible to validate values.

Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Link: https://lore.kernel.org/r/20230126193732.69699-1-david@ixit.cz
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-27 08:55:36 +01:00
Konrad Dybcio
b904227a4b arm64: dts: qcom: sm8350: Hook up DSI1 to MDP
Somehow DSI1 was not hooked up to MDP resulting in it not working.
Fix it.

Fixes: d4a4410583ed ("arm64: dts: qcom: sm8350: Add display system nodes")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230120210101.2146852-8-konrad.dybcio@linaro.org
2023-01-26 14:52:29 -06:00
Konrad Dybcio
2a07efb8c0 arm64: dts: qcom: sm8350: Add mdss_ prefix to DSIn out labels
Add the mdss_ prefix to DSIn labels, so that the hardware blocks can
be organized near each other while retaining the alphabetical order
in device DTs when referencing by label.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230120210101.2146852-7-konrad.dybcio@linaro.org
2023-01-26 14:52:29 -06:00
Konrad Dybcio
e3e654ced3 arm64: dts: qcom: sm8350: Fix DSI PLL size
As downstream indicates, DSI PLL is actually 0x27c and not 0x260-
wide. Fix that to reserve the correct registers.

Fixes: d4a4410583ed ("arm64: dts: qcom: sm8350: Add display system nodes")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230120210101.2146852-6-konrad.dybcio@linaro.org
2023-01-26 14:52:29 -06:00