Created
January 11, 2018 07:22
-
-
Save huming2207/e2ff768cb27d60d0073bad5e3ac55914 to your computer and use it in GitHub Desktop.
Problemed SPI-GPIO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/dts-v1/; | |
/include/ "mt7628an.dtsi" | |
/ { | |
compatible = "mediatek,widora32m", "mediatek,mt7628an-soc"; | |
model = "Widora32M"; | |
chosen { | |
bootargs = "console=ttyS0,115200"; | |
}; | |
memory@0 { | |
device_type = "memory"; | |
reg = <0x0 0x8000000>; | |
}; | |
pinctrl { | |
state_default: pinctrl0 { | |
gpio { | |
ralink,group = "gpio"; | |
ralink,function = "gpio"; | |
}; | |
perst { | |
ralink,group = "perst"; | |
ralink,function = "gpio"; | |
}; | |
refclk { | |
ralink,group = "refclk"; | |
ralink,function = "gpio"; | |
}; | |
i2s { | |
ralink,group = "i2s"; | |
ralink,function = "i2s"; | |
}; | |
spis { | |
ralink,group = "spis"; | |
ralink,function = "gpio"; | |
}; | |
wled_an { | |
ralink,group = "wled_an"; | |
ralink,function = "wled_an"; | |
}; | |
ephy_p1 { | |
ralink,group = "ephy_p1"; | |
ralink,function = "gpio"; | |
}; | |
ephy_p2 { | |
ralink,group = "ephy_p2"; | |
ralink,function = "gpio"; | |
}; | |
ephy_p3 { | |
ralink,group = "ephy_p3"; | |
ralink,function = "gpio"; | |
}; | |
ephy_p4 { | |
ralink,group = "ephy_p4"; | |
ralink,function = "gpio"; | |
}; | |
wdt { | |
ralink,group = "wdt"; | |
ralink,function = "gpio"; | |
}; | |
}; | |
}; | |
palmbus@10000000 { | |
spi@b00 { | |
status = "okay"; | |
pinctrl-names = "default"; | |
pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>; | |
m25p80@0 { | |
#address-cells = <1>; | |
#size-cells = <1>; | |
compatible = "w25q256"; | |
reg = <0 0>; | |
linux,modalias = "m25p80", "w25q256"; | |
spi-max-frequency = <20000000>; | |
m25p,chunked-io = <31>; | |
partition@0 { | |
label = "u-boot"; | |
reg = <0x0 0x30000>; | |
read-only; | |
}; | |
partition@30000 { | |
label = "u-boot-env"; | |
reg = <0x30000 0x10000>; | |
}; | |
factory: partition@40000 { | |
label = "factory"; | |
reg = <0x40000 0x10000>; | |
}; | |
partition@50000 { | |
label = "firmware"; | |
reg = <0x50000 0x1fb0000>; | |
}; | |
}; | |
spidev@1 { | |
#address-cells = <1>; | |
#size-cells = <1>; | |
compatible = "spidev"; | |
reg = <1 0>; | |
spi-max-frequency = <20000000>; | |
}; | |
}; | |
i2c@900 { | |
status = "okay"; | |
}; | |
uart1@d00 { | |
status = "okay"; | |
}; | |
uart2@e00 { | |
status = "okay"; | |
}; | |
pwm@5000 { | |
status = "okay"; | |
}; | |
}; | |
ethernet@10100000 { | |
mtd-mac-address = <&factory 0x28>; | |
}; | |
sdhci@10130000 { | |
status = "okay"; | |
mediatek,cd-low; | |
}; | |
gpio-keys-polled { | |
compatible = "gpio-keys-polled"; | |
#address-cells = <1>; | |
#size-cells = <0>; | |
poll-interval = <20>; | |
wps { | |
label = "reset"; | |
gpios = <&gpio1 6 1>; | |
linux,code = <0x211>; | |
}; | |
}; | |
spi { | |
compatible = "spi-gpio"; | |
#address-cells = <0x1>; | |
ranges; | |
gpio-sck = <&gpio0 15 1>; | |
gpio-miso = <&gpio0 16 1>; | |
gpio-mosi = <&gpio0 17 1>; | |
cs-gpios = <&gpio0 14 1>; | |
num-chipselects = <1>; | |
status = "okay"; | |
spidev@2{ | |
compatible = "spidev"; | |
reg = <0>; | |
#address-cells = <1>; | |
#size-cells = <0>; | |
spi-max-frequency = <2000000>; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment