# UART

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

UART 设备以异步方式发送数据。因此，时钟信号不会使发送 UART 的位输出与接收 UART 的位采样同步。发送 UART 会向正在传输的数据包中添加起始位和停止位，但不会添加时钟信号。这些位定义了数据包的开始和结束。这样，接收 UART 就知道何时开始读取这些位。当接收 UART 检测到起始位时，便开始以特定频率（称为波特率）读取传入的位。

Figure : 两个 UART 设备之间的数据传输
            
            <?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">
<!-- 由 Microsoft Visio, SVG Export 生成 uart-data-transfer.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" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="5.64589in" height="4.0752in" viewbox="0 0 406.504 293.414" xml:space="preserve" color-interpolation-filters="sRGB" class="st15" aria-label="图片显示了两个 UART 设备之间的数据传输。"><v:documentproperties v:langid="2052">	<v:userdefs>		<v:ud v:nameu="msvNoAutoConnect" v:val="VT0(1):26"></v:ud>	</v:userdefs></v:documentproperties>
<style>.svg-1 .st1 { fill: #ffffff; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st2 { fill: #ffffff; stroke: #3253dc; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st3 { fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st4 { fill: #000000; font-family: 黑体; font-size: 1.16666em; font-weight: bold }
.svg-1 .st5 { font-family: Arial; font-size: 1em }
.svg-1 .st6 { fill: #ffffff; stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st7 { fill: #000000; font-family: Arial; font-size: 1.00001em }
.svg-1 .st8 { fill: none }
.svg-1 .st9 { stroke: #000000; stroke-linecap: butt; stroke-width: 2.21102 }
.svg-1 .st10 { fill: #000000; stroke: none; stroke-width: 1 }
.svg-1 .st11 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 1; visibility: hidden }
.svg-1 .st12 { stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st13 { marker-end: url("#mrkr13-110"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st14 { fill: #000000; fill-opacity: 1; stroke: #000000; stroke-opacity: 1; stroke-width: 0.28409094911674 }
.svg-1 .st15 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<defs id="Markers">	<g id="lend13">		<path d="M 3 1 L 0 0 L 3 -1 L 3 1 " style="stroke:none"></path>	</g>	<marker id="mrkr13-110" class="st14" v:arrowtype="13" v:arrowsize="2" v:setback="10.56" refx="-10.559998512192" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend13" transform="scale(-3.519999504064,-3.519999504064) "></use>	</marker></defs><g v:mid="1" v:index="1" v:groupcontext="backgroundPage">	<v:userdefs>		<v:ud v:nameu="msvVisioCreated" v:prompt="" v:val="VT0(0):26"></v:ud>	</v:userdefs>	<title>VBackground-1</title>	<v:pageproperties width="5.64589" height="4.0752" v:drawingscale="0.0393701" v:pagescale="0.0393701" v:drawingunits="24" v:shadowoffsetx="8.50394" v:shadowoffsety="-8.50394"></v:pageproperties>	<g id="shape1-1" v:mid="1" v:groupcontext="shape" transform="translate(0,-0.000171128)">		<title>Solid</title>		<v:userdefs>			<v:ud v:nameu="Background" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="msvShapeCategories" v:prompt="" v:val="VT4(DoNotContain)"></v:ud>			<v:ud v:nameu="msvVisioCreated" v:prompt="" v:val="VT0(0):26"></v:ud>		</v:userdefs>		<rect x="0" y="0.000342256" width="406.504" height="293.414" class="st1"></rect>	</g></g><g v:mid="0" v:index="2" v:groupcontext="foregroundPage">	<v:userdefs>		<v:ud v:nameu="GroundCount" v:prompt="" v:val="VT0(3):26"></v:ud>	</v:userdefs>	<title>Page-1</title>	<v:pageproperties v:drawingscale="0.0393701" v:pagescale="0.0393701" v:drawingunits="24" v:shadowoffsetx="8.50394" v:shadowoffsety="-8.50394"></v:pageproperties>	<v:layer v:name="Electrical" v:index="0"></v:layer>	<v:layer v:name="Connector" v:index="1"></v:layer>	<g id="shape1-3" v:mid="1" v:groupcontext="shape" transform="translate(19,-47.6422)">		<title>Rectangle</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="66.6424" width="113.386" height="226.772" class="st2"></rect>	</g>	<g id="shape2-5" v:mid="2" v:groupcontext="shape" transform="translate(274.118,-47.6422)">		<title>Rectangle.3</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="66.6424" width="113.386" height="226.772" class="st2"></rect>	</g>	<g id="shape3-7" v:mid="3" v:groupcontext="shape" transform="translate(19,-168.66)">		<title>工作表.3</title>		<desc>Device A</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="38.9764" cy="278.531" width="77.97" height="29.7638"></v:textrect>		<rect x="0" y="263.651" width="77.9528" height="29.7638" class="st3"></rect>		<text x="17.92" y="283.08" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>设备<tspan class="st5"> </tspan><tspan class="st5">A</tspan></text>		</g>	<g id="shape4-12" v:mid="4" v:groupcontext="shape" transform="translate(309.551,-168.66)">		<title>工作表.4</title>		<desc>Device B</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="38.9764" cy="278.531" width="77.97" height="29.7638"></v:textrect>		<rect x="0" y="263.651" width="77.9528" height="29.7638" class="st3"></rect>		<text x="17.92" y="283.08" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>设备<tspan class="st5"> </tspan><tspan class="st5">B</tspan></text>		</g>	<g id="shape5-17" v:mid="5" v:groupcontext="shape" transform="translate(125.593,-154.236)">		<title>Square</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape6-19" v:mid="6" v:groupcontext="shape" transform="translate(267.325,-154.236)">		<title>Square.9</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape7-21" v:mid="7" v:groupcontext="shape" transform="translate(125.593,-239.275)">		<title>Square.10</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape8-23" v:mid="8" v:groupcontext="shape" transform="translate(125.593,-196.755)">		<title>Square.11</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape9-25" v:mid="9" v:groupcontext="shape" transform="translate(125.593,-111.716)">		<title>Square.12</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape10-27" v:mid="10" v:groupcontext="shape" transform="translate(125.593,-69.196)">		<title>Square.13</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape11-29" v:mid="11" v:groupcontext="shape" transform="translate(267.325,-69.196)">		<title>Square.14</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape12-31" v:mid="12" v:groupcontext="shape" transform="translate(267.325,-111.716)">		<title>Square.15</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape13-33" v:mid="13" v:groupcontext="shape" transform="translate(267.325,-196.755)">		<title>Square.16</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape14-35" v:mid="14" v:groupcontext="shape" transform="translate(267.325,-239.275)">		<title>Square.17</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<rect x="0" y="279.829" width="13.5856" height="13.5856" class="st6"></rect>	</g>	<g id="shape15-37" v:mid="15" v:groupcontext="shape" transform="translate(282.622,-237.564)">		<title>工作表.15</title>		<desc>Tx</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="4" y="289.22" class="st7" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Tx</text>		</g>	<g id="shape16-40" v:mid="16" v:groupcontext="shape" transform="translate(282.622,-195.753)">		<title>工作表.16</title>		<desc>Rx</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="4" y="289.22" class="st7" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Rx</text>		</g>	<g id="shape17-43" v:mid="17" v:groupcontext="shape" transform="translate(282.622,-153.233)">		<title>工作表.17</title>		<desc>CTS</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="4" y="289.22" class="st7" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>CTS</text>		</g>	<g id="shape18-46" v:mid="18" v:groupcontext="shape" transform="translate(282.622,-110.714)">		<title>工作表.18</title>		<desc>RTS</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="4" y="289.22" class="st7" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>RTS</text>		</g>	<g id="shape19-49" v:mid="19" v:groupcontext="shape" transform="translate(282.622,-68.1935)">		<title>工作表.19</title>		<desc>GND</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="4" y="289.22" class="st7" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>GND</text>		</g>	<g id="shape20-52" v:mid="20" v:groupcontext="shape" transform="translate(75.6929,-68.1935)">		<title>工作表.20</title>		<desc>GND</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="17.52" y="289.22" class="st7" v:langid="1033"><v:paragraph v:horizalign="2"></v:paragraph><v:tablist></v:tablist>GND</text>		</g>	<g id="shape21-55" v:mid="21" v:groupcontext="shape" transform="translate(75.6929,-110.714)">		<title>工作表.21</title>		<desc>RTS</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="20.19" y="289.22" class="st7" v:langid="1033"><v:paragraph v:horizalign="2"></v:paragraph><v:tablist></v:tablist>RTS</text>		</g>	<g id="shape22-58" v:mid="22" v:groupcontext="shape" transform="translate(75.6929,-195.753)">		<title>工作表.22</title>		<desc>Rx</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="29.52" y="289.22" class="st7" v:langid="1033"><v:paragraph v:horizalign="2"></v:paragraph><v:tablist></v:tablist>Rx</text>		</g>	<g id="shape23-61" v:mid="23" v:groupcontext="shape" transform="translate(75.6929,-153.233)">		<title>工作表.23</title>		<desc>CTS</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="20.19" y="289.22" class="st7" v:langid="1033"><v:paragraph v:horizalign="2"></v:paragraph><v:tablist></v:tablist>CTS</text>		</g>	<g id="shape24-64" v:mid="24" v:groupcontext="shape" transform="translate(75.6929,-238.273)">		<title>工作表.24</title>		<desc>Tx</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)" v:tabspace="42.5197"></v:textblock>		<v:textrect cx="24.0945" cy="285.619" width="48.2" height="15.5906"></v:textrect>		<rect x="0" y="277.824" width="48.189" height="15.5906" class="st3"></rect>		<text x="30.86" y="289.22" class="st7" v:langid="1033"><v:paragraph v:horizalign="2"></v:paragraph><v:tablist></v:tablist>Tx</text>		</g>	<g id="group25-67" transform="translate(149.41,-20.2152)" v:mid="25" v:groupcontext="group" v:layermember="0">		<v:custprops>			<v:cp v:nameu="Label" v:lbl="Label" v:prompt="" v:type="0" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="visDescription" v:val="VT4(Represents a ground connection.)"></v:ud>			<v:ud v:nameu="Label" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="SolSH" v:prompt="" v:val="VT4({2EE3C7D2-E26E-4B72-9E9C-5170DDBF261A})"></v:ud>		</v:userdefs>		<title>Ground</title>		<g id="group26-68" v:mid="26" v:groupcontext="group">			<title>工作表.26</title>			<g id="shape27-69" v:mid="27" v:groupcontext="shape" v:layermember="0" transform="translate(7.08,0)">				<title>工作表.27</title>				<path d="M5.66 293.41 L0 293.41 L5.66 293.41 Z" class="st8"></path>				<path d="M5.66 293.41 L0 293.41" class="st9"></path>			</g>			<g id="shape28-72" v:mid="28" v:groupcontext="shape" v:layermember="0" transform="translate(2.83,-4.46)">				<title>工作表.28</title>				<path d="M14.15 293.41 L0 293.41 L14.15 293.41 Z" class="st8"></path>				<path d="M14.15 293.41 L0 293.41" class="st9"></path>			</g>			<g id="shape29-75" v:mid="29" v:groupcontext="shape" v:layermember="0" transform="translate(-1.59872E-014,-8.87)">				<title>工作表.29</title>				<path d="M19.81 293.41 L0 293.41 L19.81 293.41 Z" class="st8"></path>				<path d="M19.81 293.41 L0 293.41" class="st9"></path>			</g>		</g>		<g id="group30-78" transform="translate(9.16838,-9.76705)" v:mid="30" v:groupcontext="group">			<title>工作表.30</title>			<g id="shape31-79" v:mid="31" v:groupcontext="shape" v:layermember="0">				<title>工作表.31</title>				<rect x="0" y="267.251" width="1.47402" height="26.1638" class="st10"></rect>			</g>			<g id="shape32-81" v:mid="32" v:groupcontext="shape" v:layermember="0">				<title>工作表.32</title>				<rect x="0" y="267.251" width="1.47402" height="26.1638" class="st11"></rect>			</g>		</g>	</g>	<g id="group33-83" transform="translate(245.788,-20.2152)" v:mid="33" v:groupcontext="group" v:layermember="0">		<v:custprops>			<v:cp v:nameu="Label" v:lbl="Label" v:prompt="" v:type="0" v:format="@" v:sortkey="" v:invis="false" v:ask="false" v:langid="1033" v:cal="0" v:val="VT4()"></v:cp>		</v:custprops>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="visDescription" v:val="VT4(Represents a ground connection.)"></v:ud>			<v:ud v:nameu="Label" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="SolSH" v:prompt="" v:val="VT4({2EE3C7D2-E26E-4B72-9E9C-5170DDBF261A})"></v:ud>		</v:userdefs>		<title>Ground.31</title>		<g id="group34-84" v:mid="34" v:groupcontext="group">			<title>工作表.34</title>			<g id="shape35-85" v:mid="35" v:groupcontext="shape" v:layermember="0" transform="translate(7.08,0)">				<title>工作表.35</title>				<path d="M5.66 293.41 L0 293.41 L5.66 293.41 Z" class="st8"></path>				<path d="M5.66 293.41 L0 293.41" class="st9"></path>			</g>			<g id="shape36-88" v:mid="36" v:groupcontext="shape" v:layermember="0" transform="translate(2.83,-4.46)">				<title>工作表.36</title>				<path d="M14.15 293.41 L0 293.41 L14.15 293.41 Z" class="st8"></path>				<path d="M14.15 293.41 L0 293.41" class="st9"></path>			</g>			<g id="shape37-91" v:mid="37" v:groupcontext="shape" v:layermember="0" transform="translate(-1.59872E-014,-8.87)">				<title>工作表.37</title>				<path d="M19.81 293.41 L0 293.41 L19.81 293.41 Z" class="st8"></path>				<path d="M19.81 293.41 L0 293.41" class="st9"></path>			</g>		</g>		<g id="group38-94" transform="translate(9.16838,-9.76705)" v:mid="38" v:groupcontext="group">			<title>工作表.38</title>			<g id="shape39-95" v:mid="39" v:groupcontext="shape" v:layermember="0">				<title>工作表.39</title>				<rect x="0" y="267.251" width="1.47402" height="26.1638" class="st10"></rect>			</g>			<g id="shape40-97" v:mid="40" v:groupcontext="shape" v:layermember="0">				<title>工作表.40</title>				<rect x="0" y="267.251" width="1.47402" height="26.1638" class="st11"></rect>			</g>		</g>	</g>	<g id="shape41-99" v:mid="41" v:groupcontext="shape" v:layermember="1" transform="translate(255.696,-56.1433)">		<title>Dynamic connector.35</title>		<path d="M11.63 273.56 L0 273.56 L0 293.41 L11.63 273.56 Z" class="st8"></path>		<path d="M11.63 273.56 L0 273.56 L0 293.41" class="st12"></path>	</g>	<g id="shape42-102" v:mid="42" v:groupcontext="shape" v:layermember="1" transform="translate(139.179,-56.1433)">		<title>Dynamic connector</title>		<path d="M0 273.56 L20.14 273.56 L20.14 293.41 L0 273.56 Z" class="st8"></path>		<path d="M0 273.56 L20.14 273.56 L20.14 293.41" class="st12"></path>	</g>	<g id="shape43-105" v:mid="43" v:groupcontext="shape" transform="translate(231.582,-231.142) rotate(18.3561)">		<title>工作表.43</title>		<path d="M0 293.41 L124.46 293.41 L124.46 293.41" class="st13"></path>	</g>	<g id="shape44-111" v:mid="44" v:groupcontext="shape" transform="translate(359.729,325.835) rotate(161.644)">		<title>工作表.44</title>		<path d="M0 293.41 L124.46 293.41 L124.46 293.41" class="st13"></path>	</g>	<g id="shape45-116" v:mid="45" v:groupcontext="shape" transform="translate(174.922,453.394) rotate(-161.644)">		<title>工作表.45</title>		<path d="M0 293.41 L124.46 293.41 L124.46 293.41" class="st13"></path>	</g>	<g id="shape46-121" v:mid="46" v:groupcontext="shape" transform="translate(46.7746,-103.583) rotate(-18.3561)">		<title>工作表.46</title>		<path d="M0 293.41 L124.46 293.41 L124.46 293.41" class="st13"></path>	</g></g>
</svg>

下面列出了用于确定成功传输的参数：
- Baud rate
- Start bit
- Stop bit
- Parity bit
- Data bits
- Flow control

下图所示为 UART 数据包示例。
Figure : UART 数据包
                
                <?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">
<!-- 由 Microsoft Visio, SVG Export 生成 uart-data-packet.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" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="8.08333in" height="3.62188in" viewbox="0 0 582 260.775" xml:space="preserve" color-interpolation-filters="sRGB" class="st10"><v:documentproperties v:langid="2052">	<v:userdefs>		<v:ud v:nameu="msvNoAutoConnect" v:val="VT0(1):26"></v:ud>	</v:userdefs></v:documentproperties>
<style>.svg-2 .st1 { fill: #ffffff; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.749998 }
.svg-2 .st2 { fill: #ffffff; stroke: #3253dc; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.999998 }
.svg-2 .st3 { fill: #000000; font-family: Arial; font-size: 1.00001em }
.svg-2 .st4 { font-family: 黑体; font-size: 1em }
.svg-2 .st5 { font-size: 1em }
.svg-2 .st6 { fill: none }
.svg-2 .st7 { stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.999998 }
.svg-2 .st8 { fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.999998 }
.svg-2 .st9 { fill: #000000; font-family: 黑体; font-size: 1.00001em }
.svg-2 .st10 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="1" v:index="1" v:groupcontext="backgroundPage">	<v:userdefs>		<v:ud v:nameu="msvVisioCreated" v:prompt="" v:val="VT0(0):26"></v:ud>	</v:userdefs>	<title>VBackground-1</title>	<v:pageproperties width="8.08333" height="3.62188" v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="8.99998" v:shadowoffsety="-8.99998"></v:pageproperties>	<g id="shape1-1" v:mid="1" v:groupcontext="shape" transform="translate(0.000594176,0)">		<title>Solid</title>		<v:userdefs>			<v:ud v:nameu="Background" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>			<v:ud v:nameu="msvShapeCategories" v:prompt="" v:val="VT4(DoNotContain)"></v:ud>			<v:ud v:nameu="msvVisioCreated" v:prompt="" v:val="VT0(0):26"></v:ud>		</v:userdefs>		<rect x="0" y="0" width="581.999" height="260.775" class="st1"></rect>	</g></g><g v:mid="0" v:index="2" v:groupcontext="foregroundPage">	<title>Page-1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="8.99998" v:shadowoffsety="-8.99998"></v:pageproperties>	<g id="shape1-3" v:mid="1" v:groupcontext="shape" transform="translate(18.5005,-109.296)">		<title>Rectangle</title>		<desc>1 start bit</desc>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="34.9352" cy="242.539" width="69.88" height="36.473"></v:textrect>		<rect x="0" y="224.302" width="69.8716" height="36.473" class="st2"></rect>		<text x="5.93" y="246.44" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>1 <tspan class="st4">个起始位</tspan></text>		</g>	<g id="shape2-7" v:mid="2" v:groupcontext="shape" transform="translate(88.3722,-109.296)">		<title>Rectangle.2</title>		<desc>5 to 9 data bits</desc>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="153.717" cy="242.539" width="307.44" height="36.473"></v:textrect>		<rect x="0" y="224.302" width="307.435" height="36.473" class="st2"></rect>		<text x="112.04" y="246.44" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>5 <tspan class="st4">到</tspan> 9 <tspan class="st4">个数据位</tspan></text>		</g>	<g id="shape3-12" v:mid="3" v:groupcontext="shape" transform="translate(395.808,-109.296)">		<title>Rectangle.3</title>		<desc>0 to 1 parity bits</desc>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="41.9224" cy="242.539" width="83.85" height="36.473"></v:textrect>		<rect x="0" y="224.302" width="83.846" height="36.473" class="st2"></rect>		<text x="18.25" y="238.64" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>0 <tspan class="st4">到</tspan> 1<tspan class="st5" v:langid="2052"> </tspan><tspan class="st4">个<v:lf></v:lf></tspan><tspan x="11.92" dy="1.3em" class="st4">奇偶校验位</tspan></text>		</g>	<g id="shape4-19" v:mid="4" v:groupcontext="shape" transform="translate(479.653,-109.296)">		<title>Rectangle.4</title>		<desc>1 to 2 stop bits</desc>		<v:userdefs>			<v:ud v:nameu="visVersion" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="41.9224" cy="242.539" width="83.85" height="36.473"></v:textrect>		<rect x="0" y="224.302" width="83.846" height="36.473" class="st2"></rect>		<text x="18.25" y="238.64" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>1 <tspan class="st4">到</tspan> 2 <tspan class="st4">个<v:lf></v:lf></tspan><tspan x="23.92" dy="1.3em" class="st4">停止位</tspan></text>		</g>	<g id="shape5-25" v:mid="5" v:groupcontext="shape" transform="translate(281.759,41.2796) rotate(90)">		<title>Left Brace</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<path d="M64.3 260.78 A90.7892 86.0816 90 0 1 32.15 206.52 L32.15 -10.48 L0 -10.48 L32.15 -10.48 L32.15 -227.49 A90.7892					 86.0816 90 0 1 64.3 -281.74 L64.3 260.78 Z" class="st6"></path>		<path d="M64.3 260.78 A90.7892 86.0816 90 0 1 32.15 206.52 L32.15 -10.48 L0 -10.48 L32.15 -10.48 L32.15 -227.49 A90.7892					 86.0816 90 0 1 64.3 -281.74" class="st7"></path>	</g>	<g id="shape6-28" v:mid="6" v:groupcontext="shape" transform="translate(135.036,216.385) rotate(-90)">		<title>Left Brace.9</title>		<v:userdefs>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<path d="M56.28 260.78 A75.3468 51.4493 180 0 1 28.14 230.03 L28.14 107.06 L0 107.06 L28.14 107.06 L28.14 -15.92 A75.3468					 51.4493 180 0 1 56.28 -46.66 L56.28 260.78 Z" class="st6"></path>		<path d="M56.28 260.78 A75.3468 51.4493 180 0 1 28.14 230.03 L28.14 107.06 L0 107.06 L28.14 107.06 L28.14 -15.92 A75.3468					 51.4493 180 0 1 56.28 -46.66" class="st7"></path>	</g>	<g id="shape7-31" v:mid="7" v:groupcontext="shape" transform="translate(257.32,-220.796)">		<title>工作表.7</title>		<desc>Packet</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="34.9352" cy="250.036" width="69.88" height="21.4795"></v:textrect>		<rect x="0" y="239.296" width="69.8716" height="21.4795" class="st8"></rect>		<text x="16.94" y="253.94" class="st9" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>数据包</text>		</g>	<g id="shape8-34" v:mid="8" v:groupcontext="shape" transform="translate(200.096,-18.5005)">		<title>工作表.8</title>		<desc>Data frame</desc>		<v:userdefs></v:userdefs>		<v:textblock v:margins="rect(3.99999,3.99999,3.99999,3.99999)"></v:textblock>		<v:textrect cx="41.9224" cy="247.888" width="83.85" height="25.7754"></v:textrect>		<rect x="0" y="235" width="83.846" height="25.7754" class="st8"></rect>		<text x="23.92" y="251.79" class="st9" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>数据帧</text>		</g></g>
</svg>

## 串口特性

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

下表描述了应用程序的UART传输模式。

Table : UART 传输模式

| 子系统 | 传输模式 | 说明 |
| --- | --- | --- |
| Linux | <ul class="ul" id="uart_features__ul_xkv_gyg_rcc"><br>                                <li class="li">FIFO（低速）</li><br><br>                                <li class="li">CPU DMA（高速）</li><br><br>                            </ul> | <ul class="ul" id="uart_features__ul_hsh_lyg_rcc"><br>                                <li class="li">支持 300 bps 至 4 Mbps 的波特率。</li><br><br>                                <li class="li">FIFO 模式在其 Rx/Tx 缓存和系统内存之间传输数据</li><br><br>                                <li class="li">DMA 模式在其 Rx/Tx 缓存和系统内存之间传输数据。如果使用支持更高波特率和更大数据包的高速 UART 驱动器，可以实现更高的性能。例如，蓝牙无线技术连接模块。 </li><br><br>                            </ul> |
| Boot | FIFO | <ul class="ul" id="uart_features__ul_g5g_ryg_rcc"><br>                                <li class="li">Rx/Tx 每个字符 5 位至 8 位。</li><br><br>                                <li class="li">最高支持 115200 的波特率。</li><br><br>                            </ul> |
| aDSP | FIFO | <ul class="ul" id="uart_features__ul_ocm_tyg_rcc"><br>                                <li class="li">Rx/Tx 每个字符 5 位至 8 位。</li><br><br>                                <li class="li">支持的波特率：115200、230400、460800、921600、1000000、3000000 和 6000000。</li><br><br>                            </ul> |

## UART 接口组件

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

下表提供了不同子系统的 UART 驱动程序配置路径。

Table : UART 接口：Linux

| 文件类型 | 说明 |
| --- | --- |
| 设备树源 | <ul class="ul" id="uart_interface__ul_ysx_dgf_ncc"><br>                                    <li class="li">QCS6490 和 QCS5430：<a href="https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi')">https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi</a></li><br><br>                                    <li class="li"><span class="ph">Dragonwing IQ-9075</span>: <a href="https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi')">https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi</a></li><br><br>                                    <li class="li"><span class="ph">Dragonwing IQ-615</span>: <a href="https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16')">https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16</a></li><br><br>                                </ul> |
| `Pinctrl`设置 | <ul class="ul" id="uart_interface__ul_hsz_14w_41c"><br>                                    <li class="li">相应的 QUP v3 串行引擎的引脚控制表位于 <span class="ph filepath">&lt;workspace_path_of_LINUX_kernel_image&gt;/sources/kernel/kernel_platform/kernel/arch/arm64/boot/dts/qcom/&lt;chipset&gt;.dts</span>。</li><br><br>                                    <li class="li">关于覆盖芯片产品的 DTSI 配置示例，请参阅以下 DTSI 文件。<ul class="ul" id="uart_interface__ul_gdv_vhf_ncc"><br>                                            <li class="li">QCS6490 和 QCS5430：<a href="https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi')">https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi</a></li><br><br>                                            <li class="li"><span class="ph">Dragonwing IQ-9075</span>: <a href="https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi')">https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi</a></li><br><br>                                        </ul><br></li><br><br>                                    <li class="li"><span class="ph">Dragonwing IQ-615</span>: <a href="https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16" target="_blank" class="xref cursorpointer" onclick="Window.BookmapComponent.navigateExternalFile('https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16')">https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16</a></li><br><br>                                </ul> |
| Qualcomm TEE 设置 | <ul class="ul" id="uart_interface__ul_opt_vp3_vdc"><br>                                    <li class="li"><span class="ph filepath">/firmware/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem/TZ.XF.5.0/trustzone_images/core/settings/buses/qup_accesscontrol/qupv3/config/&lt;chipset&gt;/QUPAC_Access.c</span></li><br><br>                                </ul><br>. |

Table : UART 接口：Boot（仅限 UEFI）

| 文件类型 | 说明 |
| --- | --- |
| QUP v3 串行引擎配置 | <ul class="ul" id="uart_interface__ul_hdm_wp3_vdc"><br>                                    <li class="li"><span class="ph filepath">/firmware/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem/BOOT.MXF.1.0.c1/boot_images/boot/QcomPkg/SocPkg/&lt;chipset&gt;/Settings/UART/UartSettings.c</span></li><br><br>                                </ul> |
| Qualcomm TEE 设置 | <ul class="ul" id="uart_interface__ul_r21_xp3_vdc"><br>                                    <li class="li"><span class="ph filepath">/firmware/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem/TZ.XF.5.0/trustzone_images/core/settings/buses/qup_accesscontrol/qupv3/config/&lt;chipset&gt;/QUPAC_Access.c</span></li><br><br>                                </ul> |

Table : UART 接口：aDSP/SLPI

| 文件类型 | 说明 |
| --- | --- |
| QUP v3 串行引擎配置 | <ul class="ul" id="uart_interface__ul_lrk_1hn_rzb"><br>                                    <li class="li"><span class="ph filepath">/firmware/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem/ADSP.HT.5.5.c8/adsp_proc/core/settings/buses/qup_common/config/&lt;chipset&gt;/adsp/ssc/qup_devcfg.c</span></li><br><br>                                    <li class="li"><span class="ph filepath">/firmware/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem/ADSP.HT.5.5.c8/adsp_proc/core/settings/buses/qup_fw/config/&lt;chipset&gt;/fw_devcfg.c</span></li><br><br>                                </ul> |
| 固件配置设置 | <ul class="ul" id="uart_interface__ul_wpr_p5j_51c"><br>                                    <li class="li"><span class="ph filepath">/firmware/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem/ADSP.HT.5.5.c8/adsp_proc/core/settings/buses/qup_fw/config/&lt;chipset&gt;/fw_devcfg.c</span></li><br><br>                                    <li class="li"><span class="ph filepath">/firmware/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem/ADSP.HT.5.5.c8/adsp_proc/core/settings/buses/qup_fw/config/&lt;chipset&gt;/fw_devcfg.xml</span></li><br><br>                                </ul> |

### UART API

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

本节列出了以下子系统的 UART API。

- Linux：[https://github.com/torvalds/linux/blob/master/include/linux/tty.h](https://github.com/torvalds/linux/blob/master/include/linux/tty.h)
- Boot：QcomPkg/Include/HSUart.h
- aDSP: adsp\_proc/core/api/buses/uart.h

## UART 软件设备树配置

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

本节提供 UART 设备树配置的相关信息，以及设备节点的相关文档。

### Linux

有关内核设备实例的信息，请参阅 [https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/serial/qcom%2Cserial-geni-qcom.yaml](https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/serial/qcom%2Cserial-geni-qcom.yaml)。

有关 UART 驱动程序文件的信息，请参阅 [https://github.com/torvalds/linux/blob/master/drivers/tty/serial/qcom_geni_serial.c](https://github.com/torvalds/linux/blob/master/drivers/tty/serial/qcom_geni_serial.c)。

    uart7: serial@99c000 {
    /* Manufacturer model of serial driver */
    compatible = "qcom,geni-uart";
    /* SE address and size */
    reg = <0 0x0099c000 0 0x4000>;
    /*Clocks for SE */
    clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>;
    clock-names = "se";
    /* pinctrl setting */
    pinctrl-names = "default";
    pinctrl-0 = <&qup_uart7_cts>, <&qup_uart7_rts>, <&qup_uart7_tx>, <&qup_uart7_rx>;
    interrupts = <GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>;
    power-domains = <&rpmhpd SC7280_CX>;
    operating-points-v2 = <&qup_opp_table>;
    interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>,
    <&gem_noc MASTER_APPSS_PROC 0 &cnoc2 SLAVE_QUP_0 0>;			interconnect-names = "qup-core", "qup-config";
    /* To enable QUPV3 serial engine instance for UART protocol, change Status to OK */			status = "disabled";		};	}Copy to clipboard

关于串行引擎 GPIO 的配置设置，请参阅以下 DTSI 文件。
- QCS6490 和 QCS5430：[https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi](https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi)
- Dragonwing IQ-9075: [https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi](https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi)
- Dragonwing IQ-615: [https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16](https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16)

    qup_uart7_cts: qup-uart7-cts-state {			pins = "gpio28";			function = "qup07";		};
    		qup_uart7_rts: qup-uart7-rts-state {			pins = "gpio29";			function = "qup07";		};
    		qup_uart7_tx: qup-uart7-tx-state {			pins = "gpio30";			function = "qup07";		};
    		qup_uart7_rx: qup-uart7-rx-state {			pins = "gpio31";			function = "qup07";		};
    Copy to clipboard

Note: Qualcomm TEE 配置必须在 QUPAC\_Access.c文件内保持一致，以确保可以使用 GPIO/QUP v3。您可以在 /firmware/qualcomm-linux-spf-1-0\_ap\_standard\_oem\_nomodem/TZ.XF.5.0/trustzone\_images/core/settings/buses/qup\_accesscontrol/qupv3/config/&lt;chipset&gt;/QUPAC\_Access.c访问 Qualcomm TEE 镜像。修改所需的设置，或者参考针对 QUP v3 串行引擎的特定实例分配的默认设置。

QUP v3 既支持启用流量控制的 4 线制 UART，也支持未启用流量控制的 2 线制 UART。以下是 Qualcomm TEE 访问的示例，用于控制进入这两种模式。用于启用 UART 协议的 QUP v3 串行引擎配置如下：
- 针对 SE7 启用的默认配置（作为 HS UART）

        { QUPV3_0_SE7, QUPV3_PROTOCOL_UART_4W, QUPV3_MODE_FIFO, AC_HLOS, TRUE, TRUE, FALSE }, Copy to clipboard
- 针对 SE5 的 2 线制 UART 配置

        uart5: serial@994000 {
        compatible = "qcom,geni-uart";
        reg = <0 0x00994000 0 0x4000>;
        clocks = <&gcc GCC_QUPV3_WRAP0_S5_CLK>;
        clock-names = "se";
        pinctrl-names = "default";
        pinctrl-0 =  <&qup_uart5_tx>, <&qup_uart5_rx>;
        interrupts = <GIC_SPI 606 IRQ_TYPE_LEVEL_HIGH>;
        power-domains = <&rpmhpd SC7280_CX>;
        operating-points-v2 = <&qup_opp_table>;
        interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>,
            <&gem_noc MASTER_APPSS_PROC 0 &cnoc2 SLAVE_QUP_0 0>;
        interconnect-names = "qup-core", "qup-config";
        status = "disabled";
        };Copy to clipboard

        { QUPV3_0_SE5, QUPV3_PROTOCOL_UART_2W, QUPV3_MODE_FIFO,
        AC_HLOS, TRUE, FALSE, FALSE },Copy to clipboard

### Boot

在 boot 中，可使用 /firmware/qualcomm-linux-spf-1-0\_ap\_standard\_oem\_nomodem/BOOT.MXF.1.0.c1/boot\_images/boot/QcomPkg/SocPkg/&lt;chipset&gt;/Settings/UART/UartSettings.c文件将 QUP v3 串行引擎配置为 UART。

    UART_PROPERTIES devices =
    {
       // MAIN_PORT
       0x00994000,    // Serial Engine Base address
       0x009C0000,// qup_common base address
       0x2001c161,  // GPIO TX pin Config
       0x2000c171,  // GPIO RX Pin Config
       0,           // gpio_cts_config
       0,           // gpio_rfr_config
       0,           // clock_id_index
       (void*)0,        // bus_clock_id
       (void*)CLK_QUPV3_WRAP0_S5,     // core_clock_id
       0,          // irq number not used
       0,  //TCSR base
       0,  // TCSR offset
       0   // TCSR value
    
    };
    Copy to clipboard

**GPIO 配置**
下表列出了 GPIO 配置。

Table : UART GPIO 配置

| 位 | 参数 |
| :---: | --- |
| [0:3] | GPIO 功能 |
| [4:13] | GPIO 编号 |
| [14] | 方向 |
| [15:17] | 上下拉类型 |
| [18:21] | 驱动强度 |

您必须根据以下位字段配置每个 GPIO。

    <!--
    GPIO configuration calculation
    
    GPIO DIR values
    GPIO_INPUT = 0x0
    GPIO_OUTPUT = 0x1
    
    GPIO_PULL values
    GPIO_NO_PULL = 0, /**< -- Do not specify a pull. */
    GPIO_PULL_DOWN = 0x1, /**< -- Pull the GPIO down. */
    GPIO_KEEPER_ENABLE = 0x2, /**< -- Keeper Enable. */
    GPIO_PULL_UP = 0x3, /**< -- Pull the GPIO up. */
    
    GPIO_DRV_STRENGTH values
    GPIO_2P0MA = 0, /**< -- Specify a 2 mA drive. */
    GPIO_4P0MA = 0x1, /**< -- Specify a 4 mA drive. */
    GPIO_6P0MA = 0x2, /**< -- Specify a 6 mA drive. */
    GPIO_8P0MA = 0x3, /**< -- Specify a 8 mA drive. */
    
    GPIO_FUNC_SELECT_Value
    GPIO_FS_VAL =0, //Specifies GPIO function
    
    GPIO_FS_VAL =0X1, //Specify NON GPIO function( UART/SPI/I2C)
    GPIO configuration = (GPIO_NUM & 0xFF) << 0x10 |
    (GPIO_FS_VAL & 0xF) << 0xC |
    (GPIO_DRV_STRENGTH & 0xF) << 0x8 |
    (GPIO_PULL & 0xF) << 0x4 |
    (GPIO_DIR & 0xF)
    
    -->
    /*
    | RESERVED | GPIO NUM | DRIVE | FUNC | PULL | DIR |
    -------------------------------------------------------------------------
    | 0000 | 0000 | 0001 | 1110 | 0001 | 0001 | 0010 | 0001 |
    -------------------------------------------------------------------------
    */Copy to clipboard

### aDSP

固件在 aDSP 子系统的启动序列期间加载 SSC QUP。因此，配置文件位于 aDSP 编译版本 (/firmware/qualcomm-linux-spf-1-0\_ap\_standard\_oem\_nomodem/ADSP.HT.5.5.c8/adsp\_proc/core/settings/buses/qup\_fw/config/&lt;chipset&gt;/fw\_devcfg.c) 中。

以下配置是在 FIFO 模式下向 SSC QUP SE5/6 中加载 UART 固件的示例。

                       offset,        protocol,   mode,  load_fw, dfs_mode
    se_cfg se0_cfg = { 0x80000, SE_PROTOCOL_I3C,    GSI,     TRUE, TRUE  };
    se_cfg se1_cfg = { 0x84000, SE_PROTOCOL_I2C,    GSI,     TRUE, TRUE  };
    se_cfg se2_cfg = { 0x88000, SE_PROTOCOL_I2C,    GSI,     TRUE, TRUE  };
    se_cfg se3_cfg = { 0x8C000, SE_PROTOCOL_I2C,    GSI,     FALSE, TRUE  };
    se_cfg se4_cfg = { 0x90000, SE_PROTOCOL_SPI,    GSI,     TRUE, TRUE };
    se_cfg se5_cfg = { 0x94000, SE_PROTOCOL_UART,   FIFO,    TRUE,FALSE };
    se_cfg se6_cfg = { 0x98000, SE_PROTOCOL_UART,   FIFO,    TRUE,FALSE  };
    Copy to clipboard

GPIO 配置：QUP 通用驱动程序中的每个串行引擎都根据协议配置了默认的 GPIO 配置。QUP v3 通用驱动程序可根据 /firmware/qualcomm-linux-spf-1-0\_ap\_standard\_oem\_nomodem/ADSP.HT.5.5.c8/adsp\_proc/core/settings/buses/qup\_common/config/&lt;chipset&gt;/adsp/ssc/qup\_instance\_mapping.c中串行引擎中加载的协议选择 GPIO 配置。

可按照如下所示覆盖默认 GPIO 配置。

    {      .instance_id          =  6 ,         //Instance ID
            .qup              =  QUP_SSC,    //QUP Type
            .se_index         =  5,          //SE ID
            .se_data          =  NULL,       //devcfg_map
            .protocol_io_cfg  =  {
                                    TLMM_MAP(TLMM_GPIO_KEEPER ,TLMM_GPIO_2MA,TLMM_GPIO_KEEPER ),              //SLEEP CFG
                                    TLMM_MAP(TLMM_GPIO_NO_PULL,TLMM_GPIO_6MA,TLMM_GPIO_KEEPER ),              //SPI CFG
                                    TLMM_MAP(TLMM_GPIO_NO_PULL,TLMM_GPIO_2MA,TLMM_GPIO_NO_PULL),              //UART CFG
                                    TLMM_MAP(TLMM_GPIO_PULL_UP,TLMM_GPIO_2MA,TLMM_GPIO_NO_PULL),              //I2C CFG
                                    TLMM_MAP(TLMM_GPIO_PULL_UP,TLMM_GPIO_2MA,TLMM_GPIO_KEEPER )               //I3C CFG
                                 },
            .se_exclusive     =  TRUE,
    }
    Copy to clipboard

TLMM\_MAP 是用于初始化活动和休眠状态 GPIO 配置的宏。以下为 TLMM\_MAP 宏的使用示例。

    TLMM_MAP (active state pull type, drive strength, sleep state pull type)Copy to clipboard

## 在 UART 中启用虚拟化 

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

本节介绍从客户虚拟机客户端到主机硬件端口的高层流程，该流程将基于内核的虚拟机 (KVM) 视为虚拟机。应该对虚拟化、管理程序和虚拟机技术有基本的了解。

Table : 虚拟化功能

| 虚拟化组件 | 功能介绍 |
| --- | --- |
| VirtIO | <ul class="ul" id="uart-support-for-virtualisation__ul_gfg_t23_pdc"><br>                                <li class="li">为半虚拟化管理程序中的一组常见模拟设备提供抽象</li><br><br>                                <li class="li">使用 UART 设备端口并处理应用程序请求。确保在 KVM 上支持 VirtIO 或虚拟功能输入/输出 (VFIO)</li><br><br>                                <li class="li">为设备仿真提供通用前端，以标准化接口并提高跨平台的代码重用。</li><br><br>                                <li class="li">支持实现 VirtIO 标准的虚拟化环境，例如 QEMU/KVM。 </li><br><br>                            </ul> |
| Hypervisor | <ul class="ul" id="uart-support-for-virtualisation__ul_p1t_bf3_pdc"><br>                                <li class="li">为通用应用程序编程接口 (API) 导出一组通用的模拟设备。</li><br><br>                                <li class="li">实现一组通用接口，并在一组后端驱动程序后面进行特定设备模拟</li><br><br>                            </ul> |

### 客户虚拟机中通过 UART 实现的 ZigBee 使用案例

要识别设备字符名称，请将 Linux 中的 ZigBee 接口枚举为串行接口。例如，如果 ZigBee 通过 UART 连接，则枚举为 /dev/MSMx。

Note: 本节以 /dev/MSM0为例。将其替换为实际的字符设备 ID。

1. 通过运行以下命令禁用 SELinux。

        setenforce 0Copy to clipboard
2. 要启用 KVM，请执行以下操作：
    1. 将设备启动至 UEFI。
    2. 在 BDS 菜单中选择选项 17进入 UEFI 菜单。
    3. 选择选项 25进入操作系统配置选择菜单。
    4. 使用向上箭头将操作系统类型增加至 2（带 KVM 的 Linux）。
    5. 选择 Enter Power Cycle设备。等待设备上线。
    6. 验证设备节点。 

            ls /dev/kvmCopy to clipboard
3. 从 workspace&gt;\builds\kvm\gunyah\_k2l\svm\lemans\_svm\svm\Image.gz推送 KVM 镜像。

        adb push Image /mnt/overlay/Copy to clipboard
4. 从 workspace&gt;pkondeti\builds\kvm\gunyah\_k2l\svm\lemans\_svm\svm\yocto.cpio.gz推送 `initrd` 启动镜像。

        adb push yocto.cpio /mnt/overlay/Copy to clipboard
5. 要将设备连接到 guest 虚拟机，用户可以使用以下两个选项之一。
    - 选项 **A**: 对于快速模拟器 (QEMU) 虚拟器，使用以下命令将 /dev/ttyMSM0 字符设备连接至客户虚拟机。

            qemu-system-aarch64 \
                    -M virt -m 2G \
                    -initrd <your_initrd> \
                    -kernel <your_kernel> \
                    -device virtio-serial-pci \
                    -chardev tty,path=/dev/ttyMSM0,id=char0 \
                    -device virtserialport,chardev=char0,name=zigbee \
                    -cpu host --enable-kvm -smp 4 -nographicCopy to clipboard
    - 选项 **B**: 对于 `libvirt` 虚拟器，将以下值复制至 [https://github.qualcomm.com/pkondeti/qli_virt_recipes/blob/main/example/hk-vm.xml](https://github.qualcomm.com/pkondeti/qli_virt_recipes/blob/main/example/hk-vm.xml) 处的文件中。

            <channel type='dev'>                                                                                                                                       
                <source path='/dev/ttyMSM0'/>                                                                                                                            
                <target type='virtio' name='zigbee'/>                                                                                                                    
                <alias name='zigbee'/>                                                                                                                                   
                <address type='virtio-serial'/>                                                                                          
            </channel>Copy to clipboard
6. 要查找并验证 `virtio-serial`虚拟串行端口，请运行以下命令列出所有端口。

        ls /dev/virtio-ports/zigbeeCopy to clipboard
7. 验证虚拟端口连接。

        echo "hello from guest" >> /dev/virtio-ports/zigbeeCopy to clipboard

输出：

        Hello from guestCopy to clipboard

## UART 工具

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

本节介绍 UART 串行接口驱动程序的各种测试工具和方法，用于确认 UART 数据传输。

### Linux

更多详细信息，可访问 [https://docs.kernel.org/admin-guide/serial-console.html](https://docs.kernel.org/admin-guide/serial-console.html)。

## 在内核中启用 UART

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

本节介绍如何在内核中启用 UART。

### Linux

需要以下驱动程序内核配置才能支持 UART 接口。
- UART 驱动程序：[https://github.com/torvalds/linux/blob/master/drivers/tty/serial/qcom_geni_serial.c](https://github.com/torvalds/linux/blob/master/drivers/tty/serial/qcom_geni_serial.c)
- 内核 `defconfig`文件路径：&lt;workspace\_path\_of\_LINUX\_kernel\_image&gt;/sources/kernel
                            /kernel\_platform/kernel/arch/arm64/configs/qcom\_defconfig

启用以下内核配置。
- `CONFIG_QCOM_GENI_SE=y`
- `CONFIG_SERIAL_QCOM_GENI=y`

要启用串行节点进行环回验证，需对 /arch/arm64/boot/dts/qcom/&lt;chipset&gt;.dtsi文件应用以下补丁。

    --- a/arch/arm64/boot/dts/qcom/<chipset>.dtsi
    +++ b/arch/arm64/boot/dts/qcom/<chipset>.dtsi
    @@ -70,6 +70,7 @@
     		spi13 = &spi13;
     		spi14 = &spi14;
     		spi15 = &spi15;
    +		serial1 = &uart7;
    }; 

    +
    +&uart7 {
    +	status = "ok";
    +}; 
    Copy to clipboard

Note: 您应该编译内核配置和设备树更改。编译完成后，您可通过将镜像加载到设备上来验证接口。关于接口验证的信息，请参阅 [验证 UART 接口](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html#uart_verification)部分。

### Boot/aDSP

有关定制的信息，请参阅 [UART 软件设备树配置](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html#uart_software)部分。

## UART 定制

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

有关定制 UART 软件的信息，请参阅 [QUP v3 访问控制定制](https://docs.qualcomm.com/doc/80-70020-8SC/topic/references.html#customize-access-control-of-qup)。

## 验证 UART 接口

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

本节介绍 UART 驱动程序的验证步骤，以及 Qualcomm 驱动程序的测试结果。

### Linux

请执行以下操作并编译内核配置，以便启用 UART 节点。
1. 要将 UART 状态更改为 OK并将别名更改为特定 UART 节点，请编辑以下 DTSI 文件。
    - QCS6490 和 QCS5430：[https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi](https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi)
    - Dragonwing IQ-9075: [https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi](https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi)
    - Dragonwing IQ-615: [https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16](https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16)

Note: 启用 SSH shell 或使用 ADB shell 运行命令，并在 SSH shell（控制台）窗口中显示输出。有关如何运行 SSH 的更多信息，请参阅 [使用 SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-254/how_to.html) 部分。

        aliases {
        i2c0 = &i2c0;
        spi15 = &spi15;
        ++serial1 = &uart7;
        };
        uart7: serial@99c000 {
        compatible = "qcom,geni-uart";
        reg = <0 0x0099c000 0 0x4000>;
        clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>;
        clock-names = "se";
        pinctrl-names = "default";
        pinctrl-0 = <&qup_uart7_cts>, <&qup_uart7_rts>, <&qup_uart7_tx>,
        <&qup_uart7_rx>;
        interrupts = <GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>;
        power-domains = <&rpmhpd SC7280_CX>;
        operating-points-v2 = <&qup_opp_table>;
        interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0
        0>,
        <&gem_noc MASTER_APPSS_PROC 0 &cnoc2 SLAVE_QUP_0 0>;
        interconnect-names = "qup-core", "qup-config";
        ++status = "ok";
        };Copy to clipboard
2. 禁用 [https://github.com/torvalds/linux/blob/master/drivers/tty/serial/qcom_geni_serial.c](https://github.com/torvalds/linux/blob/master/drivers/tty/serial/qcom_geni_serial.c)文件的 qcom\_geni\_serial.c 中的 `if` 条件进行环回测试。

        //if (mctrl & TIOCM_LOOP) // Disabling the if condition for loopback test
        port->loopback = RX_TX_CTS_RTS_SORTED;Copy to clipboard

要在 Linux 内核中验证 QUP v3 UART 注册功能，应确保已向 TTY 层正确注册 UART。

1. 在以下 DTSI 文件中禁用 UART 默认用例。
    - QCS6490 和 QCS5430：[https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi](https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi)
    - Dragonwing IQ-9075: [https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi](https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi)
    - Dragonwing IQ-615: [https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16](https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16)

        bluetooth: bluetooth {
        
               ++      status = "disabled";
        Copy to clipboard

随即显示以下输出。

        ls /dev/ttyHS1
        /dev/ttyHS1
        dmesg | grep ttyH
        [    3.355487] 99c000.serial: ttyHS1 at MMIO 0x99c000 (irq = 137, base_baud = 0) is a MSMCopy to clipboard
2. 要验证 UART 驱动程序，应进行以下操作：
    1. 以 permissive 模式打开 SSH shell 或使用 ADB shell。
    2. 注册 UART。

            ls /dev/ttyHS*Copy to clipboard

以下为示例输出。

            ls /dev/ttyHS*
            /dev/ttyHS1
            Copy to clipboard

根据为 `ttyHS1`添加的别名映射 `serial1 = &uart7` 端口并启用串行引擎。

随后将列出在内核中注册的 UART 设备。UART 驱动程序遵循测试步骤来启用环回。在 DUT 中启用 UART 节点后，运行以下命令以验证 DTSI 文件中是否启用了 UART 实例。
                    
Note: 打开两个 SSH shell 或使用 ADB shell 为 UART 环回写入和读取数据。有关如何运行 SSH 的更多信息，请参阅[使用 SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-254/how_to.html) 部分。

1. 以 permissive 模式打开 SSH shell 或使用 ADB shell。
2. 使用 `echo`命令传输数据。

        echo "This Document Is Very Much Helpful" > /dev/ttyHS1Copy to clipboard
3. 读取 UART 设备节点中的数据。

        cat /dev/ttyHS1Copy to clipboard

## 调试 UART 问题

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

本节介绍如何启用 UART 软件驱动程序中的调试日志。

### Linux

通过动态调试方法启用 UART 驱动程序日志。启用 &lt;workspace\_path\_of\_LINUX\_kernel\_image&gt;/sources/kernel/kernel\_platform/kernel/arch/arm64/configs/qcom\_defconfig中的 `CONFIG_DYNAMIC_DEBUG` 以支持内核驱动程序的动态调试。

要在内核日志 (`dmesg`) 中启用和查看 UART 驱动程序日志，应运行以下命令。

    mount -t debugfs none /sys/kernel/debug
    echo -n "file qcom_geni_serial.c +p" > /sys/kernel/debug/dynamic_debug/control
    echo -n "file qcom-geni-se.c +p" > /sys/kernel/debug/dynamic_debug/control
    echo -n "file serial_core.c +p" > /sys/kernel/debug/dynamic_debug/control
    echo -n "file gpi.c +p" > /sys/kernel/debug/dynamic_debug/control
    Copy to clipboard

## UART 示例

Source: [https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html](https://docs.qualcomm.com/doc/80-70020-8SC/topic/uart.html)

有关上游设备树参考的信息，请参阅以下 DTSI 文件。
- QCS6490 和 QCS5430：[https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi](https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/sc7280.dtsi)
- Dragonwing IQ-9075: [https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi](https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi)
- Dragonwing IQ-615: [https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16](https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16)

有关 Qualcomm Linux 硬件 SoC 的设备树节点的信息，请参阅以下 DTSI 文件。
- QCS6490 和 QCS5430：[https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts](https://git.linaro.org/kernel-org/linux-next.git/tree/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts)
- Dragonwing IQ-9075: [https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi](https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/qcom/sa8775p.dtsi)
- Dragonwing IQ-615: [https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16](https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/qcs615.dtsi?h=arm64-for-6.16)

Last Published: Jul 23, 2025

[Previous Topic
入门指南：设置设备接口](https://docs.qualcomm.com/bundle/publicresource/80-70020-8SC/topics/get-started.md) [Next Topic
SPI](https://docs.qualcomm.com/bundle/publicresource/80-70020-8SC/topics/spi.md)