20240112让移远mini-PCIE接口的4G模块EC20在Firefly的AIO-3399J开发板的Android11下跑通【DTS部分】

20240112让移远mini-PCIE接口的4G模块EC20在Firefly的AIO-3399J开发板的Android11下跑通【DTS部分】
2024/1/12 16:20


https://blog.csdn.net/u010164190/article/details/79096345
[Android6.0][RK3399] PCIe 接口 4G模块 EC20 调试记录

https://blog.csdn.net/hnjztyx/article/details/72495433
S5P4418 android 5.1 EC20 R2.0 PCIE接口调试记录


步骤:
1、使用Firefly的AIO-3399【RK3399】开发板,在Android11下调通加USB底板的移远4G模块EC20。
2、将移远mini-PCIE接口的4G模块EC20接入Firefly的AIO-3399,Android11启动之后不能同构4G上网。也没有/dev/ttyUSB2这个设备节点!
3、使用AIO-3399J的DTS【Android10】替换默认的挖掘机的DTS之后,更新的内核可以让移远的EC20通过4G上网。
4、将AIO-3399J的DTS【Android10】合并/替换到挖掘机的DTS之后,更新的内核也可以让移远的EC20通过4G上网。
步骤:根据经验,将AIO-3399J的DTS文件对应到相应的挖掘机的DTS文件之中。
对于:AIO-3399J 和 挖掘机都有的DTS项目,直接使用 AIO-3399J的DTS项目覆盖挖掘机的DTS项目。
对于只在 AIO-3399J 出现的项目,合并到挖掘机对应文件的最后面。
对于只在挖掘机DTS中的项目不处理!


1、
现在可以确认:问题出在DTS设备树的配置部分了!
现在开始比对AIO-3399J和挖掘机的DTS的异同。
Z:\firefly\rockchip-excavator
Makefile
rk3399-android.dtsi
rk3399-dram-default-timing.dtsi
rk3399-excavator-sapphire.dtsi
rk3399-opp.dtsi
rk3399-sapphire-excavator-edp-avb.dts
rk3399-sapphire-excavator-edp.dtsi
rk3399-sapphire.dtsi
rk3399-sched-energy.dtsi
rk3399-vop-clk-set.dtsi
rk3399.dtsi

Z:\firefly\rockchip-firefly
Makefile
rk3399-android.dtsi
rk3399-dram-default-timing.dtsi
rk3399-firefly-aio.dts
rk3399-firefly-aio.dtsi
rk3399-firefly-core.dtsi
rk3399-firefly-demo.dtsi
rk3399-firefly-port.dtsi
rk3399-opp.dtsi
rk3399-sched-energy.dtsi
rk3399-vop-clk-set.dtsi
rk3399.dtsi


干掉同名的文件,差异的文件有:
Z:\firefly\rockchip-excavator
rk3399-excavator-sapphire.dtsi
rk3399-sapphire-excavator-edp-avb.dts
rk3399-sapphire-excavator-edp.dtsi
rk3399-sapphire.dtsi

Z:\firefly\rockchip-firefly
rk3399-firefly-aio.dts
rk3399-firefly-aio.dtsi
rk3399-firefly-core.dtsi
rk3399-firefly-demo.dtsi
rk3399-firefly-port.dtsi


很容易/根据经验/很艰难地比对文件,可以知道:
rk3399-firefly-aio.dts 合并到 rk3399-sapphire-excavator-edp-avb.dts
rk3399-firefly-aio.dtsi 合并到 rk3399-sapphire-excavator-edp.dtsi
rk3399-firefly-core.dtsi 合并到 rk3399-sapphire.dtsi
rk3399-firefly-demo.dtsi  望文生义/根据名字,忽略掉,本文件不处理!
rk3399-firefly-port.dtsi 合并到 rk3399-excavator-sapphire.dtsi


放心,第一次合并/干的时候肯定会出现没有加全/遗漏的问题!
就会出现内核编译不过的问题!那就请根据经验修改吧!

rootroot@rootroot-X99-Turbo:~/3TB/76Android11.0/kernel$ 
rootroot@rootroot-X99-Turbo:~/3TB/76Android11.0/kernel$ make ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3399_Android11/boot.img rk3399-sapphire-excavator-edp-avb.img -j36
  DTC     arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb
  CALL    scripts/checksyscalls.sh

arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb: ERROR (phandle_references): /amba/dma-controller@ff6d0000: Reference to non-existent node or label "iram"

arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb: ERROR (phandle_references): /i2c@ff110000/gc2145@3c/port/endpoint: Reference to non-existent node or label "dvp_in_fcam"

ERROR: Input tree has errors, aborting (use -f to force output)
make[1]: *** [scripts/Makefile.lib:307: arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb] Error 2
make: *** [arch/arm64/Makefile:145: rockchip/rk3399-sapphire-excavator-edp-avb.dtb] Error 2
make: *** Waiting for unfinished jobs....

rootroot@rootroot-X99-Turbo:~/3TB/76Android11.0/kernel$ make ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3399_Android11/boot.img rk3399-sapphire-excavator-edp-avb.img -j36
  DTC     arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb
  CALL    scripts/checksyscalls.sh
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb: Warning (sound_dai_property): /rt5640-sound/simple-audio-card,dai-link@1/cpu:sound-dai: cell 1 is not a phandle reference
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb: Warning (sound_dai_property): /rt5640-sound/simple-audio-card,dai-link@1/cpu: Missing property '#sound-dai-cells' in node /interrupt-controller@fee00000 or bad phandle (referred from sound-dai[1])
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb: Warning (sound_dai_property): /rt5640-sound/simple-audio-card,dai-link@1/codec:sound-dai: cell 1 is not a phandle reference
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb: Warning (sound_dai_property): /rt5640-sound/simple-audio-card,dai-link@1/codec: Missing property '#sound-dai-cells' in node /interrupt-controller@fee00000 or bad phandle (referred from sound-dai[1])
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb.dtb: Warning (graph_endpoint): /i2c@ff110000/xc7160b@1b/port/endpoint: graph connection to node '/syscon@ff770000/mipi-dphy-rx0/ports/port@0/endpoint@2' is not bidirectional
  LDS     arch/arm64/kernel/vdso/vdso.lds
  CC      arch/arm64/kernel/vdso/vgettimeofday.o
  AS      arch/arm64/kernel/vdso/note.o
  AS      arch/arm64/kernel/vdso/sigreturn.o
  LD      arch/arm64/kernel/vdso/vdso.so.dbg
  VDSOSYM include/generated/vdso-offsets.h
  CHK     include/generated/compile.h


2、等你终于编译通过了,单独更新boot.img之后,就kernel/boot了,但是HDMI显示器黑屏,进不了Android11系统的UI界面!
[  659.614425] init: starting service 'vendor.audio-hal'...
[  659.618551] init: starting service 'audioserver'...
[  659.622310] init: starting service 'surfaceflinger'...
[  659.622924] init: Could not create socket 'pdx/system/vr/display/client': Failed to bind socket 'pdx/system/vr/display/client': No such file or directory
[  659.623283] init: Could not create socket 'pdx/system/vr/display/manager': Failed to bind socket 'pdx/system/vr/display/manager': No such file or directory
[  659.623583] init: Could not create socket 'pdx/system/vr/display/vsync': Failed to bind socket 'pdx/system/vr/display/vsync': No such file or directory
[  659.627313] init: starting service 'vendor.hwcomposer-2-1'...
[  659.631574] init: processing action (init.svc.audioserver=running) from (/system/etc/init/audioserver.rc:35)
[  659.631955] init: Command 'start vendor.audio-hal-4-0-msd' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:37) took 0ms and failed: service vendor.audio-hal-4-0-msd not found
[  659.632051] init: Command 'start vendor.audio-hal-2-0' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:39) took 0ms and failed: service vendor.audio-hal-2-0 not found
[  659.717087] type=1400 audit(1358499661.996:1072): avc: denied { read } for comm="android.hardwar" name="resolution_white.xml" dev="dm-0" ino=3901 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=0

[  661.782216] type=1400 audit(1358499664.080:1073): avc: denied { read } for comm="Binder:177_2" name="wakeup9" dev="sysfs" ino=24029 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_power:s0 tclass=dir permissive=0
[  661.782403] type=1400 audit(1358499664.080:1074): avc: denied { read } for comm="Binder:177_2" name="wakeup7" dev="sysfs" ino=23543 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  661.783030] type=1400 audit(1358499664.080:1075): avc: denied { read } for comm="Binder:177_2" name="wakeup10" dev="sysfs" ino=24085 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_power:s0 tclass=dir permissive=0
[  661.783678] type=1400 audit(1358499664.080:1076): avc: denied { read } for comm="Binder:177_2" name="wakeup8" dev="sysfs" ino=23583 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  661.783793] type=1400 audit(1358499664.080:1077): avc: denied { read } for comm="Binder:177_2" name="wakeup13" dev="sysfs" ino=28271 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  661.783882] type=1400 audit(1358499664.080:1078): avc: denied { read } for comm="Binder:177_2" name="wakeup6" dev="sysfs" ino=22974 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  661.783968] type=1400 audit(1358499664.080:1079): avc: denied { read } for comm="Binder:177_2" name="wakeup11" dev="sysfs" ino=24169 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_power:s0 tclass=dir permissive=0
[  664.081178] healthd: battery l=50 v=3 t=2.6 h=2 st=3 fc=100 chg=au
[  664.620523] init: starting service 'vendor.audio-hal'...
[  664.624465] init: starting service 'audioserver'...
[  664.628308] init: starting service 'surfaceflinger'...
[  664.629009] init: Could not create socket 'pdx/system/vr/display/client': Failed to bind socket 'pdx/system/vr/display/client': No such file or directory
[  664.629350] init: Could not create socket 'pdx/system/vr/display/manager': Failed to bind socket 'pdx/system/vr/display/manager': No such file or directory
[  664.629657] init: Could not create socket 'pdx/system/vr/display/vsync': Failed to bind socket 'pdx/system/vr/display/vsync': No such file or directory
[  664.633580] init: starting service 'vendor.hwcomposer-2-1'...
[  664.637739] init: processing action (init.svc.audioserver=running) from (/system/etc/init/audioserver.rc:35)
[  664.638007] init: Command 'start vendor.audio-hal-4-0-msd' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:37) took 0ms and failed: service vendor.audio-hal-4-0-msd not found
[  664.638139] init: Command 'start vendor.audio-hal-2-0' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:39) took 0ms and failed: service vendor.audio-hal-2-0 not found
[  664.719297] type=1400 audit(1358499667.006:1080): avc: denied { read } for comm="android.hardwar" name="resolution_white.xml" dev="dm-0" ino=3901 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=0
[  665.338724] selinux: SELinux:  Could not stat /sys/devices/virtual/net/ipsec_test/queues/tx-0: No such file or directory.
[  665.338772] selinux: 
[  666.786637] type=1400 audit(1358499669.083:1081): avc: denied { read } for comm="Binder:177_2" name="wakeup9" dev="sysfs" ino=24029 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_power:s0 tclass=dir permissive=0
[  666.786799] type=1400 audit(1358499669.083:1082): avc: denied { read } for comm="Binder:177_2" name="wakeup7" dev="sysfs" ino=23543 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  666.786985] type=1400 audit(1358499669.083:1083): avc: denied { read } for comm="Binder:177_2" name="wakeup10" dev="sysfs" ino=24085 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_power:s0 tclass=dir permissive=0
[  666.787470] type=1400 audit(1358499669.083:1084): avc: denied { read } for comm="Binder:177_2" name="wakeup8" dev="sysfs" ino=23583 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  666.787602] type=1400 audit(1358499669.083:1085): avc: denied { read } for comm="Binder:177_2" name="wakeup13" dev="sysfs" ino=28271 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  666.787694] type=1400 audit(1358499669.083:1086): avc: denied { read } for comm="Binder:177_2" name="wakeup6" dev="sysfs" ino=22974 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  666.787784] type=1400 audit(1358499669.083:1087): avc: denied { read } for comm="Binder:177_2" name="wakeup11" dev="sysfs" ino=24169 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_power:s0 tclass=dir permissive=0
[  669.626628] init: starting service 'vendor.audio-hal'...
[  669.630678] init: starting service 'audioserver'...
[  669.634637] init: starting service 'surfaceflinger'...
[  669.635355] init: Could not create socket 'pdx/system/vr/display/client': Failed to bind socket 'pdx/system/vr/display/client': No such file or directory
[  669.635707] init: Could not create socket 'pdx/system/vr/display/manager': Failed to bind socket 'pdx/system/vr/display/manager': No such file or directory
[  669.636015] init: Could not create socket 'pdx/system/vr/display/vsync': Failed to bind socket 'pdx/system/vr/display/vsync': No such file or directory
[  669.639744] init: starting service 'vendor.hwcomposer-2-1'...
[  669.643761] init: processing action (init.svc.audioserver=running) from (/system/etc/init/audioserver.rc:35)
[  669.643992] init: Command 'start vendor.audio-hal-4-0-msd' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:37) took 0ms and failed: service vendor.audio-hal-4-0-msd not found
[  669.644071] init: Command 'start vendor.audio-hal-2-0' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:39) took 0ms and failed: service vendor.audio-hal-2-0 not found
[  669.713773] type=1400 audit(1358499672.010:1088): avc: denied { read } for comm="android.hardwar" name="resolution_white.xml" dev="dm-0" ino=3901 scontext=u:r:hal_graphics_composer_default:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=0
[  671.781897] type=1400 audit(1358499674.076:1089): avc: denied { read } for comm="Binder:177_2" name="wakeup9" dev="sysfs" ino=24029 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_power:s0 tclass=dir permissive=0
[  671.782153] type=1400 audit(1358499674.080:1090): avc: denied { read } for comm="Binder:177_2" name="wakeup7" dev="sysfs" ino=23543 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  671.782687] type=1400 audit(1358499674.080:1091): avc: denied { read } for comm="Binder:177_2" name="wakeup10" dev="sysfs" ino=24085 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_power:s0 tclass=dir permissive=0
[  671.783353] type=1400 audit(1358499674.080:1092): avc: denied { read } for comm="Binder:177_2" name="wakeup8" dev="sysfs" ino=23583 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  671.783465] type=1400 audit(1358499674.080:1093): avc: denied { read } for comm="Binder:177_2" name="wakeup13" dev="sysfs" ino=28271 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  671.783556] type=1400 audit(1358499674.080:1094): avc: denied { read } for comm="Binder:177_2" name="wakeup6" dev="sysfs" ino=22974 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[  671.783643] type=1400 audit(1358499674.080:1095): avc: denied { read } for comm="Binder:177_2" name="wakeup11" dev="sysfs" ino=24169 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs_power:s0 tclass=dir permissive=0

console:/ $ 


3、根据经验可能是某一个文件更改之后出现的问题,
很容易/根据经验/很艰难地定位文件,可以知道:
【问题出在这里,整个文件不要合并了!】
rk3399-firefly-aio.dts 合并到 rk3399-sapphire-excavator-edp-avb.dts

【合并一下的3个文件,解决编译的问题!】更新的内核也可以让移远的EC20通过4G上网。
rk3399-firefly-aio.dtsi 合并到 rk3399-sapphire-excavator-edp.dtsi
rk3399-firefly-core.dtsi 合并到 rk3399-sapphire.dtsi
rk3399-firefly-demo.dtsi  望文生义/根据名字,忽略掉,本文件不处理!
rk3399-firefly-port.dtsi 合并到 rk3399-excavator-sapphire.dtsi


4、查找PCIE/PCIE0根据经验更新代码块即可。
rk3399-firefly-port.dtsi 合并到 rk3399-excavator-sapphire.dtsi
    wireless-bluetooth {
        compatible = "bluetooth-platdata";
        clocks = <&rk808 1>;
        clock-names = "ext_clock";
        //wifi-bt-power-toggle;
        uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
        pinctrl-names = "default", "rts_gpio";
        pinctrl-0 = <&uart0_rts>, <&bt_reset_gpio>, <&bt_wake_gpio>, <&bt_irq_gpio>;
        pinctrl-1 = <&uart0_gpios>;
        //BT,power_gpio  = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */
        BT,reset_gpio    = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */
        BT,wake_gpio     = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */
        BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */
        status = "okay";
    };
    
    vdd_pcie3v3: vdd3v3-pcie-regulator {
        compatible = "regulator-fixed";
        enable-active-high;
        gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&pcie_drv>;
        regulator-name = "vdd3v3_pcie";
    };
    vcc3v3_3g: vcc3v3-3g-regulator {
       compatible = "regulator-fixed";
       enable-active-high;
       regulator-always-on;
       regulator-boot-on;
       gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
       pinctrl-names = "default";
       pinctrl-0 = <&pcie_3g_drv>;
       regulator-name = "vcc3v3_3g";
    };

};

&dfi {
    status = "okay";
};


&pcie0 {
    ep-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
    num-lanes = <4>;
    pinctrl-names = "default";
    pinctrl-0 = <&pcie_clkreqn_cpm>;
};

修改为:
&pcie0 {
    ep-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
    num-lanes = <4>;
    pinctrl-names = "default";
    pinctrl-0 = <&pcie_clkreqn_cpm>;
    vpcie3v3-supply = <&vdd_pcie3v3>;
    status = "okay";

};

&uart0 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart0_xfer &uart0_cts>;
    status = "okay";
};


&pinctrl {
    sdio-pwrseq {
        wifi_enable_h: wifi-enable-h {
            rockchip,pins =
                <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
        };
    };

    wireless-bluetooth {
        uart0_gpios: uart0-gpios {
            rockchip,pins =
                <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
        };
        bt_reset_gpio: bt-reset-gpio {
            rockchip,pins =
                <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
        };
        bt_wake_gpio: bt-wake-gpio {
            rockchip,pins =
                <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
        };
        bt_irq_gpio: bt-irq-gpio {
            rockchip,pins =
                <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
        };
    };
    
    pcie {
        pcie_drv: pcie-drv {
            rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
        };

        pcie_3g_drv: pcie-3g-drv {
            rockchip,pins = <2 6 RK_FUNC_GPIO &pcfg_pull_up>;
        };
    };

};


5、虽然改动居多,但是查找PCIE/PCIE0根据经验更新代码块即可。
rk3399-firefly-aio.dtsi 合并到 rk3399-sapphire-excavator-edp.dtsi
    tc358749x: tc358749x@0f {
        compatible = "toshiba,tc358749x";
        reg = <0x0f>;
        //power-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
        power18-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
        power33-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
        csi-ctl-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
        stanby-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
        reset-gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
        int-gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "default";
        pinctrl-0 = <&hdmiin_gpios>;
        status = "disabled";
    };


&vopl {
    status = "okay";
    assigned-clocks = <&cru DCLK_VOP1_DIV>;
    assigned-clock-parents = <&cru PLL_VPLL>;
};

&pcie_phy {
    status = "okay";
};

&pcie0 {
    status = "okay";
};

修改为:
&vopl {
    status = "okay";
    assigned-clocks = <&cru DCLK_VOP1_DIV>;
    assigned-clock-parents = <&cru PLL_VPLL>;
};

&vdd_pcie3v3 {
    gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;  //change with power led
};

&vcc3v3_3g {
    gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
};

&pcie_phy {
    status = "okay";
};

&pcie0 {
   ep-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
   status = "okay";
};


&rt5651_sound {
    status = "okay";
};

&pinctrl {
    cam0 {
         cif_pwr: cif-pwr {
            rockchip,pins = <1 22 RK_FUNC_GPIO &pcfg_pull_up>;
         };
    };
    
    pcie {
        pcie_drv: pcie-drv {
            rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_pull_none>;
        };

        pcie_3g_drv: pcie-3g-drv {
            rockchip,pins = <2 6 RK_FUNC_GPIO &pcfg_pull_up>;
        };
    };

    
    lcd-panel {
        lcd_panel_reset: lcd-panel-reset {
            rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
        };
    };

    hdmiin {
        hdmiin_gpios: hdmiin_gpios {
        rockchip,pins =
                <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>,
                <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>,
                <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>,
                <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
                <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>,
                <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
        };
    };
};


6、最后很容易/根据经验/很艰难地定位文件,可以知道是这里的问题【电源的配置】:
rk3399-firefly-core.dtsi 合并到 rk3399-sapphire.dtsi
Z:\3TB\76Android11.0\kernel\arch\arm64\boot\dts\rockchip\rk3399-sapphire.dtsi
&i2s2 {
    status = "okay";
};

&io_domains {
    status = "okay";

    bt656-supply = <&vcc_3v0>;
    audio-supply = <&vcca1v8_codec>;
    sdmmc-supply = <&vcc_sdio>;
    gpio1830-supply = <&vcc_3v0>;
};

&pmu_io_domains {
    pmu1830-supply = <&vcc_3v0>;
    status = "okay";
};

修改为:
&i2s2 {
    status = "okay";
};

&io_domains {
    status = "okay";

    bt656-supply = <&vcc1v8_dvp>;        /* bt656_gpio2ab_ms */
    audio-supply = <&vcca1v8_codec>;    /* audio_gpio3d4a_ms */
    //sdmmc-supply = <&vcc_sd>;        /* sdmmc_gpio4b_ms */
    sdmmc-supply = <&vcc_sdio>;
    gpio1830-supply = <&vcc_3v0>;        /* gpio1833_gpio4cd_ms */
};


&pmu_io_domains {
    pmu1830-supply = <&vcc_3v0>;
    status = "okay";
};


7、使用USB底板的EC20能够上网需要修改的部分:
缘起:使用友善之臂的Android11可以让EC20上网,但是同样的修改步骤,Toybrick的Android11不能让EC20上网。
最后确认是selinux的问题!


开发板:Firefly的AIO-3399J【RK3399】
SDK:rk3399-android-11-r20211216.tar.xz【Android11】
Android11.0.tar.bz2.aa【ToyBrick】
Android11.0.tar.bz2.ab
Android11.0.tar.bz2.ac

https://wiki.t-firefly.com/AIO-3399J/prepare_compile_android.html
AIO-3399J产品规格书 立即购买
AIO-3399J 采用 RK3399 六核(A72x2+A53x4) 64 位处理器,主频高达1.8GHz,集成了四核 Mali-T860 GPU,性能优异。


0、简略步骤:
rootroot@rootroot-X99-Turbo:~/3TB$ cat Android11.0.tar.bz2.a* > Android11.0.tar.bz2
rootroot@rootroot-X99-Turbo:~/3TB$ tar jxvf Android11.0.tar.bz2 
rootroot@rootroot-X99-Turbo:~/3TB$ mv Android11.0 64rk3399-android-11
rootroot@rootroot-X99-Turbo:~/3TB$ cd 64rk3399-android-11
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11$ cd u-boot
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11/u-boot$ ./make.sh rk3399
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11/u-boot$ cd ..
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11$ cd kernel/
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11/kernel$ make ARCH=arm64 rockchip_defconfig android-11.config -j36
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11/kernel$ make ARCH=arm64 BOOT_IMG=../rockdev/Image-rk3399_Android11/boot.img rk3399-sapphire-excavator-edp-avb.img -j36
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11$ source build/envsetup.sh 
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11$ lunch
     36. rk3399_Android11-userdebug
Which would you like? [aosp_arm-eng] 36
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11$ 
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11$ make -j36
rootroot@rootroot-X99-Turbo:~/3TB/64rk3399-android-11$ ./build.sh -u


1、
Android11 + Kernel所需要修改的文件:
1、【完全一致/相同】
Z:\rk3399-android-11\device\rockchip\common\4g_modem\manifest.xml

2、复制库文件:
chat
dhcpcd
ip-down
ip-up
libmeig-ril.so
libquec-ril.so
libreference-ril-62.so
libreference-ril.so

Z:\rk3399-android-11\device\rockchip\common\ec20\chat
Z:\rk3399-android-11\device\rockchip\common\ec20\dhcpcd
Z:\rk3399-android-11\device\rockchip\common\ec20\ip-down
Z:\rk3399-android-11\device\rockchip\common\ec20\ip-up
Z:\rk3399-android-11\device\rockchip\common\ec20\libmeig-ril.so
Z:\rk3399-android-11\device\rockchip\common\ec20\libquec-ril.so
Z:\rk3399-android-11\device\rockchip\common\ec20\libreference-ril-62.so
Z:\rk3399-android-11\device\rockchip\common\ec20\libreference-ril.so

3、
Z:\rk3399-android-11\device\rockchip\common\BoardConfig.mk

4、
Z:\rk3399-android-11\device\rockchip\common\device.mk

5、
Z:\rk3399-android-11\device\rockchip\common\ueventd.rockchip.rc

6、
Z:\rk3399-android-11\device\rockchip\rk3399\rk3399_Android11\overlay\frameworks\base\core\res\res\values\config.xml

【不用修改】
Z:\rk3399-android-11\device\rockchip\rk3399\device.mk

7、
Z:\rk3399-android-11\kernel\drivers\net\usb\Makefile
Z:\rk3399-android-11\kernel\drivers\net\usb\qmi_wwan_q.c

8、
Z:\rk3399-android-11\kernel\drivers\usb\serial\option.c
【几乎没有改动】
Z:\rk3399-android-11\kernel\drivers\usb\serial\qcserial.c
Z:\rk3399-android-11\kernel\drivers\usb\serial\usb_wwan.c

9、
Z:\rk3399-android-11\system\core\init\devices.cpp


3、修改selinux部分:
https://blog.csdn.net/taye_year/article/details/125948529
https://codeleading.com/article/76926405628/
RK3568移远4G模块EC20

Z:\3TB\76Android11.0\device\rockchip\common\ueventd.rockchip.rc
Z:\3TB\76Android11.0\device\rockchip\common\sepolicy\private\file_contexts
Z:\3TB\76Android11.0\system\sepolicy\vendor\rild.rc


【相关的资料:】
百度搜索:ifeq ($(strip $(BOARD_HAS_EC20_MODEM)),true)

RK3399 EC20 步骤
Android6.0 RK3399 PCIe 接口 4G模块 EC20 调试记录
rk3568 Android11系统调试ec20模块的gps功能
RK3568-ANDROID11-4G-EC20-(详细步骤)
RK356X android11 移远EC20 modem支持

[ 87.794373] init: Sending signal 9 to service 'ril-daemon' (pid 2176) proce
重复打印'android.hardware.radio@1.1::IRadio/slot1'
+ if(strcmp(descriptor.c_str(),"android.hardware.radio@1.1::IRadio") != 0)
[ 44.972959] init: Control message: Processed ctl.interface_start for 'andro

'android.hardware.radio@1.1::IRadio/slot1' from pid: 154 (/system/bin/hwserv
init: Control message: Processed ctl.interface_start for 'android.hardware.r
type=1400 audit(1704645252.746:494): avc: denied { read write } for comm="ri


BING:[   44.972959] init: Control message: Processed ctl.interface_start for 'android.hardware.radio@1.1::IRadio/slot1' from pid: 149 (/system/bin/hwservicemanager)


https://blog.csdn.net/longmin96/article/details/122716504
RK3568-ANDROID11-4G-EC20-(详细步骤)
注意:硬件可以先使用USB转接板把模块接到电脑上,使用AT指令把模块调好。


https://blog.csdn.net/longmin96/article/details/122687117
RK3568-ANDROID11-4G-EC20-驱动篇(移远模块)
旋风旋风

https://blog.csdn.net/longmin96/article/details/122687865
RK3568-ANDROID11-4G-EC20-系统篇(移远模块)
首先,要先获得技术支持
步骤一,先在USB模块上完成4G
步骤二,移植到PCIE座子上


https://blog.csdn.net/weixin_51178981/article/details/124804679
NXP(imx8qxp)上android11的EG25-G(4G)模块调试记录

修改selinux的权限
修改/system/core/init/selinux.cpp
diff --git a/init/selinux.cpp b/init/selinux.cpp
index 5a0255acd..ae6f1fce9 100644
--- a/init/selinux.cpp
+++ b/init/selinux.cpp
@@ -104,6 +104,7 @@ EnforcingStatus StatusFromCmdline() {
 }
 
 bool IsEnforcing() {
+    return false;
     if (ALLOW_PERMISSIVE_SELINUX) {
         return StatusFromCmdline() == SELINUX_ENFORCING;
     }


https://blog.csdn.net/terry_xiwang/article/details/123137864
RK3568 Android12 移远4G模块EM05-CE 调试心得

4、适配Android部分的时候主要是利用了rk已有的4g modem框架,打开BOARD_HAS_RK_4G_MODEM属性,并将librk-ril.so 替换为Quectel的ril库,这样会少走一些弯路。
5、我用的ril库版本为Quectel_Android_RIL_Driver_V3.3.78,这个版本才能适配Android12。之前用过3.3.57和3.3.62版本的库,加载时都会报错:


【关闭多余的打印LOG】
https://bbs.elecfans.com/jishu_2263076_1_1.html
[问答] 如何调试RK3568-ANDROID11-4G-EC20?


【下载】
https://download.csdn.net/download/seasonfangjing/86247556?utm_source=bbsseo
RK356X android11 移远EC20 modem支持


https://blog.csdn.net/weixin_38420901/article/details/129875533
移远EC20 WINDOWS下安装驱动及开机自动拨号上网
https://download.csdn.net/download/weixin_38420901/87635376
移远EC20 Windows驱动
https://download.csdn.net/download/guoruibin123/19886298
移远EC20 R2.0 全网通4G模块软硬件设计技术资料包(包括模块封装+软硬件设计文档+软件驱动).zip 
https://download.csdn.net/download/xieyunfei1999/88332693
移远USB驱动V2.2.2 Quectel-LTE&5G-Windows-USB-Driver-V2.2.2 EC20最新驱动


https://blog.csdn.net/yjz_0314/article/details/134142847
Android11.0系统中适配EC20模块4G及GPS功能
https://download.csdn.net/download/yjz_0314/88490693?spm=1001.2101.3001.9500
Android11.0系统中适配EC20模块4G及GPS功能


https://download.csdn.net/download/seasonfangjing/88073682
RK3588S android13 ec20 modem移植


https://blog.csdn.net/xierong1/article/details/127091908
rk3399调试EC20 4G模块

还有 android 8.1 与5.1区别很大就是 系统权限
Selinux
./device/rockchip/common/sepolicy/rild.te
./system/sepolicy/vendor/rild.te
./system/sepolicy/public/rild.te
./system/sepolicy/prebuilts/api/26.0/public/rild.te


https://www.cnblogs.com/lialong1st/p/11266330.html
https://blog.csdn.net/weixin_30273931/article/details/101681600
RK3399 4G模块移远EC20移植调试


https://download.csdn.net/download/weixin_44498318/18300885
RK3399 安卓Q适配EC20 4G模块资料


https://blog.csdn.net/linux_qian/article/details/90715599/
rk3399添加EC25E/EC20...模组

搞来搞去搞了很久,差点放弃走人的时候,发现竟然是这点事。。。辛酸史如下:
android6.01-----kernel4.4.36-----编译环境ubuntu16.04
一、kernel driver
内核有4种驱动方式,usb serial、CDC ACM、Gobinet、QMI WWAN,本文选用的是usb serial和QMI WWAN两种驱动。

(4)打开dongle功能
/device/rockchip/common/BoardConfig.mk
BOARD_HAVE_DONGLE ?= true

(5)检查
logcat -b radio -v time    //查看log
getprop init.svc.ril-daemon    //检查ril守护进程Runing
cat init.rc | grep ril-daemon    //检查ril-daemon服务是否生效
getenforce         //检查SELinux是否开启,<setenforce 0>命令关闭
getprop gsm.version.ril-impl  //检查ril版本,出现Quectel_Android_RIL_SR01A41V17,如未出现ril库没有添加上,或者检查phone进程


https://blog.csdn.net/weixin_43069863/article/details/126587254
rk3568 4g 模块调试-ec20(移远模块)

如果无法上网,也可以尝试修改上网状态的选择模式

--- a/frameworks/base/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/frameworks/base/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -237,7 +237,7 @@ public interface RILConstants {
     int PREFERRED_NETWORK_MODE = Optional.of(TelephonyProperties.default_network())
             .filter(list -> !list.isEmpty())
             .map(list -> list.get(0))
-            .orElse(NETWORK_MODE_WCDMA_PREF);
+            .orElse(NETWORK_MODE_LTE_GSM_WCDMA);
 
     int BAND_MODE_UNSPECIFIED = 0;      //"unspecified" (selected by baseband automatically)
     int BAND_MODE_EURO = 1;             //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)


https://blog.csdn.net/weixin_44498318/article/details/109289482
Android:记录一下RK3399 安卓Q适配EC20 4G模块(附log)

4.2 SELinux权限问题
添加权限:
SELinux权限问题解决方法 - CSDN
Selinux SeAndroid理解 - CSDN
Android : SELinux 简析&修改 - 博客园
默认关闭/开启权限:
ANDROID10 关闭SELINUX权限方法 - 灰信网


参考资料:
http://www.friendlyelec.com.cn/agent.asp
http://www.friendlyelec.com.cn/
https://download.friendlyelec.com/NanoPC-T4
https://wiki.friendlyelec.com/wiki/index.php/NanoPC-T4/zh#.E4.B8.8B.E8.BD.BDAndroid10.E6.BA.90.E4.BB.A3.E7.A0.81


https://item.taobao.com/item.htm?spm=a1z09.2.0.0.37562e8dcotDm6&id=570312633249&_u=7ju3ku004a
友善NanoPC-T4瑞芯微RK3399开发板ROS双摄4K播放开源AI智能安卓10

WiKi维基教程(固件介绍,使用说明,操作步骤等)
http://wiki.friendlyelec.com/wiki/index.php/NanoPC-T4
系统固件下载
https://dl.friendlyelec.com/nanopct4
原理图(pdf格式)
http://wiki.friendlyelec.com/wiki/images/e/e0/NanoPC-T4-1902-Schematic.pdf
尺寸图(dxf格式)
http://wiki.friendlyelec.com/wiki/images/b/bc/NanoPC-T4_1802_Drawing%28dxf%29.zip


http://www.friendlyelec.com.cn/nanopi-m4.asp
NanoPi M4 | NanoPi M4V2

https://wiki.friendlyelec.com/wiki/index.php/NanoPi_M4/zh
15.3 编译Android10源代码
15.3.1 下载Android10源代码
有以下两种途径获取 Android10 的源代码,都需要联网:

使用网盘里的git repo压缩包
网盘下载地址: 点击进入

https://download.friendlyelec.com/NanoPiM4
https://pan.baidu.com/share/init?surl=oBLn9H31hILJKEPQXgrUog
提取码:yn6r

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/314176.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

vue3+ts+vite+elementPlus后台管理系统学习总结01

vue3tsviteelementPlus后台管理系统学习总结01 一&#xff1a;运行源代码一&#xff1a;按照博客一步步操作1.ts中引入path模块出错&#xff1a;Cannot find module path or its corresponding type declarations.2.安装最新版本的pnpm:3.配置自动导入时&#xff0c;遇到.eslin…

web网页首页布局

效果展示&#xff1a; html代码&#xff1a; <!doctype html> <html> <head><meta charset"utf-8"><meta http-equiv"X-UA-Compatible" content"IEedge,chrome1"> <meta name"viewport" content&qu…

CSS3简单运用过渡元素(transition)

CSS3过渡 概念&#xff1a;在CSS3中&#xff0c;我们可以使用transition属性将元素的某一个属性从“一个属性值”在指定的时间内平滑地过渡到“另一个属性值”&#xff0c;从而实现动画效果。 CSS3变形&#xff08;transform)呈现的仅仅是一个结果&#xff0c;而CSS过渡&…

AdaM: An Adaptive Fine-Grained Scheme for Distributed Metadata Management——泛读论文

ICPP 2019 Paper 分布式元数据论文汇总 问题 为了同时解决元数据局部性和元数据服务器的负载均衡。 现有方法缺陷 基于哈希的方法&#xff1a;zFS [16]&#xff0c;CalvinFS [21]&#xff0c;DROP [24]&#xff0c;AngleCut [8] 静态子树划分&#xff1a;HDFS [6], NFS [14…

2024年【电工(初级)】最新解析及电工(初级)模拟考试

题库来源&#xff1a;安全生产模拟考试一点通公众号小程序 电工&#xff08;初级&#xff09;最新解析根据新电工&#xff08;初级&#xff09;考试大纲要求&#xff0c;安全生产模拟考试一点通将电工&#xff08;初级&#xff09;模拟考试试题进行汇编&#xff0c;组成一套电…

Java十大经典算法——贪心算法

算法概念&#xff1a; 贪婪算法(贪心算法)是指在对问题进行求解时&#xff0c;在每一步选择中都采取最好或者最优(即最有利)的选择&#xff0c;从而希望能够导致结果是最好或者最优的算法&#xff1b;贪婪算法所得到的结果不一定是最优的结果(有时候会是最优解)&#xff0c;但…

世微AP5125 输入14-80V 输出12V5A LED灯降压恒流电源驱动方案 SOT23-6

这是一款60WLED驱动方案,线路图BOM表如下 ​ 祥单表&#xff1a; 实物图&#xff1a; 产品描述 AP5125 是一款外围电路简单的 Buck 型平均电流检测模式的 LED 恒流驱动器&#xff0c;适用于 8-100V 电压范围的非隔离式大功率恒流 LED 驱动领域。芯片采用固定频率 140kHz 的 …

Springboot3+EasyExcel由浅入深

环境介绍 技术栈 springboot3easyexcel 软件 版本 IDEA IntelliJ IDEA 2022.2.1 JDK 17 Spring Boot 3 EasyExcel是一个基于Java的、快速、简洁、解决大文件内存溢出的Excel处理工具。 他能让你在不用考虑性能、内存的等因素的情况下&#xff0c;快速完成Excel的读、…

Mr_HJ / form-generator项目文档学习与记录(续2)

更多ruoyi-nbcio功能请看演示系统 gitee源代码地址 前后端代码&#xff1a; https://gitee.com/nbacheng/ruoyi-nbcio 演示地址&#xff1a;RuoYi-Nbcio后台管理系统 更多nbcio-boot功能请看演示系统 gitee源代码地址 后端代码&#xff1a; https://gitee.com/nbacheng/n…

vue3打包后页面空白解决方法

vue3打包后页面空白解决方法 问题解决方法 问题 最近写一个小项目 没有打包的时候一切正常 技术栈用的vue3 vite 我用的是npm创建的项目 npm init vuelatest问题一 &#xff1a;打包后页面空白&#xff0c;什么都没有 问题二&#xff1a;刷新页面后找不到资源 把url的inde…

(超详细)5-YOLOV5改进-添加A2Attention注意力机制

1、在yolov5/models下面新建一个A2Attention.py文件&#xff0c;在里面放入下面的代码 代码如下&#xff1a; import numpy as np import torch from torch import nn from torch.nn import init from torch.nn import functional as Fclass DoubleAttention(nn.Module):def …

自研OS,手机厂商的「私心」与软件厂商的「灾难」

作者 | 辰纹 来源 | 洞见新研社 在卷完了配置参数&#xff0c;影像跑分&#xff0c;屏幕快充、存储影像、续航折叠……手机还能怎么卷&#xff1f; 过去的2023年&#xff0c;手机厂商们不约而同的将目标瞄准了自研系统。 站在民族情感层面&#xff0c;中国手机“去安卓化”…

PHP在线考试平台管理系统源码带文字搭建教程和操作手册

PHP在线考试平台管理系统源码带文字搭建教程和操作手册 技术架构 PHP7.2 Thinkphp6 React UmiJs nginx mysql5.7 cnetos7以上 宝塔面板 系统功能特性与介绍 采用PHP7强类型&#xff08;严格模式&#xff09;。 题库管理 支持多种试题类型和录题方式。 考生管理 快速导入考…

Paddle模型转ONNX

深度学习模型在硬件加速器上的部署常常要用到ONNX&#xff08;Open Neural Network Exchange&#xff0c;开放神经网络交换&#xff09;格式&#xff0c;也可以通过ONNX实现不同AI框架&#xff08;如Pytorch、TensorFlow、Caffe2、PaddlePaddle等&#xff09;之间的模型转换。 …

python:for循环 实现FizzBuzz

python&#xff1a;for循环 实现FizzBuzz 要求&#xff1a;输入一个数字&#xff0c;程序遍历从1到输入的数字之间的所有数字&#xff0c;如果该数能被3整除&#xff0c;打印Fizz&#xff1b;如果该数能被5整除&#xff0c;打印Buzz&#xff1b;如果能同时被3和5整除&#xff…

Docker安装Redis 配置文件映射以及密码设置

安装直接docker pull redis即可&#xff0c;默认redis最新版 设置两个配置文件路径 mkdir -p /root/docker/redis/data mkdir -p /root/docker/redis/conf touch redis.conf // 容器挂载用conf配置文件 bind 0.0.0.0 protected-mode yes port 6379 tcp-backlog 511 timeout…

蓝桥杯单片机组备赛——LED指示灯的基本控制

&#x1f388;教程介绍&#xff1a;博客依据b站小蜜蜂老师的教程进行编写&#xff0c;文中会对老师传授的知识进行总结并加入自己的一些理解。教程链接 文章目录 一、点灯介绍二、相关数字芯片介绍2.1 74HC138介绍2.2 74HC573介绍2.3 74HC02介绍 三、代码设计思路四、代码编写…

【C#】当重复使用一段代码倒计时时,使用普通类和静态方法,实现简单的封装性、可扩展性、可维护性

欢迎来到《小5讲堂》 大家好&#xff0c;我是全栈小5。 这是《C#》序列文章&#xff0c;每篇文章将以博主理解的角度展开讲解&#xff0c; 特别是针对知识点的概念进行叙说&#xff0c;大部分文章将会对这些概念进行实际例子验证&#xff0c;以此达到加深对知识点的理解和掌握。…

代码随想录刷题第四十八天| 198.打家劫舍 ● 213.打家劫舍II ● 337.打家劫舍III

代码随想录刷题第四十八天 今天是打家劫舍三部曲&#xff0c;最后一题树形dp有点难&#xff0c;其他还好 打家劫舍 (LC 198) 题目思路&#xff1a; 代码实现&#xff1a; class Solution:def rob(self, nums: List[int]) -> int:dp [0 for _ in range(len(nums)1)]dp[1…