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

Armada a38x-clearfog pcie issue #5

Open
VlaoMao opened this issue Sep 21, 2017 · 9 comments
Open

Armada a38x-clearfog pcie issue #5

VlaoMao opened this issue Sep 21, 2017 · 9 comments

Comments

@VlaoMao
Copy link

VlaoMao commented Sep 21, 2017

Hello. I try to write video driver for Silicon motion SM750 for uboot. I copy the driver of sm501.c and add some code. And one sad moment stop me for done:

sample code:
`/* Setup */
pci_write_config_dword (devbusfn, PCI_COMMAND,
(PCI_COMMAND_MEMORY | PCI_COMMAND_IO));

pci_read_config_word (devbusfn, PCI_DEVICE_ID, &device_id);
pci_read_config_dword (devbusfn, PCI_REVISION_ID, &id);
pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0, &pci_mem_base);
pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_1, &pci_mmio_base);
sm501.frameAdrs = pci_mem_to_phys (devbusfn, pci_mem_base);
sm501.isaBase = pci_mem_to_phys (devbusfn, pci_mmio_base);`

sm501.isaBase (0x42000000) is mapped ok, and its work great (i have worked i2c and other stuff, display has video signal and more), trouble with sm501.frameAdrs(0xfc000000) - pci_mem_to_phys failed with console output pci_hose_bus_to_phys: invalid physical address.

I add some printf and turn on debug in system pci functions and get this:

PCI Autoconfig: Bus Memory region: [0x42000000-0x43ffffff], Physical Memory [e2000000-e3ffffffx]

PCI Autoconfig: BAR 0, Mem, size=0x4000000, addr: 0x44000000, res->bus_start: 0x42000000, size: 67108864, res->size: 33554432 address=0x44000000 bus_lower=0x42000000 No room in resource

PCI Autoconfig: BAR 1, Mem, size=0x200000, addr: 0x42000000, res->bus_start: 0x42000000, size: 2097152, res->size: 33554432 address=0x42000000 bus_lower=0x42200000

as you can see, bar0 failed to allocating resources, and as a result we do not have access to framebuffer and can't draw on screen.

U-boot pci header 00.00.00:

`pci header 00.00.00

vendor ID = 0x126f
device ID = 0x0750
command register = 0x0007
status register = 0x0010
revision ID = 0xa1
class code = 0x03 (Display controller)
sub class code = 0x00
programming interface = 0x00
cache line = 0x08
latency time = 0x00
header type = 0x00
BIST = 0x00
base address 0 = 0xfc000000
base address 1 = 0x42000000
base address 2 = 0x00000000
base address 3 = 0x00000000
base address 4 = 0x00000000
base address 5 = 0x00000000
cardBus CIS pointer = 0x00000000
sub system vendor ID = 0x126f
sub system ID = 0x0750
expansion ROM base address = 0x00000000
interrupt line = 0xff
interrupt pin = 0x01
min Grant = 0x00
max Latency = 0x00`

In linux video card work perfectly. How i can fix this error?

@aws-maens
Copy link

Hi,
Please contact [email protected] and SolidRun will support.
Thanks

@Valks
Copy link

Valks commented Aug 22, 2019

@VlaoMao did you have any luck getting the SM750 working? I've just started integrating the same card and having the same issues.

@VlaoMao
Copy link
Author

VlaoMao commented Aug 22, 2019

@Valks, try build uboot from here

https://github.com/SolidRun/u-boot/commits/master

No room in resource has been fixed

@Valks
Copy link

Valks commented Aug 22, 2019

@VlaoMao thanks for the link. I didn't notice solid run had an actively developed uboot fork. I thought they moved onto using the official uboot.
In the end did you manage to get the graphics card working?

@VlaoMao
Copy link
Author

VlaoMao commented Aug 22, 2019

@Valks i use this version with some patches from upstream.
Video card works in u-boot as simple framebuffer, but i made adaptation of linux kernel driver from manufacturer, which seems to be non-opensource (proprietary) project

@Valks
Copy link

Valks commented Aug 22, 2019

@VlaoMao Thank you for all the feedback, sorry to keep asking but at the moment you're the best person to help me get it up and running quickly.

I took a look at the supplier of my graphics card using the SM750 chipset and I found recent linux drivers (03/2019) with the source code publicly for the card www.innodisk.com/en/support_and_service/download - search for EMPV-1202, the download contains both the windows and linux drivers. I'm not sure if it's the same as what you have but if you have a little time could you take a look and if your tweaks are applicable would you mind sharing?

If it's not possible that's totally fine and I appreciate your help.

@VlaoMao
Copy link
Author

VlaoMao commented Aug 22, 2019

@Valks, i take look tomorrow. No problem, you welcome.

@VlaoMao
Copy link
Author

VlaoMao commented Aug 23, 2019

@Valks i looked to the driver from SM site. This driver obviously for X11, but as far as i remember, it works. try to contact your supplier and ask him another driver, especially for kernel module. These two drivers has differencies.

As i know, the main problem is sii902 chip and initialization of him, initialization not the same as sii164

@Valks
Copy link

Valks commented Aug 23, 2019

@VlaoMao Thanks for the advice and taking a look. I'll contact them next week and keep your comments in mind.

globalscaletechnologies added a commit to globalscaletechnologies/u-boot-marvell that referenced this issue May 27, 2020
remove topaz switch initialization code on board_network_enable()
of ccpe board, the code causes the switch port MarvellEmbeddedProcessors#5 only can recognize
1GHz speed connection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants