Enable the 2720 Flip external panel and rebuild its DTB
This commit is contained in:
1 parent
ec55fb1457
commit
7c52d616e7
13 files changed
+348
-65
No files matched your search
@@ -1,2 +1,3 @@
|
||||
/lib/firmware/nokia,beatles-gc9305-panel.bin
|
||||
/lib/firmware/nokia,argon-gc9305-v2-panel.bin
|
||||
/lib/firmware/nokia,beatles-gc9305-ext-panel.bin
|
||||
@@ -2,28 +2,33 @@
|
||||
//
|
||||
// Nokia 2720 Flip (nokia-beatles) external 240x240 GC9305 panel.
|
||||
//
|
||||
// Both the internal 240x320 panel and the external cover panel hang off the
|
||||
// same BLSP1 QUP5 SPI lines; gpio13 selects which one the bus reaches. The
|
||||
// spi-mux driver selects the mux state from the child chip-select number,
|
||||
// so display@0 keeps the internal panel on state 0 and display@1 selects the
|
||||
// Reference overlay for a DTB that still has the old single-panel layout.
|
||||
// The shipping qcom-msm8905-nokia-beatles.dts now carries these exact nodes,
|
||||
// so /dev/fb1 is available without applying an overlay at boot. This file is
|
||||
// kept for older/stock DTBs and for describing the wiring in one place.
|
||||
//
|
||||
// Both panels share BLSP1 QUP5 SPI; gpio13 selects which one the bus reaches.
|
||||
// spi-mux selects the mux state from the child chip-select number, so
|
||||
// display@0 keeps the internal panel on state 0 and display@1 selects the
|
||||
// external panel on state 1. panel-mipi-dbi-spi creates a second DRM device
|
||||
// and DRM fbdev emulation exposes it as /dev/fb1 for bananarchy-cover-idle.
|
||||
// dtc keeps SPI children in lexical node-name order, so the internal panel
|
||||
// (display@0) is registered first and stays /dev/fb0 for Xorg's card0.
|
||||
//
|
||||
// Fixes over the earlier experimental overlay that broke the main panel:
|
||||
// - both children keep the verified 25 MHz internal-panel SPI clock;
|
||||
// - the external panel uses its own gpio21 D/C line, so the QUP controller
|
||||
// stays in 8-bit mode instead of unsupported 9-bit Type C Option 1, and
|
||||
// gpio110 remains owned exclusively by the internal panel;
|
||||
// - gpio13 has a dedicated pinctrl group with a pull-down (internal panel
|
||||
// selected before gpio-mux drives it) and is no longer part of the
|
||||
// external panel's pinctrl state, which used to re-bias the mux on probe.
|
||||
// - Xorg pins /dev/dri/card0 in 10-bananarchy-msm8909.conf, so the second
|
||||
// DRM device cannot steal the main display.
|
||||
//
|
||||
// The external child is named display@1, not cover@1: dtc keeps SPI children
|
||||
// in lexical node-name order, so display@0 is registered before display@1.
|
||||
// That keeps the 240x320 internal panel on /dev/fb0 for Xorg's fbdev config
|
||||
// while the external panel gets /dev/fb1 for the idle cover renderer.
|
||||
// The external panel has no dc-gpios property: mipi_dbi_spi_init() then uses
|
||||
// MIPI DBI Type C Option 1 (9-bit SPI with the D/C bit as the ninth bit), so
|
||||
// it does not fight panel-mipi-dbi-spi for the internal panel's gpio110/DC.
|
||||
// Requires CONFIG_MULTIPLEXER, CONFIG_MUX_GPIO and CONFIG_SPI_MUX (all =m in
|
||||
// patches/kernel/config-bananarchy-msm8909.armv7) plus
|
||||
// /lib/firmware/nokia,beatles-gc9305-ext-panel.bin.
|
||||
//
|
||||
// This overlay is compile-checked but NOT applied to the shipping DTB.
|
||||
// Live testing broke the main panel/keypad path, so the shipping DTS keeps
|
||||
// the single internal panel and spidev@1 fallback until gpio13/reset/DC
|
||||
// routing is validated on hardware.
|
||||
// /lib/firmware/nokia,beatles-gc9305-ext-panel.bin in the initramfs.
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
@@ -32,11 +37,14 @@
|
||||
fragment@0 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
spi_panel_mux: spi-panel-mux {
|
||||
spi-panel-mux {
|
||||
compatible = "gpio-mux";
|
||||
#mux-control-cells = <0>;
|
||||
mux-gpios = <0x27 13 0>;
|
||||
idle-state = <0>;
|
||||
pinctrl-0 = <0x93>;
|
||||
pinctrl-names = "default";
|
||||
phandle = <0x96>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -49,14 +57,12 @@
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
mux-controls = <&spi_panel_mux>;
|
||||
spi-max-frequency = <25000000>;
|
||||
mux-controls = <0x96>;
|
||||
|
||||
display@0 {
|
||||
compatible = "nokia,beatles-gc9305-panel", "panel-mipi-dbi-spi";
|
||||
reg = <0>;
|
||||
/* Keep the Flip's verified 25 MHz internal-panel clock: applying
|
||||
* this overlay with 50 MHz reintroduced high-brightness corruption. */
|
||||
spi-max-frequency = <25000000>;
|
||||
reset-gpios = <0x27 25 0>;
|
||||
dc-gpios = <0x27 110 0>;
|
||||
@@ -84,7 +90,8 @@
|
||||
display@1 {
|
||||
compatible = "nokia,beatles-gc9305-ext-panel", "panel-mipi-dbi-spi";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
spi-max-frequency = <25000000>;
|
||||
dc-gpios = <0x27 21 0>;
|
||||
reset-gpios = <0x27 23 0>;
|
||||
power-supply = <0x6c>;
|
||||
io-supply = <0x6d>;
|
||||
|
||||
Binary file not shown.
@@ -1033,12 +1033,24 @@
|
||||
};
|
||||
|
||||
cover-panel-gpios-default-state {
|
||||
pins = "gpio21", "gpio23", "gpio13";
|
||||
/* External DC (gpio21) and reset (gpio23) only. gpio13 is the
|
||||
* SPI mux select and must not be re-biased by the panel probe. */
|
||||
pins = "gpio21", "gpio23";
|
||||
function = "gpio";
|
||||
drive-strength = <0x02>;
|
||||
bias-pull-down;
|
||||
phandle = <0x92>;
|
||||
};
|
||||
|
||||
cover-mux-gpio-default-state {
|
||||
/* Hold the mux on the internal panel until gpio-mux drives it,
|
||||
* so the boot chain and Xorg keep the 240x320 main display. */
|
||||
pins = "gpio13";
|
||||
function = "gpio";
|
||||
drive-strength = <0x02>;
|
||||
bias-pull-down;
|
||||
phandle = <0x93>;
|
||||
};
|
||||
};
|
||||
|
||||
clock-controller@1800000 {
|
||||
@@ -1851,39 +1863,80 @@
|
||||
#size-cells = <0x00>;
|
||||
status = "okay";
|
||||
|
||||
display@0 {
|
||||
compatible = "nokia,beatles-gc9305-panel", "nokia,argon-gc9305-v2-panel", "panel-mipi-dbi-spi";
|
||||
spi-mux@0 {
|
||||
compatible = "spi-mux";
|
||||
reg = <0x00>;
|
||||
backlight = <0x6b>;
|
||||
reset-gpios = <0x27 0x19 0x00>;
|
||||
dc-gpios = <0x27 0x6e 0x00>;
|
||||
/* 25 MHz avoids high-backlight PWM noise corrupting the panel link. */
|
||||
#address-cells = <0x01>;
|
||||
#size-cells = <0x00>;
|
||||
spi-max-frequency = <0x17d7840>;
|
||||
power-supply = <0x6c>;
|
||||
io-supply = <0x6d>;
|
||||
width-mm = <0x24>;
|
||||
height-mm = <0x30>;
|
||||
pinctrl-0 = <0x6e>;
|
||||
pinctrl-names = "default";
|
||||
mux-controls = <0x96>;
|
||||
|
||||
panel-timing {
|
||||
hactive = <0xf0>;
|
||||
vactive = <0x140>;
|
||||
hback-porch = <0x00>;
|
||||
vback-porch = <0x00>;
|
||||
hfront-porch = <0x00>;
|
||||
vfront-porch = <0x00>;
|
||||
hsync-len = <0x00>;
|
||||
vsync-len = <0x00>;
|
||||
clock-frequency = "", "#(";
|
||||
display@0 {
|
||||
compatible = "nokia,beatles-gc9305-panel", "nokia,argon-gc9305-v2-panel", "panel-mipi-dbi-spi";
|
||||
reg = <0x00>;
|
||||
backlight = <0x6b>;
|
||||
reset-gpios = <0x27 0x19 0x00>;
|
||||
dc-gpios = <0x27 0x6e 0x00>;
|
||||
/* 25 MHz avoids high-backlight PWM noise corrupting the panel link. */
|
||||
spi-max-frequency = <0x17d7840>;
|
||||
power-supply = <0x6c>;
|
||||
io-supply = <0x6d>;
|
||||
width-mm = <0x24>;
|
||||
height-mm = <0x30>;
|
||||
pinctrl-0 = <0x6e>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
panel-timing {
|
||||
hactive = <0xf0>;
|
||||
vactive = <0x140>;
|
||||
hback-porch = <0x00>;
|
||||
vback-porch = <0x00>;
|
||||
hfront-porch = <0x00>;
|
||||
vfront-porch = <0x00>;
|
||||
hsync-len = <0x00>;
|
||||
vsync-len = <0x00>;
|
||||
clock-frequency = "", "#(";
|
||||
};
|
||||
};
|
||||
display@1 {
|
||||
compatible = "nokia,beatles-gc9305-ext-panel", "panel-mipi-dbi-spi";
|
||||
reg = <0x01>;
|
||||
/* gpio21 is the external D/C line: 8-bit SPI works on QUP
|
||||
* and gpio110 stays owned by the internal panel. */
|
||||
dc-gpios = <0x27 0x15 0x00>;
|
||||
reset-gpios = <0x27 0x17 0x00>;
|
||||
/* Same verified 25 MHz clock as the internal panel. */
|
||||
spi-max-frequency = <0x17d7840>;
|
||||
power-supply = <0x6c>;
|
||||
io-supply = <0x6d>;
|
||||
width-mm = <0x1e>;
|
||||
height-mm = <0x1e>;
|
||||
pinctrl-0 = <0x92>;
|
||||
pinctrl-names = "default";
|
||||
write-only;
|
||||
|
||||
panel-timing {
|
||||
hactive = <0xf0>;
|
||||
vactive = <0xf0>;
|
||||
hback-porch = <0x00>;
|
||||
vback-porch = <0x00>;
|
||||
hfront-porch = <0x00>;
|
||||
vfront-porch = <0x00>;
|
||||
hsync-len = <0x00>;
|
||||
vsync-len = <0x00>;
|
||||
clock-frequency = "", "#(";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
spidev@1 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0x01>;
|
||||
spi-max-frequency = <0x2faf080>;
|
||||
status = "okay";
|
||||
/* spi-mux owns chip select 1 now; keep the node for the
|
||||
* diagnostic spidev fallback, but leave it disabled. */
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2304,6 +2357,16 @@
|
||||
phandle = <0x29>;
|
||||
};
|
||||
|
||||
spi-panel-mux {
|
||||
compatible = "gpio-mux";
|
||||
#mux-control-cells = <0x00>;
|
||||
mux-gpios = <0x27 0x0d 0x00>;
|
||||
idle-state = <0x00>;
|
||||
pinctrl-0 = <0x93>;
|
||||
pinctrl-names = "default";
|
||||
phandle = <0x96>;
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <0x86 0x87>;
|
||||
|
||||
Reference in new issue
Block a user