Skip to content

RK3399 | Additional device tree overlays #7607

Answered by MichaIng
mentorosso asked this question in Q&A
Discussion options

You must be logged in to vote

I see. The script downloads a pre-compiled overlay. That will work only if the base device tree did not change too much. Likely Linux 6.12 broke it. A device tree should be recompiled for every new kernel.

Try this:

apt install device-tree-compiler
mkdir -p /boot/overlay-user
cat << '_EOF_' > /boot/overlay-user/rk3399-dwc3-0-peripheral.dtso
/dts-v1/;
/plugin/;
/ {
	compatible = "rockchip,rk3399";
	fragment@0 {
		target = <&usbdrd_dwc3_0>;
		__overlay__ {
			dr_mode = "peripheral";
		};
	};
};
_EOF_
dtc -I dts -O dtb -o /boot/overlay-user/rk3399-dwc3-0-peripheral.dt{b,s}o
G_CONFIG_INJECT 'user_overlays=' 'user_overlays=rk3399-dwc3-0-peripheral' /boot/dietpiEnv.txt

Generally, this overlay m…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@mentorosso
Comment options

@MichaIng
Comment options

@mentorosso
Comment options

@MichaIng
Comment options

Answer selected by mentorosso
@mentorosso
Comment options

@MichaIng
Comment options

@mentorosso
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment