一、GPIO的复用
以SPI复用为GPIO为例在LS1028A.pdf中查找可以看到,1028底板上SPI_SIN可以复用为GPIO_DAT13,SPI3_SCK可复用为GPIO3_DAT14,SPI_SIN可复用为GPIO3_DAT13,SPI3_SOUT可复用为GPIO3_DAT16。在LS1028ARM.pdf中可以看到对应的RCW字段为SPI3_PMUX。通过此图可知 ,当SPI3_PMUX=1时,引脚被配置为GPIO3_DAT[16:13],在RCW中修改后,重新编译替换烧写即可。RCW路径:OK1028-linux-fs/packages/firmware/rcw/ls1028ardb/R_SQPP_0x85bb/rcw_1500_gpu600.rcwLS028A开发板验证阶段:root@forlinx:~#ls /sys/class/gpioexport gpiochip416 gpiochip448 gpiochip480 unexport输入上述命令出现四组gpiochip,一般对应关系为:Gpiochip480对应gpio1[];Gpiochip448对应gpio2[];Gpiochip416对应gpio3[]; 若要验证单个引脚则在此基础上做加法即可,GPIO3_DATx=gpiochip416+x,以GPIO3_DAT14为例:root@forlinx:~#echo 430 > /sys/class/gpio/exportroot@forlinx:~#echo out > /sys/class/gpio/gpio430/directionroot@forlinx:~#echo 1 > /sys/class/gpio/gpio430/valueroot@forlinx:~#cat /sys/class/gpio/gpio430/value1root@forlinx:~#echo 0 > /sys/class/gpio/gpio430/valueroot@forlinx:~#cat /sys/class/gpio/gpio430/value0同时可以量出此引脚高低电平的变化。SPI3接口复用为GPIO时是整组复用的,当SPI3_PMUX=1时,引脚被配置为GPIO3_DAT[16:13]。二、OK1028A-C网口对应关系
eno0为SGMII1G-T protocol,swp0-swp3为QSGMII1G。1、网口switch介绍
以太网系统由两个组件组成:以太网控制器(ENETC)和支持TSN的以太网交换机。下图描述了LS1028A中的以太网子系统。2、以太网控制器特性
以太网控制器支持以下特性:•Implements the full 802.3 specification withpreamble/SFD generation, frame padding generation, CRC generation andchecking.•One 10/100/1000/2500 Mbit/s Ethernet port. Throughserdes, SGMII (1G/2.5G) and USXGMII (2.5G) MAC-PHYspecificationsare supported.•One 10/100/1000 Mbit/s Ethernet port with RGMIIinteRFace.•One 2500 Mbit/s Ethernet port connected internallyto TSN Switch for switch data transmission.•One 1000-Mbit/s Ethernet port connected internallyto TSN Switch for switch management.•Supports jumbo Ethernet frames with a size up to9600 bytes•Supports double tagged VLAN frames according toIEEE 802.1Q•Supports IEEE 802.1Qbu preemption•PCI Express root complex integrated endpointdevice3、TSN以太网交换机特性
TSN以太网交换机提供了一组丰富的以太网交换特性,例如高级的基于TCAM的VLAN和QOS处理,以及使用基于TCAM的通用内容感知处理器(VCAP)的安全处理。设备提供对时间敏感的组网特性,包括IEEE1588精确时间协议、时间感知整形、无缝冗余、逐流过滤和监管、抢占、切通交换等。TSN以太网交换机支持以下特性:•Four external 10/100/1000/2500-Mbit/s Ethernetports. Through SerDes, SGMII (1G/2.5G) and USXGMII (2.5G) MACPHYspecifications are supported.•One 2500 Mbit/s Ethernet port connected internallyto ENETC for data transmission.•One 1000 Mbit/s Ethernet port connected internallyto ENETC for management.•One internal CPU port, for frame extraction andinjection.•128KB of integrated shared packet memory.•Fully nonblocking wire-speed switching performancewith weighted random early detection (WRED) for all frame sizes.