Odroid C2 mainline kernel support

Moderators: odroid, mdrjr

Re: Odroid C2 mainline kernel support

Unread postby emk2203 » Tue Jun 05, 2018 1:08 pm

@scpcom: Does USB work now with your kernel?
User avatar
emk2203
 
Posts: 31
Joined: Fri Oct 16, 2015 12:29 am
languages_spoken: english, german
ODROIDs: C1+, C2, XU4, HC1

Re: Odroid C2 mainline kernel support

Unread postby scpcom » Sat Jun 09, 2018 2:08 am

Update 20180602
- Kernel 4.17.0
- Removed linux-4.17.y-amlogic-drm-0016-[wip]_calculate_display_params.patch
- Removed linux-4.17.y-amlogic-drm-1000-wip_calculate_display_params-fix.patch
- Removed linux-4.17.y-amlogic-drm-1001-drm-mode-32000khz-vu7plus.patch
- Added linux-4.17-amlogic-dmt-extended-0001-make_dmt_timings_parameter_generic_and_add_more_frequencies.patch (by baylibre)
- Added linux-4.17-amlogic-dmt-extended-1001-fix-32000khz.patch
- Added linux-4.17-amlogic-dmt-extended-1002-custom-mode.patch
linux-4.14-odroidc2-build.tar.gz linux-image-4.14.47-20180602-c2-arm64.zip
linux-4.17-odroidc2-build.tar.gz linux-image-4.17.0-20180602-c2-arm64.zip

The baylibre patch has a pll_base_freq of 2560000 for pixel clock 32000khz, I raised it to 5120000 again, otherwise my C2 with VU7+ freezes.

With the new patches drm-meson can handle now any custom resolution between 640x480 and 1920x1200 (+ predefined higher resolutions).
It will first do lookup in the predefined tables for standard resolutions, if nothing matches all required parameters will be calculated (timing parameters, pixel clock, pll base freq., m and frac).
The required combinations of od1, od2, od3, vid_pll_div and vclk_div are currently taken from the list of predefined params.

@emk2203
My USB devices (mouse, keyboard, VU7+ Touch, portable HDD and Cinergy HTC USB XS DVB-C/T stick) work without any problems (DVB-C/T stick works only on OTG port).
scpcom
 
Posts: 49
Joined: Thu Jun 23, 2016 8:07 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby scpcom » Wed Jun 13, 2018 2:00 am

Update 20180610
- Kernel 4.17.1
- Added linux-4.17-amlogic-dmt-extended-1003-calculate-clock-dividers.patch
- Added linux-4.17-le-amlogic-gx-0027-arm64-dts-meson-activate_hdmi_audio_hdmi_enabled_boards.patch
- Added linux-4.14.y-le-amlogic-gx-1002-dts-meson-gxbb-rename_audio_card.patch
- Added linux-4.17.y-amlogic-clk-1001-clk-meson-fix_broken_audio.patch
linux-4.14-odroidc2-build.tar.gz linux-image-4.14.49-20180610-c2-arm64.zip
linux-4.17-odroidc2-build.tar.gz linux-image-4.17.1-20180610-c2-arm64.zip

Th video clock dividers are calculated too now, independent from lookup tables.

I found that audio was not working in kernel 4.17.
This was caused by the "migrate the audio divider clock to clk_regmap" patch:
88a4e1283681e0f07048b2bd867cc81fbbae57cc

If you look at 4.14:
clk-audio-divider.c#L71
and 4.17:
clk-audio-divider.c#L54
you will see that a "+1" is missing in 4.17 code.
The result is a wrong value returned by clk_get_rate which causes an error here:
i2s-dai.c#L148
i2s-dai.c#L231
scpcom
 
Posts: 49
Joined: Thu Jun 23, 2016 8:07 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby moon.linux » Wed Jun 13, 2018 2:29 am

@scpcom If you find some bug and you solve this please send a patch upstream to fix the issue.
moon.linux
 
Posts: 1074
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby miskol » Thu Jun 14, 2018 5:10 am

here you can find nice set of patch-es for 4.17 from Neil Armstrong
https://github.com/superna9999/meta-mes ... son64-4.17
miskol
 
Posts: 128
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby scpcom » Thu Jun 14, 2018 10:09 am

@miskol
Thank you. I already use many patches from Neil Armstrong, but I did not know this patch set.
Good to know that he already had a patch for the audio divider.
scpcom
 
Posts: 49
Joined: Thu Jun 23, 2016 8:07 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby mcloaked » Fri Jun 15, 2018 4:43 am

Way back in this thread around Jan 06 this year, I exchanged requests and ideas about getting the rtc working in the mainline kernel running archlinux arm on the odroid-c2 but at that time there were problems with the eMMC timing so I reverted to installing the non-mainline kernel in a clean install. Today with much more development in the kernel supporting the odroid-c2 I updated to kernel 4.17.1-1-ARCH and this seems stable. However the original problems with being unable to get the rtc working remain. The recipe for dtc changes given by campbell in January still don't work for me with the current mainline kernel in archlinuxarm, and although the rtc is not essential, since I use systemd-timesyncd to update the system clock very quickly after boot, it would be nice to know if there is a way to get the rtc working.

Code: Select all
# hwclock -r --verbose
hwclock from util-linux 2.32
System Time: 1529005387.845705
Trying to open: /dev/rtc0
Trying to open: /dev/rtc
Trying to open: /dev/misc/rtc
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.


The i2c shows there is a slot at 51

Code: Select all
# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


The i2c_dev and rtc_pcf8563 modules can be loaded with modprobe - but I still can't get hwclock -r to work. This seems close but I must be missing something critical.

Is the aml_i2c module crucial to using the rtc?

Code: Select all
# modprobe aml_i2c
modprobe: FATAL: Module aml_i2c not found in directory /lib/modules/4.17.1-1-ARCH


If anyone has been trying to do this and had some success I would appreciate knowing what method worked.

Thanks.
mcloaked
 
Posts: 9
Joined: Wed Jun 08, 2016 11:57 pm
languages_spoken: english
ODROIDs: odroid-c2

Re: Odroid C2 mainline kernel support

Unread postby emk2203 » Sat Jun 16, 2018 5:53 pm

scpcom wrote:Update 20180602
- Kernel 4.17.0

@emk2203
My USB devices (mouse, keyboard, VU7+ Touch, portable HDD and Cinergy HTC USB XS DVB-C/T stick) work without any problems (DVB-C/T stick works only on OTG port).


@scpcom: I tried the kernel 4.17.1 on a system with Odroid kernel and Ubuntu 18.04, but with a failure. System doesn't boot, no heartbeat LED. What would be the best way to debug it? The install was done per your instructions, everything went through with some symlinks to libmali refusing to install ("file exists"), I did these by hand. Everything else looked fine. I used the libmali .pkg for stretch, since the old Ubuntu one didn't meet dependencies.
User avatar
emk2203
 
Posts: 31
Joined: Fri Oct 16, 2015 12:29 am
languages_spoken: english, german
ODROIDs: C1+, C2, XU4, HC1

Previous

Return to General Chat

Who is online

Users browsing this forum: No registered users and 3 guests