18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 28c2ecf20Sopenharmony_ci# Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ 38c2ecf20Sopenharmony_ci%YAML 1.2 48c2ecf20Sopenharmony_ci--- 58c2ecf20Sopenharmony_ci$id: "http://devicetree.org/schemas/phy/ti,phy-gmii-sel.yaml#" 68c2ecf20Sopenharmony_ci$schema: "http://devicetree.org/meta-schemas/core.yaml#" 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_cititle: CPSW Port's Interface Mode Selection PHY Tree Bindings 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_cimaintainers: 118c2ecf20Sopenharmony_ci - Kishon Vijay Abraham I <kishon@ti.com> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cidescription: | 148c2ecf20Sopenharmony_ci TI am335x/am437x/dra7(am5)/dm814x CPSW3G Ethernet Subsystem supports 158c2ecf20Sopenharmony_ci two 10/100/1000 Ethernet ports with selectable G/MII, RMII, and RGMII interfaces. 168c2ecf20Sopenharmony_ci The interface mode is selected by configuring the MII mode selection register(s) 178c2ecf20Sopenharmony_ci (GMII_SEL) in the System Control Module chapter (SCM). GMII_SEL register(s) and 188c2ecf20Sopenharmony_ci bit fields placement in SCM are different between SoCs while fields meaning 198c2ecf20Sopenharmony_ci is the same. 208c2ecf20Sopenharmony_ci +--------------+ 218c2ecf20Sopenharmony_ci +-------------------------------+ |SCM | 228c2ecf20Sopenharmony_ci | CPSW | | +---------+ | 238c2ecf20Sopenharmony_ci | +--------------------------------+gmii_sel | | 248c2ecf20Sopenharmony_ci | | | | +---------+ | 258c2ecf20Sopenharmony_ci | +----v---+ +--------+ | +--------------+ 268c2ecf20Sopenharmony_ci | |Port 1..<--+-->GMII/MII<-------> 278c2ecf20Sopenharmony_ci | | | | | | | 288c2ecf20Sopenharmony_ci | +--------+ | +--------+ | 298c2ecf20Sopenharmony_ci | | | 308c2ecf20Sopenharmony_ci | | +--------+ | 318c2ecf20Sopenharmony_ci | | | RMII <-------> 328c2ecf20Sopenharmony_ci | +--> | | 338c2ecf20Sopenharmony_ci | | +--------+ | 348c2ecf20Sopenharmony_ci | | | 358c2ecf20Sopenharmony_ci | | +--------+ | 368c2ecf20Sopenharmony_ci | | | RGMII <-------> 378c2ecf20Sopenharmony_ci | +--> | | 388c2ecf20Sopenharmony_ci | +--------+ | 398c2ecf20Sopenharmony_ci +-------------------------------+ 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci CPSW Port's Interface Mode Selection PHY describes MII interface mode between 428c2ecf20Sopenharmony_ci CPSW Port and Ethernet PHY which depends on Eth PHY and board configuration. 438c2ecf20Sopenharmony_ci | 448c2ecf20Sopenharmony_ci CPSW Port's Interface Mode Selection PHY device should defined as child device 458c2ecf20Sopenharmony_ci of SCM node (scm_conf) and can be attached to each CPSW port node using standard 468c2ecf20Sopenharmony_ci PHY bindings. 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ciproperties: 498c2ecf20Sopenharmony_ci compatible: 508c2ecf20Sopenharmony_ci enum: 518c2ecf20Sopenharmony_ci - ti,am3352-phy-gmii-sel 528c2ecf20Sopenharmony_ci - ti,dra7xx-phy-gmii-sel 538c2ecf20Sopenharmony_ci - ti,am43xx-phy-gmii-sel 548c2ecf20Sopenharmony_ci - ti,dm814-phy-gmii-sel 558c2ecf20Sopenharmony_ci - ti,am654-phy-gmii-sel 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci reg: 588c2ecf20Sopenharmony_ci description: Address and length of the register set for the device 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci '#phy-cells': true 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ciallOf: 638c2ecf20Sopenharmony_ci - if: 648c2ecf20Sopenharmony_ci properties: 658c2ecf20Sopenharmony_ci compatible: 668c2ecf20Sopenharmony_ci contains: 678c2ecf20Sopenharmony_ci enum: 688c2ecf20Sopenharmony_ci - ti,dra7xx-phy-gmii-sel 698c2ecf20Sopenharmony_ci - ti,dm814-phy-gmii-sel 708c2ecf20Sopenharmony_ci - ti,am654-phy-gmii-sel 718c2ecf20Sopenharmony_ci then: 728c2ecf20Sopenharmony_ci properties: 738c2ecf20Sopenharmony_ci '#phy-cells': 748c2ecf20Sopenharmony_ci const: 1 758c2ecf20Sopenharmony_ci description: CPSW port number (starting from 1) 768c2ecf20Sopenharmony_ci - if: 778c2ecf20Sopenharmony_ci properties: 788c2ecf20Sopenharmony_ci compatible: 798c2ecf20Sopenharmony_ci contains: 808c2ecf20Sopenharmony_ci enum: 818c2ecf20Sopenharmony_ci - ti,am3352-phy-gmii-sel 828c2ecf20Sopenharmony_ci - ti,am43xx-phy-gmii-sel 838c2ecf20Sopenharmony_ci then: 848c2ecf20Sopenharmony_ci properties: 858c2ecf20Sopenharmony_ci '#phy-cells': 868c2ecf20Sopenharmony_ci const: 2 878c2ecf20Sopenharmony_ci description: | 888c2ecf20Sopenharmony_ci - CPSW port number (starting from 1) 898c2ecf20Sopenharmony_ci - RMII refclk mode 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_cirequired: 928c2ecf20Sopenharmony_ci - compatible 938c2ecf20Sopenharmony_ci - reg 948c2ecf20Sopenharmony_ci - '#phy-cells' 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ciadditionalProperties: false 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ciexamples: 998c2ecf20Sopenharmony_ci - | 1008c2ecf20Sopenharmony_ci phy_gmii_sel: phy-gmii-sel@650 { 1018c2ecf20Sopenharmony_ci compatible = "ti,am3352-phy-gmii-sel"; 1028c2ecf20Sopenharmony_ci reg = <0x650 0x4>; 1038c2ecf20Sopenharmony_ci #phy-cells = <2>; 1048c2ecf20Sopenharmony_ci }; 105