Device Tree Overlay (Odroid C4) inactive?

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Fanthomas
Posts: 5
Joined: Thu Oct 22, 2020 11:32 am

Device Tree Overlay (Odroid C4) inactive?

Post by Fanthomas »

Hi,
After checking HardKernel's Ubuntu Mate, I've decided I needed a smaller distro (using 16GB eMMC), enter DietPi.

I probably missed something during installation after flashing DietPi_OdroidC4-ARMv8-Buster to eMMC. I need to enable lineout overlay (second soundcard J4-header on Odroid C4) but config.ini is nowhere to be found, should be in the same dir as boot.ini. Overlay dir with *.dtb and *.dts files is present.

I added deb http://deb.odroid.in/c4/ focal main in /etc/apt/source.list and a missing KEY (NO_PUBKEY error, fixed with sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2DD567ECD986B59D) followed by apt update && apt full-upgrade and a reboot but still no config.ini file :(

Previously doing this on Ubuntu Mate did fix the issue https://forum.odroid.com/viewtopic.php?p=308807#p308807
I'd appreciate any input regarding this matter.
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: Device Tree Overlay (Odroid C4) inactive?

Post by Joulinar »

Hi,

did you try to add the overlay stuff into /boot/config.txt.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Fanthomas
Posts: 5
Joined: Thu Oct 22, 2020 11:32 am

Re: Device Tree Overlay (Odroid C4) inactive?

Post by Fanthomas »

Thanks for the replay.
As stated above config.ini is missing, creating this file and adding only Device Tree Overlay did not work (I've already tried it when overlay wasn't working on Ubuntu). Copying /boot/config.ini from a working Ubuntu-minimal backup image also does nothing, aplay -l returns only card 0: ODROIDHDMI.

config.ini file content:

Code: Select all

[generic]
; *************************************************
; Copy of a working Ubuntu minimal /boot/config.ini
; *************************************************

; Auto Detection of Monitor settings based on your Screen information
display_autodetect=true

; HDMI Mode
; Resolution Configuration
;    Symbol             | Resolution
; ----------------------+-------------
;    "480x272p60hz"     | 480x272 Progressive 60Hz
;    "480x320p60hz"     | 480x320 Progressive 60Hz
;    "480p60hz"         | 720x480 Progressive 60Hz
;    "576p50hz"         | 720x576 Progressive 50Hz
;    "720p60hz"         | 1280x720 Progressive 60Hz
;    "720p50hz"         | 1280x720 Progressive 50Hz
;    "1080p60hz"        | 1920x1080 Progressive 60Hz
;    "1080p50hz"        | 1920x1080 Progressive 50Hz
;    "1080p30hz"        | 1920x1080 Progressive 30Hz
;    "1080p24hz"        | 1920x1080 Progressive 24Hz
;    "1080i60hz"        | 1920x1080 Interlaced 60Hz
;    "1080i50hz"        | 1920x1080 Interlaced 50Hz
;    "2160p60hz"        | 3840x2160 Progressive 60Hz
;    "2160p50hz"        | 3840x2160 Progressive 50Hz
;    "2160p30hz"        | 3840x2160 Progressive 30Hz
;    "2160p25hz"        | 3840x2160 Progressive 25Hz
;    "2160p24hz"        | 3840x2160 Progressive 24Hz
;    "smpte24hz"        | 3840x2160 Progressive 24Hz SMPTE
;    "2160p60hz420"     | 3840x2160 Progressive 60Hz YCbCr 4:2:0
;    "2160p50hz420"     | 3840x2160 Progressive 50Hz YCbCr 4:2:0
;    "640x480p60hz"     | 640x480 Progressive 60Hz
;    "800x480p60hz"     | 800x480 Progressive 60Hz
;    "800x600p60hz"     | 800x600 Progressive 60Hz
;    "1024x600p60hz"    | 1024x600 Progressive 60Hz
;    "1024x768p60hz"    | 1024x768 Progressive 60Hz
;    "1280x800p60hz"    | 1280x800 Progressive 60Hz
;    "1280x1024p60hz"   | 1280x1024 Progressive 60Hz
;    "1360x768p60hz"    | 1360x768 Progressive 60Hz
;    "1440x900p60hz"    | 1440x900 Progressive 60Hz
;    "1600x900p60hz"    | 1600x900 Progressive 60Hz
;    "1600x1200p60hz"   | 1600x1200 Progressive 60Hz
;    "1680x1050p60hz"   | 1680x1050 Progressive 60Hz
;    "1920x1200p60hz"   | 1920x1200 Progressive 60Hz
;    "2560x1080p60hz"   | 2560x1080 Progressive 60Hz
;    "2560x1440p60hz"   | 2560x1440 Progressive 60Hz
;    "2560x1600p60hz"   | 2560x1600 Progressive 60Hz
;    "3440x1440p60hz"   | 3440x1440 Progressive 60Hz
hdmimode=1080p60hz

; Monitor output
; Controls if HDMI PHY should output anything to the monitor
monitor_onoff=false

; Overscan percentage
; This value scales down the actual screen size by the percentage below
; valid range is 80 to 100
overscan=100

; SDR/HDR Configuration
; This forces SDR or HDR modes
; valid options are: sdr hdr auto
sdrmode=auto

; voutmode : hdmi or dvi
; hdmi / dvi
voutmode=hdmi

; HPD enable/disable option
; false / true
disablehpd=false

; Enable/Disable CEC
cec=true

; Hardkernel ODROID-VU7 support
; By default VU7 support is disabled
disable_vu7=true

; Maximum CPU frequency
; 100/250/500/667/1000/1200/1404/1500/1608/1704/1800/1908 (stock)/2016/2100
; max_freq_a55=1800


; Maximum number of CPU cores
maxcpus=4

; Wake-On-Lan support (0=disable, 1=enable)
; enable_wol=1

; Device Tree Overlay
overlay_resize=16384
overlay_profile=lineout
overlays="spi0 i2c0 i2c1 uart0"

[overlay_custom]
overlays="i2c0 i2c1"

[overlay_hktft32]
overlays="hktft32"

[overlay_hktft35]
overlays="hktft35"

[overlay_lineout]
overlays="lineout"

For now I2C also is not working but this should be resolved when overlay works (ls /dev/i2c* -> No such file or directory).
I probably could force something like I2C to work with:

Code: Select all

root@odroid:~# fdtput -t s /boot/meson64_odroidc4.dtb /soc/cbus@ffd00000/i2c@1d000 status okay
But this defeats the purpose of overlays plus I have no idea what to fdtput to enable lineout.
Last edited by Fanthomas on Thu Oct 22, 2020 4:19 pm, edited 1 time in total.
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: Device Tree Overlay (Odroid C4) inactive?

Post by Joulinar »

DietPi is based on Debian and not Ubuntu
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Fanthomas
Posts: 5
Joined: Thu Oct 22, 2020 11:32 am

Re: Device Tree Overlay (Odroid C4) inactive?

Post by Fanthomas »

Joulinar wrote: Thu Oct 22, 2020 4:17 pm DietPi is based on Debian and not Ubuntu
Sure but does this affect DTO? I mean is it even possible to use lineout on Odroid C4 in DietPi?
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: Device Tree Overlay (Odroid C4) inactive?

Post by Joulinar »

you can have a look to dietpi-config > Audio Options
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: Device Tree Overlay (Odroid C4) inactive?

Post by MichaIng »

I just found that indeed the default boot.ini on Odroid C4 (same as N2) does not yet incorporate the dtoverlays nicely. Will be done for next DietPi release. Good that you already found the command to do that manually for now, we'll implement it a way that you can add overlays via simple dtoverlay= (or similar) setting in boot.ini and add some of them via dietpi-config, e.g. toggle for I2C and SPI and probably a few others where applicable.
Fanthomas
Posts: 5
Joined: Thu Oct 22, 2020 11:32 am

Re: Device Tree Overlay (Odroid C4) inactive?

Post by Fanthomas »

Joulinar wrote: Thu Oct 22, 2020 8:13 pm you can have a look to dietpi-config > Audio Options
There is only HDMI output (hw:0,0) and usb-dac (detects as none which is correct).
MichaIng wrote: Sat Oct 24, 2020 12:36 am I just found that indeed the default boot.ini on Odroid C4 (same as N2) does not yet incorporate the dtoverlays nicely. Will be done for next DietPi release. Good that you already found the command to do that manually for now, we'll implement it a way that you can add overlays via simple dtoverlay= (or similar) setting in boot.ini and add some of them via dietpi-config, e.g. toggle for I2C and SPI and probably a few others where applicable.
Thanks, I would appreciate also including the lineout as it is a dedicated header (J4) for analog audio not populated by default.
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: Device Tree Overlay (Odroid C4) inactive?

Post by MichaIng »

Makes sense, the overlay for is is there, right?
Fanthomas
Posts: 5
Joined: Thu Oct 22, 2020 11:32 am

Re: Device Tree Overlay (Odroid C4) inactive?

Post by Fanthomas »

Fanthomas wrote: Thu Oct 22, 2020 12:06 pm Overlay dir with *.dtb and *.dts files is present.
Yes, lineout.dtb and lineout.dts are in overlay directory.
Post Reply