summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
AgeCommit message (Collapse)Author
2020-06-20Add bcmtmon(4), a driver for the temperature sensor on the Raspberry Pi 4.Mark Kettenis
Written by Alastair Poole.
2020-06-12Fix pasto; configure pin as input if it isn't an output.Mark Kettenis
2020-06-11Add RK3399 audio clocks.Patrick Wildt
ok kettenis@
2020-06-11Add escodec(4), a driver for the Everest ES8316 audio codec,Patrick Wildt
which is used on the Pinebook Pro. Driver written by Jared McNeill at NetBSD ok kettenis@
2020-06-11Add rkiis(4), a driver for the I2S controller found on the RockchipPatrick Wildt
RK3399. Driver written by Jared McNeill at NetBSD ok kettenis@
2020-06-10Add simpleamp(4), a driver for "simple audio amplifier". ThisPatrick Wildt
is one of the aux devices for simpleaudio(4). Its only job is to turn the amplifier's regulator and GPIO on/off when needed. ok kettenis@
2020-06-10Add simpleaudio(4), a driver for "simple audio cards". This isPatrick Wildt
just a wrapper that connects the I2S controller, the codec and some aux devices, and provides the information needed to set all those devices up to use the same settings. With help from ratchov@ ok kettenis@
2020-06-10In case the device tree does not provide a list of brightness levels,Patrick Wildt
populate a list of 256 levels as fallback. This makes the Pinebook Pro display work with the dtb that's part of Linux 5.7. "Fine with me" Krystian Lewandowski ok kettenis@
2020-06-10Add cwfg(4), a driver for the CellWise CW201x fuel gauge. This allowsPatrick Wildt
reading the current battery voltage, capacity and remaining minutes on the Pinebook Pro. Integration into the APM framework stays as exercise for the reader. Driver written by Jared McNeill at NetBSD ok kettenis@
2020-06-08update drm to linux 5.7Jonathan Gray
adds kernel support for amdgpu: vega20, raven2, renoir, navi10, navi14 inteldrm: icelake, tigerlake Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for helping, patrick@ for helping adapt rockchip drm and many developers for testing.
2020-05-31DDR mode seems to work fine on the Rockchip RK3399.Mark Kettenis
tested by benno@
2020-05-29dev/rndvar.h no longer has statistical interfaces (removed during variousTheo de Raadt
conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
2020-05-28Enable scrollback in simplefb(4).Frederic Cambus
OK kettenis@
2020-05-25change wsdisplay attribute type from long to uint32_tJonathan Gray
miod explained it was initially a long as it was thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. suggested and reviewed by miod@
2020-05-25rename wsdisplay alloc_attr() to pack_attr()Jonathan Gray
Suggested by John Carmack. miod agrees a rename would make sense and explained it was initially thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. ok mpi@
2020-05-23Increase chances of getting a successful PCIe link on the i.MX8MM.Patrick Wildt
Hold the reset GPIO for 100ms instead of 20ms, and also directly continue setting up the link instead of waiting for another 20ms. This brings us in line with what Linux is doing and removes the 10% risk of em(4) not showing up on my HummingBoard Pulse. ok kettenis@
2020-05-22Improve emulation of bridge config space.Mark Kettenis
ok patrick@
2020-05-22Improve resetting PCIe devices by making use of the reset-gpios property,Patrick Wildt
which is supposed to be PERST. Before issuing PERST, we must disable link training. This makes my PCIe device come up reliably after warm reboots. Promped by, with feedback from and ok kettenis@
2020-05-22Enable link training just before triggering the actual training.Mark Kettenis
Inspired by a proposed fix for Linux mainline.
2020-05-22Add support for the Marvell Xenon SDHC. This is used on the ArmadaPatrick Wildt
3700 and 8040 SoCs and allows me to use an SD card as storage on the Turris Mox. It also should make eMMC/SD show up on the MACCHIATObin. ok kettenis@
2020-05-22Attach mvpinctrl(4) to the Armada 3700's NB as well. As a consequencePatrick Wildt
mvclock(4) cannot attach to the NB's xtal clock anymore. Instead, have mvpinctrl(4) attach the xtal clock. With this we can use the SD card detect pins on the Turris Mox. ok kettenis@
2020-05-22Always defer attaching the mvneta(4) interfaces. Otherwise thisPatrick Wildt
leads to unsorted interface lists in ifconfig and the installer, depending on hardware configuration. ok kettenis@
2020-05-22And add the node to the struct. Sometimes I maybe shouldn't try splitingPatrick Wildt
up diffs before committing.
2020-05-22Actually store the node in the softc. Missed chunk from the previousPatrick Wildt
commit.
2020-05-22Some sdhc(4) on FDT use a card-detect GPIO or have a non-removable flag.Patrick Wildt
If those properties exist, use those to detect a card. ok kettenis@
2020-05-22Add mvkpcie(4), a driver for the Aardvark PCIe controller found onPatrick Wildt
the Armada 3700 SoC. So far only MSI is supported, since it was easier to implement. Both MSI and INTx share a single interrupt pin, so there's nothing to gain anyway, apart from legacy device support. With this I can push traffic through a bwfm(4) in my Turris Mox. ok kettenis@
2020-05-20Open up a 4GB memory bus window for mvneta(4) on the MarvellPatrick Wildt
Armada 3700. This makes my second ethernet controller/port work on the Turris Mox. ok kettenis@
2020-05-19We need to double the clock frequency for DDR modes.Mark Kettenis
2020-05-19Use static inline instead of inline; fixes ramdisk build.Mark Kettenis
2020-05-18Turn power domain on. Makes OpenBSD boot on the odroid c4.Mark Kettenis
2020-05-18Add some comments.Mark Kettenis
2020-05-18Add amlpwrc(4), a driver for the power domain controller found on variousMark Kettenis
Amlogic SoCs.
2020-05-17Fix typo in comment.Mark Kettenis
2020-05-17Add support for the SM1 variant and (probably) fix support for the CPUMark Kettenis
clock on the G12A variant.
2020-05-14The dwctwo(4) FDT glue is now identical on armv7 and arm64. Move it toMark Kettenis
/dev/fdt. ok patrick@, visa@
2020-04-28Calculate divisor for i.MX8M composite clocks. So far we have setPatrick Wildt
fixed values for the divisors, but the imxesdhc(4) nodes for SD Cards usually have an assigned clock rate of 200 MHz instead of 400 MHz. So instead of just clearing the divisor, we should set it according to what is asked. This also allows us to add the clock for the second imxesdhc(4) node to the list, which I have previously skipped, since otherwise the controller would have been clocked too high. ok kettenis@
2020-04-28Enable all clocks referenced by the imxesdhc(4) device tree node. UsuallyPatrick Wildt
those are already on, since on those machines we mostly boot from SD/MMC and U-Boot prepares them for us. On machines with a WiFi on imxesdhc(4), U-Boot isn't necessarily configured to do so. Enabling the clocks is the right thing to do anyway. ok kettenis@
2020-04-28Recognize a few more clocks referenced by the i.MX8MM and i.MX8MQPatrick Wildt
imxesdhc(4) device tree nodes.
2020-04-27Add tcpci(4) to support TCPCI-compliant USB Type-C port controllers.Patrick Wildt
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. "go for it" kettenis@
2020-04-27While i.MX6Q and i.MX7D's USB controller nodes claim to be compatiblePatrick Wildt
to i.MX27, they actually need different bits to be set than the i.MX27. The i.MX8MM's node instead rightfully only claims to be compatible to i.MX7D, since it's the same implementation. Thus change imxehci(4) to also match the i.MX7D compatible. ok kettenis@
2020-04-27Use the device tree properties to setup imxehci(4)'s USB non-corePatrick Wildt
instead of hardcoding the values. Tested on a Cubox-i by kettenis@ ok kettenis@
2020-04-27Enable the power domain and set the assigned clocks on imxehci(4)'s USBPatrick Wildt
controller and its nop-PHYs. This is needed on the i.MX8MM. ok kettenis@
2020-04-27The parent of the i.MX8MM and i.MX8MQ USB_CTRL_ROOTs is USB_BUS,Patrick Wildt
not USB_CORE_REF.
2020-04-27PCIe register accesses seem to "hang" on the i.MX8MM if its PHY doesn'tPatrick Wildt
come up. This apparently happens when there's no card in the PCIe slot. Thus improve the error handling in all cases where we wait for a link to come up, return and don't proceed any further. ok kettenis@
2020-04-27Add gpio support to bcmgpio(4) and make gpio(4) attach such that GPIOsMark Kettenis
that aren't claimed by kernel drivers can be used from userland. ok sthen@
2020-04-27Free the "ranges" array in the error handling paths.Patrick Wildt
ok kettenis@
2020-04-27fix SDHC_DEBUG build, remove procname printf'sians
ok kettenis@
2020-04-26Add i.MX8MM support to dwpcie(4). This re-uses the existing codePatrick Wildt
for i.MX8MQ support, but adds some PHY initialization via the imxpciephy(4) regmap and needs a few other bit-settings in the IOMUXC GPR for selecting the ref clock. ok kettenis@
2020-04-26Add imxpciephy(4), a driver for the i.MX7D's PCIe PHY, whichPatrick Wildt
is also implemented on the i.MX8MM. So far this driver is a glorified regmap provider, which will be used by dwpcie(4). ok kettenis@
2020-04-26Add support for the i.MX8MM USB clocks. These behave exactly likePatrick Wildt
the i.MX8MQ variant and sit in the same places, but there seems to be only one ROOT clock. Since the device tree bindings don't seem to use assigned-clock-rates, there's no need to implement the get/ set frequency for the USB clocks. Essentially this means: fewer code to copy.