- May 24, 2023
-
-
Phil Elwell authored
The arm64 initialisation uses the physical address reachable by all DMA controllers to set the size of ZONE_DMA. This fails on BCM2711 with the current dts files because the declaration of the I/O space fools it into thinking the legacy 30-bit DMA channels can see most of the 32-bit space. Take advantage of the simple nature of the implementation by adding a node with a restricted dma-ranges property solely so to act as the limiting factor in the calculation. See: https://github.com/raspberrypi/linux/issues/5470 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Dom Cobley authored
Now we wait for write responses and have a burst size of 4, we can set the fifo threshold much higher. Set it to 28 (of the 32 entry size) to keep fifo fuller and reduce chance of underflow. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
Also tweak the flags: Remove NO_WAIT_RESP (27) Add BURST_LENGTH (30) The AXI path from DMA controller to HDMI audio fifo is long, and may have considerable delay. When using DMA without waiting for responses it is very easy to overfill the fifo as when the fifo removes DREQ there may be large numbers of writes in flight. This means the DREQ fifo threshold must be set low enough to accommodate the maximum number of in flight writes (unknown by something like 24), which means the 32 element fifo only requests data when it contains fewer than 8 entries, making it susceptable to underflow. If we wait for write responses we can set the DREQ fifo threshold much higher as there are a controlled number of writes in flight. However the overall bandwidth is reduced by setting this, so also enable a burstsize of 4 to improve bandwidth. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
Resetting them to zero puts DMA channel into secure mode which makes further accesses impossible Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
Add a control bit to enable a multi-beat burst on a DMA. This improves DMA performance and is required for HDMI audio. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
The sequence we were doing was not safe. Clearing CS meant BCM2835_DMA_WAIT_FOR_WRITES was cleared and so polling BCM2835_DMA_WAITING_FOR_WRITES has no benefit Broadcom have provided a recommended sequence to abort a dma lite channel, so switch to that. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
It wasn't aborting the transfer and caused stop/start of hdmi audio dma to be unreliable. New sequence approved by Broadcom. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Dom Cobley authored
It goes in info not extra Signed-off-by: Dom Cobley <popcornmix@gmail.com>
-
Maxime Ripard authored
The bcm2835_dma_create_cb_chain() function is in charge of building up the descriptors chain for a given transfer. It was initially supporting only the BCM2835-style DMA controller, and was later expanded to support controllers with 40-bits channels that use a different descriptor layout. However, some part of the function only use the old style descriptor, even when building a chain of new-style descriptors, resulting in weird bugs. Fixes: 9a52a991 ("bcm2835-dma: Add proper 40-bit DMA support") Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
bcm2711_dma40_memcpy has some code strictly equivalent to the to_bcm2711_cbaddr() function. Let's use it instead. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Maxime Ripard authored
For 40 bits channels, the position is reported by reading the upper byte in the SRCI/DESTI registers. However the driver adds that upper byte with an 8-bits left shift, while it should be 32. Fixes: 9a52a991 ("bcm2835-dma: Add proper 40-bit DMA support") Signed-off-by: Maxime Ripard <maxime@cerno.tech>
-
Phil Elwell authored
Add an i2s_dma4 parameter to make the I2S interface use 40-bit DMA channels, taking the opportunity to remove some duplication. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Contrary to what struct snd_dmaengine_dai_dma_data suggests, the configuration of addresses of DMA slave interfaces should be done in CPU physical addresses. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Contrary to what struct snd_dmaengine_dai_dma_data suggests, the configuration of addresses of DMA slave interfaces should be done in CPU physical addresses. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Contrary to what struct snd_dmaengine_dai_dma_data suggests, the configuration of addresses of DMA slave interfaces should be done in CPU physical addresses. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Retrieve the system timer base address directly from DT. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Although the system timer is largely ignored in favour of the ARM local timers, retain the DT node so that the bcm2835-sdhost logging can find the timer in a cleaner fashion. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Contrary to what struct snd_dmaengine_dai_dma_data suggests, the configuration of addresses of DMA slave interfaces should be done in CPU physical addresses. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Contrary to what struct snd_dmaengine_dai_dma_data suggests, the configuration of addresses of DMA slave interfaces should be done in CPU physical addresses. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Slave addresses for DMA are meant to be supplied as physical addresses (contrary to what struct snd_dmaengine_dai_dma_data does). Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Contrary to what struct snd_dmaengine_dai_dma_data suggests, the configuration of addresses of DMA slave interfaces should be done in CPU physical addresses. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Slave addresses for DMA are meant to be supplied as physical addresses (contrary to what struct snd_dmaengine_dai_dma_data does). It is up to the DMA controller driver to perform the translation based on its own view of the world, as described in Device Tree. Now that the Pi Device Trees have the correct peripheral mappings, replace the hacky address munging with phys_to_dma(). Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Step one of using DMA addresses the intended way is to make sure that the mapping between CPU physical addresses and DMA addresses in Device Tree is complete and correct. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Raul Cheleguini authored
commit 91b6d02d upstream. The ATS2851 based controller advertises support for command "LE Set Random Private Address Timeout" but does not actually implement it, impeding the controller initialization. Add the quirk HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT to unblock the controller initialization. < HCI Command: LE Set Resolvable Private... (0x08|0x002e) plen 2 Timeout: 900 seconds > HCI Event: Command Status (0x0f) plen 4 LE Set Resolvable Private Address Timeout (0x08|0x002e) ncmd 1 Status: Unknown HCI Command (0x01) Co-developed-by: imoc <wzj9912@gmail.com> Signed-off-by: imoc <wzj9912@gmail.com> Signed-off-by: Raul Cheleguini <raul.cheleguini@gmail.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-
Vasily Khoruzhick authored
commit 8194f1ef upstream. Some adapters (e.g. RTL8723CS) advertise that they have more than 2 pages for local ext features, but they don't support any features declared in these pages. RTL8723CS reports max_page = 2 and declares support for sync train and secure connection, but it responds with either garbage or with error in status on corresponding commands. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Bastian Germann <bage@debian.org> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-
Raul Cheleguini authored
commit 7c2b2d2d upstream. Add two more quirks to resume the device initialization and basic operation as the device seems not to support "Read Transmit Power" and "Set Extended Scan Parameters". < HCI Command: LE Read Transmit Power (0x08|0x004b) plen 0 > HCI Event: Command Status (0x0f) plen 4 LE Read Transmit Power (0x08|0x004b) ncmd 1 Status: Unknown HCI Command (0x01) < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8 Own address type: Random (0x01) Filter policy: Accept all advertisement (0x00) PHYs: 0x01 Entry 0: LE 1M Type: Active (0x01) Interval: 11.250 msec (0x0012) Window: 11.250 msec (0x0012) > HCI Event: Command Status (0x0f) plen 4 LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1 Status: Unknown HCI Command (0x01) Signed-off-by: Raul Cheleguini <rcheleguini@google.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-
Phil Elwell authored
Now that the base bcm2711 base dts files give the added I/O interfaces references to the default pinctrl nodes, remove the same from their respective overlays. See: https://github.com/raspberrypi/linux/pull/5443 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Give all the extended I/O interfaces - I2C3-6, SPI3-6 and UART2-5 - sensible default pinctrl references. See: https://github.com/raspberrypi/linux/pull/5443 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Move common pin group declarations into the shared bcm2711-rpi-ds.dtsi. No functional change. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Jose Maria Casanova Crespo authored
Two new debugfs interfaces are implemented: - gpu_usage: exposes the total runtime since boot of each of the 5 scheduling queues available at V3D (BIN, RENDER, CSD, TFU, CACHE_CLEAN). So if the interface is queried at two different points of time the usage percentage of each of the queues can be calculated. - gpu_pid_usage: exposes the same information but to the level of detail of each process using the V3D driver. The runtime for process using the driver is stored. So the percentages of usage by PID can be calculated with measures at different timestamps. The storage of gpu_pid_usage stats is only done if the debugfs interface is polled during the last 70 seconds. If a process does not submit a GPU job during last 70 seconds its stats will also be purged. Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
-
Phil Elwell authored
It has been observed that edge events can be lost when GPIO edges occur close to each other. Investigation suggests this is due to a hardware bug, although no mechanism has been identified. Work around the event loss by moving the IRQ acknowledgement into the main ISR, adding missing events by explicit level-change detection. See: https://forums.raspberrypi.com/viewtopic.php?t=350295 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
The XFRM_INTERFACE option enables "a virtual interface to route IPsec traffic". Add that as a module, enabling statistics and "sub policy" at the same time. See: https://github.com/raspberrypi/linux/issues/5446 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
With UART numbering from DT aliases re-enabled, add aliases for the additional BCM2711 UARTs. Also use the opportunity to remove some DTS duplication. See: https://forums.raspberrypi.com/viewtopic.php?t=347868 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
This reverts commit c2fa32a8dae4c4b2638c9f4de5e398e98460e693. Consistent, logical UART numbering is desirable, so remove the effective revert. See: https://forums.raspberrypi.com/viewtopic.php?t=347868 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Now that the kernel controls the onboard Bluetooth initialisation by default, the miniuart-bt overlay needs updating to match. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
Change the base Device Tree files so that by default the kernel is responsible for initialisation of the onboard Bluetooth modems. Use dtparam=krnbt=off to revert to the old behaviour. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
The kernel needs to recognise the default BDADDRs used by the Bluetooth modems, so add a few more that we care about. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
The kernel Bluetooth framework understands that devices may not be programmed with valid Bluetooth addresses. It also has the ability to override a Bluetooth address with the value of the local-bd-address DT property, but it ignores the validity of the existing address when doing so. Add a new boolean property, fallback-bd-address, which indicates that the given local-bd-address property should only be used if the device does not already have a valid BDADDR. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Phil Elwell authored
The BCM2835 mini-UART has no modem status interrupt, causing all transmission to stop, never to use, if a speed change ever happens while the CTS signal is high. Add a simple polling mechanism in order to allow recovery in that situation. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
Dave Stevenson authored
Pi 0-3 have no deep colour support and only 24bpp output, so max_bpc should remain as 8. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
-