summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdt (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Change pci_intr_handle_t into a struct and replace duplicated code thatkettenis2019-06-032-169/+38
| | | | | | | | implements mapping of MSI and MSI-X interrupts with new generic functions. Fixes a use-after-free in sone PCI device drivers that call pci_intr_string(9) after pci_intr_establish(9). ok deraadt@
* Add MSI-X support.kettenis2019-05-311-28/+39
| | | | ok patrick@
* Add MSI-X support.kettenis2019-05-311-29/+39
| | | | ok patrick@
* Rework virtio_negotiate_features()sf2019-05-261-13/+27
| | | | | | | | | | | | | | | | | | | | | | Add a sc_driver_features field that is automatically used by virtio_negotiate_features() and during reinit. Make virtio_negotiate_features() return an error code. Virtio 1.0 has a special status bit for feature negotiation that means that negotiation can fail. Make virtio_negotiate_features() return an error code instead of the features. Make virtio_reinit_start() automatically call virtio_negotiate_features(). Add a convenience function virtio_has_feature() to make checking bits easier. Add an error check in viomb for virtio_negotiate_features because it has some feature bits that may cause negotiation to fail. More error checking in the child drivers is still missing. ok mlarkin@
* Configure pins.kettenis2019-05-241-1/+4
|
* Implement interrupt controller functionality in the Rockchippatrick2019-05-111-1/+236
| | | | | | | GPIO driver. This allows us to use the fusbtc(4) interrupt on the RockPro64. ok kettenis@
* Add fusbtc(4) to support the Fairchild FUSB302 USB Type-C controller.patrick2019-05-112-1/+695
| | | | | | | | | | | | | | | | A Type-C controller has multiple tasks. Even though the orientation of the plug doesn't matter for the user, it matters for the hardware. To be able to know how to route the SuperSpeed pins you need to know which way the plug is connected. Also you need to know if you're a sink/source or device/host. To get the first connection, you toggle between the modes until you find a connection. In case you see that a sink is connected, you can turn on USB Vbus to power the sink. This driver explicitly does not implement USB's Type-C state machine, but if we get more and more of these controllers it might be worth doing. Also there's no support for Power Delivery messages yet. ok kettenis@
* Add a fallback to ehci(4)'s phy init code so that when therepatrick2019-05-101-1/+6
| | | | | | | | is no compatible phy it tries to enable the VBus using the phy-supply property. Makes the USB ports on the RockPro64 work. ok kettenis@
* Attach mvneta(4) on the Armada 3720 SoC.patrick2019-04-301-2/+3
|
* Add support for the Armada 3720 pinctrl controller to mvpinctrl(4).patrick2019-04-301-3/+89
| | | | | | | | This controller does not only support pinmuxing, but also includes GPIO controller functionality. This is needed to e.g. turn on USB VBus on the Turris Mox. ok kettenis@
* Add mvuart(4) to support the Armada 3720's serial console.patrick2019-04-302-1/+670
| | | | ok kettenis@
* Add support for the Armada 3720 clocks to mvclock(4).patrick2019-04-301-7/+272
| | | | ok kettenis@
* Add support for "pinconf-single" devices and add support for bias andkettenis2019-04-231-25/+49
| | | | | | drive-strength properties. Needed for various HiSilicon SoCs. ok patrick@, jsg@
* Add support for official Linux device tree bindings and implement supportkettenis2019-04-221-80/+195
| | | | for the "stub" clocks that handle the CPU clock frequency on the Hi3670.
* Configure pins.kettenis2019-04-221-1/+4
| | | | ok patrick@
* armv7 RAMDISK is now compiled with -Oz (just to be like other ramdisks),deraadt2019-04-201-3/+3
| | | | | so clang's rule about "static inline" comes into play. ok patrick
* Add missing compatibles for newer Linux kernel bindings.kettenis2019-04-131-1/+13
| | | | ok patrick@
* In the upstreamed and official device tree for i.MX8MQ the clockspatrick2019-04-012-342/+291
| | | | | | | | have changed. The clocks are not split into SRC, PRE_DIV, DIV and CG anymore. There is only a single index for each clock and we need to handle them as composite clocks internally. ok kettenis@
* imxdwusb(4) and imxpd(4) are no longer needed.patrick2019-04-013-158/+1
| | | | ok kettenis@
* In the upstreamed and official device tree for i.MX8MQ the USB physpatrick2019-04-011-5/+7
| | | | | | | use only one address and size cells. Also set the assigned clocks and enable them. ok kettenis@
* In the upstreamed and official device tree for i.MX8MQ the power domains arepatrick2019-04-011-1/+48
| | | | | | not separate nodes, but instead part of imxgpc(4). ok kettenis@
* virtio: Prepare for 64 feature bitssf2019-03-241-5/+5
| | | | | | | | | | | virtio 1.0 supports an arbitrary number of feature bits. However, so far no more than 64 are used (compared to 32 in virtio 0.9). Adjust data types to support 64 feature bits. Later, we may want to use bitmaps and setbit(), ... to support even more feature bits. ok mlarkin@
* virtio: adjust virtio_setup_queue prototype for 1.0sf2019-03-241-5/+8
| | | | | | | | | Make it take an address instead of a PFN. Pass the virtqueue pointer. In virtio 1.0, more information has to be configured in the device. Also call virtio_setup_queue() after the information has been filled in. ok mlarkin@
* Add support for i.MX8M PWM clocks.patrick2019-03-132-1/+74
|
* Since new bindings might use the same clock index for divs, gates andpatrick2019-03-131-5/+4
| | | | | | muxes, quietly return if the clock has no gate, but it's a div/mux. With this clocks that are defined in both gates and divs/muxes can be enabled.
* Allow ssdfb(4) to be mmap(2)-able so that we can use its framebufferpatrick2019-02-221-6/+81
| | | | | from the userland. Also allow changing the brightness levels so that it can even be turned off to save power and to prevent burn in.
* Add Allwinner V3s support. From SASANO Takayoshi.kettenis2019-02-122-1/+179
|
* Add Allwinner V3s support. Also update some Allwinner A80 pin names tokettenis2019-02-102-27/+348
| | | | | | what is used by more recent Linux kernels. Partly from SASANO Takayoshi.
* Handle "broken-cd" as "non-removable" for now. This will generate somekettenis2019-02-101-2/+4
| | | | | | | error messages if a card is absent from the slot, but other workarounds are much more complicated. From SASANO Takayoshi.
* Rework fec(4). I have written this driver in 2012 as my first everpatrick2019-02-061-270/+437
| | | | | | | | | | | ethernet controller driver. Handling of descriptors and buffers has not been great. There was no way to recover from a full tx queue. This introduces a mechanism akin to dwxe(4) and tsec(4) and fixes that. On rd we now map mbufs directly. On tx we can do that as well for newer SoCs. The i.MX6 Q/DL generation still needs a bounce buffer on tx for proper alignment. Tested with bluhm on Cubox-i (armv7) and Hummingboard Pulse (arm64)
* Add mvgicp(4), a driver for the Marvell extension to the GIC thatpatrick2019-02-033-67/+329
| | | | | | | | | | allows triggering SPI interrupts by doing memory transactions. This was already partially implemented in mvicu(4) and is now outsourced into its own driver since we need better initialization when booting using u-boot. Also implement new and legacy bindings in mvicu(4), relying on the new mvgicp(4) driver. ok kettenis@
* Fix lost interrupts in fec(4). Apparently the tick that talks to thepatrick2019-02-011-3/+4
| | | | | | | | | | | | phy to check the media status did not only ack the MII interrupt, but also all the others. Thus it could happen that the TX completion was not seen by the interrupt handler, leading to full TX queues. Also, the fec(4) interrupt handler acked more than it handles, thus possibly also acking the MII interrupt. Found with bluhm@ on his new arm64 regression setup. ok bluhm@
* Implement breaking into ddb on imxuart(4). When a break is detected,patrick2019-01-281-2/+13
| | | | | | a flag in the upper byte of the 2-byte-wide receive register is set. ok kettenis@
* Adapt to allwinner device tree changes in linux >= 5.0-rc1jsg2019-01-211-3/+7
| | | | | | "allwinner,sun6i-a31-rtc" has been removed from h3/h5/r40/a64 ok kettenis@
* virtio: Introduce defines for config(8) flagssf2019-01-191-3/+3
|
* No need to free the Command/Data GPIO in the I2C detach path since it ispatrick2019-01-171-2/+1
| | | | | | only allocated and used for the SPI backend. From Tobias Nygren
* Add support for the SSD1306 as seen on the NanoPi NEO2 withpatrick2019-01-171-2/+19
| | | | a NanoHat OLED.
* Add missing Allwinner H3/H5 OHCI clocks.kettenis2019-01-151-0/+8
|
* Add missing OHCI-related clocks.kettenis2019-01-121-0/+10
|
* Add i.MX8MQ support to dwpcie(4). Since the i.MX8MQ does seem topatrick2019-01-111-77/+427
| | | | | | | use MSI using dwpcie(4) instead of the GIC, MSIs are disabled for that platform until implemented. ok kettenis@
* imxsrc(4), a driver for the i.MX System Reset Controller. We willpatrick2019-01-112-1/+165
| | | | | | use this to assert the reset pins for e.g. the PCIe controller. ok kettenis@
* Add support for changing the parent of the PCIe clocks. We willpatrick2019-01-112-1/+21
| | | | | | use this for setting the PCIe clocks to the correct frequency. ok kettenis@
* Move some common defines to virtiovar.hsf2019-01-101-4/+1
| | | | And fix some comments
* tweak ohci_checkrev so it doesnt print a leading comma and space.dlg2019-01-071-2/+2
| | | | | | | | | it assumes that it always followed an interrupt string, but we don't print that on fdt. having the bus responsible for the whitespace means the fdt glue can print a colon to separate the bus info from checkrev output, while every other glue keeps the comma. ok deraadt@
* add support for ohci, as found on the pine64dlg2019-01-042-1/+203
| | | | | | | | this currently relies on the usbphy code in the ehci fdt glue to work, but this is a work in progress. there's an extra printf of fdt in the dmesg to make the ohci checkrev code not look terrible. ok kettenis@
* if we run out of mbufs for the rx ring, run a timeout to refill themdlg2019-01-031-5/+44
| | | | | | claudio@ (i think) hit this a while back, and i've had this diff in my tree since then. i'm putting it in now since it empirically solved the problem and im sick of carrying the diff around.
* Fix PCIe clock definitions.patrick2019-01-021-4/+4
|
* Add some additional RK3399 clocks that are used by the current Linuxkettenis2019-01-012-1/+19
| | | | mainline device tree.
* Set assigned-clocks.kettenis2019-01-011-1/+2
|
* Add RK3399 TSADC clock.kettenis2019-01-012-1/+9
|