完成网口和串口的适配,注释了一些不用的外设

This commit is contained in:
zhangpeng
2025-05-12 16:33:25 +08:00
parent 22d5a79ee6
commit 461fbeedaf
5 changed files with 102 additions and 617 deletions

View File

@@ -18,7 +18,7 @@
/*************************adc key***********************/
#include "rp-adc-key.dtsi"
// #include "rp-adc-key.dtsi"
/***************************************************/
/*************************gmac***********************/
@@ -27,23 +27,23 @@
/***************************************************/
/*************************CAN**********************/
#include "rp-can0-m0-rk3568.dtsi"
#include "rp-can1-m1-rk3568.dtsi"
#include "rp-can2-m0-rk3568.dtsi"
// #include "rp-can0-m0-rk3568.dtsi"
// #include "rp-can1-m1-rk3568.dtsi"
// #include "rp-can2-m0-rk3568.dtsi"
/**************************************************/
/*********************PCIE**************************/
#include "rk3568-pcie2x1.dtsi"
#include "rk3568-pcie3x2.dtsi"
// #include "rk3568-pcie2x1.dtsi"
// #include "rk3568-pcie3x2.dtsi"
/***************************************************/
/*************************SATA***********************/
#include "rk3568-sata1.dtsi"
// #include "rk3568-sata1.dtsi"
/***************************************************/
#include "lcd-gpio-dr4-rk3568.dtsi" //gpio config for lcd
// #include "lcd-gpio-dr4-rk3568.dtsi" //gpio config for lcd
/****** LCD config reference **/
/** single HDMI */
@@ -364,54 +364,54 @@
* and if mutiple lcd used, we just use the backlight5, backlight10.
*/
/** LCD configuration */
#if defined(RP_SINGLE_LCD)
// #if defined(RP_SINGLE_LCD)
#if defined(RP_MIPI02LVDS)
&dsi0_panel {
enable-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_LOW>; //raw interface is inverse, so set to low
};
#if defined(RP_DUALLVDS)
// dual lvds donot need invert
&backlight4 {
pwms = <&pwm5 0 25000 0>;
};
#else
//pwm and enable pin may be inverted if use mipi to single lvds
&backlight4 {
pwms = <&pwm5 0 25000 1>;
};
#endif
// #if defined(RP_MIPI02LVDS)
// &dsi0_panel {
// enable-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_LOW>; //raw interface is inverse, so set to low
// };
// #if defined(RP_DUALLVDS)
// // dual lvds donot need invert
// &backlight4 {
// pwms = <&pwm5 0 25000 0>;
// };
// #else
// //pwm and enable pin may be inverted if use mipi to single lvds
// &backlight4 {
// pwms = <&pwm5 0 25000 1>;
// };
// #endif
#elif defined(RP_EDP_USED)
&backlight4 {
pwms = <&pwm10 0 25000 0>;
};
#endif
// #elif defined(RP_EDP_USED)
// &backlight4 {
// pwms = <&pwm10 0 25000 0>;
// };
// #endif
#else
&edp_panel {
backlight = <&backlight10>;
};
#ifdef RP_MIPI02LVDS
&dsi0_panel {
backlight = <&backlight5>;
};
#endif
#endif
// #else
// &edp_panel {
// backlight = <&backlight10>;
// };
// #ifdef RP_MIPI02LVDS
// &dsi0_panel {
// backlight = <&backlight5>;
// };
// #endif
// #endif
/** Ethernet config*/
&gmac1 {
tx_delay = <0x49>;
rx_delay = <0x29>;
status = "okay";
};
// &gmac1 {
// tx_delay = <0x49>;
// rx_delay = <0x29>;
// status = "okay";
// };
&gmac0 {
tx_delay = <0x49>;
rx_delay = <0x29>;
status = "okay";
};
// &gmac0 {
// tx_delay = <0x49>;
// rx_delay = <0x29>;
// status = "okay";
// };
/** headphone detect pin */
@@ -467,50 +467,50 @@
/** pcie2x1 */
&vcc3v3_pcie {
/**
* delete for gpio used to be bt_wake_host
* and the vcc3v3_pcie need not control on our board.
*/
/delete-property/ gpio;
};
// &vcc3v3_pcie {
// /**
// * delete for gpio used to be bt_wake_host
// * and the vcc3v3_pcie need not control on our board.
// */
// /delete-property/ gpio;
// };
&pcie2x1 {
status = "disabled";
// &pcie2x1 {
// status = "disabled";
reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
};
// reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
// };
/** pcie3x2 */
&pcie3x2 {
status = "disabled";
reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie3>;
};
// &pcie3x2 {
// status = "disabled";
// reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
// vpcie3v3-supply = <&vcc3v3_pcie3>;
// };
&vcc3v3_pcie3 {
pinctrl-names = "default";
pinctrl-0 = <&pcie3_3v3>;
gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
// &vcc3v3_pcie3 {
// pinctrl-names = "default";
// pinctrl-0 = <&pcie3_3v3>;
// gpio = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
startup-delay-us = <8000>; //5000 is faild
};
// startup-delay-us = <8000>; //5000 is faild
// };
/** mipi camera config */
&vcc_camera {
gpio = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&camera_en>;
};
&gc2093 {
pinctrl-names = "default";
pinctrl-0 = <&cif_clk>;
pinctrl-1 = <&camera_ctl>;
pwdn-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
};
// &vcc_camera {
// gpio = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
// pinctrl-names = "default";
// pinctrl-0 = <&camera_en>;
// };
// &gc2093 {
// pinctrl-names = "default";
// pinctrl-0 = <&cif_clk>;
// pinctrl-1 = <&camera_ctl>;
// pwdn-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_HIGH>;
// reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
// };
&pinctrl {
@@ -553,20 +553,20 @@
};
};
camera-pins {
camera_en: camera-en {
rockchip,pins =
/** gc2093 camera en */
<2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
};
camera_ctl: camera-ctl {
rockchip,pins =
/** gc2093 camera power down */
<3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
/** gc2093 camera reset */
<2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
// camera-pins {
// camera_en: camera-en {
// rockchip,pins =
// /** gc2093 camera en */
// <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
// };
// camera_ctl: camera-ctl {
// rockchip,pins =
// /** gc2093 camera power down */
// <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>,
// /** gc2093 camera reset */
// <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
// };
// };
};