<?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>topic LS1046RDB SPI support in U-Boot in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/LS1046RDB-SPI-support-in-U-Boot/m-p/1290657#M8194</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we have used intense the U-Boot SSPI command to check our hardware at production test with a T1042 board.&lt;/P&gt;&lt;P&gt;We want to enable SSPI for our new board, based on LS1046, as well.&lt;/P&gt;&lt;P&gt;unfortunately U-Boot moved from eSPI to DSPI driver model,&lt;/P&gt;&lt;P&gt;and we struggle to enable it.&lt;/P&gt;&lt;P&gt;we have enabled all related CONFIG_DM_SPI stuff,&lt;/P&gt;&lt;P&gt;our device tree looks like this:&lt;/P&gt;&lt;P&gt;in .dtsi&lt;/P&gt;&lt;P&gt;dspi0: dspi@2100000 {&lt;BR /&gt;compatible = "fsl,vf610-dspi";&lt;BR /&gt;#address-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;#size-cells = &amp;lt;0&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0x0 0x2100000 0x0 0x10000&amp;gt;;&lt;BR /&gt;interrupts = &amp;lt;0 64 0x4&amp;gt;;&lt;BR /&gt;clock-names = "dspi";&lt;BR /&gt;clocks = &amp;lt;&amp;amp;clockgen 4 0&amp;gt;;&lt;BR /&gt;num-cs = &amp;lt;4&amp;gt;;&lt;BR /&gt;big-endian;&lt;BR /&gt;status = "disabled";&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in .dts:&lt;/P&gt;&lt;P&gt;model = "LS1046A RDB Board";&lt;/P&gt;&lt;P&gt;aliases {&lt;BR /&gt;spi0 = &amp;amp;dspi0;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&amp;amp;dspi0 {&lt;BR /&gt;bus-num = &amp;lt;0&amp;gt;;&lt;BR /&gt;status = "okay";&lt;BR /&gt;spidev@0x00 {&lt;BR /&gt;compatible = "spidev";&lt;BR /&gt;spi-max-frequency = &amp;lt;20000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but we always get an error:&lt;/P&gt;&lt;P&gt;=&amp;gt; sspi 0:0 8 0&lt;BR /&gt;Invalid bus 0 (err=-19)&lt;/P&gt;&lt;P&gt;we assume, because we don't see an entry in DM tree:&lt;/P&gt;&lt;P&gt;=&amp;gt; dm uclass&lt;BR /&gt;uclass 0: root&lt;BR /&gt;- * root_driver @ fbc42050, seq 0, (req -1)&lt;/P&gt;&lt;P&gt;uclass 10: simple_bus&lt;BR /&gt;- * soc @ fbc42160, seq 0, (req -1)&lt;BR /&gt;- ifc@1530000 @ fbc42230&lt;/P&gt;&lt;P&gt;uclass 19: efi&lt;BR /&gt;uclass 33: usb_mass_storage&lt;BR /&gt;uclass 43: pci&lt;BR /&gt;- * pcie@3400000 @ fbc42610, seq 0, (req -1)&lt;BR /&gt;- * pcie@3500000 @ fbc426c0, seq 2, (req -1)&lt;BR /&gt;- * pcie@3600000 @ fbc42770, seq 4, (req -1)&lt;BR /&gt;- * pci_0:0.0 @ fbc6d4c0, seq 1, (req -1)&lt;BR /&gt;- * pci_2:0.0 @ fbc6d930, seq 3, (req -1)&lt;BR /&gt;- * pci_4:0.0 @ fbc6dde0, seq 5, (req -1)&lt;/P&gt;&lt;P&gt;uclass 44: pci_generic&lt;BR /&gt;uclass 59: spi&lt;BR /&gt;uclass 61: spi_flash&lt;BR /&gt;uclass 62: spi_generic&lt;BR /&gt;uclass 68: usb&lt;BR /&gt;- usb@2f00000 @ fbc42360&lt;BR /&gt;- usb@3000000 @ fbc42430&lt;BR /&gt;- usb@3100000 @ fbc42500&lt;/P&gt;&lt;P&gt;uclass 69: usb_dev_generic&lt;BR /&gt;uclass 70: usb_hub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How we can make it to work ?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jun 2021 10:06:17 GMT</pubDate>
    <dc:creator>micha</dc:creator>
    <dc:date>2021-06-10T10:06:17Z</dc:date>
    <item>
      <title>LS1046RDB SPI support in U-Boot</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1046RDB-SPI-support-in-U-Boot/m-p/1290657#M8194</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we have used intense the U-Boot SSPI command to check our hardware at production test with a T1042 board.&lt;/P&gt;&lt;P&gt;We want to enable SSPI for our new board, based on LS1046, as well.&lt;/P&gt;&lt;P&gt;unfortunately U-Boot moved from eSPI to DSPI driver model,&lt;/P&gt;&lt;P&gt;and we struggle to enable it.&lt;/P&gt;&lt;P&gt;we have enabled all related CONFIG_DM_SPI stuff,&lt;/P&gt;&lt;P&gt;our device tree looks like this:&lt;/P&gt;&lt;P&gt;in .dtsi&lt;/P&gt;&lt;P&gt;dspi0: dspi@2100000 {&lt;BR /&gt;compatible = "fsl,vf610-dspi";&lt;BR /&gt;#address-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;#size-cells = &amp;lt;0&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0x0 0x2100000 0x0 0x10000&amp;gt;;&lt;BR /&gt;interrupts = &amp;lt;0 64 0x4&amp;gt;;&lt;BR /&gt;clock-names = "dspi";&lt;BR /&gt;clocks = &amp;lt;&amp;amp;clockgen 4 0&amp;gt;;&lt;BR /&gt;num-cs = &amp;lt;4&amp;gt;;&lt;BR /&gt;big-endian;&lt;BR /&gt;status = "disabled";&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in .dts:&lt;/P&gt;&lt;P&gt;model = "LS1046A RDB Board";&lt;/P&gt;&lt;P&gt;aliases {&lt;BR /&gt;spi0 = &amp;amp;dspi0;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&amp;amp;dspi0 {&lt;BR /&gt;bus-num = &amp;lt;0&amp;gt;;&lt;BR /&gt;status = "okay";&lt;BR /&gt;spidev@0x00 {&lt;BR /&gt;compatible = "spidev";&lt;BR /&gt;spi-max-frequency = &amp;lt;20000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but we always get an error:&lt;/P&gt;&lt;P&gt;=&amp;gt; sspi 0:0 8 0&lt;BR /&gt;Invalid bus 0 (err=-19)&lt;/P&gt;&lt;P&gt;we assume, because we don't see an entry in DM tree:&lt;/P&gt;&lt;P&gt;=&amp;gt; dm uclass&lt;BR /&gt;uclass 0: root&lt;BR /&gt;- * root_driver @ fbc42050, seq 0, (req -1)&lt;/P&gt;&lt;P&gt;uclass 10: simple_bus&lt;BR /&gt;- * soc @ fbc42160, seq 0, (req -1)&lt;BR /&gt;- ifc@1530000 @ fbc42230&lt;/P&gt;&lt;P&gt;uclass 19: efi&lt;BR /&gt;uclass 33: usb_mass_storage&lt;BR /&gt;uclass 43: pci&lt;BR /&gt;- * pcie@3400000 @ fbc42610, seq 0, (req -1)&lt;BR /&gt;- * pcie@3500000 @ fbc426c0, seq 2, (req -1)&lt;BR /&gt;- * pcie@3600000 @ fbc42770, seq 4, (req -1)&lt;BR /&gt;- * pci_0:0.0 @ fbc6d4c0, seq 1, (req -1)&lt;BR /&gt;- * pci_2:0.0 @ fbc6d930, seq 3, (req -1)&lt;BR /&gt;- * pci_4:0.0 @ fbc6dde0, seq 5, (req -1)&lt;/P&gt;&lt;P&gt;uclass 44: pci_generic&lt;BR /&gt;uclass 59: spi&lt;BR /&gt;uclass 61: spi_flash&lt;BR /&gt;uclass 62: spi_generic&lt;BR /&gt;uclass 68: usb&lt;BR /&gt;- usb@2f00000 @ fbc42360&lt;BR /&gt;- usb@3000000 @ fbc42430&lt;BR /&gt;- usb@3100000 @ fbc42500&lt;/P&gt;&lt;P&gt;uclass 69: usb_dev_generic&lt;BR /&gt;uclass 70: usb_hub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How we can make it to work ?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 10:06:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1046RDB-SPI-support-in-U-Boot/m-p/1290657#M8194</guid>
      <dc:creator>micha</dc:creator>
      <dc:date>2021-06-10T10:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: LS1046RDB SPI support in U-Boot</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1046RDB-SPI-support-in-U-Boot/m-p/1291105#M8200</link>
      <description>&lt;P&gt;You could refer to LS1046AQDS source code as an example.&lt;/P&gt;
&lt;P&gt;RCW: please configure RCW[SPI_EXT]=0&lt;/P&gt;
&lt;P&gt;u-boot source code:&lt;/P&gt;
&lt;P&gt;Please prefer to the following in configs/ls1046aqds_tfa_defconfig&lt;/P&gt;
&lt;P&gt;CONFIG_SPI=y&lt;BR /&gt;CONFIG_DM_SPI=y&lt;BR /&gt;CONFIG_FSL_DSPI=y&lt;/P&gt;
&lt;P&gt;Please refer to the following in include/configs/ls1046aqds.h&lt;/P&gt;
&lt;P&gt;#ifdef CONFIG_FSL_DSPI&lt;BR /&gt;#define CONFIG_SPI_FLASH_STMICRO /* cs0 */&lt;BR /&gt;#define CONFIG_SPI_FLASH_SST /* cs1 */&lt;BR /&gt;#define CONFIG_SPI_FLASH_EON /* cs2 */&lt;BR /&gt;#endif&lt;/P&gt;
&lt;P&gt;In dts, please refer to&amp;nbsp;arch/arm/dts/fsl-ls1046a-qds.dtsi&lt;/P&gt;
&lt;P&gt;/include/ "fsl-ls1046a.dtsi"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;amp;dspi0 {&lt;BR /&gt;bus-num = &amp;lt;0&amp;gt;;&lt;BR /&gt;status = "okay";&lt;/P&gt;
&lt;P&gt;dflash0: n25q128a {&lt;BR /&gt;#address-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;#size-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;compatible = "jedec,spi-nor";&lt;BR /&gt;spi-max-frequency = &amp;lt;1000000&amp;gt;; /* input clock */&lt;BR /&gt;spi-cpol;&lt;BR /&gt;spi-cpha;&lt;BR /&gt;reg = &amp;lt;0&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 05:59:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1046RDB-SPI-support-in-U-Boot/m-p/1291105#M8200</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-06-11T05:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: LS1046RDB SPI support in U-Boot</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1046RDB-SPI-support-in-U-Boot/m-p/1291354#M8203</link>
      <description>&lt;P&gt;thanks you for the helpful answer,&lt;/P&gt;&lt;P&gt;we did all changes according to your recommendations,&lt;/P&gt;&lt;P&gt;and now we have a dm tree entry and can observe signal activity on SPI pins&lt;/P&gt;&lt;P&gt;=&amp;gt; dm tree&lt;BR /&gt;Class Probed Driver Name&lt;BR /&gt;----------------------------------------&lt;BR /&gt;root [ + ] root_drive root_driver&lt;BR /&gt;simple_bus [ + ] generic_si `-- soc&lt;BR /&gt;spi [ + ] fsl_dspi |-- dspi@2100000&lt;BR /&gt;spi_generi [ + ] spi_generi | `-- generic_0:0&lt;BR /&gt;simple_bus [ ] generic_si |-- ifc@1530000&lt;BR /&gt;usb [ ] xhci_fsl |-- usb@2f00000&lt;BR /&gt;usb [ ] xhci_fsl |-- usb@3000000&lt;BR /&gt;usb [ ] xhci_fsl |-- usb@3100000&lt;BR /&gt;pci [ + ] pci_layers |-- pcie@3400000&lt;BR /&gt;pci [ + ] pci_bridge | `-- pci_0:0.0&lt;BR /&gt;pci [ + ] pci_layers |-- pcie@3500000&lt;BR /&gt;pci [ + ] pci_bridge | `-- pci_2:0.0&lt;BR /&gt;pci [ + ] pci_layers `-- pcie@3600000&lt;BR /&gt;pci [ + ] pci_bridge `-- pci_4:0.0&lt;/P&gt;&lt;P&gt;thanks again,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 11:24:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1046RDB-SPI-support-in-U-Boot/m-p/1291354#M8203</guid>
      <dc:creator>micha</dc:creator>
      <dc:date>2021-06-11T11:24:29Z</dc:date>
    </item>
  </channel>
</rss>

