Commit Graph

21876 Commits

Author SHA1 Message Date
Kalesh Singh 051ece6758 arm64: stacktrace: Add description of stacktrace/common.h
Add brief description on how to use stacktrace/common.h to implement
a stack unwinder.

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220726073750.3219117-7-kaleshsingh@google.com
2022-07-26 10:48:54 +01:00
Kalesh Singh f51e714674 arm64: stacktrace: Factor out common unwind()
Move unwind() to stacktrace/common.h, and as a result
the kernel unwind_next() to asm/stacktrace.h. This allow
reusing unwind() in the implementation of the nVHE HYP
stack unwinder, later in the series.

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220726073750.3219117-6-kaleshsingh@google.com
2022-07-26 10:48:43 +01:00
Kalesh Singh 5b1b08619f arm64: stacktrace: Handle frame pointer from different address spaces
The unwinder code is made reusable so that it can be used to
unwind various types of stacks. One usecase is unwinding the
nVHE hyp stack from the host (EL1) in non-protected mode. This
means that the unwinder must be able to translate HYP stack
addresses to kernel addresses.

Add a callback (stack_trace_translate_fp_fn) to allow specifying
the translation function.

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220726073750.3219117-5-kaleshsingh@google.com
2022-07-26 10:48:32 +01:00
Kalesh Singh be63c647fd arm64: stacktrace: Factor out unwind_next_common()
Move common unwind_next logic to stacktrace/common.h. This allows
reusing the code in the implementation the nVHE hypervisor stack
unwinder, later in this series.

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220726073750.3219117-4-kaleshsingh@google.com
2022-07-26 10:48:20 +01:00
Kalesh Singh 15a59f19a0 arm64: stacktrace: Factor out on_accessible_stack_common()
Move common on_accessible_stack checks to stacktrace/common.h. This is
used in the implementation of the nVHE hypervisor unwinder later in
this series.

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220726073750.3219117-3-kaleshsingh@google.com
2022-07-26 10:48:09 +01:00
Kalesh Singh 6bf212c89c arm64: stacktrace: Add shared header for common stack unwinding code
In order to reuse the arm64 stack unwinding logic for the nVHE
hypervisor stack, move the common code to a shared header
(arch/arm64/include/asm/stacktrace/common.h).

The nVHE hypervisor cannot safely link against kernel code, so we
make use of the shared header to avoid duplicated logic later in
this series.

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220726073750.3219117-2-kaleshsingh@google.com
2022-07-26 10:47:14 +01:00
Jason A. Donenfeld d349ab99ee random: handle archrandom with multiple longs
The archrandom interface was originally designed for x86, which supplies
RDRAND/RDSEED for receiving random words into registers, resulting in
one function to generate an int and another to generate a long. However,
other architectures don't follow this.

On arm64, the SMCCC TRNG interface can return between one and three
longs. On s390, the CPACF TRNG interface can return arbitrary amounts,
with four longs having the same cost as one. On UML, the os_getrandom()
interface can return arbitrary amounts.

So change the api signature to take a "max_longs" parameter designating
the maximum number of longs requested, and then return the number of
longs generated.

Since callers need to check this return value and loop anyway, each arch
implementation does not bother implementing its own loop to try again to
fill the maximum number of longs. Additionally, all existing callers
pass in a constant max_longs parameter. Taken together, these two things
mean that the codegen doesn't really change much for one-word-at-a-time
platforms, while performance is greatly improved on platforms such as
s390.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-07-25 13:26:14 +02:00
Marc Zyngier 892f7237b3 arm64: Delay initialisation of cpuinfo_arm64::reg_{zcr,smcr}
Even if we are now able to tell the kernel to avoid exposing SVE/SME
from the command line, we still have a couple of places where we
unconditionally access the ZCR_EL1 (resp. SMCR_EL1) registers.

On systems with broken firmwares, this results in a crash even if
arm64.nosve (resp. arm64.nosme) was passed on the command-line.

To avoid this, only update cpuinfo_arm64::reg_{zcr,smcr} once
we have computed the sanitised version for the corresponding
feature registers (ID_AA64PFR0 for SVE, and ID_AA64PFR1 for
SME). This results in some minor refactoring.

Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Peter Collingbourne <pcc@google.com>
Tested-by: Peter Collingbourne <pcc@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220720105219.1755096-1-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-25 11:02:11 +01:00
Will Deacon f96d67a8af Merge branch 'for-next/boot' into for-next/core
* for-next/boot: (34 commits)
  arm64: fix KASAN_INLINE
  arm64: Add an override for ID_AA64SMFR0_EL1.FA64
  arm64: Add the arm64.nosve command line option
  arm64: Add the arm64.nosme command line option
  arm64: Expose a __check_override primitive for oddball features
  arm64: Allow the idreg override to deal with variable field width
  arm64: Factor out checking of a feature against the override into a macro
  arm64: Allow sticky E2H when entering EL1
  arm64: Save state of HCR_EL2.E2H before switch to EL1
  arm64: Rename the VHE switch to "finalise_el2"
  arm64: mm: fix booting with 52-bit address space
  arm64: head: remove __PHYS_OFFSET
  arm64: lds: use PROVIDE instead of conditional definitions
  arm64: setup: drop early FDT pointer helpers
  arm64: head: avoid relocating the kernel twice for KASLR
  arm64: kaslr: defer initialization to initcall where permitted
  arm64: head: record CPU boot mode after enabling the MMU
  arm64: head: populate kernel page tables with MMU and caches on
  arm64: head: factor out TTBR1 assignment into a macro
  arm64: idreg-override: use early FDT mapping in ID map
  ...
2022-07-25 10:59:15 +01:00
Will Deacon 92867739e3 Merge branch 'for-next/cpufeature' into for-next/core
* for-next/cpufeature:
  arm64/hwcap: Support FEAT_EBF16
  arm64/cpufeature: Store elf_hwcaps as a bitmap rather than unsigned long
  arm64/hwcap: Document allocation of upper bits of AT_HWCAP
  arm64: trap implementation defined functionality in userspace
2022-07-25 10:58:10 +01:00
Will Deacon e8da08fc3d Merge branch 'for-next/vdso' into for-next/core
* for-next/vdso:
  arm64: vdso32: Add DWARF_DEBUG
  arm64: vdso32: Shuffle .ARM.exidx section above ELF_DETAILS
  arm64: compat: Move sigreturn32.S to .rodata section
  arm64: vdso*: place got/plt sections in .rodata
  arm64: vdso32: add ARM.exidx* sections
  arm64: compat: Move kuser32.S to .rodata section
  arm64: vdso32: enable orphan handling for VDSO
  arm64: vdso32: put ELF related sections in the linker script
  arm64: vdso: enable orphan handling for VDSO
  arm64: vdso: put ELF related sections in the linker script
2022-07-25 10:57:44 +01:00
Will Deacon 618ff55eec Merge branch 'for-next/sysregs' into for-next/core
* for-next/sysregs: (28 commits)
  arm64/sysreg: Convert ID_AA64ZFR0_EL1 to automatic generation
  arm64/sysreg: Convert ID_AA64SMFR0_EL1 to automatic generation
  arm64/sysreg: Convert LORID_EL1 to automatic generation
  arm64/sysreg: Convert LORC_EL1 to automatic generation
  arm64/sysreg: Convert LORN_EL1 to automatic generation
  arm64/sysreg: Convert LOREA_EL1 to automatic generation
  arm64/sysreg: Convert LORSA_EL1 to automatic generation
  arm64/sysreg: Convert ID_AA64ISAR2_EL1 to automatic generation
  arm64/sysreg: Convert ID_AA64ISAR1_EL1 to automatic generation
  arm64/sysreg: Convert GMID to automatic generation
  arm64/sysreg: Convert DCZID_EL0 to automatic generation
  arm64/sysreg: Convert CTR_EL0 to automatic generation
  arm64/sysreg: Add _EL1 into ID_AA64ISAR2_EL1 definition names
  arm64/sysreg: Add _EL1 into ID_AA64ISAR1_EL1 definition names
  arm64/sysreg: Remove defines for RPRES enumeration
  arm64/sysreg: Standardise naming for ID_AA64ZFR0_EL1 fields
  arm64/sysreg: Standardise naming for ID_AA64SMFR0_EL1 enums
  arm64/sysreg: Standardise naming for WFxT defines
  arm64/sysreg: Make BHB clear feature defines match the architecture
  arm64/sysreg: Align pointer auth enumeration defines with architecture
  ...
2022-07-25 10:57:37 +01:00
Will Deacon cb20311e5e Merge branch 'for-next/stacktrace' into for-next/core
* for-next/stacktrace:
  arm64: Copy the task argument to unwind_state
  arm64: Split unwind_init()
  arm64: stacktrace: use non-atomic __set_bit
  arm64: kasan: do not instrument stacktrace.c
2022-07-25 10:57:26 +01:00
Will Deacon 0f05dad9ee Merge branch 'for-next/sme' into for-next/core
* for-next/sme:
  arm64/fpsimd: Remove duplicate SYS_SVCR read
  arm64/signal: Clean up SVE/SME feature checking inconsistency
  arm64/sme: Expose SMIDR through sysfs
2022-07-25 10:57:20 +01:00
Will Deacon 288e21b6b2 Merge branch 'for-next/perf' into for-next/core
* for-next/perf:
  drivers/perf: arm_spe: Fix consistency of SYS_PMSCR_EL1.CX
  perf: RISC-V: Add of_node_put() when breaking out of for_each_of_cpu_node()
  docs: perf: Include hns3-pmu.rst in toctree to fix 'htmldocs' WARNING
  drivers/perf: hisi: add driver for HNS3 PMU
  drivers/perf: hisi: Add description for HNS3 PMU driver
  drivers/perf: riscv_pmu_sbi: perf format
  perf/arm-cci: Use the bitmap API to allocate bitmaps
  drivers/perf: riscv_pmu: Add riscv pmu pm notifier
  perf: hisi: Extract hisi_pmu_init
  perf/marvell_cn10k: Fix TAD PMU register offset
  perf/marvell_cn10k: Remove useless license text when SPDX-License-Identifier is already used
  arm64: cpufeature: Allow different PMU versions in ID_DFR0_EL1
  perf/arm-cci: fix typo in comment
  drivers/perf:Directly use ida_alloc()/free()
  drivers/perf: Directly use ida_alloc()/free()
2022-07-25 10:57:14 +01:00
Will Deacon c436500d9f Merge branch 'for-next/mte' into for-next/core
* for-next/mte:
  arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags"
  mm: kasan: Skip page unpoisoning only if __GFP_SKIP_KASAN_UNPOISON
  mm: kasan: Skip unpoisoning of user pages
  mm: kasan: Ensure the tags are visible before the tag in page->flags
2022-07-25 10:57:08 +01:00
Will Deacon 03939cf0d5 Merge branch 'for-next/mm' into for-next/core
* for-next/mm:
  arm64: enable THP_SWAP for arm64
2022-07-25 10:57:02 +01:00
Will Deacon 02eab44c71 Merge branch 'for-next/misc' into for-next/core
* for-next/misc:
  arm64/mm: use GENMASK_ULL for TTBR_BADDR_MASK_52
  arm64: numa: Don't check node against MAX_NUMNODES
  arm64: mm: Remove assembly DMA cache maintenance wrappers
  arm64/mm: Define defer_reserve_crashkernel()
  arm64: fix oops in concurrently setting insn_emulation sysctls
  arm64: Do not forget syscall when starting a new thread.
  arm64: boot: add zstd support
2022-07-25 10:56:57 +01:00
Will Deacon 8184a8bc1c Merge branch 'for-next/kpti' into for-next/core
* for-next/kpti:
  arm64: correct the effect of mitigations off on kpti
  arm64: entry: simplify trampoline data page
  arm64: mm: install KPTI nG mappings with MMU enabled
  arm64: kpti-ng: simplify page table traversal logic
2022-07-25 10:56:49 +01:00
Will Deacon b7c47fd771 Merge branch 'for-next/kcsan' into for-next/core
* for-next/kcsan:
  arm64: kcsan: Support detecting more missing memory barriers
  asm-generic: Add memory barrier dma_mb()
2022-07-25 10:56:40 +01:00
Will Deacon 570365d365 Merge branch 'for-next/irqflags-nmi' into for-next/core
* for-next/irqflags-nmi:
  arm64: select TRACE_IRQFLAGS_NMI_SUPPORT
  arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic
2022-07-25 10:56:31 +01:00
Will Deacon 84d8857af4 Merge branch 'for-next/ioremap' into for-next/core
* for-next/ioremap:
  arm64: Add HAVE_IOREMAP_PROT support
  arm64: mm: Convert to GENERIC_IOREMAP
  mm: ioremap: Add ioremap/iounmap_allowed()
  mm: ioremap: Setup phys_addr of struct vm_struct
  mm: ioremap: Use more sensible name in ioremap_prot()
  ARM: mm: kill unused runtime hook arch_iounmap()
2022-07-25 10:56:23 +01:00
Will Deacon ee8b00a956 Merge branch 'for-next/extable' into for-next/core
* for-next/extable:
  arm64: extable: cleanup redundant extable type EX_TYPE_FIXUP
  arm64: extable: move _cond_extable to _cond_uaccess_extable
  arm64: extable: make uaaccess helper use extable type EX_TYPE_UACCESS_ERR_ZERO
  arm64: asm-extable: add asm uacess helpers
  arm64: asm-extable: move data fields
  arm64: extable: add new extable type EX_TYPE_KACCESS_ERR_ZERO support
2022-07-25 10:56:16 +01:00
Will Deacon 2436387f2d Merge branch 'for-next/errata' into for-next/core
* for-next/errata:
  arm64: errata: Remove AES hwcap for COMPAT tasks
  arm64: errata: Add Cortex-A510 to the repeat tlbi list
2022-07-25 10:56:08 +01:00
Arnd Bergmann 57d6ca98ba arm64: refresh defconfig file
A number of Kconfig options have moved around in the defconfig
file over time. Move them to the place that they 'savedefconfig'
puts them at now, to better see which options are now gone
for some reason.

Reported-by: John Garry <john.garry@huawei.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-24 22:34:48 +02:00
Jakub Kicinski b3fce974d4 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Daniel Borkmann says:

====================
bpf-next 2022-07-22

We've added 73 non-merge commits during the last 12 day(s) which contain
a total of 88 files changed, 3458 insertions(+), 860 deletions(-).

The main changes are:

1) Implement BPF trampoline for arm64 JIT, from Xu Kuohai.

2) Add ksyscall/kretsyscall section support to libbpf to simplify tracing kernel
   syscalls through kprobe mechanism, from Andrii Nakryiko.

3) Allow for livepatch (KLP) and BPF trampolines to attach to the same kernel
   function, from Song Liu & Jiri Olsa.

4) Add new kfunc infrastructure for netfilter's CT e.g. to insert and change
   entries, from Kumar Kartikeya Dwivedi & Lorenzo Bianconi.

5) Add a ksym BPF iterator to allow for more flexible and efficient interactions
   with kernel symbols, from Alan Maguire.

6) Bug fixes in libbpf e.g. for uprobe binary path resolution, from Dan Carpenter.

7) Fix BPF subprog function names in stack traces, from Alexei Starovoitov.

8) libbpf support for writing custom perf event readers, from Jon Doron.

9) Switch to use SPDX tag for BPF helper man page, from Alejandro Colomar.

10) Fix xsk send-only sockets when in busy poll mode, from Maciej Fijalkowski.

11) Reparent BPF maps and their charging on memcg offlining, from Roman Gushchin.

12) Multiple follow-up fixes around BPF lsm cgroup infra, from Stanislav Fomichev.

13) Use bootstrap version of bpftool where possible to speed up builds, from Pu Lehui.

14) Cleanup BPF verifier's check_func_arg() handling, from Joanne Koong.

15) Make non-prealloced BPF map allocations low priority to play better with
    memcg limits, from Yafang Shao.

16) Fix BPF test runner to reject zero-length data for skbs, from Zhengchao Shao.

17) Various smaller cleanups and improvements all over the place.

* https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (73 commits)
  bpf: Simplify bpf_prog_pack_[size|mask]
  bpf: Support bpf_trampoline on functions with IPMODIFY (e.g. livepatch)
  bpf, x64: Allow to use caller address from stack
  ftrace: Allow IPMODIFY and DIRECT ops on the same function
  ftrace: Add modify_ftrace_direct_multi_nolock
  bpf/selftests: Fix couldn't retrieve pinned program in xdp veth test
  bpf: Fix build error in case of !CONFIG_DEBUG_INFO_BTF
  selftests/bpf: Fix test_verifier failed test in unprivileged mode
  selftests/bpf: Add negative tests for new nf_conntrack kfuncs
  selftests/bpf: Add tests for new nf_conntrack kfuncs
  selftests/bpf: Add verifier tests for trusted kfunc args
  net: netfilter: Add kfuncs to set and change CT status
  net: netfilter: Add kfuncs to set and change CT timeout
  net: netfilter: Add kfuncs to allocate and insert CT
  net: netfilter: Deduplicate code in bpf_{xdp,skb}_ct_lookup
  bpf: Add documentation for kfuncs
  bpf: Add support for forcing kfunc args to be trusted
  bpf: Switch to new kfunc flags infrastructure
  tools/resolve_btfids: Add support for 8-byte BTF sets
  bpf: Introduce 8-byte BTF set
  ...
====================

Link: https://lore.kernel.org/r/20220722221218.29943-1-daniel@iogearbox.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-22 16:55:44 -07:00
Stafford Horne a2912b45b0 asm-generic: Add new pci.h and use it
The asm/pci.h used for many newer architectures share similar definitions.
Move the common parts to asm-generic/pci.h to allow for sharing code.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/lkml/CAK8P3a0JmPeczfmMBE__vn=Jbvf=nkbpVaZCycyv40pZNCJJXQ@mail.gmail.com/
Link: https://lore.kernel.org/r/20220722214944.831438-5-shorne@gmail.com
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pierre Morel <pmorel@linux.ibm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2022-07-22 17:34:57 -05:00
Stafford Horne abb4970ac3 PCI: Move isa_dma_bridge_buggy out of asm/dma.h
The isa_dma_bridge_buggy symbol is only used for x86_32, and only x86_32
platforms or quirks ever set it.

Add a new linux/isa-dma.h header that #defines isa_dma_bridge_buggy to 0
except on x86_32, where we keep it as a variable, and remove all the arch-
specific definitions.

[bhelgaas: commit log]
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Christoph Hellwig <hch@infradead.org>
Link: https://lore.kernel.org/r/20220722214944.831438-3-shorne@gmail.com
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2022-07-22 17:24:47 -05:00
Stafford Horne ae85b23c65 PCI: Remove pci_get_legacy_ide_irq() and asm-generic/pci.h
pci_get_legacy_ide_irq() is only used on platforms that support PNP, so
many architectures define it but never use it.  Replace uses of it with
ATA_PRIMARY_IRQ() and ATA_SECONDARY_IRQ(), which provide the same
functionality.

Since pci_get_legacy_ide_irq() is no longer used, remove all the
architecture-specific definitions of it as well as asm-generic/pci.h, which
only provides pci_get_legacy_ide_irq()

[bhelgaas: commit log]
Co-developed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20220722214944.831438-2-shorne@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Pierre Morel <pmorel@linux.ibm.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-07-22 17:23:45 -05:00
Arnd Bergmann ddd366bf01 ARM: defconfig: address renamed CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO is now implicitly selected if one picks one of the
explicit options that could be DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT,
DEBUG_INFO_DWARF4, DEBUG_INFO_DWARF5.

This was actually not what I had in mind when I suggested making
it a 'choice' statement, but it's too late to change again now,
and the Kconfig logic is more sensible in the new form.

Change any defconfig file that had CONFIG_DEBUG_INFO enabled
but did not pick DWARF4 or DWARF5 explicitly to now pick the toolchain
default.

Fixes: f9b3cd2457 ("Kconfig.debug: make DEBUG_INFO selectable from a choice")
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-22 12:34:00 +02:00
Xu Kuohai 339ed900b3 bpf, arm64: Fix compile error in dummy_tramp()
dummy_tramp() uses "lr" to refer to the x30 register, but some assembler
does not recognize "lr" and reports a build failure:

/tmp/cc52xO0c.s: Assembler messages:
/tmp/cc52xO0c.s:8: Error: operand 1 should be an integer register -- `mov lr,x9'
/tmp/cc52xO0c.s:7: Error: undefined symbol lr used as an immediate value
make[2]: *** [scripts/Makefile.build:250: arch/arm64/net/bpf_jit_comp.o] Error 1
make[1]: *** [scripts/Makefile.build:525: arch/arm64/net] Error 2

So replace "lr" with "x30" to fix it.

Fixes: b2ad54e153 ("bpf, arm64: Implement bpf_arch_text_poke() for arm64")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/bpf/20220721121319.2999259-1-xukuohai@huaweicloud.com
2022-07-22 00:21:16 +02:00
Jakub Kicinski 6e0e846ee2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-21 13:03:39 -07:00
Arnd Bergmann e4866a0da4 Qualcomm ARM64 defconfig more updates for v5.20
This enables a few of the core drivers needed to boot the 8cx Gen 3
 platform and demotes the Qualcomm USB PHY drivers to modules, as they
 don't need to be builtin.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmLYiS8bHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FjjIQANBVwP3aQl7EgVZFwg9I
 eswtfjaQf+z/WyU31rP6h616J/7RiHS6Adhac78Kleyj2jgqMESMmhJ/VzCYBtDp
 JJv7WJYd0vwlKjQdLybChGNtZbH+8IN8XpLceImLwzAFVweb88+WhAiRVEojUM5P
 ZxpyZZGpDlSG4Zxti68NpK5UlhatZbWp0hspGgEDf8sTl9nAQd8MmC5XCUUDwJnz
 iE79xYYHCryIMJ3YQx7F5IRe3DVH9JndtOYJUp688DtjqOAB6LxqY8p1s5HwNngz
 5MVguNjZH6AIypHQHnKofzlFegkFSdnVULzkUjoSpQCxF+fRxhuV/nvj/WFtt+th
 wpXp2j6JYAwzOREBg2UZeHb6vCB3kfGvjlODPFIkj0d9OP/h00tP5ijLPQ0MolP1
 WBtBlUVLaghLbOeW/MONSPsMsywZfb8P5OdT0Kq88ymY316zLEcpomsD8J7WRK8I
 1uvWy5paUEJt2jeD79rM2C88Mdw/4MAkZUhGSvg92gPiOwGNB0cOsHV5ufHlCnV9
 lyn0nTBCRNzP1ZCXQpGNIn1jGXp6akIhQYOh1KOIrdW6UkuAbONoUOQs2ncsF17A
 FryQqvDvbB0T5+NfxxTAC1CJGOjMdMI1kYkfQKtvYax3uvPZSuRsUdOhU5w334Sr
 wYHebeOpJdBlG0CTrsMln/K/
 =KJ5v
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLZTkwACgkQmmx57+YA
 GNlX7A//UGMR9oeb4/HE1TR9z1aibxumFetvFuKbu3NbLxEULNz4B7tpOeezQ88e
 MGidzv/AxExzxo1j3CCELqONp+yg/i4BcK/1/MQilMIhsPvqgyIeISaEH3mL5dQe
 k1YC3jiSKxGcJzZE/j16bTIC2z1TxlCRKcPfFJOM0Wpi8DEUX7i3o/8TkHqZ+EZP
 nlTVnlLw75TwyWX+APL9cXnhjaogUXOBTfenDcA/hSTlNngsdT+JGMIvNgXDsXkf
 B1ZQTg4w4fzaS82ItjgBjnFcrDcfw/BjBHkRjqXbg5cWUXk8zUq8AZ/5m8WusttK
 tBfyc/dUPShEeYLp3aBMyPAMW+sdA/2uRoNLZyzp+jEAUgFq1CYXScaxdrQ9OsHQ
 1JSLXccUszr0m7jJs9HjLkyD8rGJ6/jLrsjE/VvaTxyoupDbVyPXYxq/2IxS4RN4
 nalkXS99Ln4406Wg15CiXsJpnD3IQi+Pxz8KoMcAj5qlykBohpcy0v94kmoIVptG
 Mj7hleVbDspprNS+HDEWq7a5eq9R5RsWrfUXCJG3CqQ59NdirgKOFv20Ha84Oei/
 W5993ZUckrpbEC7cSIlV52lNm2cfuDZ35mqaHtecq4ODNysroNqtMR2LETQJVZrA
 QjWlLA/u7qsmZrr9ZQvo5SrRgJtTSrz+FiqdLzE908pLr6xz25Q=
 =CCqT
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 defconfig more updates for v5.20

This enables a few of the core drivers needed to boot the 8cx Gen 3
platform and demotes the Qualcomm USB PHY drivers to modules, as they
don't need to be builtin.

* tag 'qcom-arm64-defconfig-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: Demote Qualcomm USB PHYs to modules
  arm64: defconfig: Enable Qualcomm SC8280XP providers

Link: https://lore.kernel.org/r/20220720230140.2113129-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-21 15:02:04 +02:00
Arnd Bergmann 2c947cd63b More Qualcomm ARM64 DTS updates for v5.20
Related to SDM845, the Xiaomi Mi Mix2s is introduced, the DB845c on
 SDM845 gains support for the second GPI DMA controller and has the GENI
 I2C and SPI instances wired up to their respective GPI DMA controller.
 
 QCS404 USB controller and PHY assignment is corrected and IPQ8074 gains
 APCS definition to handle outgoing IPC interrupts.
 
 Lastly a range of Devicetree validation issues are addressed.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmLYjLobHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3F5h8QANItInM0qgZTRPXq+x2z
 a2RWDX1YL5hmFR+KnTutC3nr5vjiRkBt6Vx8BCiTp6hKFhP36xKUeMVqUiIZ+M1H
 xBrtQzrLsw/M0xgDYT9b8xiarF+p8ZnKxK9be4hf9/BEvpeK2ec6yqH0UG+Hxv/G
 +346jU7hP5XUUZqLNR/17u5vNl/aWK1plyWC03xxaAX9QD8pS/Or+99HHm4SMC+H
 H9B1V86ul30Hh4Po8u2KPo/xZG6cpd25+FozcapMG8h7YomjphgMT1xqeB7klMVV
 9qQYbjcTD4vXG3/fNyonuj9heoWYgFUPmSfIgnPx8HtHiGmB4BaP65ruWMYu7CfZ
 2sAxk6bcB+CrwktCITeiS0pUNj3ySBrGs3GK8Qde4b5ipVJ5mTbwTVWrJYMRZQrL
 7UakNmkruh08ctVa1wGJfXwnq6j7Q/1SEfi3rHXFlcZJqTQN9KEVKUhD1tXhgZSy
 4DOtdOaoi6eVwc4aslM4EH1NjBEIWTbSNminLeHl8WAVIsxQbHt+/i15hDb47Zd2
 3Ed18iLwqSHuWctobcx0CiTGgRnvIiVckrJO87y1Csdf3YQBOPJ1gkM1CiH4EOUY
 FtsNTYpihJ+xGH5U5vhVqIZ1iBvuaV38ryQs7SaU2E6Z0AHBeD8BP5BO6inBEWnk
 fT1lIyrZcO8mGwrlX7FCJ8UP
 =yD5f
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLZTRkACgkQmmx57+YA
 GNk56g/+MenTEV5wlvuPDGOnrCjejMO1+gOMBNBibJoz5NwvnVZMT9JA+jBlL+4K
 jqwLcGCEcj2Uxi//oCXPazHkp1MNPeDf5l+sDTqYddgl5pURhNljCAv9vGCanFFk
 V+4AtC9o/xiCwtpWGYuTSDOm2IEeeVXdwT2B7Ph3O5ucABczB2zEUAK7F7n9mq+d
 aLefmE8LOTP+a83EBZgKsZ2J/QEtSSRqf3fMURP/kj7zVOjJsCc8AJyXnZjpHHxq
 AGufsPyoWCWQGRJKHbrI7/ofrU/aSH6OsrNJC9SwiyfC0OXRXsD763kPMp+bi499
 1vidjcrPTmmYlJhDolpv3YFnwV695dMNZjRw6oIJ6uyrEI3Ska7ltKJF5W0maiHg
 DT79Cu2Ru/EjAqkfb4DUtopG4hprTeG9IS4uhXTE1edB9N1AZGQrSD0z/jc2J7g9
 inQuM9ljxrU8XvQYSDEv3i6vaA/JM10kcwhI1C33l51XZttzk6rh9xO0DuOpul8p
 08VbXR9SThYnIR6rQLW31BDKldDkugaPUG+v9vaEbodq6E14bSawqLQ63jAsyu+V
 ATfVtaRtadioMgyuIRcQg/Ab73svTjd8/MqLVvCBdZc64NGIibg7DlsObEE0MeFV
 oS6aEzMqKf6rt3bK3zgMBpB7G0iyEkY+X5SN/TcmwasXcY6hXLw=
 =y0DL
 -----END PGP SIGNATURE-----

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

More Qualcomm ARM64 DTS updates for v5.20

Related to SDM845, the Xiaomi Mi Mix2s is introduced, the DB845c on
SDM845 gains support for the second GPI DMA controller and has the GENI
I2C and SPI instances wired up to their respective GPI DMA controller.

QCS404 USB controller and PHY assignment is corrected and IPQ8074 gains
APCS definition to handle outgoing IPC interrupts.

Lastly a range of Devicetree validation issues are addressed.

* tag 'qcom-arm64-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (53 commits)
  arm64: dts: qcom: Add support for Xiaomi Mi Mix2s
  dt-bindings: arm: qcom: Add Xiaomi Mi Mix2s bindings
  dt-bindings: arm: qcom: Document lg,judyln and lg,judyp devices
  dt-bindings: arm: qcom: add missing SM6350 board compatibles
  dt-bindings: arm: qcom: add missing SM6125 board compatibles
  dt-bindings: arm: qcom: add missing SDM845 board compatibles
  dt-bindings: arm: qcom: add missing SDM636 board compatibles
  dt-bindings: arm: qcom: add missing SDM630 board compatibles
  dt-bindings: arm: qcom: add missing QCS404 board compatibles
  dt-bindings: arm: qcom: add missing MSM8992 board compatibles
  dt-bindings: arm: qcom: add missing MSM8998 board compatibles
  dt-bindings: vendor-prefixes: add Shift GmbH
  dt-bindings: arm: qcom: add missing SM8350 board compatibles
  dt-bindings: arm: qcom: add missing SM8250 board compatibles
  dt-bindings: arm: qcom: add missing SM8150 board compatibles
  dt-bindings: arm: qcom: add missing MSM8994 board compatibles
  dt-bindings: arm: qcom: add missing MSM8916 board compatibles
  dt-bindings: arm: qcom: fix MSM8994 boards compatibles
  dt-bindings: arm: qcom: fix MSM8916 MTP compatibles
  dt-bindings: arm: qcom: fix Longcheer L8150 compatibles
  ...

Link: https://lore.kernel.org/r/20220720231643.2114565-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-21 14:56:57 +02:00
Molly Sophia be497abe19 arm64: dts: qcom: Add support for Xiaomi Mi Mix2s
Add support for Xiaomi Mi Mix2s (polaris) handsets.

Currently working features:
- UFS
- Touchscreen
- USB 2
- Bluetooth
- Wi-Fi
- GPU
- Venus
- Display (need jdi-fhd-nt35596s panel driver, which I have sent a
  patch but it haven't been into upstream yet)

Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220712145139.9473-2-mollysophia379@gmail.com
2022-07-20 13:08:42 -05:00
Mark Rutland 1191b6256e arm64: fix KASAN_INLINE
Since commit:

  a004393f45 ("arm64: idreg-override: use early FDT mapping in ID map")

Kernels built with KASAN_INLINE=y die early in boot before producing any
console output. This is because the accesses made to the FDT (e.g. in
generic string processing functions) are instrumented with KASAN, and
with KASAN_INLINE=y any access to an address in TTBR0 results in a bogus
shadow VA, resulting in a data abort.

This patch fixes this by reverting commits:

  7559d9f975 ("arm64: setup: drop early FDT pointer helpers")
  bd0c3fa21878b6d0 ("arm64: idreg-override: use early FDT mapping in ID map")

... and using the TTBR1 fixmap mapping of the FDT.

Note that due to a later commit:

  b65e411d6c ("arm64: Save state of HCR_EL2.E2H before switch to EL1")

... which altered the prototype of init_feature_override() (and
invocation from head.S), commit bd0c3fa21878b6d0 does not revert
cleanly, and I've fixed that up manually.

Fixes: a004393f45 ("arm64: idreg-override: use early FDT mapping in ID map")
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20220713140949.45440-1-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-20 16:08:10 +01:00
Mark Brown a6a468f50d arm64/hwcap: Support FEAT_EBF16
The v9.2 feature FEAT_EBF16 provides support for an extended BFloat16 mode.
Allow userspace to discover system support for this feature by adding a
hwcap for it.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220707103632.12745-4-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-20 11:18:11 +01:00
Mark Brown 60c868eff2 arm64/cpufeature: Store elf_hwcaps as a bitmap rather than unsigned long
When we added support for AT_HWCAP2 we took advantage of the fact that we
have limited hwcaps to the low 32 bits and stored it along with AT_HWCAP
in a single unsigned integer. Thanks to the ever expanding capabilities of
the architecture we have now allocated all 64 of the bits in an unsigned
long so in preparation for adding more hwcaps convert elf_hwcap to be a
bitmap instead, with 64 bits allocated to each AT_HWCAP.

There should be no functional change from this patch.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220707103632.12745-3-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-20 11:18:11 +01:00
Mark Brown d3e4a9d308 arm64/hwcap: Document allocation of upper bits of AT_HWCAP
The top two bits of AT_HWCAP are reserved for use by glibc and the rest of
the top 32 bits are being kept unallocated for potential use by glibc.
Document this in the header.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Link: https://lore.kernel.org/r/20220707103632.12745-2-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-20 11:18:11 +01:00
Barry Song d0637c505f arm64: enable THP_SWAP for arm64
THP_SWAP has been proven to improve the swap throughput significantly
on x86_64 according to commit bd4c82c22c ("mm, THP, swap: delay
splitting THP after swapped out").
As long as arm64 uses 4K page size, it is quite similar with x86_64
by having 2MB PMD THP. THP_SWAP is architecture-independent, thus,
enabling it on arm64 will benefit arm64 as well.
A corner case is that MTE has an assumption that only base pages
can be swapped. We won't enable THP_SWAP for ARM64 hardware with
MTE support until MTE is reworked to coexist with THP_SWAP.

A micro-benchmark is written to measure thp swapout throughput as
below,

 unsigned long long tv_to_ms(struct timeval tv)
 {
 	return tv.tv_sec * 1000 + tv.tv_usec / 1000;
 }

 main()
 {
 	struct timeval tv_b, tv_e;;
 #define SIZE 400*1024*1024
 	volatile void *p = mmap(NULL, SIZE, PROT_READ | PROT_WRITE,
 				MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 	if (!p) {
 		perror("fail to get memory");
 		exit(-1);
 	}

 	madvise(p, SIZE, MADV_HUGEPAGE);
 	memset(p, 0x11, SIZE); /* write to get mem */

 	gettimeofday(&tv_b, NULL);
 	madvise(p, SIZE, MADV_PAGEOUT);
 	gettimeofday(&tv_e, NULL);

 	printf("swp out bandwidth: %ld bytes/ms\n",
 			SIZE/(tv_to_ms(tv_e) - tv_to_ms(tv_b)));
 }

Testing is done on rk3568 64bit Quad Core Cortex-A55 platform -
ROCK 3A.
thp swp throughput w/o patch: 2734bytes/ms (mean of 10 tests)
thp swp throughput w/  patch: 3331bytes/ms (mean of 10 tests)

Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Steven Price <steven.price@arm.com>
Cc: Yang Shi <shy828301@gmail.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Link: https://lore.kernel.org/r/20220720093737.133375-1-21cnbao@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-20 10:52:40 +01:00
Bhupesh Sharma 360d952676 arm64: dts: qcom: qrb5165-rb5: Fix 'dtbs_check' error for led nodes
make dtbs_check currently reports the following errors
with qrb5165-rb5 led nodes:

arch/arm64/boot/dts/qcom/qrb5165-rb5.dtb:
 leds: 'bt', 'user4', 'wlan' do not match any of the regexes:
  '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+'

Fix the same.

Also while at it, fix a blank line issue in the led
node.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220719205058.1004942-3-bhupesh.sharma@linaro.org
2022-07-19 17:20:11 -05:00
Bhupesh Sharma 1282fa32d7 arm64: dts: qcom: qrb5165-rb5: Fix 'dtbs_check' error for lpg nodes
make dtbs_check currently reports the following warnings
with qrb5165-rb5 lpg nodes:

arch/arm64/boot/dts/qcom/qrb5165-rb5.dts:
 Warning (reg_format): /soc@0/spmi@c440000/pmic@5/lpg/led@1:reg:
  property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
arch/arm64/boot/dts/qcom/qrb5165-rb5.dts:
 Warning (avoid_default_addr_size): /soc@0/spmi@c440000/pmic@5/lpg/led@1:
  Relying on default #address-cells value

Fix the same.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220719205058.1004942-2-bhupesh.sharma@linaro.org
2022-07-19 17:20:11 -05:00
Joey Gouly 19198abf3d arm64/mm: use GENMASK_ULL for TTBR_BADDR_MASK_52
The comment says this should be GENMASK_ULL(47, 12), so do that!

GENMASK_ULL() is available in assembly since:
    95b980d62d ("linux/bits.h: make BIT(), GENMASK(), and friends available in assembly")

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Link: https://lore.kernel.org/all/20171221164851.edxq536yobjuagwe@armageddon.cambridge.arm.com/
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Kristina Martsenko <kristina.martsenko@arm.com>
Reviewed-by: Kristina Martsenko <kristina.martsenko@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220708140056.10123-1-joey.gouly@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-19 19:29:04 +01:00
James Morse 44b3834b2e arm64: errata: Remove AES hwcap for COMPAT tasks
Cortex-A57 and Cortex-A72 have an erratum where an interrupt that
occurs between a pair of AES instructions in aarch32 mode may corrupt
the ELR. The task will subsequently produce the wrong AES result.

The AES instructions are part of the cryptographic extensions, which are
optional. User-space software will detect the support for these
instructions from the hwcaps. If the platform doesn't support these
instructions a software implementation should be used.

Remove the hwcap bits on affected parts to indicate user-space should
not use the AES instructions.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: James Morse <james.morse@arm.com>
Link: https://lore.kernel.org/r/20220714161523.279570-3-james.morse@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-19 19:27:01 +01:00
Gavin Shan 9e26cac5f8 arm64: numa: Don't check node against MAX_NUMNODES
When the NUMA nodes are sorted by checking ACPI SRAT (GICC AFFINITY)
sub-table, it's impossible for acpi_map_pxm_to_node() to return
any value, which is greater than or equal to MAX_NUMNODES. Lets drop
the unnecessary check in acpi_numa_gicc_affinity_init().

No functional change intended.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Link: https://lore.kernel.org/r/20220718064232.3464373-1-gshan@redhat.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-19 19:10:28 +01:00
Tomer Maimon 45472f1e53 arm64: defconfig: Add Nuvoton NPCM family support
Enable basic drivers for NPCM8XX booting up support: Architecture, Clock,
and WD.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-19 15:41:04 +02:00
Tomer Maimon f21d8e7165 arm64: dts: nuvoton: Add initial NPCM845 EVB device tree
Add initial Nuvoton NPCM845 evaluation board device tree.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-19 15:41:04 +02:00
Tomer Maimon 6cc82f07fc arm64: dts: nuvoton: Add initial NPCM8XX device tree
This adds initial device tree support for the Nuvoton NPCM845 Board
Management controller (BMC) SoC family.

The NPCM845 based quad-core Cortex-A35 ARMv8 architecture and have
various peripheral IPs.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-19 15:41:04 +02:00
Tomer Maimon 3670d2ec13 arm64: npcm: Add support for Nuvoton NPCM8XX BMC SoC
This adds support for the Nuvoton NPCM8XX Board Management
controller (BMC) SoC family.

The NPCM8XX based quad-core Cortex-A35 ARMv8 architecture.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-19 15:41:03 +02:00
Arnd Bergmann 26c350fe7a mvebu dt64 for 5.20 (part 1)
Add support for Marvell 98DX2530 (and variants)
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCYtavZAAKCRALBhiOFHI7
 1cppAKCTWos36VwvV+vKWV0+DfOUcikV2QCdHLcmQ0ygjT6AsW2/yPJfoNuM4b0=
 =7i0h
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLWsuIACgkQmmx57+YA
 GNlY0xAAqm4ruRmNyoCpkGOjg72+SLJlEZbhELMarHLopKMYrM4fIxyruuGmD1Cp
 r1uv21oZiDJhmr1sXqbtjOghNdsce3s1tKrYoWeMFgFTfDQGu4Bw7NWZZgY5xeqI
 aGxCdFgD9pCYaZgIXYlEqC2qLQP1eGypSTCFjgw+7JWnq57hZxsBYuQnAJhlu79g
 +xpRUVoTEc7duPKE2m2Vb2FhoJVaLSMC5T0ZiqekGX3wAO4JEHwSa8YFLPJ04HGg
 DESXMiWVUPYWrZ86vce6rtn0JWCBRRGeI3rZxsRYQ3xWYMhq27CL3E5PkQcrNwIH
 29gr/Uzu2d5JlJgMSyT8bk+79eHbvhQoX/Daossk3DvHCOfRjv3/POdYqfaoWGAd
 nq3W5oxW4X+8eXP/zY7p4o7i/y03j0/VtbgtCUEOk3OkL5idqQxXeJTnr1XSPdm4
 NnAAhB1xTZ8o3v8ohMAIuNvdFbJ3Mq0o+xuYPRVSJwLPgnXfpQfWMdI9Ag4eK7MI
 1wkV9g8SFwqvd/vZyI+6jYYo8FPkc0JYvs88cAMXy1Tjw6ywRKprUlBrM2My9tre
 Ta3b2W1JUHYrniQoet+Z0GKg5xOtjkS9K9n4P3/ilq8zNYCURSaJCGmdOLwQw4Zs
 ZB7/PFQcLRVMBEJ913RefxcJG5ShnOiwrLtYIsB1wI0SRn3VAMw=
 =FqlL
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt64-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt

mvebu dt64 for 5.20 (part 1)

Add support for Marvell 98DX2530 (and variants)

* tag 'mvebu-dt64-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  arm64: marvell: enable the 98DX2530 pinctrl driver
  arm64: dts: marvell: Add Armada 98DX2530 SoC and RD-AC5X board
  dt-bindings: marvell: Document the AC5/AC5X compatibles

Link: https://lore.kernel.org/r/87cze1qlg3.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-19 15:34:26 +02:00
Chris Packham 8225663e0c arm64: marvell: enable the 98DX2530 pinctrl driver
This commit makes sure the drivers for the 98DX2530 pin controller is
enabled.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-07-19 15:15:00 +02:00
Chris Packham b795fadfc4 arm64: dts: marvell: Add Armada 98DX2530 SoC and RD-AC5X board
The 98DX2530 SoC is the Control and Management CPU integrated into
the Marvell 98DX25xx and 98DX35xx series of switch chip (internally
referred to as AlleyCat5 and AlleyCat5X).

These files have been taken from the Marvell SDK and lightly cleaned
up with the License and copyright retained.

gregory.clement: use specific cpu type: cortex-a55 instead of armv8 in
cpu nodes, armv8 being reserved for the arm virtual models that are
not meant to implement a particular CPU type.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2022-07-19 15:12:43 +02:00
Bjorn Andersson 746ff2bfce arm64: dts: qcom: sdm845-db845c: Specify a i2c bus clocks
The kernel log contains complaints about i2c11 and i2c14 lacking
clock-frequency, specify a reasonable value to suppress this warning.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20220717034403.2135027-4-bjorn.andersson@linaro.org
2022-07-18 23:33:28 -05:00
Bjorn Andersson 79cfb1124a arm64: dts: qcom: sdm845-db845c: Enable gpi_dma1
Enable gpi_dma1 so that i2c14 is able to find its DMA controller.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20220717034403.2135027-3-bjorn.andersson@linaro.org
2022-07-18 23:33:28 -05:00
Bjorn Andersson 0f064ae7cf arm64: dts: qcom: sdm845: Fill in GENI DMA references
The I2C and SPI might be configured in GPI DMA mode, fill in the
properties needed for this.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20220717034403.2135027-2-bjorn.andersson@linaro.org
2022-07-18 23:33:28 -05:00
Kuogee Hsieh 8ed85d1e51 arm64: dts: qcom: sc7280: delete vdda-1p2 and vdda-0p9 from both dp and edp
Both vdda-1p2-supply and vdda-0p9-supply regulators are controlled
by dp combo phy. Therefore remove them from dp controller.

Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1657556603-15024-1-git-send-email-quic_khsieh@quicinc.com
2022-07-18 18:56:57 -05:00
Bjorn Andersson 01579b88a0 arm64: defconfig: Demote Qualcomm USB PHYs to modules
The Qualcomm USB PHYs are not critical for reaching the ramdisk to load
modules, so they can be demoted to be built as such instead of builtin.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20220712031821.4134712-1-bjorn.andersson@linaro.org
2022-07-18 18:56:02 -05:00
Steev Klimaszewski 757991c077 arm64: dts: sdm850: Remove unnecessary turbo-mode
qcom-cpufreq-hw finds turbo-mode in the LUT hardware tables
and slaps the flag on the last element, so there's no reason
to add it in the dts, so remove it.

Signed-off-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220718230109.8193-1-steev@kali.org
2022-07-18 18:10:52 -05:00
Steev Klimaszewski 5969d3290f arm64: dts: qcom: sc8280xp: add missing 300MHz
When booting a Thinkpad x13s, we see the message

[    0.997647] cpu cpu0: failed to update OPP for freq=300000

So, lets add in 300MHz to make it happy

Signed-off-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220718225714.8074-1-steev@kali.org
2022-07-18 18:02:24 -05:00
Jason A. Donenfeld 9592eef7c1 random: remove CONFIG_ARCH_RANDOM
When RDRAND was introduced, there was much discussion on whether it
should be trusted and how the kernel should handle that. Initially, two
mechanisms cropped up, CONFIG_ARCH_RANDOM, a compile time switch, and
"nordrand", a boot-time switch.

Later the thinking evolved. With a properly designed RNG, using RDRAND
values alone won't harm anything, even if the outputs are malicious.
Rather, the issue is whether those values are being *trusted* to be good
or not. And so a new set of options were introduced as the real
ones that people use -- CONFIG_RANDOM_TRUST_CPU and "random.trust_cpu".
With these options, RDRAND is used, but it's not always credited. So in
the worst case, it does nothing, and in the best case, maybe it helps.

Along the way, CONFIG_ARCH_RANDOM's meaning got sort of pulled into the
center and became something certain platforms force-select.

The old options don't really help with much, and it's a bit odd to have
special handling for these instructions when the kernel can deal fine
with the existence or untrusted existence or broken existence or
non-existence of that CPU capability.

Simplify the situation by removing CONFIG_ARCH_RANDOM and using the
ordinary asm-generic fallback pattern instead, keeping the two options
that are actually used. For now it leaves "nordrand" for now, as the
removal of that will take a different route.

Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-07-18 15:03:37 +02:00
Anshuman Khandual 3d923c5f1e mm/mmap: drop ARCH_HAS_VM_GET_PAGE_PROT
Now all the platforms enable ARCH_HAS_GET_PAGE_PROT.  They define and
export own vm_get_page_prot() whether custom or standard
DECLARE_VM_GET_PAGE_PROT.  Hence there is no need for default generic
fallback for vm_get_page_prot().  Just drop this fallback and also
ARCH_HAS_GET_PAGE_PROT mechanism.

Link: https://lkml.kernel.org/r/20220711070600.2378316-27-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Brian Cain <bcain@quicinc.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: Will Deacon <will@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-07-17 17:14:41 -07:00
Anshuman Khandual 42251045cc arm64/mm: move protection_map[] inside the platform
This moves protection_map[] inside the platform and makes it a static.

Link: https://lkml.kernel.org/r/20220711070600.2378316-6-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Brian Cain <bcain@quicinc.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Chris Zankel <chris@zankel.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-07-17 17:14:37 -07:00
Baolin Wang 1bcdb769f9 arm64/hugetlb: implement arm64 specific hugetlb_mask_last_page
The HugeTLB address ranges are linearly scanned during fork, unmap and
remap operations, and the linear scan can skip to the end of range mapped
by the page table page if hitting a non-present entry, which can help to
speed linear scanning of the HugeTLB address ranges.

So hugetlb_mask_last_page() is introduced to help to update the address in
the loop of HugeTLB linear scanning with getting the last huge page mapped
by the associated page table page[1], when a non-present entry is
encountered.

Considering ARM64 specific cont-pte/pmd size HugeTLB, this patch
implemented an ARM64 specific hugetlb_mask_last_page() to help this case.

[1] https://lore.kernel.org/linux-mm/20220527225849.284839-1-mike.kravetz@oracle.com/

[baolin.wang@linux.alibaba.com: fix build]
  Link: https://lkml.kernel.org/r/a14e7b39-6a8a-4609-b4a1-84ac574f5c96@linux.alibaba.com
Link: https://lkml.kernel.org/r/20220621235620.291305-3-mike.kravetz@oracle.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Acked-by: Muchun Song <songmuchun@bytedance.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: James Houghton <jthoughton@google.com>
Cc: kernel test robot <lkp@intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Naoya Horiguchi <naoya.horiguchi@linux.dev>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-07-17 17:14:34 -07:00
Marc Zyngier ae98a4a989 Merge branch kvm-arm64/sysreg-cleanup-5.20 into kvmarm-master/next
* kvm-arm64/sysreg-cleanup-5.20:
  : .
  : Long overdue cleanup of the sysreg userspace access,
  : with extra scrubbing on the vgic side of things.
  : From the cover letter:
  :
  : "Schspa Shi recently reported[1] that some of the vgic code interacting
  : with userspace was reading uninitialised stack memory, and although
  : that read wasn't used any further, it prompted me to revisit this part
  : of the code.
  :
  : Needless to say, this area of the kernel is pretty crufty, and shows a
  : bunch of issues in other parts of the KVM/arm64 infrastructure. This
  : series tries to remedy a bunch of them:
  :
  : - Sanitise the way we deal with sysregs from userspace: at the moment,
  :   each and every .set_user/.get_user callback has to implement its own
  :   userspace accesses (directly or indirectly). It'd be much better if
  :   that was centralised so that we can reason about it.
  :
  : - Enforce that all AArch64 sysregs are 64bit. Always. This was sort of
  :   implied by the code, but it took some effort to convince myself that
  :   this was actually the case.
  :
  : - Move the vgic-v3 sysreg userspace accessors to the userspace
  :   callbacks instead of hijacking the vcpu trap callback. This allows
  :   us to reuse the sysreg infrastructure.
  :
  : - Consolidate userspace accesses for both GICv2, GICv3 and common code
  :   as much as possible.
  :
  : - Cleanup a bunch of not-very-useful helpers, tidy up some of the code
  :   as we touch it.
  :
  : [1] https://lore.kernel.org/r/m2h740zz1i.fsf@gmail.com"
  : .
  KVM: arm64: Get rid or outdated comments
  KVM: arm64: Descope kvm_arm_sys_reg_{get,set}_reg()
  KVM: arm64: Get rid of find_reg_by_id()
  KVM: arm64: vgic: Tidy-up calls to vgic_{get,set}_common_attr()
  KVM: arm64: vgic: Consolidate userspace access for base address setting
  KVM: arm64: vgic-v2: Add helper for legacy dist/cpuif base address setting
  KVM: arm64: vgic: Use {get,put}_user() instead of copy_{from.to}_user
  KVM: arm64: vgic-v2: Consolidate userspace access for MMIO registers
  KVM: arm64: vgic-v3: Consolidate userspace access for MMIO registers
  KVM: arm64: vgic-v3: Use u32 to manage the line level from userspace
  KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP
  KVM: arm64: vgic-v3: Make the userspace accessors use sysreg API
  KVM: arm64: vgic-v3: Push user access into vgic_v3_cpu_sysregs_uaccess()
  KVM: arm64: vgic-v3: Simplify vgic_v3_has_cpu_sysregs_attr()
  KVM: arm64: Get rid of reg_from/to_user()
  KVM: arm64: Consolidate sysreg userspace accesses
  KVM: arm64: Rely on index_to_param() for size checks on userspace access
  KVM: arm64: Introduce generic get_user/set_user helpers for system registers
  KVM: arm64: Reorder handling of invariant sysregs from userspace
  KVM: arm64: Add get_reg_by_id() as a sys_reg_desc retrieving helper

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:58 +01:00
Marc Zyngier 4274d42716 KVM: arm64: Get rid or outdated comments
Once apon a time, the 32bit KVM/arm port was the reference, while
the arm64 version was the new kid on the block, without a clear
future... This was a long time ago.

"The times, they are a-changing."

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:34 +01:00
Marc Zyngier c5332898dc KVM: arm64: Descope kvm_arm_sys_reg_{get,set}_reg()
Having kvm_arm_sys_reg_get_reg and co in kvm_host.h gives the
impression that these functions are free to be called from
anywhere.

Not quite. They really are tied to out internal sysreg handling,
and they would be better off in the sys_regs.h header, which is
private. kvm_host.h could also get a bit of a diet, so let's
just do that.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier f6dddbb255 KVM: arm64: Get rid of find_reg_by_id()
This helper doesn't have a user anymore, let's get rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier 619064afa9 KVM: arm64: vgic: Tidy-up calls to vgic_{get,set}_common_attr()
The userspace accessors have an early call to vgic_{get,set}_common_attr()
that makes the code hard to follow. Move it to the default: clause of
the decoding switch statement, which results in a nice cleanup.

This requires us to move the handling of the pending table into the
common handling, even if it is strictly a GICv3 feature (it has the
benefit of keeping the whole control group handling in the same
function).

Also cleanup vgic_v3_{get,set}_attr() while we're at it, deduplicating
the calls to vgic_v3_attr_regs_access().

Suggested-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier 4b85080f4e KVM: arm64: vgic: Consolidate userspace access for base address setting
Align kvm_vgic_addr() with the rest of the code by moving the
userspace accesses into it. kvm_vgic_addr() is also made static.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier 9f968c9266 KVM: arm64: vgic-v2: Add helper for legacy dist/cpuif base address setting
We carry a legacy interface to set the base addresses for GICv2.
As this is currently plumbed into the same handling code as
the modern interface, it limits the evolution we can make there.

Add a helper dedicated to this handling, with a view of maybe
removing this in the future.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier d7df6f282d KVM: arm64: vgic: Use {get,put}_user() instead of copy_{from.to}_user
Tidy-up vgic_get_common_attr() and vgic_set_common_attr() to use
{get,put}_user() instead of the more complex (and less type-safe)
copy_{from,to}_user().

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier 7e9f723c2a KVM: arm64: vgic-v2: Consolidate userspace access for MMIO registers
Align the GICv2 MMIO accesses from userspace with the way the GICv3
code is now structured.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier e1246f3f2d KVM: arm64: vgic-v3: Consolidate userspace access for MMIO registers
For userspace accesses to GICv3 MMIO registers (and related data),
vgic_v3_{get,set}_attr are littered with {get,put}_user() calls,
making it hard to audit and reason about.

Consolidate all userspace accesses in vgic_v3_attr_regs_access(),
making the code far simpler to audit.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier 38cf0bb762 KVM: arm64: vgic-v3: Use u32 to manage the line level from userspace
Despite the userspace ABI clearly defining the bits dealt with by
KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO as a __u32, the kernel uses a u64.

Use a u32 to match the userspace ABI, which will subsequently lead
to some simplifications.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier 71c3c7753c KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP
The GICv3 userspace accessors are all about dealing with conversion
between fields from architectural registers and internal representations.

However, and owing to the age of this code, the accessors use
a combination of shift/mask that is hard to read. It is nonetheless
easy to make it better by using the FIELD_{GET,PREP} macros that solely
rely on a mask.

This results in somewhat nicer looking code, and is probably easier
to maintain.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier cbcf14dd23 KVM: arm64: vgic-v3: Make the userspace accessors use sysreg API
The vgic-v3 sysreg accessors have been ignored as the rest of the
sysreg internal API was evolving, and are stuck with the .access
method (which is normally reserved to the guest's own access)
for the userspace accesses (which should use the .set/.get_user()
methods).

Catch up with the program and repaint all the accessors so that
they fit into the normal userspace model, and plug the result into
the helpers that have been introduced earlier.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier db25081e14 KVM: arm64: vgic-v3: Push user access into vgic_v3_cpu_sysregs_uaccess()
In order to start making the vgic sysreg access from userspace
similar to all the other sysregs, push the userspace memory
access one level down into vgic_v3_cpu_sysregs_uaccess().

The next step will be to rely on the sysreg infrastructure
to perform this task.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier b61fc0857a KVM: arm64: vgic-v3: Simplify vgic_v3_has_cpu_sysregs_attr()
Finding out whether a sysreg exists has little to do with that
register being accessed, so drop the is_write parameter.

Also, the reg pointer is completely unused, and we're better off
just passing the attr pointer to the function.

This result in a small cleanup of the calling site, with a new
helper converting the vGIC view of a sysreg into the canonical
one (this is purely cosmetic, as the encoding is the same).

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier 5a420ed964 KVM: arm64: Get rid of reg_from/to_user()
These helpers are only used by the invariant stuff now, and while
they pretend to support non-64bit registers, this only serves as
a way to scare the casual reviewer...

Replace these helpers with our good friends get/put_user(), and
don't look back.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier 978ceeb3e4 KVM: arm64: Consolidate sysreg userspace accesses
Until now, the .set_user and .get_user callbacks have to implement
(directly or not) the userspace memory accesses. Although this gives
us maximem flexibility, this is also a maintenance burden, making it
hard to audit, and I'd feel much better if it was all located in
a single place.

So let's do just that, simplifying most of the function signatures
in the process (the callbacks are now only concerned with the
data itself, and not with userspace).

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier e48407ff97 KVM: arm64: Rely on index_to_param() for size checks on userspace access
index_to_param() already checks that we use 64bit accesses for all
registers accessed from userspace.

However, we have extra checks in other places (such as index_to_params),
which is pretty confusing. Get rid off these redundant checks.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier ba23aec9f4 KVM: arm64: Introduce generic get_user/set_user helpers for system registers
The userspace access to the system registers is done using helpers
that hardcode the table that is looked up. extract some generic
helpers from this, moving the handling of hidden sysregs into
the core code.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier 1deeffb559 KVM: arm64: Reorder handling of invariant sysregs from userspace
In order to allow some further refactor of the sysreg helpers,
move the handling of invariant sysreg to occur before we handle
all the other ones.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:33 +01:00
Marc Zyngier da8d120fba KVM: arm64: Add get_reg_by_id() as a sys_reg_desc retrieving helper
find_reg_by_id() requires a sys_reg_param as input, which most
users provide as a on-stack variable, but don't make any use of
the result.

Provide a helper that doesn't have this requirement and simplify
the callers (all but one).

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:55:32 +01:00
Marc Zyngier aeb7942b64 Merge branch kvm-arm64/misc-5.20 into kvmarm-master/next
* kvm-arm64/misc-5.20:
  : .
  : Misc fixes for 5.20:
  :
  : - Tidy up the hyp/nvhe Makefile
  :
  : - Fix functions pointlessly returning a void value
  :
  : - Fix vgic_init selftest to handle the GICv3-on-v3 case
  :
  : - Fix hypervisor symbolisation when CONFIG_RANDOMIZE_BASE=y
  : .
  KVM: arm64: Fix hypervisor address symbolization
  KVM: arm64: selftests: Add support for GICv2 on v3
  KVM: arm64: Don't return from void function
  KVM: arm64: nvhe: Add intermediates to 'targets' instead of extra-y
  KVM: arm64: nvhe: Rename confusing obj-y

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-07-17 11:45:22 +01:00
Kalesh Singh ed6313a93f KVM: arm64: Fix hypervisor address symbolization
With CONFIG_RANDOMIZE_BASE=y vmlinux addresses will resolve incorrectly
from kallsyms. Fix this by adding the KASLR offset before printing the
symbols.

Fixes: 6ccf9cb557 ("KVM: arm64: Symbolize the nVHE HYP addresses")
Reported-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220715235824.2549012-1-kaleshsingh@google.com
2022-07-17 11:43:40 +01:00
Johan Hovold 5b7e3499e3 arm64: dts: qcom: reorder USB interrupts
Three SoCs did not follow the interrupt order specified by the USB
controller binding.

While keeping the non-SuperSpeed interrupts together seems natural,
reorder the interrupts to match the binding.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
[bjorn: Omitted sdx65 part from this patch]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220715070248.19078-5-johan+linaro@kernel.org
2022-07-16 21:30:43 -05:00
Johan Hovold 2a8d28b8af arm64: dts: qcom: sc7280: reorder USB interrupts
Only one of the USB controllers supports SuperSpeed and have an SS PHY
wakeup interrupt.

Reorder the interrupts so that they match the updated binding which
specifically has the optional interrupt last.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220715070248.19078-4-johan+linaro@kernel.org
2022-07-16 21:30:12 -05:00
Johan Hovold 0bd6b33c51 arm64: dts: qcom: sc8280xp: fix USB interrupts
The two single-port SC8280XP USB controllers do not have an hs_phy_irq
interrupt. Instead they have a pwr_event interrupt which is distinct
from the former and not yet supported by the driver.

Fix the USB node interrupt names so that they match the devicetree
binding.

Also fix the pwr_event interrupt of the second controller which should
be 811 as noticed by Andrew Halaney.

Fixes: 152d1faf1e ("arm64: dts: qcom: add SC8280XP platform")
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220715070248.19078-3-johan+linaro@kernel.org
2022-07-16 21:30:12 -05:00
Johan Hovold 68af5d7c6d arm64: dts: qcom: sc8280xp: fix USB clock order and naming
Fix the USB controller clock order and naming so that they match the
devicetree binding.

Note that the driver currently simply enables all clocks in the order
that they are specified in the devicetree. Reordering the clocks as per
the binding means that the only explicit ordering constraint found in
the vendor driver, that cfg_noc should be enabled before the core_clk,
is now honoured.

Fixes: 152d1faf1e ("arm64: dts: qcom: add SC8280XP platform")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220715070248.19078-2-johan+linaro@kernel.org
2022-07-16 21:30:12 -05:00
Arnd Bergmann 2c071ce53d This pull request contains Broadcom ARM64-based SoCs Device Tree changes
for 5.20, second part, please pull the following:
 
 - Rafal adds basic support for the BCM4912-based router Asus GT-AX6000,
   he also has ARCH_BCM4908 select ARCH_BCMBCA such that in the next cycle
   we can remove ARCH_BCM4908 and continue to have make oldconfig work.
   Finally he spells out what BCA means to make it clearer
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmLR5GMACgkQh9CWnEQH
 BwTQCxAAxaALuW5N/uso6vj64Zc/sLkrWupmjcz0ta57lnRus2K7CjpEGbiYEvU9
 BXj4o9jNWpugCp5MwMzRSnQCC6AcrrS7vV3aLblxVwP4Dqlvb3h1i1N8qGzVJKVC
 vurbroIcCjqSx9J0i/bhD+X5Jyc0WYgwJajxSTU3so9YpD0asUHN/sOrz8t/LgW+
 NmUwr3toe7WpvylV5eRPyqKGUWDZYhg0qePaKZJ6jgM9cQqlwIWzguWdCn6YEHZe
 9EqQZjqstyq57EwNXfPOf8Ytb2/lp2j9/1NCBaJ6TFEUEruGWgHFh2m8mV0juEKG
 3y0lnsh5GXhshvT6+kUKzXY1MwzHagAPv1ax0To1Zc5rsgKMIuo11We3XDVlu326
 NHUXqQSoubBf5PE4jmmrpN3ay0ouXMSo0PjNZzSvS3TAWz76+q6WU4bgqvEf+vNE
 5XOhAATbWY+Zpt/m9Xv0l1pP2UzdENF+lpi5T9XAnygA3N0cMB3uhxAUmGHVekIJ
 4OPS2w2M0N2C43icb188o0GiswnzVZTw46SSY0gTEU6FQD3YplMtztbrK3Lr6F8q
 13C/aoXY/+xgeMnsFD4Te1JfdHEknzhNT7mkOsYYKDZJGhlrShHnrRXze3QDkn18
 OAkg7v+z4lkt2h7Xckoo9vVqJKrYE1582H5QmPOKQKzk0pIecFM=
 =fDSG
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLTFe0ACgkQmmx57+YA
 GNk0pBAAge+TlunaSMIGcYrh3q0If3krLoWyecACCA1TDP5K8PkEKrPok+u1rusl
 OeL6s/nL0uIdGEIU+6scGav/ZSFYr20vtstnyP2WmwQQUt3oEeqMfE1Ch/kCNL/K
 WhgwvNQA9GcvQphHSrwfZY2kHLkPUGgFA9cleaEghjuqs0kP46OABaRNIUZVRHMZ
 dp7SzzY/55TmxQQiYD6raAI8U0kxAaPxzqo+4sBcvNyccKfrAZP9WGyTsTmyn6uV
 IN+sAwsMS1WGAgXL0zQWAxEVxNdvbnt8q9+/tBzIIeZZYdeA0B/m5ZJ3DUaa8/kY
 zfH5UM8kNKUQx2cwdTNYiUT7YGdbZ+9iUCbiSUt9ELK0LMl1Rhu7i4wPA+K7/8Kn
 10o+6kjj75kYjA3fm3wntFgtmTZLPRqpz5AQf4+XwdQ8QkiXNNCglYCUnEf9cvaQ
 ThFyIFfadOB2uCEJ+59kg7v8cQNLZffrNGqks0mD9/MDbRD3kMEZYrwMaGrxeeSz
 3HVANUWXLoM0wyI7lC+vLwYgbGwtcglOEprtfPA9MvSUTfJPyZ7bYOnX0zBCwdLX
 tN1g/gIbYkQ80t/ce+HQc4sfxPgkk8W5D8eTy+t50BReEguJ39AVKByxVZLLnW/h
 ZwmwRrqSKD9d2Ps69K7z4nMJAEO/5mqbDw8++U18eqhDUJK+8Kw=
 =7JrY
 -----END PGP SIGNATURE-----

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

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

- Rafal adds basic support for the BCM4912-based router Asus GT-AX6000,
  he also has ARCH_BCM4908 select ARCH_BCMBCA such that in the next cycle
  we can remove ARCH_BCM4908 and continue to have make oldconfig work.
  Finally he spells out what BCA means to make it clearer

* tag 'arm-soc/for-5.20/devicetree-arm64-part2' of https://github.com/Broadcom/stblinux:
  arm64: bcmbca: Include full family name in Kconfig
  arm64: make ARCH_BCM4908 select ARCH_BCMBCA
  arm64: dts: Add base DTS file for bcmbca device Asus GT-AX6000

Link: https://lore.kernel.org/r/20220715221642.297536-3-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-16 21:47:57 +02:00
Johan Hovold 1583984623 arm64: dts: qcom: sc8280xp: fix usb_1 ssphy irq
Fix the usb_1 SS PHY interrupt, which was mistakingly replaced with one
of the usb_2 PHY interrupts.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220715165344.28822-1-johan+linaro@kernel.org
2022-07-16 10:18:15 -05:00
Manivannan Sadhasivam 39aa5646ad arm64: dts: qcom: sc8280xp: Fix PMU interrupt
PPI interrupt should be 7 for the PMU.

Cc: Johan Hovold <johan+linaro@kernel.org>
Fixes: 152d1faf1e ("arm64: dts: qcom: add SC8280XP platform")
Reported-by: Steve Capper <Steve.Capper@arm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220713143429.22624-1-manivannan.sadhasivam@linaro.org
2022-07-16 10:18:15 -05:00
Parikshit Pareek 1189a9cf14 arm64: dts: qcom: sc8280xp: fix the smmu interrupt values
There has been wrong values introduced for context interrupt for
smu node apps_smmu. Fix those ones with due correction.

Fixes: 152d1faf1e ("arm64: dts: qcom: add SC8280XP platform")
Signed-off-by: Parikshit Pareek <quic_ppareek@quicinc.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220711174133.28882-1-quic_ppareek@quicinc.com
2022-07-16 10:18:15 -05:00
Sumit Garg 58577966a4 arm64: dts: qcom: qcs404: Fix incorrect USB2 PHYs assignment
Currently the DT for QCS404 SoC has setup for 2 USB2 PHYs with one each
assigned to USB3 controller and USB2 controller. This assignment is
incorrect which only works by luck: as when each USB HCI comes up it
configures the *other* controllers PHY which is enough to make them
happy. If, for any reason, we were to disable one of the controllers then
both would stop working.

This was a difficult inconsistency to be caught which was found while
trying to enable USB support in u-boot. So with all the required drivers
ported to u-boot, I couldn't get the same USB storage device enumerated
in u-boot which was being enumerated fine by the kernel.

The root cause of the problem came out to be that I wasn't enabling USB2
PHY: "usb2_phy_prim" in u-boot. Then I realised that via simply disabling
the same USB2 PHY currently assigned to USB2 host controller in the
kernel disabled enumeration for USB3 host controller as well.

So fix this inconsistency by correctly assigning USB2 PHYs.

Fixes: 9375e7d719 ("arm64: dts: qcom: qcs404: Add USB devices and PHYs")
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220711083038.1518529-1-sumit.garg@linaro.org
2022-07-16 10:18:15 -05:00
Dmitry Baryshkov f32894b8d8 arm64: dts: qcom: sc7280: drop unused clocks from eDP node
The eDP node includes two clocks which are used by the eDP PHY rather
than eDP controller itself. Drop these clocks to remove extra difference
between eDP and DP controllers.

Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220710084133.30976-7-dmitry.baryshkov@linaro.org
2022-07-16 10:18:14 -05:00
Dmitry Baryshkov 97e5c82d4e arm64: dts: qcom: sc7280: drop address/size-cells from eDP node
Drop #address/#size-cells from eDP device node. For eDP the panels are
not described directly under the controller node. They are either
present under aux-bus child node, or they are declared separately (e.g.
in a /soc node).

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220710084133.30976-6-dmitry.baryshkov@linaro.org
2022-07-16 10:18:14 -05:00
Dmitry Baryshkov 0f1e23651a arm64: dts: qcom: sc7280: drop #clock-cells from displayport-controller
Drop #clock-cells from DP device node. It is a leftover from the times
before splitting the deviice into controller and PHY devices. Now the
clocks are provided by the PHY, while the controller doesn't provide any
clocks.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220710084133.30976-5-dmitry.baryshkov@linaro.org
2022-07-16 10:18:14 -05:00
Dmitry Baryshkov 3c14a456ee arm64: dts: qcom: sc7280: split register block for DP controller
Follow the schema for the DP controller and declare 5 register regions
instead of using a single region for all the registers. Note, this
extends the dts by adding p1 region to the DP node (to be used for DP
MST).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220710084133.30976-4-dmitry.baryshkov@linaro.org
2022-07-16 10:18:14 -05:00
Dmitry Baryshkov ae0f7e1d97 arm64: dts: qcom: sc7180: drop #clock-cells from displayport-controller
Drop #clock-cells from DP device node. It is a leftover from the times
before splitting the device into controller and PHY devices. Now the
clocks are provided by the PHY, while the controller doesn't provide any
clocks.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220710084133.30976-3-dmitry.baryshkov@linaro.org
2022-07-16 10:18:14 -05:00
Dmitry Baryshkov b7b17c6bf3 arm64: dts: qcom: sc7180: split register block for DP controller
Follow the schema for the DP controller and declare 5 register regions
instead of using a single region for all the registers. Note, this
extends the dts by adding p1 region to the DP node (to be used for DP
MST).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220710084133.30976-2-dmitry.baryshkov@linaro.org
2022-07-16 10:18:14 -05:00
Srinivasa Rao Mandadapu 49ac5e0c30 arm64: dts: qcom: sc7280: Move wcd specific pin conf to common file
Move wcd specific pin conf to common file to support various
herbronie variant boards and to avoid duplicate nodes in dts files.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1657197381-1271-1-git-send-email-quic_srivasam@quicinc.com
2022-07-16 10:18:14 -05:00
Marijn Suijten 2aa54fa87c arm64: dts: qcom: msm8998: Make regulator voltages multiple of step-size
These voltages are not a multiple of the given step-size 8000 (with base
voltage 1664000) in pm8998_pldo, resulting in PLDO regulators l18 and
l22 failing to validate and in turn not probing the rpm-pm8998-regulator
driver:

    l18: unsupportable voltage constraints 2856000-2848000uV
    qcom_rpm_smd_regulator rpm-glink:rpm-requests:pm8998-regulators: l18: devm_regulator_register() failed, ret=-22

Round the voltages down for the sake of erring on the safe side, leaving
a comment in place to document this discrepancy wrt downstream sources.

Fixes: 390883af89 ("arm64: dts: qcom: msm8998: Introduce support for Sony Yoshino platform")
Reported-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220507153627.1478268-1-marijn.suijten@somainline.org
2022-07-16 10:18:14 -05:00
Marijn Suijten 7a9016dbc8 arm64: dts: qcom: sm6350: Replace literal rpmhpd indices with constants
It seems the SM6350_CX definition was temporarily replaced with its
literal value 0 in 1797e1c9a9 ("arm64: dts: qcom: sm6350: Add SDHCI1/2
nodes") to prevent a dependency on the qcom-rpmpd.h header patch being
available prior to this DT patch being applied, similar to c23f1b7735
("arm64: dts: qcom: sm6125: Avoid using missing SM6125_VDDCX").
However, unlike the revert of that in the sm6125 tree the next merge
window around in a90b8adfa2 ("Revert "arm64: dts: qcom: sm6125: Avoid
using missing SM6125_VDDCX""), this has not yet happened for sm6350:
replace them back now that the definitions are definitely available.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220507224645.2238421-1-marijn.suijten@somainline.org
2022-07-16 10:18:14 -05:00
Robert Marko b97e6ffa7c arm64: dts: qcom: ipq8074: add interrupt-parent to DTSI
Add interrupt-parent to the SoC DTSI to avoid duplicating it in each board
DTS file.

Remove interrupt-parent from existing board DTS files.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220708133846.599735-2-robimarko@gmail.com
2022-07-16 10:18:14 -05:00
Robert Marko f32660459d arm64: dts: qcom: ipq8074: add #size/address-cells to DTSI
Add #size-cells and #address-cells to the SoC DTSI to avoid duplicating
the same properties in board DTS files.

Remove the mentioned properties from current board DTS files.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220708133846.599735-1-robimarko@gmail.com
2022-07-16 10:18:14 -05:00
Dmitry Baryshkov ce5cf986cd arm64: dts: qcom: sm8250: rename DPU device node
Rename DPU device node to display-controller@ae01000 to follow the
DPU schema.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220708091656.2769390-3-dmitry.baryshkov@linaro.org
2022-07-16 10:18:14 -05:00
Dmitry Baryshkov 37e3558b79 arm64: dts: qcom: sc7180: rename DPU device node
Rename DPU device node to display-controller@ae01000 to follow the
DPU schema.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220708091656.2769390-2-dmitry.baryshkov@linaro.org
2022-07-16 10:18:14 -05:00
Dmitry Baryshkov 1d52eb6cc8 arm64: dts: qcom: sdm845: rename DPU device node
Rename DPU device node to display-controller@ae01000 to follow the
DPU schema.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220708091656.2769390-1-dmitry.baryshkov@linaro.org
2022-07-16 10:18:14 -05:00
Robert Marko 50ed9fffec arm64: dts: qcom: ipq8074: add APCS node
APCS now has support for providing the APSS clocks as the child device
for IPQ8074.

So, add the required DT node for it as it will later be used as the CPU
clocksource.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[bjorn: Sorted node based on address]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220707173733.404947-4-robimarko@gmail.com
2022-07-16 10:18:09 -05:00
Rafał Miłecki 746ef3ac89 arm64: bcmbca: Include full family name in Kconfig
Spell out the BCA acronym to explain where these chips are coming from.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20220713145340.10599-1-zajec5@gmail.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-07-15 14:59:08 -07:00
Rafał Miłecki 32d3da7d2f arm64: make ARCH_BCM4908 select ARCH_BCMBCA
BCA is a big set / family of devices sharing multiple hardware blocks.
It covers BCM4908, BCM63xx, BCM68xx devices and more.

Most of drivers that depend on ARCH_BCM4908 should actually depend on
ARCH_BCMBCA. To make such transition easier, cleaner and breakage-free
add a proper "select".

Later on - if we decide to keep ARCH_BCM4908 - it may be moved under
ARCH_BCMBCA menu. Keeping it may be helpful for limited compiling of DTS
files and "default" Kconfig entires. Or we may just decide to drop it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: William Zhang <william.zhang@broadcom.com>
Acked-by: Kursad Oney <kursad.oney@broadcom.com>
Link: https://lore.kernel.org/r/20220714045858.7786-1-zajec5@gmail.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-07-15 14:56:20 -07:00
Linus Torvalds 1c49f281c9 ARM: SoC fixes for 5.19, part 3
Most of the contents are bugfixes for the devicetree files:
 
  - A Qualcomm MSM8974 pin controller regression, caused by a cleanup
    patch that gets partially reverted here.
 
  - Missing properties for Broadcom BCM49xx to fix timer detection and
    SMP boot.
 
  - Fix touchscreen pinctrl for imx6ull-colibri board
 
  - Multiple fixes for Rockchip rk3399 based machines including the
    vdu clock-rate fix, otg port fix on Quartz64-A and ethernet
    on Quartz64-B
 
  - Fixes for misspelled DT contents causing minor problems on
    imx6qdl-ts7970m, orangepi-zero, sama5d2, kontron-kswitch-d10,
    and ls1028a
 
 And a couple of changes elsewhere:
 
  - Fix binding for Allwinner D1 display pipeline
 
  - Trivial code fixes to the TEE and reset controller driver subsystems
    and the rockchip platform code.
 
  - Multiple updates to the MAINTAINERS files, marking the Palm Treo
    support as orphaned, and fixing some entries for added or changed
    file names.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLRXIcACgkQmmx57+YA
 GNkEzxAAl65KpVU88zGDuX/e46T/vxRGzJXZtR+qB7DdzKLN2C0joFfbKRHQa4B5
 WrIGxpKj4hLdn2QNE3pqhj0PZb8SpE521CjVcYEeUNrTvN8DASAHD76ZgQh3onFE
 oOAY6RsAn37kGB1munbDR7ZnbclGNp4WAuhTMflNmxTiijokiod4/gbzFiD/EHIP
 XtdPQHQH/fKqleU5x033SG5evQm/b/md0qNsvzFXTN0skl0it+1eqp3OmTwq7l8s
 9AAHf6o/Kx3YoiLhi74NIKyXNJ5uRmITR7MWhn/fwZxlvvEWZwaw97QzaZW0EeT1
 vX2BdN4w3CNLxPu+rmKaet1qKYf0KnuYDwzcKFDrzjyznedn2Zyb2sB6PBT+Zp1J
 5luaAl/jccC7vQ8l/xsl1YEWwgaJC5P5iQ9PwaMxY/d/rBh+FiSZ3F5UrJfpVTl/
 h9I1WNAA7dqiywFQ6yrDuYMgeTDtFwS5bm6J8VPSw9kMiNT4snxcFlAw7py1Ls7O
 6yKvPHFJ36ACcc7Jz3IYyZeKI9G+LfMWE1AZ+n6SXCJF7QQSjVmI29K6hLukkxVq
 9hQCKdIvKhGAkhSzIHCpR69ZFvdRcAzW6yS05CHaHmyweo3kRQhd+Df2kxxEIVzG
 1plLZDk7j7oe6d1y19HweHkGiVBHynyEJR2XIgU2btY7A+R6zEI=
 =oSv+
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Arnd Bergmann:
 "Most of the contents are bugfixes for the devicetree files:

   - A Qualcomm MSM8974 pin controller regression, caused by a cleanup
     patch that gets partially reverted here.

   - Missing properties for Broadcom BCM49xx to fix timer detection and
     SMP boot.

   - Fix touchscreen pinctrl for imx6ull-colibri board

   - Multiple fixes for Rockchip rk3399 based machines including the vdu
     clock-rate fix, otg port fix on Quartz64-A and ethernet on
     Quartz64-B

   - Fixes for misspelled DT contents causing minor problems on
     imx6qdl-ts7970m, orangepi-zero, sama5d2, kontron-kswitch-d10, and
     ls1028a

  And a couple of changes elsewhere:

   - Fix binding for Allwinner D1 display pipeline

   - Trivial code fixes to the TEE and reset controller driver
     subsystems and the rockchip platform code.

   - Multiple updates to the MAINTAINERS files, marking the Palm Treo
     support as orphaned, and fixing some entries for added or changed
     file names"

* tag 'soc-fixes-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (21 commits)
  arm64: dts: broadcom: bcm4908: Fix cpu node for smp boot
  arm64: dts: broadcom: bcm4908: Fix timer node for BCM4906 SoC
  ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero
  ARM: dts: at91: sama5d2: Fix typo in i2s1 node
  tee: tee_get_drvdata(): fix description of return value
  optee: Remove duplicate 'of' in two places.
  ARM: dts: kswitch-d10: use open drain mode for coma-mode pins
  ARM: dts: colibri-imx6ull: fix snvs pinmux group
  optee: smc_abi.c: fix wrong pointer passed to IS_ERR/PTR_ERR()
  MAINTAINERS: add polarfire rng, pci and clock drivers
  MAINTAINERS: mark ARM/PALM TREO SUPPORT orphan
  ARM: dts: imx6qdl-ts7970: Fix ngpio typo and count
  arm64: dts: ls1028a: Update SFP node to include clock
  dt-bindings: display: sun4i: Fix D1 pipeline count
  ARM: dts: qcom: msm8974: re-add missing pinctrl
  reset: Fix devm bulk optional exclusive control getter
  MAINTAINERS: rectify entry for SYNOPSYS AXS10x RESET CONTROLLER DRIVER
  ARM: rockchip: Add missing of_node_put() in rockchip_suspend_init()
  arm64: dts: rockchip: Assign RK3399 VDU clock rate
  arm64: dts: rockchip: Fix Quartz64-A dwc3 otg port behavior
  ...
2022-07-15 10:16:44 -07:00
Coiby Xu 0d519cadf7 arm64: kexec_file: use more system keyrings to verify kernel image signature
Currently, when loading a kernel image via the kexec_file_load() system
call, arm64 can only use the .builtin_trusted_keys keyring to verify
a signature whereas x86 can use three more keyrings i.e.
.secondary_trusted_keys, .machine and .platform keyrings. For example,
one resulting problem is kexec'ing a kernel image  would be rejected
with the error "Lockdown: kexec: kexec of unsigned images is restricted;
see man kernel_lockdown.7".

This patch set enables arm64 to make use of the same keyrings as x86 to
verify the signature kexec'ed kernel image.

Fixes: 732b7b93d8 ("arm64: kexec_file: add kernel signature verification support")
Cc: stable@vger.kernel.org # 105e10e2cf1c: kexec_file: drop weak attribute from functions
Cc: stable@vger.kernel.org # 34d5960af253: kexec: clean up arch_kexec_kernel_verify_sig
Cc: stable@vger.kernel.org # 83b7bb2d49ae: kexec, KEYS: make the code in bzImage64_verify_sig generic
Acked-by: Baoquan He <bhe@redhat.com>
Cc: kexec@lists.infradead.org
Cc: keyrings@vger.kernel.org
Cc: linux-security-module@vger.kernel.org
Co-developed-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Coiby Xu <coxu@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-07-15 12:21:16 -04:00
Naveen N. Rao 0738eceb62 kexec: drop weak attribute from functions
Drop __weak attribute from functions in kexec_core.c:
- machine_kexec_post_load()
- arch_kexec_protect_crashkres()
- arch_kexec_unprotect_crashkres()
- crash_free_reserved_phys_range()

Link: https://lkml.kernel.org/r/c0f6219e03cb399d166d518ab505095218a902dd.1656659357.git.naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Suggested-by: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-07-15 12:21:16 -04:00
Naveen N. Rao 65d9a9a60f kexec_file: drop weak attribute from functions
As requested
(http://lkml.kernel.org/r/87ee0q7b92.fsf@email.froward.int.ebiederm.org),
this series converts weak functions in kexec to use the #ifdef approach.

Quoting the 3e35142ef9 ("kexec_file: drop weak attribute from
arch_kexec_apply_relocations[_add]") changelog:

: Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols")
: [1], binutils (v2.36+) started dropping section symbols that it thought
: were unused.  This isn't an issue in general, but with kexec_file.c, gcc
: is placing kexec_arch_apply_relocations[_add] into a separate
: .text.unlikely section and the section symbol ".text.unlikely" is being
: dropped.  Due to this, recordmcount is unable to find a non-weak symbol in
: .text.unlikely to generate a relocation record against.

This patch (of 2);

Drop __weak attribute from functions in kexec_file.c:
- arch_kexec_kernel_image_probe()
- arch_kimage_file_post_load_cleanup()
- arch_kexec_kernel_image_load()
- arch_kexec_locate_mem_hole()
- arch_kexec_kernel_verify_sig()

arch_kexec_kernel_image_load() calls into kexec_image_load_default(), so
drop the static attribute for the latter.

arch_kexec_kernel_verify_sig() is not overridden by any architecture, so
drop the __weak attribute.

Link: https://lkml.kernel.org/r/cover.1656659357.git.naveen.n.rao@linux.vnet.ibm.com
Link: https://lkml.kernel.org/r/2cd7ca1fe4d6bb6ca38e3283c717878388ed6788.1656659357.git.naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Suggested-by: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-07-15 12:21:16 -04:00
Rafał Miłecki f3f575c4be arm64: dts: Add base DTS file for bcmbca device Asus GT-AX6000
It's a home router with 1 GiB of RAM, 6 Ethernet ports, 2 USB ports.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: William Zhang <william.zhang@broadcom.com>
Link: https://lore.kernel.org/r/20220713200351.28526-2-zajec5@gmail.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-07-14 14:01:58 -07:00
Arnd Bergmann 92c336e7ae This pull request contains Broadcom ARM64-based SocS Device Tree
updates for 5.20, please pull the following:
 
 - William adds the ARCH_BCMBCA Kconfig entry to follow the ARM 32-bit
   counter part and adds basic support for these DSL/PON SoCs: 63158,
   4912, 63146, 6856, 6813
 
 - Anand adds basic support for the 6858 SoC
 
 - Krzysztof fixes a missing space between a property name and its value
   in a number of DTS files
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmLMT6AACgkQh9CWnEQH
 BwSmXhAAstUebP+FxQFCnCmrcpBktlXcPpAMDmTxgwKGQrHmITdAhvfK+eHpWsPo
 9uBs1BdlHjyN/gC2p/o7S01WjI7j/Qodw106vgfhzIYuPbJUl/LVzYcubn1nhJvS
 fUvEh57Dw1jrqECy0nhUFltNf+C2Tw2R1Ug1BR2+K4ekLwU7Lmy6/4ugxbS1jSIH
 pWTqXNyTwzboYM4js5gPhPKTIrQHgYUd1YxFeExlG3LiLTI3WdnFwvsnHqFbmdHV
 85UDR9Jic/tmWS7Egs7fqcxkHadWqSrgOE/79WKiWs/e+V8IxB4JfanEa6ltnZ6a
 JXiKPNryeZuhW0+LtqBgzU5I7DczH9zHVuBjaLvaLSGENf/bz9dhks9A1gQF/nkB
 ZgbtrMJJVHRXyGFovX7cjqtvVKSX4WUa/In2OKw8RJ51NKo5IWVnbn+R/4hA/6Tg
 kAYMeGLKggqeI4i77H6CXwgJTBJkidSEzw6zKJqALEPHT3nI+AqWUGN0DlFbQkko
 yd8Wte0cFXZ6/U3as7Ie159SoHj1k9R9XORhIOUKmoN11M7n+072h2VOQNsbVeni
 KiT7CVqy2FVL8HeCnAkJVNRbl+pBowtksJAUMl0zIzYpN9eGIelQJDIUXQxfXl29
 Fvua4XALaIiNDWa9C+mX3DzB/UFGpYiQIutv2xVuHUH/VX8fshc=
 =WeA3
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLQOQMACgkQmmx57+YA
 GNmi0w/+N7ZE7JF2Qmlf9EDmy/rq4vfZz7ZJ4pCT30pUtC16GGbbynsKWnYB7bb0
 jeXxrytfr+yFZY7P8R83GkIpkBBpbhUlSWCi5W1VTQVaZLC5KZWZtPZymt4YD8KV
 zrIBVBX1ZxFNCOSMh5rP6ByrbJiuiQQ2DQiPgHDZMxFH8xUPKDvAOVR8JPhtlo6Q
 YtQgKA4zHXDkPQied4Je/NYfrh9xyLuskDmlBZ0OYvqp3XLLCBAlNKghH0bHSvt/
 KW1AvQtacfI2STD2gGWlGktUJr9ff0Qhxe2DsDauhANShNSVGlFrtqJXxFDf79ly
 amlqhXtZI2I2osyukm4PK3Ys1smDnBmNY7nbctCAXUTtcsKI/VUqAud79++U5xcD
 +BrGrZ58KcLLJTcktxszdHvvP7P92B02jhPx2Oeqe0I59hbeXO1ozglBWw0VjJj1
 Iar5p+SDo6k6F7t2pjLWg4hjtljIYn8RX6yKX6xisNBKioxAxv5HAYjN0IrENCrY
 ZXnOMpnDhnnomY4WsEEw9KOutZ1aXDphCfJs22wPyhH0cpsM4dtD+BnR2NmWnko8
 h20M3b0xQui9P1N7iDNheAjuXJbOapu/D7R80NhCo9fWKILFaRI/YBkNSkc2juUT
 e5fMRqLpSzoRswa12PBnbZgZcPQop7DKq3rv8cGL9jR0OTqL2nU=
 =9IyI
 -----END PGP SIGNATURE-----

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

This pull request contains Broadcom ARM64-based SocS Device Tree
updates for 5.20, please pull the following:

- William adds the ARCH_BCMBCA Kconfig entry to follow the ARM 32-bit
  counter part and adds basic support for these DSL/PON SoCs: 63158,
  4912, 63146, 6856, 6813

- Anand adds basic support for the 6858 SoC

- Krzysztof fixes a missing space between a property name and its value
  in a number of DTS files

* tag 'arm-soc/for-5.20/devicetree-arm64' of https://github.com/Broadcom/stblinux:
  arm64: dts: Add DTS files for bcmbca SoC BCM6813
  arm64: dts: Add DTS files for bcmbca SoC BCM6856
  arm64: dts: Add DTS files for bcmbca SoC BCM63146
  arm64: dts: broadcom: adjust whitespace around '='
  ARM64: dts: Add DTS files for bcmbca SoC BCM6858
  arm64: dts: Add DTS files for bcmbca SoC BCM4912
  arm64: dts: Add DTS files for bcmbca SoC BCM63158
  arm64: bcmbca: add arch bcmbca machine entry

Link: https://lore.kernel.org/r/20220711164451.3542127-5-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-14 17:40:51 +02:00
Arnd Bergmann e0a5925055 Qualcomm ARM64 DTS updates for v5.20
This introduces initial support for Lenovo ThinkPad X13s, Qualcomm 8cx
 Gen 3 Compute Reference Device, SA8295P Automotive Development Platform,
 Xiaomi Mi 5s Plus, five new SC7180 Chrome OS boards, Inforce IFC6560, LG
 G7 ThinQ and LG V35 ThinQ.
 
 With IPQ8074 gaining GDSC support, this was expressed in the gcc node
 and defined for the USB nodes. The SDHCI reset line was defined to get
 the storage devices into a known state.
 
 For MSM8996 interconnect providers, the second DSI interface, resets for
 SDHCI are introduced. Support for the Xiaomi Mi 5s Plus is introduced
 and the Dragonboard 820c gains definitions for its LEDs.
 
 The MSM8998 platform changes consists of a various cleanup patches, the
 FxTec Pro1 is split out from using the MTP dts and Sony Xperia devices
 on the "Yoshino" platform gains ToF sensor.
 
 On SC7180 five new Trogdor based boards are added and the description of
 keyboard and detachables is improved.
 
 On the SC7280-based Herobrine board DisplayPort is enabled, SPI flash
 clock rate is changed, WiFi is enabled and the modem firmware path is
 updated. The Villager boards gains touchscreen, and keyboard backlight.
 
 This introduces initial support for the SC8280XP (aka 8cx Gen 3) and
 related automotive platforms are introduced, with support for the
 Qualcomm reference board, the Lenovo Thinkpad X13s and the SA8295P
 Automotive Development Platform.
 
 In addition to a wide range of smaller fixes on the SDM630 and SDM660
 platforms, support for the secondary high speed USB controller is
 introduced and the Sony Xperia "Nile" platform gains support for the RGB
 status LED. Support for the Inforce IFC6560 board is introduced.
 
 On SDM845 the bandwidth monitor for the CPU subsystem is introduced, to
 scale LLCC clock rate based on profiling. CPU and cluster idle states
 are switched to OSI hierarchical states. DB845c and SHIFT 6mq gains LED
 support and new support for the LG G7 ThinQ and LG V35 ThinQ boards are
 added.
 
 DLL/DDR configuration for SDHCI nodes are defined for SM6125.
 
 On SM8250 the GPU per-process page tables is enabled and for RB5 the
 Light Pulse Generator-based LEDs are added.
 
 The display clock controller is introduced for SM8350.
 
 On SM8450 this introduces the camera clock controller and the UART
 typically used for Bluetooth. The interconnect path for the crypto
 engine is added to the SCM node, to ensure this is adequately clocked.
 
 The assigned-clock-rate for the display processor is dropped from
 several platforms, now that the driver derrives the min and max from the
 clock.
 
 In addition to this a wide range of fixes for stylistic issues and
 issues discovered through Devicetree binding validation across many
 platforms and boards are introduced.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmLPLQkbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3Fe7gQAKK2W3OKC5uKllNc7ICE
 rTeQeVNoZPxtqgvTcpAViarDCZin1jo21vDusK3q1iLICSN3XPvfvEYnYIRit/AU
 lRK0O/OBfVzzf+6qsTZqAUybLF2heYA6woESbcIoZMcmZYPwNTmVQvMuPnd0uBro
 yasN7Nm/wcWBlbnyWWAwnU8sYlBx0OfiXq/3z60adDJFJr5DoEFeapkrV/wr9dpx
 YR6kLRM7h9zzqctjOmqM/ZPxI8z3dS83eMS/4k1CkeuTKxQ+pIaBDm5WqhoWuuHH
 CY5Ebc7PzsbEWsx9Qt+bxur5lbeT5brAlGFLNtpn55hz9JQyCrUTIRgPJI21vT7O
 swlGFfW3IYsp8sU3cV7cQ8W7TGrv/1syUbEA+vCEudd00+TEUM+QJmI7bzZVHPUx
 Ari4poAb0D8w2517dTHEiBVQ7a7eRGbMqvJEraWNtklcbNAocV53U6Sz7XAr4Bjm
 0FFbCc18C+DuvMd12B8Vp92Vy8Q62M0fcnaMiL5+QVzGx1fj1bq1aL7kUuUhgsP/
 3esJUw4dNVK3d4b2uy3DR3trobr8jjirMuXKa5V8WUvr3vP9z4hRLTM9l6fecGRW
 0qrzf5iehwJ8itiUYtm/AyGYq1TjkJYxbhtQW8oRiQAJBIyRPjtPITq54l0yLz7/
 w1faJprsybDMh+ESmaHYPbZK
 =89g4
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLQL/QACgkQmmx57+YA
 GNmMUxAAu7iL+YiuKDOxO9vD3INq5XukdZvbCOaiyWkwafsyf0YqhlIXUV0LD/q3
 dpDm2/od9KQGvMG9WE34Fdq2e9nj35NiRHkKM5wLVTuypgh62VmP1PH8q0z+L+hr
 A9IdxwzgXd+ZoDMSkPVHjZauBrALeqxuQshoEvBE11EncCIeQrsxHDIzGjIBlohc
 yZ5EGAYBRDt7dmRv2M3Vpk68gJc5F264zc/mljbrnf1iW/C1b3z6PXtRZXt6p+iq
 Dzfbh+LeWIo2ddrkXhcU3ZFiafMZ5zTLZWWtKystqU9lk3fVvvp1ZcoeEgg9j5tQ
 2TgddYBJTOHm9vlJIYD6zo/AL6adixYOPZOnSzWY17zC8Yq7e5lbc/A4NkoL3lUZ
 oTbEtjmR55hJG2C6JNLsCDuI2eo5zJ9KZB8rE9CBp+kWh2UExjKVbk1LDjUQcLQl
 0cYDbIDeLJFSwSMQ18GeoLbsp3rSlPUOMuoUCdKCsCp9xLzWIxBR7LbthO/R3OOE
 mXsxGQTwn2PbEZEqFddW3vvcBF+FL1IQ/YgC6F/1MKbvU60KjdWNYqeXSz9PZ/AR
 6HyszhnGyGUU0xCWx93XHgfSCKTr8zkjD1zloWy5ibX4rUUg+iC2TnQ3n7srQNCj
 S8bpFED4JXfFj+LfgR9vZr5sUM+C1oYiIVXccZ9QLwiNWLfAfFQ=
 =XnF9
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 DTS updates for v5.20

This introduces initial support for Lenovo ThinkPad X13s, Qualcomm 8cx
Gen 3 Compute Reference Device, SA8295P Automotive Development Platform,
Xiaomi Mi 5s Plus, five new SC7180 Chrome OS boards, Inforce IFC6560, LG
G7 ThinQ and LG V35 ThinQ.

With IPQ8074 gaining GDSC support, this was expressed in the gcc node
and defined for the USB nodes. The SDHCI reset line was defined to get
the storage devices into a known state.

For MSM8996 interconnect providers, the second DSI interface, resets for
SDHCI are introduced. Support for the Xiaomi Mi 5s Plus is introduced
and the Dragonboard 820c gains definitions for its LEDs.

The MSM8998 platform changes consists of a various cleanup patches, the
FxTec Pro1 is split out from using the MTP dts and Sony Xperia devices
on the "Yoshino" platform gains ToF sensor.

On SC7180 five new Trogdor based boards are added and the description of
keyboard and detachables is improved.

On the SC7280-based Herobrine board DisplayPort is enabled, SPI flash
clock rate is changed, WiFi is enabled and the modem firmware path is
updated. The Villager boards gains touchscreen, and keyboard backlight.

This introduces initial support for the SC8280XP (aka 8cx Gen 3) and
related automotive platforms are introduced, with support for the
Qualcomm reference board, the Lenovo Thinkpad X13s and the SA8295P
Automotive Development Platform.

In addition to a wide range of smaller fixes on the SDM630 and SDM660
platforms, support for the secondary high speed USB controller is
introduced and the Sony Xperia "Nile" platform gains support for the RGB
status LED. Support for the Inforce IFC6560 board is introduced.

On SDM845 the bandwidth monitor for the CPU subsystem is introduced, to
scale LLCC clock rate based on profiling. CPU and cluster idle states
are switched to OSI hierarchical states. DB845c and SHIFT 6mq gains LED
support and new support for the LG G7 ThinQ and LG V35 ThinQ boards are
added.

DLL/DDR configuration for SDHCI nodes are defined for SM6125.

On SM8250 the GPU per-process page tables is enabled and for RB5 the
Light Pulse Generator-based LEDs are added.

The display clock controller is introduced for SM8350.

On SM8450 this introduces the camera clock controller and the UART
typically used for Bluetooth. The interconnect path for the crypto
engine is added to the SCM node, to ensure this is adequately clocked.

The assigned-clock-rate for the display processor is dropped from
several platforms, now that the driver derrives the min and max from the
clock.

In addition to this a wide range of fixes for stylistic issues and
issues discovered through Devicetree binding validation across many
platforms and boards are introduced.

* tag 'qcom-arm64-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (193 commits)
  arm64: dts: qcom: sc8280xp: fix DP PHY node unit addresses
  arm64: dts: qcom: sc8280xp: fix usb_0 HS PHY ref clock
  arm64: dts: qcom: sc7280: fix PCIe clock reference
  docs: arm: index.rst: add google/chromebook-boot-flow
  arm64: dts: qcom: msm8996: clean up PCIe PHY node
  arm64: dts: qcom: msm8996: use non-empty ranges for PCIe PHYs
  arm64: dts: qcom: sm8450: drop UFS PHY clock-cells
  arm64: dts: qcom: sm8250: drop UFS PHY clock-cells
  arm64: dts: qcom: sc8280xp: drop UFS PHY clock-cells
  arm64: dts: qcom: sm8450: drop USB PHY clock index
  arm64: dts: qcom: sm8350: drop USB PHY clock index
  arm64: dts: qcom: msm8998: drop USB PHY clock index
  arm64: dts: qcom: ipq8074: drop USB PHY clock index
  arm64: dts: qcom: ipq6018: drop USB PHY clock index
  arm64: dts: qcom: sm8250: add missing PCIe PHY clock-cells
  arm64: dts: qcom: sc7280: drop PCIe PHY clock index
  Revert "arm64: dts: qcom: Fix 'reg-names' for sdhci nodes"
  arm64: dts: qcom: sc7180-idp: add vdds supply to the DSI PHY
  arm64: dts: qcom: sc7280: use constants for gpucc clocks and power-domains
  arm64: dts: qcom: msm8996: add missing DSI clock assignments
  ...

Link: https://lore.kernel.org/r/20220713203939.1431054-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-14 17:02:12 +02:00
Nathan Chancellor 33f32e5072 bpf, arm64: Mark dummy_tramp as global
When building with clang + CONFIG_CFI_CLANG=y, the following error
occurs at link time:

  ld.lld: error: undefined symbol: dummy_tramp

dummy_tramp is declared globally in C but its definition in inline
assembly does not use .global, which prevents clang from properly
resolving the references to it when creating the CFI jump tables.

Mark dummy_tramp as global so that the reference can be properly
resolved.

Fixes: b2ad54e153 ("bpf, arm64: Implement bpf_arch_text_poke() for arm64")
Suggested-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1661
Link: https://lore.kernel.org/bpf/20220713173503.3889486-1-nathan@kernel.org
2022-07-14 16:57:26 +02:00
Bjorn Andersson 4cf02f2e0d arm64: defconfig: Enable Qualcomm SC8280XP providers
The Qualcomm SC8280XP need the global clock controller, interconnect
provider and TLMM pinctrl in order to boot. Enable these as builtin, as
they are needed in order to provide e.g. UART.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20220707161014.3178798-1-bjorn.andersson@linaro.org
2022-07-13 15:41:45 -05:00
Bjorn Andersson 769fe42092 arm64: dts: qcom: sc8280xp: Add lost ranges for timer
The timer node needs ranges specified to map the 1-cell children to the
2-cell address range used in /soc. This addition never made it into the
patch that was posted and merged, so add it now.

Fixes: 152d1faf1e ("arm64: dts: qcom: add SC8280XP platform")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20220707160858.3178771-1-bjorn.andersson@linaro.org
2022-07-13 15:41:13 -05:00
Arnd Bergmann 52905140c3 This pull request contains Broadcom ARM64-based SoCs Device Tree fixes
for 5.19, please pull the following:
 
 - William corrects the BCM4906 DTS to have an armv8-timer Device Tree,
   necessary for booting, and fixes the BCM4908 DTS to have a proper
   'enable-method' and 'cpu-release-addr' properties for the kernel to boot
   when using u-boot
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmLImAoACgkQh9CWnEQH
 BwTPPw/7BJju72g3IHXsaX1oHmjudLWbLpL2anJD0M/CVBClxkO7pj8o2yOKUNMv
 61zNzVkR8teNNJFNQiY3GF5uzEvxt+SaYV0hCexQVHTXOrkRXQtfhBze0NBgNjnN
 YptyW8NUkczhUkkzcdCOVBUDPd2FFG6iZu3tF0s1yz8IOAh7Hkyww12MfVLEska1
 Ct1VIn2aRWgmEeT6NTs6Gbz4GQYcaG2Z0A1bLjOj/szhd37E5clB9QtMG9oRgER9
 DMk9Ar6v0lupfQDhPMwDbF9/TfbRNimV2449zpENWea+m4bl1Q9vjZBNMYJ/LPD/
 MGzduIWpdUBvJnyKlmGyV3cgNPFS4fXhv8G57S7Zp/ypv1eBd/TGoz5P4AiJzNRj
 T8y2+Q9QMejC3IyX/jJCzeIKS8S6qcM5Ll8YNX33g6KswBaNdWUcWyDfFxOPf2Tl
 NVYyBAX5ui5aILHReoBpnbg1OGqrpoMN7wvv2oxgkMUzanrYiz8TYCGqRXs6UNEj
 qhmrMfXTgQYTA0TIdbrAC+3r9YiyMItyUwKhWqkQgfLs0sJtnl6QMAIPflyYo74o
 yYwYIFKJ7/in2yQsdIC9NpWdEJwnz0LueSfUX2M31U3Hb2BvM1c8fVRx/04WZ82L
 APJchkkDk09N2qapoyF1ZjYf/x5oQZ9rKJgvUwE0t17i+aiQFkA=
 =iorV
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLOddwACgkQmmx57+YA
 GNlJDQ/9HWy5Xx87PSFBUuWGwe+xrexArsfZ1TBDbCOBNAvAmeIGUu7XOqkO1uSg
 +pBBJUMGqKrRadPv5qVqo44DcgVIySyxbWxxblNKtkU73PcxlfJCQsgzQi8I3G8O
 wJ2BnMRvPDO5hqisHciLVG2THGUtaVh4sm9bnXexs/p5Zdg379EBK5yYontMd6A9
 LQk1VzerfpxRDbfwEiP1biIeGCx5q5JojvVeP1Ih4tWBLjeHaLN9ccQAdn7UxglS
 ftm7awRkoXKoEUmsdoa92nOnFPTV2XTpw7nFzqdO0w49Ns8p+3f6lgmPmY0nVM/o
 4FRwtLNZmDoWo0d20N+d49C6aEBuPo37IQlpA8KWOn5s1VcuwY/1I0Na/kE6Jo39
 Rbei+lEkfVKsItCQxi8FsQ6+i1TKJlpLNsEoD4sEH9E+VIdDkNz21jYJj/x6Styo
 WCLWRlT7TYa+GfN2nrJSQ8ecov+D8tGyAAP305x/x9exc5CM4Xunaw4vdFGxEVtO
 yGIYuih4hsXNWQY31OcYC1mtKzo8sdwZCOG2jtzXi2FoZt2bgmX7CzAziXk1rpMw
 I82EWkmx4sI0OJ3vAwsAKaYuPe4wJf7RM+dN1N5CN6hbBzdVRTWrHguCLpOaNrk4
 0EBdpUEzmGkyZf5MGXE4oqt2vdCpMmkZuf6W0/MxyLTdpBicx3o=
 =SOlL
 -----END PGP SIGNATURE-----

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

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

- William corrects the BCM4906 DTS to have an armv8-timer Device Tree,
  necessary for booting, and fixes the BCM4908 DTS to have a proper
  'enable-method' and 'cpu-release-addr' properties for the kernel to boot
  when using u-boot

* tag 'arm-soc/for-5.19/devicetree-arm64-fixes' of https://github.com/Broadcom/stblinux:
  arm64: dts: broadcom: bcm4908: Fix cpu node for smp boot
  arm64: dts: broadcom: bcm4908: Fix timer node for BCM4906 SoC

Link: https://lore.kernel.org/r/20220712231222.97850-1-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-13 09:35:56 +02:00
Ioana Ciornei 4ce223e5ef arch: arm64: dts: marvell: rename the sfp GPIO properties
Rename the GPIO related sfp properties to include the preffered -gpios
suffix. Also, with this change the dtb_check will no longer complain
when trying to verify the DTS against the sff,sfp.yaml binding.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-12 17:27:17 -07:00
Ioana Ciornei dfa2854cbf arch: arm64: dts: lx2160a-clearfog-itx: rename the sfp GPIO properties
Rename the 'mod-def0-gpio' property to 'mod-def0-gpios' so that we use
the preferred -gpios suffix. Also, with this change the dtb_check will
not complain when trying to verify the DTS against the sff,sfp.yaml
binding.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-12 17:27:17 -07:00
Arnd Bergmann 96c1bbda5e Qualcomm ARM64 defconfig updates for v5.20
This enables the drivers for the Light Pulse Generator and Bandwidth
 Monitor hardware, found in a wide variety of Qualcomm PMICs and SoCs.
 
 It enables interconnect providers for MSM8996, QCS404 and SC7180 and it
 enables the USB PHYs for the QCS404 platform.
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmLM3dIbHGJqb3JuLmFu
 ZGVyc3NvbkBsaW5hcm8ub3JnAAoJEAsfOT8Nma3FDGgP/2e45zFwPTFkwEbRUmAp
 junP+XZol580/jmfYGyGWuDHSoUE9+pPvHxCBlVHPrgjVkkhfnhpw4RUGHRm2Gr7
 6EyGImCGMvsPmJghnZ9FM7BhVoU9tX8WMfafbJhnTnaHaRIhvmt1pB9lQSwPkhGd
 dMkYzVzjQmraCx49lG+HuHoi5Uv/1xieQ/5k19q9psmGFYteZ4PJI5cs1pVl/yZV
 yVGjXQD2O68HZc5LR0lThAjtF2bdxkKon4DQDg+ik1ZQohvNqHsfZbaJFR7lJGXZ
 r/mrIPgyRIPE8k70o96qdKKWbcCKDC8X4Rid1KGO2EwZkRpYv0BmEw4TE2L4HzQd
 uQ4jh51kQutfxEG1gfX1BwalXRWyByZTZwAWRn+rZ4ABqAEQC8by7ztfBOM3Gp+x
 RRtRq2ecVOJBbE/v2qkD6DpnsC+nIWrf+OhhCfsTyt3BY16O6u3VltxwgKUo6ri6
 BKNBR49T908apJ/9I/JxJXm8DF6t5MHLJLSodUP7Zh7c1QMtIM8PpGnMm1ACDINF
 gXS5lHJSdIBMZExdNSqOGBgxKA+ZvwG3QUD9Gy1og6CmlRTMCqtHvHoJBd9nb7zR
 i8aylnmLueGR5bn8vjq+Y/iSWftopZC6N0rls18Jp6uIGi6mO5IAoo7Oo3rwEhZ4
 PErC2u9SDHI9kEq9orfe28C9
 =DyUm
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN40QACgkQmmx57+YA
 GNm+1Q/8C4tZ/JUw7NeUWfDeoifG+8cYcFf4GoOWbyCOzAQyJr7TH4wVphGPMlb8
 M68rVH3kr3wtZqErMRLZXCdl0rAsLdR7xXTxKKYsN8c1u23Qw40vKfYnPTEP45g9
 ZKc4dYnsL6cpOvEuGsvisDkA+n+Yas1xv23Gasnt4mcPLcFSU7McJwsEcOw3h33o
 oxOoVZo1Ocb+h0tl5lZW1KnKUbh0GSGCN9kNb96dKsHryGAUESs0RCsrNCzw/3Dh
 D9gqVUtsCTEYnvcBPhSr1rhUuhHqNeJn/2zzyaZbAAB1zViCgcrqCUoF1zouJgTb
 S3ZZ/zEVYyjbWcRr6KBkXd2ofkmzXcRO3VkB0NjkDInb8ApbFRI3Ql6wRB4CBlot
 Jqs2rTQXmVVpu40lFvLtkJummUimvAmsyjDhWvsje+PWnT2ONKV+UZUioR3D5TPt
 W9Jow6tvMfyE+VCcWG3nP67VaJn6FcC0B3UapKx52dz2BtH4wyf2s0hQM3FXVYkC
 3dW4AyqvycB9qTcmMqWON8dddlQaVSvU95c7c/STXgdkpbJWZMh+xMKT/9HhtBbO
 yFPrC/8OxnASlCFNFGQWxxV7vDRltKgLywrMUVYUXRAsBt6UhLLJwaXXzZRC2wvM
 ArStGeHPNz9Xkq7Tezy92eiiWGTCg8PqwXU7WDA0VAkQ4st9ngw=
 =/elF
 -----END PGP SIGNATURE-----

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

Qualcomm ARM64 defconfig updates for v5.20

This enables the drivers for the Light Pulse Generator and Bandwidth
Monitor hardware, found in a wide variety of Qualcomm PMICs and SoCs.

It enables interconnect providers for MSM8996, QCS404 and SC7180 and it
enables the USB PHYs for the QCS404 platform.

* tag 'qcom-arm64-defconfig-for-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: enable Qualcomm Bandwidth Monitor
  arm64: defconfig: Enable qcom interconnect drivers
  arm64: defconfig: Enable qcom ss & hs usb phy
  arm64: defconfig: enable Qualcomm LPG leds driver

Link: https://lore.kernel.org/r/20220712031812.1275182-1-bjorn.andersson@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 23:10:28 +02:00
Arnd Bergmann e2782fa764 This pull request contains Broadcom ARM64-based SoCs defconfig changes
for 5.10, please pull the following:
 
 - Nicolas enables CONFIG_DRM_V3D in order for the Raspberry Pi 4 systems
   to load the proper GPU module driver
 
 - William enables the newly introduced CONFIG_ARCH_BCMBCA 64-bit ARM
   counterpart to support the newly added BCA SocS
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmLMTRAACgkQh9CWnEQH
 BwQz0g/8CNkPeei1X2dq8tifxJErV2PhKYCDGN4qR3WreLmJB5+92El0eNd3Co4b
 KvnewRm3mdgJr+zvXUMHWNPAvP9I654Lx+zYBj6WXha5atIyXPaDtg18oNxJSEJ8
 v8PrWB6wl5b1KGOsCFBaG5oRwNfsVQl3Tu7fq2ExaVdj6DQQOOQ0P1dH890X0jaH
 CswCGPm9yNPrqwYD6VOcSb/lKUYA2wwFUuHur9OCtcm8UsqEito6jb7kbvcm0iNY
 GFwI1EYgjc6qvs/PWVbhcQ9ZxOimGk5ra/+TyIw92IB0TI3eRC97bRUP3idqoE1F
 KvihcxpluYWavfnDyLK/EzFkoykU1HNHQ8kK7kgsQZm/m0KiXchw15j5MR2FXB6H
 jC3ww5aKc0OMfwiyMZ9y08oaBZ4rPHTkQqlguG5JFx2DdZhgVK9OgsakIguS6g8/
 uNOOogHlNa1d45wkOkFo27D4h1F/LtAwbjBu/0ohh/hNBRfOAucO9nkIsxmK2DvE
 +McMZWv3kw0C3/s7E1Dz9WElXs5X9cCusvvKC0i4l8LZ4BEi2JczeXm00B5qy/bR
 mgBikFHNOwwPUNl8h8QtFk2aqaEqqWD5L3/LzLXyaqljKz/9LlHMwVkNtx2o4dJ4
 x0xixwvzFEC5DATDNqv+6fu+FZZl9LyhWO4M2TV3gJgoCO40JJQ=
 =QpXj
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN4vMACgkQmmx57+YA
 GNlVGhAAloVYJxQdzUHWSiwKSMdDEY7RnNrM2WhCaDZ/PB/9PasZLNFf85LDvMmE
 dPhJhM0HQqSL890KvNTLYcUV215/U5XEsa+1ga/xTbBN6raLDMAIcg5XSGUnn3kA
 Lc/InDUedg5v/RURc903rj9qLKjjChYd2SZmse/lSWYNC/Ix0o8KWsr3UMIw+Suh
 rDYrlg+CRLO+jGSrQ4vFbHkr081fW+vYwqoLvXrC9aRtC4qNNE0hcmvX7T7Bl89Y
 bRBZmDr7zLd+e4ouPKuko2k6StHdc22V9EOTpEWHhgrR91VNEsrdq6Lp2xET8nC5
 kr+rbn05yCz+Wr+pSysjBPDjubrCdNcHlwlX57cZq2GWI1AONAfH0JOdvFVh3pBa
 ah6ZV0ze8RKw1h5UB+s7FfxoponxDyN3G846uL9vP9TcfyObMDjiU34sA0qXVHWa
 K4KWchYImJeulhbx3JUt5GRsG/OccXq8aQTZVRJPhLTvO5wRO+4shqFW18gubSX/
 lbw8mFSMRw/cju4kK4/zzJMhV+8Mz6WsXfZOU+YmewKnM2Em0Nz8qUOXIDqtChF8
 MhejMTYni7ZViULwaG1xUZuvRHvPh15DpOUMbHkLe8bJydGUzMiXacfN8K434nvh
 AAMglDMCdRBk+LKecATGf+Ell/l6XIuTHX6VZfQkNV6z11BHJUU=
 =oVJK
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-5.20/defconfig-arm64' of https://github.com/Broadcom/stblinux into arm/defconfig

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

- Nicolas enables CONFIG_DRM_V3D in order for the Raspberry Pi 4 systems
  to load the proper GPU module driver

- William enables the newly introduced CONFIG_ARCH_BCMBCA 64-bit ARM
  counterpart to support the newly added BCA SocS

* tag 'arm-soc/for-5.20/defconfig-arm64' of https://github.com/Broadcom/stblinux:
  arm64: defconfig: Enable DRM_V3D
  arm64: defconfig: enable bcmbca soc support

Link: https://lore.kernel.org/r/20220711164451.3542127-3-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 23:09:06 +02:00
Arnd Bergmann 01b66d2b33 i.MX defconfig update for 5.20:
- Enable i.MX93 clock and pinctrl driver in arm64 defconfig.
 - Enable gpio-fan driver in arm64 defconfig, as it's needed by
   phyBOARD-Polis-i.MX8M Mini board.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmLJO1cUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM4whggAujASjESpiB+/Mb/I7ygqSoOkpuPT
 HvF1twYCVRxiCwrG5eZmhb42yx8FFYhKmbHpV1KmBf30U64oE+R/96GPfiH4jeAB
 izuEvubDf1dunmcnoL5XggJ69jTjX/jK1DpbrbMXgJOn6j3mgCo14sjdJb2NCEEr
 MgBblWkGt3Zq/c1XEvrS9E3CHebaCysAa6B8bAxqw+QE6S2SX7HAok0lfzX+tM+N
 lSU6vl+PtmuEORUsycssW82szoBCXPe+KUALZbTjHARMaDaRXVCJU1h29vz8hanh
 +vPMytnLzTTby1jmV3kxXJpLDkAbwNgxmVvKsgC1vmf0JS1uuR2WZg97Bg==
 =7T+Y
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN4lcACgkQmmx57+YA
 GNmPnQ//QHMEte9jPHwhe2Yd368TBYygtFRr/CQKtlpqVdqT7J5+wWnT6B+x/0wb
 n7yHwWRfCikBOR8HkIH+qbwESZGPXFU4X+zMaRXEeLnCLPDgj/CTKGLq37bJEGzw
 bNAxOmxLVubGOAPALiV4CAZsfwxiiIx78mRmzfsP3WuOposPJQENZXgpnGI2T+WU
 dSrs13KMFBIxSp8jZPQvZ7bHj0355kMnS/2dXBl9c5hspdkSUB8VfhfwImaXbGna
 y3a7qzb54ivhaiWQVQn/V65VQQqjZEWL/8raxVlSVZDx1UycHD8ck6xQujuARgfE
 X1JD086g00hKsvSSbLyV+IdeoQKN+gzPBp1S24mEb1mpSNrQdXTuxrKwBk6SQ1rR
 p5ciWa6788QZ5Ay9fAFdPnz0cFawl+3jJvEA3O5hmiPeJYYEBH/VFizeHihRAmPO
 /2uF6/o6V1vWsYcmNRMMkzV+69+w7lNMRtWwOLXPjE4mb2b8Juuc5bxhIMyV/5iT
 Yi2MJv8oYpB4cu0d2n3JW7PfxqLdrGGwY0c9aeeu3q1mA5jSEL6kOgHeW4oNGtye
 89zcajN9MtXQrUt352fxT0rTY8vT5vOkonI/vNEUjsP26XoRPYl9RdvjT9R7ww9R
 FiKGVbmsO133wA0p3ZJWzMdFAevSpYnRRnv99h8AhQrzYBSPfKI=
 =VPE6
 -----END PGP SIGNATURE-----

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

i.MX defconfig update for 5.20:

- Enable i.MX93 clock and pinctrl driver in arm64 defconfig.
- Enable gpio-fan driver in arm64 defconfig, as it's needed by
  phyBOARD-Polis-i.MX8M Mini board.

* tag 'imx-defconfig-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: defconfig: Enable gpio-fan support
  arm64: defconfig: enable i.MX93 clk & pinctrl

Link: https://lore.kernel.org/r/20220709082951.15123-6-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 23:06:31 +02:00
Arnd Bergmann 8c1541b161 arm64: tegra: Default configuration updates for v5.20-rc1
Updates the arm64 default configuration to enable the OPE driver as a
 module.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmLIeqQTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoaS3D/9vxYwJFooPkOsJsv7NlIxeTOVzSHQ+
 9ldlWc8/dJb/NZQh/Q6ilzoaqxvmmpGzR2HoqgIbNnrT1EjSgVeqzFCY1csa6kQ8
 NzhK+WL+Q2IiMnhO5Ko4KkduarIPJ+oU+OvqloNrEtipfZn1oEw4nAJwqRnY/Awi
 hpDJkM5uUblz/oblL0wF1pnYsVoIC4KPGLmbrmDQ7MLWnDADd+Y6PT1w/5RYbfqs
 7GFa9dcyO+h/beHrz8hg7g72L7rB0gqQLkRub9/FD/Sj4vHVFMNJ+2I8R9R1u9HF
 3+PbEfrEGADIwVZ4cyV6l1H9hFoQnvwHb2CI+4olsOQE/+Agq/hrVwLbGtklcKy4
 Rz02Hk8BcS6vhYdb8k7KsGrGVFc2wDqlwiKctUsDWCY4b/kz65XXNjInBZNE9s8c
 EyZkn+YtiN6GMZFrOI0xVPnH8nJJ/oYRbDSLYf1OZ7e3EFUNU1YFN/UhnPTQB7BJ
 BMvNkVabhehZQKns9I+xs7utOSOg+dqQ/OuF57j9TiBU6G0OAqE8b7sduftK1J2I
 kA5mby7dbGe8JXycQNcrjrXp9BpI/eCQzH8lJj7Z3SWXIiCebyfOq9OvMuZ8iATT
 IzKBqC70HpGhJyO49v4Ab0NdgEg0OtS0NjE6+UvuNkA49AzYEq9YiGHV5mDEM6Ad
 hguPA3jki/ofXQ==
 =0SPj
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN4hoACgkQmmx57+YA
 GNl9qw/8DIdpCIRl9Ov9b+NsDMEMqB9AzxmfGZwtPVNXycZrMTC/Z4RG/5dEHWWx
 eadpwd4ObKTvoJED9gY1B8MN6yhmaM5TMIKY2SIMNuU8xUBSxQ5rZuHjP0ph9Sa0
 Js5fpMSGoSNKasoLuLUXE3e7RyxzrZdoBnIdNow6+Cz26LfaWYUJoQl5Onjv6T4y
 iEWp2GE1dosTzHS6EaE5Mc3w/NFZmZTCFqpzUG3IHTt6BF0btX4kDjuuadbMtTC2
 dXehFcF4e0HsoyztVvPKf6WmzOq69nTaW3KdkFpMhsjSbK6yZuiiHVg9svTVZPZ6
 V8+cwXtiZYOjcH/eIjKeSlDCKWy7095Tf0Q8yiJzwxUQupCL9S7c0pWqax4FmwEt
 Fsvg4h9577lZk0YFpa/RPhaTUnKa6gOWYFnZfcBcNQnLQAe5oH63v4MVaLYmIwGW
 mlI4dyEFyK7BhoYzhJtHKQ3Vme40Wn3BuB7k18huUHHMOV09lzkmTDzc4+HzJS1z
 eSglsZxCtBdDgNlTx6u2LLd8eFEcrEZmv1WATx7eoTN+0IVZYf27fbk9GMgtvChm
 X8odAx1PWOLa+hnua6TF/8352bk99/DOy7c40gXaFXGd4sOEKNnDs+WcT7wwwb4c
 RBJgXKysYMSr1oWqSZDsduTXCDGuN455R1fVFT2x6tIW0eP5GRc=
 =dl1J
 -----END PGP SIGNATURE-----

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

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

Updates the arm64 default configuration to enable the OPE driver as a
module.

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

Link: https://lore.kernel.org/r/20220708185608.676474-8-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 23:05:30 +02:00
Arnd Bergmann 2b4b612638 - enable Allwinner analogue audio codecs
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCYshdTQAKCRB0Ba7+DO8k
 kzNUAQDgmMKiogPaewiyf0NGWxZBrtSWB549XHdvS1NREgU/LgD+LSr102hlZcNj
 CH0PVq8qV7dXXZ0oaShq4lGGEHWyagA=
 =MSYz
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLN4doACgkQmmx57+YA
 GNmbxg//fTbnBwmgwo+8zzhy1xC9v1Wt5Pv3KkVR4lBjIIgt4jtp59Z5gOZY0Mrx
 3iQchKV+cSrPrDUOILYumq1/A3pib7/1vDkIo01OTb4+r4ZdytYM8nD8BpnOcBT2
 K4nkKjYZVjLK7ekiog9er5SIDnNdEKghwkVpa03HVpOl6eCIbfU2jsTrNWHHo8jE
 7cnZcMXHIqfSBO0Cd8gNITdPBexPYUFuNVDcWFnbmfXsuE02fy5JVL4vfMHu2LjY
 dPIEur06DTbpwQCNRr6+5F0Rd1GhC0Asu5RbqHlUqvK/WDTK0KXmGcB1+ul8nakx
 yNdmJVMD687Yz9ACEg4Ljhp7VEBqDOp9jfACuaAqvjMe6DS3NVgemMPH+bZFEC6o
 ZkhtMhF77oaQpykRHXvkVUXLSVEVPtScf50PBSIxtN4p6OIhAK9gPAmlaEv4H8/0
 mhTeDUeR9OYUwfDqOyoAfjdtu4PNyX2/w1cI7joVFbs+3a+bStWR2cXVvx/FRa7T
 YI8kCKPQFRUU4hDMHVJTX37dnVV/WEDsxoEZIebxq7hvjPpTD7uyW6o60EYLILyd
 BL7sF+aZxQAV3fd4RhJ01mSHmmsLTiXP+GoVGmtjmrFuNOIiNvEg5IKrgB+FPmym
 8KQ0UWkIiB35K1berCL/HQgjUYrwQW21gEBy+xXyaCmxuSe/MSg=
 =YIcC
 -----END PGP SIGNATURE-----

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

- enable Allwinner analogue audio codecs

* tag 'sunxi-config64-for-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: defconfig: Enable Allwinner built in CODECs

Link: https://lore.kernel.org/r/YsheC0hgyJB9kPsS@kista.localdomain
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-12 23:04:26 +02:00
Xu Kuohai efc9909fdc bpf, arm64: Add bpf trampoline for arm64
This is arm64 version of commit fec56f5890 ("bpf: Introduce BPF
trampoline"). A bpf trampoline converts native calling convention to bpf
calling convention and is used to implement various bpf features, such
as fentry, fexit, fmod_ret and struct_ops.

This patch does essentially the same thing that bpf trampoline does on x86.

Tested on Raspberry Pi 4B and qemu:

 #18 /1     bpf_tcp_ca/dctcp:OK
 #18 /2     bpf_tcp_ca/cubic:OK
 #18 /3     bpf_tcp_ca/invalid_license:OK
 #18 /4     bpf_tcp_ca/dctcp_fallback:OK
 #18 /5     bpf_tcp_ca/rel_setsockopt:OK
 #18        bpf_tcp_ca:OK
 #51 /1     dummy_st_ops/dummy_st_ops_attach:OK
 #51 /2     dummy_st_ops/dummy_init_ret_value:OK
 #51 /3     dummy_st_ops/dummy_init_ptr_arg:OK
 #51 /4     dummy_st_ops/dummy_multiple_args:OK
 #51        dummy_st_ops:OK
 #57 /1     fexit_bpf2bpf/target_no_callees:OK
 #57 /2     fexit_bpf2bpf/target_yes_callees:OK
 #57 /3     fexit_bpf2bpf/func_replace:OK
 #57 /4     fexit_bpf2bpf/func_replace_verify:OK
 #57 /5     fexit_bpf2bpf/func_sockmap_update:OK
 #57 /6     fexit_bpf2bpf/func_replace_return_code:OK
 #57 /7     fexit_bpf2bpf/func_map_prog_compatibility:OK
 #57 /8     fexit_bpf2bpf/func_replace_multi:OK
 #57 /9     fexit_bpf2bpf/fmod_ret_freplace:OK
 #57        fexit_bpf2bpf:OK
 #237       xdp_bpf2bpf:OK

Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Acked-by: Song Liu <songliubraving@fb.com>
Acked-by: KP Singh <kpsingh@kernel.org>
Link: https://lore.kernel.org/bpf/20220711150823.2128542-5-xukuohai@huawei.com
2022-07-11 21:08:08 +02:00
Xu Kuohai b2ad54e153 bpf, arm64: Implement bpf_arch_text_poke() for arm64
Implement bpf_arch_text_poke() for arm64, so bpf prog or bpf trampoline
can be patched with it.

When the target address is NULL, the original instruction is patched to
a NOP.

When the target address and the source address are within the branch
range, the original instruction is patched to a bl instruction to the
target address directly.

To support attaching bpf trampoline to both regular kernel function and
bpf prog, we follow the ftrace patchsite way for bpf prog. That is, two
instructions are inserted at the beginning of bpf prog, the first one
saves the return address to x9, and the second is a nop which will be
patched to a bl instruction when a bpf trampoline is attached.

However, when a bpf trampoline is attached to bpf prog, the distance
between target address and source address may exceed 128MB, the maximum
branch range, because bpf trampoline and bpf prog are allocated
separately with vmalloc. So long jump should be handled.

When a bpf prog is constructed, a plt pointing to empty trampoline
dummy_tramp is placed at the end:

        bpf_prog:
                mov x9, lr
                nop // patchsite
                ...
                ret

        plt:
                ldr x10, target
                br x10
        target:
                .quad dummy_tramp // plt target

This is also the state when no trampoline is attached.

When a short-jump bpf trampoline is attached, the patchsite is patched to
a bl instruction to the trampoline directly:

        bpf_prog:
                mov x9, lr
                bl <short-jump bpf trampoline address> // patchsite
                ...
                ret

        plt:
                ldr x10, target
                br x10
        target:
                .quad dummy_tramp // plt target

When a long-jump bpf trampoline is attached, the plt target is filled with
the trampoline address and the patchsite is patched to a bl instruction to
the plt:

        bpf_prog:
                mov x9, lr
                bl plt // patchsite
                ...
                ret

        plt:
                ldr x10, target
                br x10
        target:
                .quad <long-jump bpf trampoline address>

dummy_tramp is used to prevent another CPU from jumping to an unknown
location during the patching process, making the patching process easier.

The patching process is as follows:

1. when neither the old address or the new address is a long jump, the
   patchsite is replaced with a bl to the new address, or nop if the new
   address is NULL;

2. when the old address is not long jump but the new one is, the
   branch target address is written to plt first, then the patchsite
   is replaced with a bl instruction to the plt;

3. when the old address is long jump but the new one is not, the address
   of dummy_tramp is written to plt first, then the patchsite is replaced
   with a bl to the new address, or a nop if the new address is NULL;

4. when both the old address and the new address are long jump, the
   new address is written to plt and the patchsite is not changed.

Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Reviewed-by: KP Singh <kpsingh@kernel.org>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20220711150823.2128542-4-xukuohai@huawei.com
2022-07-11 21:08:01 +02:00
Xu Kuohai f1e8a24ed2 arm64: Add LDR (literal) instruction
Add LDR (literal) instruction to load data from address relative to PC.
This instruction will be used to implement long jump from bpf prog to
bpf trampoline in the follow-up patch.

The instruction encoding:

    3       2   2     2                                     0        0
    0       7   6     4                                     5        0
+-----+-------+---+-----+-------------------------------------+--------+
| 0 x | 0 1 1 | 0 | 0 0 |                imm19                |   Rt   |
+-----+-------+---+-----+-------------------------------------+--------+

for 32-bit, variant x == 0; for 64-bit, x == 1.

branch_imm_common() is used to check the distance between pc and target
address, since it's reused by this patch and LDR (literal) is not a branch
instruction, rename it to label_imm_common().

Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/bpf/20220711150823.2128542-3-xukuohai@huawei.com
2022-07-11 21:04:58 +02:00
Arnd Bergmann 8f8a7775b6 - added H616 EMAC compatible
- make pinctrl interrupts optionals in DT binding
 - initial H616 DTSI
 - added OrangePi Zero 2 board
 - added X96 Mate TV box
 - add VCC PI supply in pinctrl DT binding
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCYsnExAAKCRB0Ba7+DO8k
 k0mBAP4tUQ0HDeiTHXRn7nV+pZe38IhV3w8+u3afIbfzu2SIPAD9HW8bYzkPKpYH
 N7JyvzLrBOQvIwOZWKAvbtvNvj7LlAQ=
 =g8zi
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLMRjsACgkQmmx57+YA
 GNk0kRAAizG3vt+/5AjpQaPXcix+nWagNvrlnbe9kGn+yPW/55OraBEEXD91X/59
 zVy4FEh69NQKyb5mc1LyGeWL4hZ76LSmy5TfbgseVPsF0BpQJ4sVNYdByWvoNrj1
 wlVuVpb+kM3NRn/ol2chCobpyr1NShp5d1p8RqYmbhfBGlSkn17H1kOrZZNlzs9u
 tnU8PejYAbBHB6d5HUljizFJdk1I7ITBYiUTsLUjiX8Kqa6As0U35j6gOuem+hGS
 +lHp5/jACl1x0SWaeCdBdHtZQWT4jcWrgG7kOFwmBFm1Tt2bUgsJNwc6fowmHioq
 8vKdutYuKd9gHBIiLww8SXC0LGjiATxvaBarXI9GF0+dFLmActQUhpc7hzNUTn8o
 n/OediWnwnafFtLUqiqlmh50kYhJCOGhcOnie7SWeUhXgi5IyPzeib1ENXi5bxuP
 xQR+9gPpg+9g7hGyaSSTK8zl9wj2N271sJqd9ztVw4vKQlaiYp65/8BlCA+UAZqE
 cnGlh2qrwaz4rAeoUoAxWA1FlWaV+2IHI5KdDTRiT7Xp3eLcdlmYk+TJDc0u78JT
 oIHsUNGUAKeeaM66ccoaQ7QBh0+Sm/VPwJfvGOez+J0lPp6E9MJdiCkx/S1APo6Y
 YRU/cJqlGxOtFOQwLhNsyKKRM3q7vN1YRrm19h8wlBeN+KBVAGY=
 =prQq
 -----END PGP SIGNATURE-----

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

- added H616 EMAC compatible
- make pinctrl interrupts optionals in DT binding
- initial H616 DTSI
- added OrangePi Zero 2 board
- added X96 Mate TV box
- add VCC PI supply in pinctrl DT binding

* tag 'sunxi-dt-for-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: h616: Add X96 Mate TV box support
  arm64: dts: allwinner: h616: Add OrangePi Zero 2 board support
  dt-bindings: arm: sunxi: Add two H616 board compatible strings
  dt-bindings: pinctrl: sunxi: allow vcc-pi-supply
  arm64: dts: allwinner: Add Allwinner H616 .dtsi file
  dt-bindings: pinctrl: sunxi: Make interrupts optional
  dt-bindings: arm: sunxi: Add H616 EMAC0 compatible

Link: https://lore.kernel.org/r/YsnF9cm/qniIOklj@kista.localdomain
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-11 17:48:11 +02:00
Arnd Bergmann a595919877 i.MX arm64 device tree update for 5.20:
- Add device tree support for i.MX93 SoC.
 - New board device tree: TQMa8MPQL, DH electronics i.MX8M Plus DHCOM and
   PDK2, i.MX93 11x11 EVK, phyBOARD-Polis-i.MX8MM.
 - A series from Abel Vesa and Viorel Suman to fix i.MX8QXP device tree
   to comply with DT schema.
 - Disable job ring 0 device for i.MX8MM to avoid caam_jr probe error, due
   to that JR0 reservation is done in both upstream (v2.7) and downstream
   (NXP lf_v2.4) TF-A.
 - A series from Krzysztof Kozlowski to align gpio-key and LED node names
   with dtschema.
 - Add SNVS LPGPR device for i.MX8MM so that some preserving registers
   becomes available as NVMEM.
 - Add NoC device support for i.MX8MP SoC.
 - A couple of changes from Sean Anderson to add SFP node for TA devices
   for LayerScape SoCs.
 - A series from Shengjiu Wang to enable bt-sco sound card support for
   NXP i.MX8M EVK boards.
 - Other small and random board updates.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmLJNxkUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM46nggApNdspVDWzrLlF8BuC5SGf5cShrM/
 AByP9wkmBBXrCFP74dVaq2o5WwyLAqNzlvrey/vT+yb4jMzFHqCJjWcTJKL8WZYG
 ecsFOYJVbNd6CB2J2G5yYZxKIXFNtSblUJV1qd4+8GzHcu9Y+xjNojvF4ure+G80
 8bqhZQo9VNxdCyII6BcOpZlXmjbFgC47PIrSqX+gx2WbRdLcqj4tbxo/qA5OWVl9
 paBn8098EOGA13i63xZM8yFBT5W5b5zS69ZwrVapqP2AOU8pEORrQ6ZpPJghUm/w
 aDoWdJWE1VS08ON2tv3GFEpYHRGXWTOpHxT4FJGjyPUm+t4KGyW6m/GjWA==
 =LAwE
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLMRgEACgkQmmx57+YA
 GNkYaA//fT41JinJqbwZkIFZNSY1kQsbWVrZqaCGAgZUsyw2MWbjBWeaHiUuiadk
 tHpjxfp2IL7+UcestBXFYDiOlsMb84a9fSEF9Rl6v7PkVTHR2KNEAetSJJk7Z15d
 gflC7RoUbFGoXuXfS3hqDr2cC17IsjiGB7qBXwhYcXoZzAWGN1s0tiNc/tF/x339
 odnJK4ZuAuxNwNuFTn51pcmQLdIaUNfWCTfwd28pQKa8RaK1ytiupWkapRbOqrO2
 +S8xwNqqyUWUe9UPBxEzp85qqZzVDzZFUEeH6xMAD1eusIK+XVM0uMtIbrwx8aN1
 n05vk28qOVsF3aZBY1v/eetlhlC8irwX4KUc3w/IcPrxlpuZGOwAUHZ6ygW8dWF6
 1UqUwnK5CRO2EnxQL3fecZcHW39QgwICMAwi44N71VgxW0rjnd7sFe2xCGlS70Zv
 hpgXTwrVAMs4lIhjtSmoPgFW1khz0mBRAR8CtbX+KT3YWTMDSBneEaM+KI3wLqxh
 D8PiazCge41sO7/M+zAC28hDTpZ4l09QjwG6ANb9KiHDUWUa1nkgdK2HTj+xfc9F
 YJmaGwVW2jaYCBjr0hSEiK4jFwpwVRD8XZP2LKF57kxWvBhRhXJkHAWpp6VAIyON
 eQM2bGzKyerh27TIqDT5JIyr5iMz1QT8mGEV3P+xKIFHxizIFdg=
 =jcGY
 -----END PGP SIGNATURE-----

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

i.MX arm64 device tree update for 5.20:

- Add device tree support for i.MX93 SoC.
- New board device tree: TQMa8MPQL, DH electronics i.MX8M Plus DHCOM and
  PDK2, i.MX93 11x11 EVK, phyBOARD-Polis-i.MX8MM.
- A series from Abel Vesa and Viorel Suman to fix i.MX8QXP device tree
  to comply with DT schema.
- Disable job ring 0 device for i.MX8MM to avoid caam_jr probe error, due
  to that JR0 reservation is done in both upstream (v2.7) and downstream
  (NXP lf_v2.4) TF-A.
- A series from Krzysztof Kozlowski to align gpio-key and LED node names
  with dtschema.
- Add SNVS LPGPR device for i.MX8MM so that some preserving registers
  becomes available as NVMEM.
- Add NoC device support for i.MX8MP SoC.
- A couple of changes from Sean Anderson to add SFP node for TA devices
  for LayerScape SoCs.
- A series from Shengjiu Wang to enable bt-sco sound card support for
  NXP i.MX8M EVK boards.
- Other small and random board updates.

* tag 'imx-dt64-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (33 commits)
  arm64: dts: freescale: add initial device tree for TQMa8MPQL with i.MX8MP
  arm64: dts: freescale: imx8qxp: Fix the keys node name
  arm64: dts: freescale: imx8: Fix the system-controller node name
  arm64: dts: freescale: imx8qxp: Fix the ocotp node name
  arm64: dts: freescale: imx8qxp: Add fallback compatible for clock controller
  arm64: dts: freescale: imx8: Fix power controller name
  arm64: dts: freescale: imx8qxp: Remove unnecessary clock related entries
  arm64: dts: imx8mp: add NoC node
  arm64: dts: Add SFP node for TA 3.0 devices
  arm64: dts: layerscape: Add SFP node for TA 2.1 devices
  arm64: dts: freescale: Add phyBOARD-Polis-i.MX8MM support
  arm64: dts: imx8m{m,p}-verdin: use IT temperatures
  arm64: dts: imx8mn-evk: add bt-sco sound card support
  arm64: dts: imx8mq-evk: add bt-sco sound card support
  arm64: dts: imx8mm-evk: add bt-sco sound card support
  arm64: freescale/imx8mp-evk.dts: reorder nodes alphabetically
  arm64: dts: imx8mq: Pass a label to the AIPS nodes
  arm64: dts: imx8m: Pass a label to the soc node
  arm64: dts: imx8mm-venice-gw7902: fix UART1 CTS
  arm64: dts: imx8mp: Add support for DH electronics i.MX8M Plus DHCOM and PDK2
  ...

Link: https://lore.kernel.org/r/20220709082951.15123-5-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-11 17:47:13 +02:00
Arnd Bergmann 7310e458ac TI K3 device tree updates for v5.20
* AM62: fixups, sa2ul enabled, ramoops for sk
 * others: whitespace and gpio-key cleanup.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmLIs3YACgkQ3bWEnRc2
 JJ0BQA/9G6d20SeOm6PRBFYb4zCt8MzAgixHOM6NRzOr4gPL3DvBIbvky56RP/r4
 XSImjqjXnsrR60+ygnK3z2asyn1P7kXe75tLfAWQ6BmG0VWYWW18Rh0hw0+1WSOp
 Vqf7ERw0mEzIJPIyg/iY8C5k54ffBjCjJp2HjuoQpOAWJGv2VSnm+z1HH7lgqzRX
 i15DNJuD2lS3K7oIKBdEnnYnkbeUGBupRpUanDVieuP6JcictqPb67yFvIrsS2z/
 p6btrSN3bQio0ICKO39lEIAElHCR+CPOGvOc/AuhEQPw8+/nbidDiGIQo0YCTr4C
 Qujt9NlYpddNjNqEdFqJceKiN19CB8xSbaIZ15IrwjhwXLZOsQ457OhOLLkICNfL
 SH2tfM3gP2RAIDK6+0dopFcc4mHD4kDHHWsT2q1m3Rwylu+Qbe6CarLlfNe7sY2g
 R1eI9j2UZk991sB7uXp6iZyKoyT7OBH1SYN5CZL4K43koQDhwbzd2PerNzaQZsQJ
 Nd3vzoLufX5Kcp7kWdvpVrzC6x1nqRVAz7Qrix88D8OO7VrXrX1Ad+v4ev3gK/IM
 SQxwiUF6WiwJc2LVy22jhnYb4qtC+9QmPVdwjhKU6l8I89HISqrIUMd7I4dPeAIb
 SwWLK4JN+BMM3Ioj3nJeKVJRKk4cVKqVFUGSSDsgWrKAQPc3TwE=
 =HGe8
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLMRC8ACgkQmmx57+YA
 GNnrEw/+NwAomXE8LmIGD2RAXSR5cz4OLaCsCgeBKNwY0R1Nuyg+rjGw41WcoQWk
 pPEzQwpLygmIlq1RIK4lE1RqoxepMFlsr3bdp65tAeErxVxLHih0pc8c7XOvWPB1
 nUVf8yJYozbH/KJUrY4uNxQvlfVcO/ldBPciZLYvsfqq8FVNV1y+iN1aV1MI6ts5
 emMFkei/KLQHuRIj8Fdt6k671E+j8Rye2W/Z7TdUChQrm2R9XPAcUNa2UH5JUsxO
 cebAe8eiR7fxZc8YS5c6vi+aXJaBNqFx6nGq41yCng47IRdDsPjtA/73t+fZ0zhn
 kcIVYD3diPBX2YFpEMXV4oAlgtjkX5bgBp50ysSuxcSfIhdzVGLC+/wuBK1QUW3M
 LPHaU5YY20+oh76Gvl96R7QJw8snWV76vkAPWfQGAmquQTDmmF74sWlQlrsPi9G6
 GK3jlapNX+wdD5KW+T1RuVg/hgaaNNnZPkAL+76uESIJLAPzCURttNDPe3oZ3ZwE
 nZ0pOczHk/DbozgHFr+6LX5Sa+IK/SXI2Hm+1xB0Z6b0UrpVXeiAC4SGvG+uSLeE
 cVFSuGeBfP+Nmk6kBzZA3fv2NxhsGpzZYe90WRAj3pBF6HBgoe6hgb07s77TpuSK
 vEXZGpOY9COGgP6w5wSnNTpMpKnm5AR+Z8cRjtZffjXlji4mLKk=
 =w029
 -----END PGP SIGNATURE-----

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

TI K3 device tree updates for v5.20

* AM62: fixups, sa2ul enabled, ramoops for sk
* others: whitespace and gpio-key cleanup.

* tag 'ti-k3-dt-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  arm64: dts: ti: k3-am62-main: Enable crypto accelerator
  arm64: dts: ti: k3-am625-sk: Enable ramoops
  arm64: dts: ti: k3-am642-sk: Add pinmux corresponding to main_uart0
  arm64: dts: ti: Align gpio-key node names with dtschema
  arm64: dts: ti: Adjust whitespace around '='

Link: https://lore.kernel.org/r/20220708232701.vpk45lwogpasaaay@enchilada
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-11 17:39:27 +02:00
Arnd Bergmann c784744b04 arm64: tegra: Device tree changes for v5.20-rc1
This adds and enables various hardware on Tegra234 (host1x, VIC, GPCDMA)
 as well as the Control BackBone related device tree nodes on Tegra194
 and Tegra234.
 
 Native timers are enabled on Tegra186, Tegra194 and Tegra234, which
 allow keeping track of SoC-wide timestamps as well as hardware watchdog
 functionality.
 
 The audio subsystem is enhanced with the Output Processing Engine (OPE)
 on Tegra210 and later.
 
 Finally there are a handful of minor cleanups and fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmLIemkTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zocb7EACxWEuPWxorxTlmGa4aHQano8W/D0Yn
 ouaJJ+itWqe0AGJ1nmsdv4oBD93pYsIIk+eGAQPQPP1IzrK0Py4TmLuNecI/r8P7
 LBNCpkZkKtmRVkWC5ujZli1eLBqZUIqfCqdvlXikHA/Vb6oLiCyOHq4/nyfNUiAP
 S4geszaKBju4L/NbpQvXyGHsqlw34D1pTRGc0xmUuiqGlSKsExaQDag7OhPbtYv3
 b0PfQidG4CmshwThxXiRbz3Fvy+wLjnIjBAiABDq6hEaBY8kN4Ogn4C4pr3xtqd1
 ocy4/TLe0rRTIMnRCjfMkQgOuYsmApB/YOshnZR3sVBa9Ufe0L+0EKjp0IK7qDyQ
 5OnI4CecmmWojng389vM8lCm9qiIOb+wPZo3VN3E1rkEfadyA+2GswQJt/DIKhtG
 YYSnPe2ftAwxfW9CFzSQbrBQFS/oBG7Kf2wXb1nV09aU8woMqWYq6vA1FFQiNm0X
 O+ZQYy70iy1Q2HrYDlZLgoTAlRSKiWWGZsDz9zkFUGNMt0QAT6gOsrO1BzJ535Qv
 EJioAYuBSSo1fULg7NMp2d+cTHRKgOua6BQfVDm92dmNUVlVzHkd73CnxNV/6Jni
 JpW3rsBLCfoery2dE+B52MqYor5MEFynjU4ulv1FdPU2L/t05dHHZeRJWDWgrEOE
 xmej7X0Ex4+LlA==
 =7G79
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLMRAAACgkQmmx57+YA
 GNmRPxAAgoQryNpvwl3+rFoghpbUrxn/ld9+ODvy8+/zMs8SJg5znA4BK+o3vmGx
 +A9nFXDe4+SnzPbggy7af2nN+iGfIXVwLP6F9kXPRhjgvM/PFOAtyvXSt5ZL2vWY
 wxL5gT3NaoZSxMPdjyB5A/Dgj/uUZ5QodcUnYZsHa/fN4e9sFaohv7kFsda5HUre
 ypU1owYRIOZMgpdYJe69v9iZyQMo+AV3ZyjSzvJ0gnDSh/DaeLWbwp0zf1cFj2Fe
 O9lVD65CyU0mVpVWvjou+poZyZ7yYq4XgSoISSZNXPy/DZVNFJXJjjklxjD2IT3R
 3F+emmiFFpOzytOQHwOjku8t1uaJKpuiTgLRG5isKO5gyMfOhN2CPEWf7Zg+DSZ7
 7EV9OFsX4h+wpDPfcj/ENtH9+Acm7SUsryhK1BFGrqoJCbBf2M+T2+uot5GsPb1e
 ERbXi/msdZR8cfnu5+z/+ZRcENrHWdIM0MZ15qKjVkGADxv4WORPp4VAk6VQN7bb
 V1ssKOwimDEAMRaFADyZnQ8rY+s+hPO0NWWsLIjhD3PPyjYyvl1AZDJo8h4OlUNR
 1BMe0AO1rm4xBoQXpyQQlf96Aand5wV0UThE323I0DoxB08SpjH4FKbDmnQUpMAz
 YGIEpEftU2qMLgBdyIwLz/b0oTaIPeDLgEu24TVg6WoI2bXF93M=
 =fixm
 -----END PGP SIGNATURE-----

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

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

This adds and enables various hardware on Tegra234 (host1x, VIC, GPCDMA)
as well as the Control BackBone related device tree nodes on Tegra194
and Tegra234.

Native timers are enabled on Tegra186, Tegra194 and Tegra234, which
allow keeping track of SoC-wide timestamps as well as hardware watchdog
functionality.

The audio subsystem is enhanced with the Output Processing Engine (OPE)
on Tegra210 and later.

Finally there are a handful of minor cleanups and fixes.

* tag 'tegra-for-5.20-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  arm64: tegra: Fix SDMMC1 CD on P2888
  arm64: tegra: Update compatible for Tegra234 GPCDMA
  arm64: tegra: Add Host1x and VIC on Tegra234
  arm64: tegra: Add Host1x context stream IDs on Tegra186+
  arm64: tegra: Enable native timers on Tegra234
  arm64: tegra: Enable native timers on Tegra194
  arm64: tegra: Enable native timers on Tegra186
  arm64: tegra: Add node for CBB 2.0 on Tegra234
  arm64: tegra: Add node for CBB 1.0 on Tegra194
  arm64: tegra: Align gpio-keys node names with dtschema
  arm64: tegra: Mark BPMP channels as no-memory-wc
  arm64: tegra: Add Tegra234 GPCDMA device tree node
  arm64: tegra: Adjust whitespace around '='
  arm64: tegra: Enable OPE on various platforms
  arm64: tegra: Add OPE device on Tegra210 and later

Link: https://lore.kernel.org/r/20220708185608.676474-7-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-11 17:38:40 +02:00
Arnd Bergmann 859dd6d3e6 - whitespace fixes
- replaced RTC indexes with constants
 - gpio-key nodes aligned with dtschema
 - fixed LED node for Orange Pi Win
 - added OPP table for R40 CPU and thermal points
 - updated I2C controller compatibles
 - added compatibles for MBUS, D1 DE2 clocks, D1 USB
 - enable internal HMIC bias on Pinephone
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCYsh7YwAKCRB0Ba7+DO8k
 k3aLAP0dXcVZyUMO4WSRYIYbXd7fzOjFrHw/Zk0tYonCqTCHnwEAgUpkZFLPNrGe
 rg1lj8qSadFrupmqa32sYR9ypToy8gc=
 =KOKj
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLMQnMACgkQmmx57+YA
 GNkweBAAqq7bCNCcrJG25L/sxh2Jrq33RaBVkP0Eyo0pN8ECbeEGckG/siIZNod7
 JFt74y5GqGag3IGQQFhzAoA4sjSMFn/twpKTTLTdh90enZn9ci2r3GLb8xxcrgdY
 v+XH4kA9cjVmtw81AKwzkYiL2YT6exJ1sOC7Hai3XuWSFamLU5Y3/VGkyeieFSYD
 F4kFc+6huYPH/I/0K2BxZ0nlH2/FGw3erK49RDPppx4cN/zrN5RGao8esF2WSfW5
 YXnIYlScavl8aTuwY+skO27RoZ5d76tgtDvRw5OMWsMsvwFVu39LvmKpkeqYSIyF
 8ELmVK0/PnuPabSzoe4ZXcJOtvZsPsRL/jdsMr6Or8W4ESLgTCon2tadjc/pjXeN
 WzOtkjuHhlf3C/lnGS5Q2P5lJ1cc3nNuzMgZpusrVRsxizf+cqgnYciSfRe24gU/
 OJaNBagJLEma5ied58/EqzZlru27amrUdNrDwAGbxVX1PNkwXtzQJ/SUi1X9jlUm
 L9sFa3uGBpZopTAXQ1CQJQ/Lcg3ba9NV7RZfesGWylzGb81DCJglyIabWwj+BFsC
 F0QLqI7efncnT2sL58th0BcUEROKNm9Sou4QmwV0Qgg6kaXYKR2daP23AYVrZM3c
 76aBLg5+Tb+tZrMaCI8VkwTzOpTCxAwNmpEUKKjbU+6YZoi4l8Q=
 =Q624
 -----END PGP SIGNATURE-----

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

- whitespace fixes
- replaced RTC indexes with constants
- gpio-key nodes aligned with dtschema
- fixed LED node for Orange Pi Win
- added OPP table for R40 CPU and thermal points
- updated I2C controller compatibles
- added compatibles for MBUS, D1 DE2 clocks, D1 USB
- enable internal HMIC bias on Pinephone

* tag 'sunxi-dt-for-5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: pinephone: Enable internal HMIC bias
  dt-bindings: arm: sunxi: Add several MBUS compatibles
  dt-bindings: arm: sunxi: Default to the full MBUS binding
  dt-bindings: usb: generic-ohci: Add Allwinner D1 compatible
  dt-bindings: usb: generic-ehci: Add Allwinner D1 compatible
  dt-bindings: usb: sunxi-musb: Add Allwinner D1 compatible
  arm64: dts: allwinner: a100: Update I2C controller fallback
  dt-bindings: i2c: mv64xxx: Add variants with offload support
  ARM: dts: sun8i-r40: Add thermal trip points/cooling maps
  ARM: dts: sun8i-r40: add opp table for cpu
  ARM: dts: sun8i-r40: Add "cpu-supply" node for sun8i-r40 based board
  arm64: dts: allwinner: a64: orangepi-win: Fix LED node name
  dt-bindings: clock: Add compatible for D1 DE2 clocks
  ARM: dts: allwinner: align gpio-key node names with dtschema
  arm64: dts: allwinner: align gpio-key node names with dtschema
  arm64: dts: allwinner: Use constants for RTC clock indexes
  ARM: dts: sunxi: Use constants for RTC clock indexes
  ARM: dts: sun5i: adjust whitespace around '='

Link: https://lore.kernel.org/r/Ysh8qRH0Q5Xv9Qhf@kista.localdomain
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-11 17:32:03 +02:00
Arnd Bergmann 5a75c2951a Some fixes to follow DT spec.
MT6795:
 - Big update of supported devices: cpu-map, L2 cache, PMU, watchdog,
   MediaTek timer, Arm CCI, pincontroller
 
 MT7622:
 - Change WPS button to active low
 
 MT8173:
 - Add infracfg property to the IOMMU node (also for mt2712e)
 - Add optional AXI clock to NOR Flash node
 
 MT8183:
 - add Medaitek CCI support
 - add support for Smart Voltag Scaling (SVS)
 - add GCE support to mutex
 - Add panel default rotation to some chromebooks
 - Add power supply to power domain so that SRAM for the GPU has power
 
 MT8186:
 - compatible added, DTS not yet ready.
 
 MT8192:
 - Add support for Acer Chromebook 514
 
 MT8195:
 - Add efuse node
 - Enable USB wakeup support
 - Add support for Acer Chromebook Spin 513
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAmLIaO4XHG1hdHRoaWFz
 LmJnZ0BnbWFpbC5jb20ACgkQL21+TfbCqH4KHBAAtcUfv/0ZP3I1cJGUGGn0WY/W
 rcC/MCHPsMxat8sBa/yCv9SSYteqjPLhZethlDDDXpK6D3ltLlLyUW27hm9IaRq6
 DFhkj5VB9rN5UZxaYX+5g+a9HmUD6hkItXnPr2kZoI1zsyZUaDTbdshX3sM33kFj
 FPLYOpL/A6wDZ86XegF4hFFwjhqiAq3CLMeD9Iukh6oAm0M8eZvWcPuDOeAa8/Tb
 2uGnga4CXhufhfHYSRnxNBwmoXcK6JhrX3lTDUiCNIRD38YYR4thV1GVbbPlMdzy
 lsBowXcsNyJaCb95jSUzkUPIvtGVe1mYZ638xkib9r6aP4/qG9LIKe9XclBQT3BC
 +B7vvCLZHD8n2fddOkFS9dMsrXok8wYUPuF6MFnBkK5UwgkjVsmFTs3lcBMaycpw
 SVAtUv7e8JT4NCUYG9I7LEs2hZnxYmxO87VDeeyIpzmAuCDOxFQyX07F3gGkjgWJ
 bhvjIimpbET4sS16AUObZBIZgGBUmUAZ39uWzuQls3t5vbct6JYN6z4+DS2FsYvp
 a85BN38x1iWTgAIR019iB4zJjyNlJ2LI65/8aYARu5Iny4wW2fd35jEP93cIraTo
 nQGGYLN5SoiazPvdPf/S7L6Jwyox+buBp8rUrkrSVt710apUwUVsEnyHxItHmYlx
 SmiAqjJEyjswnk7jvSo=
 =8rl+
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLMEW8ACgkQmmx57+YA
 GNl5Kw/+ORRaVmnfkgXa4fIdIewvyPO/WT1Sgzf9PeoFH+E4jeeZoECzuO31T1QM
 LKZMYZgNQeUpi+C2BPuWZTyEQtT5A540AE2xJxpPNBJMAmk576l6bLQrPak1yOBx
 viBIHJNXECI/94uEsCvOurjHaQpeelKVZR5pXpYwa4VrSRCBDKKbbNguHLwEOWjG
 TTLCMWekLI+wO/Oqa1GccoaQTNI10IuZreivwTD/TthKeGDNA5mweNK7Ui5fA8EC
 2rBm/nkMCIDRWbLHE6SoBcL+DWNAQr40ZQiWJD846+aQfsUzWXYTlVsqED0AGUNF
 GmL4Xyoo/dpDYSNbUBtXCmXyeyOg+EFj/ydOKvsY+fP6MwGXQ9CBgtfLR0KyU/h/
 0LlNTUVvBPg8sWlwtvOnEguikjtCImpkwB/2hGdqL+DWpyS3QwPdfbZ78vGfUvgD
 VIcGMXEWZE5HdipD9DH2kIMPWdZjBmAbm53eNXFTt2LmyBdbNE/KhCvwLLlX0GNi
 hjE6yTtRS0kblID4UPHSHaSQdwBhnGAq9z8R0C3eGmgWR8laDor+DV9ypntLr8kp
 KO2VjU9iXk/hKdhmnNzRZlVkDO0ra5TBj8coK1xANFLR3bQ2El53NiOGzDKqK6WP
 D/dFhN1Tn2x1/16zY3Nml6m/fqtOiPcJgo6i09eFUOWutzGJdbI=
 =vEZ5
 -----END PGP SIGNATURE-----

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

Some fixes to follow DT spec.

MT6795:
- Big update of supported devices: cpu-map, L2 cache, PMU, watchdog,
  MediaTek timer, Arm CCI, pincontroller

MT7622:
- Change WPS button to active low

MT8173:
- Add infracfg property to the IOMMU node (also for mt2712e)
- Add optional AXI clock to NOR Flash node

MT8183:
- add Medaitek CCI support
- add support for Smart Voltag Scaling (SVS)
- add GCE support to mutex
- Add panel default rotation to some chromebooks
- Add power supply to power domain so that SRAM for the GPU has power

MT8186:
- compatible added, DTS not yet ready.

MT8192:
- Add support for Acer Chromebook 514

MT8195:
- Add efuse node
- Enable USB wakeup support
- Add support for Acer Chromebook Spin 513

* tag 'v5.19-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (66 commits)
  arm64: dts: mt8183: Add panel rotation
  arm64: dts: mt7622: fix BPI-R64 WPS button
  arm64: dts: mt8173: Fix nor_flash node
  arm64: dts: mediatek: cherry: Add I2C-HID touchscreen on I2C4
  arm64: dts: mediatek: cherry: Enable support for the SPI NOR flash
  arm64: dts: mediatek: cherry: Enable MT6360 sub-pmic on I2C7
  arm64: dts: mediatek: cherry: Enable T-PHYs and USB XHCI controllers
  arm64: dts: mediatek: cherry: Enable I2C and SPI controllers
  arm64: dts: mediatek: cherry: Document gpios and add default pin config
  arm64: dts: mediatek: cherry: Add support for internal eMMC storage
  arm64: dts: mediatek: cherry: Assign interrupt line to MT6359 PMIC
  arm64: dts: mediatek: cherry: Add platform regulators layout and config
  arm64: dts: mediatek: Introduce MT8195 Cherry platform's Tomato
  dt-bindings: arm: mediatek: Add MT8195 Cherry Tomato Chromebooks
  arm64: dts: mediatek: asurada: Add SPI NOR flash memory
  arm64: dts: mediatek: asurada: Enable SCP
  arm64: dts: mediatek: asurada: Enable MMC
  arm64: dts: mediatek: asurada: Add SPMI regulators
  arm64: dts: mediatek: asurada: Add MT6359 PMIC
  arm64: dts: mediatek: asurada: Enable PCIe and add WiFi
  ...

Link: https://lore.kernel.org/r/b0d5b584-2693-73b3-79f6-3e2292f006ea@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-11 14:02:55 +02:00
Arnd Bergmann 01277737e9 i.MX fixes for 5.19, round 3:
- Fix GPIO property for imx6qdl-ts7970 board.
 - Fix touchscreen pinctrl for imx6ull-colibri board by moving iomuxc-snvs
   pin to the correct controller device.
 - Fix SFP node of fsl-ls1028a to have a required clock property.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmLI9LwUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM5wlgf9GAvH/GjYKERJjCR8HvHy2hZ2we0a
 bNt+Xf//NCjJsTbn6dxx0GXBB1SO/T9PZgdtCRsoECrINMn2cBX5lbSIOxVrqD0t
 MTUE/LlOBYiBLR7mWUMiuqQ29OeoEIwqgCaJQ8NC9qbFq/XC8Y8C3umXcdfrhznE
 5WHjO2XtRAACVvt79YmmeCbYqePdi6e8OIoScjAyGQXPU6beWhpuMs2gp4guivfm
 ZIRe+rjQvYM8B65eDiPNgYoFbNCjzDqD4CTuyoIG+jjjVUOUy8lJzl5k9tL634VY
 6jm21SxmYk8HqrUxWG/RmpzyeAbST1C4GbL9p3o83Y0rqcf4kidL6Gq5ow==
 =1Mag
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLMBsQACgkQmmx57+YA
 GNlNpQ//TS6ILttHo8OTvwFKr4ofKf1xDQ5RhqOi908CksXBhmJgQSpGh0EIHk3e
 7GyqcZwq2I0mBsmRTmryUjVvk27j4s5XoYBxGCHtACA5W33kZHk3MZppTHbmjMsI
 2fG4qOWZfgGdoYIeszmie+ogeqZWZG6knHOVl3qpnxgGAtz/if+J55l7/T0WKy5K
 v6IRf4QW50E0U1miaNBqEa66Fqmeu8zSrTqMzri66qEiiQctiO/lKMs97ZXgzVek
 d7OSv2X8T/rr2KAx1a+VCyjr8f0It7o5LD3A506bIECEr1XUIvokoUkwB//4lIvv
 YDE5oP1dVHhyshX4zt3Bv2z5HKhymHkVs1NmKxZroEprd5ssEUDujfAwbqEc+X7l
 YmQL8t203vWIn0H0rYSoijoQUOj5Haw/3z/CgMpelxUohuzdEtjYLdgCCEG7RiGT
 uOz2l3kD26l4MDhRkf5EKgjFm6ixkuNJtRMf250wOmwNeWHokSurbV/gPJLhsKWK
 4AqPqGKoi6NIiPy9FPLzG0RrT3jrpaEC4EqXdMCtyEnon7XVal2eeVfHtG9w2sbp
 1sCMYHbK0ykOoCaJBzGqNwOdu+eND5tK+i495agoPaZ8oF1/3Bi0lQbNBnCoIy3E
 VuYq8gCQ8pmzJ/tg6GTYNiv6myE9BF2Rvo9UGjCNxHbW8cDrTsQ=
 =VnF0
 -----END PGP SIGNATURE-----

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

i.MX fixes for 5.19, round 3:

- Fix GPIO property for imx6qdl-ts7970 board.
- Fix touchscreen pinctrl for imx6ull-colibri board by moving iomuxc-snvs
  pin to the correct controller device.
- Fix SFP node of fsl-ls1028a to have a required clock property.

* tag 'imx-fixes-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: colibri-imx6ull: fix snvs pinmux group
  ARM: dts: imx6qdl-ts7970: Fix ngpio typo and count
  arm64: dts: ls1028a: Update SFP node to include clock

Link: https://lore.kernel.org/r/20220709032716.GA9868@dragon
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-11 13:17:24 +02:00
Jakub Kicinski 0076cad301 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Daniel Borkmann says:

====================
pull-request: bpf-next 2022-07-09

We've added 94 non-merge commits during the last 19 day(s) which contain
a total of 125 files changed, 5141 insertions(+), 6701 deletions(-).

The main changes are:

1) Add new way for performing BTF type queries to BPF, from Daniel Müller.

2) Add inlining of calls to bpf_loop() helper when its function callback is
   statically known, from Eduard Zingerman.

3) Implement BPF TCP CC framework usability improvements, from Jörn-Thorben Hinz.

4) Add LSM flavor for attaching per-cgroup BPF programs to existing LSM
   hooks, from Stanislav Fomichev.

5) Remove all deprecated libbpf APIs in prep for 1.0 release, from Andrii Nakryiko.

6) Add benchmarks around local_storage to BPF selftests, from Dave Marchevsky.

7) AF_XDP sample removal (given move to libxdp) and various improvements around AF_XDP
   selftests, from Magnus Karlsson & Maciej Fijalkowski.

8) Add bpftool improvements for memcg probing and bash completion, from Quentin Monnet.

9) Add arm64 JIT support for BPF-2-BPF coupled with tail calls, from Jakub Sitnicki.

10) Sockmap optimizations around throughput of UDP transmissions which have been
    improved by 61%, from Cong Wang.

11) Rework perf's BPF prologue code to remove deprecated functions, from Jiri Olsa.

12) Fix sockmap teardown path to avoid sleepable sk_psock_stop, from John Fastabend.

13) Fix libbpf's cleanup around legacy kprobe/uprobe on error case, from Chuang Wang.

14) Fix libbpf's bpf_helpers.h to work with gcc for the case of its sec/pragma
    macro, from James Hilliard.

15) Fix libbpf's pt_regs macros for riscv to use a0 for RC register, from Yixun Lan.

16) Fix bpftool to show the name of type BPF_OBJ_LINK, from Yafang Shao.

* https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (94 commits)
  selftests/bpf: Fix xdp_synproxy build failure if CONFIG_NF_CONNTRACK=m/n
  bpf: Correctly propagate errors up from bpf_core_composites_match
  libbpf: Disable SEC pragma macro on GCC
  bpf: Check attach_func_proto more carefully in check_return_code
  selftests/bpf: Add test involving restrict type qualifier
  bpftool: Add support for KIND_RESTRICT to gen min_core_btf command
  MAINTAINERS: Add entry for AF_XDP selftests files
  selftests, xsk: Rename AF_XDP testing app
  bpf, docs: Remove deprecated xsk libbpf APIs description
  selftests/bpf: Add benchmark for local_storage RCU Tasks Trace usage
  libbpf, riscv: Use a0 for RC register
  libbpf: Remove unnecessary usdt_rel_ip assignments
  selftests/bpf: Fix few more compiler warnings
  selftests/bpf: Fix bogus uninitialized variable warning
  bpftool: Remove zlib feature test from Makefile
  libbpf: Cleanup the legacy uprobe_event on failed add/attach_event()
  libbpf: Fix wrong variable used in perf_event_uprobe_open_legacy()
  libbpf: Cleanup the legacy kprobe_event on failed add/attach_event()
  selftests/bpf: Add type match test against kernel's task_struct
  selftests/bpf: Add nested type to type based tests
  ...
====================

Link: https://lore.kernel.org/r/20220708233145.32365-1-daniel@iogearbox.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-09 12:24:16 -07:00
Andre Przywara 2c1e629929 arm64: dts: allwinner: h616: Add X96 Mate TV box support
The X96 Mate is an Allwinner H616 based TV box, featuring:
  - Four ARM Cortex-A53 cores, Mali-G31 MP2 GPU
  - 2GiB/4GiB RAM (fully usable!)
  - 16/32/64GiB eMMC
  - 100Mbps Ethernet (via embedded AC200 EPHY, not yet supported)
  - Unsupported Allwinner WiFi chip
  - 2 x USB 2.0 host ports
  - HDMI port
  - IR receiver
  - 5V/2A DC power supply via barrel plug

Add a basic devicetree for it, with SD card and eMMC working, as
well as serial and the essential peripherals, like the AXP PMIC.

This DT is somewhat minimal, and should work on many other similar TV
boxes with the Allwinner H616 chip.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220708105235.3983266-8-andre.przywara@arm.com
2022-07-09 20:08:53 +02:00
Andre Przywara 5a378f9f2b arm64: dts: allwinner: h616: Add OrangePi Zero 2 board support
The OrangePi Zero 2 is a development board with the new H616 SoC. It
comes with the following features:
  - Four ARM Cortex-A53 cores, Mali-G31 MP2 GPU
  - 512MiB/1GiB DDR3 DRAM
  - AXP305 PMIC
  - Raspberry-Pi-1 compatible GPIO header
  - extra 13 pin expansion header, exposing pins for 2x USB 2.0 ports
  - 1 USB 2.0 host port
  - 1 USB 2.0 type C port (power supply + OTG)
  - MicroSD slot
  - on-board 2MiB bootable SPI NOR flash
  - 1Gbps Ethernet port (via RTL8211F PHY)
  - micro-HDMI port
  - (yet) unsupported Allwinner WiFi/BT chip

Add the devicetree file describing the currently supported features.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220708105235.3983266-7-andre.przywara@arm.com
2022-07-09 20:08:53 +02:00
Andre Przywara 0d17c86511 arm64: dts: allwinner: Add Allwinner H616 .dtsi file
This (relatively) new SoC is similar to the H6, but drops the (broken)
PCIe support and the USB 3.0 controller. It also gets the management
controller removed, which in turn removes *some*, but not all of the
devices formerly dedicated to the ARISC (CPUS).
And while there is still the extra sunxi interrupt controller, the
package lacks the corresponding NMI pin, so no interrupts for the PMIC.

The reserved memory node is actually handled by Trusted Firmware now,
but U-Boot fails to propagate this to a separately loaded DTB, so we
keep it in here for now, until U-Boot learns to do this properly.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220708105235.3983266-4-andre.przywara@arm.com
2022-07-09 20:08:53 +02:00
Alexander Stein 418d1d840e arm64: dts: freescale: add initial device tree for TQMa8MPQL with i.MX8MP
This adds support for TQMa8MPQL module on MBa8MPxL board.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-09 10:49:39 +08:00
Johan Hovold abf61f7e66 arm64: dts: qcom: sc8280xp: fix DP PHY node unit addresses
Fix up the DP PHY node which had the wrong unit address.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220708072556.4687-1-johan+linaro@kernel.org
2022-07-08 17:03:03 -05:00
Johan Hovold 43883cee06 arm64: dts: qcom: sc8280xp: fix usb_0 HS PHY ref clock
Fix the usb_0 HS PHY reference clock which was mistakingly replaced with
the first usb_2 PHY clock.

Fixes: 152d1faf1e ("arm64: dts: qcom: add SC8280XP platform")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220708072358.4583-1-johan+linaro@kernel.org
2022-07-08 17:02:19 -05:00
Johan Hovold 330fc08dbd arm64: dts: qcom: sc7280: fix PCIe clock reference
The recent commit that dropped the PCIe PHY clock index failed to update
the PCIe node reference.

Fixes: 531c738fb3 ("arm64: dts: qcom: sc7280: drop PCIe PHY clock index")
Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220707064222.15717-1-johan+linaro@kernel.org
2022-07-08 16:07:34 -05:00
William Zhang 8bd582ae9a arm64: dts: broadcom: bcm4908: Fix cpu node for smp boot
Add spin-table enable-method and cpu-release-addr properties for
cpu0 node. This is required by all ARMv8 SoC. Otherwise some
bootloader like u-boot can not update cpu-release-addr and linux
fails to start up secondary cpus.

Fixes: 2961f69f15 ("arm64: dts: broadcom: add BCM4908 and Asus GT-AC5300 early DTS files")
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-07-08 12:47:25 -07:00
William Zhang b4a544e415 arm64: dts: broadcom: bcm4908: Fix timer node for BCM4906 SoC
The cpu mask value in interrupt property inherits from bcm4908.dtsi
which sets to four cpus. Correct the value to two cpus for dual core
BCM4906 SoC.

Fixes: c8b404fb05 ("arm64: dts: broadcom: bcm4908: add BCM4906 Netgear R8000P DTS files")
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-07-08 12:47:06 -07:00
Samuel Holland aab941b8c3 arm64: dts: allwinner: pinephone: Enable internal HMIC bias
Revisions 1.0 and 1.1 of the PinePhone mainboard do not have an external
resistor connecting HBIAS to MIC2P. Enable the internal resistor to
provide the necessary headeset microphone bias.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220621035452.60272-4-samuel@sholland.org
2022-07-08 18:52:08 +02:00
Tamás Szűcs b415bb7c97 arm64: tegra: Fix SDMMC1 CD on P2888
Hook SDMMC1 CD up with CVM GPIO02 (SOC_GPIO11) used for card detection on J4
(uSD socket) on the carrier.

Fixes: ef633bfc21 ("arm64: tegra: Enable card detect for SD card on P2888")
Signed-off-by: Tamás Szűcs <tszucs@protonmail.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:13 +02:00
Akhil R f7b93a0886 arm64: tegra: Update compatible for Tegra234 GPCDMA
Use the compatible specific to Tegra234 for GPCDMA to support
additional features.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:13 +02:00
Mikko Perttunen 4bb39ca25b arm64: tegra: Add Host1x and VIC on Tegra234
Add device tree nodes for Host1x and VIC on Tegra234.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:13 +02:00
Mikko Perttunen e30cf1011b arm64: tegra: Add Host1x context stream IDs on Tegra186+
Add Host1x context stream IDs on systems that support Host1x context
isolation. Host1x and attached engines can use these stream IDs to
allow isolation between memory used by different processes.

The specified stream IDs must match those configured by the hypervisor,
if one is present.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:13 +02:00
Kartik 28d860ed02 arm64: tegra: Enable native timers on Tegra234
The native timers IP block found on NVIDIA Tegra SoCs implements a
watchdog timer that can be used to recover from system hangs. Add and
enable the device tree node on Tegra234.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Thierry Reding 5aa9083efd arm64: tegra: Enable native timers on Tegra194
The native timers IP block found on NVIDIA Tegra SoCs implements a
watchdog timer that can be used to recover from system hangs. Add and
enable the device tree node on Tegra194.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Kartik c710ac0bfe arm64: tegra: Enable native timers on Tegra186
Enable the native timers on Tegra186 chips to allow using the watchdog
functionality to recover from system hangs.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Sumit Gupta 302e154000 arm64: tegra: Add node for CBB 2.0 on Tegra234
Tegra234 uses the Control Backbone (CBB) version 2.0. Add the nodes
that enable error handling from the various CBB 2.0 fabrics found on
Tegra234.

Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Sumit Gupta a47e173e5d arm64: tegra: Add node for CBB 1.0 on Tegra194
Add device tree nodes to enable error handling on the Control Backbone
(CBB). Tegra194 uses CBB version 1.0.

Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Krzysztof Kozlowski 012877d0a7 arm64: tegra: Align gpio-keys node names with dtschema
The node names should be generic and DT schema expects certain pattern
(e.g. with key/button/switch).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Mikko Perttunen 61192a9d8a arm64: tegra: Mark BPMP channels as no-memory-wc
The Tegra SYSRAM contains regions access to which is restricted to
certain hardware blocks on the system, and speculative accesses to
those will cause issues.

Patch 'misc: sram: Only map reserved areas in Tegra SYSRAM' attempted
to resolve this by only mapping the regions specified in the device
tree on the assumption that there are no such restricted areas within
the 64K-aligned area of memory that contains the memory we wish to map.

Turns out this assumption is wrong, as there are such areas above the
4K pages described in the device trees. As such, we need to use the
bigger hammer that is no-memory-wc, which causes the memory to be
mapped as Device memory to which speculative accesses are disallowed.

As such, the previous patch in the series,
  'firmware: tegra: bpmp: do only aligned access to IPC memory area',
is required with this patch to make the BPMP driver only issue aligned
memory accesses as those are also required with Device memory.

Fixes: fec29bf049 ("misc: sram: Only map reserved areas in Tegra SYSRAM")
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Yousaf Kaukab <ykaukab@suse.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Akhil R 60d2016a51 arm64: tegra: Add Tegra234 GPCDMA device tree node
Add device tree nodes for Tegra234 GPCDMA

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Krzysztof Kozlowski 599b7aebc9 arm64: tegra: Adjust whitespace around '='
Fix whitespace coding style: use single space instead of tabs or
multiple spaces around '=' sign in property assignment. No functional
changes (same DTB).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Sameer Pujar afcb41e30c arm64: tegra: Enable OPE on various platforms
Enable OPE module usage on various Jetson platforms. This can be plugged
into an audio path using ALSA mixer controls. Add audio-graph-port binding
to use OPE device with generic audio-graph based sound card.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Sameer Pujar 4b6a1b7cbd arm64: tegra: Add OPE device on Tegra210 and later
Output Processing Engine (OPE) is a client of AHUB and is present on
Tegra210 and later generations of Tegra SoC. Add this device on the
relevant SoC DTSI files.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-07-08 18:00:12 +02:00
Arnd Bergmann 132582d210 Renesas ARM DT updates for v5.20 (take two)
- Ethernet MAC and switch support for the RZ/N1 SoC on the RZN1D-DB
     development board,
   - AA1024XD12 panel overlay support for the Draak, Ebisu, and
     Salvator-X(S) development boards,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCYsfxkAAKCRCKwlD9ZEnx
 cGKNAQC5Wl91yn3heD50V0vXjs6CqNm/bdrWOEmnwwlcnyClqQEAnQjTHs4iriar
 110WP2JSNUoZwawygZFq0jHBgMVFOQA=
 =LnAY
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLIF6MACgkQmmx57+YA
 GNkxQw//ZHD0LKpT4v1C1o1y4MNuVujljbC/uS9Wk+vhYuWebo0OKAu8CEyAwoVO
 SsnYuNpzjLiMlbDc+Id+9C9IbF2k97hUJWDJWMOLF2wtESRtAwkoYHiJToMH9216
 zUxrFpah4LAMKDwPxOqLvBl9/5Hzy4L7tfslmQijiupfGGF6gWiWrA+kgBXpX9+L
 Y1H9PdTd+XLuqmXXa3o+RA0n8d6ZlYxYAJ73OC6nXhr/fd2dpmS/nYtchM3AeLVp
 QAJSf9NnJQPm17G+6TvBHOIOBjyCSsLWemNEbXPkyW3X/H/LCz1RyEeU0fy0B4eu
 wzEwLd/YveEh8WX/l+r8g6gF8OjzzXoQvFIAe4lfXvkUhwFohiCQuBXI34TBzCzb
 fGUKJohs6GSrjKRskIJzaojuaHuKMIlX3+Ynx8XoJqczbWZpqdMs+xTFBnNk8HGH
 lYLsX+rlphZhPeTPQNT2Q7eEnH3skTzBG2Hmhy/2kpZMxtV/epdMt/+BRSRsa/Rp
 LKAL+npYkF9m8Xn0HyWCh2gEpWTHnBOGG/8O7XaPQpJxEfKgCncBjRWGlJlze4Gh
 zRJmfE4OyqhHnXmbpgRNglZjNtiq+z3L7vKLwFYYpvL3lcZtzr75vGpBCt+wyQMf
 b2ZXUPVG0h7bIOuf6RvYYKkNgEePuLyXlAWuhaTdskoDUrQy2EA=
 =wgc5
 -----END PGP SIGNATURE-----

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

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

  - Ethernet MAC and switch support for the RZ/N1 SoC on the RZN1D-DB
    development board,
  - AA1024XD12 panel overlay support for the Draak, Ebisu, and
    Salvator-X(S) development boards,
  - Miscellaneous fixes and improvements.

* tag 'renesas-arm-dt-for-v5.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: dts: renesas: Add panel overlay for Draak and Ebisu boards
  arm64: dts: renesas: Add panel overlay for Salvator-X(S) boards
  arm64: dts: renesas: Prepare AA1024XD12 panel .dtsi for overlay support
  arm64: dts: renesas: spider-cpu: Fix scif0/scif3 sort order
  ARM: dts: r9a06g032-rzn1d400-db: Add switch description
  dt-bindings: net: pcs: add bindings for Renesas RZ/N1 MII converter
  ARM: dts: r9a06g032: Describe switch
  ARM: dts: r9a06g032: Describe GMAC2
  ARM: dts: r9a06g032: Describe MII converter
  arm64: dts: renesas: r9a07g054l2-smarc: Correct SoC name in comment
  ARM: dts: renesas: Fix DA9063 watchdog subnode names
  arm64: dts: renesas: r8a779m8: Drop operating points above 1.5 GHz

Link: https://lore.kernel.org/r/cover.1657278845.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-08 13:40:19 +02:00
Abel Vesa 3876f4829a arm64: dts: freescale: imx8qxp: Fix the keys node name
The proper name is 'keys', not 'scu-keys'.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-08 16:37:10 +08:00
Viorel Suman c7b3c05309 arm64: dts: freescale: imx8: Fix the system-controller node name
The proper name is 'system-controller', not 'scu'.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-08 16:37:08 +08:00
Viorel Suman 6003913ac7 arm64: dts: freescale: imx8qxp: Fix the ocotp node name
The proper name is 'ocotp', not 'imx8qx-ocotp'.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-08 16:37:06 +08:00
Abel Vesa b64aebbe79 arm64: dts: freescale: imx8qxp: Add fallback compatible for clock controller
Both i.MX8QM and i.MX8DXL use the fallback fsl,scu-clk compatible.
They rely on the same driver generic part as the i.MX8QXP, so
lets add it to i.MX8QXP too, for consitency.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-08 16:37:03 +08:00
Abel Vesa b3993c7adf arm64: dts: freescale: imx8: Fix power controller name
The proper name is power-controller, not imx8qx-pd.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-08 16:37:01 +08:00
Viorel Suman 78cba06629 arm64: dts: freescale: imx8qxp: Remove unnecessary clock related entries
XTAL clocks are not exposed by SCU to OS via OS<->SCU communication protocol,
so remove unnecessary entries.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-08 16:36:50 +08:00
Peng Fan d4ac6028b9 arm64: dts: imx8mp: add NoC node
Add i.MX8MP NoC node to make the interconnect i.MX8MP driver could work.
Currently dynamic frequency scaling of the i.MX8MP NoC has not been
supported, only NoC initial settings are configured by interconnect
driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2022-07-08 16:20:47 +08:00
Arnd Bergmann d67fe5e3b2 arm64: dts: ZynqMP DT changes for v5.20
- Extend gpio-zynq DT binding (compatible, power-domains, gpio-line-names)
 - Fix sm-k26 gpio comment
 - Wire AMS device
 - Align gpio-keys node names with dtschema
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCYsbszwAKCRDKSWXLKUoM
 IZggAJ9cTVwy6aARMPmgTpFCvpJP1E18gACfcUkdsBPy9RRj92PhDRujHxJGTHo=
 =hOqh
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLH328ACgkQmmx57+YA
 GNk3EA//fhLY4XpUm/BEwkwk33/u7HljuHFaO5F/fP746wQHHB4M6NSTCAyonqC3
 mol9IwyaoAXF3dsy2quebD14dXnR9az7+s0dF2fVNOLoIerG9qK2xSqMcvl+Rbdb
 mOZgYxzWTDaCeN+qgTFfjnQ/ZCUEoa13QrI3v2/W1D1MJxBTq/DX7L9EK+snHUoi
 1SVrxM7gikH/bX5vgHyiOCREfNvdLji+VwFBHQB244h+ENuGOeimnHt/IH/+jaZ9
 nIWwABS0zcpq7pzPleKC5dLd6RPfhZ91iz2ao1uSXrNebmAss2EtDJcM0yskeQ66
 mBd++O1KD5f51GMNjL0VuOkOL/BV4aX6Fm41o4Q/v33oHqKPdCiNVo6dX0FC06ZN
 wNEZ6XsD7JsStcIktFAZlmU6ONpdKiKl6ZeGsR/LpgI68hbCaVqKRcRlDgA4OjRW
 Zrr9pBQPkfQ7IaTekRu5O1R9r+au+cZc827bEZX5pABabiTAuKXUuwzIFrrjhi0c
 sO3glNLItk7Y8r1qlAJc5XKlT9PwBNJaFJIWU7cPCDyqXNdePIf5QrHGC467bxFq
 weuRfz4SKDRLlaWOACk4o7diIIiGOdwjYWB/gLAcJQnxTsOJIRIm7T/mzKdF40dh
 7bP1hA6zxm2yxsUCm0/wh7NE6iSofTzgJ4nk194J+zyQ/hgjpC0=
 =PSBg
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-dt-for-v5.20' of https://github.com/Xilinx/linux-xlnx into arm/dt

arm64: dts: ZynqMP DT changes for v5.20

- Extend gpio-zynq DT binding (compatible, power-domains, gpio-line-names)
- Fix sm-k26 gpio comment
- Wire AMS device
- Align gpio-keys node names with dtschema

* tag 'zynqmp-dt-for-v5.20' of https://github.com/Xilinx/linux-xlnx:
  arm64: dts: xilinx: align gpio-key node names with dtschema
  arm64: dts: zynqmp: add AMS driver to device tree
  dt-bindings: gpio: zynq: Describe gpio-line-names
  arm64: zynqmp: Fix comment about number of gpio line names
  dt-bindings: gpio: zynq: Add power-domains
  dt-bindings: gpio: zynq: Add missing compatible strings

Link: https://lore.kernel.org/r/452e8c68-b63b-f4f6-a937-67f65c64a8a0@monstr.eu
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-08 09:40:31 +02:00
Jakub Kicinski 83ec88d81a Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-07-07 12:07:37 -07:00
Hsin-Yi Wang 9c61051561 arm64: dts: mt8183: Add panel rotation
krane, kakadu, and kodama boards have a default panel rotation.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20220530113033.124072-2-hsinyi@chromium.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:52:49 +02:00
Nick Hainke c98e6e6836 arm64: dts: mt7622: fix BPI-R64 WPS button
The bananapi R64 (BPI-R64) experiences wrong WPS button signals.
In OpenWrt pushing the WPS button while powering on the device will set
it to recovery mode. Currently, this also happens without any user
interaction. In particular, the wrong signals appear while booting the
device or restarting it, e.g. after doing a system upgrade. If the
device is in recovery mode the user needs to manually power cycle or
restart it.

The official BPI-R64 sources set the WPS button to GPIO_ACTIVE_LOW in
the device tree. This setting seems to suppress the unwanted WPS button
press signals. So this commit changes the button from GPIO_ACTIVE_HIGH to
GPIO_ACTIVE_LOW.

The official BPI-R64 sources can be found on
https://github.com/BPI-SINOVOIP/BPI-R64-openwrt

Fixes: 0b6286dd96 ("arm64: dts: mt7622: add bananapi BPI-R64 board")

Suggested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
Link: https://lore.kernel.org/r/20220630111746.4098-1-vincent@systemli.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:45:07 +02:00
Xiangsheng Hou 04266856ce arm64: dts: mt8173: Fix nor_flash node
Add axi clock since the driver change to DMA mode which need
to enable axi clock. And change spi clock to 26MHz as default.

Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
Link: https://lore.kernel.org/r/20220630090157.29486-2-xiangsheng.hou@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:43:20 +02:00
AngeloGioacchino Del Regno 10d4a706ff arm64: dts: mediatek: cherry: Add I2C-HID touchscreen on I2C4
This platform carries a HID compatible I2C touchscreen on the i2c4 bus,
but it may be at a different address, depending on the board model.
Add the node for a touchscreen at 0x10, but enable it only in the
final board dts.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-12-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:20 +02:00
AngeloGioacchino Del Regno c34bc66086 arm64: dts: mediatek: cherry: Enable support for the SPI NOR flash
This platform has a SPI NOR: enable support for it, completing the
storage compartment enablement for the entire platform.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-11-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:20 +02:00
AngeloGioacchino Del Regno 0de0fe950f arm64: dts: mediatek: cherry: Enable MT6360 sub-pmic on I2C7
All devices of the Cherry platform have a MT6360 sub-pmic,
providing two LDOs. Add the required node to enable the PMIC
but without regulators yet, as these will be added in a
later commit.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-10-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:20 +02:00
AngeloGioacchino Del Regno b6267a396e arm64: dts: mediatek: cherry: Enable T-PHYs and USB XHCI controllers
Add USB functionality by enabling the required PHYs and the XHCI
controllers.
This enables all of the supported USB ports on the Cherry boards.

Please note that u3phy1 also enables u3port1, which is configured
to be a PCI-Express PHY for the second PCIe controller that is
found on the MT8195 SoC, which will be enabled in a later commit.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-9-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:20 +02:00
AngeloGioacchino Del Regno d82b3562c4 arm64: dts: mediatek: cherry: Enable I2C and SPI controllers
This platform uses eight I2C controllers and one SPI controller:
in preparation for enabling devices attached to these controllers,
add basic configuration to enable the busses.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-8-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:19 +02:00
AngeloGioacchino Del Regno 5bf7dabe40 arm64: dts: mediatek: cherry: Document gpios and add default pin config
Add gpio-line-names to document GPIO names and add the default basic
pin configuration to allow lower power operation by setting appropriate
state on the unused pins.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-7-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:19 +02:00
AngeloGioacchino Del Regno 4d38070807 arm64: dts: mediatek: cherry: Add support for internal eMMC storage
Add mtk-sd controller and pin configuration to enable the internal
eMMC storage: now it is possible to mount a rootfs located at the
internal storage.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-6-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:19 +02:00
AngeloGioacchino Del Regno 9e0565069b arm64: dts: mediatek: cherry: Assign interrupt line to MT6359 PMIC
To allow MT6359 peripherals to trigger interrupts and the driver to
safely handle them, assign the right interrupt line for the Cherry
platform to the MT6359 PMIC node.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-5-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:19 +02:00
AngeloGioacchino Del Regno 37242cb97a arm64: dts: mediatek: cherry: Add platform regulators layout and config
Add the regulators layout for this platform, including the basic power
rails controlled by the EC (and/or always on).
Moreover, include the MT6359 PMIC devicetree and add some configuration
for its regulators, essential to keep the machine alive after booting.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-4-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:19 +02:00
AngeloGioacchino Del Regno 5eb2e303ec arm64: dts: mediatek: Introduce MT8195 Cherry platform's Tomato
Introduce the MT8195 Cherry Chromebook platform, including three
revisions of Cherry Tomato boards.

This basic configuration allows to boot Linux on all board revisions
and get a serial console from a ramdisk.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:41:19 +02:00
Nícolas F. R. A. Prado b0e50a1f5d arm64: dts: mediatek: asurada: Add SPI NOR flash memory
Add support for the SPI NOR flash memory present on the Asurada
platform.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-20-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:18 +02:00
Nícolas F. R. A. Prado b10e80b173 arm64: dts: mediatek: asurada: Enable SCP
Enable support for the SCP co-processor present on MT8192. It is used
as part of the video encoding and decoding processes.

A region of memory is carved out for its use, and remoteproc setup for
communication with the ChromeOS EC.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-19-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:18 +02:00
Nícolas F. R. A. Prado 15306b9062 arm64: dts: mediatek: asurada: Enable MMC
Enable both MMC controllers present on Asurada. MMC0 is for
non-removable internal memory, while MMC1 is an SD card slot. MMC1 isn't
used on all machines, but in those cases the CD interrupt is never
triggered and thus it is basically as if it was disabled.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-18-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:18 +02:00
Nícolas F. R. A. Prado 3183cb62b0 arm64: dts: mediatek: asurada: Add SPMI regulators
The Asurada platform uses regulators from MT6315 PMICs acessible through
SPMI. Add support for them.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-17-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:18 +02:00
Nícolas F. R. A. Prado af9e3ed087 arm64: dts: mediatek: asurada: Add MT6359 PMIC
MT6359 is the primary PMIC present on the Asurada platform. Include its
dtsi and configure properties specific for the platform.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-16-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:18 +02:00
Nícolas F. R. A. Prado 0dca9f0b3e arm64: dts: mediatek: asurada: Enable PCIe and add WiFi
Enable MT8192's PCIe controller and add support for the MT7921e WiFi
card that is present on that bus for the Asurada platform.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-15-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:17 +02:00
Nícolas F. R. A. Prado aa421ef2ee arm64: dts: mediatek: asurada: Enable XHCI
Enable XHCI controller on the Asurada platform. This allows the use of
the USB ports, and therefore a rootfs can be loaded and a usable shell
reached from a live USB image.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-14-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:17 +02:00
Nícolas F. R. A. Prado 6812f4ed6e arm64: dts: mediatek: spherion: Add keyboard backlight
The Spherion board has keyboard backlight controlled by the PWM signal
generated by the ChromeOS EC.

Enable PWM output for ChromeOS EC and add a PWM controlled LED node for
the keyboard backlight.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-13-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:17 +02:00
Nícolas F. R. A. Prado cbd4af081a arm64: dts: mediatek: asurada: Add I2C touchscreen
All machines of the Asurada platform have a touchscreen at address 0x10
in the I2C0 bus, but the devices vary: Spherion has the Elan eKTH3500
touchscreen, while Hayato has a generic HID-over-i2c touchscreen.

Add common support for the touchscreens on the platform and the
specifics in each board file.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-12-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:17 +02:00
Nícolas F. R. A. Prado e031715a70 arm64: dts: mediatek: asurada: Add Elan eKTH3000 I2C trackpad
Add support for the Elan eKTH3000 i2c trackpad present on Asurada. It is
connected to the I2C2 bus and has address 0x15.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-11-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:17 +02:00
Nícolas F. R. A. Prado 863fb75235 arm64: dts: mediatek: asurada: Add Cr50 TPM
The Asurada platform has a Google Security Chip connected to the SPI5
bus. It runs the cr50 firmware and provides TPM functionality. Add
support for it.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-10-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:17 +02:00
Nícolas F. R. A. Prado 9b909db680 arm64: dts: mediatek: asurada: Add keyboard mapping for the top row
Chromebooks' embedded keyboards differ from standard layouts for the
top row in that they have shortcuts in place of the standard function
keys. Map these keys to achieve the functionality that is pictured on
the printouts.

There's a minor difference between the keys present on Hayato, which
uses an older layout, and Spherion, which uses a newer one.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-9-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:17 +02:00
Nícolas F. R. A. Prado eb188a2aaa arm64: dts: mediatek: asurada: Add ChromeOS EC
Add support for the ChromeOS Embedded Controller present on the Asurada
platform. It is connected through the SPI1 bus and offers several
functionalities: base detection, PWM controller, I2C tunneling,
regulators, Type-C connector management, keyboard and Smart Battery
Metrics (SBS).

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-8-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:17 +02:00
Nícolas F. R. A. Prado 23e0fff324 arm64: dts: mediatek: asurada: Enable and configure I2C and SPI busses
The Asurada platform has five I2C controllers and two SPI controllers
that are used. In preparation for enabling the devices connected to
these controllers, enable and configure their busses.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-7-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:16 +02:00
Nícolas F. R. A. Prado cb75aeaf89 arm64: dts: mediatek: asurada: Add system-wide power supplies
Add system-wide power supplies present on all of the boards in the
Asurada family.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-6-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:16 +02:00
Nícolas F. R. A. Prado 9ec952276f arm64: dts: mediatek: asurada: Document GPIO names
Add the gpio-line-names property to gpio-controller in order to
document the usage of GPIOs on the Asurada platform.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-5-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:16 +02:00
Nícolas F. R. A. Prado 331fae2fc9 arm64: dts: mediatek: Introduce MT8192-based Asurada board family
Introduce the MT8192 Asurada Chromebook platform, including the Asurada
Spherion and Asurada Hayato boards.

This is enough configuration to get serial output working on Spherion
and Hayato.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220629155956.1138955-4-nfraprado@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 16:39:16 +02:00
Catalin Marinas 20794545c1 arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags"
This reverts commit e5b8d92189.

Pages mapped in user-space with PROT_MTE have the allocation tags either
zeroed or copied/restored to some user values. In order for the kernel
to access such pages via page_address(), resetting the tag in
page->flags was necessary. This tag resetting was deferred to
set_pte_at() -> mte_sync_page_tags() but it can race with another CPU
reading the flags (via page_to_virt()):

P0 (mte_sync_page_tags):	P1 (memcpy from virt_to_page):
				  Rflags!=0xff
  Wflags=0xff
  DMB (doesn't help)
  Wtags=0
				  Rtags=0   // fault

Since now the post_alloc_hook() function resets the page->flags tag when
unpoisoning is skipped for user pages (including the __GFP_ZEROTAGS
case), revert the arm64 commit calling page_kasan_tag_reset().

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Peter Collingbourne <pcc@google.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@gmail.com>
Link: https://lore.kernel.org/r/20220610152141.2148929-5-catalin.marinas@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-07 10:48:37 +01:00
Catalin Marinas 70c248aca9 mm: kasan: Skip unpoisoning of user pages
Commit c275c5c6d5 ("kasan: disable freed user page poisoning with HW
tags") added __GFP_SKIP_KASAN_POISON to GFP_HIGHUSER_MOVABLE. A similar
argument can be made about unpoisoning, so also add
__GFP_SKIP_KASAN_UNPOISON to user pages. To ensure the user page is
still accessible via page_address() without a kasan fault, reset the
page->flags tag.

With the above changes, there is no need for the arm64
tag_clear_highpage() to reset the page->flags tag.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Link: https://lore.kernel.org/r/20220610152141.2148929-3-catalin.marinas@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-07 10:48:37 +01:00
AngeloGioacchino Del Regno 63859d711a arm64: dts: mediatek: mt8183-kukui: Assign sram supply to mfg_async pd
Add a phandle to the MT8183_POWER_DOMAIN_MFG_ASYNC power domain and
assign the GPU VSRAM supply to this in mt8183-kukui: this allows to
keep the sram powered up while the GPU is used.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220623123850.110225-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2022-07-07 11:39:03 +02:00
Laurent Pinchart fec6d133ce arm64: dts: renesas: Add panel overlay for Draak and Ebisu boards
The Draak and Ebisu boards support an optional LVDS panel. One
compatible panel is the Mitsubishi AA104XD12. Add a corresponding DT
overlay.

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/20211229193135.28767-4-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-07-07 11:05:00 +02:00
Laurent Pinchart e47b550145 arm64: dts: renesas: Add panel overlay for Salvator-X(S) boards
The Salvator-X and Salvator-XS boards support an optional LVDS panel.
One compatible panel is the Mitsubishi AA104XD12. Add a corresponding DT
overlay.

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/20211229193135.28767-3-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-07-07 11:00:47 +02:00
Laurent Pinchart 79e6820245 arm64: dts: renesas: Prepare AA1024XD12 panel .dtsi for overlay support
The Mitsubishi AA1024XD12 panel can be used for R-Car Gen2 and Gen3
boards as an optional external panel. It is described in the
arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi file as a direct child of the
DT root node. This allows including r8a77xx-aa104xd12-panel.dtsi in
board device trees, with other minor modifications, to enable the panel.

This is however not how external components should be modelled. Instead
of modifying the board device tree to enable the panel, it should be
compiled as a DT overlay, to be loaded by the boot loader.

Prepare the r8a77xx-aa104xd12-panel.dtsi file for this usage by
declaring a panel node only, without hardcoding its path. Overlay
sources can then include r8a77xx-aa104xd12-panel.dtsi where appropriate.

This change doesn't cause any regression as r8a77xx-aa104xd12-panel.dtsi
is currently unused. As overlay support for this panel has only been
tested with Gen3 hardware, and Gen2 support will require more
development, move the file to arch/arm64/boot/dts/renesas/.

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/20211229193135.28767-2-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-07-07 11:00:47 +02:00
Arnd Bergmann 999462d336 Samsung DTS ARM64 changes for v5.20, part two
1. Correct SPI11 pin names on ExynosAutov9.
 2. Add more USI (I2C/SPI/UART) devices to ExynosAutov9.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmLGktgQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD12WfD/4s6s9ETb18j2kbkxZCPy3ni/InFOJOJkeg
 7ssS+/SHkrsEBZGJwpJIpSJYm3/t9mFIrxgSQtkLJnxaB+TOhCh45F2YGtdIZOIk
 SRbJF2daRf2BwHNk/BWRXXUOXUtiAvaGCJj7Y29RzvoYI6bbRChp8XKQ6kQBdbv0
 kHtqDAjvAT26EgnVDn8woQknr48MqJEJ60R6gCfOGCUUaA8EMGR18vJ/XqvR6MYd
 JHnltN3OMInNSFaNae7+mRyc3k1I1/93A9gwLiAE//KTJ2617XA/TlgmVuVxXtkP
 cTBx9v3bPCUPjfa6+cMPKVG8wJIS7DSRb4L338d+9bMdWTLn8cHWGOsMFSbDRAtX
 ixH5R1KFyjsDBYgTE02nxpduutEukilkL8BboMnsxSBHoEQsyoFp+1F7t5o7yseB
 9uzTcXomeEwKxfearcH80qH/d4LkkI6hdinBsNvgJ3eZIxBh4vkJagfqEnkw04Jj
 xSeFaZ6ytKpYfjLC8ItTaTYxLu9LT40ld/mIAsTxyuYT+k05WAGTu6funV3XtyxB
 8S1zXnVS9+jpZWD7G7k+BI6WCoCgc6vYHpea6+CUc9ydX1oCcE9VBJhk20933R1v
 za0xvMgU969DNxQbsK6BoqNu7iXrzlpkLAotdLGt3Toin7z7ugLvTtoFBXhBFKII
 xcexHR8syQ==
 =17e3
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLGl9oACgkQmmx57+YA
 GNl3qxAAsuk110mHc7yFkGABTMF16B6eGNoG5EQMaNzYLxgfih7QSpc1fwV07iM4
 iNhXdIhevymCmg3f1x+hIFPIjLzDra238RQr5AmbnMFtzTP7CWRk0vGanto33Zo8
 A75mbWpdl9yq/ry5wvGIdBhIGjXax3U4eC5Z+79KQHrO9k8PbYPrM0gkY7FiRi9e
 wuebr7zQZlOretMV9tQCAJZ/0FWm8rTSqKCQEVoutbmRXC2ezrG31WfTtW59fwIM
 wpKbsEyzkrltixORIm2U5OYtqfiQFOAK5ym7tXUAIpGoGwd93hS0YzU5CPdMTKOS
 7GTNtx9wTAqyvkxDj1TRYzUkPgg2NeFW3rXZPdDvXR540b1JEBCXIOjqmIXA5PR8
 GbAFIYflRA+HnKi9FBk2N0N5Q9gg8NshYA9bgnwtmkvajgcsHNoKZIl78ra6H5As
 55U1c/Xmbq6DvlApNGhKYjbB3JXs8wSc777ZUNWnRA+7IhqTbjuzxel0wFIbjd/x
 5BID0abK+kF+ZgGgemgBXa2sZWhsjiFOxGDEE1pBhH0kbKHBTdE4cxBGQjjw2Onc
 He/Q/KEafhZX+4tKpQe/78+apbtjbp+eHAs8B86VSQSi/OaSF/vTMVllv00BBjKV
 0c6X8hDCQjHk3L0ZF13/gq3Pn3zkf2yl4rlv7dsoKlV1g+Z41DQ=
 =Q13t
 -----END PGP SIGNATURE-----

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

Samsung DTS ARM64 changes for v5.20, part two

1. Correct SPI11 pin names on ExynosAutov9.
2. Add more USI (I2C/SPI/UART) devices to ExynosAutov9.

* tag 'samsung-dt64-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynosautov9: add usi device tree nodes
  arm64: dts: exynosautov9: prepare usi0 changes
  arm64: dts: exynosautov9: add pdma0 device tree node
  dt-bindings: soc: samsung: usi: add exynosautov9-usi compatible
  arm64: dts: exynosautov9: correct spi11 pin names

Link: https://lore.kernel.org/r/20220707080408.69251-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-07 10:22:50 +02:00
Johan Hovold 02d99d4cfe arm64: dts: qcom: msm8996: clean up PCIe PHY node
Clean up the PCIe PHY node by renaming the wrapper node and grouping the
child node properties.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-15-johan+linaro@kernel.org
2022-07-06 21:39:48 -05:00
Johan Hovold 3a5da59af3 arm64: dts: qcom: msm8996: use non-empty ranges for PCIe PHYs
Clean up the PCIe PHY nodes by using a non-empty ranges property.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-14-johan+linaro@kernel.org
2022-07-06 21:39:48 -05:00
Johan Hovold e30d9f1e58 arm64: dts: qcom: sm8450: drop UFS PHY clock-cells
The QMP UFS PHY provides more than one symbol clock and would need an
index to differentiate the clocks, but none of this is described by the
binding currently.

Drop the incorrect '#clock-cells' property for now.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-12-johan+linaro@kernel.org
2022-07-06 21:39:16 -05:00
Johan Hovold be18bc7bd9 arm64: dts: qcom: sm8250: drop UFS PHY clock-cells
The QMP UFS PHY provides more than one symbol clock and would need an
index to differentiate the clocks, but none of this is described by the
binding currently.

Drop the incorrect '#clock-cells' property for now.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-11-johan+linaro@kernel.org
2022-07-06 21:39:16 -05:00
Johan Hovold 119feff146 arm64: dts: qcom: sc8280xp: drop UFS PHY clock-cells
The QMP UFS PHY provides more than one symbol clock and would need an
index to differentiate the clocks, but none of this is described by the
binding currently.

Drop the incorrect '#clock-cells' property for now.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-10-johan+linaro@kernel.org
2022-07-06 21:39:16 -05:00
Johan Hovold 0aaa0a9a47 arm64: dts: qcom: sm8450: drop USB PHY clock index
The QMP USB PHY provides a single clock so drop the redundant clock
index.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-9-johan+linaro@kernel.org
2022-07-06 21:39:16 -05:00
Johan Hovold af5515543b arm64: dts: qcom: sm8350: drop USB PHY clock index
The QMP USB PHY provides a single clock so drop the redundant clock
index.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-8-johan+linaro@kernel.org
2022-07-06 21:39:16 -05:00
Johan Hovold ed9cbbcb8c arm64: dts: qcom: msm8998: drop USB PHY clock index
The QMP USB PHY provides a single clock so drop the redundant clock
index.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-7-johan+linaro@kernel.org
2022-07-06 21:39:15 -05:00
Johan Hovold de9e7f77d8 arm64: dts: qcom: ipq8074: drop USB PHY clock index
The QMP USB PHY provides a single clock so drop the redundant clock
index.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-5-johan+linaro@kernel.org
2022-07-06 21:38:38 -05:00
Johan Hovold 9215a64a07 arm64: dts: qcom: ipq6018: drop USB PHY clock index
The QMP USB PHY provides a single clock so drop the redundant clock
index.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-4-johan+linaro@kernel.org
2022-07-06 21:38:38 -05:00
Johan Hovold d9fd162ce7 arm64: dts: qcom: sm8250: add missing PCIe PHY clock-cells
Add the missing '#clock-cells' properties to the PCIe QMP PHY nodes.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Fixes: e53bdfc009 ("arm64: dts: qcom: sm8250: Add PCIe support")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-3-johan+linaro@kernel.org
2022-07-06 21:38:38 -05:00
Johan Hovold 531c738fb3 arm64: dts: qcom: sc7280: drop PCIe PHY clock index
The QMP PCIe PHY provides a single clock so drop the redundant clock
index.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Fixes: bd7d507935 ("arm64: dts: qcom: sc7280: Add pcie clock support")
Fixes: 92e0ee9f83 ("arm64: dts: qcom: sc7280: Add PCIe and PHY related  nodes")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220705114032.22787-2-johan+linaro@kernel.org
2022-07-06 21:38:38 -05:00
Douglas Anderson 21857088fa Revert "arm64: dts: qcom: Fix 'reg-names' for sdhci nodes"
This reverts commit afcbe252e9.

The commit in question caused my sc7280-herobrine-herobrine-r1 board
not to boot anymore. This shouldn't be too surprising since the driver
is relying on the name "cqhci".

The issue seems to be that someone decided to change the names of
things when the binding moved from .txt to .yaml. We should go back to
the names that the bindings have historically specified.

For some history, see commit d3392339ca ("mmc: cqhci: Update cqhci
memory ioresource name") and commit d79100c91a ("dt-bindings: mmc:
sdhci-msm: Add CQE reg map").

Fixes: afcbe252e9 ("arm64: dts: qcom: Fix 'reg-names' for sdhci nodes")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220706144706.1.I48f35820bf3670d54940110462555c2d0a6d5eb2@changeid
2022-07-06 21:37:59 -05:00
Dmitry Baryshkov 713aa4efbc arm64: dts: qcom: sc7180-idp: add vdds supply to the DSI PHY
Add the (required) vdss-supply property to the DSI PHY node.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220706145412.1566011-3-dmitry.baryshkov@linaro.org
2022-07-06 21:30:18 -05:00
Dmitry Baryshkov 63162b473e arm64: dts: qcom: sc7280: use constants for gpucc clocks and power-domains
To ease merging of bindings and dts files, the constants were replaced
with numeric values. Change them back to defined constants.
While we are at it, fix the indentation of these clocks properties to
follow established guidelines.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220706145412.1566011-2-dmitry.baryshkov@linaro.org
2022-07-06 21:30:18 -05:00
Dmitry Baryshkov 1789a15973 arm64: dts: qcom: msm8996: add missing DSI clock assignments
Add missing DSI clock assignments to properly use DSI PHY clocks as DSI
byte and pixel clock parents.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220706145412.1566011-1-dmitry.baryshkov@linaro.org
2022-07-06 21:30:18 -05:00
Robert Marko 730d55d861 arm64: dts: qcom: ipq8074: add reset to SDHCI
Add reset to SDHCI controller so it can be reset to avoid timeout issues
after software reset due to bootloader set configuration.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220704143554.1180927-2-robimarko@gmail.com
2022-07-06 21:30:13 -05:00
Krzysztof Kozlowski d3ef125cf8 arm64: dts: qcom: sdm845: Add CPU BWMON
Add device node for CPU-memory BWMON device (bandwidth monitoring) on
SDM845 measuring bandwidth between CPU (gladiator_noc) and Last Level
Cache (memnoc).  Usage of this BWMON allows to remove fixed bandwidth
votes from cpufreq (CPU nodes) thus achieve high memory throughput even
with lower CPU frequencies.

Co-developed-by: Thara Gopinath <thara.gopinath@gmail.com>
Signed-off-by: Thara Gopinath <thara.gopinath@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220704121730.127925-5-krzysztof.kozlowski@linaro.org
2022-07-06 21:30:13 -05:00
Robert Marko 7d9c1da91a arm64: dts: qcom: ipq8074: move ARMv8 timer out of SoC node
The ARM timer is usually considered not part of SoC node, just like
other ARM designed blocks (PMU, PSCI).  This fixes dtbs_check warning:

arch/arm64/boot/dts/qcom/ipq8072-ax9000.dtb: soc: timer: {'compatible': ['arm,armv8-timer'], 'interrupts': [[1, 2, 3848], [1, 3, 3848], [1, 4, 3848], [1, 1, 3848]]} should not be valid under {'type': 'object'}
	From schema: dtschema/schemas/simple-bus.yaml

Signed-off-by: Robert Marko <robimarko@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[bjorn: Moved node after "soc" for alphabetical ordering]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220704113318.623102-1-robimarko@gmail.com
2022-07-06 21:30:09 -05:00
Kuogee Hsieh 154fd146a4 arm64: dta: qcom: sc7180: delete vdda-1p2 and vdda-0p9 from mdss_dp
Both vdda-1p2-supply and vdda-0p9-supply regulators are controlled
by dp combo phy. Therefore remove them from dp controller.

Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1656690436-15221-1-git-send-email-quic_khsieh@quicinc.com
2022-07-06 21:30:09 -05:00
Abel Vesa a1ade6cac5 arm64: dts: qcom: sdm845: Switch PSCI cpu idle states from PC to OSI
Switch from the flat PC idle states of sdm845 to OSI hierarchical idle
states. The exceptions are the cheza plaftorms, which need to remain with
PC idle states. So in order allow all the other platforms to switch,
while cheza platforms to remain the same, replace the PC idle states with
the OSI ones in the main SDM845 dtsi, and then override the inherited OSI
states with PC ones, delete inherited psci cpus nodes, domain idle states
and power domain properties.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220630101403.1888541-1-abel.vesa@linaro.org
2022-07-06 21:30:09 -05:00
David Heidelberg b9c0c0e5da arm64: dts: qcom: extend scm compatible strings
First device specific compatible, then general one.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220626183247.142776-2-david@ixit.cz
2022-07-06 21:30:09 -05:00
Anton Bambura 28ae8aa392 arm64: dts: qcom: add device tree for LG G7 and LG V35
Adds initial support for the LG G7 (judyln) and
LG V35 (judyp) phones.

Currently supported features:

 - Display via simplefb (panel driver is WIP)
 - Keys
 - Micro SD card
 - Modem (not tested much, but initialises)
 - UFS (crashes during intensive workloads, may need quirks)
 - USB in peripheral mode

Notable missing features:

 - Enabling WiFi causes a remoteproc crash, so it's disabled here.
   Needs to be debugged - ideas welcome!

Signed-off-by: Anton Bambura <jenneron@protonmail.com>
Signed-off-by: Stefan Hansson <newbie13xd@gmail.com>
Tested-by: Gregari Ivanov <llamashere@posteo.de>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220626164536.16011-2-newbie13xd@gmail.com
2022-07-06 21:30:09 -05:00
Dmitry Baryshkov 2b111e30c3 arm64: dts: qcom: msm8996: add xo clock source to rpmcc
Add XO clock source to the RPM clock controller.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220620071936.1558906-5-dmitry.baryshkov@linaro.org
2022-07-06 21:30:09 -05:00
Dmitry Baryshkov edb8e38ca9 arm64: dts: qcom: msm8996: add GCC's optional clock sources
Add missing GCC clock sources. This includes PCIe and USB PIPE and UFS
symbol clocks.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220620071936.1558906-4-dmitry.baryshkov@linaro.org
2022-07-06 21:30:09 -05:00
Dmitry Baryshkov b874fff9a7 arm64: dts: qcom: msm8996: correct #clock-cells for QMP PHY nodes
The commit 82d61e19fc ("arm64: dts: qcom: msm8996: Move '#clock-cells'
to QMP PHY child node") moved the '#clock-cells' properties to the child
nodes. However it missed the fact that the property must have been set
to <0> (as all pipe clocks use of_clk_hw_simple_get as the xlate
function. Also the mentioned commit didn't add '#clock-cells' properties
to second and third PCIe PHY nodes. Correct both these mistakes:

- Set '#clock-cells' to <0>,
- Add the property to pciephy_1 and pciephy_2 nodes.

Fixes: 82d61e19fc ("arm64: dts: qcom: msm8996: Move '#clock-cells' to QMP PHY child node")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220620071936.1558906-3-dmitry.baryshkov@linaro.org
2022-07-06 21:30:09 -05:00
Dylan Van Assche 8b936253e3 arm64: dts: qcom: sdm845-shift-axolotl: Enable pmi9889 LPG LED
Enables the RGB notification LED on the SHIFT 6mq (sdm845-shift-axolotl)
with the Qualcomm Light Pulse Generator bindings by Bjorn Andersson [1].
Patches are merged in for-next branch of linux-leds.
Tested these changes on the SHIFT 6mq.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/commit/?h=for-next&id=a8e53db46f19f67be6a26488aafb7d10c78e33bd

Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
Reviewed-by: Alexander Martinz <amartinz@shiftphones.com>
Tested-by: Alexander Martinz <amartinz@shiftphones.com>
Tested-by: Caleb Connolly <caleb@connolly.tech>
Reviewed-by: Caleb Connolly <caleb@connolly.tech>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220512054439.13971-1-me@dylanvanassche.be
2022-07-06 21:30:04 -05:00
Jayesh Choudhary 8af893654c arm64: dts: ti: k3-am62-main: Enable crypto accelerator
Add the node for sa3ul crypto accelerator.

Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220624043905.129207-1-j-choudhary@ti.com
2022-07-06 19:34:30 -05:00
Guillaume La Roque e2788887b3 arm64: dts: ti: k3-am625-sk: Enable ramoops
Enable ramoops features to easily debug some issues.

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220517122828.2985179-1-glaroque@baylibre.com
2022-07-06 19:29:19 -05:00
Aswath Govindraju c553bf25f0 arm64: dts: ti: k3-am642-sk: Add pinmux corresponding to main_uart0
Add pinmux details required for the zeroth instance of main UART.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220516113417.3516-1-a-govindraju@ti.com
2022-07-06 19:28:04 -05:00
Krzysztof Kozlowski 76f11e77f9 arm64: defconfig: enable Qualcomm Bandwidth Monitor
Enable the Qualcomm Bandwidth Monitor to allow scaling interconnects
depending on bandwidth usage between CPU and memory.  This is used
already on Qualcomm SDM845 SoC.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220704121730.127925-4-krzysztof.kozlowski@linaro.org
2022-07-06 15:58:13 -05:00
Arnd Bergmann ec21041bb3 Cleanup of ARM64 DTS for v5.20, part two
Remaining cleanups for ARM64 DTS: gpio-keys and led node names on Marvel
 platforms.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmLFuQsQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD17EZD/9BLYWbXy+xsUSKVs6a7PCP2JV2TDTym+2/
 qUP+gBcWHtO08MRmti+Wa2hiLZOV8xcr0Su+fbv/xA4iLJM52ZhgsQLZxwX7DYUg
 x/FbhgBTVgCHaFHlZJK1sHaFpAOaxbYhqiycdtzkLzuS+6DjUuKQPhDlfOb4suct
 LGl/8dAI5W4PP1YYAtB1IaI8JdaPf9ElC1VRdJGeyVMZPEhOjc2gUzuCPp/iRrdR
 e+0J/F2OmutFI4G7VUEczSl3Xx83gM/uj6QyhN0idszdbTHRjzCZynqdG8mFJYiK
 LZAK2NZJ5qIyHpnxR3EWJZejgF3eE9uD/EIyHPLCh2/26tcs7LRnRZKFKdUx4JNQ
 NN6l57p9KuXnlQGv95YrxJVo5iGqnlshUIm57v+WdpdPIMNPiZHUHH0/0kMACvSM
 n8wxTMTXaGe1gwdry8ePHURcnboDuPef0VQ4C6dSZ2xqh0b+6bTqKv31+Mj2tHDo
 WiPdFnoSRkWhUO220ZBj7DPTXedpdon8K6/8vSiNTQi7wsZQ8Kroyd/7ytKhDfzl
 tIFufGjNRFumAzk3v4GVp29G5lbsf2rrOHSnMPD/ItoXh16PzSRq4YyCrkRI/lqa
 1zK2KBsoMyObBRpRLgAOuf0MfsdwJWT/kWkzV4LzSFy/zDa8qNEcV7SYQC0C9Hd0
 UFOcAn+lkQ==
 =oAoI
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmLF8XUACgkQmmx57+YA
 GNmRzw/+LkaC50V0MBk5oetzogaLIfHV2Clnnu3as98zFNv0tSrG0hsnR4Vc6hix
 8GvfbIesu8D57QjzdLiusRX8/bpZQFaE4IKhcYzaHHq5Fr74OMdURy2iA6gVXAIY
 pr7TCJN5BajdatoXqEfDanxaOkGXBwM5z3qoyL41X5jDJHx3Lz903bx+7ws5N3FJ
 UhbDe4bZi+fsfBRMrjFCGX2lxdnR9Zv64V/tXCURymT9zBKf9ydjQLZ5m61rkuBL
 1rjaOw2UEosrzzmGzW6tSCmtOZLHrpZ3pHcAGggAeZHiN03iaZitgFW48cT9E+iI
 B78kq/swsgXOmMdP99OUGS9W0sqy8kVRc3MpGy7Btq4+jlBn07yYyoOYQgMSvyPU
 AFBMiIQRL006HU/WP+1QltDewnFLmNPB22+N5fcvcwLDt94K1I41N1paRfGBFdKI
 MkYz48yg2Q5JoNZ2vgt2uZXiGVc+iGZcfhfFZFI+fC7KSjAWh0zbfjIcpuaN3scL
 NwlITx/wVzMct/p/9ohmpj2UyA5XRs7j7OXMbHmlk4ykvFfVvQk8CBP/OeO33k3P
 IV8dk4cK9eopVut24dRWsfM+B5jHL785TrXogbSDSRNJUZ77IAr2vtTAQlaicXuC
 a2yLrHT3BrW2947F5zlxQHU+rkKkhMwsMxDYdmzuCFHgZ0bWcx4=
 =jO+A
 -----END PGP SIGNATURE-----

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

Cleanup of ARM64 DTS for v5.20, part two

Remaining cleanups for ARM64 DTS: gpio-keys and led node names on Marvel
platforms.

* tag 'dt64-cleanup-5.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: marvell: armada-3720: align lednode names with dtschema
  arm64: dts: marvell: align gpio-key node names with dtschema

Link: https://lore.kernel.org/r/20220706163754.33064-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-07-06 22:32:53 +02:00
Marijn Suijten e5de51e264 arm64: dts: qcom: sm6125: Add DLL/DDR configuration on SDHCI 1/2
These config values have been extracted from CodeLinaro's most recent
trinket/sm6125 tag:
https://git.codelinaro.org/clo/la/kernel/msm-4.14/-/blob/LA.UM.9.11.r1-05600-NICOBAR.QSSI12.0/arch/arm64/boot/dts/qcom/trinket.dtsi

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220508100336.127176-3-marijn.suijten@somainline.org
2022-07-06 15:30:35 -05:00
Marijn Suijten cbfb5668ae arm64: dts: qcom: sm6125: Append -state suffix to pinctrl nodes
According to qcom,sm6125-pinctrl.yaml all nodes inside the tlmm must be
suffixed by -state:

    qcom/sm6125-sony-xperia-seine-pdx201.dtb: pinctrl@500000: 'sdc2-off', 'sdc2-on' do not match any of the regexes: '-state$', 'pinctrl-[0-9]+'

The label names have been updated to match, going from sdc2_state_X to
sdc2_X_state.

Fixes: cff4bbaf2a ("arm64: dts: qcom: Add support for SM6125")
Fixes: 82e1783890 ("arm64: dts: qcom: sm6125: Add support for Sony Xperia 10II")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220508100336.127176-2-marijn.suijten@somainline.org
2022-07-06 15:30:35 -05:00
Marijn Suijten 6990640a93 arm64: dts: qcom: sm6125: Move sdc2 pinctrl from seine-pdx201 to sm6125
Both the sdc2-on and sdc2-off pinctrl nodes are used by the
sdhci@4784000 node in sm6125.dtsi.  Surprisingly sdc2-off is defined in
sm6125, yet its sdc2-on counterpart is only defined in board-specific DT
for the Sony Seine PDX201 board/device resulting in an "undefined label
&sdc2_state_on" error if sm6125.dtsi were included elsewhere.
This sm6125 base dtsi should not rely on externally defined labels; the
properties referencing it should then also be written externally.
Since the sdc2-on pin configuration is board-independent just like
sdc2-off, move it from seine-pdx201.dts into sm6125.dtsi.

The SDCard-detect pin (gpio98) is however board-specific, and remains as
an overwrite in seine-pdx201.dts for both the on and off state.

As a drive-by cleanup, reorder bias- and drive-strength properties.

Fixes: cff4bbaf2a ("arm64: dts: qcom: Add support for SM6125")
Fixes: 82e1783890 ("arm64: dts: qcom: sm6125: Add support for Sony Xperia 10II")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220508100336.127176-1-marijn.suijten@somainline.org
2022-07-06 15:30:34 -05:00
Bjorn Andersson d1a405d222 arm64: dts: qcom: db820c: Add user LEDs
The db820c has 4 "user LEDs", all connected to the PMI8994. The first
three are connected to the three current sinks provided by the TRILED
and the fourth is connected to MPP2.

By utilizing the DTEST bus the MPP is fed the control signal from the
fourth LPG block, providing a consistent interface to the user.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Dylan Van Assche <me@dylanvanassche.be>
Link: https://lore.kernel.org/r/20220505022706.1692554-5-bjorn.andersson@linaro.org
2022-07-06 15:23:07 -05:00
Bjorn Andersson f041bb3cd7 arm64: dts: qcom: pmi8994: Define MPP block
The pmi8994 has 4 multi-purpose-pins, add these to the definition.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Dylan Van Assche <me@dylanvanassche.be>
Link: https://lore.kernel.org/r/20220505022706.1692554-4-bjorn.andersson@linaro.org
2022-07-06 15:23:07 -05:00