bigtreetech / PI4B-Adapter

47 stars 8 forks source link

PI4B-Adapter + CB1 V2.2 + TFT35 SPI V2.1 #7

Closed Dids closed 1 year ago

Dids commented 1 year ago

Using the hardware combination as mentioned in the issue title, is it even possible to "hardwire" the TFT35 SPI V2.1 display to the GPIO pins of the PI4B-Adapter, which is using a CB1 V2.2?

I'm fairly sure I've got the correct pins wired correctly, however none of the CB1 overlays seem to change anything, and all I get is a white screen. It is also worth nothing that I'm only using the GPIO, and only the 9 out of 10 available pins from the display, eg. not using the "IRQ" pin at the top, as I couldn't figure out where that comes in. Also I'd like to reiterate that this setup does not have a BTT mainboard of any kind, with the idea being that this could be a slightly more "standalone" solution to running Klipper + KlipperScreen.

After spending hours and hours on researching this, I'm still not any closer to figuring out a solution.

Dids commented 1 year ago

Solved it!

The overlay_prefix had to be set to sun50i-h616, or whatever the other non-default option was. Only after this will any of the overlays work, because otherwise it's unable to even find the overlay files due to the wrong prefix/filename.

For anyone else stumbling on this, the wiring for the SPI and I2C is as follows:

# TFT35 SPI V2.1                        # CB1 V2.2
IORQ <-                              ->   NC
 SCL <-         SOC_TP_IRQ?          -> PC10 (PIN 15)
 SDA <-         SOC_Backlight?       -> PC12 (PIN 13)
  RS <-         SOC_TOUCH_CS?        -> PC14 (PIN 11)
 NSS <-         SOC_LCD_CS?          ->  PC7 (PIN  7)
 SCK <-         SOC_SCK              ->  PH6 (PIN 23)
MOSI <-         SOC_MOSI             ->  PH7 (PIN 19)
MISO <-         SOC_MISO             ->  PH8 (PIN 21)
 GND <-                              ->  GND (PIN  5)
 +5V <-                              ->  +5V (PIN  4)