diff --git a/docs/Hardware/GPIO_35.md b/docs/Hardware/GPIO_35.md index 2d510f12..b9fc933f 100644 --- a/docs/Hardware/GPIO_35.md +++ b/docs/Hardware/GPIO_35.md @@ -1,6 +1,8 @@ How i installed the 3.5" (A) type of screen on RaspberryOS Bookworm (Debian 12) +Update: I've tested Bullseye (Debian 11) and it works, but [rotation was not working](#rotation) + ![preview](../img/hardware/rpi35a.jpg) !!! abstract "Disclaimer" @@ -41,27 +43,45 @@ sudo reboot Some screens will not behave correctly and/or display wrong colors, this usually due to the wrong [SPI](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface) speed -In my case the maximum i could achieve is 22.22Mhz (400mhz core / 18) +In my case the maximum i could achieve is 22.22Mhz ``` dtoverlay=piscreen,drm,speed=22222222 ``` -As you may predict speed has a big impact in usability as it dictates how often the display will refresh + +??? info "About speed" + + As you may predict speed has a big impact in usability as it dictates how often the display will refresh + + If i understand the [involved drivers](https://github.com/torvalds/linux/blob/65d287c7eb1d14e0f4d56f19cec30d97fc7e8f66/drivers/spi/spi-bcm2835.c#L1068) + correctly, the spi speed is calculated as: + `core_clock / core_divisor` + + The divisor must be a multiple of 2, that ranges between 2 and 65536 + + Core clock in the case of Pi 3 would be 400mhz + + So even if you can enter any number, it will be approximated to a value from that formula + + That's why i used 22.222.222 (400 / 18) reboot to test any changes. ## Rotation -!!! bug - The current Rpi Kernel v6.1.77 has a bug in the dtb and rotate doesn't work, fix has been merged in v6.6 - you can copy the dtb from the new kernel into the old one if needed - - You can rotate the screen adding a rotate line with the degrees [0, 90, 180, 270] ``` dtoverlay=piscreen,drm,rotate=180 ``` Screen rotation will require adjusting the touch matrix see [Touch issues](../../Troubleshooting/Touch_issues/) +!!! bug + + Raspberry linux Kernel v6.1.77 has a bug in the dtb and rotate doesn't work + + The fix has been merged in linux v6.6 + + you can copy the dtb from the new kernel into the old one if needed + ## Console To make the console work: