mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
Merge "Merge 6.1.2 into android14-6.1" into android14-6.1
This commit is contained in:
@@ -22,6 +22,7 @@ Date: Oct 25, 2019
|
||||
KernelVersion: 5.6.0
|
||||
Contact: dmaengine@vger.kernel.org
|
||||
Description: The largest number of work descriptors in a batch.
|
||||
It's not visible when the device does not support batch.
|
||||
|
||||
What: /sys/bus/dsa/devices/dsa<m>/max_work_queues_size
|
||||
Date: Oct 25, 2019
|
||||
@@ -49,6 +50,8 @@ Description: The total number of read buffers supported by this device.
|
||||
The read buffers represent resources within the DSA
|
||||
implementation, and these resources are allocated by engines to
|
||||
support operations. See DSA spec v1.2 9.2.4 Total Read Buffers.
|
||||
It's not visible when the device does not support Read Buffer
|
||||
allocation control.
|
||||
|
||||
What: /sys/bus/dsa/devices/dsa<m>/max_transfer_size
|
||||
Date: Oct 25, 2019
|
||||
@@ -122,6 +125,8 @@ Contact: dmaengine@vger.kernel.org
|
||||
Description: The maximum number of read buffers that may be in use at
|
||||
one time by operations that access low bandwidth memory in the
|
||||
device. See DSA spec v1.2 9.2.8 GENCFG on Global Read Buffer Limit.
|
||||
It's not visible when the device does not support Read Buffer
|
||||
allocation control.
|
||||
|
||||
What: /sys/bus/dsa/devices/dsa<m>/cmd_status
|
||||
Date: Aug 28, 2020
|
||||
@@ -205,6 +210,7 @@ KernelVersion: 5.10.0
|
||||
Contact: dmaengine@vger.kernel.org
|
||||
Description: The max batch size for this workqueue. Cannot exceed device
|
||||
max batch size. Configurable parameter.
|
||||
It's not visible when the device does not support batch.
|
||||
|
||||
What: /sys/bus/dsa/devices/wq<m>.<n>/ats_disable
|
||||
Date: Nov 13, 2020
|
||||
@@ -250,6 +256,8 @@ KernelVersion: 5.17.0
|
||||
Contact: dmaengine@vger.kernel.org
|
||||
Description: Enable the use of global read buffer limit for the group. See DSA
|
||||
spec v1.2 9.2.18 GRPCFG Use Global Read Buffer Limit.
|
||||
It's not visible when the device does not support Read Buffer
|
||||
allocation control.
|
||||
|
||||
What: /sys/bus/dsa/devices/group<m>.<n>/read_buffers_allowed
|
||||
Date: Dec 10, 2021
|
||||
@@ -258,6 +266,8 @@ Contact: dmaengine@vger.kernel.org
|
||||
Description: Indicates max number of read buffers that may be in use at one time
|
||||
by all engines in the group. See DSA spec v1.2 9.2.18 GRPCFG Read
|
||||
Buffers Allowed.
|
||||
It's not visible when the device does not support Read Buffer
|
||||
allocation control.
|
||||
|
||||
What: /sys/bus/dsa/devices/group<m>.<n>/read_buffers_reserved
|
||||
Date: Dec 10, 2021
|
||||
@@ -266,6 +276,8 @@ Contact: dmaengine@vger.kernel.org
|
||||
Description: Indicates the number of Read Buffers reserved for the use of
|
||||
engines in the group. See DSA spec v1.2 9.2.18 GRPCFG Read Buffers
|
||||
Reserved.
|
||||
It's not visible when the device does not support Read Buffer
|
||||
allocation control.
|
||||
|
||||
What: /sys/bus/dsa/devices/group<m>.<n>/desc_progress_limit
|
||||
Date: Sept 14, 2022
|
||||
|
||||
@@ -5,6 +5,9 @@ Contact: linux-mtd@lists.infradead.org
|
||||
Description: (RO) The JEDEC ID of the SPI NOR flash as reported by the
|
||||
flash device.
|
||||
|
||||
The attribute is not present if the flash doesn't support
|
||||
the "Read JEDEC ID" command (9Fh). This is the case for
|
||||
non-JEDEC compliant flashes.
|
||||
|
||||
What: /sys/bus/spi/devices/.../spi-nor/manufacturer
|
||||
Date: April 2021
|
||||
|
||||
@@ -1314,6 +1314,29 @@ watchdog work to be queued by the watchdog timer function, otherwise the NMI
|
||||
watchdog — if enabled — can detect a hard lockup condition.
|
||||
|
||||
|
||||
split_lock_mitigate (x86 only)
|
||||
==============================
|
||||
|
||||
On x86, each "split lock" imposes a system-wide performance penalty. On larger
|
||||
systems, large numbers of split locks from unprivileged users can result in
|
||||
denials of service to well-behaved and potentially more important users.
|
||||
|
||||
The kernel mitigates these bad users by detecting split locks and imposing
|
||||
penalties: forcing them to wait and only allowing one core to execute split
|
||||
locks at a time.
|
||||
|
||||
These mitigations can make those bad applications unbearably slow. Setting
|
||||
split_lock_mitigate=0 may restore some application performance, but will also
|
||||
increase system exposure to denial of service attacks from split lock users.
|
||||
|
||||
= ===================================================================
|
||||
0 Disable the mitigation mode - just warns the split lock on kernel log
|
||||
and exposes the system to denials of service from the split lockers.
|
||||
1 Enable the mitigation mode (this is the default) - penalizes the split
|
||||
lockers with intentional performance degradation.
|
||||
= ===================================================================
|
||||
|
||||
|
||||
stack_erasing
|
||||
=============
|
||||
|
||||
|
||||
@@ -473,9 +473,6 @@ patternProperties:
|
||||
Specifies whether the event is to be interpreted as a key (1)
|
||||
or a switch (5).
|
||||
|
||||
required:
|
||||
- linux,code
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
dependencies:
|
||||
@@ -501,7 +498,7 @@ patternProperties:
|
||||
|
||||
azoteq,slider-size:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 0
|
||||
minimum: 1
|
||||
maximum: 65535
|
||||
description:
|
||||
Specifies the slider's one-dimensional resolution, equal to the
|
||||
@@ -575,9 +572,9 @@ patternProperties:
|
||||
linux,code: true
|
||||
|
||||
azoteq,gesture-max-ms:
|
||||
multipleOf: 4
|
||||
multipleOf: 16
|
||||
minimum: 0
|
||||
maximum: 1020
|
||||
maximum: 4080
|
||||
description:
|
||||
Specifies the length of time (in ms) within which a tap, swipe
|
||||
or flick gesture must be completed in order to be acknowledged
|
||||
@@ -585,9 +582,9 @@ patternProperties:
|
||||
gesture applies to all remaining swipe or flick gestures.
|
||||
|
||||
azoteq,gesture-min-ms:
|
||||
multipleOf: 4
|
||||
multipleOf: 16
|
||||
minimum: 0
|
||||
maximum: 124
|
||||
maximum: 496
|
||||
description:
|
||||
Specifies the length of time (in ms) for which a tap gesture must
|
||||
be held in order to be acknowledged by the device.
|
||||
@@ -620,9 +617,6 @@ patternProperties:
|
||||
GPIO, they must all be of the same type (proximity, touch or
|
||||
slider gesture).
|
||||
|
||||
required:
|
||||
- linux,code
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
required:
|
||||
@@ -693,6 +687,7 @@ allOf:
|
||||
properties:
|
||||
azoteq,slider-size:
|
||||
multipleOf: 16
|
||||
minimum: 16
|
||||
maximum: 4080
|
||||
|
||||
azoteq,top-speed:
|
||||
@@ -935,14 +930,14 @@ examples:
|
||||
|
||||
event-tap {
|
||||
linux,code = <KEY_PLAYPAUSE>;
|
||||
azoteq,gesture-max-ms = <600>;
|
||||
azoteq,gesture-min-ms = <24>;
|
||||
azoteq,gesture-max-ms = <400>;
|
||||
azoteq,gesture-min-ms = <32>;
|
||||
};
|
||||
|
||||
event-flick-pos {
|
||||
linux,code = <KEY_NEXTSONG>;
|
||||
azoteq,gesture-max-ms = <600>;
|
||||
azoteq,gesture-dist = <816>;
|
||||
azoteq,gesture-max-ms = <800>;
|
||||
azoteq,gesture-dist = <800>;
|
||||
};
|
||||
|
||||
event-flick-neg {
|
||||
|
||||
@@ -98,6 +98,10 @@ properties:
|
||||
type: object
|
||||
$ref: /schemas/regulator/qcom,spmi-regulator.yaml#
|
||||
|
||||
pwm:
|
||||
type: object
|
||||
$ref: /schemas/leds/leds-qcom-lpg.yaml#
|
||||
|
||||
patternProperties:
|
||||
"^adc@[0-9a-f]+$":
|
||||
type: object
|
||||
@@ -123,10 +127,6 @@ patternProperties:
|
||||
type: object
|
||||
$ref: /schemas/power/reset/qcom,pon.yaml#
|
||||
|
||||
"pwm@[0-9a-f]+$":
|
||||
type: object
|
||||
$ref: /schemas/leds/leds-qcom-lpg.yaml#
|
||||
|
||||
"^rtc@[0-9a-f]+$":
|
||||
type: object
|
||||
$ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml#
|
||||
|
||||
@@ -14,9 +14,6 @@ description: |+
|
||||
This PCIe host controller is based on the Synopsys DesignWare PCIe IP
|
||||
and thus inherits all the common properties defined in snps,dw-pcie.yaml.
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/pci/snps,dw-pcie.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
@@ -61,7 +58,7 @@ properties:
|
||||
- const: pcie
|
||||
- const: pcie_bus
|
||||
- const: pcie_phy
|
||||
- const: pcie_inbound_axi for imx6sx-pcie, pcie_aux for imx8mq-pcie
|
||||
- enum: [ pcie_inbound_axi, pcie_aux ]
|
||||
|
||||
num-lanes:
|
||||
const: 1
|
||||
@@ -175,6 +172,47 @@ required:
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/pci/snps,dw-pcie.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: fsl,imx6sx-pcie
|
||||
then:
|
||||
properties:
|
||||
clock-names:
|
||||
items:
|
||||
- {}
|
||||
- {}
|
||||
- {}
|
||||
- const: pcie_inbound_axi
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: fsl,imx8mq-pcie
|
||||
then:
|
||||
properties:
|
||||
clock-names:
|
||||
items:
|
||||
- {}
|
||||
- {}
|
||||
- {}
|
||||
- const: pcie_aux
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
not:
|
||||
contains:
|
||||
enum:
|
||||
- fsl,imx6sx-pcie
|
||||
- fsl,imx8mq-pcie
|
||||
then:
|
||||
properties:
|
||||
clock-names:
|
||||
maxItems: 3
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
@@ -36,7 +36,7 @@ properties:
|
||||
- const: mpu
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
maxItems: 2
|
||||
|
||||
clocks:
|
||||
items:
|
||||
@@ -94,8 +94,9 @@ examples:
|
||||
#interrupt-cells = <1>;
|
||||
ranges = <0x81000000 0 0x40000000 0 0x40000000 0 0x00010000>,
|
||||
<0x82000000 0 0x50000000 0 0x50000000 0 0x20000000>;
|
||||
interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "intr";
|
||||
interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi", "intr";
|
||||
interrupt-map-mask = <0 0 0 7>;
|
||||
interrupt-map =
|
||||
<0 0 0 1 &gic GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH
|
||||
|
||||
@@ -87,6 +87,8 @@ patternProperties:
|
||||
"wifi_led" "led" 1, 2
|
||||
"i2c" "i2c" 3, 4
|
||||
"uart1_0" "uart" 7, 8, 9, 10
|
||||
"uart1_rx_tx" "uart" 42, 43
|
||||
"uart1_cts_rts" "uart" 44, 45
|
||||
"pcie_clk" "pcie" 9
|
||||
"pcie_wake" "pcie" 10
|
||||
"spi1_0" "spi" 11, 12, 13, 14
|
||||
@@ -98,9 +100,11 @@ patternProperties:
|
||||
"emmc_45" "emmc" 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32
|
||||
"spi1_1" "spi" 23, 24, 25, 26
|
||||
"uart1_2" "uart" 29, 30, 31, 32
|
||||
"uart1_2_rx_tx" "uart" 29, 30
|
||||
"uart1_2_cts_rts" "uart" 31, 32
|
||||
"uart1_1" "uart" 23, 24, 25, 26
|
||||
"uart2_0" "uart" 29, 30, 31, 32
|
||||
"uart2_0_rx_tx" "uart" 29, 30
|
||||
"uart2_0_cts_rts" "uart" 31, 32
|
||||
"spi0" "spi" 33, 34, 35, 36
|
||||
"spi0_wp_hold" "spi" 37, 38
|
||||
"uart1_3_rx_tx" "uart" 35, 36
|
||||
@@ -157,7 +161,7 @@ patternProperties:
|
||||
then:
|
||||
properties:
|
||||
groups:
|
||||
enum: [emmc, emmc_rst]
|
||||
enum: [emmc_45, emmc_51]
|
||||
- if:
|
||||
properties:
|
||||
function:
|
||||
@@ -221,8 +225,12 @@ patternProperties:
|
||||
then:
|
||||
properties:
|
||||
groups:
|
||||
enum: [uart1_0, uart1_1, uart1_2, uart1_3_rx_tx,
|
||||
uart1_3_cts_rts, uart2_0, uart2_1, uart0, uart1, uart2]
|
||||
items:
|
||||
enum: [uart1_0, uart1_rx_tx, uart1_cts_rts, uart1_1,
|
||||
uart1_2_rx_tx, uart1_2_cts_rts, uart1_3_rx_tx,
|
||||
uart1_3_cts_rts, uart2_0_rx_tx, uart2_0_cts_rts,
|
||||
uart2_1, uart0, uart1, uart2]
|
||||
maxItems: 2
|
||||
- if:
|
||||
properties:
|
||||
function:
|
||||
@@ -356,6 +364,27 @@ examples:
|
||||
interrupt-parent = <&gic>;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
pcie_pins: pcie-pins {
|
||||
mux {
|
||||
function = "pcie";
|
||||
groups = "pcie_clk", "pcie_wake", "pcie_pereset";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_pins: pwm-pins {
|
||||
mux {
|
||||
function = "pwm";
|
||||
groups = "pwm0", "pwm1_0";
|
||||
};
|
||||
};
|
||||
|
||||
spi0_pins: spi0-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi0", "spi0_wp_hold";
|
||||
};
|
||||
};
|
||||
|
||||
uart1_pins: uart1-pins {
|
||||
mux {
|
||||
function = "uart";
|
||||
@@ -363,6 +392,13 @@ examples:
|
||||
};
|
||||
};
|
||||
|
||||
uart1_3_pins: uart1-3-pins {
|
||||
mux {
|
||||
function = "uart";
|
||||
groups = "uart1_3_rx_tx", "uart1_3_cts_rts";
|
||||
};
|
||||
};
|
||||
|
||||
uart2_pins: uart2-pins {
|
||||
mux {
|
||||
function = "uart";
|
||||
|
||||
@@ -30,7 +30,9 @@ properties:
|
||||
maxItems: 1
|
||||
|
||||
"#pwm-cells":
|
||||
const: 2
|
||||
enum: [2, 3]
|
||||
description:
|
||||
The only flag supported by the controller is PWM_POLARITY_INVERTED.
|
||||
|
||||
microchip,sync-update-mask:
|
||||
description: |
|
||||
|
||||
@@ -109,7 +109,7 @@ audio-codec@1{
|
||||
reg = <1 0>;
|
||||
interrupts = <&msmgpio 54 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "intr2"
|
||||
reset-gpios = <&msmgpio 64 0>;
|
||||
reset-gpios = <&msmgpio 64 GPIO_ACTIVE_LOW>;
|
||||
slim-ifc-dev = <&wc9335_ifd>;
|
||||
clock-names = "mclk", "native";
|
||||
clocks = <&rpmcc RPM_SMD_DIV_CLK1>,
|
||||
|
||||
@@ -46,7 +46,7 @@ Optional properties:
|
||||
|
||||
- realtek,dmic-clk-driving-high : Set the high driving of the DMIC clock out.
|
||||
|
||||
- #sound-dai-cells: Should be set to '<0>'.
|
||||
- #sound-dai-cells: Should be set to '<1>'.
|
||||
|
||||
Pins on the device (for linking into audio routes) for RT5682:
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ hardware, which may be as simple as a set of GPIO pins or as complex as
|
||||
a pair of FIFOs connected to dual DMA engines on the other side of the
|
||||
SPI shift register (maximizing throughput). Such drivers bridge between
|
||||
whatever bus they sit on (often the platform bus) and SPI, and expose
|
||||
the SPI side of their device as a :c:type:`struct spi_master
|
||||
<spi_master>`. SPI devices are children of that master,
|
||||
the SPI side of their device as a :c:type:`struct spi_controller
|
||||
<spi_controller>`. SPI devices are children of that master,
|
||||
represented as a :c:type:`struct spi_device <spi_device>` and
|
||||
manufactured from :c:type:`struct spi_board_info
|
||||
<spi_board_info>` descriptors which are usually provided by
|
||||
|
||||
@@ -83,9 +83,7 @@ configuration of fault-injection capabilities.
|
||||
- /sys/kernel/debug/fail*/times:
|
||||
|
||||
specifies how many times failures may happen at most. A value of -1
|
||||
means "no limit". Note, though, that this file only accepts unsigned
|
||||
values. So, if you want to specify -1, you better use 'printf' instead
|
||||
of 'echo', e.g.: $ printf %#x -1 > times
|
||||
means "no limit".
|
||||
|
||||
- /sys/kernel/debug/fail*/space:
|
||||
|
||||
@@ -284,7 +282,7 @@ Application Examples
|
||||
echo Y > /sys/kernel/debug/$FAILTYPE/task-filter
|
||||
echo 10 > /sys/kernel/debug/$FAILTYPE/probability
|
||||
echo 100 > /sys/kernel/debug/$FAILTYPE/interval
|
||||
printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times
|
||||
echo -1 > /sys/kernel/debug/$FAILTYPE/times
|
||||
echo 0 > /sys/kernel/debug/$FAILTYPE/space
|
||||
echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
|
||||
echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
|
||||
@@ -338,7 +336,7 @@ Application Examples
|
||||
echo N > /sys/kernel/debug/$FAILTYPE/task-filter
|
||||
echo 10 > /sys/kernel/debug/$FAILTYPE/probability
|
||||
echo 100 > /sys/kernel/debug/$FAILTYPE/interval
|
||||
printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times
|
||||
echo -1 > /sys/kernel/debug/$FAILTYPE/times
|
||||
echo 0 > /sys/kernel/debug/$FAILTYPE/space
|
||||
echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
|
||||
echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
|
||||
@@ -369,7 +367,7 @@ Application Examples
|
||||
echo N > /sys/kernel/debug/$FAILTYPE/task-filter
|
||||
echo 100 > /sys/kernel/debug/$FAILTYPE/probability
|
||||
echo 0 > /sys/kernel/debug/$FAILTYPE/interval
|
||||
printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times
|
||||
echo -1 > /sys/kernel/debug/$FAILTYPE/times
|
||||
echo 0 > /sys/kernel/debug/$FAILTYPE/space
|
||||
echo 1 > /sys/kernel/debug/$FAILTYPE/verbose
|
||||
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 1
|
||||
SUBLEVEL = 2
|
||||
EXTRAVERSION =
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
|
||||
@@ -635,7 +635,7 @@ config ARCH_SUPPORTS_SHADOW_CALL_STACK
|
||||
config SHADOW_CALL_STACK
|
||||
bool "Shadow Call Stack"
|
||||
depends on ARCH_SUPPORTS_SHADOW_CALL_STACK
|
||||
depends on DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
|
||||
depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
|
||||
help
|
||||
This option enables the compiler's Shadow Call Stack, which
|
||||
uses a shadow stack to protect function return addresses from
|
||||
|
||||
@@ -75,7 +75,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
|
||||
|
||||
/* Work to do on interrupt/exception return. */
|
||||
#define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \
|
||||
_TIF_NOTIFY_RESUME)
|
||||
_TIF_NOTIFY_RESUME | _TIF_NOTIFY_SIGNAL)
|
||||
|
||||
/* Work to do on any return to userspace. */
|
||||
#define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \
|
||||
|
||||
@@ -469,8 +469,10 @@ entSys:
|
||||
#ifdef CONFIG_AUDITSYSCALL
|
||||
lda $6, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
|
||||
and $3, $6, $3
|
||||
#endif
|
||||
bne $3, strace
|
||||
#else
|
||||
blbs $3, strace /* check for SYSCALL_TRACE in disguise */
|
||||
#endif
|
||||
beq $4, 1f
|
||||
ldq $27, 0($5)
|
||||
1: jsr $26, ($27), sys_ni_syscall
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
pcie2: pcie@2,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
|
||||
assigned-addresses = <0x82001000 0 0x80000 0 0x2000>;
|
||||
reg = <0x1000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@@ -592,7 +592,7 @@
|
||||
|
||||
pcie1: pcie@2,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
|
||||
assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
|
||||
reg = <0x1000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
/* x1 port */
|
||||
pcie@2,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
|
||||
assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
|
||||
reg = <0x1000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -118,7 +118,7 @@
|
||||
/* x1 port */
|
||||
pcie@3,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
|
||||
assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
|
||||
reg = <0x1800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
stdout-path = &uart0;
|
||||
};
|
||||
|
||||
aliases {
|
||||
ethernet0 = ð0;
|
||||
ethernet1 = ð1;
|
||||
ethernet2 = ð2;
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x40000000>; /* 1024 MB */
|
||||
@@ -483,7 +489,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
/* port 6 is connected to eth0 */
|
||||
ports@6 {
|
||||
reg = <6>;
|
||||
label = "cpu";
|
||||
ethernet = <ð0>;
|
||||
phy-mode = "rgmii-id";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
/* x1 port */
|
||||
pcie2: pcie@2,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
|
||||
assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
|
||||
reg = <0x1000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -121,7 +121,7 @@
|
||||
/* x1 port */
|
||||
pcie3: pcie@3,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
|
||||
assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
|
||||
reg = <0x1800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -152,7 +152,7 @@
|
||||
*/
|
||||
pcie4: pcie@4,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
|
||||
assigned-addresses = <0x82002000 0 0x48000 0 0x2000>;
|
||||
reg = <0x2000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@@ -463,7 +463,7 @@
|
||||
/* x1 port */
|
||||
pcie@2,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
|
||||
assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
|
||||
reg = <0x1000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -492,7 +492,7 @@
|
||||
/* x1 port */
|
||||
pcie@3,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
|
||||
assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
|
||||
reg = <0x1800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -524,7 +524,7 @@
|
||||
*/
|
||||
pcie@4,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
|
||||
assigned-addresses = <0x82002000 0 0x48000 0 0x2000>;
|
||||
reg = <0x2000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
pcie2: pcie@2,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
|
||||
assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
|
||||
reg = <0x1000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
pcie3: pcie@3,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
|
||||
assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
|
||||
reg = <0x1800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
pcie4: pcie@4,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
|
||||
assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
|
||||
reg = <0x2000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
pcie5: pcie@5,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
|
||||
assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
|
||||
reg = <0x2800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
pcie2: pcie@2,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
|
||||
assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
|
||||
reg = <0x1000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
pcie3: pcie@3,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
|
||||
assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
|
||||
reg = <0x1800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
pcie4: pcie@4,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
|
||||
assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
|
||||
reg = <0x2000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
pcie5: pcie@5,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
|
||||
assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
|
||||
reg = <0x2800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -234,7 +234,7 @@
|
||||
|
||||
pcie6: pcie@6,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
|
||||
assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
|
||||
reg = <0x3000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -262,7 +262,7 @@
|
||||
|
||||
pcie7: pcie@7,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
|
||||
assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
|
||||
reg = <0x3800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
pcie8: pcie@8,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
|
||||
assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
|
||||
reg = <0x4000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
@@ -318,7 +318,7 @@
|
||||
|
||||
pcie9: pcie@9,0 {
|
||||
device_type = "pci";
|
||||
assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
|
||||
assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
|
||||
reg = <0x4800 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@@ -162,16 +162,9 @@
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
/* LPC FW cycle bridge region requires natural alignment */
|
||||
flash_memory: region@b8000000 {
|
||||
no-map;
|
||||
reg = <0xb8000000 0x04000000>; /* 64M */
|
||||
};
|
||||
|
||||
/* 48MB region from the end of flash to start of vga memory */
|
||||
ramoops@bc000000 {
|
||||
ramoops@b3e00000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0xbc000000 0x200000>; /* 16 * (4 * 0x8000) */
|
||||
reg = <0xb3e00000 0x200000>; /* 16 * (4 * 0x8000) */
|
||||
record-size = <0x8000>;
|
||||
console-size = <0x8000>;
|
||||
ftrace-size = <0x8000>;
|
||||
@@ -179,6 +172,12 @@
|
||||
max-reason = <3>; /* KMSG_DUMP_EMERG */
|
||||
};
|
||||
|
||||
/* LPC FW cycle bridge region requires natural alignment */
|
||||
flash_memory: region@b4000000 {
|
||||
no-map;
|
||||
reg = <0xb4000000 0x04000000>; /* 64M */
|
||||
};
|
||||
|
||||
/* VGA region is dictated by hardware strapping */
|
||||
vga_memory: region@bf000000 {
|
||||
no-map;
|
||||
|
||||
@@ -95,14 +95,9 @@
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
flash_memory: region@b8000000 {
|
||||
no-map;
|
||||
reg = <0xb8000000 0x04000000>; /* 64M */
|
||||
};
|
||||
|
||||
ramoops@bc000000 {
|
||||
ramoops@b3e00000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0xbc000000 0x200000>; /* 16 * (4 * 0x8000) */
|
||||
reg = <0xb3e00000 0x200000>; /* 16 * (4 * 0x8000) */
|
||||
record-size = <0x8000>;
|
||||
console-size = <0x8000>;
|
||||
ftrace-size = <0x8000>;
|
||||
@@ -110,6 +105,13 @@
|
||||
max-reason = <3>; /* KMSG_DUMP_EMERG */
|
||||
};
|
||||
|
||||
/* LPC FW cycle bridge region requires natural alignment */
|
||||
flash_memory: region@b4000000 {
|
||||
no-map;
|
||||
reg = <0xb4000000 0x04000000>; /* 64M */
|
||||
};
|
||||
|
||||
/* VGA region is dictated by hardware strapping */
|
||||
vga_memory: region@bf000000 {
|
||||
no-map;
|
||||
compatible = "shared-dma-pool";
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
pcie1: pcie@2 {
|
||||
device_type = "pci";
|
||||
status = "disabled";
|
||||
assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
|
||||
assigned-addresses = <0x82001000 0 0x80000 0 0x2000>;
|
||||
reg = <0x1000 0 0 0 0>;
|
||||
clocks = <&gate_clk 5>;
|
||||
marvell,pcie-port = <1>;
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
spi-max-frequency = <20000000>;
|
||||
spi-rx-bus-width = <2>;
|
||||
label = "bmc";
|
||||
partitions@80000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
reg = <0>;
|
||||
spi-rx-bus-width = <2>;
|
||||
|
||||
partitions@80000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
spi-max-frequency = <5000000>;
|
||||
spi-rx-bus-width = <2>;
|
||||
label = "bmc";
|
||||
partitions@80000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@@ -422,7 +422,7 @@
|
||||
reg = <1>;
|
||||
spi-max-frequency = <5000000>;
|
||||
spi-rx-bus-width = <2>;
|
||||
partitions@88000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@@ -447,7 +447,7 @@
|
||||
reg = <0>;
|
||||
spi-max-frequency = <5000000>;
|
||||
spi-rx-bus-width = <2>;
|
||||
partitions@A0000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
spi-rx-bus-width = <2>;
|
||||
reg = <0>;
|
||||
spi-max-frequency = <5000000>;
|
||||
partitions@80000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@@ -135,7 +135,7 @@
|
||||
spi-rx-bus-width = <2>;
|
||||
reg = <0>;
|
||||
spi-max-frequency = <5000000>;
|
||||
partitions@A0000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
reg = <0>;
|
||||
spi-rx-bus-width = <2>;
|
||||
|
||||
partitions@80000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@@ -146,7 +146,7 @@
|
||||
reg = <1>;
|
||||
npcm,fiu-rx-bus-width = <2>;
|
||||
|
||||
partitions@88000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@@ -173,7 +173,7 @@
|
||||
reg = <0>;
|
||||
spi-rx-bus-width = <2>;
|
||||
|
||||
partitions@A0000000 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
@@ -1615,7 +1615,7 @@
|
||||
};
|
||||
|
||||
etb@1a01000 {
|
||||
compatible = "coresight-etb10", "arm,primecell";
|
||||
compatible = "arm,coresight-etb10", "arm,primecell";
|
||||
reg = <0x1a01000 0x1000>;
|
||||
|
||||
clocks = <&rpmcc RPM_QDSS_CLK>;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
compatible = "arm,pl110", "arm,primecell";
|
||||
reg = <0xfc200000 0x1000>;
|
||||
interrupt-parent = <&vic1>;
|
||||
interrupts = <12>;
|
||||
interrupts = <13>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "stm32mp157.dtsi"
|
||||
#include "stm32mp15xc.dtsi"
|
||||
#include "stm32mp15xx-dhcor-som.dtsi"
|
||||
#include "stm32mp15xx-dhcor-avenger96.dtsi"
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
|
||||
gpio = <&gpioz 3 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -43,18 +43,21 @@
|
||||
static void __iomem *mmp_timer_base = TIMERS_VIRT_BASE;
|
||||
|
||||
/*
|
||||
* FIXME: the timer needs some delay to stablize the counter capture
|
||||
* Read the timer through the CVWR register. Delay is required after requesting
|
||||
* a read. The CR register cannot be directly read due to metastability issues
|
||||
* documented in the PXA168 software manual.
|
||||
*/
|
||||
static inline uint32_t timer_read(void)
|
||||
{
|
||||
int delay = 100;
|
||||
uint32_t val;
|
||||
int delay = 3;
|
||||
|
||||
__raw_writel(1, mmp_timer_base + TMR_CVWR(1));
|
||||
|
||||
while (delay--)
|
||||
cpu_relax();
|
||||
val = __raw_readl(mmp_timer_base + TMR_CVWR(1));
|
||||
|
||||
return __raw_readl(mmp_timer_base + TMR_CVWR(1));
|
||||
return val;
|
||||
}
|
||||
|
||||
static u64 notrace mmp_read_sched_clock(void)
|
||||
|
||||
@@ -412,7 +412,7 @@
|
||||
resets = <&ps_ans2>;
|
||||
};
|
||||
|
||||
pcie0_dart_0: dart@681008000 {
|
||||
pcie0_dart_0: iommu@681008000 {
|
||||
compatible = "apple,t8103-dart";
|
||||
reg = <0x6 0x81008000 0x0 0x4000>;
|
||||
#iommu-cells = <1>;
|
||||
@@ -421,7 +421,7 @@
|
||||
power-domains = <&ps_apcie_gp>;
|
||||
};
|
||||
|
||||
pcie0_dart_1: dart@682008000 {
|
||||
pcie0_dart_1: iommu@682008000 {
|
||||
compatible = "apple,t8103-dart";
|
||||
reg = <0x6 0x82008000 0x0 0x4000>;
|
||||
#iommu-cells = <1>;
|
||||
@@ -430,7 +430,7 @@
|
||||
power-domains = <&ps_apcie_gp>;
|
||||
};
|
||||
|
||||
pcie0_dart_2: dart@683008000 {
|
||||
pcie0_dart_2: iommu@683008000 {
|
||||
compatible = "apple,t8103-dart";
|
||||
reg = <0x6 0x83008000 0x0 0x4000>;
|
||||
#iommu-cells = <1>;
|
||||
|
||||
@@ -125,9 +125,12 @@
|
||||
/delete-property/ mrvl,i2c-fast-mode;
|
||||
status = "okay";
|
||||
|
||||
/* MCP7940MT-I/MNY RTC */
|
||||
rtc@6f {
|
||||
compatible = "microchip,mcp7940x";
|
||||
reg = <0x6f>;
|
||||
interrupt-parent = <&gpiosb>;
|
||||
interrupts = <5 0>; /* GPIO2_5 */
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
stdout-path = "serial0:921600n8";
|
||||
};
|
||||
|
||||
cpus_fixed_vproc0: fixedregulator@0 {
|
||||
cpus_fixed_vproc0: regulator-vproc-buck0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vproc_buck0";
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1000000>;
|
||||
};
|
||||
|
||||
cpus_fixed_vproc1: fixedregulator@1 {
|
||||
cpus_fixed_vproc1: regulator-vproc-buck1 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vproc_buck1";
|
||||
regulator-min-microvolt = <1000000>;
|
||||
@@ -50,7 +50,7 @@
|
||||
id-gpio = <&pio 14 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
usb_p0_vbus: regulator@2 {
|
||||
usb_p0_vbus: regulator-usb-p0-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "p0_vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
@@ -59,7 +59,7 @@
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
usb_p1_vbus: regulator@3 {
|
||||
usb_p1_vbus: regulator-usb-p1-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "p1_vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
@@ -68,7 +68,7 @@
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
usb_p2_vbus: regulator@4 {
|
||||
usb_p2_vbus: regulator-usb-p2-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "p2_vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
@@ -77,7 +77,7 @@
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
usb_p3_vbus: regulator@5 {
|
||||
usb_p3_vbus: regulator-usb-p3-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "p3_vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
|
||||
@@ -160,70 +160,70 @@
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
clk26m: oscillator@0 {
|
||||
clk26m: oscillator-26m {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <26000000>;
|
||||
clock-output-names = "clk26m";
|
||||
};
|
||||
|
||||
clk32k: oscillator@1 {
|
||||
clk32k: oscillator-32k {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <32768>;
|
||||
clock-output-names = "clk32k";
|
||||
};
|
||||
|
||||
clkfpc: oscillator@2 {
|
||||
clkfpc: oscillator-50m {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <50000000>;
|
||||
clock-output-names = "clkfpc";
|
||||
};
|
||||
|
||||
clkaud_ext_i_0: oscillator@3 {
|
||||
clkaud_ext_i_0: oscillator-aud0 {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <6500000>;
|
||||
clock-output-names = "clkaud_ext_i_0";
|
||||
};
|
||||
|
||||
clkaud_ext_i_1: oscillator@4 {
|
||||
clkaud_ext_i_1: oscillator-aud1 {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <196608000>;
|
||||
clock-output-names = "clkaud_ext_i_1";
|
||||
};
|
||||
|
||||
clkaud_ext_i_2: oscillator@5 {
|
||||
clkaud_ext_i_2: oscillator-aud2 {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <180633600>;
|
||||
clock-output-names = "clkaud_ext_i_2";
|
||||
};
|
||||
|
||||
clki2si0_mck_i: oscillator@6 {
|
||||
clki2si0_mck_i: oscillator-i2s0 {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <30000000>;
|
||||
clock-output-names = "clki2si0_mck_i";
|
||||
};
|
||||
|
||||
clki2si1_mck_i: oscillator@7 {
|
||||
clki2si1_mck_i: oscillator-i2s1 {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <30000000>;
|
||||
clock-output-names = "clki2si1_mck_i";
|
||||
};
|
||||
|
||||
clki2si2_mck_i: oscillator@8 {
|
||||
clki2si2_mck_i: oscillator-i2s2 {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <30000000>;
|
||||
clock-output-names = "clki2si2_mck_i";
|
||||
};
|
||||
|
||||
clktdmin_mclk_i: oscillator@9 {
|
||||
clktdmin_mclk_i: oscillator-mclk {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <30000000>;
|
||||
@@ -266,7 +266,7 @@
|
||||
reg = <0 0x10005000 0 0x1000>;
|
||||
};
|
||||
|
||||
pio: pinctrl@10005000 {
|
||||
pio: pinctrl@1000b000 {
|
||||
compatible = "mediatek,mt2712-pinctrl";
|
||||
reg = <0 0x1000b000 0 0x1000>;
|
||||
mediatek,pctl-regmap = <&syscfg_pctl_a>;
|
||||
|
||||
@@ -88,14 +88,14 @@
|
||||
interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW 0>;
|
||||
};
|
||||
|
||||
clk26m: oscillator@0 {
|
||||
clk26m: oscillator-26m {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <26000000>;
|
||||
clock-output-names = "clk26m";
|
||||
};
|
||||
|
||||
clk32k: oscillator@1 {
|
||||
clk32k: oscillator-32k {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <32768>;
|
||||
@@ -117,7 +117,7 @@
|
||||
compatible = "simple-bus";
|
||||
ranges;
|
||||
|
||||
gic: interrupt-controller@0c000000 {
|
||||
gic: interrupt-controller@c000000 {
|
||||
compatible = "arm,gic-v3";
|
||||
#interrupt-cells = <4>;
|
||||
interrupt-parent = <&gic>;
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
};
|
||||
|
||||
sysirq: intpol-controller@0c53a650 {
|
||||
sysirq: intpol-controller@c53a650 {
|
||||
compatible = "mediatek,mt6779-sysirq",
|
||||
"mediatek,mt6577-sysirq";
|
||||
interrupt-controller;
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
clk26m: oscillator@0 {
|
||||
clk26m: oscillator-26m {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <26000000>;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
clk40m: oscillator@0 {
|
||||
clk40m: oscillator-40m {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <40000000>;
|
||||
#clock-cells = <0>;
|
||||
@@ -112,6 +112,12 @@
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
wed_pcie: wed-pcie@10003000 {
|
||||
compatible = "mediatek,mt7986-wed-pcie",
|
||||
"syscon";
|
||||
reg = <0 0x10003000 0 0x10>;
|
||||
};
|
||||
|
||||
topckgen: topckgen@1001b000 {
|
||||
compatible = "mediatek,mt7986-topckgen", "syscon";
|
||||
reg = <0 0x1001B000 0 0x1000>;
|
||||
@@ -168,7 +174,7 @@
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
trng: trng@1020f000 {
|
||||
trng: rng@1020f000 {
|
||||
compatible = "mediatek,mt7986-rng",
|
||||
"mediatek,mt7623-rng";
|
||||
reg = <0 0x1020f000 0 0x100>;
|
||||
@@ -228,12 +234,6 @@
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
wed_pcie: wed-pcie@10003000 {
|
||||
compatible = "mediatek,mt7986-wed-pcie",
|
||||
"syscon";
|
||||
reg = <0 0x10003000 0 0x10>;
|
||||
};
|
||||
|
||||
wed0: wed@15010000 {
|
||||
compatible = "mediatek,mt7986-wed",
|
||||
"syscon";
|
||||
|
||||
@@ -1678,7 +1678,7 @@
|
||||
<GIC_SPI 278 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-names = "job", "mmu", "gpu";
|
||||
|
||||
clocks = <&topckgen CLK_TOP_MFGPLL_CK>;
|
||||
clocks = <&mfgcfg CLK_MFG_BG3D>;
|
||||
|
||||
power-domains =
|
||||
<&spm MT8183_POWER_DOMAIN_MFG_CORE0>,
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
enable-method = "psci";
|
||||
performance-domains = <&performance 0>;
|
||||
clock-frequency = <1701000000>;
|
||||
capacity-dmips-mhz = <578>;
|
||||
capacity-dmips-mhz = <308>;
|
||||
cpu-idle-states = <&cpu_off_l &cluster_off_l>;
|
||||
next-level-cache = <&l2_0>;
|
||||
#cooling-cells = <2>;
|
||||
@@ -49,7 +49,7 @@
|
||||
enable-method = "psci";
|
||||
performance-domains = <&performance 0>;
|
||||
clock-frequency = <1701000000>;
|
||||
capacity-dmips-mhz = <578>;
|
||||
capacity-dmips-mhz = <308>;
|
||||
cpu-idle-states = <&cpu_off_l &cluster_off_l>;
|
||||
next-level-cache = <&l2_0>;
|
||||
#cooling-cells = <2>;
|
||||
@@ -62,7 +62,7 @@
|
||||
enable-method = "psci";
|
||||
performance-domains = <&performance 0>;
|
||||
clock-frequency = <1701000000>;
|
||||
capacity-dmips-mhz = <578>;
|
||||
capacity-dmips-mhz = <308>;
|
||||
cpu-idle-states = <&cpu_off_l &cluster_off_l>;
|
||||
next-level-cache = <&l2_0>;
|
||||
#cooling-cells = <2>;
|
||||
@@ -75,7 +75,7 @@
|
||||
enable-method = "psci";
|
||||
performance-domains = <&performance 0>;
|
||||
clock-frequency = <1701000000>;
|
||||
capacity-dmips-mhz = <578>;
|
||||
capacity-dmips-mhz = <308>;
|
||||
cpu-idle-states = <&cpu_off_l &cluster_off_l>;
|
||||
next-level-cache = <&l2_0>;
|
||||
#cooling-cells = <2>;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
};
|
||||
|
||||
firmware {
|
||||
optee: optee@4fd00000 {
|
||||
optee: optee {
|
||||
compatible = "linaro,optee-tz";
|
||||
method = "smc";
|
||||
};
|
||||
@@ -209,7 +209,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_pins_a: i2c0@0 {
|
||||
i2c0_pins_a: i2c0 {
|
||||
pins1 {
|
||||
pinmux = <MT8516_PIN_58_SDA0__FUNC_SDA0_0>,
|
||||
<MT8516_PIN_59_SCL0__FUNC_SCL0_0>;
|
||||
@@ -217,7 +217,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
i2c2_pins_a: i2c2@0 {
|
||||
i2c2_pins_a: i2c2 {
|
||||
pins1 {
|
||||
pinmux = <MT8516_PIN_60_SDA2__FUNC_SDA2_0>,
|
||||
<MT8516_PIN_61_SCL2__FUNC_SCL2_0>;
|
||||
|
||||
@@ -1965,7 +1965,7 @@
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
|
||||
ranges = <0x43000000 0x35 0x40000000 0x35 0x40000000 0x2 0xe8000000>, /* prefetchable memory (11904 MB) */
|
||||
ranges = <0x43000000 0x35 0x40000000 0x35 0x40000000 0x2 0xc0000000>, /* prefetchable memory (11264 MB) */
|
||||
<0x02000000 0x0 0x40000000 0x38 0x28000000 0x0 0x08000000>, /* non-prefetchable memory (128 MB) */
|
||||
<0x01000000 0x0 0x2c100000 0x00 0x2c100000 0x0 0x00100000>; /* downstream I/O (1 MB) */
|
||||
|
||||
@@ -2178,7 +2178,7 @@
|
||||
bus-range = <0x0 0xff>;
|
||||
|
||||
ranges = <0x43000000 0x21 0x00000000 0x21 0x00000000 0x0 0x28000000>, /* prefetchable memory (640 MB) */
|
||||
<0x02000000 0x0 0x40000000 0x21 0xe8000000 0x0 0x08000000>, /* non-prefetchable memory (128 MB) */
|
||||
<0x02000000 0x0 0x40000000 0x21 0x28000000 0x0 0x08000000>, /* non-prefetchable memory (128 MB) */
|
||||
<0x01000000 0x0 0x34100000 0x00 0x34100000 0x0 0x00100000>; /* downstream I/O (1 MB) */
|
||||
|
||||
interconnects = <&mc TEGRA234_MEMORY_CLIENT_PCIE3R &emc>,
|
||||
@@ -2336,7 +2336,7 @@
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
|
||||
ranges = <0x43000000 0x27 0x40000000 0x27 0x40000000 0x3 0xe8000000>, /* prefetchable memory (16000 MB) */
|
||||
ranges = <0x43000000 0x28 0x00000000 0x28 0x00000000 0x3 0x28000000>, /* prefetchable memory (12928 MB) */
|
||||
<0x02000000 0x0 0x40000000 0x2b 0x28000000 0x0 0x08000000>, /* non-prefetchable memory (128 MB) */
|
||||
<0x01000000 0x0 0x3a100000 0x00 0x3a100000 0x0 0x00100000>; /* downstream I/O (1 MB) */
|
||||
|
||||
@@ -2442,7 +2442,7 @@
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
|
||||
ranges = <0x43000000 0x2e 0x40000000 0x2e 0x40000000 0x3 0xe8000000>, /* prefetchable memory (16000 MB) */
|
||||
ranges = <0x43000000 0x30 0x00000000 0x30 0x00000000 0x2 0x28000000>, /* prefetchable memory (8832 MB) */
|
||||
<0x02000000 0x0 0x40000000 0x32 0x28000000 0x0 0x08000000>, /* non-prefetchable memory (128 MB) */
|
||||
<0x01000000 0x0 0x3e100000 0x00 0x3e100000 0x0 0x00100000>; /* downstream I/O (1 MB) */
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
&blsp1_spi1 {
|
||||
cs-select = <0>;
|
||||
pinctrl-0 = <&spi_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
|
||||
@@ -1345,7 +1345,7 @@
|
||||
};
|
||||
|
||||
mpss: remoteproc@4080000 {
|
||||
compatible = "qcom,msm8916-mss-pil", "qcom,q6v5-pil";
|
||||
compatible = "qcom,msm8916-mss-pil";
|
||||
reg = <0x04080000 0x100>,
|
||||
<0x04020000 0x040>;
|
||||
|
||||
|
||||
@@ -144,82 +144,92 @@
|
||||
/* Nominal fmax for now */
|
||||
opp-307200000 {
|
||||
opp-hz = /bits/ 64 <307200000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-422400000 {
|
||||
opp-hz = /bits/ 64 <422400000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-480000000 {
|
||||
opp-hz = /bits/ 64 <480000000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-556800000 {
|
||||
opp-hz = /bits/ 64 <556800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-652800000 {
|
||||
opp-hz = /bits/ 64 <652800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-729600000 {
|
||||
opp-hz = /bits/ 64 <729600000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-844800000 {
|
||||
opp-hz = /bits/ 64 <844800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-960000000 {
|
||||
opp-hz = /bits/ 64 <960000000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1036800000 {
|
||||
opp-hz = /bits/ 64 <1036800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1113600000 {
|
||||
opp-hz = /bits/ 64 <1113600000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1190400000 {
|
||||
opp-hz = /bits/ 64 <1190400000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1228800000 {
|
||||
opp-hz = /bits/ 64 <1228800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1324800000 {
|
||||
opp-hz = /bits/ 64 <1324800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x5>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1363200000 {
|
||||
opp-hz = /bits/ 64 <1363200000>;
|
||||
opp-supported-hw = <0x2>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1401600000 {
|
||||
opp-hz = /bits/ 64 <1401600000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x5>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1478400000 {
|
||||
opp-hz = /bits/ 64 <1478400000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x1>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1497600000 {
|
||||
opp-hz = /bits/ 64 <1497600000>;
|
||||
opp-supported-hw = <0x04>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1593600000 {
|
||||
opp-hz = /bits/ 64 <1593600000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x1>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
};
|
||||
@@ -232,127 +242,137 @@
|
||||
/* Nominal fmax for now */
|
||||
opp-307200000 {
|
||||
opp-hz = /bits/ 64 <307200000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-403200000 {
|
||||
opp-hz = /bits/ 64 <403200000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-480000000 {
|
||||
opp-hz = /bits/ 64 <480000000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-556800000 {
|
||||
opp-hz = /bits/ 64 <556800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-652800000 {
|
||||
opp-hz = /bits/ 64 <652800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-729600000 {
|
||||
opp-hz = /bits/ 64 <729600000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-806400000 {
|
||||
opp-hz = /bits/ 64 <806400000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-883200000 {
|
||||
opp-hz = /bits/ 64 <883200000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-940800000 {
|
||||
opp-hz = /bits/ 64 <940800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1036800000 {
|
||||
opp-hz = /bits/ 64 <1036800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1113600000 {
|
||||
opp-hz = /bits/ 64 <1113600000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1190400000 {
|
||||
opp-hz = /bits/ 64 <1190400000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1248000000 {
|
||||
opp-hz = /bits/ 64 <1248000000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1324800000 {
|
||||
opp-hz = /bits/ 64 <1324800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1401600000 {
|
||||
opp-hz = /bits/ 64 <1401600000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1478400000 {
|
||||
opp-hz = /bits/ 64 <1478400000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1555200000 {
|
||||
opp-hz = /bits/ 64 <1555200000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1632000000 {
|
||||
opp-hz = /bits/ 64 <1632000000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1708800000 {
|
||||
opp-hz = /bits/ 64 <1708800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1785600000 {
|
||||
opp-hz = /bits/ 64 <1785600000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x7>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1804800000 {
|
||||
opp-hz = /bits/ 64 <1804800000>;
|
||||
opp-supported-hw = <0x6>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1824000000 {
|
||||
opp-hz = /bits/ 64 <1824000000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x1>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1900800000 {
|
||||
opp-hz = /bits/ 64 <1900800000>;
|
||||
opp-supported-hw = <0x4>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1920000000 {
|
||||
opp-hz = /bits/ 64 <1920000000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x1>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1996800000 {
|
||||
opp-hz = /bits/ 64 <1996800000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x1>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-2073600000 {
|
||||
opp-hz = /bits/ 64 <2073600000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x1>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-2150400000 {
|
||||
opp-hz = /bits/ 64 <2150400000>;
|
||||
opp-supported-hw = <0x77>;
|
||||
opp-supported-hw = <0x1>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
};
|
||||
@@ -1213,17 +1233,17 @@
|
||||
compatible = "operating-points-v2";
|
||||
|
||||
/*
|
||||
* 624Mhz and 560Mhz are only available on speed
|
||||
* bin (1 << 0). All the rest are available on
|
||||
* all bins of the hardware
|
||||
* 624Mhz is only available on speed bins 0 and 3.
|
||||
* 560Mhz is only available on speed bins 0, 2 and 3.
|
||||
* All the rest are available on all bins of the hardware.
|
||||
*/
|
||||
opp-624000000 {
|
||||
opp-hz = /bits/ 64 <624000000>;
|
||||
opp-supported-hw = <0x01>;
|
||||
opp-supported-hw = <0x09>;
|
||||
};
|
||||
opp-560000000 {
|
||||
opp-hz = /bits/ 64 <560000000>;
|
||||
opp-supported-hw = <0x01>;
|
||||
opp-supported-hw = <0x0d>;
|
||||
};
|
||||
opp-510000000 {
|
||||
opp-hz = /bits/ 64 <510000000>;
|
||||
@@ -3342,7 +3362,7 @@
|
||||
interrupt-names = "intr1", "intr2";
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
|
||||
|
||||
slim-ifc-dev = <&tasha_ifd>;
|
||||
|
||||
|
||||
266
arch/arm64/boot/dts/qcom/msm8996pro.dtsi
Normal file
266
arch/arm64/boot/dts/qcom/msm8996pro.dtsi
Normal file
@@ -0,0 +1,266 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
/*
|
||||
* Copyright (c) 2022, Linaro Limited
|
||||
*/
|
||||
|
||||
#include "msm8996.dtsi"
|
||||
|
||||
/ {
|
||||
/delete-node/ opp-table-cluster0;
|
||||
/delete-node/ opp-table-cluster1;
|
||||
|
||||
/*
|
||||
* On MSM8996 Pro the cpufreq driver shifts speed bins into the high
|
||||
* nibble of supported hw, so speed bin 0 becomes 0x10, speed bin 1
|
||||
* becomes 0x20, speed 2 becomes 0x40.
|
||||
*/
|
||||
|
||||
cluster0_opp: opp-table-cluster0 {
|
||||
compatible = "operating-points-v2-kryo-cpu";
|
||||
nvmem-cells = <&speedbin_efuse>;
|
||||
opp-shared;
|
||||
|
||||
opp-307200000 {
|
||||
opp-hz = /bits/ 64 <307200000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-384000000 {
|
||||
opp-hz = /bits/ 64 <384000000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-460800000 {
|
||||
opp-hz = /bits/ 64 <460800000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-537600000 {
|
||||
opp-hz = /bits/ 64 <537600000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-614400000 {
|
||||
opp-hz = /bits/ 64 <614400000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-691200000 {
|
||||
opp-hz = /bits/ 64 <691200000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-768000000 {
|
||||
opp-hz = /bits/ 64 <768000000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-844800000 {
|
||||
opp-hz = /bits/ 64 <844800000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-902400000 {
|
||||
opp-hz = /bits/ 64 <902400000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-979200000 {
|
||||
opp-hz = /bits/ 64 <979200000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1056000000 {
|
||||
opp-hz = /bits/ 64 <1056000000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1132800000 {
|
||||
opp-hz = /bits/ 64 <1132800000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1209600000 {
|
||||
opp-hz = /bits/ 64 <1209600000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1286400000 {
|
||||
opp-hz = /bits/ 64 <1286400000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1363200000 {
|
||||
opp-hz = /bits/ 64 <1363200000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1440000000 {
|
||||
opp-hz = /bits/ 64 <1440000000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1516800000 {
|
||||
opp-hz = /bits/ 64 <1516800000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1593600000 {
|
||||
opp-hz = /bits/ 64 <1593600000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1996800000 {
|
||||
opp-hz = /bits/ 64 <1996800000>;
|
||||
opp-supported-hw = <0x20>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-2188800000 {
|
||||
opp-hz = /bits/ 64 <2188800000>;
|
||||
opp-supported-hw = <0x10>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
};
|
||||
|
||||
cluster1_opp: opp-table-cluster1 {
|
||||
compatible = "operating-points-v2-kryo-cpu";
|
||||
nvmem-cells = <&speedbin_efuse>;
|
||||
opp-shared;
|
||||
|
||||
opp-307200000 {
|
||||
opp-hz = /bits/ 64 <307200000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-384000000 {
|
||||
opp-hz = /bits/ 64 <384000000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-460800000 {
|
||||
opp-hz = /bits/ 64 <460800000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-537600000 {
|
||||
opp-hz = /bits/ 64 <537600000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-614400000 {
|
||||
opp-hz = /bits/ 64 <614400000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-691200000 {
|
||||
opp-hz = /bits/ 64 <691200000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-748800000 {
|
||||
opp-hz = /bits/ 64 <748800000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-825600000 {
|
||||
opp-hz = /bits/ 64 <825600000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-902400000 {
|
||||
opp-hz = /bits/ 64 <902400000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-979200000 {
|
||||
opp-hz = /bits/ 64 <979200000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1056000000 {
|
||||
opp-hz = /bits/ 64 <1056000000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1132800000 {
|
||||
opp-hz = /bits/ 64 <1132800000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1209600000 {
|
||||
opp-hz = /bits/ 64 <1209600000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1286400000 {
|
||||
opp-hz = /bits/ 64 <1286400000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1363200000 {
|
||||
opp-hz = /bits/ 64 <1363200000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1440000000 {
|
||||
opp-hz = /bits/ 64 <1440000000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1516800000 {
|
||||
opp-hz = /bits/ 64 <1516800000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1593600000 {
|
||||
opp-hz = /bits/ 64 <1593600000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1670400000 {
|
||||
opp-hz = /bits/ 64 <1670400000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1747200000 {
|
||||
opp-hz = /bits/ 64 <1747200000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1824000000 {
|
||||
opp-hz = /bits/ 64 <1824000000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1900800000 {
|
||||
opp-hz = /bits/ 64 <1900800000>;
|
||||
opp-supported-hw = <0x70>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-1977600000 {
|
||||
opp-hz = /bits/ 64 <1977600000>;
|
||||
opp-supported-hw = <0x30>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-2054400000 {
|
||||
opp-hz = /bits/ 64 <2054400000>;
|
||||
opp-supported-hw = <0x30>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-2150400000 {
|
||||
opp-hz = /bits/ 64 <2150400000>;
|
||||
opp-supported-hw = <0x30>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-2246400000 {
|
||||
opp-hz = /bits/ 64 <2246400000>;
|
||||
opp-supported-hw = <0x10>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp-2342400000 {
|
||||
opp-hz = /bits/ 64 <2342400000>;
|
||||
opp-supported-hw = <0x10>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
|
||||
*/
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/spmi/spmi.h>
|
||||
|
||||
&spmi_bus {
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
qcom,pre-scaling = <1 3>;
|
||||
};
|
||||
|
||||
vcoin: vcoin@83 {
|
||||
vcoin: vcoin@85 {
|
||||
reg = <ADC5_VCOIN>;
|
||||
qcom,decimation = <1024>;
|
||||
qcom,pre-scaling = <1 3>;
|
||||
|
||||
@@ -194,6 +194,12 @@ ap_ts_pen_1v8: &i2c4 {
|
||||
pins = "gpio49", "gpio50", "gpio51", "gpio52";
|
||||
function = "mi2s_1";
|
||||
};
|
||||
|
||||
pinconf {
|
||||
pins = "gpio49", "gpio50", "gpio51", "gpio52";
|
||||
drive-strength = <2>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
&ts_reset_l {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
|
||||
#include "sc7280-idp.dtsi"
|
||||
#include "pmr735a.dtsi"
|
||||
#include "sc7280-herobrine-lte-sku.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. sc7280 IDP SKU1 platform";
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "pmk8350.dtsi"
|
||||
|
||||
#include "sc7280-chrome-common.dtsi"
|
||||
#include "sc7280-herobrine-lte-sku.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
@@ -34,7 +35,7 @@
|
||||
pinctrl-0 = <&wcd_reset_n>;
|
||||
pinctrl-1 = <&wcd_reset_n_sleep>;
|
||||
|
||||
reset-gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&tlmm 83 GPIO_ACTIVE_LOW>;
|
||||
|
||||
qcom,rx-device = <&wcd_rx>;
|
||||
qcom,tx-device = <&wcd_tx>;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
pinctrl-0 = <&wcd_reset_n>, <&us_euro_hs_sel>;
|
||||
pinctrl-1 = <&wcd_reset_n_sleep>, <&us_euro_hs_sel>;
|
||||
|
||||
reset-gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&tlmm 83 GPIO_ACTIVE_LOW>;
|
||||
us-euro-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
qcom,rx-device = <&wcd_rx>;
|
||||
|
||||
@@ -779,7 +779,7 @@
|
||||
pins = "gpio17", "gpio18", "gpio19";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-no-pull;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1436,7 +1436,7 @@ ap_ts_i2c: &i2c14 {
|
||||
config {
|
||||
pins = "gpio126";
|
||||
function = "gpio";
|
||||
bias-no-pull;
|
||||
bias-disable;
|
||||
drive-strength = <2>;
|
||||
output-low;
|
||||
};
|
||||
@@ -1446,7 +1446,7 @@ ap_ts_i2c: &i2c14 {
|
||||
config {
|
||||
pins = "gpio126";
|
||||
function = "gpio";
|
||||
bias-no-pull;
|
||||
bias-disable;
|
||||
drive-strength = <2>;
|
||||
output-high;
|
||||
};
|
||||
|
||||
@@ -628,7 +628,7 @@
|
||||
};
|
||||
|
||||
wcd_intr_default: wcd-intr-default {
|
||||
pins = "goui54";
|
||||
pins = "gpio54";
|
||||
function = "gpio";
|
||||
input-enable;
|
||||
bias-pull-down;
|
||||
|
||||
@@ -458,7 +458,7 @@
|
||||
sdhc_1: mmc@4744000 {
|
||||
compatible = "qcom,sm6125-sdhci", "qcom,sdhci-msm-v5";
|
||||
reg = <0x04744000 0x1000>, <0x04745000 0x1000>;
|
||||
reg-names = "hc", "core";
|
||||
reg-names = "hc", "cqhci";
|
||||
|
||||
interrupts = <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
@@ -485,6 +485,7 @@
|
||||
interrupts = <GIC_SPI 641 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 644 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "hc_irq", "pwr_irq";
|
||||
iommus = <&apps_smmu 0x60 0x0>;
|
||||
|
||||
clocks = <&gcc GCC_SDCC1_AHB_CLK>,
|
||||
<&gcc GCC_SDCC1_APPS_CLK>,
|
||||
@@ -1063,6 +1064,7 @@
|
||||
interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "hc_irq", "pwr_irq";
|
||||
iommus = <&apps_smmu 0x560 0x0>;
|
||||
|
||||
clocks = <&gcc GCC_SDCC2_AHB_CLK>,
|
||||
<&gcc GCC_SDCC2_APPS_CLK>,
|
||||
@@ -1148,15 +1150,11 @@
|
||||
dp_phy: dp-phy@88ea200 {
|
||||
reg = <0 0x088ea200 0 0x200>,
|
||||
<0 0x088ea400 0 0x200>,
|
||||
<0 0x088eac00 0 0x400>,
|
||||
<0 0x088eaa00 0 0x200>,
|
||||
<0 0x088ea600 0 0x200>,
|
||||
<0 0x088ea800 0 0x200>,
|
||||
<0 0x088eaa00 0 0x100>;
|
||||
<0 0x088ea800 0 0x200>;
|
||||
#phy-cells = <0>;
|
||||
#clock-cells = <1>;
|
||||
clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
|
||||
clock-names = "pipe0";
|
||||
clock-output-names = "usb3_phy_pipe_clk_src";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -2032,11 +2032,11 @@
|
||||
status = "disabled";
|
||||
|
||||
ufs_mem_phy_lanes: phy@1d87400 {
|
||||
reg = <0 0x01d87400 0 0x108>,
|
||||
<0 0x01d87600 0 0x1e0>,
|
||||
<0 0x01d87c00 0 0x1dc>,
|
||||
<0 0x01d87800 0 0x108>,
|
||||
<0 0x01d87a00 0 0x1e0>;
|
||||
reg = <0 0x01d87400 0 0x16c>,
|
||||
<0 0x01d87600 0 0x200>,
|
||||
<0 0x01d87c00 0 0x200>,
|
||||
<0 0x01d87800 0 0x16c>,
|
||||
<0 0x01d87a00 0 0x200>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -635,7 +635,7 @@
|
||||
wcd938x: codec {
|
||||
compatible = "qcom,wcd9380-codec";
|
||||
#sound-dai-cells = <1>;
|
||||
reset-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
|
||||
vdd-buck-supply = <&vreg_s4a_1p8>;
|
||||
vdd-rxtx-supply = <&vreg_s4a_1p8>;
|
||||
vdd-io-supply = <&vreg_s4a_1p8>;
|
||||
|
||||
@@ -619,7 +619,7 @@
|
||||
pins = "gpio39";
|
||||
function = "gpio";
|
||||
drive-strength = <2>;
|
||||
bias-disabled;
|
||||
bias-disable;
|
||||
input-enable;
|
||||
};
|
||||
|
||||
|
||||
@@ -2180,11 +2180,11 @@
|
||||
status = "disabled";
|
||||
|
||||
ufs_mem_phy_lanes: phy@1d87400 {
|
||||
reg = <0 0x01d87400 0 0x108>,
|
||||
<0 0x01d87600 0 0x1e0>,
|
||||
<0 0x01d87c00 0 0x1dc>,
|
||||
<0 0x01d87800 0 0x108>,
|
||||
<0 0x01d87a00 0 0x1e0>;
|
||||
reg = <0 0x01d87400 0 0x16c>,
|
||||
<0 0x01d87600 0 0x200>,
|
||||
<0 0x01d87c00 0 0x200>,
|
||||
<0 0x01d87800 0 0x16c>,
|
||||
<0 0x01d87a00 0 0x200>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
@@ -2455,7 +2455,7 @@
|
||||
pins = "gpio7";
|
||||
function = "dmic1_data";
|
||||
drive-strength = <2>;
|
||||
pull-down;
|
||||
bias-pull-down;
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
@@ -2892,15 +2892,11 @@
|
||||
dp_phy: dp-phy@88ea200 {
|
||||
reg = <0 0x088ea200 0 0x200>,
|
||||
<0 0x088ea400 0 0x200>,
|
||||
<0 0x088eac00 0 0x400>,
|
||||
<0 0x088eaa00 0 0x200>,
|
||||
<0 0x088ea600 0 0x200>,
|
||||
<0 0x088ea800 0 0x200>,
|
||||
<0 0x088eaa00 0 0x100>;
|
||||
<0 0x088ea800 0 0x200>;
|
||||
#phy-cells = <0>;
|
||||
#clock-cells = <1>;
|
||||
clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
|
||||
clock-names = "pipe0";
|
||||
clock-output-names = "usb3_phy_pipe_clk_src";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -2142,11 +2142,11 @@
|
||||
status = "disabled";
|
||||
|
||||
ufs_mem_phy_lanes: phy@1d87400 {
|
||||
reg = <0 0x01d87400 0 0x108>,
|
||||
<0 0x01d87600 0 0x1e0>,
|
||||
<0 0x01d87c00 0 0x1dc>,
|
||||
<0 0x01d87800 0 0x108>,
|
||||
<0 0x01d87a00 0 0x1e0>;
|
||||
reg = <0 0x01d87400 0 0x188>,
|
||||
<0 0x01d87600 0 0x200>,
|
||||
<0 0x01d87c00 0 0x200>,
|
||||
<0 0x01d87800 0 0x188>,
|
||||
<0 0x01d87a00 0 0x200>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -556,8 +556,6 @@
|
||||
pinctrl-1 = <&sdc2_sleep_state &sdc2_card_det_n>;
|
||||
vmmc-supply = <&pm8350c_l9>;
|
||||
vqmmc-supply = <&pm8350c_l6>;
|
||||
/* Forbid SDR104/SDR50 - broken hw! */
|
||||
sdhci-caps-mask = <0x3 0x0>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
status = "okay";
|
||||
|
||||
@@ -3161,11 +3161,11 @@
|
||||
status = "disabled";
|
||||
|
||||
ufs_mem_phy_lanes: phy@1d87400 {
|
||||
reg = <0 0x01d87400 0 0x108>,
|
||||
<0 0x01d87600 0 0x1e0>,
|
||||
<0 0x01d87c00 0 0x1dc>,
|
||||
<0 0x01d87800 0 0x108>,
|
||||
<0 0x01d87a00 0 0x1e0>;
|
||||
reg = <0 0x01d87400 0 0x188>,
|
||||
<0 0x01d87600 0 0x200>,
|
||||
<0 0x01d87c00 0 0x200>,
|
||||
<0 0x01d87800 0 0x188>,
|
||||
<0 0x01d87a00 0 0x200>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
@@ -3192,6 +3192,9 @@
|
||||
bus-width = <4>;
|
||||
dma-coherent;
|
||||
|
||||
/* Forbid SDR104/SDR50 - broken hw! */
|
||||
sdhci-caps-mask = <0x3 0x0>;
|
||||
|
||||
status = "disabled";
|
||||
|
||||
sdhc2_opp_table: opp-table {
|
||||
|
||||
@@ -577,7 +577,7 @@
|
||||
reg = <0 0xe6540000 0 0x60>;
|
||||
interrupts = <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 514>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_S0D3>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_SASYNCPERD1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac0 0x31>, <&dmac0 0x30>,
|
||||
@@ -594,7 +594,7 @@
|
||||
reg = <0 0xe6550000 0 0x60>;
|
||||
interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 515>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_S0D3>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_SASYNCPERD1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac0 0x33>, <&dmac0 0x32>,
|
||||
@@ -611,7 +611,7 @@
|
||||
reg = <0 0xe6560000 0 0x60>;
|
||||
interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 516>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_S0D3>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_SASYNCPERD1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac0 0x35>, <&dmac0 0x34>,
|
||||
@@ -628,7 +628,7 @@
|
||||
reg = <0 0xe66a0000 0 0x60>;
|
||||
interrupts = <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 517>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_S0D3>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_SASYNCPERD1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac0 0x37>, <&dmac0 0x36>,
|
||||
@@ -657,7 +657,7 @@
|
||||
reg = <0 0xe6e60000 0 64>;
|
||||
interrupts = <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 702>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_S0D3_PER>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_SASYNCPERD1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac0 0x51>, <&dmac0 0x50>,
|
||||
@@ -674,7 +674,7 @@
|
||||
reg = <0 0xe6e68000 0 64>;
|
||||
interrupts = <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 703>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_S0D3_PER>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_SASYNCPERD1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac0 0x53>, <&dmac0 0x52>,
|
||||
@@ -691,7 +691,7 @@
|
||||
reg = <0 0xe6c50000 0 64>;
|
||||
interrupts = <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 704>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_S0D3_PER>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_SASYNCPERD1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac0 0x57>, <&dmac0 0x56>,
|
||||
@@ -708,7 +708,7 @@
|
||||
reg = <0 0xe6c40000 0 64>;
|
||||
interrupts = <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 705>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_S0D3_PER>,
|
||||
<&cpg CPG_CORE R8A779F0_CLK_SASYNCPERD1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac0 0x59>, <&dmac0 0x58>,
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
reg = <0 0xe6540000 0 96>;
|
||||
interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cpg CPG_MOD 514>,
|
||||
<&cpg CPG_CORE R8A779G0_CLK_S0D3_PER>,
|
||||
<&cpg CPG_CORE R8A779G0_CLK_SASYNCPERD1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
gic: interrupt-controller@82000000 {
|
||||
gic: interrupt-controller@82010000 {
|
||||
compatible = "arm,gic-400";
|
||||
#interrupt-cells = <3>;
|
||||
#address-cells = <0>;
|
||||
@@ -126,7 +126,7 @@
|
||||
i2c0: i2c@a4030000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "renesas,i2c-r9a09g011", "renesas,rzv2m-i2c";
|
||||
compatible = "renesas,r9a09g011-i2c", "renesas,rzv2m-i2c";
|
||||
reg = <0 0xa4030000 0 0x80>;
|
||||
interrupts = <GIC_SPI 232 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 236 IRQ_TYPE_EDGE_RISING>;
|
||||
@@ -140,7 +140,7 @@
|
||||
i2c2: i2c@a4030100 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "renesas,i2c-r9a09g011", "renesas,rzv2m-i2c";
|
||||
compatible = "renesas,r9a09g011-i2c", "renesas,rzv2m-i2c";
|
||||
reg = <0 0xa4030100 0 0x80>;
|
||||
interrupts = <GIC_SPI 234 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 238 IRQ_TYPE_EDGE_RISING>;
|
||||
|
||||
@@ -55,14 +55,14 @@
|
||||
samsung,pins = "gpf5-0";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_NONE>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV2>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
ufs_refclk_out: ufs-refclk-out-pins {
|
||||
samsung,pins = "gpf5-1";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_NONE>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV2>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -239,105 +239,105 @@
|
||||
samsung,pins = "gpb6-1";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV2>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
pwm1_out: pwm1-out-pins {
|
||||
samsung,pins = "gpb6-5";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV2>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
hs_i2c0_bus: hs-i2c0-bus-pins {
|
||||
samsung,pins = "gpb0-0", "gpb0-1";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
hs_i2c1_bus: hs-i2c1-bus-pins {
|
||||
samsung,pins = "gpb0-2", "gpb0-3";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
hs_i2c2_bus: hs-i2c2-bus-pins {
|
||||
samsung,pins = "gpb0-4", "gpb0-5";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
hs_i2c3_bus: hs-i2c3-bus-pins {
|
||||
samsung,pins = "gpb0-6", "gpb0-7";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
hs_i2c4_bus: hs-i2c4-bus-pins {
|
||||
samsung,pins = "gpb1-0", "gpb1-1";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
hs_i2c5_bus: hs-i2c5-bus-pins {
|
||||
samsung,pins = "gpb1-2", "gpb1-3";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
hs_i2c6_bus: hs-i2c6-bus-pins {
|
||||
samsung,pins = "gpb1-4", "gpb1-5";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
hs_i2c7_bus: hs-i2c7-bus-pins {
|
||||
samsung,pins = "gpb1-6", "gpb1-7";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
uart0_data: uart0-data-pins {
|
||||
samsung,pins = "gpb7-0", "gpb7-1";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_NONE>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
uart1_data: uart1-data-pins {
|
||||
samsung,pins = "gpb7-4", "gpb7-5";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_NONE>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
spi0_bus: spi0-bus-pins {
|
||||
samsung,pins = "gpb4-0", "gpb4-2", "gpb4-3";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
spi1_bus: spi1-bus-pins {
|
||||
samsung,pins = "gpb4-4", "gpb4-6", "gpb4-7";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
|
||||
spi2_bus: spi2-bus-pins {
|
||||
samsung,pins = "gpb5-0", "gpb5-2", "gpb5-3";
|
||||
samsung,pin-function = <FSD_PIN_FUNC_2>;
|
||||
samsung,pin-pud = <FSD_PIN_PULL_UP>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV1>;
|
||||
samsung,pin-drv = <FSD_PIN_DRV_LV4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
#define FSD_PIN_PULL_UP 3
|
||||
|
||||
#define FSD_PIN_DRV_LV1 0
|
||||
#define FSD_PIN_DRV_LV2 2
|
||||
#define FSD_PIN_DRV_LV3 1
|
||||
#define FSD_PIN_DRV_LV4 3
|
||||
#define FSD_PIN_DRV_LV2 1
|
||||
#define FSD_PIN_DRV_LV4 2
|
||||
#define FSD_PIN_DRV_LV6 3
|
||||
|
||||
#define FSD_PIN_FUNC_INPUT 0
|
||||
#define FSD_PIN_FUNC_OUTPUT 1
|
||||
|
||||
@@ -120,7 +120,6 @@
|
||||
dmas = <&main_udmap 0xc001>, <&main_udmap 0x4002>,
|
||||
<&main_udmap 0x4003>;
|
||||
dma-names = "tx", "rx1", "rx2";
|
||||
dma-coherent;
|
||||
|
||||
rng: rng@4e10000 {
|
||||
compatible = "inside-secure,safexcel-eip76";
|
||||
|
||||
@@ -386,7 +386,6 @@
|
||||
dmas = <&mcu_udmap 0xf501>, <&mcu_udmap 0x7502>,
|
||||
<&mcu_udmap 0x7503>;
|
||||
dma-names = "tx", "rx1", "rx2";
|
||||
dma-coherent;
|
||||
|
||||
rng: rng@40910000 {
|
||||
compatible = "inside-secure,safexcel-eip76";
|
||||
|
||||
@@ -337,7 +337,6 @@
|
||||
dmas = <&main_udmap 0xc000>, <&main_udmap 0x4000>,
|
||||
<&main_udmap 0x4001>;
|
||||
dma-names = "tx", "rx1", "rx2";
|
||||
dma-coherent;
|
||||
|
||||
rng: rng@4e10000 {
|
||||
compatible = "inside-secure,safexcel-eip76";
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#interrupt-cells = <1>;
|
||||
ti,sci = <&sms>;
|
||||
ti,sci-dev-id = <148>;
|
||||
ti,interrupt-ranges = <8 360 56>;
|
||||
ti,interrupt-ranges = <8 392 56>;
|
||||
};
|
||||
|
||||
main_pmx0: pinctrl@11c000 {
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
#interrupt-cells = <1>;
|
||||
ti,sci = <&sms>;
|
||||
ti,sci-dev-id = <125>;
|
||||
ti,interrupt-ranges = <16 928 16>;
|
||||
ti,interrupt-ranges = <16 960 16>;
|
||||
};
|
||||
|
||||
mcu_conf: syscon@40f00000 {
|
||||
|
||||
@@ -96,6 +96,17 @@ config CRYPTO_SHA3_ARM64
|
||||
Architecture: arm64 using:
|
||||
- ARMv8.2 Crypto Extensions
|
||||
|
||||
config CRYPTO_SM3_NEON
|
||||
tristate "Hash functions: SM3 (NEON)"
|
||||
depends on KERNEL_MODE_NEON
|
||||
select CRYPTO_HASH
|
||||
select CRYPTO_SM3
|
||||
help
|
||||
SM3 (ShangMi 3) secure hash function (OSCCA GM/T 0004-2012)
|
||||
|
||||
Architecture: arm64 using:
|
||||
- NEON (Advanced SIMD) extensions
|
||||
|
||||
config CRYPTO_SM3_ARM64_CE
|
||||
tristate "Hash functions: SM3 (ARMv8.2 Crypto Extensions)"
|
||||
depends on KERNEL_MODE_NEON
|
||||
|
||||
@@ -17,6 +17,9 @@ sha512-ce-y := sha512-ce-glue.o sha512-ce-core.o
|
||||
obj-$(CONFIG_CRYPTO_SHA3_ARM64) += sha3-ce.o
|
||||
sha3-ce-y := sha3-ce-glue.o sha3-ce-core.o
|
||||
|
||||
obj-$(CONFIG_CRYPTO_SM3_NEON) += sm3-neon.o
|
||||
sm3-neon-y := sm3-neon-glue.o sm3-neon-core.o
|
||||
|
||||
obj-$(CONFIG_CRYPTO_SM3_ARM64_CE) += sm3-ce.o
|
||||
sm3-ce-y := sm3-ce-glue.o sm3-ce-core.o
|
||||
|
||||
|
||||
601
arch/arm64/crypto/sm3-neon-core.S
Normal file
601
arch/arm64/crypto/sm3-neon-core.S
Normal file
@@ -0,0 +1,601 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* sm3-neon-core.S - SM3 secure hash using NEON instructions
|
||||
*
|
||||
* Linux/arm64 port of the libgcrypt SM3 implementation for AArch64
|
||||
*
|
||||
* Copyright (C) 2021 Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
* Copyright (c) 2022 Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/cfi_types.h>
|
||||
#include <asm/assembler.h>
|
||||
|
||||
/* Context structure */
|
||||
|
||||
#define state_h0 0
|
||||
#define state_h1 4
|
||||
#define state_h2 8
|
||||
#define state_h3 12
|
||||
#define state_h4 16
|
||||
#define state_h5 20
|
||||
#define state_h6 24
|
||||
#define state_h7 28
|
||||
|
||||
/* Stack structure */
|
||||
|
||||
#define STACK_W_SIZE (32 * 2 * 3)
|
||||
|
||||
#define STACK_W (0)
|
||||
#define STACK_SIZE (STACK_W + STACK_W_SIZE)
|
||||
|
||||
/* Register macros */
|
||||
|
||||
#define RSTATE x0
|
||||
#define RDATA x1
|
||||
#define RNBLKS x2
|
||||
#define RKPTR x28
|
||||
#define RFRAME x29
|
||||
|
||||
#define ra w3
|
||||
#define rb w4
|
||||
#define rc w5
|
||||
#define rd w6
|
||||
#define re w7
|
||||
#define rf w8
|
||||
#define rg w9
|
||||
#define rh w10
|
||||
|
||||
#define t0 w11
|
||||
#define t1 w12
|
||||
#define t2 w13
|
||||
#define t3 w14
|
||||
#define t4 w15
|
||||
#define t5 w16
|
||||
#define t6 w17
|
||||
|
||||
#define k_even w19
|
||||
#define k_odd w20
|
||||
|
||||
#define addr0 x21
|
||||
#define addr1 x22
|
||||
|
||||
#define s0 w23
|
||||
#define s1 w24
|
||||
#define s2 w25
|
||||
#define s3 w26
|
||||
|
||||
#define W0 v0
|
||||
#define W1 v1
|
||||
#define W2 v2
|
||||
#define W3 v3
|
||||
#define W4 v4
|
||||
#define W5 v5
|
||||
|
||||
#define XTMP0 v6
|
||||
#define XTMP1 v7
|
||||
#define XTMP2 v16
|
||||
#define XTMP3 v17
|
||||
#define XTMP4 v18
|
||||
#define XTMP5 v19
|
||||
#define XTMP6 v20
|
||||
|
||||
/* Helper macros. */
|
||||
|
||||
#define _(...) /*_*/
|
||||
|
||||
#define clear_vec(x) \
|
||||
movi x.8h, #0;
|
||||
|
||||
#define rolw(o, a, n) \
|
||||
ror o, a, #(32 - n);
|
||||
|
||||
/* Round function macros. */
|
||||
|
||||
#define GG1_1(x, y, z, o, t) \
|
||||
eor o, x, y;
|
||||
#define GG1_2(x, y, z, o, t) \
|
||||
eor o, o, z;
|
||||
#define GG1_3(x, y, z, o, t)
|
||||
|
||||
#define FF1_1(x, y, z, o, t) GG1_1(x, y, z, o, t)
|
||||
#define FF1_2(x, y, z, o, t)
|
||||
#define FF1_3(x, y, z, o, t) GG1_2(x, y, z, o, t)
|
||||
|
||||
#define GG2_1(x, y, z, o, t) \
|
||||
bic o, z, x;
|
||||
#define GG2_2(x, y, z, o, t) \
|
||||
and t, y, x;
|
||||
#define GG2_3(x, y, z, o, t) \
|
||||
eor o, o, t;
|
||||
|
||||
#define FF2_1(x, y, z, o, t) \
|
||||
eor o, x, y;
|
||||
#define FF2_2(x, y, z, o, t) \
|
||||
and t, x, y; \
|
||||
and o, o, z;
|
||||
#define FF2_3(x, y, z, o, t) \
|
||||
eor o, o, t;
|
||||
|
||||
#define R(i, a, b, c, d, e, f, g, h, k, K_LOAD, round, widx, wtype, IOP, iop_param) \
|
||||
K_LOAD(round); \
|
||||
ldr t5, [sp, #(wtype##_W1_ADDR(round, widx))]; \
|
||||
rolw(t0, a, 12); /* rol(a, 12) => t0 */ \
|
||||
IOP(1, iop_param); \
|
||||
FF##i##_1(a, b, c, t1, t2); \
|
||||
ldr t6, [sp, #(wtype##_W1W2_ADDR(round, widx))]; \
|
||||
add k, k, e; \
|
||||
IOP(2, iop_param); \
|
||||
GG##i##_1(e, f, g, t3, t4); \
|
||||
FF##i##_2(a, b, c, t1, t2); \
|
||||
IOP(3, iop_param); \
|
||||
add k, k, t0; \
|
||||
add h, h, t5; \
|
||||
add d, d, t6; /* w1w2 + d => d */ \
|
||||
IOP(4, iop_param); \
|
||||
rolw(k, k, 7); /* rol (t0 + e + t), 7) => k */ \
|
||||
GG##i##_2(e, f, g, t3, t4); \
|
||||
add h, h, k; /* h + w1 + k => h */ \
|
||||
IOP(5, iop_param); \
|
||||
FF##i##_3(a, b, c, t1, t2); \
|
||||
eor t0, t0, k; /* k ^ t0 => t0 */ \
|
||||
GG##i##_3(e, f, g, t3, t4); \
|
||||
add d, d, t1; /* FF(a,b,c) + d => d */ \
|
||||
IOP(6, iop_param); \
|
||||
add t3, t3, h; /* GG(e,f,g) + h => t3 */ \
|
||||
rolw(b, b, 9); /* rol(b, 9) => b */ \
|
||||
eor h, t3, t3, ror #(32-9); \
|
||||
IOP(7, iop_param); \
|
||||
add d, d, t0; /* t0 + d => d */ \
|
||||
rolw(f, f, 19); /* rol(f, 19) => f */ \
|
||||
IOP(8, iop_param); \
|
||||
eor h, h, t3, ror #(32-17); /* P0(t3) => h */
|
||||
|
||||
#define R1(a, b, c, d, e, f, g, h, k, K_LOAD, round, widx, wtype, IOP, iop_param) \
|
||||
R(1, ##a, ##b, ##c, ##d, ##e, ##f, ##g, ##h, ##k, K_LOAD, round, widx, wtype, IOP, iop_param)
|
||||
|
||||
#define R2(a, b, c, d, e, f, g, h, k, K_LOAD, round, widx, wtype, IOP, iop_param) \
|
||||
R(2, ##a, ##b, ##c, ##d, ##e, ##f, ##g, ##h, ##k, K_LOAD, round, widx, wtype, IOP, iop_param)
|
||||
|
||||
#define KL(round) \
|
||||
ldp k_even, k_odd, [RKPTR, #(4*(round))];
|
||||
|
||||
/* Input expansion macros. */
|
||||
|
||||
/* Byte-swapped input address. */
|
||||
#define IW_W_ADDR(round, widx, offs) \
|
||||
(STACK_W + ((round) / 4) * 64 + (offs) + ((widx) * 4))
|
||||
|
||||
/* Expanded input address. */
|
||||
#define XW_W_ADDR(round, widx, offs) \
|
||||
(STACK_W + ((((round) / 3) - 4) % 2) * 64 + (offs) + ((widx) * 4))
|
||||
|
||||
/* Rounds 1-12, byte-swapped input block addresses. */
|
||||
#define IW_W1_ADDR(round, widx) IW_W_ADDR(round, widx, 32)
|
||||
#define IW_W1W2_ADDR(round, widx) IW_W_ADDR(round, widx, 48)
|
||||
|
||||
/* Rounds 1-12, expanded input block addresses. */
|
||||
#define XW_W1_ADDR(round, widx) XW_W_ADDR(round, widx, 0)
|
||||
#define XW_W1W2_ADDR(round, widx) XW_W_ADDR(round, widx, 16)
|
||||
|
||||
/* Input block loading.
|
||||
* Interleaving within round function needed for in-order CPUs. */
|
||||
#define LOAD_W_VEC_1_1() \
|
||||
add addr0, sp, #IW_W1_ADDR(0, 0);
|
||||
#define LOAD_W_VEC_1_2() \
|
||||
add addr1, sp, #IW_W1_ADDR(4, 0);
|
||||
#define LOAD_W_VEC_1_3() \
|
||||
ld1 {W0.16b}, [RDATA], #16;
|
||||
#define LOAD_W_VEC_1_4() \
|
||||
ld1 {W1.16b}, [RDATA], #16;
|
||||
#define LOAD_W_VEC_1_5() \
|
||||
ld1 {W2.16b}, [RDATA], #16;
|
||||
#define LOAD_W_VEC_1_6() \
|
||||
ld1 {W3.16b}, [RDATA], #16;
|
||||
#define LOAD_W_VEC_1_7() \
|
||||
rev32 XTMP0.16b, W0.16b;
|
||||
#define LOAD_W_VEC_1_8() \
|
||||
rev32 XTMP1.16b, W1.16b;
|
||||
#define LOAD_W_VEC_2_1() \
|
||||
rev32 XTMP2.16b, W2.16b;
|
||||
#define LOAD_W_VEC_2_2() \
|
||||
rev32 XTMP3.16b, W3.16b;
|
||||
#define LOAD_W_VEC_2_3() \
|
||||
eor XTMP4.16b, XTMP1.16b, XTMP0.16b;
|
||||
#define LOAD_W_VEC_2_4() \
|
||||
eor XTMP5.16b, XTMP2.16b, XTMP1.16b;
|
||||
#define LOAD_W_VEC_2_5() \
|
||||
st1 {XTMP0.16b}, [addr0], #16;
|
||||
#define LOAD_W_VEC_2_6() \
|
||||
st1 {XTMP4.16b}, [addr0]; \
|
||||
add addr0, sp, #IW_W1_ADDR(8, 0);
|
||||
#define LOAD_W_VEC_2_7() \
|
||||
eor XTMP6.16b, XTMP3.16b, XTMP2.16b;
|
||||
#define LOAD_W_VEC_2_8() \
|
||||
ext W0.16b, XTMP0.16b, XTMP0.16b, #8; /* W0: xx, w0, xx, xx */
|
||||
#define LOAD_W_VEC_3_1() \
|
||||
mov W2.16b, XTMP1.16b; /* W2: xx, w6, w5, w4 */
|
||||
#define LOAD_W_VEC_3_2() \
|
||||
st1 {XTMP1.16b}, [addr1], #16;
|
||||
#define LOAD_W_VEC_3_3() \
|
||||
st1 {XTMP5.16b}, [addr1]; \
|
||||
ext W1.16b, XTMP0.16b, XTMP0.16b, #4; /* W1: xx, w3, w2, w1 */
|
||||
#define LOAD_W_VEC_3_4() \
|
||||
ext W3.16b, XTMP1.16b, XTMP2.16b, #12; /* W3: xx, w9, w8, w7 */
|
||||
#define LOAD_W_VEC_3_5() \
|
||||
ext W4.16b, XTMP2.16b, XTMP3.16b, #8; /* W4: xx, w12, w11, w10 */
|
||||
#define LOAD_W_VEC_3_6() \
|
||||
st1 {XTMP2.16b}, [addr0], #16;
|
||||
#define LOAD_W_VEC_3_7() \
|
||||
st1 {XTMP6.16b}, [addr0];
|
||||
#define LOAD_W_VEC_3_8() \
|
||||
ext W5.16b, XTMP3.16b, XTMP3.16b, #4; /* W5: xx, w15, w14, w13 */
|
||||
|
||||
#define LOAD_W_VEC_1(iop_num, ...) \
|
||||
LOAD_W_VEC_1_##iop_num()
|
||||
#define LOAD_W_VEC_2(iop_num, ...) \
|
||||
LOAD_W_VEC_2_##iop_num()
|
||||
#define LOAD_W_VEC_3(iop_num, ...) \
|
||||
LOAD_W_VEC_3_##iop_num()
|
||||
|
||||
/* Message scheduling. Note: 3 words per vector register.
|
||||
* Interleaving within round function needed for in-order CPUs. */
|
||||
#define SCHED_W_1_1(round, w0, w1, w2, w3, w4, w5) \
|
||||
/* Load (w[i - 16]) => XTMP0 */ \
|
||||
/* Load (w[i - 13]) => XTMP5 */ \
|
||||
ext XTMP0.16b, w0.16b, w0.16b, #12; /* XTMP0: w0, xx, xx, xx */
|
||||
#define SCHED_W_1_2(round, w0, w1, w2, w3, w4, w5) \
|
||||
ext XTMP5.16b, w1.16b, w1.16b, #12;
|
||||
#define SCHED_W_1_3(round, w0, w1, w2, w3, w4, w5) \
|
||||
ext XTMP0.16b, XTMP0.16b, w1.16b, #12; /* XTMP0: xx, w2, w1, w0 */
|
||||
#define SCHED_W_1_4(round, w0, w1, w2, w3, w4, w5) \
|
||||
ext XTMP5.16b, XTMP5.16b, w2.16b, #12;
|
||||
#define SCHED_W_1_5(round, w0, w1, w2, w3, w4, w5) \
|
||||
/* w[i - 9] == w3 */ \
|
||||
/* W3 ^ XTMP0 => XTMP0 */ \
|
||||
eor XTMP0.16b, XTMP0.16b, w3.16b;
|
||||
#define SCHED_W_1_6(round, w0, w1, w2, w3, w4, w5) \
|
||||
/* w[i - 3] == w5 */ \
|
||||
/* rol(XMM5, 15) ^ XTMP0 => XTMP0 */ \
|
||||
/* rol(XTMP5, 7) => XTMP1 */ \
|
||||
add addr0, sp, #XW_W1_ADDR((round), 0); \
|
||||
shl XTMP2.4s, w5.4s, #15;
|
||||
#define SCHED_W_1_7(round, w0, w1, w2, w3, w4, w5) \
|
||||
shl XTMP1.4s, XTMP5.4s, #7;
|
||||
#define SCHED_W_1_8(round, w0, w1, w2, w3, w4, w5) \
|
||||
sri XTMP2.4s, w5.4s, #(32-15);
|
||||
#define SCHED_W_2_1(round, w0, w1, w2, w3, w4, w5) \
|
||||
sri XTMP1.4s, XTMP5.4s, #(32-7);
|
||||
#define SCHED_W_2_2(round, w0, w1, w2, w3, w4, w5) \
|
||||
eor XTMP0.16b, XTMP0.16b, XTMP2.16b;
|
||||
#define SCHED_W_2_3(round, w0, w1, w2, w3, w4, w5) \
|
||||
/* w[i - 6] == W4 */ \
|
||||
/* W4 ^ XTMP1 => XTMP1 */ \
|
||||
eor XTMP1.16b, XTMP1.16b, w4.16b;
|
||||
#define SCHED_W_2_4(round, w0, w1, w2, w3, w4, w5) \
|
||||
/* P1(XTMP0) ^ XTMP1 => W0 */ \
|
||||
shl XTMP3.4s, XTMP0.4s, #15;
|
||||
#define SCHED_W_2_5(round, w0, w1, w2, w3, w4, w5) \
|
||||
shl XTMP4.4s, XTMP0.4s, #23;
|
||||
#define SCHED_W_2_6(round, w0, w1, w2, w3, w4, w5) \
|
||||
eor w0.16b, XTMP1.16b, XTMP0.16b;
|
||||
#define SCHED_W_2_7(round, w0, w1, w2, w3, w4, w5) \
|
||||
sri XTMP3.4s, XTMP0.4s, #(32-15);
|
||||
#define SCHED_W_2_8(round, w0, w1, w2, w3, w4, w5) \
|
||||
sri XTMP4.4s, XTMP0.4s, #(32-23);
|
||||
#define SCHED_W_3_1(round, w0, w1, w2, w3, w4, w5) \
|
||||
eor w0.16b, w0.16b, XTMP3.16b;
|
||||
#define SCHED_W_3_2(round, w0, w1, w2, w3, w4, w5) \
|
||||
/* Load (w[i - 3]) => XTMP2 */ \
|
||||
ext XTMP2.16b, w4.16b, w4.16b, #12;
|
||||
#define SCHED_W_3_3(round, w0, w1, w2, w3, w4, w5) \
|
||||
eor w0.16b, w0.16b, XTMP4.16b;
|
||||
#define SCHED_W_3_4(round, w0, w1, w2, w3, w4, w5) \
|
||||
ext XTMP2.16b, XTMP2.16b, w5.16b, #12;
|
||||
#define SCHED_W_3_5(round, w0, w1, w2, w3, w4, w5) \
|
||||
/* W1 ^ W2 => XTMP3 */ \
|
||||
eor XTMP3.16b, XTMP2.16b, w0.16b;
|
||||
#define SCHED_W_3_6(round, w0, w1, w2, w3, w4, w5)
|
||||
#define SCHED_W_3_7(round, w0, w1, w2, w3, w4, w5) \
|
||||
st1 {XTMP2.16b-XTMP3.16b}, [addr0];
|
||||
#define SCHED_W_3_8(round, w0, w1, w2, w3, w4, w5)
|
||||
|
||||
#define SCHED_W_W0W1W2W3W4W5_1(iop_num, round) \
|
||||
SCHED_W_1_##iop_num(round, W0, W1, W2, W3, W4, W5)
|
||||
#define SCHED_W_W0W1W2W3W4W5_2(iop_num, round) \
|
||||
SCHED_W_2_##iop_num(round, W0, W1, W2, W3, W4, W5)
|
||||
#define SCHED_W_W0W1W2W3W4W5_3(iop_num, round) \
|
||||
SCHED_W_3_##iop_num(round, W0, W1, W2, W3, W4, W5)
|
||||
|
||||
#define SCHED_W_W1W2W3W4W5W0_1(iop_num, round) \
|
||||
SCHED_W_1_##iop_num(round, W1, W2, W3, W4, W5, W0)
|
||||
#define SCHED_W_W1W2W3W4W5W0_2(iop_num, round) \
|
||||
SCHED_W_2_##iop_num(round, W1, W2, W3, W4, W5, W0)
|
||||
#define SCHED_W_W1W2W3W4W5W0_3(iop_num, round) \
|
||||
SCHED_W_3_##iop_num(round, W1, W2, W3, W4, W5, W0)
|
||||
|
||||
#define SCHED_W_W2W3W4W5W0W1_1(iop_num, round) \
|
||||
SCHED_W_1_##iop_num(round, W2, W3, W4, W5, W0, W1)
|
||||
#define SCHED_W_W2W3W4W5W0W1_2(iop_num, round) \
|
||||
SCHED_W_2_##iop_num(round, W2, W3, W4, W5, W0, W1)
|
||||
#define SCHED_W_W2W3W4W5W0W1_3(iop_num, round) \
|
||||
SCHED_W_3_##iop_num(round, W2, W3, W4, W5, W0, W1)
|
||||
|
||||
#define SCHED_W_W3W4W5W0W1W2_1(iop_num, round) \
|
||||
SCHED_W_1_##iop_num(round, W3, W4, W5, W0, W1, W2)
|
||||
#define SCHED_W_W3W4W5W0W1W2_2(iop_num, round) \
|
||||
SCHED_W_2_##iop_num(round, W3, W4, W5, W0, W1, W2)
|
||||
#define SCHED_W_W3W4W5W0W1W2_3(iop_num, round) \
|
||||
SCHED_W_3_##iop_num(round, W3, W4, W5, W0, W1, W2)
|
||||
|
||||
#define SCHED_W_W4W5W0W1W2W3_1(iop_num, round) \
|
||||
SCHED_W_1_##iop_num(round, W4, W5, W0, W1, W2, W3)
|
||||
#define SCHED_W_W4W5W0W1W2W3_2(iop_num, round) \
|
||||
SCHED_W_2_##iop_num(round, W4, W5, W0, W1, W2, W3)
|
||||
#define SCHED_W_W4W5W0W1W2W3_3(iop_num, round) \
|
||||
SCHED_W_3_##iop_num(round, W4, W5, W0, W1, W2, W3)
|
||||
|
||||
#define SCHED_W_W5W0W1W2W3W4_1(iop_num, round) \
|
||||
SCHED_W_1_##iop_num(round, W5, W0, W1, W2, W3, W4)
|
||||
#define SCHED_W_W5W0W1W2W3W4_2(iop_num, round) \
|
||||
SCHED_W_2_##iop_num(round, W5, W0, W1, W2, W3, W4)
|
||||
#define SCHED_W_W5W0W1W2W3W4_3(iop_num, round) \
|
||||
SCHED_W_3_##iop_num(round, W5, W0, W1, W2, W3, W4)
|
||||
|
||||
|
||||
/*
|
||||
* Transform blocks*64 bytes (blocks*16 32-bit words) at 'src'.
|
||||
*
|
||||
* void sm3_neon_transform(struct sm3_state *sst, u8 const *src,
|
||||
* int blocks)
|
||||
*/
|
||||
.text
|
||||
.align 3
|
||||
SYM_TYPED_FUNC_START(sm3_neon_transform)
|
||||
ldp ra, rb, [RSTATE, #0]
|
||||
ldp rc, rd, [RSTATE, #8]
|
||||
ldp re, rf, [RSTATE, #16]
|
||||
ldp rg, rh, [RSTATE, #24]
|
||||
|
||||
stp x28, x29, [sp, #-16]!
|
||||
stp x19, x20, [sp, #-16]!
|
||||
stp x21, x22, [sp, #-16]!
|
||||
stp x23, x24, [sp, #-16]!
|
||||
stp x25, x26, [sp, #-16]!
|
||||
mov RFRAME, sp
|
||||
|
||||
sub addr0, sp, #STACK_SIZE
|
||||
adr_l RKPTR, .LKtable
|
||||
and sp, addr0, #(~63)
|
||||
|
||||
/* Preload first block. */
|
||||
LOAD_W_VEC_1(1, 0)
|
||||
LOAD_W_VEC_1(2, 0)
|
||||
LOAD_W_VEC_1(3, 0)
|
||||
LOAD_W_VEC_1(4, 0)
|
||||
LOAD_W_VEC_1(5, 0)
|
||||
LOAD_W_VEC_1(6, 0)
|
||||
LOAD_W_VEC_1(7, 0)
|
||||
LOAD_W_VEC_1(8, 0)
|
||||
LOAD_W_VEC_2(1, 0)
|
||||
LOAD_W_VEC_2(2, 0)
|
||||
LOAD_W_VEC_2(3, 0)
|
||||
LOAD_W_VEC_2(4, 0)
|
||||
LOAD_W_VEC_2(5, 0)
|
||||
LOAD_W_VEC_2(6, 0)
|
||||
LOAD_W_VEC_2(7, 0)
|
||||
LOAD_W_VEC_2(8, 0)
|
||||
LOAD_W_VEC_3(1, 0)
|
||||
LOAD_W_VEC_3(2, 0)
|
||||
LOAD_W_VEC_3(3, 0)
|
||||
LOAD_W_VEC_3(4, 0)
|
||||
LOAD_W_VEC_3(5, 0)
|
||||
LOAD_W_VEC_3(6, 0)
|
||||
LOAD_W_VEC_3(7, 0)
|
||||
LOAD_W_VEC_3(8, 0)
|
||||
|
||||
.balign 16
|
||||
.Loop:
|
||||
/* Transform 0-3 */
|
||||
R1(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 0, 0, IW, _, 0)
|
||||
R1(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 1, 1, IW, _, 0)
|
||||
R1(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 2, 2, IW, _, 0)
|
||||
R1(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 3, 3, IW, _, 0)
|
||||
|
||||
/* Transform 4-7 + Precalc 12-14 */
|
||||
R1(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 4, 0, IW, _, 0)
|
||||
R1(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 5, 1, IW, _, 0)
|
||||
R1(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 6, 2, IW, SCHED_W_W0W1W2W3W4W5_1, 12)
|
||||
R1(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 7, 3, IW, SCHED_W_W0W1W2W3W4W5_2, 12)
|
||||
|
||||
/* Transform 8-11 + Precalc 12-17 */
|
||||
R1(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 8, 0, IW, SCHED_W_W0W1W2W3W4W5_3, 12)
|
||||
R1(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 9, 1, IW, SCHED_W_W1W2W3W4W5W0_1, 15)
|
||||
R1(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 10, 2, IW, SCHED_W_W1W2W3W4W5W0_2, 15)
|
||||
R1(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 11, 3, IW, SCHED_W_W1W2W3W4W5W0_3, 15)
|
||||
|
||||
/* Transform 12-14 + Precalc 18-20 */
|
||||
R1(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 12, 0, XW, SCHED_W_W2W3W4W5W0W1_1, 18)
|
||||
R1(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 13, 1, XW, SCHED_W_W2W3W4W5W0W1_2, 18)
|
||||
R1(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 14, 2, XW, SCHED_W_W2W3W4W5W0W1_3, 18)
|
||||
|
||||
/* Transform 15-17 + Precalc 21-23 */
|
||||
R1(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 15, 0, XW, SCHED_W_W3W4W5W0W1W2_1, 21)
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 16, 1, XW, SCHED_W_W3W4W5W0W1W2_2, 21)
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 17, 2, XW, SCHED_W_W3W4W5W0W1W2_3, 21)
|
||||
|
||||
/* Transform 18-20 + Precalc 24-26 */
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 18, 0, XW, SCHED_W_W4W5W0W1W2W3_1, 24)
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 19, 1, XW, SCHED_W_W4W5W0W1W2W3_2, 24)
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 20, 2, XW, SCHED_W_W4W5W0W1W2W3_3, 24)
|
||||
|
||||
/* Transform 21-23 + Precalc 27-29 */
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 21, 0, XW, SCHED_W_W5W0W1W2W3W4_1, 27)
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 22, 1, XW, SCHED_W_W5W0W1W2W3W4_2, 27)
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 23, 2, XW, SCHED_W_W5W0W1W2W3W4_3, 27)
|
||||
|
||||
/* Transform 24-26 + Precalc 30-32 */
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 24, 0, XW, SCHED_W_W0W1W2W3W4W5_1, 30)
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 25, 1, XW, SCHED_W_W0W1W2W3W4W5_2, 30)
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 26, 2, XW, SCHED_W_W0W1W2W3W4W5_3, 30)
|
||||
|
||||
/* Transform 27-29 + Precalc 33-35 */
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 27, 0, XW, SCHED_W_W1W2W3W4W5W0_1, 33)
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 28, 1, XW, SCHED_W_W1W2W3W4W5W0_2, 33)
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 29, 2, XW, SCHED_W_W1W2W3W4W5W0_3, 33)
|
||||
|
||||
/* Transform 30-32 + Precalc 36-38 */
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 30, 0, XW, SCHED_W_W2W3W4W5W0W1_1, 36)
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 31, 1, XW, SCHED_W_W2W3W4W5W0W1_2, 36)
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 32, 2, XW, SCHED_W_W2W3W4W5W0W1_3, 36)
|
||||
|
||||
/* Transform 33-35 + Precalc 39-41 */
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 33, 0, XW, SCHED_W_W3W4W5W0W1W2_1, 39)
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 34, 1, XW, SCHED_W_W3W4W5W0W1W2_2, 39)
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 35, 2, XW, SCHED_W_W3W4W5W0W1W2_3, 39)
|
||||
|
||||
/* Transform 36-38 + Precalc 42-44 */
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 36, 0, XW, SCHED_W_W4W5W0W1W2W3_1, 42)
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 37, 1, XW, SCHED_W_W4W5W0W1W2W3_2, 42)
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 38, 2, XW, SCHED_W_W4W5W0W1W2W3_3, 42)
|
||||
|
||||
/* Transform 39-41 + Precalc 45-47 */
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 39, 0, XW, SCHED_W_W5W0W1W2W3W4_1, 45)
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 40, 1, XW, SCHED_W_W5W0W1W2W3W4_2, 45)
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 41, 2, XW, SCHED_W_W5W0W1W2W3W4_3, 45)
|
||||
|
||||
/* Transform 42-44 + Precalc 48-50 */
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 42, 0, XW, SCHED_W_W0W1W2W3W4W5_1, 48)
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 43, 1, XW, SCHED_W_W0W1W2W3W4W5_2, 48)
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 44, 2, XW, SCHED_W_W0W1W2W3W4W5_3, 48)
|
||||
|
||||
/* Transform 45-47 + Precalc 51-53 */
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 45, 0, XW, SCHED_W_W1W2W3W4W5W0_1, 51)
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 46, 1, XW, SCHED_W_W1W2W3W4W5W0_2, 51)
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 47, 2, XW, SCHED_W_W1W2W3W4W5W0_3, 51)
|
||||
|
||||
/* Transform 48-50 + Precalc 54-56 */
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 48, 0, XW, SCHED_W_W2W3W4W5W0W1_1, 54)
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 49, 1, XW, SCHED_W_W2W3W4W5W0W1_2, 54)
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 50, 2, XW, SCHED_W_W2W3W4W5W0W1_3, 54)
|
||||
|
||||
/* Transform 51-53 + Precalc 57-59 */
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 51, 0, XW, SCHED_W_W3W4W5W0W1W2_1, 57)
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 52, 1, XW, SCHED_W_W3W4W5W0W1W2_2, 57)
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 53, 2, XW, SCHED_W_W3W4W5W0W1W2_3, 57)
|
||||
|
||||
/* Transform 54-56 + Precalc 60-62 */
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 54, 0, XW, SCHED_W_W4W5W0W1W2W3_1, 60)
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 55, 1, XW, SCHED_W_W4W5W0W1W2W3_2, 60)
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 56, 2, XW, SCHED_W_W4W5W0W1W2W3_3, 60)
|
||||
|
||||
/* Transform 57-59 + Precalc 63 */
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 57, 0, XW, SCHED_W_W5W0W1W2W3W4_1, 63)
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 58, 1, XW, SCHED_W_W5W0W1W2W3W4_2, 63)
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 59, 2, XW, SCHED_W_W5W0W1W2W3W4_3, 63)
|
||||
|
||||
/* Transform 60 */
|
||||
R2(ra, rb, rc, rd, re, rf, rg, rh, k_even, KL, 60, 0, XW, _, _)
|
||||
subs RNBLKS, RNBLKS, #1
|
||||
b.eq .Lend
|
||||
|
||||
/* Transform 61-63 + Preload next block */
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 61, 1, XW, LOAD_W_VEC_1, _)
|
||||
ldp s0, s1, [RSTATE, #0]
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 62, 2, XW, LOAD_W_VEC_2, _)
|
||||
ldp s2, s3, [RSTATE, #8]
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 63, 0, XW, LOAD_W_VEC_3, _)
|
||||
|
||||
/* Update the chaining variables. */
|
||||
eor ra, ra, s0
|
||||
eor rb, rb, s1
|
||||
ldp s0, s1, [RSTATE, #16]
|
||||
eor rc, rc, s2
|
||||
ldp k_even, k_odd, [RSTATE, #24]
|
||||
eor rd, rd, s3
|
||||
eor re, re, s0
|
||||
stp ra, rb, [RSTATE, #0]
|
||||
eor rf, rf, s1
|
||||
stp rc, rd, [RSTATE, #8]
|
||||
eor rg, rg, k_even
|
||||
stp re, rf, [RSTATE, #16]
|
||||
eor rh, rh, k_odd
|
||||
stp rg, rh, [RSTATE, #24]
|
||||
b .Loop
|
||||
|
||||
.Lend:
|
||||
/* Transform 61-63 */
|
||||
R2(rd, ra, rb, rc, rh, re, rf, rg, k_odd, _, 61, 1, XW, _, _)
|
||||
ldp s0, s1, [RSTATE, #0]
|
||||
R2(rc, rd, ra, rb, rg, rh, re, rf, k_even, KL, 62, 2, XW, _, _)
|
||||
ldp s2, s3, [RSTATE, #8]
|
||||
R2(rb, rc, rd, ra, rf, rg, rh, re, k_odd, _, 63, 0, XW, _, _)
|
||||
|
||||
/* Update the chaining variables. */
|
||||
eor ra, ra, s0
|
||||
clear_vec(W0)
|
||||
eor rb, rb, s1
|
||||
clear_vec(W1)
|
||||
ldp s0, s1, [RSTATE, #16]
|
||||
clear_vec(W2)
|
||||
eor rc, rc, s2
|
||||
clear_vec(W3)
|
||||
ldp k_even, k_odd, [RSTATE, #24]
|
||||
clear_vec(W4)
|
||||
eor rd, rd, s3
|
||||
clear_vec(W5)
|
||||
eor re, re, s0
|
||||
clear_vec(XTMP0)
|
||||
stp ra, rb, [RSTATE, #0]
|
||||
clear_vec(XTMP1)
|
||||
eor rf, rf, s1
|
||||
clear_vec(XTMP2)
|
||||
stp rc, rd, [RSTATE, #8]
|
||||
clear_vec(XTMP3)
|
||||
eor rg, rg, k_even
|
||||
clear_vec(XTMP4)
|
||||
stp re, rf, [RSTATE, #16]
|
||||
clear_vec(XTMP5)
|
||||
eor rh, rh, k_odd
|
||||
clear_vec(XTMP6)
|
||||
stp rg, rh, [RSTATE, #24]
|
||||
|
||||
/* Clear message expansion area */
|
||||
add addr0, sp, #STACK_W
|
||||
st1 {W0.16b-W3.16b}, [addr0], #64
|
||||
st1 {W0.16b-W3.16b}, [addr0], #64
|
||||
st1 {W0.16b-W3.16b}, [addr0]
|
||||
|
||||
mov sp, RFRAME
|
||||
|
||||
ldp x25, x26, [sp], #16
|
||||
ldp x23, x24, [sp], #16
|
||||
ldp x21, x22, [sp], #16
|
||||
ldp x19, x20, [sp], #16
|
||||
ldp x28, x29, [sp], #16
|
||||
|
||||
ret
|
||||
SYM_FUNC_END(sm3_neon_transform)
|
||||
|
||||
|
||||
.section ".rodata", "a"
|
||||
|
||||
.align 4
|
||||
.LKtable:
|
||||
.long 0x79cc4519, 0xf3988a32, 0xe7311465, 0xce6228cb
|
||||
.long 0x9cc45197, 0x3988a32f, 0x7311465e, 0xe6228cbc
|
||||
.long 0xcc451979, 0x988a32f3, 0x311465e7, 0x6228cbce
|
||||
.long 0xc451979c, 0x88a32f39, 0x11465e73, 0x228cbce6
|
||||
.long 0x9d8a7a87, 0x3b14f50f, 0x7629ea1e, 0xec53d43c
|
||||
.long 0xd8a7a879, 0xb14f50f3, 0x629ea1e7, 0xc53d43ce
|
||||
.long 0x8a7a879d, 0x14f50f3b, 0x29ea1e76, 0x53d43cec
|
||||
.long 0xa7a879d8, 0x4f50f3b1, 0x9ea1e762, 0x3d43cec5
|
||||
.long 0x7a879d8a, 0xf50f3b14, 0xea1e7629, 0xd43cec53
|
||||
.long 0xa879d8a7, 0x50f3b14f, 0xa1e7629e, 0x43cec53d
|
||||
.long 0x879d8a7a, 0x0f3b14f5, 0x1e7629ea, 0x3cec53d4
|
||||
.long 0x79d8a7a8, 0xf3b14f50, 0xe7629ea1, 0xcec53d43
|
||||
.long 0x9d8a7a87, 0x3b14f50f, 0x7629ea1e, 0xec53d43c
|
||||
.long 0xd8a7a879, 0xb14f50f3, 0x629ea1e7, 0xc53d43ce
|
||||
.long 0x8a7a879d, 0x14f50f3b, 0x29ea1e76, 0x53d43cec
|
||||
.long 0xa7a879d8, 0x4f50f3b1, 0x9ea1e762, 0x3d43cec5
|
||||
103
arch/arm64/crypto/sm3-neon-glue.c
Normal file
103
arch/arm64/crypto/sm3-neon-glue.c
Normal file
@@ -0,0 +1,103 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* sm3-neon-glue.c - SM3 secure hash using NEON instructions
|
||||
*
|
||||
* Copyright (C) 2022 Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
|
||||
*/
|
||||
|
||||
#include <asm/neon.h>
|
||||
#include <asm/simd.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <crypto/internal/simd.h>
|
||||
#include <crypto/sm3.h>
|
||||
#include <crypto/sm3_base.h>
|
||||
#include <linux/cpufeature.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
|
||||
asmlinkage void sm3_neon_transform(struct sm3_state *sst, u8 const *src,
|
||||
int blocks);
|
||||
|
||||
static int sm3_neon_update(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int len)
|
||||
{
|
||||
if (!crypto_simd_usable()) {
|
||||
sm3_update(shash_desc_ctx(desc), data, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
kernel_neon_begin();
|
||||
sm3_base_do_update(desc, data, len, sm3_neon_transform);
|
||||
kernel_neon_end();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sm3_neon_final(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
if (!crypto_simd_usable()) {
|
||||
sm3_final(shash_desc_ctx(desc), out);
|
||||
return 0;
|
||||
}
|
||||
|
||||
kernel_neon_begin();
|
||||
sm3_base_do_finalize(desc, sm3_neon_transform);
|
||||
kernel_neon_end();
|
||||
|
||||
return sm3_base_finish(desc, out);
|
||||
}
|
||||
|
||||
static int sm3_neon_finup(struct shash_desc *desc, const u8 *data,
|
||||
unsigned int len, u8 *out)
|
||||
{
|
||||
if (!crypto_simd_usable()) {
|
||||
struct sm3_state *sctx = shash_desc_ctx(desc);
|
||||
|
||||
if (len)
|
||||
sm3_update(sctx, data, len);
|
||||
sm3_final(sctx, out);
|
||||
return 0;
|
||||
}
|
||||
|
||||
kernel_neon_begin();
|
||||
if (len)
|
||||
sm3_base_do_update(desc, data, len, sm3_neon_transform);
|
||||
sm3_base_do_finalize(desc, sm3_neon_transform);
|
||||
kernel_neon_end();
|
||||
|
||||
return sm3_base_finish(desc, out);
|
||||
}
|
||||
|
||||
static struct shash_alg sm3_alg = {
|
||||
.digestsize = SM3_DIGEST_SIZE,
|
||||
.init = sm3_base_init,
|
||||
.update = sm3_neon_update,
|
||||
.final = sm3_neon_final,
|
||||
.finup = sm3_neon_finup,
|
||||
.descsize = sizeof(struct sm3_state),
|
||||
.base.cra_name = "sm3",
|
||||
.base.cra_driver_name = "sm3-neon",
|
||||
.base.cra_blocksize = SM3_BLOCK_SIZE,
|
||||
.base.cra_module = THIS_MODULE,
|
||||
.base.cra_priority = 200,
|
||||
};
|
||||
|
||||
static int __init sm3_neon_init(void)
|
||||
{
|
||||
return crypto_register_shash(&sm3_alg);
|
||||
}
|
||||
|
||||
static void __exit sm3_neon_fini(void)
|
||||
{
|
||||
crypto_unregister_shash(&sm3_alg);
|
||||
}
|
||||
|
||||
module_init(sm3_neon_init);
|
||||
module_exit(sm3_neon_fini);
|
||||
|
||||
MODULE_DESCRIPTION("SM3 secure hash using NEON instructions");
|
||||
MODULE_AUTHOR("Jussi Kivilinna <jussi.kivilinna@iki.fi>");
|
||||
MODULE_AUTHOR("Tianjia Zhang <tianjia.zhang@linux.alibaba.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
@@ -311,13 +311,13 @@ static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc,
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline bool is_ttbr0_addr(unsigned long addr)
|
||||
static __always_inline bool is_ttbr0_addr(unsigned long addr)
|
||||
{
|
||||
/* entry assembly clears tags for TTBR0 addrs */
|
||||
return addr < TASK_SIZE;
|
||||
}
|
||||
|
||||
static inline bool is_ttbr1_addr(unsigned long addr)
|
||||
static __always_inline bool is_ttbr1_addr(unsigned long addr)
|
||||
{
|
||||
/* TTBR1 addresses may have a tag if KASAN_SW_TAGS is in use */
|
||||
return arch_kasan_reset_tag(addr) >= PAGE_OFFSET;
|
||||
|
||||
@@ -366,6 +366,11 @@ static bool is_el1_mte_sync_tag_check_fault(unsigned long esr)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool is_translation_fault(unsigned long esr)
|
||||
{
|
||||
return (esr & ESR_ELx_FSC_TYPE) == ESR_ELx_FSC_FAULT;
|
||||
}
|
||||
|
||||
static void __do_kernel_fault(unsigned long addr, unsigned long esr,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
@@ -400,7 +405,8 @@ static void __do_kernel_fault(unsigned long addr, unsigned long esr,
|
||||
} else if (is_pkvm_stage2_abort(esr)) {
|
||||
msg = "access to hypervisor-protected memory";
|
||||
} else {
|
||||
if (kfence_handle_page_fault(addr, esr & ESR_ELx_WNR, regs))
|
||||
if (is_translation_fault(esr) &&
|
||||
kfence_handle_page_fault(addr, esr & ESR_ELx_WNR, regs))
|
||||
return;
|
||||
|
||||
msg = "paging request";
|
||||
|
||||
@@ -361,6 +361,8 @@ static struct clk clk_periph = {
|
||||
*/
|
||||
int clk_enable(struct clk *clk)
|
||||
{
|
||||
if (!clk)
|
||||
return 0;
|
||||
mutex_lock(&clocks_mutex);
|
||||
clk_enable_unlocked(clk);
|
||||
mutex_unlock(&clocks_mutex);
|
||||
|
||||
@@ -438,7 +438,7 @@
|
||||
ingenic,nemc-tAW = <50>;
|
||||
ingenic,nemc-tSTRV = <100>;
|
||||
|
||||
reset-gpios = <&gpf 12 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpf 12 GPIO_ACTIVE_LOW>;
|
||||
vcc-supply = <ð0_power>;
|
||||
|
||||
interrupt-parent = <&gpe>;
|
||||
|
||||
@@ -211,7 +211,7 @@ union cvmx_helper_link_info __cvmx_helper_board_link_get(int ipd_port)
|
||||
{
|
||||
union cvmx_helper_link_info result;
|
||||
|
||||
WARN(!octeon_is_simulation(),
|
||||
WARN_ONCE(!octeon_is_simulation(),
|
||||
"Using deprecated link status - please update your DT");
|
||||
|
||||
/* Unless we fix it later, all links are defaulted to down */
|
||||
|
||||
@@ -1096,7 +1096,7 @@ union cvmx_helper_link_info cvmx_helper_link_get(int ipd_port)
|
||||
if (index == 0)
|
||||
result = __cvmx_helper_rgmii_link_get(ipd_port);
|
||||
else {
|
||||
WARN(1, "Using deprecated link status - please update your DT");
|
||||
WARN_ONCE(1, "Using deprecated link status - please update your DT");
|
||||
result.s.full_duplex = 1;
|
||||
result.s.link_up = 1;
|
||||
result.s.speed = 1000;
|
||||
|
||||
@@ -75,7 +75,6 @@ ATTRIBUTE_GROUPS(vpe);
|
||||
|
||||
static void vpe_device_release(struct device *cd)
|
||||
{
|
||||
kfree(cd);
|
||||
}
|
||||
|
||||
static struct class vpe_class = {
|
||||
@@ -157,6 +156,7 @@ out_dev:
|
||||
device_del(&vpe_device);
|
||||
|
||||
out_class:
|
||||
put_device(&vpe_device);
|
||||
class_unregister(&vpe_class);
|
||||
|
||||
out_chrdev:
|
||||
@@ -169,7 +169,7 @@ void __exit vpe_module_exit(void)
|
||||
{
|
||||
struct vpe *v, *n;
|
||||
|
||||
device_del(&vpe_device);
|
||||
device_unregister(&vpe_device);
|
||||
class_unregister(&vpe_class);
|
||||
unregister_chrdev(major, VPE_MODULE_NAME);
|
||||
|
||||
|
||||
@@ -313,7 +313,6 @@ ATTRIBUTE_GROUPS(vpe);
|
||||
|
||||
static void vpe_device_release(struct device *cd)
|
||||
{
|
||||
kfree(cd);
|
||||
}
|
||||
|
||||
static struct class vpe_class = {
|
||||
@@ -497,6 +496,7 @@ out_dev:
|
||||
device_del(&vpe_device);
|
||||
|
||||
out_class:
|
||||
put_device(&vpe_device);
|
||||
class_unregister(&vpe_class);
|
||||
|
||||
out_chrdev:
|
||||
@@ -509,7 +509,7 @@ void __exit vpe_module_exit(void)
|
||||
{
|
||||
struct vpe *v, *n;
|
||||
|
||||
device_del(&vpe_device);
|
||||
device_unregister(&vpe_device);
|
||||
class_unregister(&vpe_class);
|
||||
unregister_chrdev(major, VPE_MODULE_NAME);
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/addrspace.h>
|
||||
#include <asm/prom.h>
|
||||
#include <asm/mach-ralink/ralink_regs.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@@ -81,7 +82,8 @@ static int __init plat_of_setup(void)
|
||||
__dt_register_buses(soc_info.compatible, "palmbus");
|
||||
|
||||
/* make sure that the reset controller is setup early */
|
||||
ralink_rst_init();
|
||||
if (ralink_soc != MT762X_SOC_MT7621AT)
|
||||
ralink_rst_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,20 @@
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */
|
||||
<13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/* Local temperature sensor (SA56004ED internal) */
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
label = "board";
|
||||
};
|
||||
|
||||
/* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */
|
||||
channel@1 {
|
||||
reg = <1>;
|
||||
label = "cpu";
|
||||
};
|
||||
};
|
||||
|
||||
/* DDR3 SPD/EEPROM */
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
#define H_NOT_ENOUGH_RESOURCES -44
|
||||
#define H_R_STATE -45
|
||||
#define H_RESCINDED -46
|
||||
#define H_P1 -54
|
||||
#define H_ABORTED -54
|
||||
#define H_P2 -55
|
||||
#define H_P3 -56
|
||||
#define H_P4 -57
|
||||
@@ -100,7 +100,6 @@
|
||||
#define H_COP_HW -74
|
||||
#define H_STATE -75
|
||||
#define H_IN_USE -77
|
||||
#define H_ABORTED -78
|
||||
#define H_UNSUPPORTED_FLAG_START -256
|
||||
#define H_UNSUPPORTED_FLAG_END -511
|
||||
#define H_MULTI_THREADS_ACTIVE -9005
|
||||
|
||||
@@ -61,6 +61,7 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
|
||||
next_sp = fp[0];
|
||||
|
||||
if (next_sp == sp + STACK_INT_FRAME_SIZE &&
|
||||
validate_sp(sp, current, STACK_INT_FRAME_SIZE) &&
|
||||
fp[STACK_FRAME_MARKER] == STACK_FRAME_REGS_MARKER) {
|
||||
/*
|
||||
* This looks like an interrupt frame for an
|
||||
|
||||
@@ -79,6 +79,7 @@ REQUEST(__field(0, 8, partition_id)
|
||||
)
|
||||
#include I(REQUEST_END)
|
||||
|
||||
#ifdef ENABLE_EVENTS_COUNTERINFO_V6
|
||||
/*
|
||||
* Not available for counter_info_version >= 0x8, use
|
||||
* run_instruction_cycles_by_partition(0x100) instead.
|
||||
@@ -92,6 +93,7 @@ REQUEST(__field(0, 8, partition_id)
|
||||
__count(0x10, 8, cycles)
|
||||
)
|
||||
#include I(REQUEST_END)
|
||||
#endif
|
||||
|
||||
#define REQUEST_NAME system_performance_capabilities
|
||||
#define REQUEST_NUM 0x40
|
||||
@@ -103,6 +105,7 @@ REQUEST(__field(0, 1, perf_collect_privileged)
|
||||
)
|
||||
#include I(REQUEST_END)
|
||||
|
||||
#ifdef ENABLE_EVENTS_COUNTERINFO_V6
|
||||
#define REQUEST_NAME processor_bus_utilization_abc_links
|
||||
#define REQUEST_NUM 0x50
|
||||
#define REQUEST_IDX_KIND "hw_chip_id=?"
|
||||
@@ -194,6 +197,7 @@ REQUEST(__field(0, 4, phys_processor_idx)
|
||||
__count(0x28, 8, instructions_completed)
|
||||
)
|
||||
#include I(REQUEST_END)
|
||||
#endif
|
||||
|
||||
/* Processor_core_power_mode (0x95) skipped, no counters */
|
||||
/* Affinity_domain_information_by_virtual_processor (0xA0) skipped,
|
||||
|
||||
@@ -70,9 +70,9 @@ static const struct attribute_group format_group = {
|
||||
.attrs = format_attrs,
|
||||
};
|
||||
|
||||
static const struct attribute_group event_group = {
|
||||
static struct attribute_group event_group = {
|
||||
.name = "events",
|
||||
.attrs = hv_gpci_event_attrs,
|
||||
/* .attrs is set in init */
|
||||
};
|
||||
|
||||
#define HV_CAPS_ATTR(_name, _format) \
|
||||
@@ -330,6 +330,7 @@ static int hv_gpci_init(void)
|
||||
int r;
|
||||
unsigned long hret;
|
||||
struct hv_perf_caps caps;
|
||||
struct hv_gpci_request_buffer *arg;
|
||||
|
||||
hv_gpci_assert_offsets_correct();
|
||||
|
||||
@@ -353,6 +354,36 @@ static int hv_gpci_init(void)
|
||||
/* sampling not supported */
|
||||
h_gpci_pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
|
||||
|
||||
arg = (void *)get_cpu_var(hv_gpci_reqb);
|
||||
memset(arg, 0, HGPCI_REQ_BUFFER_SIZE);
|
||||
|
||||
/*
|
||||
* hcall H_GET_PERF_COUNTER_INFO populates the output
|
||||
* counter_info_version value based on the system hypervisor.
|
||||
* Pass the counter request 0x10 corresponds to request type
|
||||
* 'Dispatch_timebase_by_processor', to get the supported
|
||||
* counter_info_version.
|
||||
*/
|
||||
arg->params.counter_request = cpu_to_be32(0x10);
|
||||
|
||||
r = plpar_hcall_norets(H_GET_PERF_COUNTER_INFO,
|
||||
virt_to_phys(arg), HGPCI_REQ_BUFFER_SIZE);
|
||||
if (r) {
|
||||
pr_devel("hcall failed, can't get supported counter_info_version: 0x%x\n", r);
|
||||
arg->params.counter_info_version_out = 0x8;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use counter_info_version_out value to assign
|
||||
* required hv-gpci event list.
|
||||
*/
|
||||
if (arg->params.counter_info_version_out >= 0x8)
|
||||
event_group.attrs = hv_gpci_event_attrs;
|
||||
else
|
||||
event_group.attrs = hv_gpci_event_attrs_v6;
|
||||
|
||||
put_cpu_var(hv_gpci_reqb);
|
||||
|
||||
r = perf_pmu_register(&h_gpci_pmu, h_gpci_pmu.name, -1);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
@@ -26,6 +26,7 @@ enum {
|
||||
#define REQUEST_FILE "../hv-gpci-requests.h"
|
||||
#define NAME_LOWER hv_gpci
|
||||
#define NAME_UPPER HV_GPCI
|
||||
#define ENABLE_EVENTS_COUNTERINFO_V6
|
||||
#include "req-gen/perf.h"
|
||||
#undef REQUEST_FILE
|
||||
#undef NAME_LOWER
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user