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

dt-bindings: convert ata/cortina,gemini-sata-bridge to yaml

This patch converts ata/cortina,gemini-sata-bridge binding to yaml

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220211120157.3385145-1-clabbe@baylibre.com

authored by

Corentin Labbe and committed by
Rob Herring
5d16dcd2 44c75c9e

+109 -55
-55
Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.txt
··· 1 - * Cortina Systems Gemini SATA Bridge 2 - 3 - The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that 4 - takes two Faraday Technology FTIDE010 PATA controllers and bridges 5 - them in different configurations to two SATA ports. 6 - 7 - Required properties: 8 - - compatible: should be 9 - "cortina,gemini-sata-bridge" 10 - - reg: registers and size for the block 11 - - resets: phandles to the reset lines for both SATA bridges 12 - - reset-names: must be "sata0", "sata1" 13 - - clocks: phandles to the compulsory peripheral clocks 14 - - clock-names: must be "SATA0_PCLK", "SATA1_PCLK" 15 - - syscon: a phandle to the global Gemini system controller 16 - - cortina,gemini-ata-muxmode: tell the desired multiplexing mode for 17 - the ATA controller and SATA bridges. Values 0..3: 18 - Mode 0: ata0 master <-> sata0 19 - ata1 master <-> sata1 20 - ata0 slave interface brought out on IDE pads 21 - Mode 1: ata0 master <-> sata0 22 - ata1 master <-> sata1 23 - ata1 slave interface brought out on IDE pads 24 - Mode 2: ata1 master <-> sata1 25 - ata1 slave <-> sata0 26 - ata0 master and slave interfaces brought out 27 - on IDE pads 28 - Mode 3: ata0 master <-> sata0 29 - ata0 slave <-> sata1 30 - ata1 master and slave interfaces brought out 31 - on IDE pads 32 - 33 - Optional boolean properties: 34 - - cortina,gemini-enable-ide-pins: enables the PATA to IDE connection. 35 - The muxmode setting decides whether ATA0 or ATA1 is brought out, 36 - and whether master, slave or both interfaces get brought out. 37 - - cortina,gemini-enable-sata-bridge: enables the PATA to SATA bridge 38 - inside the Gemnini SoC. The Muxmode decides what PATA blocks will 39 - be muxed out and how. 40 - 41 - Example: 42 - 43 - sata: sata@46000000 { 44 - compatible = "cortina,gemini-sata-bridge"; 45 - reg = <0x46000000 0x100>; 46 - resets = <&rcon 26>, <&rcon 27>; 47 - reset-names = "sata0", "sata1"; 48 - clocks = <&gcc GEMINI_CLK_GATE_SATA0>, 49 - <&gcc GEMINI_CLK_GATE_SATA1>; 50 - clock-names = "SATA0_PCLK", "SATA1_PCLK"; 51 - syscon = <&syscon>; 52 - cortina,gemini-ata-muxmode = <3>; 53 - cortina,gemini-enable-ide-pins; 54 - cortina,gemini-enable-sata-bridge; 55 - };
+109
Documentation/devicetree/bindings/ata/cortina,gemini-sata-bridge.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/ata/cortina,gemini-sata-bridge.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Cortina Systems Gemini SATA Bridge 8 + 9 + maintainers: 10 + - Linus Walleij <linus.walleij@linaro.org> 11 + 12 + description: | 13 + The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that 14 + takes two Faraday Technology FTIDE010 PATA controllers and bridges 15 + them in different configurations to two SATA ports. 16 + 17 + properties: 18 + compatible: 19 + const: cortina,gemini-sata-bridge 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + resets: 25 + minItems: 2 26 + maxItems: 2 27 + description: phandles to the reset lines for both SATA bridges 28 + 29 + reset-names: 30 + items: 31 + - const: sata0 32 + - const: sata1 33 + 34 + clocks: 35 + minItems: 2 36 + maxItems: 2 37 + description: phandles to the compulsory peripheral clocks 38 + 39 + clock-names: 40 + items: 41 + - const: SATA0_PCLK 42 + - const: SATA1_PCLK 43 + 44 + syscon: 45 + $ref: /schemas/types.yaml#/definitions/phandle 46 + description: a phandle to the global Gemini system controller 47 + 48 + cortina,gemini-ata-muxmode: 49 + $ref: /schemas/types.yaml#/definitions/uint32 50 + enum: 51 + - 0 52 + - 1 53 + - 2 54 + - 3 55 + description: | 56 + Tell the desired multiplexing mode for the ATA controller and SATA 57 + bridges. 58 + Mode 0: ata0 master <-> sata0 59 + ata1 master <-> sata1 60 + ata0 slave interface brought out on IDE pads 61 + Mode 1: ata0 master <-> sata0 62 + ata1 master <-> sata1 63 + ata1 slave interface brought out on IDE pads 64 + Mode 2: ata1 master <-> sata1 65 + ata1 slave <-> sata0 66 + ata0 master and slave interfaces brought out on IDE pads 67 + Mode 3: ata0 master <-> sata0 68 + ata0 slave <-> sata1 69 + ata1 master and slave interfaces brought out on IDE pads 70 + 71 + cortina,gemini-enable-ide-pins: 72 + type: boolean 73 + description: Enables the PATA to IDE connection. 74 + The muxmode setting decides whether ATA0 or ATA1 is brought out, 75 + and whether master, slave or both interfaces get brought out. 76 + 77 + cortina,gemini-enable-sata-bridge: 78 + type: boolean 79 + description: Enables the PATA to SATA bridge inside the Gemnini SoC. 80 + The Muxmode decides what PATA blocks will be muxed out and how. 81 + 82 + required: 83 + - clocks 84 + - clock-names 85 + - cortina,gemini-ata-muxmode 86 + - resets 87 + - reset-names 88 + - compatible 89 + - reg 90 + - syscon 91 + 92 + additionalProperties: false 93 + 94 + examples: 95 + - | 96 + #include <dt-bindings/clock/cortina,gemini-clock.h> 97 + sata@46000000 { 98 + compatible = "cortina,gemini-sata-bridge"; 99 + reg = <0x46000000 0x100>; 100 + resets = <&rcon 26>, <&rcon 27>; 101 + reset-names = "sata0", "sata1"; 102 + clocks = <&gcc GEMINI_CLK_GATE_SATA0>, 103 + <&gcc GEMINI_CLK_GATE_SATA1>; 104 + clock-names = "SATA0_PCLK", "SATA1_PCLK"; 105 + syscon = <&syscon>; 106 + cortina,gemini-ata-muxmode = <3>; 107 + cortina,gemini-enable-ide-pins; 108 + cortina,gemini-enable-sata-bridge; 109 + };