embeded/raspberry pi2021. 9. 27. 18:00

rpi 4 cm 에서 usb를 쓰려면 config.txt에 다음의 내용을 추가해야 하는데

dtoverlay=dwc2,dr_mode=host

 

$ modinfo dwc2
filename:       /lib/modules/5.10.60-v7+/kernel/drivers/usb/dwc2/dwc2.ko
license:        Dual BSD/GPL
author:         Synopsys, Inc.
description:    DESIGNWARE HS OTG Core
license:        Dual BSD/GPL
author:         Matthijs Kooijman <matthijs@stdin.nl>
description:    DESIGNWARE HS OTG Platform Glue
srcversion:     C0FF7C976DCDD3E4810AFB1
alias:          of:N*T*Cst,stm32mp15-hsotgC*
alias:          of:N*T*Cst,stm32mp15-hsotg
alias:          of:N*T*Cst,stm32mp15-fsotgC*
alias:          of:N*T*Cst,stm32mp15-fsotg
alias:          of:N*T*Cst,stm32f7-hsotgC*
alias:          of:N*T*Cst,stm32f7-hsotg
alias:          of:N*T*Cst,stm32f4x9-hsotgC*
alias:          of:N*T*Cst,stm32f4x9-hsotg
alias:          of:N*T*Cst,stm32f4x9-fsotgC*
alias:          of:N*T*Cst,stm32f4x9-fsotg
alias:          of:N*T*Capm,apm82181-dwc-otgC*
alias:          of:N*T*Capm,apm82181-dwc-otg
alias:          of:N*T*Camcc,dwc-otgC*
alias:          of:N*T*Camcc,dwc-otg
alias:          of:N*T*Camlogic,meson-g12a-usbC*
alias:          of:N*T*Camlogic,meson-g12a-usb
alias:          of:N*T*Camlogic,meson-gxbb-usbC*
alias:          of:N*T*Camlogic,meson-gxbb-usb
alias:          of:N*T*Camlogic,meson8b-usbC*
alias:          of:N*T*Camlogic,meson8b-usb
alias:          of:N*T*Camlogic,meson8-usbC*
alias:          of:N*T*Camlogic,meson8-usb
alias:          of:N*T*Csamsung,s3c6400-hsotgC*
alias:          of:N*T*Csamsung,s3c6400-hsotg
alias:          of:N*T*Csnps,dwc2C*
alias:          of:N*T*Csnps,dwc2
alias:          of:N*T*Clantiq,xrx200-usbC*
alias:          of:N*T*Clantiq,xrx200-usb
alias:          of:N*T*Clantiq,arx100-usbC*
alias:          of:N*T*Clantiq,arx100-usb
alias:          of:N*T*Crockchip,rk3066-usbC*
alias:          of:N*T*Crockchip,rk3066-usb
alias:          of:N*T*Chisilicon,hi6220-usbC*
alias:          of:N*T*Chisilicon,hi6220-usb
alias:          of:N*T*Cbrcm,bcm2835-usbC*
alias:          of:N*T*Cbrcm,bcm2835-usb
depends:        udc-core,roles
intree:         Y
name:           dwc2
vermagic:       5.10.60-v7+ SMP mod_unload modversions ARMv7 p2v8
pi@raspberrypi:~ $ modinfo dwc2 -v

 

dtoverlay 상으로는 dr_mode 에 host / peripheral / otg를 넣을수 있다고 한다.

$ sudo dtoverlay -h dwc2
Name:   dwc2

Info:   Selects the dwc2 USB controller driver

Usage:  dtoverlay=dwc2,<param>=<val>

Params: dr_mode                 Dual role mode: "host", "peripheral" or "otg"

        g-rx-fifo-size          Size of rx fifo size in gadget mode

        g-np-tx-fifo-size       Size of non-periodic tx fifo size in gadget
                                mode

 

otg 설정에 주변기기로 인식을 시키네..?

dtoverlay=dwc2,dr_mode=peripheral in file /boot/config.txt.

[링크 : https://gist.github.com/gbaman/50b6cca61dd1c3f88f41]

'embeded > raspberry pi' 카테고리의 다른 글

rpi3 2초만에 부팅하기  (0) 2021.10.30
rpi 4는 USB to Ethernet이 아닌가?  (0) 2021.09.29
rpi zero otg  (0) 2021.09.27
스피커가 부실했군..  (0) 2021.09.26
rpi 2b g_mass_storage  (0) 2021.09.25
rpi4에서 gpio readall 실행 안될 때  (0) 2021.09.24
Posted by 구차니

댓글을 달아 주세요