/* SDIO接口Wi-Fi专用配置:SDIO接口节点 */&sdio {max-frequency = < 150000000 >; /* sdio接口的最大频率,可调整 */supports-sdio;bus-width = < 4 >; /* 4线模式,可调整1线模式 */disable-wp;cap-sd-highspeed;cap-sdio-irq;keep-power-in-suspend;mmc-pwrseq = < &sdio_pwrseq >;non-removable;num-slots = < 1 >;pinctrl-names = "default";pinctrl-0 = < &sdiom0_pins >;sd-uhs-sdr104; /* 支持SDIO3.0 */status = "okay";};
/* SDIO接口Wi-Fi专用配置: WIFI_REG_ON: Wi-Fi的电源使能PIN脚 */sdio_pwrseq: sdio-pwrseq {compatible = "mmc-pwrseq-simple";clocks = < &hym8563 >;clock-names = "ext_clock";pinctrl-names = "default";pinctrl-0 = < &wifi_enable_h >;reset-gpios = < &gpio0 RK_PC4 GPIO_ACTIVE_LOW >; /*跟电源使能状态恰好相反:高有效为LOW,低有效则为HIGH。切记:这个配置跟下面的WIFI,poweren_gpio是互斥的,不能同时配置!!!*/ /*特别注意:reset-gpios的GPIO_ACTIVE 配置跟poweren_gpio配置的电源使能状态恰好是相反的*/};/* SDIO接口Wi-Fi专用配置:WIFI_REG_ON脚的pinctrl的配置 */&pinctrl {sdio-pwrseq {wifi_enable_h: wifi-enable-h {rockchip,pins = < 0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none >; /* 对应上面的WIFI_REG_ON,关掉上下拉,防止不能拉高或拉低 */};};}
WIFI节点配置/* Wi-Fi节点 */wireless_wlan: wireless-wlan {compatible = "wlan-platdata";wifi_chip_type = "ap6256"; //模块名称pinctrl-names = "default";pinctrl-0 = < &wifi_host_wake_irq >;WIFI,host_wake_irq = < &gpio0 RK_PB2 GPIO_ACTIVE_HIGH >; //WIFI模块唤醒CPU的//WIFI,poweren_gpio = < &gpio0 RK_PC4 GPIO_ACTIVE_HIGH >; //控制WIFI模块电源的GPIO,配置了sdio_pwrseq就不需要再配置poweren_gpio status = "okay";};
WIFI,host_wake_irq的配置说明:WIFI,host_wake_irq = < &gpio0 RK_PB2 GPIO_ACTIVE_HIGH >; /* WIFI_WAKE_HOST: Wi-Fi中断通知主控的PIN脚。* 特别注意:确认下这个Wi-Fi pin脚跟主控的pin的硬件连接关系,直连的话就是GPIO_ACTIVE_HIGH;* 如果中间加了一个反向管就要改成低电平GPIO_ACTIVE_LOW触发*/
WIFI_WAKE_HOST脚的pinctrl的配置:&pinctrl {wireless-wlan {wifi_host_wake_irq: wifi-host-wake-irq {rockchip,pins = < 0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down >;};};}/* 注意一般Wi-Fi的wake host pin都是高电平触发,* 所以默认这里要配置为下拉; 如果客户的硬件设计* 是反向的则要改为上拉,总之要初始化为与触发电平* 相反的状态*/
以下UART相关的都要配置为实际使用的UART口的所对应PIN,注意RTS/CTS pin一定要按照SDK设计
Copyright 2015-2022 财务报告网版权所有 备案号: 京ICP备12018864号-19 联系邮箱:29 13 23 6 @qq.com