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

Add initial config for R4S #2415

Merged
merged 10 commits into from Dec 31, 2020
Merged

Add initial config for R4S #2415

merged 10 commits into from Dec 31, 2020

Conversation

@igorpecovnik
Copy link
Member

@igorpecovnik igorpecovnik commented Dec 4, 2020

Doesn't boot yet.

[    3.763355] SError Interrupt on CPU4, code 0xbf000002 -- SError
[    3.763360] CPU: 4 PID: 221 Comm: kworker/4:3 Not tainted 5.9.12-rockchip64 #trunk
[    3.763363] Hardware name: FriendlyElec NanoPi R4S (DT)
[    3.763365] Workqueue: events deferred_probe_work_func
[    3.763370] pstate: 60000085 (nZCv daIf -PAN -UAO BTYPE=--)
[    3.763372] pc : rockchip_pcie_rd_conf+0xb0/0x268
[    3.763374] lr : rockchip_pcie_rd_conf+0x1b4/0x268
[    3.763376] sp : ffff8000129eb840
[    3.763378] x29: ffff8000129eb840 x28: 0000000000000000 
[    3.763384] x27: 0000000000000000 x26: 0000000000000000 
[    3.763390] x25: 0000000000000000 x24: ffff8000129eb984 
[    3.763395] x23: ffff0000f14da800 x22: ffff0000f14d8380 
[    3.763400] x21: ffff8000129eb8c4 x20: 0000000000000004 
[    3.763405] x19: 0000000000000000 x18: 0000000000000000 
[    3.763411] x17: 0000000000000001 x16: 0000000000000019 
[    3.763416] x15: ffffffffffffffff x14: ffff800011849948 
[    3.763421] x13: ffff0000f1417a1c x12: ffff0000f14172d1 
[    3.763426] x11: 0000000000000004 x10: 0101010101010101 
[    3.763431] x9 : 0000000001001d87 x8 : 000000000000ea60 
[    3.763436] x7 : ffff8000129eb810 x6 : 0000000000000001 
[    3.763441] x5 : 0000000000100000 x4 : 0000000000000000 
[    3.763446] x3 : 0000000000c00008 x2 : 000000000080000a 
[    3.763451] x1 : ffff80001dc00008 x0 : ffff80001a000000 
[    3.763458] Kernel panic - not syncing: Asynchronous SError Interrupt
[    3.763461] CPU: 4 PID: 221 Comm: kworker/4:3 Not tainted 5.9.12-rockchip64 #trunk
[    3.763463] Hardware name: FriendlyElec NanoPi R4S (DT)
[    3.763466] Workqueue: events deferred_probe_work_func
[    3.763469] Call trace:
[    3.763471]  dump_backtrace+0x0/0x200
[    3.763473]  show_stack+0x18/0x28
[    3.763475]  dump_stack+0xc0/0x11c
[    3.763477]  panic+0x164/0x364
[    3.763479]  nmi_panic+0x64/0x98
[    3.763481]  arm64_serror_panic+0x74/0x88
[    3.763483]  do_serror+0x68/0x1a0
[    3.763486]  el1_error+0x84/0x100
[    3.763488]  rockchip_pcie_rd_conf+0xb0/0x268
[    3.763490]  pci_bus_read_config_dword+0x84/0xd8
[    3.763493]  pci_bus_generic_read_dev_vendor_id+0x34/0x1b0
[    3.763495]  pci_bus_read_dev_vendor_id+0x4c/0x70
[    3.763497]  pci_scan_single_device+0x84/0xe0
[    3.763499]  pci_scan_slot+0x38/0x120
[    3.763501]  pci_scan_child_bus_extend+0x58/0x330
[    3.763504]  pci_scan_bridge_extend+0x340/0x5a0
[    3.763506]  pci_scan_child_bus_extend+0x1fc/0x330
[    3.763508]  pci_scan_root_bus_bridge+0xd4/0xf0
[    3.763510]  pci_host_probe+0x18/0xb0
[    3.763512]  rockchip_pcie_probe+0x268/0x478
[    3.763514]  platform_drv_probe+0x54/0xa8
[    3.763516]  really_probe+0xe8/0x4d0
[    3.763519]  driver_probe_device+0xf4/0x160
[    3.763521]  __device_attach_driver+0x8c/0x118
[    3.763523]  bus_for_each_drv+0x7c/0xd0
[    3.763525]  __device_attach+0xe8/0x168
[    3.763527]  device_initial_probe+0x14/0x20
[    3.763529]  bus_probe_device+0x9c/0xa8
[    3.763532]  deferred_probe_work_func+0x88/0xd8
[    3.763534]  process_one_work+0x1ec/0x4b0
[    3.763536]  worker_thread+0x208/0x478
[    3.763538]  kthread+0x140/0x150
[    3.763540]  ret_from_fork+0x10/0x34
[    3.763567] SMP: stopping secondary CPUs
[    3.763570] Kernel Offset: disabled
[    3.763572] CPU features: 0x0240022,2000200c
[    3.763574] Memory Limit: none

Doesn't boot yet.
@igorpecovnik igorpecovnik marked this pull request as draft Dec 4, 2020
@piter75
Copy link
Member

@piter75 piter75 commented Dec 5, 2020

Enabled r8169 as module.
I don't know if it fixes the issue (probably not) but it should be enabled anyway.

@Tonymac32
Copy link
Member

@Tonymac32 Tonymac32 commented Dec 13, 2020

@friendlyarm
Copy link

@friendlyarm friendlyarm commented Dec 23, 2020

For R4S PCIE, you need to add the following configuration to dts:

     max-link-speed = <1>;
     num-lanes = <1>;

The following is the detailed content:

&pcie0 {
    max-link-speed = <1>;
    num-lanes = <1>;
    vpcie3v3-supply = <&vcc3v3_sys>;

    pcie@0 {
        reg = <0x00000000 0 0 0 0>;
        #address-cells = <3>;
        #size-cells = <2>;

        r8169: pcie@0,0 {
            reg = <0x000000 0 0 0 0>;
            local-mac-address = [ 00 00 00 00 00 00 ];
        };
    };
};

&vcc3v3_sys {
    vin-supply = <&vcc5v0_sys>;
};

@friendlyarm
Copy link

@friendlyarm friendlyarm commented Dec 23, 2020

In addition, we have added unified 1GB/4GB support to uboot-v2020.10
https://github.com/friendlyarm/uboot-rockchip/tree/nanopi4-v2020.10

@igorpecovnik
Copy link
Member Author

@igorpecovnik igorpecovnik commented Dec 30, 2020

Much better - it boots now: http://ix.io/2KlU

networks are up, BT is not happy ... the rest we'll see with testings.

[    9.761283] Bluetooth: hci0: command 0xfc45 tx timeout
[   11.567289] systemd[1]: Finished Armbian memory supported logging.
[   11.587073] systemd[1]: Starting Journal Service...
[   11.710685] systemd[1]: Started Journal Service.
[   11.757996] systemd-journald[667]: Received client request to flush runtime journal.
[   12.590410] EXT4-fs (mmcblk0p1): resizing filesystem from 378880 to 15431920 blocks
[   13.069528] EXT4-fs (mmcblk0p1): resized filesystem to 15431920
[   15.338859] r8169 0000:01:00.0: Direct firmware load for rtl_nic/rtl8168h-2.fw failed with error -2
[   15.338874] r8169 0000:01:00.0: Unable to load firmware rtl_nic/rtl8168h-2.fw (-2)
[   15.365300] Generic FE-GE Realtek PHY r8169-100:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-100:00, irq=IGNORE)
[   15.509165] r8169 0000:01:00.0 enp1s0: Link is Down
[   15.562291] rk_gmac-dwmac fe300000.ethernet eth1: PHY [stmmac-0:01] driver [RTL8211E Gigabit Ethernet] (irq=169)
[   15.576769] rk_gmac-dwmac fe300000.ethernet eth1: No Safety Features support found
[   15.576789] rk_gmac-dwmac fe300000.ethernet eth1: PTP not supported by HW
[   15.577282] rk_gmac-dwmac fe300000.ethernet eth1: configuring for phy/rgmii link mode
[   17.889228] Bluetooth: hci0: BCM: failed to write clock (-110)
[   17.889236] Bluetooth: hci0: Failed to set baudrate
[   19.905228] Bluetooth: hci0: command 0x0c03 tx timeout
[   20.837073] r8169 0000:01:00.0 enp1s0: Link is Up - 1Gbps/Full - flow control rx/tx
[   20.837114] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
[   28.129227] Bluetooth: hci0: BCM: Reset failed (-110)
[   44.923029] r8169 0000:01:00.0 enp1s0: Link is Down
[   48.471872] rk_gmac-dwmac fe300000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[   48.471951] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

@igorpecovnik igorpecovnik marked this pull request as ready for review Dec 30, 2020
@igorpecovnik igorpecovnik merged commit 3c793e6 into master Dec 31, 2020
2 checks passed
2 checks passed
@github-actions
shellcheck
Details
@github-actions
Compile changed kernel
Details
@igorpecovnik igorpecovnik deleted the AR-566 branch Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants