[PATCH v2 00/26] dm: Change the way sequence numbers are implemented
Michael Walle
michael at walle.cc
Tue Dec 15 09:58:33 CET 2020
Hi Simon,
Am 2020-12-15 05:28, schrieb Simon Glass:
> On Sat, 12 Dec 2020 at 11:38, Simon Glass <sjg at chromium.org> wrote:
>> On Sat, 12 Dec 2020 at 10:53, Michael Walle <michael at walle.cc> wrote:
>> > Am 2020-12-12 16:39, schrieb Simon Glass:
>> > >> Sequence numbers looks good, but PCI still doesnt work on my board.
>> > >
>> > > Thanks for trying this out.
>> > >
>> > > I suppose you have a different problem from what I found in v1. Can
>> > > you please send the output of these things before and after the
>> > > change?
>> > >
>> > > dm tree
>> > > dm uc
>> > > pci
>> > > pci 1
>> > > (e.g. for other buses)
>> > > pci 0 long
>> >
>> [..]
>>
>> >
>> > > Which board is it? I suppose there is a chance I have one.
>> >
>> > Kontron SMARC-sAL28 (kontron_sl28 defconfig) (a LS1028A SoC)
>>
>> Thanks for the info. I was worried that the renumbering might cause
>> problems but saw no issues on my x86 board.
>>
>> If you look at the sequence numbers for PCI they have changed. They
>> also correspond to the bus numbers, and PCI uses the sub bus number to
>> route access to sub bus, so I suspect one of your buses is not getting
>> traffic.
>>
>> At present the only fix is to add all buses into the DT. I'll take a
>> look and see what else I can do.
>
> I've pushed an experimental tree to u-boot-dm/seq3-working
>
> Are you able to take a look and send the same output as last time?
While it seems to work better now; this looks strange
PCIe0: pcie at 3400000 Root Complex: no link
PCIe1: pcie at 3500000 Root Complex: x1 gen1
PCIe0: pcie at 3400000 Root Complex: no link
PCIe1: pcie at 3500000 Root Complex: x1 gen1
> I am trying to change how PCI allocation happens, so that it follows
> the PCI rules. Hopefully the change makes sense to you but I would
> appreciate any insights you may have.
Sorry I haven't found time to look into this, yet.
U-Boot SPL 2021.01-rc3-00027-gecab2d3f52 (Dec 15 2020 - 09:23:43 +0100)
Trying to boot from SPI
U-Boot 2021.01-rc3-00027-gecab2d3f52 (Dec 15 2020 - 09:23:43 +0100)
SoC: LS1028A Rev1.0 (0x870b0110)
Clock Configuration:
CPU0(A72):1300 MHz CPU1(A72):1300 MHz
Bus: 400 MHz DDR: 1600 MT/s
Reset Configuration Word (RCW):
00000000: 34004010 00000030 00000000 00000000
00000010: 00000000 008f0000 0030c000 00000000
00000020: 06200000 00002580 00000000 00019016
00000030: 00000000 00000048 00000000 00000000
00000040: 00000000 00000000 00000000 00000000
00000050: 00000000 00000000 00000000 00000000
00000060: 00000103 00000000 100e7026 00000000
00000070: bb580000 00020000
Model: Kontron SMARC-sAL28 (Single PHY)
EL: 3
DRAM: 4 GiB
DDR 4 GiB (DDR3, 32-bit, CL=11, ECC on)
SEC0: RNG instantiated
CPU: 2 cores online
Using SERDES1 Protocol: 47960 (0xbb58)
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from SPIFlash... SF: Detected w25q32dw with page
size 256 Bytes, erase size 64 KiB, total 4 MiB
OK
PCIe0: pcie at 3400000 Root Complex: no link
PCIe1: pcie at 3500000 Root Complex: x1 gen1
PCIe0: pcie at 3400000 Root Complex: no link
PCIe1: pcie at 3500000 Root Complex: x1 gen1
In: serial
Out: serial
Err: serial
Net: e1000: 68:05:ca:63:c7:79
Warning: e1000#0 MAC addresses don't match:
Address in ROM is 68:05:ca:63:c7:79
Address in environment is 00:de:ad:be:ef:04
eth4: e1000#0, eth0: enetc-0
Hit any key to stop autoboot: 0
=> dm tree
Class Index Probed Driver Name
-----------------------------------------------------------
root 0 [ + ] root_driver root_driver
spi 0 [ + ] nxp_fspi |-- flexspi at 20c0000
spi_flash 0 [ ] jedec_spi_nor | `-- flash at 0
pci 0 [ + ] pci_layerscape |-- pcie at 3400000
pci 3 [ + ] pci_bridge_drv | `-- pci_0:0.0
pci 1 [ + ] pci_layerscape |-- pcie at 3500000
pci 4 [ + ] pci_bridge_drv | `-- pci_2:0.0
eth 0 [ + ] eth_e1000 | `-- e1000#0
pci 2 [ + ] pci_generic_ecam |-- pcie at 1f0000000
eth 1 [ + ] enetc_eth | |-- enetc-0
mdio 0 [ + ] enetc_mdio | |-- emdio-3
pci_generi 0 [ ] pci_generic_drv | |-- pci_4:0.4
pci_generi 1 [ ] pci_generic_drv | |-- pci_4:0.5
pci_generi 2 [ ] pci_generic_drv | `-- pci_4:1f.0
i2c 0 [ ] i2c_mxc |-- i2c at 2000000
rtc 0 [ ] rtc-rv8803 | `-- rtc at 32
i2c 1 [ ] i2c_mxc |-- i2c at 2030000
i2c 2 [ ] i2c_mxc |-- i2c at 2040000
usb 0 [ ] xhci_fsl |-- usb3 at 3100000
usb 1 [ ] xhci_fsl |-- usb3 at 3110000
spi 1 [ ] fsl_dspi |-- dspi at 2120000
mmc 0 [ + ] fsl-esdhc-mmc |-- esdhc at 2140000
blk 0 [ ] mmc_blk | `--
esdhc at 2140000.blk
mmc 1 [ + ] fsl-esdhc-mmc `-- esdhc at 2150000
blk 1 [ ] mmc_blk `--
esdhc at 2150000.blk
=> dm uclass
uclass 0: root
0 * root_driver @ ffd3b050, seq 0
uclass 18: ahci
uclass 21: blk
0 esdhc at 2140000.blk @ ffd3be40, seq 0
1 esdhc at 2150000.blk @ ffd3c1a0, seq 1
uclass 31: efi
uclass 32: eth
0 * e1000#0 @ ffd40dd0, seq 4
1 * enetc-0 @ ffd40f20, seq 0
uclass 36: gpio
uclass 38: i2c
0 i2c at 2000000 @ ffd3b5b0, seq 0
1 i2c at 2030000 @ ffd3b770, seq 1
2 i2c at 2040000 @ ffd3b820, seq 2
uclass 40: i2c_generic
uclass 41: i2c_mux
uclass 49: usb_mass_storage
uclass 50: mdio
0 * emdio-3 @ ffd41090, seq 0
uclass 53: mmc
0 * esdhc at 2140000 @ ffd3bbe0, seq 0
1 * esdhc at 2150000 @ ffd3bf80, seq 1
uclass 57: nop
uclass 59: nvme
uclass 64: pci
0 * pcie at 3400000 @ ffd3b340, seq 0
1 * pcie at 3500000 @ ffd3b3f0, seq 2
2 * pcie at 1f0000000 @ ffd3b4a0, seq 4
3 * pci_0:0.0 @ ffd409b0, seq 1
4 * pci_2:0.0 @ ffd40c70, seq 3
uclass 66: pci_generic
0 pci_4:0.4 @ ffd411f0, seq 0
1 pci_4:0.5 @ ffd412f0, seq 1
2 pci_4:1f.0 @ ffd413f0, seq 2
uclass 78: rng
0 caam-rng @ ffd3c3d0, seq 0
uclass 79: rtc
0 rtc at 32 @ ffd3b6a0, seq 0
uclass 81: scsi
uclass 83: simple_bus
uclass 87: spi
0 * flexspi at 20c0000 @ ffd3b140, seq 0
1 dspi at 2120000 @ ffd3bad0, seq 1
uclass 88: spi_flash
0 flash at 0 @ ffd3b230, seq 0
uclass 89: spi_generic
uclass 99: usb
0 usb3 at 3100000 @ ffd3b930, seq 0
1 usb3 at 3110000 @ ffd3ba00, seq 1
uclass 100: usb_dev_generic
uclass 101: usb_hub
=> pci 0
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
00.00.00 0x1957 0x82c1 Bridge device 0x04
=> pci 1
Scanning PCI devices on bus 1
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
=> pci 2
Scanning PCI devices on bus 2
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
02.00.00 0x1957 0x82c1 Bridge device 0x04
=> pci 3
Scanning PCI devices on bus 3
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
03.00.00 0x8086 0x1533 Network controller 0x00
=> pci 4
Scanning PCI devices on bus 4
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
04.00.00 0x1957 0xe100 Network controller 0x00
04.00.03 0x1957 0xee01 Base system peripheral 0x80
04.00.04 0x1957 0xee02 Base system peripheral 0x80
04.00.05 0x1957 0xeef0 Network controller 0x08
04.1f.00 0x1957 0xe001 Base system peripheral 0x07
=> pci 0 long
Scanning PCI devices on bus 0
Found PCI device 00.00.00:
vendor ID = 0x1957
device ID = 0x82c1
command register ID = 0x0007
status register = 0x0010
revision ID = 0x10
class code = 0x06 (Bridge device)
sub class code = 0x04
programming interface = 0x00
cache line = 0x08
latency time = 0x00
header type = 0x01
BIST = 0x00
base address 0 = 0x00000000
base address 1 = 0x00000000
primary bus number = 0x00
secondary bus number = 0x01
subordinate bus number = 0x01
secondary latency timer = 0x00
IO base = 0x11
IO limit = 0x01
secondary status = 0x0000
memory base = 0x4000
memory limit = 0x3ff0
prefetch memory base = 0x1001
prefetch memory limit = 0x0001
prefetch memory base upper = 0x00000000
prefetch memory limit upper = 0x00000000
IO base upper 16 bits = 0x0000
IO limit upper 16 bits = 0x0000
expansion ROM base address = 0x00000000
interrupt line = 0xff
interrupt pin = 0x01
bridge control = 0x0000
=> pci 1 long
Scanning PCI devices on bus 1
=> pci 2 long
Scanning PCI devices on bus 2
Found PCI device 02.00.00:
vendor ID = 0x1957
device ID = 0x82c1
command register ID = 0x0007
status register = 0x0010
revision ID = 0x10
class code = 0x06 (Bridge device)
sub class code = 0x04
programming interface = 0x00
cache line = 0x08
latency time = 0x00
header type = 0x01
BIST = 0x00
base address 0 = 0x00000000
base address 1 = 0x00000000
primary bus number = 0x00
secondary bus number = 0x01
subordinate bus number = 0x01
secondary latency timer = 0x00
IO base = 0x11
IO limit = 0x01
secondary status = 0x0000
memory base = 0x4000
memory limit = 0x4020
prefetch memory base = 0x1001
prefetch memory limit = 0x0001
prefetch memory base upper = 0x00000000
prefetch memory limit upper = 0x00000000
IO base upper 16 bits = 0x0000
IO limit upper 16 bits = 0x0000
expansion ROM base address = 0x00000000
interrupt line = 0xff
interrupt pin = 0x01
bridge control = 0x0000
=> pci 3 long
Scanning PCI devices on bus 3
Found PCI device 03.00.00:
vendor ID = 0x8086
device ID = 0x1533
command register ID = 0x0006
status register = 0x0010
revision ID = 0x03
class code = 0x02 (Network controller)
sub class code = 0x00
programming interface = 0x00
cache line = 0x08
latency time = 0x00
header type = 0x00
BIST = 0x00
base address 0 = 0x40000000
base address 1 = 0x00000000
base address 2 = 0x00000000
base address 3 = 0x40100000
base address 4 = 0x00000000
base address 5 = 0x00000000
cardBus CIS pointer = 0x00000000
sub system vendor ID = 0x103c
sub system ID = 0x0003
expansion ROM base address = 0x40200000
interrupt line = 0x00
interrupt pin = 0x01
min Grant = 0x00
max Latency = 0x00
=> pci 4 long
Scanning PCI devices on bus 4
Found PCI device 04.00.00:
vendor ID = 0x1957
device ID = 0xe100
command register ID = 0x0406
status register = 0x0010
revision ID = 0x01
class code = 0x02 (Network controller)
sub class code = 0x00
programming interface = 0x01
cache line = 0x08
latency time = 0x00
header type = 0x80
BIST = 0x00
base address 0 = 0x00000000
base address 1 = 0x00000000
base address 2 = 0x00000000
base address 3 = 0x00000000
base address 4 = 0x00000000
base address 5 = 0x00000000
cardBus CIS pointer = 0x00000000
sub system vendor ID = 0x1957
sub system ID = 0xe100
expansion ROM base address = 0x00000000
interrupt line = 0x00
interrupt pin = 0x00
min Grant = 0x00
max Latency = 0x00
Found PCI device 04.00.03:
vendor ID = 0x1957
device ID = 0xee01
command register ID = 0x0406
status register = 0x0010
revision ID = 0x01
class code = 0x08 (Base system peripheral)
sub class code = 0x80
programming interface = 0x01
cache line = 0x08
latency time = 0x00
header type = 0x80
BIST = 0x00
base address 0 = 0x00000000
base address 1 = 0x00000000
base address 2 = 0x00000000
base address 3 = 0x00000000
base address 4 = 0x00000000
base address 5 = 0x00000000
cardBus CIS pointer = 0x00000000
sub system vendor ID = 0x1957
sub system ID = 0xee01
expansion ROM base address = 0x00000000
interrupt line = 0x00
interrupt pin = 0x00
min Grant = 0x00
max Latency = 0x00
Found PCI device 04.00.04:
vendor ID = 0x1957
device ID = 0xee02
command register ID = 0x0404
status register = 0x0010
revision ID = 0x01
class code = 0x08 (Base system peripheral)
sub class code = 0x80
programming interface = 0x01
cache line = 0x08
latency time = 0x00
header type = 0x80
BIST = 0x00
base address 0 = 0x00000000
base address 1 = 0x00000000
base address 2 = 0x00000000
base address 3 = 0x00000000
base address 4 = 0x00000000
base address 5 = 0x00000000
cardBus CIS pointer = 0x00000000
sub system vendor ID = 0x1957
sub system ID = 0xee02
expansion ROM base address = 0x00000000
interrupt line = 0x00
interrupt pin = 0x00
min Grant = 0x00
max Latency = 0x00
Found PCI device 04.00.05:
vendor ID = 0x1957
device ID = 0xeef0
command register ID = 0x0404
status register = 0x0010
revision ID = 0x01
class code = 0x02 (Network controller)
sub class code = 0x08
programming interface = 0x01
cache line = 0x08
latency time = 0x00
header type = 0x80
BIST = 0x00
base address 0 = 0x00000000
base address 1 = 0x00000000
base address 2 = 0x00000000
base address 3 = 0x00000000
base address 4 = 0x00000000
base address 5 = 0x00000000
cardBus CIS pointer = 0x00000000
sub system vendor ID = 0x1957
sub system ID = 0xeef0
expansion ROM base address = 0x00000000
interrupt line = 0x00
interrupt pin = 0x02
min Grant = 0x00
max Latency = 0x00
Found PCI device 04.1f.00:
vendor ID = 0x1957
device ID = 0xe001
command register ID = 0x0400
status register = 0x0010
revision ID = 0x01
class code = 0x08 (Base system peripheral)
sub class code = 0x07
programming interface = 0x00
cache line = 0x08
latency time = 0x00
header type = 0x00
BIST = 0x00
base address 0 = 0x00000000
base address 1 = 0x00000000
base address 2 = 0x00000000
base address 3 = 0x00000000
base address 4 = 0x00000000
base address 5 = 0x00000000
cardBus CIS pointer = 0x00000000
sub system vendor ID = 0x1957
sub system ID = 0xe001
expansion ROM base address = 0x00000000
interrupt line = 0x00
interrupt pin = 0x01
min Grant = 0x00
max Latency = 0x00
=>
-michael
More information about the U-Boot
mailing list