forked from MIPS/CI20_linux
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIPS: ingenic: Add support for new JZ4770 based boards
Add support for the YLM (known as the Anbernic in the western world) RG-280V, RG-280M, RG-300X, RG-350, RG-350M, and the Wolsen PocketGo2 (aka. PlayGo) Rev. 1 & 2. The YLM RG-280V is almost a carbon copy of the GCW-Zero, with a different LCD panel (320x480 non-square pixels in diamond pattern), L2/R2 and Vol +/- buttons added, and with the analog stick, ACT8600 regulator, RDA5807 radio, MXC6225 accelerometer, ITE6610 HDMI chips removed. The YLM RG-280M is a RG-280V with a clickable analog stick. The Wolsen PocketGo2 Rev. 1 & 2 are similar to the RG-280V, with a proper 320x240 IPS screen this time. The RG-350 is a RG-280M with two clickable analog sticks, a proper 320x240 IPS screen, and a ITE66121 HDMI chip added. The RG-350M is a RG-350 with a 640x480 IPS screen. The RG-300X is a RG-350 without joysticks. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
- Loading branch information
Showing
10 changed files
with
1,096 additions
and
463 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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,71 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/dts-v1/; | ||
|
||
#include "bits/gcw0-base.dtsi" | ||
|
||
/ { | ||
compatible = "wolsen,pocketgo2", "ingenic,jz4770"; | ||
model = "Wolsen PocketGo2/PlayGo"; | ||
|
||
panel { | ||
compatible = "frida,frd350h54004"; | ||
|
||
reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>; | ||
|
||
backlight = <&backlight>; | ||
power-supply = <&vcc>; | ||
|
||
port { | ||
panel_input: endpoint { | ||
remote-endpoint = <&panel_output>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
&gpio_keys { | ||
btn13: button@13 { | ||
label = "L2 shoulder button"; | ||
linux,code = <KEY_PAGEUP>; | ||
linux,can-disable; | ||
gpios = <&gpd 31 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
btn14: button@14 { | ||
label = "R2 shoulder button"; | ||
linux,code = <KEY_PAGEDOWN>; | ||
linux,can-disable; | ||
gpios = <&gpf 10 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
btn15: button@15 { | ||
label = "Volume+ button"; | ||
linux,code = <KEY_VOLUMEUP>; | ||
linux,can-disable; | ||
gpios = <&gpd 19 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
btn16: button@16 { | ||
label = "Volume- button"; | ||
linux,code = <KEY_VOLUMEDOWN>; | ||
linux,can-disable; | ||
gpios = <&gpe 13 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
btn17: button@17 { | ||
label = "Menu button"; | ||
linux,code = <KEY_HOME>; | ||
linux,can-disable; | ||
gpios = <&gpe 8 GPIO_ACTIVE_LOW>; | ||
}; | ||
}; | ||
|
||
&lcd_ports { | ||
port@0 { | ||
reg = <0>; | ||
|
||
panel_output: endpoint { | ||
remote-endpoint = <&panel_input>; | ||
}; | ||
}; | ||
}; |
This file contains 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,38 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/dts-v1/; | ||
|
||
#include "pocketgo2.dts" | ||
|
||
/ { | ||
compatible = "wolsen,pocketgo2v2", "ingenic,jz4770"; | ||
model = "Wolsen PocketGo2/PlayGo Rev. 2"; | ||
}; | ||
|
||
&sound_card { | ||
simple-audio-card,widgets = | ||
"Speaker", "Speaker", | ||
"Headphone", "Headphones"; | ||
simple-audio-card,routing = | ||
"Headphones Amp INL", "LHPOUT", | ||
"Headphones Amp INR", "RHPOUT", | ||
"Headphones", "Headphones Amp OUTL", | ||
"Headphones", "Headphones Amp OUTR", | ||
"Speaker Amp INL", "Headphones Amp OUTL", | ||
"Speaker Amp INR", "Headphones Amp OUTR", | ||
"Speaker", "Speaker Amp OUTL", | ||
"Speaker", "Speaker Amp OUTR"; | ||
simple-audio-card,pin-switches = "Speaker"; | ||
}; | ||
|
||
&joystick { | ||
io-channels = <&adc INGENIC_ADC_TOUCH_YP>, | ||
<&adc INGENIC_ADC_TOUCH_XP>; | ||
}; | ||
|
||
&js_axis0 { | ||
abs-range = <3000 200>; | ||
}; | ||
|
||
&js_axis1 { | ||
abs-range = <3000 200>; | ||
}; |
This file contains 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,45 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/dts-v1/; | ||
|
||
#include "rg280v.dts" | ||
|
||
/ { | ||
compatible = "ylm,rg280m", "ingenic,jz4770"; | ||
model = "Anbernic RG-280M"; | ||
}; | ||
|
||
&joystick { | ||
status = "okay"; | ||
|
||
io-channels = <&adc INGENIC_ADC_TOUCH_YP>, | ||
<&adc INGENIC_ADC_TOUCH_XP>; | ||
}; | ||
|
||
&js_axis0 { | ||
abs-range = <3000 200>; | ||
}; | ||
|
||
&js_axis1 { | ||
abs-range = <3000 200>; | ||
}; | ||
|
||
&sound_card { | ||
simple-audio-card,routing = | ||
"Headphones Amp INL", "LHPOUT", | ||
"Headphones Amp INR", "RHPOUT", | ||
"Headphones", "Headphones Amp OUTL", | ||
"Headphones", "Headphones Amp OUTR", | ||
"Speaker Amp INL", "Headphones Amp OUTL", | ||
"Speaker Amp INR", "Headphones Amp OUTR", | ||
"Speaker", "Speaker Amp OUTL", | ||
"Speaker", "Speaker Amp OUTR"; | ||
}; | ||
|
||
&gpio_keys { | ||
btn17: button@17 { | ||
label = "L3 joystick button"; | ||
linux,code = <KEY_KPSLASH>; | ||
linux,can-disable; | ||
gpios = <&gpb 14 GPIO_ACTIVE_LOW>; | ||
}; | ||
}; |
This file contains 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,119 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/dts-v1/; | ||
|
||
#include "bits/gcw0-base.dtsi" | ||
|
||
/ { | ||
compatible = "ylm,rg280v", "ingenic,jz4770"; | ||
model = "Anbernic RG-280V"; | ||
|
||
rumble: rumble { | ||
compatible = "pwm-vibrator"; | ||
pwms = <&pwm 4 2000000 0>; | ||
pwm-names = "enable"; | ||
|
||
pinctrl-names = "default"; | ||
pinctrl-0 = <&pins_pwm4>; | ||
}; | ||
}; | ||
|
||
&joystick { | ||
status = "disabled"; | ||
}; | ||
|
||
&btn8 { | ||
gpios = <&gpb 10 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
&gpio_keys { | ||
btn13: button@13 { | ||
label = "L2 shoulder button"; | ||
linux,code = <KEY_PAGEUP>; | ||
linux,can-disable; | ||
gpios = <&gpb 20 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
btn14: button@14 { | ||
label = "R2 shoulder button"; | ||
linux,code = <KEY_PAGEDOWN>; | ||
linux,can-disable; | ||
gpios = <&gpb 11 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
btn15: button@15 { | ||
label = "Volume+ button"; | ||
linux,code = <KEY_VOLUMEUP>; | ||
linux,can-disable; | ||
gpios = <&gpb 12 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
btn16: button@16 { | ||
label = "Volume- button"; | ||
linux,code = <KEY_VOLUMEDOWN>; | ||
linux,can-disable; | ||
gpios = <&gpb 13 GPIO_ACTIVE_LOW>; | ||
}; | ||
}; | ||
|
||
&sound_card { | ||
simple-audio-card,widgets = | ||
"Speaker", "Speaker", | ||
"Headphone", "Headphones"; | ||
simple-audio-card,routing = | ||
"Headphones Amp INL", "LHPOUT", | ||
"Headphones Amp INR", "RHPOUT", | ||
"Headphones", "Headphones Amp OUTL", | ||
"Headphones", "Headphones Amp OUTR", | ||
"Speaker Amp INL", "LOUT", | ||
"Speaker Amp INR", "ROUT", | ||
"Speaker", "Speaker Amp OUTL", | ||
"Speaker", "Speaker Amp OUTR"; | ||
simple-audio-card,pin-switches = "Speaker"; | ||
}; | ||
|
||
&pinctrl { | ||
pins_pwm4: pwm4 { | ||
function = "pwm4"; | ||
groups = "pwm4"; | ||
}; | ||
}; | ||
|
||
&spi0_gpio { | ||
status = "okay"; | ||
|
||
panel: panel@0 { | ||
compatible = "abt,y030xx067a"; | ||
reg = <0>; | ||
|
||
spi-max-frequency = <3125000>; | ||
spi-3wire; | ||
|
||
reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>; | ||
|
||
backlight = <&backlight>; | ||
power-supply = <&vcc>; | ||
|
||
port { | ||
panel_input: endpoint { | ||
remote-endpoint = <&panel_output>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
&pins_lcd { | ||
groups = "lcd-8bit"; | ||
}; | ||
|
||
&lcd_ports { | ||
lcd_port0: port@0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
reg = <0>; | ||
|
||
panel_output: endpoint@0 { | ||
reg = <0>; | ||
remote-endpoint = <&panel_input>; | ||
}; | ||
}; | ||
}; |
This file contains 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,27 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/dts-v1/; | ||
|
||
#include "rg350m.dts" | ||
|
||
#include <dt-bindings/interrupt-controller/irq.h> | ||
|
||
/ { | ||
compatible = "ylm,rg300x", "ingenic,jz4770"; | ||
model = "Anbernic RG-300X"; | ||
}; | ||
|
||
&panel { | ||
compatible = "focaltech,gpt3"; | ||
}; | ||
|
||
&btn17 { | ||
status = "disabled"; | ||
}; | ||
|
||
&btn18 { | ||
status = "disabled"; | ||
}; | ||
|
||
&joystick { | ||
status = "disabled"; | ||
}; |
This file contains 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,41 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/dts-v1/; | ||
|
||
#include "rg350m.dts" | ||
|
||
/ { | ||
compatible = "ylm,rg350", "ingenic,jz4770"; | ||
model = "Anbernic RG-350"; | ||
|
||
panel { | ||
compatible = "frida,frd350h54004"; | ||
|
||
reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>; | ||
|
||
backlight = <&backlight>; | ||
power-supply = <&vcc>; | ||
|
||
port { | ||
frida_input: endpoint { | ||
remote-endpoint = <&panel_output>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
&panel { | ||
status = "disabled"; | ||
}; | ||
|
||
&spi0_gpio { | ||
status = "disabled"; | ||
}; | ||
|
||
/* Make ABT panel port a dummy to avoid DTC complaints */ | ||
&panel_input { | ||
remote-endpoint = <&panel_input>; | ||
}; | ||
|
||
&panel_output { | ||
remote-endpoint = <&frida_input>; | ||
}; |
Oops, something went wrong.