Skip to content

Commit

Permalink
MIPS: ingenic: Add support for the YLM RG-280M
Browse files Browse the repository at this point in the history
Add support for the YLM RG-280M, known as the Anbernic RG-280M in the
western world.

The RG-280M is a slightly modified version of the RG-350, with a
different LCD panel (320x480 non-square pixels) and only one analog
stick.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
  • Loading branch information
pcercuei committed Oct 23, 2020
1 parent 1db2aa6 commit e66025a
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
79 changes: 79 additions & 0 deletions arch/mips/boot/dts/ingenic/rg280m.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "rg350.dts"

/ {
compatible = "ylm,rg280m", "ingenic,jz4770";
model = "Anbernic RG-280M";

spi {
compatible = "spi-gpio";
#address-cells = <1>;
#size-cells = <0>;

sck-gpios = <&gpe 15 0>;
mosi-gpios = <&gpe 17 0>;
cs-gpios = <&gpe 16 0>;
num-chipselects = <1>;

panel@0 {
compatible = "abt,y030xx067a";
reg = <0>;

spi-max-frequency = <15000000>;

reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>;

backlight = <&backlight>;
power-supply = <&vcc>;

port {
y030xx067a_input: endpoint {
remote-endpoint = <&panel_output>;
};
};
};
};
};

&panel_output {
remote-endpoint = <&y030xx067a_input>;
};

&panel {
status = "disabled";
};

/* Make Frida panel port a dummy to avoid DTC complaints */
&panel_input {
remote-endpoint = <&panel_input>;
};

&joystick {
status = "disabled";
};

rg280m-joystick {
compatible = "adc-joystick";
io-channels = <&adc INGENIC_ADC_TOUCH_YP>,
<&adc INGENIC_ADC_TOUCH_XP>;
#address-cells = <1>;
#size-cells = <0>;

axis@0 {
reg = <0>;
linux,code = <ABS_X>;
abs-range = <3000 200>;
abs-fuzz = <4>;
abs-flat = <200>;
};

axis@1 {
reg = <1>;
linux,code = <ABS_Y>;
abs-range = <3000 200>;
abs-fuzz = <4>;
abs-flat = <200>;
};
};
2 changes: 1 addition & 1 deletion arch/mips/boot/dts/ingenic/rg350.dts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
};
};

joystick {
joystick: joystick {
compatible = "adc-joystick";
io-channels = <&adc INGENIC_ADC_TOUCH_YP>,
<&adc INGENIC_ADC_TOUCH_XP>,
Expand Down

0 comments on commit e66025a

Please sign in to comment.