Commit 233ed6f3 authored by 周琰杰 (Zhou Yanjie)'s avatar 周琰杰 (Zhou Yanjie) Committed by Thomas Bogendoerfer

MIPS: Ingenic: Fix bugs and add missing LED node for X1000.

1.The CU1000-Neo board actually uses X1000E instead of X1000,
  so the wrongly written "ingenic,x1000" in compatible should
  be changed to "ingenic,x1000e".
2.Adjust the order of nodes according to the corresponding
  address value.
3.Drop unnecessary node in "wlan_pwrseq".
4.Add the leds node to "cu1000-neo.dts".
Tested-by: default avatar周正 (Zhou Zheng) <sernia.zhou@foxmail.com>
Signed-off-by: default avatar周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 56d47fbb
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
/ { / {
compatible = "yna,cu1000-neo", "ingenic,x1000"; compatible = "yna,cu1000-neo", "ingenic,x1000e";
model = "YSH & ATIL General Board CU Neo"; model = "YSH & ATIL General Board CU1000-Neo";
aliases { aliases {
serial2 = &uart2; serial2 = &uart2;
...@@ -23,20 +23,19 @@ memory { ...@@ -23,20 +23,19 @@ memory {
reg = <0x0 0x04000000>; reg = <0x0 0x04000000>;
}; };
leds {
compatible = "gpio-leds";
led-0 {
gpios = <&gpb 21 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "mmc0";
};
};
wlan_pwrseq: msc1-pwrseq { wlan_pwrseq: msc1-pwrseq {
compatible = "mmc-pwrseq-simple"; compatible = "mmc-pwrseq-simple";
clocks = <&lpoclk>;
clock-names = "ext_clock";
reset-gpios = <&gpc 17 GPIO_ACTIVE_LOW>; reset-gpios = <&gpc 17 GPIO_ACTIVE_LOW>;
post-power-on-delay-ms = <200>; post-power-on-delay-ms = <200>;
lpoclk: ap6212a {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
};
}; };
}; };
...@@ -53,6 +52,13 @@ &tcu { ...@@ -53,6 +52,13 @@ &tcu {
ingenic,pwm-channels-mask = <0xfa>; ingenic,pwm-channels-mask = <0xfa>;
}; };
&uart2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pins_uart2>;
};
&i2c0 { &i2c0 {
status = "okay"; status = "okay";
...@@ -61,43 +67,15 @@ &i2c0 { ...@@ -61,43 +67,15 @@ &i2c0 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pins_i2c0>; pinctrl-0 = <&pins_i2c0>;
ads7830@48 { ads7830: adc@48 {
compatible = "ti,ads7830"; compatible = "ti,ads7830";
reg = <0x48>; reg = <0x48>;
}; };
}; };
&uart2 { &msc0 {
pinctrl-names = "default";
pinctrl-0 = <&pins_uart2>;
status = "okay";
};
&mac {
phy-mode = "rmii";
phy-handle = <&lan8720a>;
pinctrl-names = "default";
pinctrl-0 = <&pins_mac>;
snps,reset-gpio = <&gpc 23 GPIO_ACTIVE_LOW>; /* PC23 */
snps,reset-active-low;
snps,reset-delays-us = <0 10000 30000>;
status = "okay";
};
&mdio {
status = "okay"; status = "okay";
lan8720a: ethernet-phy@0 {
compatible = "ethernet-phy-id0007.c0f0", "ethernet-phy-ieee802.3-c22";
reg = <0>;
};
};
&msc0 {
bus-width = <8>; bus-width = <8>;
max-frequency = <50000000>; max-frequency = <50000000>;
...@@ -105,26 +83,23 @@ &msc0 { ...@@ -105,26 +83,23 @@ &msc0 {
pinctrl-0 = <&pins_msc0>; pinctrl-0 = <&pins_msc0>;
non-removable; non-removable;
status = "okay";
}; };
&msc1 { &msc1 {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
bus-width = <4>; bus-width = <4>;
max-frequency = <50000000>; max-frequency = <50000000>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pins_msc1>; pinctrl-0 = <&pins_msc1>;
#address-cells = <1>;
#size-cells = <0>;
non-removable; non-removable;
mmc-pwrseq = <&wlan_pwrseq>; mmc-pwrseq = <&wlan_pwrseq>;
status = "okay";
ap6212a: wifi@1 { ap6212a: wifi@1 {
compatible = "brcm,bcm4329-fmac"; compatible = "brcm,bcm4329-fmac";
reg = <1>; reg = <1>;
...@@ -137,23 +112,40 @@ ap6212a: wifi@1 { ...@@ -137,23 +112,40 @@ ap6212a: wifi@1 {
}; };
}; };
&pinctrl { &mac {
pins_i2c0: i2c0 { status = "okay";
function = "i2c0";
groups = "i2c0-data"; phy-mode = "rmii";
bias-disable; phy-handle = <&lan8720a>;
pinctrl-names = "default";
pinctrl-0 = <&pins_mac>;
snps,reset-gpio = <&gpc 23 GPIO_ACTIVE_LOW>; /* PC23 */
snps,reset-active-low;
snps,reset-delays-us = <0 10000 30000>;
};
&mdio {
status = "okay";
lan8720a: ethernet-phy@0 {
compatible = "ethernet-phy-id0007.c0f0", "ethernet-phy-ieee802.3-c22";
reg = <0>;
}; };
};
&pinctrl {
pins_uart2: uart2 { pins_uart2: uart2 {
function = "uart2"; function = "uart2";
groups = "uart2-data-d"; groups = "uart2-data-d";
bias-disable; bias-pull-up;
}; };
pins_mac: mac { pins_i2c0: i2c0 {
function = "mac"; function = "i2c0";
groups = "mac"; groups = "i2c0-data";
bias-disable; bias-pull-up;
}; };
pins_msc0: msc0 { pins_msc0: msc0 {
...@@ -167,4 +159,10 @@ pins_msc1: msc1 { ...@@ -167,4 +159,10 @@ pins_msc1: msc1 {
groups = "mmc1-1bit", "mmc1-4bit"; groups = "mmc1-1bit", "mmc1-4bit";
bias-disable; bias-disable;
}; };
pins_mac: mac {
function = "mac";
groups = "mac";
bias-disable;
};
}; };
...@@ -48,9 +48,7 @@ cgu: x1000-cgu@10000000 { ...@@ -48,9 +48,7 @@ cgu: x1000-cgu@10000000 {
}; };
tcu: timer@10002000 { tcu: timer@10002000 {
compatible = "ingenic,x1000-tcu", compatible = "ingenic,x1000-tcu", "simple-mfd";
"ingenic,jz4770-tcu",
"simple-mfd";
reg = <0x10002000 0x1000>; reg = <0x10002000 0x1000>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
...@@ -156,48 +154,6 @@ gpd: gpio@3 { ...@@ -156,48 +154,6 @@ gpd: gpio@3 {
}; };
}; };
i2c0: i2c-controller@10050000 {
compatible = "ingenic,x1000-i2c";
reg = <0x10050000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&intc>;
interrupts = <60>;
clocks = <&cgu X1000_CLK_I2C0>;
status = "disabled";
};
i2c1: i2c-controller@10051000 {
compatible = "ingenic,x1000-i2c";
reg = <0x10051000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&intc>;
interrupts = <59>;
clocks = <&cgu X1000_CLK_I2C1>;
status = "disabled";
};
i2c2: i2c-controller@10052000 {
compatible = "ingenic,x1000-i2c";
reg = <0x10052000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&intc>;
interrupts = <58>;
clocks = <&cgu X1000_CLK_I2C2>;
status = "disabled";
};
uart0: serial@10030000 { uart0: serial@10030000 {
compatible = "ingenic,x1000-uart"; compatible = "ingenic,x1000-uart";
reg = <0x10030000 0x100>; reg = <0x10030000 0x100>;
...@@ -237,37 +193,57 @@ uart2: serial@10032000 { ...@@ -237,37 +193,57 @@ uart2: serial@10032000 {
status = "disabled"; status = "disabled";
}; };
pdma: dma-controller@13420000 { i2c0: i2c-controller@10050000 {
compatible = "ingenic,x1000-dma"; compatible = "ingenic,x1000-i2c";
reg = <0x13420000 0x400>, <0x13421000 0x40>; reg = <0x10050000 0x1000>;
#dma-cells = <2>; #address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
interrupts = <10>; interrupts = <60>;
clocks = <&cgu X1000_CLK_PDMA>; clocks = <&cgu X1000_CLK_I2C0>;
status = "disabled";
}; };
mac: ethernet@134b0000 { i2c1: i2c-controller@10051000 {
compatible = "ingenic,x1000-mac", "snps,dwmac"; compatible = "ingenic,x1000-i2c";
reg = <0x134b0000 0x2000>; reg = <0x10051000 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
interrupts = <55>; interrupts = <59>;
interrupt-names = "macirq";
clocks = <&cgu X1000_CLK_MAC>; clocks = <&cgu X1000_CLK_I2C1>;
clock-names = "stmmaceth";
status = "disabled"; status = "disabled";
};
mdio: mdio { i2c2: i2c-controller@10052000 {
compatible = "snps,dwmac-mdio"; compatible = "ingenic,x1000-i2c";
#address-cells = <1>; reg = <0x10052000 0x1000>;
#size-cells = <0>; #address-cells = <1>;
#size-cells = <0>;
status = "disabled"; interrupt-parent = <&intc>;
}; interrupts = <58>;
clocks = <&cgu X1000_CLK_I2C2>;
status = "disabled";
};
pdma: dma-controller@13420000 {
compatible = "ingenic,x1000-dma";
reg = <0x13420000 0x400>, <0x13421000 0x40>;
#dma-cells = <2>;
interrupt-parent = <&intc>;
interrupts = <10>;
clocks = <&cgu X1000_CLK_PDMA>;
}; };
msc0: mmc@13450000 { msc0: mmc@13450000 {
...@@ -311,4 +287,26 @@ msc1: mmc@13460000 { ...@@ -311,4 +287,26 @@ msc1: mmc@13460000 {
status = "disabled"; status = "disabled";
}; };
mac: ethernet@134b0000 {
compatible = "ingenic,x1000-mac", "snps,dwmac";
reg = <0x134b0000 0x2000>;
interrupt-parent = <&intc>;
interrupts = <55>;
interrupt-names = "macirq";
clocks = <&cgu X1000_CLK_MAC>;
clock-names = "stmmaceth";
status = "disabled";
mdio: mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment