Commit Graph

66225 Commits

Author SHA1 Message Date
Claudiu Beznea
85b1304b9d ARM: dts: at91: sama7g5ek: set regulator voltages for standby state
Set regulator voltages for standby state to avoid wrong behavior of
system while in standby. The CPU voltage has been chosen as being the
one corresponding to OPP=600MHz. Next commit will set the 600MHz OPP
as the suspend OPP.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220113144900.906370-8-claudiu.beznea@microchip.com
2022-02-25 11:32:22 +01:00
Claudiu Beznea
279d626d73 ARM: dts: at91: fix low limit for CPU regulator
Fix low limit for CPU regulator. Otherwise setting voltages lower than
1.125V will not be allowed (CPUFreq will not be allowed to set proper
voltages on proper frequencies).

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220113144900.906370-7-claudiu.beznea@microchip.com
2022-02-25 11:32:22 +01:00
Hari Prasath
04956b7216 ARM: dts: at91: sama7g5: Enable can0 and can1 support in sama7g5-ek
Enable the can0 and can1 controllers in sama7g5-ek board along with
its pin mux settings.

Signed-off-by: Hari Prasath <Hari.PrasathGE@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220222113924.25799-3-Hari.PrasathGE@microchip.com
2022-02-25 11:32:21 +01:00
Hari Prasath
f5e676c6aa ARM: dts: at91: sama7g5: Add can controllers of sama7g5
Add support for all the six CAN controllers of sama7g5.The internal SRAM of 128KB
is split among the CAN controllers for the message RAM elements leaving a small
portion reserved for power management. The SRAM split up is as below.

Lower 64K:
        PM       13K
        can-0    17K
        can-1    17K
        can-2    17K

Higher 64K:

        can-3    17K
        can-4    17K
        can-5    17K

Signed-off-by: Hari Prasath <Hari.PrasathGE@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220222113924.25799-2-Hari.PrasathGE@microchip.com
2022-02-25 11:32:21 +01:00
Tudor Ambarus
f8b94b1500 ARM: dts: at91: sama7g5: Add crypto nodes
Describe and enable the AES, SHA and TDES crypto IPs. Tested with the
extra run-time self tests of the registered crypto algorithms.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220208105646.226623-1-tudor.ambarus@microchip.com
2022-02-25 11:32:21 +01:00
Arnd Bergmann
dd865f090f Merge branch 'set_fs-4' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic into asm-generic
Christoph Hellwig and a few others spent a huge effort on removing
set_fs() from most of the important architectures, but about half the
other architectures were never completed even though most of them don't
actually use set_fs() at all.

I did a patch for microblaze at some point, which turned out to be fairly
generic, and now ported it to most other architectures, using new generic
implementations of access_ok() and __{get,put}_kernel_nocheck().

Three architectures (sparc64, ia64, and sh) needed some extra work,
which I also completed.

* 'set_fs-4' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  uaccess: remove CONFIG_SET_FS
  ia64: remove CONFIG_SET_FS support
  sh: remove CONFIG_SET_FS support
  sparc64: remove CONFIG_SET_FS support
  lib/test_lockup: fix kernel pointer check for separate address spaces
  uaccess: generalize access_ok()
  uaccess: fix type mismatch warnings from access_ok()
  arm64: simplify access_ok()
  m68k: fix access_ok for coldfire
  MIPS: use simpler access_ok()
  MIPS: Handle address errors for accesses above CPU max virtual user address
  uaccess: add generic __{get,put}_kernel_nofault
  nios2: drop access_ok() check from __put_user()
  x86: use more conventional access_ok() definition
  x86: remove __range_not_ok()
  sparc64: add __{get,put}_kernel_nofault()
  nds32: fix access_ok() checks in get/put_user
  uaccess: fix nios2 and microblaze get_user_8()
  uaccess: fix integer overflow on access_ok()
2022-02-25 11:16:58 +01:00
Arnd Bergmann
f03f10a982 Merge tag 'omap-for-v5.17/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
Fixes for omaps

Fixes for devkit8000 timer regression. Similar to the earlier beagleboard
fixes, we must not configure the clocksource drivers to use an alternative
timer configuration. It causes unnecessary issues with power management.
Only some old designs based on early beagleboard revisions with a miswired
timer need to use the alternative timer.

* tag 'omap-for-v5.17/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: Use 32KiHz oscillator on devkit8000
  ARM: dts: switch timer config to common devkit8000 devicetree

Link: https://lore.kernel.org/r/pull-1645606483-876944@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-25 11:14:23 +01:00
Alexandre Torgue
cb4b2d26c7 ARM: dts: stm32: Correct masks for GIC PPI interrupts on stm32mp15
Using GIC_CPU_MASK_SIMPLE(x), x should reflect the number of CPUs.
STM32MP151 is a single A7.
STM32MP153/157 is a dual A7.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Acked-by: Marc Zyngier <maz@kernel.org>
2022-02-25 10:53:15 +01:00
Alexandre Torgue
bf5f07e706 ARM: dts: stm32: Correct masks for GIC PPI interrupts on stm32mp13
Using GIC_CPU_MASK_SIMPLE(x), x should reflect the number of CPUs.
STM32MP13 is a single core A7.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Acked-by: Marc Zyngier <maz@kernel.org>
2022-02-25 10:53:15 +01:00
Fabrice Gasnier
b814f7544a ARM: dts: stm32: remove timer5 duplicate unit-address on stm32f7 series
Remove the following warnings seen when building with W=1.
Warning (unique_unit_address): /soc/timer@40000c00: duplicate unit-address
(also used in node /soc/timers@40000c00)
This approach is based on some discussions[1], to restructure the dtsi
and dts files.

Timer5 is enabled by default on stm32f7 series, to act as clockevent. In
order to get rid of the W=1 warning, and be compliant with dt-schemas
(e.g. dtbs_check):
- In stm32f746.dtsi:
  . Keep the more complete timers5 description
  . Remove the most simple timer5 node that is duplicate
- In each board:
  . adopt "st,stm32-timer" compatible for timers5, also add the interrupt
  . use /delete-property/ and /delete-node/ so the it matches the
    clockevent bindings

Note: all this is done in one shot (e.g. not split) to keep clockevent
functionality.

[1] https://lore.kernel.org/linux-arm-kernel/Yaf4jiZIp8+ndaXs@robh.at.kernel.org/

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Fabrice Gasnier
e6bc0d6ac6 ARM: dts: stm32: remove some timer duplicate unit-address on stm32f7 series
Several unused "timer" are duplicate nodes of "timers" nodes.
There are two dt-schemas:
- timer/st,stm32-timer.yaml: A timer is needed on STM32F7 series, on all
  boards, to act as clockevent.
- mfd/st,stm32-timers.yaml: Timers can be used for other purpose.

By default, timer5 is left enabled to be used as clockevent. Remove all
other timer clockevent nodes that are currently unused and duplicated.

This removes several messages: Warning (unique_unit_address): /soc/timer@..
duplicate unit-address (also used in node /soc/timers@...)

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Alexandre Torgue
f03b9808e6 ARM: dts: stm32: Enable EXTI on stm32mp13
As EXTI/GIC mapping has changed between STM32MP15 and STM32MP13, a new
compatible is needed to choose mp13 mapping table in stm32-exti driver.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
2a8092a5a6 ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcor-avenger96
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp15xx-dhcor-avenger96 board device
tree to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c ("serial: stm32: fix
threaded interrupt handling").
Delete also usart2 and uart7 DMA property to keep current behavior.

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
9269f28b7d ARM: dts: stm32: keep uart4 behavior on stm32mp15xx-dhcom-som
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp15xx-dhcom-som board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c ("serial: stm32: fix
threaded interrupt handling").

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
b1bcd81718 ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-picoitx
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete usart3 and uart8 nodes DMA property in stm32mp15xx-dhcom-picoitx
board device tree to keep current behavior.

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
89104f45a3 ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-pdk2
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete usart3 and uart8 DMA property in stm32mp15xx-dhcom-pdk2 board
device tree to keep current behavior.

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
97b37fb075 ARM: dts: stm32: keep uart nodes behavior on stm32mp15xx-dhcom-drc02
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete usart3 and uart8 nodes DMA property in stm32mp15xx-dhcom-drc02
board device tree to keep current behavior.

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
d8268564a3 ARM: dts: stm32: keep uart4 behavior on stm32mp157c-odyssey
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157c-odyssey board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c ("serial: stm32: fix threaded
interrupt handling").

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
aed569aaf1 ARM: dts: stm32: keep uart4 behavior on stm32mp157c-lxa-mc1
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157c-lxa-mc1 board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c ("serial: stm32: fix threaded
interrupt handling").

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
ee41561d9c ARM: dts: stm32: keep uart nodes behavior on stm32mp157a-stinger96
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157a-stinger96 board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c ("serial: stm32: fix threaded
interrupt handling").
Delete also usart2 and uart7 DMA property to keep current behavior.

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
9e9388e2ff ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp1-microdev2.0 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c ("serial: stm32: fix
threaded interrupt handling").
Delete also uart8 DMA property to keep current behavior.

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
ab0e8febe5 ARM: dts: stm32: keep uart nodes behavior on stm32mp1-microdev2.0-of7
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp1-microdev2.0-of7 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c ("serial: stm32: fix
threaded interrupt handling").
Delete also uart8 DMA property to keep current behavior.

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
49bc295c6a ARM: dts: stm32: keep uart4 behavior on stm32mp157a-iot-box
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157a-iot-box board device tree to
keep console in irq mode, as DMA support for console has been removed
from the driver by commit e359b4411c ("serial: stm32: fix threaded
interrupt handling").

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
2fd0c0fe7a ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-edimm2.2
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in icore-stm32mp1-edimm2.2 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c ("serial: stm32: fix
threaded interrupt handling").

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
97f44495f8 ARM: dts: stm32: keep uart4 behavior on icore-stm32mp1-ctouch2
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in icore-stm32mp1-ctouch2 board device tree
to keep console in irq mode, as DMA support for console has been
removed from the driver by commit e359b4411c ("serial: stm32: fix
threaded interrupt handling").

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
76594563fa ARM: dts: stm32: keep uart4 and uart7 behavior on stm32mp15xx-dkx
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp15xx-dkx board device tree to keep
console in irq mode, as DMA support for console has been removed from
the driver by commit e359b4411c ("serial: stm32: fix threaded
interrupt handling").
Delete also uart7 DMA property to keep current behavior.

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
8201f5f5fd ARM: dts: stm32: keep uart4 behavior on stm32mp157c-ed1
DMA configuration is added to uart nodes in stm32mp15x device tree.
Delete uart4 DMA property in stm32mp157c-ed1 board device tree to keep
console in irq mode, as DMA support for console has been removed from
the driver by commit e359b4411c ("serial: stm32: fix threaded
interrupt handling").

Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Erwan Le Ray
0f18f728ba ARM: dts: stm32: add DMA configuration to UART nodes on stm32mp151
Add DMA configuration in stm32mp15x uart nodes by selecting dma direct
mode and alternate REQ/ACK dma protocol for uart.

DMA direct mode allows to bypass DMA FIFO. Each DMA request immediately
initiates a transfer from/to the memory. This allows USART to get data
transferred, even when the transfer ends before the DMA FIFO completion.

Default REQ/ACK DMA protocol consists in maintaining ACK signal up to the
removal of REQuest and the transfer completion.
In case of alternative REQ/ACK protocol, ACK de-assertion does not wait the
removal of the REQuest, but only the transfer completion.
Due to a possible DMA stream lock when transferring data to/from STM32
USART/UART, select this alternative protocol in STM32 USART/UART nodes.

Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Alexandre Torgue
7a5faaee0d ARM: dts: stm32: use exti 19 as main interrupt to support RTC wakeup on stm32mp157
Link between GIC and exti line is now done inside EXTI driver. So in order
to be wake up source exti irqchip has to be used.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Marek Vasut
1deab7ed16 ARM: dts: stm32: Add CM4 reserved memory, rproc and IPCC on DHCOR SoM
Add reserved memory nodes for CortexM4 on the STM32MP1 DHCOR SoM, enable
rproc to control the CM4 and IPCC mailbox to interact with it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
To: linux-arm-kernel@lists.infradead.org
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Amelie Delaunay
26c1d8c7fe ARM: dts: stm32: add MDMA on STM32MP13x SoC family
MDMA on STM32MP13x SoCs is the same than on STM32MP15x SoCs: it offers up
to 32 channels and supports 48 requests.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Amelie Delaunay
54ceceeaee ARM: dts: stm32: add DMA1, DMA2 and DMAMUX1 on STM32MP13x SoC family
DMA1 and DMA2 on STM32MP13x SoCs are the same than on STM32MP15x SoCs: they
offer up to 8 channels and request lines are routed through DMAMUX1.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
2022-02-25 10:53:15 +01:00
Arnd Bergmann
967747bbc0 uaccess: remove CONFIG_SET_FS
There are no remaining callers of set_fs(), so CONFIG_SET_FS
can be removed globally, along with the thread_info field and
any references to it.

This turns access_ok() into a cheaper check against TASK_SIZE_MAX.

As CONFIG_SET_FS is now gone, drop all remaining references to
set_fs()/get_fs(), mm_segment_t, user_addr_max() and uaccess_kernel().

Acked-by: Sam Ravnborg <sam@ravnborg.org> # for sparc32 changes
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Tested-by: Sergey Matyukevich <sergey.matyukevich@synopsys.com> # for arc changes
Acked-by: Stafford Horne <shorne@gmail.com> # [openrisc, asm-generic]
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-25 09:36:06 +01:00
Arnd Bergmann
12700c17fc uaccess: generalize access_ok()
There are many different ways that access_ok() is defined across
architectures, but in the end, they all just compare against the
user_addr_max() value or they accept anything.

Provide one definition that works for most architectures, checking
against TASK_SIZE_MAX for user processes or skipping the check inside
of uaccess_kernel() sections.

For architectures without CONFIG_SET_FS(), this should be the fastest
check, as it comes down to a single comparison of a pointer against a
compile-time constant, while the architecture specific versions tend to
do something more complex for historic reasons or get something wrong.

Type checking for __user annotations is handled inconsistently across
architectures, but this is easily simplified as well by using an inline
function that takes a 'const void __user *' argument. A handful of
callers need an extra __user annotation for this.

Some architectures had trick to use 33-bit or 65-bit arithmetic on the
addresses to calculate the overflow, however this simpler version uses
fewer registers, which means it can produce better object code in the
end despite needing a second (statically predicted) branch.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mark Rutland <mark.rutland@arm.com> [arm64, asm-generic]
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Stafford Horne <shorne@gmail.com>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-25 09:36:05 +01:00
Arnd Bergmann
23fc539e81 uaccess: fix type mismatch warnings from access_ok()
On some architectures, access_ok() does not do any argument type
checking, so replacing the definition with a generic one causes
a few warnings for harmless issues that were never caught before.

Fix the ones that I found either through my own test builds or
that were reported by the 0-day bot.

Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-25 09:36:05 +01:00
Arnd Bergmann
34737e2698 uaccess: add generic __{get,put}_kernel_nofault
Nine architectures are still missing __{get,put}_kernel_nofault:
alpha, ia64, microblaze, nds32, nios2, openrisc, sh, sparc32, xtensa.

Add a generic version that lets everything use the normal
copy_{from,to}_kernel_nofault() code based on these, removing the last
use of get_fs()/set_fs() from architecture-independent code.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-25 09:36:05 +01:00
Matthew Hagan
482c85c7fc ARM: dts: NSP: MX6X: correct LED function types
Currently, the amber LED will remain always on. This is due to a
misinterpretation of the LED sub-node properties, where-by "default-state"
was used to indicate the initial state when powering on the device. When in
use, however, this resulted in the amber LED always being on. Instead change
this to only indicate a fault state.

Assign LED_FUNCTION_POWER to the green PWM LED.

These changes bring the MX64/65 in line with the MR32's devicetree.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-02-24 16:47:25 -08:00
Matthew Hagan
66848aff05 ARM: dts: NSP: MX6X: get mac-address from eeprom
The MAC address on the MX64/MX65 series is located on the AT24 EEPROM.
This is the same as other Meraki devices such as the MR32 [1].

[1] https://lore.kernel.org/linux-arm-kernel/fa8271d02ef74a687f365cebe5c55ec846963ab7.1631986106.git.chunkeey@gmail.com/

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-02-24 16:46:56 -08:00
Arnd Bergmann
31c50bf184 Merge tag 'tegra-for-5.17-arm-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes
ARM: tegra: Device tree fixes for v5.17-rc6

This contains fixes for the eDP panel found on the Venice 2 and Nyan
boards.

* tag 'tegra-for-5.17-arm-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  ARM: tegra: Move panels to AUX bus

Link: https://lore.kernel.org/r/20220223162209.293722-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-24 22:48:00 +01:00
Arnd Bergmann
795a2ab1da Merge tag 'v5.17-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes
Fix the display-port-sound on Gru devices, DDR voltage on the Quartz-A
board, fix emmc signal-integrity and usb OTG mode on rk3399-puma as well
as a number of dtschema fixes to make the reduce the number of errors.

* tag 'v5.17-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
  ARM: dts: rockchip: reorder rk322x hmdi clocks
  arm64: dts: rockchip: reorder rk3399 hdmi clocks
  arm64: dts: rockchip: align pl330 node name with dtschema
  arm64: dts: rockchip: fix rk3399-puma eMMC HS400 signal integrity
  arm64: dts: rockchip: fix Quartz64-A ddr regulator voltage
  arm64: dts: rockchip: Switch RK3399-Gru DP to SPDIF output
  arm64: dts: rockchip: fix rk3399-puma-haikou USB OTG mode
  arm64: dts: rockchip: drop pclk_xpcs from gmac0 on rk3568
  arm64: dts: rockchip: fix dma-controller node names on rk356x

Link: https://lore.kernel.org/r/1973741.CViHJPHrxy@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-02-24 22:46:59 +01:00
Luca Weiss
1345536251 ARM: dts: qcom: msm8226: add power domains
Add a node for the power domain controller found in MSM8226.

At the same time remove any existing usages of pm8226_s1 as this
regulator is now handled by power domains.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220220223004.507739-3-luca@z3ntu.xyz
2022-02-24 14:12:55 -06:00
Tudor Ambarus
c1deb3392c ARM: configs: at91: sama7: Enable crypto IPs and software algs
Similar to sama5_defconfig, enable hardware acceleration for the
sama7 crypto IPs, enable crypto software implementations in case
the crypto IPs need a fallback to them, and enable the hash and
skcipher user interfaces in case one wants to offload the crypto
algs to the sama7 crypto IPs.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220204135905.512013-1-tudor.ambarus@microchip.com
2022-02-24 19:54:17 +01:00
Tudor Ambarus
9437a3c8ab ARM: configs: at91: sama7: Enable UBIFS_FS
sama7g5 contains a Static Memory Controller that can communicate with
NAND flashes. Enable UBIFS_FS in case one wants to put an ubifs rootfs
on a NAND flash. CONFIG_CRYPTO_LZO and CONFIG_CRYPTO_DEFLATE appear as
removed because they are selected by CONFIG_UBIFS_FS.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220202070244.150022-1-tudor.ambarus@microchip.com
2022-02-24 19:53:47 +01:00
Tudor Ambarus
5f37e194ba ARM: configs: at91: sama7: Enable NAND / SMC
Enable the Static Memory Controller. Tested with Micron MT29F4G08ABAEAWP
NAND flash. Software error correction is not needed, as the SMC includes
a PMECC error correction hardware module.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220111125641.903624-1-tudor.ambarus@microchip.com
2022-02-24 19:51:43 +01:00
Oleksij Rempel
8c49678d84 ARM: tegra: Fix ethernet node names
The node name of Ethernet controller should be "ethernet" instead of
"asix" or "smsc" as required by Ethernet controller devicetree schema:

    Documentation/devicetree/bindings/net/ethernet-controller.yaml

This patch can potentially affect boot loaders patching against full
node path instead of using device aliases.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-24 19:41:02 +01:00
Tudor Ambarus
4b6140b96d ARM: dts: at91: Use the generic "crypto" node name for the crypto IPs
The DT specification recommeds that:
"The name of a node should be somewhat generic, reflecting the function of
the device and not its precise programming model. If appropriate, the name
should be one of the following choices:"
"crypto" being the recommendation for the crypto nodes. Follow the DT
recommendation and use the generic "crypto" node name for the at91 crypto
IPs. While at this, add labels to the crypto nodes where they missed, for
easier reference purposes.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220208111225.234685-1-tudor.ambarus@microchip.com
2022-02-24 19:30:41 +01:00
Claudiu Beznea
fb45a72e2c ARM: dts: at91: remove status = "okay" from soc specific dtsi
Remove status = "okay" from SoC specific dtsi as this is the default
state.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220207111523.575474-1-claudiu.beznea@microchip.com
2022-02-24 19:30:41 +01:00
Tudor Ambarus
0fb578a529 ARM: dts: at91: sama5d2: Fix PMERRLOC resource size
PMERRLOC resource size was set to 0x100, which resulted in HSMC_ERRLOCx
register being truncated to offset x = 21, causing error correction to
fail if more than 22 bit errors and if 24 or 32 bit error correction
was supported.

Fixes: d9c41bf30c ("ARM: dts: at91: Declare EBI/NAND controllers")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: <stable@vger.kernel.org> # 4.13.x
Acked-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20220111132301.906712-1-tudor.ambarus@microchip.com
2022-02-24 19:30:41 +01:00
Dmitry Osipenko
4c0f1f9011 ARM: tegra: paz00: Add MMC aliases
Add MMC aliases to ensure that the /dev/mmcblk IDs won't change depending
on the probe order of the MMC drivers.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-24 16:55:28 +01:00
Dmitry Osipenko
fa3174c591 ARM: tegra: tf700t: Rename DSI node
Rename DSI bridge node to match the requirement of the DSI DT schema.
This silences DTB-check warning about the incorrect name.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2022-02-24 16:55:15 +01:00