<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LayerscapeのトピックRe: QE / UCC UART on LS1088</title>
    <link>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1453399#M10509</link>
    <description>&lt;P&gt;As described above, I already modified my U-Boot to load the uQE binary.&lt;/P&gt;&lt;P&gt;Since my board is based on TF-A I changed U-Boot so I can supply the binary via the &lt;EM&gt;qe fw&lt;/EM&gt; command which does:&lt;/P&gt;&lt;PRE&gt;qe_immr = (qe_map_t *)(CONFIG_SYS_IMMR + QE_IMMR_OFFSET);
if (!u_qe_upload_firmware((const struct qe_firmware *)addr)) {
	out_be32(&amp;lt;qe_immr-&amp;gt;iram.iready, QE_IRAM_READY);
	return CMD_RET_SUCCESS;
}&lt;/PRE&gt;&lt;P&gt;Any idea if my device tree settings (particularly bus/clock) is correct?&lt;/P&gt;&lt;P&gt;I could not find any device tree for the LS1088A with the uQE defined, so I made a guess based on the content of LS1088ARM.&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 09:15:41 GMT</pubDate>
    <dc:creator>mcbridematt</dc:creator>
    <dc:date>2022-05-05T09:15:41Z</dc:date>
    <item>
      <title>QE / UCC UART on LS1088</title>
      <link>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1451060#M10482</link>
      <description>&lt;P&gt;I'm trying to see if I can use the QUICC Engine (QE) on the LS1088A to get two extra four wire UARTs.&lt;/P&gt;&lt;P&gt;I'm not getting any characters in or out of either UC1/UC3 TXD/RXD&lt;/P&gt;&lt;P&gt;So far I have:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Set IRQ_EXT=2 so IRQ[3:9] is mapped to the UC1/UC3 UART functions&lt;/LI&gt;&lt;LI&gt;Set IIC4_EXT=3 so IIC4 SDA/SCL is mapped to UC1/UC3 CDB (carrier detect).&lt;BR /&gt;RCWSR12 reads back:&lt;PRE&gt;md 1e0012C 1
01e0012c: 02000600&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Added this to fsl-ls1088a.dtsi, based on the content of fsl-ls1043a.dtsi. I changed the clock and IRQ settings as appropriate:&lt;BR /&gt;&lt;PRE&gt;uqe: uqe@2400000 {
	#address-cells = &amp;lt;1&amp;gt;;
	#size-cells = &amp;lt;1&amp;gt;;
	device_type = "qe";
	compatible = "fsl,qe", "simple-bus";
	ranges = &amp;lt;0x0 0x0 0x2400000 0x40000&amp;gt;;
	reg = &amp;lt;0x0 0x2400000 0x0 0x480&amp;gt;;
	brg-frequency = &amp;lt;150000000&amp;gt;; /* BRG is 1/2 of the QE bus frequency? */
	bus-frequency = &amp;lt;350000000&amp;gt;; /* QE gets 1/2 of the platform clock 700MHz */
	fsl,qe-num-riscs = &amp;lt;1&amp;gt;;
	fsl,qe-num-snums = &amp;lt;28&amp;gt;;
	status = "disabled";
	qeic: qeic@80 {
		compatible = "fsl,qe-ic";
		reg = &amp;lt;0x80 0x80&amp;gt;;
		#address-cells = &amp;lt;0&amp;gt;;
		interrupt-controller;
		#interrupt-cells = &amp;lt;1&amp;gt;;
		interrupts = &amp;lt;GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH&amp;gt;,
			&amp;lt;GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH&amp;gt;;
	};
	si1: si@700 {
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;0&amp;gt;;
		compatible = "fsl,ls1043-qe-si",
				"fsl,t1040-qe-si";
		reg = &amp;lt;0x700 0x80&amp;gt;;
	};
	siram1: siram@1000 {
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;
		compatible = "fsl,ls1043-qe-siram",
				"fsl,t1040-qe-siram";
		reg = &amp;lt;0x1000 0x800&amp;gt;;
	};

	ucc1: ucc@2000 {
		cell-index = &amp;lt;1&amp;gt;;
		reg = &amp;lt;0x2000 0x200&amp;gt;;
		interrupts = &amp;lt;32&amp;gt;;
		interrupt-parent = &amp;lt;&amp;amp;qeic&amp;gt;;
	};

	ucc3: ucc@2200 {
		cell-index = &amp;lt;3&amp;gt;;
		reg = &amp;lt;0x2200 0x200&amp;gt;;
		interrupts = &amp;lt;34&amp;gt;;
		interrupt-parent = &amp;lt;&amp;amp;qeic&amp;gt;;
	};

	muram@10000 {
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;
		compatible = "fsl,qe-muram", "fsl,cpm-muram";
		ranges = &amp;lt;0x0 0x10000 0x6000&amp;gt;;
		data-only@0 {
				compatible = "fsl,qe-muram-data",
			"fsl,cpm-muram-data";
				reg = &amp;lt;0x0 0x6000&amp;gt;;
		};
	};
};&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Added this to my device DTS:&lt;BR /&gt;&lt;PRE&gt;&amp;amp;uqe {
	status = "okay";
	ucc@2000 {
		device_type = "serial";
		compatible = "ucc_uart";
		rx-clock-name = "brg1";
		tx-clock-name = "brg1";
		port-number = &amp;lt;0&amp;gt;;
	};
	ucc@2200 {
		device_type = "serial";
		compatible = "ucc_uart";
		rx-clock-name = "brg2";
		tx-clock-name = "brg2";
		port-number = &amp;lt;1&amp;gt;;
	};
};&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Configured U-Boot to load the QE firmware:&lt;BR /&gt;&lt;PRE&gt;Firmware 'Microcode version 0.0.1 for LS1021a r1.0' for 1021 V1.0
QE: uploading microcode 'Microcode for LS1021a r1.0' version 0.0.1&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Applied the patch &lt;A href="https://github.com/torvalds/linux/commit/be7ecbd240b2f9ec544d3ce6fccf4cec3cd15dca" target="_blank"&gt;soc: fsl: qe: convert QE interrupt controller to platform_device&lt;/A&gt; on top of my kernel 5.10.112&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;In my kernel log I see:&lt;/P&gt;&lt;PRE&gt;[    1.532562] 2402000.ucc: ttyQE0 at MMIO 0x2402000 (irq = 107, base_baud = 9375000) is a QE
[    1.540926] ucc_uart 2402000.ucc: UCC1 assigned to /dev/ttyQE0
[    1.546898] 2402200.ucc: ttyQE1 at MMIO 0x2402200 (irq = 108, base_baud = 9375000) is a QE
[    1.555261] ucc_uart 2402200.ucc: UCC3 assigned to /dev/ttyQE1&lt;/PRE&gt;&lt;P&gt;For testing I have made sure the flow control is "disabled":&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Pulled CDB for both UCC's to GND&lt;/LI&gt;&lt;LI&gt;Pulled RTSB to GND&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I can send characters to the ttyQEx and it doesn't &lt;A href="https://community.nxp.com/t5/Layerscape/LS102x-QUICC-UCC-UART/td-p/656859" target="_blank"&gt;freeze&lt;/A&gt;, so I assume the QE firmware is working:&lt;/P&gt;&lt;PRE&gt;# stty -F /dev/ttyQE0
speed 9600 baud; line = 0;
-brkint -imaxbel
# echo "test" &amp;gt; /dev/ttyQE0
# echo "test" &amp;gt; /dev/ttyQE1&lt;/PRE&gt;&lt;P&gt;I can't see any signal activity on any of the UCx pins when characters are sent, and if I try to send characters to the RXD pin I don't see it either.&lt;/P&gt;&lt;P&gt;Is there something I am missing?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 05:09:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1451060#M10482</guid>
      <dc:creator>mcbridematt</dc:creator>
      <dc:date>2022-04-29T05:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: QE / UCC UART on LS1088</title>
      <link>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1453359#M10508</link>
      <description>&lt;P&gt;In u-boot source code, please define the following options in&amp;nbsp; include/configs/ls1088a_common.h.&lt;/P&gt;
&lt;P&gt;CONFIG_U_QE&lt;/P&gt;
&lt;P&gt;CONFIG_SYS_QE_FW_ADDR&lt;/P&gt;
&lt;P&gt;In&amp;nbsp;board/freescale/ls1088a/ls1088a.c, please define the following.&lt;/P&gt;
&lt;P&gt;#ifdef CONFIG_U_QE&lt;BR /&gt;u_qe_init();&lt;BR /&gt;#endif&lt;/P&gt;
&lt;P&gt;Please refer to ls1043ardb as an example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 08:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1453359#M10508</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2022-05-05T08:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: QE / UCC UART on LS1088</title>
      <link>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1453399#M10509</link>
      <description>&lt;P&gt;As described above, I already modified my U-Boot to load the uQE binary.&lt;/P&gt;&lt;P&gt;Since my board is based on TF-A I changed U-Boot so I can supply the binary via the &lt;EM&gt;qe fw&lt;/EM&gt; command which does:&lt;/P&gt;&lt;PRE&gt;qe_immr = (qe_map_t *)(CONFIG_SYS_IMMR + QE_IMMR_OFFSET);
if (!u_qe_upload_firmware((const struct qe_firmware *)addr)) {
	out_be32(&amp;lt;qe_immr-&amp;gt;iram.iready, QE_IRAM_READY);
	return CMD_RET_SUCCESS;
}&lt;/PRE&gt;&lt;P&gt;Any idea if my device tree settings (particularly bus/clock) is correct?&lt;/P&gt;&lt;P&gt;I could not find any device tree for the LS1088A with the uQE defined, so I made a guess based on the content of LS1088ARM.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 09:15:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1453399#M10509</guid>
      <dc:creator>mcbridematt</dc:creator>
      <dc:date>2022-05-05T09:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: QE / UCC UART on LS1088</title>
      <link>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1454919#M10523</link>
      <description>&lt;P&gt;For UCC UART device tree definition, please refer to QE serial definition in&amp;nbsp;arch/powerpc/boot/dts/fsl/p1025rdb.dtsi.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 10:13:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1454919#M10523</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2022-05-09T10:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: QE / UCC UART on LS1088</title>
      <link>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1459708#M10554</link>
      <description>&lt;P&gt;Still stuck on this.&lt;/P&gt;&lt;P&gt;I can verify that the uQE firmware has been loaded and is operational by reading out the microcode version register (CEURNR) and by checking the FLG semaphore after issuing QE commands.&lt;/P&gt;&lt;P&gt;I also configured BRGO2 to output on a pin and can see the output frequency about the same as the serial baud x16.&lt;/P&gt;&lt;P&gt;But:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I can't see any interrupts on the QE-IC (GIC 128)&lt;/LI&gt;&lt;LI&gt;In the UCC UART transmit sequence, the event and status register always read 0.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The lack of interrupts concern me the most, is there any easy way to cause a QE interrupt, preferably without any external pin output/input?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 05:27:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/QE-UCC-UART-on-LS1088/m-p/1459708#M10554</guid>
      <dc:creator>mcbridematt</dc:creator>
      <dc:date>2022-05-18T05:27:38Z</dc:date>
    </item>
  </channel>
</rss>

