Ȩsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftargetV/translations/zh_CN/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-supportmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetV/translations/zh_TW/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-supportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetV/translations/it_IT/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-supportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetV/translations/ja_JP/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-supportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetV/translations/ko_KR/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-supportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetV/translations/pt_BR/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-supportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetV/translations/sp_SP/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-supportmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhp/var/lib/git/docbuild/linux/Documentation/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-support.rsthKubh)}(h4This data file has been placed in the public domain.h]h4This data file has been placed in the public domain.}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhho/srv/docbuild/lib/venvs/build-kernel-docs/lib64/python3.9/site-packages/docutils/parsers/rst/include/isonum.txthKubh)}(hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .h]hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubhsubstitution_definition)}(h*.. |amp| unicode:: U+00026 .. AMPERSANDh]h&}hhsbah}(h]h ]h"]ampah$]h&]uh1hhhhKhhhhubh)}(h+.. |apos| unicode:: U+00027 .. APOSTROPHEh]h'}hhsbah}(h]h ]h"]aposah$]h&]uh1hhhhKhhhhubh)}(h).. |ast| unicode:: U+0002A .. ASTERISKh]h*}hjsbah}(h]h ]h"]astah$]h&]uh1hhhhK hhhhubh)}(h+.. |brvbar| unicode:: U+000A6 .. BROKEN BARh]h¦}hjsbah}(h]h ]h"]brvbarah$]h&]uh1hhhhK hhhhubh)}(h0.. |bsol| unicode:: U+0005C .. REVERSE SOLIDUSh]h\}hj#sbah}(h]h ]h"]bsolah$]h&]uh1hhhhK hhhhubh)}(h*.. |cent| unicode:: U+000A2 .. CENT SIGNh]h¢}hj2sbah}(h]h ]h"]centah$]h&]uh1hhhhK hhhhubh)}(h&.. |colon| unicode:: U+0003A .. COLONh]h:}hjAsbah}(h]h ]h"]colonah$]h&]uh1hhhhK hhhhubh)}(h&.. |comma| unicode:: U+0002C .. COMMAh]h,}hjPsbah}(h]h ]h"]commaah$]h&]uh1hhhhKhhhhubh)}(h... |commat| unicode:: U+00040 .. COMMERCIAL ATh]h@}hj_sbah}(h]h ]h"]commatah$]h&]uh1hhhhKhhhhubh)}(h/.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGNh]h©}hjnsbah}(h]h ]h"]copyah$]h&]uh1hhhhKhhhhubh)}(h... |curren| unicode:: U+000A4 .. CURRENCY SIGNh]h¤}hj}sbah}(h]h ]h"]currenah$]h&]uh1hhhhKhhhhubh)}(h0.. |darr| unicode:: U+02193 .. DOWNWARDS ARROWh]h↓}hjsbah}(h]h ]h"]darrah$]h&]uh1hhhhKhhhhubh)}(h,.. |deg| unicode:: U+000B0 .. DEGREE SIGNh]h°}hjsbah}(h]h ]h"]degah$]h&]uh1hhhhKhhhhubh)}(h... |divide| unicode:: U+000F7 .. DIVISION SIGNh]h÷}hjsbah}(h]h ]h"]divideah$]h&]uh1hhhhKhhhhubh)}(h,.. |dollar| unicode:: U+00024 .. DOLLAR SIGNh]h$}hjsbah}(h]h ]h"]dollarah$]h&]uh1hhhhKhhhhubh)}(h,.. |equals| unicode:: U+0003D .. EQUALS SIGNh]h=}hjsbah}(h]h ]h"]equalsah$]h&]uh1hhhhKhhhhubh)}(h1.. |excl| unicode:: U+00021 .. EXCLAMATION MARKh]h!}hjsbah}(h]h ]h"]exclah$]h&]uh1hhhhKhhhhubh)}(h9.. |frac12| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hjsbah}(h]h ]h"]frac12ah$]h&]uh1hhhhKhhhhubh)}(h<.. |frac14| unicode:: U+000BC .. VULGAR FRACTION ONE QUARTERh]h¼}hjsbah}(h]h ]h"]frac14ah$]h&]uh1hhhhKhhhhubh)}(h;.. |frac18| unicode:: U+0215B .. VULGAR FRACTION ONE EIGHTHh]h⅛}hjsbah}(h]h ]h"]frac18ah$]h&]uh1hhhhKhhhhubh)}(h?.. |frac34| unicode:: U+000BE .. VULGAR FRACTION THREE QUARTERSh]h¾}hjsbah}(h]h ]h"]frac34ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac38| unicode:: U+0215C .. VULGAR FRACTION THREE EIGHTHSh]h⅜}hj"sbah}(h]h ]h"]frac38ah$]h&]uh1hhhhKhhhhubh)}(h=.. |frac58| unicode:: U+0215D .. VULGAR FRACTION FIVE EIGHTHSh]h⅝}hj1sbah}(h]h ]h"]frac58ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac78| unicode:: U+0215E .. VULGAR FRACTION SEVEN EIGHTHSh]h⅞}hj@sbah}(h]h ]h"]frac78ah$]h&]uh1hhhhKhhhhubh)}(h2.. |gt| unicode:: U+0003E .. GREATER-THAN SIGNh]h>}hjOsbah}(h]h ]h"]gtah$]h&]uh1hhhhKhhhhubh)}(h9.. |half| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hj^sbah}(h]h ]h"]halfah$]h&]uh1hhhhK hhhhubh)}(h/.. |horbar| unicode:: U+02015 .. HORIZONTAL BARh]h―}hjmsbah}(h]h ]h"]horbarah$]h&]uh1hhhhK!hhhhubh)}(h'.. |hyphen| unicode:: U+02010 .. HYPHENh]h‐}hj|sbah}(h]h ]h"]hyphenah$]h&]uh1hhhhK"hhhhubh)}(h:.. |iexcl| unicode:: U+000A1 .. INVERTED EXCLAMATION MARKh]h¡}hjsbah}(h]h ]h"]iexclah$]h&]uh1hhhhK#hhhhubh)}(h7.. |iquest| unicode:: U+000BF .. INVERTED QUESTION MARKh]h¿}hjsbah}(h]h ]h"]iquestah$]h&]uh1hhhhK$hhhhubh)}(hJ.. |laquo| unicode:: U+000AB .. LEFT-POINTING DOUBLE ANGLE QUOTATION MARKh]h«}hjsbah}(h]h ]h"]laquoah$]h&]uh1hhhhK%hhhhubh)}(h0.. |larr| unicode:: U+02190 .. LEFTWARDS ARROWh]h←}hjsbah}(h]h ]h"]larrah$]h&]uh1hhhhK&hhhhubh)}(h3.. |lcub| unicode:: U+0007B .. LEFT CURLY BRACKETh]h{}hjsbah}(h]h ]h"]lcubah$]h&]uh1hhhhK'hhhhubh)}(h;.. |ldquo| unicode:: U+0201C .. LEFT DOUBLE QUOTATION MARKh]h“}hjsbah}(h]h ]h"]ldquoah$]h&]uh1hhhhK(hhhhubh)}(h).. |lowbar| unicode:: U+0005F .. LOW LINEh]h_}hjsbah}(h]h ]h"]lowbarah$]h&]uh1hhhhK)hhhhubh)}(h1.. |lpar| unicode:: U+00028 .. LEFT PARENTHESISh]h(}hjsbah}(h]h ]h"]lparah$]h&]uh1hhhhK*hhhhubh)}(h4.. |lsqb| unicode:: U+0005B .. LEFT SQUARE BRACKETh]h[}hjsbah}(h]h ]h"]lsqbah$]h&]uh1hhhhK+hhhhubh)}(h;.. |lsquo| unicode:: U+02018 .. LEFT SINGLE QUOTATION MARKh]h‘}hjsbah}(h]h ]h"]lsquoah$]h&]uh1hhhhK,hhhhubh)}(h/.. |lt| unicode:: U+0003C .. LESS-THAN SIGNh]h<}hj!sbah}(h]h ]h"]ltah$]h&]uh1hhhhK-hhhhubh)}(h+.. |micro| unicode:: U+000B5 .. MICRO SIGNh]hµ}hj0sbah}(h]h ]h"]microah$]h&]uh1hhhhK.hhhhubh)}(h+.. |middot| unicode:: U+000B7 .. MIDDLE DOTh]h·}hj?sbah}(h]h ]h"]middotah$]h&]uh1hhhhK/hhhhubh)}(h/.. |nbsp| unicode:: U+000A0 .. NO-BREAK SPACEh]h }hjNsbah}(h]h ]h"]nbspah$]h&]uh1hhhhK0hhhhubh)}(h).. |not| unicode:: U+000AC .. NOT SIGNh]h¬}hj]sbah}(h]h ]h"]notah$]h&]uh1hhhhK1hhhhubh)}(h,.. |num| unicode:: U+00023 .. NUMBER SIGNh]h#}hjlsbah}(h]h ]h"]numah$]h&]uh1hhhhK2hhhhubh)}(h).. |ohm| unicode:: U+02126 .. OHM SIGNh]hΩ}hj{sbah}(h]h ]h"]ohmah$]h&]uh1hhhhK3hhhhubh)}(h;.. |ordf| unicode:: U+000AA .. FEMININE ORDINAL INDICATORh]hª}hjsbah}(h]h ]h"]ordfah$]h&]uh1hhhhK4hhhhubh)}(h<.. |ordm| unicode:: U+000BA .. MASCULINE ORDINAL INDICATORh]hº}hjsbah}(h]h ]h"]ordmah$]h&]uh1hhhhK5hhhhubh)}(h-.. |para| unicode:: U+000B6 .. PILCROW SIGNh]h¶}hjsbah}(h]h ]h"]paraah$]h&]uh1hhhhK6hhhhubh)}(h-.. |percnt| unicode:: U+00025 .. PERCENT SIGNh]h%}hjsbah}(h]h ]h"]percntah$]h&]uh1hhhhK7hhhhubh)}(h*.. |period| unicode:: U+0002E .. FULL STOPh]h.}hjsbah}(h]h ]h"]periodah$]h&]uh1hhhhK8hhhhubh)}(h*.. |plus| unicode:: U+0002B .. PLUS SIGNh]h+}hjsbah}(h]h ]h"]plusah$]h&]uh1hhhhK9hhhhubh)}(h0.. |plusmn| unicode:: U+000B1 .. PLUS-MINUS SIGNh]h±}hjsbah}(h]h ]h"]plusmnah$]h&]uh1hhhhK:hhhhubh)}(h+.. |pound| unicode:: U+000A3 .. POUND SIGNh]h£}hjsbah}(h]h ]h"]poundah$]h&]uh1hhhhK;hhhhubh)}(h... |quest| unicode:: U+0003F .. QUESTION MARKh]h?}hjsbah}(h]h ]h"]questah$]h&]uh1hhhhKhhhhubh)}(h1.. |rarr| unicode:: U+02192 .. RIGHTWARDS ARROWh]h→}hj/sbah}(h]h ]h"]rarrah$]h&]uh1hhhhK?hhhhubh)}(h4.. |rcub| unicode:: U+0007D .. RIGHT CURLY BRACKETh]h}}hj>sbah}(h]h ]h"]rcubah$]h&]uh1hhhhK@hhhhubh)}(h<.. |rdquo| unicode:: U+0201D .. RIGHT DOUBLE QUOTATION MARKh]h”}hjMsbah}(h]h ]h"]rdquoah$]h&]uh1hhhhKAhhhhubh)}(h0.. |reg| unicode:: U+000AE .. REGISTERED SIGNh]h®}hj\sbah}(h]h ]h"]regah$]h&]uh1hhhhKBhhhhubh)}(h2.. |rpar| unicode:: U+00029 .. RIGHT PARENTHESISh]h)}hjksbah}(h]h ]h"]rparah$]h&]uh1hhhhKChhhhubh)}(h5.. |rsqb| unicode:: U+0005D .. RIGHT SQUARE BRACKETh]h]}hjzsbah}(h]h ]h"]rsqbah$]h&]uh1hhhhKDhhhhubh)}(h<.. |rsquo| unicode:: U+02019 .. RIGHT SINGLE QUOTATION MARKh]h’}hjsbah}(h]h ]h"]rsquoah$]h&]uh1hhhhKEhhhhubh)}(h-.. |sect| unicode:: U+000A7 .. SECTION SIGNh]h§}hjsbah}(h]h ]h"]sectah$]h&]uh1hhhhKFhhhhubh)}(h*.. |semi| unicode:: U+0003B .. SEMICOLONh]h;}hjsbah}(h]h ]h"]semiah$]h&]uh1hhhhKGhhhhubh)}(h,.. |shy| unicode:: U+000AD .. SOFT HYPHENh]h­}hjsbah}(h]h ]h"]shyah$]h&]uh1hhhhKHhhhhubh)}(h(.. |sol| unicode:: U+0002F .. SOLIDUSh]h/}hjsbah}(h]h ]h"]solah$]h&]uh1hhhhKIhhhhubh)}(h,.. |sung| unicode:: U+0266A .. EIGHTH NOTEh]h♪}hjsbah}(h]h ]h"]sungah$]h&]uh1hhhhKJhhhhubh)}(h0.. |sup1| unicode:: U+000B9 .. SUPERSCRIPT ONEh]h¹}hjsbah}(h]h ]h"]sup1ah$]h&]uh1hhhhKKhhhhubh)}(h0.. |sup2| unicode:: U+000B2 .. SUPERSCRIPT TWOh]h²}hjsbah}(h]h ]h"]sup2ah$]h&]uh1hhhhKLhhhhubh)}(h2.. |sup3| unicode:: U+000B3 .. SUPERSCRIPT THREEh]h³}hjsbah}(h]h ]h"]sup3ah$]h&]uh1hhhhKMhhhhubh)}(h4.. |times| unicode:: U+000D7 .. MULTIPLICATION SIGNh]h×}hjsbah}(h]h ]h"]timesah$]h&]uh1hhhhKNhhhhubh)}(h0.. |trade| unicode:: U+02122 .. TRADE MARK SIGNh]h™}hjsbah}(h]h ]h"]tradeah$]h&]uh1hhhhKOhhhhubh)}(h... |uarr| unicode:: U+02191 .. UPWARDS ARROWh]h↑}hj.sbah}(h]h ]h"]uarrah$]h&]uh1hhhhKPhhhhubh)}(h... |verbar| unicode:: U+0007C .. VERTICAL LINEh]h|}hj=sbah}(h]h ]h"]verbarah$]h&]uh1hhhhKQhhhhubh)}(h*.. |yen| unicode:: U+000A5 .. YEN SIGN h]h¥}hjLsbah}(h]h ]h"]yenah$]h&]uh1hhhhKRhhhhubhsection)}(hhh](htitle)}(hDPAA2 MAC / PHY supporth]hDPAA2 MAC / PHY support}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj]hhhhhKubh field_list)}(hhh]hfield)}(hhh](h field_name)}(h Copyrighth]h Copyright}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjwhhhKubh field_body)}(h|copy| 2019 NXP h]h paragraph)}(h|copy| 2019 NXPh](h©}(hjhhhNhNubh 2019 NXP}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]uh1juhhhKhjrhhubah}(h]h ]h"]h$]h&]uh1jphj]hhhhhKubj\)}(hhh](ja)}(hOverviewh]hOverview}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjhhhhhK ubj)}(hThe DPAA2 MAC / PHY support consists of a set of APIs that help DPAA2 network drivers (dpaa2-eth, dpaa2-ethsw) interact with the PHY library.h]hThe DPAA2 MAC / PHY support consists of a set of APIs that help DPAA2 network drivers (dpaa2-eth, dpaa2-ethsw) interact with the PHY library.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK hjhhubeh}(h]overviewah ]h"]overviewah$]h&]uh1j[hj]hhhhhK ubj\)}(hhh](ja)}(hDPAA2 Software Architectureh]hDPAA2 Software Architecture}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjhhhhhKubj)}(hAmong other DPAA2 objects, the fsl-mc bus exports DPNI objects (abstracting a network interface) and DPMAC objects (abstracting a MAC). The dpaa2-eth driver probes on the DPNI object and connects to and configures a DPMAC object with the help of phylink.h]hAmong other DPAA2 objects, the fsl-mc bus exports DPNI objects (abstracting a network interface) and DPMAC objects (abstracting a MAC). The dpaa2-eth driver probes on the DPNI object and connects to and configures a DPMAC object with the help of phylink.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hData connections may be established between a DPNI and a DPMAC, or between two DPNIs. Depending on the connection type, the netif_carrier_[on/off] is handled directly by the dpaa2-eth driver or by phylink.h]hData connections may be established between a DPNI and a DPMAC, or between two DPNIs. Depending on the connection type, the netif_carrier_[on/off] is handled directly by the dpaa2-eth driver or by phylink.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh literal_block)}(hXSources of abstracted link state information presented by the MC firmware +--------------------------------------+ +------------+ +---------+ | xgmac_mdio | | net_device | | phylink |--| +-----+ +-----+ +-----+ +-----+ | +------------+ +---------+ | | PHY | | PHY | | PHY | | PHY | | | | | +-----+ +-----+ +-----+ +-----+ | +------------------------------------+ | External MDIO bus | | dpaa2-eth | +--------------------------------------+ +------------------------------------+ | | Linux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | MC firmware | /| V +----------+ / | +----------+ | | / | | | | | | | | | | DPNI |<------| |<------| DPMAC | | | | | | | | | \ |<---+ | | +----------+ \ | | +----------+ \| | | +--------------------------------------+ | MC firmware polling MAC PCS for link | | +-----+ +-----+ +-----+ +-----+ | | | PCS | | PCS | | PCS | | PCS | | | +-----+ +-----+ +-----+ +-----+ | | Internal MDIO bus | +--------------------------------------+h]hXSources of abstracted link state information presented by the MC firmware +--------------------------------------+ +------------+ +---------+ | xgmac_mdio | | net_device | | phylink |--| +-----+ +-----+ +-----+ +-----+ | +------------+ +---------+ | | PHY | | PHY | | PHY | | PHY | | | | | +-----+ +-----+ +-----+ +-----+ | +------------------------------------+ | External MDIO bus | | dpaa2-eth | +--------------------------------------+ +------------------------------------+ | | Linux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | MC firmware | /| V +----------+ / | +----------+ | | / | | | | | | | | | | DPNI |<------| |<------| DPMAC | | | | | | | | | \ |<---+ | | +----------+ \ | | +----------+ \| | | +--------------------------------------+ | MC firmware polling MAC PCS for link | | +-----+ +-----+ +-----+ +-----+ | | | PCS | | PCS | | PCS | | PCS | | | +-----+ +-----+ +-----+ +-----+ | | Internal MDIO bus | +--------------------------------------+}hj sbah}(h]h ]h"]h$]h&]hhƌforcelanguagenonehighlight_args}uh1j hhhKhjhhubj)}(hWDepending on an MC firmware configuration setting, each MAC may be in one of two modes:h]hWDepending on an MC firmware configuration setting, each MAC may be in one of two modes:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK>hjhhubh bullet_list)}(hhh](h list_item)}(hDPMAC_LINK_TYPE_FIXED: the link state management is handled exclusively by the MC firmware by polling the MAC PCS. Without the need to register a phylink instance, the dpaa2-eth driver will not bind to the connected dpmac object at all. h]j)}(hDPMAC_LINK_TYPE_FIXED: the link state management is handled exclusively by the MC firmware by polling the MAC PCS. Without the need to register a phylink instance, the dpaa2-eth driver will not bind to the connected dpmac object at all.h]hDPMAC_LINK_TYPE_FIXED: the link state management is handled exclusively by the MC firmware by polling the MAC PCS. Without the need to register a phylink instance, the dpaa2-eth driver will not bind to the connected dpmac object at all.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK@hj4ubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubj3)}(hXDPMAC_LINK_TYPE_PHY: The MC firmware is left waiting for link state update events, but those are in fact passed strictly between the dpaa2-mac (based on phylink) and its attached net_device driver (dpaa2-eth, dpaa2-ethsw), effectively bypassing the firmware. h]j)}(hXDPMAC_LINK_TYPE_PHY: The MC firmware is left waiting for link state update events, but those are in fact passed strictly between the dpaa2-mac (based on phylink) and its attached net_device driver (dpaa2-eth, dpaa2-ethsw), effectively bypassing the firmware.h]hXDPMAC_LINK_TYPE_PHY: The MC firmware is left waiting for link state update events, but those are in fact passed strictly between the dpaa2-mac (based on phylink) and its attached net_device driver (dpaa2-eth, dpaa2-ethsw), effectively bypassing the firmware.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKEhjLubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1j-hhhK@hjhhubeh}(h]dpaa2-software-architectureah ]h"]dpaa2 software architectureah$]h&]uh1j[hj]hhhhhKubj\)}(hhh](ja)}(hImplementationh]hImplementation}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjthhhhhKKubj)}(hAt probe time or when a DPNI's endpoint is dynamically changed, the dpaa2-eth is responsible to find out if the peer object is a DPMAC and if this is the case, to integrate it with PHYLINK using the dpaa2_mac_connect() API, which will do the following:h]hAt probe time or when a DPNI’s endpoint is dynamically changed, the dpaa2-eth is responsible to find out if the peer object is a DPMAC and if this is the case, to integrate it with PHYLINK using the dpaa2_mac_connect() API, which will do the following:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKMhjthhubh block_quote)}(h- look up the device tree for PHYLINK-compatible of binding (phy-handle) - will create a PHYLINK instance associated with the received net_device - connect to the PHY using phylink_of_phy_connect() h]j.)}(hhh](j3)}(hFlook up the device tree for PHYLINK-compatible of binding (phy-handle)h]j)}(hjh]hFlook up the device tree for PHYLINK-compatible of binding (phy-handle)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKRhjubah}(h]h ]h"]h$]h&]uh1j2hjubj3)}(hFwill create a PHYLINK instance associated with the received net_deviceh]j)}(hjh]hFwill create a PHYLINK instance associated with the received net_device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKShjubah}(h]h ]h"]h$]h&]uh1j2hjubj3)}(h2connect to the PHY using phylink_of_phy_connect() h]j)}(h1connect to the PHY using phylink_of_phy_connect()h]h1connect to the PHY using phylink_of_phy_connect()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKThjubah}(h]h ]h"]h$]h&]uh1j2hjubeh}(h]h ]h"]h$]h&]jjjkuh1j-hhhKRhjubah}(h]h ]h"]h$]h&]uh1jhhhKRhjthhubj)}(h7The following phylink_mac_ops callback are implemented:h]h7The following phylink_mac_ops callback are implemented:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKVhjthhubj)}(hX- .validate() will populate the supported linkmodes with the MAC capabilities only when the phy_interface_t is RGMII_* (at the moment, this is the only link type supported by the driver). - .mac_config() will configure the MAC in the new configuration using the dpmac_set_link_state() MC firmware API. - .mac_link_up() / .mac_link_down() will update the MAC link using the same API described above. h]j.)}(hhh](j3)}(h.validate() will populate the supported linkmodes with the MAC capabilities only when the phy_interface_t is RGMII_* (at the moment, this is the only link type supported by the driver). h]j)}(h.validate() will populate the supported linkmodes with the MAC capabilities only when the phy_interface_t is RGMII_* (at the moment, this is the only link type supported by the driver).h]h.validate() will populate the supported linkmodes with the MAC capabilities only when the phy_interface_t is RGMII_* (at the moment, this is the only link type supported by the driver).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKXhjubah}(h]h ]h"]h$]h&]uh1j2hjubj3)}(hp.mac_config() will configure the MAC in the new configuration using the dpmac_set_link_state() MC firmware API. h]j)}(ho.mac_config() will configure the MAC in the new configuration using the dpmac_set_link_state() MC firmware API.h]ho.mac_config() will configure the MAC in the new configuration using the dpmac_set_link_state() MC firmware API.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK\hjubah}(h]h ]h"]h$]h&]uh1j2hjubj3)}(h_.mac_link_up() / .mac_link_down() will update the MAC link using the same API described above. h]j)}(h^.mac_link_up() / .mac_link_down() will update the MAC link using the same API described above.h]h^.mac_link_up() / .mac_link_down() will update the MAC link using the same API described above.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK_hj3ubah}(h]h ]h"]h$]h&]uh1j2hjubeh}(h]h ]h"]h$]h&]jjjkuh1j-hhhKXhjubah}(h]h ]h"]h$]h&]uh1jhhhKXhjthhubj)}(hAt driver unbind() or when the DPNI object is disconnected from the DPMAC, the dpaa2-eth driver calls dpaa2_mac_disconnect() which will, in turn, disconnect from the PHY and destroy the PHYLINK instance.h]hAt driver unbind() or when the DPNI object is disconnected from the DPMAC, the dpaa2-eth driver calls dpaa2_mac_disconnect() which will, in turn, disconnect from the PHY and destroy the PHYLINK instance.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKbhjthhubj)}(hrIn case of a DPNI-DPMAC connection, an 'ip link set dev eth0 up' would start the following sequence of operations:h]hvIn case of a DPNI-DPMAC connection, an ‘ip link set dev eth0 up’ would start the following sequence of operations:}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKfhjthhubhenumerated_list)}(hhh](j3)}(h(phylink_start() called from .dev_open().h]j)}(hjzh]h(phylink_start() called from .dev_open().}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKihjxubah}(h]h ]h"]h$]h&]uh1j2hjuhhhhhNubj3)}(hEThe .mac_config() and .mac_link_up() callbacks are called by PHYLINK.h]j)}(hjh]hEThe .mac_config() and .mac_link_up() callbacks are called by PHYLINK.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKjhjubah}(h]h ]h"]h$]h&]uh1j2hjuhhhhhNubj3)}(hWIn order to configure the HW MAC, the MC Firmware API dpmac_set_link_state() is called.h]j)}(hWIn order to configure the HW MAC, the MC Firmware API dpmac_set_link_state() is called.h]hWIn order to configure the HW MAC, the MC Firmware API dpmac_set_link_state() is called.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKkhjubah}(h]h ]h"]h$]h&]uh1j2hjuhhhhhNubj3)}(hGThe firmware will eventually setup the HW MAC in the new configuration.h]j)}(hjh]hGThe firmware will eventually setup the HW MAC in the new configuration.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKmhjubah}(h]h ]h"]h$]h&]uh1j2hjuhhhhhNubj3)}(hUA netif_carrier_on() call is made directly from PHYLINK on the associated net_device.h]j)}(hUA netif_carrier_on() call is made directly from PHYLINK on the associated net_device.h]hUA netif_carrier_on() call is made directly from PHYLINK on the associated net_device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKnhjubah}(h]h ]h"]h$]h&]uh1j2hjuhhhhhNubj3)}(hThe dpaa2-eth driver handles the LINK_STATE_CHANGE irq in order to enable/disable Rx taildrop based on the pause frame settings. h]j)}(hThe dpaa2-eth driver handles the LINK_STATE_CHANGE irq in order to enable/disable Rx taildrop based on the pause frame settings.h]hThe dpaa2-eth driver handles the LINK_STATE_CHANGE irq in order to enable/disable Rx taildrop based on the pause frame settings.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKphjubah}(h]h ]h"]h$]h&]uh1j2hjuhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefix(suffix)uh1jshjthhhhhKiubj )}(hX+---------+ +---------+ | PHYLINK |-------------->| eth0 | +---------+ (5) +---------+ (1) ^ | | | | v (2) +-----------------------------------+ | dpaa2-eth | +-----------------------------------+ | ^ (6) | | v (3) | +---------+---------------+---------+ | DPMAC | | DPNI | +---------+ +---------+ | MC Firmware | +-----------------------------------+ | | v (4) +-----------------------------------+ | HW MAC | +-----------------------------------+h]hX+---------+ +---------+ | PHYLINK |-------------->| eth0 | +---------+ (5) +---------+ (1) ^ | | | | v (2) +-----------------------------------+ | dpaa2-eth | +-----------------------------------+ | ^ (6) | | v (3) | +---------+---------------+---------+ | DPMAC | | DPNI | +---------+ +---------+ | MC Firmware | +-----------------------------------+ | | v (4) +-----------------------------------+ | HW MAC | +-----------------------------------+}hjsbah}(h]h ]h"]h$]h&]hhjjnonej}uh1j hhhKshjthhubj)}(h[In case of a DPNI-DPNI connection, a usual sequence of operations looks like the following:h]h[In case of a DPNI-DPNI connection, a usual sequence of operations looks like the following:}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjthhubjt)}(hhh](j3)}(hip link set dev eth0 uph]j)}(hj4h]hip link set dev eth0 up}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj2ubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubj3)}(h@The dpni_enable() MC API called on the associated fsl_mc_device.h]j)}(hjKh]h@The dpni_enable() MC API called on the associated fsl_mc_device.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjIubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubj3)}(hip link set dev eth1 uph]j)}(hjbh]hip link set dev eth1 up}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj`ubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubj3)}(h@The dpni_enable() MC API called on the associated fsl_mc_device.h]j)}(hjyh]h@The dpni_enable() MC API called on the associated fsl_mc_device.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjwubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubj3)}(h~The LINK_STATE_CHANGED irq is received by both instances of the dpaa2-eth driver because now the operational link state is up.h]j)}(h~The LINK_STATE_CHANGED irq is received by both instances of the dpaa2-eth driver because now the operational link state is up.h]h~The LINK_STATE_CHANGED irq is received by both instances of the dpaa2-eth driver because now the operational link state is up.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubj3)}(hVThe netif_carrier_on() is called on the exported net_device from link_state_update(). h]j)}(hUThe netif_carrier_on() is called on the exported net_device from link_state_update().h]hUThe netif_carrier_on() is called on the exported net_device from link_state_update().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1j2hj/hhhhhNubeh}(h]h ]h"]h$]h&]j j j jjjuh1jshjthhhhhKubj )}(hXu+---------+ +---------+ | eth0 | | eth1 | +---------+ +---------+ | ^ ^ | | | | | (1) v | (6) (6) | v (3) +---------+ +---------+ |dpaa2-eth| |dpaa2-eth| +---------+ +---------+ | ^ ^ | | | | | (2) v | (5) (5) | v (4) +---------+---------------+---------+ | DPNI | | DPNI | +---------+ +---------+ | MC Firmware | +-----------------------------------+h]hXu+---------+ +---------+ | eth0 | | eth1 | +---------+ +---------+ | ^ ^ | | | | | (1) v | (6) (6) | v (3) +---------+ +---------+ |dpaa2-eth| |dpaa2-eth| +---------+ +---------+ | ^ ^ | | | | | (2) v | (5) (5) | v (4) +---------+---------------+---------+ | DPNI | | DPNI | +---------+ +---------+ | MC Firmware | +-----------------------------------+}hjsbah}(h]h ]h"]h$]h&]hhjjnonej}uh1j hhhKhjthhubeh}(h]implementationah ]h"]implementationah$]h&]uh1j[hj]hhhhhKKubj\)}(hhh](ja)}(h Exported APIh]h Exported API}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjhhhhhKubj)}(hAny DPAA2 driver that drivers endpoints of DPMAC objects should service its _EVENT_ENDPOINT_CHANGED irq and connect/disconnect from the associated DPMAC when necessary using the below listed API::h]hAny DPAA2 driver that drivers endpoints of DPMAC objects should service its _EVENT_ENDPOINT_CHANGED irq and connect/disconnect from the associated DPMAC when necessary using the below listed API:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj )}(hc- int dpaa2_mac_connect(struct dpaa2_mac *mac); - void dpaa2_mac_disconnect(struct dpaa2_mac *mac);h]hc- int dpaa2_mac_connect(struct dpaa2_mac *mac); - void dpaa2_mac_disconnect(struct dpaa2_mac *mac);}hjsbah}(h]h ]h"]h$]h&]hhuh1j hhhKhjhhubj)}(hXOA phylink integration is necessary only when the partner DPMAC is not of ``TYPE_FIXED``. This means it is either of ``TYPE_PHY``, or of ``TYPE_BACKPLANE`` (the difference being the two that in the ``TYPE_BACKPLANE`` mode, the MC firmware does not access the PCS registers). One can check for this condition using the following helper::h](hIA phylink integration is necessary only when the partner DPMAC is not of }(hj hhhNhNubhliteral)}(h``TYPE_FIXED``h]h TYPE_FIXED}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh. This means it is either of }(hj hhhNhNubj )}(h ``TYPE_PHY``h]hTYPE_PHY}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh, or of }(hj hhhNhNubj )}(h``TYPE_BACKPLANE``h]hTYPE_BACKPLANE}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh+ (the difference being the two that in the }(hj hhhNhNubj )}(h``TYPE_BACKPLANE``h]hTYPE_BACKPLANE}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubhw mode, the MC firmware does not access the PCS registers). One can check for this condition using the following helper:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj )}(hB- static inline bool dpaa2_mac_is_type_phy(struct dpaa2_mac *mac);h]hB- static inline bool dpaa2_mac_is_type_phy(struct dpaa2_mac *mac);}hja sbah}(h]h ]h"]h$]h&]hhuh1j hhhKhjhhubj)}(hBefore connection to a MAC, the caller must allocate and populate the dpaa2_mac structure with the associated net_device, a pointer to the MC portal to be used and the actual fsl_mc_device structure of the DPMAC.h]hBefore connection to a MAC, the caller must allocate and populate the dpaa2_mac structure with the associated net_device, a pointer to the MC portal to be used and the actual fsl_mc_device structure of the DPMAC.}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h] exported-apiah ]h"] exported apiah$]h&]uh1j[hj]hhhhhKubeh}(h]dpaa2-mac-phy-supportah ]h"]dpaa2 mac / phy supportah$]h&]uh1j[hhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(j`N generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}(hhjhjjj jj/j#j>j2jMjAj\jPjkj_jzjnjj}jjjjjjjjjjjjjjjjjjjjj.j"j=j1jLj@j[jOjjj^jyjmjj|jjjjjjjjjjjjjjjjjjjjj-j!j<j0jKj?jZjNjij]jxjljj{jjjjjjjjjjjjjjjjjjjjj,j j;j/jJj>jYjMjhj\jwjkjjzjjjjjjjjjjjjjjjjj jjjj+jj:j.jIj=jXjLusubstitution_names}(amphaposjastjbrvbarj bsolj/centj>colonjMcommaj\commatjkcopyjzcurrenjdarrjdegjdividejdollarjequalsjexcljfrac12jfrac14jfrac18jfrac34jfrac38j.frac58j=frac78jLgtj[halfjjhorbarjyhyphenjiexcljiquestjlaquojlarrjlcubjldquojlowbarjlparjlsqbjlsquojltj-microj<middotjKnbspjZnotjinumjxohmjordfjordmjparajpercntjperiodjplusjplusmnjpoundjquestjquotjraquoj,rarrj;rcubjJrdquojYregjhrparjwrsqbjrsquojsectjsemijshyjsoljsungjsup1jsup2jsup3j timesjtradej+uarrj:verbarjIyenjXurefnames}refids}nameids}(j j jjjqjnjjj j u nametypes}(j jjqjj uh}(j j]jjjnjjjtj ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]TDocumentation/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-support.rst(NNNNta decorationNhhub.