|
| 1 | +# SPDX-License-Identifier: GPL-2.0 |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/ata/ahci-platform.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: AHCI SATA Controller |
| 8 | + |
| 9 | +description: | |
| 10 | + SATA nodes are defined to describe on-chip Serial ATA controllers. |
| 11 | + Each SATA controller should have its own node. |
| 12 | +
|
| 13 | + It is possible, but not required, to represent each port as a sub-node. |
| 14 | + It allows to enable each port independently when dealing with multiple |
| 15 | + PHYs. |
| 16 | +
|
| 17 | +maintainers: |
| 18 | + - Hans de Goede <hdegoede@redhat.com> |
| 19 | + - Jens Axboe <axboe@kernel.dk> |
| 20 | + |
| 21 | +select: |
| 22 | + properties: |
| 23 | + compatible: |
| 24 | + contains: |
| 25 | + enum: |
| 26 | + - brcm,iproc-ahci |
| 27 | + - cavium,octeon-7130-ahci |
| 28 | + - hisilicon,hisi-ahci |
| 29 | + - ibm,476gtr-ahci |
| 30 | + - marvell,armada-3700-ahci |
| 31 | + - marvell,armada-8k-ahci |
| 32 | + - marvell,berlin2q-ahci |
| 33 | + - snps,dwc-ahci |
| 34 | + - snps,spear-ahci |
| 35 | + required: |
| 36 | + - compatible |
| 37 | + |
| 38 | +allOf: |
| 39 | + - $ref: "sata-common.yaml#" |
| 40 | + |
| 41 | + |
| 42 | +properties: |
| 43 | + compatible: |
| 44 | + oneOf: |
| 45 | + - items: |
| 46 | + - enum: |
| 47 | + - brcm,iproc-ahci |
| 48 | + - marvell,armada-8k-ahci |
| 49 | + - marvell,berlin2-ahci |
| 50 | + - marvell,berlin2q-ahci |
| 51 | + - const: generic-ahci |
| 52 | + - enum: |
| 53 | + - cavium,octeon-7130-ahci |
| 54 | + - hisilicon,hisi-ahci |
| 55 | + - ibm,476gtr-ahci |
| 56 | + - marvell,armada-3700-ahci |
| 57 | + - snps,dwc-ahci |
| 58 | + - snps,spear-ahci |
| 59 | + |
| 60 | + reg: |
| 61 | + minItems: 1 |
| 62 | + maxItems: 2 |
| 63 | + |
| 64 | + reg-names: |
| 65 | + maxItems: 1 |
| 66 | + |
| 67 | + clocks: |
| 68 | + description: |
| 69 | + Clock IDs array as required by the controller. |
| 70 | + minItems: 1 |
| 71 | + maxItems: 3 |
| 72 | + |
| 73 | + clock-names: |
| 74 | + description: |
| 75 | + Names of clocks corresponding to IDs in the clock property. |
| 76 | + minItems: 1 |
| 77 | + maxItems: 3 |
| 78 | + |
| 79 | + interrupts: |
| 80 | + maxItems: 1 |
| 81 | + |
| 82 | + ahci-supply: |
| 83 | + description: |
| 84 | + regulator for AHCI controller |
| 85 | + |
| 86 | + dma-coherent: true |
| 87 | + |
| 88 | + phy-supply: |
| 89 | + description: |
| 90 | + regulator for PHY power |
| 91 | + |
| 92 | + phys: |
| 93 | + description: |
| 94 | + List of all PHYs on this controller |
| 95 | + maxItems: 1 |
| 96 | + |
| 97 | + phy-names: |
| 98 | + description: |
| 99 | + Name specifier for the PHYs |
| 100 | + maxItems: 1 |
| 101 | + |
| 102 | + ports-implemented: |
| 103 | + $ref: '/schemas/types.yaml#/definitions/uint32' |
| 104 | + description: | |
| 105 | + Mask that indicates which ports that the HBA supports |
| 106 | + are available for software to use. Useful if PORTS_IMPL |
| 107 | + is not programmed by the BIOS, which is true with |
| 108 | + some embedded SoCs. |
| 109 | + maximum: 0x1f |
| 110 | + |
| 111 | + resets: |
| 112 | + maxItems: 1 |
| 113 | + |
| 114 | + target-supply: |
| 115 | + description: |
| 116 | + regulator for SATA target power |
| 117 | + |
| 118 | +required: |
| 119 | + - compatible |
| 120 | + - reg |
| 121 | + - interrupts |
| 122 | + |
| 123 | +patternProperties: |
| 124 | + "^sata-port@[0-9a-f]+$": |
| 125 | + type: object |
| 126 | + additionalProperties: false |
| 127 | + description: |
| 128 | + Subnode with configuration of the Ports. |
| 129 | + |
| 130 | + properties: |
| 131 | + reg: |
| 132 | + maxItems: 1 |
| 133 | + |
| 134 | + phys: |
| 135 | + maxItems: 1 |
| 136 | + |
| 137 | + phy-names: |
| 138 | + maxItems: 1 |
| 139 | + |
| 140 | + target-supply: |
| 141 | + description: |
| 142 | + regulator for SATA target power |
| 143 | + |
| 144 | + required: |
| 145 | + - reg |
| 146 | + |
| 147 | + anyOf: |
| 148 | + - required: [ phys ] |
| 149 | + - required: [ target-supply ] |
| 150 | + |
| 151 | +unevaluatedProperties: false |
| 152 | + |
| 153 | +examples: |
| 154 | + - | |
| 155 | + sata@ffe08000 { |
| 156 | + compatible = "snps,spear-ahci"; |
| 157 | + reg = <0xffe08000 0x1000>; |
| 158 | + interrupts = <115>; |
| 159 | + }; |
| 160 | + - | |
| 161 | + #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 162 | + #include <dt-bindings/clock/berlin2q.h> |
| 163 | + sata@f7e90000 { |
| 164 | + compatible = "marvell,berlin2q-ahci", "generic-ahci"; |
| 165 | + reg = <0xf7e90000 0x1000>; |
| 166 | + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; |
| 167 | + clocks = <&chip CLKID_SATA>; |
| 168 | + #address-cells = <1>; |
| 169 | + #size-cells = <0>; |
| 170 | +
|
| 171 | + sata0: sata-port@0 { |
| 172 | + reg = <0>; |
| 173 | + phys = <&sata_phy 0>; |
| 174 | + target-supply = <®_sata0>; |
| 175 | + }; |
| 176 | +
|
| 177 | + sata1: sata-port@1 { |
| 178 | + reg = <1>; |
| 179 | + phys = <&sata_phy 1>; |
| 180 | + target-supply = <®_sata1>; |
| 181 | + }; |
| 182 | + }; |
0 commit comments