一、 USB-hub -usb3503A配置
如果没有usb3503A的驱动,直接先放弃做!
一般不会出现这种情况,这个方案是三星的,肯定会提供的
有了驱动,配置驱动,测试!–不行–找设备树的配置
找到配置,可能需要修改gpio的管脚。
二、网卡DM9621A配置
usb的设备驱动,不需要平台文件,在设备树中也不需要在设备树文件中添加任何代码!
在usb主控制器等驱动的情况下,只需要有驱动就成。
vi etc/eth0-setting 配置网络的ip等,重启开发板,ping的通就成。
三、u盘配置
mkdir /mnt/udisk/
mount /dev/sda1 /mnt/udisk/
usb3503A:
在设备树的根节点下增加以下配置代码
usbphy:usbphy@125B0000{
#address-cells=<1>;
#size-cells=<1>;
compatible="samsung,exynos4x12-usb2phy";
reg=<0x125B0000 0x100>;
ranges;
clocks=<&clock 2>,<&clock 305>;
clock-names="xusbxti","otg";
usbphy-sys{
reg=<0x10020704 0x8 0x1001021c 0x4>;
};
};
ehci@12580000{
status="okay";
usbphy=<&usbphy>;
};
usb3503@08{
compatible="smsc,usb3503";
reg=<0x08 0x4>;
connect-gpios=<&gpm3 3 1>;
intn-gpios=<&gpx2 3 1>;
reset-gpios=<&gpm2 4 1>;
initial-mode=<1>;
};
四、支持usb网卡的设备树文件和镜像
需要重新编译设备树文件,并将新编译好的设备树文件烧写至开发板。
五、新的配置的设备树源码
/*
* TOPEET's Exynos4412 based itop board device tree source
*
* Copyright (c) 2016 SUMOMO Computer Association
* https://www.sumomo.mobi
* Randy Li <ayaka@soulik.info>
*
* Device tree source file for TOPEET iTop Exynos 4412 core board
* which is based on Samsung's Exynos4412 SoC.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/sound/samsung-i2s.h>
#include "exynos4412-itop-scp-core.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
model = "TOPEET iTop 4412 Elite board based on Exynos4412";
compatible = "topeet,itop4412-elite", "samsung,exynos4412", "samsung,exynos4";
chosen {
bootargs = "root=/dev/mmcblk0p2 rw rootfstype=ext4 rootdelay=1 rootwait";
stdout-path = "serial2:115200n8";
};
memory {
reg = <0x40000000 0x40000000>;
};
leds {
compatible = "gpio-leds";
led2 {
label = "red:system";
gpios = <&gpx1 0 GPIO_ACTIVE_HIGH>;
default-state = "off";
linux,default-trigger = "heartbeat";
};
led3 {
label = "red:user";
gpios = <&gpk1 1 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
};
gpio-keys {
compatible = "gpio-keys";
home {
label = "GPIO Key Home";
linux,code = <KEY_HOME>;
gpios = <&gpx1 1 GPIO_ACTIVE_LOW>;
};
back {
label = "GPIO Key Back";
linux,code = <KEY_BACK>;
gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
};
sleep {
label = "GPIO Key Sleep";
linux,code = <KEY_POWER>;
gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
};
vol-up {
label = "GPIO Key Vol+";
linux,code = <KEY_UP>;
gpios = <&gpx2 1 GPIO_ACTIVE_LOW>;
};
vol-down {
label = "GPIO Key Vol-";
linux,code = <KEY_DOWN>;
gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
};
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "wm-sound";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&link0_codec>;
simple-audio-card,frame-master = <&link0_codec>;
simple-audio-card,widgets =
"Microphone", "Mic Jack",
"Line", "Line In",
"Line", "Line Out",
"Speaker", "Speaker",
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"Headphone Jack", "HP_L",
"Headphone Jack", "HP_R",
"Speaker", "SPK_LP",
"Speaker", "SPK_LN",
"Speaker", "SPK_RP",
"Speaker", "SPK_RN",
"LINPUT1", "Mic Jack",
"LINPUT3", "Mic Jack",
"RINPUT1", "Mic Jack",
"RINPUT2", "Mic Jack";
simple-audio-card,cpu {
sound-dai = <&i2s0 0>;
};
link0_codec: simple-audio-card,codec {
sound-dai = <&codec>;
clocks = <&i2s0 CLK_I2S_CDCLK>;
system-clock-frequency = <11289600>;
};
};
beep {
compatible = "pwm-beeper";
pwms = <&pwm 0 4000000 PWM_POLARITY_INVERTED>;
};
camera: camera {
pinctrl-0 = <&cam_port_a_clk_active>;
pinctrl-names = "default";
status = "okay";
assigned-clocks = <&clock CLK_MOUT_CAM0>;
assigned-clock-parents = <&clock CLK_XUSBXTI>;
};
serial@13800000 {
status = "diable";
};
serial@13810000 {
status = "disable";
};
serial@13820000 {
status = "okay";
};
serial@13830000 {
status = "disable";
};
fixed-rate-clocks {
xxti {
compatible = "samsung,clock-xxti";
clock-frequency = <0>;
};
xusbxti {
compatible = "samsung,clock-xusbxti";
clock-frequency = <24000000>;
};
};
mmc@12550000 {
num-slots = <1>;
broken-cd;
non-removable;
card-detect-delay = <200>;
clock-frequency = <400000000>;
samsung,dw-mshc-ciu-div = <0>;
samsung,dw-mshc-sdr-timing = <2 3>;
samsung,dw-mshc-ddr-timing = <1 2>;
pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
pinctrl-names = "default";
status = "okay";
bus-width = <8>;
cap-mmc-highspeed;
};
usbphy:usbphy@125B0000{
#address-cells=<1>;
#size-cells=<1>;
compatible="samsung,exynos4x12-usb2phy";
reg=<0x125B0000 0x100>;
ranges;
clocks=<&clock 2>,<&clock 305>;
clock-names="xusbxti","otg";
usbphy-sys{
reg=<0x10020704 0x8 0x1001021c 0x4>;
};
};
ehci@12580000{
status="okay";
usbphy=<&usbphy>;
};
usb3503@08{
compatible="smsc,usb3503";
reg=<0x08 0x4>;
connect-gpios=<&gpm3 3 1>;
intn-gpios=<&gpx2 3 1>;
reset-gpios=<&gpm2 4 1>;
initial-mode=<1>;
};
};
&adc {
/*vdd-supply = <&ldo3_reg>;*/
status = "okay";
};
&clock_audss {
assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
<&clock_audss EXYNOS_MOUT_I2S>,
<&clock_audss EXYNOS_DOUT_SRP>,
<&clock_audss EXYNOS_DOUT_AUD_BUS>;
assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
<&clock_audss EXYNOS_MOUT_AUDSS>;
assigned-clock-rates = <0>, <0>, <112896000>, <11289600>;
};
&ehci {
status = "okay";
/* In order to reset USB ethernet */
samsung,vbus-gpio = <&gpc0 1 GPIO_ACTIVE_HIGH>;
port@0 {
status = "okay";
};
port@2 {
status = "okay";
};
};
&exynos_usbphy {
status = "okay";
};
&fimc_0 {
status = "okay";
assigned-clocks = <&clock CLK_MOUT_FIMC0>,
<&clock CLK_SCLK_FIMC0>;
assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
assigned-clock-rates = <0>, <176000000>;
};
&hsotg {
dr_mode = "peripheral";
status = "okay";
};
&i2c_4 {
samsung,i2c-sda-delay = <100>;
samsung,i2c-slave-addr = <0x10>;
samsung,i2c-max-bus-freq = <100000>;
pinctrl-0 = <&i2c4_bus>;
pinctrl-names = "default";
status = "okay";
codec: wm8960@1a {
compatible = "wlf,wm8960";
reg = <0x1a>;
clocks = <&pmu_system_controller 0>;
clock-names = "MCLK1";
wlf,shared-lrclk;
#sound-dai-cells = <0>;
};
};
&i2s0 {
pinctrl-0 = <&i2s0_bus>;
pinctrl-names = "default";
status = "okay";
};
&pinctrl_1 {
ether-reset {
samsung,pins = "gpc0-1";
samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
};
&pwm {
status = "okay";
pinctrl-0 = <&pwm0_out>;
pinctrl-names = "default";
samsung,pwm-outputs = <0>;
};
&sdhci_2 {
bus-width = <4>;
pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
pinctrl-names = "default";
cd-gpio = <&gpx0 7 GPIO_ACTIVE_LOW>;
cap-sd-highspeed;
/*vmmc-supply = <&ldo23_reg>;
vqmmc-supply = <&ldo17_reg>;*/
status = "okay";
};