forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/k…
…ernel/git/arm/arm-soc Pull ARM driver updates from Olof Johansson: "Updates of SoC-near drivers and other driver updates that makes more sense to take through our tree. The largest part of this is a conversion of device registration for some renesas shmobile/sh devices over to use resources. This has required coordination with the corresponding arch/sh changes, and we've agreed to merge the arch/sh changes through our tree. Added in this branch is support for Trusted Foundations secure firmware, which is what is used on many of the commercial Nvidia Tegra products that are in the market, including the Nvidia Shield. The code is local to arch/arm at this time since it's uncertain whether it will be shared with arm64 longer-term, if needed we will refactor later. A couple of new RTC drivers used on ARM boards, merged through our tree on request by the RTC maintainer. ... plus a bunch of smaller updates across the board, gpio conversions for davinci, etc" * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits) watchdog: davinci: rename platform driver to davinci-wdt tty: serial: Limit msm_serial_hs driver to platforms that use it mmc: msm_sdcc: Limit driver to platforms that use it usb: phy: msm: Move mach dependent code to platform data clk: versatile: fixup IM-PD1 clock implementation clk: versatile: pass a name to ICST clock provider ARM: integrator: pass parent IRQ to the SIC irqchip: versatile FPGA: support cascaded interrupts from DT gpio: davinci: don't create irq_domain in case of unbanked irqs gpio: davinci: use chained_irq_enter/chained_irq_exit API gpio: davinci: add OF support gpio: davinci: remove unused variable intc_irq_num gpio: davinci: convert to use irqdomain support. gpio: introduce GPIO_DAVINCI kconfig option gpio: davinci: get rid of DAVINCI_N_GPIO gpio: davinci: use {readl|writel}_relaxed() instead of __raw_* serial: sh-sci: Add OF support serial: sh-sci: Add device tree bindings documentation serial: sh-sci: Remove platform data mapbase and irqs fields serial: sh-sci: Remove platform data scbrr_algo_id field ...
- Loading branch information
Showing
87 changed files
with
2,914 additions
and
753 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
Documentation/devicetree/bindings/arm/firmware/tlm,trusted-foundations.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Trusted Foundations | ||
------------------- | ||
|
||
Boards that use the Trusted Foundations secure monitor can signal its | ||
presence by declaring a node compatible with "tlm,trusted-foundations" | ||
under the /firmware/ node | ||
|
||
Required properties: | ||
- compatible: "tlm,trusted-foundations" | ||
- tlm,version-major: major version number of Trusted Foundations firmware | ||
- tlm,version-minor: minor version number of Trusted Foundations firmware | ||
|
||
Example: | ||
firmware { | ||
trusted-foundations { | ||
compatible = "tlm,trusted-foundations"; | ||
tlm,version-major = <2>; | ||
tlm,version-minor = <8>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
* Atmel HW cryptographic accelerators | ||
|
||
These are the HW cryptographic accelerators found on some Atmel products. | ||
|
||
* Advanced Encryption Standard (AES) | ||
|
||
Required properties: | ||
- compatible : Should be "atmel,at91sam9g46-aes". | ||
- reg: Should contain AES registers location and length. | ||
- interrupts: Should contain the IRQ line for the AES. | ||
- dmas: List of two DMA specifiers as described in | ||
atmel-dma.txt and dma.txt files. | ||
- dma-names: Contains one identifier string for each DMA specifier | ||
in the dmas property. | ||
|
||
Example: | ||
aes@f8038000 { | ||
compatible = "atmel,at91sam9g46-aes"; | ||
reg = <0xf8038000 0x100>; | ||
interrupts = <43 4 0>; | ||
dmas = <&dma1 2 18>, | ||
<&dma1 2 19>; | ||
dma-names = "tx", "rx"; | ||
|
||
* Triple Data Encryption Standard (Triple DES) | ||
|
||
Required properties: | ||
- compatible : Should be "atmel,at91sam9g46-tdes". | ||
- reg: Should contain TDES registers location and length. | ||
- interrupts: Should contain the IRQ line for the TDES. | ||
|
||
Optional properties: | ||
- dmas: List of two DMA specifiers as described in | ||
atmel-dma.txt and dma.txt files. | ||
- dma-names: Contains one identifier string for each DMA specifier | ||
in the dmas property. | ||
|
||
Example: | ||
tdes@f803c000 { | ||
compatible = "atmel,at91sam9g46-tdes"; | ||
reg = <0xf803c000 0x100>; | ||
interrupts = <44 4 0>; | ||
dmas = <&dma1 2 20>, | ||
<&dma1 2 21>; | ||
dma-names = "tx", "rx"; | ||
}; | ||
|
||
* Secure Hash Algorithm (SHA) | ||
|
||
Required properties: | ||
- compatible : Should be "atmel,at91sam9g46-sha". | ||
- reg: Should contain SHA registers location and length. | ||
- interrupts: Should contain the IRQ line for the SHA. | ||
|
||
Optional properties: | ||
- dmas: One DMA specifiers as described in | ||
atmel-dma.txt and dma.txt files. | ||
- dma-names: Contains one identifier string for each DMA specifier | ||
in the dmas property. Only one "tx" string needed. | ||
|
||
Example: | ||
sha@f8034000 { | ||
compatible = "atmel,at91sam9g46-sha"; | ||
reg = <0xf8034000 0x100>; | ||
interrupts = <42 4 0>; | ||
dmas = <&dma1 2 17>; | ||
dma-names = "tx"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Davinci GPIO controller bindings | ||
|
||
Required Properties: | ||
- compatible: should be "ti,dm6441-gpio" | ||
|
||
- reg: Physical base address of the controller and the size of memory mapped | ||
registers. | ||
|
||
- gpio-controller : Marks the device node as a gpio controller. | ||
|
||
- interrupt-parent: phandle of the parent interrupt controller. | ||
|
||
- interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are | ||
supported at a time. | ||
|
||
- ti,ngpio: The number of GPIO pins supported. | ||
|
||
- ti,davinci-gpio-unbanked: The number of GPIOs that have an individual interrupt | ||
line to processor. | ||
|
||
The GPIO controller also acts as an interrupt controller. It uses the default | ||
two cells specifier as described in Documentation/devicetree/bindings/ | ||
interrupt-controller/interrupts.txt. | ||
|
||
Example: | ||
|
||
gpio: gpio@1e26000 { | ||
compatible = "ti,dm6441-gpio"; | ||
gpio-controller; | ||
reg = <0x226000 0x1000>; | ||
interrupt-parent = <&intc>; | ||
interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH | ||
44 IRQ_TYPE_EDGE_BOTH 45 IRQ_TYPE_EDGE_BOTH | ||
46 IRQ_TYPE_EDGE_BOTH 47 IRQ_TYPE_EDGE_BOTH | ||
48 IRQ_TYPE_EDGE_BOTH 49 IRQ_TYPE_EDGE_BOTH | ||
50 IRQ_TYPE_EDGE_BOTH>; | ||
ti,ngpio = <144>; | ||
ti,davinci-gpio-unbanked = <0>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
* sun4i/sun7i Real Time Clock | ||
|
||
RTC controller for the Allwinner A10/A20 | ||
|
||
Required properties: | ||
- compatible : Should be "allwinner,sun4i-rtc" or "allwinner,sun7i-a20-rtc" | ||
- reg: physical base address of the controller and length of memory mapped | ||
region. | ||
- interrupts: IRQ line for the RTC. | ||
|
||
Example: | ||
|
||
rtc: rtc@01c20d00 { | ||
compatible = "allwinner,sun4i-rtc"; | ||
reg = <0x01c20d00 0x20>; | ||
interrupts = <24>; | ||
}; |
46 changes: 46 additions & 0 deletions
46
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
* Renesas SH-Mobile Serial Communication Interface | ||
|
||
Required properties: | ||
|
||
- compatible: Must contain one of the following: | ||
|
||
- "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART. | ||
- "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART. | ||
- "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible UART. | ||
- "renesas,hscif-r8a7790" for R8A7790 (R-Car H2) HSCIF compatible UART. | ||
- "renesas,scif-r8a7791" for R8A7791 (R-Car M2) SCIF compatible UART. | ||
- "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART. | ||
- "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART. | ||
- "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART. | ||
- "renesas,scif" for generic SCIF compatible UART. | ||
- "renesas,scifa" for generic SCIFA compatible UART. | ||
- "renesas,scifb" for generic SCIFB compatible UART. | ||
- "renesas,hscif" for generic HSCIF compatible UART. | ||
|
||
When compatible with the generic version, nodes must list the | ||
SoC-specific version corresponding to the platform first followed by the | ||
generic version. | ||
|
||
- reg: Base address and length of the I/O registers used by the UART. | ||
- interrupts: Must contain an interrupt-specifier for the SCIx interrupt. | ||
|
||
- clocks: Must contain a phandle and clock-specifier pair for each entry | ||
in clock-names. | ||
- clock-names: Must contain "sci_ick" for the SCIx UART interface clock. | ||
|
||
Note: Each enabled SCIx UART should have an alias correctly numbered in the | ||
"aliases" node. | ||
|
||
Example: | ||
aliases { | ||
serial0 = &scifa0; | ||
}; | ||
|
||
scifa0: serial@e6c40000 { | ||
compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic"; | ||
reg = <0 0xe6c40000 0 64>; | ||
interrupt-parent = <&gic>; | ||
interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>; | ||
clocks = <&mstp2_clks R8A7790_CLK_SCIFA0>; | ||
clock-names = "sci_ick"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
config ARCH_SUPPORTS_FIRMWARE | ||
bool | ||
|
||
config ARCH_SUPPORTS_TRUSTED_FOUNDATIONS | ||
bool | ||
select ARCH_SUPPORTS_FIRMWARE | ||
|
||
menu "Firmware options" | ||
depends on ARCH_SUPPORTS_FIRMWARE | ||
|
||
config TRUSTED_FOUNDATIONS | ||
bool "Trusted Foundations secure monitor support" | ||
depends on ARCH_SUPPORTS_TRUSTED_FOUNDATIONS | ||
help | ||
Some devices (including most Tegra-based consumer devices on the | ||
market) are booted with the Trusted Foundations secure monitor | ||
active, requiring some core operations to be performed by the secure | ||
monitor instead of the kernel. | ||
|
||
This option allows the kernel to invoke the secure monitor whenever | ||
required on devices using Trusted Foundations. See | ||
arch/arm/include/asm/trusted_foundations.h or the | ||
tl,trusted-foundations device tree binding documentation for details | ||
on how to use it. | ||
|
||
Say n if you don't know what this is about. | ||
|
||
endmenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
obj-$(CONFIG_TRUSTED_FOUNDATIONS) += trusted_foundations.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* Trusted Foundations support for ARM CPUs | ||
* | ||
* Copyright (c) 2013, NVIDIA Corporation. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/init.h> | ||
#include <linux/of.h> | ||
#include <asm/firmware.h> | ||
#include <asm/trusted_foundations.h> | ||
|
||
#define TF_SET_CPU_BOOT_ADDR_SMC 0xfffff200 | ||
|
||
static void __naked tf_generic_smc(u32 type, u32 arg1, u32 arg2) | ||
{ | ||
asm volatile( | ||
".arch_extension sec\n\t" | ||
"stmfd sp!, {r4 - r11, lr}\n\t" | ||
__asmeq("%0", "r0") | ||
__asmeq("%1", "r1") | ||
__asmeq("%2", "r2") | ||
"mov r3, #0\n\t" | ||
"mov r4, #0\n\t" | ||
"smc #0\n\t" | ||
"ldmfd sp!, {r4 - r11, pc}" | ||
: | ||
: "r" (type), "r" (arg1), "r" (arg2) | ||
: "memory"); | ||
} | ||
|
||
static int tf_set_cpu_boot_addr(int cpu, unsigned long boot_addr) | ||
{ | ||
tf_generic_smc(TF_SET_CPU_BOOT_ADDR_SMC, boot_addr, 0); | ||
|
||
return 0; | ||
} | ||
|
||
static const struct firmware_ops trusted_foundations_ops = { | ||
.set_cpu_boot_addr = tf_set_cpu_boot_addr, | ||
}; | ||
|
||
void register_trusted_foundations(struct trusted_foundations_platform_data *pd) | ||
{ | ||
/* | ||
* we are not using version information for now since currently | ||
* supported SMCs are compatible with all TF releases | ||
*/ | ||
register_firmware_ops(&trusted_foundations_ops); | ||
} | ||
|
||
void of_register_trusted_foundations(void) | ||
{ | ||
struct device_node *node; | ||
struct trusted_foundations_platform_data pdata; | ||
int err; | ||
|
||
node = of_find_compatible_node(NULL, NULL, "tlm,trusted-foundations"); | ||
if (!node) | ||
return; | ||
|
||
err = of_property_read_u32(node, "tlm,version-major", | ||
&pdata.version_major); | ||
if (err != 0) | ||
panic("Trusted Foundation: missing version-major property\n"); | ||
err = of_property_read_u32(node, "tlm,version-minor", | ||
&pdata.version_minor); | ||
if (err != 0) | ||
panic("Trusted Foundation: missing version-minor property\n"); | ||
register_trusted_foundations(&pdata); | ||
} |
Oops, something went wrong.