bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0652-overlays-Add-vl805-overlay.patch
1 From 2f1c8eedc108d458fb2566ec582cbd7c45fc280b Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Wed, 12 Jan 2022 12:48:53 +0000
4 Subject: [PATCH] overlays: Add vl805 overlay
5
6 With the automatic VL805 support being removed from the standard
7 CM4 dtb (since most CM4 carriers don't have a VL805), retain support
8 on those that do by creating a "vl805" overlay that restores the
9 deleted "usb@0,0" node.
10
11 The "vl805" overlay will be loaded automatically (after an upcoming
12 firmware update) on CM4 boards where the EEPROM config includes the
13 setting VL805=1.
14
15 See: https://forums.raspberrypi.com/viewtopic.php?t=326088
16
17 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
18 ---
19 arch/arm/boot/dts/overlays/Makefile | 1 +
20 arch/arm/boot/dts/overlays/README | 8 ++++++++
21 arch/arm/boot/dts/overlays/vl805-overlay.dts | 18 ++++++++++++++++++
22 3 files changed, 27 insertions(+)
23 create mode 100644 arch/arm/boot/dts/overlays/vl805-overlay.dts
24
25 --- a/arch/arm/boot/dts/overlays/Makefile
26 +++ b/arch/arm/boot/dts/overlays/Makefile
27 @@ -243,6 +243,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
28 vc4-kms-v3d-pi4.dtbo \
29 vc4-kms-vga666.dtbo \
30 vga666.dtbo \
31 + vl805.dtbo \
32 w1-gpio.dtbo \
33 w1-gpio-pullup.dtbo \
34 w5500.dtbo \
35 --- a/arch/arm/boot/dts/overlays/README
36 +++ b/arch/arm/boot/dts/overlays/README
37 @@ -3744,6 +3744,14 @@ Load: dtoverlay=vga666
38 Params: <None>
39
40
41 +Name: vl805
42 +Info: Overlay to enable a VIA VL805 USB3 controller on CM4 carriers
43 + Will be loaded automatically by up-to-date firmware if "VL805=1" is
44 + set in the EEPROM config.
45 +Load: dtoverlay=vl805
46 +Params: <None>
47 +
48 +
49 Name: w1-gpio
50 Info: Configures the w1-gpio Onewire interface module.
51 Use this overlay if you *don't* need a GPIO to drive an external pullup.
52 --- /dev/null
53 +++ b/arch/arm/boot/dts/overlays/vl805-overlay.dts
54 @@ -0,0 +1,18 @@
55 +/dts-v1/;
56 +/plugin/;
57 +
58 +#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
59 +
60 +/ {
61 + compatible = "brcm,bcm2711";
62 +
63 + fragment@0 {
64 + target-path = "pcie0/pci@0,0";
65 + __overlay__ {
66 + usb@0,0 {
67 + reg = <0 0 0 0 0>;
68 + resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
69 + };
70 + };
71 + };
72 +};