用这个大佬的openwrt SDK
https://github.com/zhangjinke/openwrt.git
https://whycan.com/t_6980.html
我想启用USB功能,发现 启动内核出现这个错误,请问是我那个部分没有弄好呢.
sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
root@OpenWrt:/# dmesg |grep usb
[ 0.163184] usbcore: registered new interface driver usbfs
[ 0.163263] usbcore: registered new interface driver hub
[ 0.163347] usbcore: registered new device driver usb
[ 0.248143] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[ 1.082629] usbcore: registered new interface driver usb-storage
最近编辑记录 kwongwo (2021-12-15 19:20:16)
离线
内核的设备树上看到这个部分了:
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy {
usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
uboot的设备树:
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy {
usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
硬件是荔枝派, usb 用的是自带的micro-usb转usb 然后接u盘.
离线
好的,我看看,
我把dts 改了一下 dr_mode ---> host 也一样.
&usb_otg {
dr_mode = "host";
status = "okay";
};
离线
崩溃啊,搞了3天,尽然搞不出一个USB,硬件没问题, 荔枝派主线 usb 可以正常识别...
openwt上搞不出来,郁闷的去...
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: CAN Gateway 4
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
[ 0.000000] random: get_random_bytes called from start_kernel+0x88/0x3c0 with crng_init=0
[ 0.000000] percpu: Embedded 15 pages/cpu s30732 r8192 d22516 u61440
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 53940K/65536K available (5517K kernel code, 346K rwdata, 1544K rodata, 2048K init, 244K bss, 11596K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0763408 (7534 kB)
[ 0.000000] .init : 0xc0a00000 - 0xc0c00000 (2048 kB)
[ 0.000000] .data : 0xc0c00000 - 0xc0c56a00 ( 347 kB)
[ 0.000000] .bss : 0xc0c5d250 - 0xc0c9a450 ( 245 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000020] Switching to timer-based delay loop, resolution 41ns
[ 0.000230] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000470] Console: colour dummy device 80x30
[ 0.000519] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000535] pid_max: default: 32768 minimum: 301
[ 0.000678] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000692] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001263] CPU: Testing write buffer coherency: ok
[ 0.001695] /cpus/cpu@0 missing clock-frequency property
[ 0.001721] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.040129] Setting up static identity map for 0x40200000 - 0x40200060
[ 0.060125] Hierarchical SRCU implementation.
[ 0.100225] smp: Bringing up secondary CPUs ...
[ 0.100249] smp: Brought up 1 node, 1 CPU
[ 0.100259] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.100267] CPU: All CPU(s) started in HYP mode.
[ 0.100272] CPU: Virtualization extensions available.
[ 0.103735] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.104331] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.104367] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.104524] pinctrl core: initialized pinctrl subsystem
[ 0.105654] NET: Registered protocol family 16
[ 0.106113] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.107240] No ATAGs?
[ 0.162437] vcc3v0: Failed to create debugfs directory
[ 0.162694] vcc3v3: Failed to create debugfs directory
[ 0.162938] vcc5v0: Failed to create debugfs directory
[ 0.163538] SCSI subsystem initialized
[ 0.163971] usbcore: registered new interface driver usbfs
[ 0.164045] usbcore: registered new interface driver hub
[ 0.164128] usbcore: registered new device driver usb
[ 0.164319] pps_core: LinuxPPS API ver. 1 registered
[ 0.164332] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.164362] PTP clock support registered
[ 0.164687] Advanced Linux Sound Architecture Driver Initialized.
[ 0.172296] clocksource: Switched to clocksource arch_sys_counter
[ 0.197875] NET: Registered protocol family 2
[ 0.199634] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.199671] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.199696] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.199838] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.199886] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.200138] NET: Registered protocol family 1
[ 0.200589] kvm [1]: 8-bit VMID
[ 0.201150] kvm [1]: vgic interrupt IRQ16
[ 0.201225] kvm [1]: Hyp mode initialized successfully
[ 0.204221] No memory allocated for crashlog
[ 0.205141] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.221732] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.222238] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.248993] io scheduler noop registered
[ 0.249018] io scheduler deadline registered
[ 0.249293] io scheduler cfq registered (default)
[ 0.250066] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[ 0.254966] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.274903] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.280175] console [ttyS0] disabled
[ 0.301095] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[ 0.873188] console [ttyS0] enabled
[ 0.898530] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 34, base_baud = 1500000) is a U6_16550A
[ 0.931307] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 35, base_baud = 1500000) is a U6_16550A
[ 0.953827] loop: module loaded
[ 0.961364] libphy: Fixed MDIO Bus: probed
[ 0.967731] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.974351] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.980167] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 38000 (expect 58000)
[ 0.989896] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.995722] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 1.003011] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 1.008666] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 1.015920] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 1.020880] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 1.027696] dwmac-sun8i 1c30000.ethernet (unnamed net_device) (uninitialized): device MAC address 1e:73:d9:45:37:c1
[ 1.038520] libphy: stmmac: probed
[ 1.043382] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[ 1.050146] libphy: mdio_mux: probed
[ 1.053927] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[ 1.060285] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[ 1.067607] libphy: mdio_mux: probed
[ 1.072757] usbcore: registered new interface driver rtl8150
[ 1.078975] usbcore: registered new interface driver r8152
[ 1.084960] usbcore: registered new interface driver lan78xx
[ 1.091013] usbcore: registered new interface driver asix
[ 1.096887] usbcore: registered new interface driver ax88179_178a
[ 1.103785] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.110317] ehci-platform: EHCI generic platform driver
[ 1.116363] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.122913] ohci-platform: OHCI generic platform driver
[ 1.128898] usbcore: registered new interface driver cdc_wdm
[ 1.135254] usbcore: registered new interface driver usb-storage
[ 1.141873] usbcore: registered new interface driver usbserial
[ 1.148239] usbcore: registered new interface driver usbserial_generic
[ 1.155220] usbserial: USB Serial support registered for generic
[ 1.162175] mousedev: PS/2 mouse device common for all mice
[ 1.169436] i2c /dev entries driver
[ 1.175414] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.242344] sunxi-mmc 1c0f000.mmc: base:0xc48ac000 irq:23
[ 1.248761] OF: /leds/blue_led: could not get #gpio-cells for /soc/phy@01c19400
[ 1.256492] leds-gpio: probe of leds failed with error -22
[ 1.270072] NET: Registered protocol family 10
[ 1.290845] Segment Routing with IPv6
[ 1.295148] NET: Registered protocol family 17
[ 1.299698] can: controller area network core (rev 20170425 abi 9)
[ 1.306473] NET: Registered protocol family 29
[ 1.310965] 8021q: 802.1Q VLAN Support v1.8
[ 1.315453] Registering SWP/SWPB emulation handler
[ 1.327645] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.333412] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.342139] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 1.350279] mmc0: new high speed SD card at address 2101
[ 1.355987] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000
[ 1.363240] mmcblk0: mmc0:2101 APPSD 240 MiB
[ 1.369315] mmcblk0: p1 p2
[ 1.382400] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.388822] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.395828] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.403114] usb usb1: Product: EHCI Host Controller
[ 1.407988] usb usb1: Manufacturer: Linux 4.14.221 ehci_hcd
[ 1.413599] usb usb1: SerialNumber: 1c1a000.usb
[ 1.419056] hub 1-0:1.0: USB hub found
[ 1.423234] hub 1-0:1.0: 1 port detected
[ 1.428683] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.435865] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.443975] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400
[ 1.516539] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[ 1.523373] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.530588] usb usb2: Product: Generic Platform OHCI controller
[ 1.536526] usb usb2: Manufacturer: Linux 4.14.221 ohci_hcd
[ 1.542094] usb usb2: SerialNumber: 1c1a400.usb
[ 1.547538] hub 2-0:1.0: USB hub found
[ 1.551623] hub 2-0:1.0: 1 port detected
[ 1.556681] hctosys: unable to open rtc device (rtc0)
[ 1.562154] vcc3v0: disabling
[ 1.566352] vcc3v3: disabling
[ 1.569330] vcc5v0: disabling
[ 1.572513] vcc3v0: disabling
[ 1.575490] vcc5v0: disabling
[ 1.578457] ALSA device list:
[ 1.581421] No soundcards found.
[ 1.592986] VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
[ 1.602586] Freeing unused kernel memory: 2048K
[ 2.054618] init: Console is alive
[ 2.058366] init: - watchdog -
[ 2.583742] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 2.633354] exFAT: Version 1.2.9
[ 2.638123] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 2.656138] init: - preinit -
[ 3.394026] random: jshn: uninitialized urandom read (4 bytes read)
[ 3.472235] random: jshn: uninitialized urandom read (4 bytes read)
[ 3.503841] random: jshn: uninitialized urandom read (4 bytes read)
[ 3.671120] Generic PHY 0.1:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0.1:01, irq=POLL)
[ 3.682582] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 3.690255] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[ 3.698970] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 6.966148] mount_root: loading kmods from internal overlay
[ 6.993481] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[ 7.001536] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[ 7.137086] block: attempting to load /etc/config/fstab
[ 7.142982] block: unable to load configuration (fstab: Entry not found)
[ 7.149786] block: no usable configuration
[ 7.218530] JBD2: no valid journal superblock found
[ 7.223574] EXT4-fs (loop0): error loading journal
[ 7.252582] mount_root: failed to mount -t ext4 /dev/loop0 /tmp/overlay: Invalid argument
[ 7.311494] block: attempting to load /etc/config/fstab
[ 7.317230] block: unable to load configuration (fstab: Entry not found)
[ 7.324194] block: no usable configuration
[ 7.329584] mount_root: overlay filesystem has not been fully initialized yet
[ 7.337834] mount_root: switching to ext4 overlay
[ 7.343056] mount_root: switching to ext4 failed - fallback to ramoverlay
[ 7.445926] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 7.529210] procd: - early -
[ 7.532896] procd: - watchdog -
[ 8.285460] procd: - watchdog -
[ 8.289015] procd: - ubus -
[ 8.340218] urandom_read: 1 callbacks suppressed
[ 8.340231] random: ubusd: uninitialized urandom read (4 bytes read)
[ 8.387132] random: ubusd: uninitialized urandom read (4 bytes read)
[ 8.394231] random: ubusd: uninitialized urandom read (4 bytes read)
[ 8.401588] procd: - init -
Please press Enter to activate this console.
[ 8.991928] urngd: v1.0.2 started.
[ 9.032835] kmodloader: loading kernel modules from /etc/modules.d/*
[ 9.064384] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 9.098402] random: crng init done
[ 9.101828] random: 3 urandom warning(s) missed due to ratelimiting
[ 9.116028] hidraw: raw HID events driver (C) Jiri Kosina
[ 9.126233] can: broadcast manager protocol (rev 20170425 t)
[ 9.144046] CAN device driver interface
[ 9.153714] can: netlink gateway (rev 20170425) max_hops=1
[ 9.174023] can: raw protocol (rev 20170425)
[ 9.180115] Loading modules backported from Linux version v4.19.161-0-gdaefdc9eb24b
[ 9.202455] Backport generated by backports.git v4.19.161-1-0-g4bb568fe
[ 9.215868] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 9.252800] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[ 9.333431] usbcore: registered new interface driver ums-alauda
[ 9.352762] usbcore: registered new interface driver ums-cypress
[ 9.362704] usbcore: registered new interface driver ums-datafab
[ 9.384045] usbcore: registered new interface driver ums-freecom
[ 9.392723] usbcore: registered new interface driver ums-isd200
[ 9.414101] usbcore: registered new interface driver ums-jumpshot
[ 9.424169] usbcore: registered new interface driver ums-karma
[ 9.444290] usbcore: registered new interface driver ums-sddr09
[ 9.462768] usbcore: registered new interface driver ums-sddr55
[ 9.470977] usbcore: registered new interface driver ums-usbat
[ 9.495477] usbcore: registered new interface driver usbhid
[ 9.501064] usbhid: USB HID core driver
[ 9.513736] vcan: Virtual CAN interface driver
[ 9.557226] xt_time: kernel timezone is -0000
[ 9.649081] PPP generic driver version 2.4.2
[ 9.665833] NET: Registered protocol family 24
[ 9.685360] usbcore: registered new interface driver rtl8187
[ 9.739211] usbcore: registered new interface driver rtl8192cu
[ 9.753053] usbcore: registered new interface driver ath9k_htc
[ 9.759706] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 28.485545] Generic PHY 0.1:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0.1:01, irq=POLL)
[ 28.504926] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[ 28.522843] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[ 28.551478] br-lan: port 1(eth0) entered blocking state
[ 28.561076] br-lan: port 1(eth0) entered disabled state
[ 28.583217] device eth0 entered promiscuous mode
[ 28.605815] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
离线
sun8i-v3s.dtsi
/*
* Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/sun8i-v3s-ccu.h>
#include <dt-bindings/reset/sun8i-v3s-ccu.h>
/ {
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&gic>;
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
compatible = "arm,cortex-a7";
device_type = "cpu";
reg = <0>;
clocks = <&ccu CLK_CPU>;
};
};
de: display-engine {
compatible = "allwinner,sun8i-v3s-display-engine";
allwinner,pipelines = <&mixer0>;
status = "disabled";
};
timer {
compatible = "arm,armv7-timer";
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
};
clocks {
#address-cells = <1>;
#size-cells = <1>;
ranges;
osc24M: osc24M_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24000000>;
clock-output-names = "osc24M";
};
osc32k: osc32k_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <32768>;
clock-output-names = "osc32k";
};
};
soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
display_clocks: clock@1000000 {
compatible = "allwinner,sun8i-v3s-de2-clk";
reg = <0x01000000 0x100000>;
clocks = <&ccu CLK_DE>,
<&ccu CLK_BUS_DE>;
clock-names = "mod",
"bus";
resets = <&ccu RST_BUS_DE>;
#clock-cells = <1>;
#reset-cells = <1>;
};
mixer0: mixer@1100000 {
compatible = "allwinner,sun8i-v3s-de2-mixer";
reg = <0x01100000 0x100000>;
clocks = <&display_clocks 0>,
<&display_clocks 6>;
clock-names = "bus",
"mod";
resets = <&display_clocks 0>;
assigned-clocks = <&display_clocks 6>;
assigned-clock-rates = <150000000>;
ports {
#address-cells = <1>;
#size-cells = <0>;
mixer0_out: port@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
mixer0_out_tcon0: endpoint@0 {
reg = <0>;
remote-endpoint = <&tcon0_in_mixer0>;
};
};
};
};
syscon: syscon@1c00000 {
compatible = "allwinner,sun8i-v3s-system-controller",
"syscon";
reg = <0x01c00000 0x1000>;
};
tcon0: lcd-controller@1c0c000 {
compatible = "allwinner,sun8i-v3s-tcon";
reg = <0x01c0c000 0x1000>;
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_TCON0>,
<&ccu CLK_TCON0>;
clock-names = "ahb",
"tcon-ch0";
clock-output-names = "tcon-pixel-clock";
resets = <&ccu RST_BUS_TCON0>;
reset-names = "lcd";
status = "disabled";
ports {
#address-cells = <1>;
#size-cells = <0>;
tcon0_in: port@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
tcon0_in_mixer0: endpoint@0 {
reg = <0>;
remote-endpoint = <&mixer0_out_tcon0>;
};
};
tcon0_out: port@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
};
};
};
dma: dma-controller@01c02000 {
compatible = "allwinner,sun8i-v3s-dma";
reg = <0x01c02000 0x1000>;
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_DMA>;
resets = <&ccu RST_BUS_DMA>;
#dma-cells = <1>;
};
mmc0: mmc@01c0f000 {
compatible = "allwinner,sun7i-a20-mmc";
reg = <0x01c0f000 0x1000>;
clocks = <&ccu CLK_BUS_MMC0>,
<&ccu CLK_MMC0>,
<&ccu CLK_MMC0_OUTPUT>,
<&ccu CLK_MMC0_SAMPLE>;
clock-names = "ahb",
"mmc",
"output",
"sample";
resets = <&ccu RST_BUS_MMC0>;
reset-names = "ahb";
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
mmc1: mmc@01c10000 {
compatible = "allwinner,sun7i-a20-mmc";
reg = <0x01c10000 0x1000>;
clocks = <&ccu CLK_BUS_MMC1>,
<&ccu CLK_MMC1>,
<&ccu CLK_MMC1_OUTPUT>,
<&ccu CLK_MMC1_SAMPLE>;
clock-names = "ahb",
"mmc",
"output",
"sample";
resets = <&ccu RST_BUS_MMC1>;
reset-names = "ahb";
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
mmc2: mmc@01c11000 {
compatible = "allwinner,sun7i-a20-mmc";
reg = <0x01c11000 0x1000>;
clocks = <&ccu CLK_BUS_MMC2>,
<&ccu CLK_MMC2>,
<&ccu CLK_MMC2_OUTPUT>,
<&ccu CLK_MMC2_SAMPLE>;
clock-names = "ahb",
"mmc",
"output",
"sample";
resets = <&ccu RST_BUS_MMC2>;
reset-names = "ahb";
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
usb_otg: usb@01c19000 {
compatible = "allwinner,sun8i-h3-musb";
reg = <0x01c19000 0x0400>;
clocks = <&ccu CLK_BUS_OTG>;
resets = <&ccu RST_BUS_OTG>;
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "mc";
phys = <&usbphy 0>;
phy-names = "usb";
extcon = <&usbphy 0>;
status = "okay";
dr_mode = "otg";
};
usbphy: phy@01c19400 {
compatible = "allwinner,sun8i-v3s-usb-phy";
reg = <0x01c19400 0x2c>,
<0x01c1a800 0x4>;
reg-names = "phy_ctrl",
"pmu0";
clocks = <&ccu CLK_USB_PHY0>;
clock-names = "usb0_phy";
resets = <&ccu RST_USB_PHY0>;
reset-names = "usb0_reset";
status = "okay";
#phy-cells = <1>;
};
ehci0: usb@01c1a000 {
compatible = "allwinner,sun8i-v3s-ehci", "generic-ehci";
reg = <0x01c1a000 0x100>;
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>;
resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
phys = <&usbphy 0>;
phy-names = "usb";
status = "okay";
};
ohci0: usb@01c1a400 {
compatible = "allwinner,sun8i-v3s-ohci", "generic-ohci";
reg = <0x01c1a400 0x100>;
interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>, <&ccu CLK_USB_OHCI0>;
resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
phys = <&usbphy 0>;
phy-names = "usb";
status = "okay";
};
ccu: clock@01c20000 {
compatible = "allwinner,sun8i-v3s-ccu";
reg = <0x01c20000 0x400>;
clocks = <&osc24M>, <&osc32k>;
clock-names = "hosc", "losc";
#clock-cells = <1>;
#reset-cells = <1>;
};
rtc: rtc@01c20400 {
compatible = "allwinner,sun6i-a31-rtc";
reg = <0x01c20400 0x54>;
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
};
pio: pinctrl@01c20800 {
compatible = "allwinner,sun8i-v3s-pinctrl";
reg = <0x01c20800 0x400>;
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
clock-names = "apb", "hosc", "losc";
gpio-controller;
#gpio-cells = <3>;
interrupt-controller;
#interrupt-cells = <3>;
i2c0_pins: i2c0-pins {
pins = "PB6", "PB7";
function = "i2c0";
};
uart0_pb_pins: uart0-pb-pins {
pins = "PB8", "PB9";
function = "uart0";
};
uart1_pb_pins: uart1-pb-pins {
pins = "PE21", "PE22";
function = "uart1";
};
uart2_pb_pins: uart2-pb-pins {
pins = "PB0", "PB1";
function = "uart2";
};
mmc0_pins: mmc0-pins {
pins = "PF0", "PF1", "PF2", "PF3",
"PF4", "PF5";
function = "mmc0";
drive-strength = <30>;
bias-pull-up;
};
mmc1_pins: mmc1-pins {
pins = "PG0", "PG1", "PG2", "PG3",
"PG4", "PG5";
function = "mmc1";
drive-strength = <30>;
bias-pull-up;
};
spi0_pins: spi0-pins {
pins = "PC0", "PC1", "PC2", "PC3";
function = "spi0";
};
};
timer@01c20c00 {
compatible = "allwinner,sun4i-a10-timer";
reg = <0x01c20c00 0xa0>;
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&osc24M>;
};
wdt0: watchdog@01c20ca0 {
compatible = "allwinner,sun6i-a31-wdt";
reg = <0x01c20ca0 0x20>;
interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
};
lradc: lradc@1c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x400>;
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
uart0: serial@01c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART0>;
resets = <&ccu RST_BUS_UART0>;
status = "disabled";
};
uart1: serial@01c28400 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28400 0x400>;
interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART1>;
resets = <&ccu RST_BUS_UART1>;
status = "disabled";
};
uart2: serial@01c28800 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28800 0x400>;
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART2>;
resets = <&ccu RST_BUS_UART2>;
status = "disabled";
};
i2c0: i2c@01c2ac00 {
compatible = "allwinner,sun6i-a31-i2c";
reg = <0x01c2ac00 0x400>;
interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_I2C0>;
resets = <&ccu RST_BUS_I2C0>;
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
i2c1: i2c@01c2b000 {
compatible = "allwinner,sun6i-a31-i2c";
reg = <0x01c2b000 0x400>;
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_I2C1>;
resets = <&ccu RST_BUS_I2C1>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
emac: ethernet@1c30000 {
compatible = "allwinner,sun8i-h3-emac";
syscon = <&syscon>;
reg = <0x01c30000 0x10000>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "macirq";
resets = <&ccu RST_BUS_EMAC>;
reset-names = "stmmaceth";
clocks = <&ccu CLK_BUS_EMAC>;
clock-names = "stmmaceth";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
mdio: mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
};
mdio-mux {
compatible = "allwinner,sun8i-h3-mdio-mux";
#address-cells = <1>;
#size-cells = <0>;
mdio-parent-bus = <&mdio>;
/* Only one MDIO is usable at the time */
internal_mdio: mdio@1 {
compatible = "allwinner,sun8i-h3-mdio-internal";
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
int_mii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
clocks = <&ccu CLK_BUS_EPHY>;
resets = <&ccu RST_BUS_EPHY>;
};
};
external_mdio: mdio@2 {
reg = <2>;
#address-cells = <1>;
#size-cells = <0>;
};
};
};
spi0: spi@1c68000 {
compatible = "allwinner,sun8i-h3-spi";
reg = <0x01c68000 0x1000>;
interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
clock-names = "ahb", "mod";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
resets = <&ccu RST_BUS_SPI0>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
ahci-5v {
compatible = "regulator-fixed";
regulator-name = "ahci-5v";
regulator-min-microvolt = <0x004c4b40>;
regulator-max-microvolt = <0x004c4b40>;
regulator-boot-on;
enable-active-high;
gpio = <0x0000000b 0x00000001 0x00000008 0x00000000>;
status = "disabled";
};
usb0-vbus {
compatible = "regulator-fixed";
regulator-name = "usb0-vbus";
regulator-min-microvolt = <0x004c4b40>;
regulator-max-microvolt = <0x004c4b40>;
enable-active-high;
gpio = <0x0000000b 0x00000001 0x00000009 0x00000000>;
status = "disabled";
};
usb1-vbus {
compatible = "regulator-fixed";
regulator-name = "usb1-vbus";
regulator-min-microvolt = <0x004c4b40>;
regulator-max-microvolt = <0x004c4b40>;
regulator-boot-on;
enable-active-high;
gpio = <0x0000000b 0x00000007 0x00000006 0x00000000>;
status = "disabled";
};
usb2-vbus {
compatible = "regulator-fixed";
regulator-name = "usb2-vbus";
regulator-min-microvolt = <0x004c4b40>;
regulator-max-microvolt = <0x004c4b40>;
regulator-boot-on;
enable-active-high;
gpio = <0x0000000b 0x00000007 0x00000003 0x00000000>;
status = "disabled";
};
vcc3v0 {
compatible = "regulator-fixed";
regulator-name = "vcc3v0";
regulator-min-microvolt = <0x002dc6c0>;
regulator-max-microvolt = <0x002dc6c0>;
};
vcc3v3 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3";
regulator-min-microvolt = <0x00325aa0>;
regulator-max-microvolt = <0x00325aa0>;
linux,phandle = <0x00000008>;
phandle = <0x00000008>;
};
vcc5v0 {
compatible = "regulator-fixed";
regulator-name = "vcc5v0";
regulator-min-microvolt = <0x004c4b40>;
regulator-max-microvolt = <0x004c4b40>;
};
gic: interrupt-controller@01c81000 {
compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
reg = <0x01c81000 0x1000>,
<0x01c82000 0x1000>,
<0x01c84000 0x2000>,
<0x01c86000 0x2000>;
interrupt-controller;
#interrupt-cells = <3>;
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
};
};
};
离线
sun8i-v3s-can-gateway-4.dts
/*
* Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun8i-v3s.dtsi"
#include "sunxi-common-regulators.dtsi"
/ {
model = "CAN Gateway 4";
compatible = "peace,can-gatewat-4", "allwinner,sun8i-v3s";
aliases {
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
ethernet0 = &emac;
};
chosen {
stdout-path = "serial0:115200n8";
};
leds {
compatible = "gpio-leds";
blue_led {
label = "licheepi:blue:usr";
gpios = <0x0000000b 0x00000006 0x00000001 0x00000001>;
};
green_led {
label = "licheepi:green:usr";
gpios = <0x0000000b 0x00000006 0x00000000 0x00000001>;
default-state = "on";
};
red_led {
label = "licheepi:red:usr";
gpios = <0x0000000b 0x00000006 0x00000002 0x00000001>;
};
};
};
&mmc0 {
pinctrl-0 = <&mmc0_pins>;
pinctrl-names = "default";
broken-cd;
bus-width = <4>;
vmmc-supply = <®_vcc3v3>;
status = "okay";
};
&uart0 {
pinctrl-0 = <&uart0_pb_pins>;
pinctrl-names = "default";
status = "okay";
};
&uart1 {
pinctrl-0 = <&uart1_pb_pins>;
pinctrl-names = "default";
status = "okay";
};
&uart2 {
pinctrl-0 = <&uart2_pb_pins>;
pinctrl-names = "default";
status = "okay";
};
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy {
usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&emac {
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-high;
status = "okay";
};
离线
sun8i-v3s-licheepi-zero.dts
/*
* Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/dts-v1/;
#include "sun8i-v3s.dtsi"
#include "sunxi-common-regulators.dtsi"
/ {
model = "Lichee Pi Zero";
compatible = "licheepi,licheepi-zero", "allwinner,sun8i-v3s";
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
leds {
compatible = "gpio-leds";
blue_led {
label = "licheepi:blue:usr";
gpios = <&pio 6 1 GPIO_ACTIVE_LOW>; /* PG1 */
};
green_led {
label = "licheepi:green:usr";
gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
default-state = "on";
};
red_led {
label = "licheepi:red:usr";
gpios = <&pio 6 2 GPIO_ACTIVE_LOW>; /* PG2 */
};
};
};
&mmc0 {
pinctrl-0 = <&mmc0_pins>;
pinctrl-names = "default";
broken-cd;
bus-width = <4>;
vmmc-supply = <®_vcc3v3>;
status = "okay";
};
&uart0 {
pinctrl-0 = <&uart0_pb_pins>;
pinctrl-names = "default";
status = "okay";
};
&ehci0 {
status = "okay";
};
&ohci0 {
status = "okay";
};
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy {
usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
麻烦晕哥帮忙研究一下,谢谢:)
离线
好的, 我觉得 dts, 内核配置啥的 应该没问题了吧,
难不成 uboot还要管这个 ID?
离线
看了一下源代码, 发现 dts和源代码的node不一致....
&usbphy {
usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
data->id_det_gpio = devm_gpiod_get_optional(dev, "usb0_id_det",
GPIOD_IN);
if (IS_ERR(data->id_det_gpio)) {
dev_err(dev, "Couldn't request ID GPIO\n");
return PTR_ERR(data->id_det_gpio);
}
明天继续测试:)
离线
标题的错误没有了,但是 openwrt的usb还是不能用,
荔枝派的sdk就可以,继续排查....
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.0-licheepi-zero+ (root@jbo-VirtualBox) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #11 SMP Thu May 24 06:05:27 EDT 2018
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33868 r8192 d23476 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15883
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 53580K/64036K available (6144K kernel code, 218K rwdata, 1440K rodata, 1024K init, 262K bss, 10456K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc4000000 - 0xff800000 ( 952 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3e89000 ( 62 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a36980 ( 219 kB)
[ 0.000000] .bss : 0xc0a3d844 - 0xc0a7f06c ( 263 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000019] Switching to timer-based delay loop, resolution 41ns
[ 0.000182] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000420] Console: colour dummy device 80x30
[ 0.000457] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000471] pid_max: default: 32768 minimum: 301
[ 0.000595] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000611] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001210] CPU: Testing write buffer coherency: ok
[ 0.001595] /cpus/cpu@0 missing clock-frequency property
[ 0.001616] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002058] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002232] Hierarchical SRCU implementation.
[ 0.002744] smp: Bringing up secondary CPUs ...
[ 0.002756] smp: Brought up 1 node, 1 CPU
[ 0.002765] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002773] CPU: All CPU(s) started in SVC mode.
[ 0.003530] devtmpfs: initialized
[ 0.006616] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006896] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006924] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.007087] pinctrl core: initialized pinctrl subsystem
[ 0.007954] random: get_random_u32 called from bucket_table_alloc+0xfc/0x224 with crng_init=0
[ 0.008094] NET: Registered protocol family 16
[ 0.008552] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009636] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009653] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.022963] SCSI subsystem initialized
[ 0.023242] usbcore: registered new interface driver usbfs
[ 0.023308] usbcore: registered new interface driver hub
[ 0.023402] usbcore: registered new device driver usb
[ 0.023683] pps_core: LinuxPPS API ver. 1 registered
[ 0.023693] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.023715] PTP clock support registered
[ 0.023926] Advanced Linux Sound Architecture Driver Initialized.
[ 0.025746] clocksource: Switched to clocksource arch_sys_counter
[ 0.036453] NET: Registered protocol family 2
[ 0.037036] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.037070] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.037092] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.037226] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.037276] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.037493] NET: Registered protocol family 1
[ 0.038100] RPC: Registered named UNIX socket transport module.
[ 0.038116] RPC: Registered udp transport module.
[ 0.038122] RPC: Registered tcp transport module.
[ 0.038127] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.040180] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.049054] NFS: Registering the id_resolver key type
[ 0.049108] Key type id_resolver registered
[ 0.049114] Key type id_legacy registered
[ 0.050190] random: fast init done
[ 0.053101] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.053122] io scheduler noop registered
[ 0.053130] io scheduler deadline registered
[ 0.053369] io scheduler cfq registered (default)
[ 0.053382] io scheduler mq-deadline registered
[ 0.053388] io scheduler kyber registered
[ 0.057752] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.128245] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.131564] console [ttyS0] disabled
[ 0.151843] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[ 0.728964] console [ttyS0] enabled
[ 0.753995] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 37, base_baud = 1500000) is a U6_16550A
[ 0.766705] libphy: Fixed MDIO Bus: probed
[ 0.771253] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.777150] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.782861] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 0.789048] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.794711] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 0.801994] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 0.807675] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 0.814889] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 0.819860] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 0.826854] libphy: stmmac: probed
[ 0.832094] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.838751] ehci-platform: EHCI generic platform driver
[ 0.844306] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.849998] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.857939] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[ 0.885754] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.892937] hub 1-0:1.0: USB hub found
[ 0.896878] hub 1-0:1.0: 1 port detected
[ 0.901369] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.907673] ohci-platform: OHCI generic platform driver
[ 0.913206] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 0.919932] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 0.927922] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[ 1.000886] hub 2-0:1.0: USB hub found
[ 1.004709] hub 2-0:1.0: 1 port detected
[ 1.012296] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 1.021840] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[ 1.030859] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.037768] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.042309] i2c /dev entries driver
[ 1.046842] Add-by-me: info.type:
[ 1.050170] Add-by-me: info.type:gt911
[ 1.054198] Goodix-TS 0-0014: ser reset pin to low
[ 1.175896] Goodix-TS 0-0014: i2c test failed attempt 1: -6
[ 1.215870] Goodix-TS 0-0014: i2c test failed attempt 2: -6
[ 1.255736] Goodix-TS 0-0014: I2C communication failure: -6
[ 1.262189] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.325790] sunxi-mmc 1c0f000.mmc: base:0xc41fc000 irq:23
[ 1.373712] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.385767] sunxi-mmc 1c10000.mmc: base:0xc4301000 irq:24
[ 1.392280] usbcore: registered new interface driver usbhid
[ 1.397933] usbhid: USB HID core driver
[ 1.402355] mmc0: new high speed SD card at address 0007
[ 1.408494] mmcblk0: mmc0:0007 SD256 242 MiB
[ 1.414880] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[ 1.422969] sun4i-codec 1c22c00.codec: Failed to register our card
[ 1.429464] mmcblk0: p1 p2
[ 1.437556] NET: Registered protocol family 17
[ 1.442130] Key type dns_resolver registered
[ 1.446654] Registering SWP/SWPB emulation handler
[ 1.456002] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4380000
[ 1.466629] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[ 1.482876] Console: switching to colour frame buffer device 100x30
[ 1.496365] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[ 1.504893] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.516358] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.522125] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.531294] hub 3-0:1.0: USB hub found
[ 1.535184] hub 3-0:1.0: 1 port detected
[ 1.540381] using random self ethernet address
[ 1.544834] using random host ethernet address
[ 1.550538] usb0: HOST MAC aa:66:4a:ee:10:0a
[ 1.554857] usb0: MAC 86:16:c2:df:f8:27
[ 1.558841] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.566356] g_cdc gadget: g_cdc ready
[ 1.572622] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 1.582132] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:03 UTC (3)
[ 1.590365] vcc5v0: disabling
[ 1.593340] ALSA device list:
[ 1.596359] #0: V3s Audio Codec
[ 1.602249] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.612265] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.722504] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in b_idle (80, <SessEnd), retry #0, port1 00000100
[ 1.918400] random: crng init done
[ 2.012288] EXT4-fs (mmcblk0p2): recovery complete
[ 2.060445] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.068652] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 2.075901] devtmpfs: mounted
[ 2.080136] Freeing unused kernel memory: 1024K
[ 2.220763] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
[ 2.296876] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 2.376787] 8188eu: loading out-of-tree module taints kernel.
[ 2.392334] usbcore: registered new interface driver r8188eu
numid=12,iface=MIXER,name='Mic1 Capture Switch'
; type=BOOLEAN,access=rw------,values=2
: values=on,on
Simple mixer control 'Headphone',0
Capabilities: pvolume pvolume-joined pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 63
Mono:
Front Left: Playback 63 [100%] [0.00dB] [on]
Front Right: Playback 63 [100%] [0.00dB] [on]
Playing WAVE '/root/sound/71711.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
Starting logging: OK
Initializing random number generator... done.
Starting network: Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
Could not read interface wlan0 flags: No such device
WEXT: Could not set interface 'wlan0' UP
wlan0: Failed to initialize driver interface
FAIL
Starting sshd: OK
# [ 22.915752] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 26.294506] usb 1-1: USB disconnect, device number 2
离线
@kwongwo
怎么解决的?
这个错误是因为 usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
usb0_id_det-gpio 和源代码不一致, 改成
usb0_id_det= <&pio 5 6 GPIO_ACTIVE_HIGH>;
这样就好了, 可是usb 还是不行,晚点我再试试,周末happy了一天.
离线