SPI Interface on HS1 connector

When I have referred 845c RB3 Hardware user manual i can see (SPI1 on HS1 connector)
SD_DAT0/SPI1_DOUT,SD_DAT3/SPI1_CS,SD_SCLK/SPI1_SCLK and SD_CMD/SPI1_DIN ,but on db845C SOC schematic i could not see any SPI interface on HS1.

Can you please suggest which is the corresponding spi node to use on HS1 connector.

Example: SPI2 node is used for SPI0 interface on LS1 connector, Similarly what is the corresponding SPI node to be used for SPI1 interface on HS1 connector?

@Loic any idea on this topic?

Certain pins can be programmed to have multiple functions. On the schematic, they’re labeled as “SDC4”, but the same pins (pin 1, 7, 9, 11) can be programmed as SPI1.

SPI0 is also available to use, and is located on the LS connector, which is a lot easier to work with.

@doitright Thanks for the reply.

I am using 2 SPI interfaces on my project one SPI interface on LS connector already used, I want to particularly use another SPI on HS1 connector as my daughter board designed such a way its directly plugging to the HS1 connector.

Just want to know how to configure this SPI1 (HS1 connector) in dts/dtsi file
or under which spi node address i can configure this SPI1 interface?

1 Like

@Loic and @ric96 any idea on this topic?
Basically i want to use SPI lines from HS1 connector(PIN 1,7,9,11) same as hikey960 HS connector.

I am not getting enough info regarding this SPI config in dtsi file.
I would like to know the right dtsi config with right SPI node address to be used for making use of SPI line on HS1 connector.

@anon91830841 could you please help on this topic?

I had a quick look at the HS1 pinout for the db845c, and I’m not finding any SPI pins.

Am I looking in the wrong place?

I am definitely not an expert here… but a quick look at the schematics and pinmux tells me that GPIO 93/94/95/96 on HS1 can be repurposed for SPI using spi7. but that is pin 1,3,5,9 on HS1, which is different from what @doitright said above though…

note that there might be a firmware dependency as well, since the geni firmware needs to configure this specific serial engine as SPI…

My information comes from hardware user manual page 30: https://www.96boards.org/documentation/consumer/dragonboard/dragonboard845c/hardware-docs/files/rb3-hardware-user-manual.PDF

And CE specifications page 20:

Which is not actually to say that the board supports use of those pins in that manner. The point is that in order for it to comply with CE specification for SPI on HS (which the specification regards as optional – either SDC or SPI, not necessarily both), then the SPI should be available at pins 1,7,9,11.

Which brings us back to my original suggestion to stick with the SPI on the LS connector. Its always a better idea to restrict yourself to pin usage that is a mandatory part of the specifications, otherwise you risk incompatibility. Such as may be the case here in that designing for use of SPI on HS for hikey960 may mean that the mezzanine ends up being incompatible with db845 that doesn’t implement SPI there. But, of course, @rvmanjumce wants to attach two SPI devices, which means he would need a second CS line, which is not mandated by the CE specifications.

1 Like

@rvmanjumce : I think that knowing what you are actually trying to accomplish could help us come up with alternative implementations that would be more consistent with the mandatory specifications of the CE board.

For instance, an alternative to using SPI on the HS connector could be to use a USB microcontroller (for example, SAMD21) or USB-to-SPI bridge connecting to the USB lines on the HS connector, and connecting your SPI device to SPI pins on that.

Or, there may be alternative configurations for one of the devices you are using that would allow it to be attached to i2c or uart instead of SPI. Or there may be a similar enough device you can use instead that can attach using i2c or uart.

What are the two SPI devices you want to use?

@anon91830841 and @doitright thanks for your reply.

@doitright intension behind this is to use the Dragon db845c as it is like Hikey960,So far we have used the hikey960 with my daughter board which contains two slave devices with SPI interfaces.
We used to plugin Hikey960 with Daughter Board where both SPI interfaces(Pins) Mapped directly to the LS and HS connector on the Hikey960.
If db845c doesn’t support as its like Hikey960 we supposed to do hardware modification with my daughterboard this will take considerable effort as we have to do modification with huge numbers.
If db845c works as like Hikey960 we suppose to order 500+ boards.

Is it possible to get the Corresponding db845c Board Firmware where it will support the SPI interface’s on HS1(PINS: 1,7,9,11) and LS1 (PINS: 8,10,12,14)?
and I think corresponding changes is required at “common/drivers/pinctrl/qcom/pinctrl-sdm845.c” file and dtsi file.

1 Like

Probably won’t work with the 845.

You may want to look at the dragonboard 820c. In its hardware manual, it specifically mentions that the HS expansion pins are SPI.

@doitright at least time being I want to try any working SPI pin config on HS1 connector .
When I have enabled spi7 node device is not booting up.

And this device booting issue is due to interrupt parameter config at sdm845.dtsi file.

If commented below line in spi7 node at least device is booting up but my driver probe sequence got failed(Expected).

interrupts = <GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>;

Can you please suggest right config for this parameter?

                spi7: spi@89c000 {
                        compatible = "qcom,geni-spi";
                        reg = <0 0x0089c000 0 0x4000>;
                        clock-names = "se";
                        clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&qup_spi7_default>;
                       // interrupts = <GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "ok";
                   XYZ@0 {
                        compatible = "XXX,XYZ";
                        reg = <0>;
                        spi-max-frequency = <25000000>;
              };
       };

I can’t comment on the correctness of your dt changes, but I will repeat what @anon91830841 suggested; that there may be a firmware dependency, which would make this a non-starter.

Fact is that the pins in the HS are implemented as SD, not as SPI. The listing of SPI in the user manual appears to be due to an oversight rather than a feature.