Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: ata: Convert Allwinner AHCI controller to a schema

The Allwinner SoCs have a AHCI controllers that is supported in Linux, with
a matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
[robh: 'maxItems: 1' for resets]
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Maxime Ripard and committed by
Rob Herring
fe96df93 2609a127

+114 -12
-12
Documentation/devicetree/bindings/ata/ahci-platform.txt
··· 9 9 10 10 Required properties: 11 11 - compatible : compatible string, one of: 12 - - "allwinner,sun4i-a10-ahci" 13 - - "allwinner,sun8i-r40-ahci" 14 12 - "brcm,iproc-ahci" 15 13 - "hisilicon,hisi-ahci" 16 14 - "cavium,octeon-7130-ahci" ··· 43 45 - #address-cells : number of cells to encode an address 44 46 - #size-cells : number of cells representing the size of an address 45 47 46 - For allwinner,sun8i-r40-ahci, the reset property must be present. 47 - 48 48 Sub-nodes required properties: 49 49 - reg : the port number 50 50 And at least one of the following properties: ··· 55 59 reg = <0xffe08000 0x1000>; 56 60 interrupts = <115>; 57 61 }; 58 - 59 - ahci: sata@1c18000 { 60 - compatible = "allwinner,sun4i-a10-ahci"; 61 - reg = <0x01c18000 0x1000>; 62 - interrupts = <56>; 63 - clocks = <&pll6 0>, <&ahb_gates 25>; 64 - target-supply = <&reg_ahci_5v>; 65 - }; 66 62 67 63 With sub-nodes: 68 64 sata@f7e90000 {
+47
Documentation/devicetree/bindings/ata/allwinner,sun4i-a10-ahci.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/ata/allwinner,sun4i-a10-ahci.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner A10 AHCI SATA Controller bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <mripard@kernel.org> 12 + 13 + properties: 14 + compatible: 15 + const: allwinner,sun4i-a10-ahci 16 + 17 + reg: 18 + maxItems: 1 19 + 20 + clocks: 21 + items: 22 + - description: AHCI Bus Clock 23 + - description: AHCI Module Clock 24 + 25 + interrupts: 26 + maxItems: 1 27 + 28 + target-supply: 29 + description: Regulator for SATA target power 30 + 31 + required: 32 + - compatible 33 + - reg 34 + - clocks 35 + - interrupts 36 + 37 + additionalProperties: false 38 + 39 + examples: 40 + - | 41 + ahci: sata@1c18000 { 42 + compatible = "allwinner,sun4i-a10-ahci"; 43 + reg = <0x01c18000 0x1000>; 44 + interrupts = <56>; 45 + clocks = <&pll6 0>, <&ahb_gates 25>; 46 + target-supply = <&reg_ahci_5v>; 47 + };
+67
Documentation/devicetree/bindings/ata/allwinner,sun8i-r40-ahci.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/ata/allwinner,sun8i-r40-ahci.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Allwinner R40 AHCI SATA Controller bindings 8 + 9 + maintainers: 10 + - Chen-Yu Tsai <wens@csie.org> 11 + - Maxime Ripard <mripard@kernel.org> 12 + 13 + properties: 14 + compatible: 15 + const: allwinner,sun8i-r40-ahci 16 + 17 + reg: 18 + maxItems: 1 19 + 20 + clocks: 21 + items: 22 + - description: AHCI Bus Clock 23 + - description: AHCI Module Clock 24 + 25 + interrupts: 26 + maxItems: 1 27 + 28 + resets: 29 + maxItems: 1 30 + 31 + reset-names: 32 + const: ahci 33 + 34 + ahci-supply: 35 + description: Regulator for the AHCI controller 36 + 37 + phy-supply: 38 + description: Regulator for the SATA PHY power 39 + 40 + required: 41 + - compatible 42 + - reg 43 + - clocks 44 + - interrupts 45 + - resets 46 + - reset-names 47 + 48 + additionalProperties: false 49 + 50 + examples: 51 + - | 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + #include <dt-bindings/clock/sun8i-r40-ccu.h> 54 + #include <dt-bindings/reset/sun8i-r40-ccu.h> 55 + 56 + ahci: sata@1c18000 { 57 + compatible = "allwinner,sun8i-r40-ahci"; 58 + reg = <0x01c18000 0x1000>; 59 + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; 60 + clocks = <&ccu CLK_BUS_SATA>, <&ccu CLK_SATA>; 61 + resets = <&ccu RST_BUS_SATA>; 62 + reset-names = "ahci"; 63 + ahci-supply = <&reg_dldo4>; 64 + phy-supply = <&reg_eldo3>; 65 + }; 66 + 67 + ...