Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Banana Pi BPI-CM4? #15

Open
melroy89 opened this issue Apr 14, 2023 · 22 comments
Open

Support for Banana Pi BPI-CM4? #15

melroy89 opened this issue Apr 14, 2023 · 22 comments
Labels
help wanted Extra attention is needed

Comments

@melroy89
Copy link
Contributor

Banana Pi has released a wonderful BPI-CM4 hardware module compatible with the Raspberry Pi cm4...

Could you verify if your image works on this device? If not. Would you please consider supporting this nice piece of cm4 hardware as well with your images?

More info: https://wiki.banana-pi.org/Banana_Pi_BPI-CM4#System_image

And on the forum: https://forum.banana-pi.org/t/banana-pi-bpi-cm4-computer-module-with-amlogic-a311d/13390

Thanks!!!

@ThomasVon2021
Copy link
Owner

I am creating an H616 based image using the Armbian system. After this image, some hardware using Armbian images will be easier to port again.

@melroy89

This comment was marked as off-topic.

@melroy89
Copy link
Contributor Author

melroy89 commented Apr 14, 2023

There are btw third party images for the BPI-CM4 available, see: https://wiki.banana-pi.org/Banana_Pi_BPI-CM4#Armbian

@ThomasVon2021 Just wondering if that would mean your image will support this banana chipset as well?

So anyway, do you think I can try to do a estimated bet by buying the banana pi cm4?

Ps. I did bought your Blikvm Pcie card. So in theory hardware wise it should be compatible. Assuming you used only the first hdmi pin connector. (BPI-CM4 only support 1 hdmi instead of 2 hdmi connections with the Raspberry Pi cm4)

@melroyvandenberg
Copy link

Yes or no? Should I try to order the BPI-CM4? Assuming the new image will support it?

@ThomasVon2021
Copy link
Owner

The new mirror is launched with an Armbian system based on the H616 chip.

@melroy89
Copy link
Contributor Author

melroy89 commented Apr 21, 2023

Uh ok.. sure, but the Banana Pi BPI Compute Module 4 is using the Amlogic A311D chip. But hopefully it will support that chip as well as you try to mention earlier I guess.

What do you mean with "New mirror is launched"?

@melroy89
Copy link
Contributor Author

melroy89 commented Apr 24, 2023

Hmmm I think I will just buy a Rasp CM4.. That works at least.

EDIT: Nevermind, I can't buy a Raspberry CM4 anymore.. It's ALL SOLD OUT!

@ThomasVon2021
Copy link
Owner

We have created a new hardware based on H616, called blikvm V4, which is still under testing. You can join Discord to see more information.

@melroy89
Copy link
Contributor Author

melroy89 commented Apr 28, 2023

But I already bought Blikvm Pcie version v3.. Which needs a CM4 module... I really think we are still talking past each other.

I want to use a Banana Pi BPI inside the Blikvm Pcie card.

Unless this card isn't shipped yet, you want to sent me the v4? See order number: 8138090434501280

@ThomasVon2021
Copy link
Owner

The PCIe version is designed specifically for CM4 and cannot be replaced with other modules. Because different chip pin definitions are different.

@melroy89
Copy link
Contributor Author

melroy89 commented Apr 29, 2023

Maybe you should better look into the Banana Pi BPI-CM4 ... It's pin compatible. It's compatible with cm4 from raspberry.

image

This whole github issue is about to support that module, the pin layout isn't the problem at all. It's only a different cpu chip you might need to support in the image.

@melroy89
Copy link
Contributor Author

melroy89 commented May 3, 2023

So in order to have HDMI input, we use CSI, so far so good. CSI is actually supported by the Banana Pi BPI-CM4 as well.. but only 1 port (CAM1). And the 2nd CSI (CAM0) is not connected. So I hope you are not using 128-138 pins for CSI. But instead you use one of the ports in the pins 115-141?

EDIT: We talked on the chat (Discord), be we sorted it out. CSI is connected to CAM1. Which is luckily pin 115 until 141, since CAM0 is not connected on the Banana Pi variant.

image

@melroy89
Copy link
Contributor Author

Small update, I received the Banana PI CM4 module. I first tested the default Ubuntu Mate provided image from Banana Pi, which is booting from SD card. SO far so good, next will be trying to boot the BliKVM image from this hardware. Finally, I need to try to boot the image eventually from the SD card inside the BliKVM PCIe hardware.

https://www.youtube.com/watch?v=wU6zKKlJtbQ

@ThomasVon2021
Copy link
Owner

I think you need build blikvm software on a armbian os or Ubuntu Mate. You can refer to https://github.com/ThomasVon2021/blikvm/blob/master/dev-readme.md. If you have any questions, we can discuss them at any time.

@melroy89
Copy link
Contributor Author

I think so as well. Raspberry Pi OS Lite is actually already Debian. But it might need the additional linux device trees files. That's it.

@ThomasVon2021
Copy link
Owner

If you use Armbian, it should be relatively smooth. Currently, I have been completely successful in using Armbian on H616

@ThomasVon2021 ThomasVon2021 added the help wanted Extra attention is needed label May 26, 2023
@melroy89
Copy link
Contributor Author

melroy89 commented Jul 23, 2023

Despite the Banana Pi CM (CM4IO) device tree dtb file being present in the /boot/dtb/amlogic folder of the official Banana Pi Armbian Image. These device tree files are also present in the amlogic Linux kernel.

image

I can not see the GPIO numbers (gpio<number> file) in the /sys/class/gpio/ folder... Too bad. Which is a requirement for ArmbianIO code to get it working.

image

And the gpioinfo command gives (showing all "unnamed"):

gpiochip0 - 85 lines:
	line   0:      unnamed       unused   input  active-high 
	line   1:      unnamed       unused   input  active-high 
	line   2:      unnamed       unused   input  active-high 
	line   3:      unnamed       unused   input  active-high 
	line   4:      unnamed       unused   input  active-high 
	line   5:      unnamed       unused   input  active-high 
	line   6:      unnamed      "reset"  output   active-low [used]
	line   7:      unnamed       unused   input  active-high 
	line   8:      unnamed       unused   input  active-high 
	line   9:      unnamed       unused   input  active-high 
	line  10:      unnamed       unused   input  active-high 
	line  11:      unnamed       unused   input  active-high 
	line  12:      unnamed       unused   input  active-high 
	line  13:      unnamed       unused   input  active-high 
	line  14:      unnamed       unused   input  active-high 
	line  15:      unnamed       unused   input  active-high 
	line  16:      unnamed       unused   input  active-high 
	line  17:      unnamed       unused   input  active-high 
	line  18:      unnamed       unused   input  active-high 
	line  19:      unnamed       unused   input  active-high 
	line  20:      unnamed       unused   input  active-high 
	line  21:      unnamed       unused   input  active-high 
	line  22:      unnamed       unused   input  active-high 
	line  23:      unnamed       unused   input  active-high 
	line  24:      unnamed       unused   input  active-high 
	line  25:      unnamed       unused   input  active-high 
	line  26:      unnamed       unused   input  active-high 
	line  27:      unnamed       unused   input  active-high 
	line  28:      unnamed       unused   input  active-high 
	line  29:      unnamed       unused   input  active-high 
	line  30:      unnamed       unused   input  active-high 
	line  31:      unnamed       unused   input  active-high 
	line  32:      unnamed       unused   input  active-high 
	line  33:      unnamed       unused   input  active-high 
	line  34:      unnamed       unused   input  active-high 
	line  35:      unnamed       unused   input  active-high 
	line  36:      unnamed       unused   input  active-high 
	line  37:      unnamed      "reset"  output   active-low [used]
	line  38:      unnamed       unused   input  active-high 
	line  39:      unnamed       unused   input  active-high 
	line  40:      unnamed       unused   input  active-high 
	line  41:      unnamed       unused   input  active-high 
	line  42:      unnamed       unused   input  active-high 
	line  43:      unnamed       unused   input  active-high 
	line  44:      unnamed       unused   input  active-high 
	line  45:      unnamed       unused   input  active-high 
	line  46:      unnamed       unused   input  active-high 
	line  47:      unnamed         "cd"   input   active-low [used]
	line  48:      unnamed       unused   input  active-high 
	line  49:      unnamed       unused   input  active-high 
	line  50:      unnamed       unused   input  active-high 
	line  51:      unnamed       unused   input  active-high 
	line  52:      unnamed       unused   input  active-high 
	line  53:      unnamed       unused   input  active-high 
	line  54:      unnamed       unused   input  active-high 
	line  55:      unnamed       unused   input  active-high 
	line  56:      unnamed       unused   input  active-high 
	line  57:      unnamed      "reset"  output   active-low [used]
	line  58:      unnamed       unused   input  active-high 
	line  59:      unnamed       unused   input  active-high 
	line  60:      unnamed       unused   input  active-high 
	line  61:      unnamed       unused   input  active-high 
	line  62:      unnamed       unused   input  active-high 
	line  63:      unnamed       unused   input  active-high 
	line  64:      unnamed       unused   input  active-high 
	line  65:      unnamed       unused   input  active-high 
	line  66:      unnamed       unused   input  active-high 
	line  67:      unnamed       unused   input  active-high 
	line  68:      unnamed       unused   input  active-high 
	line  69:      unnamed       unused   input  active-high 
	line  70:      unnamed       unused   input  active-high 
	line  71:      unnamed       unused   input  active-high 
	line  72:      unnamed       unused   input  active-high 
	line  73:      unnamed       unused   input  active-high 
	line  74:      unnamed       unused   input  active-high 
	line  75:      unnamed       unused   input  active-high 
	line  76:      unnamed       unused   input  active-high 
	line  77:      unnamed       unused   input  active-high 
	line  78:      unnamed       unused   input  active-high 
	line  79:      unnamed       unused   input  active-high 
	line  80:      unnamed       unused   input  active-high 
	line  81:      unnamed       unused   input  active-high 
	line  82:      unnamed     "enable"  output  active-high [used]
	line  83:      unnamed "device-wake" output active-high [used]
	line  84:      unnamed       unused   input  active-high 

cat /sys/kernel/debug/gpio gives only:

gpiochip1: GPIOs 412-426, parent: platform/ff800000.sys-ctrl:pinctrl@14, aobus-banks:
 gpio-414 (                    |green:status        ) out lo 
 gpio-415 (                    |enable              ) out hi 
 gpio-419 (                    |blue:status         ) out lo 
 gpio-421 (                    |VDDIO_C             ) out lo 

gpiochip0: GPIOs 427-511, parent: platform/ff634400.bus:pinctrl@40, periphs-banks:
 gpio-433 (                    |reset               ) out hi ACTIVE LOW
 gpio-464 (                    |reset               ) out hi ACTIVE LOW
 gpio-474 (                    |cd                  ) in  lo ACTIVE LOW
 gpio-484 (                    |reset               ) out hi ACTIVE LOW
 gpio-509 (                    |enable              ) out hi 
 gpio-510 (                    |device-wake         ) out lo 

@ThomasVon2021
Copy link
Owner

Sorry, I missed this message. I'll ask my hardware colleague for a response later.

@ThomasVon2021
Copy link
Owner

You need fan、oled、atx gpio number, right?

@melroy89
Copy link
Contributor Author

melroy89 commented Oct 6, 2023

I need the Banana Pi CM4 GPIO pin numbers as a Linux device tree file. In order to use ArmbianIO.
ArmbianIO is using the old fashion device tree mapping on disk: /sys/kernel/debug/gpio, so without the correct device tree file, ArmbianIO software can't access the GPIO pins.

ArmbianIO is used by BlikVM (which I hope you know). Therefore, the following file also need to be extended for Banana Pi CM4 as well: https://github.com/ThomasVon2021/blikvm/blob/master/third_lib/GPIO/armbianio.c#L55 (if you know what the int values are in the array for Banana Pi then I could also create a PR upstream project).

And you are correct, without GPIO.. the fan, oled, atx but also simple things like a LED will NOT work... And blikvm software will not start.

@hzzfly
Copy link

hzzfly commented Oct 8, 2023

BliKVM-PCIe-pinout-define.xlsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants