Jump to content

Odroid C2 general


TonyMac32

Recommended Posts

On 8/22/2020 at 11:18 PM, JMCC said:

Just to be clear: last time I checked, our mainline was using the custom HK blob for the C2 ( @TonyMac32 can you confirm this?). 

 

Which means that, even though the max frequency is 1.5 GHz, you get the real frequency. Unlike all the other S905' that report 1.5 but are actually running 1.4 GHz.

 

Now, in order to unlock higher frequencies, you need patches both for the kernel and for the DT. The patches were done for HK's 3.16.x kernel, and it may or may not be possible to port them to mainline.

 

It is probably not hard. But it needs a person to dive into the old 3.16.x kernel, extract the patches, and try to adapt them to mainline. You're welcome to try, you will for sure learn a lot, whether you finally get to fix it or not ;)

I sure would like to do that, but I have zero experience in Linux kernels so...

Link to comment
Share on other sites

how do I enable CEC?
There are usually three things you must check:
- CEC pins enabled in the device tree
- CEC enabled in kernel config
- libcec supporting the CEC driver's API


Right now I am working on CEC for Rockchip boards. Any finding you do regarding C2, please share here, or make a PR to contribute to the project.

Enviado desde mi moto g(6) plus mediante Tapatalk

Link to comment
Share on other sites

Hello. Currently I'm working on the I2S support and the micro USB for the current mainline kernel.

 

I have the C2 connected to my monitor via HDMI. Using the current Focal Desktop image with 5.9.14 kernel the sound output is working only when the Desktop is enabled. speaker-test works as normal user

But when I disable the desktop, sound stops working.

I guess the X-server configures something in ALSA, pulseaudio or enables somthing in the HDMI interface. What is strange since the graphics output still works...

 

Do you have an hint for me where to look?

Link to comment
Share on other sites

Anyone was able to patch the kernel and DT to go beyond 1.54 GHz on the C2?

Armbian is great, but it is frustrating to not be able to run at 1.75 GHz like I used to do with HK 3.16 kernel several years ago...

And to be clear, it was not cosmetic, as at 1,75 GHz, some CPU intensive tasks were not maxing the CPU load at 100% when at 1.54 it did.

 

I am completely lost with this kernel patching process, so I can’t do it by myself.

Would be great to have a optional kernel for those who want to use OC with C2.

Link to comment
Share on other sites

Am 1.1.2021 um 10:07 schrieb marcel-kanter:

Currently I'm working on the I2S support

 

I2S support with mainline kernel images would be great indeed. I can imagine it needs to be enabled and an I2S audio device created via device tree overlay first, like in case of NanoPi H3 SBCs (and the I2S NanoHat PCM5102A):

  

Link to comment
Share on other sites

Is there any chance to get access to the gpios on the pin header again?

 

In /sys/class/gpio only two "banks" are listed "gpiochip378" and "gpiochip497". From searching around the net, I think that gpiochip378 is for configuring HDMI and gpiochip497 only has 15 entries. I'd also expected to find the gpios in "gpiochip0" as on other platforms.

 

Was this just an oversight in the device tree, when moving to a newer kernel or is it left out on purpose?

 

P.S.: for me it's not required to access the gpios via /sys/class/gpio, any method to write to pin 40 (aka RasPi gpio21) would work for me.

Link to comment
Share on other sites

On 2/8/2022 at 12:54 PM, SvOlli said:

Is there any chance to get access to the gpios on the pin header again?

 

In /sys/class/gpio only two "banks" are listed "gpiochip378" and "gpiochip497". From searching around the net, I think that gpiochip378 is for configuring HDMI and gpiochip497 only has 15 entries. I'd also expected to find the gpios in "gpiochip0" as on other platforms.

 

Was this just an oversight in the device tree, when moving to a newer kernel or is it left out on purpose?

 

P.S.: for me it's not required to access the gpios via /sys/class/gpio, any method to write to pin 40 (aka RasPi gpio21) would work for me.

 

https://github.com/torvalds/linux/blob/09688c0166e76ce2fb85e86b9d99be8b0084cdf9/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts#L294

 

all the GPIO on the headers should be there.

Link to comment
Share on other sites

5 hours ago, TonyMac32 said:

all the GPIO on the headers should be there.

Thanks for pointing me out in the right direction. They are there, if you know where to look:

root@odroid-c2:~# grep -e J2 -e ^gpio /sys/kernel/debug/gpio 
gpiochip1: GPIOs 378-496, parent: platform/c8834000.bus:pinctrl@4b0, periphs-banks:
 gpio-456 (J2 Header Pin35     )
 gpio-460 (J2 Header Pin36     )
 gpio-461 (J2 Header Pin31     )
 gpio-466 (J2 Header Pin32     )
 gpio-467 (J2 Header Pin26     )
 gpio-470 (J2 Header Pin29     )
 gpio-471 (J2 Header Pin24     )
 gpio-472 (J2 Header Pin23     )
 gpio-473 (J2 Header Pin22     )
 gpio-474 (J2 Header Pin21     )
 gpio-475 (J2 Header Pin18     )
 gpio-476 (J2 Header Pin33     )
 gpio-477 (J2 Header Pin19     )
 gpio-478 (J2 Header Pin16     )
 gpio-479 (J2 Header Pin15     )
 gpio-480 (J2 Header Pin12     )
 gpio-481 (J2 Header Pin13     )
 gpio-482 (J2 Header Pin8      )
 gpio-483 (J2 Header Pin10     )
 gpio-489 (J2 Header Pin11     )
 gpio-491 (J2 Header Pin7      )
gpiochip0: GPIOs 497-511, parent: platform/c8100000.bus:pinctrl@14, aobus-banks:

Notice that the mapping is not 1:1 to a Raspberry Pi. The pin 40, that I wanted to use, for example is  an ADC input only. Maybe I can change the circuit to use pin 7 instead.

Link to comment
Share on other sites

13 hours ago, SvOlli said:

Notice that the mapping is not 1:1 to a Raspberry Pi. The pin 40, that I wanted to use, for example is  an ADC input only. Maybe I can change the circuit to use pin 7 instead.

Right.  The C2 doesn't put as much effort into the Pi header compatibility as a lot of other boards.  I haven't used one for GPIO partly for that reason. 

 

I need to add some of my other boards to this but:

 

https://docs.google.com/spreadsheets/d/1dJq7MM1_zA5HtXywDMZ9HMKyPaNgGmkxnuz3wYuk4s8/edit?usp=sharing

Link to comment
Share on other sites

  • Igor unpinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines