platform/kernel/linux-rpi.git
5 years agoarm: dts: Change downstream vchiq compatible string
Phil Elwell [Wed, 6 Feb 2019 20:45:16 +0000 (20:45 +0000)]
arm: dts: Change downstream vchiq compatible string

The new cache line size mechanism requires a different vchiq compatible
string on BCM2836 and BCM2837, but the downstream dts files didn't
inherit the upstream changes.

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

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoARM: dts: bcm283x: Correct vchiq compatible string (#2840)
6by9 [Wed, 30 Jan 2019 14:22:03 +0000 (14:22 +0000)]
ARM: dts: bcm283x: Correct vchiq compatible string (#2840)

commit 499770ede3f829e80539f46b59b5f460dc327aa6 upstream.

To allow VCHIQ to determine the correct cache line size, use the new
"brcm,bcm2836-vchiq" compatible string on BCM2836 and BCM2837.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
5 years agobcm2711_defconfig: add xhci platform support
Jonathan Bell [Mon, 3 Jun 2019 14:33:02 +0000 (15:33 +0100)]
bcm2711_defconfig: add xhci platform support

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
5 years agoconfig: Add NF_TABLES support
popcornmix [Mon, 3 Jun 2019 13:57:56 +0000 (14:57 +0100)]
config: Add NF_TABLES support

5 years ago2711: Add basic 64-bit support
Phil Elwell [Fri, 8 Mar 2019 21:12:39 +0000 (21:12 +0000)]
2711: Add basic 64-bit support

This commit adds initial support for 64-bit 2711 builds. However,
it will only work as much as it does if the Pi4 RAM is limited to
1GB - more than that and several things break (SD card, coherent
allocations, etc.)

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoconfigs: Add bcm2711_defconfig
Phil Elwell [Wed, 29 May 2019 14:40:21 +0000 (15:40 +0100)]
configs: Add bcm2711_defconfig

5 years agoconfig: Permit LPAE and PCIE_BRCMSTB on BCM2835
Phil Elwell [Tue, 4 Sep 2018 10:50:25 +0000 (11:50 +0100)]
config: Permit LPAE and PCIE_BRCMSTB on BCM2835

5 years agooverlays: Add the spi-gpio40-45 overlay
Tim Gover [Tue, 22 Jan 2019 10:49:41 +0000 (10:49 +0000)]
overlays: Add the spi-gpio40-45 overlay

The 2711 B0 boot EEPROM is programmed via SPI0 on GPIO
pins 40-43 CS0. Add a device tree overlay to optionally
change the SPI0 pinmux from the external GPIO pins to
the boot EEPROM pins.

5 years agospi: devicetree: add overlays for spi 3 to 6
Martin Sperl [Sun, 12 May 2019 16:17:08 +0000 (16:17 +0000)]
spi: devicetree: add overlays for spi 3 to 6

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
5 years agooverlays: Add i2c3-6 and uart2-5 overlays
Phil Elwell [Thu, 30 May 2019 15:44:24 +0000 (16:44 +0100)]
overlays: Add i2c3-6 and uart2-5 overlays

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoARM: dts: Add bcm2711-rpi-4-b.dts and components
Phil Elwell [Wed, 29 May 2019 12:54:21 +0000 (13:54 +0100)]
ARM: dts: Add bcm2711-rpi-4-b.dts and components

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agoARM: dts: bcm283x: Move BCM2835/6/7 specific to bcm2835-common.dtsi
Stefan Wahren [Sun, 19 May 2019 10:26:21 +0000 (12:26 +0200)]
ARM: dts: bcm283x: Move BCM2835/6/7 specific to bcm2835-common.dtsi

We want all common BCM2835/6/7/8 functions in bcm283x.dtsi and all
BCM2835/6/7 specific in the new bcm2835-common.dtsi.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
5 years agoPulled in the multi frame buffer support from the Pi3 repo
James Hughes [Thu, 14 Mar 2019 13:27:54 +0000 (13:27 +0000)]
Pulled in the multi frame buffer support from the Pi3 repo

5 years agostaging: vcsm-cma: Fixup the alloc code handling of kernel_id
Dave Stevenson [Wed, 22 May 2019 14:40:37 +0000 (15:40 +0100)]
staging: vcsm-cma: Fixup the alloc code handling of kernel_id

The allocation code had been copied in from an old branch prior
to having added the IDR for 64bit support. It was therefore pushing
a pointer into the kernel_id field instead of an IDR handle, the
lookup therefore failed, and we never released the buffer.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vcsm-cma: Drop logging level on messages in vc_sm_release_resource
Dave Stevenson [Thu, 16 May 2019 14:17:19 +0000 (15:17 +0100)]
staging: vcsm-cma: Drop logging level on messages in vc_sm_release_resource

They weren't errors but were logged as such.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vcsm-cma: Alter dev node permissions to 0666
Dave Stevenson [Mon, 13 May 2019 15:47:54 +0000 (16:47 +0100)]
staging: vcsm-cma: Alter dev node permissions to 0666

Until the udev rules are updated, open up access to this node by
default.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vcsm-cma: Add cache control ioctls
Dave Stevenson [Wed, 20 Mar 2019 10:40:00 +0000 (10:40 +0000)]
staging: vcsm-cma: Add cache control ioctls

The old driver allowed for direct cache manipulation and that
was used by various clients. Replicate here.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc-sm-cma: Add in userspace allocation API
Dave Stevenson [Mon, 11 Mar 2019 16:35:23 +0000 (16:35 +0000)]
staging: vc-sm-cma: Add in userspace allocation API

Replacing the functionality from the older vc-sm driver,
add in a userspace API that allows allocation of buffers,
and importing of dma-bufs.
The driver hands out dma-buf fds, therefore much of the
handling around lifespan and odd mmaps from the old driver
goes away.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc-sm-cma: Update TODO.
Dave Stevenson [Mon, 11 Mar 2019 16:38:32 +0000 (16:38 +0000)]
staging: vc-sm-cma: Update TODO.

The driver is already a platform driver, so that can be
deleted from the TODO.
There are no known issues that need to be resolved.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc-sm-cma: Add in allocation for VPU requests.
Dave Stevenson [Fri, 21 Dec 2018 16:50:53 +0000 (16:50 +0000)]
staging: vc-sm-cma: Add in allocation for VPU requests.

Module has to change from tristate to bool as all CMA functions
are boolean.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agostaging: vc-sm-cma: Remove obsolete comment and make function static
Dave Stevenson [Mon, 10 Dec 2018 17:35:58 +0000 (17:35 +0000)]
staging: vc-sm-cma: Remove obsolete comment and make function static

Removes obsolete comment about wanting to pass a function
pointer into mmal-vchiq as we now do.
As the function is passed as a function pointer, the function itself
can be static.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm/vc4: Max resolution of 7680 is conditional on being Pi4
Dave Stevenson [Thu, 30 May 2019 14:55:15 +0000 (15:55 +0100)]
drm/vc4: Max resolution of 7680 is conditional on being Pi4

The max resolution had been increased from 2048 to 7680 for all
platforms. This code is common with Pi0-3 which have a max render
target for GL of 2048, therefore the increased resolution has to
be conditional on the platform.
Switch based on whether the bcm2835-v3d node is found, as that is
not present on Pi4. (There is a potential configuration on Pi0-3
with no v3d, but this is very unlikely).

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm/vc4: fkms to query the VPU for HDMI clock limits
Dave Stevenson [Thu, 30 May 2019 12:56:15 +0000 (13:56 +0100)]
drm/vc4: fkms to query the VPU for HDMI clock limits

The VPU has configured clocks for 4k (or not) via config.txt,
and will limit the choice of video modes based on that.
Make fkms query it for these limits too to avoid selecting modes
that can not be handled by the current clock setup.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm/vc4: Correct SAND support for FKMS.
Dave Stevenson [Wed, 29 May 2019 14:44:11 +0000 (15:44 +0100)]
drm/vc4: Correct SAND support for FKMS.

It was accepting NV21 which doesn't map through, but
also wasn't advertising the modifier so nothing would know
to request it.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Fixup typo when setting HDMI aspect ratio
Dave Stevenson [Tue, 7 May 2019 14:00:02 +0000 (15:00 +0100)]
drm: vc4: Fixup typo when setting HDMI aspect ratio

Assignment was to the wrong structure.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm/vc4: Support the VEC in FKMS
Dave Stevenson [Fri, 24 May 2019 16:59:01 +0000 (17:59 +0100)]
drm/vc4: Support the VEC in FKMS

Extends the DPI/DSI support to also report the VEC output
which supports interlacing too.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: handle the case where there are no available displays
Jonathan Bell [Tue, 28 May 2019 12:56:06 +0000 (13:56 +0100)]
drm: vc4: handle the case where there are no available displays

It's reasonable for the firmware to return zero as the number of
attached displays. Handle this case as otherwise drm thinks that
the DSI panel is attached, which is nonsense.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
5 years agodrm: vc4: Probe DPI/DSI timings from the firmware
Dave Stevenson [Tue, 21 May 2019 10:50:00 +0000 (11:50 +0100)]
drm: vc4: Probe DPI/DSI timings from the firmware

For DPI and DSI displays query the firmware as to the configuration
and add it as the only mode for DRM.

In theory we can add plumbing for setting the DPI/DSI mode from
KMS, but this is not being added at present as the support frameworks
aren't present in the firmware.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4-firmware-kms: Fix DSI display support
Dave Stevenson [Thu, 16 May 2019 16:49:42 +0000 (17:49 +0100)]
drm: vc4-firmware-kms: Fix DSI display support

The mode was incorrectly listed as interlaced, which was then
rejected.
Correct this and FKMS works with the DSI display.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Log flags in fkms mode set
Dave Stevenson [Tue, 7 May 2019 11:13:34 +0000 (12:13 +0100)]
drm: vc4: Log flags in fkms mode set

The flags contain info such as limited/full range RGB, aspect
ratio, and a fwe other useful things.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4-firmware-kms: Remove incorrect overscan support.
Dave Stevenson [Fri, 3 May 2019 12:58:03 +0000 (13:58 +0100)]
drm: vc4-firmware-kms: Remove incorrect overscan support.

The overscan support was required for the old mailbox API
in order to match up the cursor and frame buffer planes.
With the newer API directly talking to dispmanx there is no
difference, therefore FKMS does not need to make any
adjustments.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agoHACK: clk-bcm2835: Add BCM2838_CLOCK_EMMC2 support
Stefan Wahren [Thu, 2 May 2019 21:42:29 +0000 (23:42 +0200)]
HACK: clk-bcm2835: Add BCM2838_CLOCK_EMMC2 support

The new BCM2838 supports an additional emmc2 clock. So add a new
compatible to register this clock only for BCM2838.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
5 years agodrm/v3d: Clock V3D down when not in use.
Eric Anholt [Thu, 2 May 2019 20:22:53 +0000 (13:22 -0700)]
drm/v3d: Clock V3D down when not in use.

My various attempts at re-enabling runtime PM have failed, so just
crank the clock down when V3D is idle to reduce power consumption.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Add support for compute shader dispatch.
Eric Anholt [Tue, 16 Apr 2019 22:58:54 +0000 (15:58 -0700)]
drm/v3d: Add support for compute shader dispatch.

The compute shader dispatch interface is pretty simple -- just pass in
the regs that userspace has passed us, with no CLs to run.  However,
with no CL to run it means that we need to do manual cache flushing of
the L2 after the HW execution completes (for SSBO, atomic, and
image_load_store writes that are the output of compute shaders).

This doesn't yet expose the L2 cache's ability to have a region of the
address space not write back to memory (which could be used for
shared_var storage).

So far, the Mesa side has been tested on V3D v4.2 simpenrose (passing
the ES31 tests), and on the kernel side on 7278 (failing atomic
compswap tests in a way that doesn't reproduce on simpenrose).

v2: Fix excessive allocation for the clean_job (reported by Dan
    Carpenter).  Keep refs on jobs until clean_job is finished, to
    avoid spurious MMU errors if the output BOs are freed by userspace
    before L2 cleaning is finished.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190416225856.20264-4-eric@anholt.net
Acked-by: Rob Clark <robdclark@gmail.com>
5 years agoclk: bcm2835: Allow reparenting leaf clocks while they're running.
Eric Anholt [Thu, 2 May 2019 22:24:04 +0000 (15:24 -0700)]
clk: bcm2835: Allow reparenting leaf clocks while they're running.

This falls under the same "we can reprogram glitch-free as long as we
pause generation" rule as updating the div/frac fields.  This can be
used for runtime reclocking of V3D to manage power leakage.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agoclk: bcm2835: Add support for setting leaf clock rates while running.
Eric Anholt [Thu, 2 May 2019 22:11:05 +0000 (15:11 -0700)]
clk: bcm2835: Add support for setting leaf clock rates while running.

As long as you wait for !BUSY, you can do glitch-free updates of clock
rate while the clock is running.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm: vc4: FKMS reads the EDID from fw, and supports mode setting
Dave Stevenson [Tue, 9 Apr 2019 17:23:41 +0000 (18:23 +0100)]
drm: vc4: FKMS reads the EDID from fw, and supports mode setting

This extends FKMS to read the EDID from the display, and support
requesting a particular mode via KMS.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Increase max_width/height to 7680.
Dave Stevenson [Mon, 29 Apr 2019 17:45:00 +0000 (18:45 +0100)]
drm: vc4: Increase max_width/height to 7680.

There are some limits still being investigated that stop
us going up to 8192, but 7680 is sufficient for dual 4k
displays.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Bring fkms into line with kms in blocking doublescan modes
Dave Stevenson [Wed, 10 Apr 2019 16:43:57 +0000 (17:43 +0100)]
drm: vc4: Bring fkms into line with kms in blocking doublescan modes

Implement vc4_crtc_mode_valid so that it blocks doublescan modes

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Iterate over all planes in vc4_crtc_[dis|en]able
Dave Stevenson [Wed, 10 Apr 2019 16:42:37 +0000 (17:42 +0100)]
drm: vc4: Iterate over all planes in vc4_crtc_[dis|en]able

Fixes a FIXME where the overlay plane wouldn't be restored.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Remove unused vc4_fkms_cancel_page_flip function
Dave Stevenson [Wed, 10 Apr 2019 16:35:05 +0000 (17:35 +0100)]
drm: vc4: Remove unused vc4_fkms_cancel_page_flip function

"32a3dbe drm/vc4: Nuke preclose hook" removed vc4_cancel_page_flip,
but vc4_fkms_cancel_page_flip was still be added to with the
fkms driver, even though it was never called.
Nuke it too.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Add support for H & V flips on each plane for FKMS
Dave Stevenson [Tue, 9 Apr 2019 16:19:51 +0000 (17:19 +0100)]
drm: vc4: Add support for H & V flips on each plane for FKMS

They are near zero cost options for the HVS, therefore they
may as well be implemented, and it allows us to invert the
DSI display.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Need to call drm_crtc_vblank_[on|off] from vc4_crtc_[en|dis]able
Dave Stevenson [Tue, 9 Apr 2019 17:14:44 +0000 (18:14 +0100)]
drm: vc4: Need to call drm_crtc_vblank_[on|off] from vc4_crtc_[en|dis]able

vblank needs to be enabled and disabled by the driver to avoid the
DRM framework complaining in the kernel log.

vc4_fkms_disable_vblank needs to signal that we don't want vblank
callbacks too.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm/vc4: Set the display number when querying the display resolution
Dave Stevenson [Tue, 9 Apr 2019 13:00:07 +0000 (14:00 +0100)]
drm/vc4: Set the display number when querying the display resolution

Without this the two displays got set to the same resolution.
(Requires a firmware bug fix to work).

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Query the display ID for each display in FKMS
Dave Stevenson [Tue, 9 Apr 2019 11:37:28 +0000 (12:37 +0100)]
drm: vc4: Query the display ID for each display in FKMS

Replace the hard coded list of display IDs for a mailbox call
that returns the display ID for each display that has been
detected.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Remove now unused structure.
Dave Stevenson [Fri, 5 Apr 2019 16:24:20 +0000 (17:24 +0100)]
drm: vc4: Remove now unused structure.

Cleaning up structure that was unused after
fbb59a2 drm: vc4: Add an overlay plane to vc4-firmware-kms

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Select display to blank during initialisation
Dave Stevenson [Fri, 5 Apr 2019 16:23:15 +0000 (17:23 +0100)]
drm: vc4: Select display to blank during initialisation

Otherwise the rainbow splash screen remained in the display list

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Fix build warning
Dave Stevenson [Fri, 5 Apr 2019 16:21:56 +0000 (17:21 +0100)]
drm: vc4: Fix build warning

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Add support for multiple displays to fkms
Dave Stevenson [Wed, 3 Apr 2019 16:15:45 +0000 (17:15 +0100)]
drm: vc4: Add support for multiple displays to fkms

There is a slightly nasty hack in that all crtcs share the
same SMI interrupt from the firmware. This seems to currently
work well enough, but ought to be fixed at a later date.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Increase max screen size to 4096x4096.
Dave Stevenson [Wed, 3 Apr 2019 14:20:05 +0000 (15:20 +0100)]
drm: vc4: Increase max screen size to 4096x4096.

We now should support 4k screens, therefore this limit needs to
be increased.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm: vc4: Add an overlay plane to vc4-firmware-kms
Dave Stevenson [Wed, 27 Mar 2019 17:45:01 +0000 (17:45 +0000)]
drm: vc4: Add an overlay plane to vc4-firmware-kms

This uses a new API that is exposed via the mailbox service
to stick an element straight on the screen using DispmanX.

The primary and cursor planes have also been switched to using
the new plane API, and it supports layering based on the DRM
zpos parameter.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agogpu: vc4-fkms: Switch to the newer mailbox frame buffer API.
Dave Stevenson [Tue, 26 Mar 2019 14:43:06 +0000 (14:43 +0000)]
gpu: vc4-fkms: Switch to the newer mailbox frame buffer API.

The old mailbox FB API was ideally deprecated but still used by
the FKMS driver.
Update to the newer API.

NB This needs current firmware that accepts ARM allocated buffers
through the newer API.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
5 years agodrm/vc4: Fix vblank timestamping for firmwarekms.
Eric Anholt [Tue, 2 Apr 2019 20:29:00 +0000 (13:29 -0700)]
drm/vc4: Fix vblank timestamping for firmwarekms.

The core doesn't expect a false return from the scanoutpos function in
normal usage, so we were doing the precise vblank timestamping path
and thus "immediate" vblank disables (even though firmwarekms can't
actually disable vblanks interrupts, sigh), and the kernel would get
confused when getting timestamp info when also turning vblanks back
on.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/vc4: Expose the format modifiers for firmware kms.
Eric Anholt [Mon, 18 Mar 2019 23:38:32 +0000 (16:38 -0700)]
drm/vc4: Expose the format modifiers for firmware kms.

This should technically not expose VC4_T_TILED on pi4.  However, if we
don't expose anything, then userspace will assume that display can
handle whatever modifiers 3d can do (UIF on 2711).  By exposing a
list, that will get intersected with what 3D can do so that we get T
tiling for display on 2710 and linear on 2711.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/vc4: Make sure that vblank waits work without v3d loaded.
Eric Anholt [Fri, 29 Mar 2019 19:04:36 +0000 (12:04 -0700)]
drm/vc4: Make sure that vblank waits work without v3d loaded.

This flag exists to protect legacy drivers, but when vc4's v3d doesn't
probe, it doesn't get set up by vc4_v3d.c's call of drm_irq_install.
This resulted in applications running as fast as possible, and laggy
performance from compton as it had to wait for the latest rendering by
the application for its presentation.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/vc4: Fix synchronization firmwarekms against GL rendering.
Eric Anholt [Thu, 28 Mar 2019 18:58:51 +0000 (11:58 -0700)]
drm/vc4: Fix synchronization firmwarekms against GL rendering.

We would present the framebuffer immediately without waiting for
rendering to finish first, resulting in stuttering and flickering as a
window was dragged around when the GPU was busy enough to not just win
the race.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Add missing implicit synchronization.
Eric Anholt [Thu, 28 Mar 2019 00:44:40 +0000 (17:44 -0700)]
drm/v3d: Add missing implicit synchronization.

It is the expectation of existing userspace (X11 + Mesa, in
particular) that jobs submitted to the kernel against a shared BO will
get implicitly synchronized by their submission order.  If we want to
allow clever userspace to disable implicit synchronization, we should
do that under its own submit flag (as amdgpu and lima do).

Note that we currently only implicitly sync for the rendering pass,
not binning -- if you texture-from-pixmap in the binning vertex shader
(vertex coordinate generation), you'll miss out on synchronization.

Fixes flickering when multiple clients are running in parallel,
particularly GL apps and compositors.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Refactor job management.
Eric Anholt [Thu, 27 Dec 2018 20:11:52 +0000 (12:11 -0800)]
drm/v3d: Refactor job management.

The CL submission had two jobs embedded in an exec struct.  When I
added TFU support, I had to replicate some of the exec stuff and some
of the job stuff.  As I went to add CSD, it became clear that actually
what was in exec should just be in the two CL jobs, and it would let
us share a lot more code between the 4 queues.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Rename the fence signaled from IRQs to "irq_fence".
Eric Anholt [Thu, 27 Dec 2018 22:04:44 +0000 (14:04 -0800)]
drm/v3d: Rename the fence signaled from IRQs to "irq_fence".

We have another thing called the "done fence" that tracks when the
scheduler considers the job done, and having the shared name was
confusing.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Update to upstream IRQ code.
Eric Anholt [Tue, 12 Mar 2019 16:08:10 +0000 (09:08 -0700)]
drm/v3d: Update to upstream IRQ code.

5 years agodrm/v3d: HACK: gut runtime pm for now.
Eric Anholt [Mon, 14 Jan 2019 23:13:17 +0000 (15:13 -0800)]
drm/v3d: HACK: gut runtime pm for now.

Something is still unstable -- on starting a new glxgears from an idle
X11, I get an MMU violation in high addresses.  The CTS also failed
quite quickly.  With this, CTS progresses for an hour before OOMing
(allocating some big buffers when my board only has 600MB available to
Linux)

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Hook up the runtime PM ops.
Eric Anholt [Mon, 14 Jan 2019 22:47:57 +0000 (14:47 -0800)]
drm/v3d: Hook up the runtime PM ops.

In translating the runtime PM code from vc4, I missed the ".pm"
assignment to actually connect them up.  Fixes missing MMU setup if
runtime PM resets V3D.

Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit ca197699af29baa8236c74c53d4904ca8957ee06)

5 years agodrm/v3d: Skip MMU flush if the device is currently off.
Eric Anholt [Mon, 14 Jan 2019 20:35:43 +0000 (12:35 -0800)]
drm/v3d: Skip MMU flush if the device is currently off.

If it's off, we know it will be reset on poweron, so the MMU won't
have any TLB cached from before this point.  Avoids failed waits for
MMU flush to reply.

Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 3ee4e2e0a9e9587eacbb69b067bbc72ab2cdc47b)

5 years agodrm/v3d: Add support for 2711.
Eric Anholt [Fri, 5 Oct 2018 00:22:43 +0000 (17:22 -0700)]
drm/v3d: Add support for 2711.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Make sure the GPU is on when measuring clocks.
Eric Anholt [Tue, 15 Jan 2019 01:26:04 +0000 (17:26 -0800)]
drm/v3d: Make sure the GPU is on when measuring clocks.

You'll get garbage measurements if the registers always read back
0xdeadbeef

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Don't try to set OVRTMUOUT on V3D 4.x.
Eric Anholt [Tue, 16 Oct 2018 17:13:41 +0000 (10:13 -0700)]
drm/v3d: Don't try to set OVRTMUOUT on V3D 4.x.

The old field is gone and the register now has a different field,
QRMAXCNT for how many TMU requests get serviced before thread switch.
We were accidentally reducing it from its default of 0x3 (4 requests)
to 0x0 (1).

v2: Skip setting the reg at all on 4.x, instead of trying to update
    only the old field.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Add support for V3D v4.2.
Eric Anholt [Fri, 5 Oct 2018 00:22:43 +0000 (17:22 -0700)]
drm/v3d: Add support for V3D v4.2.

No compatible string for it yet, just the version-dependent changes.
They've now tied the hub and the core interrupt lines into a single
interrupt line coming out of the block.  It also turns out I made a
mistake in modeling the V3D v3.3 and v4.1 bridge as a part of V3D
itself -- the bridge is going away in favor of an external reset
controller in a larger HW module.

v2: Use consistent checks for whether we're on 4.2, and fix a leak in
    an error path.
v3: Use more general means of determining if the current 4.2 changes
    are in place, as apparently other platforms may switch back (noted
    by Dave).  Update the binding doc.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/vc4: Disable V3D interactions if the v3d component didn't probe.
Eric Anholt [Wed, 20 Feb 2019 21:03:41 +0000 (13:03 -0800)]
drm/vc4: Disable V3D interactions if the v3d component didn't probe.

One might want to use the VC4 display stack without using Mesa.
Similar to the debugfs fixes for not having all of the possible
display bits enabled, make sure you can't oops in vc4 if v3d isn't
enabled.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/vc4: Fix oops at boot with firmwarekms on 4.19.
Eric Anholt [Mon, 4 Mar 2019 19:59:34 +0000 (11:59 -0800)]
drm/vc4: Fix oops at boot with firmwarekms on 4.19.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agodrm/v3d: Update top-level kerneldoc for the addition of TFU.
Eric Anholt [Thu, 7 Feb 2019 20:09:58 +0000 (12:09 -0800)]
drm/v3d: Update top-level kerneldoc for the addition of TFU.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190207201001.5730-1-eric@anholt.net
Reviewed-by: Thomas Spurden <thomas.spurden@broadcom.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
(cherry picked from commit fd347df16d4ed2eef565344b8f16a1134bddf185)

5 years agodrm/v3d: Fix BO stats accounting for dma-buf-imported buffers.
Eric Anholt [Thu, 7 Feb 2019 23:26:13 +0000 (15:26 -0800)]
drm/v3d: Fix BO stats accounting for dma-buf-imported buffers.

We always decrement at GEM free, so make sure we increment at GEM
creation for dma-bufs.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190207232613.24981-1-eric@anholt.net
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
(cherry picked from commit cc3f60cfd4f2752f1bad7eaa3839855c15347abc)

5 years agodrm/v3d: Invalidate the caches from the outside in.
Eric Anholt [Mon, 3 Dec 2018 22:24:38 +0000 (14:24 -0800)]
drm/v3d: Invalidate the caches from the outside in.

This would be a fairly obscure race, but let's make sure we don't ever
lose it.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-6-eric@anholt.net
Reviewed-by: Dave Emett <david.emett@broadcom.com>
(cherry picked from commit aa5beec32e8b78bfcf621e3c3daebfb1644b6365)

5 years agodrm/v3d: Stop trying to flush L2C on V3D 3.3+
Eric Anholt [Mon, 3 Dec 2018 22:24:37 +0000 (14:24 -0800)]
drm/v3d: Stop trying to flush L2C on V3D 3.3+

This cache was replaced with the slice accessing the L2T in the newer
generations.  Noted by Dave during review.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-5-eric@anholt.net
Reviewed-by: Dave Emett <david.emett@broadcom.com>
(cherry picked from commit 7b9d2fe4350a9c12f66ad8cc78c1098226f6c3c2)

5 years agodrm/v3d: Drop the wait for L2T flush to complete.
Eric Anholt [Mon, 3 Dec 2018 22:24:36 +0000 (14:24 -0800)]
drm/v3d: Drop the wait for L2T flush to complete.

According to Dave, once you've started an L2T flush, all L2T accesses
will be blocked until the flush completes.  This fixes a consistent
3-4ms stall between the ioctl and running the job, and 3DMMES Taiji
goes from 27fps to 110fps.

v2: Leave a note about why we don't need to wait for completion.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
Reviewed-by: Dave Emett <david.emett@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-4-eric@anholt.net
(cherry picked from commit 51c1b6f9eb3dbdec91b0e3c89f623e634c996bbb)

5 years agodrm/v3d: Don't bother flushing L1TD at job start.
Eric Anholt [Mon, 3 Dec 2018 22:24:35 +0000 (14:24 -0800)]
drm/v3d: Don't bother flushing L1TD at job start.

This is the write combiner for TMU writes.  You're supposed to flush
that at job end if you had dirtied any cachelines.  Flushing it at job
start then doesn't make any sense.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
Reviewed-by: Dave Emett <david.emett@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-3-eric@anholt.net
(cherry picked from commit 2e6dc3bd80478212e84addf1cafd6ec60674b884)

5 years agodrm/v3d: Drop unused v3d_flush_caches().
Eric Anholt [Mon, 3 Dec 2018 22:24:34 +0000 (14:24 -0800)]
drm/v3d: Drop unused v3d_flush_caches().

Now that I've specified how the end-of-pipeline flushing should work,
we're never going to use this function.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Emett <david.emett@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181203222438.25417-2-eric@anholt.net
(cherry picked from commit 2aa34fd5c7754824cf5488b61ac644f30d3c5c85)

5 years agodrm/v3d: Add more tracepoints for V3D GPU rendering.
Eric Anholt [Sat, 1 Dec 2018 00:57:58 +0000 (16:57 -0800)]
drm/v3d: Add more tracepoints for V3D GPU rendering.

The core scheduler tells us when the job is pushed to the scheduler's
queue, and I had the job_run functions saying when they actually queue
the job to the hardware.  By adding tracepoints for the very top of
the ioctls and the IRQs signaling job completion, "perf record -a -e
v3d:.\* -e gpu_scheduler:.\* <job>; perf script" gets you a pretty
decent timeline.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181201005759.28093-5-eric@anholt.net
Reviewed-by: Dave Emett <david.emett@broadcom.com>
(cherry picked from commit 55a9b74846ed5e6219c7d81a8e1bf96f25d8ad5e)

5 years agodrm/v3d: Add missing fence timeline name for TFU.
Eric Anholt [Sat, 1 Dec 2018 00:57:59 +0000 (16:57 -0800)]
drm/v3d: Add missing fence timeline name for TFU.

We shouldn't be returning v3d-render for our new queue.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 83d5139982db ("drm/v3d: Add support for submitting jobs to the TFU.")
Link: https://patchwork.freedesktop.org/patch/msgid/20181201005759.28093-6-eric@anholt.net
Reviewed-by: Dave Emett <david.emett@broadcom.com>
(cherry picked from commit db176f6ba1da39ad0016c77b9775a6bb3d0ce88a)

5 years agodrm/v3d: Drop the "dev" argument to lock/unlock of BO reservations.
Eric Anholt [Wed, 28 Nov 2018 23:09:26 +0000 (15:09 -0800)]
drm/v3d: Drop the "dev" argument to lock/unlock of BO reservations.

They were unused, as Dave Emett noticed in TFU review.

Signed-off-by: Eric Anholt <eric@anholt.net>
Cc: Dave Emett <david.emett@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181128230927.10951-2-eric@anholt.net
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit e14a07fc4b961a75f6c275d6bd670ba54fbdae14)

5 years agodrm/v3d: Add support for submitting jobs to the TFU.
Eric Anholt [Wed, 28 Nov 2018 23:09:25 +0000 (15:09 -0800)]
drm/v3d: Add support for submitting jobs to the TFU.

The TFU can copy from raster, UIF, and SAND input images to UIF output
images, with optional mipmap generation.  This will certainly be
useful for media EGL image input, but is also useful immediately for
mipmap generation without bogging the V3D core down.

For now we only run the queue 1 job deep, and don't have any hang
recovery (though I don't think we should need it, with TFU).  Queuing
multiple jobs in the HW will require synchronizing the YUV coefficient
regs updates since they don't get FIFOed with the job.

v2: Change the ioctl to IOW instead of IOWR, always set COEF0, explain
    why TFU is AUTH, clarify the syncing docs, drop the unused TFU
    interrupt regs (you're expected to use the hub's), don't take
    &bo->base for NULL bos.
v3: Fix a little whitespace alignment (noticed by checkpatch), rebase
    on drm_sched_job_cleanup() changes.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Emett <david.emett@broadcom.com> (v2)
Link: https://patchwork.freedesktop.org/patch/264607/
(cherry picked from commit 1584f16ca96ef124aad79efa3303cff5f3530e2c)

5 years agodrm/v3d: Clean up the reservation object setup.
Eric Anholt [Thu, 8 Nov 2018 16:16:53 +0000 (08:16 -0800)]
drm/v3d: Clean up the reservation object setup.

The extra to_v3d_bo() calls came from copying this from the vc4
driver, which stored the cma gem object in the structs.

v2: Fix an unused var warning

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181108161654.19888-4-eric@anholt.net
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> (v1)
(cherry picked from commit 8f1cd826641d677d0f7494253ecfc3335f0bcd4e)

5 years agodrm/v3d: Update a comment about what uses v3d_job_dependency().
Eric Anholt [Thu, 8 Nov 2018 16:16:52 +0000 (08:16 -0800)]
drm/v3d: Update a comment about what uses v3d_job_dependency().

I merged bin and render's paths in a late refactoring.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181108161654.19888-3-eric@anholt.net
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
(cherry picked from commit e90e45f6bd45cc494a6f4cd1853c5e7cd4be7f68)

5 years agodrm/v3d: Add a little debugfs entry for measuring the core clock.
Eric Anholt [Fri, 28 Sep 2018 23:21:24 +0000 (16:21 -0700)]
drm/v3d: Add a little debugfs entry for measuring the core clock.

This adds just enough performance counter support to measure the
clock.  We don't have linux kernel drivers for the clock driving the
HW, and this was useful for determining that the V3D HW is running on
a slow clock, not that the driver was slow.

Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20180928232126.4332-2-eric@anholt.net
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
(cherry picked from commit 6915c9a525e575732429c22b28eb11871a29374b)

5 years agodrm/v3d: Fix a use-after-free race accessing the scheduler's fences.
Eric Anholt [Fri, 28 Sep 2018 23:21:23 +0000 (16:21 -0700)]
drm/v3d: Fix a use-after-free race accessing the scheduler's fences.

Once we push the job, the scheduler could run it and free it.  So, if
we want to reference their fences, we need to grab them before then.
I haven't seen this happen in many days of conformance test runtime,
but let's still close the race.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
Link: https://patchwork.freedesktop.org/patch/254119/
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
(cherry picked from commit 34c2c4f632f232ed2fdb66d4e42cc72d322273fe)

5 years agodrm: expand drm_syncobj_find_fence to support timeline point v2
Chunming Zhou [Thu, 30 Aug 2018 06:48:29 +0000 (14:48 +0800)]
drm: expand drm_syncobj_find_fence to support timeline point v2

we can fetch timeline point fence after expanded.
v2: The parameter fence is the result of the function and should come last.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/246541/
(cherry picked from commit 0a6730ea27b68c7ac4171c29a816c29d26a9637a)
Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agosoc: bcm: bcm2835-pm: Add support for 2711.
Eric Anholt [Sat, 12 Jan 2019 01:31:07 +0000 (17:31 -0800)]
soc: bcm: bcm2835-pm: Add support for 2711.

Without the actual power management part any more, there's a lot less
to set up for V3D.  We just need to clear the RSTN field for the power
domain, and expose the reset controller for toggling it again.

This is definitely incomplete -- the old ISP and H264 is in the old
bridge, but since we have no consumers of it I've just done the
minimum to get V3D working.

Signed-off-by: Eric Anholt <eric@anholt.net>
5 years agosoc: bcm: bcm2835-pm: Fix error paths of initialization.
Eric Anholt [Sat, 12 Jan 2019 16:07:43 +0000 (08:07 -0800)]
soc: bcm: bcm2835-pm: Fix error paths of initialization.

The clock driver may probe after ours and so we need to pass the
-EPROBE_DEFER out.  Fix the other error path while we're here.

v2: Use dom->name instead of dom->gov as the flag for initialized
    domains, since we aren't setting up a governor.  Make sure to
    clear ->clk when no clk is present in the DT.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 670c672608a1 ("soc: bcm: bcm2835-pm: Add support for power domains under a new binding.")

5 years agosoc: bcm: bcm2835-pm: Fix PM_IMAGE_PERI power domain support.
Eric Anholt [Sat, 12 Jan 2019 01:29:10 +0000 (17:29 -0800)]
soc: bcm: bcm2835-pm: Fix PM_IMAGE_PERI power domain support.

We don't have ASB master/slave regs for this domain, so just skip that
step.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 670c672608a1 ("soc: bcm: bcm2835-pm: Add support for power domains under a new binding.")

5 years agosoc: bcm: bcm2835-pm: Add support for power domains under a new binding.
Eric Anholt [Wed, 12 Dec 2018 23:51:48 +0000 (15:51 -0800)]
soc: bcm: bcm2835-pm: Add support for power domains under a new binding.

This provides a free software alternative to raspberrypi-power.c's
firmware calls to manage power domains.  It also exposes a reset line,
where previously the vc4 driver had to try to force power off the
domain in order to trigger a reset.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
(cherry picked from commit 670c672608a1ffcbc7ac0f872734843593bb8b15)

5 years agobcm2835-pm: Move bcm2835-watchdog's DT probe to an MFD.
Eric Anholt [Wed, 12 Dec 2018 23:51:47 +0000 (15:51 -0800)]
bcm2835-pm: Move bcm2835-watchdog's DT probe to an MFD.

The PM block that the wdt driver was binding to actually has multiple
features we want to expose (power domains, reset, watchdog).  Move the
DT attachment to a MFD driver and make WDT probe against MFD.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
(cherry picked from commit 5e6acc3e678ed3db746ab4fb53a980861cd711b6)

5 years agoclk-bcm2835: Don't wait for pllh lock
Phil Elwell [Wed, 23 Jan 2019 16:11:50 +0000 (16:11 +0000)]
clk-bcm2835: Don't wait for pllh lock

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agodrivers: char: add chardev for mmap'ing Argon control registers
Jonathan Bell [Thu, 9 May 2019 13:30:37 +0000 (14:30 +0100)]
drivers: char: add chardev for mmap'ing Argon control registers

Based on the gpiomem driver, allow mapping of the decoder register
spaces such that userspace can access control/status registers.
This driver is intended for use with a custom ffmpeg backend accelerator
prior to a v4l2 driver being written.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
5 years agospi: bcm2835: enable shared interrupt support
Martin Sperl [Mon, 13 May 2019 11:05:27 +0000 (11:05 +0000)]
spi: bcm2835: enable shared interrupt support

Add shared interrupt support for this driver.

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
5 years agopinctrl-bcm2835: Add support for BCM2838
Tim Gover [Wed, 9 Jan 2019 14:43:36 +0000 (14:43 +0000)]
pinctrl-bcm2835: Add support for BCM2838

GPIO configuration on BCM2838 is largely the same as BCM2835 except for
the pull up/down configuration. The old mechanism has been replaced
by new registers which don't require the fixed delay.

Detect BCN2838 at run-time and use the new mechanism. Backwards
compatibility for the device-tree configuration has been retained.

5 years agousb: xhci: hack xhci_urb_enqueue to support hid.mousepoll behaviour
Jonathan Bell [Thu, 30 May 2019 09:38:40 +0000 (10:38 +0100)]
usb: xhci: hack xhci_urb_enqueue to support hid.mousepoll behaviour

xHCI creates endpoint contexts directly from the device's endpoint
data, so submitting URBs with urb->interval different from the hardware
interval has no effect.

Add an explicit reconfiguration of the endpoint context when requested,
which will happen only when the interval is different from the cached
value. In practice, the reconfiguration only happens on the first URB
submitted for the endpoint.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
5 years agousb: xhci: Show that the VIA VL805 supports LPM
Phil Elwell [Thu, 23 May 2019 14:08:30 +0000 (15:08 +0100)]
usb: xhci: Show that the VIA VL805 supports LPM

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agousb: xhci: Disable the XHCI 5 second timeout
Tim Gover [Fri, 22 Mar 2019 09:47:14 +0000 (09:47 +0000)]
usb: xhci: Disable the XHCI 5 second timeout

If the VL805 EEPROM has not been programmed then boot will hang for five
seconds. The timeout seems to be arbitrary and is an unecessary
delay on the first boot. Remove the timeout.

This is common code and probably can't be upstreamed unless the timeout
can be configurable somehow or perhaps the XHCI driver can be skipped
on the first boot.

5 years agodwc_otg: Choose appropriate IRQ handover strategy
Phil Elwell [Tue, 21 May 2019 12:36:52 +0000 (13:36 +0100)]
dwc_otg: Choose appropriate IRQ handover strategy

2711 has no MPHI peripheral, but the ARM Control block can fake
interrupts. Use the size of the DTB "mphi" reg block to determine
which is required.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
5 years agophy: bcm54213pe: configure the LED outputs to be more user-friendly
Jonathan Bell [Fri, 17 May 2019 12:31:21 +0000 (13:31 +0100)]
phy: bcm54213pe: configure the LED outputs to be more user-friendly

The default state was both LEDs indicating link speed.

Change the default configuration to
- Amber: 1000/100 link speed indication
- Green: link present + activity indication

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
5 years agophy: broadcom: split out the BCM54213PE from the BCM54210E IDs
Jonathan Bell [Tue, 14 May 2019 16:00:41 +0000 (17:00 +0100)]
phy: broadcom: split out the BCM54213PE from the BCM54210E IDs

The last nibble is a revision ID, and the 54213pe is a later rev
than the 54210e. Running the 54210e setup code on a 54213pe results
in a broken RGMII interface.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>