Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/spi/spi-gpio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ properties:
with no chip select is connected.
$ref: "/schemas/types.yaml#/definitions/uint32"

sck-idle-input:
description: Make SCK an input when inactive.
type: boolean

# Deprecated properties
gpio-sck: false
gpio-miso: false
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
vc4-fkms-v3d.dtbo \
vc4-fkms-v3d-pi4.dtbo \
vc4-kms-dpi-generic.dtbo \
vc4-kms-dpi-hyperpixel2r.dtbo \
vc4-kms-dpi-hyperpixel4.dtbo \
vc4-kms-dpi-hyperpixel4sq.dtbo \
vc4-kms-dpi-panel.dtbo \
vc4-kms-dsi-7inch.dtbo \
vc4-kms-dsi-lt070me05000.dtbo \
Expand Down
33 changes: 33 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -3676,6 +3676,39 @@ Params: clock-frequency Display clock frequency (Hz)
rotate Display rotation {0,90,180,270} (default 0)


Name: vc4-kms-dpi-hyperpixel2r
Info: Enable the KMS drivers for the Pimoroni HyperPixel2 Round DPI display.
Requires vc4-kms-v3d to be loaded.
Load: dtoverlay=vc4-kms-dpi-hyperpixel2r,<param>=<val>
Params: disable-touch Disables the touch controller
touchscreen-inverted-x Inverts X direction of touch controller
touchscreen-inverted-y Inverts Y direction of touch controller
touchscreen-swapped-x-y Swaps X & Y axes of touch controller
rotate Display rotation {0,90,180,270} (default 0)


Name: vc4-kms-dpi-hyperpixel4
Info: Enable the KMS drivers for the Pimoroni HyperPixel4 DPI display.
Requires vc4-kms-v3d to be loaded.
Load: dtoverlay=vc4-kms-dpi-hyperpixel4,<param>=<val>
Params: disable-touch Disables the touch controller
touchscreen-inverted-x Inverts X direction of touch controller
touchscreen-inverted-y Inverts Y direction of touch controller
touchscreen-swapped-x-y Swaps X & Y axes of touch controller
rotate Display rotation {0,90,180,270} (default 0)


Name: vc4-kms-dpi-hyperpixel4sq
Info: Enable the KMS drivers for the Pimoroni HyperPixel4 Square DPI display.
Requires vc4-kms-v3d to be loaded.
Load: dtoverlay=vc4-kms-dpi-hyperpixel4sq,<param>=<val>
Params: disable-touch Disables the touch controller
touchscreen-inverted-x Inverts X direction of touch controller
touchscreen-inverted-y Inverts Y direction of touch controller
touchscreen-swapped-x-y Swaps X & Y axes of touch controller
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.
Expand Down
94 changes: 94 additions & 0 deletions arch/arm/boot/dts/overlays/vc4-kms-dpi-hyperpixel.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* vc4-kms-dpi-hyperpixel4.dtsi
* Commmon initialisation for HyperPixel DPI displays
*/

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/bcm2835.h>

/ {
compatible = "brcm,bcm2835";

fragment@0 {
target-path = "/";
__overlay__ {
spi {
compatible = "spi-gpio";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";

sck-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
mosi-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
cs-gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
num-chipselects = <1>;
sck-idle-input;

panel: display@0 {
reg = <0>;
/* 100 kHz */
spi-max-frequency = <100000>;
backlight = <&backlight>;
rotation = <0>;

port {
panel_in: endpoint {
remote-endpoint = <&dpi_out>;
};
};
};
};

backlight: backlight {
compatible = "gpio-backlight";
gpios = <&gpio 19 0>;
};
};
};

fragment@1 {
target = <&dpi>;
__overlay__ {
status = "okay";

pinctrl-names = "default";
pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;

port {
dpi_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};

fragment@2 {
target = <&gpio>;
__overlay__ {
spi_pins: hyperpixel4_spi_pins {
brcm,pins = <27 18 26>;
brcm,pull = <BCM2835_PUD_UP BCM2835_PUD_UP BCM2835_PUD_OFF>;
brcm,function = <0>;
};
};
};

fragment@3 {
target-path = "/";
__overlay__ {
i2c_gpio: i2c@0 {
compatible = "i2c-gpio";
gpios = <&gpio 10 0 /* sda */
&gpio 11 0>; /* scl */
i2c-gpio,delay-us = <4>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;
};
};
};

__overrides__ {
rotate = <&panel>, "rotation:0";
};
};
114 changes: 114 additions & 0 deletions arch/arm/boot/dts/overlays/vc4-kms-dpi-hyperpixel2r-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/*
* vc4-kms-dpi-hyperpixel2r-overlay.dts
*/

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/bcm2835.h>

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835";

fragment@0 {
Comment thread
6by9 marked this conversation as resolved.
Resolved
target-path = "/";
__overlay__ {
spi {
compatible = "spi-gpio";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";

sck-gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
mosi-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
cs-gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
num-chipselects = <1>;

panel: display@0 {
compatible = "pimoroni,hyperpixel2round";
reg = <0>;
/* 100 kHz */
spi-max-frequency = <100000>;
backlight = <&backlight>;
rotation = <0>;

port {
panel_in: endpoint {
remote-endpoint = <&dpi_out>;
};
};
};
};

backlight: backlight {
compatible = "gpio-backlight";
gpios = <&gpio 19 0>;
};
};
};

fragment@1 {
target = <&dpi>;
__overlay__ {
status = "okay";

pinctrl-names = "default";
pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;

port {
dpi_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};

fragment@2 {
target = <&gpio>;
__overlay__ {
spi_pins: hyperpixel4_spi_pins {
brcm,pins = <27 18 26>;
brcm,pull = <BCM2835_PUD_UP BCM2835_PUD_UP BCM2835_PUD_OFF>;
brcm,function = <0>;
};
};
};

fragment@3 {
target-path = "/";
__overlay__ {
i2c_gpio: i2c@0 {
compatible = "i2c-gpio";
status = "disabled";

gpios = <&gpio 10 GPIO_ACTIVE_HIGH /* sda */
&gpio 11 GPIO_ACTIVE_HIGH>; /* scl */
i2c-gpio,delay-us = <4>; /* ~100 kHz */
#address-cells = <1>;
#size-cells = <0>;

polytouch: edt-ft5x06@15 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "edt,edt-ft5406";
reg = <0x15>;
interrupt-parent = <&gpio>;
interrupts = <27 0x02>;
touchscreen-size-x = <240>;
touchscreen-size-y = <240>;
};
};
};
};

__overrides__ {
disable-touch = <0>,"-3";
touchscreen-inverted-x = <&polytouch>,"touchscreen-inverted-x?";
touchscreen-inverted-y = <&polytouch>,"touchscreen-inverted-y!";
touchscreen-swapped-x-y = <&polytouch>,"touchscreen-swapped-x-y!";
rotate = <&panel>, "rotation:0";
};

};
57 changes: 57 additions & 0 deletions arch/arm/boot/dts/overlays/vc4-kms-dpi-hyperpixel4-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* vc4-kms-dpi-hyperpixel4sq-overlay.dts
*/

/dts-v1/;
/plugin/;

#include "vc4-kms-dpi-hyperpixel.dtsi"

&panel {
compatible = "pimoroni,hyperpixel4";
};

/ {
fragment@11 {
target = <&i2c_gpio>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
ft6236_14: ft6236@14 {
compatible = "goodix,gt911";
reg = <0x14>;
interrupt-parent = <&gpio>;
interrupts = <27 2>;
touchscreen-size-x = <480>;
touchscreen-size-y = <800>;
touchscreen-x-mm = <51>;
touchscreen-y-mm = <85>;
touchscreen-inverted-y;
touchscreen-swapped-x-y;
};
ft6236_5d: ft6236@5d {
compatible = "goodix,gt911";
reg = <0x5d>;
interrupt-parent = <&gpio>;
interrupts = <27 2>;
touchscreen-size-x = <480>;
touchscreen-size-y = <800>;
touchscreen-x-mm = <51>;
touchscreen-y-mm = <85>;
touchscreen-inverted-y;
touchscreen-swapped-x-y;
};
};
};

__overrides__ {
disable-touch = <0>,"-3-11";
touchscreen-inverted-x = <&ft6236_14>,"touchscreen-inverted-x?",
<&ft6236_5d>,"touchscreen-inverted-x?";
touchscreen-inverted-y = <&ft6236_14>,"touchscreen-inverted-y!",
<&ft6236_5d>,"touchscreen-inverted-y!";
touchscreen-swapped-x-y = <&ft6236_14>,"touchscreen-swapped-x-y!",
<&ft6236_5d>,"touchscreen-swapped-x-y!";
};
};
36 changes: 36 additions & 0 deletions arch/arm/boot/dts/overlays/vc4-kms-dpi-hyperpixel4sq-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* vc4-kms-dpi-hyperpixel4-overlay.dts
*/

/dts-v1/;
/plugin/;

#include "vc4-kms-dpi-hyperpixel.dtsi"

&panel {
compatible = "pimoroni,hyperpixel4square";
};

/ {
fragment@11 {
target = <&i2c_gpio>;
__overlay__ {
polytouch: edt-ft5x06@48 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "edt,edt-ft5406";
reg = <0x48>;
interrupt-parent = <&gpio>;
interrupts = <27 0x02>;
touchscreen-size-x = <720>;
touchscreen-size-y = <720>;
};
};
};
__overrides__ {
disable-touch = <0>,"-3-11";
touchscreen-inverted-x = <&polytouch>,"touchscreen-inverted-x?";
touchscreen-inverted-y = <&polytouch>,"touchscreen-inverted-y!";
touchscreen-swapped-x-y = <&polytouch>,"touchscreen-swapped-x-y!";
};
};
3 changes: 3 additions & 0 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,11 @@ CONFIG_DRM=m
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
CONFIG_DRM_UDL=m
CONFIG_DRM_PANEL_SIMPLE=m
CONFIG_DRM_PANEL_ILITEK_ILI9806E=m
CONFIG_DRM_PANEL_JDI_LT070ME05000=m
CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m
CONFIG_DRM_PANEL_SITRONIX_ST7701=m
CONFIG_DRM_PANEL_TPO_Y17P=m
CONFIG_DRM_DISPLAY_CONNECTOR=m
CONFIG_DRM_SIMPLE_BRIDGE=m
CONFIG_DRM_TOSHIBA_TC358762=m
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -898,9 +898,12 @@ CONFIG_DRM=m
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
CONFIG_DRM_UDL=m
CONFIG_DRM_PANEL_SIMPLE=m
CONFIG_DRM_PANEL_ILITEK_ILI9806E=m
CONFIG_DRM_PANEL_ILITEK_ILI9881C=m
CONFIG_DRM_PANEL_JDI_LT070ME05000=m
CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m
CONFIG_DRM_PANEL_SITRONIX_ST7701=m
CONFIG_DRM_PANEL_TPO_Y17P=m
CONFIG_DRM_DISPLAY_CONNECTOR=m
CONFIG_DRM_SIMPLE_BRIDGE=m
CONFIG_DRM_TOSHIBA_TC358762=m
Expand Down
Loading