功能:GPIO口控制需要在比较前面的时候可以在dts里面进行设置。

arch/arm64/boot/dts/rockchip/rk3399-tve1030g.dtsi
&cpu_l0 {
        cpu-supply = <&vdd_cpu_l>;
        phy-supply = <&vcc3v3_ssd>;
};

&cpu_l1 {
        cpu-supply = <&vdd_cpu_l>;
};

&cpu_l2 {
        cpu-supply = <&vdd_cpu_l>;
};

&cpu_l3 {
        cpu-supply = <&vdd_cpu_l>;
};

 vcc3v3_ssd: vcc3v3-3g-regulator {
                compatible = "regulator-fixed";
                enable-active-high;
                regulator-always-on;
                regulator-boot-on;
                gpio = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;//gpio
                pinctrl-names = "default";
                pinctrl-0 = <&pcie_ssd_drv>;
                regulator-name = "vcc3v3_ssd";
                regulator-state-mem {
                        regulator-off-in-suspend;
                };
   };

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐