Odroid C2 mainline kernel support

Moderators: mdrjr, odroid

Re: Odroid C2 mainline kernel support

Unread postby brad » Fri Sep 01, 2017 10:53 am

rpcameron wrote:No, the Arch mainline uboot is 2017.07. It uses the bl{20,30,301,31} files from HK's uboot, but the rest of it is the release version of 2017.07.


The bl{20,30,301,31} files are from ab older Feb 10 commit from hardkernel's uboot. These bootloader files need to be updated to later versions to allow SCPI cpufreq to run in mainline kernel. Uboot version is not relevant here.
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby rpcameron » Fri Sep 01, 2017 12:02 pm

brad wrote:
rpcameron wrote:No, the Arch mainline uboot is 2017.07. It uses the bl{20,30,301,31} files from HK's uboot, but the rest of it is the release version of 2017.07.


The bl{20,30,301,31} files are from ab older Feb 10 commit from hardkernel's uboot. These bootloader files need to be updated to later versions to allow SCPI cpufreq to run in mainline kernel. Uboot version is not relevant here.

Except, HK's bl files in their uboot repo haven't been updated since Feb, either. So how can he necessary bits needed to build a proper uboot use a more recent version if HK won't supply the binary bits necessary to boot their hardware? Is this a chicken/egg situation?
rpcameron
 
Posts: 252
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Fri Sep 01, 2017 12:07 pm

rpcameron wrote:Except, HK's bl files in their uboot repo haven't been updated since Feb, either. So how can he necessary bits needed to build a proper uboot use a more recent version if HK won't supply the binary bits necessary to boot their hardware? Is this a chicken/egg situation?

All i can tell you is it's not working in arch but IS working in armbian, so getting it working at all is not a hypothetical future thing...
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby brad » Fri Sep 01, 2017 2:23 pm

rpcameron wrote:Except, HK's bl files in their uboot repo haven't been updated since Feb, either. So how can he necessary bits needed to build a proper uboot use a more recent version if HK won't supply the binary bits necessary to boot their hardware? Is this a chicken/egg situation?


The bl301 had the SCPI tables updated on the 24th Feb - This commit https://github.com/hardkernel/u-boot/co ... 87c2c445a5

I saw the Arch package was using this commit (from earlier on the 10th Feb) - https://github.com/hardkernel/u-boot/co ... cbb0611089
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby rpcameron » Fri Sep 01, 2017 10:27 pm

brad wrote:
rpcameron wrote:Except, HK's bl files in their uboot repo haven't been updated since Feb, either. So how can he necessary bits needed to build a proper uboot use a more recent version if HK won't supply the binary bits necessary to boot their hardware? Is this a chicken/egg situation?


The bl301 had the SCPI tables updated on the 24th Feb - This commit https://github.com/hardkernel/u-boot/co ... 87c2c445a5

I saw the Arch package was using this commit (from earlier on the 10th Feb) - https://github.com/hardkernel/u-boot/co ... cbb0611089

Interesting. I'll have to double check my setup then. I can't remember if I'm using the mainline uboot pkg, or if I built it from scratch. But I'm not having any problems booting 4.12 mainline from Arch's repositories.

(However, I wonder if this different bootloader code is the reason I couldn't get the OpenBSD arm64 kernel to fully boot ...)
rpcameron
 
Posts: 252
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Sep 03, 2017 9:43 am

rpcameron wrote:(However, I wonder if this different bootloader code is the reason I couldn't get the OpenBSD arm64 kernel to fully boot ...)


Its quiet a possibility, the older version of bl301.bin will pass through cpu frequency tables up to 2GHz to the OS. Linux Kernel 4.x had SCPI subsystem disabled so it would only run at 1.5GHz (the default starting frequency from uboot). The new bootloader supports standard frequencies only up to 1.5GHz so SCPI can be enabled allowing cpu frequencies up to 1.5Ghz.

OpenBSD would be configured to use whatever frequency tables are passed from the booloader (the older version up to 2Ghz). This would most certainly cause adhoc problems starting OpenBSD kernel (strange unrepeatable errors and crashes) and likely a non booting system due to overclocked CPU frequencies. The new bootloader should restrict cpufreq tables in any OS to be 1.5GHz allowing a stable system.

I tested OpenBSD kernel sometime back (With the older 2Ghz bootloader) running the 3.10.y linux kernel and using kvm to passthrough and boot OpenBSD. Even though I was using hardkernel Linux kernel 3.10.y which was restricting cpu to 1.5Ghz in Linux when the CPU's were passed through kvm into OpenBSD kernel (I suspect) they were also passed with 2Ghz frequency tables causing OpenBSD to have sporadic failures. I suspect aarch64 OpenBSD would boot fine now with new bootloader bl301.bin. (kvm or not)
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby rpcameron » Sun Sep 03, 2017 11:04 am

brad wrote:
rpcameron wrote:(However, I wonder if this different bootloader code is the reason I couldn't get the OpenBSD arm64 kernel to fully boot ...)


Its quiet a possibility, the older version of bl301.bin will pass through cpu frequency tables up to 2GHz to the OS. Linux Kernel 4.x had SCPI subsystem disabled so it would only run at 1.5GHz (the default starting frequency from uboot). The new bootloader supports standard frequencies only up to 1.5GHz so SCPI can be enabled allowing cpu frequencies up to 1.5Ghz.

OpenBSD would be configured to use whatever frequency tables are passed from the booloader (the older version up to 2Ghz). This would most certainly cause adhoc problems starting OpenBSD kernel (strange unrepeatable errors and crashes) and likely a non booting system due to overclocked CPU frequencies. The new bootloader should restrict cpufreq tables in any OS to be 1.5GHz allowing a stable system.

I tested OpenBSD kernel sometime back (With the older 2Ghz bootloader) running the 3.10.y linux kernel and using kvm to passthrough and boot OpenBSD. Even though I was using hardkernel Linux kernel 3.10.y which was restricting cpu to 1.5Ghz in Linux when the CPU's were passed through kvm into OpenBSD kernel (I suspect) they were also passed with 2Ghz frequency tables causing OpenBSD to have sporadic failures. I suspect aarch64 OpenBSD would boot fine now with new bootloader bl301.bin. (kvm or not)

Thanks for the reply. I'm going to modify the Arch PKGBUILD to use the newer bl files. I tried manually compiling them but couldn't get the bootloader to load properly, so maybe I had a typo or something, who knows. A stock mainline system would be nice, and was running that, but had problems getting OpenBSD to boot in kvm. Since this board has mainly become my platform for trying a few hobby things out on, it's nice to have a few new directions to try.
rpcameron
 
Posts: 252
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Sun Sep 03, 2017 11:22 am

rpcameron wrote:I'm going to modify the Arch PKGBUILD to use the newer bl files.

I'm looking forward to using this. Arch is the only distro on the C2 with a working perf, so it's a critical part of my development path, but I need cpufreq working for it to meet all of my needs. Will your mods end up in the Arch repo, and if not, can you walk those of us through it that haven't done it before?
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby rpcameron » Sun Sep 03, 2017 1:11 pm

campbell wrote:
rpcameron wrote:I'm going to modify the Arch PKGBUILD to use the newer bl files.

I'm looking forward to using this. Arch is the only distro on the C2 with a working perf, so it's a critical part of my development path, but I need cpufreq working for it to meet all of my needs. Will your mods end up in the Arch repo, and if not, can you walk those of us through it that haven't done it before?

I doubt it'll make it into the alarm repo, but I will post it here once I get success.

I'm going to continue this discussion in the mainline uboot thread, though, as this ought to stay related to mainline Linux. My personal ultimate goal is to get OpenBSD/arm64 booting on here rather than Linux ...
rpcameron
 
Posts: 252
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Sun Sep 03, 2017 11:41 pm

It's working as of this morning - the uboot-odroid-c2-mainline package has been updated, and I can now enable cpufreq:
Code: Select all
[alarm@alarm ~]$ uname -a
Linux alarm 4.12.10-1-ARCH #1 SMP Wed Aug 30 19:26:03 MDT 2017 aarch64 GNU/Linux
[alarm@alarm ~]$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
[alarm@alarm ~]$ echo ondemand | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby campbell » Tue Sep 05, 2017 10:44 am

Does anyone else get a kernel oops when they do "ifconfig eth0 down" with the 4.12.10 kernel, followed by a hang when they try to bring it back up? It's happening to me under both Arch and Armbian, on the same board. Could be the board, though. Interested to hear if anyone else has the same symptom.

[edit] Updated to the released 4.13.0 on the Arch image and it's not doing it anymore.

Code: Select all
[   27.974426] Unable to handle kernel NULL pointer dereference at virtual address 00000048
[   27.976874] pgd = ffff00000901f000
[   27.980340] [00000048] *pgd=000000006c3fe003, *pud=000000006c3fd003, *pmd=0000000000000000
[   27.988545] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[   27.993945] Modules linked in: cpufreq_userspace cpufreq_conservative cpufreq_ondemand cpufreq_powersave snd_soc_meson_aiu_spdif_dma snd_soc_meson_i2s_dai snd_soc_meson_aiu_i2s_dma snd_so
c_meson_spdif_dai crc32_ce meson_rng rng_core ao_cec snd_soc_hdmi_codec snd_soc_meson_audio_core meson_saradc meson_gxbb_wdt btrfs xor zlib_deflate raid6_pq dw_hdmi_i2s_audio meson_dw_hdmi d
wmac_generic realtek meson_drm dw_hdmi dwmac_meson8b cec stmmac_platform stmmac drm_kms_helper drm
[   28.035353] CPU: 2 PID: 1690 Comm: kworker/2:3 Not tainted 4.12.10-odroidc2 #26
[   28.042591] Hardware name: Hardkernel ODROID-C2 (DT)
[   28.047524] Workqueue: events_power_efficient phy_state_machine
[   28.053373] task: ffff80006921d780 task.stack: ffff800067bc0000
[   28.059244] PC is at test_and_set_bit+0x18/0x40
[   28.063727] LR is at netif_carrier_off+0x1c/0x60
[   28.068295] pc : [<ffff0000083b4db8>] lr : [<ffff0000088775a4>] pstate: 60000145
[   28.075623] sp : ffff800067bc3d60
[   28.078902] x29: ffff800067bc3d60 x28: 0000000000000000
[   28.084162] x27: 0000000000000000 x26: ffff000008c591b0
[   28.089424] x25: 00000000fffffef7 x24: ffff800067871be0
[   28.094685] x23: ffff800067871800 x22: ffff800067871800
[   28.099946] x21: ffff800067871c48 x20: ffff8000678717e0
[   28.105207] x19: 0000000000000000 x18: 0000000000000034
[   28.110469] x17: 0000ffff929ba1a8 x16: ffff00000823b1a0
[   28.115730] x15: 000034ae41c90d38 x14: 0000000683674e90
[   28.120991] x13: 0000000000000000 x12: 0000000000000000
[   28.126252] x11: 00000000000001e6 x10: 0000000000000890
[   28.131514] x9 : ffff800067bc3d70 x8 : ffff80006921e070
[   28.136775] x7 : 000000000000c49e x6 : 0000000000000000
[   28.142036] x5 : 0000000000000000 x4 : 0000000000000004
[   28.147297] x3 : 0000000000000002 x2 : 0000000000000001
[   28.152559] x1 : 0000000000000048 x0 : 0000000000000000
[   28.157822] Process kworker/2:3 (pid: 1690, stack limit = 0xffff800067bc0000)
[   28.164895] Stack: (0xffff800067bc3d60 to 0xffff800067bc4000)
[   28.170591] 3d60: ffff800067bc3d80 ffff000008614d94 ffff800067871be0 ffff000008614af4
[   28.178353] 3d80: ffff800067bc3dd0 ffff0000080d7714 0000000000000000 ffff80005faefa00
[   28.186116] 3da0: ffff80006c3abf00 ffff80006c3b0100 0000000000000000 ffff000008fbbee0
[   28.193878] 3dc0: ffff800067bc3dd0 ffff0000080d7708 ffff800067bc3e10 ffff0000080d78ac
[   28.201641] 3de0: ffff80005faefa00 ffff80006c3abf00 ffff80005faefa30 ffff000008fbbee0
[   28.209403] 3e00: ffff80006c3abf20 ffff000008ea7000 ffff800067bc3e70 ffff0000080dd58c
[   28.217166] 3e20: ffff8000686ea900 ffff8000686ea980 ffff80006921d780 ffff000008c591b0
[   28.224929] 3e40: ffff8000698fbd30 ffff80005faefa00 ffff0000080d7868 ffff8000686ea980
[   28.232690] 3e60: ffff8000686ea900 ffff0000080e6d08 0000000000000000 ffff0000080836c0
[   28.240453] 3e80: ffff0000080dd460 ffff8000686ea900 0000000000000000 0000000000000000
[   28.248209] 3ea0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.255971] 3ec0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.263734] 3ee0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.271496] 3f00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.279259] 3f20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.287021] 3f40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.294784] 3f60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.302546] 3f80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.310309] 3fa0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.318071] 3fc0: 0000000000000000 0000000000000005 0000000000000000 0000000000000000
[   28.325834] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   28.333595] Call trace:
[   28.336012] Exception stack(0xffff800067bc3b90 to 0xffff800067bc3cc0)
[   28.342393] 3b80:                                   0000000000000000 0001000000000000
[   28.350156] 3ba0: ffff800067bc3d60 ffff0000083b4db8 0000000000000000 0000000000000000
[   28.357919] 3bc0: 0000000000000005 ffff800067bc3d00 0000000000000006 0000000000000000
[   28.365681] 3be0: ffff800067bc3c60 ffff000000a4f408 ffff800067bc3c40 ffff000008121358
[   28.373444] 3c00: ffff800067bc3c20 ffff0000087c833c ffff80006853aa68 ffff80006853aa48
[   28.381206] 3c20: ffff800067bc3c30 ffff00000812321c 0000000000000000 0000000000000048
[   28.388969] 3c40: 0000000000000001 0000000000000002 0000000000000004 0000000000000000
[   28.396731] 3c60: 0000000000000000 000000000000c49e ffff80006921e070 ffff800067bc3d70
[   28.404494] 3c80: 0000000000000890 00000000000001e6 0000000000000000 0000000000000000
[   28.412256] 3ca0: 0000000683674e90 000034ae41c90d38 ffff00000823b1a0 0000ffff929ba1a8
[   28.420019] [<ffff0000083b4db8>] test_and_set_bit+0x18/0x40
[   28.425540] [<ffff000008614d94>] phy_state_machine+0x2cc/0x538
[   28.431321] [<ffff0000080d7714>] process_one_work+0x1cc/0x320
[   28.437011] [<ffff0000080d78ac>] worker_thread+0x44/0x460
[   28.442359] [<ffff0000080dd58c>] kthread+0x12c/0x130
[   28.447275] [<ffff0000080836c0>] ret_from_fork+0x10/0x50
[   28.452536] Code: d2800022 8b400c21 f9800031 9ac32044 (c85f7c22)
[   28.458618] ---[ end trace 130a179be395084d ]---
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby moon.linux » Wed Sep 06, 2017 4:34 pm

U-boot mainline for Amlogic and Exynos should support SPL image.
without the support of correct integration of feature it will never work out efficiently.

Rockchip and IMX are leaders in this front.
For better understanding on arch and frame work Rock chip has provided and excellent diagram.
http://opensource.rock-chips.com/wiki_B ... Boot_stage

Image

Some long time work in u-boot is needed to fix Amlogic and Exynos socs.
moon.linux
 
Posts: 888
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby best_odroidfreak » Wed Sep 06, 2017 5:29 pm

moon.linux wrote: socs.[/color]

Please explain, if S905 SoC I2S port doesn't support the slave mode, have you any idea how to overcome the hardware limitation?
best_odroidfreak
 
Posts: 364
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby moon.linux » Thu Sep 07, 2017 3:03 am

@best_odroidfreak
I am not aware of i2s driver or feature yet but I will try to look into this feature and try to study this.
moon.linux
 
Posts: 888
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby best_odroidfreak » Thu Sep 07, 2017 3:27 am

moon.linux wrote:@best_odroidfreak
I am not aware of i2s driver or feature yet but I will try to look into this feature and try to study this.

Thank you in advance for your attention to this important question for audiophiles!
best_odroidfreak
 
Posts: 364
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby odroid » Thu Sep 07, 2017 7:17 am

best_odroidfreak wrote:
moon.linux wrote:@best_odroidfreak
I am not aware of i2s driver or feature yet but I will try to look into this feature and try to study this.

Thank you in advance for your attention to this important question for audiophiles!


Refer this thread.
viewtopic.php?f=139&t=28102
User avatar
odroid
Site Admin
 
Posts: 24662
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Sep 24, 2017 9:44 am

Im having troubles with the emmc in 4.14.0-rc1, sometimes seeing CRC response errors on the card during boot and the potential for corruption. It seems to be specifically related to the emmc so be careful if you are using this combination. Interestingly when it does work performance is great (141Mb/s sequential read).
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby odroid » Sun Sep 24, 2017 10:07 am

The MMC CLK signal seems to be too much fast.
We've never made the read speed over 125MB/sec.
User avatar
odroid
Site Admin
 
Posts: 24662
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Sep 24, 2017 10:29 am

odroid wrote:The MMC CLK signal seems to be too much fast.
We've never made the read speed over 125MB/sec.


Its randomly having problems during initialisation but if it initialises and and tunes the card at boot it consistently gives the following speed...

Code: Select all
$ sudo dd if=/dev/mmcblk0 of=/dev/null bs=2048 status=progress
[sudo] password for machinekit:
15493351424 bytes (15 GB, 14 GiB) copied, 110.001 s, 141 MB/s
7633920+0 records in
7633920+0 records out
15634268160 bytes (16 GB, 15 GiB) copied, 110.995 s, 141 MB/s


I hope the initialisation / tuning algorithm can be optimised to stabilise the emmc at high speed, I provided some feedback to #linux-amlogic and have tried the following patch with some slight improvement in stability https://patchwork.kernel.org/patch/9956665/
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Sep 24, 2017 11:29 am

with the emmc plugged into an sd converter into the SD port the system is stable and the CRC issue disappears but only 12Mb/s
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby teknoid » Sat Sep 30, 2017 6:35 am

Workaround: I changed the max-frequency value in the eMMC section of meson-gxbb-odroidc2.dts to 100MHz.
No CRC errors anymore.

Code: Select all
/* eMMC */
&sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
        pinctrl-names = "default";

        bus-width = <8>;
        cap-sd-highspeed;
        max-frequency = <100000000>;
        non-removable;
        disable-wp;
        cap-mmc-highspeed;
        mmc-ddr-1_8v;
        mmc-hs200-1_8v;

        mmc-pwrseq = <&emmc_pwrseq>;
        vmmc-supply = <&vcc3v3>;
        vqmmc-supply = <&vcc1v8>;
};
User avatar
teknoid
 
Posts: 6
Joined: Sat May 27, 2017 3:02 am
languages_spoken: german
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sat Sep 30, 2017 8:32 am

teknoid wrote:Workaround: I changed the max-frequency value in the eMMC section of meson-gxbb-odroidc2.dts to 100MHz.
No CRC errors anymore.


Thanks for the workaround, I set at 150MHz and system is running stable 115Mb/s sequential read :)
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby odroid » Sat Sep 30, 2017 11:40 am

Nice finding.
What was the default value?
User avatar
odroid
Site Admin
 
Posts: 24662
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Odroid C2 mainline kernel support

Unread postby moon.linux » Sat Sep 30, 2017 2:25 pm

Some more dts change are still missing post UHS-I improvement by @Jerome which are still to land into mainline.

https://git.kernel.org/pub/scm/linux/ke ... 44888aecde
https://git.kernel.org/pub/scm/linux/ke ... v4.14/dt64
moon.linux
 
Posts: 888
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Oct 01, 2017 12:00 pm

moon.linux wrote:Some more dts change are still missing post UHS-I improvement by @Jerome which are still to land into mainline.

https://git.kernel.org/pub/scm/linux/ke ... 44888aecde
https://git.kernel.org/pub/scm/linux/ke ... v4.14/dt64


It appears boards like the nano like the default tx phase settings as implemented recently https://patchwork.kernel.org/patch/9925725/

Ie tx phase defaulted to 270 which is used to start the tuning process. The odroid C2 likes 0 as per Heiner's comments http://lists.infradead.org/pipermail/li ... 04697.html

Reverting that patch (putting default back to 0) for the tuning process in the driver allows the C2 mmc to initialise at 200Mz frequency (stable at least from my minimal testing). I have a stable system on each boot with the 200Mz and HS200 mode, sequential read is back to 141MB/s. Going to do some more testing to check how reliable it is.
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby arny91 » Mon Oct 09, 2017 5:07 pm

Hi,

Does the new rc kernel include an up-to-date dtb file to make HDMI work?

Also, are the developers on the right track with the mali graphic driver for mainline kernel?
https://forum.odroid.com/viewtopic.php?t=26969
arny91
 
Posts: 15
Joined: Sat Aug 13, 2016 9:12 pm
languages_spoken: english
ODROIDs: Odroid C2

Re: Odroid C2 mainline kernel support

Unread postby memeka » Mon Oct 09, 2017 6:03 pm

There is no “mainline Mali driver”
It’s just a kernel module from arm, that can be integrated in any kernel version relatively easy, and which is an interface to a Mali proprietary blob (which may or may not be available).
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid C2 mainline kernel support

Unread postby arny91 » Thu Oct 12, 2017 6:10 pm

redhad wrote:HDMI is not present in the mainline kernel devicetree description of the C2, at least yet. It is however merged for 4.13:

add HDMI and CVBS nodes for multiple boards
pinctrl pins: SPI, HDMI CEC


best_odroidfreak wrote:Kernel mainlining progress

v4.13

DT: cleanup/reorganize alphabetically to better avoid conflicts
add HDMI and CVBS nodes for multiple boards
pinctrl pins: SPI, HDMI CEC
SCPI: fix thermal sensor reporting
New board support
NanoPi K2 (GXBB)
R-Box Pro (GXM)


Ok, what about the dtb? Still not merged in 4.14?
arny91
 
Posts: 15
Joined: Sat Aug 13, 2016 9:12 pm
languages_spoken: english
ODROIDs: Odroid C2

Re: Odroid C2 mainline kernel support

Unread postby reydecopas » Sat Oct 14, 2017 2:26 am

Hi,

Anyone can post the upgrade process from HK kernel to mainline in Archarm?

I've tried with:
pacman -S --force alarm/uboot-odroid-c2-mainline
pacman -S linux-aarch64
reboot

but my odroidc2 don't come back... led is red only...
reydecopas
 
Posts: 5
Joined: Thu Sep 21, 2017 12:36 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby campbell » Sat Oct 14, 2017 12:17 pm

pacman -R uboot-odroid-c2
pacman -S uboot-odroid-c2-mainline linux-aarch64
reboot
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby bas25 » Sun Oct 15, 2017 2:37 am

Hi,

after some research, i don't understand how to find the i2c frequency in mainline kernel, and how to change her.

any help would be appreciate.
thanks.
bas25
 
Posts: 2
Joined: Sun Sep 24, 2017 2:25 am
languages_spoken: english
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby reydecopas » Sun Oct 15, 2017 6:41 am

Hi cambell..

Then is it not necessary to change boot.ini content?
reydecopas
 
Posts: 5
Joined: Thu Sep 21, 2017 12:36 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Oct 15, 2017 8:17 am

bas25 wrote:Hi,

after some research, i don't understand how to find the i2c frequency in mainline kernel, and how to change her.

any help would be appreciate.
thanks.


Take a look at the device tree doco for meson i2c https://git.kernel.org/pub/scm/linux/ke ... =v4.14-rc4

The default i2c frequency is 100kHz and can be changed from default by specifying "clock-frequency" in the device tree.

Are you using a standard driver already in the kernel for your i2c device or are you writing a userspace driver to interface to it?
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Sun Oct 15, 2017 9:31 am

If you are working from a fresh install of arch, i don’t think it’s necessary to modify boot.ini. But if you have made changes, pacman may choose not to overwrite your changes with those necessary to boot the new kernel. I’ve only done it once or twice and not in the last few weeks so I don’t really know what the rules are and whether they’ve changed
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby reydecopas » Sun Oct 15, 2017 6:22 pm

Hi Cambell,

It works!!! New packages creates boot.txt instead of boot.ini...

but wiringc1 give this error:
[root@alarm ~]# gpio readall
piBoardRev: Unable to determine board revision from /proc/cpuinfo
-> No "Revision" line
-> You may want to check:
-> http://www.raspberrypi.org/phpBB3/viewt ... 10#p184410

Do you know howto build a wiringpi library for mainline?
reydecopas
 
Posts: 5
Joined: Thu Sep 21, 2017 12:36 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby bas25 » Sun Oct 15, 2017 9:49 pm

brad wrote:Take a look at the device tree doco for meson i2c https://git.kernel.org/pub/scm/linux/ke ... =v4.14-rc4

The default i2c frequency is 100kHz and can be changed from default by specifying "clock-frequency" in the device tree.

Are you using a standard driver already in the kernel for your i2c device or are you writing a userspace driver to interface to it?


ok, thanks for pointing this file. I've recently seen it and for some obscur reason skipped the exemple !
I use i2c from user space with a microcontroller. It worked great with hardkernel kernel, but have problem with mainline 4.13.3.

found the problem :
as stated in this page, with hardkernel kernel, the 100kHz i2c speed is in fact 80kHz
http://odroid.com/dokuwiki/doku.php?id= ... lock_speed

my microcontroller board didn't answer correctly with the default mainline kernel i2c speed (which i haven't mesured yet).
changing the i2c speed to 80khz did the trick.

thanks.
bas25
 
Posts: 2
Joined: Sun Sep 24, 2017 2:25 am
languages_spoken: english
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby brad » Mon Oct 16, 2017 4:03 pm

reydecopas wrote:but wiringc1 give this error:
[root@alarm ~]# gpio readall
piBoardRev: Unable to determine board revision from /proc/cpuinfo
-> No "Revision" line
-> You may want to check:
-> http://www.raspberrypi.org/phpBB3/viewt ... 10#p184410

Do you know howto build a wiringpi library for mainline?


Wiringpi is not currently compatible with mainline, it would need some changes to detect mainline kernel version and assign the pin numbers differently.
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sat Oct 21, 2017 11:10 am

I haven't tried as yet but 4.14-rc appears to have the fixes for high speed emmc on the C2. 4.14 is a LTR version of the kernel but does not support HDMI on the C2.

Patches have been submitted recently (aimed at 4.15 I guess) to enable Odroid C2 HDMI & CEC. Work has also begun to start enabling VPU for meson gxbb devices.

Lastly as a side note, support for 32bit Odroid C1 and the samsung based HC1 is on the move.
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Sat Oct 21, 2017 12:17 pm

I've just upgraded my Arch eMMC to 4.14-rc5 and it seems to be working, although a bunch of systemd services fail at boot, which is new. Is there any specific speed test you'd like me to try?
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby brad » Sat Oct 21, 2017 12:35 pm

campbell wrote:Is there any specific speed test you'd like me to try?


This one would be nice if you can try, Thanks!

$ sudo dd if=/dev/mmcblk0 of=/dev/null bs=2048 status=progress
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Sat Oct 21, 2017 12:55 pm

brad wrote:This one would be nice if you can try, Thanks!

$ sudo dd if=/dev/mmcblk0 of=/dev/null bs=2048 status=progress

149 MB/s over 52 seconds
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby brad » Sat Oct 21, 2017 3:55 pm

campbell wrote:149 MB/s over 52 seconds


That is quiet impressive :)
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Sun Oct 22, 2017 5:36 am

Unfortunately it looks like the filesystem comes up read-only, hence the systemd failures. So it's not working yet.
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby campbell » Sun Oct 22, 2017 6:17 am

brad wrote:4.14-rc appears to have the fixes for high speed emmc on the C2

4.14-rc5 in the Arch repo doesn't seem to have these fixes, unless I'm doing something wrong. Do you specifically see them in rc5 or were they merged later?
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Oct 22, 2017 7:23 am

campbell wrote:
brad wrote:4.14-rc appears to have the fixes for high speed emmc on the C2

4.14-rc5 in the Arch repo doesn't seem to have these fixes, unless I'm doing something wrong. Do you specifically see them in rc5 or were they merged later?


I was hoping these changes fixed the problem implemented in 4.14-rc3.

https://git.kernel.org/pub/scm/linux/ke ... 9228ba0e8b

Do you see crashes on startup or does it work but at slower speed?
brad
 
Posts: 604
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Sun Oct 22, 2017 8:54 am

I get a bunch of crc errors followed by it finishing booting with the filesystem in read only mode. The speed test you had me do yesterday works just fine with the fs in read only mode, which is why i didn't notice.
campbell
 
Posts: 194
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby moon.linux » Sun Oct 22, 2017 9:41 pm

Future of Amlogic SoC. by Neil Armstrong
moon.linux
 
Posts: 888
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Previous

Return to General Chat

Who is online

Users browsing this forum: No registered users and 2 guests