Index: head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi =================================================================== --- head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi (revision 298499) +++ head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi (revision 298500) @@ -1,52 +1,35 @@ /* $FreeBSD$ */ / { - - /* - * FreeBSD's stdin and stdout, so we can have a console - */ - chosen { - stdin = &uartlite; - stdout = &uartlite; + /* Specify alias for serial0 so we have a working console */ + aliases { + serial0 = "/palmbus@10000000/uartlite@c00"; }; /* * OpenWRT doesn't define a clock controller, but we currently need one */ clkctrl: cltctrl { compatible = "ralink,rt2880-clock"; #clock-cells = <1>; }; - palmbus@10000000 { - /* - * Make palmbus compatible to our simplebus - */ - compatible = "simple-bus"; - - /* - * Reference uartlite@c00 as uartlite, so we can address it - * within the chosen node above - */ - uartlite: uartlite@c00 {}; - }; - + /* Specify the clocks node for the usbphy */ usbphy: usbphy { clocks = <&clkctrl 22 &clkctrl 25>; - clock-names = "host", "device"; }; pcie@10140000 { /* * Our driver is different that OpenWRT's, so we need slightly * different values for the reg property */ reg = <0x10140000 0x10000>; /* * Also, we need resets and clocks defined, so we can properly * initialize the PCIe */ clocks = <&clkctrl 26>; }; }; Index: head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi =================================================================== --- head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi (revision 298499) +++ head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi (revision 298500) @@ -1,38 +1,21 @@ /* $FreeBSD$ */ / { - - /* - * FreeBSD's stdin and stdout, so we can have a console - */ - chosen { - stdin = &uartlite; - stdout = &uartlite; + /* Specify alias for serial0 so we have a working console */ + aliases { + serial0 = "/palmbus@10000000/uartlite@c00"; }; /* * OpenWRT doesn't define a clock controller, but we currently need one */ clkctrl: cltctrl { compatible = "ralink,rt2880-clock"; #clock-cells = <1>; }; - palmbus@10000000 { - /* - * Make palmbus compatible to our simplebus - */ - compatible = "simple-bus"; - - /* - * Reference uartlite@c00 as uartlite, so we can address it - * within the chosen node above - */ - uartlite: uartlite@c00 {}; - }; - + /* Specify the clocks node for the usbphy */ usbphy: usbphy { clocks = <&clkctrl 22 &clkctrl 25>; - clock-names = "host", "device"; }; }; Index: head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi =================================================================== --- head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi (revision 298499) +++ head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi (revision 298500) @@ -1,102 +1,73 @@ /* $FreeBSD$ */ / { - - /* - * FreeBSD's stdin and stdout, so we can have a console - */ - chosen { - stdin = &uartlite; - stdout = &uartlite; + /* Specify alias for serial0 so we have a working console */ + aliases { + serial0 = "/palmbus@1E000000/uartlite@c00"; }; /* * OpenWRT doesn't define a clock controller, but we currently need one */ clkctrl: cltctrl { compatible = "ralink,rt2880-clock"; #clock-cells = <1>; }; - gic: interrupt-controller@1fbc0000 { - /* - * OpenWRT does not define the GIC interrupt, but we need it - * for now, at least until we re-work our GIC driver - */ - interrupt-parent = <&cpuintc>; - interrupts = <2>; - }; - palmbus@1E000000 { - /* - * Make palmbus compatible to our simplebus - */ - compatible = "simple-bus"; + uartlite@c00 { clock-frequency = <50000000>; }; - /* - * Reference uartlite@c00 as uartlite, so we can address it - * within the chosen node above - */ - uartlite: uartlite@c00 { - /* - * Mark uartlite as compatible to mtk,ns16550a instead - * of simply ns16550a so we can autodetect the UART - * clock - */ - compatible = "mtk,ns16550a"; - }; - gpio@600 { /* * Mark gpio as compatible to simple-bus and override * its #size-cells and provide a default ranges property * so we can attach instances of our mtk_gpio_v2 driver * to it for now. Provide exactly the same resources to * the instances of mtk_gpio_v2. */ compatible = "simple-bus"; ranges = <0x0 0x600 0x100>; #size-cells = <1>; interrupt-parent = <&gic>; gpio0: bank@0 { reg = <0x0 0x100>; - interrupts = ; + interrupts = <0 6 4>; }; gpio1: bank@1 { reg = <0x0 0x100>; - interrupts = ; + interrupts = <0 6 4>; }; gpio2: bank@2 { reg = <0x0 0x100>; - interrupts = ; + interrupts = <0 6 4>; }; }; }; xhci@1E1C0000 { /* * A slightly different value for reg size is needed by our * driver for the moment */ reg = <0x1e1c0000 0x20000>; }; pcie@1e140000 { /* * Our driver is different that OpenWRT's, so we need slightly * different values for the reg property */ reg = <0x1e140000 0x10000>; /* * Also, we need resets and clocks defined, so we can properly * initialize the PCIe */ resets = <&rstctrl 24>, <&rstctrl 25>, <&rstctrl 26>; clocks = <&clkctrl 24>, <&clkctrl 25>, <&clkctrl 26>; }; }; Index: head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi =================================================================== --- head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi (revision 298499) +++ head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi (revision 298500) @@ -1,88 +1,70 @@ /* $FreeBSD$ */ / { - - /* - * FreeBSD's stdin and stdout, so we can have a console - */ - chosen { - stdin = &uartlite; - stdout = &uartlite; + /* Specify alias for serial0 so we have a working console */ + aliases { + serial0 = "/palmbus@10000000/uart2@e00"; }; /* * OpenWRT doesn't define a clock controller, but we currently need one */ clkctrl: cltctrl { compatible = "ralink,rt2880-clock"; #clock-cells = <1>; }; palmbus@10000000 { - /* - * Make palmbus compatible to our simplebus - */ - compatible = "simple-bus"; + uartlite@c00 { clock-frequency = <40000000>; }; + uart1@d00 { clock-frequency = <40000000>; }; + uart2@e00 { clock-frequency = <40000000>; }; - /* - * Reference uart2@e00 as uartlite, so we can address it - * within the chosen node above - */ - uartlite: uart2@e00 { - /* - * Mark uartlite as compatible to mtk,ns16550a instead - * of simply ns16550a so we can autodetect the UART - * clock - */ - compatible = "mtk,ns16550a"; - }; - gpio@600 { /* * Mark gpio as compatible to simple-bus and override * its #size-cells and provide a default ranges property * so we can attach instances of our mtk_gpio_v2 driver * to it for now. Provide exactly the same resources to * the instances of mtk_gpio_v2. */ compatible = "simple-bus"; ranges = <0x0 0x600 0x100>; #size-cells = <1>; gpio0: bank@0 { reg = <0x0 0x100>; interrupts = <6>; }; gpio1: bank@1 { reg = <0x0 0x100>; interrupts = <6>; }; gpio2: bank@2 { reg = <0x0 0x100>; interrupts = <6>; }; }; }; + /* Specify the clocks node for the usbphy */ usbphy: usbphy@10120000 { clocks = <&clkctrl 22 &clkctrl 25>; - clock-names = "host", "device"; }; pcie@10140000 { /* * Our driver is different that OpenWRT's, so we need slightly * different values for the reg property */ reg = <0x10140000 0x10000>; /* * Also, we need resets and clocks defined, so we can properly * initialize the PCIe */ resets = <&rstctrl 26>, <&rstctrl 27>; clocks = <&clkctrl 26>, <&clkctrl 27>; }; }; Index: head/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi =================================================================== --- head/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi (revision 298499) +++ head/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi (revision 298500) @@ -1,33 +1,16 @@ /* $FreeBSD$ */ / { - - /* - * FreeBSD's stdin and stdout, so we can have a console - */ - chosen { - stdin = &uartlite; - stdout = &uartlite; + /* Specify alias for serial0 so we have a working console */ + aliases { + serial0 = "/palmbus@300000/uartlite@c00"; }; /* * OpenWRT doesn't define a clock controller, but we currently need one */ clkctrl: cltctrl { compatible = "ralink,rt2880-clock"; #clock-cells = <1>; - }; - - palmbus@300000 { - /* - * Make palmbus compatible to our simplebus - */ - compatible = "simple-bus"; - - /* - * Reference uartlite@c00 as uartlite, so we can address it - * within the chosen node above - */ - uartlite: uartlite@c00 {}; }; }; Index: head/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi =================================================================== --- head/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi (revision 298499) +++ head/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi (revision 298500) @@ -1,41 +1,23 @@ /* $FreeBSD$ */ / { - - /* - * FreeBSD's stdin and stdout, so we can have a console - */ - chosen { - stdin = &uartlite; - stdout = &uartlite; + /* Specify alias for serial0 so we have a working console */ + aliases { + serial0 = "/palmbus@10000000/uartlite@c00"; }; /* * OpenWRT doesn't define a clock controller, but we currently need one */ clkctrl: cltctrl { compatible = "ralink,rt2880-clock"; #clock-cells = <1>; }; - palmbus@10000000 { - /* - * Make palmbus compatible to our simplebus - */ - compatible = "simple-bus"; - - /* - * Reference uartlite@c00 as uartlite, so we can address it - * within the chosen node above - */ - uartlite: uartlite@c00 {}; - }; - + /* Specify the USB PHY */ usbphy: usbphy { compatible = "ralink,rt3050-usbphy"; resets = <&rstctrl 22>; - reset-names = "otg"; clocks = <&clkctrl 18>; - clock-names = "otg"; }; }; Index: head/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi =================================================================== --- head/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi (revision 298499) +++ head/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi (revision 298500) @@ -1,38 +1,21 @@ /* $FreeBSD$ */ / { - - /* - * FreeBSD's stdin and stdout, so we can have a console - */ - chosen { - stdin = &uartlite; - stdout = &uartlite; + /* Specify alias for serial0 so we have a working console */ + aliases { + serial0 = "/palmbus@10000000/uartlite@c00"; }; /* * OpenWRT doesn't define a clock controller, but we currently need one */ clkctrl: cltctrl { compatible = "ralink,rt2880-clock"; #clock-cells = <1>; }; - palmbus@10000000 { - /* - * Make palmbus compatible to our simplebus - */ - compatible = "simple-bus"; - - /* - * Reference uartlite@c00 as uartlite, so we can address it - * within the chosen node above - */ - uartlite: uartlite@c00 {}; - }; - + /* Specify the clocks node for the usbphy */ usbphy { clocks = <&clkctrl 18 &clkctrl 20>; - clock-names = "host", "device"; }; }; Index: head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi =================================================================== --- head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi (revision 298499) +++ head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi (revision 298500) @@ -1,53 +1,37 @@ /* $FreeBSD$ */ / { - - /* - * FreeBSD's stdin and stdout, so we can have a console - */ - chosen { - stdin = &uartlite; - stdout = &uartlite; + /* Specify alias for serial0 so we have a working console */ + aliases { + serial0 = "/palmbus@10000000/uartlite@c00"; }; /* * OpenWRT doesn't define a clock controller, but we currently need one */ clkctrl: cltctrl { compatible = "ralink,rt2880-clock"; #clock-cells = <1>; }; - palmbus@10000000 { - /* - * Make palmbus compatible to our simplebus - */ - compatible = "simple-bus"; - - /* - * Reference uartlite@c00 as uartlite, so we can address it - * within the chosen node above - */ - uartlite: uartlite@c00 {}; - }; - + /* Specify the clocks node for the usbphy */ usbphy: usbphy { clocks = <&clkctrl 22 &clkctrl 25>; clock-names = "host", "device"; }; pci@10140000 { #address-cells = <3>; #size-cells = <2>; ranges = < 0x02000000 0 0x00000000 0x20000000 0 0x10000000 0x01000000 0 0x00000000 0x10160000 0 0x00010000 >; interrupt-parent = <&cpuintc>; interrupts = <4>; resets = <&rstctrl 23>; clocks = <&clkctrl 21>; }; }; Index: head/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi =================================================================== --- head/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi (revision 298499) +++ head/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi (revision 298500) @@ -1,38 +1,21 @@ /* $FreeBSD$ */ / { - - /* - * FreeBSD's stdin and stdout, so we can have a console - */ - chosen { - stdin = &uartlite; - stdout = &uartlite; + /* Specify alias for serial0 so we have a working console */ + aliases { + serial0 = "/palmbus@10000000/uartlite@c00"; }; /* * OpenWRT doesn't define a clock controller, but we currently need one */ clkctrl: cltctrl { compatible = "ralink,rt2880-clock"; #clock-cells = <1>; }; - palmbus@10000000 { - /* - * Make palmbus compatible to our simplebus - */ - compatible = "simple-bus"; - - /* - * Reference uartlite@c00 as uartlite, so we can address it - * within the chosen node above - */ - uartlite: uartlite@c00 {}; - }; - + /* Specify the clocks node for the USB PHY */ usbphy { clocks = <&clkctrl 18>; - clock-names = "host"; }; };