SAMMIX R95S DTB modification

Hi everyone,

I have 2 sammix R95S (S905X 1GB /16GB) box running on Android 7 and 2GB of ram. The CoreELEC version is 9.2.7. I am using the DTB gxl_p212_1g. In order to support audio from toshlink I need to modify the dtb gxl_p212_1g to

audio_pin1 {
            amlogic,setmask = <0x06 0x10000000>;
            amlogic,clrmask = <0x06 0x8000000>;
            amlogic,pins = "GPIOAO_9";
            linux,phandle = <0x5d>;
            phandle = <0x5d>;

The change is amlogic,pins = “GPIOH_4”; to amlogic,pins = “GPIOAO_9”

How can contribute this change for the others to use?


You can create a like this example:

I wanted to modify the dtb (gxl_p212_1g.dtb) from CoreELEC nightly builds 9.2 and it seems that the audio_pin1 is not part of the dtb anymore. How can modify the gxl_p212_1g.dtb to support toslink with the GPIOAO_9 value?

Hi @Portisch, I am still trying to find where the spdif/toslink pins are defined in the dtb from 9.2 nightly build or 19.1? Any more hints :smile: thanks

So I think maybe this can work:

	audio_spdif_pins:audio_spdif {
		mux {
			groups = "spdif_out_ao";
			function = "spdif_out_ao";


So maybe:

fdtput -t s gxl_p212_1g.dtb /pinctrl@4b0/audio_spdif_out_pins/mux groups "spdif_out_ao"
fdtput -t s gxl_p212_1g.dtb /pinctrl@4b0/audio_spdif_out_pins/mux function "spdif_out_ao"

@Portisch thank you for all the help! I am learning more about device trees.
I wasn’t able to run the fdtput command directly.
dtname command returns gxl_p212_1g

fdtput -t s gxl_p212_1g.dtb /pinctrl@4b0/audio_spdif_out_pins/mux groups “spdif_out_ao”
Couldn’t open blob from ‘gxl_p212_1g.dtb’: No such file or directory

so I tried : mount -o remount,rw /flash
fdtput -t s /flash/dtb.img /pinctrl@4b0/audio_spdif_out_pins/mux groups “spdif_out_ao”
fdtput -t s /flash/dtb.img /pinctrl@4b0/audio_spdif_out_pins/mux function “spdif_out_ao”

That didn’t work. It removed the ALSA: AML-MESONAUDIO, HDMI I only had pulse: default,bluetooth Audio (PULSEAUDIO).

I modified the dtb to :
audio_spdif {
phandle = <0x8c>;
mux {
groups = “spdid_out_ao”;
function = “spdid_out_ao”;
It didn’t work, I tried the following and didn’t work either
audio_spdif {
phandle = <0x8c>;
mux {
groups = “spdid_out_ao9”;
function = “spdid_out_ao9”;

Any more hints? Specially on the No such file or directory when running fdtput?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.