| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/net/pcs/renesas,rzn1-miic.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Renesas RZ/N1, RZ/N2H and RZ/T2H MII converter |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Clément Léger <[email protected]> |
| 11 |
- Lad Prabhakar <[email protected]> |
| 12 |
|
| 13 |
description: | |
| 14 |
This MII converter is present on the Renesas RZ/N1, RZ/N2H and RZ/T2H SoC |
| 15 |
families. It is responsible to do MII passthrough or convert it to RMII/RGMII. |
| 16 |
|
| 17 |
properties: |
| 18 |
'#address-cells': |
| 19 |
const: 1 |
| 20 |
|
| 21 |
'#size-cells': |
| 22 |
const: 0 |
| 23 |
|
| 24 |
compatible: |
| 25 |
oneOf: |
| 26 |
- items: |
| 27 |
- enum: |
| 28 |
- renesas,r9a06g032-miic |
| 29 |
- const: renesas,rzn1-miic |
| 30 |
- items: |
| 31 |
- const: renesas,r9a09g077-miic # RZ/T2H |
| 32 |
- items: |
| 33 |
- const: renesas,r9a09g087-miic # RZ/N2H |
| 34 |
- const: renesas,r9a09g077-miic |
| 35 |
|
| 36 |
reg: |
| 37 |
maxItems: 1 |
| 38 |
|
| 39 |
clocks: |
| 40 |
items: |
| 41 |
- description: MII reference clock |
| 42 |
- description: RGMII reference clock |
| 43 |
- description: RMII reference clock |
| 44 |
- description: AHB clock used for the MII converter register interface |
| 45 |
|
| 46 |
clock-names: |
| 47 |
items: |
| 48 |
- const: mii_ref |
| 49 |
- const: rgmii_ref |
| 50 |
- const: rmii_ref |
| 51 |
- const: hclk |
| 52 |
|
| 53 |
resets: |
| 54 |
items: |
| 55 |
- description: Converter register reset |
| 56 |
- description: Converter reset |
| 57 |
|
| 58 |
reset-names: |
| 59 |
items: |
| 60 |
- const: rst |
| 61 |
- const: crst |
| 62 |
|
| 63 |
renesas,miic-switch-portin: |
| 64 |
description: MII Switch PORTIN configuration. This value should use one of |
| 65 |
the values defined in dt-bindings/net/pcs-rzn1-miic.h for RZ/N1 SoC and |
| 66 |
include/dt-bindings/net/renesas,r9a09g077-pcs-miic.h for RZ/N2H, RZ/T2H SoCs. |
| 67 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 68 |
enum: [0, 1, 2] |
| 69 |
|
| 70 |
power-domains: |
| 71 |
maxItems: 1 |
| 72 |
|
| 73 |
patternProperties: |
| 74 |
"^mii-conv@[0-5]$": |
| 75 |
type: object |
| 76 |
description: MII converter port |
| 77 |
|
| 78 |
properties: |
| 79 |
reg: |
| 80 |
description: MII Converter port number. |
| 81 |
enum: [0, 1, 2, 3, 4, 5] |
| 82 |
|
| 83 |
renesas,miic-input: |
| 84 |
description: Converter input port configuration. This value should use |
| 85 |
one of the values defined in dt-bindings/net/pcs-rzn1-miic.h for RZ/N1 SoC |
| 86 |
and include/dt-bindings/net/renesas,r9a09g077-pcs-miic.h for RZ/N2H, RZ/T2H SoCs. |
| 87 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 88 |
|
| 89 |
renesas,miic-phy-link-active-low: |
| 90 |
type: boolean |
| 91 |
description: Indicates that the PHY-link signal provided by the Ethernet switch, |
| 92 |
EtherCAT, or SERCOS3 interface is active low. When present, this property |
| 93 |
sets the corresponding signal polarity to active low. When omitted, the signal |
| 94 |
defaults to active high. |
| 95 |
|
| 96 |
required: |
| 97 |
- reg |
| 98 |
- renesas,miic-input |
| 99 |
|
| 100 |
additionalProperties: false |
| 101 |
|
| 102 |
allOf: |
| 103 |
- if: |
| 104 |
properties: |
| 105 |
compatible: |
| 106 |
contains: |
| 107 |
const: renesas,rzn1-miic |
| 108 |
then: |
| 109 |
properties: |
| 110 |
renesas,miic-switch-portin: |
| 111 |
enum: [1, 2] |
| 112 |
resets: false |
| 113 |
reset-names: false |
| 114 |
patternProperties: |
| 115 |
"^mii-conv@[0-5]$": |
| 116 |
properties: |
| 117 |
reg: |
| 118 |
enum: [1, 2, 3, 4, 5] |
| 119 |
allOf: |
| 120 |
- if: |
| 121 |
properties: |
| 122 |
reg: |
| 123 |
const: 1 |
| 124 |
then: |
| 125 |
properties: |
| 126 |
renesas,miic-input: |
| 127 |
const: 0 |
| 128 |
- if: |
| 129 |
properties: |
| 130 |
reg: |
| 131 |
const: 2 |
| 132 |
then: |
| 133 |
properties: |
| 134 |
renesas,miic-input: |
| 135 |
enum: [1, 11] |
| 136 |
- if: |
| 137 |
properties: |
| 138 |
reg: |
| 139 |
const: 3 |
| 140 |
then: |
| 141 |
properties: |
| 142 |
renesas,miic-input: |
| 143 |
enum: [7, 10] |
| 144 |
- if: |
| 145 |
properties: |
| 146 |
reg: |
| 147 |
const: 4 |
| 148 |
then: |
| 149 |
properties: |
| 150 |
renesas,miic-input: |
| 151 |
enum: [4, 6, 9, 13] |
| 152 |
- if: |
| 153 |
properties: |
| 154 |
reg: |
| 155 |
const: 5 |
| 156 |
then: |
| 157 |
properties: |
| 158 |
renesas,miic-input: |
| 159 |
enum: [3, 5, 8, 12] |
| 160 |
else: |
| 161 |
properties: |
| 162 |
renesas,miic-switch-portin: |
| 163 |
const: 0 |
| 164 |
required: |
| 165 |
- resets |
| 166 |
- reset-names |
| 167 |
patternProperties: |
| 168 |
"^mii-conv@[0-5]$": |
| 169 |
properties: |
| 170 |
reg: |
| 171 |
enum: [0, 1, 2, 3] |
| 172 |
allOf: |
| 173 |
- if: |
| 174 |
properties: |
| 175 |
reg: |
| 176 |
const: 0 |
| 177 |
then: |
| 178 |
properties: |
| 179 |
renesas,miic-input: |
| 180 |
enum: [0, 3, 6] |
| 181 |
- if: |
| 182 |
properties: |
| 183 |
reg: |
| 184 |
const: 1 |
| 185 |
then: |
| 186 |
properties: |
| 187 |
renesas,miic-input: |
| 188 |
enum: [1, 4, 7] |
| 189 |
- if: |
| 190 |
properties: |
| 191 |
reg: |
| 192 |
const: 2 |
| 193 |
then: |
| 194 |
properties: |
| 195 |
renesas,miic-input: |
| 196 |
enum: [2, 5, 8] |
| 197 |
- if: |
| 198 |
properties: |
| 199 |
reg: |
| 200 |
const: 3 |
| 201 |
then: |
| 202 |
properties: |
| 203 |
renesas,miic-input: |
| 204 |
const: 1 |
| 205 |
|
| 206 |
required: |
| 207 |
- '#address-cells' |
| 208 |
- '#size-cells' |
| 209 |
- compatible |
| 210 |
- reg |
| 211 |
- clocks |
| 212 |
- clock-names |
| 213 |
- power-domains |
| 214 |
|
| 215 |
additionalProperties: false |
| 216 |
|
| 217 |
examples: |
| 218 |
- | |
| 219 |
#include <dt-bindings/net/pcs-rzn1-miic.h> |
| 220 |
#include <dt-bindings/clock/r9a06g032-sysctrl.h> |
| 221 |
|
| 222 |
eth-miic@44030000 { |
| 223 |
#address-cells = <1>; |
| 224 |
#size-cells = <0>; |
| 225 |
compatible = "renesas,r9a06g032-miic", "renesas,rzn1-miic"; |
| 226 |
reg = <0x44030000 0x10000>; |
| 227 |
clocks = <&sysctrl R9A06G032_CLK_MII_REF>, |
| 228 |
<&sysctrl R9A06G032_CLK_RGMII_REF>, |
| 229 |
<&sysctrl R9A06G032_CLK_RMII_REF>, |
| 230 |
<&sysctrl R9A06G032_HCLK_SWITCH_RG>; |
| 231 |
clock-names = "mii_ref", "rgmii_ref", "rmii_ref", "hclk"; |
| 232 |
renesas,miic-switch-portin = <MIIC_GMAC2_PORT>; |
| 233 |
power-domains = <&sysctrl>; |
| 234 |
|
| 235 |
mii_conv1: mii-conv@1 { |
| 236 |
renesas,miic-input = <MIIC_GMAC1_PORT>; |
| 237 |
reg = <1>; |
| 238 |
}; |
| 239 |
|
| 240 |
mii_conv2: mii-conv@2 { |
| 241 |
renesas,miic-input = <MIIC_SWITCH_PORTD>; |
| 242 |
reg = <2>; |
| 243 |
}; |
| 244 |
|
| 245 |
mii_conv3: mii-conv@3 { |
| 246 |
renesas,miic-input = <MIIC_SWITCH_PORTC>; |
| 247 |
reg = <3>; |
| 248 |
}; |
| 249 |
|
| 250 |
mii_conv4: mii-conv@4 { |
| 251 |
renesas,miic-input = <MIIC_SWITCH_PORTB>; |
| 252 |
reg = <4>; |
| 253 |
}; |
| 254 |
|
| 255 |
mii_conv5: mii-conv@5 { |
| 256 |
renesas,miic-input = <MIIC_SWITCH_PORTA>; |
| 257 |
reg = <5>; |
| 258 |
}; |
| 259 |
}; |