rho-bot
30 September 2024 15:17
106
Good finding, hopefully this is the rootcause.
So the patch for -NG sc2_s905x4_ugoos_x4.dts would look like:
mount -o rw,remount /flash
fdtput -t s /flash/dtb.img /soc/sdio@fe088000 status disabled
fdtput -t s /flash/dtb.img /soc/pcieA@f5000000 status okay
fdtput -t x /flash/dtb.img /soc/pcieA@f5000000 reset-gpio 0x16 0x35 0x0
sync
reboot
You know 0x16 is correct? It’s the phandle of gpio
node
rho-bot
30 September 2024 16:07
108
Taken from current CE21 -NG dtb, so should be OK (but untested)
Is there a better way to adress phandles by fdtput?
Then it should ok, there is a script somewhere to read property, replace value and write it again.
So on DT update it will not fail.
yfyh
30 September 2024 23:59
110
I test it, but with on luck, still can’t access os
We still need to solve the fundamental problem.
some code from Mecool km6 delux’s android 10 firmware .the kernel is based on 4.9.x.Km6 delux has AP6275s inside.
pcieA@f5000000 {
compatible = "amlogic, amlogic-pcie-v2", "snps,dw-pcie";
reg = <0x0 0xf5000000 0x0 0x400000 0x0 0xfe02c000 0x0 0x2000 0x0 0xf5400000 0x0 0x200000 0x0 0xfe02a000 0x0 0x2000 0x0 0xfe002044 0x0 0x10>;
reg-names = "elbi", "cfg", "config", "phy", "reset";
interrupts = <0x0 0x8d 0x0>;
#interrupt-cells = <0x1>;
bus-range = <0x0 0xff>;
#address-cells = <0x3>;
#size-cells = <0x2>;
interrupt-map-mask = <0x0 0x0 0x0 0x0>;
interrupt-map = <0x0 0x0 0x0 0x0 0x1 0x0 0x8f 0x1>;
device_type = "pci";
ranges = <0x81000000 0x0 0x0 0x0 0xf5600000 0x0 0x100000 0x82000000 0x0 0xf5700000 0x0 0xf5700000 0x0 0x1900000>;
num-lanes = <0x1>;
pcie-num = <0x1>;
clocks = <0x2 0x5 0x2 0xe9 0x2 0xeb>;
clock-names = "pcie_refpll", "pcie", "pcie_phy";
gpio-type = <0x2>;
pcie-apb-rst-bit = <0xe>;
pcie-phy-rst-bit = <0xd>;
pcie-ctrl-a-rst-bit = <0xc>;
pwr-ctl = <0x0>;
power-domains = <0x13 0x7>;
status = "disable";
reset-gpio = <0x1b 0x39 0x0>;
phandle = <0x105>;
};
NG dts :
pcieA@f5000000 {
compatible = "amlogic, amlogic-pcie-v2\0snps,dw-pcie";
reg = <0x00 0xf5000000 0x00 0x400000 0x00 0xfe02c000 0x00 0x2000 0x00 0xf5400000 0x00 0x200000 0x00 0xfe02a000 0x00 0x2000 0x00 0xfe002044 0x00 0x10>;
reg-names = "elbi\0cfg\0config\0phy\0reset";
interrupts = <0x00 0x8d 0x00>;
#interrupt-cells = <0x01>;
bus-range = <0x00 0xff>;
#address-cells = <0x03>;
#size-cells = <0x02>;
interrupt-map-mask = <0x00 0x00 0x00 0x00>;
interrupt-map = <0x00 0x00 0x00 0x00 0x01 0x00 0x8f 0x01>;
device_type = "pci";
ranges = <0x81000000 0x00 0x00 0x00 0xf5600000 0x00 0x100000 0x82000000 0x00 0xf5700000 0x00 0xf5700000 0x00 0x1900000>;
num-lanes = <0x01>;
pcie-num = <0x01>;
clocks = <0x02 0x05 0x02 0xea 0x02 0xec 0x02 0x10>;
clock-names = "pcie_refpll\0pcie\0pcie_phy\0pcie_hcsl";
gpio-type = <0x02>;
pcie-apb-rst-bit = <0x0e>;
pcie-phy-rst-bit = <0x0d>;
pcie-ctrl-a-rst-bit = <0x0c>;
pwr-ctl = <0x02>;
status = "disabled";
reset-gpio = <0x16 0x39 0x00>;
phandle = <0x100>;
};
NE dts:
pcie@f5000000 {
compatible = "amlogic, amlogic-pcie-v2\0snps,dw-pcie";
reg = <0x00 0xf5000000 0x00 0x400000 0x00 0xfe02c000 0x00 0x2000 0x00 0xf5400000 0x00 0x200000 0x00 0xfe02a000 0x00 0x2000 0x00 0xfe002044 0x00 0x10>;
reg-names = "elbi\0cfg\0config\0phy\0reset";
interrupts = <0x00 0x8d 0x04>;
#interrupt-cells = <0x01>;
bus-range = <0x00 0xff>;
#address-cells = <0x03>;
#size-cells = <0x02>;
interrupt-map-mask = <0x00 0x00 0x00 0x00>;
interrupt-map = <0x00 0x00 0x00 0x00 0x01 0x00 0x8f 0x01>;
device_type = "pci";
ranges = <0x81000000 0x00 0x00 0x00 0xf5600000 0x00 0x100000 0x82000000 0x00 0xf5700000 0x00 0xf5700000 0x00 0x1900000>;
num-lanes = <0x01>;
pcie-num = <0x01>;
clocks = <0x08 0x2d 0x08 0x126 0x08 0x128 0x08 0x3d>;
clock-names = "pcie_refpll\0pcie\0pcie_phy\0pcie_hcsl";
gpio-type = <0x02>;
pcie-apb-rst-bit = <0x0e>;
pcie-phy-rst-bit = <0x0d>;
pcie-ctrl-a-rst-bit = <0x0c>;
pwr-ctl = <0x00>;
power-domains = <0x18 0x07>;
pcie-ctrl-sleep-shift = <0x0f>;
pcie-hhi-mem-pd-shift = <0x1a>;
pcie-hhi-mem-pd-mask = <0x0f>;
pcie-ctrl-iso-shift = <0x0f>;
status = "okay";
reset-gpio = <0x1b 0x39 0x00>;
};
android dts:
pcie@f5000000 {
compatible = "amlogic, amlogic-pcie-v2", "snps,dw-pcie";
reg = <0x0 0xf5000000 0x0 0x400000 0x0 0xfe02c000 0x0 0x2000 0x0 0xf5400000 0x0 0x200000 0x0 0xfe02a000 0x0 0x2000 0x0 0xfe002044 0x0 0x10>;
reg-names = "elbi", "cfg", "config", "phy", "reset";
interrupts = <0x0 0x8d 0x1>;
#interrupt-cells = <0x1>;
bus-range = <0x0 0xff>;
#address-cells = <0x3>;
#size-cells = <0x2>;
interrupt-map-mask = <0x0 0x0 0x0 0x0>;
interrupt-map = <0x0 0x0 0x0 0x0 0x1 0x0 0x8f 0x1>;
device_type = "pci";
ranges = <0x81000000 0x0 0x0 0x0 0xf5600000 0x0 0x100000 0x82000000 0x0 0xf5700000 0x0 0xf5700000 0x0 0x1900000>;
num-lanes = <0x1>;
pcie-num = <0x1>;
clocks = <0xa 0x2d 0xa 0x125 0xa 0x127 0xa 0x3c>;
clock-names = "pcie_refpll", "pcie", "pcie_phy", "pcie_hcsl";
gpio-type = <0x2>;
pcie-apb-rst-bit = <0xe>;
pcie-phy-rst-bit = <0xd>;
pcie-ctrl-a-rst-bit = <0xc>;
pwr-ctl = <0x0>;
pcie-ctrl-sleep-shift = <0xf>;
pcie-hhi-mem-pd-shift = <0x1a>;
pcie-hhi-mem-pd-mask = <0xf>;
pcie-ctrl-iso-shift = <0xf>;
status = "okay";
reset-gpio = <0x19 0x35 0x0>;
};
I can’t figure it out anymore. I don’t think NG can use wireless and Bluetooth anymore.
The last chance is Tencent Aurora 5S.
Tencent Aurora 5S
SOC:S905X3-H
Wifi:WIFI6
Android Version:9
Tencent Aurora 4Pro
SOC:S905X4-J
Wifi:WIFI6
Android Version:11
The same factory,almost the same shape,The “5S” dts can help 4Pro’s dts in CE-NG.
5S’s pcieA code is here:
pcieA@fc000000 {
compatible = "amlogic, amlogic-pcie-v2", "snps,dw-pcie";
reg = <0x0 0xfc000000 0x0 0x400000 0x0 0xff648000 0x0 0x2000 0x0 0xfc400000 0x0 0x200000 0x0 0xff646000 0x0 0x2000 0x0 0xffd01080 0x0 0x10>;
reg-names = "elbi", "cfg", "config", "phy", "reset";
interrupts = <0x0 0xdd 0x0>;
#interrupt-cells = <0x1>;
bus-range = <0x0 0xff>;
#address-cells = <0x3>;
#size-cells = <0x2>;
interrupt-map-mask = <0x0 0x0 0x0 0x0>;
interrupt-map = <0x0 0x0 0x0 0x0 0x1 0x0 0xdf 0x1>;
device_type = "pci";
ranges = <0x81000000 0x0 0x0 0x0 0xfc600000 0x0 0x100000 0x82000000 0x0 0xfc700000 0x0 0xfc700000 0x0 0x1900000>;
num-lanes = <0x1>;
pcie-num = <0x1>;
clocks = <0x2 0x18 0x2 0x3f 0x2 0x42>;
clock-names = "pcie_refpll", "pcie", "pcie_phy";
gpio-type = <0x2>;
pcie-apb-rst-bit = <0xf>;
pcie-phy-rst-bit = <0xe>;
pcie-ctrl-a-rst-bit = <0xc>;
pwr-ctl = <0x1>;
pcie-ctrl-sleep-shift = <0x12>;
pcie-hhi-mem-pd-shift = <0x1a>;
pcie-hhi-mem-pd-mask = <0xf>;
pcie-ctrl-iso-shift = <0x12>;
status = "okay";
reset-gpio = <0x11 0x45 0x0>;
phandle = <0xf2>;
I firgure it out.Delet the pcie_hcsl clock in pcieA@f5000000.The system can boot with kinhank g1’s dtb.But no wifi&bt.
dmesg
sei810cpr machine
Android 10,S905X4-B,AP6275PR3 same as AP6275P,firmware not find
yfyh
11 October 2024 04:04
120
I’ve comfirmed changing PCIE reset gpio to 0x35 is the right way, By measuring signal on board. The 100MHz PCIE clock is also generated and applied to wifi module. however, the system still can’t boot up, i can’t figure out why.
So the dts file provided by simonhust is credible, I believe working on compare this dts and find out the gpio configuration differences can be the rightway.
Hello, Tencent Aurora 4pro does not support AP6275P under NG, it cannot work properly. There is no need to work on it anymore, it is meaningless.
yfyh
12 October 2024 00:25
122
Yes, signals on board are correct, means the pcie module in amlogic halted.
Maybe factory boot using ne dtb, switch to ng system cause compatibility issue, it’s related to the chip internal pcie ip setup.
There is a direct factor between ap6275p and the kernel version.
yfyh
12 October 2024 07:32
124
Some one pasted the log, shows kinhank g1 support ap6275p in ng.
But it just can’t work with Aurora 4 pro, something very incomprehensible,i think it’s not just hardware difference, more likely the android boot and ng system compatibility.
However it’s worthly to make the effort.
1 Like
I’ll go back and decompile the ng dts of g1 to see if I can get any clues.