-
Notifications
You must be signed in to change notification settings - Fork 49
feat: Added st7789 pi-1.14-lcd #424
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
Open
sschueller
wants to merge
1
commit into
radxa-pkg:main
Choose a base branch
from
sschueller:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
84 changes: 84 additions & 0 deletions
84
arch/arm64/boot/dts/rockchip/overlays/radxa-zero3-mini-pi-1.14-lcd-hat.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,84 @@ | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/pinctrl/rockchip.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
#include <dt-bindings/input/input.h> | ||
|
||
/ { | ||
metadata { | ||
title = "Enable Mini PiTFT 1.14 inch HAT"; | ||
compatible = "radxa,zero3"; | ||
category = "misc"; | ||
exclusive = "GPIO0_D1", "GPIO3_C1", "GPIO3_B0", "GPIO3_B1", "GPIO3_B2", "spi3"; | ||
description = "Enable Mini PiTFT 1.14 inch HAT. | ||
A custom kernel module is needed: | ||
https://github.com/radxa-pkg/radxa-overlays/pull/424"; | ||
}; | ||
}; | ||
|
||
&spi3 { | ||
status = "okay"; | ||
pinctrl-names = "default", "high_speed"; | ||
pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>; | ||
pinctrl-1 = <&spi3m1_cs0 &spi3m1_pins_hs>; | ||
|
||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
st7789v@0 { | ||
compatible = "sitronix,st7789v"; | ||
reg = <0>; | ||
spi-max-frequency = <10000000>; | ||
|
||
rotate = <270>; | ||
fps = <60>; | ||
|
||
buswidth = <8>; | ||
regwidth = <8>; | ||
|
||
width = <135>; // Full panel width | ||
height = <240>; // Full panel height | ||
|
||
// Add these lines to set the offset | ||
x-offset = <40>; // Adjust this value as needed | ||
y-offset = <53>; // Adjust this value as needed | ||
|
||
cs-gpio = <&gpio0 RK_PD1 GPIO_ACTIVE_HIGH>; | ||
dc-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; | ||
backlight-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; | ||
debug = <0>; | ||
|
||
}; | ||
}; | ||
|
||
&{/} { | ||
buttons_joystick { | ||
compatible = "gpio-keys"; | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&buttons_joystick_pins>; | ||
|
||
key1 { | ||
label = "KEY1"; | ||
linux,code = <KEY_UP>; | ||
gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; // GPIO3_B1 | ||
}; | ||
|
||
key2 { | ||
label = "KEY2"; | ||
linux,code = <KEY_DOWN>; | ||
gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; // GPIO3_B2 | ||
}; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
buttons_joystick { | ||
buttons_joystick_pins: buttons-joystick-pins { | ||
rockchip,pins = | ||
<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, | ||
<3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; | ||
}; | ||
}; | ||
}; |
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.