eduardofilo / RG350_adam_image

314 stars 36 forks source link

REQUEST: Image works on PocketGo2/PlayGo Rev2 devices already, please add Rev1 support #7

Closed esmith13 closed 2 years ago

esmith13 commented 3 years ago

The PocketGo2 (also sold as the PlayGo) had two hardware revisions. The difference being (I believe) that Rev2 added a reset button and has a different screen driver. The most common firmware for both revisions is Rogue CFW and the only difference between getting the firmware to work on each revision is their version of the boot files that your setup script changes when you choose which device your running on. Rev 2 devices work with your current boot files for the RG350, but Rev 1 devices won't work with any of the available options. Would it be possible for you to add support for the Rev 1 devices? Here is a link to that CFW for reference if it helps: https://github.com/Ninoh-FOX/POCKETGO2_ROGUE_CFW

Thanks in advance for your time and your image is AMAZING work! My 280V and I thank you!

esmith13 commented 3 years ago

it has a tru analog input but it is a slider, like nintendo 3dS or right side analog of retroid pocket 2.

pcercuei commented 3 years ago

All of them?

esmith13 commented 3 years ago

I only have a Rev1 PocketGo2 and Rev 1 PlayGo. I do not have a Rev2 of either device but I cannot imagine they reduced functionality on the newer revision.

esmith13 commented 3 years ago

internal pics of both Rev1 devices. Note analog input in lower right and board version in upper left (GCWZERO_V1.2 2019.11.26) https://imgur.com/a/tVAYN3v

EDIT: Any requests before I button them back up?

Ninoh-FOX commented 3 years ago

@esmith13 one last question, since you seem to know your topic - any of these have a real analog stick? Or they are hardwired to the dpad?

The stick work fine with the GCW0 configurarion.

esmith13 commented 3 years ago

Only problem with GCW0 version I can see is the garbled spinach green graphics.

Ninoh-FOX commented 3 years ago

Yes, I am make a dts with the buttons in PG2v1, and all work fine, only need fix the screen drivers

pcercuei commented 3 years ago

I think this DTS should work on the PG2 Rev1, along with ubiboot-v20_mddr_512mb.bin:

// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "playgo.dts"

/ {
    compatible = "wolsen,pocketgo2", "ingenic,jz4770";
    model = "Wolsen PocketGo 2";
};

&btn8 {
    gpios = <&gpb 20 GPIO_ACTIVE_LOW>;
};

&btn_l2 {
    gpios = <&gpd 31 GPIO_ACTIVE_LOW>;
};

&btn_r2 {
    gpios = <&gpf 10 GPIO_ACTIVE_LOW>;
};

&btn_volp {
    gpios = <&gpd 19 GPIO_ACTIVE_LOW>;
};

&btn_volm {
    gpios = <&gpe 13 GPIO_ACTIVE_LOW>;
};

&gpio_keys {
    button@17 {
        label = "Menu button";
        linux,code = <KEY_HOME>;
        linux,can-disable;
        gpios = <&gpe 8 GPIO_ACTIVE_LOW>;
    };
};
pcercuei commented 3 years ago

Could somebody give me the result of uname -a on all PocketGo / PlayGo devices running the stock firmware?

esmith13 commented 3 years ago

how can i run commands on the device? I can do it for both Rev1 devices if you can explain how to ssh in from a windows pc or run directly on device

pcercuei commented 3 years ago

@esmith13 in Windows 10: plug the device to USB, open a windows console, and run ssh root@10.1.1.2.

esmith13 commented 3 years ago

PocketGo2 Rev1: Linux opendingux 3.12.0-dingux #35 Thu Sep 26 23:15:49 CST 2019 mips GNU/Linux PlayGo Rev1: Linux opendingux 3.12.0-dingux #35 Thu Sep 26 23:15:49 CST 2019 mips GNU/Linux for the record, I flashed two seperate SD cards with stock firmware. I did not put the same SD card in both devices If you did not know. PocketGo2 and PlayGo released on the same day. The only difference was that if you ordered a PlayGo, you got illegal roms on it. If you ordered a PocketGo2 it had only roms that were legal to share on it.

pcercuei commented 3 years ago

@esmith13 could you try to update one of these to OD beta with this OPK: https://app.box.com/s/18xteue71ol80s4ipl30be8vmrfrf3ji

Only do it if you are okay with losing your data, if it doesn't work you'll probably need a reflash.

esmith13 commented 3 years ago

no worries. using new/spare SD cards for all of this testing. running on PocketGo2 rev1 now, I can do separately on PlayGo as well if you would feel better seeing both, although I truly believe they are 100% identical hardware

esmith13 commented 3 years ago

Exact same spinach green graphical mess using the 21.8.30 as with the 21.8.25 version on PocketGo2 Rev1 Do you want me to update the PlayGo as well?

pcercuei commented 3 years ago

@esmith13 if you SSH now (ssh od@10.1.1.2, you might have to set passwordless login in the "password" app first...), and run cat /proc/cpuinfo it should print a line with machine : Wolsen PocketGo2, correct?

esmith13 commented 3 years ago

is there a shortcut key to launch the network tool? I cannot see with the garbled graphics to enable the network on the device

pcercuei commented 3 years ago

I think I screwed up and it didn't detect it properly. I uploaded a new OPK (same URL), could you try again with the new one?

esmith13 commented 3 years ago

of course. need a few minutes to reflash stock then update.

Ninoh-FOX commented 3 years ago

I think this DTS should work on the PG2 Rev1, along with ubiboot-v20_mddr_512mb.bin:

// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "playgo.dts"

/ {
  compatible = "wolsen,pocketgo2", "ingenic,jz4770";
  model = "Wolsen PocketGo 2";
};

&btn8 {
  gpios = <&gpb 20 GPIO_ACTIVE_LOW>;
};

&btn_l2 {
  gpios = <&gpd 31 GPIO_ACTIVE_LOW>;
};

&btn_r2 {
  gpios = <&gpf 10 GPIO_ACTIVE_LOW>;
};

&btn_volp {
  gpios = <&gpd 19 GPIO_ACTIVE_LOW>;
};

&btn_volm {
  gpios = <&gpe 13 GPIO_ACTIVE_LOW>;
};

&gpio_keys {
  button@17 {
      label = "Menu button";
      linux,code = <KEY_HOME>;
      linux,can-disable;
      gpios = <&gpe 8 GPIO_ACTIVE_LOW>;
  };
};

Think that PG2v1 and PG2v2 has differents id keys in R2 and L2. You need redefined this too.

esmith13 commented 3 years ago

@pcercuei 2nd test was mostly successful. Graphics are completely fixed. 1st boot hung at 66% (right edge of square logo) for about 4 minutes and then completed. NO buttons work at all, nor does DPad. Analog slider works fine. Results are 100% identical on both PocketGo2 Rev1 and PlayGo Rev1 - I have updated both independently of each other (seperate SD cards, no sharing)

pcercuei commented 3 years ago

Think that PG2v1 and PG2v2 has differents id keys in R2 and L2. You need redefined this too.

This is only for PG2v1. PG2v2 is already supported in OD beta.

esmith13 commented 3 years ago

Analog slider is also rotated 90 degrees clockwise. sliding right moves down, sliding down moves left, etc.

Ninoh-FOX commented 3 years ago

Think that PG2v1 and PG2v2 has differents id keys in R2 and L2. You need redefined this too.

This is only for PG2v1. PG2v2 is already supported in OD beta.

I talk about PG2v1, the R2 and L2 id is:

      button@13 {
        label = "L2 shoulder button";
        linux,code = <KEY_RIGHTSHIFT>;
        linux,can-disable;
        gpios = <&gpd 31 GPIO_ACTIVE_LOW>;
    };

    button@14 {
        label = "R2 shoulder button";
        linux,code = <KEY_RIGHTALT>;
        linux,can-disable;
        gpios = <&gpf 10 GPIO_ACTIVE_LOW>;
    };

And the stick has the same map that in GCW0.

pcercuei commented 3 years ago

I used PD31 and PF10 for L2/R2 too.

Ninoh-FOX commented 3 years ago

then the linux,code not is nessesary?

pcercuei commented 3 years ago

These two buttons are already defined in rg280v.dts, so we only need to override things that changed - aka the GPIOs.

Ninoh-FOX commented 3 years ago

oh, I see, this fixed then the problems with retroarch

Ninoh-FOX commented 3 years ago

I am make a new dts and now all work fine... I think my stuck in this has been not doing clean installs in each test, now everything works correctly

/dts-v1/;

#include "gcw0.dts"

/ {
    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 {
    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>;
};

&usb_conn {
    vbus-supply = <&vcc>;
};

&gpio_keys {
        button@14 {
            label = "L2 shoulder button";
            linux,code = <KEY_PAGEUP>;
            linux,can-disable;
            gpios = <&gpd 31 GPIO_ACTIVE_LOW>;
        };

        button@15 {
            label = "R2 shoulder button";
            linux,code = <KEY_PAGEDOWN>;
            linux,can-disable;
            gpios = <&gpf 10 GPIO_ACTIVE_LOW>;
        };

        button@16 {
            label = "Volume+ button";
            linux,code = <KEY_VOLUMEUP>;
            linux,can-disable;
            gpios = <&gpd 19 GPIO_ACTIVE_LOW>;
        };

        button@17 {
            label = "Volume- button";
            linux,code = <KEY_VOLUMEDOWN>;
            linux,can-disable;
            gpios = <&gpe 13 GPIO_ACTIVE_LOW>;
        };

        button@18 {
            label = "Menu button";
            linux,code = <KEY_RIGHTCTRL>;
            linux,can-disable;
            gpios = <&gpe 8 GPIO_ACTIVE_LOW>;
        };
};

&i2c4 {
    status = "disabled";
};

&it6610 {
    status = "disabled";
};

&dc_charger {
    status = "disabled";
};

&i2c0 {
    status = "disabled";
};

&radio {
    status = "disabled";
};

&usb_vbus {
    status = "disabled";
};
pcercuei commented 3 years ago

@Ninoh-FOX could you please set the password setting to "connect without password" and USB mode to Ethernet, then boot with my DTS, and give me the output of dmesg?

pcercuei commented 3 years ago

@esmith13 Is the analog stick clickable?

esmith13 commented 3 years ago

no. it is a slider, not a stick. there is no click/button input, just analog x/y axis

Ninoh-FOX commented 3 years ago

@Ninoh-FOX could you please set the password setting to "connect without password" and USB mode to Ethernet, then boot with my DTS, and give me the output of dmesg?

Sure a second

< Welcome to OpenDingux ! >
 -------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

PocketGo2:~ $ sudo dmesg
Password: 
[    0.000000] Linux version 5.14.0-rc7-opendingux (ninoh-fox@debian) (mipsel-gcw0-linux-uclibc-gcc.br_real (Buildroot od-rs90-2020.10.04-3208-g489d3a790c-dirty) 10.2.0, GNU ld (GNU Binutils) 2.35.2) #2 Sun Aug 29 09:38:24 CEST 2021
[    0.000000] CPU0 revision is: 2ed1024f (Ingenic XBurst)
[    0.000000] FPU revision is: 00330000
[    0.000000] MIPS: machine is wolsen PocketGo2
[    0.000000] earlycon: jz4770_uart0 at MMIO 0x10032000 (options '57600n8')
[    0.000000] printk: bootconsole [jz4770_uart0] enabled
[    0.000000] User-defined physical RAM map overwrite
[    0.000000] cma: Reserved 16 MiB at 0x00c00000
[    0.000000] Primary instruction cache 16kB, VIVT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 4-way, linesize 128 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   HighMem  [mem 0x0000000010000000-0x000000003fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   node   0: [mem 0x0000000030000000-0x000000003fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130560
[    0.000000] Kernel command line: mem=0x0100M mem=0x0100M@0x30000000 root=/dev/loop0 root=/dev/mmcblk0p1 rootfstype=vfat rootwait ro init=/sbin/init init=/mininit-syspart console=ttyS2,57600 earlycon console=tty0 splash rfkill.default_state=0 -- hwvariant=v20_mddr_512mb  
[    0.000000] Unknown command line parameters: splash
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 489848K/524288K available (6025K kernel code, 832K rwdata, 1136K rodata, 1276K init, 255K bss, 18056K reserved, 16384K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] trace event string verifier disabled
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x500/0x6ac with crng_init=0
[    0.000000] clocksource: ingenic-timer: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 38884100 ns
[    0.000002] sched_clock: 16 bits at 750kHz, resolution 1333ns, wraps every 43690000ns
[    0.013674] Console: colour dummy device 80x25
[    0.019877] printk: console [tty0] enabled
[    0.025525] printk: bootconsole [jz4770_uart0] disabled
[    0.033507] Calibrating delay loop... 995.82 BogoMIPS (lpj=20733952)
[    0.167035] pid_max: default: 32768 minimum: 301
[    0.167194] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.167227] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.168595] Performance counters: No available PMU.
[    0.169113] devtmpfs: initialized
[    0.175719] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635852588028829 ns
[    0.175781] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.176633] pinctrl core: initialized pinctrl subsystem
[    0.177677] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.178479] thermal_sys: Registered thermal governor 'step_wise'
[    0.196163] platform 13080000.ipu: Fixing up cyclic dependency with 13050000.lcd-controller
[    0.200547] platform connector: Fixing up cyclic dependency with 13440000.usb
[    0.201613] platform panel: Fixing up cyclic dependency with 13050000.lcd-controller
[    0.205434] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.213703] jz4780-dma 13420000.dma-controller: JZ4780 DMA controller initialised
[    0.214429] jz4780-dma 13420100.dma-controller: JZ4780 DMA controller initialised
[    0.215481] mmc1_vcc: supplied by vcc
[    0.216030] gpio-101 (sda): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    0.216091] gpio-100 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    0.216762] i2c-gpio i2c-controller@3: using lines 101 (SDA) and 100 (SCL)
[    0.217410] Advanced Linux Sound Architecture Driver Initialized.
[    0.218582] clocksource: Switched to clocksource ingenic-timer
[    0.271786] NET: Registered PF_INET protocol family
[    0.272030] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.272758] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.272850] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.272941] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.273030] TCP: Hash tables configured (established 2048 bind 2048)
[    0.273219] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.273297] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.273503] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.274511] Initialise system trusted keyrings
[    0.274822] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.279610] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.471837] Key type asymmetric registered
[    0.471895] Asymmetric key parser 'x509' registered
[    0.474609] DCDC1: supplied by regulator-dummy
[    0.475289] DCDC2: supplied by regulator-dummy
[    0.475935] DCDC3: supplied by regulator-dummy
[    0.476510] SUDCDC_REG4: Bringing 5000000uV into 5300000-5300000uV
[    0.479915] LDO5: supplied by vcc
[    0.481006] LDO6: supplied by vcc
[    0.481587] LDO7: Bringing 1200000uV into 3300000-3300000uV
[    0.484006] LDO7: supplied by vcc
[    0.484565] LDO8: supplied by vcc
[    0.544293] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.546282] printk: console [ttyS2] disabled
[    0.546429] 10032000.serial: ttyS2 at MMIO 0x10032000 (irq = 9, base_baud = 750000) is a 16550A
[    1.404651] printk: console [ttyS2] enabled
[    1.412358] ingenic-drm 13050000.lcd-controller: bound 13080000.ipu (ops 0x807a400c)
[    1.433919] etnaviv etnaviv: bound 13040000.gpu (ops 0x807b4ae4)
[    1.443378] etnaviv-gpu 13040000.gpu: model: GC860, revision: 4621
[    1.453839] [drm] Initialized etnaviv 1.3.0 20151214 for etnaviv on minor 0
[    1.465553] loop: module loaded
[    1.469633] nt39016@0 enforce active low on chipselect handle
[    1.484309] input: pwm-vibrator as /devices/platform/rumble/input/input0
[    1.497535] jz4740-rtc 10003000.rtc: registered as rtc0
[    1.505442] jz4740-rtc 10003000.rtc: setting system clock to 2036-02-06T06:28:16 UTC (2085892096)
[    1.521149] jz4780-i2c 10051000.i2c-controller: Bus frequency is 100 KHz
[    1.536105] clocksource: ingenic-ost: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 159271703898 ns
[    1.553493] jz4740-mmc 10022000.mmc: Got CD GPIO
[    1.562682] clocksource: Switched to clocksource ingenic-ost
[    1.571437] sched_clock: 32 bits at 12MHz, resolution 83ns, wraps every 178956970966ns
[    1.589376] iio-rescale voltage-divider: using raw+scale source channel
[    1.600111] jz4740-mmc 10021000.mmc: Ingenic SD/MMC card driver registered
[    1.611261] jz4740-mmc 10021000.mmc: Using DMA, 4-bit mode
[    1.623271] jz4740-mmc 10022000.mmc: Ingenic SD/MMC card driver registered
[    1.634464] jz4740-mmc 10022000.mmc: Using DMA, 4-bit mode
[    1.643249] NET: Registered PF_INET6 protocol family
[    1.651672] Segment Routing with IPv6
[    1.656616] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.666697] NET: Registered PF_PACKET protocol family
[    1.674611] Loading compiled-in X.509 certificates
[    1.687476] ingenic-drm 13050000.lcd-controller: bound 13080000.ipu (ops 0x807a400c)
[    1.701174] [drm] Initialized ingenic-drm 1.1.0 20200716 for 13050000.lcd-controller on minor 1
[    1.738486] random: fast init done
[    1.740552] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.743263] mmc0: new high speed SDHC card at address aaaa
[    1.744554] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    1.747282]  mmcblk0: p1 p2
[    1.771896] Console: switching to colour frame buffer device 53x24
[    1.849423] ingenic-drm 13050000.lcd-controller: [drm] fb0: ingenic-drm frame buffer device
[    1.869949] input: joystick as /devices/platform/joystick/input/input1
[    1.893680] input: gcw0-audio Headphones as /devices/platform/sound/sound/card0/input2
[    1.913173] input: gpio-keys as /devices/platform/gpio-keys/input/input3
[    1.927821] ALSA device list:
[    1.932465]   #0: gcw0-audio
[    1.942523] VFS: Mounted root (vfat filesystem) readonly on device 179:1.
[    1.962164] devtmpfs: mounted
[    1.972385] Freeing unused kernel image (initmem) memory: 1276K
[    1.982941] This architecture does not have kernel memory protection.
[    1.997060] Run /mininit-syspart as init process
[    2.005043]   with arguments:
[    2.005055]     /mininit-syspart
[    2.005062]     splash
[    2.005066]     hwvariant=v20_mddr_512mb
[    2.005072]   with environment:
[    2.005077]     HOME=/
[    2.005082]     TERM=linux
[    2.010436] process '/mininit-syspart' started with executable stack
[    2.026657] mininit: OpenDingux mininit 2.0.2
[    2.035553] loop0: detected capacity change from 0 to 152720
[    2.103729] mininit: rootfs.squashfs mounted on /root
[    2.120970] mininit: root switch done
[    2.137428] mininit: starting /sbin/init
[    2.739471] loop1: detected capacity change from 0 to 4720
[    2.748865] /dev/loop1: Can't open blockdev
[    3.263677] EXT4-fs (mmcblk0p2): warning: mounting unchecked fs, running e2fsck is recommended
[    3.299078] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null). Quota mode: disabled.
[    3.316223] ext4 filesystem being mounted at /media/data supports timestamps until 2038 (0x7fffffff)
[    3.679810] udevd[174]: starting version 3.2.9
[    3.693935] random: udevd: uninitialized urandom read (16 bytes read)
[    3.704434] random: udevd: uninitialized urandom read (16 bytes read)
[    3.715614] random: udevd: uninitialized urandom read (16 bytes read)
[    3.777025] udevd[175]: starting eudev-3.2.9
[    4.263362] remoteproc remoteproc0: ingenic-vpu is available
[    4.453353] usbcore: registered new interface driver usbfs
[    4.461784] usbcore: registered new interface driver hub
[    4.617070] usbcore: registered new device driver usb
[    4.632860] file system registered
[    4.686807] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.696795] using random self ethernet address
[    4.703099] using random host ethernet address
[    4.709399] using random self ethernet address
[    4.715657] using random host ethernet address
[    4.838531] ohci-platform: OHCI generic platform driver
[    4.879206] ohci-platform 13430000.usb: Generic Platform OHCI controller
[    4.903734] usb0: HOST MAC ae:2e:3f:86:de:d4
[    4.922833] usb0: MAC 0e:ee:c3:04:47:b1
[    4.941759] ohci-platform 13430000.usb: new USB bus registered, assigned bus number 1
[    4.954968] ohci-platform 13430000.usb: irq 20, io mem 0x13430000
[    5.104414] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.14
[    5.118328] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.130174] usb usb1: Product: Generic Platform OHCI controller
[    5.139444] usb usb1: Manufacturer: Linux 5.14.0-rc7-opendingux ohci_hcd
[    5.150212] usb usb1: SerialNumber: 13430000.usb
[    5.264697] hub 1-0:1.0: USB hub found
[    5.286301] hub 1-0:1.0: 2 ports detected
[    6.168635] urandom_read: 3 callbacks suppressed
[    6.168656] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[    6.194982] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[    6.222361] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[    6.684482] input: OpenDingux mouse daemon as /devices/virtual/input/input4
[    7.053778] Console: switching to colour dummy device 80x25
[   11.025384] random: crng init done
[   11.025406] random: 1 urandom warning(s) missed due to ratelimiting
[   33.343624] mmc1_vcc: disabling
[   33.345196] LDO_REG10: disabling
PocketGo2:~ $ 
pcercuei commented 3 years ago

@Ninoh-FOX That's not my DTS :) I need the dmesg with my DTS.

Ninoh-FOX commented 3 years ago

@Ninoh-FOX That's not my DTS :) I need the dmesg with my DTS.

ops, but this works all...

this is the kernel file

https://mega.nz/file/v0hmEZKa#OAL1EeWN0WBnhzEnNZYqCzjO7q4YoeCEY6zVfblu60g

and this is my dts:

// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "gcw0.dts"

/ {
    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 {
    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>;
};

&usb_conn {
    vbus-supply = <&vcc>;
};

&gpio_keys {
        button@14 {
            label = "L2 shoulder button";
            linux,code = <KEY_PAGEUP>;
            linux,can-disable;
            gpios = <&gpd 31 GPIO_ACTIVE_LOW>;
        };

        button@15 {
            label = "R2 shoulder button";
            linux,code = <KEY_PAGEDOWN>;
            linux,can-disable;
            gpios = <&gpf 10 GPIO_ACTIVE_LOW>;
        };

        button@16 {
            label = "Volume+ button";
            linux,code = <KEY_VOLUMEUP>;
            linux,can-disable;
            gpios = <&gpd 19 GPIO_ACTIVE_LOW>;
        };

        button@17 {
            label = "Volume- button";
            linux,code = <KEY_VOLUMEDOWN>;
            linux,can-disable;
            gpios = <&gpe 13 GPIO_ACTIVE_LOW>;
        };

        button@18 {
            label = "Menu button";
            linux,code = <KEY_RIGHTCTRL>;
            linux,can-disable;
            gpios = <&gpe 8 GPIO_ACTIVE_LOW>;
        };
};

&i2c4 {
    status = "disabled";
};

&it6610 {
    status = "disabled";
};

&dc_charger {
    status = "disabled";
};

&i2c0 {
    status = "disabled";
};

&radio {
    status = "disabled";
};

&usb_vbus {
    status = "disabled";
};
pcercuei commented 3 years ago

I know, I just need to understand why gpio-keys fail with mine.

esmith13 commented 3 years ago

@Ninoh-FOX FYI, your mega link has a corrupt .7z file. won't open with either 7z or WinRAR.

Ninoh-FOX commented 3 years ago

@Ninoh-FOX FYI, your mega link has a corrupt .7z file. won't open with either 7z or WinRAR.

that is true, try this. https://mega.nz/file/apwUgTSa#3i3Ro7AJfkNPuJQtjlSKCFt3y2-gIEMfkYpl356GsEE

@pcercuei I tried your dts after, but not work fine, I remember that in 3.12 some gpios brocken the controls, I am use my platform-gcw0.c how way for make the dts, and I am used gcw0 direct because I know that has the same stick control that PG2v1.

If you need this, I can rebuild the kernel with your dts.

pcercuei commented 3 years ago

I know it's broken, I just need to see the dmesg.

Ninoh-FOX commented 3 years ago

a second

ninoh-fox@debian:~$ ssh od@10.1.1.2
 _________________________
< Welcome to OpenDingux ! >
 -------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

pocketgo2:~ $ sudo dmesg
Password: 
[    0.000000] Linux version 5.14.0-rc7-opendingux (ninoh-fox@debian) (mipsel-gcw0-linux-uclibc-gcc.br_real (Buildroot od-rs90-2020.10.04-3208-g489d3a790c-dirty) 10.2.0, GNU ld (GNU Binutils) 2.35.2) #2 Sun Aug 29 09:38:24 CEST 2021
[    0.000000] CPU0 revision is: 2ed1024f (Ingenic XBurst)
[    0.000000] FPU revision is: 00330000
[    0.000000] MIPS: machine is Wolsen PocketGo 2
[    0.000000] earlycon: jz4770_uart0 at MMIO 0x10032000 (options '57600n8')
[    0.000000] printk: bootconsole [jz4770_uart0] enabled
[    0.000000] User-defined physical RAM map overwrite
[    0.000000] cma: Reserved 16 MiB at 0x00c00000
[    0.000000] Primary instruction cache 16kB, VIVT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 4-way, linesize 128 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   HighMem  [mem 0x0000000010000000-0x000000003fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   node   0: [mem 0x0000000030000000-0x000000003fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130560
[    0.000000] Kernel command line: mem=0x0100M mem=0x0100M@0x30000000 root=/dev/loop0 root=/dev/mmcblk0p1 rootfstype=vfat rootwait ro init=/sbin/init init=/mininit-syspart console=ttyS2,57600 earlycon console=tty0 splash rfkill.default_state=0 -- hwvariant=v20_mddr_512mb  
[    0.000000] Unknown command line parameters: splash
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 489844K/524288K available (6025K kernel code, 832K rwdata, 1136K rodata, 1276K init, 255K bss, 18060K reserved, 16384K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] trace event string verifier disabled
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x500/0x6ac with crng_init=0
[    0.000000] clocksource: ingenic-timer: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 38884100 ns
[    0.000002] sched_clock: 16 bits at 750kHz, resolution 1333ns, wraps every 43690000ns
[    0.013682] Console: colour dummy device 80x25
[    0.019885] printk: console [tty0] enabled
[    0.025532] printk: bootconsole [jz4770_uart0] disabled
[    0.033516] Calibrating delay loop... 995.82 BogoMIPS (lpj=20733952)
[    0.167034] pid_max: default: 32768 minimum: 301
[    0.167191] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.167225] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.168593] Performance counters: No available PMU.
[    0.169109] devtmpfs: initialized
[    0.175857] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635852588028829 ns
[    0.175911] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.176766] pinctrl core: initialized pinctrl subsystem
[    0.177795] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.178599] thermal_sys: Registered thermal governor 'step_wise'
[    0.195946] platform 13080000.ipu: Fixing up cyclic dependency with 13050000.lcd-controller
[    0.200453] platform connector: Fixing up cyclic dependency with 13440000.usb
[    0.201519] platform panel: Fixing up cyclic dependency with 13050000.lcd-controller
[    0.205322] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.213598] jz4780-dma 13420000.dma-controller: JZ4780 DMA controller initialised
[    0.214309] jz4780-dma 13420100.dma-controller: JZ4780 DMA controller initialised
[    0.215351] mmc1_vcc: supplied by vcc
[    0.215659] USB Power: supplied by vcc
[    0.216554] Advanced Linux Sound Architecture Driver Initialized.
[    0.217578] clocksource: Switched to clocksource ingenic-timer
[    0.270882] NET: Registered PF_INET protocol family
[    0.271125] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.271851] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.271942] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.272034] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.272123] TCP: Hash tables configured (established 2048 bind 2048)
[    0.272315] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.272393] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.272601] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.273597] Initialise system trusted keyrings
[    0.273894] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.278682] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.469659] Key type asymmetric registered
[    0.469719] Asymmetric key parser 'x509' registered
[    0.528285] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.530271] printk: console [ttyS2] disabled
[    0.530418] 10032000.serial: ttyS2 at MMIO 0x10032000 (irq = 9, base_baud = 750000) is a 16550A
[    1.298189] printk: console [ttyS2] enabled
[    1.306033] ingenic-drm 13050000.lcd-controller: bound 13080000.ipu (ops 0x807a400c)
[    1.327501] etnaviv etnaviv: bound 13040000.gpu (ops 0x807b4ae4)
[    1.336959] etnaviv-gpu 13040000.gpu: model: GC860, revision: 4621
[    1.347426] [drm] Initialized etnaviv 1.3.0 20151214 for etnaviv on minor 0
[    1.359147] loop: module loaded
[    1.363151] nt39016@0 enforce active low on chipselect handle
[    1.377402] input: pwm-vibrator as /devices/platform/rumble/input/input0
[    1.390090] jz4740-rtc 10003000.rtc: registered as rtc0
[    1.397994] jz4740-rtc 10003000.rtc: setting system clock to 2036-02-06T07:00:56 UTC (2085894056)
[    1.417189] clocksource: ingenic-ost: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 159271703898 ns
[    1.434563] jz4740-mmc 10022000.mmc: Got CD GPIO
[    1.443723] clocksource: Switched to clocksource ingenic-ost
[    1.452521] sched_clock: 32 bits at 12MHz, resolution 83ns, wraps every 178956970966ns
[    1.470413] iio-rescale voltage-divider: using raw+scale source channel
[    1.481134] jz4740-mmc 10021000.mmc: Ingenic SD/MMC card driver registered
[    1.492285] jz4740-mmc 10021000.mmc: Using DMA, 4-bit mode
[    1.504282] jz4740-mmc 10022000.mmc: Ingenic SD/MMC card driver registered
[    1.515517] jz4740-mmc 10022000.mmc: Using DMA, 4-bit mode
[    1.524259] NET: Registered PF_INET6 protocol family
[    1.532791] Segment Routing with IPv6
[    1.537727] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.547724] NET: Registered PF_PACKET protocol family
[    1.555728] Loading compiled-in X.509 certificates
[    1.568457] ingenic-drm 13050000.lcd-controller: bound 13080000.ipu (ops 0x807a400c)
[    1.582135] [drm] Initialized ingenic-drm 1.1.0 20200716 for 13050000.lcd-controller on minor 1
[    1.621501] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.624235] mmc0: new high speed SDHC card at address aaaa
[    1.625531] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    1.628260]  mmcblk0: p1 p2
[    1.652834] Console: switching to colour frame buffer device 53x24
[    1.686717] random: fast init done
[    1.730419] ingenic-drm 13050000.lcd-controller: [drm] fb0: ingenic-drm frame buffer device
[    1.750763] input: joysticks as /devices/platform/joysticks/input/input1
[    1.774684] input: ylm-audio Headphones as /devices/platform/sound/sound/card0/input2
[    1.793525] gpio-keys gpio-keys: failed to get gpio: -16
[    1.803045] gpio-keys: probe of gpio-keys failed with error -16
[    1.814299] ALSA device list:
[    1.818961]   #0: ylm-audio
[    1.828827] VFS: Mounted root (vfat filesystem) readonly on device 179:1.
[    1.848655] devtmpfs: mounted
[    1.860097] Freeing unused kernel image (initmem) memory: 1276K
[    1.870706] This architecture does not have kernel memory protection.
[    1.884837] Run /mininit-syspart as init process
[    1.892759]   with arguments:
[    1.892771]     /mininit-syspart
[    1.892777]     splash
[    1.892782]     hwvariant=v20_mddr_512mb
[    1.892788]   with environment:
[    1.892792]     HOME=/
[    1.892798]     TERM=linux
[    1.897856] process '/mininit-syspart' started with executable stack
[    1.914101] mininit: OpenDingux mininit 2.0.2
[    1.924407] loop0: detected capacity change from 0 to 152720
[    1.992650] mininit: rootfs.squashfs mounted on /root
[    2.009989] mininit: root switch done
[    2.024231] mininit: starting /sbin/init
[    2.634913] loop1: detected capacity change from 0 to 4720
[    2.644354] /dev/loop1: Can't open blockdev
[    3.159395] EXT4-fs (mmcblk0p2): warning: mounting unchecked fs, running e2fsck is recommended
[    3.203003] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null). Quota mode: disabled.
[    3.219455] ext4 filesystem being mounted at /media/data supports timestamps until 2038 (0x7fffffff)
[    3.588984] udevd[174]: starting version 3.2.9
[    3.603801] random: udevd: uninitialized urandom read (16 bytes read)
[    3.614256] random: udevd: uninitialized urandom read (16 bytes read)
[    3.625482] random: udevd: uninitialized urandom read (16 bytes read)
[    3.686881] udevd[175]: starting eudev-3.2.9
[    4.161793] remoteproc remoteproc0: ingenic-vpu is available
[    4.356775] usbcore: registered new interface driver usbfs
[    4.405049] usbcore: registered new interface driver hub
[    4.468743] usbcore: registered new device driver usb
[    4.492106] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.505312] file system registered
[    4.557458] using random self ethernet address
[    4.563736] using random host ethernet address
[    4.570079] using random self ethernet address
[    4.576338] using random host ethernet address
[    4.601062] usb0: HOST MAC d6:56:b3:56:f7:b8
[    4.610310] ohci-platform: OHCI generic platform driver
[    4.618474] ohci-platform 13430000.usb: Generic Platform OHCI controller
[    4.629271] ohci-platform 13430000.usb: new USB bus registered, assigned bus number 1
[    4.661659] usb0: MAC f2:40:99:33:e7:3c
[    4.825608] ohci-platform 13430000.usb: irq 20, io mem 0x13430000
[    4.976171] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.14
[    4.990123] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.001943] usb usb1: Product: Generic Platform OHCI controller
[    5.011206] usb usb1: Manufacturer: Linux 5.14.0-rc7-opendingux ohci_hcd
[    5.021984] usb usb1: SerialNumber: 13430000.usb
[    5.139086] hub 1-0:1.0: USB hub found
[    5.160785] hub 1-0:1.0: 2 ports detected
[    6.046697] urandom_read: 3 callbacks suppressed
[    6.046718] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[    6.073101] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[    6.100581] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[    6.915631] Console: switching to colour dummy device 80x25
[   10.973605] random: crng init done
[   10.973626] random: 1 urandom warning(s) missed due to ratelimiting
[   33.342617] mmc1_vcc: disabling
pocketgo2:~ $ 

another note, I am use:

&gpio_keys {
        button@14 {
            label = "L2 shoulder button";
            linux,code = <KEY_PAGEUP>;
            linux,can-disable;
            gpios = <&gpd 31 GPIO_ACTIVE_LOW>;
        };

        button@15 {
            label = "R2 shoulder button";
            linux,code = <KEY_PAGEDOWN>;
            linux,can-disable;
            gpios = <&gpf 10 GPIO_ACTIVE_LOW>;
        };

        button@16 {
            label = "Volume+ button";
            linux,code = <KEY_VOLUMEUP>;
            linux,can-disable;
            gpios = <&gpd 19 GPIO_ACTIVE_LOW>;
        };

        button@17 {
            label = "Volume- button";
            linux,code = <KEY_VOLUMEDOWN>;
            linux,can-disable;
            gpios = <&gpe 13 GPIO_ACTIVE_LOW>;
        };

        button@18 {
            label = "Menu button";
            linux,code = <KEY_RIGHTCTRL>;
            linux,can-disable;
            gpios = <&gpe 8 GPIO_ACTIVE_LOW>;
        };
};

because with

&btn_l2 {
    gpios = <&gpd 31 GPIO_ACTIVE_LOW>;
};

&btn_r2 {
    gpios = <&gpf 10 GPIO_ACTIVE_LOW>;
};

&btn_volp {
    gpios = <&gpd 19 GPIO_ACTIVE_LOW>;
};

&btn_volm {
    gpios = <&gpe 13 GPIO_ACTIVE_LOW>;
};

the compilation said that not is definitions

Ninoh-FOX commented 3 years ago

the error with your dts is:

[    1.793525] gpio-keys gpio-keys: failed to get gpio: -16
[    1.803045] gpio-keys: probe of gpio-keys failed with error -16
Ninoh-FOX commented 3 years ago

@Ninoh-FOX FYI, your mega link has a corrupt .7z file. won't open with either 7z or WinRAR.

that is true, try this. https://mega.nz/file/apwUgTSa#3i3Ro7AJfkNPuJQtjlSKCFt3y2-gIEMfkYpl356GsEE

@esmith13 work the files in zip in your console?

esmith13 commented 3 years ago

Contents are different than the fat partition for stock/ODBeta image so I wasn't sure how to try them?

EDIT: copied over files to my ODBeta SD card, including overwriting the four files that were named the same and adding new files. Worked great! All inputs registered properly. Tried on both PocketGo2 Rev1 & PlayGo Rev1 with same excellent results on both. This is now a fully functional ODBeta install on both Rev1 devices.

esmith13 commented 3 years ago

Can you do me a favor? Someone with PlayGo/PG2 v1 please, flash this image. I suppose that this one will boot, but will show the screen problems like the @NickMellon video. I would also like you to try on the GCW0 if any of you have it. To finish understanding if GCW0 and PlayGo/PG2 v1 are compatible at the bootloader and device tree level.

https://drive.google.com/file/d/1-p6u9pWBqrO99TqU3DgPW-7ysY6k-LD1/view?usp=sharing

Can also confirm this does NOT boot at all on both PocketGo2 v1 as well as PlayGo v1. (sorry for the delay, missed this over the weekend) So, does this decisively mean there will be no Adam Image for PocketGo2 v1/PlayGo v1 or is there a way I or someone else can make this happen?

eduardofilo commented 3 years ago

We now know that those devices were not ODBeta compliant. If Ninoh and Paul have success with the research, it will be possible to be compatible.

esmith13 commented 3 years ago

@eduardofilo the files provided by @Ninoh-FOX fix ODBeta completely on both of those devices. I now have a fully functional ODBeta on both of my Rev 1 devices. Current required process is: 1) Stock FW flash 2) ODBeta .opk update 3) replace boot files on FAT partition with those provided by @Ninoh-FOX

I have even gone as far as to add official Retroarch for ODBeta to my PG2v1 and it runs great! Would much rather use your setup though if possible.

pcercuei commented 3 years ago

Or just wait until it lands in OD nightly.

eduardofilo commented 3 years ago

Very good news. But better to wait for the changes to be integrated upstream. Meanwhile you can apply that same step 3 after flashing the image if you want to use it.

esmith13 commented 3 years ago

my apologies, i didn't know it was getting officially added eventually. I can wait as long as needed. Just wasn't sure if it would eventually happen or NEVER happen... Thank you to all for the help and support!

eduardofilo commented 3 years ago

No, no. Thanks to you for helping in the research.