# 调通

Source: [https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html](https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html)

### About this task

Note: 要调通 Qualcomm 提供的配置以外的硬件，参见 [调通启用替代硬件](https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html#attach_other_ethernet_phy_components)。

Figure : 以太网调通工作流程
                <?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export bringup-workflow.svg Page-1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" width="6.0191in" height="1.09346in" viewbox="0 0 433.375 78.7291" xml:space="preserve" color-interpolation-filters="sRGB" class="st7"><style>.svg-1 .st1 { fill: #ffffff; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st2 { fill: #3253dc; stroke: #3253dc; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st3 { fill: #ffffff; font-family: Arial; font-size: 1.00001em }
.svg-1 .st4 { font-size: 1em }
.svg-1 .st5 { marker-end: url("#mrkr4-12"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st6 { fill: #000000; fill-opacity: 1; stroke: #000000; stroke-opacity: 1; stroke-width: 0.28409090909091 }
.svg-1 .st7 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<defs id="Markers">	<g id="lend4">		<path d="M 2 1 L 0 0 L 2 -1 L 2 1 " style="stroke:none"></path>	</g>	<marker id="mrkr4-12" class="st6" refx="-7.04" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend4" transform="scale(-3.52,-3.52) "></use>	</marker></defs><g>	<title>VBackground-1</title>	<g id="shape1000-1">		<title>Solid.1000</title>		<rect x="0" y="0" width="433.375" height="78.7291" class="st1"></rect>	</g></g><g>	<title>Page-1</title>	<g id="shape4-3" transform="translate(18.375,-18.4792)">		<title>Sheet.4</title>		<desc>Assign MAC address</desc>		<rect x="0" y="36.8542" width="92.25" height="41.875" class="st2"></rect>		<text x="13.12" y="54.19" class="st3">分配 MAC <tspan x="24.78" dy="1.2em" class="st4">地址</tspan></text>		</g>	<g id="shape7-7" transform="translate(111.094,-39.6042)">		<title>Sheet.7</title>		<path d="M0 78.73 L52.12 78.73" class="st5"></path>	</g>	<g id="shape20-13" transform="translate(322.75,-18.375)">		<title>Sheet.20</title>		<desc>Configure MTU size</desc>		<rect x="0" y="36.8542" width="92.25" height="41.875" class="st2"></rect>		<text x="5.45" y="54.19" class="st3">配置 MTU <tspan x="35.45" dy="1.2em" class="st4">大小</tspan></text>		</g>	<g id="shape1000-17" transform="translate(170.25,-18.4167)">		<title>Sheet.1000</title>		<desc>Assign IP address</desc>		<rect x="0" y="36.8542" width="92.25" height="41.875" class="st2"></rect>		<text x="20.78" y="54.19" class="st3">分配 IP <tspan x="24.78" dy="1.2em" class="st4">地址</tspan></text>		</g>	<g id="shape1001-21" transform="translate(263.25,-39.5417)">		<title>Sheet.1001</title>		<path d="M0 78.73 L52.33 78.73" class="st5"></path>	</g></g>
</svg>

QPS615 MAC 驱动程序和内核配置在源代码中默认启用。

要调通以太网功能，请执行以下操作：

### Procedure

1. RB3 Gen 2 开发套件附带 [预配置的 MAC 地址](https://docs.qualcomm.com/doc/80-70015-26SC/topic/get_started.html#configure_and_store_mac_address)。如果您选择使用相同的 MAC 地址，请跳过此步骤。
                
或者，要修改设备上的预配置 MAC 地址，请执行以下步骤：

    1. 关闭接口：
                        
ifconfig <Interface_name> downCopy to clipboard

例如：

            ifconfig enP1p5s0f0 downCopy to clipboard
    2. 分配 MAC 地址：
                        
ifconfig <Interface_name> hw ether <MAC Address>Copy to clipboard

例如：

            ifconfig enP15sof0 hw ether XX:XX:XX:YY:YY:YYCopy to clipboard
    3. 调通接口：
                        
ifconfig <Interface_name> <ip address> upCopy to clipboard

例如：

            ifconfig enP1p5s0f0 169.254.227.235 upCopy to clipboard

示例输出如下：

        ifconfig 
        enP1p5s0f0 Link encap:Ethernet  HWaddr XX:XX:XX:YY:YY:YY 
               inet addr:169.254.227.235  Bcast:169.254.255.255  Mask:255.255.0.0 
               inet6 addr: fe80::533c:8ed6:557:3860/64 Scope:Link 
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
               RX packets:19 errors:0 dropped:0 overruns:0 frame:0 
               TX packets:36 errors:0 dropped:0 overruns:0 carrier:0 
               collisions:0 txqueuelen:1000 
               RX bytes:3416 (3.3 KiB)  TX bytes:5559 (5.4 KiB) 
               Interrupt:249Copy to clipboard

Note: 该 MAC 地址仅在当前启动周期内有效。重启设备后，将使用 [验证预配置的 MAC 地址](https://docs.qualcomm.com/doc/80-70015-26SC/topic/get_started.html#configure_and_store_mac_address)中永久存储的地址更新 MAC 地址。
2. 当设备连接到公共网络时，连接到网络的 DHCP 服务器会自动分配 IP 地址。无需具体配置。
                
或者，要分配静态 IP 地址，请运行以下命令：

        ifconfig <Interface_name> <ip address>Copy to clipboard

例如：

        ifconfig enP1p5s0f0 169.254.227.235Copy to clipboard

示例输出如下：

        ifconfig 
        enP1p5s0f0 Link encap:Ethernet  HWaddr XX:XX:XX:YY:YY:YY 
                  inet addr:169.254.227.235  Bcast:169.254.255.255  Mask:255.255.0.0 
                  inet6 addr: fe80::533c:8ed6:557:3860/64 Scope:Link 
                  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
                  RX packets:19 errors:0 dropped:0 overruns:0 frame:0 
                  TX packets:36 errors:0 dropped:0 overruns:0 carrier:0 
                  collisions:0 txqueuelen:1000 
                  RX bytes:3416 (3.3 KiB)  TX bytes:5559 (5.4 KiB) 
                  Interrupt:249
        Copy to clipboard

Note: 该 IP 地址仅在当前启动周期内有效。重启设备时，IP 地址不会保留。
3. 要配置在以太网接口上传输的数据包的 MTU 大小，请运行以下命令：
                
ifconfig <Interface_name> mtu <mtu_size> upCopy to clipboard

例如：

        ifconfig enP1p5s0f0 mtu 1500 upCopy to clipboard

示例输出如下：

        ifconfig 
        enP1p5s0f0 Link encap:Ethernet  HWaddr XX:XX:XX:YY:YY:YY 
                  inet addr:169.254.227.235  Bcast:169.254.255.255  Mask:255.255.0.0 
                  inet6 addr: fe80::533c:8ed6:557:3860/64 Scope:Link 
                  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
                  RX packets:19 errors:0 dropped:0 overruns:0 frame:0 
                  TX packets:36 errors:0 dropped:0 overruns:0 carrier:0 
                  collisions:0 txqueuelen:1000 
                  RX bytes:3416 (3.3 KiB)  TX bytes:5559 (5.4 KiB) 
                  Interrupt:249
        Copy to clipboard

## 调通启用替代硬件

Source: [https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html](https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html)

您也可以使用 Qualcomm 提供的硬件配置以外的其他 MAC/PHY 组件并将它们调通。

Note: 您必须从相应的供应商获取 MAC/PHY 的驱动程序和固件。Qualcomm 不负责这些配置更改。

要将 QPS615 替换为其他基于 PCIe 的 MAC/PHY，参见 [QPS615 switch PCIe 软件支持](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-8/pcie.html#sub$pcie-software-support-feature-for-qps615)。

### 保留 QPS615 PCIe 并更换 QEP8121/AQR113C

Source: [https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html](https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html)

### About this task

要保留 QPS615 PCIe 并将 QEP8121/AQR113C 更换为其他 PHY 组件，请执行以下操作：

### Procedure

1. 根据附加的 PHY 建议，更新 arch/arm64/boot/dts/qcom/qcs6490-addons-rb3gen2.dtsi 文件中的所有参数。
2. 编译软件。
                
QEP PHY 的示例代码如下：

        qep_vreg: qep_vreg {	compatible = "regulator-fixed";	regulator-name = "qep_vreg";	gpio = <&pm7325_gpios 8 0>;	regulator-min-microvolt = <1800000>;	regulator-max-microvolt = <1800000>;	enable-active-high;};

        qps615_eth1,qps615_eth1@pcie1_rp {				reg = <0x100 0x0 0x0 0x0 0x0>;				pinctrl-names = "default";				pinctrl-0 = <&napa_intn_wol_sig>;				qcom,phy-rst-gpio = <1>;				interrupts-extended = <&tlmm 101 IRQ_TYPE_EDGE_FALLING>;				interrupt-names = "wol_irq";				phy-supply = <&qep_vreg>;				qcom,phy-rst-delay-us = <20000>;				#address-cells = <1>;				#size-cells = <1>;
        Copy to clipboard

刷写已修改的软件后，QPS615 驱动程序会扫描与其连接的物理设备，并比对 qcs6490-addons-rb3gen2.dtsi 文件中的设备树信息。

Warning: 由于 .dtsi 文件中的配置与 PHY 的实际建议不匹配，PHY 可能无法加载。在这种情况下，您必须相应地更新 .dtsi 文件中的配置。

## 启用 AQR PHY

Source: [https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html](https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html)

虽然 10 GbE 的 AQR PHY 为可选项，但它已在参考 RB3 Gen 2 开发套件上进行了验证。您只需将 PHY 固件刷写到硬件一次；但是，您必须在每个新编译版本上加载并安装 PHY 驱动程序。

Qualcomm 验证了 RB3 Gen 2 开发套件上的以下 AQR PHY 固件：

- Marvell 固件： AQR-G4\_v5.6.1-QR\_Marvell\_NoSwap\_XFI\_ID44874\_VER1836.cld
- 推荐使用 Marvell 专有的闪存烧录工具来刷写 Marvell AQR113 PHY。
- 请联系 Marvell Technology, Inc. 以获取 AQR PHY 固件。

### 安装 AQR PHY 驱动程序

Source: [https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html](https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html)

### About this task

要加载并安装 PHY 驱动程序，请执行以下操作：

### Procedure

1. 从 [Aquantia GitHub](https://github.com/Aquantia/linux-aqr-phy/tree/aqr_mainline/drivers/net/phy/aquantia) 下载 PHY 驱动程序源代码。
2. 将 drivers/net/phy/aquantia 目录中默认的上游驱动程序替换为从 GitHub 下载的驱动程序。
3. 要将 Aquantia PHY 编译为内核模块，请在 arch/arm64/configs/qcom\_defconfig 文件中设置 `CONFIG_AQUANTIA_PHY=m`。
4. 验证 drivers/net/phy/Makefile 文件中是否存在以下对象：
                
obj-$(CONFIG_AQUANTIA_PHY)	+= aquantia/Copy to clipboard

如果该对象不存在，请予以添加，例如：

        obj-$(CONFIG_AT803X_PHY)	+= at803x.o
        obj-$(CONFIG_AX88796B_PHY)	+= ax88796b.o
        obj-$(CONFIG_AQUANTIA_PHY)	+= aquantia/
        obj-$(CONFIG_AT803X_PHY)	+= at803x.o
        obj-$(CONFIG_AX88796B_PHY)	+= ax88796b.oCopy to clipboard
5. 验证 drivers/net/phy/Kconfig 文件中是否存在源代码的以下路径：
                
source "drivers/net/phy/aquantia/Kconfig"Copy to clipboard

如果该路径不存在，请予以添加，例如：

        config ADIN1100_PHY
        tristate "Analog Devices Industrial Ethernet T1L PHYs"
        help
        Adds support for the Analog Devices Industrial T1L Ethernet PHYs.
        Currently supports the:
        - ADIN1100 - Robust,Industrial, Low Power 10BASE-T1L Ethernet PHY
        
        source "drivers/net/phy/aquantia/Kconfig"
        
        config AX88796B_PHY
        tristate "Asix PHYs"
        help
        Currently supports the Asix Electronics PHY found in the X-Surf 100
        AX88796B package.Copy to clipboard
6. 验证 drivers/net/phy/aquantia/Kconfig 文件中是否存在以下代码：
                
# SPDX-License-Identifier: GPL-2.0-only
        config AQUANTIA_PHY
        tristate "Aquantia PHYs"
        select CRC_ITU_T
        help
        Currently supports the Aquantia AQ1202, AQ2104, AQR105, AQR405Copy to clipboard
7. 编译内核。
                
将会生成 aquantia.ko 内核对象。

### 检测 PHY

Source: [https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html](https://docs.qualcomm.com/doc/80-70015-26SC/topic/bring_up.html)

### About this task

要检测 PHY，请执行以下操作：

### Procedure

1. 更新 arch/arm64/boot/dts/qcom/qcs6490-addons-rb3gen2.dtsi 文件中的 AQR PHY 参数。
2. 编译软件。
                
AQR PHY 的示例代码如下：

        aqr_vreg: aqr_vreg {	compatible = "regulator-fixed";	regulator-name = "aqr_vreg";	gpio = <&pm7250b_gpios 4 0>;	regulator-min-microvolt = <1800000>;	regulator-max-microvolt = <1800000>;	enable-active-high;};
        
        qps615_eth0,qps615_eth0@pcie1_rp {				reg = <0x0 0x0 0x0 0x0 0x0>;				pinctrl-names = "default";				pinctrl-0 = <&aqr_intn_wol_sig>;				qcom,phy-rst-gpio = <0>;				interrupts-extended = <&tlmm 141 IRQ_TYPE_EDGE_FALLING>;				interrupt-names = "wol_irq";				phy-supply = <&aqr_vreg>;				qcom,phy-rst-delay-us = <221000>;				#address-cells = <1>;				#size-cells = <1>;			};Copy to clipboard

Last Published: Nov 25, 2024

[Previous Topic
工具](https://docs.qualcomm.com/bundle/publicresource/80-70015-26SC/topics/tools.md) [Next Topic
配置](https://docs.qualcomm.com/bundle/publicresource/80-70015-26SC/topics/configure.md)