compatible = "rockchip,rk3188";
interrupt-parent = <&gic>;
+ aliases {
+ serial0 = &uart0;
+ serial1 = &uart1;
+ serial2 = &uart2;
+ serial3 = &uart3;
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
};
-
uart0: serial@10124000 {
compatible = "rockchip,serial";
reg = <0x10124000 0x100>;
clock-frequency = <24000000>;
reg-shift = <2>;
reg-io-width = <4>;
- id = <0>;
pinctrl-names = "default";
pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
status = "disabled";
clock-frequency = <24000000>;
reg-shift = <2>;
reg-io-width = <4>;
- id = <1>;
pinctrl-names = "default";
pinctrl-0 = <&uart1_xfer &uart1_cts &uart1_rts>;
status = "disabled";
current-speed = <115200>;
reg-shift = <2>;
reg-io-width = <4>;
- id = <2>;
pinctrl-names = "default";
pinctrl-0 = <&uart2_xfer>;
status = "disabled";
clock-frequency = <24000000>;
reg-shift = <2>;
reg-io-width = <4>;
- id = <3>;
pinctrl-names = "default";
pinctrl-0 = <&uart3_xfer &uart3_cts &uart3_rts>;
status = "disabled";
np = NULL;
for (i = 0; i < 5; i++) {
np = of_find_node_by_name(np, "serial");
- if (np && !of_property_read_u32(np, "id", &id)) {
+ if (np) {
+ id = of_alias_get_id(np, "serial");
if (id == serial_id) {
ok = 1;
break;
#endif\r
\r
#ifdef CONFIG_OF\r
-static int of_rk_serial_parse_dt(const struct device_node *np, struct of_rk_serial *rks) {\r
+static int of_rk_serial_parse_dt(struct device_node *np, struct of_rk_serial *rks) {\r
unsigned int val = 0;\r
- if(!of_property_read_u32(np, "id", &val))\r
- rks->id = val;\r
+ rks->id = of_alias_get_id(np, "serial");\r
if(!of_property_read_u32(np, "clock-frequency", &val))\r
rks->uartclk = val;\r
#if USE_DMA\r