Skip to content

Commit 4078aa6

Browse files
committed
Merge tag 'ata-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata
Pull ata updates from Damien Le Moal: - Print the timeout value for internal command failures due to a timeout (from Tomas) - Improve parameter names in ata_dev_set_feature() to clarify this function use (from Niklas) - Improve the ahci driver low power mode setting initialization to allow more flexibility for the user (from Rafael) - Several patches to remove redundant variables in libata-core, libata-eh and the pata_macio driver and to fix typos in comments (from Jinpeng, Shaomin, Ye) - Some code simplifications and macro renaming (for clarity) in various functions of libata-core (from me) - Add a missing check for a potential failure of sata_scr_read() in sata_print_link_status() (from Li) - Cleanup of libata Kconfig PATA_PLATFORM and PATA_OF_PLATFORM options (from Lukas) - Cleanups of ata dt-bindings and improvements of libahci_platform, ahci and libahci code (from Serge) - New driver for Synopsys AHCI SATA controllers, based of the generic ahci code (from Serge). One compilation warning fix is added for this driver (from me) - Several fixes to macros used to discover a drive capabilities to be consistent with the ACS specifications (from Niklas) - A couple of simplifcations to some libata functions, removing unnecessary arguments (from Niklas) - An improvements to libata-eh code to avoid unnecessary link reset when revalidating a drive after a failed command. In practice, this extra, unneeded reset, reset does not cause any arm beyond slightly slowing down error recovery (from Niklas) * tag 'ata-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: (45 commits) ata: libata-eh: avoid needless hard reset when revalidating link ata: libata: drop superfluous ata_eh_analyze_tf() parameter ata: libata: drop superfluous ata_eh_request_sense() parameter ata: fix ata_id_has_dipm() ata: fix ata_id_has_ncq_autosense() ata: fix ata_id_has_devslp() ata: fix ata_id_sense_reporting_enabled() and ata_id_has_sense_reporting() ata: libata-eh: Remove the unneeded result variable ata: ahci_st: Enable compile test ata: ahci_st: Fix compilation warning MAINTAINERS: Add maintainers for DWC AHCI SATA driver ata: ahci-dwc: Add Baikal-T1 AHCI SATA interface support ata: ahci-dwc: Add platform-specific quirks support dt-bindings: ata: ahci: Add Baikal-T1 AHCI SATA controller DT schema ata: ahci: Add DWC AHCI SATA controller support ata: libahci_platform: Add function returning a clock-handle by id dt-bindings: ata: ahci: Add DWC AHCI SATA controller DT schema ata: ahci: Introduce firmware-specific caps initialization ata: ahci: Convert __ahci_port_base to accepting hpriv as arguments ata: libahci: Don't read AHCI version twice in the save-config method ...
2 parents 9d84bb4 + 71d7b6e commit 4078aa6

33 files changed

+1331
-287
lines changed
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/ata/ahci-common.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Common Properties for Serial ATA AHCI controllers
8+
9+
maintainers:
10+
- Hans de Goede <[email protected]>
11+
- Damien Le Moal <[email protected]>
12+
13+
description:
14+
This document defines device tree properties for a common AHCI SATA
15+
controller implementation. It's hardware interface is supposed to
16+
conform to the technical standard defined by Intel (see Serial ATA
17+
Advanced Host Controller Interface specification for details). The
18+
document doesn't constitute a DT-node binding by itself but merely
19+
defines a set of common properties for the AHCI-compatible devices.
20+
21+
select: false
22+
23+
allOf:
24+
- $ref: sata-common.yaml#
25+
26+
properties:
27+
reg:
28+
description:
29+
Generic AHCI registers space conforming to the Serial ATA AHCI
30+
specification.
31+
32+
reg-names:
33+
description: CSR space IDs
34+
contains:
35+
const: ahci
36+
37+
interrupts:
38+
description:
39+
Generic AHCI state change interrupt. Can be implemented either as a
40+
single line attached to the controller or as a set of the signals
41+
indicating the particular port events.
42+
minItems: 1
43+
maxItems: 32
44+
45+
ahci-supply:
46+
description: Power regulator for AHCI controller
47+
48+
target-supply:
49+
description: Power regulator for SATA target device
50+
51+
phy-supply:
52+
description: Power regulator for SATA PHY
53+
54+
phys:
55+
description: Reference to the SATA PHY node
56+
maxItems: 1
57+
58+
phy-names:
59+
const: sata-phy
60+
61+
hba-cap:
62+
$ref: '/schemas/types.yaml#/definitions/uint32'
63+
description:
64+
Bitfield of the HBA generic platform capabilities like Staggered
65+
Spin-up or Mechanical Presence Switch support. It can be used to
66+
appropriately initialize the HWinit fields of the HBA CAP register
67+
in case if the system firmware hasn't done it.
68+
69+
ports-implemented:
70+
$ref: '/schemas/types.yaml#/definitions/uint32'
71+
description:
72+
Mask that indicates which ports the HBA supports. Useful if PI is not
73+
programmed by the BIOS, which is true for some embedded SoC's.
74+
75+
patternProperties:
76+
"^sata-port@[0-9a-f]+$":
77+
$ref: '#/$defs/ahci-port'
78+
description:
79+
It is optionally possible to describe the ports as sub-nodes so
80+
to enable each port independently when dealing with multiple PHYs.
81+
82+
required:
83+
- reg
84+
- interrupts
85+
86+
additionalProperties: true
87+
88+
$defs:
89+
ahci-port:
90+
$ref: /schemas/ata/sata-common.yaml#/$defs/sata-port
91+
92+
properties:
93+
reg:
94+
description:
95+
AHCI SATA port identifier. By design AHCI controller can't have
96+
more than 32 ports due to the CAP.NP fields and PI register size
97+
constraints.
98+
minimum: 0
99+
maximum: 31
100+
101+
phys:
102+
description: Individual AHCI SATA port PHY
103+
maxItems: 1
104+
105+
phy-names:
106+
description: AHCI SATA port PHY ID
107+
const: sata-phy
108+
109+
target-supply:
110+
description: Power regulator for SATA port target device
111+
112+
hba-port-cap:
113+
$ref: '/schemas/types.yaml#/definitions/uint32'
114+
description:
115+
Bitfield of the HBA port-specific platform capabilities like Hot
116+
plugging, eSATA, FIS-based Switching, etc (see AHCI specification
117+
for details). It can be used to initialize the HWinit fields of
118+
the PxCMD register in case if the system firmware hasn't done it.
119+
120+
required:
121+
- reg
122+
123+
...

Documentation/devicetree/bindings/ata/ahci-platform.yaml

Lines changed: 19 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,11 @@ select:
3030
- marvell,armada-3700-ahci
3131
- marvell,armada-8k-ahci
3232
- marvell,berlin2q-ahci
33-
- snps,dwc-ahci
34-
- snps,spear-ahci
3533
required:
3634
- compatible
3735

3836
allOf:
39-
- $ref: "sata-common.yaml#"
40-
37+
- $ref: "ahci-common.yaml#"
4138

4239
properties:
4340
compatible:
@@ -49,17 +46,11 @@ properties:
4946
- marvell,berlin2-ahci
5047
- marvell,berlin2q-ahci
5148
- const: generic-ahci
52-
- items:
53-
- enum:
54-
- rockchip,rk3568-dwc-ahci
55-
- const: snps,dwc-ahci
5649
- enum:
5750
- cavium,octeon-7130-ahci
5851
- hisilicon,hisi-ahci
5952
- ibm,476gtr-ahci
6053
- marvell,armada-3700-ahci
61-
- snps,dwc-ahci
62-
- snps,spear-ahci
6354

6455
reg:
6556
minItems: 1
@@ -69,92 +60,37 @@ properties:
6960
maxItems: 1
7061

7162
clocks:
72-
description:
73-
Clock IDs array as required by the controller.
7463
minItems: 1
7564
maxItems: 3
7665

7766
clock-names:
78-
description:
79-
Names of clocks corresponding to IDs in the clock property.
8067
minItems: 1
8168
maxItems: 3
8269

8370
interrupts:
8471
maxItems: 1
8572

86-
ahci-supply:
87-
description:
88-
regulator for AHCI controller
89-
90-
dma-coherent: true
91-
92-
phy-supply:
93-
description:
94-
regulator for PHY power
95-
96-
phys:
97-
description:
98-
List of all PHYs on this controller
99-
maxItems: 1
100-
101-
phy-names:
102-
description:
103-
Name specifier for the PHYs
104-
maxItems: 1
105-
106-
ports-implemented:
107-
$ref: '/schemas/types.yaml#/definitions/uint32'
108-
description: |
109-
Mask that indicates which ports that the HBA supports
110-
are available for software to use. Useful if PORTS_IMPL
111-
is not programmed by the BIOS, which is true with
112-
some embedded SoCs.
113-
maximum: 0x1f
114-
11573
power-domains:
11674
maxItems: 1
11775

11876
resets:
11977
maxItems: 1
12078

121-
target-supply:
122-
description:
123-
regulator for SATA target power
124-
125-
required:
126-
- compatible
127-
- reg
128-
- interrupts
129-
13079
patternProperties:
13180
"^sata-port@[0-9a-f]+$":
132-
type: object
133-
additionalProperties: false
134-
description:
135-
Subnode with configuration of the Ports.
136-
137-
properties:
138-
reg:
139-
maxItems: 1
140-
141-
phys:
142-
maxItems: 1
143-
144-
phy-names:
145-
maxItems: 1
146-
147-
target-supply:
148-
description:
149-
regulator for SATA target power
150-
151-
required:
152-
- reg
81+
$ref: /schemas/ata/ahci-common.yaml#/$defs/ahci-port
15382

15483
anyOf:
15584
- required: [ phys ]
15685
- required: [ target-supply ]
15786

87+
unevaluatedProperties: false
88+
89+
required:
90+
- compatible
91+
- reg
92+
- interrupts
93+
15894
unevaluatedProperties: false
15995

16096
examples:
@@ -167,6 +103,8 @@ examples:
167103
- |
168104
#include <dt-bindings/interrupt-controller/arm-gic.h>
169105
#include <dt-bindings/clock/berlin2q.h>
106+
#include <dt-bindings/ata/ahci.h>
107+
170108
sata@f7e90000 {
171109
compatible = "marvell,berlin2q-ahci", "generic-ahci";
172110
reg = <0xf7e90000 0x1000>;
@@ -175,15 +113,23 @@ examples:
175113
#address-cells = <1>;
176114
#size-cells = <0>;
177115
116+
hba-cap = <HBA_SMPS>;
117+
178118
sata0: sata-port@0 {
179119
reg = <0>;
120+
180121
phys = <&sata_phy 0>;
181122
target-supply = <&reg_sata0>;
123+
124+
hba-port-cap = <(HBA_PORT_FBSCP | HBA_PORT_ESP)>;
182125
};
183126
184127
sata1: sata-port@1 {
185128
reg = <1>;
129+
186130
phys = <&sata_phy 1>;
187131
target-supply = <&reg_sata1>;
132+
133+
hba-port-cap = <(HBA_PORT_HPCP | HBA_PORT_MPSP | HBA_PORT_FBSCP)>;
188134
};
189135
};

0 commit comments

Comments
 (0)