openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

portphy.h (1691B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  *
      7  * File:       portphy.h
      8  */
      9 
     10 #ifndef _PORTPHY_H_
     11 #define _PORTPHY_H_
     12 
     13 /* control commands used by firmware_set for ucode broadcast. Internal use only */
     14 /* Command should be executed once. Assume all devices in bcst mode */
     15 #define PHYCTRL_UCODE_BCST_ONEDEV  0x10000
     16 
     17 /* Command is executed on each device. Assume all devices in non-bcst mode */
     18 #define PHYCTRL_UCODE_BCST_ALLDEV  0x20000
     19 
     20 /* setup the broadcast mode for firmware download */
     21 #define PHYCTRL_UCODE_BCST_SETUP   (0 | PHYCTRL_UCODE_BCST_ALLDEV)
     22 
     23 /* Prepare micro-controller ready for firmware broadcast */
     24 #define PHYCTRL_UCODE_BCST_uC_SETUP  (1 | PHYCTRL_UCODE_BCST_ONEDEV)
     25 
     26 /* Re-Enable MDIO broadcast mode */
     27 #define PHYCTRL_UCODE_BCST_ENABLE  (2 | PHYCTRL_UCODE_BCST_ALLDEV)
     28 
     29 /* Load firmware */
     30 #define PHYCTRL_UCODE_BCST_LOAD    (3 | PHYCTRL_UCODE_BCST_ONEDEV)
     31 
     32 /* Load FC firmware */
     33 #define PHYCTRL_UCODE_BCST_LOAD2   (4 | PHYCTRL_UCODE_BCST_ONEDEV)
     34 
     35 /* Verify firmware download */
     36 #define PHYCTRL_UCODE_BCST_END     (5 | PHYCTRL_UCODE_BCST_ALLDEV)
     37 
     38 #define _SHR_PORT_PHY_CLAUSE45_ADDR(_devad, _regad)     \
     39             ((((_devad) & 0x3F) << 16) |                \
     40              ((_regad) & 0xFFFF))
     41 #define SOC_PHY_CLAUSE45_ADDR(_devad, _regad) \
     42             _SHR_PORT_PHY_CLAUSE45_ADDR(_devad, _regad)
     43 
     44 #define PHY_C45_DEV_PMA_PMD     0x01
     45 #define MII_PHY_ID0_REG         0x02    /* MII PHY ID register: r/w */
     46 #define MII_PHY_ID1_REG         0x03    /* MII PHY ID register: r/w */
     47 
     48 #endif /* _PORTPHY_H_ */