Thank you for this suggestion, I would have never thought using an alpha release, as the coreelec website proposed naturally to use the stable ng version 21 for my box S905X3.
Here are the first results with CE 22, and they are quite bizarre.
After the first booting of the CE 22 version : no USB powered on. But seeing some usb2phy and usb3phy message I had not before with CE 21:
$ dmesg | grep -i usb
[ 0.000000] Kernel command line: systemd.show_status=auto init=/init console= ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xff803000 ramoops.pstore_e n=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 hdr_policy=1 hdr_prio rity= otg_device=0 usb3_off=0 reboot_mode_android=normal logo=osd0,loaded,0x3d80 0000 fb_width=1920 fb_height=1080 display_bpp=16 outputmode=1080p60hz vout=1080p 60hz,enable panel_type=lcd_1 lcd_ctrl=0x00000000 hdmitx=,444,8bit hdmimode=1080p 60hz hdmichecksum=0x00000000 frac_rate_policy=0 hdmi_read_edid=1 cvbsmode=576cvb s osd_reverse=0 video_reverse=0 irq_check_en=0 androidboot.selinux=permissive an droidboot.firstboot=0 jtag=disable androidboot.hardware=amlogic androidboot.boot loader=U-Boot 2015.01 androidboot.build.expect.baseband=N/A androidboot.serialno =X3P2009000004292 mac=d0:5f:64:d1:22:a4 androidboot.mac=d0:5f:64:d1:22:a4 androi dboot.oem.key1=ATV00104319 androidboot.rpmb_state=0 BOOT_IMAGE=kernel.img boot=L ABEL=COREELEC disk=LABEL=STORAGE console=tty
[ 0.000000] Unknown kernel command line parameters "earlyprintk=aml-uart,0xff 803000 hdr_policy=1 hdr_priority= otg_device=0 usb3_off=0 reboot_mode_android=no rmal logo=osd0 fb_width=1920 fb_height=1080 display_bpp=16 vout=1080p60hz panel_ type=lcd_1 lcd_ctrl=0x00000000 hdmitx= hdmimode=1080p60hz hdmichecksum=0x0000000 0 frac_rate_policy=0 hdmi_read_edid=1 cvbsmode=576cvbs video_reverse=0 irq_check _en=0 jtag=disable boot=LABEL=COREELEC disk=LABEL=STORAGE remotewakeup=0xfffffff f decode_type=0 remotewakeupmask=0xffffffff", will be passed to user space.
[ 1.668994] usbcore: registered new interface driver usbfs
[ 1.669038] usbcore: registered new interface driver hub
[ 1.669070] usbcore: registered new device driver usb
[ 1.832127] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.833155] usbcore: registered new interface driver uas
[ 1.833226] usbcore: registered new interface driver usb-storage
[ 1.833374] usbcore: registered new interface driver usbserial_generic
[ 1.833400] USB Serial support registered for generic
[ 1.834518] usbcore: registered new interface driver xpad
[ 1.835260] usbcore: registered new interface driver uvcvideo
[ 1.839019] usbcore: registered new interface driver usbhid
[ 1.839028] usbhid: USB HID core driver
[ 1.840392] usbcore: registered new interface driver snd-usb-audio
[ 2.606368] ### usb_main_init() start
[ 2.606754] call amlogic_new_c2_usb2_v2_driver_init() success
[ 2.607011] call amlogic_new_c2_usb3_v2_driver_init() success
[ 2.607211] call amlogic_new_usb3_v3_driver_init() success
[ 2.607819] amlogic-new-usb2-v2 ffe09000.usb2phy: USB2 phy probe:phy_mem:0xff e09000, iomap phy_base:0xffffffc00bdf5000
[ 2.608192] call amlogic_new_usb2_v2_driver_init() success
[ 2.608437] amlogic-new-usb3-v2 ffe09080.usb3phy: This is normal phy
[ 2.609396] amlogic-new-usb3-v2 ffe09080.usb3phy: USB3 phy probe:phy_mem:0xff e09080, iomap phy_base:0xffffffc00bf05080
[ 2.609605] amlogic-new-usb3-v2 ffe09080.usb3phy: Failed to get pcie_bgp
[ 2.616480] call amlogic_new_usb3_v2_driver_init() success
[ 2.616890] call amlogic_usb2_m31_drv_init() success
[ 2.617153] call amlogic_usb3_m31_drv_init() success
[ 2.617428] call aml_usb3_phy_drv_init() success
[ 2.618285] amlogic-new-usb2-v2 ffe09000.usb2phy: Not usb-phy-trim-reg
[ 2.622431] amlogic-new-usb2-v2 ffe09000.usb2phy: Not usb-phy-trim-reg
[ 2.632063] amlogic-new-usb2-v2 ffe09000.usb2phy: Not usb-phy-trim-reg
[ 2.635434] amlogic-new-usb2-v2 ffe09000.usb2phy: Not usb-phy-trim-reg
[ 2.642148] xhci-hcd-meson xhci-hcd-meson.1.auto: new USB bus registered, ass igned bus number 1
[ 2.642485] xhci-hcd-meson xhci-hcd-meson.1.auto: new USB bus registered, ass igned bus number 2
[ 2.642495] xhci-hcd-meson xhci-hcd-meson.1.auto: Host supports USB 3.0 Super Speed
[ 2.642636] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bc dDevice= 5.15
[ 2.642642] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber= 1
[ 2.642647] usb usb1: Product: xHCI Host Controller
[ 2.642651] usb usb1: Manufacturer: Linux 5.15.196 xhci-hcd
[ 2.642654] usb usb1: SerialNumber: xhci-hcd-meson.1.auto
[ 2.643082] hub 1-0:1.0: USB hub found
[ 2.643464] usb usb2: We don't know the algorithms for LPM for this host, dis abling LPM.
[ 2.643551] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bc dDevice= 5.15
[ 2.643558] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber= 1
[ 2.643562] usb usb2: Product: xHCI Host Controller
[ 2.643566] usb usb2: Manufacturer: Linux 5.15.196 xhci-hcd
[ 2.643570] usb usb2: SerialNumber: xhci-hcd-meson.1.auto
[ 2.643954] hub 2-0:1.0: USB hub found
[ 2.645636] call amlogic_crg_drd_usb2_drv_init() success
[ 2.645851] call amlogic_crg_drd_usb3_drv_init() success
[ 2.646368] ### usb_main_init() end
[ 2.646525] dwc_otg: usb0: type: 2 speed: 0,
[ 2.912520] usb3_off=0
But still no GPIO 432 enabled:
$ cat /sys/kernel/debug/gpio
gpiochip1: GPIOs 410-495, parent: platform/pinctrl@ff634480, periphs-banks:
gpio-448 ( |reset ) out hi ACTIVE LOW
gpio-458 ( |cd ) in lo
gpio-482 ( |sdio_wifi ) out hi
gpio-483 ( |sdio_wifi ) in hi
gpio-493 ( |bt_rfkill ) out hi
gpio-495 ( |bt_rfkill ) out hi
gpiochip0: GPIOs 496-511, parent: platform/pinctrl@ff800014, aobus-banks:
gpio-498 ( |VDDIO_C ) out lo
gpio-507 ( |sys_led ) out lo ACTIVE LOW
gpio-511 ( |fixedregulator@vcc3v) out hi
Then I tried to enable the GPIO 432 through the 4 bash commands (echo 432 > … etc.): it provoked again an instant reboot upon the echo 1 > /sys/class/gpio/gpio432/value
Then it rebooted. I don’t why but I chose to perform installentware, and when done, without choosing to reboot after the installation, I put again the 4 bash commands. It worked, the USB ports were powered on. But I can’t understand why: is it related to the installentware ? If not, what is it related to ?
[ 123.932857] xhci-hcd-meson xhci-hcd-meson.1.auto: aml_xhci_alloc_dev, slot=1
[ 124.060649] usb 1-2: new high-speed USB device number 2 using xhci-hcd-meson
[ 124.210443] usb 1-2: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice=XXXX
[ 124.210462] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 124.210467] usb 1-2: Product: USB Flash Drive
[ 124.210471] usb 1-2: Manufacturer: <manufacturer>
[ 124.210475] usb 1-2: SerialNumber: <serial_number>
[ 124.210897] usb 1-2: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
[ 124.210954] usb 1-2: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
[ 124.211549] usb-storage 1-2:1.0: USB Mass Storage device detected
[ 124.212020] scsi host0: usb-storage 1-2:1.0
[ 125.538353] scsi 0:0:0:0: Direct-Access <manuf> USB Flash Drive 1100 PQ: 0 ANSI: 4
[ 125.539302] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 125.539769] sd 0:0:0:0: [sda] 15659008 512-byte logical blocks: (8.02 GB/7.47 GiB)
[ 125.540292] sd 0:0:0:0: [sda] Write Protect is off
[ 125.540304] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 125.540815] sd 0:0:0:0: [sda] No Caching mode page found
[ 125.540826] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 125.543764] sda: sda1 sda2
[ 125.546465] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 125.893619] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 126.235302] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
Then I rebooted, and performed again the 4 bash commands. It worked again.
So I should currently be happy, but as I don’t understand why it failed after the first boot for CE 22, and why it worked for an unstable version (CE 22), and why it fails with stable CE 21 version, I am quite perplexed. I suspect that running CE that way is not deterministic and I don’t want to risk to setup something that might break at any time for unknown reasons and random workaround.
So I have to perform some new tests using a stable ne version:CoreELEC-Amlogic-ne.aarch64-21.3-Omega-Generic.img.gz as I would prefer to use a stable release.
I even would like to use a stable version with a modified DTB integrating the GPIO 432 enable without the bash commands.
Do you know a tutorial that would explain me how to setup a proper working development environment in order to try to edit sm1_s905x3_4g_1gbit.dts for integrating the GPIO 432 enable ?
And do you even think it is really possible to produce the wanted DTS modification, or are we doomed to only use bash commands to enable USB ports ?