Jump to content
  • 0

RockPi-E enabling UART1 and OTG using custom DT overlays


djjerdog
 Share

Question

I wanted to share 2 custom overlays I've created and tested for the RockPi E to enable UART1 and OTG via the GPIO.

 

Create file rockchip-uart1.dts

/dts-v1/;
/ {
	compatible = "rockchip,rk3328";
	fragment@0 {
		target-path = "/serial@ff120000";
		__overlay__ {
			pinctrl-0 = < 0x23 >;
			status = "okay";
		};
	};
};

 

Create file rockchip-otg.dts

/dts-v1/;
/ {
	compatible = "rockchip,rk3328";
	fragment@0 {
		target-path = "/usb@ff580000";
		__overlay__ {
			dr_mode = "otg";			
		};
	};
};

 

 

Install and enable overlays:
sudo armbian-add-overlay rockchip-uart1.dts
sudo armbian-add-overlay rockchip-otg.dts

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Open source development is fun. Join Armbian Linux development team today!

  • 0

Hi,

 

I have followed the procedure above to make it work, however I have an issue still. I am on armbian 21.08.1 Buster with Linux 5.10.60, the latest available. For information I have make this work with the legacy kernel so my wiring is fine.

 

#sudo dd bs=1M if=/dev/zero of=/piusb.bin count=64

#mkfs.ext4 -t ext4 /piusb.bin -O ^has_journal 

#sudo modprobe g_mass_storage file=/piusb.bin stall=0 removable=1 ro=1

#dmesg |tail -20

[   58.531943] Mass Storage Function, version: 2009/09/11
[   58.531983] LUN: removable file: (no medium)
[   58.532430] LUN: removable read only file: /piusb.bin
[   58.532452] Number of LUNs=1
[   58.532861] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[   58.532882] g_mass_storage gadget: userspace failed to provide iSerialNumber
[   58.532896] g_mass_storage gadget: g_mass_storage ready
[   58.532921] dwc2 ff580000.usb: bound driver g_mass_storage
[   58.548704] dwc2 ff580000.usb: dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL_CSFTRST

 

Do you know what can make this dwc2_core_reset: HANG?

 

Thank you,

Armandooooo

Link to comment
Share on other sites

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
Answer this question...

×   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...
 Share

×
×
  • Create New...