初级会员
- 积分
- 187
- 金钱
- 187
- 注册时间
- 2020-11-11
- 在线时间
- 27 小时
|
10金钱
跟着驱动开发教程做到第40章的 LCD 实验了,lcd屏幕有了正常的显示,
想着插上USB键盘试试,但是插上没有任何反应,
使用命令 lsusb 也没有显示usb设备,难道是设备树上没有写吗?
大佬们怎么办啊?
下面是 stm32mp157d-atk.dts 的内容
- // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
- /*
- * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
- * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
- */
- /dts-v1/;
- #include "stm32mp157.dtsi"
- #include "stm32mp15xc.dtsi"
- #include "stm32mp15-pinctrl.dtsi"
- #include "stm32mp15xxaa-pinctrl.dtsi"
- #include "stm32mp157-m4-srm.dtsi"
- #include "stm32mp157-m4-srm-pinctrl.dtsi"
- #include "stm32mp157d-atk.dtsi"
- / {
- model = "STMicroelectronics STM32MP157C eval daughter";
- compatible = "st,stm32mp157c-ed1","st,stm32mp157";
- chosen {
- stdout-path = "serial0:115200n8";
- };
- aliases {
- serial0 = &uart4;
- };
- reserved-memory {
- gpu_reserved: gpu@f6000000 {
- reg = <0xf6000000 0x8000000>;
- no-map;
- };
- optee_memory: optee@fe000000 {
- reg = <0xfe000000 0x02000000>;
- no-map;
- };
- };
- key{
- compatible = "alientek,key";
- key-gpio = <&gpiog 3 GPIO_ACTIVE_LOW>;
- status = "okay";
- pinctrl-name = "default";
- pinctrl-0 = <&key_pins_a>;
- interrupt-parent = <&gpiog>;
- interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
- };
- dtsleds{
- compatible = "gpio-leds";
- pinctrl-0 = <&led_pins_a>;
- led0{
- label = "red";
- gpios = <&gpioi 0 GPIO_ACTIVE_LOW>;
- linux,default-trigger = "heartbeat";
- default-state = "on";
- };
- led1{
- label = "green";
- gpios = <&gpiof 3 GPIO_ACTIVE_LOW>;
- default-state = "off";
- };
- };
- beep{
- compatible = "alientek,beep";
- status = "okay";
- pinctrl-name = "default";
- pinctrl-0 = <&beep_pins_a>;
- beep-gpio = <&gpioc 7 GPIO_ACTIVE_HIGH>;
- };
- // 使用rgb转hdmi时这个节点不能使用
- // panel_rgb: panel-rgb {
- // compatible = "alientek,lcd-rgb";
- // backlight = <&backlight>;
- // status = "okay";
- // port {
- // rgb_panel_in: endpoint {
- // remote-endpoint = <<dc_ep0_out>;
- // };
- // };
- // };
- backlight: backlight{
- compatible = "pwm-backlight";
- pwms = <&pwm4 1 5000000>;
- brightness-levels = <0 4 8 16 32 64 128 255>;
- power-supply = <&v3v3>;
- default-brightness-level = <7>;
- status = "okay";
- };
- v1v2_hdmi: regulator-v1v2-hdmi {
- compatible = "regulator-fixed";
- regulator-name = "v1v2_hdmi";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
- regulator-always-on;
- regulator-boot-on;
- };
- };
- &timers1 {
- status = "okay";
- /* spare all DMA channels since they are not needed for PWM output */
- /delete-property/dmas;
- /delete-property/dma-names;
- pwm1: pwm {
- pinctrl-0 = <&pwm1_pins_a>;
- pinctrl-1 = <&pwm1_sleep_pins_a>;
- pinctrl-names = "default", "sleep";
- #pwm-cells = <2>;
- status = "okay";
- };
- };
- <dc{
- pinctrl-names = "default","sleep";
- pinctrl-0 = <<dc_pins_b>;
- pinctrl-1 = <<dc_pins_sleep_b>;
- status = "okay";
- port{
- #address-cells = <1>;
- #size-cells = <0>;
- ltdc_ep0_out: endpoint@0{
- reg = <0>;
- remote-endpoint = <&sii9022_in>;
- };
- };
- };
- /* LCD 背光通过PWM调节 */
- &timers4{
- status = "okay";
- /* spare dmas for other usage */
- /delete-property/dmas;
- /delete-property/dma-names;
- pwm4: pwm{
- pinctrl-0 = <&pwm4_pins_b>;
- pinctrl-1 = <&pwm4_sleep_pins_b>;
- pinctrl-names = "default", "sleep";
- #pwm-cells = <2>;
- status = "okay";
- };
- };
- &i2c5 {
- pinctrl-names = "default", "sleep";
- pinctrl-0 = <&i2c5_pins_a>;
- pinctrl-1 = <&i2c5_pins_sleep_a>;
- status = "okay";
- ap3216c@1e {
- compatible = "alientek,ap3216c";
- reg = <0x1e>;
- };
- };
- &i2c2 {
- pinctrl-names = "default", "sleep";
- pinctrl-0 = <&i2c2_pins_a>;
- pinctrl-1 = <&i2c2_pins_sleep_a>;
- status = "okay";
- hdmi: hdmi-transmitter@39 {
- compatible = "sil,sii9022";
- reg = <0x39>;
- iovcc-supply = <&v3v3>;
- cvcc12-supply = <&v1v2_hdmi>;
- reset-gpios = <&gpioa 3 GPIO_ACTIVE_LOW>;
- interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
- interrupt-parent = <&gpioh>;
- #sound-dai-cells = <1>;
- status = "okay";
- ports {
- #address-cells = <1>;
- #size-cells = <0>;
- port@0 {
- reg = <0>;
- sii9022_in: endpoint {
- remote-endpoint = <<dc_ep0_out>;
- };
- };
- };
- };
- };
- &cpu1{
- cpu-supply = <&vddcore>;
- };
- &cryp1 {
- status="okay";
- };
- &gpu {
- contiguous-area = <&gpu_reserved>;
- status = "okay";
- };
- &optee {
- status = "okay";
- };
复制代码
|
最佳答案
查看完整内容[请看2#楼]
因为你没在设备树上加usb host 驱动,系统是检测不到你是否插入usb 设备的。建议你看一下usb驱动实验章节
|