aboutsummaryrefslogtreecommitdiff
path: root/Bindings/ata/cortina,gemini-sata-bridge.yaml
blob: 21a90975593ba5da09cc7bff5030168132ca0da2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/ata/cortina,gemini-sata-bridge.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cortina Systems Gemini SATA Bridge

maintainers:
  - Linus Walleij <linus.walleij@linaro.org>

description: |
    The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that
    takes two Faraday Technology FTIDE010 PATA controllers and bridges
    them in different configurations to two SATA ports.

properties:
  compatible:
    const: cortina,gemini-sata-bridge

  reg:
    maxItems: 1

  resets:
    minItems: 2
    maxItems: 2
    description: phandles to the reset lines for both SATA bridges

  reset-names:
    items:
      - const: sata0
      - const: sata1

  clocks:
    minItems: 2
    maxItems: 2
    description: phandles to the compulsory peripheral clocks

  clock-names:
    items:
      - const: SATA0_PCLK
      - const: SATA1_PCLK

  syscon:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: a phandle to the global Gemini system controller

  cortina,gemini-ata-muxmode:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum:
      - 0
      - 1
      - 2
      - 3
    description: |
      Tell the desired multiplexing mode for the ATA controller and SATA
      bridges.
      Mode 0: ata0 master <-> sata0
              ata1 master <-> sata1
              ata0 slave interface brought out on IDE pads
      Mode 1: ata0 master <-> sata0
              ata1 master <-> sata1
              ata1 slave interface brought out on IDE pads
      Mode 2: ata1 master <-> sata1
              ata1 slave  <-> sata0
              ata0 master and slave interfaces brought out on IDE pads
      Mode 3: ata0 master <-> sata0
              ata0 slave  <-> sata1
              ata1 master and slave interfaces brought out on IDE pads

  cortina,gemini-enable-ide-pins:
    type: boolean
    description: Enables the PATA to IDE connection.
      The muxmode setting decides whether ATA0 or ATA1 is brought out,
      and whether master, slave or both interfaces get brought out.

  cortina,gemini-enable-sata-bridge:
    type: boolean
    description: Enables the PATA to SATA bridge inside the Gemnini SoC.
      The Muxmode decides what PATA blocks will be muxed out and how.

required:
  - clocks
  - clock-names
  - cortina,gemini-ata-muxmode
  - resets
  - reset-names
  - compatible
  - reg
  - syscon

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/cortina,gemini-clock.h>
    sata@46000000 {
      compatible = "cortina,gemini-sata-bridge";
      reg = <0x46000000 0x100>;
      resets = <&rcon 26>, <&rcon 27>;
      reset-names = "sata0", "sata1";
      clocks = <&gcc GEMINI_CLK_GATE_SATA0>,
               <&gcc GEMINI_CLK_GATE_SATA1>;
      clock-names = "SATA0_PCLK", "SATA1_PCLK";
      syscon = <&syscon>;
      cortina,gemini-ata-muxmode = <3>;
      cortina,gemini-enable-ide-pins;
      cortina,gemini-enable-sata-bridge;
    };