feat:luckfox_gpio_test support luckfox pico and luckfox pico plus

This commit is contained in:
eng33
2023-08-17 22:08:01 +08:00
parent 00aee4108a
commit 4b302ccef8
10 changed files with 375 additions and 309 deletions

View File

@ -54,7 +54,7 @@
gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "activity";
default-state = "on";
};
};
};
};
@ -222,9 +222,9 @@
};
};
&pwm0 {
status = "okay";
};
//&pwm0 {
// status = "okay";
//};
&rkcif {
status = "okay";
@ -273,47 +273,33 @@
vref-supply = <&vcc_1v8>;
};
// &sfc {
// status = "okay";
//&sfc {
// status = "okay";
// flash@0 {
// compatible = "jedec,spi-nor";
// reg = <0>;
// spi-max-frequency = <80000000>;
// spi-rx-bus-width = <4>;
// spi-tx-bus-width = <1>;
// };
// };
// flash@0 {
// compatible = "spi-nand";
// reg = <0>;
// spi-max-frequency = <80000000>;
// spi-rx-bus-width = <4>;
// spi-tx-bus-width = <1>;
// };
//};
// &sdmmc {
// max-frequency = <50000000>;
// no-sdio;
// no-mmc;
// bus-width = <4>;
// cap-mmc-highspeed;
// cap-sd-highspeed;
// disable-wp;
// pinctrl-names = "default";
// pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;
// status = "okay";
// };
//&sdmmc {
// max-frequency = <50000000>;
// no-sdio;
// no-mmc;
// bus-width = <4>;
// cap-mmc-highspeed;
// cap-sd-highspeed;
// disable-wp;
// pinctrl-names = "default";
// pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;
// status = "okay";
//};
&tsadc {
status = "okay";
};
// &u2phy {
// status = "disabled";
// };
// &u2phy_otg {
// status = "disabled";
// };
// &usbdrd {
// status = "disabled";
// };
// &usbdrd_dwc3 {
// status = "disabled";
// };

View File

@ -12,106 +12,106 @@
/ {
model = "Luckfox Pico Plus";
compatible = "rockchip,rv1103g-38x38-ipc-v10", "rockchip,rv1103";
// gpio3pa1:gpio3pa1 {
// compatible = "regulator-fixed";
// pinctrl-names = "default";
// pinctrl-0 = <&gpio3_pa1>;
// regulator-name = "gpio3_pa1";
// regulator-always-on;
// };
gpio3pa1:gpio3pa1 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&gpio3_pa1>;
regulator-name = "gpio3_pa1";
regulator-always-on;
};
// gpio3pa2:gpio3pa2 {
// compatible = "regulator-fixed";
// pinctrl-names = "default";
// pinctrl-0 = <&gpio3_pa2>;
// regulator-name = "gpio3_pa2";
// regulator-always-on;
// };
gpio3pa2:gpio3pa2 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&gpio3_pa2>;
regulator-name = "gpio3_pa2";
regulator-always-on;
};
// gpio3pa3:gpio3pa3 {
// compatible = "regulator-fixed";
// pinctrl-names = "default";
// pinctrl-0 = <&gpio3_pa3>;
// regulator-name = "gpio3_pa3";
// regulator-always-on;
// };
gpio3pa3:gpio3pa3 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&gpio3_pa3>;
regulator-name = "gpio3_pa3";
regulator-always-on;
};
// gpio3pa4:gpio3pa4 {
// compatible = "regulator-fixed";
// pinctrl-names = "default";
// pinctrl-0 = <&gpio3_pa4>;
// regulator-name = "gpio3_pa4";
// regulator-always-on;
// };
gpio3pa4:gpio3pa4 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&gpio3_pa4>;
regulator-name = "gpio3_pa4";
regulator-always-on;
};
// gpio3pa5:gpio3pa5 {
// compatible = "regulator-fixed";
// pinctrl-names = "default";
// pinctrl-0 = <&gpio3_pa5>;
// regulator-name = "gpio3_pa5";
// regulator-always-on;
// };
gpio3pa5:gpio3pa5 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&gpio3_pa5>;
regulator-name = "gpio3_pa5";
regulator-always-on;
};
// gpio3pa6:gpio3pa6 {
// compatible = "regulator-fixed";
// pinctrl-names = "default";
// pinctrl-0 = <&gpio3_pa6>;
// regulator-name = "gpio3_pa6";
// regulator-always-on;
// };
gpio3pa6:gpio3pa6 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&gpio3_pa6>;
regulator-name = "gpio3_pa6";
regulator-always-on;
};
// gpio3pa7:gpio3pa7 {
// compatible = "regulator-fixed";
// pinctrl-names = "default";
// pinctrl-0 = <&gpio3_pa7>;
// regulator-name = "gpio3_pa7";
// regulator-always-on;
// };
gpio3pa7:gpio3pa7 {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&gpio3_pa7>;
regulator-name = "gpio3_pa7";
regulator-always-on;
};
};
/**********GPIO**********/
// &pinctrl {
// gpio3-pa1 {
// gpio3_pa1:gpio3-pa1 {
// rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
// };
// };
&pinctrl {
gpio3-pa1 {
gpio3_pa1:gpio3-pa1 {
rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
// gpio3-pa2 {
// gpio3_pa2:gpio3-pa2 {
// rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
// };
// };
gpio3-pa2 {
gpio3_pa2:gpio3-pa2 {
rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
// gpio3-pa3 {
// gpio3_pa3:gpio3-pa3 {
// rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
// };
// };
gpio3-pa3 {
gpio3_pa3:gpio3-pa3 {
rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
// gpio3-pa4 {
// gpio3_pa4:gpio3-pa4 {
// rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
// };
// };
gpio3-pa4 {
gpio3_pa4:gpio3-pa4 {
rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
// gpio3-pa5 {
// gpio3_pa5:gpio3-pa5 {
// rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
// };
// };
gpio3-pa5 {
gpio3_pa5:gpio3-pa5 {
rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
// gpio3-pa6 {
// gpio3_pa6:gpio3-pa6 {
// rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
// };
// };
gpio3-pa6 {
gpio3_pa6:gpio3-pa6 {
rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
// gpio3-pa7 {
// gpio3_pa7:gpio3-pa7 {
// rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
// };
// };
// };
gpio3-pa7 {
gpio3_pa7:gpio3-pa7 {
rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
&sfc {
status = "okay";
@ -125,30 +125,27 @@
};
};
&usbdrd_dwc3 {
dr_mode = "peripheral";
};
/**********ETH**********/
&gmac {
status = "okay";
};
/**********USB**********/
// &usbdrd {
//&usbdrd {
// status = "disabled";
// };
//};
// &usbdrd_dwc3 {
//&usbdrd_dwc3 {
// status = "disabled";
// };
//};
// &u2phy {
//&u2phy {
// status = "disabled";
// };
//};
// &u2phy_otg {
//&u2phy_otg {
// status = "disabled";
// };
//};
/**********I2C**********/
// &i2c0 {
@ -189,11 +186,11 @@
pinctrl-names = "default";
pinctrl-0 = <&uart4m1_xfer>;
};
// &uart5 {
// status = "okay";
// pinctrl-names = "default";
// pinctrl-0 = <&uart5m0_xfer>;
// };
//&uart5 {
// status = "okay";
// pinctrl-names = "default";
// pinctrl-0 = <&uart5m0_xfer>;
//};
/**********PWM**********/
@ -210,48 +207,48 @@
// pinctrl-0 = <&pwm1m1_pins>;
};
// &pwm2 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm2m2_pins>;
// };
// &pwm3 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm3m2_pins>;
// };
// &pwm4 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm4m2_pins>;
// };
// &pwm5 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm5m2_pins>;
// };
// &pwm6 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm6m2_pins>;
// };
// &pwm7 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm7m2_pins>;
// };
// &pwm8 {
// status = "okay";
// pinctrl-names = "active";
// // pinctrl-0 = <&pwm8m1_pins>;
// pinctrl-0 = <&pwm8m0_pins>;
// };
// &pwm9 {
// status = "okay";
// pinctrl-names = "active";
// // pinctrl-0 = <&pwm9m1_pins>;
// pinctrl-0 = <&pwm9m0_pins>;
// };
//&pwm2 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm2m2_pins>;
//};
//&pwm3 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm3m2_pins>;
//};
//&pwm4 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm4m2_pins>;
//};
//&pwm5 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm5m2_pins>;
//};
//&pwm6 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm6m2_pins>;
//};
//&pwm7 {
// status = "okay";
// pinctrl-names = "active";
// pinctrl-0 = <&pwm7m2_pins>;
//};
//&pwm8 {
// status = "okay";
// pinctrl-names = "active";
// // pinctrl-0 = <&pwm8m1_pins>;
// pinctrl-0 = <&pwm8m0_pins>;
//};
//&pwm9 {
// status = "okay";
// pinctrl-names = "active";
// // pinctrl-0 = <&pwm9m1_pins>;
// pinctrl-0 = <&pwm9m0_pins>;
//};
&pwm10 {
status = "okay";

View File

@ -104,27 +104,32 @@
};
// &sfc {
// status = "okay";
// flash@0 {
// compatible = "spi-nand";
// reg = <0>;
// spi-max-frequency = <75000000>;
// spi-rx-bus-width = <4>;
// spi-tx-bus-width = <1>;
// };
// };
&usbdrd_dwc3 {
dr_mode = "peripheral";
};
/**********ETH**********/
&gmac {
status = "disabled";
};
/**********USB**********/
// &usbdrd {
// status = "disabled";
// };
// &usbdrd_dwc3 {
// status = "disabled";
// };
// &u2phy {
// status = "disabled";
// };
// &u2phy_otg {
// status = "disabled";
// };
/**********I2C**********/
// &i2c0 {
@ -138,7 +143,7 @@
clock-frequency = <100000>;
};
/**********SPI**********/
// /**********SPI**********/
&spi0 {
status = "okay";
pinctrl-names = "default";
@ -154,7 +159,7 @@
};
};
/**********UART**********/
// /**********UART**********/
&uart3 {
status = "okay";
pinctrl-names = "default";