| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On H616 (and I think H6, but this isn't verified) we need to reset the
card to have a functioning device.
With this commit all my pending patches for H616 are in tree. We run
well on my test device (Orange Pi Zero3), however there is an
uninvestigated issue with ethernet and graphics are an open question.
Reviewed by: manu, adrian
MFC After: 1 week
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55097
|
| |
|
|
|
|
| |
Reviewed by: manu
Sposored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54907
|
| |
|
|
|
|
| |
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54916
|
| |
|
|
|
|
|
|
|
| |
This adds padconf files for the two gpio ranges on the H616 SOC and adds
the SOC include.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54915
|
| |
|
|
|
|
| |
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54913
|
| |
|
|
|
|
| |
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54912
|
| |
|
|
|
|
| |
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54911
|
| |
|
|
|
|
| |
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54910
|
| |
|
|
|
|
| |
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54909
|
| |
|
|
|
|
| |
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54908
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are delay loops, checking the BUSY status bit, before writing to
the date or time registers. Each iteration contains a 1usec delay, for a
maximum of 70 iterations.
This is frequently not enough on the D1 platform, where the message is
emitted:
rtc0: could not set date, RTC busy
Bump the loop delay to 10usecs each, and the maximum number of
iterations to 150, for a maximum delay of 1.5msecs between each write of
the register.
In my testing this seems to be adequate.
The loop variable is renamed for clarity/simplicity.
Reviewed by: manu
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54180
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Do not create mutexes with snd_mtxcreate(). It doesn't provide any
value, plus it first allocates the mutex with malloc(9). Allocate
mutexes in the stack and use mtx_* functions directly instead of the
snd_mtx* wrappers.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53855
|
| |
|
|
|
|
|
|
| |
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53528
|
| |
|
|
|
|
|
| |
in for() loops. Also, use 'while', where only the
conditional test of 'for' was used.
Reviewed by: sjg
|
| |
|
|
|
|
|
|
|
|
|
| |
Implement bus_setup_intr and bus_teardown_intr as bus_generic_setup_intr
and bus_generic_teardown_intr respectively for GPIO drivers that support
interrupts. This allows children to setup interrupts.
Reported by: Evgenii Ivanov <devivanov@proton.me>
Reviewed by: imp
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D52197
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since gpiobus_attach_bus can attach the gpiobus child along with its
children in the same bus pass, the parent controller's reference to
gpiobus might not be set by the time the children need it. Instead,
drivers should use gpiobus_add_bus and explicitly call
bus_attach_children.
Reviewed by: mmel, imp (older version)
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D51578
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Necessary driver changes to run on the platform:
- DMA descriptors need shifting
- Add quirk for max-sized transfers
- Add compatible string
Co-authored-by: br
Co-authored-by: mhorne
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D51197
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Second attempt.)
For the Allwinner D1 (Nehza) SBC.
This RTC driver is also a clock provider, which registers two fixed
clocks. In all the devices we currently support, the names of the clocks
are present in the "clock-output-names" property of the device tree.
This is not the case for the D1 DTS, as this property does not appear in
upstream. Therefore the clock definitions are statically assigned a
name, which is overridden when specified.
The driver also supports the older A10/A20 models, which don't export
any clocks. Ensure this case is handled properly.
Reviewed by: mmel
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D50369
|
| |
|
|
|
|
|
|
|
|
| |
Only attach gpiobus when the controller is fully initialized. Children
of gpiobus expect this to be the case.
Reviewed by: mmel, imp, andrew
Approved by: imp (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D51088
|
| |
|
|
|
|
|
|
|
|
|
| |
Some drivers held regular mutexes across some new-bus calls; instead
depend on bus_topo_lock to protect the relevant softc members. This
also fixes the bus_topo_lock to be explicit in these drivers rather
than relying on the implicit Giant from taskqueue_swi_giant. It
avoids calling sleepable routines like device_probe_and_attach from an
swi context.
Differential Revision: https://reviews.freebsd.org/D49270
|
| |
|
|
|
|
|
|
|
|
| |
It caused a regression on A10/A20 platforms. Revert until the proper fix
can be determined.
This reverts commit 9ddd516b886218af809dbf40eeda1ed388e2879c.
PR: 285054
Reported by: mmel
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SBI timer functionality is partially broken on the Allwinner D1, so
we require this driver to provide an eventtimer/system timer interrupts.
The timecounter interface, on the other hand, is not required. The
generic RISC-V timer driver uses the native rdtime instruction, and
implements vdso, so this should be preferred.
Reviewed by: manu, ganbold
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48672
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This reflects its expanded support for platforms other than the A10.
Functions specific to A10/A13 retain the a10 prefix, but the majority of
names in the driver are changed, e.g. a10_timer_softc becomes
aw_timer_softc.
Reviewed by: manu, ganbold
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48671
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for enabling the driver on the D1 platform (riscv).
- Better isolate armv7-only portions of the driver
- Move a10 timecounter setup into a helper function
- Small style tweaks
Reviewed by: manu, ganbold
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48670
|
| |
|
|
|
|
|
|
|
|
|
| |
Add the generic USB drivers and FDT glue to the build.
Make small tweaks to the aw_usbphy and aw_musb drivers for the Allwinner
D1.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48126
|
| |
|
|
|
|
|
|
| |
Deleting a child explicitly before calling bus_generic_detach is now
redundant, so remove those calls and rely on bus_generic_detach to
delete children instead.
Differential Revision: https://reviews.freebsd.org/D47961
|
| |
|
|
|
|
|
|
|
| |
This is simpler and more robust in the face of potential double-frees
(e.g. if called after bus_generic_detach which will delete devices in
a future commit).
Reviewed by: manu, imp
Differential Revision: https://reviews.freebsd.org/D47958
|
| |
|
|
|
|
| |
This unbreaks arm build after commit 719245455853.
Fixes: 719245455853 aw_gpio: support Allwinner D1 GPIO
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GPIO controls the multiplexing of the D1 pins to its peripherals,
so this adds the definitions needed by the aw_gpio driver to support
the D1.
Also, this modifies the aw_gpio driver to support the differences of
the D1 controller:
- pins can have up to 15 functions
- each port is mapped with an alignment of 0x30
- CFG registers have 4 bits per pin
- DRV registers have 4 bits per pin
- the offset of PULL registers is 0x24
Signed-off-by: Julien Cassette <julien.cassette@gmail.com>
Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D35593
|
| |
|
|
|
|
|
|
|
|
|
| |
Enable the driver and dependencies (aw_sid, nvmem). Add compat strings,
etc.
Found on the Allwinner D1.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47923
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47675
|
| |
|
|
|
|
|
|
|
|
|
| |
Otherwise it may cause system reset before the watchdog can be pat. This
is consistent with other watchdog drivers.
Tested on Allwinner D1.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47517
|
| |
|
|
|
|
|
|
|
| |
Add the relevant compatible string and build glue. Update the man page
with relevant compat strings.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47516
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the Allwinner D1 (Nehza) SBC.
This RTC driver is also a clock provider, which registers two fixed
clocks. In all the devices we currently support, the names of the clocks
are present in the "clock-output-names" property of the device tree.
This is not the case for the D1 DTS, as this property does not appear in
upstream. Therefore the clock definitions are statically assigned a
name, which is overridden when specified.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47514
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way a sound driver currently registers to sound(4) is using the
following sequence of function calls:
1. pcm_register() to initialize snddev_info.
2. pcm_addchan() calls to create the device's primary channels.
3. pcm_setstatus() to do the final setup.
While using 3 different functions in a specific order might not be very
elegant, this pattern cannot be easily avoided. However, pcm_register()
and pcm_setstatus() are especially confusing, since one would
intuitively expect:
1. pcm_register() to actually do the registration, as opposed to a basic
initialization.
2. pcm_setstatus() to, as the name suggests, set some kind of status, as
opposed to finalizing the registration.
This patch renames pcm_register() to pcm_init(), and pcm_setstatus() to
pcm_register(). Drivers are modified accordingly.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D47325
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Different types of interrupts may require using different exception
vectors so this commit adds support multiple interrupt roots to handle
these cases. Archs may opt-in to multiple interrupt roots by defining
INTR_ROOT_NUM as the number of roots in their intr.h. Based off
https://reviews.freebsd.org/D40161.
Signed-off-by: Ayrton Munoz <a.munoz3327@gmail.com>
Co-authored-by: Kyle Evans <kevans@FreeBSD.org>
Co-authored-by: Andrew Turner <andrew@FreeBSD.org>
Reviewed-by: imp,mmel,mhorne
Pull-Request: https://github.com/freebsd/freebsd-src/pull/1363
|
| |
|
|
| |
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
| |
Change 4787572d0580 made if_alloc_domain() never fail, then also do the
wrappers if_alloc(), if_alloc_dev(), and if_gethandle().
No functional change intended.
Reviewed by: kp, imp, glebius, stevek
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D45740
|
| |
|
|
|
|
|
| |
Fixes: 923e0040a59a ("sound: Move chip.h contents to pcm/sound.h")
Reported by: Jenkins CI
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
This is needed for gpiokeys driver that needs to read input state after
receiving an interrupt for either edge.
PR: 248138
MFC after: 1 month
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The static irq_root_ipicount variable is only ever written to (with the
value passed to irq_root_ipicount), never read. Moreover, the bcm2836
driver, as used by the Raspberry Pi 2B and 3A/B (but not 4, which uses a
GIC-400, though does have the legacy interrupt controller present too)
passes 0 as ipicount, despite implementing IPIs. It's thus inaccurate
and serves no purpose, so should be removed.
Reviewed by: mmel, imp, mhorne
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D35897
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: mhorne
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43196
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: emaste, imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43195
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: emaste, imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43194
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: dab, imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43193
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43192
|
| |
|
|
|
|
|
|
|
|
|
| |
We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.
Reviewed by: mhorne
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43191
|
| |
|
|
|
|
|
|
|
| |
dwc3 is big enough to have its own subdirectory.
While here only make it depend on kernel option dwc3 and rk_dwc3
without any SOC options.
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43190
|
| |
|
|
|
|
|
|
|
| |
No need to keep it under sys/arm/allwinner/clkng
It's easier to find which controller we support by looking under one directory.
It will also be shared with Allwinner RiscV SoC.
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43188
|
| |
|
|
|
|
|
|
| |
No need to keep it under sys/arm/allwinner
It's easier to find which controller we support by looking under one directory.
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43187
|