由于OK1028A-C這塊開發(fā)板在日常的客戶咨詢過程中關(guān)于GPIO的復(fù)用、網(wǎng)口的對(duì)應(yīng)關(guān)系以及TSN的相關(guān)特性問的比較多,故整理了這篇文檔,以解決客戶的疑問。 一、GPIO的復(fù)用以SPI復(fù)用為GPIO為例 在LS1028A.pdf中查找可以看到,1028底板上SPI_SIN可以復(fù)用為GPIO_DAT13,SPI3_SCK可復(fù)用為GPIO3_DAT14,SPI_SIN可復(fù)用為GPIO3_DAT13,SPI3_SOUT可復(fù)用為GPIO3_DAT16。 在LS1028ARM.pdf中可以看到對(duì)應(yīng)的RCW字段為SPI3_PMUX。 通過此圖可知 ,當(dāng)SPI3_PMUX=1時(shí),引腳被配置為GPIO3_DAT[16:13],在RCW中修改后,重新編譯替換燒寫即可。 RCW路徑: OK1028-linux-fs/packages/firmware/rcw/ls1028ardb/R_SQPP_0x85bb/rcw_1500_gpu600.rcw LS028A開發(fā)板驗(yàn)證階段: root@forlinx:~#ls /sys/class/gpio export gpiochip416 gpiochip448 gpiochip480 unexport 輸入上述命令出現(xiàn)四組gpiochip,一般對(duì)應(yīng)關(guān)系為: Gpiochip480對(duì)應(yīng)gpio1[]; Gpiochip448對(duì)應(yīng)gpio2[]; Gpiochip416對(duì)應(yīng)gpio3[]; 若要驗(yàn)證單個(gè)引腳則在此基礎(chǔ)上做加法即可,GPIO3_DATx=gpiochip416+x, 以GPIO3_DAT14為例: root@forlinx:~#echo 430 > /sys/class/gpio/export root@forlinx:~#echo out > /sys/class/gpio/gpio430/direction root@forlinx:~#echo 1 > /sys/class/gpio/gpio430/value root@forlinx:~#cat /sys/class/gpio/gpio430/value 1 root@forlinx:~#echo 0 > /sys/class/gpio/gpio430/value root@forlinx:~#cat /sys/class/gpio/gpio430/value 0 同時(shí)可以量出此引腳高低電平的變化。 SPI3接口復(fù)用為GPIO時(shí)是整組復(fù)用的,當(dāng)SPI3_PMUX=1時(shí),引腳被配置為GPIO3_DAT[16:13]。 二、OK1028A-C網(wǎng)口對(duì)應(yīng)關(guān)系eno0為SGMII1G-T protocol,swp0-swp3為QSGMII1G。 1、網(wǎng)口switch介紹以太網(wǎng)系統(tǒng)由兩個(gè)組件組成:以太網(wǎng)控制器(ENETC)和支持TSN的以太網(wǎng)交換機(jī)。 下圖描述了LS1028A中的以太網(wǎng)子系統(tǒng)。 以太網(wǎng)控制器ENETC是一個(gè)虛擬以太網(wǎng)控制器,支持GbE速度和時(shí)間敏感網(wǎng)絡(luò)(TSN)功能。ENETC提供完全集成的GbE媒體訪問控制器(MACs)。 它支持搶占和各種三層加速和卸載功能的協(xié)議,包括IP,TCP, UDP和ICMP,同時(shí)保持線速度在所有接口。 2、以太網(wǎng)控制器特性以太網(wǎng)控制器支持以下特性: •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-PHY specificationsare 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 • 3、TSN以太網(wǎng)交換機(jī)特性![]() TSN以太網(wǎng)交換機(jī)提供了一組豐富的以太網(wǎng)交換特性,例如高級(jí)的基于TCAM的VLAN和QOS處理,以及使用基于TCAM的通用內(nèi)容感知處理器(VCAP)的安全處理。 設(shè)備提供對(duì)時(shí)間敏感的組網(wǎng)特性,包括IEEE1588精確時(shí)間協(xié)議、時(shí)間感知整形、無縫冗余、逐流過濾和監(jiān)管、搶占、切通交換等。 TSN以太網(wǎng)交換機(jī)支持以下特性: •Four external 10/100/1000/2500-Mbit/s Ethernetports. Through SerDes, SGMII (1G/2.5G) and USXGMII (2.5G) MAC PHYspecifications 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. 概括起來就是LS1028A最多可以引出6個(gè)網(wǎng)口,且都支持TSN。 至此文章已結(jié)束,希望您通過本篇文章可以對(duì)LS1028A的ENETC、TSN交換機(jī)的特性有更深的了解。再遇到OK1028A-C開發(fā)板GPIO的復(fù)用時(shí),可以有一定參考。 如您拿到產(chǎn)品的使用過程中有其他問題,可以聯(lián)系我們的技術(shù)支持獲取幫助。 更多關(guān)于產(chǎn)品信息,您可點(diǎn)擊此處進(jìn)入飛凌嵌入式官網(wǎng)了解。 原文鏈接:https://www.forlinx.com/article_view_699.html |