diff --git a/sys/arm/conf/IMX6 b/sys/arm/conf/IMX6 index 47819c419d0b..50077a8ed8f5 100644 --- a/sys/arm/conf/IMX6 +++ b/sys/arm/conf/IMX6 @@ -82,6 +82,9 @@ device miibus # Required for ethernet device bpf # Berkeley packet filter (required for DHCP) #device iomux # IO Multiplexor +# General-purpose input/output +device gpio + # Serial (COM) ports device uart # Multi-uart driver @@ -106,7 +109,7 @@ device u3g # USB modems #device ukbd # Allow keyboard like HIDs to control console #device ums # USB mouse -# USB Ethernet, requires miibus +# USB Ethernet, requires miibus #device aue # ADMtek USB Ethernet #device axe # ASIX Electronics USB Ethernet #device cdce # Generic USB over Ethernet diff --git a/sys/arm/freescale/imx/files.imx6 b/sys/arm/freescale/imx/files.imx6 index be9b8a3970b7..d48d5579d6cf 100644 --- a/sys/arm/freescale/imx/files.imx6 +++ b/sys/arm/freescale/imx/files.imx6 @@ -26,6 +26,7 @@ arm/freescale/imx/imx6_mp.c optional smp arm/freescale/imx/imx6_pl310.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx_gpt.c standard +arm/freescale/imx/imx51_gpio.c optional gpio # # Optional devices. @@ -50,8 +51,6 @@ arm/freescale/imx/imx6_usbphy.c optional ehci # Not ready yet... # #arm/freescale/imx/imx51_iomux.c optional iomux -#arm/freescale/imx/imx51_gpio.c optional gpio #dev/ata/chipsets/ata-fsl.c optional imxata #arm/freescale/imx/i2c.c optional fsliic #arm/freescale/imx/imx51_ipuv3.c optional sc - diff --git a/sys/arm/freescale/imx/imx51_gpio.c b/sys/arm/freescale/imx/imx51_gpio.c index 8c435273b298..95e24ca0378e 100644 --- a/sys/arm/freescale/imx/imx51_gpio.c +++ b/sys/arm/freescale/imx/imx51_gpio.c @@ -102,6 +102,13 @@ struct imx51_gpio_softc { struct gpio_pin gpio_pins[NGPIO]; }; +static struct ofw_compat_data compat_data[] = { + {"fsl,imx6q-gpio", 1}, + {"fsl,imx53-gpio", 1}, + {"fsl,imx51-gpio", 1}, + {NULL, 0} +}; + static struct resource_spec imx_gpio_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, @@ -373,9 +380,8 @@ imx51_gpio_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "fsl,imx51-gpio") || - ofw_bus_is_compatible(dev, "fsl,imx53-gpio")) { - device_set_desc(dev, "i.MX515 GPIO Controller"); + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "Freescale i.MX GPIO Controller"); return (BUS_PROBE_DEFAULT); } diff --git a/sys/boot/fdt/dts/arm/imx6.dtsi b/sys/boot/fdt/dts/arm/imx6.dtsi index d89a1a5e4fea..f426c57357e1 100644 --- a/sys/boot/fdt/dts/arm/imx6.dtsi +++ b/sys/boot/fdt/dts/arm/imx6.dtsi @@ -102,6 +102,20 @@ interrupts = <119 120>; }; + /* System Reset Controller */ + src: src@4006E000 { + compatible = "fsl,imx6-src"; + reg = <0x020D8000 0x100>; + }; + + sdma: sdma@020ec000 { + compatible = "fsl,imx6q-sdma"; + reg = <0x020ec000 0x4000>; + interrupt-parent = <&gic>; + interrupts = <34>; + status = "disabled"; + }; + anatop: anatop@020c8000 { compatible = "fsl,imx6q-anatop"; reg = <0x020c8000 0x1000>; @@ -115,87 +129,95 @@ interrupt-parent = <&gic>; interrupts = <87>; }; -// iomux@73fa8000 { -// compatible = "fsl,imx51-iomux"; -// reg = <0x73fa8000 0x4000>; -// interrupt-parent = <&gic>; interrupts = <7>; -// status = "disabled"; -// }; + iomux@020e0000 { + compatible = "fsl,imx6q-iomux"; + reg = <0x020e0000 0x4000>; + interrupt-parent = <&gic>; + interrupts = <32>; + status = "disabled"; + }; gpio1: gpio@0209c000 { compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; reg = <0x0209c000 0x4000>; - interrupts = <0 66 0x04 0 67 0x04>; + interrupts = < 98 99 >; gpio-controller; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + status = "disabled"; }; - + gpio2: gpio@020a0000 { compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; reg = <0x020a0000 0x4000>; - interrupts = <0 68 0x04 0 69 0x04>; + interrupts = < 100 101 >; gpio-controller; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + status = "disabled"; }; - + gpio3: gpio@020a4000 { compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; reg = <0x020a4000 0x4000>; - interrupts = <0 70 0x04 0 71 0x04>; + interrupts = < 102 103 >; gpio-controller; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + status = "disabled"; }; - + gpio4: gpio@020a8000 { compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; reg = <0x020a8000 0x4000>; - interrupts = <0 72 0x04 0 73 0x04>; + interrupts = < 104 105 >; gpio-controller; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + status = "disabled"; }; - + gpio5: gpio@020ac000 { compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; reg = <0x020ac000 0x4000>; - interrupts = <0 74 0x04 0 75 0x04>; + interrupts = < 106 107 >; gpio-controller; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + status = "disabled"; }; - + gpio6: gpio@020b0000 { compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; reg = <0x020b0000 0x4000>; - interrupts = <0 76 0x04 0 77 0x04>; + interrupts = < 108 109 >; gpio-controller; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + status = "disabled"; }; - + gpio7: gpio@020b4000 { compatible = "fsl,imx6q-gpio", "fsl,imx35-gpio"; reg = <0x020b4000 0x4000>; - interrupts = <0 78 0x04 0 79 0x04>; + interrupts = < 110 111 >; gpio-controller; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; + status = "disabled"; }; uart1: serial@02020000 { compatible = "fsl,imx6q-uart"; reg = <0x02020000 0x4000>; - interrupt-parent = <&gic>; + interrupt-parent = <&gic>; interrupts = <58>; clock-frequency = <80000000>; status = "disabled"; @@ -204,7 +226,7 @@ uart2: serial@021e8000 { compatible = "fsl,imx6q-uart"; reg = <0x021e8000 0x4000>; - interrupt-parent = <&gic>; + interrupt-parent = <&gic>; interrupts = <59>; clock-frequency = <80000000>; status = "disabled"; @@ -213,7 +235,7 @@ uart3: serial@021ec000 { compatible = "fsl,imx6q-uart"; reg = <0x021ec000 0x4000>; - interrupt-parent = <&gic>; + interrupt-parent = <&gic>; interrupts = <60>; clock-frequency = <80000000>; status = "disabled"; @@ -222,7 +244,7 @@ uart4: serial@021f0000 { compatible = "fsl,imx6q-uart"; reg = <0x021f0000 0x4000>; - interrupt-parent = <&gic>; + interrupt-parent = <&gic>; interrupts = <61>; clock-frequency = <80000000>; status = "disabled"; @@ -231,7 +253,7 @@ uart5: serial@021f4000 { compatible = "fsl,imx6q-uart"; reg = <0x021f4000 0x4000>; - interrupt-parent = <&gic>; + interrupt-parent = <&gic>; interrupts = <62>; clock-frequency = <80000000>; status = "disabled"; @@ -243,14 +265,69 @@ interrupts = <44>; status = "disabled"; }; - + usbphy2: usbphy@020ca000 { compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; reg = <0x020ca000 0x1000>; interrupts = <45>; status = "disabled"; }; - + + ecspi1: ecspi@02008000 { + compatible = "fsl,imx6q-ecspi"; + reg = <0x02008000 0x4000>; + interrupts = < 63 >; + status = "disabled"; + }; + + ecspi2: ecspi@0200C000 { + compatible = "fsl,imx6q-ecspi"; + reg = <0x0200C000 0x4000>; + interrupts = < 64 >; + status = "disabled"; + }; + + ecspi3: ecspi@02010000 { + compatible = "fsl,imx6q-ecspi"; + reg = <0x02010000 0x4000>; + interrupts = < 65 >; + status = "disabled"; + }; + + ecspi4: ecspi@02014000 { + compatible = "fsl,imx6q-ecspi"; + reg = <0x02014000 0x4000>; + interrupts = < 66 >; + status = "disabled"; + }; + + ecspi5: ecspi@02018000 { + compatible = "fsl,imx6q-ecspi"; + reg = <0x02018000 0x4000>; + interrupts = < 67 >; + status = "disabled"; + }; + + ssi1: ssi@02028000 { + compatible = "fsl,imx6q-ssi"; + reg = <0x02028000 0x4000>; + interrupts = < 78 >; + status = "disabled"; + }; + + ssi2: ssi@0202C000 { + compatible = "fsl,imx6q-ssi"; + reg = <0x0202C000 0x4000>; + interrupts = < 79 >; + status = "disabled"; + }; + + ssi3: ssi@02030000 { + compatible = "fsl,imx6q-ssi"; + reg = <0x02030000 0x4000>; + interrupts = < 80 >; + status = "disabled"; + }; }; aips@02100000 { /* AIPS2 */ @@ -267,7 +344,7 @@ interrupts = <150 151>; status = "disabled"; }; - + usbotg1: usb@02184000 { compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; reg = <0x02184000 0x200>; @@ -276,7 +353,7 @@ fsl,usbmisc = <&usbmisc 0>; status = "disabled"; }; - + usbh1: usb@02184200 { compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; reg = <0x02184200 0x200>; @@ -285,7 +362,7 @@ fsl,usbmisc = <&usbmisc 1>; status = "disabled"; }; - + usbh2: usb@02184400 { compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; reg = <0x02184400 0x200>; @@ -293,7 +370,7 @@ fsl,usbmisc = <&usbmisc 2>; status = "disabled"; }; - + usbh3: usb@02184600 { compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; reg = <0x02184600 0x200>; @@ -301,7 +378,7 @@ fsl,usbmisc = <&usbmisc 3>; status = "disabled"; }; - + usbmisc: usbmisc@02184800 { #index-cells = <1>; compatible = "fsl,imx6q-usbmisc"; @@ -352,6 +429,12 @@ compatible = "fsl,imx6q-ocotp"; reg = <0x021bc000 0x4000>; }; + + audmux: audmux@021d8000 { + compatible = "fsl,imx6q-audmux"; + reg = <0x021d8000 0x4000>; + status = "disabled"; + }; }; }; }; diff --git a/sys/boot/fdt/dts/arm/wandboard-dual.dts b/sys/boot/fdt/dts/arm/wandboard-dual.dts index 65a88c42fca2..aef8f498068f 100644 --- a/sys/boot/fdt/dts/arm/wandboard-dual.dts +++ b/sys/boot/fdt/dts/arm/wandboard-dual.dts @@ -44,11 +44,14 @@ SOC: soc@00000000 { aips@02000000 { /* AIPS1 */ -// iomux@73fa8000 { status = "disabled"; }; -// gpio@0209C000 { status = "disabled"; }; -// gpio@020A0000 { status = "disabled"; }; -// gpio@020A4000 { status = "disabled"; }; -// gpio@020A8000 { status = "disabled"; }; + iomux@020e0000 { status = "disabled"; }; + gpio@0209c000 { status = "okay"; }; + gpio@020a0000 { status = "okay"; }; + gpio@020a4000 { status = "okay"; }; + gpio@020a8000 { status = "okay"; }; + gpio@020aC000 { status = "okay"; }; + gpio@020b0000 { status = "okay"; }; + gpio@020b4000 { status = "okay"; }; console:serial@02020000 { status = "okay"; }; serial@021e8000 { status = "disabled"; }; serial@021ec000 { status = "disabled"; }; @@ -58,7 +61,7 @@ usbphy@020ca000 { status = "okay"; }; }; aips@02100000 { /* AIPS2 */ - ethernet@02188000 { + ethernet@02188000 { status = "okay"; phy-mode = "rgmii"; phy-disable-preamble; diff --git a/sys/boot/fdt/dts/arm/wandboard-quad.dts b/sys/boot/fdt/dts/arm/wandboard-quad.dts index 71c51560a513..4a861be54e70 100644 --- a/sys/boot/fdt/dts/arm/wandboard-quad.dts +++ b/sys/boot/fdt/dts/arm/wandboard-quad.dts @@ -44,11 +44,14 @@ SOC: soc@00000000 { aips@02000000 { /* AIPS1 */ -// iomux@73fa8000 { status = "disabled"; }; -// gpio@0209C000 { status = "disabled"; }; -// gpio@020A0000 { status = "disabled"; }; -// gpio@020A4000 { status = "disabled"; }; -// gpio@020A8000 { status = "disabled"; }; + iomux@020e0000 { status = "disabled"; }; + gpio@0209c000 { status = "okay"; }; + gpio@020a0000 { status = "okay"; }; + gpio@020a4000 { status = "okay"; }; + gpio@020a8000 { status = "okay"; }; + gpio@020aC000 { status = "okay"; }; + gpio@020b0000 { status = "okay"; }; + gpio@020b4000 { status = "okay"; }; console:serial@02020000 { status = "okay"; }; serial@021e8000 { status = "disabled"; }; serial@021ec000 { status = "disabled"; }; @@ -58,7 +61,7 @@ usbphy@020ca000 { status = "okay"; }; }; aips@02100000 { /* AIPS2 */ - ethernet@02188000 { + ethernet@02188000 { status = "okay"; phy-mode = "rgmii"; phy-disable-preamble; diff --git a/sys/boot/fdt/dts/arm/wandboard-solo.dts b/sys/boot/fdt/dts/arm/wandboard-solo.dts index 70e05e0a80fc..4c46a2494dca 100644 --- a/sys/boot/fdt/dts/arm/wandboard-solo.dts +++ b/sys/boot/fdt/dts/arm/wandboard-solo.dts @@ -44,11 +44,14 @@ SOC: soc@00000000 { aips@02000000 { /* AIPS1 */ -// iomux@73fa8000 { status = "disabled"; }; -// gpio@0209C000 { status = "disabled"; }; -// gpio@020A0000 { status = "disabled"; }; -// gpio@020A4000 { status = "disabled"; }; -// gpio@020A8000 { status = "disabled"; }; + iomux@020e0000 { status = "disabled"; }; + gpio@0209c000 { status = "okay"; }; + gpio@020a0000 { status = "okay"; }; + gpio@020a4000 { status = "okay"; }; + gpio@020a8000 { status = "okay"; }; + gpio@020aC000 { status = "okay"; }; + gpio@020b0000 { status = "okay"; }; + gpio@020b4000 { status = "okay"; }; console:serial@02020000 { status = "okay"; }; serial@021e8000 { status = "disabled"; }; serial@021ec000 { status = "disabled"; }; @@ -58,7 +61,7 @@ usbphy@020ca000 { status = "okay"; }; }; aips@02100000 { /* AIPS2 */ - ethernet@02188000 { + ethernet@02188000 { status = "okay"; phy-mode = "rgmii"; phy-disable-preamble;