summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
AgeCommit message (Collapse)Author
2022-02-14OF_getproplen() returns -1 on error, so don't store result in size_tJonathan Gray
ok kettenis@
2022-02-08fix off by one in bounds testJonathan Gray
ok miod@ kettenis@
2022-01-30Add tascodec(4), a driver for the TI TAS2770/TAS5770 digital audioMark Kettenis
amplifier codec found on Apple M1 Macs. ok patrick@, ratchov@
2022-01-27cad(4): Disable unused priority queuesVisa Hankala
The GEMs on the PolarFire Soc implement four Rx queues and four Tx queues for prioritizing traffic. All the queues are in a pseudo active state after reset. The driver uses only queues with index 0. Disable the rest to avoid DMA errors. Tested on a SiFive FU740 by jca@, Microchip PolarFire SoC and Xilinx Zynq-7000 by me.
2022-01-18Improve how quirks are handled on sdhc(4)-compatible drivers. So farPatrick Wildt
we have passed a modified version of the contents in the capabilities register if we wanted to override what sdhc(4) would otherwise read. Unfortunately there's a second capabilities register that we did not yet take into consideration, which is why to disable DDR50 support we created a quirk flag in the softc. The sdhc(4) ACPI nodes have a way to mask and set bits in both of the capabilities register, which is a flexible approach to solving that issue and using that for our sdhc(4) drivers even improves readability. ok kettenis@
2022-01-18Add cdsdhc(4), a driver for the Cadence SD/SDIO/eMMC host controller.Visa Hankala
Tested on a PolarFire SoC.
2022-01-14update drm to linux 5.15.14Jonathan Gray
new hardware support includes Intel ehl/Elkhart Lake (embedded) jsl/Jasper Lake (atom) rkl/Rocket Lake (desktop) AMD van gogh APU (gfx1033) yellow carp / rembrandt APU (gfx1035?) Ryzen 6000 APU navy flounder / navi 22 (gfx1031) RX 6700, RX 6700 XT, RX 6700M, RX 6800M, RX 6850M XT dimgrey cavefish / navi 23 (gfx1032) Pro W6600, Pro W6600M, RX 6600, RX 6600 XT, RX 6600M, RX 6600S, RX 6650M, RX 6650M XT, RX 6700S, RX 6800S beige goby / navi 24 (gfx1034) RX 6500 XT, RX 6400, RX 6500M, RX 6300M Thanks to the OpenBSD Foundation for sponsoring this work niklas@ for helping with ttm and amdgpu and patrick@ for adapting rockchip drm.
2022-01-11add Synopsys Degisnware UART (dw-apb-uart) supportSASANO Takayoshi
To fix Allwinner H6's UART problem, need to add dw-apb-uart special code. ok kettenis@
2022-01-11fix RSB_DMCR_DEVICE_MODE_DATA value to enter RSB mode correctlySASANO Takayoshi
ok kettenis@ patrick@
2022-01-09spellingJonathan Gray
feedback and ok tb@ jmc@ ok ratchov@
2022-01-08Apply mpsafe changes from dwge(4) to dwxe(4):Jonathan Matthew
Rework the tx path to use the consumer and producer positions to work out the number of slots available, and to put packets on the ring until fewer than DWXE_NTXSEGS slots are left, making dwxe_start() and dwxe_txeof() work independently. While here, only write to DWXE_TX_CTL1 once per call to dwxe_start() rather than once per packet. Adjust the rx interrupt path to check the number of slots in use and return slots once per interrupt. Add interrupt and ifq barriers before taking the interface down. With all of this done, we can mark dwxe(4) mpsafe. tested on arm64 (a64 sopine) by mlarkin@ and armv7 (h2+) by me ok dlg@
2021-12-20Rework the tx path to use the consumer and producer positions to work outJonathan Matthew
the number of slots available, and to put packets on the ring until fewer than DWGE_NTXSEGS slots are left, making dwge_start() and dwge_txeof() work independently. While here, only write to GMAC_TX_POLL_DEMAND once per call to dwge_start() rather than once per packet. Adjust the rx interrupt path to check the number of slots in use and return slots once per interrupt. Add interrupt and ifq barriers before taking the interface down. With all of this done, we can mark dwge(4) mpsafe. ok dlg@ patrick@
2021-12-19whitespaceMark Kettenis
2021-12-13add pclk clock used by dwdog(4) on RK3399Christopher Zimmermann
ok kettenis@
2021-12-06Add missing short-circuit in bcmpcie_dmamap_load_raw().Mark Kettenis
ok patrick@
2021-12-04Previous diff was incomplete, we also need to do DMA translation forMark Kettenis
bus_dmamap_load_raw(9). This fixes xhci(4) on the rpi4 with the U-Boot from ports that is installed on the arm64 installation media. ok mglocker@, patrick@
2021-12-03add Allwinner H6 supportSASANO Takayoshi
ok kettenis@
2021-12-03support AXP805 PMICSASANO Takayoshi
ok kettenis@
2021-12-03Perform DMA address translation if required.Mark Kettenis
ok patrick@
2021-11-21Add iicmux(4), a driver that switches between I2C busses connected toMark Kettenis
a single I2C controller by using the pin muxing facilities of an SoC. ok visa@
2021-11-21Register i2c bus.Mark Kettenis
ok jsg@
2021-11-09Add gpiokeys(4) for arm64Klemens Nanni
This driver handles events triggered by GPIO keys such as lid status and power button. OK kettenis
2021-11-09Sort gpio{leds,charger}Klemens Nanni
2021-11-07Fall back to label if function is missingKlemens Nanni
The "label" property is obsolete and "function" should be used, but devices like the Raspberry Pi 4b still use it. Detect LEDs on such machines: -gpioleds0 at mainbus0: no LEDs +gpioleds0 at mainbus0: "led0", "led1" OK patrick
2021-11-07Simplify print logicKlemens Nanni
OK patrick
2021-11-07Constify struct cfattach, not struct cfdriver.Patrick Wildt
Fixes panic seen on the Pinebook Pro.
2021-11-05Newer i.MX device trees store the skew information in the PHY's node, whichPatrick Wildt
we can access through the phy-handle. If there's no reference, keep doing what we have been doing so far. ok kettenis@
2021-11-05Newer i.MX device trees retriee the USB phy using the more generic propertyPatrick Wildt
name "phys". To handle those, make sure that we look it up and in case it's not there fall back to "fsl,usbphy". ok kettenis@
2021-10-31Extend the SPI bus API a bit. The config structure gets an sc_cs_delayMark Kettenis
member to allow us to specify a delay between assert the CS# signal and starting the clock. And the transfer function gains a flags argument, which can be used to specify a new SPI_KEEP_CS flag to keep CS# asserted after the transfer. This allows us to do another transfer immediately afterwards without de-asserting CS# which is necessary for sending commands to the upcoming Apple M1 keyboard/touchpad driver. ok patrick@
2021-10-24Constify struct cfattach.Martin Pieuchot
ok visa@ a long time ago, ok patrick@
2021-10-22Mask LPI interrupts. This fixes an interrupt storm on dwge(4) variantsMark Kettenis
that support Energy Efficient Ethernet when connected to a switch that also supports Energy Effient Ethernet. For example on the odroid-hc4. ok patrick@
2021-10-16Bail out early if the PCIe controller hasn't been initialized by theMark Kettenis
firmware. ok jsg@
2021-10-10Apparently it is possible for firmware to indicate that SMCCC_VERSION isMark Kettenis
implemented but have that call return NOT_SUPPORTED. Makes no sense, but the SMCCC standard documents this and tells us to treat this as v1.0. Change the code accordingly. Turn a few checks that should always be true into KASSERTs to keep the control flow simple. ok patrick@
2021-10-04Allegedly a "Marvell Armada 3700 Functional Errata, Guidelines, andMark Kettenis
Restrictions" document exists that discusses an errata #251 in section "3.12 PCIe Completion Timeout" and suggests that setting the DIS_ORD_CHK flag in the Debug Mux Control register is necessary as a workaround: https://lore.kernel.org/linux-pci/20210624222621.4776-6-pali@kernel.org This workaround is still being discussed by the Linux developers, but it does fix an issue I am seeing with athn(4), where an external abort happens under load. So apply this workaround since its potential side effects seem to be significantly less severe than provoking an external abort that hangs the machine. ok patrick@
2021-09-25Add gpiocharger(4) for arm64Klemens Nanni
This driver provides support for battery chargers connected to GPIO pins, such as those found on the Pinebook Pro. OK kettenis
2021-09-25Add gpioleds(4) for arm64Klemens Nanni
This driver provides support for LEDs connected to GPIO pins, such as those found on the Pinebook Pro. OK kettenis
2021-09-11Don't set the highspeed bit on bcm2835-sdhci sdhc(4) controllers.Marcus Glocker
Same approach as on Linux and NetBSD. This fixes bwfm(4) Wi-Fi on the Raspberry Pi 3 Model B Plus. help and ok kettenis@
2021-09-06Accompany some functions wich are marked inline with the static keywordPatrick Wildt
to make the arm64 kernel link when compiled with -fno-inline. ok kettenis@ mpi@
2021-09-01Remove dead poweroff functions, as they not appear in otherJan Klemkow
serial drivers. ok patrick@
2021-08-31Using suser() instead of doing it manually.Jan Klemkow
ok patrick@
2021-08-02rkpwm(4) device tree bindings were updated to not have clock names anymore,Patrick Wildt
so simply look up the first clock instead of looking for a specific one by name. Allows rkpwm(4) to find the clock when using a recent device tree. From Tomasz Bielecki ok kettenis@
2021-07-29Change driver class from DV_DULL to DV_IFNET, so that it can be recognizedPatrick Wildt
as boot interface when doing netboot. This makes auto install/upgrade work. ok kettenis@ visa@
2021-07-28The clocks for the Rockchip Ethernet controller need to be enabled muchPatrick Wildt
earlier. So far we haven't noticed this, as we had the assumption that all clocks are enabled anyway. On the NanoPi R4S this does not seem to be the case, so we need to bring the clock enable code closer to the other bringup code. ok kettenis@
2021-07-28On some RK3399 boards the firmware disables some of the clocks. AllowPatrick Wildt
some of those clocks to be enabled. Noticed on the NanoPi R4S, where the Ethernet controller clocks were surprisingly turned off. ok kettenis@
2021-07-28Add RK3399 PCIe PHY reference clocks.Patrick Wildt
ok kettenis@
2021-07-28Add RK3399 Type-C PHY clocks.Patrick Wildt
ok kettenis@
2021-07-24The updated dwctwo(4) driver introduces two new parameters.Marcus Glocker
2021-07-08Attach imxiomuxc(4) to i.MX8MP as well.Patrick Wildt
2021-07-07Rework TX handling to be more similar and comparable to our other modernPatrick Wildt
network controller drivers. This also removes a variable modified by both producer and consumer, making it a little bit more MP friendly. Fixes a panic reported by Matthieu Estrade.
2021-07-07When the list of free RX descriptors fills up completely, the consumedPatrick Wildt
and produced index are equal. The RX refill operation did not refill in that case, because it believed that this means there's nothing to do. In that case no RX buffers were allocated, and the RX descriptor ring went dry forever. Instead loop until we reach an empty freelist entry.