summaryrefslogtreecommitdiff
path: root/sys/arch/armv7/imx
AgeCommit message (Collapse)Author
2016-10-21Stop setting MIIF_AUTOTSLEEP in fec(4)Jonathan Gray
This can lead to tsleep in an interrupt context, which resulted in the following panic: kernel diagnostic assertion "p->p_wchan == NULL" failed: file "/usr/src/sys/kern/kern_sched.c", line 333 TID PPID PGRP UID S FLAGS WAIT COMMAND 86009 0 0 0 2 0x40014200 miiaut idle0 Reported by matthieu@ with sabre lite, analysis by guenther@ ok kettenis@
2016-10-05Make imxdog(4) set cpuresetfn, and remove all the imx platform that is noMark Kettenis
longer needed, including the imx board IDs. ok patrick@, jsg@
2016-10-02Save and restore the (non-standard) USBMODE register around a reset of theMark Kettenis
controller. This register controls whether the controller is in device or host mode on many dual role controllers and gets reset during a reset of the controller, placing the controller in (non-functional) idle mode. By saving and restoring it, we keep the controller in host mode. Since this is a non-standard register, add a new EHCIF_USBMODE flag and only do the save and restore if it has been set. Makes the upper "OTG" port of the Cubox-i work. ok mpi@, jsg@
2016-09-23Attach imxocotp(4) using the fdt. Since this means that imxtemp(4) attachesMark Kettenis
before imxocotp(4), delay reading the temperature sensor calibration information until after imxocotp(4) attaches.
2016-09-22Periodically call mii_tick() like all our other ethernet drivers that useMark Kettenis
mii(4). Should fix the link negotiation issues that people have been seeing. ok jsg@, mikeb@, guenther@
2016-09-21Remove some dead code and only enable tx and rx interrupts.Mark Kettenis
ok patrick@, tom@, mikeb@
2016-09-18Convert imxccm(4) and imxiomuxc(4) to attach using the fdt. Use the "early"Mark Kettenis
locator to attach them before other drivers that might need their services. ok patrick@, jsg@
2016-09-10Correct the path to the iomuxc fdt node so pinctrl setup will run.Jonathan Gray
Noticed when looking into a regression on sabre lite with fec(4) bisected by matthieu@. This fixes the sabre lite problems with fec and also recent problems with the i2c rtc on cubox. ok kettenis@
2016-09-05Some spacing/knf while here. No functional changes.Marcus Glocker
2016-09-05No point to jump to an empty return label in a void function.Marcus Glocker
2016-09-05Remove some unused bits.Marcus Glocker
ok kettenis
2016-08-27Initialize vdd to 0 in imxesdhc_bus_power() to avoiud using it uninitialized.Mark Kettenis
2016-08-19Seems we need to hold the PHY into reset a little bit longer. Without itMark Kettenis
Theo's Cubox-i comes up without working Ethernet after a warm boot. ok deraadt@
2016-08-14Add imxtemp(4), a temperature sensor for the i.MX6 SoC. Based on code writtenMark Kettenis
by patrick@. ok deraadt@
2016-08-13Use regulalator API instead of private functions.Mark Kettenis
2016-08-08Implement mmc power sequencing; makes the sdo interface on the cubox-i workMark Kettenis
and see the BCM4330 wireless (for which we don't have a driver yet). ok jsg@
2016-08-06Implement interrupt controller functionality in the i.MX6 GPIOPatrick Wildt
driver. This allows us to use to hook up the Ethernet interrupt on the Nitrogen6x, SabreLite and WandBoard like it's described in the device tree. ok kettenis@
2016-08-06Switch imx over to the generic pinctrl API.Mark Kettenis
ok patrick@
2016-08-06remove now unused board specific phy definesJonathan Gray
2016-08-04Dynamically attach ampintc(4) and make it register itself as an interruptMark Kettenis
controller. Switch all i.MX6 devices over to the new FDT-aware interrupt establish API and enable imxgpc(4). This may break other platforms that use ampintc(4) as their interrupt controller. We will fix this as soon as possible by switching them over to the new interrupt establish API as well. This also removes the hack in fec(4) to avoid the gpio-based interrupt workaround. This commit is an essential step on the road to fix that issue properly. ok patrick@, jsg@
2016-08-04Add imxgpc(4), a driver for the i.MX6 General Power Controller (GPC) whichMark Kettenis
acts as a "transparent" interrupt controller. This driver just hands interrupt handlers to its parent (the Cortex-A9 GIC). It doesn't implement any powermanagement features yet. ok patrick@
2016-08-04After fixing up some of the AR8035 PHY registers, issue a reset. This seemsMark Kettenis
to fix autonegotiation at 100BaseTX. Drop the bit of code that powers up the PHY as the reset should already take care of that. ok patrick@
2016-07-27Instead of passing the raw reg property to simplebus nodes,Patrick Wildt
pass a pre-processed array of fdt_reg structs. This means that the drivers don't have to understand the cell properties themselves but can rely on the 64-bit addr/size pairs. ok kettenis@
2016-07-26Rename struct fdt_memory to fdt_reg to match the member namePatrick Wildt
used in the fdt attach args and the device tree. ok kettenis@
2016-07-23Previously the uarts attached in order, so that the first attached uartPatrick Wildt
is always the serial console. With device tree enumeration, this order is not given anymore. The serial console might now attach with a different minor and has to be updated, otherwise there will be no further output on the serial. Thus, re-create the i.MX6 console with the correct minor number on attach. ok jsg@, kettenis@
2016-07-23The linux kernel treated the "phy-reset-gpio" as active-low regardless of whatMark Kettenis
the device tree says. As a result many device trees encode it as active-high when active-low is needed. For now just override the device tree. ok jsg@, patrick@
2016-07-22Attach imx(4) on i.mx6 quad plus which appears to be largely compatibleJonathan Gray
with i.mx6 quad but with more memory bandwidth and some graphics tweaks. ok kettenis@
2016-07-22Fallback to the known fec irq number on imx.6 if the fdtJonathan Gray
interrupts-extended property is missing or not the size we expect. Some dtbs implement a workaround for "ERR006687 ENET: Only the ENET wake-up interrupt request can wake the system from Wait mode" suggested by the IMX6DQCE errata document to set an undocumented gpio mux mode and handle the interrupt via gpio. We don't support gpio interrupts yet, hopefully this change is enough to make interrupts work on wandboard and sabre lite again till we do. Discussed with kettenis and patrick, tested on sabre lite by patrick.
2016-07-21set and clear the 10baseT bit in statchgJonathan Gray
ok patrick@
2016-07-14Do board-specific delay/skew corrections for the Micrel KSZ9021 and KSZ9031Mark Kettenis
PHYs based on device tree properties instead of the board ID. Untested as I don't have the hardware. ok jsg@, patrick@
2016-07-13Use the device tree voltage regulator information to supply power to the USBMark Kettenis
bus. For this only supports "fixed" regulators that are controlled through a gpio. But this covers all the case we currently handle with board ID specific code. Note that the old code did explicitly remove power first on some boards, which would reset bus-powered devices/hubs on the bus. The new code doesn't do this. If that causes problems we can revisit the issue. The boards that would be affected are sabrelight/nitrogen6x and utilite. The plan is to evolve this into a generic regulator framework that supports more complex regulator types as well. ok jsg@, patrick@
2016-07-12Turn ahci(4) glue code for the i.MX6 platform into its own imxahci(4) driverMark Kettenis
such that we can don't end up with conflicting attachments of other SoC-specific glue code.
2016-07-12Turn ehci(4) glue code for the i.MX6 platform into its own imxehci(4) driverMark Kettenis
such that we can don't end up with conflicting attachments of other SoC-specific glue code. ok jsg@, patrick@
2016-07-11Use gpio framework to implement hardware reset of the PHY instead ofMark Kettenis
hardcoding particular gpios based on board IDs. ok visa@, jsg@
2016-07-11Use gpio framework to implement card detect instead of hardcoding particularMark Kettenis
gpios based on board IDs. ok visa@, jsg@
2016-07-11Hook up imxgpio(4) to the FDT gpio framework.Mark Kettenis
ok visa@, jsg@
2016-07-10Not all i.MX6 devices have a pinctrl property in their device nodes.Patrick Wildt
In that case, soft fail and return instead of allocating buffer with a bogus size. ok kettenis@
2016-07-10Fix typo. Pointed out by patrick@Mark Kettenis
2016-07-10Dynamically attach imxgpio(4) using the FDT.Mark Kettenis
2016-07-10Add support for handling pinctrl device tree bindings to imxiomuxc(4).Mark Kettenis
These are used to do board-specific setup of mux settings and pad configuration. ok jsg@, patrick@
2016-07-09Simplify the i.MX6 platform code. The list of board devices is nowMark Kettenis
(essentially) the same for all boards, so we can use a single list and match based on the compatible property of the root node in the device tree. ok jsg@
2016-07-09Perform PHY-specific initialization based on the PHY ID instead of theMark Kettenis
board ID for the AR8031/AR8035. ok jsg@
2016-07-09Dynamically attach i.MX6 ehci(4) using the FDT.Mark Kettenis
ok jsg@
2016-06-22Fetch MAC address from FDT.Mark Kettenis
ok jsg@, patrick@
2016-06-14If the FDT node has a "non-removable" property, return 1 from the cardMark Kettenis
detect function. Remove the board-specific return 1 cases as they all match the case of a "non-removable" property. Note that this introduces a sdmmc0: can't enable card message on the CuBox-i as is has the internal eMMC controller enabled in its device tree even though there is no eMMC soldered onto the board. ok jsg@
2016-06-13Dynamically attach imxdog(4) using the FDT.Mark Kettenis
2016-06-13Use "bus-width" property to determine whether 4-bit and 8-bit mode areMark Kettenis
supported.
2016-06-12Dynamically attach fec(4) using the FDT.Mark Kettenis
ok jsg@, patrick@
2016-06-11dynamically attach imxuart using the FDTJonathan Gray
ok kettenis@
2016-06-09Dynamically attach imxesdhc(4) using the FDT.Mark Kettenis
ok jsg@