Skip to content

Commit 4a624a6

Browse files
committed
Merge: Update UFS to 6.3
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2327 Bugzilla: https://bugzilla.redhat.com/2185234 Tested: Ran through various read/write scenarios on a sa8775p-ride platform with debug kernel Update the UFS subsystem to v6.3. Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Approved-by: Eric Chanudet <echanude@redhat.com> Approved-by: Radu Rendec <rrendec@redhat.com> Signed-off-by: Jan Stancek <jstancek@redhat.com>
2 parents 278f233 + 6834b55 commit 4a624a6

35 files changed

+4839
-1044
lines changed

Documentation/ABI/testing/sysfs-driver-ufs

Lines changed: 172 additions & 0 deletions
Large diffs are not rendered by default.

Documentation/devicetree/bindings/ufs/qcom,ufs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ properties:
3232
- qcom,sm8250-ufshc
3333
- qcom,sm8350-ufshc
3434
- qcom,sm8450-ufshc
35+
- qcom,sm8550-ufshc
3536
- const: qcom,ufshc
3637
- const: jedec,ufs-2.0
3738

@@ -101,6 +102,7 @@ allOf:
101102
- qcom,sm8250-ufshc
102103
- qcom,sm8350-ufshc
103104
- qcom,sm8450-ufshc
105+
- qcom,sm8550-ufshc
104106
then:
105107
properties:
106108
clocks:
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/ufs/renesas,ufs.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Renesas R-Car UFS Host Controller
8+
9+
maintainers:
10+
- Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
11+
12+
allOf:
13+
- $ref: ufs-common.yaml
14+
15+
properties:
16+
compatible:
17+
const: renesas,r8a779f0-ufs
18+
19+
reg:
20+
maxItems: 1
21+
22+
clocks:
23+
maxItems: 2
24+
25+
clock-names:
26+
items:
27+
- const: fck
28+
- const: ref_clk
29+
30+
power-domains:
31+
maxItems: 1
32+
33+
resets:
34+
maxItems: 1
35+
36+
required:
37+
- compatible
38+
- reg
39+
- clocks
40+
- clock-names
41+
- power-domains
42+
- resets
43+
44+
unevaluatedProperties: false
45+
46+
examples:
47+
- |
48+
#include <dt-bindings/clock/r8a779f0-cpg-mssr.h>
49+
#include <dt-bindings/interrupt-controller/arm-gic.h>
50+
#include <dt-bindings/power/r8a779f0-sysc.h>
51+
52+
ufs: ufs@e686000 {
53+
compatible = "renesas,r8a779f0-ufs";
54+
reg = <0xe6860000 0x100>;
55+
interrupts = <GIC_SPI 235 IRQ_TYPE_LEVEL_HIGH>;
56+
clocks = <&cpg CPG_MOD 1514>, <&ufs30_clk>;
57+
clock-names = "fck", "ref_clk";
58+
freq-table-hz = <200000000 200000000>, <38400000 38400000>;
59+
power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
60+
resets = <&cpg 1514>;
61+
};

Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ properties:
2121
- samsung,exynos7-ufs
2222
- samsung,exynosautov9-ufs
2323
- samsung,exynosautov9-ufs-vh
24+
- tesla,fsd-ufs
2425

2526
reg:
2627
items:
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/ufs/sprd,ums9620-ufs.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Unisoc Universal Flash Storage (UFS) Controller
8+
9+
maintainers:
10+
- Zhe Wang <zhe.wang1@unisoc.com>
11+
12+
allOf:
13+
- $ref: ufs-common.yaml
14+
15+
properties:
16+
compatible:
17+
const: sprd,ums9620-ufs
18+
19+
reg:
20+
maxItems: 1
21+
22+
clocks:
23+
maxItems: 3
24+
25+
clock-names:
26+
items:
27+
- const: controller_eb
28+
- const: cfg_eb
29+
- const: core
30+
31+
resets:
32+
maxItems: 2
33+
34+
reset-names:
35+
items:
36+
- const: controller
37+
- const: device
38+
39+
vdd-mphy-supply:
40+
description:
41+
Phandle to vdd-mphy supply regulator node.
42+
43+
sprd,ufs-anlg-syscon:
44+
$ref: /schemas/types.yaml#/definitions/phandle
45+
description: phandle of syscon used to control ufs analog regs.
46+
47+
sprd,aon-apb-syscon:
48+
$ref: /schemas/types.yaml#/definitions/phandle
49+
description: phandle of syscon used to control always-on regs.
50+
51+
required:
52+
- compatible
53+
- reg
54+
- clocks
55+
- clock-names
56+
- resets
57+
- reset-names
58+
59+
unevaluatedProperties: false
60+
61+
examples:
62+
- |
63+
#include <dt-bindings/interrupt-controller/arm-gic.h>
64+
65+
ufs: ufs@22000000 {
66+
compatible = "sprd,ums9620-ufs";
67+
reg = <0x22000000 0x3000>;
68+
interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
69+
vcc-supply = <&vddemmccore>;
70+
vdd-mphy-supply = <&vddufs1v2>;
71+
clocks = <&apahb_gate 5>, <&apahb_gate 22>, <&aonapb_clk 52>;
72+
clock-names = "controller_eb", "cfg_eb", "core";
73+
assigned-clocks = <&aonapb_clk 52>;
74+
assigned-clock-parents = <&g5l_pll 12>;
75+
resets = <&apahb_gate 4>, <&aonapb_gate 69>;
76+
reset-names = "controller", "device";
77+
sprd,ufs-anlg-syscon = <&anlg_phy_g12_regs>;
78+
sprd,aon-apb-syscon = <&aon_apb_regs>;
79+
};

Documentation/scsi/ufs.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Universal Flash Storage
1717
3.2 UTP Transfer requests
1818
3.3 UFS error handling
1919
3.4 SCSI Error handling
20+
4. BSG Support
21+
5. UFS Reference Clock Frequency configuration
2022
2123
2224
1. Overview
@@ -193,3 +195,16 @@ UFS Specifications can be found at:
193195

194196
- UFS - http://www.jedec.org/sites/default/files/docs/JESD220.pdf
195197
- UFSHCI - http://www.jedec.org/sites/default/files/docs/JESD223.pdf
198+
199+
5. UFS Reference Clock Frequency configuration
200+
==============================================
201+
202+
Devicetree can define a clock named "ref_clk" under the UFS controller node
203+
to specify the intended reference clock frequency for the UFS storage
204+
parts. ACPI-based system can specify the frequency using ACPI
205+
Device-Specific Data property named "ref-clk-freq". In both ways the value
206+
is interpreted as frequency in Hz and must match one of the values given in
207+
the UFS specification. UFS subsystem will attempt to read the value when
208+
executing common controller initialization. If the value is available, UFS
209+
subsytem will ensure the bRefClkFreq attribute of the UFS storage device is
210+
set accordingly and will modify it if there is a mismatch.

MAINTAINERS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19443,6 +19443,21 @@ L: linux-mediatek@lists.infradead.org (moderated for non-subscribers)
1944319443
S: Maintained
1944419444
F: drivers/ufs/host/ufs-mediatek*
1944519445

19446+
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER QUALCOMM HOOKS
19447+
M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
19448+
L: linux-arm-msm@vger.kernel.org
19449+
L: linux-scsi@vger.kernel.org
19450+
S: Maintained
19451+
F: Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
19452+
F: drivers/ufs/host/ufs-qcom*
19453+
19454+
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER RENESAS HOOKS
19455+
M: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
19456+
L: linux-renesas-soc@vger.kernel.org
19457+
L: linux-scsi@vger.kernel.org
19458+
S: Maintained
19459+
F: drivers/ufs/host/ufs-renesas.c
19460+
1944619461
UNSORTED BLOCK IMAGES (UBI)
1944719462
M: Richard Weinberger <richard@nod.at>
1944819463
L: linux-mtd@lists.infradead.org

drivers/ufs/core/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22

33
obj-$(CONFIG_SCSI_UFSHCD) += ufshcd-core.o
4-
ufshcd-core-y += ufshcd.o ufs-sysfs.o
4+
ufshcd-core-y += ufshcd.o ufs-sysfs.o ufs-mcq.o
55
ufshcd-core-$(CONFIG_DEBUG_FS) += ufs-debugfs.o
66
ufshcd-core-$(CONFIG_SCSI_UFS_BSG) += ufs_bsg.o
77
ufshcd-core-$(CONFIG_SCSI_UFS_CRYPTO) += ufshcd-crypto.o

0 commit comments

Comments
 (0)