it would be nice to start repo with upstream u-boot and add your Patches on top (not one commit including upstream-source mixed with your changes), so everybody can see what is changed…
as an example i’ve added content of this folder to a branch in my repo:
Update our latest status for developing mt7622 upstream uboot
We have some major differences with Ray’s version
We use 64-bit u-boot because it is reasonable for 7622 which is ARMv8 architecture
We focus on Nand/Nor flash first, due to we use RFBs which are SPI-nand/SPI-nor
We will try Ray’s eMMC/SD patches to test eMMC and SD directly in BPIR64.
Status:
Serial - done
Timer - done
SD - not started
eMMC - ongoing
SNFI - done (for nand/nor)
Ethernet - ongoing
Switch - ongoing
PCI-E - todo
USB - todo
Clock - done (also fix some bugs in mtk-clk.c)
Pinctrl - done
Watchdog - ongoing
Reset - ongoing
It seems that some works are overlapping (with Ray’s works), maybe we can integrate the patches of both sides, but we think mt7622 upstrem u-boot should be 64 bits.
You can post patches without ethernet while working on it like ryder did for mt7623. This way we can work on this base. Seems like ray tries to work on pcie/sata/usb. Maybe atf-problem is only on 32bit and at least sd-card is working.
Just to avoid redundant work and have same codebase for easier integration.
@sam33@Ryder.Lee Guys, please tell me, is it possible to configure pci-e controller to not make aliases in config space?
Because, currently on every level(top where bridge is and inner where connected device) it respond with same data for all possible slots. So 0/0/0, 0/1/0, 0/2/0 reported as same bridge.
GPIO 90 is connected to Asmedia chip which is used to switch between PCIe@1,0 and SATA functions. i.e. output-high: PCIe, output-low: SATA. Below is my way to set GPIO90 to high for your reference, thanks.
and default value of 0x10211CF0 [GPIO_G4_MISC] is 0000000C.
bit3: AUX IN3 AGPIO Digital Pad Enable
bit2: AUXIN2 AGPIO Digital Pad Enable
bit1: AUXIN1 AGPIO Digital Pad Enable
bit0: AUXIN0 AGPIO Digital Pad Enable
0: Disabled
1: Enabled
so you need to set 0x10211CF0[3:0]=0’b1111 if you want to make gpio87-90 can work at gpio mode, thanks.
U-Boot MT7622> gpio clear 90
gpio: pin 90 (gpio 90) value is 0
U-Boot MT7622> gpio set 90
gpio: pin 90 (gpio 90) value is 1
Warning: value of pin is still 0
U-Boot MT7622> gpio clear 90
gpio: pin 90 (gpio 90) value is 0
U-Boot MT7622> scsi scan
If I do reset and run scsi scan, I see no HDD;
If I do reset, clear 90 and run scsi scan, HDD found;
If I do reset, clear 90, set 90 and run scsi scan, I see no HDD;
If I do reset, clear 90, set 90, clear 90 and run scsi scan, HDD found.