diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
index 4d50b22554a4c925993aa2da7a88ae58c47d7462..f474cc0feed627f20836d7109196f7d759c98337 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
@@ -133,6 +133,8 @@ properties:
- frida,frd350h54004
# FriendlyELEC HD702E 800x1280 LCD panel
- friendlyarm,hd702e
+ # Geekworm MZP280 2.8" 480x640 LCD panel with capacitive touch
+ - geekworm,mzp280
# GiantPlus GPG48273QS5 4.3" (480x272) WQVGA TFT LCD panel
- giantplus,gpg48273qs5
# GiantPlus GPM940B0 3.0" QVGA TFT LCD panel
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 0d306469abd0381128fbbe382712f2152351c218..e8a98ec7632d2fdebaa164e225671eadde8870fb 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -401,6 +401,8 @@ patternProperties:
description: General Electric Company
"^geekbuying,.*":
description: GeekBuying
+ "^geekworm,.*":
+ description: Geekworm
"^gef,.*":
description: GE Fanuc Intelligent Platforms Embedded Systems, Inc.
"^GEFanuc,.*":
diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index 8e0ae032411a14bf84cb8869d24a08b506bde04d..a62c416f1408a4d9f09f570c22d65fe3592a26f0 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -620,6 +620,43 @@ The following tables list existing packed RGB formats.
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
+ * .. _MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
+
+ - MEDIA_BUS_FMT_RGB565_1X24_CPADHI
+ - 0x1020
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ - 0
+ - 0
+ - 0
+ - r\ :sub:`4`
+ - r\ :sub:`3`
+ - r\ :sub:`2`
+ - r\ :sub:`1`
+ - r\ :sub:`0`
+ - 0
+ - 0
+ - g\ :sub:`5`
+ - g\ :sub:`4`
+ - g\ :sub:`3`
+ - g\ :sub:`2`
+ - g\ :sub:`1`
+ - g\ :sub:`0`
+ - 0
+ - 0
+ - 0
+ - b\ :sub:`4`
+ - b\ :sub:`3`
+ - b\ :sub:`2`
+ - b\ :sub:`1`
+ - b\ :sub:`0`
* .. _MEDIA-BUS-FMT-BGR565-2X8-BE:
- MEDIA_BUS_FMT_BGR565_2X8_BE
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4s.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4s.dts
index c0808eca28b341295f6e442a5be47069bb874117..f90785abc92f9b591d3a755066dd281ab2a3a5d0 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4s.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4s.dts
@@ -206,8 +206,6 @@
#include "bcm283x-rpi-csi1-4lane.dtsi"
#include "bcm283x-rpi-i2c0mux_0_28.dtsi"
-/delete-node/ &hdmi1;
-
/ {
chosen {
bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
@@ -418,6 +416,16 @@
};
};
+/* Permanently disable HDMI1 */
+&hdmi1 {
+ compatible = "disabled";
+};
+
+/* Permanently disable DDC1 */
+&ddc1 {
+ compatible = "disabled";
+};
+
&leds {
act_led: led-act {
label = "led0";
diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
index bff07c1748b73049e092650435c5c1a3fde96ad9..6fcacdccb608550f6fdbc4418804d069c876197b 100644
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -194,6 +194,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
spi-gpio35-39.dtbo \
spi-gpio40-45.dtbo \
spi-rtc.dtbo \
+ spi0-0cs.dtbo \
spi0-1cs.dtbo \
spi0-2cs.dtbo \
spi1-1cs.dtbo \
@@ -232,8 +233,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
upstream-pi4.dtbo \
vc4-fkms-v3d.dtbo \
vc4-fkms-v3d-pi4.dtbo \
- vc4-kms-dpi-at056tn53v1.dtbo \
vc4-kms-dpi-generic.dtbo \
+ vc4-kms-dpi-panel.dtbo \
vc4-kms-dsi-7inch.dtbo \
vc4-kms-dsi-lt070me05000.dtbo \
vc4-kms-dsi-lt070me05000-v2.dtbo \
diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README
index f848a7fc87af311c34cdddd5a37e8fc185871e10..3a09615404277ac3feaf139f2baecd5310e051e0 100644
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1725,6 +1725,9 @@ Params: addr Set the address for the BH1750, BME280, BME680,
htu21 Select the HTU21 temperature and humidity sensor
+ int_pin Set the GPIO to use for interrupts (max30102
+ only)
+
lm75 Select the Maxim LM75 temperature sensor
Valid addresses 0x48-0x4f, default 0x4f
@@ -1733,6 +1736,9 @@ Params: addr Set the address for the BH1750, BME280, BME680,
max17040 Select the Maxim Integrated MAX17040 battery
monitor
+ max30102 Select the Maxim Integrated MAX30102 heart-rate
+ and blood-oxygen sensor
+
sht3x Select the Sensiron SHT3x temperature and
humidity sensor. Valid addresses 0x44-0x45,
default 0x44
@@ -3092,6 +3098,14 @@ Params: ds3232 Select the DS3232 device
cs_high This device requires an active-high CS
+Name: spi0-0cs
+Info: Don't claim any CS pins for SPI0. Requires a device with its chip
+ select permanently enabled, but frees a GPIO for e.g. a DPI display.
+Load: dtoverlay=spi0-0cs,=
+Params: no_miso Don't claim and use the MISO pin (9), freeing
+ it for other uses.
+
+
Name: spi0-1cs
Info: Only use one CS pin for SPI0
Load: dtoverlay=spi0-1cs,=
@@ -3593,10 +3607,8 @@ Params: cma-512 CMA is 512MB (needs 1GB)
Name: vc4-kms-dpi-at056tn53v1
-Info: Enable an Innolux 5.6in VGA TFT connected to DPI interface under KMS.
- Requires vc4-kms-v3d to be loaded.
-Load: dtoverlay=vc4-kms-dpi-at056tn53v1
-Params:
+Info: This overlay is now deprecated - see vc4-kms-dpi-panel,at056tn53v1
+Load:
Name: vc4-kms-dpi-generic
@@ -3627,6 +3639,53 @@ Params: clock-frequency Display clock frequency (Hz)
value. NB also overridden by rgbXXX overrides.
backlight-gpio Defines a GPIO to be used for backlight control
(default of none).
+ backlight-pwm Defines a PWM channel to be used for backlight
+ control (default of none). NB Disables audio
+ headphone output as that also uses PWM.
+ backlight-pwm-chan Choose channel on &pwm node for backlight
+ control.
+ (default 0).
+ backlight-pwm-gpio GPIO pin to be used for the PWM backlight. See
+ pwm-2chan for valid options.
+ (default 18 - note this can only work with
+ rgb666-padhi).
+ backlight-pwm-func Pin function of GPIO used for the PWM
+ backlight.
+ See pwm-2chan for valid options.
+ (default 2).
+ backlight-def-brightness
+ Set the default brightness. Normal range 1-16.
+ (default 16).
+ rotate Display rotation {0,90,180,270} (default 0)
+
+
+Name: vc4-kms-dpi-panel
+Info: Enable a preconfigured KMS DPI panel.
+ Requires vc4-kms-v3d to be loaded.
+Load: dtoverlay=vc4-kms-dpi-panel,=
+Params: at056tn53v1 Enable an Innolux 5.6in VGA TFT
+ kippah-7inch Enable an Adafruit Kippah with 7inch panel.
+ mzp280 Enable a Geekworm MZP280 panel.
+ backlight-gpio Defines a GPIO to be used for backlight control
+ (default of none).
+ backlight-pwm Defines a PWM channel to be used for backlight
+ control (default of none). NB Disables audio
+ headphone output as that also uses PWM.
+ backlight-pwm-chan Choose channel on &pwm node for backlight
+ control.
+ (default 0).
+ backlight-pwm-gpio GPIO pin to be used for the PWM backlight. See
+ pwm-2chan for valid options.
+ (default 18 - note this can only work with
+ rgb666-padhi).
+ backlight-pwm-func Pin function of GPIO used for the PWM
+ backlight.
+ See pwm-2chan for valid options.
+ (default 2).
+ backlight-def-brightness
+ Set the default brightness. Normal range 1-16.
+ (default 16).
+ rotate Display rotation {0,90,180,270} (default 0)
Name: vc4-kms-dsi-7inch
@@ -3664,10 +3723,8 @@ Params:
Name: vc4-kms-kippah-7inch
-Info: Enable the Adafruit DPI Kippah with the 7" Ontat panel attached.
- Requires vc4-kms-v3d to be loaded.
-Load: dtoverlay=vc4-kms-kippah-7inch
-Params:
+Info: This overlay is now deprecated - see vc4-kms-dpi-panel,kippah-7inch
+Load:
Name: vc4-kms-v3d
diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
index b05b0fa91942679391170957cf4c213079c089d3..33965be4b1e8dc71450bbf9db5667938c6c73d53 100755
--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
@@ -291,11 +291,30 @@
};
};
+ fragment@19 {
+ target = <&i2c_arm>;
+ __dormant__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ max30102: max30102@57 {
+ compatible = "maxim,max30102";
+ reg = <0x57>;
+ maxim,red-led-current-microamp = <7000>;
+ maxim,ir-led-current-microamp = <7000>;
+ interrupt-parent = <&gpio>;
+ interrupts = <4 2>;
+ };
+ };
+ };
+
__overrides__ {
addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
<&ds1621>,"reg:0", <&bme680>,"reg:0", <&ccs811>,"reg:0",
<&bh1750>,"reg:0";
+ int_pin = <&max30102>, "interrupts:0";
bme280 = <0>,"+0";
bmp085 = <0>,"+1";
bmp180 = <0>,"+2";
@@ -316,5 +335,6 @@
sgp30 = <0>,"+16";
ccs811 = <0>, "+17";
bh1750 = <0>, "+18";
+ max30102 = <0>,"+19";
};
};
diff --git a/arch/arm/boot/dts/overlays/overlay_map.dts b/arch/arm/boot/dts/overlays/overlay_map.dts
index 9fd31bcd55690f31738eb44df1e1306c9ee7462c..0e01f46d8db06ea9908a6a79f88be4b5296a9b1f 100644
--- a/arch/arm/boot/dts/overlays/overlay_map.dts
+++ b/arch/arm/boot/dts/overlays/overlay_map.dts
@@ -151,6 +151,10 @@
bcm2711;
};
+ vc4-kms-dpi-at056tn53v1 {
+ deprecated = "use vc4-kms-dpi-panel,at056tn53v1";
+ };
+
vc4-kms-v3d {
bcm2835;
bcm2711 = "vc4-kms-v3d-pi4";
diff --git a/arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts b/arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts
index cca3e83721b7434bfb94ed820e6690a3c1ec8587..955703563df770f644e61265c26476357f978d9c 100644
--- a/arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts
+++ b/arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts
@@ -11,8 +11,28 @@
fragment@0 {
target-path = "/aliases";
__overlay__ {
+ /*
+ * Removing this alias stops the firmware patching the
+ * PCIE DT dma-ranges based on the detected chip
+ * revision.
+ */
pcie0 = "";
};
};
+ fragment@1 {
+ target = <&pcie0>;
+ __overlay__ {
+ /*
+ * The size of the range is rounded up to a power of 2,
+ * so the range ends up being 0-4GB, and the MSI vector
+ * gets pushed beyond 4GB.
+ */
+ #address-cells = <3>;
+ #size-cells = <2>;
+ dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000
+ 0x0 0x80000000>;
+ };
+ };
+
};
diff --git a/arch/arm/boot/dts/overlays/spi0-0cs-overlay.dts b/arch/arm/boot/dts/overlays/spi0-0cs-overlay.dts
new file mode 100644
index 0000000000000000000000000000000000000000..0d2acabf56a469c9a1163c9827bc2e5082e47a6a
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/spi0-0cs-overlay.dts
@@ -0,0 +1,39 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2835";
+
+ fragment@0 {
+ target = <&spi0_cs_pins>;
+ frag0: __overlay__ {
+ brcm,pins;
+ };
+ };
+
+ fragment@1 {
+ target = <&spi0>;
+ __overlay__ {
+ cs-gpios;
+ status = "okay";
+ };
+ };
+
+ fragment@2 {
+ target = <&spidev1>;
+ __overlay__ {
+ status = "disabled";
+ };
+ };
+
+ fragment@3 {
+ target = <&spi0_pins>;
+ __dormant__ {
+ brcm,pins = <10 11>;
+ };
+ };
+
+ __overrides__ {
+ no_miso = <0>,"=3";
+ };
+};
diff --git a/arch/arm/boot/dts/overlays/vc4-kms-dpi-at056tn53v1-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-dpi-at056tn53v1-overlay.dts
deleted file mode 100644
index f7181c9828bfeb70c19850f5ec6119acf7c42b12..0000000000000000000000000000000000000000
--- a/arch/arm/boot/dts/overlays/vc4-kms-dpi-at056tn53v1-overlay.dts
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * vc4-kms-dpi-at056tn53v1-overlay.dts
- */
-
-/dts-v1/;
-/plugin/;
-
-#include
-#include
-
-/ {
- compatible = "brcm,bcm2835";
-
- fragment@0 {
- target-path = "/";
- __overlay__ {
- panel: panel {
- compatible = "innolux,at056tn53v1", "simple-panel";
-
- port {
- panel_in: endpoint {
- remote-endpoint = <&dpi_out>;
- };
- };
- };
- };
- };
-
- fragment@1 {
- target = <&dpi>;
- __overlay__ {
- status = "okay";
-
- pinctrl-names = "default";
- pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;
-
- port {
- dpi_out: endpoint {
- remote-endpoint = <&panel_in>;
- };
- };
- };
- };
-};
diff --git a/arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts
index 7846d56c1d1a5c465b3d05388559f0d9383e01b1..1e5c5080592b19c1421a57d45ec5ccd94e65802c 100644
--- a/arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts
+++ b/arch/arm/boot/dts/overlays/vc4-kms-dpi-generic-overlay.dts
@@ -1,82 +1,47 @@
/*
- * vc4-kms-dpi-at056tn53v1-overlay.dts
+ * vc4-kms-dpi-generic-overlay.dts
*/
/dts-v1/;
/plugin/;
-#include
-#include
+#include "vc4-kms-dpi.dtsi"
/ {
compatible = "brcm,bcm2835";
fragment@0 {
- target-path = "/";
- __overlay__ {
- panel: panel {
- compatible = "panel-dpi";
-
- width-mm = <154>;
- height-mm = <83>;
- bus-format = <0x1009>;
-
- timing: panel-timing {
- clock-frequency = <29500000>;
- hactive = <800>;
- hfront-porch = <24>;
- hsync-len = <72>;
- hback-porch = <96>;
- hsync-active = <0>;
- vactive = <480>;
- vfront-porch = <3>;
- vsync-len = <10>;
- vback-porch = <7>;
- vsync-active = <0>;
-
- de-active = <1>;
- pixelclk-active = <1>;
- };
-
- port {
- panel_in: endpoint {
- remote-endpoint = <&dpi_out>;
- };
- };
+ target = <&panel>;
+ __overlay__ {
+ compatible = "panel-dpi";
+
+ width-mm = <154>;
+ height-mm = <83>;
+ bus-format = <0x1009>;
+
+ timing: panel-timing {
+ clock-frequency = <29500000>;
+ hactive = <800>;
+ hfront-porch = <24>;
+ hsync-len = <72>;
+ hback-porch = <96>;
+ hsync-active = <1>;
+ vactive = <480>;
+ vfront-porch = <3>;
+ vsync-len = <10>;
+ vback-porch = <7>;
+ vsync-active = <1>;
+
+ de-active = <1>;
+ pixelclk-active = <1>;
};
};
};
fragment@1 {
target = <&dpi>;
- dpi_node: __overlay__ {
- status = "okay";
-
- pinctrl-names = "default";
+ __overlay__ {
pinctrl-0 = <&dpi_18bit_gpio0>;
-
- port {
- dpi_out: endpoint {
- remote-endpoint = <&panel_in>;
- };
- };
- };
- };
-
- fragment@2 {
- target = <&panel>;
- __dormant__ {
- backlight = <&backlight>;
- };
- };
-
- fragment@3 {
- target-path = "/";
- __dormant__ {
- backlight: backlight {
- compatible = "gpio-backlight";
- gpios = <&gpio 255 GPIO_ACTIVE_HIGH>;
- };
};
};
@@ -105,7 +70,5 @@
rgb888 = <&panel>, "bus-format:0=0x100a",
<&dpi_node>, "pinctrl-0:0=",<&dpi_gpio0>;
bus-format = <&panel>, "bus-format:0";
- backlight-gpio = <0>, "+2+3",
- <&backlight>, "gpios:4";
};
};
diff --git a/arch/arm/boot/dts/overlays/vc4-kms-dpi-panel-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-dpi-panel-overlay.dts
new file mode 100644
index 0000000000000000000000000000000000000000..ee9e2e8fd2468ca1167b78d5fb36b49161d7a898
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/vc4-kms-dpi-panel-overlay.dts
@@ -0,0 +1,69 @@
+/*
+ * vc4-kms-dpi-panel-overlay.dts
+ * Support for any predefined DPI panel.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include "vc4-kms-dpi.dtsi"
+
+/ {
+ compatible = "brcm,bcm2835";
+
+ fragment@0 {
+ target = <&panel>;
+ __dormant__ {
+ compatible = "innolux,at056tn53v1", "simple-panel";
+ };
+ };
+ fragment@1 {
+ target = <&panel>;
+ __dormant__ {
+ compatible = "ontat,yx700wv03", "simple-panel";
+ };
+ };
+ fragment@2 {
+ target = <&panel>;
+ __dormant__ {
+ compatible = "geekworm,mzp280", "simple-panel";
+ };
+ };
+
+ fragment@90 {
+ target = <&dpi>;
+ __dormant__ {
+ pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;
+ };
+ };
+ fragment@91 {
+ target = <&dpi>;
+ __dormant__ {
+ pinctrl-0 = <&dpi_18bit_gpio0>;
+ };
+ };
+ fragment@92 {
+ target = <&dpi>;
+ __dormant__ {
+ pinctrl-0 = <&dpi_gpio0>;
+ };
+ };
+ fragment@93 {
+ target = <&dpi>;
+ __dormant__ {
+ pinctrl-0 = <&dpi_16bit_cpadhi_gpio0>;
+ };
+ };
+ fragment@94 {
+ target = <&dpi>;
+ __dormant__ {
+ pinctrl-0 = <&dpi_16bit_gpio0>;
+ };
+ };
+
+ __overrides__ {
+ at056tn53v1 = <0>, "+0+90";
+ kippah-7inch = <0>, "+1+91";
+ mzp280 = <0>, "+2+93";
+ };
+};
diff --git a/arch/arm/boot/dts/overlays/vc4-kms-dpi.dtsi b/arch/arm/boot/dts/overlays/vc4-kms-dpi.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..f78fa48b19f9029abed4369de9eea37636839984
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/vc4-kms-dpi.dtsi
@@ -0,0 +1,111 @@
+/*
+ * vc4-kms-dpi.dtsi
+ */
+
+#include
+#include
+
+/ {
+ fragment@100 {
+ target-path = "/";
+ __overlay__ {
+ panel: panel {
+ rotation = <0>;
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&dpi_out>;
+ };
+ };
+ };
+ };
+ };
+
+ fragment@101 {
+ target = <&dpi>;
+ dpi_node: __overlay__ {
+ status = "okay";
+
+ pinctrl-names = "default";
+
+ port {
+ dpi_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+ };
+
+ fragment@102 {
+ target = <&panel>;
+ __dormant__ {
+ backlight = <&backlight>;
+ };
+ };
+
+ fragment@103 {
+ target-path = "/";
+ __dormant__ {
+ backlight: backlight {
+ compatible = "gpio-backlight";
+ gpios = <&gpio 255 GPIO_ACTIVE_HIGH>;
+ };
+ };
+ };
+
+ fragment@104 {
+ target = <&panel>;
+ __dormant__ {
+ backlight = <&backlight_pwm>;
+ };
+ };
+
+ fragment@105 {
+ target-path = "/";
+ __dormant__ {
+ backlight_pwm: backlight_pwm {
+ compatible = "pwm-backlight";
+ brightness-levels = <0 6 8 12 16 24 32 40 48 64 96 128 160 192 224 255>;
+ default-brightness-level = <16>;
+ pwms = <&pwm 0 200000>;
+ };
+ };
+ };
+
+ fragment@106 {
+ target = <&pwm>;
+ __dormant__ {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm_pins>;
+ assigned-clock-rates = <1000000>;
+ status = "okay";
+ };
+ };
+
+ fragment@107 {
+ target = <&gpio>;
+ __dormant__ {
+ pwm_pins: pwm_pins {
+ brcm,pins = <18>;
+ brcm,function = <2>; /* Alt5 */
+ };
+ };
+ };
+
+ fragment@108 {
+ target = <&audio>;
+ __dormant__ {
+ brcm,disable-headphones;
+ };
+ };
+
+ __overrides__ {
+ backlight-gpio = <0>, "+102+103",
+ <&backlight>, "gpios:4";
+ backlight-pwm = <0>, "+104+105+106+107+108";
+ backlight-pwm-chan = <&backlight_pwm>, "pwms:4";
+ backlight-pwm-gpio = <&pwm_pins>, "brcm,pins:0";
+ backlight-pwm-func = <&pwm_pins>, "brcm,function:0";
+ backlight-def-brightness = <&backlight_pwm>, "default-brightness-level:0";
+ rotate = <&panel>, "rotation:0";
+ };
+};
diff --git a/arch/arm/boot/dts/overlays/vc4-kms-kippah-7inch-overlay.dts b/arch/arm/boot/dts/overlays/vc4-kms-kippah-7inch-overlay.dts
index b03394844abd9b226bf3d7b901f1ce68efc8c33c..4c1aa1c70158997ab40eac9478d3da70c9be412a 100644
--- a/arch/arm/boot/dts/overlays/vc4-kms-kippah-7inch-overlay.dts
+++ b/arch/arm/boot/dts/overlays/vc4-kms-kippah-7inch-overlay.dts
@@ -1,43 +1,26 @@
/*
- * vc4-kms-v3d-overlay.dts
+ * vc4-kms-kippah-7inch-overlay.dts
*/
/dts-v1/;
/plugin/;
-#include
+#include "vc4-kms-dpi.dtsi"
/ {
compatible = "brcm,bcm2835";
fragment@0 {
- target-path = "/";
- __overlay__ {
- panel: panel {
- compatible = "ontat,yx700wv03", "simple-panel";
-
- port {
- panel_in: endpoint {
- remote-endpoint = <&dpi_out>;
- };
- };
- };
+ target = <&panel>;
+ __overlay__ {
+ compatible = "ontat,yx700wv03", "simple-panel";
};
};
fragment@1 {
target = <&dpi>;
__overlay__ {
- status = "okay";
-
- pinctrl-names = "default";
pinctrl-0 = <&dpi_18bit_gpio0>;
-
- port {
- dpi_out: endpoint@0 {
- remote-endpoint = <&panel_in>;
- };
- };
};
};
};
diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig
index 04a38fe4c6d99f3e038559ef2141f4ff5c912807..f2074da8a80ddda91962262ff308ed27e9914ed6 100644
--- a/arch/arm/configs/bcm2709_defconfig
+++ b/arch/arm/configs/bcm2709_defconfig
@@ -1366,6 +1366,7 @@ CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SENSIRION_SGP30=m
CONFIG_SPS30=m
+CONFIG_MAX30102=m
CONFIG_DHT11=m
CONFIG_HDC100X=m
CONFIG_HTU21=m
diff --git a/arch/arm/configs/bcm2711_defconfig b/arch/arm/configs/bcm2711_defconfig
index 77cccb33de2a5aaed2997dc75999bc304fc9ed94..8f4ae82cade4f6e9ed7d7967abc9e378d6a0e9b3 100644
--- a/arch/arm/configs/bcm2711_defconfig
+++ b/arch/arm/configs/bcm2711_defconfig
@@ -1388,6 +1388,7 @@ CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SENSIRION_SGP30=m
CONFIG_SPS30=m
+CONFIG_MAX30102=m
CONFIG_DHT11=m
CONFIG_HDC100X=m
CONFIG_HTU21=m
diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig
index f2a474cdad5602deb0ffb9090aa39e302c80ba53..b3ea44509d98d44f0a84ac3c9d27a3c9e1aaaa1b 100644
--- a/arch/arm/configs/bcmrpi_defconfig
+++ b/arch/arm/configs/bcmrpi_defconfig
@@ -1359,6 +1359,7 @@ CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SENSIRION_SGP30=m
CONFIG_SPS30=m
+CONFIG_MAX30102=m
CONFIG_DHT11=m
CONFIG_HDC100X=m
CONFIG_HTU21=m
diff --git a/arch/arm64/configs/bcm2711_defconfig b/arch/arm64/configs/bcm2711_defconfig
index b8e434797aa9a1c538f7ea0aa503003d576104fc..75333e69ef741b856ec4f5b67772c7dd541ad685 100644
--- a/arch/arm64/configs/bcm2711_defconfig
+++ b/arch/arm64/configs/bcm2711_defconfig
@@ -1395,6 +1395,7 @@ CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SENSIRION_SGP30=m
CONFIG_SPS30=m
+CONFIG_MAX30102=m
CONFIG_DHT11=m
CONFIG_HDC100X=m
CONFIG_HTU21=m
diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig
index 57073001891c46a70e63e9ec81f448d67a6cdad8..419813140a52867d4a9a9068431cdb762e3f1a17 100644
--- a/arch/arm64/configs/bcmrpi3_defconfig
+++ b/arch/arm64/configs/bcmrpi3_defconfig
@@ -1250,6 +1250,7 @@ CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SENSIRION_SGP30=m
CONFIG_SPS30=m
+CONFIG_MAX30102=m
CONFIG_DHT11=m
CONFIG_HTU21=m
CONFIG_APDS9960=m
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index e0859f4e2807351dc8d6cf4900e1c1c7ebce44b6..7fda81dac4f9e326b9355787e0dc67a306b6919e 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -419,6 +419,14 @@ static const struct usb_device_id blacklist_table[] = {
{ USB_DEVICE(0x0bda, 0xb009), .driver_info = BTUSB_REALTEK },
{ USB_DEVICE(0x2ff8, 0xb011), .driver_info = BTUSB_REALTEK },
+ /* Additional Realtek 8761B Bluetooth devices */
+ { USB_DEVICE(0x2357, 0x0604), .driver_info = BTUSB_REALTEK |
+ BTUSB_WIDEBAND_SPEECH },
+
+ /* Additional Realtek 8761BU Bluetooth devices */
+ { USB_DEVICE(0x0b05, 0x190e), .driver_info = BTUSB_REALTEK |
+ BTUSB_WIDEBAND_SPEECH },
+
/* Additional Realtek 8821AE Bluetooth devices */
{ USB_DEVICE(0x0b05, 0x17dc), .driver_info = BTUSB_REALTEK },
{ USB_DEVICE(0x13d3, 0x3414), .driver_info = BTUSB_REALTEK },
diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
index c916f4b8907ef306fbaf801e92a0f3d851ec6c23..a63d6d238e3c85aed67b0daf472b5efd6e4761c8 100644
--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -79,6 +79,10 @@ static int panel_bridge_attach(struct drm_bridge *bridge,
return ret;
}
+ /* set up connector's "panel orientation" property */
+ drm_connector_set_panel_orientation(&panel_bridge->connector,
+ panel_bridge->panel->orientation);
+
drm_connector_attach_encoder(&panel_bridge->connector,
bridge->encoder);
diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index f634371c717a856b2e66961a58df77a7bf5012ed..bee5066e9227171775273c2eb5e9ef7d9786432c 100644
--- a/drivers/gpu/drm/drm_panel.c
+++ b/drivers/gpu/drm/drm_panel.c
@@ -61,6 +61,9 @@ void drm_panel_init(struct drm_panel *panel, struct device *dev,
panel->dev = dev;
panel->funcs = funcs;
panel->connector_type = connector_type;
+
+ panel->orientation = DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
+ of_drm_get_panel_orientation(dev->of_node, &panel->orientation);
}
EXPORT_SYMBOL(drm_panel_init);
@@ -289,16 +292,18 @@ int of_drm_get_panel_orientation(const struct device_node *np,
if (ret < 0)
return ret;
- if (rotation == 0)
+ if (rotation == 0) {
*orientation = DRM_MODE_PANEL_ORIENTATION_NORMAL;
- else if (rotation == 90)
+ } else if (rotation == 90) {
*orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP;
- else if (rotation == 180)
+ } else if (rotation == 180) {
*orientation = DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP;
- else if (rotation == 270)
+ } else if (rotation == 270) {
*orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP;
- else
+ } else {
+ DRM_ERROR("%pOF: invalid orientation %d\n", np, ret);
return -EINVAL;
+ }
return 0;
}
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index e99168cc2ae4e5bc9edeb72c09abb0651cadf89f..08d26e81cbfb618e3053d1c21daeeea35e808b93 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -112,8 +112,6 @@ struct panel_simple {
struct gpio_desc *hpd_gpio;
struct drm_display_mode override_mode;
-
- enum drm_panel_orientation orientation;
};
static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
@@ -373,9 +371,6 @@ static int panel_simple_get_modes(struct drm_panel *panel,
/* add hard-coded panel modes */
num += panel_simple_get_non_edid_modes(p, connector);
- /* set up connector's "panel orientation" property */
- drm_connector_set_panel_orientation(connector, p->orientation);
-
return num;
}
@@ -540,12 +535,6 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
return err;
}
- err = of_drm_get_panel_orientation(dev->of_node, &panel->orientation);
- if (err) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
- return err;
- }
-
ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
if (ddc) {
panel->ddc = of_find_i2c_adapter_by_node(ddc);
@@ -1943,6 +1932,32 @@ static const struct panel_desc friendlyarm_hd702e = {
},
};
+static const struct drm_display_mode geekworm_mzp280_mode = {
+ .clock = 32000,
+ .hdisplay = 480,
+ .hsync_start = 480 + 41,
+ .hsync_end = 480 + 41 + 20,
+ .htotal = 480 + 41 + 20 + 60,
+ .vdisplay = 640,
+ .vsync_start = 640 + 5,
+ .vsync_end = 640 + 5 + 10,
+ .vtotal = 640 + 5 + 10 + 10,
+ .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+};
+
+static const struct panel_desc geekworm_mzp280 = {
+ .modes = &geekworm_mzp280_mode,
+ .num_modes = 1,
+ .bpc = 6,
+ .size = {
+ .width = 47,
+ .height = 61,
+ },
+ .bus_format = MEDIA_BUS_FMT_RGB565_1X24_CPADHI,
+ .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
+ .connector_type = DRM_MODE_CONNECTOR_DPI,
+};
+
static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
.clock = 9000,
.hdisplay = 480,
@@ -4118,6 +4133,9 @@ static const struct of_device_id platform_of_match[] = {
}, {
.compatible = "friendlyarm,hd702e",
.data = &friendlyarm_hd702e,
+ }, {
+ .compatible = "geekworm,mzp280",
+ .data = &geekworm_mzp280,
}, {
.compatible = "giantplus,gpg482739qs5",
.data = &giantplus_gpg482739qs5
diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
index 08147d0eab8370f3166bd42ba3ca1b45d05ecbee..0d4fb6818d51618a3aeebe81ad83858877f4457e 100644
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
@@ -191,6 +191,10 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3,
DPI_FORMAT);
break;
+ case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
+ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_2,
+ DPI_FORMAT);
+ break;
}
} else {
/* Default to 18bit if no connector found. */
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index d71cd43785053a4f119e19f47d2604d034b523e9..f1e0e0064b09e1c4588009dd1bd2b80b2ce04501 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -58,6 +58,14 @@
#include "vc4_hdmi_regs.h"
#include "vc4_regs.h"
+/*
+ * "Broadcast RGB" property.
+ * Allows overriding of HDMI full or limited range RGB
+ */
+#define VC4_BROADCAST_RGB_AUTO 0
+#define VC4_BROADCAST_RGB_FULL 1
+#define VC4_BROADCAST_RGB_LIMITED 2
+
#define VC5_HDMI_HORZA_HFP_SHIFT 16
#define VC5_HDMI_HORZA_HFP_MASK VC4_MASK(28, 16)
#define VC5_HDMI_HORZA_VPOS BIT(15)
@@ -136,6 +144,10 @@ static bool vc4_hdmi_is_full_range_rgb(struct vc4_hdmi *vc4_hdmi,
{
struct vc4_hdmi_encoder *vc4_encoder = &vc4_hdmi->encoder;
+ if (vc4_hdmi->broadcast_rgb == VC4_BROADCAST_RGB_LIMITED)
+ return false;
+ else if (vc4_hdmi->broadcast_rgb == VC4_BROADCAST_RGB_FULL)
+ return true;
return !vc4_encoder->hdmi_monitor ||
drm_default_rgb_quant_range(mode) == HDMI_QUANTIZATION_RANGE_FULL;
}
@@ -346,6 +358,65 @@ static int vc4_hdmi_connector_atomic_check(struct drm_connector *connector,
return 0;
}
+/**
+ * vc4_hdmi_connector_atomic_get_property - hook for
+ * connector->atomic_get_property.
+ * @connector: Connector to get the property for.
+ * @state: Connector state to retrieve the property from.
+ * @property: Property to retrieve.
+ * @val: Return value for the property.
+ *
+ * Returns the atomic property value for a digital connector.
+ */
+int vc4_hdmi_connector_get_property(struct drm_connector *connector,
+ const struct drm_connector_state *state,
+ struct drm_property *property,
+ uint64_t *val)
+{
+ struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector);
+ const struct vc4_hdmi_connector_state *vc4_conn_state =
+ const_conn_state_to_vc4_hdmi_conn_state(state);
+
+ if (property == vc4_hdmi->broadcast_rgb_property) {
+ *val = vc4_conn_state->broadcast_rgb;
+ } else {
+ DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n",
+ property->base.id, property->name);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+/**
+ * vc4_hdmi_connector_atomic_set_property - hook for
+ * connector->atomic_set_property.
+ * @connector: Connector to set the property for.
+ * @state: Connector state to set the property on.
+ * @property: Property to set.
+ * @val: New value for the property.
+ *
+ * Sets the atomic property value for a digital connector.
+ */
+int vc4_hdmi_connector_set_property(struct drm_connector *connector,
+ struct drm_connector_state *state,
+ struct drm_property *property,
+ uint64_t val)
+{
+ struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector);
+ struct vc4_hdmi_connector_state *vc4_conn_state =
+ conn_state_to_vc4_hdmi_conn_state(state);
+
+ if (property == vc4_hdmi->broadcast_rgb_property) {
+ vc4_conn_state->broadcast_rgb = val;
+ return 0;
+ }
+
+ DRM_DEBUG_ATOMIC("Unknown property [PROP:%d:%s]\n",
+ property->base.id, property->name);
+ return -EINVAL;
+}
+
static void vc4_hdmi_connector_reset(struct drm_connector *connector)
{
struct vc4_hdmi_connector_state *old_state =
@@ -382,6 +453,7 @@ vc4_hdmi_connector_duplicate_state(struct drm_connector *connector)
new_state->pixel_rate = vc4_state->pixel_rate;
new_state->output_bpc = vc4_state->output_bpc;
new_state->output_format = vc4_state->output_format;
+ new_state->broadcast_rgb = vc4_state->broadcast_rgb;
__drm_atomic_helper_connector_duplicate_state(connector, &new_state->base);
return &new_state->base;
@@ -394,6 +466,8 @@ static const struct drm_connector_funcs vc4_hdmi_connector_funcs = {
.reset = vc4_hdmi_connector_reset,
.atomic_duplicate_state = vc4_hdmi_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
+ .atomic_get_property = vc4_hdmi_connector_get_property,
+ .atomic_set_property = vc4_hdmi_connector_set_property,
};
static const struct drm_connector_helper_funcs vc4_hdmi_connector_helper_funcs = {
@@ -401,6 +475,32 @@ static const struct drm_connector_helper_funcs vc4_hdmi_connector_helper_funcs =
.atomic_check = vc4_hdmi_connector_atomic_check,
};
+static const struct drm_prop_enum_list broadcast_rgb_names[] = {
+ { VC4_BROADCAST_RGB_AUTO, "Automatic" },
+ { VC4_BROADCAST_RGB_FULL, "Full" },
+ { VC4_BROADCAST_RGB_LIMITED, "Limited 16:235" },
+};
+
+static void
+vc4_hdmi_attach_broadcast_rgb_property(struct drm_device *dev,
+ struct vc4_hdmi *vc4_hdmi)
+{
+ struct drm_property *prop = vc4_hdmi->broadcast_rgb_property;
+
+ if (!prop) {
+ prop = drm_property_create_enum(dev, DRM_MODE_PROP_ENUM,
+ "Broadcast RGB",
+ broadcast_rgb_names,
+ ARRAY_SIZE(broadcast_rgb_names));
+ if (!prop)
+ return;
+
+ vc4_hdmi->broadcast_rgb_property = prop;
+ }
+
+ drm_object_attach_property(&vc4_hdmi->connector.base, prop, 0);
+}
+
static int vc4_hdmi_connector_init(struct drm_device *dev,
struct vc4_hdmi *vc4_hdmi)
{
@@ -444,6 +544,8 @@ static int vc4_hdmi_connector_init(struct drm_device *dev,
if (vc4_hdmi->variant->supports_hdr)
drm_connector_attach_hdr_output_metadata_property(connector);
+ vc4_hdmi_attach_broadcast_rgb_property(dev, vc4_hdmi);
+
drm_connector_attach_encoder(connector, encoder);
return 0;
@@ -1385,6 +1487,7 @@ static void vc4_hdmi_encoder_atomic_mode_set(struct drm_encoder *encoder,
mutex_lock(&vc4_hdmi->mutex);
vc4_hdmi->output_bpc = vc4_state->output_bpc;
vc4_hdmi->output_format = vc4_state->output_format;
+ vc4_hdmi->broadcast_rgb = vc4_state->broadcast_rgb;
memcpy(&vc4_hdmi->saved_adjusted_mode,
&crtc_state->adjusted_mode,
sizeof(vc4_hdmi->saved_adjusted_mode));
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h
index 3dd0d2a53a44583c6dd5a3021f5d49bcb7ca2cf1..fa57d853b100d69288a3d4812b06802ca2a254af 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.h
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
@@ -142,6 +142,8 @@ struct vc4_hdmi {
struct delayed_work scrambling_work;
+ struct drm_property *broadcast_rgb_property;
+
struct i2c_adapter *ddc;
void __iomem *hdmicore_regs;
void __iomem *hd_regs;
@@ -254,6 +256,12 @@ struct vc4_hdmi {
* for use outside of KMS hooks. Protected by @mutex.
*/
enum vc4_hdmi_output_format output_format;
+
+ /**
+ * @broadcast_rgb: Copy of @vc4_connector_state.broadcast_rgb
+ * for use outside of KMS hooks. Protected by @mutex.
+ */
+ int broadcast_rgb;
};
static inline struct vc4_hdmi *
@@ -275,6 +283,7 @@ struct vc4_hdmi_connector_state {
unsigned long long pixel_rate;
unsigned int output_bpc;
enum vc4_hdmi_output_format output_format;
+ int broadcast_rgb;
};
static inline struct vc4_hdmi_connector_state *
@@ -283,6 +292,12 @@ conn_state_to_vc4_hdmi_conn_state(struct drm_connector_state *conn_state)
return container_of(conn_state, struct vc4_hdmi_connector_state, base);
}
+static inline const struct vc4_hdmi_connector_state *
+const_conn_state_to_vc4_hdmi_conn_state(const struct drm_connector_state *conn_state)
+{
+ return container_of(conn_state, struct vc4_hdmi_connector_state, base);
+}
+
void vc4_hdmi_phy_init(struct vc4_hdmi *vc4_hdmi,
struct vc4_hdmi_connector_state *vc4_conn_state);
void vc4_hdmi_phy_disable(struct vc4_hdmi *vc4_hdmi);
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index 074bdfdb184c07901cc31dc7b7659657de0944f8..766280a844f4327e831ea72813e3400cb3feac3f 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -135,6 +135,34 @@ static const struct hvs_format {
.pixel_order = HVS_PIXEL_ORDER_XYCBCR,
.hvs5_only = true,
},
+ {
+ .drm = DRM_FORMAT_XRGB2101010,
+ .hvs = HVS_PIXEL_FORMAT_RGBA1010102,
+ .pixel_order = HVS_PIXEL_ORDER_ABGR,
+ .pixel_order_hvs5 = HVS_PIXEL_ORDER_ARGB,
+ .hvs5_only = true,
+ },
+ {
+ .drm = DRM_FORMAT_ARGB2101010,
+ .hvs = HVS_PIXEL_FORMAT_RGBA1010102,
+ .pixel_order = HVS_PIXEL_ORDER_ABGR,
+ .pixel_order_hvs5 = HVS_PIXEL_ORDER_ARGB,
+ .hvs5_only = true,
+ },
+ {
+ .drm = DRM_FORMAT_ABGR2101010,
+ .hvs = HVS_PIXEL_FORMAT_RGBA1010102,
+ .pixel_order = HVS_PIXEL_ORDER_ARGB,
+ .pixel_order_hvs5 = HVS_PIXEL_ORDER_ABGR,
+ .hvs5_only = true,
+ },
+ {
+ .drm = DRM_FORMAT_XBGR2101010,
+ .hvs = HVS_PIXEL_FORMAT_RGBA1010102,
+ .pixel_order = HVS_PIXEL_ORDER_ARGB,
+ .pixel_order_hvs5 = HVS_PIXEL_ORDER_ABGR,
+ .hvs5_only = true,
+ },
};
static const struct hvs_format *vc4_get_hvs_format(u32 drm_format)
@@ -855,53 +883,34 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
case DRM_FORMAT_MOD_BROADCOM_SAND128:
case DRM_FORMAT_MOD_BROADCOM_SAND256: {
uint32_t param = fourcc_mod_broadcom_param(fb->modifier);
- u32 tile_w, tile, x_off, pix_per_tile;
- if (fb->format->format == DRM_FORMAT_P030) {
- /*
- * Spec says: bits [31:4] of the given address should point to
- * the 128-bit word containing the desired starting pixel,
- * and bits[3:0] should be between 0 and 11, indicating which
- * of the 12-pixels in that 128-bit word is the first pixel to be used
- */
- u32 remaining_pixels = vc4_state->src_x % 96;
- u32 aligned = remaining_pixels / 12;
- u32 last_bits = remaining_pixels % 12;
+ if (param > SCALER_TILE_HEIGHT_MASK) {
+ DRM_DEBUG_KMS("SAND height too large (%d)\n",
+ param);
+ return -EINVAL;
+ }
- x_off = aligned * 16 + last_bits;
+ if (fb->format->format == DRM_FORMAT_P030) {
hvs_format = HVS_PIXEL_FORMAT_YCBCR_10BIT;
tiling = SCALER_CTL0_TILING_128B;
- tile_w = 128;
- pix_per_tile = 96;
} else {
hvs_format = HVS_PIXEL_FORMAT_H264;
switch (base_format_mod) {
case DRM_FORMAT_MOD_BROADCOM_SAND64:
tiling = SCALER_CTL0_TILING_64B;
- tile_w = 64;
break;
case DRM_FORMAT_MOD_BROADCOM_SAND128:
tiling = SCALER_CTL0_TILING_128B;
- tile_w = 128;
break;
case DRM_FORMAT_MOD_BROADCOM_SAND256:
tiling = SCALER_CTL0_TILING_256B_OR_T;
- tile_w = 256;
break;
default:
- break;
+ return -EINVAL;
}
- pix_per_tile = tile_w / fb->format->cpp[0];
- x_off = (vc4_state->src_x % pix_per_tile) /
- (i ? h_subsample : 1) * fb->format->cpp[i];
}
- if (param > SCALER_TILE_HEIGHT_MASK) {
- DRM_DEBUG_KMS("SAND height too large (%d)\n",
- param);
- return -EINVAL;
- }
- tile = vc4_state->src_x / pix_per_tile;
+
/* Adjust the base pointer to the first pixel to be scanned
* out.
*
@@ -913,6 +922,46 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
* should be 6.
*/
for (i = 0; i < num_planes; i++) {
+ u32 tile_w, tile, x_off, pix_per_tile;
+
+ if (fb->format->format == DRM_FORMAT_P030) {
+ /*
+ * Spec says: bits [31:4] of the given address
+ * should point to the 128-bit word containing
+ * the desired starting pixel, and bits[3:0]
+ * should be between 0 and 11, indicating which
+ * of the 12-pixels in that 128-bit word is the
+ * first pixel to be used
+ */
+ u32 remaining_pixels = vc4_state->src_x % 96;
+ u32 aligned = remaining_pixels / 12;
+ u32 last_bits = remaining_pixels % 12;
+
+ x_off = aligned * 16 + last_bits;
+ tile_w = 128;
+ pix_per_tile = 96;
+ } else {
+ switch (base_format_mod) {
+ case DRM_FORMAT_MOD_BROADCOM_SAND64:
+ tile_w = 64;
+ break;
+ case DRM_FORMAT_MOD_BROADCOM_SAND128:
+ tile_w = 128;
+ break;
+ case DRM_FORMAT_MOD_BROADCOM_SAND256:
+ tile_w = 256;
+ break;
+ default:
+ return -EINVAL;
+ }
+ pix_per_tile = tile_w / fb->format->cpp[0];
+ x_off = (vc4_state->src_x % pix_per_tile) /
+ (i ? h_subsample : 1) *
+ fb->format->cpp[i];
+ }
+
+ tile = vc4_state->src_x / pix_per_tile;
+
vc4_state->offsets[i] += param * tile_w * tile;
vc4_state->offsets[i] += src_y /
(i ? v_subsample : 1) *
diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c
index 5b2589b6b9cc8de9a6472e93ff1dbb76ce849d0a..7d8e183bb5338f1f7ec6b93be6e21af32ce41354 100644
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -55,6 +55,10 @@ static unsigned int debug;
module_param(debug, uint, 0644);
MODULE_PARM_DESC(debug, "1=err, 2=isr, 3=xfer");
+static unsigned int clk_tout_ms = 35; /* SMBUs-recommended 35ms */
+module_param(clk_tout_ms, uint, 0644);
+MODULE_PARM_DESC(clk_tout_ms, "clock-stretch timeout (mS)");
+
#define BCM2835_DEBUG_MAX 512
struct bcm2835_debug {
struct i2c_msg *msg;
@@ -214,12 +218,12 @@ static int clk_bcm2835_i2c_set_rate(struct clk_hw *hw, unsigned long rate,
(redl << BCM2835_I2C_REDL_SHIFT));
/*
- * Set the clock stretch timeout to the SMBUs-recommended 35ms.
+ * Set the clock stretch timeout.
*/
- if (rate > 0xffff*1000/35)
+ if (rate > 0xffff*1000/clk_tout_ms)
clk_tout = 0xffff;
else
- clk_tout = 35*rate/1000;
+ clk_tout = clk_tout_ms*rate/1000;
bcm2835_i2c_writel(div->i2c_dev, BCM2835_I2C_CLKT, clk_tout);
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 9983eeded62443dbcb29405c64986444278cf172..65ccc94a92828a287a9829d1de762415dde580dd 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -185,6 +185,8 @@ static int lan87xx_read_status(struct phy_device *phydev)
int err = genphy_read_status(phydev);
if (!phydev->link && priv->energy_enable) {
+ int energy_detected;
+
/* Disable EDPD to wake up PHY */
int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
if (rc < 0)
@@ -200,7 +202,7 @@ static int lan87xx_read_status(struct phy_device *phydev)
*/
read_poll_timeout(phy_read, rc,
rc & MII_LAN83C185_ENERGYON || rc < 0,
- 10000, 1500000, true, phydev,
+ 150000, 1500000, true, phydev,
MII_LAN83C185_CTRL_STATUS);
if (rc < 0)
return rc;
@@ -210,10 +212,16 @@ static int lan87xx_read_status(struct phy_device *phydev)
if (rc < 0)
return rc;
+ energy_detected = !!(rc & MII_LAN83C185_ENERGYON);
+
rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS,
rc | MII_LAN83C185_EDPWRDOWN);
if (rc < 0)
return rc;
+
+ /* Save CPU and power by deferring the next poll */
+ if (!energy_detected)
+ msleep(2000);
}
return err;
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 2da884e795a9d9514aab357196ab36fbe60d7690..54b3eb586b7efae6abf80048f3a03057270fe030 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -1685,6 +1685,7 @@ static const struct ethtool_ops lan78xx_ethtool_ops = {
.set_link_ksettings = lan78xx_set_link_ksettings,
.get_regs_len = lan78xx_get_regs_len,
.get_regs = lan78xx_get_regs,
+ .get_ts_info = ethtool_op_get_ts_info,
};
static void lan78xx_init_mac_address(struct lan78xx_net *dev)
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 33605c3f0ebaa5c7934ec9a2c5bc79a1d99c5889..87825690579182a69878ff679acea16ffd9f0ebe 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -165,6 +165,14 @@ struct drm_panel {
*/
int connector_type;
+ /**
+ * @orientation:
+ *
+ * Panel orientation at initialisation. This is used to initialise the
+ * drm_connector property for panel orientation.
+ */
+ enum drm_panel_orientation orientation;
+
/**
* @list:
*
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index c4abd49af073ae377a557c605570f053cf433d68..33574f0fb793615e4182a0e796aaba414105f2c8 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -34,13 +34,14 @@
#define MEDIA_BUS_FMT_FIXED 0x0001
-/* RGB - next is 0x1020 */
+/* RGB - next is 0x1021 */
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004
#define MEDIA_BUS_FMT_RGB565_1X16 0x1017
+#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI 0x1020
#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005
#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007