3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-07 23:03:06 +00:00
Brooklyn/arch/arm/boot/dts/overlays/vc4-kms-dpi-hyperpixel.dtsi
2022-04-02 18:06:56 +05:00

95 lines
1.7 KiB
Plaintext

/*
* 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";
};
};