From a9053bc51e7b5ddaa64f6eed27f65022be65d816 Mon Sep 17 00:00:00 2001 From: Ninoh-FOX Date: Sun, 29 Aug 2021 10:50:45 +0200 Subject: [PATCH 1/4] add initial PG2v1 dts and menu button in PG2v2 --- arch/mips/boot/dts/ingenic/playgo.dts | 9 +++ arch/mips/boot/dts/ingenic/pocketgo2.dts | 74 ++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/pocketgo2.dts diff --git a/arch/mips/boot/dts/ingenic/playgo.dts b/arch/mips/boot/dts/ingenic/playgo.dts index 248e51b70db4cf..c0059a1d5fb56a 100644 --- a/arch/mips/boot/dts/ingenic/playgo.dts +++ b/arch/mips/boot/dts/ingenic/playgo.dts @@ -39,3 +39,12 @@ &panel_output { remote-endpoint = <&frida_input>; }; + +&gpio_keys { + button@19 { + label = "Menu button"; + linux,code = ; + linux,can-disable; + gpios = <&gpe 8 GPIO_ACTIVE_LOW>; + }; +}; \ No newline at end of file diff --git a/arch/mips/boot/dts/ingenic/pocketgo2.dts b/arch/mips/boot/dts/ingenic/pocketgo2.dts new file mode 100644 index 00000000000000..7ee7f0e338719f --- /dev/null +++ b/arch/mips/boot/dts/ingenic/pocketgo2.dts @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "rg280m.dts" + +/ { + compatible = "PocketGo2,v1", "ingenic,jz4770"; + model = "PocketGo2 v1"; + + 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"; +}; + +/* Make ABT panel port a dummy to avoid DTC complaints */ +&panel_input { + remote-endpoint = <&panel_input>; +}; + +&panel_output { + remote-endpoint = <&frida_input>; +}; + +&gpio_keys { + button@13 { + label = "L2 shoulder button"; + linux,code = ; + linux,can-disable; + gpios = <&gpd 31 GPIO_ACTIVE_LOW>; + }; + + button@14 { + label = "R2 shoulder button"; + linux,code = ; + linux,can-disable; + gpios = <&gpf 10 GPIO_ACTIVE_LOW>; + }; + + button@15 { + label = "Volume+ button"; + linux,code = ; + linux,can-disable; + gpios = <&gpd 19 GPIO_ACTIVE_LOW>; + }; + + button@16 { + label = "Volume- button"; + linux,code = ; + linux,can-disable; + gpios = <&gpe 13 GPIO_ACTIVE_LOW>; + }; + + button@19 { + label = "Menu button"; + linux,code = ; + linux,can-disable; + gpios = <&gpe 8 GPIO_ACTIVE_LOW>; + }; +}; From 5c78515205808db2e87bbf8f964f0509bd8596a7 Mon Sep 17 00:00:00 2001 From: Ninoh-FOX Date: Sun, 29 Aug 2021 18:17:18 +0200 Subject: [PATCH 2/4] Update pocketgo2.dts --- arch/mips/boot/dts/ingenic/pocketgo2.dts | 136 ++++++++++++++--------- 1 file changed, 84 insertions(+), 52 deletions(-) diff --git a/arch/mips/boot/dts/ingenic/pocketgo2.dts b/arch/mips/boot/dts/ingenic/pocketgo2.dts index 7ee7f0e338719f..f753520a9dbd30 100644 --- a/arch/mips/boot/dts/ingenic/pocketgo2.dts +++ b/arch/mips/boot/dts/ingenic/pocketgo2.dts @@ -1,74 +1,106 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; -#include "rg280m.dts" +#include "gcw0.dts" / { - compatible = "PocketGo2,v1", "ingenic,jz4770"; + compatible = "wolsen,pg2v1", "ingenic,jz4770"; model = "PocketGo2 v1"; +}; + +&btn6 { + label = "Button X"; +}; + +&btn7 { + label = "Button Y"; +}; +&btn8 { + gpios = <&gpb 20 GPIO_ACTIVE_LOW>; +}; + +&btn9 { + gpios = <&gpe 26 GPIO_ACTIVE_LOW>; +}; + +&pmu { + charger = <&usb_conn>; + power-supplies = <&usb_conn>; +}; - panel { - compatible = "frida,frd350h54004"; +&usb_conn { + vbus-supply = <&vcc>; +}; - reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>; +&gpio_keys { + button@14 { + label = "L2 shoulder button"; + linux,code = ; + linux,can-disable; + gpios = <&gpd 31 GPIO_ACTIVE_LOW>; + }; - backlight = <&backlight>; - power-supply = <&vcc>; + button@15 { + label = "R2 shoulder button"; + linux,code = ; + linux,can-disable; + gpios = <&gpf 10 GPIO_ACTIVE_LOW>; + }; + + button@16 { + label = "Volume+ button"; + linux,code = ; + linux,can-disable; + gpios = <&gpd 19 GPIO_ACTIVE_LOW>; + }; - port { - frida_input: endpoint { - remote-endpoint = <&panel_output>; - }; + button@17 { + label = "Volume- button"; + linux,code = ; + linux,can-disable; + gpios = <&gpe 13 GPIO_ACTIVE_LOW>; + }; + + button@18 { + label = "Menu button"; + linux,code = ; + linux,can-disable; + gpios = <&gpe 8 GPIO_ACTIVE_LOW>; }; - }; }; &panel { + compatible = "kingdisplay,kd035g6-54nt"; + reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + power-supply = <&vcc>; +}; + +&i2c4 { status = "disabled"; }; -/* Make ABT panel port a dummy to avoid DTC complaints */ -&panel_input { - remote-endpoint = <&panel_input>; +&it6610 { + status = "disabled"; }; -&panel_output { - remote-endpoint = <&frida_input>; +&dc_charger { + status = "disabled"; }; -&gpio_keys { - button@13 { - label = "L2 shoulder button"; - linux,code = ; - linux,can-disable; - gpios = <&gpd 31 GPIO_ACTIVE_LOW>; - }; - - button@14 { - label = "R2 shoulder button"; - linux,code = ; - linux,can-disable; - gpios = <&gpf 10 GPIO_ACTIVE_LOW>; - }; - - button@15 { - label = "Volume+ button"; - linux,code = ; - linux,can-disable; - gpios = <&gpd 19 GPIO_ACTIVE_LOW>; - }; - - button@16 { - label = "Volume- button"; - linux,code = ; - linux,can-disable; - gpios = <&gpe 13 GPIO_ACTIVE_LOW>; - }; - - button@19 { - label = "Menu button"; - linux,code = ; - linux,can-disable; - gpios = <&gpe 8 GPIO_ACTIVE_LOW>; - }; +&pins_lcd { + groups = "lcd-24bit"; }; + +&i2c0 { + status = "disabled"; +}; + +&radio { + status = "disabled"; +}; + +&usb_vbus { + status = "disabled"; +}; + From 31ad1182b34f529b802174ee0a17ad2d76f5adcd Mon Sep 17 00:00:00 2001 From: Ninoh-FOX Date: Mon, 30 Aug 2021 16:54:49 +0200 Subject: [PATCH 3/4] final fix PG2v1 OD beta --- arch/mips/boot/dts/ingenic/pocketgo2.dts | 52 ++++++++++++++++-------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/arch/mips/boot/dts/ingenic/pocketgo2.dts b/arch/mips/boot/dts/ingenic/pocketgo2.dts index f753520a9dbd30..3ddecca176b2ff 100644 --- a/arch/mips/boot/dts/ingenic/pocketgo2.dts +++ b/arch/mips/boot/dts/ingenic/pocketgo2.dts @@ -4,8 +4,40 @@ #include "gcw0.dts" / { - compatible = "wolsen,pg2v1", "ingenic,jz4770"; - model = "PocketGo2 v1"; + compatible = "wolsen,PocketGo2", "ingenic,jz4770"; + model = "wolsen PocketGo2"; + + panel { + compatible = "frida,frd350h54004"; + + reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>; + + backlight = <&backlight>; + power-supply = <&vcc>; + + port { + frida_input: endpoint { + remote-endpoint = <&panel_output>; + }; + }; + }; +}; + +&pins_lcd { + groups = "lcd-24bit"; +}; + +&panel { + status = "disabled"; +}; + +/* Make ABT panel port a dummy to avoid DTC complaints */ +&panel_input { + remote-endpoint = <&panel_input>; +}; + +&panel_output { + remote-endpoint = <&frida_input>; }; &btn6 { @@ -35,14 +67,14 @@ &gpio_keys { button@14 { label = "L2 shoulder button"; - linux,code = ; + linux,code = ; linux,can-disable; gpios = <&gpd 31 GPIO_ACTIVE_LOW>; }; button@15 { label = "R2 shoulder button"; - linux,code = ; + linux,code = ; linux,can-disable; gpios = <&gpf 10 GPIO_ACTIVE_LOW>; }; @@ -69,13 +101,6 @@ }; }; -&panel { - compatible = "kingdisplay,kd035g6-54nt"; - reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>; - backlight = <&backlight>; - power-supply = <&vcc>; -}; - &i2c4 { status = "disabled"; }; @@ -88,10 +113,6 @@ status = "disabled"; }; -&pins_lcd { - groups = "lcd-24bit"; -}; - &i2c0 { status = "disabled"; }; @@ -103,4 +124,3 @@ &usb_vbus { status = "disabled"; }; - From f4a43ff355e45021e14691691d5e0f48efb9a761 Mon Sep 17 00:00:00 2001 From: Ninoh-FOX Date: Sat, 4 Sep 2021 09:34:44 +0200 Subject: [PATCH 4/4] change menu to home --- arch/mips/boot/dts/ingenic/pocketgo2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/boot/dts/ingenic/pocketgo2.dts b/arch/mips/boot/dts/ingenic/pocketgo2.dts index 3ddecca176b2ff..0ee986c5130bc2 100644 --- a/arch/mips/boot/dts/ingenic/pocketgo2.dts +++ b/arch/mips/boot/dts/ingenic/pocketgo2.dts @@ -95,7 +95,7 @@ button@18 { label = "Menu button"; - linux,code = ; + linux,code = ; linux,can-disable; gpios = <&gpe 8 GPIO_ACTIVE_LOW>; };