-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Add driver for the Waveshare DSI-TOUCH series panels. #6566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7218dbf
drivers/regulator : Add a regulator to Waveshare DSI-TOUCH series panels
b8101e1
drivers/gpu/drm/panel : Add the device for the Waveshare DSI-TOUCH se…
a54d4e0
arch/arm/boot/dts/overlays : Add Waveshare DSI-TOUCH series panels De…
916bd95
configs : Enable configs of new series of Waveshare DSI panels
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-v2-overlay.dts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* vc4-kms-dsi-waveshare-panel-v2-overlay.dts | ||
*/ | ||
|
||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
|
||
/ { | ||
compatible = "brcm,bcm2835"; | ||
|
||
i2c_frag: fragment@0 { | ||
target = <&i2c_csi_dsi>; | ||
__overlay__ { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
display_mcu: display_mcu@45 { | ||
compatible = "waveshare,touchscreen-panel-regulator"; | ||
reg = <0x45>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
enable-gpio = <&display_mcu 2 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
touch: goodix@5d { | ||
compatible = "goodix,gt9271"; | ||
reg = <0x5d>; | ||
reset-gpio = <&display_mcu 9 GPIO_ACTIVE_HIGH>; | ||
}; | ||
}; | ||
}; | ||
|
||
dsi_frag: fragment@1 { | ||
target = <&dsi1>; | ||
__overlay__ { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
port { | ||
dsi_out: endpoint { | ||
remote-endpoint = <&panel_in>; | ||
}; | ||
}; | ||
|
||
dsi_panel: dsi_panel@0 { | ||
reg = <0>; | ||
compatible = "waveshare,10.1-dsi-touch-a"; | ||
reset-gpio = <&display_mcu 1 GPIO_ACTIVE_HIGH>; | ||
backlight = <&display_mcu>; | ||
|
||
port { | ||
panel_in: endpoint { | ||
remote-endpoint = <&dsi_out>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
fragment@2 { | ||
target = <&i2c0if>; | ||
__overlay__ { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
fragment@3 { | ||
target = <&i2c0mux>; | ||
__overlay__ { | ||
status = "okay"; | ||
}; | ||
}; | ||
|
||
__overrides__ { | ||
5_0_inch_a = <&dsi_panel>, "compatible=waveshare,5.0-dsi-touch-a"; | ||
5_5_inch_a = <&dsi_panel>, "compatible=waveshare,5.5-dsi-touch-a"; | ||
7_0_inch_a = <&dsi_panel>, "compatible=waveshare,7.0-dsi-touch-a"; | ||
7_0_inch_b = <&dsi_panel>, "compatible=waveshare,7.0-dsi-touch-b"; | ||
8_0_inch_a = <&dsi_panel>, "compatible=waveshare,8.0-dsi-touch-a"; | ||
8_0_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,8.0-dsi-touch-a-4lane"; | ||
10_1_inch_a = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-a"; | ||
10_1_inch_a_4lane = <&dsi_panel>, "compatible=waveshare,10.1-dsi-touch-a-4lane"; | ||
disable_touch = <&touch>, "status=disabled"; | ||
invx = <&touch>,"touchscreen-inverted-x?"; | ||
invy = <&touch>,"touchscreen-inverted-y?"; | ||
swapxy = <&touch>,"touchscreen-swapped-x-y?"; | ||
dsi0 = <&dsi_frag>, "target:0=",<&dsi0>, | ||
<&i2c_frag>, "target:0=",<&i2c_csi_dsi0>; | ||
}; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing as we have no control over the interrupt line, I assume it is pulled down so that the touch controller will reliably come out of reset on address 0x5d. (Using the INT line to determine I2C address is a right pain with these Goodix controllers).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The muc is connected to the INT pin. If necessary, we can set the INT pin level when exiting the reset through the MCU. By default, the I2C address of Goodix controllers is 0x5d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as you have it in hand.
Avoiding a repeat of #6538 would be good, and I've been in exactly the same position with an early version of the Raspberry Pi Touch Display 2.
The vc4-dpi-hyperpixel4 overlay hacks around the issue by defining the touch controller on both addresses, and accepts that one will fail to probe.