This pull request brings in VC4 devicetree support and the other minor

DT changes for 4.7.
 
 Also included is a DRM patch necessary to prevent regressions when
 simplefb and vc4 drivers are both present.  The patch was suggested by
 the simplefb maintainer as the solution agreed upon at ELCE 2014, and
 was acked by the DRM maintainer for merging through this tree.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCgAGBQJXF69yAAoJELXWKTbR/J7otjoP/0OlGRi1MYZRv/AZ/c1QN1kc
 TJXCZnT6DN9oTK+Rw60WB3vSUKYZ4Xw+qDz+hFnWs/QmvNaWJuJ5J8UoxpeQdRtX
 NKQ9kBO8208E0pYvEWV4DXpMQ6QQECA+a+QdntMVfp9NdvX1eYo2irlheEcJkAyA
 9A/Qayr2xGQDWhs32t3mwa4f+H3A8FMerdpR3Fc9ksO7+REm0LpUrKDOnMCsaQJx
 M2TDJLcaljfgNHm/muUNGQsT29116nlfLs0uXgI9+nvCqYe6v3sI1DMQ+0ajLKW9
 n0WuzQUc/qkqM0ipkPAFunoOarSxtXJXDXwwId+CPB0qvFqrhVWQkQH2rzOBW0+g
 Z78uJyKwAq9xMsQkVZ/+ycuySvUXZzBPOprE4xNA761BxAg/HsDo78JeAeOxVi0h
 sOeB/cfYGTnCVoRxm9hYxPxq5faOUHXYJSxOgp8USbBL0BQF9Qmok/kzxUxXY+3p
 C9eohbCrS0B4MDFsuxSE4Tj6XRKDIFIVfrE7mNASVoR/uydgWa1A0uAquSTmdJ/K
 PtwdhjmRgUJrI8uOfhNIdeva7VGAwTvv89RFOp1WtimeGpQmXZFN/l8V26qn4BKe
 MROs9PW7aQQvGecVGwmG+ASrrGUypubtbr00ha/IGI4wO/hHFLSLYKyCiRBMXqv7
 KHOGS+mMikUQiCosGMiQ
 =FqoL
 -----END PGP SIGNATURE-----

Merge tag 'bcm2835-dt-next-2016-04-20' into devicetree/next

This pull request brings in VC4 devicetree support and the other minor
DT changes for 4.7.

Also included is a DRM patch necessary to prevent regressions when
simplefb and vc4 drivers are both present.  The patch was suggested by
the simplefb maintainer as the solution agreed upon at ELCE 2014, and
was acked by the DRM maintainer for merging through this tree.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
This commit is contained in:
Florian Fainelli 2016-04-22 12:22:04 -07:00
commit 3db62afd11
11 changed files with 113 additions and 2 deletions

View File

@ -71,8 +71,8 @@ Bank 1:
24: DMA8
25: DMA9
26: DMA10
27: DMA11
28: DMA12
27: DMA11-14 - shared interrupt for DMA 11 to 14
28: DMAALL - triggers on all dma interrupts (including chanel 15)
29: AUX
30: ARM
31: VPUDMA

View File

@ -29,3 +29,7 @@
brcm,function = <BCM2835_FSEL_ALT0>;
};
};
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};

View File

@ -22,3 +22,7 @@
brcm,function = <BCM2835_FSEL_ALT2>;
};
};
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
};

View File

@ -29,3 +29,7 @@
brcm,function = <BCM2835_FSEL_ALT0>;
};
};
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};

View File

@ -22,3 +22,7 @@
brcm,function = <BCM2835_FSEL_ALT2>;
};
};
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};

View File

@ -16,3 +16,7 @@
&gpio {
pinctrl-0 = <&gpioout &alt0 &alt3>;
};
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
};

View File

@ -74,3 +74,12 @@
&usb {
power-domains = <&power RPI_POWER_DOMAIN_USB>;
};
&v3d {
power-domains = <&power RPI_POWER_DOMAIN_V3D>;
};
&hdmi {
power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
status = "okay";
};

View File

@ -3,6 +3,17 @@
/ {
compatible = "brcm,bcm2835";
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
device_type = "cpu";
compatible = "arm,arm1176jzf-s";
reg = <0x0>;
};
};
soc {
ranges = <0x7e000000 0x20000000 0x02000000>;
dma-ranges = <0x40000000 0x00000000 0x20000000>;

View File

@ -33,3 +33,7 @@
brcm,function = <BCM2835_FSEL_ALT0>;
};
};
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};

View File

@ -1,6 +1,7 @@
#include <dt-bindings/pinctrl/bcm2835.h>
#include <dt-bindings/clock/bcm2835.h>
#include <dt-bindings/clock/bcm2835-aux.h>
#include <dt-bindings/gpio/gpio.h>
#include "skeleton.dtsi"
/* This include file covers the common peripherals and configuration between
@ -153,6 +154,18 @@
status = "disabled";
};
pixelvalve@7e206000 {
compatible = "brcm,bcm2835-pixelvalve0";
reg = <0x7e206000 0x100>;
interrupts = <2 13>; /* pwa0 */
};
pixelvalve@7e207000 {
compatible = "brcm,bcm2835-pixelvalve1";
reg = <0x7e207000 0x100>;
interrupts = <2 14>; /* pwa1 */
};
aux: aux@0x7e215000 {
compatible = "brcm,bcm2835-aux";
#clock-cells = <1>;
@ -206,6 +219,12 @@
status = "disabled";
};
hvs@7e400000 {
compatible = "brcm,bcm2835-hvs";
reg = <0x7e400000 0x6000>;
interrupts = <2 1>;
};
i2c1: i2c@7e804000 {
compatible = "brcm,bcm2835-i2c";
reg = <0x7e804000 0x1000>;
@ -226,11 +245,39 @@
status = "disabled";
};
pixelvalve@7e807000 {
compatible = "brcm,bcm2835-pixelvalve2";
reg = <0x7e807000 0x100>;
interrupts = <2 10>; /* pixelvalve */
};
hdmi: hdmi@7e902000 {
compatible = "brcm,bcm2835-hdmi";
reg = <0x7e902000 0x600>,
<0x7e808000 0x100>;
interrupts = <2 8>, <2 9>;
ddc = <&i2c2>;
clocks = <&clocks BCM2835_PLLH_PIX>,
<&clocks BCM2835_CLOCK_HSM>;
clock-names = "pixel", "hdmi";
status = "disabled";
};
usb: usb@7e980000 {
compatible = "brcm,bcm2835-usb";
reg = <0x7e980000 0x10000>;
interrupts = <1 9>;
};
v3d: v3d@7ec00000 {
compatible = "brcm,bcm2835-v3d";
reg = <0x7ec00000 0x1000>;
interrupts = <1 10>;
};
vc4: gpu {
compatible = "brcm,bcm2835-vc4";
};
};
clocks {

View File

@ -153,6 +153,24 @@ static void vc4_match_add_drivers(struct device *dev,
}
}
static void vc4_kick_out_firmware_fb(void)
{
struct apertures_struct *ap;
ap = alloc_apertures(1);
if (!ap)
return;
/* Since VC4 is a UMA device, the simplefb node may have been
* located anywhere in memory.
*/
ap->ranges[0].base = 0;
ap->ranges[0].size = ~0;
remove_conflicting_framebuffers(ap, "vc4drmfb", false);
kfree(ap);
}
static int vc4_drm_bind(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
@ -186,6 +204,8 @@ static int vc4_drm_bind(struct device *dev)
if (ret)
goto gem_destroy;
vc4_kick_out_firmware_fb();
ret = drm_dev_register(drm, 0);
if (ret < 0)
goto unbind_all;