Skip to content

Commit 7bb0db2

Browse files
committed
Merge tag 'samsung-drivers-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers
Samsung SoC drivers for v6.15 1. Add support for Exynos USI v1 serial engines. Drivers already supported newer IP blocks - USI v2 - present in Exynos850 and newer. A bit older ARM64 designs, like Exynos8895 use older USI v1 block. 2. Add Exynos ACPM (Alive Clock and Power Manager) protocol driver for Google GS101 SoC. ACPM protocol allows communication between the power management firmware and other embedded processors. 3. Exynos2200: Add PMU, ChipID and SYSREG Devicetree bindings. 4. Exynos7870: Add PMU and ChipID Devicetree bindings. 5. Various cleanups. * tag 'samsung-drivers-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: soc: samsung: exynos-usi: Drop unnecessary status from example soc: samsung: include linux/array_size.h where needed soc: samsung: exynos-chipid: add support for exynos7870 dt-bindings: soc: samsung: exynos-pmu: add exynos7870-pmu compatible dt-bindings: hwinfo: samsung,exynos-chipid: add exynos7870-chipid compatible soc: samsung: exynos-chipid: add exynos2200 SoC support dt-bindings: hwinfo: samsung,exynos-chipid: add exynos2200 compatible dt-bindings: soc: samsung: exynos-pmu: add exynos2200 compatible dt-bindings: soc: samsung: exynos-sysreg: add sysreg compatibles for exynos2200 firmware: Exynos ACPM: Fix spelling mistake "Faile" -> "Failed" MAINTAINERS: add entry for the Samsung Exynos ACPM mailbox protocol firmware: add Exynos ACPM protocol driver dt-bindings: firmware: add google,gs101-acpm-ipc soc: samsung: usi: implement support for USIv1 and exynos8895 soc: samsung: usi: add a routine for unconfiguring the ip dt-bindings: soc: samsung: usi: add USIv1 and samsung,exynos8895-usi soc: samsung: Use syscon_regmap_lookup_by_phandle_args Link: https://lore.kernel.org/r/20250309185601.10616-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 7789804 + 8f299df commit 7bb0db2

23 files changed

Lines changed: 1359 additions & 57 deletions
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright 2024 Linaro Ltd.
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/firmware/google,gs101-acpm-ipc.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Samsung Exynos ACPM mailbox protocol
9+
10+
maintainers:
11+
- Tudor Ambarus <tudor.ambarus@linaro.org>
12+
13+
description: |
14+
ACPM (Alive Clock and Power Manager) is a firmware that operates on the
15+
APM (Active Power Management) module that handles overall power management
16+
activities. ACPM and masters regard each other as independent hardware
17+
component and communicate with each other using mailbox messages and
18+
shared memory.
19+
20+
This binding is intended to define the interface the firmware implementing
21+
ACPM provides for OSPM in the device tree.
22+
23+
properties:
24+
compatible:
25+
const: google,gs101-acpm-ipc
26+
27+
mboxes:
28+
maxItems: 1
29+
30+
shmem:
31+
description:
32+
List of phandle pointing to the shared memory (SHM) area. The memory
33+
contains channels configuration data and the TX/RX ring buffers that
34+
are used for passing messages to/from the ACPM firmware.
35+
maxItems: 1
36+
37+
required:
38+
- compatible
39+
- mboxes
40+
- shmem
41+
42+
additionalProperties: false
43+
44+
examples:
45+
- |
46+
power-management {
47+
compatible = "google,gs101-acpm-ipc";
48+
mboxes = <&ap2apm_mailbox>;
49+
shmem = <&apm_sram>;
50+
};

Documentation/devicetree/bindings/hwinfo/samsung,exynos-chipid.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ properties:
1919
- enum:
2020
- samsung,exynos5433-chipid
2121
- samsung,exynos7-chipid
22+
- samsung,exynos7870-chipid
2223
- const: samsung,exynos4210-chipid
2324
- items:
2425
- enum:
26+
- samsung,exynos2200-chipid
2527
- samsung,exynos7885-chipid
2628
- samsung,exynos8895-chipid
2729
- samsung,exynos9810-chipid

Documentation/devicetree/bindings/soc/samsung/exynos-pmu.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ properties:
5252
- const: syscon
5353
- items:
5454
- enum:
55+
- samsung,exynos2200-pmu
56+
- samsung,exynos7870-pmu
5557
- samsung,exynos7885-pmu
5658
- samsung,exynos8895-pmu
5759
- samsung,exynos9810-pmu

Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml

Lines changed: 66 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,21 @@ maintainers:
1111
- Krzysztof Kozlowski <krzk@kernel.org>
1212

1313
description: |
14-
USI IP-core provides selectable serial protocol (UART, SPI or High-Speed I2C).
15-
USI shares almost all internal circuits within each protocol, so only one
16-
protocol can be chosen at a time. USI is modeled as a node with zero or more
17-
child nodes, each representing a serial sub-node device. The mode setting
18-
selects which particular function will be used.
14+
The USI IP-core provides configurable support for serial protocols, enabling
15+
different serial communication modes depending on the version.
16+
17+
In USIv1, configurations are available to enable either one or two protocols
18+
simultaneously in select combinations - High-Speed I2C0, High-Speed
19+
I2C1, SPI, UART, High-Speed I2C0 and I2C1 or both High-Speed
20+
I2C1 and UART.
21+
22+
In USIv2, only one protocol can be active at a time, either UART, SPI, or
23+
High-Speed I2C.
24+
25+
The USI core shares internal circuits across protocols, meaning only the
26+
selected configuration is active at any given time. USI is modeled as a node
27+
with zero or more child nodes, each representing a serial sub-node device. The
28+
mode setting selects which particular function will be used.
1929
2030
properties:
2131
$nodename:
@@ -31,6 +41,7 @@ properties:
3141
- const: samsung,exynos850-usi
3242
- enum:
3343
- samsung,exynos850-usi
44+
- samsung,exynos8895-usi
3445

3546
reg:
3647
maxItems: 1
@@ -64,7 +75,7 @@ properties:
6475

6576
samsung,mode:
6677
$ref: /schemas/types.yaml#/definitions/uint32
67-
enum: [0, 1, 2, 3]
78+
enum: [0, 1, 2, 3, 4, 5, 6]
6879
description:
6980
Selects USI function (which serial protocol to use). Refer to
7081
<include/dt-bindings/soc/samsung,exynos-usi.h> for valid USI mode values.
@@ -101,37 +112,59 @@ required:
101112
- samsung,sysreg
102113
- samsung,mode
103114

104-
if:
105-
properties:
106-
compatible:
107-
contains:
108-
enum:
109-
- samsung,exynos850-usi
115+
allOf:
116+
- if:
117+
properties:
118+
compatible:
119+
contains:
120+
enum:
121+
- samsung,exynos850-usi
122+
123+
then:
124+
properties:
125+
reg:
126+
maxItems: 1
127+
128+
clocks:
129+
items:
130+
- description: Bus (APB) clock
131+
- description: Operating clock for UART/SPI/I2C protocol
110132

111-
then:
112-
properties:
113-
reg:
114-
maxItems: 1
133+
clock-names:
134+
maxItems: 2
115135

116-
clocks:
117-
items:
118-
- description: Bus (APB) clock
119-
- description: Operating clock for UART/SPI/I2C protocol
136+
samsung,mode:
137+
enum: [0, 1, 2, 3]
120138

121-
clock-names:
122-
maxItems: 2
139+
required:
140+
- reg
141+
- clocks
142+
- clock-names
123143

124-
required:
125-
- reg
126-
- clocks
127-
- clock-names
144+
- if:
145+
properties:
146+
compatible:
147+
contains:
148+
enum:
149+
- samsung,exynos8895-usi
128150

129-
else:
130-
properties:
131-
reg: false
132-
clocks: false
133-
clock-names: false
134-
samsung,clkreq-on: false
151+
then:
152+
properties:
153+
reg: false
154+
155+
clocks:
156+
items:
157+
- description: Bus (APB) clock
158+
- description: Operating clock for UART/SPI protocol
159+
160+
clock-names:
161+
maxItems: 2
162+
163+
samsung,clkreq-on: false
164+
165+
required:
166+
- clocks
167+
- clock-names
135168

136169
additionalProperties: false
137170

@@ -144,7 +177,7 @@ examples:
144177
compatible = "samsung,exynos850-usi";
145178
reg = <0x138200c0 0x20>;
146179
samsung,sysreg = <&sysreg_peri 0x1010>;
147-
samsung,mode = <USI_V2_UART>;
180+
samsung,mode = <USI_MODE_UART>;
148181
samsung,clkreq-on; /* needed for UART mode */
149182
#address-cells = <1>;
150183
#size-cells = <1>;
@@ -158,7 +191,6 @@ examples:
158191
interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
159192
clocks = <&cmu_peri 32>, <&cmu_peri 31>;
160193
clock-names = "uart", "clk_uart_baud0";
161-
status = "disabled";
162194
};
163195
164196
hsi2c_0: i2c@13820000 {

Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ properties:
1818
- google,gs101-hsi2-sysreg
1919
- google,gs101-peric0-sysreg
2020
- google,gs101-peric1-sysreg
21+
- samsung,exynos2200-cmgp-sysreg
22+
- samsung,exynos2200-peric0-sysreg
23+
- samsung,exynos2200-peric1-sysreg
24+
- samsung,exynos2200-peric2-sysreg
25+
- samsung,exynos2200-ufs-sysreg
2126
- samsung,exynos3-sysreg
2227
- samsung,exynos4-sysreg
2328
- samsung,exynos5-sysreg

MAINTAINERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3069,6 +3069,7 @@ F: drivers/*/*s3c24*
30693069
F: drivers/*/*s3c64xx*
30703070
F: drivers/*/*s5pv210*
30713071
F: drivers/clocksource/samsung_pwm_timer.c
3072+
F: drivers/firmware/samsung/
30723073
F: drivers/mailbox/exynos-mailbox.c
30733074
F: drivers/memory/samsung/
30743075
F: drivers/pwm/pwm-samsung.c
@@ -20944,6 +20945,15 @@ F: arch/arm64/boot/dts/exynos/exynos850*
2094420945
F: drivers/clk/samsung/clk-exynos850.c
2094520946
F: include/dt-bindings/clock/exynos850.h
2094620947

20948+
SAMSUNG EXYNOS ACPM MAILBOX PROTOCOL
20949+
M: Tudor Ambarus <tudor.ambarus@linaro.org>
20950+
L: linux-kernel@vger.kernel.org
20951+
L: linux-samsung-soc@vger.kernel.org
20952+
S: Supported
20953+
F: Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
20954+
F: drivers/firmware/samsung/exynos-acpm*
20955+
F: include/linux/firmware/samsung/exynos-acpm-protocol.h
20956+
2094720957
SAMSUNG EXYNOS MAILBOX DRIVER
2094820958
M: Tudor Ambarus <tudor.ambarus@linaro.org>
2094920959
L: linux-kernel@vger.kernel.org

drivers/firmware/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ source "drivers/firmware/meson/Kconfig"
267267
source "drivers/firmware/microchip/Kconfig"
268268
source "drivers/firmware/psci/Kconfig"
269269
source "drivers/firmware/qcom/Kconfig"
270+
source "drivers/firmware/samsung/Kconfig"
270271
source "drivers/firmware/smccc/Kconfig"
271272
source "drivers/firmware/tegra/Kconfig"
272273
source "drivers/firmware/xilinx/Kconfig"

drivers/firmware/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ obj-y += efi/
3333
obj-y += imx/
3434
obj-y += psci/
3535
obj-y += qcom/
36+
obj-y += samsung/
3637
obj-y += smccc/
3738
obj-y += tegra/
3839
obj-y += xilinx/

drivers/firmware/samsung/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
3+
config EXYNOS_ACPM_PROTOCOL
4+
tristate "Exynos Alive Clock and Power Manager (ACPM) Message Protocol"
5+
depends on ARCH_EXYNOS || COMPILE_TEST
6+
depends on MAILBOX
7+
help
8+
Alive Clock and Power Manager (ACPM) Message Protocol is defined for
9+
the purpose of communication between the ACPM firmware and masters
10+
(AP, AOC, ...). ACPM firmware operates on the Active Power Management
11+
(APM) module that handles overall power activities.
12+
13+
This protocol driver provides interface for all the client drivers
14+
making use of the features offered by the APM.

drivers/firmware/samsung/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
3+
acpm-protocol-objs := exynos-acpm.o exynos-acpm-pmic.o
4+
obj-$(CONFIG_EXYNOS_ACPM_PROTOCOL) += acpm-protocol.o

0 commit comments

Comments
 (0)