platform/kernel/linux-rpi.git
4 years agoARM: dts: Move audio node under the vchiq parent
Phil Elwell [Mon, 3 Feb 2020 17:03:29 +0000 (17:03 +0000)]
ARM: dts: Move audio node under the vchiq parent

VCHIQ kernel clients are now instantiated as platform drivers rather
than using DT, but the children of the vchiq device can optionally be
given a sub-node of the vchiq parent for configuration and to disable
them.

Move the existing audio node beneath the vchiq parent, to prevent
multiple instantiation and unpleasant warnings. Note that the node
name has to match the module name - "bcm2835_audio".

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agostaging: vchiq_arm: Add a matching unregister call
Phil Elwell [Mon, 3 Feb 2020 17:33:01 +0000 (17:33 +0000)]
staging: vchiq_arm: Add a matching unregister call

All the registered children of vchiq have a corresponding call to
platform_device_unregister except bcm2835_audio. Fix that.

Fixes: 25c7597af20d ("staging: vchiq_arm: Register a platform device for audio")

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agostaging: vchiq_arm: Give vchiq children DT nodes
Phil Elwell [Mon, 3 Feb 2020 17:30:46 +0000 (17:30 +0000)]
staging: vchiq_arm: Give vchiq children DT nodes

vchiq kernel clients are now instantiated as platform drivers rather
than using DT, but the children of the vchiq interface may still
benefit from access to DT properties. Give them the option of a
a sub-node of the vchiq parent for configuration and to allow
them to be disabled.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agostaging: vchiq_arm: Register a platform device for audio
Stefan Wahren [Thu, 6 Dec 2018 18:28:55 +0000 (19:28 +0100)]
staging: vchiq_arm: Register a platform device for audio

Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a
platform device for the camera driver.") this register the audio driver as
a platform device, too.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agoARM: dts: Remove CMA allocation from Pi 4 dts
Phil Elwell [Sat, 1 Feb 2020 08:58:11 +0000 (08:58 +0000)]
ARM: dts: Remove CMA allocation from Pi 4 dts

The 5.5 tree includes a patch to disable the CMA command line
parameter and replace it with properties from a DT node.
The upstream Pi 4 .dts, now used downstream with modifications,
includes the "linux,cma" node, but only reserves 32MB which is
often not enough.

Temporarily remove the "linux,cma" node to reenable the command line
parameter.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agoARM: dts: Correct SoC name
Phil Elwell [Fri, 31 Jan 2020 15:24:59 +0000 (15:24 +0000)]
ARM: dts: Correct SoC name

The Pi 4 SoC is called BCM2711, not BCM2838.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agopcie-brcmstb: Correct SoC name
Phil Elwell [Fri, 31 Jan 2020 09:39:40 +0000 (09:39 +0000)]
pcie-brcmstb: Correct SoC name

The Pi 4 SoC is called BCM2711, not BCM2838.

Fixes: "bcm2835-dma: Add proper 40-bit DMA support"
Fixes: "Ported pcie-brcmstb bounce buffer implementation to ARM64."

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agohwrng: iproc-rng200: Correct SoC name
Phil Elwell [Fri, 31 Jan 2020 09:36:57 +0000 (09:36 +0000)]
hwrng: iproc-rng200: Correct SoC name

The Pi 4 SoC is called BCM2711, not BCM2838.

Fixes: "hwrng: iproc-rng200: Add BCM2838 support"

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agothermal: brcmstb_thermal: Correct SoC name
Phil Elwell [Fri, 31 Jan 2020 09:33:40 +0000 (09:33 +0000)]
thermal: brcmstb_thermal: Correct SoC name

The Pi 4 SoC is called BCM2711, not BCM2838.

Fixes: "thermal: brcmstb_thermal: Add BCM2838 support"

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agobcm2835-dma: Correct SoC name
Phil Elwell [Fri, 31 Jan 2020 09:28:57 +0000 (09:28 +0000)]
bcm2835-dma: Correct SoC name

The Pi 4 SoC is called BCM2711, not BCM2838.

Fixes: "bcm2835-dma: Add proper 40-bit DMA support"

4 years agostaging/vchiq_arm: Fix bcm2711 compatible string
Phil Elwell [Fri, 31 Jan 2020 09:26:18 +0000 (09:26 +0000)]
staging/vchiq_arm: Fix bcm2711 compatible string

Fixes: "vchiq: Add 36-bit address support"

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agoRevert "bcm2711: Retain support for old dtbs"
Phil Elwell [Fri, 31 Jan 2020 15:47:43 +0000 (15:47 +0000)]
Revert "bcm2711: Retain support for old dtbs"

This reverts commit 61a505c739150c8dbb57a73db5c6c720d5160157.

4 years agoARM: dts: Rebuild downstream DTS files
Phil Elwell [Thu, 30 Jan 2020 15:48:00 +0000 (15:48 +0000)]
ARM: dts: Rebuild downstream DTS files

Refactor the tree of downstream DTS files to achieve approximately the
same end result but wihout modifying upstream files (except for
bcm2711-rpi-4-b.dts).

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agoARM: dts: bcm2711: fix soc's node dma-ranges
Nicolas Saenz Julienne [Wed, 4 Dec 2019 12:56:33 +0000 (13:56 +0100)]
ARM: dts: bcm2711: fix soc's node dma-ranges

Raspberry Pi's firmware has a feature to select how much memory to
reserve for its GPU called 'gpu_mem'. The possible values go from 16MB
to 944MB, with a default of 64MB. This memory resides in the topmost
part of the lower 1GB memory area and grows bigger expanding towards the
begging of memory.

It turns out that with low 'gpu_mem' values (16MB and 32MB) the size of
the memory available to the system in the lower 1GB area can outgrow the
interconnect's dma-range as its size was selected based on the maximum
system memory available given the default gpu_mem configuration. This
makes that memory slice unavailable for DMA. And may cause nasty kernel
warnings if CMA happens to include it.

Change soc's dma-ranges to really reflect it's HW limitation, which is
being able to only DMA to the lower 1GB area.

Fixes: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Phil Elwell <phil@raspberrypi.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
4 years agoARM: dts: bcm2711-rpi-4: Enable GENET support
Stefan Wahren [Mon, 11 Nov 2019 19:49:26 +0000 (20:49 +0100)]
ARM: dts: bcm2711-rpi-4: Enable GENET support

This enables the Gigabit Ethernet support on the Raspberry Pi 4.
The defined PHY mode is equivalent to the default register settings
in the downstream tree.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
4 years agoARM: dts: bcm2711: force CMA into first GB of memory
Nicolas Saenz Julienne [Wed, 6 Nov 2019 09:59:44 +0000 (10:59 +0100)]
ARM: dts: bcm2711: force CMA into first GB of memory

arm64 places the CMA in ZONE_DMA32, which is not good enough for the
Raspberry Pi 4 since it contains peripherals that can only address the
first GB of memory. Explicitly place the CMA into that area.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Acked-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
4 years agoARM: dts: Add minimal Raspberry Pi 4 support
Stefan Wahren [Sun, 6 Oct 2019 13:41:25 +0000 (15:41 +0200)]
ARM: dts: Add minimal Raspberry Pi 4 support

This adds minimal support for the new Raspberry Pi 4 without the
fancy stuff like GENET, PCIe, xHCI, 40 bit DMA and V3D. The RPi 4 is
available in 3 different variants (1, 2 and 4 GB RAM), so leave the memory
size to zero and let the bootloader take care of it. The DWC2 is still
usable as peripheral via the USB-C port.

Other differences to the Raspberry Pi 3:
- additional GIC 400 Interrupt controller
- new thermal IP and HWRNG
- additional MMC interface (emmc2)
- additional UART, I2C, SPI and PWM interfaces
- clock stretching bug in I2C IP has been fixed

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Florian Fanelli <f.fainelli@gmail.com>
4 years agoARM: dts: Clean out downstream BCM2711/2838 files
Phil Elwell [Fri, 31 Jan 2020 16:53:13 +0000 (16:53 +0000)]
ARM: dts: Clean out downstream BCM2711/2838 files

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agoARM: dts: Revert all changes to upstream dts files
Phil Elwell [Thu, 30 Jan 2020 11:39:39 +0000 (11:39 +0000)]
ARM: dts: Revert all changes to upstream dts files

With the possible exception of bcm2711* files where there is a name
clash, we should not be modifying upstream DTS files.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agobrcmfmac: Increase power saving delay to 2s
Phil Elwell [Mon, 3 Feb 2020 09:32:22 +0000 (09:32 +0000)]
brcmfmac: Increase power saving delay to 2s

Increase the delay before entering the lower power state to 2 seconds
(the maximum allowed) in order to reduce the packet latencies,
particularly for inbound packets.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agoRevert "brcmfmac: Disable power management"
Phil Elwell [Wed, 13 Nov 2019 16:28:10 +0000 (16:28 +0000)]
Revert "brcmfmac: Disable power management"

Shortly after the release of the Pi 3B, a loss of SSH connectivity
over WiFi was traced to the power management handling, so power
management was disabled. And so it has remained ever since.

Enabling power management saves 55mA (~270mW) on a Pi 4B, so is very
much worth the minimal effort of reverting this patch, which was
squashed and rebased many times since then to the commit hash is
meaningless.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agooverlays: add hdmi-backlight-hwhack-gpio-overlay
Michael Kaplan [Wed, 5 Feb 2020 09:27:23 +0000 (10:27 +0100)]
overlays: add hdmi-backlight-hwhack-gpio-overlay

This is a Devicetree overlay for GPIO based backlight on/off capability.

Use this if you have one of those HDMI displays whose backlight cannot be controlled via DPMS over HDMI and plan to do a little soldering to use an RPi gpio pin for on/off switching.

See: https://www.waveshare.com/wiki/7inch_HDMI_LCD_(C)#Backlight_Control

This was tested with a clone of the Waveshare "7 inch HDMI Touch LCD C" where I soldered two mosfets to override the backlight dip-switch.
When the overlay is loaded, a sysfs backlight node appears which can be used to modify the brightness value (0 or 1), and is even used by DPMS to switch the display backlight off after the configured timeout.
(On current Raspbian Buster Desktop, it's also possible to wakeup the display via a tap on the touch display :-) )

Signed-off-by: Michael Kaplan <m.kaplan@evva.com>
4 years agoSQUASH: Fix spi driver compiler warnings
Phil Elwell [Tue, 4 Feb 2020 16:35:12 +0000 (16:35 +0000)]
SQUASH: Fix spi driver compiler warnings

Squash with "spi: spi-bcm2835: Disable forced software CS"

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agooverlays: Fix mcp23017's addr parameter
Phil Elwell [Tue, 4 Feb 2020 15:22:55 +0000 (15:22 +0000)]
overlays: Fix mcp23017's addr parameter

The addr parameter of the mcp23017 overlay was broken by the addition
of the noints parameter; splitting the mcp node in two without also
modifying the second half from the addr parameter would cause the two
halves to separate. Change the implementation strategy to patch
fragment 2 (as was originally proposed). This will prevent the
overlay from being applied at runtime until the "dtoverlay" command
is improved, but the overlay already has this restriction due to
fragment 3 so this isn't a step backwards.

See: https://github.com/raspberrypi/linux/issues/3449

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agooverlays: dwc2: Increase RX FIFO size
Phil Elwell [Tue, 4 Feb 2020 13:03:21 +0000 (13:03 +0000)]
overlays: dwc2: Increase RX FIFO size

The previous version of the dwc2 overlay set the RX FIFO size to
256 4-byte words. This sounds large enough for a 1024 byte packet (the
largest isochronous high speed packet allowed), but it doesn't take
into account some extra space needed by the hardware.

Minas Harutyunyan at Synopsys (the source of the DWC OTG design)
came up with a more correct value, 301, but since there is spare packet
RAM this can be increased to 558 to allow two packets per frame.

Also update the upstream overlay to match.

See: https://github.com/raspberrypi/linux/issues/3447

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agoconfigs: Add NFS 4.2 support
Phil Elwell [Tue, 4 Feb 2020 12:42:27 +0000 (12:42 +0000)]
configs: Add NFS 4.2 support

See: https://github.com/raspberrypi/linux/issues/3397

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
4 years agooverlays: Add ssd1306-spi, ssh1106-spi, ssd-1351-spi
MikeDK [Fri, 31 Jan 2020 09:57:21 +0000 (10:57 +0100)]
overlays: Add ssd1306-spi, ssh1106-spi, ssd-1351-spi

Add overlays for SSD1306, SH1106 and SSD1351 based OLED displays.
SH1106 is present in many 1.3 inch OLEDs and SSD1351 is present in
1.5 inch RGB OLEDs from AliExpress.

This will load the staging fbtft drivers.

Signed-off-by: Michael Kaplan <m.kaplan@evva.com>
4 years agoARM: dts: Add sd_poll_once dtparam to bcm283x/2711
Phil Elwell [Thu, 30 Jan 2020 09:47:00 +0000 (09:47 +0000)]
ARM: dts: Add sd_poll_once dtparam to bcm283x/2711

The old sdtweak overlay allowed the SD interface to be effectively
disabled unless there was a card present at boot time, but that
overlay doesn't work on bcm2711 and has largely been replaced by
a set of sd_* dtparams (which have the advantage of being board-
specific.

Add an sd_poll_once dtparam to allow the same functionality on
all Raspberry Pi boards.

See: https://github.com/raspberrypi/linux/issues/3286

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoRevert "staging: vchiq_arm: Register a platform device for audio"
popcornmix [Thu, 30 Jan 2020 12:42:07 +0000 (12:42 +0000)]
Revert "staging: vchiq_arm: Register a platform device for audio"

This reverts commit 25c7597af20d2b1d042bafd9be84eaa69c1690b7.

4 years agooverlays: Correct the eth_led* colour assignments
Phil Elwell [Wed, 29 Jan 2020 14:32:51 +0000 (14:32 +0000)]
overlays: Correct the eth_led* colour assignments

See: https://github.com/raspberrypi/firmware/issues/1311

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agousb: xhci: Raspberry Pi FW loader for VIA VL805
Tim Gover [Wed, 15 Jan 2020 11:26:19 +0000 (11:26 +0000)]
usb: xhci: Raspberry Pi FW loader for VIA VL805

The VL805 FW may either be loaded from an SPI EEPROM or alternatively
loaded directly by the VideoCore firmware. A PCI reset will reset
the VL805 XHCI controller on the Raspberry Pi4 requiring the firmware
to be reloaded if an SPI EEPROM is not present.

Use a VideoCore mailbox to trigger the loading of the VL805
firmware (if necessary) after a PCI reset.

Signed-off-by: Tim Gover <tim.gover@raspberrypi.org>
4 years agotty: amba-pl011: Avoid rare write-when-full error
Phil Elwell [Wed, 29 Jan 2020 09:35:19 +0000 (09:35 +0000)]
tty: amba-pl011: Avoid rare write-when-full error

Under some circumstances on BCM283x processors data loss can be
observed - a single byte missing from the TX output stream. These bytes
are always the last byte of a batch of 8 written from pl011_tx_chars
when from_irq is true, meaning that the FIFO full flag is not checked
before writing.

The transmit optimisation relies on the FIFO being half-empty when the
TX interrupt is raised. Instrumenting the driver further showed that
the failure case correlated with the TX FIFO full flag being set at the
point where the last byte was written to the data register, which
explains the data loss but not how the FIFO appeared to be prematurely
full. A possible explanation is that a FIFO write was in flight at the
time the interrupt was raised, but as yet there is no hypothesis as to
how this might occur.

In the absence of a clear understanding of the failure mechanism, avoid
the problem by checking the FIFO levels before writing the last byte of
the group, which will have minimal performance impact.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoARM: dts: Remove bcm2838-rpi-4-b.dts
Phil Elwell [Wed, 29 Jan 2020 11:29:06 +0000 (11:29 +0000)]
ARM: dts: Remove bcm2838-rpi-4-b.dts

Upstream are not going to use the bcm2838 identifier, so begin the
cleanup by removing the suggested upstream Pi 4 .dts file.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agobcm2838.dtsi: Use BCM2711 PCIe compatible string
Phil Elwell [Fri, 12 Jul 2019 10:43:03 +0000 (11:43 +0100)]
bcm2838.dtsi: Use BCM2711 PCIe compatible string

The BCM2711 PCIe controller has a limited address range in the B0
silicon, and the driver uses a compatible string to identify the
limitation. The current Pi 4 firmware will override the compatible
string if it detects a downstream DTB and it is running on a newer
revision but set the default value to enable the workaround for
backwards-compatibility with old firmware.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agopcie-brcmstb: Bounce buffer support is for BCM2711B0
Phil Elwell [Fri, 12 Jul 2019 10:41:25 +0000 (11:41 +0100)]
pcie-brcmstb: Bounce buffer support is for BCM2711B0

Add a new compatible string to identify BCM2711B0, as later revisions
don't require the bounce buffer support.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoARM: dts: Declare RPi 4B SD card power regulator
Phil Elwell [Tue, 30 Jul 2019 11:37:02 +0000 (12:37 +0100)]
ARM: dts: Declare RPi 4B SD card power regulator

Later revisions of the Raspberry Pi 4B have a separate control over the
SD card power. Expose that control to Linux as a fixed regulator with
a GPIO enable.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agommc: sdhci-iproc: Fix vmmc regulators on iProc
Phil Elwell [Fri, 2 Aug 2019 14:20:11 +0000 (15:20 +0100)]
mmc: sdhci-iproc: Fix vmmc regulators on iProc

The Linux support for controlling card power via regulators appears to
be contentious. I would argue that the default behaviour is contrary to
the SDHCI spec - turning off the power writes a reserved value to the
SD Bus Voltage Select field of the Power Control Register, which
seems to kill the Arasan/iProc controller - but fortunately there is a
hook in sdhci_ops to override the behaviour. Borrow the implementation
from sdhci_arasan_set_power.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agopisound: Added reading Pisound board hardware revision and exposing it (#3425)
gtrainavicius [Tue, 28 Jan 2020 12:16:37 +0000 (14:16 +0200)]
pisound: Added reading Pisound board hardware revision and exposing it (#3425)

pisound: Added reading Pisound board hardware revision and exposing it in kernel log and sysfs file:

/sys/kernel/pisound/hw_version

Signed-off-by: Giedrius <giedrius@blokas.io>
4 years agoadds LED OFF feature to HiFiBerry DAC+/DAC+PRO sound cards
j-schambacher [Mon, 27 Jan 2020 19:58:24 +0000 (20:58 +0100)]
adds LED OFF feature to HiFiBerry DAC+/DAC+PRO sound cards

This adds a DT overlay parameter 'leds_off' which allows
to switch off the onboard activity LEDs at all times
which has been requested by some users.

Signed-off-by: Joerg Schambacher <joerg@i2audio.com>
4 years agoadds LED OFF feature to HiFiBerry DAC+ADC sound card
j-schambacher [Mon, 27 Jan 2020 19:37:34 +0000 (20:37 +0100)]
adds LED OFF feature to HiFiBerry DAC+ADC sound card

This adds a DT overlay parameter 'leds_off' which allows
to switch off the onboard activity LEDs at all times
which has been requested by some users.

Signed-off-by: Joerg Schambacher <joerg@i2audio.com>
4 years agoadds LED OFF feature to HiFiBerry DAC+ADC PRO sound card
j-schambacher [Mon, 27 Jan 2020 16:45:51 +0000 (17:45 +0100)]
adds LED OFF feature to HiFiBerry DAC+ADC PRO sound card

This adds a DT overlay parameter 'leds_off' which allows
to switch off the onboard activity LEDs at all times
which has been requested by some users.

Signed-off-by: Joerg Schambacher <joerg@i2audio.com>
4 years agoFix i2c-pwm-pca9685a overlay
MikeDK [Sun, 26 Jan 2020 22:33:54 +0000 (23:33 +0100)]
Fix i2c-pwm-pca9685a overlay

4 years agotty: amba-pl011: Add un/throttle support
Phil Elwell [Fri, 24 Jan 2020 11:38:28 +0000 (11:38 +0000)]
tty: amba-pl011: Add un/throttle support

The PL011 driver lacks throttle and unthrottle methods. As a result,
sending more data to the Pi than it can immediately sink while CRTSCTS
is enabled causes a NULL pointer to be followed.

Add a throttle handler that disables the RX interrupts, and an
unthrottle handler that reenables them.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agooverlays: Use preferred compatible strings
Phil Elwell [Fri, 24 Jan 2020 09:02:37 +0000 (09:02 +0000)]
overlays: Use preferred compatible strings

Make sure all overlays have correct compatible strings before enabling
the automated checking.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoFix master mode settings of HiFiBerry DAC+ADC PRO card (#3424)
Jörg Schambacher [Thu, 23 Jan 2020 12:32:13 +0000 (13:32 +0100)]
Fix master mode settings of HiFiBerry DAC+ADC PRO card (#3424)

This patch fixes the board DAI setting when in master-mode.
Wrong setting could have caused random pop noise.

Signed-off-by: Joerg Schambacher <joerg@i2audio.com>
4 years agoInitialise rpi-firmware before clk-bcm2835
Luke Hinds [Wed, 22 Jan 2020 16:03:00 +0000 (16:03 +0000)]
Initialise rpi-firmware before clk-bcm2835

The IMA (Integrity Measurement Architecture) looks for a TPM (Trusted
Platform Module) having been registered when it initialises; otherwise
it assumes there is no TPM. It has been observed on BCM2835 that IMA
is initialised before TPM, and that initialising the BCM2835 clock
driver before the firmware driver has the effect of reversing this
order.

Change the firmware driver to initialise at core_initcall, delaying the
BCM2835 clock driver to postcore_initcall.

See: https://github.com/raspberrypi/linux/issues/3291
     https://github.com/raspberrypi/linux/pull/3297

Signed-off-by: Luke Hinds <lhinds@redhat.com>
Co-authored-by: Phil Elwell <phil@raspberrypi.org>
4 years agoconfigs: Add missing HIFIBERRYs to bcmrpi3_defconfig
Phil Elwell [Tue, 21 Jan 2020 15:02:05 +0000 (15:02 +0000)]
configs: Add missing HIFIBERRYs to bcmrpi3_defconfig

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agosound: Add the HiFiBerry DAC+HD version
Jörg Schambacher [Tue, 21 Jan 2020 14:58:39 +0000 (15:58 +0100)]
sound: Add the HiFiBerry DAC+HD version

This adds the driver for the DAC+HD version supporting HiFiBerry's
PCM179x based DACs. It also adds PLL control for clock generation.

Signed-off-by: Joerg Schambacher <joerg@i2audio.com>
4 years agoAdd universal device tree overlay for SPI devices
Ed Spiridonov [Tue, 10 Dec 2019 19:45:04 +0000 (22:45 +0300)]
Add universal device tree overlay for SPI devices

Just specify the SPI address and device name ("compatible" property).
This overlay lacks any device-specific parameter support!
(some of them could be added later)

Examples:
1. SPI NOR flash on spi0.1, maximum SPI clock frequency 45MHz:
    dtoverlay=anyspi:spi0-1,dev="jedec,spi-nor",speed=45000000
2. MCP3204 ADC on spi1.2, maximum SPI clock frequency 500kHz:
    dtoverlay=anyspi:spi1-2,dev="microchip,mcp3204"

Signed-off-by: Ed Spiridonov <edo.rus@gmail.com>
4 years agodwc_otg: fiq_fsm: add a barrier on entry into FIQ handler(s)
Jonathan Bell [Mon, 13 Jan 2020 15:54:55 +0000 (15:54 +0000)]
dwc_otg: fiq_fsm: add a barrier on entry into FIQ handler(s)

On BCM2835, there is no hardware guarantee that multiple outstanding
reads to different peripherals will complete in-order. The FIQ code
uses peripheral reads without barriers for performance, so in the case
where a read to a slow peripheral was issued immediately prior to FIQ
entry, the first peripheral read that the FIQ did could end up with
wrong read data returned.

Add dsb(sy) on entry so that all outstanding reads are retired.

The FIQ only issues reads to the dwc_otg core, so per-read barriers
in the handler itself are not required.

On BCM2836 and BCM2837 the barrier is not strictly required due to
differences in how the peripheral bus is implemented, but having
arch-specific handlers that introduce different latencies is risky.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
4 years agodwc_otg: fiq_fsm: pause when cancelling split transactions
Jonathan Bell [Wed, 8 Jan 2020 12:48:09 +0000 (12:48 +0000)]
dwc_otg: fiq_fsm: pause when cancelling split transactions

Non-periodic splits will DMA to/from the driver-provided transfer_buffer,
which may be freed immediately after the dequeue call returns. Block until
we know the transfer is complete.

A similar delay is needed when cleaning up disconnects, as the FIQ could
have started a periodic transfer in the previous microframe to the one
that triggered a disconnect.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
4 years agodwc_otg: constrain endpoint max packet and transfer size on split IN
Jonathan Bell [Tue, 7 Jan 2020 10:08:19 +0000 (10:08 +0000)]
dwc_otg: constrain endpoint max packet and transfer size on split IN

The hcd would unconditionally set the transfer length to the endpoint
packet size for non-isoc IN transfers. If the remaining buffer length
was less than the length of returned data, random memory would get
scribbled over, with bad effects if it crossed a page boundary.

Force a babble error if this happens by limiting the max transfer size
to the available buffer space. DMA will stop writing to memory on a
babble condition.

The hardware expects xfersize to be an integer multiple of maxpacket
size, so override hcchar.b.mps as well.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
4 years agoconfigs: Add BME680
Willem Remie [Thu, 9 Jan 2020 20:54:11 +0000 (21:54 +0100)]
configs: Add BME680

4 years agoadd BME680 to i2c-sensor overlay
Willem Remie [Thu, 9 Jan 2020 20:16:49 +0000 (21:16 +0100)]
add BME680 to i2c-sensor overlay

4 years agodriver: char: rpivid: Fix access to freed memory
Dave Stevenson [Tue, 21 Jan 2020 16:44:14 +0000 (16:44 +0000)]
driver: char: rpivid: Fix access to freed memory

The error path during probe frees the private memory block, and
then promptly dereferences it to log an error message.

Use the base device instead of the pointer to it in the private
structure.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
4 years agodriver: char: rpimem: Add SPDX licence header.
Dave Stevenson [Wed, 15 Jan 2020 14:07:16 +0000 (14:07 +0000)]
driver: char: rpimem: Add SPDX licence header.

Stops checkpatch complaining.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
4 years agodriver: char: rpivid: Fix coding style whitespace issues.
Dave Stevenson [Wed, 15 Jan 2020 14:05:45 +0000 (14:05 +0000)]
driver: char: rpivid: Fix coding style whitespace issues.

Makes checkpatch happier.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
4 years agodriver: char: rpivid: Add error handling to the legacy device load
Dave Stevenson [Wed, 15 Jan 2020 14:02:43 +0000 (14:02 +0000)]
driver: char: rpivid: Add error handling to the legacy device load

The return value from device_create for the legacy device was never
checked or handled. Add the required error handling.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
4 years agodriver: char: rpivid: Clean up error handling use of ERR_PTR/IS_ERR
Dave Stevenson [Tue, 21 Jan 2020 16:24:45 +0000 (16:24 +0000)]
driver: char: rpivid: Clean up error handling use of ERR_PTR/IS_ERR

The driver used an unnecessary intermediate void* variable so it
only called ERR_PTR once to convert to the error value.

Switch to converting as the error arises to remove these intermediate
variables.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
4 years agodriver: char: rpivid: Destroy the legacy device on remove
Dave Stevenson [Wed, 15 Jan 2020 13:59:57 +0000 (13:59 +0000)]
driver: char: rpivid: Destroy the legacy device on remove

The legacy name support created a new device that was never destroyed.
If the driver was unloaded and reloaded, it failed due to the
device already existing.

Fixes: "75f1d14 driver: char: rpivid - also support legacy name"
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
4 years agoARM: dts: bcm2838: Add upstream RNG compatible
Stefan Wahren [Fri, 27 Dec 2019 11:01:17 +0000 (12:01 +0100)]
ARM: dts: bcm2838: Add upstream RNG compatible

This adds the ability to use the RNG with an upstream kernel.
Keep the old one for backward compatibility.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agohwrng: iproc-rng200 - Add support for BCM2711
Stefan Wahren [Fri, 27 Dec 2019 10:55:59 +0000 (11:55 +0100)]
hwrng: iproc-rng200 - Add support for BCM2711

commit 0f95b09a5f624964d520c8f6a2674090fb98ae25 upstream.

BCM2711 features a RNG200 hardware random number generator block.
So make the driver available.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Stephen Brennan <stephen@brennan.io>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
4 years agoARM: bcm: Backport BCM2711 support from upstream
Stefan Wahren [Fri, 27 Dec 2019 10:40:56 +0000 (11:40 +0100)]
ARM: bcm: Backport BCM2711 support from upstream

Make the BCM2711 a different machine, but keep it in board_bcm2835.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoARM: dts: bcm2838: Backport genet from upstream
Stefan Wahren [Wed, 25 Dec 2019 15:40:47 +0000 (16:40 +0100)]
ARM: dts: bcm2838: Backport genet from upstream

This backport all genet differences (different compatible, right PHY mode,
board specific stuff) from upstream.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agonet: bcmgenet: Add RGMII_RXID support
Stefan Wahren [Wed, 25 Dec 2019 15:35:54 +0000 (16:35 +0100)]
net: bcmgenet: Add RGMII_RXID support

This adds the missing support for the PHY mode RGMII_RXID.
It's necessary for the Raspberry Pi 4.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoRevert "phy: broadcom: split out the BCM54213PE from the BCM54210E IDs"
Stefan Wahren [Fri, 27 Dec 2019 12:48:32 +0000 (13:48 +0100)]
Revert "phy: broadcom: split out the BCM54213PE from the BCM54210E IDs"

This reverts commit a377688aa4f69ebfe75c9dfc986e7d19605eb39f.

4 years agoRevert "phy: bcm54213pe: configure the LED outputs to be more user-friendly"
Stefan Wahren [Fri, 27 Dec 2019 12:48:08 +0000 (13:48 +0100)]
Revert "phy: bcm54213pe: configure the LED outputs to be more user-friendly"

This reverts commit 0f6693225eee62ee01c479c86fff76442979f906.

4 years agoARM: dts: bcm2838: Remove always-on from armv7-timer
Stefan Wahren [Wed, 25 Dec 2019 17:19:28 +0000 (18:19 +0100)]
ARM: dts: bcm2838: Remove always-on from armv7-timer

After moving bcm2835-system-timer to bcm283x.dtsi there is no need for
the always-on for armv7-timer anymore.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoARM: dts: bcm283x: Move intc label to bcm2835-common.dtsi
Stefan Wahren [Wed, 25 Dec 2019 17:01:57 +0000 (18:01 +0100)]
ARM: dts: bcm283x: Move intc label to bcm2835-common.dtsi

The intc label isn't defined in bcm283x.dtsi, so we cannot use it there.
So move it to bcm2835-common.dtsi.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoARM: dts: bcm2838: Backport node names from upstream
Stefan Wahren [Wed, 25 Dec 2019 14:55:29 +0000 (15:55 +0100)]
ARM: dts: bcm2838: Backport node names from upstream

According to devicetree specification the node name should describe
the general class of device like ethernet or interrupt-controller.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoARM: dts: bcm2838-rpi-4-b: Backport BT part from upstream
Stefan Wahren [Wed, 25 Dec 2019 14:43:41 +0000 (15:43 +0100)]
ARM: dts: bcm2838-rpi-4-b: Backport BT part from upstream

The CYW43455 on the Raspberry Pi 4 doesn't use an external pin as lower
power clock anymore. So drop the GPIO clock from pinctrl. While we are at
this add the missing declaration of hardware flow control.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoARM: dts: bcm2838-rpi-4-b: Fix memory node
Stefan Wahren [Wed, 25 Dec 2019 14:32:29 +0000 (15:32 +0100)]
ARM: dts: bcm2838-rpi-4-b: Fix memory node

We need to declare the proper device type, otherwise U-Boot won't boot
with this devicetree. While we are this let the bootloader set the actual
memory size.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoARM: dts: bcm283x: Move pixelvalve to bcm2835-common.dtsi
Stefan Wahren [Fri, 27 Dec 2019 15:06:13 +0000 (16:06 +0100)]
ARM: dts: bcm283x: Move pixelvalve to bcm2835-common.dtsi

According to Eric Anholt the pixelvalves doesn't exists on BCM2711.
So move it to bcm2835-common.dtsi.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoARM: dts: bcm283x: Move system timer back to bcm283x.dtsi
Stefan Wahren [Fri, 27 Dec 2019 10:15:00 +0000 (11:15 +0100)]
ARM: dts: bcm283x: Move system timer back to bcm283x.dtsi

During Raspberry Pi 4 upstream discussion Tim Gover confirmed that the
system timer also exists on BCM2711. So move it back to bcm283x.dtsi and
overwrite the interrupt definition in bcm2838.dtsi.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoARM: dts: bcm283x: Remove simple-bus from fixed clocks
Stefan Wahren [Fri, 16 Aug 2019 20:32:02 +0000 (22:32 +0200)]
ARM: dts: bcm283x: Remove simple-bus from fixed clocks

commit 4b2d24662126b1e2a6b95c9dfe9e9044e105e5bd upstream.

The fixed clocks doesn't form some kind of bus. So let's remove it.
This fixes the follow DT schema warnings:

clocks: clock@3:reg:0: [3] is too short
clocks: clock@4:reg:0: [4] is too short
clocks: $nodename:0: 'clocks' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'
clocks: #size-cells:0:0: 0 is not one of [1, 2]
clocks: 'ranges' is a required property
clock@3: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+'
clock@4: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agoRevert "mmc: sdhci: Mask "spurious" interrupts"
Stefan Wahren [Sun, 8 Dec 2019 13:45:14 +0000 (14:45 +0100)]
Revert "mmc: sdhci: Mask "spurious" interrupts"

This reverts commit adac895210b88770190e9a501462f2100ab40ac8, because this
issue is already addressed by commit 19ec6bb80290e496021488084944b77f03a87dd7.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
4 years agobrcmfmac: Disable power management
Phil Elwell [Thu, 9 Jan 2020 14:15:39 +0000 (14:15 +0000)]
brcmfmac: Disable power management

Disable power management in the brcmfmac driver again as it is still
causing problems for some users.

4 years agopcie-brcmstb: Eliminate arch_dma_ops error message
Phil Elwell [Wed, 8 Jan 2020 17:21:09 +0000 (17:21 +0000)]
pcie-brcmstb: Eliminate arch_dma_ops error message

The driver attempts to set the dma_ops for the root complex, but doing
so causes an error message and only the end points need it. Fix the
error by making the code specific to the end point case.

Also copy some cosmetic tidy-ups from 5.5.y.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoPisound: MIDI communication fixes for scaled down CPU.
Giedrius [Tue, 7 Jan 2020 09:04:21 +0000 (11:04 +0200)]
Pisound: MIDI communication fixes for scaled down CPU.

* Increased maximum SPI communication speed to avoid running too slow
  when the CPU is scaled down and losing MIDI data.

* Keep track of buffer usage in millibytes for higher precision.

Signed-off-by: Giedrius Trainavičius <giedrius@blokas.io>
4 years agopinctrl: bcm2835: Change init order for gpio hogs
Phil Elwell [Mon, 6 Jan 2020 14:05:42 +0000 (14:05 +0000)]
pinctrl: bcm2835: Change init order for gpio hogs

pinctrl-bcm2835 is a combined pinctrl/gpio driver. Currently the gpio
side is registered first, but this breaks gpio hogs (which are
configured during gpiochip_add_data). Part of the hog initialisation
is a call to pinctrl_gpio_request, and since the pinctrl driver hasn't
yet been registered this results in an -EPROBE_DEFER from which it can
never recover.

Change the initialisation sequence to register the pinctrl driver
first.

See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=260600

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agopinctrl: bcm2835: Remove gpiochip on error
Phil Elwell [Mon, 6 Jan 2020 16:04:30 +0000 (16:04 +0000)]
pinctrl: bcm2835: Remove gpiochip on error

A failure in gpiochip_irqchip_add leads to a leak of a gpiochip. Fix
the leak with the use of devm_gpiochip_add_data.

Fixes: 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP")
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agooverlays: i2c-rtc: Add pcf85363 support
Phil Elwell [Sun, 22 Dec 2019 15:29:40 +0000 (15:29 +0000)]
overlays: i2c-rtc: Add pcf85363 support

See: https://github.com/raspberrypi/firmware/issues/1309

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoconfigs: Add RTS_DRV_PCF85363
Phil Elwell [Sun, 22 Dec 2019 15:13:37 +0000 (15:13 +0000)]
configs: Add RTS_DRV_PCF85363

See: https://github.com/raspberrypi/firmware/issues/1309

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoconfigs: Add CONFIG_NET_SCH_CAKE=m
Phil Elwell [Fri, 20 Dec 2019 15:50:19 +0000 (15:50 +0000)]
configs: Add CONFIG_NET_SCH_CAKE=m

See: https://github.com/raspberrypi/linux/issues/3180

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agooverlays: dht11: Allow multiple instantiation
Phil Elwell [Wed, 18 Dec 2019 10:41:33 +0000 (10:41 +0000)]
overlays: dht11: Allow multiple instantiation

Add addresses to the dht11 and dht11_pins nodes to allow unique names
to be generated by assigning to the "reg" property.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoAllow simultaneous use of JustBoom DAC and Digi
Johannes Krude [Sat, 16 Nov 2019 12:14:43 +0000 (13:14 +0100)]
Allow simultaneous use of JustBoom DAC and Digi

Signed-off-by: Johannes Krude <johannes@krude.de>
4 years agosound/soc: only first codec is master in multicodec setup
Johannes Krude [Sat, 16 Nov 2019 11:41:06 +0000 (12:41 +0100)]
sound/soc: only first codec is master in multicodec setup

When using multiple codecs, at most one codec should generate the master
clock. All codecs except the first are therefore configured for slave
mode.

Signed-off-by: Johannes Krude <johannes@krude.de>
4 years agorpi-cirrus-wm5102-overlay: use reset-gpios instead of wlf,reset
Matthias Reichl [Mon, 16 Dec 2019 22:25:44 +0000 (23:25 +0100)]
rpi-cirrus-wm5102-overlay: use reset-gpios instead of wlf,reset

wlf,reset has been deprecated in favour of the standard reset-gpios
DT property in commit fced2963d84b44990f4aa99ed7268223c294c0df so
let's use that instead of the old property.

Signed-off-by: Matthias Reichl <hias@horus.com>
4 years agoconfig: arm64: Switch to upstream cpufreq driver
popcornmix [Fri, 29 Nov 2019 16:37:26 +0000 (16:37 +0000)]
config: arm64: Switch to upstream cpufreq driver

Signed-off-by: popcornmix <popcornmix@gmail.com>
4 years agooverlays: Make mcp342x run-time compatible
Phil Elwell [Mon, 9 Dec 2019 12:32:20 +0000 (12:32 +0000)]
overlays: Make mcp342x run-time compatible

The order of processing of run-time overlays differs from that done by
the firmware. This means that certain parameter processing techniques
are not compatible with run-time use.  The mcp342x overlay is one such
overlay, but it is easy to change the implementation without changing
the interface.

See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=258294

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agodwc_otg: checking the urb->transfer_buffer too early (#3332)
Hui Wang [Sun, 17 Nov 2019 02:31:46 +0000 (10:31 +0800)]
dwc_otg: checking the urb->transfer_buffer too early (#3332)

After enable the HIGHMEM and VMSPLIT_3G, the dwc_otg driver doesn't
work well on Pi2/3 boards with 1G physical ram. Users experience
the failure when copying a file of 600M size to the USB stick. And
at the same time, the dmesg shows:
usb 1-1.1.2: reset high-speed USB device number 8 using dwc_otg
sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
blk_update_request: I/O error, dev sda, sector 3024048 op 0x1:(WRITE) flags 0x4000 phys_seg 15 prio class 0

When this happens, the sg_buf sent to the driver is located in the
highmem region, the usb_sg_init() in the core/message.c will leave
transfer_buffer to NULL if the sg_buf is in highmem, but in the
dwc_otg driver, it returns -EINVAL unconditionally if transfer_buffer
is NULL.

The driver can handle the situation of buffer to be NULL, if it is in
DMA mode, it will convert an address from transfer_dma.

But if the conversion fails or it is in the PIO mode, we should check
buffer and return -EINVAL if it is NULL.

BugLink: https://bugs.launchpad.net/bugs/1852510
Signed-off-by: Hui Wang <hui.wang@canonical.com>
4 years agoRevert "staging: bcm2835_camera: Ensure all buffers are returned on disable"
Dave Stevenson [Thu, 5 Dec 2019 16:34:39 +0000 (16:34 +0000)]
Revert "staging: bcm2835_camera: Ensure all buffers are returned on disable"

This reverts commit d70c57a7c6a069977a0d827e1d5e2de53fb87e6d.

The patch has mutated beyond recognition and created merge errors
against 37c35be "staging: mmal-vchiq: Add support for event callbacks."

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
4 years agostaging: vchiq: Use the old dma controller for OF config on platform devices
Dave Stevenson [Tue, 18 Jun 2019 11:15:50 +0000 (12:15 +0100)]
staging: vchiq: Use the old dma controller for OF config on platform devices

vchiq on Pi4 is no longer under the soc node, therefore it
doesn't get the dma-ranges for the VPU.

Switch to using the configuration of the old dma controller as
that will set the dma-ranges correctly.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
4 years agostaging: vchiq_arm: Set up dma ranges on child devices
Dave Stevenson [Tue, 29 Jan 2019 16:13:25 +0000 (16:13 +0000)]
staging: vchiq_arm: Set up dma ranges on child devices

The VCHIQ driver now loads the audio, camera, codec, and vc-sm
drivers as platform drivers. However they were not being given
the correct DMA configuration.

Call of_dma_configure with the parent (VCHIQ) parameters to be
inherited by the child.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
4 years agorpi-cirrus-wm5102-overlay: fix pinctrl configuration
Matthias Reichl [Sat, 30 Nov 2019 22:10:26 +0000 (23:10 +0100)]
rpi-cirrus-wm5102-overlay: fix pinctrl configuration

Separate GPIOs connected to wm5102 and wm8804 into 2 pinctrl
blocks and properly reference them from the DT nodes to have
correct pinmux owners.

Setup spi0 to use only one CS line on GPIO7 so that GPIO8 is
no longer claimed by spi0 but can be used by wm8804.

Signed-off-by: Matthias Reichl <hias@horus.com>
4 years agoRevert "drm/vc4: Add support for H & V flips"
Dave Stevenson [Thu, 28 Nov 2019 15:51:58 +0000 (15:51 +0000)]
Revert "drm/vc4: Add support for H & V flips"

This reverts commit 3293cb5284bf7c80217cba8e7c3f67fba1953e1d.
This functionality has already been added via
"7cd3cf3 drm/vc4: Add support for X/Y reflection"
Calling drm_plane_create_rotation_property corrupts the
plane properties list.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
4 years agoarm/dts: 2711: Add 'pcie0' alias
Phil Elwell [Thu, 28 Nov 2019 15:49:08 +0000 (15:49 +0000)]
arm/dts: 2711: Add 'pcie0' alias

It is useful for the firmware to be able to locate the pcie DT node,
so add an alias pointing to it in the same way that "ethernet0"
points to the genet.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agodrm/v3d: Set dma_mask as well as coherent_dma_mask
Phil Elwell [Fri, 22 Nov 2019 16:23:32 +0000 (16:23 +0000)]
drm/v3d: Set dma_mask as well as coherent_dma_mask

Both coherent_dma_mask and dma_mask act as constraints on allocations
and bounce buffer usage, so be sure to set dma_mask to the appropriate
value otherwise the effective mask could be incorrect.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoarm/dts: Correct Pi 4B LED values
Phil Elwell [Fri, 22 Nov 2019 15:08:25 +0000 (15:08 +0000)]
arm/dts: Correct Pi 4B LED values

The initial PHY LED settings are wrong Pi 4B (the correct values got
dropped somewhere along the way). The PHY declaration should arguably
go in a separate file included by bcm2711-rpi-4-b.dts, but we can
fix that as we switch over to using more of the upstream BCM2711
support in 5.4 and later.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
4 years agoconfigs:2711: Add V3D clock support on arm64
Phil Elwell [Fri, 22 Nov 2019 11:44:30 +0000 (11:44 +0000)]
configs:2711: Add V3D clock support on arm64

The V3D driver now depends on the CLK_RASPBERRYPI and
ARM_RASPBERRYPI_CPUFREQ drivers for dynamic clock control. Without
them the driver fails to load and the system reverts to software
rendering.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>